@draftbit/core 46.7.3 → 46.7.5
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/components/Accordion/AccordionItem.js +4 -23
- package/lib/commonjs/components/AnimatedCircularProgress.js +1 -12
- package/lib/commonjs/components/AvatarEdit.js +4 -15
- package/lib/commonjs/components/Button.js +12 -35
- package/lib/commonjs/components/Checkbox/Checkbox.js +4 -22
- package/lib/commonjs/components/Container.js +4 -15
- package/lib/commonjs/components/DeprecatedButton.js +3 -20
- package/lib/commonjs/components/DeprecatedCardWrapper.js +1 -15
- package/lib/commonjs/components/Elevation.js +14 -2
- package/lib/commonjs/components/IconButton.js +4 -2
- package/lib/commonjs/components/Image.js +2 -17
- package/lib/commonjs/components/NumberInput.js +1 -1
- package/lib/commonjs/components/Picker/Picker.js +4 -9
- package/lib/commonjs/components/Portal/PortalHost.js +15 -44
- package/lib/commonjs/components/Portal/PortalManager.js +8 -34
- package/lib/commonjs/components/Pressable.js +2 -2
- package/lib/commonjs/components/ProgressBar.js +7 -37
- package/lib/commonjs/components/Slider.js +4 -21
- package/lib/commonjs/components/Surface.js +2 -14
- package/lib/commonjs/components/TextField.js +28 -76
- package/lib/commonjs/components/Touchable.js +4 -17
- package/lib/commonjs/constants.js +1 -1
- package/lib/commonjs/hooks.js +2 -1
- package/lib/commonjs/index.js +0 -56
- package/lib/commonjs/mappings/Button.js +2 -2
- package/lib/commonjs/mappings/FlashList.js +28 -0
- package/lib/commonjs/mappings/FlatList.js +14 -0
- package/lib/commonjs/mappings/IconButton.js +4 -6
- package/lib/commonjs/mappings/MapView.js +3 -1
- package/lib/commonjs/mappings/ScrollView.js +7 -1
- package/lib/commonjs/mappings/Touchable.js +9 -2
- package/lib/commonjs/styles/overlay.js +1 -3
- package/lib/commonjs/utilities.js +2 -1
- package/lib/module/components/Button.js +12 -35
- package/lib/module/components/Checkbox/CheckboxGroupRow.js +5 -24
- package/lib/module/components/Checkbox/context.js +1 -1
- package/lib/module/components/CircleImage.js +1 -16
- package/lib/module/components/DeprecatedCardWrapper.js +1 -18
- package/lib/module/components/Divider.js +1 -18
- package/lib/module/components/Elevation.js +2 -14
- package/lib/module/components/FieldSearchBarFull.js +2 -1
- package/lib/module/components/FormRow.js +2 -17
- package/lib/module/components/IconButton.js +4 -2
- package/lib/module/components/Image.js +2 -18
- package/lib/module/components/Layout.js +21 -42
- package/lib/module/components/NumberInput.js +4 -13
- package/lib/module/components/Picker/PickerComponent.ios.js +11 -36
- package/lib/module/components/Portal/PortalConsumer.js +7 -22
- package/lib/module/components/Pressable.js +2 -2
- package/lib/module/components/RadioButton/RadioButton.js +1 -13
- package/lib/module/components/RadioButton/RadioButtonGroup.js +2 -16
- package/lib/module/components/RadioButton/RadioButtonRow.js +5 -24
- package/lib/module/components/Slider.js +4 -21
- package/lib/module/components/StepIndicator.js +18 -58
- package/lib/module/components/TextField.js +28 -78
- package/lib/module/components/ToggleButton.js +2 -16
- package/lib/module/components/Touchable.js +4 -17
- package/lib/module/constants.js +2 -1
- package/lib/module/index.js +0 -8
- package/lib/module/mappings/Button.js +2 -2
- package/lib/module/mappings/FieldSearchBarFull.js +1 -4
- package/lib/module/mappings/FlashList.js +29 -1
- package/lib/module/mappings/FlatList.js +15 -1
- package/lib/module/mappings/IconButton.js +5 -7
- package/lib/module/mappings/MapView.js +3 -1
- package/lib/module/mappings/ScrollView.js +8 -2
- package/lib/module/mappings/Touchable.js +10 -3
- package/lib/module/styles/overlay.js +3 -1
- package/lib/module/utilities.js +2 -1
- package/lib/typescript/src/components/IconButton.d.ts +2 -0
- package/lib/typescript/src/components/IconButton.d.ts.map +1 -1
- package/lib/typescript/src/components/Pressable.d.ts.map +1 -1
- package/lib/typescript/src/components/Touchable.d.ts.map +1 -1
- package/lib/typescript/src/index.d.ts +0 -8
- package/lib/typescript/src/index.d.ts.map +1 -1
- package/lib/typescript/src/mappings/FlashList.d.ts +60 -0
- package/lib/typescript/src/mappings/FlashList.d.ts.map +1 -1
- package/lib/typescript/src/mappings/FlatList.d.ts +30 -0
- package/lib/typescript/src/mappings/FlatList.d.ts.map +1 -1
- package/lib/typescript/src/mappings/IconButton.d.ts +20 -10
- package/lib/typescript/src/mappings/IconButton.d.ts.map +1 -1
- package/lib/typescript/src/mappings/MapView.d.ts +2 -0
- package/lib/typescript/src/mappings/MapView.d.ts.map +1 -1
- package/lib/typescript/src/mappings/ScrollView.d.ts +21 -0
- package/lib/typescript/src/mappings/ScrollView.d.ts.map +1 -1
- package/lib/typescript/src/mappings/Touchable.d.ts +20 -0
- package/lib/typescript/src/mappings/Touchable.d.ts.map +1 -1
- package/package.json +3 -3
- package/src/components/Button.js +1 -1
- package/src/components/Button.tsx +2 -2
- package/src/components/IconButton.js +2 -2
- package/src/components/IconButton.tsx +6 -2
- package/src/components/NumberInput.js +1 -1
- package/src/components/NumberInput.tsx +1 -1
- package/src/components/Pressable.js +1 -1
- package/src/components/Pressable.tsx +2 -2
- package/src/components/Touchable.js +1 -1
- package/src/components/Touchable.tsx +2 -2
- package/src/index.js +0 -8
- package/src/index.tsx +0 -8
- package/src/mappings/Button.js +2 -2
- package/src/mappings/Button.ts +2 -2
- package/src/mappings/FlashList.js +29 -1
- package/src/mappings/FlashList.ts +33 -0
- package/src/mappings/FlatList.js +15 -1
- package/src/mappings/FlatList.ts +17 -0
- package/src/mappings/IconButton.js +5 -7
- package/src/mappings/IconButton.ts +5 -7
- package/src/mappings/MapView.js +2 -0
- package/src/mappings/MapView.ts +2 -0
- package/src/mappings/ScrollView.js +8 -2
- package/src/mappings/ScrollView.ts +10 -1
- package/src/mappings/Touchable.js +10 -3
- package/src/mappings/Touchable.ts +12 -2
- package/lib/commonjs/components/CardBlock.js +0 -115
- package/lib/commonjs/components/CardContainer.js +0 -138
- package/lib/commonjs/components/CardContainerRating.js +0 -133
- package/lib/commonjs/components/CardContainerShortImage.js +0 -84
- package/lib/commonjs/components/CardInline.js +0 -91
- package/lib/commonjs/components/Carousel.js +0 -130
- package/lib/commonjs/components/Header.js +0 -82
- package/lib/commonjs/components/HeaderLarge.js +0 -38
- package/lib/commonjs/components/HeaderMedium.js +0 -38
- package/lib/commonjs/components/HeaderOverline.js +0 -39
- package/lib/module/components/CardBlock.js +0 -108
- package/lib/module/components/CardContainer.js +0 -121
- package/lib/module/components/CardContainerRating.js +0 -135
- package/lib/module/components/CardContainerShortImage.js +0 -90
- package/lib/module/components/CardInline.js +0 -82
- package/lib/module/components/Carousel.js +0 -120
- package/lib/module/components/Header.js +0 -72
- package/lib/module/components/HeaderLarge.js +0 -28
- package/lib/module/components/HeaderMedium.js +0 -28
- package/lib/module/components/HeaderOverline.js +0 -29
- package/lib/typescript/src/components/CardBlock.d.ts +0 -21
- package/lib/typescript/src/components/CardBlock.d.ts.map +0 -1
- package/lib/typescript/src/components/CardContainer.d.ts +0 -23
- package/lib/typescript/src/components/CardContainer.d.ts.map +0 -1
- package/lib/typescript/src/components/CardContainerRating.d.ts +0 -24
- package/lib/typescript/src/components/CardContainerRating.d.ts.map +0 -1
- package/lib/typescript/src/components/CardContainerShortImage.d.ts +0 -19
- package/lib/typescript/src/components/CardContainerShortImage.d.ts.map +0 -1
- package/lib/typescript/src/components/CardInline.d.ts +0 -20
- package/lib/typescript/src/components/CardInline.d.ts.map +0 -1
- package/lib/typescript/src/components/Carousel.d.ts +0 -15
- package/lib/typescript/src/components/Carousel.d.ts.map +0 -1
- package/lib/typescript/src/components/Header.d.ts +0 -20
- package/lib/typescript/src/components/Header.d.ts.map +0 -1
- package/lib/typescript/src/components/HeaderLarge.d.ts +0 -17
- package/lib/typescript/src/components/HeaderLarge.d.ts.map +0 -1
- package/lib/typescript/src/components/HeaderMedium.d.ts +0 -17
- package/lib/typescript/src/components/HeaderMedium.d.ts.map +0 -1
- package/lib/typescript/src/components/HeaderOverline.d.ts +0 -17
- package/lib/typescript/src/components/HeaderOverline.d.ts.map +0 -1
- package/src/components/CardBlock.js +0 -54
- package/src/components/CardBlock.tsx +0 -127
- package/src/components/CardContainer.js +0 -69
- package/src/components/CardContainer.tsx +0 -165
- package/src/components/CardContainerRating.js +0 -79
- package/src/components/CardContainerRating.tsx +0 -175
- package/src/components/CardContainerShortImage.js +0 -33
- package/src/components/CardContainerShortImage.tsx +0 -101
- package/src/components/CardInline.js +0 -36
- package/src/components/CardInline.tsx +0 -93
- package/src/components/Carousel.js +0 -68
- package/src/components/Carousel.tsx +0 -134
- package/src/components/Header.js +0 -44
- package/src/components/Header.tsx +0 -105
- package/src/components/HeaderLarge.js +0 -7
- package/src/components/HeaderLarge.tsx +0 -40
- package/src/components/HeaderMedium.js +0 -7
- package/src/components/HeaderMedium.tsx +0 -41
- package/src/components/HeaderOverline.js +0 -7
- package/src/components/HeaderOverline.tsx +0 -42
|
@@ -1,105 +0,0 @@
|
|
|
1
|
-
import * as React from "react";
|
|
2
|
-
import {
|
|
3
|
-
View,
|
|
4
|
-
Text,
|
|
5
|
-
StyleSheet,
|
|
6
|
-
StyleProp,
|
|
7
|
-
TextStyle,
|
|
8
|
-
ViewStyle,
|
|
9
|
-
} from "react-native";
|
|
10
|
-
import { withTheme } from "../theming";
|
|
11
|
-
import Divider from "./Divider";
|
|
12
|
-
import Touchable from "./Touchable";
|
|
13
|
-
import Config from "./Config";
|
|
14
|
-
|
|
15
|
-
import type { Theme } from "../styles/DefaultTheme";
|
|
16
|
-
import type { IconSlot } from "../interfaces/Icon";
|
|
17
|
-
|
|
18
|
-
type Props = {
|
|
19
|
-
titleTypeStyle?: StyleProp<TextStyle>;
|
|
20
|
-
titleColor: string;
|
|
21
|
-
title: string;
|
|
22
|
-
buttonText: string;
|
|
23
|
-
dividerTopMargin?: number;
|
|
24
|
-
icon: string;
|
|
25
|
-
onPress: () => void;
|
|
26
|
-
style?: StyleProp<ViewStyle>;
|
|
27
|
-
theme: Theme;
|
|
28
|
-
} & IconSlot;
|
|
29
|
-
|
|
30
|
-
const Header: React.FC<React.PropsWithChildren<Props>> = ({
|
|
31
|
-
Icon,
|
|
32
|
-
titleTypeStyle,
|
|
33
|
-
titleColor,
|
|
34
|
-
title,
|
|
35
|
-
buttonText,
|
|
36
|
-
dividerTopMargin,
|
|
37
|
-
icon,
|
|
38
|
-
onPress,
|
|
39
|
-
style,
|
|
40
|
-
theme: { colors, typography },
|
|
41
|
-
}) => {
|
|
42
|
-
return (
|
|
43
|
-
<View style={[styles.container, style]}>
|
|
44
|
-
<View style={styles.topContainer}>
|
|
45
|
-
<Text
|
|
46
|
-
style={[
|
|
47
|
-
titleTypeStyle,
|
|
48
|
-
{
|
|
49
|
-
color: titleColor,
|
|
50
|
-
flex: 1,
|
|
51
|
-
},
|
|
52
|
-
]}
|
|
53
|
-
numberOfLines={1}
|
|
54
|
-
>
|
|
55
|
-
{title}
|
|
56
|
-
</Text>
|
|
57
|
-
{onPress && (
|
|
58
|
-
<Touchable
|
|
59
|
-
style={{ alignSelf: "center", marginLeft: 12 }}
|
|
60
|
-
onPress={onPress}
|
|
61
|
-
>
|
|
62
|
-
<View style={styles.buttonContainer}>
|
|
63
|
-
<Text
|
|
64
|
-
style={[
|
|
65
|
-
typography.subtitle2,
|
|
66
|
-
{
|
|
67
|
-
color: colors.light,
|
|
68
|
-
marginRight: 8,
|
|
69
|
-
},
|
|
70
|
-
]}
|
|
71
|
-
numberOfLines={1}
|
|
72
|
-
>
|
|
73
|
-
{buttonText}
|
|
74
|
-
</Text>
|
|
75
|
-
<Icon
|
|
76
|
-
name={icon}
|
|
77
|
-
size={Config.headerIconSize}
|
|
78
|
-
color={colors.light}
|
|
79
|
-
/>
|
|
80
|
-
</View>
|
|
81
|
-
</Touchable>
|
|
82
|
-
)}
|
|
83
|
-
</View>
|
|
84
|
-
<Divider style={{ marginTop: dividerTopMargin || 16 }} />
|
|
85
|
-
</View>
|
|
86
|
-
);
|
|
87
|
-
};
|
|
88
|
-
|
|
89
|
-
const styles = StyleSheet.create({
|
|
90
|
-
container: {
|
|
91
|
-
alignSelf: "stretch",
|
|
92
|
-
},
|
|
93
|
-
topContainer: {
|
|
94
|
-
flexDirection: "row",
|
|
95
|
-
justifyContent: "space-between",
|
|
96
|
-
alignItems: "center",
|
|
97
|
-
},
|
|
98
|
-
buttonContainer: {
|
|
99
|
-
flexDirection: "row",
|
|
100
|
-
justifyContent: "center",
|
|
101
|
-
alignItems: "center",
|
|
102
|
-
},
|
|
103
|
-
});
|
|
104
|
-
|
|
105
|
-
export default withTheme(Header);
|
|
@@ -1,7 +0,0 @@
|
|
|
1
|
-
import * as React from "react";
|
|
2
|
-
import { withTheme } from "../theming";
|
|
3
|
-
import Header from "./Header";
|
|
4
|
-
const HeaderLarge = ({ Icon, title, buttonText, icon, onPress = () => { }, style, theme: { colors, typography }, }) => {
|
|
5
|
-
return (React.createElement(Header, { Icon: Icon, titleTypeStyle: typography.headline4, titleColor: colors.strong, title: title, buttonText: buttonText, icon: icon, onPress: onPress, style: style }));
|
|
6
|
-
};
|
|
7
|
-
export default withTheme(HeaderLarge);
|
|
@@ -1,40 +0,0 @@
|
|
|
1
|
-
import * as React from "react";
|
|
2
|
-
import { withTheme } from "../theming";
|
|
3
|
-
import type { Theme } from "../styles/DefaultTheme";
|
|
4
|
-
import type { IconSlot } from "../interfaces/Icon";
|
|
5
|
-
import Header from "./Header";
|
|
6
|
-
import { StyleProp, ViewStyle } from "react-native";
|
|
7
|
-
|
|
8
|
-
type Props = {
|
|
9
|
-
title: string;
|
|
10
|
-
buttonText: string;
|
|
11
|
-
icon: string;
|
|
12
|
-
onPress?: () => void;
|
|
13
|
-
style?: StyleProp<ViewStyle>;
|
|
14
|
-
theme: Theme;
|
|
15
|
-
} & IconSlot;
|
|
16
|
-
|
|
17
|
-
const HeaderLarge: React.FC<React.PropsWithChildren<Props>> = ({
|
|
18
|
-
Icon,
|
|
19
|
-
title,
|
|
20
|
-
buttonText,
|
|
21
|
-
icon,
|
|
22
|
-
onPress = () => {},
|
|
23
|
-
style,
|
|
24
|
-
theme: { colors, typography },
|
|
25
|
-
}) => {
|
|
26
|
-
return (
|
|
27
|
-
<Header
|
|
28
|
-
Icon={Icon}
|
|
29
|
-
titleTypeStyle={typography.headline4}
|
|
30
|
-
titleColor={colors.strong}
|
|
31
|
-
title={title}
|
|
32
|
-
buttonText={buttonText}
|
|
33
|
-
icon={icon}
|
|
34
|
-
onPress={onPress}
|
|
35
|
-
style={style}
|
|
36
|
-
/>
|
|
37
|
-
);
|
|
38
|
-
};
|
|
39
|
-
|
|
40
|
-
export default withTheme(HeaderLarge);
|
|
@@ -1,7 +0,0 @@
|
|
|
1
|
-
import * as React from "react";
|
|
2
|
-
import { withTheme } from "../theming";
|
|
3
|
-
import Header from "./Header";
|
|
4
|
-
const HeaderMedium = ({ Icon, title, buttonText, icon, onPress = () => { }, style, theme: { colors, typography }, }) => {
|
|
5
|
-
return (React.createElement(Header, { Icon: Icon, titleTypeStyle: typography.headline6, titleColor: colors.strong, title: title, buttonText: buttonText, icon: icon, onPress: onPress, style: style }));
|
|
6
|
-
};
|
|
7
|
-
export default withTheme(HeaderMedium);
|
|
@@ -1,41 +0,0 @@
|
|
|
1
|
-
import * as React from "react";
|
|
2
|
-
import { withTheme } from "../theming";
|
|
3
|
-
import type { Theme } from "../styles/DefaultTheme";
|
|
4
|
-
import type { IconSlot } from "../interfaces/Icon";
|
|
5
|
-
|
|
6
|
-
import Header from "./Header";
|
|
7
|
-
import { StyleProp, ViewStyle } from "react-native";
|
|
8
|
-
|
|
9
|
-
type Props = {
|
|
10
|
-
title: string;
|
|
11
|
-
buttonText: string;
|
|
12
|
-
icon: string;
|
|
13
|
-
onPress?: () => void;
|
|
14
|
-
style?: StyleProp<ViewStyle>;
|
|
15
|
-
theme: Theme;
|
|
16
|
-
} & IconSlot;
|
|
17
|
-
|
|
18
|
-
const HeaderMedium: React.FC<React.PropsWithChildren<Props>> = ({
|
|
19
|
-
Icon,
|
|
20
|
-
title,
|
|
21
|
-
buttonText,
|
|
22
|
-
icon,
|
|
23
|
-
onPress = () => {},
|
|
24
|
-
style,
|
|
25
|
-
theme: { colors, typography },
|
|
26
|
-
}) => {
|
|
27
|
-
return (
|
|
28
|
-
<Header
|
|
29
|
-
Icon={Icon}
|
|
30
|
-
titleTypeStyle={typography.headline6}
|
|
31
|
-
titleColor={colors.strong}
|
|
32
|
-
title={title}
|
|
33
|
-
buttonText={buttonText}
|
|
34
|
-
icon={icon}
|
|
35
|
-
onPress={onPress}
|
|
36
|
-
style={style}
|
|
37
|
-
/>
|
|
38
|
-
);
|
|
39
|
-
};
|
|
40
|
-
|
|
41
|
-
export default withTheme(HeaderMedium);
|
|
@@ -1,7 +0,0 @@
|
|
|
1
|
-
import * as React from "react";
|
|
2
|
-
import { withTheme } from "../theming";
|
|
3
|
-
import Header from "./Header";
|
|
4
|
-
const HeaderOverline = ({ Icon, title, buttonText, icon, onPress = () => { }, style, theme: { colors, typography }, }) => {
|
|
5
|
-
return (React.createElement(Header, { Icon: Icon, titleTypeStyle: typography.overline, titleColor: colors.light, title: title && title.toUpperCase(), buttonText: buttonText, icon: icon, dividerTopMargin: 12, onPress: onPress, style: style }));
|
|
6
|
-
};
|
|
7
|
-
export default withTheme(HeaderOverline);
|
|
@@ -1,42 +0,0 @@
|
|
|
1
|
-
import * as React from "react";
|
|
2
|
-
import { withTheme } from "../theming";
|
|
3
|
-
import type { Theme } from "../styles/DefaultTheme";
|
|
4
|
-
import type { IconSlot } from "../interfaces/Icon";
|
|
5
|
-
|
|
6
|
-
import Header from "./Header";
|
|
7
|
-
import { StyleProp, ViewStyle } from "react-native";
|
|
8
|
-
|
|
9
|
-
type Props = {
|
|
10
|
-
title: string;
|
|
11
|
-
buttonText: string;
|
|
12
|
-
icon: string;
|
|
13
|
-
onPress?: () => void;
|
|
14
|
-
style?: StyleProp<ViewStyle>;
|
|
15
|
-
theme: Theme;
|
|
16
|
-
} & IconSlot;
|
|
17
|
-
|
|
18
|
-
const HeaderOverline: React.FC<React.PropsWithChildren<Props>> = ({
|
|
19
|
-
Icon,
|
|
20
|
-
title,
|
|
21
|
-
buttonText,
|
|
22
|
-
icon,
|
|
23
|
-
onPress = () => {},
|
|
24
|
-
style,
|
|
25
|
-
theme: { colors, typography },
|
|
26
|
-
}) => {
|
|
27
|
-
return (
|
|
28
|
-
<Header
|
|
29
|
-
Icon={Icon}
|
|
30
|
-
titleTypeStyle={typography.overline}
|
|
31
|
-
titleColor={colors.light}
|
|
32
|
-
title={title && title.toUpperCase()}
|
|
33
|
-
buttonText={buttonText}
|
|
34
|
-
icon={icon}
|
|
35
|
-
dividerTopMargin={12}
|
|
36
|
-
onPress={onPress}
|
|
37
|
-
style={style}
|
|
38
|
-
/>
|
|
39
|
-
);
|
|
40
|
-
};
|
|
41
|
-
|
|
42
|
-
export default withTheme(HeaderOverline);
|