@draftbit/core 46.2.3 → 46.2.4-2fc21b.3
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/Banner.js +24 -4
- package/lib/commonjs/components/CardContainer.js +15 -5
- package/lib/commonjs/components/Carousel.js +34 -10
- package/lib/commonjs/components/Checkbox/CheckboxGroupRow.js +24 -6
- package/lib/commonjs/components/CircularProgress.js +15 -7
- package/lib/commonjs/components/Config.js +1 -0
- package/lib/commonjs/components/Image.js +16 -3
- package/lib/commonjs/components/NumberInput.js +13 -2
- package/lib/commonjs/components/Portal/PortalManager.js +19 -11
- package/lib/commonjs/components/ProgressBar.js +23 -7
- package/lib/commonjs/components/SVG.js +49 -0
- package/lib/commonjs/components/Slider.js +24 -5
- package/lib/commonjs/components/TextField.js +2 -1
- package/lib/commonjs/components/Touchable.js +16 -2
- package/lib/commonjs/constants.js +1 -1
- package/lib/commonjs/index.js +8 -0
- package/lib/commonjs/mappings/Image.js +2 -2
- package/lib/commonjs/mappings/NumberInput.js +146 -149
- package/lib/commonjs/mappings/SVG.js +23 -0
- package/lib/commonjs/mappings/TextArea.js +188 -193
- package/lib/commonjs/mappings/TextField.js +7 -8
- package/lib/commonjs/mappings/TextInput.js +178 -180
- package/lib/module/components/Config.js +1 -0
- package/lib/module/components/SVG.js +32 -0
- package/lib/module/components/TextField.js +2 -1
- package/lib/module/index.js +1 -0
- package/lib/module/mappings/Image.js +2 -2
- package/lib/module/mappings/NumberInput.js +146 -149
- package/lib/module/mappings/SVG.js +14 -0
- package/lib/module/mappings/TextArea.js +188 -193
- package/lib/module/mappings/TextField.js +7 -8
- package/lib/module/mappings/TextInput.js +178 -180
- package/lib/typescript/src/components/Config.d.ts +1 -0
- package/lib/typescript/src/components/SVG.d.ts +8 -0
- package/lib/typescript/src/components/TextField.d.ts +1 -0
- package/lib/typescript/src/index.d.ts +1 -0
- package/lib/typescript/src/mappings/SVG.d.ts +22 -0
- package/lib/typescript/src/mappings/TextArea.d.ts +42 -42
- package/lib/typescript/src/mappings/TextField.d.ts +120 -110
- package/package.json +4 -3
- package/src/components/Config.js +1 -0
- package/src/components/Config.ts +1 -0
- package/src/components/SVG.js +14 -0
- package/src/components/SVG.tsx +35 -0
- package/src/components/TextField.js +2 -2
- package/src/components/TextField.tsx +3 -1
- package/src/index.js +1 -0
- package/src/index.tsx +1 -0
- package/src/mappings/Image.js +2 -2
- package/src/mappings/Image.ts +2 -2
- package/src/mappings/NumberInput.js +160 -163
- package/src/mappings/NumberInput.ts +165 -168
- package/src/mappings/SVG.js +14 -0
- package/src/mappings/SVG.ts +15 -0
- package/src/mappings/TextArea.js +213 -220
- package/src/mappings/TextArea.ts +219 -227
- package/src/mappings/TextField.js +6 -9
- package/src/mappings/TextField.ts +7 -11
- package/src/mappings/TextInput.js +205 -208
- package/src/mappings/TextInput.ts +212 -215
|
@@ -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;
|
|
@@ -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 ELEVATION = 1;
|
|
27
25
|
const DEFAULT_MAX_WIDTH = 960;
|
|
28
26
|
|
|
@@ -94,9 +92,9 @@ const Banner = _ref => {
|
|
|
94
92
|
|
|
95
93
|
const translateY = _reactNative.Animated.multiply(_reactNative.Animated.add(position, -1), layout.height);
|
|
96
94
|
|
|
97
|
-
return /*#__PURE__*/React.createElement(_Surface.default,
|
|
95
|
+
return /*#__PURE__*/React.createElement(_Surface.default, { ...rest,
|
|
98
96
|
style: [styles.container, (0, _shadow.default)(ELEVATION), style]
|
|
99
|
-
}
|
|
97
|
+
}, /*#__PURE__*/React.createElement(_reactNative.View, {
|
|
100
98
|
style: [styles.wrapper, contentStyle]
|
|
101
99
|
}, /*#__PURE__*/React.createElement(_reactNative.Animated.View, {
|
|
102
100
|
style: {
|
|
@@ -178,4 +176,26 @@ const styles = _reactNative.StyleSheet.create({
|
|
|
178
176
|
|
|
179
177
|
var _default = (0, _theming.withTheme)(Banner);
|
|
180
178
|
|
|
179
|
+
exports.default = _default;ow",
|
|
180
|
+
justifyContent: "flex-start",
|
|
181
|
+
marginHorizontal: 8,
|
|
182
|
+
marginTop: 16,
|
|
183
|
+
marginBottom: 0
|
|
184
|
+
},
|
|
185
|
+
icon: {
|
|
186
|
+
margin: 8
|
|
187
|
+
},
|
|
188
|
+
message: {
|
|
189
|
+
flex: 1,
|
|
190
|
+
margin: 8
|
|
191
|
+
},
|
|
192
|
+
actions: {
|
|
193
|
+
flexDirection: "row",
|
|
194
|
+
justifyContent: "flex-end",
|
|
195
|
+
margin: 8
|
|
196
|
+
}
|
|
197
|
+
});
|
|
198
|
+
|
|
199
|
+
var _default = (0, _theming.withTheme)(Banner);
|
|
200
|
+
|
|
181
201
|
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;
|
|
@@ -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 screenWidth = _reactNative.Dimensions.get("window").width;
|
|
25
23
|
|
|
26
24
|
function Pager(_ref) {
|
|
@@ -50,8 +48,6 @@ function Pager(_ref) {
|
|
|
50
48
|
}
|
|
51
49
|
|
|
52
50
|
function Carousel(_ref2) {
|
|
53
|
-
var _data$length;
|
|
54
|
-
|
|
55
51
|
let {
|
|
56
52
|
data,
|
|
57
53
|
children,
|
|
@@ -59,9 +55,12 @@ function Carousel(_ref2) {
|
|
|
59
55
|
style,
|
|
60
56
|
...rest
|
|
61
57
|
} = _ref2;
|
|
58
|
+
|
|
59
|
+
var _a;
|
|
60
|
+
|
|
62
61
|
const [index, setIndex] = React.useState(0);
|
|
63
62
|
const length = React.Children.count(children);
|
|
64
|
-
const itemsLength = ((
|
|
63
|
+
const itemsLength = ((_a = data === null || data === void 0 ? void 0 : data.length) !== null && _a !== void 0 ? _a : 0) + length;
|
|
65
64
|
const slides = Array.isArray(data) ? data : [];
|
|
66
65
|
|
|
67
66
|
const {
|
|
@@ -71,9 +70,10 @@ function Carousel(_ref2) {
|
|
|
71
70
|
|
|
72
71
|
const slideWidth = width || screenWidth;
|
|
73
72
|
const slideHeight = height || 250;
|
|
74
|
-
return /*#__PURE__*/React.createElement(_reactNative.View,
|
|
75
|
-
style: [styles.container, style]
|
|
76
|
-
|
|
73
|
+
return /*#__PURE__*/React.createElement(_reactNative.View, {
|
|
74
|
+
style: [styles.container, style],
|
|
75
|
+
...rest
|
|
76
|
+
}, /*#__PURE__*/React.createElement(_reactNative.ScrollView, {
|
|
77
77
|
pagingEnabled: true,
|
|
78
78
|
horizontal: true,
|
|
79
79
|
decelerationRate: "fast",
|
|
@@ -101,9 +101,9 @@ function Carousel(_ref2) {
|
|
|
101
101
|
}]
|
|
102
102
|
});
|
|
103
103
|
}) : null, React.Children.map(children, child => {
|
|
104
|
-
var
|
|
104
|
+
var _a;
|
|
105
105
|
|
|
106
|
-
const s = (child === null || child === void 0 ? void 0 :
|
|
106
|
+
const s = ((_a = child === null || child === void 0 ? void 0 : child.props) === null || _a === void 0 ? void 0 : _a.style) || {};
|
|
107
107
|
return /*#__PURE__*/React.createElement(_reactNative.View, {
|
|
108
108
|
style: {
|
|
109
109
|
width: slideWidth
|
|
@@ -144,4 +144,28 @@ const styles = _reactNative.StyleSheet.create({
|
|
|
144
144
|
|
|
145
145
|
var _default = (0, _theming.withTheme)(Carousel);
|
|
146
146
|
|
|
147
|
+
exports.default = _default;e({
|
|
148
|
+
container: {
|
|
149
|
+
backgroundColor: "#eee"
|
|
150
|
+
},
|
|
151
|
+
pager: {
|
|
152
|
+
position: "absolute",
|
|
153
|
+
bottom: 12,
|
|
154
|
+
left: 0,
|
|
155
|
+
right: 0,
|
|
156
|
+
flexDirection: "row",
|
|
157
|
+
justifyContent: "center",
|
|
158
|
+
alignItems: "center"
|
|
159
|
+
},
|
|
160
|
+
bullet: {
|
|
161
|
+
marginHorizontal: 2,
|
|
162
|
+
width: 10,
|
|
163
|
+
height: 10,
|
|
164
|
+
borderRadius: 20,
|
|
165
|
+
backgroundColor: "#000"
|
|
166
|
+
}
|
|
167
|
+
});
|
|
168
|
+
|
|
169
|
+
var _default = (0, _theming.withTheme)(Carousel);
|
|
170
|
+
|
|
147
171
|
exports.default = _default;
|
|
@@ -25,9 +25,7 @@ function _getRequireWildcardCache(nodeInterop) { if (typeof WeakMap !== "functio
|
|
|
25
25
|
|
|
26
26
|
function _interopRequireWildcard(obj, nodeInterop) { if (!nodeInterop && obj && obj.__esModule) { return obj; } if (obj === null || typeof obj !== "object" && typeof obj !== "function") { return { default: obj }; } var cache = _getRequireWildcardCache(nodeInterop); if (cache && cache.has(obj)) { return cache.get(obj); } var newObj = {}; var hasPropertyDescriptor = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var key in obj) { if (key !== "default" && Object.prototype.hasOwnProperty.call(obj, key)) { var desc = hasPropertyDescriptor ? Object.getOwnPropertyDescriptor(obj, key) : null; if (desc && (desc.get || desc.set)) { Object.defineProperty(newObj, key, desc); } else { newObj[key] = obj[key]; } } } newObj.default = obj; if (cache) { cache.set(obj, newObj); } return newObj; }
|
|
27
27
|
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
let Direction;
|
|
28
|
+
var Direction;
|
|
31
29
|
exports.Direction = Direction;
|
|
32
30
|
|
|
33
31
|
(function (Direction) {
|
|
@@ -91,13 +89,14 @@ const CheckboxGroupRow = _ref => {
|
|
|
91
89
|
textStyles,
|
|
92
90
|
viewStyles
|
|
93
91
|
} = (0, _utilities.extractStyles)(style);
|
|
94
|
-
return /*#__PURE__*/React.createElement(_Touchable.default,
|
|
92
|
+
return /*#__PURE__*/React.createElement(_Touchable.default, {
|
|
95
93
|
onPress: handlePress,
|
|
96
94
|
style: [styles.mainParent, {
|
|
97
95
|
flexDirection: direction
|
|
98
96
|
}, viewStyles],
|
|
99
|
-
disabled: disabled
|
|
100
|
-
|
|
97
|
+
disabled: disabled,
|
|
98
|
+
...rest
|
|
99
|
+
}, /*#__PURE__*/React.createElement(_reactNative.View, {
|
|
101
100
|
style: [styles.label, {
|
|
102
101
|
alignItems: direction === Direction.Row ? "flex-start" : "flex-end"
|
|
103
102
|
}, labelContainerStyle]
|
|
@@ -137,5 +136,24 @@ const styles = _reactNative.StyleSheet.create({
|
|
|
137
136
|
}
|
|
138
137
|
});
|
|
139
138
|
|
|
139
|
+
var _default = CheckboxGroupRow;
|
|
140
|
+
exports.default = _default;center",
|
|
141
|
+
justifyContent: "space-around",
|
|
142
|
+
paddingStart: 20,
|
|
143
|
+
minHeight: 50,
|
|
144
|
+
paddingEnd: 20,
|
|
145
|
+
display: "flex",
|
|
146
|
+
..._reactNative.Platform.select({
|
|
147
|
+
web: {
|
|
148
|
+
cursor: "pointer",
|
|
149
|
+
userSelect: "none"
|
|
150
|
+
}
|
|
151
|
+
})
|
|
152
|
+
},
|
|
153
|
+
label: {
|
|
154
|
+
flex: 3
|
|
155
|
+
}
|
|
156
|
+
});
|
|
157
|
+
|
|
140
158
|
var _default = CheckboxGroupRow;
|
|
141
159
|
exports.default = _default;
|
|
@@ -13,29 +13,27 @@ var _reactNativeSvg = require("react-native-svg");
|
|
|
13
13
|
|
|
14
14
|
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
|
|
15
15
|
|
|
16
|
-
function _defineProperty(obj, key, value) { if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; }
|
|
17
|
-
|
|
18
16
|
class CircularProgress extends _react.default.Component {
|
|
19
17
|
constructor() {
|
|
20
18
|
super(...arguments);
|
|
21
19
|
|
|
22
|
-
|
|
20
|
+
this.polarToCartesian = (centerX, centerY, radius, angleInDegrees) => {
|
|
23
21
|
var angleInRadians = (angleInDegrees - 90) * Math.PI / 180.0;
|
|
24
22
|
return {
|
|
25
23
|
x: centerX + radius * Math.cos(angleInRadians),
|
|
26
24
|
y: centerY + radius * Math.sin(angleInRadians)
|
|
27
25
|
};
|
|
28
|
-
}
|
|
26
|
+
};
|
|
29
27
|
|
|
30
|
-
|
|
28
|
+
this.circlePath = (x, y, radius, startAngle, endAngle) => {
|
|
31
29
|
var start = this.polarToCartesian(x, y, radius, endAngle * 0.9999);
|
|
32
30
|
var end = this.polarToCartesian(x, y, radius, startAngle);
|
|
33
31
|
var largeArcFlag = endAngle - startAngle <= 180 ? "0" : "1";
|
|
34
32
|
var d = ["M", start.x, start.y, "A", radius, radius, 0, largeArcFlag, 0, end.x, end.y];
|
|
35
33
|
return d.join(" ");
|
|
36
|
-
}
|
|
34
|
+
};
|
|
37
35
|
|
|
38
|
-
|
|
36
|
+
this.clampFill = fill => Math.min(100, Math.max(0, fill));
|
|
39
37
|
}
|
|
40
38
|
|
|
41
39
|
render() {
|
|
@@ -118,5 +116,15 @@ class CircularProgress extends _react.default.Component {
|
|
|
118
116
|
|
|
119
117
|
}
|
|
120
118
|
|
|
119
|
+
var _default = CircularProgress;
|
|
120
|
+
exports.default = _default;okeDasharrayTint,
|
|
121
|
+
fill: "transparent"
|
|
122
|
+
}), cap)), children && /*#__PURE__*/_react.default.createElement(_reactNative.View, {
|
|
123
|
+
style: localChildrenContainerStyle
|
|
124
|
+
}, children(fill)));
|
|
125
|
+
}
|
|
126
|
+
|
|
127
|
+
}
|
|
128
|
+
|
|
121
129
|
var _default = CircularProgress;
|
|
122
130
|
exports.default = _default;
|
|
@@ -15,8 +15,7 @@ var _AspectRatio = _interopRequireDefault(require("./AspectRatio"));
|
|
|
15
15
|
|
|
16
16
|
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
|
|
17
17
|
|
|
18
|
-
|
|
19
|
-
|
|
18
|
+
/* README: Internal Image component used for stuff like Card. DO NOT EXPORT! */
|
|
20
19
|
const generateDimensions = _ref => {
|
|
21
20
|
let {
|
|
22
21
|
aspectRatio,
|
|
@@ -77,13 +76,27 @@ const Image = _ref2 => {
|
|
|
77
76
|
height,
|
|
78
77
|
aspectRatio
|
|
79
78
|
}]
|
|
80
|
-
}, /*#__PURE__*/_react.default.createElement(_reactNative.Image,
|
|
79
|
+
}, /*#__PURE__*/_react.default.createElement(_reactNative.Image, { ...props,
|
|
81
80
|
source: imageSource,
|
|
82
81
|
resizeMode: resizeMode,
|
|
83
82
|
style: [style, {
|
|
84
83
|
height: "100%",
|
|
85
84
|
width: "100%"
|
|
86
85
|
}]
|
|
86
|
+
}));
|
|
87
|
+
}
|
|
88
|
+
|
|
89
|
+
return /*#__PURE__*/_react.default.createElement(_reactNative.Image, { ...props,
|
|
90
|
+
source: source,
|
|
91
|
+
resizeMode: resizeMode,
|
|
92
|
+
style: style
|
|
93
|
+
});
|
|
94
|
+
};
|
|
95
|
+
|
|
96
|
+
var _default = Image;
|
|
97
|
+
exports.default = _default; height: "100%",
|
|
98
|
+
width: "100%"
|
|
99
|
+
}]
|
|
87
100
|
})));
|
|
88
101
|
}
|
|
89
102
|
|
|
@@ -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",
|
|
@@ -13,29 +13,26 @@ function _getRequireWildcardCache(nodeInterop) { if (typeof WeakMap !== "functio
|
|
|
13
13
|
|
|
14
14
|
function _interopRequireWildcard(obj, nodeInterop) { if (!nodeInterop && obj && obj.__esModule) { return obj; } if (obj === null || typeof obj !== "object" && typeof obj !== "function") { return { default: obj }; } var cache = _getRequireWildcardCache(nodeInterop); if (cache && cache.has(obj)) { return cache.get(obj); } var newObj = {}; var hasPropertyDescriptor = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var key in obj) { if (key !== "default" && Object.prototype.hasOwnProperty.call(obj, key)) { var desc = hasPropertyDescriptor ? Object.getOwnPropertyDescriptor(obj, key) : null; if (desc && (desc.get || desc.set)) { Object.defineProperty(newObj, key, desc); } else { newObj[key] = obj[key]; } } } newObj.default = obj; if (cache) { cache.set(obj, newObj); } return newObj; }
|
|
15
15
|
|
|
16
|
-
function _defineProperty(obj, key, value) { if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; }
|
|
17
|
-
|
|
18
16
|
/**
|
|
19
17
|
* Portal host is the component which actually renders all Portals.
|
|
20
18
|
*/
|
|
21
19
|
class PortalManager extends React.PureComponent {
|
|
22
20
|
constructor() {
|
|
23
21
|
super(...arguments);
|
|
24
|
-
|
|
25
|
-
_defineProperty(this, "state", {
|
|
22
|
+
this.state = {
|
|
26
23
|
portals: []
|
|
27
|
-
}
|
|
24
|
+
};
|
|
28
25
|
|
|
29
|
-
|
|
26
|
+
this.mount = (key, children) => {
|
|
30
27
|
this.setState(state => ({
|
|
31
28
|
portals: [...state.portals, {
|
|
32
29
|
key,
|
|
33
30
|
children
|
|
34
31
|
}]
|
|
35
32
|
}));
|
|
36
|
-
}
|
|
33
|
+
};
|
|
37
34
|
|
|
38
|
-
|
|
35
|
+
this.update = (key, children) => this.setState(state => ({
|
|
39
36
|
portals: state.portals.map(item => {
|
|
40
37
|
if (item.key === key) {
|
|
41
38
|
return { ...item,
|
|
@@ -45,11 +42,11 @@ class PortalManager extends React.PureComponent {
|
|
|
45
42
|
|
|
46
43
|
return item;
|
|
47
44
|
})
|
|
48
|
-
}))
|
|
45
|
+
}));
|
|
49
46
|
|
|
50
|
-
|
|
47
|
+
this.unmount = key => this.setState(state => ({
|
|
51
48
|
portals: state.portals.filter(item => item.key !== key)
|
|
52
|
-
}))
|
|
49
|
+
}));
|
|
53
50
|
}
|
|
54
51
|
|
|
55
52
|
render() {
|
|
@@ -71,4 +68,15 @@ class PortalManager extends React.PureComponent {
|
|
|
71
68
|
|
|
72
69
|
}
|
|
73
70
|
|
|
71
|
+
exports.default = PortalManager;le: false
|
|
72
|
+
/* Need collapsable=false here to clip the elevations, otherwise they appear above sibling components */
|
|
73
|
+
,
|
|
74
|
+
pointerEvents: "box-none",
|
|
75
|
+
style: _reactNative.StyleSheet.absoluteFill
|
|
76
|
+
}, children);
|
|
77
|
+
});
|
|
78
|
+
}
|
|
79
|
+
|
|
80
|
+
}
|
|
81
|
+
|
|
74
82
|
exports.default = PortalManager;
|
|
@@ -13,10 +13,6 @@ function _getRequireWildcardCache(nodeInterop) { if (typeof WeakMap !== "functio
|
|
|
13
13
|
|
|
14
14
|
function _interopRequireWildcard(obj, nodeInterop) { if (!nodeInterop && obj && obj.__esModule) { return obj; } if (obj === null || typeof obj !== "object" && typeof obj !== "function") { return { default: obj }; } var cache = _getRequireWildcardCache(nodeInterop); if (cache && cache.has(obj)) { return cache.get(obj); } var newObj = {}; var hasPropertyDescriptor = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var key in obj) { if (key !== "default" && Object.prototype.hasOwnProperty.call(obj, key)) { var desc = hasPropertyDescriptor ? Object.getOwnPropertyDescriptor(obj, key) : null; if (desc && (desc.get || desc.set)) { Object.defineProperty(newObj, key, desc); } else { newObj[key] = obj[key]; } } } newObj.default = obj; if (cache) { cache.set(obj, newObj); } return newObj; }
|
|
15
15
|
|
|
16
|
-
function _extends() { _extends = Object.assign ? Object.assign.bind() : function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; return _extends.apply(this, arguments); }
|
|
17
|
-
|
|
18
|
-
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; }
|
|
19
|
-
|
|
20
16
|
const INDETERMINATE_WIDTH_FACTOR = 0.3;
|
|
21
17
|
const BAR_WIDTH_ZERO_POSITION = INDETERMINATE_WIDTH_FACTOR / (1 + INDETERMINATE_WIDTH_FACTOR);
|
|
22
18
|
|
|
@@ -24,7 +20,7 @@ class ProgressBar extends _react.Component {
|
|
|
24
20
|
constructor(props) {
|
|
25
21
|
super(props);
|
|
26
22
|
|
|
27
|
-
|
|
23
|
+
this.handleLayout = event => {
|
|
28
24
|
const {
|
|
29
25
|
width = 150,
|
|
30
26
|
onLayout
|
|
@@ -39,7 +35,7 @@ class ProgressBar extends _react.Component {
|
|
|
39
35
|
if (onLayout) {
|
|
40
36
|
onLayout(event);
|
|
41
37
|
}
|
|
42
|
-
}
|
|
38
|
+
};
|
|
43
39
|
|
|
44
40
|
const {
|
|
45
41
|
progress: progressP = 0,
|
|
@@ -93,7 +89,6 @@ class ProgressBar extends _react.Component {
|
|
|
93
89
|
_reactNative.Animated[animationType](this.state.progress, { ...animationConfig,
|
|
94
90
|
toValue: progress,
|
|
95
91
|
velocity: 0,
|
|
96
|
-
//adjust this value if animation fails - velocity is required
|
|
97
92
|
useNativeDriver
|
|
98
93
|
}).start();
|
|
99
94
|
} else {
|
|
@@ -165,6 +160,27 @@ class ProgressBar extends _react.Component {
|
|
|
165
160
|
})
|
|
166
161
|
}]
|
|
167
162
|
};
|
|
163
|
+
return /*#__PURE__*/_react.default.createElement(_reactNative.View, {
|
|
164
|
+
style: [containerStyle, style],
|
|
165
|
+
onLayout: this.handleLayout,
|
|
166
|
+
...restProps
|
|
167
|
+
}, /*#__PURE__*/_react.default.createElement(_reactNative.Animated.View, {
|
|
168
|
+
style: progressStyle
|
|
169
|
+
}), children);
|
|
170
|
+
}
|
|
171
|
+
|
|
172
|
+
}
|
|
173
|
+
|
|
174
|
+
exports.default = ProgressBar;h / (_reactNative.I18nManager.isRTL ? 2 : -2), 0]
|
|
175
|
+
})
|
|
176
|
+
}, {
|
|
177
|
+
// Interpolation a temp workaround for https://github.com/facebook/react-native/issues/6278
|
|
178
|
+
scaleX: this.state.progress.interpolate({
|
|
179
|
+
inputRange: [0, 1],
|
|
180
|
+
outputRange: [0.0001, 1]
|
|
181
|
+
})
|
|
182
|
+
}]
|
|
183
|
+
};
|
|
168
184
|
return /*#__PURE__*/_react.default.createElement(_reactNative.View, _extends({
|
|
169
185
|
style: [containerStyle, style],
|
|
170
186
|
onLayout: this.handleLayout
|
|
@@ -0,0 +1,49 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
Object.defineProperty(exports, "__esModule", {
|
|
4
|
+
value: true
|
|
5
|
+
});
|
|
6
|
+
exports.default = void 0;
|
|
7
|
+
|
|
8
|
+
var React = _interopRequireWildcard(require("react"));
|
|
9
|
+
|
|
10
|
+
var _reactNative = require("react-native");
|
|
11
|
+
|
|
12
|
+
var _reactNativeSvg = require("react-native-svg");
|
|
13
|
+
|
|
14
|
+
var _Config = _interopRequireDefault(require("./Config"));
|
|
15
|
+
|
|
16
|
+
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
|
|
17
|
+
|
|
18
|
+
function _getRequireWildcardCache(nodeInterop) { if (typeof WeakMap !== "function") return null; var cacheBabelInterop = new WeakMap(); var cacheNodeInterop = new WeakMap(); return (_getRequireWildcardCache = function (nodeInterop) { return nodeInterop ? cacheNodeInterop : cacheBabelInterop; })(nodeInterop); }
|
|
19
|
+
|
|
20
|
+
function _interopRequireWildcard(obj, nodeInterop) { if (!nodeInterop && obj && obj.__esModule) { return obj; } if (obj === null || typeof obj !== "object" && typeof obj !== "function") { return { default: obj }; } var cache = _getRequireWildcardCache(nodeInterop); if (cache && cache.has(obj)) { return cache.get(obj); } var newObj = {}; var hasPropertyDescriptor = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var key in obj) { if (key !== "default" && Object.prototype.hasOwnProperty.call(obj, key)) { var desc = hasPropertyDescriptor ? Object.getOwnPropertyDescriptor(obj, key) : null; if (desc && (desc.get || desc.set)) { Object.defineProperty(newObj, key, desc); } else { newObj[key] = obj[key]; } } } newObj.default = obj; if (cache) { cache.set(obj, newObj); } return newObj; }
|
|
21
|
+
|
|
22
|
+
const SVG = _ref => {
|
|
23
|
+
let {
|
|
24
|
+
source,
|
|
25
|
+
style
|
|
26
|
+
} = _ref;
|
|
27
|
+
let svgSource = source === null || source === undefined ? _Config.default.placeholderSvgURL : source;
|
|
28
|
+
return /*#__PURE__*/React.createElement(React.Fragment, null, _reactNative.Platform.OS === "ios" && /*#__PURE__*/React.createElement(_reactNative.View, {
|
|
29
|
+
style: style
|
|
30
|
+
}, /*#__PURE__*/React.createElement(_reactNativeSvg.SvgUri, {
|
|
31
|
+
width: "100%",
|
|
32
|
+
height: "100%",
|
|
33
|
+
uri: svgSource
|
|
34
|
+
})), _reactNative.Platform.OS === "android" && /*#__PURE__*/React.createElement(_reactNative.View, {
|
|
35
|
+
style: style
|
|
36
|
+
}, /*#__PURE__*/React.createElement(_reactNativeSvg.SvgUri, {
|
|
37
|
+
width: "100%",
|
|
38
|
+
height: "100%",
|
|
39
|
+
uri: svgSource
|
|
40
|
+
})), _reactNative.Platform.OS === "web" && /*#__PURE__*/React.createElement(_reactNative.Image, {
|
|
41
|
+
style: style,
|
|
42
|
+
source: {
|
|
43
|
+
uri: svgSource
|
|
44
|
+
}
|
|
45
|
+
}));
|
|
46
|
+
};
|
|
47
|
+
|
|
48
|
+
var _default = SVG;
|
|
49
|
+
exports.default = _default;
|
|
@@ -23,8 +23,6 @@ function _getRequireWildcardCache(nodeInterop) { if (typeof WeakMap !== "functio
|
|
|
23
23
|
|
|
24
24
|
function _interopRequireWildcard(obj, nodeInterop) { if (!nodeInterop && obj && obj.__esModule) { return obj; } if (obj === null || typeof obj !== "object" && typeof obj !== "function") { return { default: obj }; } var cache = _getRequireWildcardCache(nodeInterop); if (cache && cache.has(obj)) { return cache.get(obj); } var newObj = {}; var hasPropertyDescriptor = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var key in obj) { if (key !== "default" && Object.prototype.hasOwnProperty.call(obj, key)) { var desc = hasPropertyDescriptor ? Object.getOwnPropertyDescriptor(obj, key) : null; if (desc && (desc.get || desc.set)) { Object.defineProperty(newObj, key, desc); } else { newObj[key] = obj[key]; } } } newObj.default = obj; if (cache) { cache.set(obj, newObj); } return newObj; }
|
|
25
25
|
|
|
26
|
-
function _extends() { _extends = Object.assign ? Object.assign.bind() : function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; return _extends.apply(this, arguments); }
|
|
27
|
-
|
|
28
26
|
function maybeParseValue(value) {
|
|
29
27
|
if (value === undefined) {
|
|
30
28
|
return undefined;
|
|
@@ -91,9 +89,10 @@ function Slider(_ref) {
|
|
|
91
89
|
onValueChange(newValue);
|
|
92
90
|
};
|
|
93
91
|
|
|
94
|
-
return /*#__PURE__*/React.createElement(_reactNative.View,
|
|
95
|
-
style: [styles.container, style]
|
|
96
|
-
|
|
92
|
+
return /*#__PURE__*/React.createElement(_reactNative.View, {
|
|
93
|
+
style: [styles.container, style],
|
|
94
|
+
...rest
|
|
95
|
+
}, leftIcon ? /*#__PURE__*/React.createElement(Icon, {
|
|
97
96
|
color: leftIconThemeColor,
|
|
98
97
|
name: leftIcon,
|
|
99
98
|
size: 24
|
|
@@ -129,4 +128,24 @@ const styles = _reactNative.StyleSheet.create({
|
|
|
129
128
|
|
|
130
129
|
var _default = (0, _theming.withTheme)(Slider);
|
|
131
130
|
|
|
131
|
+
exports.default = _default;: rightIconThemeColor,
|
|
132
|
+
name: rightIcon,
|
|
133
|
+
size: 24
|
|
134
|
+
}) : null);
|
|
135
|
+
}
|
|
136
|
+
|
|
137
|
+
const styles = _reactNative.StyleSheet.create({
|
|
138
|
+
container: {
|
|
139
|
+
height: 40,
|
|
140
|
+
flexDirection: "row",
|
|
141
|
+
alignItems: "center"
|
|
142
|
+
},
|
|
143
|
+
slider: {
|
|
144
|
+
flex: 1,
|
|
145
|
+
marginHorizontal: 12
|
|
146
|
+
}
|
|
147
|
+
});
|
|
148
|
+
|
|
149
|
+
var _default = (0, _theming.withTheme)(Slider);
|
|
150
|
+
|
|
132
151
|
exports.default = _default;
|
|
@@ -193,6 +193,7 @@ class TextField extends React.Component {
|
|
|
193
193
|
rightIconName,
|
|
194
194
|
assistiveText,
|
|
195
195
|
underlineColor: underlineColorProp,
|
|
196
|
+
activeBorderColor: activeBorderColorProp,
|
|
196
197
|
multiline = false,
|
|
197
198
|
numberOfLines = 4,
|
|
198
199
|
style,
|
|
@@ -220,7 +221,7 @@ class TextField extends React.Component {
|
|
|
220
221
|
underlineColor = "transparent";
|
|
221
222
|
backgroundColor = colors.divider;
|
|
222
223
|
} else {
|
|
223
|
-
activeColor = error ? colors.error :
|
|
224
|
+
activeColor = error ? colors.error : activeBorderColorProp;
|
|
224
225
|
placeholderColor = borderColor = colors.light;
|
|
225
226
|
underlineColor = underlineColorProp;
|
|
226
227
|
backgroundColor = colors.background;
|