@draftbit/core 46.2.4-e9fc2e.5 → 46.2.4-f14a39.5
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/lib/commonjs/components/Button.js +11 -32
- package/lib/commonjs/components/FormRow.js +17 -3
- package/lib/commonjs/mappings/Svg.js +1 -1
- package/lib/module/components/RadioButton/RadioButtonRow.js +24 -6
- package/lib/module/mappings/Svg.js +1 -1
- package/package.json +3 -3
- package/src/mappings/Svg.js +1 -1
- package/src/mappings/Svg.ts +1 -1
|
@@ -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 CONSTANTS = {
|
|
19
21
|
baseHeight: 42,
|
|
20
22
|
borderRadius: 4,
|
|
@@ -71,7 +73,7 @@ function Base(_ref) {
|
|
|
71
73
|
buttonStyles.justifyContent = "flex-end";
|
|
72
74
|
}
|
|
73
75
|
|
|
74
|
-
return /*#__PURE__*/React.createElement(_reactNative.Pressable, {
|
|
76
|
+
return /*#__PURE__*/React.createElement(_reactNative.Pressable, _extends({
|
|
75
77
|
onPress: onPress,
|
|
76
78
|
disabled: disabled || loading,
|
|
77
79
|
style: _ref2 => {
|
|
@@ -81,9 +83,8 @@ function Base(_ref) {
|
|
|
81
83
|
return [styles.base, {
|
|
82
84
|
opacity: pressed || disabled ? 0.75 : 1
|
|
83
85
|
}, buttonStyles];
|
|
84
|
-
}
|
|
85
|
-
|
|
86
|
-
}, loading ? /*#__PURE__*/React.createElement(_reactNative.ActivityIndicator, {
|
|
86
|
+
}
|
|
87
|
+
}, props), loading ? /*#__PURE__*/React.createElement(_reactNative.ActivityIndicator, {
|
|
87
88
|
size: "small",
|
|
88
89
|
color: color,
|
|
89
90
|
style: styles.loading
|
|
@@ -103,14 +104,13 @@ const Solid = _ref3 => {
|
|
|
103
104
|
theme,
|
|
104
105
|
...props
|
|
105
106
|
} = _ref3;
|
|
106
|
-
return /*#__PURE__*/React.createElement(Base, {
|
|
107
|
+
return /*#__PURE__*/React.createElement(Base, _extends({
|
|
107
108
|
style: [{
|
|
108
109
|
color: "#FFF",
|
|
109
110
|
borderRadius: theme.roundness,
|
|
110
111
|
backgroundColor: theme.colors.primary
|
|
111
|
-
}, style]
|
|
112
|
-
|
|
113
|
-
});
|
|
112
|
+
}, style]
|
|
113
|
+
}, props));
|
|
114
114
|
};
|
|
115
115
|
|
|
116
116
|
const ButtonSolid = (0, _theming.withTheme)(Solid);
|
|
@@ -122,14 +122,13 @@ const Outline = _ref4 => {
|
|
|
122
122
|
theme,
|
|
123
123
|
...props
|
|
124
124
|
} = _ref4;
|
|
125
|
-
return /*#__PURE__*/React.createElement(Base, {
|
|
125
|
+
return /*#__PURE__*/React.createElement(Base, _extends({
|
|
126
126
|
style: [styles.outline, {
|
|
127
127
|
borderRadius: theme.roundness,
|
|
128
128
|
borderColor: theme.colors.primary,
|
|
129
129
|
color: theme.colors.primary
|
|
130
|
-
}, style]
|
|
131
|
-
|
|
132
|
-
});
|
|
130
|
+
}, style]
|
|
131
|
+
}, props));
|
|
133
132
|
};
|
|
134
133
|
|
|
135
134
|
const ButtonOutline = (0, _theming.withTheme)(Outline);
|
|
@@ -177,24 +176,4 @@ const styles = _reactNative.StyleSheet.create({
|
|
|
177
176
|
}
|
|
178
177
|
})
|
|
179
178
|
}
|
|
180
|
-
});nsparent",
|
|
181
|
-
padding: 0,
|
|
182
|
-
minHeight: undefined
|
|
183
|
-
},
|
|
184
|
-
loading: {
|
|
185
|
-
marginRight: 6
|
|
186
|
-
},
|
|
187
|
-
icon: { ..._reactNative.Platform.select({
|
|
188
|
-
web: {
|
|
189
|
-
marginTop: 1,
|
|
190
|
-
marginRight: 4,
|
|
191
|
-
alignSelf: "center"
|
|
192
|
-
},
|
|
193
|
-
default: {
|
|
194
|
-
marginBottom: 2,
|
|
195
|
-
marginRight: 4,
|
|
196
|
-
alignSelf: "center"
|
|
197
|
-
}
|
|
198
|
-
})
|
|
199
|
-
}
|
|
200
179
|
});
|
|
@@ -19,8 +19,6 @@ function _getRequireWildcardCache(nodeInterop) { if (typeof WeakMap !== "functio
|
|
|
19
19
|
|
|
20
20
|
function _interopRequireWildcard(obj, nodeInterop) { if (!nodeInterop && obj && obj.__esModule) { return obj; } if (obj === null || typeof obj !== "object" && typeof obj !== "function") { return { default: obj }; } var cache = _getRequireWildcardCache(nodeInterop); if (cache && cache.has(obj)) { return cache.get(obj); } var newObj = {}; var hasPropertyDescriptor = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var key in obj) { if (key !== "default" && Object.prototype.hasOwnProperty.call(obj, key)) { var desc = hasPropertyDescriptor ? Object.getOwnPropertyDescriptor(obj, key) : null; if (desc && (desc.get || desc.set)) { Object.defineProperty(newObj, key, desc); } else { newObj[key] = obj[key]; } } } newObj.default = obj; if (cache) { cache.set(obj, newObj); } return newObj; }
|
|
21
21
|
|
|
22
|
-
function _extends() { _extends = Object.assign ? Object.assign.bind() : function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; return _extends.apply(this, arguments); }
|
|
23
|
-
|
|
24
22
|
function FormRow(_ref) {
|
|
25
23
|
let {
|
|
26
24
|
disabled,
|
|
@@ -35,11 +33,27 @@ function FormRow(_ref) {
|
|
|
35
33
|
textStyles,
|
|
36
34
|
viewStyles
|
|
37
35
|
} = (0, _utilities.extractStyles)(style);
|
|
38
|
-
return /*#__PURE__*/React.createElement(_Touchable.default,
|
|
36
|
+
return /*#__PURE__*/React.createElement(_Touchable.default, {
|
|
39
37
|
disabled: disabled,
|
|
40
38
|
onPress: onPress,
|
|
41
39
|
style: [styles.row, {
|
|
42
40
|
flexDirection: direction
|
|
41
|
+
}, viewStyles],
|
|
42
|
+
...rest
|
|
43
|
+
}, /*#__PURE__*/React.createElement(_reactNative.Text, {
|
|
44
|
+
style: textStyles
|
|
45
|
+
}, label), children);
|
|
46
|
+
}
|
|
47
|
+
|
|
48
|
+
const styles = _reactNative.StyleSheet.create({
|
|
49
|
+
row: {
|
|
50
|
+
marginLeft: 8,
|
|
51
|
+
marginRight: 8,
|
|
52
|
+
flexDirection: "row",
|
|
53
|
+
justifyContent: "space-between",
|
|
54
|
+
alignItems: "center"
|
|
55
|
+
}
|
|
56
|
+
});rection: direction
|
|
43
57
|
}, viewStyles]
|
|
44
58
|
}, rest), /*#__PURE__*/React.createElement(_reactNative.Text, {
|
|
45
59
|
style: textStyles
|
|
@@ -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 { StyleSheet, View, Platform } from "react-native";
|
|
5
3
|
import RadioButton from "./RadioButton";
|
|
@@ -8,7 +6,7 @@ import { useRadioButtonGroupContext } from "./context";
|
|
|
8
6
|
import { Direction as GroupDirection } from "./context";
|
|
9
7
|
import Touchable from "../Touchable";
|
|
10
8
|
import { extractStyles, getValueForRadioButton } from "../../utilities";
|
|
11
|
-
export
|
|
9
|
+
export var Direction;
|
|
12
10
|
|
|
13
11
|
(function (Direction) {
|
|
14
12
|
Direction["Row"] = "row";
|
|
@@ -70,13 +68,14 @@ const RadioButtonRow = _ref => {
|
|
|
70
68
|
textStyles,
|
|
71
69
|
viewStyles
|
|
72
70
|
} = extractStyles(style);
|
|
73
|
-
return /*#__PURE__*/React.createElement(Touchable,
|
|
71
|
+
return /*#__PURE__*/React.createElement(Touchable, {
|
|
74
72
|
onPress: handlePress,
|
|
75
73
|
style: [styles.mainParent, {
|
|
76
74
|
flexDirection: direction
|
|
77
75
|
}, viewStyles],
|
|
78
|
-
disabled: disabled
|
|
79
|
-
|
|
76
|
+
disabled: disabled,
|
|
77
|
+
...rest
|
|
78
|
+
}, /*#__PURE__*/React.createElement(View, {
|
|
80
79
|
style: [styles.label, {
|
|
81
80
|
alignItems: direction === Direction.Row ? "flex-start" : "flex-end"
|
|
82
81
|
}, labelContainerStyle]
|
|
@@ -114,4 +113,23 @@ const styles = StyleSheet.create({
|
|
|
114
113
|
flex: 3
|
|
115
114
|
}
|
|
116
115
|
});
|
|
116
|
+
export default RadioButtonRow;t.create({
|
|
117
|
+
mainParent: {
|
|
118
|
+
alignItems: "center",
|
|
119
|
+
justifyContent: "space-around",
|
|
120
|
+
paddingStart: 20,
|
|
121
|
+
minHeight: 50,
|
|
122
|
+
paddingEnd: 20,
|
|
123
|
+
display: "flex",
|
|
124
|
+
...Platform.select({
|
|
125
|
+
web: {
|
|
126
|
+
cursor: "pointer",
|
|
127
|
+
userSelect: "none"
|
|
128
|
+
}
|
|
129
|
+
})
|
|
130
|
+
},
|
|
131
|
+
label: {
|
|
132
|
+
flex: 3
|
|
133
|
+
}
|
|
134
|
+
});
|
|
117
135
|
export default RadioButtonRow;
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@draftbit/core",
|
|
3
|
-
"version": "46.2.4-
|
|
3
|
+
"version": "46.2.4-f14a39.5+f14a3964",
|
|
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.2.4-
|
|
44
|
+
"@draftbit/types": "^46.2.4-f14a39.5+f14a3964",
|
|
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",
|
|
@@ -80,5 +80,5 @@
|
|
|
80
80
|
]
|
|
81
81
|
]
|
|
82
82
|
},
|
|
83
|
-
"gitHead": "
|
|
83
|
+
"gitHead": "f14a3964f2b1918e34feab51bdcd74411b2c352d"
|
|
84
84
|
}
|
package/src/mappings/Svg.js
CHANGED