@draftbit/core 46.2.4-58c73f.0 → 46.2.4-7028ac.5
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/CardContainer.js +15 -5
- package/lib/commonjs/components/CircleImage.js +16 -2
- package/lib/commonjs/components/Config.js +1 -0
- package/lib/commonjs/components/DeprecatedButton.js +22 -4
- package/lib/commonjs/components/IconButton.js +22 -5
- package/lib/commonjs/components/Image.js +16 -3
- package/lib/commonjs/components/Portal/Portal.js +12 -3
- package/lib/commonjs/components/Portal/PortalConsumer.js +10 -8
- package/lib/commonjs/components/RadioButton/RadioButtonRow.js +24 -6
- package/lib/commonjs/components/RadioButton/context.js +1 -1
- package/lib/commonjs/components/SVG.js +48 -0
- package/lib/commonjs/components/StarRating.js +1 -0
- package/lib/commonjs/components/Switch.js +23 -10
- package/lib/commonjs/components/TextField.js +2 -1
- package/lib/commonjs/constants.js +2 -2
- package/lib/commonjs/index.js +8 -14
- package/lib/commonjs/mappings/Image.js +2 -2
- package/lib/commonjs/mappings/MapView.js +1 -0
- package/lib/commonjs/mappings/NumberInput.js +146 -149
- package/lib/commonjs/mappings/SVG.js +25 -0
- package/lib/commonjs/mappings/TextArea.js +188 -193
- package/lib/commonjs/mappings/TextField.js +7 -8
- package/lib/commonjs/mappings/TextInput.js +178 -180
- package/lib/module/components/Banner.js +24 -4
- package/lib/module/components/CardBlock.js +15 -5
- package/lib/module/components/Checkbox/CheckboxGroup.js +17 -3
- package/lib/module/components/Config.js +1 -0
- package/lib/module/components/DeprecatedCardWrapper.js +19 -2
- package/lib/module/components/IconButton.js +22 -5
- package/lib/module/components/Picker/PickerComponent.android.js +23 -5
- package/lib/module/components/Picker/PickerComponent.web.js +23 -5
- package/lib/module/components/ProgressBar.js +23 -7
- package/lib/module/components/SVG.js +31 -0
- package/lib/module/components/StarRating.js +25 -5
- package/lib/module/components/Surface.js +16 -2
- package/lib/module/components/Text.js +33 -10
- package/lib/module/components/TextField.js +64 -31
- package/lib/module/components/Touchable.js +18 -2
- package/lib/module/constants.js +1 -0
- package/lib/module/index.js +1 -1
- package/lib/module/mappings/Image.js +2 -2
- package/lib/module/mappings/MapView.js +1 -0
- package/lib/module/mappings/NumberInput.js +146 -149
- package/lib/module/mappings/SVG.js +16 -0
- package/lib/module/mappings/TextArea.js +188 -193
- package/lib/module/mappings/TextField.js +7 -8
- package/lib/module/mappings/TextInput.js +178 -180
- package/lib/typescript/src/components/Config.d.ts +1 -0
- package/lib/typescript/src/components/SVG.d.ts +8 -0
- package/lib/typescript/src/components/TextField.d.ts +1 -0
- package/lib/typescript/src/index.d.ts +1 -1
- package/lib/typescript/src/mappings/MapView.d.ts +1 -0
- package/lib/typescript/src/mappings/SVG.d.ts +24 -0
- package/lib/typescript/src/mappings/TextArea.d.ts +42 -42
- package/lib/typescript/src/mappings/TextField.d.ts +120 -110
- package/package.json +4 -5
- package/src/components/Config.js +1 -0
- package/src/components/Config.ts +1 -0
- package/src/components/SVG.js +13 -0
- package/src/components/SVG.tsx +35 -0
- package/src/components/StarRating.js +1 -0
- package/src/components/StarRating.tsx +1 -0
- package/src/components/TextField.js +2 -2
- package/src/components/TextField.tsx +3 -1
- package/src/index.js +1 -1
- package/src/index.tsx +1 -1
- package/src/mappings/Image.js +2 -2
- package/src/mappings/Image.ts +2 -2
- package/src/mappings/MapView.js +1 -0
- package/src/mappings/MapView.ts +1 -0
- package/src/mappings/NumberInput.js +160 -163
- package/src/mappings/NumberInput.ts +165 -168
- package/src/mappings/SVG.js +21 -0
- package/src/mappings/SVG.ts +26 -0
- package/src/mappings/TextArea.js +213 -220
- package/src/mappings/TextArea.ts +219 -227
- package/src/mappings/TextField.js +6 -9
- package/src/mappings/TextField.ts +7 -11
- package/src/mappings/TextInput.js +205 -208
- package/src/mappings/TextInput.ts +212 -215
- 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
|
@@ -23,8 +23,6 @@ var _Config = _interopRequireDefault(require("./Config"));
|
|
|
23
23
|
|
|
24
24
|
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
|
|
25
25
|
|
|
26
|
-
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); }
|
|
27
|
-
|
|
28
26
|
const ICON_CONTAINER_SIZE = _Config.default.cardIconSize * 2;
|
|
29
27
|
const ICON_CONTAINER_PADDING = _Config.default.cardIconSize / 2 - 1;
|
|
30
28
|
|
|
@@ -68,11 +66,12 @@ const CardContainer = _ref => {
|
|
|
68
66
|
break;
|
|
69
67
|
}
|
|
70
68
|
|
|
71
|
-
return /*#__PURE__*/_react.default.createElement(_DeprecatedCardWrapper.default,
|
|
69
|
+
return /*#__PURE__*/_react.default.createElement(_DeprecatedCardWrapper.default, {
|
|
72
70
|
style: style,
|
|
73
71
|
onPress: onPress,
|
|
74
|
-
numColumns: numColumns
|
|
75
|
-
|
|
72
|
+
numColumns: numColumns,
|
|
73
|
+
...rest
|
|
74
|
+
}, /*#__PURE__*/_react.default.createElement(_Elevation.default, {
|
|
76
75
|
style: {
|
|
77
76
|
elevation,
|
|
78
77
|
borderRadius: roundness
|
|
@@ -144,4 +143,15 @@ const CardContainer = _ref => {
|
|
|
144
143
|
|
|
145
144
|
var _default = (0, _theming.withTheme)(CardContainer);
|
|
146
145
|
|
|
146
|
+
exports.default = _default;, _color.default)(colors.strong).alpha(_Config.default.cardIconBackgroundOpacity).rgb().string()
|
|
147
|
+
}
|
|
148
|
+
}, /*#__PURE__*/_react.default.createElement(Icon, {
|
|
149
|
+
name: icon,
|
|
150
|
+
size: _Config.default.cardIconSize,
|
|
151
|
+
color: colors.surface
|
|
152
|
+
})) : null)));
|
|
153
|
+
};
|
|
154
|
+
|
|
155
|
+
var _default = (0, _theming.withTheme)(CardContainer);
|
|
156
|
+
|
|
147
157
|
exports.default = _default;
|
|
@@ -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 _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); }
|
|
21
|
-
|
|
22
20
|
const CircleImage = _ref => {
|
|
23
21
|
let {
|
|
24
22
|
source = _Config.default.placeholderImageURL,
|
|
@@ -27,6 +25,22 @@ const CircleImage = _ref => {
|
|
|
27
25
|
...props
|
|
28
26
|
} = _ref;
|
|
29
27
|
const borderRadius = size / 2;
|
|
28
|
+
return /*#__PURE__*/React.createElement(_reactNative.Image, {
|
|
29
|
+
style: [{
|
|
30
|
+
width: size,
|
|
31
|
+
height: size,
|
|
32
|
+
borderRadius
|
|
33
|
+
}, style],
|
|
34
|
+
source: typeof source === "string" ? {
|
|
35
|
+
uri: source
|
|
36
|
+
} : source,
|
|
37
|
+
resizeMode: "cover",
|
|
38
|
+
...props
|
|
39
|
+
});
|
|
40
|
+
};
|
|
41
|
+
|
|
42
|
+
var _default = CircleImage;
|
|
43
|
+
exports.default = _default;size / 2;
|
|
30
44
|
return /*#__PURE__*/React.createElement(_reactNative.Image, _extends({
|
|
31
45
|
style: [{
|
|
32
46
|
width: size,
|
|
@@ -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;
|
|
@@ -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;
|
|
@@ -15,8 +15,7 @@ var _AspectRatio = _interopRequireDefault(require("./AspectRatio"));
|
|
|
15
15
|
|
|
16
16
|
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
|
|
17
17
|
|
|
18
|
-
|
|
19
|
-
|
|
18
|
+
/* README: Internal Image component used for stuff like Card. DO NOT EXPORT! */
|
|
20
19
|
const generateDimensions = _ref => {
|
|
21
20
|
let {
|
|
22
21
|
aspectRatio,
|
|
@@ -77,13 +76,27 @@ const Image = _ref2 => {
|
|
|
77
76
|
height,
|
|
78
77
|
aspectRatio
|
|
79
78
|
}]
|
|
80
|
-
}, /*#__PURE__*/_react.default.createElement(_reactNative.Image,
|
|
79
|
+
}, /*#__PURE__*/_react.default.createElement(_reactNative.Image, { ...props,
|
|
81
80
|
source: imageSource,
|
|
82
81
|
resizeMode: resizeMode,
|
|
83
82
|
style: [style, {
|
|
84
83
|
height: "100%",
|
|
85
84
|
width: "100%"
|
|
86
85
|
}]
|
|
86
|
+
}));
|
|
87
|
+
}
|
|
88
|
+
|
|
89
|
+
return /*#__PURE__*/_react.default.createElement(_reactNative.Image, { ...props,
|
|
90
|
+
source: source,
|
|
91
|
+
resizeMode: resizeMode,
|
|
92
|
+
style: style
|
|
93
|
+
});
|
|
94
|
+
};
|
|
95
|
+
|
|
96
|
+
var _default = Image;
|
|
97
|
+
exports.default = _default; height: "100%",
|
|
98
|
+
width: "100%"
|
|
99
|
+
}]
|
|
87
100
|
})));
|
|
88
101
|
}
|
|
89
102
|
|
|
@@ -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 _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; }
|
|
23
|
-
|
|
24
22
|
/**
|
|
25
23
|
* Portal allows to render a component at a different place in the parent tree.
|
|
26
24
|
* You can use it to render content which should appear above other elements, similar to `Modal`.
|
|
@@ -43,7 +41,6 @@ function _defineProperty(obj, key, value) { if (key in obj) { Object.definePrope
|
|
|
43
41
|
* ```
|
|
44
42
|
*/
|
|
45
43
|
class Portal extends React.Component {
|
|
46
|
-
// @component ./PortalHost.tsx
|
|
47
44
|
render() {
|
|
48
45
|
const {
|
|
49
46
|
children,
|
|
@@ -56,6 +53,18 @@ class Portal extends React.Component {
|
|
|
56
53
|
}, children)));
|
|
57
54
|
}
|
|
58
55
|
|
|
56
|
+
} // @component ./PortalHost.tsx
|
|
57
|
+
|
|
58
|
+
|
|
59
|
+
Portal.Host = _PortalHost.default;
|
|
60
|
+
|
|
61
|
+
var _default = (0, _theming.withTheme)(Portal);
|
|
62
|
+
|
|
63
|
+
exports.default = _default;URE__*/React.createElement(_theming.ThemeProvider, {
|
|
64
|
+
theme: theme
|
|
65
|
+
}, children)));
|
|
66
|
+
}
|
|
67
|
+
|
|
59
68
|
}
|
|
60
69
|
|
|
61
70
|
_defineProperty(Portal, "Host", _PortalHost.default);
|
|
@@ -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;
|
|
@@ -25,9 +25,7 @@ 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
|
-
|
|
29
|
-
|
|
30
|
-
let Direction;
|
|
28
|
+
var Direction;
|
|
31
29
|
exports.Direction = Direction;
|
|
32
30
|
|
|
33
31
|
(function (Direction) {
|
|
@@ -90,13 +88,14 @@ const RadioButtonRow = _ref => {
|
|
|
90
88
|
textStyles,
|
|
91
89
|
viewStyles
|
|
92
90
|
} = (0, _utilities.extractStyles)(style);
|
|
93
|
-
return /*#__PURE__*/React.createElement(_Touchable.default,
|
|
91
|
+
return /*#__PURE__*/React.createElement(_Touchable.default, {
|
|
94
92
|
onPress: handlePress,
|
|
95
93
|
style: [styles.mainParent, {
|
|
96
94
|
flexDirection: direction
|
|
97
95
|
}, viewStyles],
|
|
98
|
-
disabled: disabled
|
|
99
|
-
|
|
96
|
+
disabled: disabled,
|
|
97
|
+
...rest
|
|
98
|
+
}, /*#__PURE__*/React.createElement(_reactNative.View, {
|
|
100
99
|
style: [styles.label, {
|
|
101
100
|
alignItems: direction === Direction.Row ? "flex-start" : "flex-end"
|
|
102
101
|
}, labelContainerStyle]
|
|
@@ -135,5 +134,24 @@ const styles = _reactNative.StyleSheet.create({
|
|
|
135
134
|
}
|
|
136
135
|
});
|
|
137
136
|
|
|
137
|
+
var _default = RadioButtonRow;
|
|
138
|
+
exports.default = _default; "center",
|
|
139
|
+
justifyContent: "space-around",
|
|
140
|
+
paddingStart: 20,
|
|
141
|
+
minHeight: 50,
|
|
142
|
+
paddingEnd: 20,
|
|
143
|
+
display: "flex",
|
|
144
|
+
..._reactNative.Platform.select({
|
|
145
|
+
web: {
|
|
146
|
+
cursor: "pointer",
|
|
147
|
+
userSelect: "none"
|
|
148
|
+
}
|
|
149
|
+
})
|
|
150
|
+
},
|
|
151
|
+
label: {
|
|
152
|
+
flex: 3
|
|
153
|
+
}
|
|
154
|
+
});
|
|
155
|
+
|
|
138
156
|
var _default = RadioButtonRow;
|
|
139
157
|
exports.default = _default;
|
|
@@ -0,0 +1,48 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
Object.defineProperty(exports, "__esModule", {
|
|
4
|
+
value: true
|
|
5
|
+
});
|
|
6
|
+
exports.default = void 0;
|
|
7
|
+
|
|
8
|
+
var React = _interopRequireWildcard(require("react"));
|
|
9
|
+
|
|
10
|
+
var _reactNative = require("react-native");
|
|
11
|
+
|
|
12
|
+
var _reactNativeSvg = require("react-native-svg");
|
|
13
|
+
|
|
14
|
+
var _Config = _interopRequireDefault(require("./Config"));
|
|
15
|
+
|
|
16
|
+
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
|
|
17
|
+
|
|
18
|
+
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); }
|
|
19
|
+
|
|
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
|
+
|
|
22
|
+
const SVG = _ref => {
|
|
23
|
+
let {
|
|
24
|
+
source = _Config.default.placeholderSvgURL,
|
|
25
|
+
style
|
|
26
|
+
} = _ref;
|
|
27
|
+
return /*#__PURE__*/React.createElement(React.Fragment, null, _reactNative.Platform.OS === "ios" && /*#__PURE__*/React.createElement(_reactNative.View, {
|
|
28
|
+
style: style
|
|
29
|
+
}, /*#__PURE__*/React.createElement(_reactNativeSvg.SvgUri, {
|
|
30
|
+
width: "100%",
|
|
31
|
+
height: "100%",
|
|
32
|
+
uri: source
|
|
33
|
+
})), _reactNative.Platform.OS === "android" && /*#__PURE__*/React.createElement(_reactNative.View, {
|
|
34
|
+
style: style
|
|
35
|
+
}, /*#__PURE__*/React.createElement(_reactNativeSvg.SvgUri, {
|
|
36
|
+
width: "100%",
|
|
37
|
+
height: "100%",
|
|
38
|
+
uri: source
|
|
39
|
+
})), _reactNative.Platform.OS === "web" && /*#__PURE__*/React.createElement(_reactNative.Image, {
|
|
40
|
+
style: style,
|
|
41
|
+
source: {
|
|
42
|
+
uri: source
|
|
43
|
+
}
|
|
44
|
+
}));
|
|
45
|
+
};
|
|
46
|
+
|
|
47
|
+
var _default = SVG;
|
|
48
|
+
exports.default = _default;
|
|
@@ -23,8 +23,6 @@ function _getRequireWildcardCache(nodeInterop) { if (typeof WeakMap !== "functio
|
|
|
23
23
|
|
|
24
24
|
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; }
|
|
25
25
|
|
|
26
|
-
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); }
|
|
27
|
-
|
|
28
26
|
function Switch(_ref) {
|
|
29
27
|
let {
|
|
30
28
|
value,
|
|
@@ -57,23 +55,24 @@ function Switch(_ref) {
|
|
|
57
55
|
setChecked(Boolean(defaultValue));
|
|
58
56
|
}
|
|
59
57
|
}, [defaultValue, previousDefaultValue]);
|
|
60
|
-
return /*#__PURE__*/React.createElement(_reactNative.Switch,
|
|
58
|
+
return /*#__PURE__*/React.createElement(_reactNative.Switch, {
|
|
61
59
|
value: checked,
|
|
62
60
|
disabled: disabled,
|
|
63
61
|
trackColor: {
|
|
64
62
|
false: inactiveTrackThemeColor,
|
|
65
63
|
true: activeTrackThemeColor
|
|
66
64
|
},
|
|
67
|
-
thumbColor: value ? activeThumbThemeColor : inactiveThumbThemeColor
|
|
68
|
-
|
|
65
|
+
thumbColor: value ? activeThumbThemeColor : inactiveThumbThemeColor,
|
|
66
|
+
// @ts-ignore react-native-web only
|
|
69
67
|
activeThumbColor: activeThumbThemeColor,
|
|
70
68
|
ios_backgroundColor: inactiveTrackThemeColor,
|
|
71
69
|
style: style,
|
|
72
70
|
onValueChange: bool => {
|
|
73
71
|
setChecked(bool);
|
|
74
72
|
onValueChange && onValueChange(bool);
|
|
75
|
-
}
|
|
76
|
-
|
|
73
|
+
},
|
|
74
|
+
...rest
|
|
75
|
+
});
|
|
77
76
|
}
|
|
78
77
|
|
|
79
78
|
function Row(_ref2) {
|
|
@@ -103,7 +102,7 @@ function Row(_ref2) {
|
|
|
103
102
|
setChecked(defaultValue);
|
|
104
103
|
}
|
|
105
104
|
}, [defaultValue]);
|
|
106
|
-
return /*#__PURE__*/React.createElement(_FormRow.default,
|
|
105
|
+
return /*#__PURE__*/React.createElement(_FormRow.default, {
|
|
107
106
|
disabled: disabled,
|
|
108
107
|
onPress: () => {
|
|
109
108
|
setChecked(!checked);
|
|
@@ -111,8 +110,9 @@ function Row(_ref2) {
|
|
|
111
110
|
},
|
|
112
111
|
label: label,
|
|
113
112
|
direction: direction,
|
|
114
|
-
style: style
|
|
115
|
-
|
|
113
|
+
style: style,
|
|
114
|
+
...rest
|
|
115
|
+
}, /*#__PURE__*/React.createElement(Switch, {
|
|
116
116
|
theme: theme,
|
|
117
117
|
value: checked,
|
|
118
118
|
disabled: disabled,
|
|
@@ -129,4 +129,17 @@ exports.SwitchRow = SwitchRow;
|
|
|
129
129
|
|
|
130
130
|
var _default = (0, _theming.withTheme)(Switch);
|
|
131
131
|
|
|
132
|
+
exports.default = _default;onValueChange,
|
|
133
|
+
activeTrackColor: activeTrackColor,
|
|
134
|
+
inactiveTrackColor: inactiveTrackColor,
|
|
135
|
+
activeThumbColor: activeThumbColor,
|
|
136
|
+
inactiveThumbColor: inactiveThumbColor
|
|
137
|
+
}));
|
|
138
|
+
}
|
|
139
|
+
|
|
140
|
+
const SwitchRow = (0, _theming.withTheme)(Row);
|
|
141
|
+
exports.SwitchRow = SwitchRow;
|
|
142
|
+
|
|
143
|
+
var _default = (0, _theming.withTheme)(Switch);
|
|
144
|
+
|
|
132
145
|
exports.default = _default;
|
|
@@ -193,6 +193,7 @@ class TextField extends React.Component {
|
|
|
193
193
|
rightIconName,
|
|
194
194
|
assistiveText,
|
|
195
195
|
underlineColor: underlineColorProp,
|
|
196
|
+
activeBorderColor: activeBorderColorProp,
|
|
196
197
|
multiline = false,
|
|
197
198
|
numberOfLines = 4,
|
|
198
199
|
style,
|
|
@@ -220,7 +221,7 @@ class TextField extends React.Component {
|
|
|
220
221
|
underlineColor = "transparent";
|
|
221
222
|
backgroundColor = colors.divider;
|
|
222
223
|
} else {
|
|
223
|
-
activeColor = error ? colors.error :
|
|
224
|
+
activeColor = error ? colors.error : activeBorderColorProp;
|
|
224
225
|
placeholderColor = borderColor = colors.light;
|
|
225
226
|
underlineColor = underlineColorProp;
|
|
226
227
|
backgroundColor = colors.background;
|
|
@@ -9,11 +9,11 @@ var _reactNative = require("react-native");
|
|
|
9
9
|
|
|
10
10
|
// @ts-ignore
|
|
11
11
|
const expo = global.__expo;
|
|
12
|
-
const DEFAULT_STATUSBAR_HEIGHT_EXPO = expo
|
|
12
|
+
const DEFAULT_STATUSBAR_HEIGHT_EXPO = (expo === null || expo === void 0 ? void 0 : expo.Constants) ? expo.Constants.statusBarHeight : 0;
|
|
13
13
|
|
|
14
14
|
const APPROX_STATUSBAR_HEIGHT = _reactNative.Platform.select({
|
|
15
15
|
android: DEFAULT_STATUSBAR_HEIGHT_EXPO,
|
|
16
16
|
ios: _reactNative.Platform.Version < 11 ? DEFAULT_STATUSBAR_HEIGHT_EXPO : 0
|
|
17
17
|
});
|
|
18
18
|
|
|
19
|
-
exports.APPROX_STATUSBAR_HEIGHT = APPROX_STATUSBAR_HEIGHT;
|
|
19
|
+
exports.APPROX_STATUSBAR_HEIGHT = APPROX_STATUSBAR_HEIGHT;
|
package/lib/commonjs/index.js
CHANGED
|
@@ -291,6 +291,12 @@ Object.defineProperty(exports, "RowHeadlineImageIcon", {
|
|
|
291
291
|
return _RowHeadlineImageIcon.default;
|
|
292
292
|
}
|
|
293
293
|
});
|
|
294
|
+
Object.defineProperty(exports, "SVG", {
|
|
295
|
+
enumerable: true,
|
|
296
|
+
get: function () {
|
|
297
|
+
return _SVG.default;
|
|
298
|
+
}
|
|
299
|
+
});
|
|
294
300
|
Object.defineProperty(exports, "ScreenContainer", {
|
|
295
301
|
enumerable: true,
|
|
296
302
|
get: function () {
|
|
@@ -363,18 +369,6 @@ Object.defineProperty(exports, "SwitchRow", {
|
|
|
363
369
|
return _Switch.SwitchRow;
|
|
364
370
|
}
|
|
365
371
|
});
|
|
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
372
|
Object.defineProperty(exports, "TextField", {
|
|
379
373
|
enumerable: true,
|
|
380
374
|
get: function () {
|
|
@@ -454,6 +448,8 @@ var _IconButton = _interopRequireDefault(require("./components/IconButton"));
|
|
|
454
448
|
|
|
455
449
|
var _Image = _interopRequireDefault(require("./components/Image"));
|
|
456
450
|
|
|
451
|
+
var _SVG = _interopRequireDefault(require("./components/SVG"));
|
|
452
|
+
|
|
457
453
|
var _NumberInput = _interopRequireDefault(require("./components/NumberInput"));
|
|
458
454
|
|
|
459
455
|
var _ScreenContainer = _interopRequireDefault(require("./components/ScreenContainer"));
|
|
@@ -476,8 +472,6 @@ var _ActionSheet = require("./components/ActionSheet");
|
|
|
476
472
|
|
|
477
473
|
var _Swiper = require("./components/Swiper");
|
|
478
474
|
|
|
479
|
-
var _TabView = require("./components/TabView");
|
|
480
|
-
|
|
481
475
|
var _Layout = require("./components/Layout");
|
|
482
476
|
|
|
483
477
|
var _index = require("./components/RadioButton/index");
|
|
@@ -14,8 +14,8 @@ const SEED_DATA = {
|
|
|
14
14
|
category: _types.COMPONENT_TYPES.media,
|
|
15
15
|
stylesPanelSections: [_types.StylesPanelSections.Size, _types.StylesPanelSections.Margins, _types.StylesPanelSections.Position, _types.StylesPanelSections.Effects],
|
|
16
16
|
layout: {
|
|
17
|
-
width:
|
|
18
|
-
height:
|
|
17
|
+
width: 100,
|
|
18
|
+
height: 100
|
|
19
19
|
},
|
|
20
20
|
props: {
|
|
21
21
|
source: (0, _types.createImageProp)(),
|