@draftbit/core 46.4.4-7f27fb.2 → 46.4.4-808a01.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/AnimatedCircularProgress.js +12 -2
- package/lib/commonjs/components/AspectRatio.js +19 -2
- package/lib/commonjs/components/AvatarEdit.js +17 -5
- package/lib/commonjs/components/Banner.js +24 -4
- package/lib/commonjs/components/Button.js +32 -11
- package/lib/commonjs/components/CardBlock.js +15 -5
- package/lib/commonjs/components/CardContainer.js +15 -5
- package/lib/commonjs/components/CardContainerRating.js +15 -5
- package/lib/commonjs/components/CardContainerShortImage.js +17 -5
- package/lib/commonjs/components/Carousel.js +34 -10
- package/lib/commonjs/components/Checkbox/CheckboxRow.js +24 -6
- package/lib/commonjs/components/Checkbox/context.js +1 -1
- package/lib/commonjs/components/CircleImage.js +16 -2
- package/lib/commonjs/components/CircularProgress.js +15 -7
- package/lib/commonjs/components/DeprecatedCardWrapper.js +17 -2
- package/lib/commonjs/components/DeprecatedFAB.js +22 -4
- package/lib/commonjs/components/Divider.js +16 -2
- package/lib/commonjs/components/FAB.js +20 -5
- package/lib/commonjs/components/FormRow.js +17 -3
- package/lib/commonjs/components/IconButton.js +22 -5
- package/lib/commonjs/components/Layout.js +40 -19
- package/lib/commonjs/components/NumberInput.js +13 -2
- package/lib/commonjs/components/Picker/PickerComponent.web.js +24 -5
- package/lib/commonjs/components/Portal/PortalConsumer.js +10 -8
- package/lib/commonjs/components/Portal/PortalHost.js +27 -15
- package/lib/commonjs/components/Portal/PortalManager.js +19 -11
- package/lib/commonjs/components/ProgressBar.js +23 -7
- package/lib/commonjs/components/RadioButton/RadioButton.js +14 -3
- package/lib/commonjs/components/RadioButton/RadioButtonRow.js +24 -6
- package/lib/commonjs/components/ScreenContainer.js +23 -5
- package/lib/commonjs/components/Slider.js +24 -5
- package/lib/commonjs/components/StarRating.js +25 -5
- package/lib/commonjs/components/StepIndicator.js +34 -16
- package/lib/commonjs/components/Surface.js +14 -3
- package/lib/commonjs/components/Text.js +37 -11
- package/lib/commonjs/components/TextField.js +63 -30
- package/lib/commonjs/components/ToggleButton.js +18 -3
- package/lib/commonjs/components/Touchable.js +16 -2
- package/lib/commonjs/index.js +0 -14
- package/lib/commonjs/mappings/AudioPlayer.js +32 -2
- package/lib/module/components/Checkbox/context.js +1 -1
- package/lib/module/components/ToggleButton.js +3 -17
- package/lib/module/index.js +0 -1
- package/lib/module/mappings/AudioPlayer.js +33 -3
- package/lib/typescript/src/index.d.ts +0 -1
- package/lib/typescript/src/mappings/AudioPlayer.d.ts +62 -1
- package/package.json +4 -6
- package/src/index.js +0 -1
- package/src/index.tsx +0 -1
- package/src/mappings/AudioPlayer.js +39 -2
- package/src/mappings/AudioPlayer.ts +41 -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.tsx +0 -2
- package/src/mappings/TabView.js +0 -73
- package/src/mappings/TabView.ts +0 -80
|
@@ -13,8 +13,6 @@ var _Touchable = _interopRequireDefault(require("./Touchable"));
|
|
|
13
13
|
|
|
14
14
|
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
|
|
15
15
|
|
|
16
|
-
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); }
|
|
17
|
-
|
|
18
16
|
const getWidth = numColumns => {
|
|
19
17
|
switch (numColumns) {
|
|
20
18
|
case 1:
|
|
@@ -37,6 +35,23 @@ const Card = _ref => {
|
|
|
37
35
|
...rest
|
|
38
36
|
} = _ref;
|
|
39
37
|
const width = getWidth(numColumns);
|
|
38
|
+
return /*#__PURE__*/_react.default.createElement(_Touchable.default, {
|
|
39
|
+
disabled: !onPress,
|
|
40
|
+
onPress: onPress,
|
|
41
|
+
style: [style, {
|
|
42
|
+
width
|
|
43
|
+
}],
|
|
44
|
+
...rest
|
|
45
|
+
}, children);
|
|
46
|
+
};
|
|
47
|
+
|
|
48
|
+
var _default = (0, _theming.withTheme)(Card);
|
|
49
|
+
|
|
50
|
+
exports.default = _default;,
|
|
51
|
+
style,
|
|
52
|
+
...rest
|
|
53
|
+
} = _ref;
|
|
54
|
+
const width = getWidth(numColumns);
|
|
40
55
|
return /*#__PURE__*/_react.default.createElement(_Touchable.default, _extends({
|
|
41
56
|
disabled: !onPress,
|
|
42
57
|
onPress: onPress,
|
|
@@ -27,8 +27,6 @@ function _getRequireWildcardCache(nodeInterop) { if (typeof WeakMap !== "functio
|
|
|
27
27
|
|
|
28
28
|
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; }
|
|
29
29
|
|
|
30
|
-
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); }
|
|
31
|
-
|
|
32
30
|
const FAB = _ref => {
|
|
33
31
|
let {
|
|
34
32
|
Icon,
|
|
@@ -130,7 +128,7 @@ const FAB = _ref => {
|
|
|
130
128
|
style: [{
|
|
131
129
|
elevation
|
|
132
130
|
}, style]
|
|
133
|
-
}, /*#__PURE__*/React.createElement(_Touchable.default,
|
|
131
|
+
}, /*#__PURE__*/React.createElement(_Touchable.default, { ...rest,
|
|
134
132
|
onPress: onPress,
|
|
135
133
|
accessibilityState: {
|
|
136
134
|
disabled
|
|
@@ -138,7 +136,7 @@ const FAB = _ref => {
|
|
|
138
136
|
accessibilityRole: "button",
|
|
139
137
|
disabled: disabled || loading,
|
|
140
138
|
style: buttonStyles
|
|
141
|
-
}
|
|
139
|
+
}, /*#__PURE__*/React.createElement(_reactNative.View, {
|
|
142
140
|
style: styles.content
|
|
143
141
|
}, icon && loading !== true ? /*#__PURE__*/React.createElement(_reactNative.View, {
|
|
144
142
|
style: iconStyle
|
|
@@ -181,4 +179,24 @@ const styles = _reactNative.StyleSheet.create({
|
|
|
181
179
|
|
|
182
180
|
var _default = (0, _theming.withTheme)(FAB);
|
|
183
181
|
|
|
182
|
+
exports.default = _default; "row",
|
|
183
|
+
alignItems: "center",
|
|
184
|
+
justifyContent: "center"
|
|
185
|
+
},
|
|
186
|
+
icon: {
|
|
187
|
+
alignItems: "center",
|
|
188
|
+
justifyContent: "center",
|
|
189
|
+
width: _Config.default.buttonIconSize
|
|
190
|
+
},
|
|
191
|
+
fixed: {
|
|
192
|
+
left: 0,
|
|
193
|
+
right: 0,
|
|
194
|
+
bottom: 0,
|
|
195
|
+
height: 64,
|
|
196
|
+
borderRadius: 0
|
|
197
|
+
}
|
|
198
|
+
});
|
|
199
|
+
|
|
200
|
+
var _default = (0, _theming.withTheme)(FAB);
|
|
201
|
+
|
|
184
202
|
exports.default = _default;
|
|
@@ -15,8 +15,6 @@ function _getRequireWildcardCache(nodeInterop) { if (typeof WeakMap !== "functio
|
|
|
15
15
|
|
|
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
17
|
|
|
18
|
-
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); }
|
|
19
|
-
|
|
20
18
|
const Divider = _ref => {
|
|
21
19
|
let {
|
|
22
20
|
style,
|
|
@@ -26,6 +24,22 @@ const Divider = _ref => {
|
|
|
26
24
|
},
|
|
27
25
|
...rest
|
|
28
26
|
} = _ref;
|
|
27
|
+
return /*#__PURE__*/React.createElement(_reactNative.View, {
|
|
28
|
+
style: [{
|
|
29
|
+
backgroundColor: color || colors.divider,
|
|
30
|
+
height: _reactNative.StyleSheet.hairlineWidth
|
|
31
|
+
}, style],
|
|
32
|
+
...rest
|
|
33
|
+
});
|
|
34
|
+
};
|
|
35
|
+
|
|
36
|
+
var _default = (0, _theming.withTheme)(Divider);
|
|
37
|
+
|
|
38
|
+
exports.default = _default;me: {
|
|
39
|
+
colors
|
|
40
|
+
},
|
|
41
|
+
...rest
|
|
42
|
+
} = _ref;
|
|
29
43
|
return /*#__PURE__*/React.createElement(_reactNative.View, _extends({
|
|
30
44
|
style: [{
|
|
31
45
|
backgroundColor: color || colors.divider,
|
|
@@ -15,8 +15,6 @@ function _getRequireWildcardCache(nodeInterop) { if (typeof WeakMap !== "functio
|
|
|
15
15
|
|
|
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
17
|
|
|
18
|
-
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); }
|
|
19
|
-
|
|
20
18
|
const FAB = _ref => {
|
|
21
19
|
let {
|
|
22
20
|
onPress,
|
|
@@ -40,7 +38,7 @@ const FAB = _ref => {
|
|
|
40
38
|
borderRadius: size / 2,
|
|
41
39
|
overflow: "hidden"
|
|
42
40
|
}, style]
|
|
43
|
-
}, /*#__PURE__*/React.createElement(_reactNative.Pressable,
|
|
41
|
+
}, /*#__PURE__*/React.createElement(_reactNative.Pressable, {
|
|
44
42
|
onPress: onPress,
|
|
45
43
|
disabled: loading || disabled,
|
|
46
44
|
android_ripple: {
|
|
@@ -58,8 +56,9 @@ const FAB = _ref => {
|
|
|
58
56
|
borderRadius: size / 2,
|
|
59
57
|
backgroundColor
|
|
60
58
|
}];
|
|
61
|
-
}
|
|
62
|
-
|
|
59
|
+
},
|
|
60
|
+
...props
|
|
61
|
+
}, /*#__PURE__*/React.createElement(_reactNative.View, null, loading ? /*#__PURE__*/React.createElement(_reactNative.ActivityIndicator, {
|
|
63
62
|
style: size > 50 ? {
|
|
64
63
|
marginTop: 2,
|
|
65
64
|
marginLeft: 2
|
|
@@ -89,4 +88,20 @@ const styles = _reactNative.StyleSheet.create({
|
|
|
89
88
|
|
|
90
89
|
var _default = (0, _theming.withTheme)(FAB);
|
|
91
90
|
|
|
91
|
+
exports.default = _default;styles = _reactNative.StyleSheet.create({
|
|
92
|
+
button: {
|
|
93
|
+
backgroundColor: "#5a45ff",
|
|
94
|
+
justifyContent: "center",
|
|
95
|
+
alignItems: "center",
|
|
96
|
+
..._reactNative.Platform.select({
|
|
97
|
+
web: {
|
|
98
|
+
cursor: "pointer",
|
|
99
|
+
userSelect: "none"
|
|
100
|
+
}
|
|
101
|
+
})
|
|
102
|
+
}
|
|
103
|
+
});
|
|
104
|
+
|
|
105
|
+
var _default = (0, _theming.withTheme)(FAB);
|
|
106
|
+
|
|
92
107
|
exports.default = _default;
|
|
@@ -19,8 +19,6 @@ 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
|
-
|
|
24
22
|
function FormRow(_ref) {
|
|
25
23
|
let {
|
|
26
24
|
disabled,
|
|
@@ -35,11 +33,27 @@ function FormRow(_ref) {
|
|
|
35
33
|
textStyles,
|
|
36
34
|
viewStyles
|
|
37
35
|
} = (0, _utilities.extractStyles)(style);
|
|
38
|
-
return /*#__PURE__*/React.createElement(_Touchable.default,
|
|
36
|
+
return /*#__PURE__*/React.createElement(_Touchable.default, {
|
|
39
37
|
disabled: disabled,
|
|
40
38
|
onPress: onPress,
|
|
41
39
|
style: [styles.row, {
|
|
42
40
|
flexDirection: direction
|
|
41
|
+
}, viewStyles],
|
|
42
|
+
...rest
|
|
43
|
+
}, /*#__PURE__*/React.createElement(_reactNative.Text, {
|
|
44
|
+
style: textStyles
|
|
45
|
+
}, label), children);
|
|
46
|
+
}
|
|
47
|
+
|
|
48
|
+
const styles = _reactNative.StyleSheet.create({
|
|
49
|
+
row: {
|
|
50
|
+
marginLeft: 8,
|
|
51
|
+
marginRight: 8,
|
|
52
|
+
flexDirection: "row",
|
|
53
|
+
justifyContent: "space-between",
|
|
54
|
+
alignItems: "center"
|
|
55
|
+
}
|
|
56
|
+
});rection: direction
|
|
43
57
|
}, viewStyles]
|
|
44
58
|
}, rest), /*#__PURE__*/React.createElement(_reactNative.Text, {
|
|
45
59
|
style: textStyles
|
|
@@ -15,8 +15,6 @@ function _getRequireWildcardCache(nodeInterop) { if (typeof WeakMap !== "functio
|
|
|
15
15
|
|
|
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
17
|
|
|
18
|
-
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); }
|
|
19
|
-
|
|
20
18
|
const IconButton = _ref => {
|
|
21
19
|
let {
|
|
22
20
|
Icon,
|
|
@@ -31,7 +29,7 @@ const IconButton = _ref => {
|
|
|
31
29
|
...props
|
|
32
30
|
} = _ref;
|
|
33
31
|
const iconColor = customColor || theme.colors.primary;
|
|
34
|
-
return /*#__PURE__*/React.createElement(_reactNative.Pressable,
|
|
32
|
+
return /*#__PURE__*/React.createElement(_reactNative.Pressable, {
|
|
35
33
|
onPress: onPress,
|
|
36
34
|
disabled: disabled || loading,
|
|
37
35
|
style: _ref2 => {
|
|
@@ -45,8 +43,9 @@ const IconButton = _ref => {
|
|
|
45
43
|
alignItems: "center",
|
|
46
44
|
justifyContent: "center"
|
|
47
45
|
}, style];
|
|
48
|
-
}
|
|
49
|
-
|
|
46
|
+
},
|
|
47
|
+
...props
|
|
48
|
+
}, /*#__PURE__*/React.createElement(_reactNative.View, null, icon && !loading ? /*#__PURE__*/React.createElement(Icon, {
|
|
50
49
|
name: icon,
|
|
51
50
|
size: size - 2,
|
|
52
51
|
color: iconColor
|
|
@@ -71,4 +70,22 @@ const styles = _reactNative.StyleSheet.create({
|
|
|
71
70
|
|
|
72
71
|
var _default = (0, _theming.withTheme)(IconButton);
|
|
73
72
|
|
|
73
|
+
exports.default = _default;) : null));
|
|
74
|
+
};
|
|
75
|
+
|
|
76
|
+
const styles = _reactNative.StyleSheet.create({
|
|
77
|
+
container: {
|
|
78
|
+
alignItems: "center",
|
|
79
|
+
justifyContent: "center",
|
|
80
|
+
..._reactNative.Platform.select({
|
|
81
|
+
web: {
|
|
82
|
+
cursor: "pointer",
|
|
83
|
+
userSelect: "none"
|
|
84
|
+
}
|
|
85
|
+
})
|
|
86
|
+
}
|
|
87
|
+
});
|
|
88
|
+
|
|
89
|
+
var _default = (0, _theming.withTheme)(IconButton);
|
|
90
|
+
|
|
74
91
|
exports.default = _default;
|
|
@@ -18,8 +18,6 @@ function _getRequireWildcardCache(nodeInterop) { if (typeof WeakMap !== "functio
|
|
|
18
18
|
|
|
19
19
|
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; }
|
|
20
20
|
|
|
21
|
-
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); }
|
|
22
|
-
|
|
23
21
|
function Center(_ref) {
|
|
24
22
|
let {
|
|
25
23
|
width = 240,
|
|
@@ -29,15 +27,16 @@ function Center(_ref) {
|
|
|
29
27
|
style,
|
|
30
28
|
...rest
|
|
31
29
|
} = _ref;
|
|
32
|
-
return /*#__PURE__*/React.createElement(_reactNative.View,
|
|
30
|
+
return /*#__PURE__*/React.createElement(_reactNative.View, {
|
|
33
31
|
style: [{
|
|
34
32
|
justifyContent: "center",
|
|
35
33
|
alignItems: "center",
|
|
36
34
|
width,
|
|
37
35
|
height,
|
|
38
36
|
backgroundColor: bgColor
|
|
39
|
-
}, style]
|
|
40
|
-
|
|
37
|
+
}, style],
|
|
38
|
+
...rest
|
|
39
|
+
}, children);
|
|
41
40
|
}
|
|
42
41
|
|
|
43
42
|
function Circle(_ref2) {
|
|
@@ -49,7 +48,7 @@ function Circle(_ref2) {
|
|
|
49
48
|
...rest
|
|
50
49
|
} = _ref2;
|
|
51
50
|
const borderRadius = 1000;
|
|
52
|
-
return /*#__PURE__*/React.createElement(Center,
|
|
51
|
+
return /*#__PURE__*/React.createElement(Center, {
|
|
53
52
|
width: size,
|
|
54
53
|
height: size,
|
|
55
54
|
bgColor: bgColor,
|
|
@@ -57,8 +56,9 @@ function Circle(_ref2) {
|
|
|
57
56
|
backgroundColor: bgColor,
|
|
58
57
|
borderRadius,
|
|
59
58
|
overflow: "hidden"
|
|
60
|
-
}]
|
|
61
|
-
|
|
59
|
+
}],
|
|
60
|
+
...rest
|
|
61
|
+
}, children);
|
|
62
62
|
}
|
|
63
63
|
|
|
64
64
|
function Square(_ref3) {
|
|
@@ -69,12 +69,13 @@ function Square(_ref3) {
|
|
|
69
69
|
style,
|
|
70
70
|
...rest
|
|
71
71
|
} = _ref3;
|
|
72
|
-
return /*#__PURE__*/React.createElement(Center,
|
|
72
|
+
return /*#__PURE__*/React.createElement(Center, {
|
|
73
73
|
style: style,
|
|
74
74
|
width: size,
|
|
75
75
|
height: size,
|
|
76
|
-
bgColor: bgColor
|
|
77
|
-
|
|
76
|
+
bgColor: bgColor,
|
|
77
|
+
...rest
|
|
78
|
+
}, children);
|
|
78
79
|
}
|
|
79
80
|
|
|
80
81
|
function Row(_ref4) {
|
|
@@ -85,14 +86,14 @@ function Row(_ref4) {
|
|
|
85
86
|
style,
|
|
86
87
|
...rest
|
|
87
88
|
} = _ref4;
|
|
88
|
-
return /*#__PURE__*/React.createElement(_reactNative.View,
|
|
89
|
-
style: [style,
|
|
90
|
-
{
|
|
89
|
+
return /*#__PURE__*/React.createElement(_reactNative.View, {
|
|
90
|
+
style: [style, {
|
|
91
91
|
alignItems,
|
|
92
92
|
flexDirection: "row",
|
|
93
93
|
justifyContent: justifyContent
|
|
94
|
-
}]
|
|
95
|
-
|
|
94
|
+
}],
|
|
95
|
+
...rest
|
|
96
|
+
}, children);
|
|
96
97
|
}
|
|
97
98
|
|
|
98
99
|
function Spacer(_ref5) {
|
|
@@ -105,17 +106,37 @@ function Spacer(_ref5) {
|
|
|
105
106
|
style,
|
|
106
107
|
...rest
|
|
107
108
|
} = _ref5;
|
|
108
|
-
return /*#__PURE__*/React.createElement(_reactNative.View,
|
|
109
|
+
return /*#__PURE__*/React.createElement(_reactNative.View, {
|
|
109
110
|
style: [style, {
|
|
110
111
|
paddingRight: right,
|
|
111
112
|
paddingTop: top,
|
|
112
113
|
paddingLeft: left,
|
|
113
114
|
paddingBottom: bottom
|
|
114
|
-
}]
|
|
115
|
-
|
|
115
|
+
}],
|
|
116
|
+
...rest
|
|
117
|
+
}, children);
|
|
116
118
|
}
|
|
117
119
|
|
|
118
120
|
function Stack(_ref6) {
|
|
121
|
+
let {
|
|
122
|
+
children,
|
|
123
|
+
justifyContent = "flex-start",
|
|
124
|
+
alignItems = "flex-start",
|
|
125
|
+
style,
|
|
126
|
+
...rest
|
|
127
|
+
} = _ref6;
|
|
128
|
+
return (
|
|
129
|
+
/*#__PURE__*/
|
|
130
|
+
// style must go first since we don't want justifyContent, alignItems overridden
|
|
131
|
+
React.createElement(_reactNative.View, {
|
|
132
|
+
style: [style, {
|
|
133
|
+
justifyContent,
|
|
134
|
+
alignItems
|
|
135
|
+
}],
|
|
136
|
+
...rest
|
|
137
|
+
}, children)
|
|
138
|
+
);
|
|
139
|
+
}ck(_ref6) {
|
|
119
140
|
let {
|
|
120
141
|
children,
|
|
121
142
|
justifyContent = "flex-start",
|
|
@@ -15,8 +15,6 @@ function _getRequireWildcardCache(nodeInterop) { if (typeof WeakMap !== "functio
|
|
|
15
15
|
|
|
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
17
|
|
|
18
|
-
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); }
|
|
19
|
-
|
|
20
18
|
const NumberInput = _ref => {
|
|
21
19
|
let {
|
|
22
20
|
onChangeText,
|
|
@@ -69,6 +67,19 @@ const NumberInput = _ref => {
|
|
|
69
67
|
handleChangeText(nextStringNumberValue);
|
|
70
68
|
} // eslint-disable-next-line react-hooks/exhaustive-deps
|
|
71
69
|
|
|
70
|
+
}, [value]);
|
|
71
|
+
return /*#__PURE__*/_react.default.createElement(_reactNative.TextInput, {
|
|
72
|
+
keyboardType: "numeric",
|
|
73
|
+
value: currentStringNumberValue,
|
|
74
|
+
onChangeText: handleChangeText,
|
|
75
|
+
...props
|
|
76
|
+
});
|
|
77
|
+
};
|
|
78
|
+
|
|
79
|
+
var _default = NumberInput;
|
|
80
|
+
exports.default = _default;lue);
|
|
81
|
+
} // eslint-disable-next-line react-hooks/exhaustive-deps
|
|
82
|
+
|
|
72
83
|
}, [value]);
|
|
73
84
|
return /*#__PURE__*/_react.default.createElement(_reactNative.TextInput, _extends({
|
|
74
85
|
keyboardType: "numeric",
|
|
@@ -27,11 +27,7 @@ function _getRequireWildcardCache(nodeInterop) { if (typeof WeakMap !== "functio
|
|
|
27
27
|
|
|
28
28
|
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; }
|
|
29
29
|
|
|
30
|
-
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); }
|
|
31
|
-
|
|
32
30
|
const Picker = _ref => {
|
|
33
|
-
var _options$find$label, _options$find;
|
|
34
|
-
|
|
35
31
|
let {
|
|
36
32
|
style,
|
|
37
33
|
options,
|
|
@@ -41,6 +37,9 @@ const Picker = _ref => {
|
|
|
41
37
|
onValueChange: onValueChangeOverride = () => {},
|
|
42
38
|
...props
|
|
43
39
|
} = _ref;
|
|
40
|
+
|
|
41
|
+
var _a, _b;
|
|
42
|
+
|
|
44
43
|
const {
|
|
45
44
|
viewStyles: {
|
|
46
45
|
borderRadius,
|
|
@@ -87,7 +86,7 @@ const Picker = _ref => {
|
|
|
87
86
|
};
|
|
88
87
|
|
|
89
88
|
const stylesWithoutMargin = style && (0, _lodash.default)(_reactNative.StyleSheet.flatten(style), ["margin", "marginTop", "marginRight", "marginBottom", "marginLeft"]);
|
|
90
|
-
const selectedLabel = selectedValue && ((
|
|
89
|
+
const selectedLabel = selectedValue && ((_b = (_a = options.find(o => o.value === selectedValue)) === null || _a === void 0 ? void 0 : _a.label) !== null && _b !== void 0 ? _b : selectedValue);
|
|
91
90
|
return /*#__PURE__*/React.createElement(_Touchable.default, {
|
|
92
91
|
disabled: disabled,
|
|
93
92
|
onPress: toggleFocus,
|
|
@@ -112,6 +111,26 @@ const Picker = _ref => {
|
|
|
112
111
|
key: o.value
|
|
113
112
|
}))), /*#__PURE__*/React.createElement(_reactNative.View, {
|
|
114
113
|
pointerEvents: "none"
|
|
114
|
+
}, /*#__PURE__*/React.createElement(_TextField.default, { ...props,
|
|
115
|
+
value: selectedLabel,
|
|
116
|
+
placeholder: placeholder,
|
|
117
|
+
// @ts-ignore
|
|
118
|
+
ref: textField,
|
|
119
|
+
disabled: disabled,
|
|
120
|
+
// @ts-expect-error
|
|
121
|
+
style: stylesWithoutMargin
|
|
122
|
+
}))));
|
|
123
|
+
};
|
|
124
|
+
|
|
125
|
+
const styles = _reactNative.StyleSheet.create({
|
|
126
|
+
container: {
|
|
127
|
+
alignSelf: "stretch"
|
|
128
|
+
}
|
|
129
|
+
});
|
|
130
|
+
|
|
131
|
+
var _default = (0, _theming.withTheme)(Picker);
|
|
132
|
+
|
|
133
|
+
exports.default = _default; pointerEvents: "none"
|
|
115
134
|
}, /*#__PURE__*/React.createElement(_TextField.default, _extends({}, props, {
|
|
116
135
|
value: selectedLabel,
|
|
117
136
|
placeholder: placeholder // @ts-ignore
|
|
@@ -11,15 +11,7 @@ function _getRequireWildcardCache(nodeInterop) { if (typeof WeakMap !== "functio
|
|
|
11
11
|
|
|
12
12
|
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; }
|
|
13
13
|
|
|
14
|
-
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; }
|
|
15
|
-
|
|
16
14
|
class PortalConsumer extends React.Component {
|
|
17
|
-
constructor() {
|
|
18
|
-
super(...arguments);
|
|
19
|
-
|
|
20
|
-
_defineProperty(this, "key", void 0);
|
|
21
|
-
}
|
|
22
|
-
|
|
23
15
|
async componentDidMount() {
|
|
24
16
|
this.checkManager(); // Delay updating to prevent React from going to infinite loop
|
|
25
17
|
|
|
@@ -49,4 +41,14 @@ class PortalConsumer extends React.Component {
|
|
|
49
41
|
|
|
50
42
|
}
|
|
51
43
|
|
|
44
|
+
exports.default = PortalConsumer;er` component from `react-native-paper`.\n\n" + "Please read our getting-started guide and make sure you've followed all the required steps.\n\n" + "https://callstack.github.io/react-native-paper/getting-started.html");
|
|
45
|
+
}
|
|
46
|
+
}
|
|
47
|
+
|
|
48
|
+
render() {
|
|
49
|
+
return null;
|
|
50
|
+
}
|
|
51
|
+
|
|
52
|
+
}
|
|
53
|
+
|
|
52
54
|
exports.default = PortalConsumer;
|
|
@@ -17,8 +17,6 @@ function _getRequireWildcardCache(nodeInterop) { if (typeof WeakMap !== "functio
|
|
|
17
17
|
|
|
18
18
|
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; }
|
|
19
19
|
|
|
20
|
-
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; }
|
|
21
|
-
|
|
22
20
|
const PortalContext = /*#__PURE__*/React.createContext(null);
|
|
23
21
|
/**
|
|
24
22
|
* Portal host renders all of its children `Portal` elements.
|
|
@@ -51,11 +49,11 @@ class PortalHost extends React.Component {
|
|
|
51
49
|
constructor() {
|
|
52
50
|
super(...arguments);
|
|
53
51
|
|
|
54
|
-
|
|
52
|
+
this.setManager = manager => {
|
|
55
53
|
this.manager = manager;
|
|
56
|
-
}
|
|
54
|
+
};
|
|
57
55
|
|
|
58
|
-
|
|
56
|
+
this.mount = children => {
|
|
59
57
|
const key = this.nextKey++;
|
|
60
58
|
|
|
61
59
|
if (this.manager) {
|
|
@@ -69,9 +67,9 @@ class PortalHost extends React.Component {
|
|
|
69
67
|
}
|
|
70
68
|
|
|
71
69
|
return key;
|
|
72
|
-
}
|
|
70
|
+
};
|
|
73
71
|
|
|
74
|
-
|
|
72
|
+
this.update = (key, children) => {
|
|
75
73
|
if (this.manager) {
|
|
76
74
|
this.manager.update(key, children);
|
|
77
75
|
} else {
|
|
@@ -89,9 +87,9 @@ class PortalHost extends React.Component {
|
|
|
89
87
|
this.queue.push(op);
|
|
90
88
|
}
|
|
91
89
|
}
|
|
92
|
-
}
|
|
90
|
+
};
|
|
93
91
|
|
|
94
|
-
|
|
92
|
+
this.unmount = key => {
|
|
95
93
|
if (this.manager) {
|
|
96
94
|
this.manager.unmount(key);
|
|
97
95
|
} else {
|
|
@@ -100,13 +98,10 @@ class PortalHost extends React.Component {
|
|
|
100
98
|
key
|
|
101
99
|
});
|
|
102
100
|
}
|
|
103
|
-
}
|
|
104
|
-
|
|
105
|
-
_defineProperty(this, "nextKey", 0);
|
|
106
|
-
|
|
107
|
-
_defineProperty(this, "queue", []);
|
|
101
|
+
};
|
|
108
102
|
|
|
109
|
-
|
|
103
|
+
this.nextKey = 0;
|
|
104
|
+
this.queue = [];
|
|
110
105
|
}
|
|
111
106
|
|
|
112
107
|
componentDidMount() {
|
|
@@ -152,6 +147,23 @@ class PortalHost extends React.Component {
|
|
|
152
147
|
|
|
153
148
|
}
|
|
154
149
|
|
|
150
|
+
exports.default = PortalHost;
|
|
151
|
+
PortalHost.displayName = "Portal.Host";
|
|
152
|
+
|
|
153
|
+
const styles = _reactNative.StyleSheet.create({
|
|
154
|
+
container: {
|
|
155
|
+
flex: 1
|
|
156
|
+
}
|
|
157
|
+
}); style: styles.container,
|
|
158
|
+
collapsable: false,
|
|
159
|
+
pointerEvents: "box-none"
|
|
160
|
+
}, this.props.children), /*#__PURE__*/React.createElement(_PortalManager.default, {
|
|
161
|
+
ref: this.setManager
|
|
162
|
+
}));
|
|
163
|
+
}
|
|
164
|
+
|
|
165
|
+
}
|
|
166
|
+
|
|
155
167
|
exports.default = PortalHost;
|
|
156
168
|
|
|
157
169
|
_defineProperty(PortalHost, "displayName", "Portal.Host");
|
|
@@ -13,29 +13,26 @@ function _getRequireWildcardCache(nodeInterop) { if (typeof WeakMap !== "functio
|
|
|
13
13
|
|
|
14
14
|
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; }
|
|
15
15
|
|
|
16
|
-
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; }
|
|
17
|
-
|
|
18
16
|
/**
|
|
19
17
|
* Portal host is the component which actually renders all Portals.
|
|
20
18
|
*/
|
|
21
19
|
class PortalManager extends React.PureComponent {
|
|
22
20
|
constructor() {
|
|
23
21
|
super(...arguments);
|
|
24
|
-
|
|
25
|
-
_defineProperty(this, "state", {
|
|
22
|
+
this.state = {
|
|
26
23
|
portals: []
|
|
27
|
-
}
|
|
24
|
+
};
|
|
28
25
|
|
|
29
|
-
|
|
26
|
+
this.mount = (key, children) => {
|
|
30
27
|
this.setState(state => ({
|
|
31
28
|
portals: [...state.portals, {
|
|
32
29
|
key,
|
|
33
30
|
children
|
|
34
31
|
}]
|
|
35
32
|
}));
|
|
36
|
-
}
|
|
33
|
+
};
|
|
37
34
|
|
|
38
|
-
|
|
35
|
+
this.update = (key, children) => this.setState(state => ({
|
|
39
36
|
portals: state.portals.map(item => {
|
|
40
37
|
if (item.key === key) {
|
|
41
38
|
return { ...item,
|
|
@@ -45,11 +42,11 @@ class PortalManager extends React.PureComponent {
|
|
|
45
42
|
|
|
46
43
|
return item;
|
|
47
44
|
})
|
|
48
|
-
}))
|
|
45
|
+
}));
|
|
49
46
|
|
|
50
|
-
|
|
47
|
+
this.unmount = key => this.setState(state => ({
|
|
51
48
|
portals: state.portals.filter(item => item.key !== key)
|
|
52
|
-
}))
|
|
49
|
+
}));
|
|
53
50
|
}
|
|
54
51
|
|
|
55
52
|
render() {
|
|
@@ -71,4 +68,15 @@ class PortalManager extends React.PureComponent {
|
|
|
71
68
|
|
|
72
69
|
}
|
|
73
70
|
|
|
71
|
+
exports.default = PortalManager;le: false
|
|
72
|
+
/* Need collapsable=false here to clip the elevations, otherwise they appear above sibling components */
|
|
73
|
+
,
|
|
74
|
+
pointerEvents: "box-none",
|
|
75
|
+
style: _reactNative.StyleSheet.absoluteFill
|
|
76
|
+
}, children);
|
|
77
|
+
});
|
|
78
|
+
}
|
|
79
|
+
|
|
80
|
+
}
|
|
81
|
+
|
|
74
82
|
exports.default = PortalManager;
|