@draftbit/core 46.4.2-d0676f.2 → 46.4.3-64fdb2.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/Accordion/AccordionItem.js +25 -5
- package/lib/commonjs/components/CardContainer.js +15 -5
- package/lib/commonjs/components/CircleImage.js +16 -2
- package/lib/commonjs/components/Container.js +17 -5
- package/lib/commonjs/components/DeprecatedFAB.js +22 -4
- package/lib/commonjs/components/Divider.js +16 -2
- package/lib/commonjs/components/NumberInput.js +13 -2
- package/lib/commonjs/components/Picker/PickerComponent.android.js +24 -5
- package/lib/commonjs/components/Picker/PickerComponent.ios.js +42 -13
- package/lib/commonjs/components/ScreenContainer.js +23 -5
- package/lib/commonjs/components/TextField.js +63 -30
- package/lib/commonjs/constants.js +1 -1
- package/lib/commonjs/mappings/Button.js +12 -1
- package/lib/commonjs/mappings/StarRating.js +6 -2
- package/lib/module/components/Portal/PortalHost.js +26 -15
- package/lib/module/components/RadioButton/RadioButton.js +15 -2
- package/lib/module/mappings/Button.js +12 -1
- package/package.json +3 -3
- package/src/mappings/Button.js +22 -1
- package/src/mappings/Button.ts +22 -1
|
@@ -21,8 +21,6 @@ function _getRequireWildcardCache(nodeInterop) { if (typeof WeakMap !== "functio
|
|
|
21
21
|
|
|
22
22
|
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; }
|
|
23
23
|
|
|
24
|
-
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); }
|
|
25
|
-
|
|
26
24
|
const AccordionItem = _ref => {
|
|
27
25
|
let {
|
|
28
26
|
Icon,
|
|
@@ -37,9 +35,10 @@ const AccordionItem = _ref => {
|
|
|
37
35
|
textStyles,
|
|
38
36
|
viewStyles
|
|
39
37
|
} = (0, _utilities.extractStyles)(style);
|
|
40
|
-
return /*#__PURE__*/React.createElement(_reactNative.Pressable,
|
|
41
|
-
style: [styles.container, viewStyles]
|
|
42
|
-
|
|
38
|
+
return /*#__PURE__*/React.createElement(_reactNative.Pressable, {
|
|
39
|
+
style: [styles.container, viewStyles],
|
|
40
|
+
...rest
|
|
41
|
+
}, /*#__PURE__*/React.createElement(_reactNative.View, {
|
|
43
42
|
style: styles.row
|
|
44
43
|
}, icon ? /*#__PURE__*/React.createElement(Icon, {
|
|
45
44
|
name: icon,
|
|
@@ -74,4 +73,25 @@ const styles = _reactNative.StyleSheet.create({
|
|
|
74
73
|
|
|
75
74
|
var _default = (0, _theming.withTheme)(AccordionItem);
|
|
76
75
|
|
|
76
|
+
exports.default = _default;StyleSheet.create({
|
|
77
|
+
container: {
|
|
78
|
+
padding: 8
|
|
79
|
+
},
|
|
80
|
+
row: {
|
|
81
|
+
flexDirection: "row",
|
|
82
|
+
alignItems: "center",
|
|
83
|
+
paddingLeft: 8
|
|
84
|
+
},
|
|
85
|
+
item: {
|
|
86
|
+
marginVertical: 6,
|
|
87
|
+
paddingLeft: 8
|
|
88
|
+
},
|
|
89
|
+
content: {
|
|
90
|
+
flex: 1,
|
|
91
|
+
justifyContent: "center"
|
|
92
|
+
}
|
|
93
|
+
});
|
|
94
|
+
|
|
95
|
+
var _default = (0, _theming.withTheme)(AccordionItem);
|
|
96
|
+
|
|
77
97
|
exports.default = _default;
|
|
@@ -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,
|
|
@@ -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
|
const Container = _ref => {
|
|
25
23
|
let {
|
|
26
24
|
useThemeGutterPadding,
|
|
@@ -82,9 +80,10 @@ const Container = _ref => {
|
|
|
82
80
|
};
|
|
83
81
|
const Wrap = elevation ? _Elevation.default : _reactNative.View;
|
|
84
82
|
if (elevation) containerStyle.elevation = elevation;
|
|
85
|
-
return /*#__PURE__*/React.createElement(Wrap,
|
|
86
|
-
style: [containerStyle, style]
|
|
87
|
-
|
|
83
|
+
return /*#__PURE__*/React.createElement(Wrap, {
|
|
84
|
+
style: [containerStyle, style],
|
|
85
|
+
...rest
|
|
86
|
+
}, backgroundImage ? /*#__PURE__*/React.createElement(_reactNative.ImageBackground, {
|
|
88
87
|
source: typeof backgroundImage === "string" ? {
|
|
89
88
|
uri: backgroundImage
|
|
90
89
|
} : backgroundImage,
|
|
@@ -101,4 +100,17 @@ const Container = _ref => {
|
|
|
101
100
|
|
|
102
101
|
var _default = (0, _theming.withTheme)(Container);
|
|
103
102
|
|
|
103
|
+
exports.default = _default;izeMode: backgroundImageResizeMode,
|
|
104
|
+
style: {
|
|
105
|
+
flex: 1
|
|
106
|
+
}
|
|
107
|
+
}, /*#__PURE__*/React.createElement(_reactNative.View, {
|
|
108
|
+
style: innerStyle
|
|
109
|
+
}, children)) : /*#__PURE__*/React.createElement(_reactNative.View, {
|
|
110
|
+
style: innerStyle
|
|
111
|
+
}, children));
|
|
112
|
+
};
|
|
113
|
+
|
|
114
|
+
var _default = (0, _theming.withTheme)(Container);
|
|
115
|
+
|
|
104
116
|
exports.default = _default;
|
|
@@ -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 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,
|
|
@@ -111,6 +110,26 @@ const Picker = _ref => {
|
|
|
111
110
|
key: o.value
|
|
112
111
|
}))), /*#__PURE__*/React.createElement(_reactNative.View, {
|
|
113
112
|
pointerEvents: "none"
|
|
113
|
+
}, /*#__PURE__*/React.createElement(_TextField.default, { ...props,
|
|
114
|
+
value: selectedLabel,
|
|
115
|
+
placeholder: placeholder,
|
|
116
|
+
// @ts-ignore
|
|
117
|
+
ref: textField,
|
|
118
|
+
disabled: disabled,
|
|
119
|
+
// @ts-expect-error
|
|
120
|
+
style: stylesWithoutMargin
|
|
121
|
+
}))));
|
|
122
|
+
};
|
|
123
|
+
|
|
124
|
+
const styles = _reactNative.StyleSheet.create({
|
|
125
|
+
container: {
|
|
126
|
+
alignSelf: "stretch"
|
|
127
|
+
}
|
|
128
|
+
});
|
|
129
|
+
|
|
130
|
+
var _default = (0, _theming.withTheme)(Picker);
|
|
131
|
+
|
|
132
|
+
exports.default = _default; pointerEvents: "none"
|
|
114
133
|
}, /*#__PURE__*/React.createElement(_TextField.default, _extends({}, props, {
|
|
115
134
|
value: selectedLabel,
|
|
116
135
|
placeholder: placeholder // @ts-ignore
|
|
@@ -33,11 +33,7 @@ function _getRequireWildcardCache(nodeInterop) { if (typeof WeakMap !== "functio
|
|
|
33
33
|
|
|
34
34
|
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; }
|
|
35
35
|
|
|
36
|
-
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); }
|
|
37
|
-
|
|
38
36
|
const Picker = _ref => {
|
|
39
|
-
var _options$find$label, _options$find;
|
|
40
|
-
|
|
41
37
|
let {
|
|
42
38
|
Icon,
|
|
43
39
|
style,
|
|
@@ -51,6 +47,9 @@ const Picker = _ref => {
|
|
|
51
47
|
},
|
|
52
48
|
...props
|
|
53
49
|
} = _ref;
|
|
50
|
+
|
|
51
|
+
var _a, _b;
|
|
52
|
+
|
|
54
53
|
const {
|
|
55
54
|
viewStyles: {
|
|
56
55
|
borderRadius,
|
|
@@ -92,24 +91,23 @@ const Picker = _ref => {
|
|
|
92
91
|
};
|
|
93
92
|
|
|
94
93
|
const stylesWithoutMargin = style && (0, _lodash.default)(_reactNative.StyleSheet.flatten(style), ["margin", "marginTop", "marginRight", "marginBottom", "marginLeft"]);
|
|
95
|
-
const selectedLabel = selectedValue && ((
|
|
94
|
+
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);
|
|
96
95
|
return /*#__PURE__*/React.createElement(_reactNative.View, {
|
|
97
96
|
style: [styles.container, viewStyles]
|
|
98
97
|
}, /*#__PURE__*/React.createElement(_Touchable.default, {
|
|
99
98
|
disabled: disabled,
|
|
100
99
|
onPress: toggleVisibility
|
|
101
|
-
}, /*#__PURE__*/React.createElement(_TextField.default,
|
|
100
|
+
}, /*#__PURE__*/React.createElement(_TextField.default, { ...props,
|
|
102
101
|
value: String(selectedLabel),
|
|
103
|
-
placeholder: placeholder
|
|
104
|
-
|
|
105
|
-
ref: textField
|
|
106
|
-
,
|
|
102
|
+
placeholder: placeholder,
|
|
103
|
+
// @ts-ignore
|
|
104
|
+
ref: textField,
|
|
107
105
|
disabled: disabled,
|
|
108
|
-
pointerEvents: "none"
|
|
109
|
-
|
|
106
|
+
pointerEvents: "none",
|
|
107
|
+
// @ts-expect-error
|
|
110
108
|
style: stylesWithoutMargin,
|
|
111
109
|
Icon: Icon
|
|
112
|
-
}))
|
|
110
|
+
})), pickerVisible && /*#__PURE__*/React.createElement(_Portal.default, null, /*#__PURE__*/React.createElement(_reactNative.View, {
|
|
113
111
|
style: [styles.picker, {
|
|
114
112
|
backgroundColor: colors.divider
|
|
115
113
|
}]
|
|
@@ -157,4 +155,35 @@ const styles = _reactNative.StyleSheet.create({
|
|
|
157
155
|
|
|
158
156
|
var _default = (0, _theming.withTheme)(Picker);
|
|
159
157
|
|
|
158
|
+
exports.default = _default;ent(_picker.Picker.Item, {
|
|
159
|
+
label: o.label,
|
|
160
|
+
value: o.value,
|
|
161
|
+
key: o.value
|
|
162
|
+
})))))));
|
|
163
|
+
};
|
|
164
|
+
|
|
165
|
+
const styles = _reactNative.StyleSheet.create({
|
|
166
|
+
container: {
|
|
167
|
+
alignSelf: "stretch"
|
|
168
|
+
},
|
|
169
|
+
picker: {
|
|
170
|
+
position: "absolute",
|
|
171
|
+
bottom: 0,
|
|
172
|
+
left: 0,
|
|
173
|
+
right: 0,
|
|
174
|
+
flexDirection: "row",
|
|
175
|
+
justifyContent: "center"
|
|
176
|
+
},
|
|
177
|
+
pickerContainer: {
|
|
178
|
+
backgroundColor: "white",
|
|
179
|
+
flexDirection: "column",
|
|
180
|
+
width: "100%"
|
|
181
|
+
},
|
|
182
|
+
closeButton: {
|
|
183
|
+
alignSelf: "flex-end"
|
|
184
|
+
}
|
|
185
|
+
});
|
|
186
|
+
|
|
187
|
+
var _default = (0, _theming.withTheme)(Picker);
|
|
188
|
+
|
|
160
189
|
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
|
function ScreenContainer(_ref) {
|
|
23
21
|
let {
|
|
24
22
|
scrollable = false,
|
|
@@ -41,12 +39,13 @@ function ScreenContainer(_ref) {
|
|
|
41
39
|
edges.push("bottom");
|
|
42
40
|
}
|
|
43
41
|
|
|
44
|
-
return /*#__PURE__*/React.createElement(_reactNativeSafeAreaContext.SafeAreaView,
|
|
42
|
+
return /*#__PURE__*/React.createElement(_reactNativeSafeAreaContext.SafeAreaView, {
|
|
45
43
|
edges: edges,
|
|
46
44
|
style: [styles.container, {
|
|
47
45
|
backgroundColor
|
|
48
|
-
}]
|
|
49
|
-
|
|
46
|
+
}],
|
|
47
|
+
...rest
|
|
48
|
+
}, scrollable ? /*#__PURE__*/React.createElement(_reactNative.ScrollView, {
|
|
50
49
|
contentContainerStyle: [styles.scrollViewContainer, {
|
|
51
50
|
backgroundColor
|
|
52
51
|
}, style]
|
|
@@ -69,4 +68,23 @@ const styles = _reactNative.StyleSheet.create({
|
|
|
69
68
|
|
|
70
69
|
var _default = (0, _theming.withTheme)(ScreenContainer);
|
|
71
70
|
|
|
71
|
+
exports.default = _default;reactNative.View, {
|
|
72
|
+
style: [styles.container, {
|
|
73
|
+
backgroundColor
|
|
74
|
+
}, style]
|
|
75
|
+
}, children));
|
|
76
|
+
}
|
|
77
|
+
|
|
78
|
+
const styles = _reactNative.StyleSheet.create({
|
|
79
|
+
container: {
|
|
80
|
+
flex: 1
|
|
81
|
+
},
|
|
82
|
+
scrollViewContainer: {
|
|
83
|
+
flexGrow: 1,
|
|
84
|
+
flex: undefined
|
|
85
|
+
}
|
|
86
|
+
});
|
|
87
|
+
|
|
88
|
+
var _default = (0, _theming.withTheme)(ScreenContainer);
|
|
89
|
+
|
|
72
90
|
exports.default = _default;
|
|
@@ -17,10 +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
|
-
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
20
|
const AnimatedText = _reactNative.Animated.createAnimatedComponent(_reactNative.Text);
|
|
25
21
|
|
|
26
22
|
const FOCUS_ANIMATION_DURATION = 150;
|
|
@@ -30,8 +26,7 @@ const ICON_SIZE = 24;
|
|
|
30
26
|
class TextField extends React.Component {
|
|
31
27
|
constructor() {
|
|
32
28
|
super(...arguments);
|
|
33
|
-
|
|
34
|
-
_defineProperty(this, "state", {
|
|
29
|
+
this.state = {
|
|
35
30
|
labeled: new _reactNative.Animated.Value(this.props.value || this.props.error ? 0 : 1),
|
|
36
31
|
focused: false,
|
|
37
32
|
placeholder: this.props.error ? this.props.placeholder : "",
|
|
@@ -39,36 +34,35 @@ class TextField extends React.Component {
|
|
|
39
34
|
measured: false,
|
|
40
35
|
width: 0
|
|
41
36
|
}
|
|
42
|
-
}
|
|
43
|
-
|
|
44
|
-
_defineProperty(this, "_timer", setTimeout(() => {}, 0));
|
|
37
|
+
};
|
|
38
|
+
this._timer = setTimeout(() => {}, 0);
|
|
45
39
|
|
|
46
|
-
|
|
40
|
+
this._showPlaceholder = () => {
|
|
47
41
|
clearTimeout(this._timer); // Set the placeholder in a delay to offset the label animation
|
|
48
42
|
// If we show it immediately, they'll overlap and look ugly
|
|
49
43
|
|
|
50
44
|
this._timer = setTimeout(() => this.setState({
|
|
51
45
|
placeholder: this.props.placeholder
|
|
52
46
|
}), 50);
|
|
53
|
-
}
|
|
47
|
+
};
|
|
54
48
|
|
|
55
|
-
|
|
49
|
+
this._hidePlaceholder = () => this.setState({
|
|
56
50
|
placeholder: ""
|
|
57
|
-
})
|
|
51
|
+
});
|
|
58
52
|
|
|
59
|
-
|
|
53
|
+
this._restoreLabel = () => _reactNative.Animated.timing(this.state.labeled, {
|
|
60
54
|
toValue: 1,
|
|
61
55
|
duration: FOCUS_ANIMATION_DURATION,
|
|
62
56
|
useNativeDriver: true
|
|
63
|
-
}).start()
|
|
57
|
+
}).start();
|
|
64
58
|
|
|
65
|
-
|
|
59
|
+
this._minmizeLabel = () => _reactNative.Animated.timing(this.state.labeled, {
|
|
66
60
|
toValue: 0,
|
|
67
61
|
duration: BLUR_ANIMATION_DURATION,
|
|
68
62
|
useNativeDriver: true
|
|
69
|
-
}).start()
|
|
63
|
+
}).start();
|
|
70
64
|
|
|
71
|
-
|
|
65
|
+
this._handleFocus = () => {
|
|
72
66
|
if (this.props.disabled) {
|
|
73
67
|
return;
|
|
74
68
|
}
|
|
@@ -76,9 +70,9 @@ class TextField extends React.Component {
|
|
|
76
70
|
this.setState({
|
|
77
71
|
focused: true
|
|
78
72
|
});
|
|
79
|
-
}
|
|
73
|
+
};
|
|
80
74
|
|
|
81
|
-
|
|
75
|
+
this._handleBlur = () => {
|
|
82
76
|
if (this.props.disabled) {
|
|
83
77
|
return;
|
|
84
78
|
}
|
|
@@ -86,9 +80,9 @@ class TextField extends React.Component {
|
|
|
86
80
|
this.setState({
|
|
87
81
|
focused: false
|
|
88
82
|
});
|
|
89
|
-
}
|
|
83
|
+
};
|
|
90
84
|
|
|
91
|
-
|
|
85
|
+
this._handleChangeText = value => {
|
|
92
86
|
if (this.props.disabled) {
|
|
93
87
|
return;
|
|
94
88
|
}
|
|
@@ -104,9 +98,9 @@ class TextField extends React.Component {
|
|
|
104
98
|
});
|
|
105
99
|
this.props.onChangeText && this.props.onChangeText(value.nativeEvent.text);
|
|
106
100
|
}
|
|
107
|
-
}
|
|
101
|
+
};
|
|
108
102
|
|
|
109
|
-
|
|
103
|
+
this._root = undefined;
|
|
110
104
|
}
|
|
111
105
|
|
|
112
106
|
static getDerivedStateFromProps(nextProps, prevState) {
|
|
@@ -157,10 +151,11 @@ class TextField extends React.Component {
|
|
|
157
151
|
focused: !prevState.focused
|
|
158
152
|
}));
|
|
159
153
|
}
|
|
160
|
-
|
|
161
154
|
/**
|
|
162
155
|
* @internal
|
|
163
156
|
*/
|
|
157
|
+
|
|
158
|
+
|
|
164
159
|
setNativeProps(args) {
|
|
165
160
|
return this._root && this._root.setNativeProps(args);
|
|
166
161
|
}
|
|
@@ -203,7 +198,8 @@ class TextField extends React.Component {
|
|
|
203
198
|
roundness,
|
|
204
199
|
disabledOpacity
|
|
205
200
|
},
|
|
206
|
-
render = props => /*#__PURE__*/React.createElement(_reactNative.TextInput, props
|
|
201
|
+
render = props => /*#__PURE__*/React.createElement(_reactNative.TextInput, { ...props
|
|
202
|
+
}),
|
|
207
203
|
...rest
|
|
208
204
|
} = this.props;
|
|
209
205
|
const MINIMIZED_LABEL_Y_OFFSET = -(typography.caption.lineHeight + 4);
|
|
@@ -357,9 +353,9 @@ class TextField extends React.Component {
|
|
|
357
353
|
|
|
358
354
|
return /*#__PURE__*/React.createElement(_reactNative.View, {
|
|
359
355
|
style: [styles.container, styleProp]
|
|
360
|
-
}, leftIconName && leftIconMode === "outset" ? /*#__PURE__*/React.createElement(Icon,
|
|
356
|
+
}, leftIconName && leftIconMode === "outset" ? /*#__PURE__*/React.createElement(Icon, { ...leftIconProps,
|
|
361
357
|
style: leftIconStyle
|
|
362
|
-
})
|
|
358
|
+
}) : null, /*#__PURE__*/React.createElement(_reactNative.View, {
|
|
363
359
|
style: (0, _utilities.applyStyles)([containerStyle], {
|
|
364
360
|
height: style === null || style === void 0 ? void 0 : style.height,
|
|
365
361
|
backgroundColor: bgColor,
|
|
@@ -426,9 +422,9 @@ class TextField extends React.Component {
|
|
|
426
422
|
style: {
|
|
427
423
|
justifyContent: type === "solid" ? "center" : undefined
|
|
428
424
|
}
|
|
429
|
-
}, /*#__PURE__*/React.createElement(Icon,
|
|
425
|
+
}, /*#__PURE__*/React.createElement(Icon, { ...leftIconProps,
|
|
430
426
|
style: leftIconStyle
|
|
431
|
-
}))
|
|
427
|
+
})) : null, render({
|
|
432
428
|
ref: c => {
|
|
433
429
|
this._root = c;
|
|
434
430
|
},
|
|
@@ -469,6 +465,43 @@ var _default = (0, _theming.withTheme)(TextField);
|
|
|
469
465
|
|
|
470
466
|
exports.default = _default;
|
|
471
467
|
|
|
468
|
+
const styles = _reactNative.StyleSheet.create({
|
|
469
|
+
container: {
|
|
470
|
+
alignSelf: "stretch"
|
|
471
|
+
},
|
|
472
|
+
placeholder: {
|
|
473
|
+
position: "absolute",
|
|
474
|
+
left: 0
|
|
475
|
+
},
|
|
476
|
+
underline: {
|
|
477
|
+
position: "absolute",
|
|
478
|
+
left: 0,
|
|
479
|
+
right: 0,
|
|
480
|
+
bottom: 0,
|
|
481
|
+
height: 2
|
|
482
|
+
},
|
|
483
|
+
input: {
|
|
484
|
+
flexGrow: 1,
|
|
485
|
+
justifyContent: "center",
|
|
486
|
+
textAlignVertical: "center",
|
|
487
|
+
margin: 0,
|
|
488
|
+
textAlign: _reactNative.I18nManager.isRTL ? "right" : "left"
|
|
489
|
+
}
|
|
490
|
+
});? /*#__PURE__*/React.createElement(_reactNative.Text, {
|
|
491
|
+
style: [{
|
|
492
|
+
color: error ? colors.error : colors.light,
|
|
493
|
+
marginTop: 8,
|
|
494
|
+
marginLeft: assistiveTextLeftMargin
|
|
495
|
+
}]
|
|
496
|
+
}, assistiveText) : null);
|
|
497
|
+
}
|
|
498
|
+
|
|
499
|
+
}
|
|
500
|
+
|
|
501
|
+
var _default = (0, _theming.withTheme)(TextField);
|
|
502
|
+
|
|
503
|
+
exports.default = _default;
|
|
504
|
+
|
|
472
505
|
const styles = _reactNative.StyleSheet.create({
|
|
473
506
|
container: {
|
|
474
507
|
alignSelf: "stretch"
|
|
@@ -9,7 +9,7 @@ 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,
|
|
@@ -40,8 +40,19 @@ const SEED_DATA = [{
|
|
|
40
40
|
triggers: SEED_DATA_TRIGGERS,
|
|
41
41
|
props: SEED_DATA_PROPS
|
|
42
42
|
}, {
|
|
43
|
-
name: "Button",
|
|
43
|
+
name: "Button Solid",
|
|
44
44
|
tag: "ButtonSolid",
|
|
45
|
+
category: _types.COMPONENT_TYPES.deprecated,
|
|
46
|
+
stylesPanelSections: [_types.StylesPanelSections.Typography, _types.StylesPanelSections.Background, _types.StylesPanelSections.Borders, _types.StylesPanelSections.Size, _types.StylesPanelSections.MarginsAndPaddings, _types.StylesPanelSections.Position, _types.StylesPanelSections.Effects],
|
|
47
|
+
layout: { ...LAYOUT,
|
|
48
|
+
backgroundColor: "primary",
|
|
49
|
+
textAlign: "center"
|
|
50
|
+
},
|
|
51
|
+
triggers: SEED_DATA_TRIGGERS,
|
|
52
|
+
props: SEED_DATA_PROPS
|
|
53
|
+
}, {
|
|
54
|
+
name: "Button",
|
|
55
|
+
tag: "Button",
|
|
45
56
|
category: _types.COMPONENT_TYPES.button,
|
|
46
57
|
stylesPanelSections: [_types.StylesPanelSections.Typography, _types.StylesPanelSections.Background, _types.StylesPanelSections.Borders, _types.StylesPanelSections.Size, _types.StylesPanelSections.MarginsAndPaddings, _types.StylesPanelSections.Position, _types.StylesPanelSections.Effects],
|
|
47
58
|
layout: { ...LAYOUT,
|
|
@@ -25,9 +25,7 @@ const SEED_DATA = {
|
|
|
25
25
|
}),
|
|
26
26
|
fieldName: (0, _types.createFieldNameProp)({
|
|
27
27
|
defaultValue: "ratingValue",
|
|
28
|
-
// this is the name of the variable declared on the screen in Draftbit
|
|
29
28
|
handlerPropName: "onPress",
|
|
30
|
-
// the change handler prop in this component
|
|
31
29
|
valuePropName: "rating" // the value prop in this component
|
|
32
30
|
|
|
33
31
|
}),
|
|
@@ -52,4 +50,10 @@ const SEED_DATA = {
|
|
|
52
50
|
})
|
|
53
51
|
}
|
|
54
52
|
};
|
|
53
|
+
exports.SEED_DATA = SEED_DATA;pes.createColorProp)({
|
|
54
|
+
label: "Inactive Color",
|
|
55
|
+
defaultValue: "divider"
|
|
56
|
+
})
|
|
57
|
+
}
|
|
58
|
+
};
|
|
55
59
|
exports.SEED_DATA = SEED_DATA;
|
|
@@ -1,5 +1,3 @@
|
|
|
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
|
-
|
|
3
1
|
import * as React from "react";
|
|
4
2
|
import { View, StyleSheet } from "react-native";
|
|
5
3
|
import PortalManager from "./PortalManager";
|
|
@@ -33,11 +31,11 @@ export default class PortalHost extends React.Component {
|
|
|
33
31
|
constructor() {
|
|
34
32
|
super(...arguments);
|
|
35
33
|
|
|
36
|
-
|
|
34
|
+
this.setManager = manager => {
|
|
37
35
|
this.manager = manager;
|
|
38
|
-
}
|
|
36
|
+
};
|
|
39
37
|
|
|
40
|
-
|
|
38
|
+
this.mount = children => {
|
|
41
39
|
const key = this.nextKey++;
|
|
42
40
|
|
|
43
41
|
if (this.manager) {
|
|
@@ -51,9 +49,9 @@ export default class PortalHost extends React.Component {
|
|
|
51
49
|
}
|
|
52
50
|
|
|
53
51
|
return key;
|
|
54
|
-
}
|
|
52
|
+
};
|
|
55
53
|
|
|
56
|
-
|
|
54
|
+
this.update = (key, children) => {
|
|
57
55
|
if (this.manager) {
|
|
58
56
|
this.manager.update(key, children);
|
|
59
57
|
} else {
|
|
@@ -71,9 +69,9 @@ export default class PortalHost extends React.Component {
|
|
|
71
69
|
this.queue.push(op);
|
|
72
70
|
}
|
|
73
71
|
}
|
|
74
|
-
}
|
|
72
|
+
};
|
|
75
73
|
|
|
76
|
-
|
|
74
|
+
this.unmount = key => {
|
|
77
75
|
if (this.manager) {
|
|
78
76
|
this.manager.unmount(key);
|
|
79
77
|
} else {
|
|
@@ -82,13 +80,10 @@ export default class PortalHost extends React.Component {
|
|
|
82
80
|
key
|
|
83
81
|
});
|
|
84
82
|
}
|
|
85
|
-
}
|
|
86
|
-
|
|
87
|
-
_defineProperty(this, "nextKey", 0);
|
|
88
|
-
|
|
89
|
-
_defineProperty(this, "queue", []);
|
|
83
|
+
};
|
|
90
84
|
|
|
91
|
-
|
|
85
|
+
this.nextKey = 0;
|
|
86
|
+
this.queue = [];
|
|
92
87
|
}
|
|
93
88
|
|
|
94
89
|
componentDidMount() {
|
|
@@ -132,6 +127,22 @@ export default class PortalHost extends React.Component {
|
|
|
132
127
|
}));
|
|
133
128
|
}
|
|
134
129
|
|
|
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
|
+
|
|
135
146
|
}
|
|
136
147
|
|
|
137
148
|
_defineProperty(PortalHost, "displayName", "Portal.Host");
|
|
@@ -1,5 +1,3 @@
|
|
|
1
|
-
function _extends() { _extends = Object.assign ? Object.assign.bind() : function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; return _extends.apply(this, arguments); }
|
|
2
|
-
|
|
3
1
|
import * as React from "react";
|
|
4
2
|
import Config from "../Config";
|
|
5
3
|
import IconButton from "../IconButton";
|
|
@@ -34,6 +32,21 @@ const RadioButton = _ref => {
|
|
|
34
32
|
onValueChange === null || onValueChange === void 0 ? void 0 : onValueChange(realValue);
|
|
35
33
|
};
|
|
36
34
|
|
|
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
|
+
|
|
37
50
|
return /*#__PURE__*/React.createElement(IconButton, _extends({
|
|
38
51
|
Icon: Icon,
|
|
39
52
|
icon: isSelected ? selectedIcon : unselectedIcon,
|
|
@@ -32,8 +32,19 @@ export const SEED_DATA = [{
|
|
|
32
32
|
triggers: SEED_DATA_TRIGGERS,
|
|
33
33
|
props: SEED_DATA_PROPS
|
|
34
34
|
}, {
|
|
35
|
-
name: "Button",
|
|
35
|
+
name: "Button Solid",
|
|
36
36
|
tag: "ButtonSolid",
|
|
37
|
+
category: COMPONENT_TYPES.deprecated,
|
|
38
|
+
stylesPanelSections: [StylesPanelSections.Typography, StylesPanelSections.Background, StylesPanelSections.Borders, StylesPanelSections.Size, StylesPanelSections.MarginsAndPaddings, StylesPanelSections.Position, StylesPanelSections.Effects],
|
|
39
|
+
layout: { ...LAYOUT,
|
|
40
|
+
backgroundColor: "primary",
|
|
41
|
+
textAlign: "center"
|
|
42
|
+
},
|
|
43
|
+
triggers: SEED_DATA_TRIGGERS,
|
|
44
|
+
props: SEED_DATA_PROPS
|
|
45
|
+
}, {
|
|
46
|
+
name: "Button",
|
|
47
|
+
tag: "Button",
|
|
37
48
|
category: COMPONENT_TYPES.button,
|
|
38
49
|
stylesPanelSections: [StylesPanelSections.Typography, StylesPanelSections.Background, StylesPanelSections.Borders, StylesPanelSections.Size, StylesPanelSections.MarginsAndPaddings, StylesPanelSections.Position, StylesPanelSections.Effects],
|
|
39
50
|
layout: { ...LAYOUT,
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@draftbit/core",
|
|
3
|
-
"version": "46.4.
|
|
3
|
+
"version": "46.4.3-64fdb2.2+64fdb2e",
|
|
4
4
|
"description": "Core (non-native) Components",
|
|
5
5
|
"main": "lib/commonjs/index.js",
|
|
6
6
|
"module": "lib/module/index.js",
|
|
@@ -41,7 +41,7 @@
|
|
|
41
41
|
"dependencies": {
|
|
42
42
|
"@date-io/date-fns": "^1.3.13",
|
|
43
43
|
"@draftbit/react-theme-provider": "^2.1.1",
|
|
44
|
-
"@draftbit/types": "^46.4.
|
|
44
|
+
"@draftbit/types": "^46.4.3-64fdb2.2+64fdb2e",
|
|
45
45
|
"@material-ui/core": "^4.11.0",
|
|
46
46
|
"@material-ui/pickers": "^3.2.10",
|
|
47
47
|
"@react-native-community/slider": "4.2.3",
|
|
@@ -81,5 +81,5 @@
|
|
|
81
81
|
]
|
|
82
82
|
]
|
|
83
83
|
},
|
|
84
|
-
"gitHead": "
|
|
84
|
+
"gitHead": "64fdb2e228cbed7083c1259c136f2fc9484b489e"
|
|
85
85
|
}
|
package/src/mappings/Button.js
CHANGED
|
@@ -43,8 +43,29 @@ export const SEED_DATA = [
|
|
|
43
43
|
props: SEED_DATA_PROPS,
|
|
44
44
|
},
|
|
45
45
|
{
|
|
46
|
-
name: "Button",
|
|
46
|
+
name: "Button Solid",
|
|
47
47
|
tag: "ButtonSolid",
|
|
48
|
+
category: COMPONENT_TYPES.deprecated,
|
|
49
|
+
stylesPanelSections: [
|
|
50
|
+
StylesPanelSections.Typography,
|
|
51
|
+
StylesPanelSections.Background,
|
|
52
|
+
StylesPanelSections.Borders,
|
|
53
|
+
StylesPanelSections.Size,
|
|
54
|
+
StylesPanelSections.MarginsAndPaddings,
|
|
55
|
+
StylesPanelSections.Position,
|
|
56
|
+
StylesPanelSections.Effects,
|
|
57
|
+
],
|
|
58
|
+
layout: {
|
|
59
|
+
...LAYOUT,
|
|
60
|
+
backgroundColor: "primary",
|
|
61
|
+
textAlign: "center",
|
|
62
|
+
},
|
|
63
|
+
triggers: SEED_DATA_TRIGGERS,
|
|
64
|
+
props: SEED_DATA_PROPS,
|
|
65
|
+
},
|
|
66
|
+
{
|
|
67
|
+
name: "Button",
|
|
68
|
+
tag: "Button",
|
|
48
69
|
category: COMPONENT_TYPES.button,
|
|
49
70
|
stylesPanelSections: [
|
|
50
71
|
StylesPanelSections.Typography,
|
package/src/mappings/Button.ts
CHANGED
|
@@ -55,8 +55,29 @@ export const SEED_DATA = [
|
|
|
55
55
|
props: SEED_DATA_PROPS,
|
|
56
56
|
},
|
|
57
57
|
{
|
|
58
|
-
name: "Button",
|
|
58
|
+
name: "Button Solid",
|
|
59
59
|
tag: "ButtonSolid",
|
|
60
|
+
category: COMPONENT_TYPES.deprecated,
|
|
61
|
+
stylesPanelSections: [
|
|
62
|
+
StylesPanelSections.Typography,
|
|
63
|
+
StylesPanelSections.Background,
|
|
64
|
+
StylesPanelSections.Borders,
|
|
65
|
+
StylesPanelSections.Size,
|
|
66
|
+
StylesPanelSections.MarginsAndPaddings,
|
|
67
|
+
StylesPanelSections.Position,
|
|
68
|
+
StylesPanelSections.Effects,
|
|
69
|
+
],
|
|
70
|
+
layout: {
|
|
71
|
+
...LAYOUT,
|
|
72
|
+
backgroundColor: "primary",
|
|
73
|
+
textAlign: "center",
|
|
74
|
+
},
|
|
75
|
+
triggers: SEED_DATA_TRIGGERS,
|
|
76
|
+
props: SEED_DATA_PROPS,
|
|
77
|
+
},
|
|
78
|
+
{
|
|
79
|
+
name: "Button",
|
|
80
|
+
tag: "Button",
|
|
60
81
|
category: COMPONENT_TYPES.button,
|
|
61
82
|
stylesPanelSections: [
|
|
62
83
|
StylesPanelSections.Typography,
|