orcs-design-system 2.0.63 → 2.0.67
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.
|
@@ -73,12 +73,12 @@ export var fullWidth = function fullWidth() {
|
|
|
73
73
|
fullWidth.storyName = "Full width";
|
|
74
74
|
export var disabled = function disabled() {
|
|
75
75
|
return /*#__PURE__*/React.createElement(Spacer, {
|
|
76
|
-
my: "
|
|
76
|
+
my: "r"
|
|
77
77
|
}, /*#__PURE__*/React.createElement(Button, {
|
|
78
78
|
disabled: true
|
|
79
79
|
}, "Disabled button"), /*#__PURE__*/React.createElement(Button, {
|
|
80
80
|
variant: "disabled"
|
|
81
|
-
}, "
|
|
81
|
+
}, "Alternate way of making button disabled"));
|
|
82
82
|
};
|
|
83
83
|
disabled.storyName = "Disabled state";
|
|
84
84
|
export var loading = function loading() {
|
|
@@ -140,6 +140,17 @@ var StyledButton = styled("button").withConfig({
|
|
|
140
140
|
}
|
|
141
141
|
}
|
|
142
142
|
});
|
|
143
|
+
}, function (props) {
|
|
144
|
+
return props.disabled ? css({
|
|
145
|
+
bg: "greyLighter",
|
|
146
|
+
color: "grey",
|
|
147
|
+
borderColor: "greyLighter",
|
|
148
|
+
"&:hover": {
|
|
149
|
+
bg: "greyLighter",
|
|
150
|
+
color: "grey",
|
|
151
|
+
borderColor: "greyLighter"
|
|
152
|
+
}
|
|
153
|
+
}) : css();
|
|
143
154
|
}, ButtonStyles);
|
|
144
155
|
export var Button = /*#__PURE__*/React.forwardRef(function (props, ref) {
|
|
145
156
|
var large = props.large,
|
|
@@ -173,7 +184,6 @@ export var Button = /*#__PURE__*/React.forwardRef(function (props, ref) {
|
|
|
173
184
|
borderWidth: "1px",
|
|
174
185
|
borderStyle: "solid",
|
|
175
186
|
disabled: disabled,
|
|
176
|
-
variant: disabled ? "disabled" : null,
|
|
177
187
|
onClick: onClick,
|
|
178
188
|
ref: ref
|
|
179
189
|
}, ButtonStyles, props), leftIcon && /*#__PURE__*/React.createElement(Icon, {
|
|
@@ -227,10 +237,10 @@ Button.__docgenInfo = {
|
|
|
227
237
|
"value": "\"danger\"",
|
|
228
238
|
"computed": false
|
|
229
239
|
}, {
|
|
230
|
-
"value": "\"
|
|
240
|
+
"value": "\"ghost\"",
|
|
231
241
|
"computed": false
|
|
232
242
|
}, {
|
|
233
|
-
"value": "\"
|
|
243
|
+
"value": "\"disabled\"",
|
|
234
244
|
"computed": false
|
|
235
245
|
}, {
|
|
236
246
|
"value": "\"default\"",
|
|
@@ -335,7 +345,7 @@ Button.propTypes = {
|
|
|
335
345
|
small: PropTypes.bool,
|
|
336
346
|
|
|
337
347
|
/** Specifies alternate button colours/styles. */
|
|
338
|
-
variant: PropTypes.oneOf(["success", "danger", "
|
|
348
|
+
variant: PropTypes.oneOf(["success", "danger", "ghost", "disabled", "default"]),
|
|
339
349
|
|
|
340
350
|
/** Full width button that takes up all available space of parent */
|
|
341
351
|
fullWidth: PropTypes.bool,
|
|
@@ -70,7 +70,8 @@ export var reactLink = function reactLink() {
|
|
|
70
70
|
reactLink.storyName = "Using react-router";
|
|
71
71
|
export var buttonLink = function buttonLink() {
|
|
72
72
|
return /*#__PURE__*/React.createElement(StyledLink, {
|
|
73
|
-
href: "
|
|
73
|
+
href: "https://teamform.co",
|
|
74
|
+
target: "_blank",
|
|
74
75
|
button: true
|
|
75
76
|
}, "Click me");
|
|
76
77
|
};
|
|
@@ -88,12 +88,12 @@ var styleButtonLink = function styleButtonLink(LinkComponent) {
|
|
|
88
88
|
variants: {
|
|
89
89
|
"default": {},
|
|
90
90
|
success: {
|
|
91
|
-
bg: "
|
|
91
|
+
bg: "success",
|
|
92
92
|
color: "white",
|
|
93
|
-
borderColor: "
|
|
93
|
+
borderColor: "success",
|
|
94
94
|
"&:hover": {
|
|
95
|
-
bg: "
|
|
96
|
-
borderColor: "
|
|
95
|
+
bg: "successDark",
|
|
96
|
+
borderColor: "successDark"
|
|
97
97
|
}
|
|
98
98
|
},
|
|
99
99
|
danger: {
|
|
@@ -126,7 +126,18 @@ var styleButtonLink = function styleButtonLink(LinkComponent) {
|
|
|
126
126
|
}
|
|
127
127
|
}
|
|
128
128
|
}
|
|
129
|
-
}))
|
|
129
|
+
}), function (props) {
|
|
130
|
+
return props.disabled ? css({
|
|
131
|
+
bg: "greyLighter",
|
|
132
|
+
color: "grey",
|
|
133
|
+
borderColor: "greyLighter",
|
|
134
|
+
"&:hover": {
|
|
135
|
+
bg: "greyLighter",
|
|
136
|
+
color: "grey",
|
|
137
|
+
borderColor: "greyLighter"
|
|
138
|
+
}
|
|
139
|
+
}) : css();
|
|
140
|
+
}, space, layout);
|
|
130
141
|
};
|
|
131
142
|
|
|
132
143
|
var Hyperlink = styleLink(styled.a.withConfig({
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "orcs-design-system",
|
|
3
|
-
"version": "2.0.
|
|
3
|
+
"version": "2.0.67",
|
|
4
4
|
"description": "Orchestrated's Design System, aka: ORCS",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"design",
|
|
@@ -45,6 +45,7 @@
|
|
|
45
45
|
"@styled-system/prop-types": "^5.1.5",
|
|
46
46
|
"@styled-system/should-forward-prop": "^5.1.5",
|
|
47
47
|
"@styled-system/theme-get": "^5.1.2",
|
|
48
|
+
"moment": "^2.29.2",
|
|
48
49
|
"polished": "^3.7.1",
|
|
49
50
|
"prop-types": "^15.6.2",
|
|
50
51
|
"react-app-polyfill": "^2.0.0",
|
|
@@ -58,8 +59,7 @@
|
|
|
58
59
|
"react-test-renderer": "^17.0.1",
|
|
59
60
|
"styled-components-grid": "^2.2.2",
|
|
60
61
|
"styled-is": "^1.3.0",
|
|
61
|
-
"styled-system": "^5.1.5"
|
|
62
|
-
"moment": "^2.29.2"
|
|
62
|
+
"styled-system": "^5.1.5"
|
|
63
63
|
},
|
|
64
64
|
"devDependencies": {
|
|
65
65
|
"@babel/cli": "^7.12.10",
|