@draftbit/core 46.4.3-64fdb2.2 → 46.4.4-d73221.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 +5 -25
- package/lib/commonjs/components/Button.js +3 -1
- package/lib/commonjs/components/CardContainer.js +5 -15
- package/lib/commonjs/components/CircleImage.js +2 -16
- package/lib/commonjs/components/Container.js +5 -17
- package/lib/commonjs/components/DeprecatedFAB.js +4 -22
- package/lib/commonjs/components/Divider.js +2 -16
- package/lib/commonjs/components/NumberInput.js +2 -13
- package/lib/commonjs/components/Picker/PickerComponent.android.js +5 -24
- package/lib/commonjs/components/Picker/PickerComponent.ios.js +13 -42
- package/lib/commonjs/components/ScreenContainer.js +5 -23
- package/lib/commonjs/components/TextField.js +30 -63
- package/lib/commonjs/constants.js +1 -1
- package/lib/commonjs/index.js +1 -3
- package/lib/commonjs/mappings/StarRating.js +2 -6
- package/lib/module/components/Banner.js +24 -4
- package/lib/module/components/Button.js +2 -0
- package/lib/module/components/DatePicker/DatePicker.js +7 -8
- package/lib/module/components/Elevation.js +15 -4
- package/lib/module/components/Image.js +18 -3
- package/lib/module/components/Portal/PortalHost.js +15 -26
- package/lib/module/components/RadioButton/RadioButton.js +2 -15
- package/lib/module/components/StepIndicator.js +33 -16
- package/lib/module/index.js +1 -2
- package/lib/typescript/src/components/Button.d.ts +2 -0
- package/lib/typescript/src/index.d.ts +1 -2
- package/package.json +3 -3
- package/src/components/Button.js +2 -0
- package/src/components/Button.tsx +3 -0
- package/src/index.js +1 -2
- package/src/index.tsx +1 -2
|
@@ -21,6 +21,8 @@ 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
|
+
|
|
24
26
|
const AccordionItem = _ref => {
|
|
25
27
|
let {
|
|
26
28
|
Icon,
|
|
@@ -35,10 +37,9 @@ const AccordionItem = _ref => {
|
|
|
35
37
|
textStyles,
|
|
36
38
|
viewStyles
|
|
37
39
|
} = (0, _utilities.extractStyles)(style);
|
|
38
|
-
return /*#__PURE__*/React.createElement(_reactNative.Pressable, {
|
|
39
|
-
style: [styles.container, viewStyles]
|
|
40
|
-
|
|
41
|
-
}, /*#__PURE__*/React.createElement(_reactNative.View, {
|
|
40
|
+
return /*#__PURE__*/React.createElement(_reactNative.Pressable, _extends({
|
|
41
|
+
style: [styles.container, viewStyles]
|
|
42
|
+
}, rest), /*#__PURE__*/React.createElement(_reactNative.View, {
|
|
42
43
|
style: styles.row
|
|
43
44
|
}, icon ? /*#__PURE__*/React.createElement(Icon, {
|
|
44
45
|
name: icon,
|
|
@@ -73,25 +74,4 @@ const styles = _reactNative.StyleSheet.create({
|
|
|
73
74
|
|
|
74
75
|
var _default = (0, _theming.withTheme)(AccordionItem);
|
|
75
76
|
|
|
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
|
-
|
|
97
77
|
exports.default = _default;
|
|
@@ -3,7 +3,7 @@
|
|
|
3
3
|
Object.defineProperty(exports, "__esModule", {
|
|
4
4
|
value: true
|
|
5
5
|
});
|
|
6
|
-
exports.ButtonSolid = exports.ButtonOutline = void 0;
|
|
6
|
+
exports.ButtonSolid = exports.ButtonOutline = exports.Button = void 0;
|
|
7
7
|
|
|
8
8
|
var React = _interopRequireWildcard(require("react"));
|
|
9
9
|
|
|
@@ -115,6 +115,8 @@ const Solid = _ref3 => {
|
|
|
115
115
|
|
|
116
116
|
const ButtonSolid = (0, _theming.withTheme)(Solid);
|
|
117
117
|
exports.ButtonSolid = ButtonSolid;
|
|
118
|
+
const Button = (0, _theming.withTheme)(Solid);
|
|
119
|
+
exports.Button = Button;
|
|
118
120
|
|
|
119
121
|
const Outline = _ref4 => {
|
|
120
122
|
let {
|
|
@@ -23,6 +23,8 @@ 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
|
+
|
|
26
28
|
const ICON_CONTAINER_SIZE = _Config.default.cardIconSize * 2;
|
|
27
29
|
const ICON_CONTAINER_PADDING = _Config.default.cardIconSize / 2 - 1;
|
|
28
30
|
|
|
@@ -66,12 +68,11 @@ const CardContainer = _ref => {
|
|
|
66
68
|
break;
|
|
67
69
|
}
|
|
68
70
|
|
|
69
|
-
return /*#__PURE__*/_react.default.createElement(_DeprecatedCardWrapper.default, {
|
|
71
|
+
return /*#__PURE__*/_react.default.createElement(_DeprecatedCardWrapper.default, _extends({
|
|
70
72
|
style: style,
|
|
71
73
|
onPress: onPress,
|
|
72
|
-
numColumns: numColumns
|
|
73
|
-
|
|
74
|
-
}, /*#__PURE__*/_react.default.createElement(_Elevation.default, {
|
|
74
|
+
numColumns: numColumns
|
|
75
|
+
}, rest), /*#__PURE__*/_react.default.createElement(_Elevation.default, {
|
|
75
76
|
style: {
|
|
76
77
|
elevation,
|
|
77
78
|
borderRadius: roundness
|
|
@@ -143,15 +144,4 @@ const CardContainer = _ref => {
|
|
|
143
144
|
|
|
144
145
|
var _default = (0, _theming.withTheme)(CardContainer);
|
|
145
146
|
|
|
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
|
-
|
|
157
147
|
exports.default = _default;
|
|
@@ -17,6 +17,8 @@ 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
|
+
|
|
20
22
|
const CircleImage = _ref => {
|
|
21
23
|
let {
|
|
22
24
|
source = _Config.default.placeholderImageURL,
|
|
@@ -25,22 +27,6 @@ const CircleImage = _ref => {
|
|
|
25
27
|
...props
|
|
26
28
|
} = _ref;
|
|
27
29
|
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;
|
|
44
30
|
return /*#__PURE__*/React.createElement(_reactNative.Image, _extends({
|
|
45
31
|
style: [{
|
|
46
32
|
width: size,
|
|
@@ -19,6 +19,8 @@ function _getRequireWildcardCache(nodeInterop) { if (typeof WeakMap !== "functio
|
|
|
19
19
|
|
|
20
20
|
function _interopRequireWildcard(obj, nodeInterop) { if (!nodeInterop && obj && obj.__esModule) { return obj; } if (obj === null || typeof obj !== "object" && typeof obj !== "function") { return { default: obj }; } var cache = _getRequireWildcardCache(nodeInterop); if (cache && cache.has(obj)) { return cache.get(obj); } var newObj = {}; var hasPropertyDescriptor = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var key in obj) { if (key !== "default" && Object.prototype.hasOwnProperty.call(obj, key)) { var desc = hasPropertyDescriptor ? Object.getOwnPropertyDescriptor(obj, key) : null; if (desc && (desc.get || desc.set)) { Object.defineProperty(newObj, key, desc); } else { newObj[key] = obj[key]; } } } newObj.default = obj; if (cache) { cache.set(obj, newObj); } return newObj; }
|
|
21
21
|
|
|
22
|
+
function _extends() { _extends = Object.assign ? Object.assign.bind() : function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; return _extends.apply(this, arguments); }
|
|
23
|
+
|
|
22
24
|
const Container = _ref => {
|
|
23
25
|
let {
|
|
24
26
|
useThemeGutterPadding,
|
|
@@ -80,10 +82,9 @@ const Container = _ref => {
|
|
|
80
82
|
};
|
|
81
83
|
const Wrap = elevation ? _Elevation.default : _reactNative.View;
|
|
82
84
|
if (elevation) containerStyle.elevation = elevation;
|
|
83
|
-
return /*#__PURE__*/React.createElement(Wrap, {
|
|
84
|
-
style: [containerStyle, style]
|
|
85
|
-
|
|
86
|
-
}, backgroundImage ? /*#__PURE__*/React.createElement(_reactNative.ImageBackground, {
|
|
85
|
+
return /*#__PURE__*/React.createElement(Wrap, _extends({
|
|
86
|
+
style: [containerStyle, style]
|
|
87
|
+
}, rest), backgroundImage ? /*#__PURE__*/React.createElement(_reactNative.ImageBackground, {
|
|
87
88
|
source: typeof backgroundImage === "string" ? {
|
|
88
89
|
uri: backgroundImage
|
|
89
90
|
} : backgroundImage,
|
|
@@ -100,17 +101,4 @@ const Container = _ref => {
|
|
|
100
101
|
|
|
101
102
|
var _default = (0, _theming.withTheme)(Container);
|
|
102
103
|
|
|
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
|
-
|
|
116
104
|
exports.default = _default;
|
|
@@ -27,6 +27,8 @@ 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
|
+
|
|
30
32
|
const FAB = _ref => {
|
|
31
33
|
let {
|
|
32
34
|
Icon,
|
|
@@ -128,7 +130,7 @@ const FAB = _ref => {
|
|
|
128
130
|
style: [{
|
|
129
131
|
elevation
|
|
130
132
|
}, style]
|
|
131
|
-
}, /*#__PURE__*/React.createElement(_Touchable.default, {
|
|
133
|
+
}, /*#__PURE__*/React.createElement(_Touchable.default, _extends({}, rest, {
|
|
132
134
|
onPress: onPress,
|
|
133
135
|
accessibilityState: {
|
|
134
136
|
disabled
|
|
@@ -136,7 +138,7 @@ const FAB = _ref => {
|
|
|
136
138
|
accessibilityRole: "button",
|
|
137
139
|
disabled: disabled || loading,
|
|
138
140
|
style: buttonStyles
|
|
139
|
-
}, /*#__PURE__*/React.createElement(_reactNative.View, {
|
|
141
|
+
}), /*#__PURE__*/React.createElement(_reactNative.View, {
|
|
140
142
|
style: styles.content
|
|
141
143
|
}, icon && loading !== true ? /*#__PURE__*/React.createElement(_reactNative.View, {
|
|
142
144
|
style: iconStyle
|
|
@@ -179,24 +181,4 @@ const styles = _reactNative.StyleSheet.create({
|
|
|
179
181
|
|
|
180
182
|
var _default = (0, _theming.withTheme)(FAB);
|
|
181
183
|
|
|
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
|
-
|
|
202
184
|
exports.default = _default;
|
|
@@ -15,6 +15,8 @@ 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
|
+
|
|
18
20
|
const Divider = _ref => {
|
|
19
21
|
let {
|
|
20
22
|
style,
|
|
@@ -24,22 +26,6 @@ const Divider = _ref => {
|
|
|
24
26
|
},
|
|
25
27
|
...rest
|
|
26
28
|
} = _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;
|
|
43
29
|
return /*#__PURE__*/React.createElement(_reactNative.View, _extends({
|
|
44
30
|
style: [{
|
|
45
31
|
backgroundColor: color || colors.divider,
|
|
@@ -15,6 +15,8 @@ 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
|
+
|
|
18
20
|
const NumberInput = _ref => {
|
|
19
21
|
let {
|
|
20
22
|
onChangeText,
|
|
@@ -67,19 +69,6 @@ const NumberInput = _ref => {
|
|
|
67
69
|
handleChangeText(nextStringNumberValue);
|
|
68
70
|
} // eslint-disable-next-line react-hooks/exhaustive-deps
|
|
69
71
|
|
|
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
|
-
|
|
83
72
|
}, [value]);
|
|
84
73
|
return /*#__PURE__*/_react.default.createElement(_reactNative.TextInput, _extends({
|
|
85
74
|
keyboardType: "numeric",
|
|
@@ -27,7 +27,11 @@ 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
|
+
|
|
30
32
|
const Picker = _ref => {
|
|
33
|
+
var _options$find$label, _options$find;
|
|
34
|
+
|
|
31
35
|
let {
|
|
32
36
|
style,
|
|
33
37
|
options,
|
|
@@ -37,9 +41,6 @@ const Picker = _ref => {
|
|
|
37
41
|
onValueChange: onValueChangeOverride = () => {},
|
|
38
42
|
...props
|
|
39
43
|
} = _ref;
|
|
40
|
-
|
|
41
|
-
var _a, _b;
|
|
42
|
-
|
|
43
44
|
const {
|
|
44
45
|
viewStyles: {
|
|
45
46
|
borderRadius,
|
|
@@ -86,7 +87,7 @@ const Picker = _ref => {
|
|
|
86
87
|
};
|
|
87
88
|
|
|
88
89
|
const stylesWithoutMargin = style && (0, _lodash.default)(_reactNative.StyleSheet.flatten(style), ["margin", "marginTop", "marginRight", "marginBottom", "marginLeft"]);
|
|
89
|
-
const selectedLabel = selectedValue && ((
|
|
90
|
+
const selectedLabel = selectedValue && ((_options$find$label = (_options$find = options.find(o => o.value === selectedValue)) === null || _options$find === void 0 ? void 0 : _options$find.label) !== null && _options$find$label !== void 0 ? _options$find$label : selectedValue);
|
|
90
91
|
return /*#__PURE__*/React.createElement(_Touchable.default, {
|
|
91
92
|
disabled: disabled,
|
|
92
93
|
onPress: toggleFocus,
|
|
@@ -110,26 +111,6 @@ const Picker = _ref => {
|
|
|
110
111
|
key: o.value
|
|
111
112
|
}))), /*#__PURE__*/React.createElement(_reactNative.View, {
|
|
112
113
|
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"
|
|
133
114
|
}, /*#__PURE__*/React.createElement(_TextField.default, _extends({}, props, {
|
|
134
115
|
value: selectedLabel,
|
|
135
116
|
placeholder: placeholder // @ts-ignore
|
|
@@ -33,7 +33,11 @@ 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
|
+
|
|
36
38
|
const Picker = _ref => {
|
|
39
|
+
var _options$find$label, _options$find;
|
|
40
|
+
|
|
37
41
|
let {
|
|
38
42
|
Icon,
|
|
39
43
|
style,
|
|
@@ -47,9 +51,6 @@ const Picker = _ref => {
|
|
|
47
51
|
},
|
|
48
52
|
...props
|
|
49
53
|
} = _ref;
|
|
50
|
-
|
|
51
|
-
var _a, _b;
|
|
52
|
-
|
|
53
54
|
const {
|
|
54
55
|
viewStyles: {
|
|
55
56
|
borderRadius,
|
|
@@ -91,23 +92,24 @@ const Picker = _ref => {
|
|
|
91
92
|
};
|
|
92
93
|
|
|
93
94
|
const stylesWithoutMargin = style && (0, _lodash.default)(_reactNative.StyleSheet.flatten(style), ["margin", "marginTop", "marginRight", "marginBottom", "marginLeft"]);
|
|
94
|
-
const selectedLabel = selectedValue && ((
|
|
95
|
+
const selectedLabel = selectedValue && ((_options$find$label = (_options$find = options.find(o => o.value === selectedValue)) === null || _options$find === void 0 ? void 0 : _options$find.label) !== null && _options$find$label !== void 0 ? _options$find$label : selectedValue);
|
|
95
96
|
return /*#__PURE__*/React.createElement(_reactNative.View, {
|
|
96
97
|
style: [styles.container, viewStyles]
|
|
97
98
|
}, /*#__PURE__*/React.createElement(_Touchable.default, {
|
|
98
99
|
disabled: disabled,
|
|
99
100
|
onPress: toggleVisibility
|
|
100
|
-
}, /*#__PURE__*/React.createElement(_TextField.default, {
|
|
101
|
+
}, /*#__PURE__*/React.createElement(_TextField.default, _extends({}, props, {
|
|
101
102
|
value: String(selectedLabel),
|
|
102
|
-
placeholder: placeholder
|
|
103
|
-
|
|
104
|
-
ref: textField
|
|
103
|
+
placeholder: placeholder // @ts-ignore
|
|
104
|
+
,
|
|
105
|
+
ref: textField // cannot determine if ref is of correct type due to component being wrapped in a withTheme()
|
|
106
|
+
,
|
|
105
107
|
disabled: disabled,
|
|
106
|
-
pointerEvents: "none"
|
|
107
|
-
|
|
108
|
+
pointerEvents: "none" // @ts-expect-error
|
|
109
|
+
,
|
|
108
110
|
style: stylesWithoutMargin,
|
|
109
111
|
Icon: Icon
|
|
110
|
-
})), pickerVisible && /*#__PURE__*/React.createElement(_Portal.default, null, /*#__PURE__*/React.createElement(_reactNative.View, {
|
|
112
|
+
}))), pickerVisible && /*#__PURE__*/React.createElement(_Portal.default, null, /*#__PURE__*/React.createElement(_reactNative.View, {
|
|
111
113
|
style: [styles.picker, {
|
|
112
114
|
backgroundColor: colors.divider
|
|
113
115
|
}]
|
|
@@ -155,35 +157,4 @@ const styles = _reactNative.StyleSheet.create({
|
|
|
155
157
|
|
|
156
158
|
var _default = (0, _theming.withTheme)(Picker);
|
|
157
159
|
|
|
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
|
-
|
|
189
160
|
exports.default = _default;
|
|
@@ -17,6 +17,8 @@ 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
|
+
|
|
20
22
|
function ScreenContainer(_ref) {
|
|
21
23
|
let {
|
|
22
24
|
scrollable = false,
|
|
@@ -39,13 +41,12 @@ function ScreenContainer(_ref) {
|
|
|
39
41
|
edges.push("bottom");
|
|
40
42
|
}
|
|
41
43
|
|
|
42
|
-
return /*#__PURE__*/React.createElement(_reactNativeSafeAreaContext.SafeAreaView, {
|
|
44
|
+
return /*#__PURE__*/React.createElement(_reactNativeSafeAreaContext.SafeAreaView, _extends({
|
|
43
45
|
edges: edges,
|
|
44
46
|
style: [styles.container, {
|
|
45
47
|
backgroundColor
|
|
46
|
-
}]
|
|
47
|
-
|
|
48
|
-
}, scrollable ? /*#__PURE__*/React.createElement(_reactNative.ScrollView, {
|
|
48
|
+
}]
|
|
49
|
+
}, rest), scrollable ? /*#__PURE__*/React.createElement(_reactNative.ScrollView, {
|
|
49
50
|
contentContainerStyle: [styles.scrollViewContainer, {
|
|
50
51
|
backgroundColor
|
|
51
52
|
}, style]
|
|
@@ -68,23 +69,4 @@ const styles = _reactNative.StyleSheet.create({
|
|
|
68
69
|
|
|
69
70
|
var _default = (0, _theming.withTheme)(ScreenContainer);
|
|
70
71
|
|
|
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
|
-
|
|
90
72
|
exports.default = _default;
|
|
@@ -17,6 +17,10 @@ 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
|
+
|
|
20
24
|
const AnimatedText = _reactNative.Animated.createAnimatedComponent(_reactNative.Text);
|
|
21
25
|
|
|
22
26
|
const FOCUS_ANIMATION_DURATION = 150;
|
|
@@ -26,7 +30,8 @@ const ICON_SIZE = 24;
|
|
|
26
30
|
class TextField extends React.Component {
|
|
27
31
|
constructor() {
|
|
28
32
|
super(...arguments);
|
|
29
|
-
|
|
33
|
+
|
|
34
|
+
_defineProperty(this, "state", {
|
|
30
35
|
labeled: new _reactNative.Animated.Value(this.props.value || this.props.error ? 0 : 1),
|
|
31
36
|
focused: false,
|
|
32
37
|
placeholder: this.props.error ? this.props.placeholder : "",
|
|
@@ -34,35 +39,36 @@ class TextField extends React.Component {
|
|
|
34
39
|
measured: false,
|
|
35
40
|
width: 0
|
|
36
41
|
}
|
|
37
|
-
};
|
|
38
|
-
|
|
42
|
+
});
|
|
43
|
+
|
|
44
|
+
_defineProperty(this, "_timer", setTimeout(() => {}, 0));
|
|
39
45
|
|
|
40
|
-
this
|
|
46
|
+
_defineProperty(this, "_showPlaceholder", () => {
|
|
41
47
|
clearTimeout(this._timer); // Set the placeholder in a delay to offset the label animation
|
|
42
48
|
// If we show it immediately, they'll overlap and look ugly
|
|
43
49
|
|
|
44
50
|
this._timer = setTimeout(() => this.setState({
|
|
45
51
|
placeholder: this.props.placeholder
|
|
46
52
|
}), 50);
|
|
47
|
-
};
|
|
53
|
+
});
|
|
48
54
|
|
|
49
|
-
this
|
|
55
|
+
_defineProperty(this, "_hidePlaceholder", () => this.setState({
|
|
50
56
|
placeholder: ""
|
|
51
|
-
});
|
|
57
|
+
}));
|
|
52
58
|
|
|
53
|
-
this
|
|
59
|
+
_defineProperty(this, "_restoreLabel", () => _reactNative.Animated.timing(this.state.labeled, {
|
|
54
60
|
toValue: 1,
|
|
55
61
|
duration: FOCUS_ANIMATION_DURATION,
|
|
56
62
|
useNativeDriver: true
|
|
57
|
-
}).start();
|
|
63
|
+
}).start());
|
|
58
64
|
|
|
59
|
-
this
|
|
65
|
+
_defineProperty(this, "_minmizeLabel", () => _reactNative.Animated.timing(this.state.labeled, {
|
|
60
66
|
toValue: 0,
|
|
61
67
|
duration: BLUR_ANIMATION_DURATION,
|
|
62
68
|
useNativeDriver: true
|
|
63
|
-
}).start();
|
|
69
|
+
}).start());
|
|
64
70
|
|
|
65
|
-
this
|
|
71
|
+
_defineProperty(this, "_handleFocus", () => {
|
|
66
72
|
if (this.props.disabled) {
|
|
67
73
|
return;
|
|
68
74
|
}
|
|
@@ -70,9 +76,9 @@ class TextField extends React.Component {
|
|
|
70
76
|
this.setState({
|
|
71
77
|
focused: true
|
|
72
78
|
});
|
|
73
|
-
};
|
|
79
|
+
});
|
|
74
80
|
|
|
75
|
-
this
|
|
81
|
+
_defineProperty(this, "_handleBlur", () => {
|
|
76
82
|
if (this.props.disabled) {
|
|
77
83
|
return;
|
|
78
84
|
}
|
|
@@ -80,9 +86,9 @@ class TextField extends React.Component {
|
|
|
80
86
|
this.setState({
|
|
81
87
|
focused: false
|
|
82
88
|
});
|
|
83
|
-
};
|
|
89
|
+
});
|
|
84
90
|
|
|
85
|
-
this
|
|
91
|
+
_defineProperty(this, "_handleChangeText", value => {
|
|
86
92
|
if (this.props.disabled) {
|
|
87
93
|
return;
|
|
88
94
|
}
|
|
@@ -98,9 +104,9 @@ class TextField extends React.Component {
|
|
|
98
104
|
});
|
|
99
105
|
this.props.onChangeText && this.props.onChangeText(value.nativeEvent.text);
|
|
100
106
|
}
|
|
101
|
-
};
|
|
107
|
+
});
|
|
102
108
|
|
|
103
|
-
this
|
|
109
|
+
_defineProperty(this, "_root", undefined);
|
|
104
110
|
}
|
|
105
111
|
|
|
106
112
|
static getDerivedStateFromProps(nextProps, prevState) {
|
|
@@ -151,11 +157,10 @@ class TextField extends React.Component {
|
|
|
151
157
|
focused: !prevState.focused
|
|
152
158
|
}));
|
|
153
159
|
}
|
|
160
|
+
|
|
154
161
|
/**
|
|
155
162
|
* @internal
|
|
156
163
|
*/
|
|
157
|
-
|
|
158
|
-
|
|
159
164
|
setNativeProps(args) {
|
|
160
165
|
return this._root && this._root.setNativeProps(args);
|
|
161
166
|
}
|
|
@@ -198,8 +203,7 @@ class TextField extends React.Component {
|
|
|
198
203
|
roundness,
|
|
199
204
|
disabledOpacity
|
|
200
205
|
},
|
|
201
|
-
render = props => /*#__PURE__*/React.createElement(_reactNative.TextInput,
|
|
202
|
-
}),
|
|
206
|
+
render = props => /*#__PURE__*/React.createElement(_reactNative.TextInput, props),
|
|
203
207
|
...rest
|
|
204
208
|
} = this.props;
|
|
205
209
|
const MINIMIZED_LABEL_Y_OFFSET = -(typography.caption.lineHeight + 4);
|
|
@@ -353,9 +357,9 @@ class TextField extends React.Component {
|
|
|
353
357
|
|
|
354
358
|
return /*#__PURE__*/React.createElement(_reactNative.View, {
|
|
355
359
|
style: [styles.container, styleProp]
|
|
356
|
-
}, leftIconName && leftIconMode === "outset" ? /*#__PURE__*/React.createElement(Icon, {
|
|
360
|
+
}, leftIconName && leftIconMode === "outset" ? /*#__PURE__*/React.createElement(Icon, _extends({}, leftIconProps, {
|
|
357
361
|
style: leftIconStyle
|
|
358
|
-
}) : null, /*#__PURE__*/React.createElement(_reactNative.View, {
|
|
362
|
+
})) : null, /*#__PURE__*/React.createElement(_reactNative.View, {
|
|
359
363
|
style: (0, _utilities.applyStyles)([containerStyle], {
|
|
360
364
|
height: style === null || style === void 0 ? void 0 : style.height,
|
|
361
365
|
backgroundColor: bgColor,
|
|
@@ -422,9 +426,9 @@ class TextField extends React.Component {
|
|
|
422
426
|
style: {
|
|
423
427
|
justifyContent: type === "solid" ? "center" : undefined
|
|
424
428
|
}
|
|
425
|
-
}, /*#__PURE__*/React.createElement(Icon, {
|
|
429
|
+
}, /*#__PURE__*/React.createElement(Icon, _extends({}, leftIconProps, {
|
|
426
430
|
style: leftIconStyle
|
|
427
|
-
})) : null, render({
|
|
431
|
+
}))) : null, render({
|
|
428
432
|
ref: c => {
|
|
429
433
|
this._root = c;
|
|
430
434
|
},
|
|
@@ -465,43 +469,6 @@ var _default = (0, _theming.withTheme)(TextField);
|
|
|
465
469
|
|
|
466
470
|
exports.default = _default;
|
|
467
471
|
|
|
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
|
-
|
|
505
472
|
const styles = _reactNative.StyleSheet.create({
|
|
506
473
|
container: {
|
|
507
474
|
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 =
|
|
12
|
+
const DEFAULT_STATUSBAR_HEIGHT_EXPO = expo !== null && expo !== 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,
|
package/lib/commonjs/index.js
CHANGED
|
@@ -54,7 +54,7 @@ Object.defineProperty(exports, "Banner", {
|
|
|
54
54
|
Object.defineProperty(exports, "Button", {
|
|
55
55
|
enumerable: true,
|
|
56
56
|
get: function () {
|
|
57
|
-
return
|
|
57
|
+
return _Button.Button;
|
|
58
58
|
}
|
|
59
59
|
});
|
|
60
60
|
Object.defineProperty(exports, "ButtonOutline", {
|
|
@@ -476,8 +476,6 @@ var _Layout = require("./components/Layout");
|
|
|
476
476
|
|
|
477
477
|
var _index = require("./components/RadioButton/index");
|
|
478
478
|
|
|
479
|
-
var _DeprecatedButton = _interopRequireDefault(require("./components/DeprecatedButton"));
|
|
480
|
-
|
|
481
479
|
var _CardBlock = _interopRequireDefault(require("./components/CardBlock"));
|
|
482
480
|
|
|
483
481
|
var _CardContainer = _interopRequireDefault(require("./components/CardContainer"));
|
|
@@ -25,7 +25,9 @@ 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
|
|
28
29
|
handlerPropName: "onPress",
|
|
30
|
+
// the change handler prop in this component
|
|
29
31
|
valuePropName: "rating" // the value prop in this component
|
|
30
32
|
|
|
31
33
|
}),
|
|
@@ -50,10 +52,4 @@ const SEED_DATA = {
|
|
|
50
52
|
})
|
|
51
53
|
}
|
|
52
54
|
};
|
|
53
|
-
exports.SEED_DATA = SEED_DATA;pes.createColorProp)({
|
|
54
|
-
label: "Inactive Color",
|
|
55
|
-
defaultValue: "divider"
|
|
56
|
-
})
|
|
57
|
-
}
|
|
58
|
-
};
|
|
59
55
|
exports.SEED_DATA = SEED_DATA;
|
|
@@ -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 { Button, Text, View, StyleSheet, Animated } from "react-native";
|
|
5
3
|
import Surface from "./Surface";
|
|
@@ -74,9 +72,9 @@ const Banner = _ref => {
|
|
|
74
72
|
|
|
75
73
|
const height = Animated.multiply(position, layout.height);
|
|
76
74
|
const translateY = Animated.multiply(Animated.add(position, -1), layout.height);
|
|
77
|
-
return /*#__PURE__*/React.createElement(Surface,
|
|
75
|
+
return /*#__PURE__*/React.createElement(Surface, { ...rest,
|
|
78
76
|
style: [styles.container, shadow(ELEVATION), style]
|
|
79
|
-
}
|
|
77
|
+
}, /*#__PURE__*/React.createElement(View, {
|
|
80
78
|
style: [styles.wrapper, contentStyle]
|
|
81
79
|
}, /*#__PURE__*/React.createElement(Animated.View, {
|
|
82
80
|
style: {
|
|
@@ -155,4 +153,26 @@ const styles = StyleSheet.create({
|
|
|
155
153
|
margin: 8
|
|
156
154
|
}
|
|
157
155
|
});
|
|
156
|
+
export default withTheme(Banner);00%"
|
|
157
|
+
},
|
|
158
|
+
content: {
|
|
159
|
+
flexDirection: "row",
|
|
160
|
+
justifyContent: "flex-start",
|
|
161
|
+
marginHorizontal: 8,
|
|
162
|
+
marginTop: 16,
|
|
163
|
+
marginBottom: 0
|
|
164
|
+
},
|
|
165
|
+
icon: {
|
|
166
|
+
margin: 8
|
|
167
|
+
},
|
|
168
|
+
message: {
|
|
169
|
+
flex: 1,
|
|
170
|
+
margin: 8
|
|
171
|
+
},
|
|
172
|
+
actions: {
|
|
173
|
+
flexDirection: "row",
|
|
174
|
+
justifyContent: "flex-end",
|
|
175
|
+
margin: 8
|
|
176
|
+
}
|
|
177
|
+
});
|
|
158
178
|
export default withTheme(Banner);
|
|
@@ -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 { View, Animated, Text, StyleSheet, I18nManager, TextInput as NativeTextInput } from "react-native";
|
|
5
3
|
import { useSafeAreaInsets } from "react-native-safe-area-context";
|
|
@@ -262,9 +260,9 @@ const DatePicker = _ref => {
|
|
|
262
260
|
pointerEvents: "none"
|
|
263
261
|
}, /*#__PURE__*/React.createElement(View, {
|
|
264
262
|
style: [styles.container, style]
|
|
265
|
-
}, leftIconName && leftIconMode === "outset" ? /*#__PURE__*/React.createElement(Icon,
|
|
263
|
+
}, leftIconName && leftIconMode === "outset" ? /*#__PURE__*/React.createElement(Icon, { ...leftIconProps,
|
|
266
264
|
style: leftIconStyle
|
|
267
|
-
})
|
|
265
|
+
}) : null, /*#__PURE__*/React.createElement(View, {
|
|
268
266
|
style: [containerStyle, style ? {
|
|
269
267
|
height: style.height
|
|
270
268
|
} : {}]
|
|
@@ -312,11 +310,11 @@ const DatePicker = _ref => {
|
|
|
312
310
|
opacity: hasActiveOutline ? labeled : 1
|
|
313
311
|
}],
|
|
314
312
|
numberOfLines: 1
|
|
315
|
-
}, label)) : null, leftIconName && leftIconMode === "inset" ? /*#__PURE__*/React.createElement(Icon,
|
|
313
|
+
}, label)) : null, leftIconName && leftIconMode === "inset" ? /*#__PURE__*/React.createElement(Icon, { ...leftIconProps,
|
|
316
314
|
style: { ...leftIconStyle,
|
|
317
315
|
marginLeft: type === "solid" ? 16 : 0
|
|
318
316
|
}
|
|
319
|
-
})
|
|
317
|
+
}) : null, /*#__PURE__*/React.createElement(NativeTextInput, {
|
|
320
318
|
value: formatDate(),
|
|
321
319
|
placeholder: label ? placeholder1 : placeholder,
|
|
322
320
|
editable: !disabled,
|
|
@@ -325,8 +323,9 @@ const DatePicker = _ref => {
|
|
|
325
323
|
onFocus: _handleFocus,
|
|
326
324
|
onBlur: _handleBlur,
|
|
327
325
|
underlineColorAndroid: "transparent",
|
|
328
|
-
style: inputStyles
|
|
329
|
-
|
|
326
|
+
style: inputStyles,
|
|
327
|
+
...props
|
|
328
|
+
})), rightIconName ? /*#__PURE__*/React.createElement(Icon, {
|
|
330
329
|
name: rightIconName,
|
|
331
330
|
size: ICON_SIZE,
|
|
332
331
|
color: colors.light,
|
|
@@ -1,11 +1,9 @@
|
|
|
1
|
-
function _extends() { _extends = Object.assign ? Object.assign.bind() : function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; return _extends.apply(this, arguments); }
|
|
2
|
-
|
|
3
1
|
import * as React from "react";
|
|
4
2
|
import { Animated, StyleSheet, View } from "react-native";
|
|
5
3
|
import shadow from "../styles/shadow";
|
|
6
4
|
import { withTheme } from "../theming";
|
|
7
|
-
|
|
8
5
|
/* directly copied from https://github.com/callstack/react-native-paper/blob/main/src/components/Surface.tsx#L62 */
|
|
6
|
+
|
|
9
7
|
const Elevation = _ref => {
|
|
10
8
|
let {
|
|
11
9
|
style,
|
|
@@ -21,7 +19,20 @@ const Elevation = _ref => {
|
|
|
21
19
|
colors
|
|
22
20
|
} = theme;
|
|
23
21
|
const borderRadius = radius;
|
|
24
|
-
return /*#__PURE__*/React.createElement(Animated.View,
|
|
22
|
+
return /*#__PURE__*/React.createElement(Animated.View, { ...rest,
|
|
23
|
+
style: [{
|
|
24
|
+
borderRadius,
|
|
25
|
+
backgroundColor: colors.surface
|
|
26
|
+
}, elevation ? shadow(elevation) : null, style]
|
|
27
|
+
}, /*#__PURE__*/React.createElement(View, {
|
|
28
|
+
style: {
|
|
29
|
+
overflow: "hidden",
|
|
30
|
+
borderRadius
|
|
31
|
+
}
|
|
32
|
+
}, children));
|
|
33
|
+
};
|
|
34
|
+
|
|
35
|
+
export default withTheme(Elevation);__*/React.createElement(Animated.View, _extends({}, rest, {
|
|
25
36
|
style: [{
|
|
26
37
|
borderRadius,
|
|
27
38
|
backgroundColor: colors.surface
|
|
@@ -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
|
/* README: Internal Image component used for stuff like Card. DO NOT EXPORT! */
|
|
4
2
|
import React from "react";
|
|
5
3
|
import { Image as NativeImage, StyleSheet } from "react-native";
|
|
@@ -64,7 +62,24 @@ const Image = _ref2 => {
|
|
|
64
62
|
height,
|
|
65
63
|
aspectRatio
|
|
66
64
|
}]
|
|
67
|
-
}, /*#__PURE__*/React.createElement(NativeImage,
|
|
65
|
+
}, /*#__PURE__*/React.createElement(NativeImage, { ...props,
|
|
66
|
+
source: imageSource,
|
|
67
|
+
resizeMode: resizeMode,
|
|
68
|
+
style: [style, {
|
|
69
|
+
height: "100%",
|
|
70
|
+
width: "100%"
|
|
71
|
+
}]
|
|
72
|
+
}));
|
|
73
|
+
}
|
|
74
|
+
|
|
75
|
+
return /*#__PURE__*/React.createElement(NativeImage, { ...props,
|
|
76
|
+
source: source,
|
|
77
|
+
resizeMode: resizeMode,
|
|
78
|
+
style: style
|
|
79
|
+
});
|
|
80
|
+
};
|
|
81
|
+
|
|
82
|
+
export default Image;ent(NativeImage, _extends({}, props, {
|
|
68
83
|
source: imageSource,
|
|
69
84
|
resizeMode: resizeMode,
|
|
70
85
|
style: [style, {
|
|
@@ -1,3 +1,5 @@
|
|
|
1
|
+
function _defineProperty(obj, key, value) { if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; }
|
|
2
|
+
|
|
1
3
|
import * as React from "react";
|
|
2
4
|
import { View, StyleSheet } from "react-native";
|
|
3
5
|
import PortalManager from "./PortalManager";
|
|
@@ -31,11 +33,11 @@ export default class PortalHost extends React.Component {
|
|
|
31
33
|
constructor() {
|
|
32
34
|
super(...arguments);
|
|
33
35
|
|
|
34
|
-
this
|
|
36
|
+
_defineProperty(this, "setManager", manager => {
|
|
35
37
|
this.manager = manager;
|
|
36
|
-
};
|
|
38
|
+
});
|
|
37
39
|
|
|
38
|
-
this
|
|
40
|
+
_defineProperty(this, "mount", children => {
|
|
39
41
|
const key = this.nextKey++;
|
|
40
42
|
|
|
41
43
|
if (this.manager) {
|
|
@@ -49,9 +51,9 @@ export default class PortalHost extends React.Component {
|
|
|
49
51
|
}
|
|
50
52
|
|
|
51
53
|
return key;
|
|
52
|
-
};
|
|
54
|
+
});
|
|
53
55
|
|
|
54
|
-
this
|
|
56
|
+
_defineProperty(this, "update", (key, children) => {
|
|
55
57
|
if (this.manager) {
|
|
56
58
|
this.manager.update(key, children);
|
|
57
59
|
} else {
|
|
@@ -69,9 +71,9 @@ export default class PortalHost extends React.Component {
|
|
|
69
71
|
this.queue.push(op);
|
|
70
72
|
}
|
|
71
73
|
}
|
|
72
|
-
};
|
|
74
|
+
});
|
|
73
75
|
|
|
74
|
-
this
|
|
76
|
+
_defineProperty(this, "unmount", key => {
|
|
75
77
|
if (this.manager) {
|
|
76
78
|
this.manager.unmount(key);
|
|
77
79
|
} else {
|
|
@@ -80,10 +82,13 @@ export default class PortalHost extends React.Component {
|
|
|
80
82
|
key
|
|
81
83
|
});
|
|
82
84
|
}
|
|
83
|
-
};
|
|
85
|
+
});
|
|
86
|
+
|
|
87
|
+
_defineProperty(this, "nextKey", 0);
|
|
88
|
+
|
|
89
|
+
_defineProperty(this, "queue", []);
|
|
84
90
|
|
|
85
|
-
this
|
|
86
|
-
this.queue = [];
|
|
91
|
+
_defineProperty(this, "manager", void 0);
|
|
87
92
|
}
|
|
88
93
|
|
|
89
94
|
componentDidMount() {
|
|
@@ -127,22 +132,6 @@ export default class PortalHost extends React.Component {
|
|
|
127
132
|
}));
|
|
128
133
|
}
|
|
129
134
|
|
|
130
|
-
}
|
|
131
|
-
PortalHost.displayName = "Portal.Host";
|
|
132
|
-
const styles = StyleSheet.create({
|
|
133
|
-
container: {
|
|
134
|
-
flex: 1
|
|
135
|
-
}
|
|
136
|
-
}); }
|
|
137
|
-
}, /*#__PURE__*/React.createElement(View, {
|
|
138
|
-
style: styles.container,
|
|
139
|
-
collapsable: false,
|
|
140
|
-
pointerEvents: "box-none"
|
|
141
|
-
}, this.props.children), /*#__PURE__*/React.createElement(PortalManager, {
|
|
142
|
-
ref: this.setManager
|
|
143
|
-
}));
|
|
144
|
-
}
|
|
145
|
-
|
|
146
135
|
}
|
|
147
136
|
|
|
148
137
|
_defineProperty(PortalHost, "displayName", "Portal.Host");
|
|
@@ -1,3 +1,5 @@
|
|
|
1
|
+
function _extends() { _extends = Object.assign ? Object.assign.bind() : function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; return _extends.apply(this, arguments); }
|
|
2
|
+
|
|
1
3
|
import * as React from "react";
|
|
2
4
|
import Config from "../Config";
|
|
3
5
|
import IconButton from "../IconButton";
|
|
@@ -32,21 +34,6 @@ const RadioButton = _ref => {
|
|
|
32
34
|
onValueChange === null || onValueChange === void 0 ? void 0 : onValueChange(realValue);
|
|
33
35
|
};
|
|
34
36
|
|
|
35
|
-
return /*#__PURE__*/React.createElement(IconButton, {
|
|
36
|
-
Icon: Icon,
|
|
37
|
-
icon: isSelected ? selectedIcon : unselectedIcon,
|
|
38
|
-
color: isSelected ? color : unselectedColor,
|
|
39
|
-
disabled: disabled,
|
|
40
|
-
onPress: handlePress,
|
|
41
|
-
size: size,
|
|
42
|
-
style: style,
|
|
43
|
-
...rest
|
|
44
|
-
});
|
|
45
|
-
};
|
|
46
|
-
|
|
47
|
-
export default RadioButton; onValueChange(realValue);
|
|
48
|
-
};
|
|
49
|
-
|
|
50
37
|
return /*#__PURE__*/React.createElement(IconButton, _extends({
|
|
51
38
|
Icon: Icon,
|
|
52
39
|
icon: isSelected ? selectedIcon : unselectedIcon,
|
|
@@ -1,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
|
// @ts-nocheck
|
|
4
2
|
import React, { Component } from "react";
|
|
5
3
|
import { View, Text, StyleSheet, Animated, TouchableWithoutFeedback } from "react-native";
|
|
@@ -12,7 +10,7 @@ export default class StepIndicator extends Component {
|
|
|
12
10
|
constructor(props) {
|
|
13
11
|
super(props);
|
|
14
12
|
|
|
15
|
-
|
|
13
|
+
this.renderProgressBarBackground = () => {
|
|
16
14
|
const {
|
|
17
15
|
stepCount,
|
|
18
16
|
direction
|
|
@@ -57,9 +55,9 @@ export default class StepIndicator extends Component {
|
|
|
57
55
|
},
|
|
58
56
|
style: progressBarBackgroundStyle
|
|
59
57
|
});
|
|
60
|
-
}
|
|
58
|
+
};
|
|
61
59
|
|
|
62
|
-
|
|
60
|
+
this.renderProgressBar = () => {
|
|
63
61
|
const {
|
|
64
62
|
stepCount,
|
|
65
63
|
direction
|
|
@@ -91,9 +89,9 @@ export default class StepIndicator extends Component {
|
|
|
91
89
|
return /*#__PURE__*/React.createElement(Animated.View, {
|
|
92
90
|
style: progressBarStyle
|
|
93
91
|
});
|
|
94
|
-
}
|
|
92
|
+
};
|
|
95
93
|
|
|
96
|
-
|
|
94
|
+
this.renderStepIndicator = () => {
|
|
97
95
|
let steps = [];
|
|
98
96
|
const {
|
|
99
97
|
stepCount,
|
|
@@ -126,9 +124,9 @@ export default class StepIndicator extends Component {
|
|
|
126
124
|
height: this.state.customStyles.currentStepIndicatorSize
|
|
127
125
|
}]
|
|
128
126
|
}, steps);
|
|
129
|
-
}
|
|
127
|
+
};
|
|
130
128
|
|
|
131
|
-
|
|
129
|
+
this.renderStepLabels = () => {
|
|
132
130
|
const {
|
|
133
131
|
labels,
|
|
134
132
|
direction,
|
|
@@ -170,9 +168,9 @@ export default class StepIndicator extends Component {
|
|
|
170
168
|
alignItems: this.state.customStyles.labelAlign
|
|
171
169
|
}]
|
|
172
170
|
}, labelViews);
|
|
173
|
-
}
|
|
171
|
+
};
|
|
174
172
|
|
|
175
|
-
|
|
173
|
+
this.renderStep = position => {
|
|
176
174
|
const {
|
|
177
175
|
renderStepIndicator
|
|
178
176
|
} = this.props;
|
|
@@ -244,9 +242,9 @@ export default class StepIndicator extends Component {
|
|
|
244
242
|
}) : /*#__PURE__*/React.createElement(Text, {
|
|
245
243
|
style: indicatorLabelStyle
|
|
246
244
|
}, "".concat(position + 1)));
|
|
247
|
-
}
|
|
245
|
+
};
|
|
248
246
|
|
|
249
|
-
|
|
247
|
+
this.getStepStatus = stepPosition => {
|
|
250
248
|
const {
|
|
251
249
|
currentPosition
|
|
252
250
|
} = this.props;
|
|
@@ -258,9 +256,9 @@ export default class StepIndicator extends Component {
|
|
|
258
256
|
} else {
|
|
259
257
|
return STEP_STATUS.UNFINISHED;
|
|
260
258
|
}
|
|
261
|
-
}
|
|
259
|
+
};
|
|
262
260
|
|
|
263
|
-
|
|
261
|
+
this.onCurrentPositionChanged = position => {
|
|
264
262
|
let {
|
|
265
263
|
stepCount
|
|
266
264
|
} = this.props;
|
|
@@ -282,7 +280,7 @@ export default class StepIndicator extends Component {
|
|
|
282
280
|
toValue: this.state.customStyles.currentStepIndicatorSize / 2,
|
|
283
281
|
duration: 100
|
|
284
282
|
})])]).start();
|
|
285
|
-
}
|
|
283
|
+
};
|
|
286
284
|
|
|
287
285
|
const defaultStyles = {
|
|
288
286
|
stepIndicatorSize: 30,
|
|
@@ -393,6 +391,25 @@ const styles = StyleSheet.create({
|
|
|
393
391
|
justifyContent: "center"
|
|
394
392
|
}
|
|
395
393
|
});
|
|
394
|
+
StepIndicator.defaultProps = {
|
|
395
|
+
currentPosition: 0,
|
|
396
|
+
stepCount: 5,
|
|
397
|
+
customStyles: {},
|
|
398
|
+
direction: "horizontal"
|
|
399
|
+
};s: "center",
|
|
400
|
+
justifyContent: "center"
|
|
401
|
+
},
|
|
402
|
+
stepLabel: {
|
|
403
|
+
fontSize: 12,
|
|
404
|
+
textAlign: "center",
|
|
405
|
+
fontWeight: "500"
|
|
406
|
+
},
|
|
407
|
+
stepLabelItem: {
|
|
408
|
+
flex: 1,
|
|
409
|
+
alignItems: "center",
|
|
410
|
+
justifyContent: "center"
|
|
411
|
+
}
|
|
412
|
+
});
|
|
396
413
|
StepIndicator.defaultProps = {
|
|
397
414
|
currentPosition: 0,
|
|
398
415
|
stepCount: 5,
|
package/lib/module/index.js
CHANGED
|
@@ -4,7 +4,7 @@ export { default as Provider } from "./Provider";
|
|
|
4
4
|
export { default as DefaultTheme } from "./styles/DefaultTheme";
|
|
5
5
|
export { Link } from "./components/Text";
|
|
6
6
|
export { default as Banner } from "./components/Banner";
|
|
7
|
-
export { ButtonSolid, ButtonOutline } from "./components/Button";
|
|
7
|
+
export { Button, ButtonSolid, ButtonOutline } from "./components/Button";
|
|
8
8
|
export { default as Avatar } from "./components/CircleImage";
|
|
9
9
|
export { default as AvatarEdit } from "./components/AvatarEdit";
|
|
10
10
|
export { default as Card } from "./components/Card";
|
|
@@ -33,7 +33,6 @@ export { Center, Circle, Square, Row, Stack, Spacer } from "./components/Layout"
|
|
|
33
33
|
export { RadioButton, RadioButtonGroup, RadioButtonRow, RadioButtonFieldGroup } from "./components/RadioButton/index";
|
|
34
34
|
/* Deprecated: Fix or Delete! */
|
|
35
35
|
|
|
36
|
-
export { default as Button } from "./components/DeprecatedButton";
|
|
37
36
|
export { default as CardBlock } from "./components/CardBlock";
|
|
38
37
|
export { default as CardContainer } from "./components/CardContainer";
|
|
39
38
|
export { default as CardContainerRating } from "./components/CardContainerRating";
|
|
@@ -4,7 +4,7 @@ export { default as Provider } from "./Provider";
|
|
|
4
4
|
export { default as DefaultTheme } from "./styles/DefaultTheme";
|
|
5
5
|
export { Link } from "./components/Text";
|
|
6
6
|
export { default as Banner } from "./components/Banner";
|
|
7
|
-
export { ButtonSolid, ButtonOutline } from "./components/Button";
|
|
7
|
+
export { Button, ButtonSolid, ButtonOutline } from "./components/Button";
|
|
8
8
|
export { default as Avatar } from "./components/CircleImage";
|
|
9
9
|
export { default as AvatarEdit } from "./components/AvatarEdit";
|
|
10
10
|
export { default as Card } from "./components/Card";
|
|
@@ -31,7 +31,6 @@ export { ActionSheet, ActionSheetItem, ActionSheetCancel, } from "./components/A
|
|
|
31
31
|
export { Swiper, SwiperItem } from "./components/Swiper";
|
|
32
32
|
export { Center, Circle, Square, Row, Stack, Spacer, } from "./components/Layout";
|
|
33
33
|
export { RadioButton, RadioButtonGroup, RadioButtonRow, RadioButtonFieldGroup, } from "./components/RadioButton/index";
|
|
34
|
-
export { default as Button } from "./components/DeprecatedButton";
|
|
35
34
|
export { default as CardBlock } from "./components/CardBlock";
|
|
36
35
|
export { default as CardContainer } from "./components/CardContainer";
|
|
37
36
|
export { default as CardContainerRating } from "./components/CardContainerRating";
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@draftbit/core",
|
|
3
|
-
"version": "46.4.
|
|
3
|
+
"version": "46.4.4-d73221.2+d73221d",
|
|
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.4-d73221.2+d73221d",
|
|
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": "d73221d43a4c59a3e3576ae7dd7fd60ce115452c"
|
|
85
85
|
}
|
package/src/components/Button.js
CHANGED
|
@@ -53,6 +53,8 @@ const Solid = ({ style, theme, ...props }) => {
|
|
|
53
53
|
};
|
|
54
54
|
const ButtonSolid = withTheme(Solid);
|
|
55
55
|
export { ButtonSolid };
|
|
56
|
+
const Button = withTheme(Solid);
|
|
57
|
+
export { Button };
|
|
56
58
|
const Outline = ({ style, theme, ...props }) => {
|
|
57
59
|
return (React.createElement(Base, { style: [
|
|
58
60
|
styles.outline,
|
|
@@ -139,6 +139,9 @@ const Solid = ({ style, theme, ...props }: Props): JSX.Element => {
|
|
|
139
139
|
const ButtonSolid: any = withTheme(Solid);
|
|
140
140
|
export { ButtonSolid };
|
|
141
141
|
|
|
142
|
+
const Button: any = withTheme(Solid);
|
|
143
|
+
export { Button };
|
|
144
|
+
|
|
142
145
|
const Outline = ({ style, theme, ...props }: Props): JSX.Element => {
|
|
143
146
|
return (
|
|
144
147
|
<Base
|
package/src/index.js
CHANGED
|
@@ -4,7 +4,7 @@ export { default as Provider } from "./Provider";
|
|
|
4
4
|
export { default as DefaultTheme } from "./styles/DefaultTheme";
|
|
5
5
|
export { Link } from "./components/Text";
|
|
6
6
|
export { default as Banner } from "./components/Banner";
|
|
7
|
-
export { ButtonSolid, ButtonOutline } from "./components/Button";
|
|
7
|
+
export { Button, ButtonSolid, ButtonOutline } from "./components/Button";
|
|
8
8
|
export { default as Avatar } from "./components/CircleImage";
|
|
9
9
|
export { default as AvatarEdit } from "./components/AvatarEdit";
|
|
10
10
|
export { default as Card } from "./components/Card";
|
|
@@ -32,7 +32,6 @@ export { Swiper, SwiperItem } from "./components/Swiper";
|
|
|
32
32
|
export { Center, Circle, Square, Row, Stack, Spacer, } from "./components/Layout";
|
|
33
33
|
export { RadioButton, RadioButtonGroup, RadioButtonRow, RadioButtonFieldGroup, } from "./components/RadioButton/index";
|
|
34
34
|
/* Deprecated: Fix or Delete! */
|
|
35
|
-
export { default as Button } from "./components/DeprecatedButton";
|
|
36
35
|
export { default as CardBlock } from "./components/CardBlock";
|
|
37
36
|
export { default as CardContainer } from "./components/CardContainer";
|
|
38
37
|
export { default as CardContainerRating } from "./components/CardContainerRating";
|
package/src/index.tsx
CHANGED
|
@@ -5,7 +5,7 @@ export { default as DefaultTheme } from "./styles/DefaultTheme";
|
|
|
5
5
|
|
|
6
6
|
export { Link } from "./components/Text";
|
|
7
7
|
export { default as Banner } from "./components/Banner";
|
|
8
|
-
export { ButtonSolid, ButtonOutline } from "./components/Button";
|
|
8
|
+
export { Button, ButtonSolid, ButtonOutline } from "./components/Button";
|
|
9
9
|
export { default as Avatar } from "./components/CircleImage";
|
|
10
10
|
export { default as AvatarEdit } from "./components/AvatarEdit";
|
|
11
11
|
export { default as Card } from "./components/Card";
|
|
@@ -52,7 +52,6 @@ export {
|
|
|
52
52
|
} from "./components/RadioButton/index";
|
|
53
53
|
|
|
54
54
|
/* Deprecated: Fix or Delete! */
|
|
55
|
-
export { default as Button } from "./components/DeprecatedButton";
|
|
56
55
|
export { default as CardBlock } from "./components/CardBlock";
|
|
57
56
|
export { default as CardContainer } from "./components/CardContainer";
|
|
58
57
|
export { default as CardContainerRating } from "./components/CardContainerRating";
|