@draftbit/core 46.9.1-c72bba.2 → 46.9.1-d273d3.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/BottomSheet/BottomSheet.js +88 -0
- package/lib/commonjs/components/BottomSheet/BottomSheetComponent.js +464 -0
- package/lib/commonjs/components/BottomSheet/index.js +13 -0
- package/lib/commonjs/components/Container.js +4 -15
- package/lib/commonjs/components/YotubePlayer.js +38 -0
- package/lib/commonjs/constants.js +1 -1
- package/lib/commonjs/index.js +14 -19
- package/lib/commonjs/mappings/BottomSheet.js +70 -0
- package/lib/commonjs/mappings/YoutubePlayer.js +44 -0
- package/lib/module/components/AvatarEdit.js +15 -4
- package/lib/module/components/BottomSheet/BottomSheet.js +80 -0
- package/lib/module/components/BottomSheet/BottomSheetComponent.js +470 -0
- package/lib/module/components/BottomSheet/index.js +1 -0
- package/lib/module/components/Portal/PortalManager.js +33 -7
- package/lib/module/components/YotubePlayer.js +30 -0
- package/lib/module/constants.js +1 -0
- package/lib/module/index.js +3 -4
- package/lib/module/mappings/BottomSheet.js +63 -0
- package/lib/module/mappings/FieldSearchBarFull.js +4 -1
- package/lib/module/mappings/YoutubePlayer.js +37 -0
- package/lib/typescript/src/components/BottomSheet/BottomSheet.d.ts +20 -0
- package/lib/typescript/src/components/BottomSheet/BottomSheet.d.ts.map +1 -0
- package/lib/typescript/src/components/BottomSheet/BottomSheetComponent.d.ts +170 -0
- package/lib/typescript/src/components/BottomSheet/BottomSheetComponent.d.ts.map +1 -0
- package/lib/typescript/src/components/BottomSheet/index.d.ts +2 -0
- package/lib/typescript/src/components/BottomSheet/index.d.ts.map +1 -0
- package/lib/typescript/src/components/YotubePlayer.d.ts +12 -0
- package/lib/typescript/src/components/YotubePlayer.d.ts.map +1 -0
- package/lib/typescript/src/index.d.ts +2 -1
- package/lib/typescript/src/index.d.ts.map +1 -1
- package/lib/typescript/src/mappings/BottomSheet.d.ts +115 -0
- package/lib/typescript/src/mappings/BottomSheet.d.ts.map +1 -0
- package/lib/typescript/src/mappings/YoutubePlayer.d.ts +37 -0
- package/lib/typescript/src/mappings/YoutubePlayer.d.ts.map +1 -0
- package/package.json +8 -4
- package/src/components/BottomSheet/BottomSheet.js +56 -0
- package/src/components/BottomSheet/BottomSheet.tsx +120 -0
- package/src/components/BottomSheet/BottomSheetComponent.js +437 -0
- package/src/components/BottomSheet/BottomSheetComponent.tsx +895 -0
- package/src/components/BottomSheet/index.js +1 -0
- package/src/components/BottomSheet/index.ts +1 -0
- package/src/components/YotubePlayer.js +10 -0
- package/src/components/YotubePlayer.tsx +38 -0
- package/src/index.js +2 -1
- package/src/index.tsx +3 -1
- package/src/mappings/BottomSheet.js +63 -0
- package/src/mappings/BottomSheet.ts +77 -0
- package/src/mappings/YoutubePlayer.js +37 -0
- package/src/mappings/YoutubePlayer.ts +43 -0
- package/lib/commonjs/components/Table/Table.js +0 -123
- package/lib/commonjs/components/Table/TableCell.js +0 -49
- package/lib/commonjs/components/Table/TableCommon.js +0 -30
- package/lib/commonjs/components/Table/TableRow.js +0 -61
- package/lib/commonjs/components/Table/index.js +0 -27
- package/lib/commonjs/mappings/Table.js +0 -140
- package/lib/module/components/Table/Table.js +0 -114
- package/lib/module/components/Table/TableCell.js +0 -41
- package/lib/module/components/Table/TableCommon.js +0 -21
- package/lib/module/components/Table/TableRow.js +0 -53
- package/lib/module/components/Table/index.js +0 -3
- package/lib/module/mappings/Table.js +0 -133
- package/lib/typescript/src/components/Table/Table.d.ts +0 -19
- package/lib/typescript/src/components/Table/Table.d.ts.map +0 -1
- package/lib/typescript/src/components/Table/TableCell.d.ts +0 -9
- package/lib/typescript/src/components/Table/TableCell.d.ts.map +0 -1
- package/lib/typescript/src/components/Table/TableCommon.d.ts +0 -20
- package/lib/typescript/src/components/Table/TableCommon.d.ts.map +0 -1
- package/lib/typescript/src/components/Table/TableRow.d.ts +0 -14
- package/lib/typescript/src/components/Table/TableRow.d.ts.map +0 -1
- package/lib/typescript/src/components/Table/index.d.ts +0 -4
- package/lib/typescript/src/components/Table/index.d.ts.map +0 -1
- package/lib/typescript/src/mappings/Table.d.ts +0 -337
- package/lib/typescript/src/mappings/Table.d.ts.map +0 -1
- package/src/components/Table/Table.js +0 -93
- package/src/components/Table/Table.tsx +0 -176
- package/src/components/Table/TableCell.js +0 -31
- package/src/components/Table/TableCell.tsx +0 -63
- package/src/components/Table/TableCommon.js +0 -12
- package/src/components/Table/TableCommon.ts +0 -40
- package/src/components/Table/TableRow.js +0 -37
- package/src/components/Table/TableRow.tsx +0 -77
- package/src/components/Table/index.js +0 -3
- package/src/components/Table/index.tsx +0 -3
- package/src/mappings/Table.js +0 -150
- package/src/mappings/Table.ts +0 -170
package/lib/commonjs/index.js
CHANGED
|
@@ -51,6 +51,12 @@ Object.defineProperty(exports, "Banner", {
|
|
|
51
51
|
return _Banner.default;
|
|
52
52
|
}
|
|
53
53
|
});
|
|
54
|
+
Object.defineProperty(exports, "BottomSheet", {
|
|
55
|
+
enumerable: true,
|
|
56
|
+
get: function () {
|
|
57
|
+
return _BottomSheet.BottomSheet;
|
|
58
|
+
}
|
|
59
|
+
});
|
|
54
60
|
Object.defineProperty(exports, "Button", {
|
|
55
61
|
enumerable: true,
|
|
56
62
|
get: function () {
|
|
@@ -363,24 +369,6 @@ Object.defineProperty(exports, "TabViewItem", {
|
|
|
363
369
|
return _TabView.TabViewItem;
|
|
364
370
|
}
|
|
365
371
|
});
|
|
366
|
-
Object.defineProperty(exports, "Table", {
|
|
367
|
-
enumerable: true,
|
|
368
|
-
get: function () {
|
|
369
|
-
return _Table.Table;
|
|
370
|
-
}
|
|
371
|
-
});
|
|
372
|
-
Object.defineProperty(exports, "TableCell", {
|
|
373
|
-
enumerable: true,
|
|
374
|
-
get: function () {
|
|
375
|
-
return _Table.TableCell;
|
|
376
|
-
}
|
|
377
|
-
});
|
|
378
|
-
Object.defineProperty(exports, "TableRow", {
|
|
379
|
-
enumerable: true,
|
|
380
|
-
get: function () {
|
|
381
|
-
return _Table.TableRow;
|
|
382
|
-
}
|
|
383
|
-
});
|
|
384
372
|
Object.defineProperty(exports, "TextField", {
|
|
385
373
|
enumerable: true,
|
|
386
374
|
get: function () {
|
|
@@ -405,6 +393,12 @@ Object.defineProperty(exports, "Touchable", {
|
|
|
405
393
|
return _Touchable.default;
|
|
406
394
|
}
|
|
407
395
|
});
|
|
396
|
+
Object.defineProperty(exports, "YoutubePlayer", {
|
|
397
|
+
enumerable: true,
|
|
398
|
+
get: function () {
|
|
399
|
+
return _YotubePlayer.default;
|
|
400
|
+
}
|
|
401
|
+
});
|
|
408
402
|
Object.defineProperty(exports, "injectIcon", {
|
|
409
403
|
enumerable: true,
|
|
410
404
|
get: function () {
|
|
@@ -459,7 +453,8 @@ var _Shadow = _interopRequireDefault(require("./components/Shadow"));
|
|
|
459
453
|
var _DeckSwiper = require("./components/DeckSwiper");
|
|
460
454
|
var _TabView = require("./components/TabView");
|
|
461
455
|
var _Markdown = _interopRequireDefault(require("./components/Markdown"));
|
|
462
|
-
var
|
|
456
|
+
var _BottomSheet = require("./components/BottomSheet");
|
|
457
|
+
var _YotubePlayer = _interopRequireDefault(require("./components/YotubePlayer"));
|
|
463
458
|
var _DatePicker = _interopRequireDefault(require("./components/DatePicker/DatePicker"));
|
|
464
459
|
var _Picker = _interopRequireDefault(require("./components/Picker/Picker"));
|
|
465
460
|
var _ProgressBar = _interopRequireDefault(require("./components/ProgressBar"));
|
|
@@ -0,0 +1,70 @@
|
|
|
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 SEED_DATA = {
|
|
9
|
+
name: "Bottom Sheet",
|
|
10
|
+
tag: "BottomSheet",
|
|
11
|
+
description: "A draggable Bottom sheet that snaps to specific points. Renders children in ScrollView",
|
|
12
|
+
category: _types.COMPONENT_TYPES.bottomsheet,
|
|
13
|
+
stylesPanelSections: _types.CONTAINER_COMPONENT_STYLES_SECTIONS,
|
|
14
|
+
triggers: [_types.Triggers.OnSettle],
|
|
15
|
+
props: {
|
|
16
|
+
onSettle: (0, _types.createActionProp)({
|
|
17
|
+
label: "On settle",
|
|
18
|
+
description: "Action to execute when sheet settles on a snap point"
|
|
19
|
+
}),
|
|
20
|
+
snapPoints: (0, _types.createArrayProp)({
|
|
21
|
+
label: "Snap points",
|
|
22
|
+
description: "An array of numerical values (that represent distance from the top) where bottom sheet can snap to place. Accepts numbers and percentages (minimum 2 snap points)",
|
|
23
|
+
defaultValue: ["10%", "50%", "80%"]
|
|
24
|
+
}),
|
|
25
|
+
initialSnapIndex: (0, _types.createStaticNumberProp)({
|
|
26
|
+
label: "Initial snap index",
|
|
27
|
+
description: "Index of the snap point to be used as the initial point",
|
|
28
|
+
defaultValue: 0,
|
|
29
|
+
required: false
|
|
30
|
+
}),
|
|
31
|
+
showHandle: (0, _types.createStaticBoolProp)({
|
|
32
|
+
label: "Show handle",
|
|
33
|
+
description: "Whether to show the top sheet handle or not",
|
|
34
|
+
defaultValue: true
|
|
35
|
+
}),
|
|
36
|
+
handleColor: (0, _types.createColorProp)({
|
|
37
|
+
label: "Handle color",
|
|
38
|
+
description: "Color of the top handle",
|
|
39
|
+
defaultValue: "divider"
|
|
40
|
+
}),
|
|
41
|
+
topBorderRadius: (0, _types.createStaticNumberProp)({
|
|
42
|
+
label: "Top border radius",
|
|
43
|
+
description: "Border radius of top corners",
|
|
44
|
+
defaultValue: 20,
|
|
45
|
+
required: false
|
|
46
|
+
}),
|
|
47
|
+
borderWidth: (0, _types.createStaticNumberProp)({
|
|
48
|
+
label: "Border width",
|
|
49
|
+
description: "Width of bottom sheet borders",
|
|
50
|
+
defaultValue: 1,
|
|
51
|
+
required: false
|
|
52
|
+
}),
|
|
53
|
+
borderColor: (0, _types.createColorProp)({
|
|
54
|
+
label: "Border color",
|
|
55
|
+
description: "Color of bottom sheet borders",
|
|
56
|
+
defaultValue: "divider"
|
|
57
|
+
}),
|
|
58
|
+
showsVerticalScrollIndicator: (0, _types.createStaticBoolProp)({
|
|
59
|
+
label: "Show Vertical Scroll Indicator",
|
|
60
|
+
description: "When true, shows a vertical scroll indicator. The default value is true.",
|
|
61
|
+
defaultValue: true
|
|
62
|
+
}),
|
|
63
|
+
bounces: (0, _types.createStaticBoolProp)({
|
|
64
|
+
label: "Bounce",
|
|
65
|
+
description: "When true, the scroll view bounces when it reaches the end of the content if the content is larger then the scroll view along the axis of the scroll direction.",
|
|
66
|
+
defaultValue: true
|
|
67
|
+
})
|
|
68
|
+
}
|
|
69
|
+
};
|
|
70
|
+
exports.SEED_DATA = SEED_DATA;
|
|
@@ -0,0 +1,44 @@
|
|
|
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 SEED_DATA = {
|
|
9
|
+
name: "Youtube Player",
|
|
10
|
+
tag: "YoutubePlayer",
|
|
11
|
+
description: "Plays a youtube video form a Youtube video or playlist id",
|
|
12
|
+
doc_link: "https://lonelycpp.github.io/react-native-youtube-iframe",
|
|
13
|
+
code_link: "https://github.com/LonelyCpp/react-native-youtube-iframe",
|
|
14
|
+
category: _types.COMPONENT_TYPES.media,
|
|
15
|
+
stylesPanelSections: _types.BLOCK_STYLES_SECTIONS,
|
|
16
|
+
layout: {
|
|
17
|
+
height: 250
|
|
18
|
+
},
|
|
19
|
+
props: {
|
|
20
|
+
videoId: (0, _types.createTextProp)({
|
|
21
|
+
label: "Video ID",
|
|
22
|
+
description: "VideoId of the Youtube video.",
|
|
23
|
+
defaultValue: null
|
|
24
|
+
}),
|
|
25
|
+
playlist: (0, _types.createTextProp)({
|
|
26
|
+
label: "Playlist",
|
|
27
|
+
description: "Playlist of the Youtube videos.",
|
|
28
|
+
defaultValue: null
|
|
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
|
+
autoplay: (0, _types.createStaticBoolProp)({
|
|
37
|
+
label: "Auto Play",
|
|
38
|
+
description: "Autoplay the video on load.",
|
|
39
|
+
defaultValue: false,
|
|
40
|
+
required: false
|
|
41
|
+
})
|
|
42
|
+
}
|
|
43
|
+
};
|
|
44
|
+
exports.SEED_DATA = SEED_DATA;
|
|
@@ -1,4 +1,3 @@
|
|
|
1
|
-
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); }
|
|
2
1
|
import * as React from "react";
|
|
3
2
|
import { View } from "react-native";
|
|
4
3
|
import Touchable from "./Touchable";
|
|
@@ -23,9 +22,10 @@ const AvatarEdit = _ref => {
|
|
|
23
22
|
width: size,
|
|
24
23
|
height: size
|
|
25
24
|
};
|
|
26
|
-
return /*#__PURE__*/React.createElement(View,
|
|
27
|
-
style: [style, dimensions]
|
|
28
|
-
|
|
25
|
+
return /*#__PURE__*/React.createElement(View, {
|
|
26
|
+
style: [style, dimensions],
|
|
27
|
+
...rest
|
|
28
|
+
}, /*#__PURE__*/React.createElement(Touchable, {
|
|
29
29
|
onPress: onPress
|
|
30
30
|
}, /*#__PURE__*/React.createElement(CircleImage, {
|
|
31
31
|
source: image,
|
|
@@ -46,4 +46,15 @@ const AvatarEdit = _ref => {
|
|
|
46
46
|
size: size * (3 / 16)
|
|
47
47
|
}))));
|
|
48
48
|
};
|
|
49
|
+
export default withTheme(AvatarEdit);yles.editBorderColor,
|
|
50
|
+
backgroundColor: colorStyles.editBackgroundColor,
|
|
51
|
+
borderRadius: size * (3 / 16),
|
|
52
|
+
padding: size * (3 / 32)
|
|
53
|
+
}
|
|
54
|
+
}, /*#__PURE__*/React.createElement(Icon, {
|
|
55
|
+
name: "MaterialIcons/edit",
|
|
56
|
+
color: colorStyles.editIconColor,
|
|
57
|
+
size: size * (3 / 16)
|
|
58
|
+
}))));
|
|
59
|
+
};
|
|
49
60
|
export default withTheme(AvatarEdit);
|
|
@@ -0,0 +1,80 @@
|
|
|
1
|
+
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); }
|
|
2
|
+
import React from "react";
|
|
3
|
+
import { StyleSheet, View } from "react-native";
|
|
4
|
+
import BottomSheetComponent from "./BottomSheetComponent";
|
|
5
|
+
import { withTheme } from "../../theming";
|
|
6
|
+
const BottomSheet = _ref => {
|
|
7
|
+
let {
|
|
8
|
+
theme,
|
|
9
|
+
snapPoints = ["10%", "50%", "80%"],
|
|
10
|
+
initialSnapIndex = 0,
|
|
11
|
+
showHandle = true,
|
|
12
|
+
handleColor = theme.colors.divider,
|
|
13
|
+
topBorderRadius = 20,
|
|
14
|
+
borderWidth = 1,
|
|
15
|
+
borderColor = theme.colors.divider,
|
|
16
|
+
onSettle,
|
|
17
|
+
style,
|
|
18
|
+
children,
|
|
19
|
+
...rest
|
|
20
|
+
} = _ref;
|
|
21
|
+
const backgroundColor = (style === null || style === void 0 ? void 0 : style.backgroundColor) || theme.colors.background;
|
|
22
|
+
return /*#__PURE__*/React.createElement(View, {
|
|
23
|
+
style: styles.parentContainer,
|
|
24
|
+
pointerEvents: "box-none"
|
|
25
|
+
}, /*#__PURE__*/React.createElement(BottomSheetComponent, _extends({
|
|
26
|
+
componentType: "ScrollView",
|
|
27
|
+
snapPoints: snapPoints,
|
|
28
|
+
initialSnapIndex: initialSnapIndex,
|
|
29
|
+
renderHandle: () => /*#__PURE__*/React.createElement(React.Fragment, null, showHandle && /*#__PURE__*/React.createElement(View, {
|
|
30
|
+
style: [styles.handleContainer, {
|
|
31
|
+
backgroundColor,
|
|
32
|
+
borderTopLeftRadius: topBorderRadius,
|
|
33
|
+
borderTopRightRadius: topBorderRadius
|
|
34
|
+
}]
|
|
35
|
+
}, /*#__PURE__*/React.createElement(View, {
|
|
36
|
+
style: [styles.handle, {
|
|
37
|
+
backgroundColor: handleColor
|
|
38
|
+
}]
|
|
39
|
+
}))),
|
|
40
|
+
contentContainerStyle: [styles.contentContainerStyle, style],
|
|
41
|
+
containerStyle: StyleSheet.flatten([styles.containerStyle, {
|
|
42
|
+
backgroundColor,
|
|
43
|
+
borderTopLeftRadius: topBorderRadius,
|
|
44
|
+
borderTopRightRadius: topBorderRadius,
|
|
45
|
+
borderWidth,
|
|
46
|
+
borderColor
|
|
47
|
+
}]),
|
|
48
|
+
onSettle: onSettle
|
|
49
|
+
}, rest), children));
|
|
50
|
+
};
|
|
51
|
+
const styles = StyleSheet.create({
|
|
52
|
+
//Render on top of everything
|
|
53
|
+
parentContainer: {
|
|
54
|
+
position: "absolute",
|
|
55
|
+
left: 0,
|
|
56
|
+
right: 0,
|
|
57
|
+
top: 0,
|
|
58
|
+
bottom: 0,
|
|
59
|
+
zIndex: 10,
|
|
60
|
+
overflow: "hidden"
|
|
61
|
+
},
|
|
62
|
+
contentContainerStyle: {
|
|
63
|
+
paddingHorizontal: 16,
|
|
64
|
+
paddingVertical: 10
|
|
65
|
+
},
|
|
66
|
+
containerStyle: {
|
|
67
|
+
flex: 1,
|
|
68
|
+
overflow: "hidden"
|
|
69
|
+
},
|
|
70
|
+
handleContainer: {
|
|
71
|
+
alignItems: "center",
|
|
72
|
+
paddingVertical: 20
|
|
73
|
+
},
|
|
74
|
+
handle: {
|
|
75
|
+
width: 40,
|
|
76
|
+
height: 2,
|
|
77
|
+
borderRadius: 4
|
|
78
|
+
}
|
|
79
|
+
});
|
|
80
|
+
export default withTheme(BottomSheet);
|