@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.
- package/lib/commonjs/Provider.js.map +1 -1
- package/lib/commonjs/components/ActionSheet/ActionSheetCancel.js.map +1 -1
- package/lib/commonjs/components/ActionSheet/ActionSheetItem.js.map +1 -1
- package/lib/commonjs/components/AnimatedCircularProgress.js.map +1 -1
- package/lib/commonjs/components/AspectRatio.js.map +1 -1
- package/lib/commonjs/components/AvatarEdit.js.map +1 -1
- package/lib/commonjs/components/Banner.js.map +1 -1
- package/lib/commonjs/components/Card.js.map +1 -1
- package/lib/commonjs/components/CardBlock.js.map +1 -1
- package/lib/commonjs/components/CardContainer.js.map +1 -1
- package/lib/commonjs/components/CardContainerRating.js.map +1 -1
- package/lib/commonjs/components/CardContainerShortImage.js.map +1 -1
- package/lib/commonjs/components/CardInline.js.map +1 -1
- package/lib/commonjs/components/Carousel.js.map +1 -1
- package/lib/commonjs/components/CircleImage.js.map +1 -1
- package/lib/commonjs/components/CircularProgress.js.map +1 -1
- package/lib/commonjs/components/Container.js.map +1 -1
- package/lib/commonjs/components/DatePicker/DatePicker.js.map +1 -1
- package/lib/commonjs/components/DatePicker/DatePickerComponent.js.map +1 -1
- package/lib/commonjs/components/DeprecatedFAB.js.map +1 -1
- package/lib/commonjs/components/Divider.js.map +1 -1
- package/lib/commonjs/components/Elevation.js.map +1 -1
- package/lib/commonjs/components/FAB.js.map +1 -1
- package/lib/commonjs/components/FieldSearchBarFull.js.map +1 -1
- package/lib/commonjs/components/Header.js.map +1 -1
- package/lib/commonjs/components/HeaderLarge.js.map +1 -1
- package/lib/commonjs/components/HeaderMedium.js.map +1 -1
- package/lib/commonjs/components/HeaderOverline.js.map +1 -1
- package/lib/commonjs/components/IconButton.js.map +1 -1
- package/lib/commonjs/components/Portal/Portal.js.map +1 -1
- package/lib/commonjs/components/ProgressCircle.js.map +1 -1
- package/lib/commonjs/components/ProgressIndicator.js.map +1 -1
- package/lib/commonjs/components/RadioButton/RadioButtonFieldGroup.js.map +1 -1
- package/lib/commonjs/components/Row.js.map +1 -1
- package/lib/commonjs/components/RowBodyIcon.js.map +1 -1
- package/lib/commonjs/components/RowHeadlineImageCaption.js.map +1 -1
- package/lib/commonjs/components/RowHeadlineImageIcon.js.map +1 -1
- package/lib/commonjs/components/StarRating.js.map +1 -1
- package/lib/commonjs/components/Surface.js.map +1 -1
- package/lib/commonjs/components/Swiper/Swiper.js.map +1 -1
- package/lib/commonjs/components/ToggleButton.js.map +1 -1
- package/lib/commonjs/interfaces/Icon.js.map +1 -1
- package/lib/module/Provider.js.map +1 -1
- package/lib/module/components/ActionSheet/ActionSheetCancel.js.map +1 -1
- package/lib/module/components/ActionSheet/ActionSheetItem.js.map +1 -1
- package/lib/module/components/AnimatedCircularProgress.js.map +1 -1
- package/lib/module/components/AspectRatio.js.map +1 -1
- package/lib/module/components/AvatarEdit.js.map +1 -1
- package/lib/module/components/Banner.js.map +1 -1
- package/lib/module/components/Button.js +32 -11
- package/lib/module/components/Button.js.map +1 -1
- package/lib/module/components/Card.js.map +1 -1
- package/lib/module/components/CardBlock.js.map +1 -1
- package/lib/module/components/CardContainer.js.map +1 -1
- package/lib/module/components/CardContainerRating.js.map +1 -1
- package/lib/module/components/CardContainerShortImage.js.map +1 -1
- package/lib/module/components/CardInline.js.map +1 -1
- package/lib/module/components/Carousel.js.map +1 -1
- package/lib/module/components/Checkbox/index.js.map +1 -1
- package/lib/module/components/CircleImage.js +16 -2
- package/lib/module/components/CircleImage.js.map +1 -1
- package/lib/module/components/CircularProgress.js.map +1 -1
- package/lib/module/components/Container.js.map +1 -1
- package/lib/module/components/DatePicker/DatePicker.js.map +1 -1
- package/lib/module/components/DatePicker/DatePickerComponent.js.map +1 -1
- package/lib/module/components/DatePicker/DatePickerComponentType.js.map +1 -1
- package/lib/module/components/DeprecatedButton.js.map +1 -1
- package/lib/module/components/DeprecatedCardWrapper.js.map +1 -1
- package/lib/module/components/DeprecatedFAB.js +20 -4
- package/lib/module/components/DeprecatedFAB.js.map +1 -1
- package/lib/module/components/Divider.js.map +1 -1
- package/lib/module/components/Elevation.js.map +1 -1
- package/lib/module/components/FAB.js.map +1 -1
- package/lib/module/components/FieldSearchBarFull.js.map +1 -1
- package/lib/module/components/Header.js.map +1 -1
- package/lib/module/components/HeaderLarge.js.map +1 -1
- package/lib/module/components/HeaderMedium.js.map +1 -1
- package/lib/module/components/HeaderOverline.js.map +1 -1
- package/lib/module/components/IconButton.js.map +1 -1
- package/lib/module/components/NumberInput.js +13 -2
- package/lib/module/components/NumberInput.js.map +1 -1
- package/lib/module/components/Portal/Portal.js.map +1 -1
- package/lib/module/components/Portal/PortalManager.js +1 -1
- package/lib/module/components/Portal/PortalManager.js.map +1 -1
- package/lib/module/components/ProgressCircle.js.map +1 -1
- package/lib/module/components/ProgressIndicator.js.map +1 -1
- package/lib/module/components/RadioButton/RadioButtonFieldGroup.js.map +1 -1
- package/lib/module/components/RadioButton/RadioButtonGroup.js +16 -4
- package/lib/module/components/RadioButton/RadioButtonGroup.js.map +1 -1
- package/lib/module/components/RadioButton/RadioButtonRow.js +23 -6
- package/lib/module/components/RadioButton/RadioButtonRow.js.map +1 -1
- package/lib/module/components/Row.js.map +1 -1
- package/lib/module/components/RowBodyIcon.js.map +1 -1
- package/lib/module/components/RowHeadlineImageCaption.js.map +1 -1
- package/lib/module/components/RowHeadlineImageIcon.js.map +1 -1
- package/lib/module/components/ScreenContainer.js +21 -5
- package/lib/module/components/ScreenContainer.js.map +1 -1
- package/lib/module/components/StarRating.js.map +1 -1
- package/lib/module/components/Surface.js.map +1 -1
- package/lib/module/components/Swiper/Swiper.js.map +1 -1
- package/lib/module/components/ToggleButton.js.map +1 -1
- package/lib/module/interfaces/Icon.js.map +1 -1
- package/lib/typescript/src/components/Accordion/AccordionGroup.d.ts +2 -3022
- package/lib/typescript/src/components/Accordion/AccordionItem.d.ts +2 -3010
- package/lib/typescript/src/components/ActionSheet/ActionSheetCancel.d.ts +1 -1
- package/lib/typescript/src/components/ActionSheet/ActionSheetItem.d.ts +1 -1
- package/lib/typescript/src/components/AnimatedCircularProgress.d.ts +1 -1
- package/lib/typescript/src/components/AspectRatio.d.ts +1 -1
- package/lib/typescript/src/components/AvatarEdit.d.ts +2 -2
- package/lib/typescript/src/components/Banner.d.ts +2 -2
- package/lib/typescript/src/components/Card.d.ts +2 -2
- package/lib/typescript/src/components/CardBlock.d.ts +2 -2
- package/lib/typescript/src/components/CardContainer.d.ts +2 -2
- package/lib/typescript/src/components/CardContainerRating.d.ts +2 -2
- package/lib/typescript/src/components/CardContainerShortImage.d.ts +2 -2
- package/lib/typescript/src/components/CardInline.d.ts +2 -2
- package/lib/typescript/src/components/Carousel.d.ts +4 -7
- package/lib/typescript/src/components/CircleImage.d.ts +1 -1
- package/lib/typescript/src/components/Container.d.ts +2 -2
- package/lib/typescript/src/components/DatePicker/DatePicker.d.ts +2 -2
- package/lib/typescript/src/components/DatePicker/DatePickerComponent.d.ts +1 -1
- package/lib/typescript/src/components/DeprecatedButton.d.ts +2 -2
- package/lib/typescript/src/components/DeprecatedCardWrapper.d.ts +2 -2
- package/lib/typescript/src/components/DeprecatedFAB.d.ts +2 -2
- package/lib/typescript/src/components/Divider.d.ts +2 -2
- package/lib/typescript/src/components/Elevation.d.ts +2 -2
- package/lib/typescript/src/components/FAB.d.ts +2 -2
- package/lib/typescript/src/components/FieldSearchBarFull.d.ts +2 -2
- package/lib/typescript/src/components/Header.d.ts +2 -2
- package/lib/typescript/src/components/HeaderLarge.d.ts +2 -2
- package/lib/typescript/src/components/HeaderMedium.d.ts +2 -2
- package/lib/typescript/src/components/HeaderOverline.d.ts +2 -2
- package/lib/typescript/src/components/IconButton.d.ts +2 -2
- package/lib/typescript/src/components/ProgressCircle.d.ts +2 -2
- package/lib/typescript/src/components/ProgressIndicator.d.ts +2 -2
- package/lib/typescript/src/components/RadioButton/RadioButtonFieldGroup.d.ts +2 -2
- package/lib/typescript/src/components/Row.d.ts +2 -2
- package/lib/typescript/src/components/RowBodyIcon.d.ts +2 -2
- package/lib/typescript/src/components/RowHeadlineImageCaption.d.ts +2 -2
- package/lib/typescript/src/components/RowHeadlineImageIcon.d.ts +2 -2
- package/lib/typescript/src/components/Slider.d.ts +2 -3032
- package/lib/typescript/src/components/StarRating.d.ts +2 -2
- package/lib/typescript/src/components/Surface.d.ts +2 -2
- package/lib/typescript/src/components/Switch.d.ts +2 -3018
- package/lib/typescript/src/components/ToggleButton.d.ts +2 -2
- package/lib/typescript/src/interfaces/Icon.d.ts +1 -3
- package/package.json +5 -5
- package/src/Provider.tsx +1 -0
- package/src/components/ActionSheet/ActionSheetCancel.tsx +1 -1
- package/src/components/ActionSheet/ActionSheetItem.js +1 -1
- package/src/components/ActionSheet/ActionSheetItem.tsx +6 -1
- package/src/components/AnimatedCircularProgress.tsx +1 -1
- package/src/components/AspectRatio.tsx +1 -1
- package/src/components/AvatarEdit.tsx +1 -1
- package/src/components/Banner.tsx +1 -1
- package/src/components/Card.tsx +1 -1
- package/src/components/CardBlock.tsx +1 -1
- package/src/components/CardContainer.tsx +1 -1
- package/src/components/CardContainerRating.tsx +1 -1
- package/src/components/CardContainerShortImage.tsx +1 -1
- package/src/components/CardInline.tsx +1 -1
- package/src/components/Carousel.tsx +2 -1
- package/src/components/CircleImage.tsx +1 -1
- package/src/components/CircularProgress.tsx +1 -0
- package/src/components/Container.tsx +1 -1
- package/src/components/DatePicker/DatePicker.tsx +1 -1
- package/src/components/DatePicker/DatePickerComponent.tsx +1 -1
- package/src/components/DeprecatedButton.tsx +1 -1
- package/src/components/DeprecatedCardWrapper.tsx +1 -1
- package/src/components/DeprecatedFAB.tsx +1 -1
- package/src/components/Divider.tsx +1 -1
- package/src/components/Elevation.tsx +6 -1
- package/src/components/FAB.tsx +1 -1
- package/src/components/FieldSearchBarFull.tsx +1 -1
- package/src/components/Header.tsx +1 -1
- package/src/components/HeaderLarge.tsx +1 -1
- package/src/components/HeaderMedium.tsx +1 -1
- package/src/components/HeaderOverline.tsx +1 -1
- package/src/components/IconButton.tsx +1 -1
- package/src/components/Portal/Portal.tsx +1 -0
- package/src/components/ProgressCircle.tsx +2 -1
- package/src/components/ProgressIndicator.tsx +1 -1
- package/src/components/RadioButton/RadioButtonFieldGroup.tsx +1 -1
- package/src/components/Row.tsx +1 -1
- package/src/components/RowBodyIcon.tsx +1 -1
- package/src/components/RowHeadlineImageCaption.tsx +1 -1
- package/src/components/RowHeadlineImageIcon.tsx +1 -1
- package/src/components/StarRating.tsx +2 -2
- package/src/components/Surface.tsx +1 -1
- package/src/components/Swiper/Swiper.tsx +1 -0
- package/src/components/ToggleButton.tsx +1 -1
- 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
|
|
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
|
|
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
|
|
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": "
|
|
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
|
+
"@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.
|
|
48
|
-
"@react-native-picker/picker": "2.4.
|
|
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": "
|
|
81
|
+
"gitHead": "eb73d2cb55b92c502321cec730818f7b45884645"
|
|
82
82
|
}
|
package/src/Provider.tsx
CHANGED
|
@@ -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
|
|
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
|
|
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) || {};
|
package/src/components/Card.tsx
CHANGED
|
@@ -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);
|
|
@@ -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,
|
|
@@ -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
|
|
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;
|
package/src/components/FAB.tsx
CHANGED
|
@@ -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
|
package/src/components/Row.tsx
CHANGED
|
@@ -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
|
},
|
package/src/interfaces/Icon.ts
CHANGED
|
@@ -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
|
|
13
|
+
name: string;
|
|
14
14
|
color?: string;
|
|
15
15
|
size: number;
|
|
16
16
|
style?: StyleProp<ImageStyle>;
|