@draftbit/core 46.2.4-00bad7.0 → 46.2.4-463c2c.0
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/Carousel.js +10 -34
- package/lib/commonjs/components/DeprecatedButton.js +22 -4
- package/lib/commonjs/components/Youtube.js +73 -0
- package/lib/commonjs/index.js +8 -14
- package/lib/module/components/Banner.js +4 -24
- package/lib/module/components/CardContainer.js +5 -15
- package/lib/module/components/Divider.js +2 -20
- package/lib/module/components/FAB.js +5 -23
- package/lib/module/components/Portal/PortalHost.js +15 -26
- package/lib/module/components/RadioButton/RadioButton.js +2 -15
- package/lib/module/components/RadioButton/RadioButtonGroup.js +3 -17
- package/lib/module/components/ScreenContainer.js +5 -22
- package/lib/module/components/ToggleButton.js +3 -17
- package/lib/module/components/Youtube.js +59 -0
- package/lib/module/constants.js +0 -1
- package/lib/module/index.js +2 -2
- package/lib/typescript/src/components/Youtube.d.ts +44 -0
- package/lib/typescript/src/index.d.ts +1 -1
- package/package.json +5 -5
- package/src/components/Youtube.js +38 -0
- package/src/components/Youtube.tsx +66 -0
- package/src/index.js +1 -1
- package/src/index.tsx +1 -1
- package/lib/commonjs/components/TabView/TabView.js +0 -102
- package/lib/commonjs/components/TabView/TabViewItem.js +0 -26
- package/lib/commonjs/components/TabView/index.js +0 -23
- package/lib/commonjs/mappings/TabView.js +0 -79
- package/lib/module/components/TabView/TabView.js +0 -87
- package/lib/module/components/TabView/TabViewItem.js +0 -18
- package/lib/module/components/TabView/index.js +0 -2
- package/lib/module/mappings/TabView.js +0 -70
- package/lib/typescript/src/components/TabView/TabView.d.ts +0 -19
- package/lib/typescript/src/components/TabView/TabViewItem.d.ts +0 -10
- package/lib/typescript/src/components/TabView/index.d.ts +0 -2
- package/lib/typescript/src/mappings/TabView.d.ts +0 -111
- package/src/components/TabView/TabView.js +0 -34
- package/src/components/TabView/TabView.tsx +0 -97
- package/src/components/TabView/TabViewItem.js +0 -5
- package/src/components/TabView/TabViewItem.tsx +0 -21
- package/src/components/TabView/index.js +0 -2
- package/src/components/TabView/index.ts +0 -2
- package/src/mappings/TabView.js +0 -73
- package/src/mappings/TabView.ts +0 -80
|
@@ -19,6 +19,8 @@ function _getRequireWildcardCache(nodeInterop) { if (typeof WeakMap !== "functio
|
|
|
19
19
|
|
|
20
20
|
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; }
|
|
21
21
|
|
|
22
|
+
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); }
|
|
23
|
+
|
|
22
24
|
const screenWidth = _reactNative.Dimensions.get("window").width;
|
|
23
25
|
|
|
24
26
|
function Pager(_ref) {
|
|
@@ -48,6 +50,8 @@ function Pager(_ref) {
|
|
|
48
50
|
}
|
|
49
51
|
|
|
50
52
|
function Carousel(_ref2) {
|
|
53
|
+
var _data$length;
|
|
54
|
+
|
|
51
55
|
let {
|
|
52
56
|
data,
|
|
53
57
|
children,
|
|
@@ -55,12 +59,9 @@ function Carousel(_ref2) {
|
|
|
55
59
|
style,
|
|
56
60
|
...rest
|
|
57
61
|
} = _ref2;
|
|
58
|
-
|
|
59
|
-
var _a;
|
|
60
|
-
|
|
61
62
|
const [index, setIndex] = React.useState(0);
|
|
62
63
|
const length = React.Children.count(children);
|
|
63
|
-
const itemsLength = ((
|
|
64
|
+
const itemsLength = ((_data$length = data === null || data === void 0 ? void 0 : data.length) !== null && _data$length !== void 0 ? _data$length : 0) + length;
|
|
64
65
|
const slides = Array.isArray(data) ? data : [];
|
|
65
66
|
|
|
66
67
|
const {
|
|
@@ -70,10 +71,9 @@ function Carousel(_ref2) {
|
|
|
70
71
|
|
|
71
72
|
const slideWidth = width || screenWidth;
|
|
72
73
|
const slideHeight = height || 250;
|
|
73
|
-
return /*#__PURE__*/React.createElement(_reactNative.View, {
|
|
74
|
-
style: [styles.container, style]
|
|
75
|
-
|
|
76
|
-
}, /*#__PURE__*/React.createElement(_reactNative.ScrollView, {
|
|
74
|
+
return /*#__PURE__*/React.createElement(_reactNative.View, _extends({
|
|
75
|
+
style: [styles.container, style]
|
|
76
|
+
}, rest), /*#__PURE__*/React.createElement(_reactNative.ScrollView, {
|
|
77
77
|
pagingEnabled: true,
|
|
78
78
|
horizontal: true,
|
|
79
79
|
decelerationRate: "fast",
|
|
@@ -101,9 +101,9 @@ function Carousel(_ref2) {
|
|
|
101
101
|
}]
|
|
102
102
|
});
|
|
103
103
|
}) : null, React.Children.map(children, child => {
|
|
104
|
-
var
|
|
104
|
+
var _child$props;
|
|
105
105
|
|
|
106
|
-
const s = (
|
|
106
|
+
const s = (child === null || child === void 0 ? void 0 : (_child$props = child.props) === null || _child$props === void 0 ? void 0 : _child$props.style) || {};
|
|
107
107
|
return /*#__PURE__*/React.createElement(_reactNative.View, {
|
|
108
108
|
style: {
|
|
109
109
|
width: slideWidth
|
|
@@ -144,28 +144,4 @@ const styles = _reactNative.StyleSheet.create({
|
|
|
144
144
|
|
|
145
145
|
var _default = (0, _theming.withTheme)(Carousel);
|
|
146
146
|
|
|
147
|
-
exports.default = _default;e({
|
|
148
|
-
container: {
|
|
149
|
-
backgroundColor: "#eee"
|
|
150
|
-
},
|
|
151
|
-
pager: {
|
|
152
|
-
position: "absolute",
|
|
153
|
-
bottom: 12,
|
|
154
|
-
left: 0,
|
|
155
|
-
right: 0,
|
|
156
|
-
flexDirection: "row",
|
|
157
|
-
justifyContent: "center",
|
|
158
|
-
alignItems: "center"
|
|
159
|
-
},
|
|
160
|
-
bullet: {
|
|
161
|
-
marginHorizontal: 2,
|
|
162
|
-
width: 10,
|
|
163
|
-
height: 10,
|
|
164
|
-
borderRadius: 20,
|
|
165
|
-
backgroundColor: "#000"
|
|
166
|
-
}
|
|
167
|
-
});
|
|
168
|
-
|
|
169
|
-
var _default = (0, _theming.withTheme)(Carousel);
|
|
170
|
-
|
|
171
147
|
exports.default = _default;
|
|
@@ -25,8 +25,6 @@ function _getRequireWildcardCache(nodeInterop) { if (typeof WeakMap !== "functio
|
|
|
25
25
|
|
|
26
26
|
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; }
|
|
27
27
|
|
|
28
|
-
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); }
|
|
29
|
-
|
|
30
28
|
const Button = _ref => {
|
|
31
29
|
let {
|
|
32
30
|
Icon,
|
|
@@ -128,7 +126,7 @@ const Button = _ref => {
|
|
|
128
126
|
alignSelf: "stretch",
|
|
129
127
|
...margins
|
|
130
128
|
}
|
|
131
|
-
}, /*#__PURE__*/React.createElement(_Touchable.default,
|
|
129
|
+
}, /*#__PURE__*/React.createElement(_Touchable.default, { ...rest,
|
|
132
130
|
onPress: onPress,
|
|
133
131
|
accessibilityState: {
|
|
134
132
|
disabled
|
|
@@ -136,7 +134,7 @@ const Button = _ref => {
|
|
|
136
134
|
accessibilityRole: "button",
|
|
137
135
|
disabled: disabled || loading,
|
|
138
136
|
style: [styles.button, buttonStyle, innerStyles]
|
|
139
|
-
}
|
|
137
|
+
}, /*#__PURE__*/React.createElement(_reactNative.View, {
|
|
140
138
|
style: styles.content
|
|
141
139
|
}, icon && loading !== true ? /*#__PURE__*/React.createElement(_reactNative.View, {
|
|
142
140
|
style: iconStyle
|
|
@@ -171,4 +169,24 @@ const styles = _reactNative.StyleSheet.create({
|
|
|
171
169
|
|
|
172
170
|
var _default = (0, _theming.withTheme)(Button);
|
|
173
171
|
|
|
172
|
+
exports.default = _default;));
|
|
173
|
+
};
|
|
174
|
+
|
|
175
|
+
const styles = _reactNative.StyleSheet.create({
|
|
176
|
+
button: {
|
|
177
|
+
minWidth: 64,
|
|
178
|
+
borderStyle: "solid"
|
|
179
|
+
},
|
|
180
|
+
content: {
|
|
181
|
+
flexDirection: "row",
|
|
182
|
+
alignItems: "center",
|
|
183
|
+
justifyContent: "center"
|
|
184
|
+
},
|
|
185
|
+
icon: {
|
|
186
|
+
width: _Config.default.buttonIconSize
|
|
187
|
+
}
|
|
188
|
+
});
|
|
189
|
+
|
|
190
|
+
var _default = (0, _theming.withTheme)(Button);
|
|
191
|
+
|
|
174
192
|
exports.default = _default;
|
|
@@ -0,0 +1,73 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
Object.defineProperty(exports, "__esModule", {
|
|
4
|
+
value: true
|
|
5
|
+
});
|
|
6
|
+
exports.default = exports.SEED_DATA = void 0;
|
|
7
|
+
|
|
8
|
+
var _types = require("@draftbit/types");
|
|
9
|
+
|
|
10
|
+
var _react = _interopRequireDefault(require("react"));
|
|
11
|
+
|
|
12
|
+
var _reactNativeYoutubeIframe = _interopRequireDefault(require("react-native-youtube-iframe"));
|
|
13
|
+
|
|
14
|
+
var _utilities = require("../utilities");
|
|
15
|
+
|
|
16
|
+
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
|
|
17
|
+
|
|
18
|
+
const Youtube = _ref => {
|
|
19
|
+
let {
|
|
20
|
+
videoId,
|
|
21
|
+
playlist,
|
|
22
|
+
style,
|
|
23
|
+
mute,
|
|
24
|
+
autoplay
|
|
25
|
+
} = _ref;
|
|
26
|
+
const {
|
|
27
|
+
viewStyles: {
|
|
28
|
+
height,
|
|
29
|
+
width
|
|
30
|
+
}
|
|
31
|
+
} = (0, _utilities.extractStyles)(style);
|
|
32
|
+
return /*#__PURE__*/_react.default.createElement(_reactNativeYoutubeIframe.default, {
|
|
33
|
+
height: height,
|
|
34
|
+
width: width,
|
|
35
|
+
play: autoplay,
|
|
36
|
+
videoId: videoId,
|
|
37
|
+
playList: playlist,
|
|
38
|
+
mute: mute
|
|
39
|
+
});
|
|
40
|
+
};
|
|
41
|
+
|
|
42
|
+
var _default = Youtube;
|
|
43
|
+
exports.default = _default;
|
|
44
|
+
const SEED_DATA = {
|
|
45
|
+
name: "Youtube",
|
|
46
|
+
tag: "Youtube",
|
|
47
|
+
description: "Youtube Component",
|
|
48
|
+
category: _types.COMPONENT_TYPES.media,
|
|
49
|
+
layout: {
|
|
50
|
+
width: "100%"
|
|
51
|
+
},
|
|
52
|
+
props: {
|
|
53
|
+
videoId: (0, _types.createTextProp)({
|
|
54
|
+
label: "VideoId",
|
|
55
|
+
description: "Youtube Video ID"
|
|
56
|
+
}),
|
|
57
|
+
playlist: (0, _types.createTextProp)({
|
|
58
|
+
label: "PlayList",
|
|
59
|
+
description: "Playlist ID"
|
|
60
|
+
}),
|
|
61
|
+
mute: (0, _types.createBoolProp)({
|
|
62
|
+
label: "Mute",
|
|
63
|
+
description: "Whether to mute video",
|
|
64
|
+
defaultValue: false
|
|
65
|
+
}),
|
|
66
|
+
autoplay: (0, _types.createBoolProp)({
|
|
67
|
+
label: "Autoplay",
|
|
68
|
+
description: "Whether to Autoplay video",
|
|
69
|
+
defaultValue: false
|
|
70
|
+
})
|
|
71
|
+
}
|
|
72
|
+
};
|
|
73
|
+
exports.SEED_DATA = SEED_DATA;
|
package/lib/commonjs/index.js
CHANGED
|
@@ -363,18 +363,6 @@ Object.defineProperty(exports, "SwitchRow", {
|
|
|
363
363
|
return _Switch.SwitchRow;
|
|
364
364
|
}
|
|
365
365
|
});
|
|
366
|
-
Object.defineProperty(exports, "TabView", {
|
|
367
|
-
enumerable: true,
|
|
368
|
-
get: function () {
|
|
369
|
-
return _TabView.TabView;
|
|
370
|
-
}
|
|
371
|
-
});
|
|
372
|
-
Object.defineProperty(exports, "TabViewItem", {
|
|
373
|
-
enumerable: true,
|
|
374
|
-
get: function () {
|
|
375
|
-
return _TabView.TabViewItem;
|
|
376
|
-
}
|
|
377
|
-
});
|
|
378
366
|
Object.defineProperty(exports, "TextField", {
|
|
379
367
|
enumerable: true,
|
|
380
368
|
get: function () {
|
|
@@ -399,6 +387,12 @@ Object.defineProperty(exports, "Touchable", {
|
|
|
399
387
|
return _Touchable.default;
|
|
400
388
|
}
|
|
401
389
|
});
|
|
390
|
+
Object.defineProperty(exports, "Youtube", {
|
|
391
|
+
enumerable: true,
|
|
392
|
+
get: function () {
|
|
393
|
+
return _Youtube.default;
|
|
394
|
+
}
|
|
395
|
+
});
|
|
402
396
|
Object.defineProperty(exports, "injectIcon", {
|
|
403
397
|
enumerable: true,
|
|
404
398
|
get: function () {
|
|
@@ -476,8 +470,6 @@ var _ActionSheet = require("./components/ActionSheet");
|
|
|
476
470
|
|
|
477
471
|
var _Swiper = require("./components/Swiper");
|
|
478
472
|
|
|
479
|
-
var _TabView = require("./components/TabView");
|
|
480
|
-
|
|
481
473
|
var _Layout = require("./components/Layout");
|
|
482
474
|
|
|
483
475
|
var _index = require("./components/RadioButton/index");
|
|
@@ -518,6 +510,8 @@ var _Stepper = _interopRequireDefault(require("./components/Stepper"));
|
|
|
518
510
|
|
|
519
511
|
var _useAuthState = require("./components/useAuthState");
|
|
520
512
|
|
|
513
|
+
var _Youtube = _interopRequireDefault(require("./components/Youtube"));
|
|
514
|
+
|
|
521
515
|
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); }
|
|
522
516
|
|
|
523
517
|
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; }
|
|
@@ -1,3 +1,5 @@
|
|
|
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
3
|
import * as React from "react";
|
|
2
4
|
import { Button, Text, View, StyleSheet, Animated } from "react-native";
|
|
3
5
|
import Surface from "./Surface";
|
|
@@ -72,9 +74,9 @@ const Banner = _ref => {
|
|
|
72
74
|
|
|
73
75
|
const height = Animated.multiply(position, layout.height);
|
|
74
76
|
const translateY = Animated.multiply(Animated.add(position, -1), layout.height);
|
|
75
|
-
return /*#__PURE__*/React.createElement(Surface, {
|
|
77
|
+
return /*#__PURE__*/React.createElement(Surface, _extends({}, rest, {
|
|
76
78
|
style: [styles.container, shadow(ELEVATION), style]
|
|
77
|
-
}, /*#__PURE__*/React.createElement(View, {
|
|
79
|
+
}), /*#__PURE__*/React.createElement(View, {
|
|
78
80
|
style: [styles.wrapper, contentStyle]
|
|
79
81
|
}, /*#__PURE__*/React.createElement(Animated.View, {
|
|
80
82
|
style: {
|
|
@@ -153,26 +155,4 @@ const styles = StyleSheet.create({
|
|
|
153
155
|
margin: 8
|
|
154
156
|
}
|
|
155
157
|
});
|
|
156
|
-
export default withTheme(Banner);00%"
|
|
157
|
-
},
|
|
158
|
-
content: {
|
|
159
|
-
flexDirection: "row",
|
|
160
|
-
justifyContent: "flex-start",
|
|
161
|
-
marginHorizontal: 8,
|
|
162
|
-
marginTop: 16,
|
|
163
|
-
marginBottom: 0
|
|
164
|
-
},
|
|
165
|
-
icon: {
|
|
166
|
-
margin: 8
|
|
167
|
-
},
|
|
168
|
-
message: {
|
|
169
|
-
flex: 1,
|
|
170
|
-
margin: 8
|
|
171
|
-
},
|
|
172
|
-
actions: {
|
|
173
|
-
flexDirection: "row",
|
|
174
|
-
justifyContent: "flex-end",
|
|
175
|
-
margin: 8
|
|
176
|
-
}
|
|
177
|
-
});
|
|
178
158
|
export default withTheme(Banner);
|
|
@@ -1,3 +1,5 @@
|
|
|
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
3
|
import React from "react";
|
|
2
4
|
import { View, Text } from "react-native";
|
|
3
5
|
import color from "color";
|
|
@@ -49,12 +51,11 @@ const CardContainer = _ref => {
|
|
|
49
51
|
break;
|
|
50
52
|
}
|
|
51
53
|
|
|
52
|
-
return /*#__PURE__*/React.createElement(Card, {
|
|
54
|
+
return /*#__PURE__*/React.createElement(Card, _extends({
|
|
53
55
|
style: style,
|
|
54
56
|
onPress: onPress,
|
|
55
|
-
numColumns: numColumns
|
|
56
|
-
|
|
57
|
-
}, /*#__PURE__*/React.createElement(Elevation, {
|
|
57
|
+
numColumns: numColumns
|
|
58
|
+
}, rest), /*#__PURE__*/React.createElement(Elevation, {
|
|
58
59
|
style: {
|
|
59
60
|
elevation,
|
|
60
61
|
borderRadius: roundness
|
|
@@ -124,15 +125,4 @@ const CardContainer = _ref => {
|
|
|
124
125
|
})) : null)));
|
|
125
126
|
};
|
|
126
127
|
|
|
127
|
-
export default withTheme(CardContainer);ONTAINER_PADDING,
|
|
128
|
-
borderRadius: ICON_CONTAINER_SIZE,
|
|
129
|
-
backgroundColor: color(colors.strong).alpha(Config.cardIconBackgroundOpacity).rgb().string()
|
|
130
|
-
}
|
|
131
|
-
}, /*#__PURE__*/React.createElement(Icon, {
|
|
132
|
-
name: icon,
|
|
133
|
-
size: Config.cardIconSize,
|
|
134
|
-
color: colors.surface
|
|
135
|
-
})) : null)));
|
|
136
|
-
};
|
|
137
|
-
|
|
138
128
|
export default withTheme(CardContainer);
|
|
@@ -1,27 +1,9 @@
|
|
|
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
3
|
import * as React from "react";
|
|
2
4
|
import { StyleSheet, View } from "react-native";
|
|
3
5
|
import { withTheme } from "../theming";
|
|
4
6
|
|
|
5
|
-
const Divider = _ref => {
|
|
6
|
-
let {
|
|
7
|
-
style,
|
|
8
|
-
color,
|
|
9
|
-
theme: {
|
|
10
|
-
colors
|
|
11
|
-
},
|
|
12
|
-
...rest
|
|
13
|
-
} = _ref;
|
|
14
|
-
return /*#__PURE__*/React.createElement(View, {
|
|
15
|
-
style: [{
|
|
16
|
-
backgroundColor: color || colors.divider,
|
|
17
|
-
height: StyleSheet.hairlineWidth
|
|
18
|
-
}, style],
|
|
19
|
-
...rest
|
|
20
|
-
});
|
|
21
|
-
};
|
|
22
|
-
|
|
23
|
-
export default withTheme(Divider);ng";
|
|
24
|
-
|
|
25
7
|
const Divider = _ref => {
|
|
26
8
|
let {
|
|
27
9
|
style,
|
|
@@ -1,3 +1,5 @@
|
|
|
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
3
|
import * as React from "react";
|
|
2
4
|
import { View, StyleSheet, Pressable, ActivityIndicator, Platform } from "react-native";
|
|
3
5
|
import { withTheme } from "../theming";
|
|
@@ -25,7 +27,7 @@ const FAB = _ref => {
|
|
|
25
27
|
borderRadius: size / 2,
|
|
26
28
|
overflow: "hidden"
|
|
27
29
|
}, style]
|
|
28
|
-
}, /*#__PURE__*/React.createElement(Pressable, {
|
|
30
|
+
}, /*#__PURE__*/React.createElement(Pressable, _extends({
|
|
29
31
|
onPress: onPress,
|
|
30
32
|
disabled: loading || disabled,
|
|
31
33
|
android_ripple: {
|
|
@@ -43,9 +45,8 @@ const FAB = _ref => {
|
|
|
43
45
|
borderRadius: size / 2,
|
|
44
46
|
backgroundColor
|
|
45
47
|
}];
|
|
46
|
-
}
|
|
47
|
-
|
|
48
|
-
}, /*#__PURE__*/React.createElement(View, null, loading ? /*#__PURE__*/React.createElement(ActivityIndicator, {
|
|
48
|
+
}
|
|
49
|
+
}, props), /*#__PURE__*/React.createElement(View, null, loading ? /*#__PURE__*/React.createElement(ActivityIndicator, {
|
|
49
50
|
style: size > 50 ? {
|
|
50
51
|
marginTop: 2,
|
|
51
52
|
marginLeft: 2
|
|
@@ -59,25 +60,6 @@ const FAB = _ref => {
|
|
|
59
60
|
}))));
|
|
60
61
|
};
|
|
61
62
|
|
|
62
|
-
const styles = StyleSheet.create({
|
|
63
|
-
button: {
|
|
64
|
-
backgroundColor: "#5a45ff",
|
|
65
|
-
justifyContent: "center",
|
|
66
|
-
alignItems: "center",
|
|
67
|
-
...Platform.select({
|
|
68
|
-
web: {
|
|
69
|
-
cursor: "pointer",
|
|
70
|
-
userSelect: "none"
|
|
71
|
-
}
|
|
72
|
-
})
|
|
73
|
-
}
|
|
74
|
-
});
|
|
75
|
-
export default withTheme(FAB); name: iconName,
|
|
76
|
-
size: size,
|
|
77
|
-
color: color
|
|
78
|
-
}))));
|
|
79
|
-
};
|
|
80
|
-
|
|
81
63
|
const styles = StyleSheet.create({
|
|
82
64
|
button: {
|
|
83
65
|
backgroundColor: "#5a45ff",
|
|
@@ -1,3 +1,5 @@
|
|
|
1
|
+
function _defineProperty(obj, key, value) { if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; }
|
|
2
|
+
|
|
1
3
|
import * as React from "react";
|
|
2
4
|
import { View, StyleSheet } from "react-native";
|
|
3
5
|
import PortalManager from "./PortalManager";
|
|
@@ -31,11 +33,11 @@ export default class PortalHost extends React.Component {
|
|
|
31
33
|
constructor() {
|
|
32
34
|
super(...arguments);
|
|
33
35
|
|
|
34
|
-
this
|
|
36
|
+
_defineProperty(this, "setManager", manager => {
|
|
35
37
|
this.manager = manager;
|
|
36
|
-
};
|
|
38
|
+
});
|
|
37
39
|
|
|
38
|
-
this
|
|
40
|
+
_defineProperty(this, "mount", children => {
|
|
39
41
|
const key = this.nextKey++;
|
|
40
42
|
|
|
41
43
|
if (this.manager) {
|
|
@@ -49,9 +51,9 @@ export default class PortalHost extends React.Component {
|
|
|
49
51
|
}
|
|
50
52
|
|
|
51
53
|
return key;
|
|
52
|
-
};
|
|
54
|
+
});
|
|
53
55
|
|
|
54
|
-
this
|
|
56
|
+
_defineProperty(this, "update", (key, children) => {
|
|
55
57
|
if (this.manager) {
|
|
56
58
|
this.manager.update(key, children);
|
|
57
59
|
} else {
|
|
@@ -69,9 +71,9 @@ export default class PortalHost extends React.Component {
|
|
|
69
71
|
this.queue.push(op);
|
|
70
72
|
}
|
|
71
73
|
}
|
|
72
|
-
};
|
|
74
|
+
});
|
|
73
75
|
|
|
74
|
-
this
|
|
76
|
+
_defineProperty(this, "unmount", key => {
|
|
75
77
|
if (this.manager) {
|
|
76
78
|
this.manager.unmount(key);
|
|
77
79
|
} else {
|
|
@@ -80,10 +82,13 @@ export default class PortalHost extends React.Component {
|
|
|
80
82
|
key
|
|
81
83
|
});
|
|
82
84
|
}
|
|
83
|
-
};
|
|
85
|
+
});
|
|
86
|
+
|
|
87
|
+
_defineProperty(this, "nextKey", 0);
|
|
88
|
+
|
|
89
|
+
_defineProperty(this, "queue", []);
|
|
84
90
|
|
|
85
|
-
this
|
|
86
|
-
this.queue = [];
|
|
91
|
+
_defineProperty(this, "manager", void 0);
|
|
87
92
|
}
|
|
88
93
|
|
|
89
94
|
componentDidMount() {
|
|
@@ -127,22 +132,6 @@ export default class PortalHost extends React.Component {
|
|
|
127
132
|
}));
|
|
128
133
|
}
|
|
129
134
|
|
|
130
|
-
}
|
|
131
|
-
PortalHost.displayName = "Portal.Host";
|
|
132
|
-
const styles = StyleSheet.create({
|
|
133
|
-
container: {
|
|
134
|
-
flex: 1
|
|
135
|
-
}
|
|
136
|
-
}); }
|
|
137
|
-
}, /*#__PURE__*/React.createElement(View, {
|
|
138
|
-
style: styles.container,
|
|
139
|
-
collapsable: false,
|
|
140
|
-
pointerEvents: "box-none"
|
|
141
|
-
}, this.props.children), /*#__PURE__*/React.createElement(PortalManager, {
|
|
142
|
-
ref: this.setManager
|
|
143
|
-
}));
|
|
144
|
-
}
|
|
145
|
-
|
|
146
135
|
}
|
|
147
136
|
|
|
148
137
|
_defineProperty(PortalHost, "displayName", "Portal.Host");
|
|
@@ -1,3 +1,5 @@
|
|
|
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
3
|
import * as React from "react";
|
|
2
4
|
import Config from "../Config";
|
|
3
5
|
import IconButton from "../IconButton";
|
|
@@ -32,21 +34,6 @@ const RadioButton = _ref => {
|
|
|
32
34
|
onValueChange === null || onValueChange === void 0 ? void 0 : onValueChange(realValue);
|
|
33
35
|
};
|
|
34
36
|
|
|
35
|
-
return /*#__PURE__*/React.createElement(IconButton, {
|
|
36
|
-
Icon: Icon,
|
|
37
|
-
icon: isSelected ? selectedIcon : unselectedIcon,
|
|
38
|
-
color: isSelected ? color : unselectedColor,
|
|
39
|
-
disabled: disabled,
|
|
40
|
-
onPress: handlePress,
|
|
41
|
-
size: size,
|
|
42
|
-
style: style,
|
|
43
|
-
...rest
|
|
44
|
-
});
|
|
45
|
-
};
|
|
46
|
-
|
|
47
|
-
export default RadioButton; onValueChange(realValue);
|
|
48
|
-
};
|
|
49
|
-
|
|
50
37
|
return /*#__PURE__*/React.createElement(IconButton, _extends({
|
|
51
38
|
Icon: Icon,
|
|
52
39
|
icon: isSelected ? selectedIcon : unselectedIcon,
|
|
@@ -1,3 +1,5 @@
|
|
|
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
3
|
import * as React from "react";
|
|
2
4
|
import { View } from "react-native";
|
|
3
5
|
import { getValueForRadioButton } from "../../utilities";
|
|
@@ -46,23 +48,7 @@ const RadioButtonGroup = _ref => {
|
|
|
46
48
|
});
|
|
47
49
|
}
|
|
48
50
|
|
|
49
|
-
return /*#__PURE__*/React.createElement(View, {
|
|
50
|
-
style: [{
|
|
51
|
-
minHeight: 40
|
|
52
|
-
}, style],
|
|
53
|
-
...rest
|
|
54
|
-
}, /*#__PURE__*/React.createElement(Provider, {
|
|
55
|
-
value: {
|
|
56
|
-
value: internalValue,
|
|
57
|
-
onValueChange: handleValueChange,
|
|
58
|
-
direction
|
|
59
|
-
}
|
|
60
|
-
}, /*#__PURE__*/React.createElement(View, {
|
|
61
|
-
style: _containerStyle
|
|
62
|
-
}, children)));
|
|
63
|
-
};
|
|
64
|
-
|
|
65
|
-
export default RadioButtonGroup;xtends({
|
|
51
|
+
return /*#__PURE__*/React.createElement(View, _extends({
|
|
66
52
|
style: [{
|
|
67
53
|
minHeight: 40
|
|
68
54
|
}, style]
|
|
@@ -1,3 +1,5 @@
|
|
|
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
3
|
import * as React from "react";
|
|
2
4
|
import { StyleSheet, ScrollView, View } from "react-native";
|
|
3
5
|
import { SafeAreaView } from "react-native-safe-area-context";
|
|
@@ -25,13 +27,12 @@ function ScreenContainer(_ref) {
|
|
|
25
27
|
edges.push("bottom");
|
|
26
28
|
}
|
|
27
29
|
|
|
28
|
-
return /*#__PURE__*/React.createElement(SafeAreaView, {
|
|
30
|
+
return /*#__PURE__*/React.createElement(SafeAreaView, _extends({
|
|
29
31
|
edges: edges,
|
|
30
32
|
style: [styles.container, {
|
|
31
33
|
backgroundColor
|
|
32
|
-
}]
|
|
33
|
-
|
|
34
|
-
}, scrollable ? /*#__PURE__*/React.createElement(ScrollView, {
|
|
34
|
+
}]
|
|
35
|
+
}, rest), scrollable ? /*#__PURE__*/React.createElement(ScrollView, {
|
|
35
36
|
contentContainerStyle: [styles.scrollViewContainer, {
|
|
36
37
|
backgroundColor
|
|
37
38
|
}, style]
|
|
@@ -42,24 +43,6 @@ function ScreenContainer(_ref) {
|
|
|
42
43
|
}, children));
|
|
43
44
|
}
|
|
44
45
|
|
|
45
|
-
const styles = StyleSheet.create({
|
|
46
|
-
container: {
|
|
47
|
-
flex: 1
|
|
48
|
-
},
|
|
49
|
-
scrollViewContainer: {
|
|
50
|
-
flexGrow: 1,
|
|
51
|
-
flex: undefined
|
|
52
|
-
}
|
|
53
|
-
});
|
|
54
|
-
export default withTheme(ScreenContainer);olor
|
|
55
|
-
}, style]
|
|
56
|
-
}, children) : /*#__PURE__*/React.createElement(View, {
|
|
57
|
-
style: [styles.container, {
|
|
58
|
-
backgroundColor
|
|
59
|
-
}, style]
|
|
60
|
-
}, children));
|
|
61
|
-
}
|
|
62
|
-
|
|
63
46
|
const styles = StyleSheet.create({
|
|
64
47
|
container: {
|
|
65
48
|
flex: 1
|
|
@@ -1,3 +1,5 @@
|
|
|
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
3
|
import * as React from "react";
|
|
2
4
|
import { withTheme } from "../theming";
|
|
3
5
|
import { StyleSheet } from "react-native";
|
|
@@ -40,29 +42,13 @@ const ToggleButton = _ref => {
|
|
|
40
42
|
onPress(!internalValue);
|
|
41
43
|
};
|
|
42
44
|
|
|
43
|
-
return /*#__PURE__*/React.createElement(IconButton, {
|
|
45
|
+
return /*#__PURE__*/React.createElement(IconButton, _extends({
|
|
44
46
|
Icon: Icon,
|
|
45
47
|
icon: icon,
|
|
46
48
|
size: iconSize,
|
|
47
49
|
color: internalValue ? colors[color] : colors[colorSecondary],
|
|
48
50
|
onPress: handlePress,
|
|
49
51
|
disabled: disabled,
|
|
50
|
-
style: [styles.mainContainer, {
|
|
51
|
-
width,
|
|
52
|
-
height,
|
|
53
|
-
backgroundColor: internalValue ? colors[colorSecondary] : colors[color],
|
|
54
|
-
borderColor: colors[borderColor]
|
|
55
|
-
}, style],
|
|
56
|
-
...rest
|
|
57
|
-
});
|
|
58
|
-
};
|
|
59
|
-
|
|
60
|
-
const styles = StyleSheet.create({
|
|
61
|
-
mainContainer: {
|
|
62
|
-
borderWidth: 1
|
|
63
|
-
}
|
|
64
|
-
});
|
|
65
|
-
export default withTheme(ToggleButton);: disabled,
|
|
66
52
|
style: [styles.mainContainer, {
|
|
67
53
|
width,
|
|
68
54
|
height,
|