carbon-react 102.4.6 → 102.7.0
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/components/button/button-types.style.js +51 -64
- package/lib/components/button/button.component.js +6 -15
- package/lib/components/button/button.style.js +19 -18
- package/lib/components/icon/icon.style.js +3 -0
- package/lib/components/inline-inputs/inline-inputs.component.js +14 -21
- package/lib/components/inline-inputs/inline-inputs.style.js +34 -36
- package/lib/components/loader/loader-square.style.js +2 -6
- package/lib/components/loader-bar/loader-bar.style.js +3 -7
- package/lib/components/pages/page/page.style.js +1 -1
- package/lib/style/themes/aegean/aegean-theme.config.js +2 -1
- package/lib/style/themes/base/base-theme.config.js +1 -0
- package/lib/style/themes/mint/mint-theme.config.js +2 -1
- package/package.json +1 -1
|
@@ -19,140 +19,127 @@ function makeColors(color) {
|
|
|
19
19
|
`;
|
|
20
20
|
}
|
|
21
21
|
|
|
22
|
-
var _default = ({
|
|
23
|
-
colors,
|
|
24
|
-
disabled
|
|
25
|
-
}, isDisabled, destructive) => ({
|
|
22
|
+
var _default = (isDisabled, destructive) => ({
|
|
26
23
|
primary: `
|
|
27
|
-
background:
|
|
24
|
+
background: var(--colorsActionMajor500);
|
|
28
25
|
border-color: transparent;
|
|
29
|
-
|
|
26
|
+
${makeColors("var(--colorsActionMajorYang100)")};
|
|
30
27
|
&:hover {
|
|
31
|
-
background:
|
|
28
|
+
background: var(--colorsActionMajor600);
|
|
32
29
|
}
|
|
33
30
|
|
|
34
31
|
${isDisabled ? `
|
|
35
|
-
background:
|
|
36
|
-
|
|
32
|
+
background: var(--colorsActionDisabled500);
|
|
33
|
+
${makeColors("var(--colorsYin030)")};
|
|
37
34
|
&:hover {
|
|
38
|
-
background:
|
|
39
|
-
border-color: ${disabled.button};
|
|
40
|
-
color: ${disabled.text};
|
|
35
|
+
background: var(--colorsActionDisabled500);
|
|
41
36
|
}
|
|
42
37
|
` : ""}
|
|
43
38
|
|
|
44
|
-
${destructive ? `background:
|
|
45
|
-
|
|
46
|
-
color: ${colors.white};
|
|
39
|
+
${destructive ? `background: var(--colorsSemanticNegative500);
|
|
40
|
+
${makeColors("var(--colorsSemanticNegativeYang100)")};
|
|
47
41
|
&:hover {
|
|
48
|
-
background:
|
|
42
|
+
background: var(--colorsSemanticNegative600);
|
|
49
43
|
}
|
|
50
44
|
|
|
51
45
|
${isDisabled ? `
|
|
52
|
-
background:
|
|
53
|
-
|
|
46
|
+
background: var(--colorsActionDisabled500);
|
|
47
|
+
${makeColors("var(--colorsYin030)")};
|
|
54
48
|
&:hover {
|
|
55
|
-
background:
|
|
56
|
-
color: ${disabled.text};
|
|
49
|
+
background: var(--colorsActionDisabled500);
|
|
57
50
|
}
|
|
58
51
|
` : ""}` : ""}
|
|
59
52
|
`,
|
|
60
53
|
secondary: `
|
|
61
54
|
background: transparent;
|
|
62
|
-
border-color:
|
|
63
|
-
|
|
55
|
+
border-color: var(--colorsActionMajor500);
|
|
56
|
+
${makeColors("var(--colorsActionMajor500)")};
|
|
64
57
|
&:hover {
|
|
65
|
-
background:
|
|
66
|
-
border-color:
|
|
67
|
-
|
|
58
|
+
background: var(--colorsActionMajor600);
|
|
59
|
+
border-color: var(--colorsActionMajorTransparent);
|
|
60
|
+
${makeColors("var(--colorsActionMajorYang100)")};
|
|
68
61
|
}
|
|
69
62
|
|
|
70
63
|
${destructive ? `
|
|
71
|
-
border-color:
|
|
72
|
-
${makeColors(
|
|
73
|
-
&:focus {
|
|
74
|
-
${makeColors(colors.white)}
|
|
75
|
-
background: ${colors.destructive.hover};
|
|
76
|
-
}
|
|
64
|
+
border-color: var(--colorsSemanticNegative500);
|
|
65
|
+
${makeColors("var(--colorsSemanticNegative500)")}
|
|
77
66
|
&:hover {
|
|
78
|
-
|
|
79
|
-
border-color:
|
|
80
|
-
|
|
67
|
+
background: var(--colorsSemanticNegative600);
|
|
68
|
+
border-color: var(--colorsSemanticNegativeTransparent);
|
|
69
|
+
${makeColors("var(--colorsSemanticNegativeYang100)")};
|
|
81
70
|
}
|
|
82
71
|
` : ""}
|
|
83
72
|
|
|
84
73
|
${isDisabled ? `
|
|
85
|
-
border-color:
|
|
86
|
-
|
|
74
|
+
border-color: var(--colorsActionDisabled500);
|
|
75
|
+
${makeColors("var(--colorsYin030)")};
|
|
87
76
|
&:hover {
|
|
88
|
-
background: transparent
|
|
89
|
-
border-color:
|
|
90
|
-
${makeColors(
|
|
77
|
+
background: transparent;
|
|
78
|
+
border-color: var(--colorsActionDisabled500);
|
|
79
|
+
${makeColors("var(--colorsYin030)")};
|
|
91
80
|
}
|
|
92
81
|
` : ""}
|
|
93
82
|
`,
|
|
94
83
|
tertiary: `
|
|
95
84
|
background: transparent;
|
|
96
85
|
border-color: transparent;
|
|
97
|
-
|
|
86
|
+
${makeColors("var(--colorsActionMajor500)")};
|
|
98
87
|
&:hover {
|
|
99
|
-
|
|
88
|
+
background: var(--colorsActionMajor600);
|
|
89
|
+
${makeColors("var(--colorsActionMajorYang100)")};
|
|
100
90
|
}
|
|
101
91
|
|
|
102
92
|
${destructive ? `
|
|
103
|
-
${makeColors(
|
|
93
|
+
${makeColors("var(--colorsSemanticNegative500)")};
|
|
104
94
|
&:hover {
|
|
105
|
-
|
|
95
|
+
background: var(--colorsSemanticNegative600);
|
|
96
|
+
${makeColors("var(--colorsSemanticNegativeYang100)")};
|
|
106
97
|
}
|
|
107
98
|
` : ""}
|
|
108
99
|
|
|
109
100
|
${isDisabled ? `
|
|
110
|
-
|
|
101
|
+
${makeColors("var(--colorsYin030)")};
|
|
111
102
|
&:hover {
|
|
112
|
-
|
|
103
|
+
background: var(--colorsActionMajorTransparent);
|
|
104
|
+
${makeColors("var(--colorsYin030)")};
|
|
113
105
|
}
|
|
114
106
|
` : ""}
|
|
115
107
|
`,
|
|
116
108
|
dashed: `
|
|
117
109
|
background: transparent;
|
|
118
|
-
border: 2px
|
|
119
|
-
|
|
120
|
-
color: ${colors.dashedButtonText};
|
|
110
|
+
border: 2px dashed var(--colorsActionMinor500);
|
|
111
|
+
${makeColors("var(--colorsActionMinor500)")};
|
|
121
112
|
&:hover {
|
|
122
|
-
background-color:
|
|
113
|
+
background-color: var(--colorsActionMinor200);
|
|
123
114
|
}
|
|
124
115
|
|
|
125
116
|
${destructive ? `
|
|
126
|
-
|
|
127
|
-
&:hover {
|
|
128
|
-
${makeColors(colors.destructive.hover)}
|
|
129
|
-
}
|
|
117
|
+
border-color: var(--colorsSemanticNegative500);
|
|
130
118
|
` : ""}
|
|
131
119
|
|
|
132
120
|
${isDisabled ? `
|
|
133
|
-
border-color:
|
|
134
|
-
|
|
121
|
+
border-color: var(--colorsActionDisabled500);
|
|
122
|
+
${makeColors("var(--colorsYin030)")};
|
|
135
123
|
&:hover {
|
|
136
124
|
background-color: transparent;
|
|
137
|
-
${makeColors(disabled.text)}
|
|
138
125
|
}
|
|
139
126
|
` : ""}
|
|
140
127
|
`,
|
|
141
128
|
darkBackground: `
|
|
142
|
-
background:
|
|
129
|
+
background: var(--colorsActionMajorYang100);
|
|
143
130
|
border-color: transparent;
|
|
144
|
-
|
|
131
|
+
${makeColors("var(--colorsActionMajor500)")};
|
|
145
132
|
&:hover {
|
|
146
|
-
background:
|
|
147
|
-
${makeColors(
|
|
133
|
+
background: var(--colorsActionMajor600);
|
|
134
|
+
${makeColors("var(--colorsActionMajorYang100)")}
|
|
148
135
|
}
|
|
149
136
|
|
|
150
137
|
${isDisabled ? `
|
|
151
|
-
background:
|
|
152
|
-
|
|
138
|
+
background: var(--colorsActionDisabled500);
|
|
139
|
+
${makeColors("var(--colorsYin030)")};
|
|
153
140
|
&:hover {
|
|
154
|
-
background:
|
|
155
|
-
${makeColors(
|
|
141
|
+
background: var(--colorsActionDisabled500);
|
|
142
|
+
${makeColors("var(--colorsYin030)")};
|
|
156
143
|
}
|
|
157
144
|
` : ""}
|
|
158
145
|
`
|
|
@@ -7,8 +7,6 @@ exports.default = exports.ButtonWithForwardRef = void 0;
|
|
|
7
7
|
|
|
8
8
|
var _react = _interopRequireWildcard(require("react"));
|
|
9
9
|
|
|
10
|
-
var _styledComponents = require("styled-components");
|
|
11
|
-
|
|
12
10
|
var _propTypes = _interopRequireDefault(require("prop-types"));
|
|
13
11
|
|
|
14
12
|
var _propTypes2 = _interopRequireDefault(require("@styled-system/prop-types"));
|
|
@@ -19,8 +17,6 @@ var _button = _interopRequireWildcard(require("./button.style"));
|
|
|
19
17
|
|
|
20
18
|
var _tags = _interopRequireDefault(require("../../__internal__/utils/helpers/tags/tags"));
|
|
21
19
|
|
|
22
|
-
var _base = _interopRequireDefault(require("../../style/themes/base"));
|
|
23
|
-
|
|
24
20
|
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
|
|
25
21
|
|
|
26
22
|
function _getRequireWildcardCache() { if (typeof WeakMap !== "function") return null; var cache = new WeakMap(); _getRequireWildcardCache = function () { return cache; }; return cache; }
|
|
@@ -39,16 +35,15 @@ function renderChildren({
|
|
|
39
35
|
disabled,
|
|
40
36
|
buttonType,
|
|
41
37
|
iconTooltipMessage,
|
|
42
|
-
iconTooltipPosition
|
|
43
|
-
theme
|
|
38
|
+
iconTooltipPosition
|
|
44
39
|
/* eslint-enable */
|
|
45
40
|
|
|
46
41
|
}) {
|
|
47
42
|
const iconColorMap = {
|
|
48
|
-
primary:
|
|
49
|
-
secondary:
|
|
50
|
-
tertiary:
|
|
51
|
-
darkBackground:
|
|
43
|
+
primary: "var(--colorsActionMajorYang100)",
|
|
44
|
+
secondary: "var(--colorsActionMajor500)",
|
|
45
|
+
tertiary: "var(--colorsActionMajor500)",
|
|
46
|
+
darkBackground: "var(--colorsActionMajor500)"
|
|
52
47
|
};
|
|
53
48
|
const iconProps = {
|
|
54
49
|
"aria-hidden": true,
|
|
@@ -74,7 +69,6 @@ const renderStyledButton = buttonProps => {
|
|
|
74
69
|
disabled,
|
|
75
70
|
buttonType,
|
|
76
71
|
iconType,
|
|
77
|
-
theme,
|
|
78
72
|
href,
|
|
79
73
|
ref,
|
|
80
74
|
m = 0,
|
|
@@ -136,8 +130,6 @@ const renderStyledButton = buttonProps => {
|
|
|
136
130
|
};
|
|
137
131
|
|
|
138
132
|
const Button = props => {
|
|
139
|
-
const theme = (0, _react.useContext)(_styledComponents.ThemeContext) || _base.default;
|
|
140
|
-
|
|
141
133
|
const {
|
|
142
134
|
size,
|
|
143
135
|
subtext
|
|
@@ -151,8 +143,7 @@ const Button = props => {
|
|
|
151
143
|
} = props;
|
|
152
144
|
const propsWithoutAs = { ...rest,
|
|
153
145
|
buttonType: buttonType || as,
|
|
154
|
-
ref: forwardRef || linkRef
|
|
155
|
-
theme
|
|
146
|
+
ref: forwardRef || linkRef
|
|
156
147
|
};
|
|
157
148
|
|
|
158
149
|
if (subtext.length > 0 && size !== "large") {
|
|
@@ -51,15 +51,6 @@ const StyledButton = _styledComponents.default.button`
|
|
|
51
51
|
${stylingForType}
|
|
52
52
|
`}
|
|
53
53
|
|
|
54
|
-
&&& {
|
|
55
|
-
${({
|
|
56
|
-
mb,
|
|
57
|
-
theme
|
|
58
|
-
}) => (mb || mb === 0) && (0, _styledComponents.css)`
|
|
59
|
-
margin-bottom: ${mb * theme.spacing}px;
|
|
60
|
-
`}
|
|
61
|
-
}
|
|
62
|
-
|
|
63
54
|
${({
|
|
64
55
|
fullWidth
|
|
65
56
|
}) => fullWidth && (0, _styledComponents.css)`
|
|
@@ -68,12 +59,11 @@ const StyledButton = _styledComponents.default.button`
|
|
|
68
59
|
|
|
69
60
|
${({
|
|
70
61
|
iconOnly,
|
|
71
|
-
iconPosition
|
|
72
|
-
theme
|
|
62
|
+
iconPosition
|
|
73
63
|
}) => (0, _styledComponents.css)`
|
|
74
64
|
${_icon.default} {
|
|
75
|
-
margin-left: ${!iconOnly && iconPosition === "after" ?
|
|
76
|
-
margin-right: ${!iconOnly && iconPosition === "before" ?
|
|
65
|
+
margin-left: ${!iconOnly && iconPosition === "after" ? "var(--spacing100)" : "0px"};
|
|
66
|
+
margin-right: ${!iconOnly && iconPosition === "before" ? "var(--spacing100)" : "0px"};
|
|
77
67
|
margin-bottom: ${iconOnly ? "1px" : "0px"};
|
|
78
68
|
height: ${additionalIconStyle};
|
|
79
69
|
svg {
|
|
@@ -123,7 +113,6 @@ function stylingForType({
|
|
|
123
113
|
iconOnly,
|
|
124
114
|
disabled,
|
|
125
115
|
buttonType,
|
|
126
|
-
theme,
|
|
127
116
|
size,
|
|
128
117
|
destructive
|
|
129
118
|
}) {
|
|
@@ -133,18 +122,18 @@ function stylingForType({
|
|
|
133
122
|
font-weight: 600;
|
|
134
123
|
text-decoration: none;
|
|
135
124
|
&:focus {
|
|
136
|
-
outline: solid 3px
|
|
125
|
+
outline: solid 3px var(--colorsSemanticFocus500);
|
|
137
126
|
}
|
|
138
127
|
|
|
139
|
-
${(0, _buttonTypes.default)(
|
|
128
|
+
${(0, _buttonTypes.default)(disabled, destructive)[buttonType]};
|
|
140
129
|
|
|
141
130
|
${size === "small" && (0, _styledComponents.css)`
|
|
142
|
-
font-size:
|
|
131
|
+
font-size: var(--fontSizes100);
|
|
143
132
|
min-height: 32px;
|
|
144
133
|
`}
|
|
145
134
|
|
|
146
135
|
${size === "medium" && (0, _styledComponents.css)`
|
|
147
|
-
font-size:
|
|
136
|
+
font-size: var(--fontSizes100);
|
|
148
137
|
min-height: 40px;
|
|
149
138
|
`}
|
|
150
139
|
|
|
@@ -171,15 +160,27 @@ StyledButton.propTypes = {
|
|
|
171
160
|
/** The text the button displays */
|
|
172
161
|
children: _propTypes.default.node.isRequired,
|
|
173
162
|
|
|
163
|
+
/** Apply destructive style to the button */
|
|
164
|
+
destructive: _propTypes.default.bool,
|
|
165
|
+
|
|
174
166
|
/** Apply disabled state to the button */
|
|
175
167
|
disabled: _propTypes.default.bool,
|
|
176
168
|
|
|
169
|
+
/** Apply fullWidth style to the button */
|
|
170
|
+
fullWidth: _propTypes.default.bool,
|
|
171
|
+
|
|
172
|
+
/** Apply iconOnly to display button with the icon only */
|
|
173
|
+
iconOnly: _propTypes.default.oneOfType([_propTypes.default.bool, _propTypes.default.string]),
|
|
174
|
+
|
|
177
175
|
/** Defines an Icon position within the button */
|
|
178
176
|
iconPosition: _propTypes.default.oneOf([..._button.BUTTON_ICON_POSITIONS, ""]),
|
|
179
177
|
|
|
180
178
|
/** Defines an Icon type within the button (see Icon for options) */
|
|
181
179
|
iconType: _propTypes.default.oneOf([..._iconConfig.ICONS, ""]),
|
|
182
180
|
|
|
181
|
+
/** If provided, the text inside a button will not wrap */
|
|
182
|
+
noWrap: _propTypes.default.bool,
|
|
183
|
+
|
|
183
184
|
/** Assigns a size to the button */
|
|
184
185
|
size: _propTypes.default.oneOf(_button.BUTTON_SIZES),
|
|
185
186
|
|
|
@@ -77,6 +77,9 @@ const StyledIcon = _styledComponents.default.span`
|
|
|
77
77
|
if (disabled) {
|
|
78
78
|
finalColor = theme.icon.disabled;
|
|
79
79
|
finalHoverColor = theme.icon.disabled;
|
|
80
|
+
} else if (typeof color === "string" && color.startsWith("var")) {
|
|
81
|
+
finalColor = color;
|
|
82
|
+
finalHoverColor = (0, _polished.shade)(0.2, theme.compatibility[color.replace("var(--", "").replace(")", "")]);
|
|
80
83
|
} else if (color) {
|
|
81
84
|
const {
|
|
82
85
|
color: renderedColor
|
|
@@ -9,11 +9,9 @@ var _react = _interopRequireWildcard(require("react"));
|
|
|
9
9
|
|
|
10
10
|
var _propTypes = _interopRequireDefault(require("prop-types"));
|
|
11
11
|
|
|
12
|
-
var _row = require("../row");
|
|
13
|
-
|
|
14
12
|
var _label = _interopRequireDefault(require("../../__internal__/label"));
|
|
15
13
|
|
|
16
|
-
var _inlineInputs =
|
|
14
|
+
var _inlineInputs = _interopRequireWildcard(require("./inline-inputs.style"));
|
|
17
15
|
|
|
18
16
|
var _guid = _interopRequireDefault(require("../../__internal__/utils/helpers/guid"));
|
|
19
17
|
|
|
@@ -23,9 +21,7 @@ function _getRequireWildcardCache() { if (typeof WeakMap !== "function") return
|
|
|
23
21
|
|
|
24
22
|
function _interopRequireWildcard(obj) { if (obj && obj.__esModule) { return obj; } if (obj === null || typeof obj !== "object" && typeof obj !== "function") { return { default: obj }; } var cache = _getRequireWildcardCache(); if (cache && cache.has(obj)) { return cache.get(obj); } var newObj = {}; var hasPropertyDescriptor = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var key in obj) { if (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
23
|
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
const columnWrapper = children => {
|
|
24
|
+
const columnWrapper = (children, gutter) => {
|
|
29
25
|
let inputs = children;
|
|
30
26
|
|
|
31
27
|
if (!Array.isArray(inputs)) {
|
|
@@ -36,8 +32,10 @@ const columnWrapper = children => {
|
|
|
36
32
|
// Input is never going to be re-ordered so we don't require a defined key
|
|
37
33
|
|
|
38
34
|
/* eslint-disable react/no-array-index-key */
|
|
39
|
-
return /*#__PURE__*/_react.default.createElement(
|
|
40
|
-
key: index
|
|
35
|
+
return /*#__PURE__*/_react.default.createElement(_inlineInputs.StyledInlineInput, {
|
|
36
|
+
key: index,
|
|
37
|
+
gutter: gutter,
|
|
38
|
+
"data-element": "inline-input"
|
|
41
39
|
}, input);
|
|
42
40
|
});
|
|
43
41
|
};
|
|
@@ -53,14 +51,6 @@ const InlineInputs = props => {
|
|
|
53
51
|
labelWidth
|
|
54
52
|
} = props;
|
|
55
53
|
const labelId = (0, _react.useRef)((0, _guid.default)());
|
|
56
|
-
const widthProps = {
|
|
57
|
-
inputWidth
|
|
58
|
-
};
|
|
59
|
-
|
|
60
|
-
if (labelWidth) {
|
|
61
|
-
widthProps.labelWidth = labelWidth;
|
|
62
|
-
widthProps.inputWidth = inputWidth || 100 - labelWidth;
|
|
63
|
-
}
|
|
64
54
|
|
|
65
55
|
function renderLabel() {
|
|
66
56
|
if (!label) return null;
|
|
@@ -78,13 +68,16 @@ const InlineInputs = props => {
|
|
|
78
68
|
}));
|
|
79
69
|
}
|
|
80
70
|
|
|
81
|
-
return /*#__PURE__*/_react.default.createElement(_inlineInputs.default,
|
|
71
|
+
return /*#__PURE__*/_react.default.createElement(_inlineInputs.default, {
|
|
82
72
|
gutter: gutter,
|
|
83
73
|
"data-component": "inline-inputs",
|
|
84
|
-
className: className
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
74
|
+
className: className,
|
|
75
|
+
labelWidth: labelWidth
|
|
76
|
+
}, renderLabel(), /*#__PURE__*/_react.default.createElement(_inlineInputs.StyledContentContainer, {
|
|
77
|
+
gutter: gutter,
|
|
78
|
+
"data-element": "inline-inputs-container",
|
|
79
|
+
inputWidth: inputWidth
|
|
80
|
+
}, columnWrapper(renderChildren(), gutter)));
|
|
88
81
|
}; // Assign props over for demo site
|
|
89
82
|
|
|
90
83
|
|
|
@@ -3,14 +3,10 @@
|
|
|
3
3
|
Object.defineProperty(exports, "__esModule", {
|
|
4
4
|
value: true
|
|
5
5
|
});
|
|
6
|
-
exports.default = void 0;
|
|
6
|
+
exports.default = exports.StyledInlineInput = exports.StyledContentContainer = void 0;
|
|
7
7
|
|
|
8
8
|
var _styledComponents = _interopRequireWildcard(require("styled-components"));
|
|
9
9
|
|
|
10
|
-
var _row = _interopRequireDefault(require("../row/row.style"));
|
|
11
|
-
|
|
12
|
-
var _column = _interopRequireDefault(require("../row/column/column.style"));
|
|
13
|
-
|
|
14
10
|
var _inputPresentation = _interopRequireDefault(require("../../__internal__/input/input-presentation.style"));
|
|
15
11
|
|
|
16
12
|
var _label = require("../../__internal__/label/label.style");
|
|
@@ -33,20 +29,46 @@ const spacings = {
|
|
|
33
29
|
large: 32,
|
|
34
30
|
"extra-large": 40
|
|
35
31
|
};
|
|
36
|
-
const
|
|
37
|
-
|
|
38
|
-
align-items: center;
|
|
32
|
+
const StyledInlineInput = _styledComponents.default.div`
|
|
33
|
+
flex: 1;
|
|
39
34
|
|
|
40
35
|
${({
|
|
36
|
+
gutter
|
|
37
|
+
}) => (0, _styledComponents.css)`
|
|
38
|
+
margin-bottom: 0;
|
|
39
|
+
padding-left: ${spacings[gutter]}px;
|
|
40
|
+
`}
|
|
41
|
+
`;
|
|
42
|
+
exports.StyledInlineInput = StyledInlineInput;
|
|
43
|
+
const StyledContentContainer = _styledComponents.default.div`
|
|
44
|
+
display: flex;
|
|
45
|
+
flex: ${({
|
|
41
46
|
inputWidth
|
|
42
|
-
}) => inputWidth
|
|
43
|
-
|
|
44
|
-
|
|
47
|
+
}) => inputWidth ? `0 0 ${inputWidth}%` : 1};
|
|
48
|
+
|
|
49
|
+
${({
|
|
50
|
+
gutter
|
|
51
|
+
}) => (0, _styledComponents.css)`
|
|
52
|
+
margin-bottom: 0;
|
|
53
|
+
margin-left: -${spacings[gutter]}px;
|
|
54
|
+
|
|
55
|
+
${gutter === "none" && (0, _styledComponents.css)`
|
|
56
|
+
${StyledInlineInput} + ${StyledInlineInput} ${_inputPresentation.default} {
|
|
57
|
+
border-left: none;
|
|
58
|
+
}
|
|
59
|
+
`}
|
|
60
|
+
`}
|
|
61
|
+
`;
|
|
62
|
+
exports.StyledContentContainer = StyledContentContainer;
|
|
63
|
+
const StyledInlineInputs = _styledComponents.default.div`
|
|
64
|
+
display: flex;
|
|
65
|
+
align-items: center;
|
|
45
66
|
|
|
46
67
|
${_label.StyledLabelContainer} {
|
|
68
|
+
width: auto;
|
|
47
69
|
margin-bottom: 0;
|
|
48
70
|
padding-right: 16px;
|
|
49
|
-
|
|
71
|
+
flex: 0 0 ${({
|
|
50
72
|
labelWidth
|
|
51
73
|
}) => labelWidth ? `${labelWidth}%` : "auto"};
|
|
52
74
|
}
|
|
@@ -58,30 +80,6 @@ const StyledInlineInputs = _styledComponents.default.div`
|
|
|
58
80
|
[data-component="carbon-select"] input {
|
|
59
81
|
width: 30px;
|
|
60
82
|
}
|
|
61
|
-
|
|
62
|
-
${_row.default} {
|
|
63
|
-
flex-grow: 1;
|
|
64
|
-
}
|
|
65
|
-
|
|
66
|
-
${({
|
|
67
|
-
gutter
|
|
68
|
-
}) => (0, _styledComponents.css)`
|
|
69
|
-
${_row.default} {
|
|
70
|
-
margin-bottom: 0;
|
|
71
|
-
margin-left: -${spacings[gutter]}px;
|
|
72
|
-
|
|
73
|
-
> ${_column.default} {
|
|
74
|
-
margin-bottom: 0;
|
|
75
|
-
padding-left: ${spacings[gutter]}px;
|
|
76
|
-
}
|
|
77
|
-
}
|
|
78
|
-
|
|
79
|
-
${gutter === "none" && (0, _styledComponents.css)`
|
|
80
|
-
${_column.default} + ${_column.default} ${_inputPresentation.default} {
|
|
81
|
-
border-left: none;
|
|
82
|
-
}
|
|
83
|
-
`}
|
|
84
|
-
`}
|
|
85
83
|
`;
|
|
86
84
|
StyledInlineInputs.defaultProps = {
|
|
87
85
|
theme: _base.default
|
|
@@ -9,8 +9,6 @@ var _styledComponents = _interopRequireWildcard(require("styled-components"));
|
|
|
9
9
|
|
|
10
10
|
var _propTypes = _interopRequireDefault(require("prop-types"));
|
|
11
11
|
|
|
12
|
-
var _base = _interopRequireDefault(require("../../style/themes/base"));
|
|
13
|
-
|
|
14
12
|
var _loader = require("./loader.config");
|
|
15
13
|
|
|
16
14
|
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
|
|
@@ -59,18 +57,17 @@ const getDimentions = size => {
|
|
|
59
57
|
|
|
60
58
|
const StyledLoaderSquare = _styledComponents.default.div`
|
|
61
59
|
${({
|
|
62
|
-
theme,
|
|
63
60
|
size,
|
|
64
61
|
isInsideButton,
|
|
65
62
|
isActive
|
|
66
63
|
}) => (0, _styledComponents.css)`
|
|
67
64
|
animation: ${loaderAnimation} 1s infinite ease-in-out both;
|
|
68
|
-
background-color:
|
|
65
|
+
background-color: var(--colorsActionMajor500);
|
|
69
66
|
display: inline-block;
|
|
70
67
|
${getDimentions(size)}
|
|
71
68
|
|
|
72
69
|
${isInsideButton && (0, _styledComponents.css)`
|
|
73
|
-
background-color: ${isActive ?
|
|
70
|
+
background-color: ${isActive ? "var(--colorsYang100)" : "var(--colorsSemanticNeutral500)"};
|
|
74
71
|
`}
|
|
75
72
|
|
|
76
73
|
&:nth-of-type(1) {
|
|
@@ -88,7 +85,6 @@ const StyledLoaderSquare = _styledComponents.default.div`
|
|
|
88
85
|
`}
|
|
89
86
|
`;
|
|
90
87
|
StyledLoaderSquare.defaultProps = {
|
|
91
|
-
theme: _base.default,
|
|
92
88
|
size: "small",
|
|
93
89
|
isInsideButton: false,
|
|
94
90
|
isActive: true
|
|
@@ -40,24 +40,22 @@ const innerBarAnimation = (0, _styledComponents.keyframes)`
|
|
|
40
40
|
`;
|
|
41
41
|
const StyledLoaderBar = _styledComponents.default.div`
|
|
42
42
|
${({
|
|
43
|
-
size
|
|
44
|
-
theme
|
|
43
|
+
size
|
|
45
44
|
}) => (0, _styledComponents.css)`
|
|
46
45
|
display: inline-block;
|
|
47
46
|
height: ${getHeight(size)};
|
|
48
47
|
width: 100%;
|
|
49
|
-
background-color:
|
|
48
|
+
background-color: var(--colorsActionMajor150);
|
|
50
49
|
overflow: hidden;
|
|
51
50
|
position: relative;
|
|
52
51
|
`}
|
|
53
52
|
`;
|
|
54
53
|
const InnerBar = _styledComponents.default.div`
|
|
55
54
|
${({
|
|
56
|
-
theme,
|
|
57
55
|
size
|
|
58
56
|
}) => (0, _styledComponents.css)`
|
|
59
57
|
position: absolute;
|
|
60
|
-
background-color:
|
|
58
|
+
background-color: var(--colorsActionMajor500);
|
|
61
59
|
width: ${INNER_BAR_LENGTH};
|
|
62
60
|
height: ${getHeight(size)};
|
|
63
61
|
animation: 2s ${innerBarAnimation} linear 0s infinite normal none running;
|
|
@@ -82,11 +80,9 @@ StyledLoader.defaultProps = {
|
|
|
82
80
|
theme: _base.default
|
|
83
81
|
};
|
|
84
82
|
StyledLoaderBar.defaultProps = {
|
|
85
|
-
theme: _base.default,
|
|
86
83
|
size: "medium"
|
|
87
84
|
};
|
|
88
85
|
InnerBar.defaultProps = {
|
|
89
|
-
theme: _base.default,
|
|
90
86
|
size: "medium"
|
|
91
87
|
};
|
|
92
88
|
StyledLoaderBar.propTypes = {
|
|
@@ -17,7 +17,7 @@ const StyledPage = _styledComponents.default.article`
|
|
|
17
17
|
`;
|
|
18
18
|
exports.StyledPage = StyledPage;
|
|
19
19
|
const StyledPageContent = _styledComponents.default.div`
|
|
20
|
-
box-sizing:
|
|
20
|
+
box-sizing: border-box;
|
|
21
21
|
padding: 30px 40px;
|
|
22
22
|
width: 100%;
|
|
23
23
|
height: 100%;
|
|
@@ -31,7 +31,8 @@ var _default = palette => {
|
|
|
31
31
|
get compatibility() {
|
|
32
32
|
return {
|
|
33
33
|
colorsActionMajor500: this.colors.primary,
|
|
34
|
-
colorsActionMajor600: this.colors.secondary
|
|
34
|
+
colorsActionMajor600: this.colors.secondary,
|
|
35
|
+
colorsActionMajor150: this.colors.loadingBarBackground
|
|
35
36
|
};
|
|
36
37
|
}
|
|
37
38
|
|
|
@@ -343,6 +343,7 @@ var _default = palette => {
|
|
|
343
343
|
|
|
344
344
|
get compatibility() {
|
|
345
345
|
return { ..._common.default,
|
|
346
|
+
colorsActionMajor150: this.colors.loadingBarBackground,
|
|
346
347
|
colorsActionMajor500: this.colors.primary,
|
|
347
348
|
colorsActionMajor600: this.colors.secondary,
|
|
348
349
|
colorsActionDisabled500: this.disabled.background,
|
|
@@ -25,7 +25,8 @@ var _default = palette => {
|
|
|
25
25
|
get compatibility() {
|
|
26
26
|
return {
|
|
27
27
|
colorsActionMajor500: this.colors.primary,
|
|
28
|
-
colorsActionMajor600: this.colors.secondary
|
|
28
|
+
colorsActionMajor600: this.colors.secondary,
|
|
29
|
+
colorsActionMajor150: this.colors.loadingBarBackground
|
|
29
30
|
};
|
|
30
31
|
}
|
|
31
32
|
|