@draftbit/core 46.10.2-f194c1.2 → 46.10.3-0bad1e.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/CheckboxRow.js +23 -6
- package/lib/commonjs/components/FAB.js +18 -4
- package/lib/commonjs/components/YoutubePlayer/YoutubePlayer.js +40 -0
- package/lib/commonjs/components/{YotubePlayer.js → YoutubePlayer/YoutubePlayer.native.js} +4 -10
- package/lib/commonjs/components/YoutubePlayer/YoutubePlayerProps.js +5 -0
- package/lib/commonjs/components/YoutubePlayer/index.js +13 -0
- package/lib/commonjs/constants.js +1 -1
- package/lib/commonjs/index.js +2 -23
- package/lib/commonjs/mappings/NativeBase/Layout.js +97 -0
- package/lib/commonjs/mappings/YoutubePlayer.js +0 -6
- package/lib/module/components/YoutubePlayer/YoutubePlayer.js +32 -0
- package/lib/module/components/YoutubePlayer/YoutubePlayer.native.js +24 -0
- package/lib/module/components/YoutubePlayer/YoutubePlayerProps.js +1 -0
- package/lib/module/components/YoutubePlayer/index.js +1 -0
- package/lib/module/index.js +1 -4
- package/lib/module/mappings/NativeBase/Layout.js +90 -0
- package/lib/module/mappings/YoutubePlayer.js +0 -6
- package/lib/typescript/src/components/YoutubePlayer/YoutubePlayer.d.ts +5 -0
- package/lib/typescript/src/components/YoutubePlayer/YoutubePlayer.d.ts.map +1 -0
- package/lib/typescript/src/components/YoutubePlayer/YoutubePlayer.native.d.ts +5 -0
- package/lib/typescript/src/components/YoutubePlayer/YoutubePlayer.native.d.ts.map +1 -0
- package/lib/typescript/src/components/YoutubePlayer/YoutubePlayerProps.d.ts +8 -0
- package/lib/typescript/src/components/YoutubePlayer/YoutubePlayerProps.d.ts.map +1 -0
- package/lib/typescript/src/components/YoutubePlayer/index.d.ts +2 -0
- package/lib/typescript/src/components/YoutubePlayer/index.d.ts.map +1 -0
- package/lib/typescript/src/index.d.ts +1 -4
- package/lib/typescript/src/index.d.ts.map +1 -1
- package/lib/typescript/src/mappings/NativeBase/Layout.d.ts +107 -0
- package/lib/typescript/src/mappings/NativeBase/Layout.d.ts.map +1 -0
- package/lib/typescript/src/mappings/YoutubePlayer.d.ts +0 -10
- package/lib/typescript/src/mappings/YoutubePlayer.d.ts.map +1 -1
- package/package.json +5 -5
- package/src/components/YoutubePlayer/YoutubePlayer.js +20 -0
- package/src/components/YoutubePlayer/YoutubePlayer.native.js +9 -0
- package/src/components/YoutubePlayer/YoutubePlayer.native.tsx +27 -0
- package/src/components/YoutubePlayer/YoutubePlayer.tsx +36 -0
- package/src/components/YoutubePlayer/YoutubePlayerProps.js +1 -0
- package/src/components/YoutubePlayer/YoutubePlayerProps.ts +8 -0
- package/src/components/YoutubePlayer/index.js +1 -0
- package/src/components/YoutubePlayer/index.ts +1 -0
- package/src/index.js +1 -4
- package/src/index.tsx +1 -4
- package/src/mappings/NativeBase/Layout.js +101 -0
- package/src/mappings/NativeBase/Layout.ts +116 -0
- package/src/mappings/YoutubePlayer.js +0 -6
- package/src/mappings/YoutubePlayer.ts +0 -6
- package/lib/commonjs/components/Row.js +0 -73
- package/lib/commonjs/components/RowBodyIcon.js +0 -45
- package/lib/commonjs/components/RowHeadlineImageCaption.js +0 -45
- package/lib/commonjs/components/RowHeadlineImageIcon.js +0 -51
- package/lib/module/components/Row.js +0 -63
- package/lib/module/components/RowBodyIcon.js +0 -35
- package/lib/module/components/RowHeadlineImageCaption.js +0 -35
- package/lib/module/components/RowHeadlineImageIcon.js +0 -41
- package/lib/module/components/YotubePlayer.js +0 -30
- package/lib/typescript/src/components/Row.d.ts +0 -21
- package/lib/typescript/src/components/Row.d.ts.map +0 -1
- package/lib/typescript/src/components/RowBodyIcon.d.ts +0 -16
- package/lib/typescript/src/components/RowBodyIcon.d.ts.map +0 -1
- package/lib/typescript/src/components/RowHeadlineImageCaption.d.ts +0 -16
- package/lib/typescript/src/components/RowHeadlineImageCaption.d.ts.map +0 -1
- package/lib/typescript/src/components/RowHeadlineImageIcon.d.ts +0 -18
- package/lib/typescript/src/components/RowHeadlineImageIcon.d.ts.map +0 -1
- package/lib/typescript/src/components/YotubePlayer.d.ts +0 -12
- package/lib/typescript/src/components/YotubePlayer.d.ts.map +0 -1
- package/src/components/Row.js +0 -48
- package/src/components/Row.tsx +0 -108
- package/src/components/RowBodyIcon.js +0 -8
- package/src/components/RowBodyIcon.tsx +0 -47
- package/src/components/RowHeadlineImageCaption.js +0 -12
- package/src/components/RowHeadlineImageCaption.tsx +0 -49
- package/src/components/RowHeadlineImageIcon.js +0 -14
- package/src/components/RowHeadlineImageIcon.tsx +0 -61
- package/src/components/YotubePlayer.js +0 -10
- package/src/components/YotubePlayer.tsx +0 -38
|
@@ -1,47 +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 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);
|
|
@@ -1,12 +0,0 @@
|
|
|
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);
|
|
@@ -1,49 +0,0 @@
|
|
|
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);
|
|
@@ -1,14 +0,0 @@
|
|
|
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);
|
|
@@ -1,61 +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 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);
|
|
@@ -1,10 +0,0 @@
|
|
|
1
|
-
import React from "react";
|
|
2
|
-
import YoutubePlayerComponent from "react-native-youtube-iframe";
|
|
3
|
-
import { extractStyles } from "../utilities";
|
|
4
|
-
const YoutubePlayer = ({ videoId, playlist, mute = false, autoplay = false, style, }) => {
|
|
5
|
-
const { viewStyles } = extractStyles(style);
|
|
6
|
-
const { height, width } = viewStyles;
|
|
7
|
-
const defaultVideoId = "nwMUpDESXrI";
|
|
8
|
-
return (React.createElement(YoutubePlayerComponent, { height: height, width: width, play: autoplay, videoId: !videoId && !playlist ? defaultVideoId : videoId, playList: playlist, mute: mute, webViewStyle: style }));
|
|
9
|
-
};
|
|
10
|
-
export default YoutubePlayer;
|
|
@@ -1,38 +0,0 @@
|
|
|
1
|
-
import React from "react";
|
|
2
|
-
import { StyleProp, ViewStyle } from "react-native";
|
|
3
|
-
import YoutubePlayerComponent from "react-native-youtube-iframe";
|
|
4
|
-
import { extractStyles } from "../utilities";
|
|
5
|
-
|
|
6
|
-
interface YoutubePlayerProps {
|
|
7
|
-
videoId?: string;
|
|
8
|
-
playlist?: string;
|
|
9
|
-
mute?: boolean;
|
|
10
|
-
autoplay?: boolean;
|
|
11
|
-
style?: StyleProp<ViewStyle>;
|
|
12
|
-
}
|
|
13
|
-
|
|
14
|
-
const YoutubePlayer: React.FC<YoutubePlayerProps> = ({
|
|
15
|
-
videoId,
|
|
16
|
-
playlist,
|
|
17
|
-
mute = false,
|
|
18
|
-
autoplay = false,
|
|
19
|
-
style,
|
|
20
|
-
}) => {
|
|
21
|
-
const { viewStyles } = extractStyles(style);
|
|
22
|
-
const { height, width } = viewStyles;
|
|
23
|
-
const defaultVideoId = "nwMUpDESXrI";
|
|
24
|
-
|
|
25
|
-
return (
|
|
26
|
-
<YoutubePlayerComponent
|
|
27
|
-
height={height}
|
|
28
|
-
width={width}
|
|
29
|
-
play={autoplay}
|
|
30
|
-
videoId={!videoId && !playlist ? defaultVideoId : videoId}
|
|
31
|
-
playList={playlist}
|
|
32
|
-
mute={mute}
|
|
33
|
-
webViewStyle={style}
|
|
34
|
-
/>
|
|
35
|
-
);
|
|
36
|
-
};
|
|
37
|
-
|
|
38
|
-
export default YoutubePlayer;
|