@draftbit/core 46.10.2-eb07a0.2 → 46.10.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 +6 -23
- package/lib/commonjs/components/Row.js +73 -0
- package/lib/commonjs/components/RowBodyIcon.js +45 -0
- package/lib/commonjs/components/RowHeadlineImageCaption.js +45 -0
- package/lib/commonjs/components/RowHeadlineImageIcon.js +51 -0
- 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/index.js +23 -2
- package/lib/commonjs/mappings/YoutubePlayer.js +0 -6
- package/lib/commonjs/utilities.js +2 -1
- package/lib/module/components/Row.js +63 -0
- package/lib/module/components/RowBodyIcon.js +35 -0
- package/lib/module/components/RowHeadlineImageCaption.js +35 -0
- package/lib/module/components/RowHeadlineImageIcon.js +41 -0
- package/lib/module/components/Text.js +4 -50
- 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 +4 -1
- package/lib/module/mappings/YoutubePlayer.js +0 -6
- 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/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 +4 -1
- package/lib/typescript/src/index.d.ts.map +1 -1
- 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 -4
- 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/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 +4 -1
- package/src/index.tsx +4 -1
- package/src/mappings/YoutubePlayer.js +0 -6
- package/src/mappings/YoutubePlayer.ts +0 -6
- package/lib/commonjs/mappings/NativeBase/Layout.js +0 -98
- package/lib/module/components/YotubePlayer.js +0 -30
- package/lib/module/mappings/NativeBase/Layout.js +0 -91
- package/lib/typescript/src/components/YotubePlayer.d.ts +0 -12
- package/lib/typescript/src/components/YotubePlayer.d.ts.map +0 -1
- package/lib/typescript/src/mappings/NativeBase/Layout.d.ts +0 -97
- package/lib/typescript/src/mappings/NativeBase/Layout.d.ts.map +0 -1
- package/src/components/YotubePlayer.js +0 -10
- package/src/components/YotubePlayer.tsx +0 -38
- package/src/mappings/NativeBase/Layout.js +0 -102
- package/src/mappings/NativeBase/Layout.ts +0 -117
|
@@ -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);
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
import React from "react";
|
|
2
|
+
import { View } from "react-native";
|
|
3
|
+
import { extractStyles } from "../../utilities";
|
|
4
|
+
import YouTube from "react-youtube";
|
|
5
|
+
const YoutubePlayer = ({ videoId, playlist, autoplay = false, style, }) => {
|
|
6
|
+
const { viewStyles } = extractStyles(style);
|
|
7
|
+
const defaultVideoId = "nwMUpDESXrI";
|
|
8
|
+
const options = {
|
|
9
|
+
width: viewStyles.width,
|
|
10
|
+
height: viewStyles.height,
|
|
11
|
+
playerVars: {
|
|
12
|
+
autoplay: autoplay ? 1 : 0,
|
|
13
|
+
list: playlist,
|
|
14
|
+
listType: "playlist",
|
|
15
|
+
},
|
|
16
|
+
};
|
|
17
|
+
return (React.createElement(View, { style: viewStyles },
|
|
18
|
+
React.createElement(YouTube, { videoId: !videoId && !playlist ? defaultVideoId : videoId, opts: options })));
|
|
19
|
+
};
|
|
20
|
+
export default YoutubePlayer;
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import React from "react";
|
|
2
|
+
import YoutubePlayerIFrame from "react-native-youtube-iframe";
|
|
3
|
+
import { extractStyles } from "../../utilities";
|
|
4
|
+
const YoutubePlayer = ({ videoId, playlist, autoplay = false, style, }) => {
|
|
5
|
+
const { viewStyles } = extractStyles(style);
|
|
6
|
+
const defaultVideoId = "nwMUpDESXrI";
|
|
7
|
+
return (React.createElement(YoutubePlayerIFrame, { width: viewStyles.width, height: viewStyles.height, play: autoplay, videoId: !videoId && !playlist ? defaultVideoId : videoId, playList: playlist, webViewStyle: viewStyles }));
|
|
8
|
+
};
|
|
9
|
+
export default YoutubePlayer;
|
|
@@ -0,0 +1,27 @@
|
|
|
1
|
+
import React from "react";
|
|
2
|
+
import YoutubePlayerIFrame from "react-native-youtube-iframe";
|
|
3
|
+
import { extractStyles } from "../../utilities";
|
|
4
|
+
import { YoutubePlayerProps } from "./YoutubePlayerProps";
|
|
5
|
+
|
|
6
|
+
const YoutubePlayer: React.FC<YoutubePlayerProps> = ({
|
|
7
|
+
videoId,
|
|
8
|
+
playlist,
|
|
9
|
+
autoplay = false,
|
|
10
|
+
style,
|
|
11
|
+
}) => {
|
|
12
|
+
const { viewStyles } = extractStyles(style);
|
|
13
|
+
const defaultVideoId = "nwMUpDESXrI";
|
|
14
|
+
|
|
15
|
+
return (
|
|
16
|
+
<YoutubePlayerIFrame
|
|
17
|
+
width={viewStyles.width}
|
|
18
|
+
height={viewStyles.height}
|
|
19
|
+
play={autoplay}
|
|
20
|
+
videoId={!videoId && !playlist ? defaultVideoId : videoId}
|
|
21
|
+
playList={playlist}
|
|
22
|
+
webViewStyle={viewStyles}
|
|
23
|
+
/>
|
|
24
|
+
);
|
|
25
|
+
};
|
|
26
|
+
|
|
27
|
+
export default YoutubePlayer;
|
|
@@ -0,0 +1,36 @@
|
|
|
1
|
+
import React from "react";
|
|
2
|
+
import { View } from "react-native";
|
|
3
|
+
import { extractStyles } from "../../utilities";
|
|
4
|
+
import { YoutubePlayerProps } from "./YoutubePlayerProps";
|
|
5
|
+
import YouTube, { YouTubeProps } from "react-youtube";
|
|
6
|
+
|
|
7
|
+
const YoutubePlayer: React.FC<YoutubePlayerProps> = ({
|
|
8
|
+
videoId,
|
|
9
|
+
playlist,
|
|
10
|
+
autoplay = false,
|
|
11
|
+
style,
|
|
12
|
+
}) => {
|
|
13
|
+
const { viewStyles } = extractStyles(style);
|
|
14
|
+
const defaultVideoId = "nwMUpDESXrI";
|
|
15
|
+
|
|
16
|
+
const options: YouTubeProps["opts"] = {
|
|
17
|
+
width: viewStyles.width,
|
|
18
|
+
height: viewStyles.height,
|
|
19
|
+
playerVars: {
|
|
20
|
+
autoplay: autoplay ? 1 : 0,
|
|
21
|
+
list: playlist,
|
|
22
|
+
listType: "playlist",
|
|
23
|
+
},
|
|
24
|
+
};
|
|
25
|
+
|
|
26
|
+
return (
|
|
27
|
+
<View style={viewStyles}>
|
|
28
|
+
<YouTube
|
|
29
|
+
videoId={!videoId && !playlist ? defaultVideoId : videoId}
|
|
30
|
+
opts={options}
|
|
31
|
+
/>
|
|
32
|
+
</View>
|
|
33
|
+
);
|
|
34
|
+
};
|
|
35
|
+
|
|
36
|
+
export default YoutubePlayer;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export { default as YoutubePlayer } from "./YoutubePlayer";
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export { default as YoutubePlayer } from "./YoutubePlayer";
|
package/src/index.js
CHANGED
|
@@ -36,12 +36,15 @@ export { DeckSwiper, DeckSwiperCard } from "./components/DeckSwiper";
|
|
|
36
36
|
export { TabView, TabViewItem } from "./components/TabView";
|
|
37
37
|
export { default as Markdown } from "./components/Markdown";
|
|
38
38
|
export { BottomSheet } from "./components/BottomSheet";
|
|
39
|
-
export {
|
|
39
|
+
export { YoutubePlayer } from "./components/YoutubePlayer";
|
|
40
40
|
/* Deprecated: Fix or Delete! */
|
|
41
41
|
export { default as DatePicker } from "./components/DatePicker/DatePicker";
|
|
42
42
|
export { default as Picker } from "./components/Picker/Picker";
|
|
43
43
|
export { default as ProgressBar } from "./components/ProgressBar";
|
|
44
44
|
export { default as ProgressCircle } from "./components/ProgressCircle";
|
|
45
|
+
export { default as RowBodyIcon } from "./components/RowBodyIcon";
|
|
46
|
+
export { default as RowHeadlineImageCaption } from "./components/RowHeadlineImageCaption";
|
|
47
|
+
export { default as RowHeadlineImageIcon } from "./components/RowHeadlineImageIcon";
|
|
45
48
|
export { default as Slider } from "./components/Slider";
|
|
46
49
|
export { default as Stepper } from "./components/Stepper";
|
|
47
50
|
export { useAuthState } from "./components/useAuthState";
|
package/src/index.tsx
CHANGED
|
@@ -60,13 +60,16 @@ export { default as Markdown } from "./components/Markdown";
|
|
|
60
60
|
|
|
61
61
|
export { BottomSheet } from "./components/BottomSheet";
|
|
62
62
|
|
|
63
|
-
export {
|
|
63
|
+
export { YoutubePlayer } from "./components/YoutubePlayer";
|
|
64
64
|
|
|
65
65
|
/* Deprecated: Fix or Delete! */
|
|
66
66
|
export { default as DatePicker } from "./components/DatePicker/DatePicker";
|
|
67
67
|
export { default as Picker } from "./components/Picker/Picker";
|
|
68
68
|
export { default as ProgressBar } from "./components/ProgressBar";
|
|
69
69
|
export { default as ProgressCircle } from "./components/ProgressCircle";
|
|
70
|
+
export { default as RowBodyIcon } from "./components/RowBodyIcon";
|
|
71
|
+
export { default as RowHeadlineImageCaption } from "./components/RowHeadlineImageCaption";
|
|
72
|
+
export { default as RowHeadlineImageIcon } from "./components/RowHeadlineImageIcon";
|
|
70
73
|
export { default as Slider } from "./components/Slider";
|
|
71
74
|
export { default as Stepper } from "./components/Stepper";
|
|
72
75
|
export { useAuthState } from "./components/useAuthState";
|
|
@@ -21,12 +21,6 @@ export const SEED_DATA = {
|
|
|
21
21
|
description: "Playlist of the Youtube videos.",
|
|
22
22
|
defaultValue: null,
|
|
23
23
|
}),
|
|
24
|
-
mute: createStaticBoolProp({
|
|
25
|
-
label: "Mute Audio",
|
|
26
|
-
description: "Mute the audio of the video.",
|
|
27
|
-
defaultValue: false,
|
|
28
|
-
required: false,
|
|
29
|
-
}),
|
|
30
24
|
autoplay: createStaticBoolProp({
|
|
31
25
|
label: "Auto Play",
|
|
32
26
|
description: "Autoplay the video on load.",
|
|
@@ -27,12 +27,6 @@ export const SEED_DATA = {
|
|
|
27
27
|
description: "Playlist of the Youtube videos.",
|
|
28
28
|
defaultValue: null,
|
|
29
29
|
}),
|
|
30
|
-
mute: createStaticBoolProp({
|
|
31
|
-
label: "Mute Audio",
|
|
32
|
-
description: "Mute the audio of the video.",
|
|
33
|
-
defaultValue: false,
|
|
34
|
-
required: false,
|
|
35
|
-
}),
|
|
36
30
|
autoplay: createStaticBoolProp({
|
|
37
31
|
label: "Auto Play",
|
|
38
32
|
description: "Autoplay the video on load.",
|
|
@@ -1,98 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
|
|
3
|
-
Object.defineProperty(exports, "__esModule", {
|
|
4
|
-
value: true
|
|
5
|
-
});
|
|
6
|
-
exports.SEED_DATA = void 0;
|
|
7
|
-
var _types = require("@draftbit/types");
|
|
8
|
-
const SHARED_SEED_DATA = {
|
|
9
|
-
category: _types.COMPONENT_TYPES.layout,
|
|
10
|
-
packageName: "native-base",
|
|
11
|
-
stylesPanelSections: _types.CONTAINER_COMPONENT_STYLES_SECTIONS
|
|
12
|
-
};
|
|
13
|
-
const SEED_DATA = [{
|
|
14
|
-
name: "Aspect Ratio",
|
|
15
|
-
tag: "AspectRatio",
|
|
16
|
-
description: "Controls the size of the undefined dimension of a node or child component using an aspect ration",
|
|
17
|
-
...SHARED_SEED_DATA,
|
|
18
|
-
props: {
|
|
19
|
-
ratio: (0, _types.createTextProp)({
|
|
20
|
-
label: "Ratio",
|
|
21
|
-
description: "The aspect ratio of the container",
|
|
22
|
-
defaultValue: "4/3",
|
|
23
|
-
group: _types.GROUPS.basic
|
|
24
|
-
})
|
|
25
|
-
}
|
|
26
|
-
}, {
|
|
27
|
-
name: "Box",
|
|
28
|
-
tag: "Box",
|
|
29
|
-
description: "This is a generic component for low level layout needs. It is similar to a div in HTML",
|
|
30
|
-
...SHARED_SEED_DATA
|
|
31
|
-
}, {
|
|
32
|
-
name: "Center",
|
|
33
|
-
tag: "Center",
|
|
34
|
-
description: "Center aligns its contents to the center within itself",
|
|
35
|
-
...SHARED_SEED_DATA
|
|
36
|
-
}, {
|
|
37
|
-
name: "Circle",
|
|
38
|
-
tag: "Circle",
|
|
39
|
-
description: "Center aligns its contents to the center within itself with a round border radius",
|
|
40
|
-
...SHARED_SEED_DATA
|
|
41
|
-
}, {
|
|
42
|
-
name: "Container",
|
|
43
|
-
tag: "Container",
|
|
44
|
-
description: "The Container restricts a content's width according to current breakpoint, while keeping the size fluid",
|
|
45
|
-
...SHARED_SEED_DATA
|
|
46
|
-
}, {
|
|
47
|
-
name: "Column",
|
|
48
|
-
tag: "Column",
|
|
49
|
-
description: "Column aligns items vertically",
|
|
50
|
-
...SHARED_SEED_DATA
|
|
51
|
-
}, {
|
|
52
|
-
name: "Row",
|
|
53
|
-
tag: "Row",
|
|
54
|
-
description: "Column aligns items horizontally",
|
|
55
|
-
...SHARED_SEED_DATA
|
|
56
|
-
}, {
|
|
57
|
-
name: "Spacer",
|
|
58
|
-
tag: "Spacer",
|
|
59
|
-
description: "An adjustable, empty space that can be used to tune the spacing between child elements within Flex",
|
|
60
|
-
...SHARED_SEED_DATA
|
|
61
|
-
}, {
|
|
62
|
-
name: "Stack",
|
|
63
|
-
tag: "Stack",
|
|
64
|
-
description: "Stack aligns items vertically or horizontally based on the direction prop",
|
|
65
|
-
...SHARED_SEED_DATA,
|
|
66
|
-
props: {
|
|
67
|
-
direction: (0, _types.createTextEnumProp)({
|
|
68
|
-
label: "Direction",
|
|
69
|
-
description: "The direction of the Stack",
|
|
70
|
-
options: ["row", "column"],
|
|
71
|
-
defaultValue: "column"
|
|
72
|
-
}),
|
|
73
|
-
reversed: (0, _types.createBoolProp)({
|
|
74
|
-
label: "Reversed",
|
|
75
|
-
description: "Determines whether to reverse the direction of items"
|
|
76
|
-
}),
|
|
77
|
-
isDisabled: (0, _types.createBoolProp)({
|
|
78
|
-
label: "Disabled",
|
|
79
|
-
description: "If true, the Stack will be disabled"
|
|
80
|
-
}),
|
|
81
|
-
isInvalid: (0, _types.createBoolProp)({
|
|
82
|
-
label: "Invalid",
|
|
83
|
-
description: "If true, the Stack will be invalid"
|
|
84
|
-
})
|
|
85
|
-
}
|
|
86
|
-
}, {
|
|
87
|
-
name: "ZStack",
|
|
88
|
-
tag: "ZStack",
|
|
89
|
-
description: "ZStack aligns items to the z-axis",
|
|
90
|
-
...SHARED_SEED_DATA,
|
|
91
|
-
props: {
|
|
92
|
-
reversed: (0, _types.createBoolProp)({
|
|
93
|
-
label: "Reversed",
|
|
94
|
-
description: "Determines whether to reverse the direction of items"
|
|
95
|
-
})
|
|
96
|
-
}
|
|
97
|
-
}];
|
|
98
|
-
exports.SEED_DATA = SEED_DATA;
|
|
@@ -1,30 +0,0 @@
|
|
|
1
|
-
import React from "react";
|
|
2
|
-
import YoutubePlayerComponent from "react-native-youtube-iframe";
|
|
3
|
-
import { extractStyles } from "../utilities";
|
|
4
|
-
const YoutubePlayer = _ref => {
|
|
5
|
-
let {
|
|
6
|
-
videoId,
|
|
7
|
-
playlist,
|
|
8
|
-
mute = false,
|
|
9
|
-
autoplay = false,
|
|
10
|
-
style
|
|
11
|
-
} = _ref;
|
|
12
|
-
const {
|
|
13
|
-
viewStyles
|
|
14
|
-
} = extractStyles(style);
|
|
15
|
-
const {
|
|
16
|
-
height,
|
|
17
|
-
width
|
|
18
|
-
} = viewStyles;
|
|
19
|
-
const defaultVideoId = "nwMUpDESXrI";
|
|
20
|
-
return /*#__PURE__*/React.createElement(YoutubePlayerComponent, {
|
|
21
|
-
height: height,
|
|
22
|
-
width: width,
|
|
23
|
-
play: autoplay,
|
|
24
|
-
videoId: !videoId && !playlist ? defaultVideoId : videoId,
|
|
25
|
-
playList: playlist,
|
|
26
|
-
mute: mute,
|
|
27
|
-
webViewStyle: style
|
|
28
|
-
});
|
|
29
|
-
};
|
|
30
|
-
export default YoutubePlayer;
|
|
@@ -1,91 +0,0 @@
|
|
|
1
|
-
import { COMPONENT_TYPES, createTextEnumProp, createBoolProp, CONTAINER_COMPONENT_STYLES_SECTIONS, createTextProp, GROUPS } from "@draftbit/types";
|
|
2
|
-
const SHARED_SEED_DATA = {
|
|
3
|
-
category: COMPONENT_TYPES.layout,
|
|
4
|
-
packageName: "native-base",
|
|
5
|
-
stylesPanelSections: CONTAINER_COMPONENT_STYLES_SECTIONS
|
|
6
|
-
};
|
|
7
|
-
export const SEED_DATA = [{
|
|
8
|
-
name: "Aspect Ratio",
|
|
9
|
-
tag: "AspectRatio",
|
|
10
|
-
description: "Controls the size of the undefined dimension of a node or child component using an aspect ration",
|
|
11
|
-
...SHARED_SEED_DATA,
|
|
12
|
-
props: {
|
|
13
|
-
ratio: createTextProp({
|
|
14
|
-
label: "Ratio",
|
|
15
|
-
description: "The aspect ratio of the container",
|
|
16
|
-
defaultValue: "4/3",
|
|
17
|
-
group: GROUPS.basic
|
|
18
|
-
})
|
|
19
|
-
}
|
|
20
|
-
}, {
|
|
21
|
-
name: "Box",
|
|
22
|
-
tag: "Box",
|
|
23
|
-
description: "This is a generic component for low level layout needs. It is similar to a div in HTML",
|
|
24
|
-
...SHARED_SEED_DATA
|
|
25
|
-
}, {
|
|
26
|
-
name: "Center",
|
|
27
|
-
tag: "Center",
|
|
28
|
-
description: "Center aligns its contents to the center within itself",
|
|
29
|
-
...SHARED_SEED_DATA
|
|
30
|
-
}, {
|
|
31
|
-
name: "Circle",
|
|
32
|
-
tag: "Circle",
|
|
33
|
-
description: "Center aligns its contents to the center within itself with a round border radius",
|
|
34
|
-
...SHARED_SEED_DATA
|
|
35
|
-
}, {
|
|
36
|
-
name: "Container",
|
|
37
|
-
tag: "Container",
|
|
38
|
-
description: "The Container restricts a content's width according to current breakpoint, while keeping the size fluid",
|
|
39
|
-
...SHARED_SEED_DATA
|
|
40
|
-
}, {
|
|
41
|
-
name: "Column",
|
|
42
|
-
tag: "Column",
|
|
43
|
-
description: "Column aligns items vertically",
|
|
44
|
-
...SHARED_SEED_DATA
|
|
45
|
-
}, {
|
|
46
|
-
name: "Row",
|
|
47
|
-
tag: "Row",
|
|
48
|
-
description: "Column aligns items horizontally",
|
|
49
|
-
...SHARED_SEED_DATA
|
|
50
|
-
}, {
|
|
51
|
-
name: "Spacer",
|
|
52
|
-
tag: "Spacer",
|
|
53
|
-
description: "An adjustable, empty space that can be used to tune the spacing between child elements within Flex",
|
|
54
|
-
...SHARED_SEED_DATA
|
|
55
|
-
}, {
|
|
56
|
-
name: "Stack",
|
|
57
|
-
tag: "Stack",
|
|
58
|
-
description: "Stack aligns items vertically or horizontally based on the direction prop",
|
|
59
|
-
...SHARED_SEED_DATA,
|
|
60
|
-
props: {
|
|
61
|
-
direction: createTextEnumProp({
|
|
62
|
-
label: "Direction",
|
|
63
|
-
description: "The direction of the Stack",
|
|
64
|
-
options: ["row", "column"],
|
|
65
|
-
defaultValue: "column"
|
|
66
|
-
}),
|
|
67
|
-
reversed: createBoolProp({
|
|
68
|
-
label: "Reversed",
|
|
69
|
-
description: "Determines whether to reverse the direction of items"
|
|
70
|
-
}),
|
|
71
|
-
isDisabled: createBoolProp({
|
|
72
|
-
label: "Disabled",
|
|
73
|
-
description: "If true, the Stack will be disabled"
|
|
74
|
-
}),
|
|
75
|
-
isInvalid: createBoolProp({
|
|
76
|
-
label: "Invalid",
|
|
77
|
-
description: "If true, the Stack will be invalid"
|
|
78
|
-
})
|
|
79
|
-
}
|
|
80
|
-
}, {
|
|
81
|
-
name: "ZStack",
|
|
82
|
-
tag: "ZStack",
|
|
83
|
-
description: "ZStack aligns items to the z-axis",
|
|
84
|
-
...SHARED_SEED_DATA,
|
|
85
|
-
props: {
|
|
86
|
-
reversed: createBoolProp({
|
|
87
|
-
label: "Reversed",
|
|
88
|
-
description: "Determines whether to reverse the direction of items"
|
|
89
|
-
})
|
|
90
|
-
}
|
|
91
|
-
}];
|
|
@@ -1,12 +0,0 @@
|
|
|
1
|
-
import React from "react";
|
|
2
|
-
import { StyleProp, ViewStyle } from "react-native";
|
|
3
|
-
interface YoutubePlayerProps {
|
|
4
|
-
videoId?: string;
|
|
5
|
-
playlist?: string;
|
|
6
|
-
mute?: boolean;
|
|
7
|
-
autoplay?: boolean;
|
|
8
|
-
style?: StyleProp<ViewStyle>;
|
|
9
|
-
}
|
|
10
|
-
declare const YoutubePlayer: React.FC<YoutubePlayerProps>;
|
|
11
|
-
export default YoutubePlayer;
|
|
12
|
-
//# sourceMappingURL=YotubePlayer.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"YotubePlayer.d.ts","sourceRoot":"","sources":["../../../../src/components/YotubePlayer.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,MAAM,OAAO,CAAC;AAC1B,OAAO,EAAE,SAAS,EAAE,SAAS,EAAE,MAAM,cAAc,CAAC;AAIpD,UAAU,kBAAkB;IAC1B,OAAO,CAAC,EAAE,MAAM,CAAC;IACjB,QAAQ,CAAC,EAAE,MAAM,CAAC;IAClB,IAAI,CAAC,EAAE,OAAO,CAAC;IACf,QAAQ,CAAC,EAAE,OAAO,CAAC;IACnB,KAAK,CAAC,EAAE,SAAS,CAAC,SAAS,CAAC,CAAC;CAC9B;AAED,QAAA,MAAM,aAAa,EAAE,KAAK,CAAC,EAAE,CAAC,kBAAkB,CAsB/C,CAAC;AAEF,eAAe,aAAa,CAAC"}
|
|
@@ -1,97 +0,0 @@
|
|
|
1
|
-
export declare const SEED_DATA: ({
|
|
2
|
-
props: {
|
|
3
|
-
ratio: any;
|
|
4
|
-
direction?: undefined;
|
|
5
|
-
reversed?: undefined;
|
|
6
|
-
isDisabled?: undefined;
|
|
7
|
-
isInvalid?: undefined;
|
|
8
|
-
};
|
|
9
|
-
category: string;
|
|
10
|
-
packageName: string;
|
|
11
|
-
stylesPanelSections: string[];
|
|
12
|
-
name: string;
|
|
13
|
-
tag: string;
|
|
14
|
-
description: string;
|
|
15
|
-
} | {
|
|
16
|
-
category: string;
|
|
17
|
-
packageName: string;
|
|
18
|
-
stylesPanelSections: string[];
|
|
19
|
-
name: string;
|
|
20
|
-
tag: string;
|
|
21
|
-
description: string;
|
|
22
|
-
} | {
|
|
23
|
-
props: {
|
|
24
|
-
direction: {
|
|
25
|
-
group: string;
|
|
26
|
-
label: string;
|
|
27
|
-
description: string;
|
|
28
|
-
editable: boolean;
|
|
29
|
-
required: boolean;
|
|
30
|
-
formType: string;
|
|
31
|
-
propType: string;
|
|
32
|
-
defaultValue: null;
|
|
33
|
-
options: never[];
|
|
34
|
-
};
|
|
35
|
-
reversed: {
|
|
36
|
-
label: string;
|
|
37
|
-
description: string;
|
|
38
|
-
formType: string;
|
|
39
|
-
propType: string;
|
|
40
|
-
defaultValue: boolean;
|
|
41
|
-
editable: boolean;
|
|
42
|
-
required: boolean;
|
|
43
|
-
group: string;
|
|
44
|
-
};
|
|
45
|
-
isDisabled: {
|
|
46
|
-
label: string;
|
|
47
|
-
description: string;
|
|
48
|
-
formType: string;
|
|
49
|
-
propType: string;
|
|
50
|
-
defaultValue: boolean;
|
|
51
|
-
editable: boolean;
|
|
52
|
-
required: boolean;
|
|
53
|
-
group: string;
|
|
54
|
-
};
|
|
55
|
-
isInvalid: {
|
|
56
|
-
label: string;
|
|
57
|
-
description: string;
|
|
58
|
-
formType: string;
|
|
59
|
-
propType: string;
|
|
60
|
-
defaultValue: boolean;
|
|
61
|
-
editable: boolean;
|
|
62
|
-
required: boolean;
|
|
63
|
-
group: string;
|
|
64
|
-
};
|
|
65
|
-
ratio?: undefined;
|
|
66
|
-
};
|
|
67
|
-
category: string;
|
|
68
|
-
packageName: string;
|
|
69
|
-
stylesPanelSections: string[];
|
|
70
|
-
name: string;
|
|
71
|
-
tag: string;
|
|
72
|
-
description: string;
|
|
73
|
-
} | {
|
|
74
|
-
props: {
|
|
75
|
-
reversed: {
|
|
76
|
-
label: string;
|
|
77
|
-
description: string;
|
|
78
|
-
formType: string;
|
|
79
|
-
propType: string;
|
|
80
|
-
defaultValue: boolean;
|
|
81
|
-
editable: boolean;
|
|
82
|
-
required: boolean;
|
|
83
|
-
group: string;
|
|
84
|
-
};
|
|
85
|
-
ratio?: undefined;
|
|
86
|
-
direction?: undefined;
|
|
87
|
-
isDisabled?: undefined;
|
|
88
|
-
isInvalid?: undefined;
|
|
89
|
-
};
|
|
90
|
-
category: string;
|
|
91
|
-
packageName: string;
|
|
92
|
-
stylesPanelSections: string[];
|
|
93
|
-
name: string;
|
|
94
|
-
tag: string;
|
|
95
|
-
description: string;
|
|
96
|
-
})[];
|
|
97
|
-
//# sourceMappingURL=Layout.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"Layout.d.ts","sourceRoot":"","sources":["../../../../../src/mappings/NativeBase/Layout.ts"],"names":[],"mappings":"AAeA,eAAO,MAAM,SAAS;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;IAqGrB,CAAC"}
|
|
@@ -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;
|