@draftbit/core 46.10.3-bfb540.2 → 46.10.3-c61b39.2
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/Checkbox/CheckboxGroup.js +16 -3
- package/lib/commonjs/components/Checkbox/CheckboxGroup.js.map +1 -1
- package/lib/commonjs/components/Checkbox/CheckboxRow.js +6 -23
- package/lib/commonjs/components/Checkbox/CheckboxRow.js.map +1 -1
- package/lib/commonjs/components/Container.js +94 -0
- package/lib/commonjs/components/Container.js.map +1 -0
- package/lib/commonjs/components/Row.js +74 -0
- package/lib/commonjs/components/Row.js.map +1 -0
- package/lib/commonjs/components/RowBodyIcon.js +46 -0
- package/lib/commonjs/components/RowBodyIcon.js.map +1 -0
- package/lib/commonjs/components/RowHeadlineImageCaption.js +46 -0
- package/lib/commonjs/components/RowHeadlineImageCaption.js.map +1 -0
- package/lib/commonjs/components/RowHeadlineImageIcon.js +52 -0
- package/lib/commonjs/components/RowHeadlineImageIcon.js.map +1 -0
- package/lib/commonjs/index.js +28 -0
- package/lib/commonjs/index.js.map +1 -1
- package/lib/commonjs/mappings/Container.js +38 -0
- package/lib/commonjs/mappings/Container.js.map +1 -0
- package/lib/commonjs/mappings/Layout.js +4 -4
- package/lib/commonjs/mappings/Layout.js.map +1 -1
- package/lib/commonjs/mappings/NativeBase/Layout.js +0 -12
- package/lib/commonjs/mappings/NativeBase/Layout.js.map +1 -1
- package/lib/commonjs/mappings/Picker.js.map +1 -1
- package/lib/module/components/Accordion/AccordionItem.js +23 -4
- package/lib/module/components/Container.js +84 -0
- package/lib/module/components/Container.js.map +1 -0
- package/lib/module/components/Portal/PortalManager.js +34 -7
- package/lib/module/components/Portal/PortalManager.js.map +1 -1
- package/lib/module/components/Row.js +64 -0
- package/lib/module/components/Row.js.map +1 -0
- package/lib/module/components/RowBodyIcon.js +36 -0
- package/lib/module/components/RowBodyIcon.js.map +1 -0
- package/lib/module/components/RowHeadlineImageCaption.js +36 -0
- package/lib/module/components/RowHeadlineImageCaption.js.map +1 -0
- package/lib/module/components/RowHeadlineImageIcon.js +42 -0
- package/lib/module/components/RowHeadlineImageIcon.js.map +1 -0
- package/lib/module/index.js +4 -0
- package/lib/module/index.js.map +1 -1
- package/lib/module/mappings/Container.js +31 -0
- package/lib/module/mappings/Container.js.map +1 -0
- package/lib/module/mappings/Layout.js +4 -4
- package/lib/module/mappings/Layout.js.map +1 -1
- package/lib/module/mappings/NativeBase/Layout.js +1 -13
- package/lib/module/mappings/NativeBase/Layout.js.map +1 -1
- package/lib/typescript/src/components/Container.d.ts +21 -0
- package/lib/typescript/src/components/Container.d.ts.map +1 -0
- package/lib/typescript/src/components/DatePicker/DatePickerComponent.web.d.ts +3 -3
- package/lib/typescript/src/components/Row.d.ts +21 -0
- package/lib/typescript/src/components/Row.d.ts.map +1 -0
- package/lib/typescript/src/components/RowBodyIcon.d.ts +16 -0
- package/lib/typescript/src/components/RowBodyIcon.d.ts.map +1 -0
- package/lib/typescript/src/components/RowHeadlineImageCaption.d.ts +16 -0
- package/lib/typescript/src/components/RowHeadlineImageCaption.d.ts.map +1 -0
- package/lib/typescript/src/components/RowHeadlineImageIcon.d.ts +18 -0
- package/lib/typescript/src/components/RowHeadlineImageIcon.d.ts.map +1 -0
- package/lib/typescript/src/index.d.ts +4 -0
- package/lib/typescript/src/index.d.ts.map +1 -1
- package/lib/typescript/src/mappings/Container.d.ts +55 -0
- package/lib/typescript/src/mappings/Container.d.ts.map +1 -0
- package/lib/typescript/src/mappings/NativeBase/Layout.d.ts +0 -26
- package/lib/typescript/src/mappings/NativeBase/Layout.d.ts.map +1 -1
- package/lib/typescript/src/styles/DefaultTheme.d.ts +1 -1
- package/package.json +15 -11
- package/src/components/Container.js +43 -0
- package/src/components/Container.tsx +116 -0
- package/src/components/Row.js +48 -0
- package/src/components/Row.tsx +108 -0
- package/src/components/RowBodyIcon.js +8 -0
- package/src/components/RowBodyIcon.tsx +47 -0
- package/src/components/RowHeadlineImageCaption.js +12 -0
- package/src/components/RowHeadlineImageCaption.tsx +49 -0
- package/src/components/RowHeadlineImageIcon.js +14 -0
- package/src/components/RowHeadlineImageIcon.tsx +61 -0
- package/src/index.js +4 -0
- package/src/index.tsx +4 -0
- package/src/mappings/Container.js +30 -0
- package/src/mappings/Container.ts +41 -0
- package/src/mappings/Layout.js +4 -4
- package/src/mappings/Layout.ts +4 -4
- package/src/mappings/NativeBase/Layout.js +1 -14
- package/src/mappings/NativeBase/Layout.ts +0 -15
|
@@ -0,0 +1,48 @@
|
|
|
1
|
+
import * as React from "react";
|
|
2
|
+
import { View, Text, Image, StyleSheet, } from "react-native";
|
|
3
|
+
import { withTheme } from "../theming";
|
|
4
|
+
import Config from "./Config";
|
|
5
|
+
const Row = ({ titleTypeStyle, titleColor, subtitleTypeStyle, subtitleColor, title, subtitle, multilineSubtitle, image, right, style, }) => {
|
|
6
|
+
return (React.createElement(View, { style: [styles.container, { padding: 16 }, style] },
|
|
7
|
+
React.createElement(View, { style: styles.leftContainer },
|
|
8
|
+
image && (React.createElement(Image, { source: typeof image === "string" ? { uri: image } : image, style: {
|
|
9
|
+
marginRight: 12,
|
|
10
|
+
width: subtitle
|
|
11
|
+
? Config.rowMultiLineImageSize
|
|
12
|
+
: Config.rowSingleLineImageSize,
|
|
13
|
+
height: subtitle
|
|
14
|
+
? Config.rowMultiLineImageSize
|
|
15
|
+
: Config.rowSingleLineImageSize,
|
|
16
|
+
} })),
|
|
17
|
+
React.createElement(View, { style: styles.textContainer },
|
|
18
|
+
React.createElement(Text, { style: [
|
|
19
|
+
titleTypeStyle,
|
|
20
|
+
{
|
|
21
|
+
color: titleColor,
|
|
22
|
+
},
|
|
23
|
+
], numberOfLines: 1 }, title),
|
|
24
|
+
subtitle ? (React.createElement(Text, { style: [
|
|
25
|
+
subtitleTypeStyle,
|
|
26
|
+
{
|
|
27
|
+
color: subtitleColor,
|
|
28
|
+
marginTop: 4,
|
|
29
|
+
},
|
|
30
|
+
], numberOfLines: multilineSubtitle ? undefined : 1 }, subtitle)) : null)),
|
|
31
|
+
right && right()));
|
|
32
|
+
};
|
|
33
|
+
const styles = StyleSheet.create({
|
|
34
|
+
leftContainer: {
|
|
35
|
+
flexDirection: "row",
|
|
36
|
+
flex: 1,
|
|
37
|
+
},
|
|
38
|
+
container: {
|
|
39
|
+
flexDirection: "row",
|
|
40
|
+
justifyContent: "space-between",
|
|
41
|
+
alignItems: "center",
|
|
42
|
+
},
|
|
43
|
+
textContainer: {
|
|
44
|
+
flex: 1,
|
|
45
|
+
justifyContent: "center",
|
|
46
|
+
},
|
|
47
|
+
});
|
|
48
|
+
export default withTheme(Row);
|
|
@@ -0,0 +1,108 @@
|
|
|
1
|
+
import * as React from "react";
|
|
2
|
+
import {
|
|
3
|
+
View,
|
|
4
|
+
Text,
|
|
5
|
+
Image,
|
|
6
|
+
ImageSourcePropType,
|
|
7
|
+
StyleSheet,
|
|
8
|
+
StyleProp,
|
|
9
|
+
TextStyle,
|
|
10
|
+
ViewStyle,
|
|
11
|
+
} from "react-native";
|
|
12
|
+
import { withTheme } from "../theming";
|
|
13
|
+
import Config from "./Config";
|
|
14
|
+
import theme from "../styles/DefaultTheme";
|
|
15
|
+
|
|
16
|
+
type Props = {
|
|
17
|
+
titleTypeStyle?: StyleProp<TextStyle>;
|
|
18
|
+
titleColor?: string;
|
|
19
|
+
subtitleTypeStyle?: StyleProp<TextStyle>;
|
|
20
|
+
subtitleColor?: string;
|
|
21
|
+
title?: string;
|
|
22
|
+
subtitle?: string;
|
|
23
|
+
multilineSubtitle?: boolean;
|
|
24
|
+
image?: string | ImageSourcePropType;
|
|
25
|
+
right?: () => React.ReactNode;
|
|
26
|
+
style?: StyleProp<ViewStyle>;
|
|
27
|
+
theme: typeof theme;
|
|
28
|
+
};
|
|
29
|
+
|
|
30
|
+
const Row: React.FC<React.PropsWithChildren<Props>> = ({
|
|
31
|
+
titleTypeStyle,
|
|
32
|
+
titleColor,
|
|
33
|
+
subtitleTypeStyle,
|
|
34
|
+
subtitleColor,
|
|
35
|
+
title,
|
|
36
|
+
subtitle,
|
|
37
|
+
multilineSubtitle,
|
|
38
|
+
image,
|
|
39
|
+
right,
|
|
40
|
+
style,
|
|
41
|
+
}) => {
|
|
42
|
+
return (
|
|
43
|
+
<View style={[styles.container, { padding: 16 }, style]}>
|
|
44
|
+
<View style={styles.leftContainer}>
|
|
45
|
+
{image && (
|
|
46
|
+
<Image
|
|
47
|
+
source={typeof image === "string" ? { uri: image } : image}
|
|
48
|
+
style={{
|
|
49
|
+
marginRight: 12,
|
|
50
|
+
width: subtitle
|
|
51
|
+
? Config.rowMultiLineImageSize
|
|
52
|
+
: Config.rowSingleLineImageSize,
|
|
53
|
+
height: subtitle
|
|
54
|
+
? Config.rowMultiLineImageSize
|
|
55
|
+
: Config.rowSingleLineImageSize,
|
|
56
|
+
}}
|
|
57
|
+
/>
|
|
58
|
+
)}
|
|
59
|
+
<View style={styles.textContainer}>
|
|
60
|
+
<Text
|
|
61
|
+
style={[
|
|
62
|
+
titleTypeStyle,
|
|
63
|
+
{
|
|
64
|
+
color: titleColor,
|
|
65
|
+
},
|
|
66
|
+
]}
|
|
67
|
+
numberOfLines={1}
|
|
68
|
+
>
|
|
69
|
+
{title}
|
|
70
|
+
</Text>
|
|
71
|
+
{subtitle ? (
|
|
72
|
+
<Text
|
|
73
|
+
style={[
|
|
74
|
+
subtitleTypeStyle,
|
|
75
|
+
{
|
|
76
|
+
color: subtitleColor,
|
|
77
|
+
marginTop: 4,
|
|
78
|
+
},
|
|
79
|
+
]}
|
|
80
|
+
numberOfLines={multilineSubtitle ? undefined : 1}
|
|
81
|
+
>
|
|
82
|
+
{subtitle}
|
|
83
|
+
</Text>
|
|
84
|
+
) : null}
|
|
85
|
+
</View>
|
|
86
|
+
</View>
|
|
87
|
+
{right && right()}
|
|
88
|
+
</View>
|
|
89
|
+
);
|
|
90
|
+
};
|
|
91
|
+
|
|
92
|
+
const styles = StyleSheet.create({
|
|
93
|
+
leftContainer: {
|
|
94
|
+
flexDirection: "row",
|
|
95
|
+
flex: 1,
|
|
96
|
+
},
|
|
97
|
+
container: {
|
|
98
|
+
flexDirection: "row",
|
|
99
|
+
justifyContent: "space-between",
|
|
100
|
+
alignItems: "center",
|
|
101
|
+
},
|
|
102
|
+
textContainer: {
|
|
103
|
+
flex: 1,
|
|
104
|
+
justifyContent: "center",
|
|
105
|
+
},
|
|
106
|
+
});
|
|
107
|
+
|
|
108
|
+
export default withTheme(Row);
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
import * as React from "react";
|
|
2
|
+
import { withTheme } from "../theming";
|
|
3
|
+
import Row from "./Row";
|
|
4
|
+
import Config from "./Config";
|
|
5
|
+
const RowBodyIcon = ({ Icon, title, subtitle, icon, style, theme: { colors, typography }, }) => {
|
|
6
|
+
return (React.createElement(Row, { titleTypeStyle: typography.body1, titleColor: colors.medium, subtitleTypeStyle: typography.subtitle2, subtitleColor: colors.light, title: title, subtitle: subtitle, right: () => (React.createElement(Icon, { name: icon, size: Config.rowSingleLineIconSize, color: colors.light, style: { marginLeft: 16 } })), style: style }));
|
|
7
|
+
};
|
|
8
|
+
export default withTheme(RowBodyIcon);
|
|
@@ -0,0 +1,47 @@
|
|
|
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 Row from "./Row";
|
|
7
|
+
import Config from "./Config";
|
|
8
|
+
import { StyleProp, ViewStyle } from "react-native";
|
|
9
|
+
|
|
10
|
+
type Props = {
|
|
11
|
+
title?: string;
|
|
12
|
+
subtitle?: string;
|
|
13
|
+
icon: string;
|
|
14
|
+
style?: StyleProp<ViewStyle>;
|
|
15
|
+
theme: Theme;
|
|
16
|
+
} & IconSlot;
|
|
17
|
+
|
|
18
|
+
const RowBodyIcon: React.FC<React.PropsWithChildren<Props>> = ({
|
|
19
|
+
Icon,
|
|
20
|
+
title,
|
|
21
|
+
subtitle,
|
|
22
|
+
icon,
|
|
23
|
+
style,
|
|
24
|
+
theme: { colors, typography },
|
|
25
|
+
}) => {
|
|
26
|
+
return (
|
|
27
|
+
<Row
|
|
28
|
+
titleTypeStyle={typography.body1}
|
|
29
|
+
titleColor={colors.medium}
|
|
30
|
+
subtitleTypeStyle={typography.subtitle2}
|
|
31
|
+
subtitleColor={colors.light}
|
|
32
|
+
title={title}
|
|
33
|
+
subtitle={subtitle}
|
|
34
|
+
right={() => (
|
|
35
|
+
<Icon
|
|
36
|
+
name={icon}
|
|
37
|
+
size={Config.rowSingleLineIconSize}
|
|
38
|
+
color={colors.light}
|
|
39
|
+
style={{ marginLeft: 16 }}
|
|
40
|
+
/>
|
|
41
|
+
)}
|
|
42
|
+
style={style}
|
|
43
|
+
/>
|
|
44
|
+
);
|
|
45
|
+
};
|
|
46
|
+
|
|
47
|
+
export default withTheme(RowBodyIcon);
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
import * as React from "react";
|
|
2
|
+
import { Text } from "react-native";
|
|
3
|
+
import { withTheme } from "../theming";
|
|
4
|
+
import Row from "./Row";
|
|
5
|
+
const RowHeadlineImageCaption = ({ title, subtitle, caption, image, style, theme: { colors, typography }, }) => {
|
|
6
|
+
return (React.createElement(Row, { titleTypeStyle: typography.headline6, titleColor: colors.strong, subtitleTypeStyle: typography.body2, subtitleColor: colors.medium, title: title, subtitle: subtitle, image: image, right: () => (React.createElement(Text, { style: {
|
|
7
|
+
...typography.caption,
|
|
8
|
+
color: colors.strong,
|
|
9
|
+
marginLeft: 16,
|
|
10
|
+
} }, caption)), style: style }));
|
|
11
|
+
};
|
|
12
|
+
export default withTheme(RowHeadlineImageCaption);
|
|
@@ -0,0 +1,49 @@
|
|
|
1
|
+
import * as React from "react";
|
|
2
|
+
import { Text, ImageSourcePropType, StyleProp, ViewStyle } from "react-native";
|
|
3
|
+
import { withTheme } from "../theming";
|
|
4
|
+
import Row from "./Row";
|
|
5
|
+
import theme from "../styles/DefaultTheme";
|
|
6
|
+
|
|
7
|
+
type Props = {
|
|
8
|
+
title?: string;
|
|
9
|
+
subtitle?: string;
|
|
10
|
+
caption?: string;
|
|
11
|
+
image: string | ImageSourcePropType;
|
|
12
|
+
style?: StyleProp<ViewStyle>;
|
|
13
|
+
theme: typeof theme;
|
|
14
|
+
};
|
|
15
|
+
|
|
16
|
+
const RowHeadlineImageCaption: React.FC<React.PropsWithChildren<Props>> = ({
|
|
17
|
+
title,
|
|
18
|
+
subtitle,
|
|
19
|
+
caption,
|
|
20
|
+
image,
|
|
21
|
+
style,
|
|
22
|
+
theme: { colors, typography },
|
|
23
|
+
}) => {
|
|
24
|
+
return (
|
|
25
|
+
<Row
|
|
26
|
+
titleTypeStyle={typography.headline6}
|
|
27
|
+
titleColor={colors.strong}
|
|
28
|
+
subtitleTypeStyle={typography.body2}
|
|
29
|
+
subtitleColor={colors.medium}
|
|
30
|
+
title={title}
|
|
31
|
+
subtitle={subtitle}
|
|
32
|
+
image={image}
|
|
33
|
+
right={() => (
|
|
34
|
+
<Text
|
|
35
|
+
style={{
|
|
36
|
+
...typography.caption,
|
|
37
|
+
color: colors.strong,
|
|
38
|
+
marginLeft: 16,
|
|
39
|
+
}}
|
|
40
|
+
>
|
|
41
|
+
{caption}
|
|
42
|
+
</Text>
|
|
43
|
+
)}
|
|
44
|
+
style={style}
|
|
45
|
+
/>
|
|
46
|
+
);
|
|
47
|
+
};
|
|
48
|
+
|
|
49
|
+
export default withTheme(RowHeadlineImageCaption);
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
import * as React from "react";
|
|
2
|
+
import { withTheme } from "../theming";
|
|
3
|
+
import Row from "./Row";
|
|
4
|
+
import Config from "./Config";
|
|
5
|
+
const RowHeadlineImageIcon = ({ Icon, icon, title, image, subtitle, multilineSubtitle = false, style, theme: { colors, typography }, }) => {
|
|
6
|
+
return (React.createElement(Row, { titleTypeStyle: typography.headline6, titleColor: colors.strong, subtitleTypeStyle: typography.body2, subtitleColor: colors.medium, title: title, subtitle: subtitle, multilineSubtitle: multilineSubtitle, image: image, right: () => (React.createElement(Icon, { name: icon, size: multilineSubtitle
|
|
7
|
+
? Config.rowMultiLineIconSize
|
|
8
|
+
: Config.rowSingleLineIconSize, color: colors.light, style: {
|
|
9
|
+
marginLeft: 16,
|
|
10
|
+
alignSelf: multilineSubtitle ? "flex-start" : "center",
|
|
11
|
+
marginTop: multilineSubtitle ? 4 : 0,
|
|
12
|
+
} })), style: style }));
|
|
13
|
+
};
|
|
14
|
+
export default withTheme(RowHeadlineImageIcon);
|
|
@@ -0,0 +1,61 @@
|
|
|
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 Row from "./Row";
|
|
7
|
+
import Config from "./Config";
|
|
8
|
+
import { ImageSourcePropType, StyleProp, ViewStyle } from "react-native";
|
|
9
|
+
|
|
10
|
+
type Props = {
|
|
11
|
+
title?: string;
|
|
12
|
+
image: string | ImageSourcePropType;
|
|
13
|
+
subtitle?: string;
|
|
14
|
+
multilineSubtitle?: boolean;
|
|
15
|
+
icon: string;
|
|
16
|
+
style?: StyleProp<ViewStyle>;
|
|
17
|
+
theme: Theme;
|
|
18
|
+
} & IconSlot;
|
|
19
|
+
|
|
20
|
+
const RowHeadlineImageIcon: React.FC<React.PropsWithChildren<Props>> = ({
|
|
21
|
+
Icon,
|
|
22
|
+
icon,
|
|
23
|
+
title,
|
|
24
|
+
image,
|
|
25
|
+
subtitle,
|
|
26
|
+
multilineSubtitle = false,
|
|
27
|
+
style,
|
|
28
|
+
theme: { colors, typography },
|
|
29
|
+
}) => {
|
|
30
|
+
return (
|
|
31
|
+
<Row
|
|
32
|
+
titleTypeStyle={typography.headline6}
|
|
33
|
+
titleColor={colors.strong}
|
|
34
|
+
subtitleTypeStyle={typography.body2}
|
|
35
|
+
subtitleColor={colors.medium}
|
|
36
|
+
title={title}
|
|
37
|
+
subtitle={subtitle}
|
|
38
|
+
multilineSubtitle={multilineSubtitle}
|
|
39
|
+
image={image}
|
|
40
|
+
right={() => (
|
|
41
|
+
<Icon
|
|
42
|
+
name={icon}
|
|
43
|
+
size={
|
|
44
|
+
multilineSubtitle
|
|
45
|
+
? Config.rowMultiLineIconSize
|
|
46
|
+
: Config.rowSingleLineIconSize
|
|
47
|
+
}
|
|
48
|
+
color={colors.light}
|
|
49
|
+
style={{
|
|
50
|
+
marginLeft: 16,
|
|
51
|
+
alignSelf: multilineSubtitle ? "flex-start" : "center",
|
|
52
|
+
marginTop: multilineSubtitle ? 4 : 0,
|
|
53
|
+
}}
|
|
54
|
+
/>
|
|
55
|
+
)}
|
|
56
|
+
style={style}
|
|
57
|
+
/>
|
|
58
|
+
);
|
|
59
|
+
};
|
|
60
|
+
|
|
61
|
+
export default withTheme(RowHeadlineImageIcon);
|
package/src/index.js
CHANGED
|
@@ -10,6 +10,7 @@ export { default as AvatarEdit } from "./components/AvatarEdit";
|
|
|
10
10
|
export { default as Card } from "./components/Card";
|
|
11
11
|
export { Checkbox, CheckboxGroup, CheckboxRow } from "./components/Checkbox";
|
|
12
12
|
export { default as CircleImage } from "./components/CircleImage";
|
|
13
|
+
export { default as Container } from "./components/Container";
|
|
13
14
|
export { default as Divider } from "./components/Divider";
|
|
14
15
|
export { default as FAB } from "./components/FAB";
|
|
15
16
|
export { default as FieldSearchBarFull } from "./components/FieldSearchBarFull";
|
|
@@ -42,6 +43,9 @@ export { default as DatePicker } from "./components/DatePicker/DatePicker";
|
|
|
42
43
|
export { default as Picker } from "./components/Picker/Picker";
|
|
43
44
|
export { default as ProgressBar } from "./components/ProgressBar";
|
|
44
45
|
export { default as ProgressCircle } from "./components/ProgressCircle";
|
|
46
|
+
export { default as RowBodyIcon } from "./components/RowBodyIcon";
|
|
47
|
+
export { default as RowHeadlineImageCaption } from "./components/RowHeadlineImageCaption";
|
|
48
|
+
export { default as RowHeadlineImageIcon } from "./components/RowHeadlineImageIcon";
|
|
45
49
|
export { default as Slider } from "./components/Slider";
|
|
46
50
|
export { default as Stepper } from "./components/Stepper";
|
|
47
51
|
export { useAuthState } from "./components/useAuthState";
|
package/src/index.tsx
CHANGED
|
@@ -11,6 +11,7 @@ export { default as AvatarEdit } from "./components/AvatarEdit";
|
|
|
11
11
|
export { default as Card } from "./components/Card";
|
|
12
12
|
export { Checkbox, CheckboxGroup, CheckboxRow } from "./components/Checkbox";
|
|
13
13
|
export { default as CircleImage } from "./components/CircleImage";
|
|
14
|
+
export { default as Container } from "./components/Container";
|
|
14
15
|
export { default as Divider } from "./components/Divider";
|
|
15
16
|
export { default as FAB } from "./components/FAB";
|
|
16
17
|
export { default as FieldSearchBarFull } from "./components/FieldSearchBarFull";
|
|
@@ -68,6 +69,9 @@ export { default as DatePicker } from "./components/DatePicker/DatePicker";
|
|
|
68
69
|
export { default as Picker } from "./components/Picker/Picker";
|
|
69
70
|
export { default as ProgressBar } from "./components/ProgressBar";
|
|
70
71
|
export { default as ProgressCircle } from "./components/ProgressCircle";
|
|
72
|
+
export { default as RowBodyIcon } from "./components/RowBodyIcon";
|
|
73
|
+
export { default as RowHeadlineImageCaption } from "./components/RowHeadlineImageCaption";
|
|
74
|
+
export { default as RowHeadlineImageIcon } from "./components/RowHeadlineImageIcon";
|
|
71
75
|
export { default as Slider } from "./components/Slider";
|
|
72
76
|
export { default as Stepper } from "./components/Stepper";
|
|
73
77
|
export { useAuthState } from "./components/useAuthState";
|
|
@@ -0,0 +1,30 @@
|
|
|
1
|
+
import { GROUPS, COMPONENT_TYPES, FORM_TYPES, PROP_TYPES, createElevationType, createImageProp, createResizeModeProp, CONTAINER_COMPONENT_STYLES_SECTIONS, } from "@draftbit/types";
|
|
2
|
+
export const SEED_DATA = {
|
|
3
|
+
name: "Container",
|
|
4
|
+
tag: "Container",
|
|
5
|
+
description: "A container component with gutter padding",
|
|
6
|
+
category: COMPONENT_TYPES.deprecated,
|
|
7
|
+
stylesPanelSections: CONTAINER_COMPONENT_STYLES_SECTIONS,
|
|
8
|
+
layout: {
|
|
9
|
+
height: 250,
|
|
10
|
+
},
|
|
11
|
+
props: {
|
|
12
|
+
useThemeGutterPadding: {
|
|
13
|
+
group: GROUPS.basic,
|
|
14
|
+
label: "Use gutter padding",
|
|
15
|
+
description: "When true, uses the theme gutter spacing as the container's horizontal padding",
|
|
16
|
+
formType: FORM_TYPES.boolean,
|
|
17
|
+
propType: PROP_TYPES.BOOLEAN,
|
|
18
|
+
defaultValue: false,
|
|
19
|
+
editable: false,
|
|
20
|
+
required: true,
|
|
21
|
+
},
|
|
22
|
+
backgroundImage: createImageProp({
|
|
23
|
+
label: "Background Image",
|
|
24
|
+
description: "Apply a custom background image",
|
|
25
|
+
defaultValue: null,
|
|
26
|
+
}),
|
|
27
|
+
backgroundImageResizeMode: createResizeModeProp(),
|
|
28
|
+
elevation: createElevationType(0),
|
|
29
|
+
},
|
|
30
|
+
};
|
|
@@ -0,0 +1,41 @@
|
|
|
1
|
+
import {
|
|
2
|
+
GROUPS,
|
|
3
|
+
COMPONENT_TYPES,
|
|
4
|
+
FORM_TYPES,
|
|
5
|
+
PROP_TYPES,
|
|
6
|
+
createElevationType,
|
|
7
|
+
createImageProp,
|
|
8
|
+
createResizeModeProp,
|
|
9
|
+
CONTAINER_COMPONENT_STYLES_SECTIONS,
|
|
10
|
+
} from "@draftbit/types";
|
|
11
|
+
|
|
12
|
+
export const SEED_DATA = {
|
|
13
|
+
name: "Container",
|
|
14
|
+
tag: "Container",
|
|
15
|
+
description: "A container component with gutter padding",
|
|
16
|
+
category: COMPONENT_TYPES.deprecated,
|
|
17
|
+
stylesPanelSections: CONTAINER_COMPONENT_STYLES_SECTIONS,
|
|
18
|
+
layout: {
|
|
19
|
+
height: 250,
|
|
20
|
+
},
|
|
21
|
+
props: {
|
|
22
|
+
useThemeGutterPadding: {
|
|
23
|
+
group: GROUPS.basic,
|
|
24
|
+
label: "Use gutter padding",
|
|
25
|
+
description:
|
|
26
|
+
"When true, uses the theme gutter spacing as the container's horizontal padding",
|
|
27
|
+
formType: FORM_TYPES.boolean,
|
|
28
|
+
propType: PROP_TYPES.BOOLEAN,
|
|
29
|
+
defaultValue: false,
|
|
30
|
+
editable: false,
|
|
31
|
+
required: true,
|
|
32
|
+
},
|
|
33
|
+
backgroundImage: createImageProp({
|
|
34
|
+
label: "Background Image",
|
|
35
|
+
description: "Apply a custom background image",
|
|
36
|
+
defaultValue: null,
|
|
37
|
+
}),
|
|
38
|
+
backgroundImageResizeMode: createResizeModeProp(),
|
|
39
|
+
elevation: createElevationType(0),
|
|
40
|
+
},
|
|
41
|
+
};
|
package/src/mappings/Layout.js
CHANGED
|
@@ -31,7 +31,7 @@ export const SEED_DATA = [
|
|
|
31
31
|
{
|
|
32
32
|
name: "Spacer",
|
|
33
33
|
tag: "Spacer",
|
|
34
|
-
category: COMPONENT_TYPES.
|
|
34
|
+
category: COMPONENT_TYPES.deprecated,
|
|
35
35
|
props: {
|
|
36
36
|
top: {
|
|
37
37
|
label: "Top",
|
|
@@ -106,7 +106,7 @@ export const SEED_DATA = [
|
|
|
106
106
|
{
|
|
107
107
|
name: "Center",
|
|
108
108
|
tag: "Center",
|
|
109
|
-
category: COMPONENT_TYPES.
|
|
109
|
+
category: COMPONENT_TYPES.deprecated,
|
|
110
110
|
stylesPanelSections: [StylesPanelSections.NoStyles],
|
|
111
111
|
props: {
|
|
112
112
|
width: {
|
|
@@ -144,7 +144,7 @@ export const SEED_DATA = [
|
|
|
144
144
|
{
|
|
145
145
|
name: "Circle",
|
|
146
146
|
tag: "Circle",
|
|
147
|
-
category: COMPONENT_TYPES.
|
|
147
|
+
category: COMPONENT_TYPES.deprecated,
|
|
148
148
|
stylesPanelSections: [StylesPanelSections.NoStyles],
|
|
149
149
|
props: {
|
|
150
150
|
size: {
|
|
@@ -172,7 +172,7 @@ export const SEED_DATA = [
|
|
|
172
172
|
{
|
|
173
173
|
name: "Square",
|
|
174
174
|
tag: "Square",
|
|
175
|
-
category: COMPONENT_TYPES.
|
|
175
|
+
category: COMPONENT_TYPES.deprecated,
|
|
176
176
|
stylesPanelSections: [StylesPanelSections.NoStyles],
|
|
177
177
|
props: {
|
|
178
178
|
size: {
|
package/src/mappings/Layout.ts
CHANGED
|
@@ -38,7 +38,7 @@ export const SEED_DATA = [
|
|
|
38
38
|
{
|
|
39
39
|
name: "Spacer",
|
|
40
40
|
tag: "Spacer",
|
|
41
|
-
category: COMPONENT_TYPES.
|
|
41
|
+
category: COMPONENT_TYPES.deprecated,
|
|
42
42
|
props: {
|
|
43
43
|
top: {
|
|
44
44
|
label: "Top",
|
|
@@ -113,7 +113,7 @@ export const SEED_DATA = [
|
|
|
113
113
|
{
|
|
114
114
|
name: "Center",
|
|
115
115
|
tag: "Center",
|
|
116
|
-
category: COMPONENT_TYPES.
|
|
116
|
+
category: COMPONENT_TYPES.deprecated,
|
|
117
117
|
stylesPanelSections: [StylesPanelSections.NoStyles],
|
|
118
118
|
props: {
|
|
119
119
|
width: {
|
|
@@ -151,7 +151,7 @@ export const SEED_DATA = [
|
|
|
151
151
|
{
|
|
152
152
|
name: "Circle",
|
|
153
153
|
tag: "Circle",
|
|
154
|
-
category: COMPONENT_TYPES.
|
|
154
|
+
category: COMPONENT_TYPES.deprecated,
|
|
155
155
|
stylesPanelSections: [StylesPanelSections.NoStyles],
|
|
156
156
|
props: {
|
|
157
157
|
size: {
|
|
@@ -179,7 +179,7 @@ export const SEED_DATA = [
|
|
|
179
179
|
{
|
|
180
180
|
name: "Square",
|
|
181
181
|
tag: "Square",
|
|
182
|
-
category: COMPONENT_TYPES.
|
|
182
|
+
category: COMPONENT_TYPES.deprecated,
|
|
183
183
|
stylesPanelSections: [StylesPanelSections.NoStyles],
|
|
184
184
|
props: {
|
|
185
185
|
size: {
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { COMPONENT_TYPES, createBoolProp, CONTAINER_COMPONENT_STYLES_SECTIONS, createStaticNumberProp, StylesPanelSections,
|
|
1
|
+
import { COMPONENT_TYPES, createBoolProp, CONTAINER_COMPONENT_STYLES_SECTIONS, createStaticNumberProp, StylesPanelSections, } from "@draftbit/types";
|
|
2
2
|
const SHARED_SEED_DATA = {
|
|
3
3
|
category: COMPONENT_TYPES.layout,
|
|
4
4
|
packageName: "native-base",
|
|
@@ -48,19 +48,6 @@ export const SEED_DATA = [
|
|
|
48
48
|
...SHARED_SEED_DATA,
|
|
49
49
|
stylesPanelSections: CONTAINER_COMPONENT_STYLES_WITHOUT_FLEX,
|
|
50
50
|
},
|
|
51
|
-
{
|
|
52
|
-
name: "Container",
|
|
53
|
-
tag: "Container",
|
|
54
|
-
description: "The Container restricts a content's width according to current breakpoint, while keeping the size fluid",
|
|
55
|
-
props: {
|
|
56
|
-
centerContent: createStaticBoolProp({
|
|
57
|
-
label: "Center content",
|
|
58
|
-
description: "Center child elements based on their content width",
|
|
59
|
-
defaultValue: true,
|
|
60
|
-
}),
|
|
61
|
-
},
|
|
62
|
-
...SHARED_SEED_DATA,
|
|
63
|
-
},
|
|
64
51
|
{
|
|
65
52
|
name: "Column",
|
|
66
53
|
tag: "Column",
|
|
@@ -4,7 +4,6 @@ import {
|
|
|
4
4
|
CONTAINER_COMPONENT_STYLES_SECTIONS,
|
|
5
5
|
createStaticNumberProp,
|
|
6
6
|
StylesPanelSections,
|
|
7
|
-
createStaticBoolProp,
|
|
8
7
|
} from "@draftbit/types";
|
|
9
8
|
|
|
10
9
|
const SHARED_SEED_DATA = {
|
|
@@ -66,20 +65,6 @@ export const SEED_DATA = [
|
|
|
66
65
|
...SHARED_SEED_DATA,
|
|
67
66
|
stylesPanelSections: CONTAINER_COMPONENT_STYLES_WITHOUT_FLEX,
|
|
68
67
|
},
|
|
69
|
-
{
|
|
70
|
-
name: "Container",
|
|
71
|
-
tag: "Container",
|
|
72
|
-
description:
|
|
73
|
-
"The Container restricts a content's width according to current breakpoint, while keeping the size fluid",
|
|
74
|
-
props: {
|
|
75
|
-
centerContent: createStaticBoolProp({
|
|
76
|
-
label: "Center content",
|
|
77
|
-
description: "Center child elements based on their content width",
|
|
78
|
-
defaultValue: true,
|
|
79
|
-
}),
|
|
80
|
-
},
|
|
81
|
-
...SHARED_SEED_DATA,
|
|
82
|
-
},
|
|
83
68
|
{
|
|
84
69
|
name: "Column",
|
|
85
70
|
tag: "Column",
|