@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
|
@@ -14,7 +14,8 @@ var _Checkbox = _interopRequireDefault(require("./Checkbox"));
|
|
|
14
14
|
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
|
|
15
15
|
function _getRequireWildcardCache(nodeInterop) { if (typeof WeakMap !== "function") return null; var cacheBabelInterop = new WeakMap(); var cacheNodeInterop = new WeakMap(); return (_getRequireWildcardCache = function (nodeInterop) { return nodeInterop ? cacheNodeInterop : cacheBabelInterop; })(nodeInterop); }
|
|
16
16
|
function _interopRequireWildcard(obj, nodeInterop) { if (!nodeInterop && obj && obj.__esModule) { return obj; } if (obj === null || typeof obj !== "object" && typeof obj !== "function") { return { default: obj }; } var cache = _getRequireWildcardCache(nodeInterop); if (cache && cache.has(obj)) { return cache.get(obj); } var newObj = {}; var hasPropertyDescriptor = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var key in obj) { if (key !== "default" && Object.prototype.hasOwnProperty.call(obj, key)) { var desc = hasPropertyDescriptor ? Object.getOwnPropertyDescriptor(obj, key) : null; if (desc && (desc.get || desc.set)) { Object.defineProperty(newObj, key, desc); } else { newObj[key] = obj[key]; } } } newObj.default = obj; if (cache) { cache.set(obj, newObj); } return newObj; }
|
|
17
|
-
var
|
|
17
|
+
function _extends() { _extends = Object.assign ? Object.assign.bind() : function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; return _extends.apply(this, arguments); }
|
|
18
|
+
let Direction;
|
|
18
19
|
exports.Direction = Direction;
|
|
19
20
|
(function (Direction) {
|
|
20
21
|
Direction["Row"] = "row";
|
|
@@ -57,6 +58,7 @@ const CheckboxRow = _ref => {
|
|
|
57
58
|
setInternalValue(status);
|
|
58
59
|
}
|
|
59
60
|
}, [status]);
|
|
61
|
+
|
|
60
62
|
// This special logic is to handle weird APIs like Airtable that return
|
|
61
63
|
// true or undefined for a boolean
|
|
62
64
|
const previousDefaultValue = (0, _hooks.usePrevious)(defaultValue);
|
|
@@ -80,14 +82,13 @@ const CheckboxRow = _ref => {
|
|
|
80
82
|
textStyles,
|
|
81
83
|
viewStyles
|
|
82
84
|
} = (0, _utilities.extractStyles)(style);
|
|
83
|
-
return /*#__PURE__*/React.createElement(_reactNative.Pressable, {
|
|
85
|
+
return /*#__PURE__*/React.createElement(_reactNative.Pressable, _extends({
|
|
84
86
|
onPress: handlePress,
|
|
85
87
|
style: [viewStyles, styles.mainParent, {
|
|
86
88
|
flexDirection: direction
|
|
87
89
|
}],
|
|
88
|
-
disabled: disabled
|
|
89
|
-
|
|
90
|
-
}, /*#__PURE__*/React.createElement(_reactNative.View, {
|
|
90
|
+
disabled: disabled
|
|
91
|
+
}, rest), /*#__PURE__*/React.createElement(_reactNative.View, {
|
|
91
92
|
style: [styles.label, {
|
|
92
93
|
alignItems: direction === Direction.Row ? "flex-start" : "flex-end"
|
|
93
94
|
}, labelContainerStyle]
|
|
@@ -124,22 +125,4 @@ const styles = _reactNative.StyleSheet.create({
|
|
|
124
125
|
}
|
|
125
126
|
});
|
|
126
127
|
var _default = CheckboxRow;
|
|
127
|
-
exports.default = _default;ems: "center",
|
|
128
|
-
justifyContent: "space-around",
|
|
129
|
-
paddingStart: 20,
|
|
130
|
-
minHeight: 50,
|
|
131
|
-
paddingEnd: 20,
|
|
132
|
-
display: "flex",
|
|
133
|
-
..._reactNative.Platform.select({
|
|
134
|
-
web: {
|
|
135
|
-
cursor: "pointer",
|
|
136
|
-
userSelect: "none"
|
|
137
|
-
}
|
|
138
|
-
})
|
|
139
|
-
},
|
|
140
|
-
label: {
|
|
141
|
-
flex: 3
|
|
142
|
-
}
|
|
143
|
-
});
|
|
144
|
-
var _default = CheckboxRow;
|
|
145
128
|
exports.default = _default;
|
|
@@ -0,0 +1,73 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
Object.defineProperty(exports, "__esModule", {
|
|
4
|
+
value: true
|
|
5
|
+
});
|
|
6
|
+
exports.default = void 0;
|
|
7
|
+
var React = _interopRequireWildcard(require("react"));
|
|
8
|
+
var _reactNative = require("react-native");
|
|
9
|
+
var _theming = require("../theming");
|
|
10
|
+
var _Config = _interopRequireDefault(require("./Config"));
|
|
11
|
+
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
|
|
12
|
+
function _getRequireWildcardCache(nodeInterop) { if (typeof WeakMap !== "function") return null; var cacheBabelInterop = new WeakMap(); var cacheNodeInterop = new WeakMap(); return (_getRequireWildcardCache = function (nodeInterop) { return nodeInterop ? cacheNodeInterop : cacheBabelInterop; })(nodeInterop); }
|
|
13
|
+
function _interopRequireWildcard(obj, nodeInterop) { if (!nodeInterop && obj && obj.__esModule) { return obj; } if (obj === null || typeof obj !== "object" && typeof obj !== "function") { return { default: obj }; } var cache = _getRequireWildcardCache(nodeInterop); if (cache && cache.has(obj)) { return cache.get(obj); } var newObj = {}; var hasPropertyDescriptor = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var key in obj) { if (key !== "default" && Object.prototype.hasOwnProperty.call(obj, key)) { var desc = hasPropertyDescriptor ? Object.getOwnPropertyDescriptor(obj, key) : null; if (desc && (desc.get || desc.set)) { Object.defineProperty(newObj, key, desc); } else { newObj[key] = obj[key]; } } } newObj.default = obj; if (cache) { cache.set(obj, newObj); } return newObj; }
|
|
14
|
+
const Row = _ref => {
|
|
15
|
+
let {
|
|
16
|
+
titleTypeStyle,
|
|
17
|
+
titleColor,
|
|
18
|
+
subtitleTypeStyle,
|
|
19
|
+
subtitleColor,
|
|
20
|
+
title,
|
|
21
|
+
subtitle,
|
|
22
|
+
multilineSubtitle,
|
|
23
|
+
image,
|
|
24
|
+
right,
|
|
25
|
+
style
|
|
26
|
+
} = _ref;
|
|
27
|
+
return /*#__PURE__*/React.createElement(_reactNative.View, {
|
|
28
|
+
style: [styles.container, {
|
|
29
|
+
padding: 16
|
|
30
|
+
}, style]
|
|
31
|
+
}, /*#__PURE__*/React.createElement(_reactNative.View, {
|
|
32
|
+
style: styles.leftContainer
|
|
33
|
+
}, image && /*#__PURE__*/React.createElement(_reactNative.Image, {
|
|
34
|
+
source: typeof image === "string" ? {
|
|
35
|
+
uri: image
|
|
36
|
+
} : image,
|
|
37
|
+
style: {
|
|
38
|
+
marginRight: 12,
|
|
39
|
+
width: subtitle ? _Config.default.rowMultiLineImageSize : _Config.default.rowSingleLineImageSize,
|
|
40
|
+
height: subtitle ? _Config.default.rowMultiLineImageSize : _Config.default.rowSingleLineImageSize
|
|
41
|
+
}
|
|
42
|
+
}), /*#__PURE__*/React.createElement(_reactNative.View, {
|
|
43
|
+
style: styles.textContainer
|
|
44
|
+
}, /*#__PURE__*/React.createElement(_reactNative.Text, {
|
|
45
|
+
style: [titleTypeStyle, {
|
|
46
|
+
color: titleColor
|
|
47
|
+
}],
|
|
48
|
+
numberOfLines: 1
|
|
49
|
+
}, title), subtitle ? /*#__PURE__*/React.createElement(_reactNative.Text, {
|
|
50
|
+
style: [subtitleTypeStyle, {
|
|
51
|
+
color: subtitleColor,
|
|
52
|
+
marginTop: 4
|
|
53
|
+
}],
|
|
54
|
+
numberOfLines: multilineSubtitle ? undefined : 1
|
|
55
|
+
}, subtitle) : null)), right && right());
|
|
56
|
+
};
|
|
57
|
+
const styles = _reactNative.StyleSheet.create({
|
|
58
|
+
leftContainer: {
|
|
59
|
+
flexDirection: "row",
|
|
60
|
+
flex: 1
|
|
61
|
+
},
|
|
62
|
+
container: {
|
|
63
|
+
flexDirection: "row",
|
|
64
|
+
justifyContent: "space-between",
|
|
65
|
+
alignItems: "center"
|
|
66
|
+
},
|
|
67
|
+
textContainer: {
|
|
68
|
+
flex: 1,
|
|
69
|
+
justifyContent: "center"
|
|
70
|
+
}
|
|
71
|
+
});
|
|
72
|
+
var _default = (0, _theming.withTheme)(Row);
|
|
73
|
+
exports.default = _default;
|
|
@@ -0,0 +1,45 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
Object.defineProperty(exports, "__esModule", {
|
|
4
|
+
value: true
|
|
5
|
+
});
|
|
6
|
+
exports.default = void 0;
|
|
7
|
+
var React = _interopRequireWildcard(require("react"));
|
|
8
|
+
var _theming = require("../theming");
|
|
9
|
+
var _Row = _interopRequireDefault(require("./Row"));
|
|
10
|
+
var _Config = _interopRequireDefault(require("./Config"));
|
|
11
|
+
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
|
|
12
|
+
function _getRequireWildcardCache(nodeInterop) { if (typeof WeakMap !== "function") return null; var cacheBabelInterop = new WeakMap(); var cacheNodeInterop = new WeakMap(); return (_getRequireWildcardCache = function (nodeInterop) { return nodeInterop ? cacheNodeInterop : cacheBabelInterop; })(nodeInterop); }
|
|
13
|
+
function _interopRequireWildcard(obj, nodeInterop) { if (!nodeInterop && obj && obj.__esModule) { return obj; } if (obj === null || typeof obj !== "object" && typeof obj !== "function") { return { default: obj }; } var cache = _getRequireWildcardCache(nodeInterop); if (cache && cache.has(obj)) { return cache.get(obj); } var newObj = {}; var hasPropertyDescriptor = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var key in obj) { if (key !== "default" && Object.prototype.hasOwnProperty.call(obj, key)) { var desc = hasPropertyDescriptor ? Object.getOwnPropertyDescriptor(obj, key) : null; if (desc && (desc.get || desc.set)) { Object.defineProperty(newObj, key, desc); } else { newObj[key] = obj[key]; } } } newObj.default = obj; if (cache) { cache.set(obj, newObj); } return newObj; }
|
|
14
|
+
const RowBodyIcon = _ref => {
|
|
15
|
+
let {
|
|
16
|
+
Icon,
|
|
17
|
+
title,
|
|
18
|
+
subtitle,
|
|
19
|
+
icon,
|
|
20
|
+
style,
|
|
21
|
+
theme: {
|
|
22
|
+
colors,
|
|
23
|
+
typography
|
|
24
|
+
}
|
|
25
|
+
} = _ref;
|
|
26
|
+
return /*#__PURE__*/React.createElement(_Row.default, {
|
|
27
|
+
titleTypeStyle: typography.body1,
|
|
28
|
+
titleColor: colors.medium,
|
|
29
|
+
subtitleTypeStyle: typography.subtitle2,
|
|
30
|
+
subtitleColor: colors.light,
|
|
31
|
+
title: title,
|
|
32
|
+
subtitle: subtitle,
|
|
33
|
+
right: () => /*#__PURE__*/React.createElement(Icon, {
|
|
34
|
+
name: icon,
|
|
35
|
+
size: _Config.default.rowSingleLineIconSize,
|
|
36
|
+
color: colors.light,
|
|
37
|
+
style: {
|
|
38
|
+
marginLeft: 16
|
|
39
|
+
}
|
|
40
|
+
}),
|
|
41
|
+
style: style
|
|
42
|
+
});
|
|
43
|
+
};
|
|
44
|
+
var _default = (0, _theming.withTheme)(RowBodyIcon);
|
|
45
|
+
exports.default = _default;
|
|
@@ -0,0 +1,45 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
Object.defineProperty(exports, "__esModule", {
|
|
4
|
+
value: true
|
|
5
|
+
});
|
|
6
|
+
exports.default = void 0;
|
|
7
|
+
var React = _interopRequireWildcard(require("react"));
|
|
8
|
+
var _reactNative = require("react-native");
|
|
9
|
+
var _theming = require("../theming");
|
|
10
|
+
var _Row = _interopRequireDefault(require("./Row"));
|
|
11
|
+
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
|
|
12
|
+
function _getRequireWildcardCache(nodeInterop) { if (typeof WeakMap !== "function") return null; var cacheBabelInterop = new WeakMap(); var cacheNodeInterop = new WeakMap(); return (_getRequireWildcardCache = function (nodeInterop) { return nodeInterop ? cacheNodeInterop : cacheBabelInterop; })(nodeInterop); }
|
|
13
|
+
function _interopRequireWildcard(obj, nodeInterop) { if (!nodeInterop && obj && obj.__esModule) { return obj; } if (obj === null || typeof obj !== "object" && typeof obj !== "function") { return { default: obj }; } var cache = _getRequireWildcardCache(nodeInterop); if (cache && cache.has(obj)) { return cache.get(obj); } var newObj = {}; var hasPropertyDescriptor = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var key in obj) { if (key !== "default" && Object.prototype.hasOwnProperty.call(obj, key)) { var desc = hasPropertyDescriptor ? Object.getOwnPropertyDescriptor(obj, key) : null; if (desc && (desc.get || desc.set)) { Object.defineProperty(newObj, key, desc); } else { newObj[key] = obj[key]; } } } newObj.default = obj; if (cache) { cache.set(obj, newObj); } return newObj; }
|
|
14
|
+
const RowHeadlineImageCaption = _ref => {
|
|
15
|
+
let {
|
|
16
|
+
title,
|
|
17
|
+
subtitle,
|
|
18
|
+
caption,
|
|
19
|
+
image,
|
|
20
|
+
style,
|
|
21
|
+
theme: {
|
|
22
|
+
colors,
|
|
23
|
+
typography
|
|
24
|
+
}
|
|
25
|
+
} = _ref;
|
|
26
|
+
return /*#__PURE__*/React.createElement(_Row.default, {
|
|
27
|
+
titleTypeStyle: typography.headline6,
|
|
28
|
+
titleColor: colors.strong,
|
|
29
|
+
subtitleTypeStyle: typography.body2,
|
|
30
|
+
subtitleColor: colors.medium,
|
|
31
|
+
title: title,
|
|
32
|
+
subtitle: subtitle,
|
|
33
|
+
image: image,
|
|
34
|
+
right: () => /*#__PURE__*/React.createElement(_reactNative.Text, {
|
|
35
|
+
style: {
|
|
36
|
+
...typography.caption,
|
|
37
|
+
color: colors.strong,
|
|
38
|
+
marginLeft: 16
|
|
39
|
+
}
|
|
40
|
+
}, caption),
|
|
41
|
+
style: style
|
|
42
|
+
});
|
|
43
|
+
};
|
|
44
|
+
var _default = (0, _theming.withTheme)(RowHeadlineImageCaption);
|
|
45
|
+
exports.default = _default;
|
|
@@ -0,0 +1,51 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
Object.defineProperty(exports, "__esModule", {
|
|
4
|
+
value: true
|
|
5
|
+
});
|
|
6
|
+
exports.default = void 0;
|
|
7
|
+
var React = _interopRequireWildcard(require("react"));
|
|
8
|
+
var _theming = require("../theming");
|
|
9
|
+
var _Row = _interopRequireDefault(require("./Row"));
|
|
10
|
+
var _Config = _interopRequireDefault(require("./Config"));
|
|
11
|
+
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
|
|
12
|
+
function _getRequireWildcardCache(nodeInterop) { if (typeof WeakMap !== "function") return null; var cacheBabelInterop = new WeakMap(); var cacheNodeInterop = new WeakMap(); return (_getRequireWildcardCache = function (nodeInterop) { return nodeInterop ? cacheNodeInterop : cacheBabelInterop; })(nodeInterop); }
|
|
13
|
+
function _interopRequireWildcard(obj, nodeInterop) { if (!nodeInterop && obj && obj.__esModule) { return obj; } if (obj === null || typeof obj !== "object" && typeof obj !== "function") { return { default: obj }; } var cache = _getRequireWildcardCache(nodeInterop); if (cache && cache.has(obj)) { return cache.get(obj); } var newObj = {}; var hasPropertyDescriptor = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var key in obj) { if (key !== "default" && Object.prototype.hasOwnProperty.call(obj, key)) { var desc = hasPropertyDescriptor ? Object.getOwnPropertyDescriptor(obj, key) : null; if (desc && (desc.get || desc.set)) { Object.defineProperty(newObj, key, desc); } else { newObj[key] = obj[key]; } } } newObj.default = obj; if (cache) { cache.set(obj, newObj); } return newObj; }
|
|
14
|
+
const RowHeadlineImageIcon = _ref => {
|
|
15
|
+
let {
|
|
16
|
+
Icon,
|
|
17
|
+
icon,
|
|
18
|
+
title,
|
|
19
|
+
image,
|
|
20
|
+
subtitle,
|
|
21
|
+
multilineSubtitle = false,
|
|
22
|
+
style,
|
|
23
|
+
theme: {
|
|
24
|
+
colors,
|
|
25
|
+
typography
|
|
26
|
+
}
|
|
27
|
+
} = _ref;
|
|
28
|
+
return /*#__PURE__*/React.createElement(_Row.default, {
|
|
29
|
+
titleTypeStyle: typography.headline6,
|
|
30
|
+
titleColor: colors.strong,
|
|
31
|
+
subtitleTypeStyle: typography.body2,
|
|
32
|
+
subtitleColor: colors.medium,
|
|
33
|
+
title: title,
|
|
34
|
+
subtitle: subtitle,
|
|
35
|
+
multilineSubtitle: multilineSubtitle,
|
|
36
|
+
image: image,
|
|
37
|
+
right: () => /*#__PURE__*/React.createElement(Icon, {
|
|
38
|
+
name: icon,
|
|
39
|
+
size: multilineSubtitle ? _Config.default.rowMultiLineIconSize : _Config.default.rowSingleLineIconSize,
|
|
40
|
+
color: colors.light,
|
|
41
|
+
style: {
|
|
42
|
+
marginLeft: 16,
|
|
43
|
+
alignSelf: multilineSubtitle ? "flex-start" : "center",
|
|
44
|
+
marginTop: multilineSubtitle ? 4 : 0
|
|
45
|
+
}
|
|
46
|
+
}),
|
|
47
|
+
style: style
|
|
48
|
+
});
|
|
49
|
+
};
|
|
50
|
+
var _default = (0, _theming.withTheme)(RowHeadlineImageIcon);
|
|
51
|
+
exports.default = _default;
|
|
@@ -0,0 +1,40 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
Object.defineProperty(exports, "__esModule", {
|
|
4
|
+
value: true
|
|
5
|
+
});
|
|
6
|
+
exports.default = void 0;
|
|
7
|
+
var _react = _interopRequireDefault(require("react"));
|
|
8
|
+
var _reactNative = require("react-native");
|
|
9
|
+
var _utilities = require("../../utilities");
|
|
10
|
+
var _reactYoutube = _interopRequireDefault(require("react-youtube"));
|
|
11
|
+
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
|
|
12
|
+
const YoutubePlayer = _ref => {
|
|
13
|
+
let {
|
|
14
|
+
videoId,
|
|
15
|
+
playlist,
|
|
16
|
+
autoplay = false,
|
|
17
|
+
style
|
|
18
|
+
} = _ref;
|
|
19
|
+
const {
|
|
20
|
+
viewStyles
|
|
21
|
+
} = (0, _utilities.extractStyles)(style);
|
|
22
|
+
const defaultVideoId = "nwMUpDESXrI";
|
|
23
|
+
const options = {
|
|
24
|
+
width: viewStyles.width,
|
|
25
|
+
height: viewStyles.height,
|
|
26
|
+
playerVars: {
|
|
27
|
+
autoplay: autoplay ? 1 : 0,
|
|
28
|
+
list: playlist,
|
|
29
|
+
listType: "playlist"
|
|
30
|
+
}
|
|
31
|
+
};
|
|
32
|
+
return /*#__PURE__*/_react.default.createElement(_reactNative.View, {
|
|
33
|
+
style: viewStyles
|
|
34
|
+
}, /*#__PURE__*/_react.default.createElement(_reactYoutube.default, {
|
|
35
|
+
videoId: !videoId && !playlist ? defaultVideoId : videoId,
|
|
36
|
+
opts: options
|
|
37
|
+
}));
|
|
38
|
+
};
|
|
39
|
+
var _default = YoutubePlayer;
|
|
40
|
+
exports.default = _default;
|
|
@@ -6,32 +6,26 @@ Object.defineProperty(exports, "__esModule", {
|
|
|
6
6
|
exports.default = void 0;
|
|
7
7
|
var _react = _interopRequireDefault(require("react"));
|
|
8
8
|
var _reactNativeYoutubeIframe = _interopRequireDefault(require("react-native-youtube-iframe"));
|
|
9
|
-
var _utilities = require("
|
|
9
|
+
var _utilities = require("../../utilities");
|
|
10
10
|
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
|
|
11
11
|
const YoutubePlayer = _ref => {
|
|
12
12
|
let {
|
|
13
13
|
videoId,
|
|
14
14
|
playlist,
|
|
15
|
-
mute = false,
|
|
16
15
|
autoplay = false,
|
|
17
16
|
style
|
|
18
17
|
} = _ref;
|
|
19
18
|
const {
|
|
20
19
|
viewStyles
|
|
21
20
|
} = (0, _utilities.extractStyles)(style);
|
|
22
|
-
const {
|
|
23
|
-
height,
|
|
24
|
-
width
|
|
25
|
-
} = viewStyles;
|
|
26
21
|
const defaultVideoId = "nwMUpDESXrI";
|
|
27
22
|
return /*#__PURE__*/_react.default.createElement(_reactNativeYoutubeIframe.default, {
|
|
28
|
-
|
|
29
|
-
|
|
23
|
+
width: viewStyles.width,
|
|
24
|
+
height: viewStyles.height,
|
|
30
25
|
play: autoplay,
|
|
31
26
|
videoId: !videoId && !playlist ? defaultVideoId : videoId,
|
|
32
27
|
playList: playlist,
|
|
33
|
-
|
|
34
|
-
webViewStyle: style
|
|
28
|
+
webViewStyle: viewStyles
|
|
35
29
|
});
|
|
36
30
|
};
|
|
37
31
|
var _default = YoutubePlayer;
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
Object.defineProperty(exports, "__esModule", {
|
|
4
|
+
value: true
|
|
5
|
+
});
|
|
6
|
+
Object.defineProperty(exports, "YoutubePlayer", {
|
|
7
|
+
enumerable: true,
|
|
8
|
+
get: function () {
|
|
9
|
+
return _YoutubePlayer.default;
|
|
10
|
+
}
|
|
11
|
+
});
|
|
12
|
+
var _YoutubePlayer = _interopRequireDefault(require("./YoutubePlayer"));
|
|
13
|
+
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
|
package/lib/commonjs/index.js
CHANGED
|
@@ -255,6 +255,24 @@ Object.defineProperty(exports, "Row", {
|
|
|
255
255
|
return _Layout.Row;
|
|
256
256
|
}
|
|
257
257
|
});
|
|
258
|
+
Object.defineProperty(exports, "RowBodyIcon", {
|
|
259
|
+
enumerable: true,
|
|
260
|
+
get: function () {
|
|
261
|
+
return _RowBodyIcon.default;
|
|
262
|
+
}
|
|
263
|
+
});
|
|
264
|
+
Object.defineProperty(exports, "RowHeadlineImageCaption", {
|
|
265
|
+
enumerable: true,
|
|
266
|
+
get: function () {
|
|
267
|
+
return _RowHeadlineImageCaption.default;
|
|
268
|
+
}
|
|
269
|
+
});
|
|
270
|
+
Object.defineProperty(exports, "RowHeadlineImageIcon", {
|
|
271
|
+
enumerable: true,
|
|
272
|
+
get: function () {
|
|
273
|
+
return _RowHeadlineImageIcon.default;
|
|
274
|
+
}
|
|
275
|
+
});
|
|
258
276
|
Object.defineProperty(exports, "SVG", {
|
|
259
277
|
enumerable: true,
|
|
260
278
|
get: function () {
|
|
@@ -378,7 +396,7 @@ Object.defineProperty(exports, "Touchable", {
|
|
|
378
396
|
Object.defineProperty(exports, "YoutubePlayer", {
|
|
379
397
|
enumerable: true,
|
|
380
398
|
get: function () {
|
|
381
|
-
return
|
|
399
|
+
return _YoutubePlayer.YoutubePlayer;
|
|
382
400
|
}
|
|
383
401
|
});
|
|
384
402
|
Object.defineProperty(exports, "injectIcon", {
|
|
@@ -436,11 +454,14 @@ var _DeckSwiper = require("./components/DeckSwiper");
|
|
|
436
454
|
var _TabView = require("./components/TabView");
|
|
437
455
|
var _Markdown = _interopRequireDefault(require("./components/Markdown"));
|
|
438
456
|
var _BottomSheet = require("./components/BottomSheet");
|
|
439
|
-
var
|
|
457
|
+
var _YoutubePlayer = require("./components/YoutubePlayer");
|
|
440
458
|
var _DatePicker = _interopRequireDefault(require("./components/DatePicker/DatePicker"));
|
|
441
459
|
var _Picker = _interopRequireDefault(require("./components/Picker/Picker"));
|
|
442
460
|
var _ProgressBar = _interopRequireDefault(require("./components/ProgressBar"));
|
|
443
461
|
var _ProgressCircle = _interopRequireDefault(require("./components/ProgressCircle"));
|
|
462
|
+
var _RowBodyIcon = _interopRequireDefault(require("./components/RowBodyIcon"));
|
|
463
|
+
var _RowHeadlineImageCaption = _interopRequireDefault(require("./components/RowHeadlineImageCaption"));
|
|
464
|
+
var _RowHeadlineImageIcon = _interopRequireDefault(require("./components/RowHeadlineImageIcon"));
|
|
444
465
|
var _Slider = _interopRequireDefault(require("./components/Slider"));
|
|
445
466
|
var _Stepper = _interopRequireDefault(require("./components/Stepper"));
|
|
446
467
|
var _useAuthState = require("./components/useAuthState");
|
|
@@ -27,12 +27,6 @@ const SEED_DATA = {
|
|
|
27
27
|
description: "Playlist of the Youtube videos.",
|
|
28
28
|
defaultValue: null
|
|
29
29
|
}),
|
|
30
|
-
mute: (0, _types.createStaticBoolProp)({
|
|
31
|
-
label: "Mute Audio",
|
|
32
|
-
description: "Mute the audio of the video.",
|
|
33
|
-
defaultValue: false,
|
|
34
|
-
required: false
|
|
35
|
-
}),
|
|
36
30
|
autoplay: (0, _types.createStaticBoolProp)({
|
|
37
31
|
label: "Auto Play",
|
|
38
32
|
description: "Autoplay the video on load.",
|
|
@@ -57,6 +57,7 @@ function extractBorderAndMarginStyles(style, additionalBorderStyles, additionalM
|
|
|
57
57
|
marginStyles
|
|
58
58
|
};
|
|
59
59
|
}
|
|
60
|
+
|
|
60
61
|
/**
|
|
61
62
|
* Merges a style object on top of another style object. In React Native,
|
|
62
63
|
* keys with undefined values in a style object will still override styles
|
|
@@ -89,4 +90,4 @@ function getValueForRadioButton(value) {
|
|
|
89
90
|
} else {
|
|
90
91
|
throw new Error("Invalid value: ".concat(value));
|
|
91
92
|
}
|
|
92
|
-
}
|
|
93
|
+
}
|
|
@@ -0,0 +1,63 @@
|
|
|
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 = _ref => {
|
|
6
|
+
let {
|
|
7
|
+
titleTypeStyle,
|
|
8
|
+
titleColor,
|
|
9
|
+
subtitleTypeStyle,
|
|
10
|
+
subtitleColor,
|
|
11
|
+
title,
|
|
12
|
+
subtitle,
|
|
13
|
+
multilineSubtitle,
|
|
14
|
+
image,
|
|
15
|
+
right,
|
|
16
|
+
style
|
|
17
|
+
} = _ref;
|
|
18
|
+
return /*#__PURE__*/React.createElement(View, {
|
|
19
|
+
style: [styles.container, {
|
|
20
|
+
padding: 16
|
|
21
|
+
}, style]
|
|
22
|
+
}, /*#__PURE__*/React.createElement(View, {
|
|
23
|
+
style: styles.leftContainer
|
|
24
|
+
}, image && /*#__PURE__*/React.createElement(Image, {
|
|
25
|
+
source: typeof image === "string" ? {
|
|
26
|
+
uri: image
|
|
27
|
+
} : image,
|
|
28
|
+
style: {
|
|
29
|
+
marginRight: 12,
|
|
30
|
+
width: subtitle ? Config.rowMultiLineImageSize : Config.rowSingleLineImageSize,
|
|
31
|
+
height: subtitle ? Config.rowMultiLineImageSize : Config.rowSingleLineImageSize
|
|
32
|
+
}
|
|
33
|
+
}), /*#__PURE__*/React.createElement(View, {
|
|
34
|
+
style: styles.textContainer
|
|
35
|
+
}, /*#__PURE__*/React.createElement(Text, {
|
|
36
|
+
style: [titleTypeStyle, {
|
|
37
|
+
color: titleColor
|
|
38
|
+
}],
|
|
39
|
+
numberOfLines: 1
|
|
40
|
+
}, title), subtitle ? /*#__PURE__*/React.createElement(Text, {
|
|
41
|
+
style: [subtitleTypeStyle, {
|
|
42
|
+
color: subtitleColor,
|
|
43
|
+
marginTop: 4
|
|
44
|
+
}],
|
|
45
|
+
numberOfLines: multilineSubtitle ? undefined : 1
|
|
46
|
+
}, subtitle) : null)), right && right());
|
|
47
|
+
};
|
|
48
|
+
const styles = StyleSheet.create({
|
|
49
|
+
leftContainer: {
|
|
50
|
+
flexDirection: "row",
|
|
51
|
+
flex: 1
|
|
52
|
+
},
|
|
53
|
+
container: {
|
|
54
|
+
flexDirection: "row",
|
|
55
|
+
justifyContent: "space-between",
|
|
56
|
+
alignItems: "center"
|
|
57
|
+
},
|
|
58
|
+
textContainer: {
|
|
59
|
+
flex: 1,
|
|
60
|
+
justifyContent: "center"
|
|
61
|
+
}
|
|
62
|
+
});
|
|
63
|
+
export default withTheme(Row);
|
|
@@ -0,0 +1,35 @@
|
|
|
1
|
+
import * as React from "react";
|
|
2
|
+
import { withTheme } from "../theming";
|
|
3
|
+
import Row from "./Row";
|
|
4
|
+
import Config from "./Config";
|
|
5
|
+
const RowBodyIcon = _ref => {
|
|
6
|
+
let {
|
|
7
|
+
Icon,
|
|
8
|
+
title,
|
|
9
|
+
subtitle,
|
|
10
|
+
icon,
|
|
11
|
+
style,
|
|
12
|
+
theme: {
|
|
13
|
+
colors,
|
|
14
|
+
typography
|
|
15
|
+
}
|
|
16
|
+
} = _ref;
|
|
17
|
+
return /*#__PURE__*/React.createElement(Row, {
|
|
18
|
+
titleTypeStyle: typography.body1,
|
|
19
|
+
titleColor: colors.medium,
|
|
20
|
+
subtitleTypeStyle: typography.subtitle2,
|
|
21
|
+
subtitleColor: colors.light,
|
|
22
|
+
title: title,
|
|
23
|
+
subtitle: subtitle,
|
|
24
|
+
right: () => /*#__PURE__*/React.createElement(Icon, {
|
|
25
|
+
name: icon,
|
|
26
|
+
size: Config.rowSingleLineIconSize,
|
|
27
|
+
color: colors.light,
|
|
28
|
+
style: {
|
|
29
|
+
marginLeft: 16
|
|
30
|
+
}
|
|
31
|
+
}),
|
|
32
|
+
style: style
|
|
33
|
+
});
|
|
34
|
+
};
|
|
35
|
+
export default withTheme(RowBodyIcon);
|
|
@@ -0,0 +1,35 @@
|
|
|
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 = _ref => {
|
|
6
|
+
let {
|
|
7
|
+
title,
|
|
8
|
+
subtitle,
|
|
9
|
+
caption,
|
|
10
|
+
image,
|
|
11
|
+
style,
|
|
12
|
+
theme: {
|
|
13
|
+
colors,
|
|
14
|
+
typography
|
|
15
|
+
}
|
|
16
|
+
} = _ref;
|
|
17
|
+
return /*#__PURE__*/React.createElement(Row, {
|
|
18
|
+
titleTypeStyle: typography.headline6,
|
|
19
|
+
titleColor: colors.strong,
|
|
20
|
+
subtitleTypeStyle: typography.body2,
|
|
21
|
+
subtitleColor: colors.medium,
|
|
22
|
+
title: title,
|
|
23
|
+
subtitle: subtitle,
|
|
24
|
+
image: image,
|
|
25
|
+
right: () => /*#__PURE__*/React.createElement(Text, {
|
|
26
|
+
style: {
|
|
27
|
+
...typography.caption,
|
|
28
|
+
color: colors.strong,
|
|
29
|
+
marginLeft: 16
|
|
30
|
+
}
|
|
31
|
+
}, caption),
|
|
32
|
+
style: style
|
|
33
|
+
});
|
|
34
|
+
};
|
|
35
|
+
export default withTheme(RowHeadlineImageCaption);
|
|
@@ -0,0 +1,41 @@
|
|
|
1
|
+
import * as React from "react";
|
|
2
|
+
import { withTheme } from "../theming";
|
|
3
|
+
import Row from "./Row";
|
|
4
|
+
import Config from "./Config";
|
|
5
|
+
const RowHeadlineImageIcon = _ref => {
|
|
6
|
+
let {
|
|
7
|
+
Icon,
|
|
8
|
+
icon,
|
|
9
|
+
title,
|
|
10
|
+
image,
|
|
11
|
+
subtitle,
|
|
12
|
+
multilineSubtitle = false,
|
|
13
|
+
style,
|
|
14
|
+
theme: {
|
|
15
|
+
colors,
|
|
16
|
+
typography
|
|
17
|
+
}
|
|
18
|
+
} = _ref;
|
|
19
|
+
return /*#__PURE__*/React.createElement(Row, {
|
|
20
|
+
titleTypeStyle: typography.headline6,
|
|
21
|
+
titleColor: colors.strong,
|
|
22
|
+
subtitleTypeStyle: typography.body2,
|
|
23
|
+
subtitleColor: colors.medium,
|
|
24
|
+
title: title,
|
|
25
|
+
subtitle: subtitle,
|
|
26
|
+
multilineSubtitle: multilineSubtitle,
|
|
27
|
+
image: image,
|
|
28
|
+
right: () => /*#__PURE__*/React.createElement(Icon, {
|
|
29
|
+
name: icon,
|
|
30
|
+
size: multilineSubtitle ? Config.rowMultiLineIconSize : Config.rowSingleLineIconSize,
|
|
31
|
+
color: colors.light,
|
|
32
|
+
style: {
|
|
33
|
+
marginLeft: 16,
|
|
34
|
+
alignSelf: multilineSubtitle ? "flex-start" : "center",
|
|
35
|
+
marginTop: multilineSubtitle ? 4 : 0
|
|
36
|
+
}
|
|
37
|
+
}),
|
|
38
|
+
style: style
|
|
39
|
+
});
|
|
40
|
+
};
|
|
41
|
+
export default withTheme(RowHeadlineImageIcon);
|