@draftbit/core 46.4.2-d0676f.2 → 46.4.3-c292ad.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/lib/commonjs/components/Accordion/AccordionItem.js +25 -5
- package/lib/commonjs/components/Button.js +35 -12
- package/lib/commonjs/components/Checkbox/CheckboxGroupRow.js +24 -6
- package/lib/commonjs/components/Layout.js +40 -19
- package/lib/commonjs/components/Portal/PortalManager.js +19 -11
- package/lib/commonjs/components/ProgressBar.js +23 -7
- package/lib/commonjs/components/RadioButton/RadioButton.js +14 -3
- package/lib/commonjs/components/RadioButton/RadioButtonGroup.js +16 -3
- package/lib/commonjs/components/StepIndicator.js +34 -16
- package/lib/commonjs/components/Text.js +37 -11
- package/lib/commonjs/constants.js +1 -1
- package/lib/commonjs/index.js +1 -3
- package/lib/commonjs/mappings/Button.js +12 -1
- package/lib/module/components/Button.js +2 -0
- package/lib/module/index.js +1 -2
- package/lib/module/mappings/Button.js +12 -1
- 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
- package/src/mappings/Button.js +22 -1
- package/src/mappings/Button.ts +22 -1
|
@@ -21,8 +21,6 @@ function _getRequireWildcardCache(nodeInterop) { if (typeof WeakMap !== "functio
|
|
|
21
21
|
|
|
22
22
|
function _interopRequireWildcard(obj, nodeInterop) { if (!nodeInterop && obj && obj.__esModule) { return obj; } if (obj === null || typeof obj !== "object" && typeof obj !== "function") { return { default: obj }; } var cache = _getRequireWildcardCache(nodeInterop); if (cache && cache.has(obj)) { return cache.get(obj); } var newObj = {}; var hasPropertyDescriptor = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var key in obj) { if (key !== "default" && Object.prototype.hasOwnProperty.call(obj, key)) { var desc = hasPropertyDescriptor ? Object.getOwnPropertyDescriptor(obj, key) : null; if (desc && (desc.get || desc.set)) { Object.defineProperty(newObj, key, desc); } else { newObj[key] = obj[key]; } } } newObj.default = obj; if (cache) { cache.set(obj, newObj); } return newObj; }
|
|
23
23
|
|
|
24
|
-
function _extends() { _extends = Object.assign ? Object.assign.bind() : function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; return _extends.apply(this, arguments); }
|
|
25
|
-
|
|
26
24
|
const AccordionItem = _ref => {
|
|
27
25
|
let {
|
|
28
26
|
Icon,
|
|
@@ -37,9 +35,10 @@ const AccordionItem = _ref => {
|
|
|
37
35
|
textStyles,
|
|
38
36
|
viewStyles
|
|
39
37
|
} = (0, _utilities.extractStyles)(style);
|
|
40
|
-
return /*#__PURE__*/React.createElement(_reactNative.Pressable,
|
|
41
|
-
style: [styles.container, viewStyles]
|
|
42
|
-
|
|
38
|
+
return /*#__PURE__*/React.createElement(_reactNative.Pressable, {
|
|
39
|
+
style: [styles.container, viewStyles],
|
|
40
|
+
...rest
|
|
41
|
+
}, /*#__PURE__*/React.createElement(_reactNative.View, {
|
|
43
42
|
style: styles.row
|
|
44
43
|
}, icon ? /*#__PURE__*/React.createElement(Icon, {
|
|
45
44
|
name: icon,
|
|
@@ -74,4 +73,25 @@ const styles = _reactNative.StyleSheet.create({
|
|
|
74
73
|
|
|
75
74
|
var _default = (0, _theming.withTheme)(AccordionItem);
|
|
76
75
|
|
|
76
|
+
exports.default = _default;StyleSheet.create({
|
|
77
|
+
container: {
|
|
78
|
+
padding: 8
|
|
79
|
+
},
|
|
80
|
+
row: {
|
|
81
|
+
flexDirection: "row",
|
|
82
|
+
alignItems: "center",
|
|
83
|
+
paddingLeft: 8
|
|
84
|
+
},
|
|
85
|
+
item: {
|
|
86
|
+
marginVertical: 6,
|
|
87
|
+
paddingLeft: 8
|
|
88
|
+
},
|
|
89
|
+
content: {
|
|
90
|
+
flex: 1,
|
|
91
|
+
justifyContent: "center"
|
|
92
|
+
}
|
|
93
|
+
});
|
|
94
|
+
|
|
95
|
+
var _default = (0, _theming.withTheme)(AccordionItem);
|
|
96
|
+
|
|
77
97
|
exports.default = _default;
|
|
@@ -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
|
|
|
@@ -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 CONSTANTS = {
|
|
21
19
|
baseHeight: 42,
|
|
22
20
|
borderRadius: 4,
|
|
@@ -73,7 +71,7 @@ function Base(_ref) {
|
|
|
73
71
|
buttonStyles.justifyContent = "flex-end";
|
|
74
72
|
}
|
|
75
73
|
|
|
76
|
-
return /*#__PURE__*/React.createElement(_reactNative.Pressable,
|
|
74
|
+
return /*#__PURE__*/React.createElement(_reactNative.Pressable, {
|
|
77
75
|
onPress: onPress,
|
|
78
76
|
disabled: disabled || loading,
|
|
79
77
|
style: _ref2 => {
|
|
@@ -83,8 +81,9 @@ function Base(_ref) {
|
|
|
83
81
|
return [styles.base, {
|
|
84
82
|
opacity: pressed || disabled ? 0.75 : 1
|
|
85
83
|
}, buttonStyles];
|
|
86
|
-
}
|
|
87
|
-
|
|
84
|
+
},
|
|
85
|
+
...props
|
|
86
|
+
}, loading ? /*#__PURE__*/React.createElement(_reactNative.ActivityIndicator, {
|
|
88
87
|
size: "small",
|
|
89
88
|
color: color,
|
|
90
89
|
style: styles.loading
|
|
@@ -104,17 +103,20 @@ const Solid = _ref3 => {
|
|
|
104
103
|
theme,
|
|
105
104
|
...props
|
|
106
105
|
} = _ref3;
|
|
107
|
-
return /*#__PURE__*/React.createElement(Base,
|
|
106
|
+
return /*#__PURE__*/React.createElement(Base, {
|
|
108
107
|
style: [{
|
|
109
108
|
color: "#FFF",
|
|
110
109
|
borderRadius: theme.roundness,
|
|
111
110
|
backgroundColor: theme.colors.primary
|
|
112
|
-
}, style]
|
|
113
|
-
|
|
111
|
+
}, style],
|
|
112
|
+
...props
|
|
113
|
+
});
|
|
114
114
|
};
|
|
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 {
|
|
@@ -122,13 +124,14 @@ const Outline = _ref4 => {
|
|
|
122
124
|
theme,
|
|
123
125
|
...props
|
|
124
126
|
} = _ref4;
|
|
125
|
-
return /*#__PURE__*/React.createElement(Base,
|
|
127
|
+
return /*#__PURE__*/React.createElement(Base, {
|
|
126
128
|
style: [styles.outline, {
|
|
127
129
|
borderRadius: theme.roundness,
|
|
128
130
|
borderColor: theme.colors.primary,
|
|
129
131
|
color: theme.colors.primary
|
|
130
|
-
}, style]
|
|
131
|
-
|
|
132
|
+
}, style],
|
|
133
|
+
...props
|
|
134
|
+
});
|
|
132
135
|
};
|
|
133
136
|
|
|
134
137
|
const ButtonOutline = (0, _theming.withTheme)(Outline);
|
|
@@ -176,4 +179,24 @@ const styles = _reactNative.StyleSheet.create({
|
|
|
176
179
|
}
|
|
177
180
|
})
|
|
178
181
|
}
|
|
182
|
+
});nsparent",
|
|
183
|
+
padding: 0,
|
|
184
|
+
minHeight: undefined
|
|
185
|
+
},
|
|
186
|
+
loading: {
|
|
187
|
+
marginRight: 6
|
|
188
|
+
},
|
|
189
|
+
icon: { ..._reactNative.Platform.select({
|
|
190
|
+
web: {
|
|
191
|
+
marginTop: 1,
|
|
192
|
+
marginRight: 4,
|
|
193
|
+
alignSelf: "center"
|
|
194
|
+
},
|
|
195
|
+
default: {
|
|
196
|
+
marginBottom: 2,
|
|
197
|
+
marginRight: 4,
|
|
198
|
+
alignSelf: "center"
|
|
199
|
+
}
|
|
200
|
+
})
|
|
201
|
+
}
|
|
179
202
|
});
|
|
@@ -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;
|
|
@@ -18,8 +18,6 @@ function _getRequireWildcardCache(nodeInterop) { if (typeof WeakMap !== "functio
|
|
|
18
18
|
|
|
19
19
|
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; }
|
|
20
20
|
|
|
21
|
-
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); }
|
|
22
|
-
|
|
23
21
|
function Center(_ref) {
|
|
24
22
|
let {
|
|
25
23
|
width = 240,
|
|
@@ -29,15 +27,16 @@ function Center(_ref) {
|
|
|
29
27
|
style,
|
|
30
28
|
...rest
|
|
31
29
|
} = _ref;
|
|
32
|
-
return /*#__PURE__*/React.createElement(_reactNative.View,
|
|
30
|
+
return /*#__PURE__*/React.createElement(_reactNative.View, {
|
|
33
31
|
style: [{
|
|
34
32
|
justifyContent: "center",
|
|
35
33
|
alignItems: "center",
|
|
36
34
|
width,
|
|
37
35
|
height,
|
|
38
36
|
backgroundColor: bgColor
|
|
39
|
-
}, style]
|
|
40
|
-
|
|
37
|
+
}, style],
|
|
38
|
+
...rest
|
|
39
|
+
}, children);
|
|
41
40
|
}
|
|
42
41
|
|
|
43
42
|
function Circle(_ref2) {
|
|
@@ -49,7 +48,7 @@ function Circle(_ref2) {
|
|
|
49
48
|
...rest
|
|
50
49
|
} = _ref2;
|
|
51
50
|
const borderRadius = 1000;
|
|
52
|
-
return /*#__PURE__*/React.createElement(Center,
|
|
51
|
+
return /*#__PURE__*/React.createElement(Center, {
|
|
53
52
|
width: size,
|
|
54
53
|
height: size,
|
|
55
54
|
bgColor: bgColor,
|
|
@@ -57,8 +56,9 @@ function Circle(_ref2) {
|
|
|
57
56
|
backgroundColor: bgColor,
|
|
58
57
|
borderRadius,
|
|
59
58
|
overflow: "hidden"
|
|
60
|
-
}]
|
|
61
|
-
|
|
59
|
+
}],
|
|
60
|
+
...rest
|
|
61
|
+
}, children);
|
|
62
62
|
}
|
|
63
63
|
|
|
64
64
|
function Square(_ref3) {
|
|
@@ -69,12 +69,13 @@ function Square(_ref3) {
|
|
|
69
69
|
style,
|
|
70
70
|
...rest
|
|
71
71
|
} = _ref3;
|
|
72
|
-
return /*#__PURE__*/React.createElement(Center,
|
|
72
|
+
return /*#__PURE__*/React.createElement(Center, {
|
|
73
73
|
style: style,
|
|
74
74
|
width: size,
|
|
75
75
|
height: size,
|
|
76
|
-
bgColor: bgColor
|
|
77
|
-
|
|
76
|
+
bgColor: bgColor,
|
|
77
|
+
...rest
|
|
78
|
+
}, children);
|
|
78
79
|
}
|
|
79
80
|
|
|
80
81
|
function Row(_ref4) {
|
|
@@ -85,14 +86,14 @@ function Row(_ref4) {
|
|
|
85
86
|
style,
|
|
86
87
|
...rest
|
|
87
88
|
} = _ref4;
|
|
88
|
-
return /*#__PURE__*/React.createElement(_reactNative.View,
|
|
89
|
-
style: [style,
|
|
90
|
-
{
|
|
89
|
+
return /*#__PURE__*/React.createElement(_reactNative.View, {
|
|
90
|
+
style: [style, {
|
|
91
91
|
alignItems,
|
|
92
92
|
flexDirection: "row",
|
|
93
93
|
justifyContent: justifyContent
|
|
94
|
-
}]
|
|
95
|
-
|
|
94
|
+
}],
|
|
95
|
+
...rest
|
|
96
|
+
}, children);
|
|
96
97
|
}
|
|
97
98
|
|
|
98
99
|
function Spacer(_ref5) {
|
|
@@ -105,17 +106,37 @@ function Spacer(_ref5) {
|
|
|
105
106
|
style,
|
|
106
107
|
...rest
|
|
107
108
|
} = _ref5;
|
|
108
|
-
return /*#__PURE__*/React.createElement(_reactNative.View,
|
|
109
|
+
return /*#__PURE__*/React.createElement(_reactNative.View, {
|
|
109
110
|
style: [style, {
|
|
110
111
|
paddingRight: right,
|
|
111
112
|
paddingTop: top,
|
|
112
113
|
paddingLeft: left,
|
|
113
114
|
paddingBottom: bottom
|
|
114
|
-
}]
|
|
115
|
-
|
|
115
|
+
}],
|
|
116
|
+
...rest
|
|
117
|
+
}, children);
|
|
116
118
|
}
|
|
117
119
|
|
|
118
120
|
function Stack(_ref6) {
|
|
121
|
+
let {
|
|
122
|
+
children,
|
|
123
|
+
justifyContent = "flex-start",
|
|
124
|
+
alignItems = "flex-start",
|
|
125
|
+
style,
|
|
126
|
+
...rest
|
|
127
|
+
} = _ref6;
|
|
128
|
+
return (
|
|
129
|
+
/*#__PURE__*/
|
|
130
|
+
// style must go first since we don't want justifyContent, alignItems overridden
|
|
131
|
+
React.createElement(_reactNative.View, {
|
|
132
|
+
style: [style, {
|
|
133
|
+
justifyContent,
|
|
134
|
+
alignItems
|
|
135
|
+
}],
|
|
136
|
+
...rest
|
|
137
|
+
}, children)
|
|
138
|
+
);
|
|
139
|
+
}ck(_ref6) {
|
|
119
140
|
let {
|
|
120
141
|
children,
|
|
121
142
|
justifyContent = "flex-start",
|
|
@@ -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
|
|
@@ -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 RadioButton = _ref => {
|
|
27
25
|
let {
|
|
28
26
|
Icon,
|
|
@@ -51,7 +49,20 @@ const RadioButton = _ref => {
|
|
|
51
49
|
onValueChange === null || onValueChange === void 0 ? void 0 : onValueChange(realValue);
|
|
52
50
|
};
|
|
53
51
|
|
|
54
|
-
return /*#__PURE__*/React.createElement(_IconButton.default,
|
|
52
|
+
return /*#__PURE__*/React.createElement(_IconButton.default, {
|
|
53
|
+
Icon: Icon,
|
|
54
|
+
icon: isSelected ? selectedIcon : unselectedIcon,
|
|
55
|
+
color: isSelected ? color : unselectedColor,
|
|
56
|
+
disabled: disabled,
|
|
57
|
+
onPress: handlePress,
|
|
58
|
+
size: size,
|
|
59
|
+
style: style,
|
|
60
|
+
...rest
|
|
61
|
+
});
|
|
62
|
+
};
|
|
63
|
+
|
|
64
|
+
var _default = RadioButton;
|
|
65
|
+
exports.default = _default;turn /*#__PURE__*/React.createElement(_IconButton.default, _extends({
|
|
55
66
|
Icon: Icon,
|
|
56
67
|
icon: isSelected ? selectedIcon : unselectedIcon,
|
|
57
68
|
color: isSelected ? color : unselectedColor,
|
|
@@ -17,8 +17,6 @@ function _getRequireWildcardCache(nodeInterop) { if (typeof WeakMap !== "functio
|
|
|
17
17
|
|
|
18
18
|
function _interopRequireWildcard(obj, nodeInterop) { if (!nodeInterop && obj && obj.__esModule) { return obj; } if (obj === null || typeof obj !== "object" && typeof obj !== "function") { return { default: obj }; } var cache = _getRequireWildcardCache(nodeInterop); if (cache && cache.has(obj)) { return cache.get(obj); } var newObj = {}; var hasPropertyDescriptor = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var key in obj) { if (key !== "default" && Object.prototype.hasOwnProperty.call(obj, key)) { var desc = hasPropertyDescriptor ? Object.getOwnPropertyDescriptor(obj, key) : null; if (desc && (desc.get || desc.set)) { Object.defineProperty(newObj, key, desc); } else { newObj[key] = obj[key]; } } } newObj.default = obj; if (cache) { cache.set(obj, newObj); } return newObj; }
|
|
19
19
|
|
|
20
|
-
function _extends() { _extends = Object.assign ? Object.assign.bind() : function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; return _extends.apply(this, arguments); }
|
|
21
|
-
|
|
22
20
|
const {
|
|
23
21
|
Provider
|
|
24
22
|
} = _context.radioButtonGroupContext;
|
|
@@ -63,9 +61,24 @@ const RadioButtonGroup = _ref => {
|
|
|
63
61
|
});
|
|
64
62
|
}
|
|
65
63
|
|
|
66
|
-
return /*#__PURE__*/React.createElement(_reactNative.View,
|
|
64
|
+
return /*#__PURE__*/React.createElement(_reactNative.View, {
|
|
67
65
|
style: [{
|
|
68
66
|
minHeight: 40
|
|
67
|
+
}, style],
|
|
68
|
+
...rest
|
|
69
|
+
}, /*#__PURE__*/React.createElement(Provider, {
|
|
70
|
+
value: {
|
|
71
|
+
value: internalValue,
|
|
72
|
+
onValueChange: handleValueChange,
|
|
73
|
+
direction
|
|
74
|
+
}
|
|
75
|
+
}, /*#__PURE__*/React.createElement(_reactNative.View, {
|
|
76
|
+
style: _containerStyle
|
|
77
|
+
}, children)));
|
|
78
|
+
};
|
|
79
|
+
|
|
80
|
+
var _default = RadioButtonGroup;
|
|
81
|
+
exports.default = _default;0
|
|
69
82
|
}, style]
|
|
70
83
|
}, rest), /*#__PURE__*/React.createElement(Provider, {
|
|
71
84
|
value: {
|
|
@@ -13,8 +13,7 @@ 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
|
-
|
|
17
|
-
|
|
16
|
+
// @ts-nocheck
|
|
18
17
|
const STEP_STATUS = {
|
|
19
18
|
CURRENT: "current",
|
|
20
19
|
FINISHED: "finished",
|
|
@@ -25,7 +24,7 @@ class StepIndicator extends _react.Component {
|
|
|
25
24
|
constructor(props) {
|
|
26
25
|
super(props);
|
|
27
26
|
|
|
28
|
-
|
|
27
|
+
this.renderProgressBarBackground = () => {
|
|
29
28
|
const {
|
|
30
29
|
stepCount,
|
|
31
30
|
direction
|
|
@@ -70,9 +69,9 @@ class StepIndicator extends _react.Component {
|
|
|
70
69
|
},
|
|
71
70
|
style: progressBarBackgroundStyle
|
|
72
71
|
});
|
|
73
|
-
}
|
|
72
|
+
};
|
|
74
73
|
|
|
75
|
-
|
|
74
|
+
this.renderProgressBar = () => {
|
|
76
75
|
const {
|
|
77
76
|
stepCount,
|
|
78
77
|
direction
|
|
@@ -104,9 +103,9 @@ class StepIndicator extends _react.Component {
|
|
|
104
103
|
return /*#__PURE__*/_react.default.createElement(_reactNative.Animated.View, {
|
|
105
104
|
style: progressBarStyle
|
|
106
105
|
});
|
|
107
|
-
}
|
|
106
|
+
};
|
|
108
107
|
|
|
109
|
-
|
|
108
|
+
this.renderStepIndicator = () => {
|
|
110
109
|
let steps = [];
|
|
111
110
|
const {
|
|
112
111
|
stepCount,
|
|
@@ -139,9 +138,9 @@ class StepIndicator extends _react.Component {
|
|
|
139
138
|
height: this.state.customStyles.currentStepIndicatorSize
|
|
140
139
|
}]
|
|
141
140
|
}, steps);
|
|
142
|
-
}
|
|
141
|
+
};
|
|
143
142
|
|
|
144
|
-
|
|
143
|
+
this.renderStepLabels = () => {
|
|
145
144
|
const {
|
|
146
145
|
labels,
|
|
147
146
|
direction,
|
|
@@ -183,9 +182,9 @@ class StepIndicator extends _react.Component {
|
|
|
183
182
|
alignItems: this.state.customStyles.labelAlign
|
|
184
183
|
}]
|
|
185
184
|
}, labelViews);
|
|
186
|
-
}
|
|
185
|
+
};
|
|
187
186
|
|
|
188
|
-
|
|
187
|
+
this.renderStep = position => {
|
|
189
188
|
const {
|
|
190
189
|
renderStepIndicator
|
|
191
190
|
} = this.props;
|
|
@@ -257,9 +256,9 @@ class StepIndicator extends _react.Component {
|
|
|
257
256
|
}) : /*#__PURE__*/_react.default.createElement(_reactNative.Text, {
|
|
258
257
|
style: indicatorLabelStyle
|
|
259
258
|
}, "".concat(position + 1)));
|
|
260
|
-
}
|
|
259
|
+
};
|
|
261
260
|
|
|
262
|
-
|
|
261
|
+
this.getStepStatus = stepPosition => {
|
|
263
262
|
const {
|
|
264
263
|
currentPosition
|
|
265
264
|
} = this.props;
|
|
@@ -271,9 +270,9 @@ class StepIndicator extends _react.Component {
|
|
|
271
270
|
} else {
|
|
272
271
|
return STEP_STATUS.UNFINISHED;
|
|
273
272
|
}
|
|
274
|
-
}
|
|
273
|
+
};
|
|
275
274
|
|
|
276
|
-
|
|
275
|
+
this.onCurrentPositionChanged = position => {
|
|
277
276
|
let {
|
|
278
277
|
stepCount
|
|
279
278
|
} = this.props;
|
|
@@ -296,7 +295,7 @@ class StepIndicator extends _react.Component {
|
|
|
296
295
|
toValue: this.state.customStyles.currentStepIndicatorSize / 2,
|
|
297
296
|
duration: 100
|
|
298
297
|
})])]).start();
|
|
299
|
-
}
|
|
298
|
+
};
|
|
300
299
|
|
|
301
300
|
const defaultStyles = {
|
|
302
301
|
stepIndicatorSize: 30,
|
|
@@ -411,6 +410,25 @@ const styles = _reactNative.StyleSheet.create({
|
|
|
411
410
|
}
|
|
412
411
|
});
|
|
413
412
|
|
|
413
|
+
StepIndicator.defaultProps = {
|
|
414
|
+
currentPosition: 0,
|
|
415
|
+
stepCount: 5,
|
|
416
|
+
customStyles: {},
|
|
417
|
+
direction: "horizontal"
|
|
418
|
+
}; justifyContent: "center"
|
|
419
|
+
},
|
|
420
|
+
stepLabel: {
|
|
421
|
+
fontSize: 12,
|
|
422
|
+
textAlign: "center",
|
|
423
|
+
fontWeight: "500"
|
|
424
|
+
},
|
|
425
|
+
stepLabelItem: {
|
|
426
|
+
flex: 1,
|
|
427
|
+
alignItems: "center",
|
|
428
|
+
justifyContent: "center"
|
|
429
|
+
}
|
|
430
|
+
});
|
|
431
|
+
|
|
414
432
|
StepIndicator.defaultProps = {
|
|
415
433
|
currentPosition: 0,
|
|
416
434
|
stepCount: 5,
|
|
@@ -15,17 +15,7 @@ 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
|
-
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; }
|
|
21
|
-
|
|
22
18
|
class Text extends React.Component {
|
|
23
|
-
constructor() {
|
|
24
|
-
super(...arguments);
|
|
25
|
-
|
|
26
|
-
_defineProperty(this, "_root", void 0);
|
|
27
|
-
}
|
|
28
|
-
|
|
29
19
|
setNativeProps(args) {
|
|
30
20
|
return this._root && this._root.setNativeProps(args);
|
|
31
21
|
}
|
|
@@ -36,7 +26,43 @@ class Text extends React.Component {
|
|
|
36
26
|
...rest
|
|
37
27
|
} = this.props;
|
|
38
28
|
const writingDirection = _reactNative.I18nManager.isRTL ? "rtl" : "ltr";
|
|
39
|
-
return /*#__PURE__*/React.createElement(_reactNative.Text,
|
|
29
|
+
return /*#__PURE__*/React.createElement(_reactNative.Text, { ...rest,
|
|
30
|
+
ref: c => {
|
|
31
|
+
this._root = c;
|
|
32
|
+
},
|
|
33
|
+
style: [{
|
|
34
|
+
textAlign: "left",
|
|
35
|
+
writingDirection
|
|
36
|
+
}, style]
|
|
37
|
+
});
|
|
38
|
+
}
|
|
39
|
+
|
|
40
|
+
}
|
|
41
|
+
|
|
42
|
+
const BaseLink = _ref => {
|
|
43
|
+
let {
|
|
44
|
+
style,
|
|
45
|
+
theme,
|
|
46
|
+
title,
|
|
47
|
+
...props
|
|
48
|
+
} = _ref;
|
|
49
|
+
return /*#__PURE__*/React.createElement(Text, {
|
|
50
|
+
hitSlop: 8,
|
|
51
|
+
style: [{
|
|
52
|
+
color: theme.colors.primary
|
|
53
|
+
}, style],
|
|
54
|
+
theme: theme,
|
|
55
|
+
...props
|
|
56
|
+
}, title);
|
|
57
|
+
};
|
|
58
|
+
|
|
59
|
+
exports.BaseLink = BaseLink;
|
|
60
|
+
const Link = (0, _theming.withTheme)(BaseLink);
|
|
61
|
+
exports.Link = Link;
|
|
62
|
+
|
|
63
|
+
var _default = (0, _theming.withTheme)(Text);
|
|
64
|
+
|
|
65
|
+
exports.default = _default;/React.createElement(_reactNative.Text, _extends({}, rest, {
|
|
40
66
|
ref: c => {
|
|
41
67
|
this._root = c;
|
|
42
68
|
},
|
|
@@ -16,4 +16,4 @@ const APPROX_STATUSBAR_HEIGHT = _reactNative.Platform.select({
|
|
|
16
16
|
ios: _reactNative.Platform.Version < 11 ? DEFAULT_STATUSBAR_HEIGHT_EXPO : 0
|
|
17
17
|
});
|
|
18
18
|
|
|
19
|
-
exports.APPROX_STATUSBAR_HEIGHT = APPROX_STATUSBAR_HEIGHT;
|
|
19
|
+
exports.APPROX_STATUSBAR_HEIGHT = APPROX_STATUSBAR_HEIGHT;AR_HEIGHT;
|
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"));
|
|
@@ -40,8 +40,19 @@ const SEED_DATA = [{
|
|
|
40
40
|
triggers: SEED_DATA_TRIGGERS,
|
|
41
41
|
props: SEED_DATA_PROPS
|
|
42
42
|
}, {
|
|
43
|
-
name: "Button",
|
|
43
|
+
name: "Button Solid",
|
|
44
44
|
tag: "ButtonSolid",
|
|
45
|
+
category: _types.COMPONENT_TYPES.deprecated,
|
|
46
|
+
stylesPanelSections: [_types.StylesPanelSections.Typography, _types.StylesPanelSections.Background, _types.StylesPanelSections.Borders, _types.StylesPanelSections.Size, _types.StylesPanelSections.MarginsAndPaddings, _types.StylesPanelSections.Position, _types.StylesPanelSections.Effects],
|
|
47
|
+
layout: { ...LAYOUT,
|
|
48
|
+
backgroundColor: "primary",
|
|
49
|
+
textAlign: "center"
|
|
50
|
+
},
|
|
51
|
+
triggers: SEED_DATA_TRIGGERS,
|
|
52
|
+
props: SEED_DATA_PROPS
|
|
53
|
+
}, {
|
|
54
|
+
name: "Button",
|
|
55
|
+
tag: "Button",
|
|
45
56
|
category: _types.COMPONENT_TYPES.button,
|
|
46
57
|
stylesPanelSections: [_types.StylesPanelSections.Typography, _types.StylesPanelSections.Background, _types.StylesPanelSections.Borders, _types.StylesPanelSections.Size, _types.StylesPanelSections.MarginsAndPaddings, _types.StylesPanelSections.Position, _types.StylesPanelSections.Effects],
|
|
47
58
|
layout: { ...LAYOUT,
|
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";
|
|
@@ -32,8 +32,19 @@ export const SEED_DATA = [{
|
|
|
32
32
|
triggers: SEED_DATA_TRIGGERS,
|
|
33
33
|
props: SEED_DATA_PROPS
|
|
34
34
|
}, {
|
|
35
|
-
name: "Button",
|
|
35
|
+
name: "Button Solid",
|
|
36
36
|
tag: "ButtonSolid",
|
|
37
|
+
category: COMPONENT_TYPES.deprecated,
|
|
38
|
+
stylesPanelSections: [StylesPanelSections.Typography, StylesPanelSections.Background, StylesPanelSections.Borders, StylesPanelSections.Size, StylesPanelSections.MarginsAndPaddings, StylesPanelSections.Position, StylesPanelSections.Effects],
|
|
39
|
+
layout: { ...LAYOUT,
|
|
40
|
+
backgroundColor: "primary",
|
|
41
|
+
textAlign: "center"
|
|
42
|
+
},
|
|
43
|
+
triggers: SEED_DATA_TRIGGERS,
|
|
44
|
+
props: SEED_DATA_PROPS
|
|
45
|
+
}, {
|
|
46
|
+
name: "Button",
|
|
47
|
+
tag: "Button",
|
|
37
48
|
category: COMPONENT_TYPES.button,
|
|
38
49
|
stylesPanelSections: [StylesPanelSections.Typography, StylesPanelSections.Background, StylesPanelSections.Borders, StylesPanelSections.Size, StylesPanelSections.MarginsAndPaddings, StylesPanelSections.Position, StylesPanelSections.Effects],
|
|
39
50
|
layout: { ...LAYOUT,
|
|
@@ -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.3-c292ad.2+c292add",
|
|
4
4
|
"description": "Core (non-native) Components",
|
|
5
5
|
"main": "lib/commonjs/index.js",
|
|
6
6
|
"module": "lib/module/index.js",
|
|
@@ -41,7 +41,7 @@
|
|
|
41
41
|
"dependencies": {
|
|
42
42
|
"@date-io/date-fns": "^1.3.13",
|
|
43
43
|
"@draftbit/react-theme-provider": "^2.1.1",
|
|
44
|
-
"@draftbit/types": "^46.4.
|
|
44
|
+
"@draftbit/types": "^46.4.3-c292ad.2+c292add",
|
|
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": "c292add64fa0f6ded7e9271ed1fe2566b9516911"
|
|
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";
|
package/src/mappings/Button.js
CHANGED
|
@@ -43,8 +43,29 @@ export const SEED_DATA = [
|
|
|
43
43
|
props: SEED_DATA_PROPS,
|
|
44
44
|
},
|
|
45
45
|
{
|
|
46
|
-
name: "Button",
|
|
46
|
+
name: "Button Solid",
|
|
47
47
|
tag: "ButtonSolid",
|
|
48
|
+
category: COMPONENT_TYPES.deprecated,
|
|
49
|
+
stylesPanelSections: [
|
|
50
|
+
StylesPanelSections.Typography,
|
|
51
|
+
StylesPanelSections.Background,
|
|
52
|
+
StylesPanelSections.Borders,
|
|
53
|
+
StylesPanelSections.Size,
|
|
54
|
+
StylesPanelSections.MarginsAndPaddings,
|
|
55
|
+
StylesPanelSections.Position,
|
|
56
|
+
StylesPanelSections.Effects,
|
|
57
|
+
],
|
|
58
|
+
layout: {
|
|
59
|
+
...LAYOUT,
|
|
60
|
+
backgroundColor: "primary",
|
|
61
|
+
textAlign: "center",
|
|
62
|
+
},
|
|
63
|
+
triggers: SEED_DATA_TRIGGERS,
|
|
64
|
+
props: SEED_DATA_PROPS,
|
|
65
|
+
},
|
|
66
|
+
{
|
|
67
|
+
name: "Button",
|
|
68
|
+
tag: "Button",
|
|
48
69
|
category: COMPONENT_TYPES.button,
|
|
49
70
|
stylesPanelSections: [
|
|
50
71
|
StylesPanelSections.Typography,
|
package/src/mappings/Button.ts
CHANGED
|
@@ -55,8 +55,29 @@ export const SEED_DATA = [
|
|
|
55
55
|
props: SEED_DATA_PROPS,
|
|
56
56
|
},
|
|
57
57
|
{
|
|
58
|
-
name: "Button",
|
|
58
|
+
name: "Button Solid",
|
|
59
59
|
tag: "ButtonSolid",
|
|
60
|
+
category: COMPONENT_TYPES.deprecated,
|
|
61
|
+
stylesPanelSections: [
|
|
62
|
+
StylesPanelSections.Typography,
|
|
63
|
+
StylesPanelSections.Background,
|
|
64
|
+
StylesPanelSections.Borders,
|
|
65
|
+
StylesPanelSections.Size,
|
|
66
|
+
StylesPanelSections.MarginsAndPaddings,
|
|
67
|
+
StylesPanelSections.Position,
|
|
68
|
+
StylesPanelSections.Effects,
|
|
69
|
+
],
|
|
70
|
+
layout: {
|
|
71
|
+
...LAYOUT,
|
|
72
|
+
backgroundColor: "primary",
|
|
73
|
+
textAlign: "center",
|
|
74
|
+
},
|
|
75
|
+
triggers: SEED_DATA_TRIGGERS,
|
|
76
|
+
props: SEED_DATA_PROPS,
|
|
77
|
+
},
|
|
78
|
+
{
|
|
79
|
+
name: "Button",
|
|
80
|
+
tag: "Button",
|
|
60
81
|
category: COMPONENT_TYPES.button,
|
|
61
82
|
stylesPanelSections: [
|
|
62
83
|
StylesPanelSections.Typography,
|