carbon-react 104.14.0 → 104.17.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/__internal__/validations/validation-icon.style.js +9 -6
- package/lib/components/button-bar/button-bar.style.d.ts +0 -1
- package/lib/components/button-bar/button-bar.style.js +6 -7
- package/lib/components/decimal/decimal.component.d.ts +8 -3
- package/lib/components/decimal/decimal.component.js +8 -3
- package/lib/components/note/note.style.js +14 -28
- package/lib/components/select/option-group-header/option-group-header.style.js +3 -3
- package/lib/components/select/select-list/select-list.style.js +2 -2
- package/lib/components/select/select.style.js +2 -2
- package/lib/components/tabs/__internal__/tab-title/tab-title.component.js +3 -3
- package/lib/components/tabs/__internal__/tab-title/tab-title.style.js +77 -92
- package/lib/components/tabs/__internal__/tabs-header/tabs-header.style.js +3 -9
- package/lib/components/tabs/tabs.style.js +1 -2
- package/lib/style/themes/base/base-theme.config.d.ts +1 -3
- package/lib/style/themes/base/base-theme.config.js +0 -3
- package/lib/style/themes/sage/index.d.ts +1 -0
- package/package.json +2 -2
|
@@ -19,6 +19,12 @@ function _getRequireWildcardCache() { if (typeof WeakMap !== "function") return
|
|
|
19
19
|
|
|
20
20
|
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; }
|
|
21
21
|
|
|
22
|
+
const validationIconTypes = {
|
|
23
|
+
error: "var(--colorsSemanticNegative500)",
|
|
24
|
+
info: "var(--colorsSemanticInfo500)",
|
|
25
|
+
success: "var(--colorsSemanticPositive500)",
|
|
26
|
+
warning: "var(--colorsSemanticCaution500)"
|
|
27
|
+
};
|
|
22
28
|
const ValidationIconStyle = _styledComponents.default.span`
|
|
23
29
|
background: none;
|
|
24
30
|
cursor: default;
|
|
@@ -37,15 +43,12 @@ const ValidationIconStyle = _styledComponents.default.span`
|
|
|
37
43
|
|
|
38
44
|
${_icon.default}:before {
|
|
39
45
|
color: ${({
|
|
40
|
-
validationType
|
|
41
|
-
|
|
42
|
-
}) => theme.colors[validationType]};
|
|
46
|
+
validationType
|
|
47
|
+
}) => validationIconTypes[validationType]};
|
|
43
48
|
}
|
|
44
49
|
|
|
45
50
|
${_icon.default}:focus {
|
|
46
|
-
outline: solid 2px
|
|
47
|
-
theme
|
|
48
|
-
}) => theme.colors.focus};
|
|
51
|
+
outline: solid 2px var(--colorsSemanticFocus500);
|
|
49
52
|
}
|
|
50
53
|
|
|
51
54
|
${_styledSystem.margin}
|
|
@@ -29,7 +29,6 @@ const ButtonBar = _styledComponents.default.div`
|
|
|
29
29
|
`;
|
|
30
30
|
|
|
31
31
|
function stylingForType({
|
|
32
|
-
theme,
|
|
33
32
|
size
|
|
34
33
|
}) {
|
|
35
34
|
return (0, _styledComponents.css)`
|
|
@@ -50,7 +49,7 @@ function stylingForType({
|
|
|
50
49
|
|
|
51
50
|
button {
|
|
52
51
|
margin: 0;
|
|
53
|
-
border: 2px solid
|
|
52
|
+
border: 2px solid var(--colorsActionMajor500);
|
|
54
53
|
|
|
55
54
|
&:not(:last-of-type) {
|
|
56
55
|
border-right-color: transparent;
|
|
@@ -61,20 +60,20 @@ function stylingForType({
|
|
|
61
60
|
&:focus {
|
|
62
61
|
position: relative;
|
|
63
62
|
z-index: 2;
|
|
64
|
-
border-right-color:
|
|
63
|
+
border-right-color: var(--colorsActionMajor500);
|
|
65
64
|
}
|
|
66
65
|
&:hover {
|
|
67
|
-
background-color:
|
|
68
|
-
border-color:
|
|
66
|
+
background-color: var(--colorsActionMajor600);
|
|
67
|
+
border-color: var(--colorsActionMajor600);
|
|
69
68
|
& + button {
|
|
70
|
-
border-left-color:
|
|
69
|
+
border-left-color: var(--colorsActionMajor600);
|
|
71
70
|
}
|
|
72
71
|
& ${_icon.default} {
|
|
73
72
|
color: white;
|
|
74
73
|
}
|
|
75
74
|
}
|
|
76
75
|
& ${_icon.default} {
|
|
77
|
-
color:
|
|
76
|
+
color: var(--colorsActionMajor500);
|
|
78
77
|
}
|
|
79
78
|
}
|
|
80
79
|
`;
|
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
export default Decimal;
|
|
2
2
|
declare function Decimal({ align, defaultValue, precision, inputWidth, readOnly, onChange, onBlur, onKeyPress, id, name, allowEmptyValue, required, locale, value, ...rest }: {
|
|
3
3
|
[x: string]: any;
|
|
4
|
-
align
|
|
4
|
+
align: any;
|
|
5
5
|
defaultValue: any;
|
|
6
|
-
precision
|
|
6
|
+
precision: any;
|
|
7
7
|
inputWidth: any;
|
|
8
8
|
readOnly: any;
|
|
9
9
|
onChange: any;
|
|
@@ -11,7 +11,7 @@ declare function Decimal({ align, defaultValue, precision, inputWidth, readOnly,
|
|
|
11
11
|
onKeyPress: any;
|
|
12
12
|
id: any;
|
|
13
13
|
name: any;
|
|
14
|
-
allowEmptyValue
|
|
14
|
+
allowEmptyValue: any;
|
|
15
15
|
required: any;
|
|
16
16
|
locale: any;
|
|
17
17
|
value: any;
|
|
@@ -77,5 +77,10 @@ declare namespace Decimal {
|
|
|
77
77
|
/** Aria label for rendered help component */
|
|
78
78
|
helpAriaLabel: PropTypes.Requireable<string>;
|
|
79
79
|
};
|
|
80
|
+
namespace defaultProps {
|
|
81
|
+
const precision: number;
|
|
82
|
+
const allowEmptyValue: boolean;
|
|
83
|
+
const align: string;
|
|
84
|
+
}
|
|
80
85
|
}
|
|
81
86
|
import PropTypes from "prop-types";
|
|
@@ -30,9 +30,9 @@ function _extends() { _extends = Object.assign || function (target) { for (var i
|
|
|
30
30
|
const marginPropTypes = (0, _utils.filterStyledSystemMarginProps)(_propTypes2.default.space);
|
|
31
31
|
|
|
32
32
|
const Decimal = ({
|
|
33
|
-
align
|
|
33
|
+
align,
|
|
34
34
|
defaultValue,
|
|
35
|
-
precision
|
|
35
|
+
precision,
|
|
36
36
|
inputWidth,
|
|
37
37
|
readOnly,
|
|
38
38
|
onChange,
|
|
@@ -40,7 +40,7 @@ const Decimal = ({
|
|
|
40
40
|
onKeyPress,
|
|
41
41
|
id,
|
|
42
42
|
name,
|
|
43
|
-
allowEmptyValue
|
|
43
|
+
allowEmptyValue,
|
|
44
44
|
required,
|
|
45
45
|
locale,
|
|
46
46
|
value,
|
|
@@ -309,5 +309,10 @@ Decimal.propTypes = {
|
|
|
309
309
|
/** Aria label for rendered help component */
|
|
310
310
|
helpAriaLabel: _propTypes.default.string
|
|
311
311
|
};
|
|
312
|
+
Decimal.defaultProps = {
|
|
313
|
+
precision: 2,
|
|
314
|
+
allowEmptyValue: false,
|
|
315
|
+
align: "right"
|
|
316
|
+
};
|
|
312
317
|
var _default = Decimal;
|
|
313
318
|
exports.default = _default;
|
|
@@ -26,7 +26,6 @@ const StyledNoteContent = _styledComponents.default.div`
|
|
|
26
26
|
width: 100%;
|
|
27
27
|
|
|
28
28
|
${({
|
|
29
|
-
theme,
|
|
30
29
|
hasPreview
|
|
31
30
|
}) => (0, _styledComponents.css)`
|
|
32
31
|
&:not(:last-of-type) {
|
|
@@ -42,16 +41,16 @@ const StyledNoteContent = _styledComponents.default.div`
|
|
|
42
41
|
div.public-DraftEditor-content {
|
|
43
42
|
min-height: inherit;
|
|
44
43
|
height: 100%;
|
|
45
|
-
background-color:
|
|
44
|
+
background-color: var(--colorsUtilityYang100);
|
|
46
45
|
line-height: 21px;
|
|
47
46
|
}
|
|
48
47
|
|
|
49
48
|
&:last-of-type:not(:first-of-type) {
|
|
50
|
-
border-top: solid 1px
|
|
49
|
+
border-top: solid 1px var(--colorsUtilityMajor050);
|
|
51
50
|
}
|
|
52
51
|
|
|
53
52
|
${hasPreview && `
|
|
54
|
-
margin-top:
|
|
53
|
+
margin-top: var(--spacing200);
|
|
55
54
|
`}
|
|
56
55
|
`}
|
|
57
56
|
`;
|
|
@@ -76,10 +75,9 @@ const StyledFooterContent = _styledComponents.default.div`
|
|
|
76
75
|
font-weight: bold;
|
|
77
76
|
|
|
78
77
|
${({
|
|
79
|
-
theme,
|
|
80
78
|
hasName
|
|
81
79
|
}) => (0, _styledComponents.css)`
|
|
82
|
-
margin-top:
|
|
80
|
+
margin-top: var(--spacing200);
|
|
83
81
|
|
|
84
82
|
${hasName && (0, _styledComponents.css)`
|
|
85
83
|
&:first-of-type {
|
|
@@ -88,29 +86,29 @@ const StyledFooterContent = _styledComponents.default.div`
|
|
|
88
86
|
|
|
89
87
|
&:nth-of-type(2) {
|
|
90
88
|
font-size: 12px;
|
|
91
|
-
color:
|
|
92
|
-
margin-left:
|
|
89
|
+
color: var(--colorsUtilityYin065);
|
|
90
|
+
margin-left: var(--spacing200);
|
|
93
91
|
}
|
|
94
92
|
|
|
95
93
|
&:last-of-type:not(:nth-of-type(2)) {
|
|
96
94
|
font-size: 12px;
|
|
97
|
-
color:
|
|
95
|
+
color: var(--colorsUtilityYin065);
|
|
98
96
|
cursor: pointer;
|
|
99
|
-
margin-left:
|
|
97
|
+
margin-left: var(--spacing300);
|
|
100
98
|
}
|
|
101
99
|
`}
|
|
102
100
|
|
|
103
101
|
${!hasName && (0, _styledComponents.css)`
|
|
104
102
|
&:first-of-type {
|
|
105
103
|
font-size: 12px;
|
|
106
|
-
color:
|
|
104
|
+
color: var(--colorsUtilityYin065);
|
|
107
105
|
}
|
|
108
106
|
|
|
109
107
|
&:last-of-type:not(:first-of-type) {
|
|
110
108
|
font-size: 12px;
|
|
111
|
-
color:
|
|
109
|
+
color: var(--colorsUtilityYin065);
|
|
112
110
|
cursor: pointer;
|
|
113
|
-
margin-left:
|
|
111
|
+
margin-left: var(--spacing300);
|
|
114
112
|
}
|
|
115
113
|
`}
|
|
116
114
|
`}
|
|
@@ -118,19 +116,16 @@ const StyledFooterContent = _styledComponents.default.div`
|
|
|
118
116
|
exports.StyledFooterContent = StyledFooterContent;
|
|
119
117
|
const StyledFooter = _styledComponents.default.div`
|
|
120
118
|
display: flex;
|
|
121
|
-
margin-bottom:
|
|
122
|
-
theme
|
|
123
|
-
}) => `${-theme.spacing}px;`}
|
|
119
|
+
margin-bottom: calc(-1 * var(--spacing100));
|
|
124
120
|
flex-wrap: wrap;
|
|
125
121
|
`;
|
|
126
122
|
exports.StyledFooter = StyledFooter;
|
|
127
123
|
const StyledNote = _styledComponents.default.div`
|
|
128
124
|
${({
|
|
129
|
-
theme,
|
|
130
125
|
width
|
|
131
126
|
}) => (0, _styledComponents.css)`
|
|
132
|
-
background-color:
|
|
133
|
-
border: 1px solid
|
|
127
|
+
background-color: var(--colorsUtilityYang100);
|
|
128
|
+
border: 1px solid var(--colorsUtilityMajor100);
|
|
134
129
|
display: flex;
|
|
135
130
|
flex-direction: column;
|
|
136
131
|
padding: 24px;
|
|
@@ -155,19 +150,10 @@ const StyledNote = _styledComponents.default.div`
|
|
|
155
150
|
${_styledSystem.margin}
|
|
156
151
|
`;
|
|
157
152
|
exports.StyledNote = StyledNote;
|
|
158
|
-
StyledNoteContent.defaultProps = {
|
|
159
|
-
theme: _base.default
|
|
160
|
-
};
|
|
161
153
|
StyledNote.propTypes = {
|
|
162
154
|
padding: _propTypes.default.string,
|
|
163
155
|
width: _propTypes.default.number
|
|
164
156
|
};
|
|
165
157
|
StyledNote.defaultProps = {
|
|
166
158
|
theme: _base.default
|
|
167
|
-
};
|
|
168
|
-
StyledFooter.defaultProps = {
|
|
169
|
-
theme: _base.default
|
|
170
|
-
};
|
|
171
|
-
StyledFooterContent.defaultProps = {
|
|
172
|
-
theme: _base.default
|
|
173
159
|
};
|
|
@@ -26,16 +26,16 @@ const StyledOptionGroupHeader = _styledComponents.default.div`
|
|
|
26
26
|
line-height: 18px;
|
|
27
27
|
text-align: left;
|
|
28
28
|
margin: 0;
|
|
29
|
-
color: var(--
|
|
29
|
+
color: var(--colorsUtilityYin055);
|
|
30
30
|
}
|
|
31
31
|
|
|
32
32
|
${_icon.default} {
|
|
33
33
|
margin-right: 4px;
|
|
34
34
|
margin-left: -5px;
|
|
35
|
-
color: var(--
|
|
35
|
+
color: var(--colorsUtilityYin055);
|
|
36
36
|
|
|
37
37
|
&:hover {
|
|
38
|
-
color: var(--
|
|
38
|
+
color: var(--colorsUtilityYin055);
|
|
39
39
|
}
|
|
40
40
|
}
|
|
41
41
|
`;
|
|
@@ -101,7 +101,7 @@ const StyledSelectListTableHeader = _styledComponents.default.thead`
|
|
|
101
101
|
font-weight: 900;
|
|
102
102
|
font-size: 12px;
|
|
103
103
|
text-transform: uppercase;
|
|
104
|
-
color: var(--
|
|
104
|
+
color: var(--colorsUtilityYin055);
|
|
105
105
|
:after {
|
|
106
106
|
content: "";
|
|
107
107
|
display: block;
|
|
@@ -110,7 +110,7 @@ const StyledSelectListTableHeader = _styledComponents.default.thead`
|
|
|
110
110
|
left: 0px;
|
|
111
111
|
background-image: linear-gradient(
|
|
112
112
|
var(--colorsComponentsNavigationYin100),
|
|
113
|
-
var(--
|
|
113
|
+
var(--colorsUtilityYang100)
|
|
114
114
|
);
|
|
115
115
|
opacity: 0.03;
|
|
116
116
|
height: 8px;
|
|
@@ -46,8 +46,8 @@ const StyledSelect = _styledComponents.default.div`
|
|
|
46
46
|
`}
|
|
47
47
|
|
|
48
48
|
${readOnly && (0, _styledComponents.css)`
|
|
49
|
-
cursor: "text";
|
|
50
|
-
color: var(--
|
|
49
|
+
cursor: ${hasTextCursor ? "text" : "default"};
|
|
50
|
+
color: var(--colorsActionMinorYin090);
|
|
51
51
|
text-shadow: none;
|
|
52
52
|
`}
|
|
53
53
|
}
|
|
@@ -145,7 +145,8 @@ const TabTitle = /*#__PURE__*/_react.default.forwardRef(({
|
|
|
145
145
|
target: "_blank",
|
|
146
146
|
as: "a"
|
|
147
147
|
}, (0, _tags.default)("tab-header", tabTitleProps), {
|
|
148
|
-
onKeyDown: handleKeyDown
|
|
148
|
+
onKeyDown: handleKeyDown,
|
|
149
|
+
size: size
|
|
149
150
|
}), /*#__PURE__*/_react.default.createElement(_tabTitle.StyledTitleContent, {
|
|
150
151
|
error: error,
|
|
151
152
|
warning: warning,
|
|
@@ -184,8 +185,7 @@ const TabTitle = /*#__PURE__*/_react.default.forwardRef(({
|
|
|
184
185
|
tabIndex: null
|
|
185
186
|
}))), !(hasFailedValidation || hasAlternateStyling) && isTabSelected && /*#__PURE__*/_react.default.createElement(_tabTitle.StyledSelectedIndicator, {
|
|
186
187
|
"data-element": "tab-selected-indicator",
|
|
187
|
-
position: position
|
|
188
|
-
size: size
|
|
188
|
+
position: position
|
|
189
189
|
}));
|
|
190
190
|
});
|
|
191
191
|
|
|
@@ -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 _icon = _interopRequireDefault(require("../../../icon/icon.style"));
|
|
15
13
|
|
|
16
14
|
var _validationIcon = _interopRequireDefault(require("../../../../__internal__/validations/validation-icon.style"));
|
|
@@ -26,7 +24,6 @@ const StyledTitleContent = _styledComponents.default.span`
|
|
|
26
24
|
display: inline-block;
|
|
27
25
|
|
|
28
26
|
${({
|
|
29
|
-
theme,
|
|
30
27
|
size,
|
|
31
28
|
borders,
|
|
32
29
|
position,
|
|
@@ -49,7 +46,7 @@ const StyledTitleContent = _styledComponents.default.span`
|
|
|
49
46
|
`}
|
|
50
47
|
|
|
51
48
|
${hasHref && (0, _styledComponents.css)`
|
|
52
|
-
color:
|
|
49
|
+
color: var(--colorsActionMinorYin090);
|
|
53
50
|
display: block;
|
|
54
51
|
text-decoration: none;
|
|
55
52
|
|
|
@@ -62,13 +59,19 @@ const StyledTitleContent = _styledComponents.default.span`
|
|
|
62
59
|
}
|
|
63
60
|
`}
|
|
64
61
|
|
|
62
|
+
${!hasHref && (0, _styledComponents.css)`
|
|
63
|
+
[data-component="icon"] {
|
|
64
|
+
color: var(--colorsActionMinorYin065);
|
|
65
|
+
}
|
|
66
|
+
`}
|
|
67
|
+
|
|
65
68
|
${borders && (0, _styledComponents.css)`
|
|
66
|
-
border-top: 1px solid
|
|
67
|
-
border-left: 1px solid
|
|
68
|
-
border-right: 1px solid
|
|
69
|
+
border-top: 1px solid var(--colorsActionMinor100);
|
|
70
|
+
border-left: 1px solid var(--colorsActionMinor100);
|
|
71
|
+
border-right: 1px solid var(--colorsActionMinor100);
|
|
69
72
|
|
|
70
73
|
${position === "left" && (0, _styledComponents.css)`
|
|
71
|
-
border-bottom: 1px solid
|
|
74
|
+
border-bottom: 1px solid var(--colorsActionMinor100);
|
|
72
75
|
${!alternateStyling && `margin-right: -1px;`}
|
|
73
76
|
`}
|
|
74
77
|
|
|
@@ -76,7 +79,7 @@ const StyledTitleContent = _styledComponents.default.span`
|
|
|
76
79
|
border-left: none;
|
|
77
80
|
|
|
78
81
|
${!noRightBorder && (0, _styledComponents.css)`
|
|
79
|
-
border-right: 1px solid
|
|
82
|
+
border-right: 1px solid var(--colorsActionMinor100);
|
|
80
83
|
`}
|
|
81
84
|
`}
|
|
82
85
|
|
|
@@ -86,14 +89,14 @@ const StyledTitleContent = _styledComponents.default.span`
|
|
|
86
89
|
`}
|
|
87
90
|
|
|
88
91
|
${size === "large" && position === "top" && (0, _styledComponents.css)`
|
|
89
|
-
padding:
|
|
92
|
+
padding: 14px 24px;
|
|
90
93
|
${borders && `padding-bottom: 9px;`}
|
|
91
94
|
font-size: 16px;
|
|
92
95
|
`}
|
|
93
96
|
|
|
94
97
|
${size === "large" && position === "left" && (0, _styledComponents.css)`
|
|
95
98
|
font-size: 16px;
|
|
96
|
-
padding:
|
|
99
|
+
padding: 14px 24px;
|
|
97
100
|
${!isTabSelected && !alternateStyling && error && `margin-right: -2px;`}
|
|
98
101
|
`}
|
|
99
102
|
|
|
@@ -112,7 +115,6 @@ const StyledTitleContent = _styledComponents.default.span`
|
|
|
112
115
|
position,
|
|
113
116
|
warning,
|
|
114
117
|
info,
|
|
115
|
-
theme,
|
|
116
118
|
size,
|
|
117
119
|
hasCustomLayout
|
|
118
120
|
}) => (warning || info) && (0, _styledComponents.css)`
|
|
@@ -120,11 +122,11 @@ const StyledTitleContent = _styledComponents.default.span`
|
|
|
120
122
|
outline-offset: -1px;
|
|
121
123
|
|
|
122
124
|
${info && !warning && (0, _styledComponents.css)`
|
|
123
|
-
outline-color:
|
|
125
|
+
outline-color: var(--colorsSemanticInfo500);
|
|
124
126
|
`}
|
|
125
127
|
|
|
126
128
|
${warning && (0, _styledComponents.css)`
|
|
127
|
-
outline-color:
|
|
129
|
+
outline-color: var(--colorsSemanticCaution500);
|
|
128
130
|
`}
|
|
129
131
|
|
|
130
132
|
${position === "top" && (0, _styledComponents.css)`
|
|
@@ -133,7 +135,7 @@ const StyledTitleContent = _styledComponents.default.span`
|
|
|
133
135
|
|
|
134
136
|
${position === "left" && (0, _styledComponents.css)`
|
|
135
137
|
border-right-color: transparent;
|
|
136
|
-
padding-right: ${size === "large" ? "26px
|
|
138
|
+
padding-right: ${size === "large" ? "26px" : "18px"};
|
|
137
139
|
`}
|
|
138
140
|
|
|
139
141
|
&:hover {
|
|
@@ -141,11 +143,11 @@ const StyledTitleContent = _styledComponents.default.span`
|
|
|
141
143
|
outline-offset: -1px;
|
|
142
144
|
|
|
143
145
|
${info && !warning && (0, _styledComponents.css)`
|
|
144
|
-
outline-color:
|
|
146
|
+
outline-color: var(--colorsSemanticInfo500);
|
|
145
147
|
`}
|
|
146
148
|
|
|
147
149
|
${warning && (0, _styledComponents.css)`
|
|
148
|
-
outline-color:
|
|
150
|
+
outline-color: var(--colorsSemanticCaution500);
|
|
149
151
|
`}
|
|
150
152
|
|
|
151
153
|
${position === "top" && (0, _styledComponents.css)`
|
|
@@ -158,19 +160,18 @@ const StyledTitleContent = _styledComponents.default.span`
|
|
|
158
160
|
|
|
159
161
|
${position === "left" && (0, _styledComponents.css)`
|
|
160
162
|
border-right-color: transparent;
|
|
161
|
-
padding-right: ${size === "large" ? "26px
|
|
163
|
+
padding-right: ${size === "large" ? "26px" : "18px"};
|
|
162
164
|
`}
|
|
163
165
|
}
|
|
164
166
|
`}
|
|
165
167
|
|
|
166
168
|
${({
|
|
167
169
|
error,
|
|
168
|
-
theme,
|
|
169
170
|
position,
|
|
170
171
|
size,
|
|
171
172
|
hasCustomLayout
|
|
172
173
|
}) => error && (0, _styledComponents.css)`
|
|
173
|
-
outline: 2px solid
|
|
174
|
+
outline: 2px solid var(--colorsSemanticNegative500);
|
|
174
175
|
outline-offset: -2px;
|
|
175
176
|
|
|
176
177
|
${position === "top" && (0, _styledComponents.css)`
|
|
@@ -183,7 +184,7 @@ const StyledTitleContent = _styledComponents.default.span`
|
|
|
183
184
|
`}
|
|
184
185
|
|
|
185
186
|
&:hover {
|
|
186
|
-
outline: 2px solid
|
|
187
|
+
outline: 2px solid var(--colorsSemanticNegative500);
|
|
187
188
|
outline-offset: -2px;
|
|
188
189
|
${position === "top" && (0, _styledComponents.css)`
|
|
189
190
|
border-bottom-color: transparent;
|
|
@@ -211,8 +212,6 @@ const StyledTitleContent = _styledComponents.default.span`
|
|
|
211
212
|
position
|
|
212
213
|
}) => hasSiblings && !hasCustomLayout && position === "top" && (0, _styledComponents.css)`
|
|
213
214
|
height: 20px;
|
|
214
|
-
padding-top: 10px;
|
|
215
|
-
padding-bottom: 10px;
|
|
216
215
|
|
|
217
216
|
${size === "large" && !(error || warning || info) && isTabSelected && (0, _styledComponents.css)`
|
|
218
217
|
padding-bottom: 6px;
|
|
@@ -241,16 +240,16 @@ const StyledTitleContent = _styledComponents.default.span`
|
|
|
241
240
|
`}
|
|
242
241
|
|
|
243
242
|
${position === "top" && (0, _styledComponents.css)`
|
|
244
|
-
padding: ${size === "large" ? "2px
|
|
245
|
-
|
|
246
|
-
|
|
247
|
-
|
|
248
|
-
|
|
249
|
-
padding-bottom: ${size === "large" ? "4px
|
|
250
|
-
padding-right: ${size === "large" ? "18px
|
|
243
|
+
padding: ${size === "large" ? "2px" : "0px"};
|
|
244
|
+
${isTabSelected && (0, _styledComponents.css)`
|
|
245
|
+
padding-bottom: 0px;
|
|
246
|
+
`}
|
|
247
|
+
${(error || warning || info) && (0, _styledComponents.css)`
|
|
248
|
+
padding-bottom: ${size === "large" ? "4px" : "2px"};
|
|
249
|
+
padding-right: ${size === "large" ? "18px" : "14px"};
|
|
251
250
|
|
|
252
251
|
&:hover {
|
|
253
|
-
padding-bottom: ${size === "large" ? "4px
|
|
252
|
+
padding-bottom: ${size === "large" ? "4px" : "2px"};
|
|
254
253
|
}
|
|
255
254
|
`};
|
|
256
255
|
`}
|
|
@@ -269,6 +268,9 @@ const StyledTabTitle = _styledComponents.default.button`
|
|
|
269
268
|
text-decoration: none;
|
|
270
269
|
outline-offset: 0px;
|
|
271
270
|
margin: 0;
|
|
271
|
+
height: ${({
|
|
272
|
+
size
|
|
273
|
+
}) => size === "large" ? "var(--sizing600)" : "var(--sizing500)"};
|
|
272
274
|
|
|
273
275
|
a:visited {
|
|
274
276
|
color: inherit;
|
|
@@ -281,8 +283,6 @@ const StyledTabTitle = _styledComponents.default.button`
|
|
|
281
283
|
noLeftBorder
|
|
282
284
|
}) => (0, _styledComponents.css)`
|
|
283
285
|
${position === "top" && (0, _styledComponents.css)`
|
|
284
|
-
height: 40px;
|
|
285
|
-
|
|
286
286
|
${borders && !(noRightBorder || noLeftBorder) && (0, _styledComponents.css)`
|
|
287
287
|
&:nth-of-type(n + 1) {
|
|
288
288
|
margin-left: -1px;
|
|
@@ -305,49 +305,48 @@ const StyledTabTitle = _styledComponents.default.button`
|
|
|
305
305
|
`}
|
|
306
306
|
|
|
307
307
|
${({
|
|
308
|
-
isTabSelected
|
|
309
|
-
theme
|
|
308
|
+
isTabSelected
|
|
310
309
|
}) => !isTabSelected && (0, _styledComponents.css)`
|
|
310
|
+
color: var(--colorsActionMinorYin090);
|
|
311
|
+
|
|
311
312
|
&:hover {
|
|
312
|
-
background:
|
|
313
|
-
color:
|
|
313
|
+
background: var(--colorsActionMinor100);
|
|
314
|
+
color: var(--colorsActionMinorYin090);
|
|
314
315
|
outline: none;
|
|
315
316
|
}
|
|
316
317
|
&:focus {
|
|
317
|
-
color:
|
|
318
|
+
color: var(--colorsActionMinorYin090);
|
|
318
319
|
outline: none;
|
|
319
320
|
}
|
|
320
321
|
`}
|
|
321
322
|
|
|
322
323
|
${({
|
|
323
324
|
isTabSelected,
|
|
324
|
-
theme,
|
|
325
325
|
alternateStyling,
|
|
326
326
|
error,
|
|
327
327
|
warning,
|
|
328
328
|
info
|
|
329
329
|
}) => isTabSelected && (0, _styledComponents.css)`
|
|
330
|
-
|
|
331
|
-
|
|
330
|
+
color: var(--colorsActionMajorYin090);
|
|
331
|
+
background-color: var(--colorsActionMajorYang100);
|
|
332
332
|
|
|
333
|
-
|
|
333
|
+
${(error || warning || info) && (0, _styledComponents.css)`
|
|
334
334
|
padding-bottom: 0px;
|
|
335
335
|
`}
|
|
336
336
|
|
|
337
|
-
|
|
338
|
-
|
|
339
|
-
|
|
340
|
-
|
|
341
|
-
|
|
342
|
-
|
|
343
|
-
|
|
337
|
+
&:hover {
|
|
338
|
+
background-color: var(--colorsActionMajorYang100);
|
|
339
|
+
border-bottom-color: ${alternateStyling ? "var(--colorsActionMinor100)" : "var(--colorsActionMajor500)"};
|
|
340
|
+
color: var(--colorsActionMajorYin090);
|
|
341
|
+
cursor: default;
|
|
342
|
+
}
|
|
343
|
+
`}
|
|
344
344
|
|
|
345
345
|
${({
|
|
346
|
-
theme,
|
|
347
346
|
isInSidebar
|
|
348
347
|
}) => `
|
|
349
348
|
&:focus {
|
|
350
|
-
outline: ${isInSidebar ? "none;" :
|
|
349
|
+
outline: ${isInSidebar ? "none;" : "var(--borderWidth300) solid var(--colorsSemanticFocus500);"}
|
|
351
350
|
z-index: 2;
|
|
352
351
|
}
|
|
353
352
|
`}
|
|
@@ -355,7 +354,6 @@ const StyledTabTitle = _styledComponents.default.button`
|
|
|
355
354
|
${({
|
|
356
355
|
position,
|
|
357
356
|
borders,
|
|
358
|
-
theme,
|
|
359
357
|
alternateStyling,
|
|
360
358
|
error,
|
|
361
359
|
warning,
|
|
@@ -367,7 +365,7 @@ const StyledTabTitle = _styledComponents.default.button`
|
|
|
367
365
|
|
|
368
366
|
${!isInSidebar && (0, _styledComponents.css)`
|
|
369
367
|
border-right: ${alternateStyling ? "1px" : "2px"} solid
|
|
370
|
-
|
|
368
|
+
var(--colorsActionMinor100);
|
|
371
369
|
`}
|
|
372
370
|
|
|
373
371
|
${!borders && (0, _styledComponents.css)`
|
|
@@ -385,7 +383,7 @@ const StyledTabTitle = _styledComponents.default.button`
|
|
|
385
383
|
}
|
|
386
384
|
|
|
387
385
|
&:hover {
|
|
388
|
-
${alternateStyling &&
|
|
386
|
+
${alternateStyling && "border-right-color: var(--colorsActionMinor100)"}
|
|
389
387
|
}
|
|
390
388
|
|
|
391
389
|
${(warning || info) && (0, _styledComponents.css)`
|
|
@@ -396,7 +394,7 @@ const StyledTabTitle = _styledComponents.default.button`
|
|
|
396
394
|
isTabSelected
|
|
397
395
|
}) => isTabSelected && (0, _styledComponents.css)`
|
|
398
396
|
${alternateStyling && (0, _styledComponents.css)`
|
|
399
|
-
border-right-color:
|
|
397
|
+
border-right-color: var(--colorsActionMinor100);
|
|
400
398
|
`}
|
|
401
399
|
|
|
402
400
|
${!alternateStyling && (0, _styledComponents.css)`
|
|
@@ -404,41 +402,40 @@ const StyledTabTitle = _styledComponents.default.button`
|
|
|
404
402
|
padding-bottom: 0px;
|
|
405
403
|
|
|
406
404
|
${StyledTitleContent} {
|
|
407
|
-
${!(error || warning || info) &&
|
|
405
|
+
${!(error || warning || info) && "margin-right: 2px;"}
|
|
408
406
|
border-right: none;
|
|
409
407
|
}
|
|
410
408
|
`}
|
|
411
409
|
|
|
412
|
-
background-color:
|
|
410
|
+
background-color: var(--colorsActionMajorYang100);
|
|
413
411
|
|
|
414
412
|
&:hover {
|
|
415
|
-
${alternateStyling &&
|
|
416
|
-
background-color:
|
|
417
|
-
${(error || warning || info) &&
|
|
413
|
+
${alternateStyling && "border-right-color: var(--colorsActionMinor100);"}
|
|
414
|
+
background-color: var(--colorsActionMajorYang100);
|
|
415
|
+
${(error || warning || info) && "border-right-color: var(--colorsSemanticNegative500);"}
|
|
418
416
|
}
|
|
419
417
|
|
|
420
418
|
&:focus {
|
|
421
|
-
${(error || warning || info) &&
|
|
419
|
+
${(error || warning || info) && "border-right-color: var(--colorsSemanticNegative500);"}
|
|
422
420
|
}
|
|
423
421
|
`}
|
|
424
422
|
`}
|
|
425
423
|
|
|
426
424
|
${({
|
|
427
425
|
alternateStyling,
|
|
428
|
-
theme,
|
|
429
426
|
isTabSelected,
|
|
430
427
|
isInSidebar
|
|
431
428
|
}) => alternateStyling && (0, _styledComponents.css)`
|
|
432
429
|
&:focus {
|
|
433
|
-
background-color:
|
|
430
|
+
background-color: var(--colorsActionMinor100);
|
|
434
431
|
}
|
|
435
432
|
|
|
436
433
|
&:hover {
|
|
437
|
-
background-color: ${isTabSelected ?
|
|
434
|
+
background-color: ${isTabSelected ? "var(--colorsActionMinor100)" : "var(--colorsActionMinor150)"};
|
|
438
435
|
}
|
|
439
436
|
|
|
440
437
|
${isTabSelected && (0, _styledComponents.css)`
|
|
441
|
-
background-color:
|
|
438
|
+
background-color: var(--colorsActionMinor100);
|
|
442
439
|
`}
|
|
443
440
|
|
|
444
441
|
${isInSidebar && `padding-bottom: 1px;`}
|
|
@@ -461,17 +458,13 @@ const StyledLayoutWrapper = _styledComponents.default.div`
|
|
|
461
458
|
}) => !hasCustomLayout && (0, _styledComponents.css)`
|
|
462
459
|
display: inline-flex;
|
|
463
460
|
|
|
464
|
-
|
|
465
|
-
|
|
466
|
-
|
|
467
|
-
|
|
468
|
-
|
|
469
|
-
|
|
470
|
-
|
|
471
|
-
`}
|
|
472
|
-
${!hasCustomSibling && (0, _styledComponents.css)`
|
|
473
|
-
${titlePosition === "before" ? `left: ${theme.spacing}px;` : `right: ${theme.spacing}px;`}
|
|
474
|
-
`}
|
|
461
|
+
position: relative;
|
|
462
|
+
top: -1px;
|
|
463
|
+
${hasCustomSibling && (0, _styledComponents.css)`
|
|
464
|
+
left: 4px;
|
|
465
|
+
`}
|
|
466
|
+
${!hasCustomSibling && (0, _styledComponents.css)`
|
|
467
|
+
${titlePosition === "before" ? "left: 8px;" : "right: 8px;"}
|
|
475
468
|
`}
|
|
476
469
|
|
|
477
470
|
${_icon.default} {
|
|
@@ -495,29 +488,25 @@ const StyledSelectedIndicator = _styledComponents.default.div`
|
|
|
495
488
|
z-index: 1;
|
|
496
489
|
|
|
497
490
|
${({
|
|
498
|
-
position
|
|
499
|
-
size,
|
|
500
|
-
theme
|
|
491
|
+
position
|
|
501
492
|
}) => position === "top" && (0, _styledComponents.css)`
|
|
502
493
|
bottom: 0px;
|
|
503
494
|
left: 0px;
|
|
504
|
-
box-shadow: inset 0px
|
|
505
|
-
|
|
495
|
+
box-shadow: inset 0px calc(-1 * var(--sizing025)) 0px
|
|
496
|
+
var(--colorsActionMajor500);
|
|
506
497
|
width: 100%;
|
|
507
|
-
height:
|
|
498
|
+
height: var(--sizing025);
|
|
508
499
|
`}
|
|
509
500
|
|
|
510
501
|
${({
|
|
511
|
-
position
|
|
512
|
-
size,
|
|
513
|
-
theme
|
|
502
|
+
position
|
|
514
503
|
}) => position === "left" && (0, _styledComponents.css)`
|
|
515
504
|
top: 0px;
|
|
516
505
|
right: 0px;
|
|
517
|
-
box-shadow: inset
|
|
518
|
-
|
|
506
|
+
box-shadow: inset calc(-1 * var(--sizing025)) 0px 0px 0px
|
|
507
|
+
var(--colorsActionMajor500);
|
|
519
508
|
height: 100%;
|
|
520
|
-
width:
|
|
509
|
+
width: var(--sizing025);
|
|
521
510
|
`}
|
|
522
511
|
`;
|
|
523
512
|
exports.StyledSelectedIndicator = StyledSelectedIndicator;
|
|
@@ -527,7 +516,6 @@ StyledTabTitle.propTypes = {
|
|
|
527
516
|
borders: _propTypes.default.bool
|
|
528
517
|
};
|
|
529
518
|
StyledTabTitle.defaultProps = {
|
|
530
|
-
theme: _base.default,
|
|
531
519
|
position: "top",
|
|
532
520
|
size: "default",
|
|
533
521
|
borders: false
|
|
@@ -537,7 +525,6 @@ StyledLayoutWrapper.propTypes = {
|
|
|
537
525
|
titlePosition: _propTypes.default.oneOf(["before", "after"])
|
|
538
526
|
};
|
|
539
527
|
StyledLayoutWrapper.defaultProps = {
|
|
540
|
-
theme: _base.default,
|
|
541
528
|
titlePosition: "before"
|
|
542
529
|
};
|
|
543
530
|
StyledTitleContent.propTypes = {
|
|
@@ -552,7 +539,6 @@ StyledTitleContent.propTypes = {
|
|
|
552
539
|
hasSiblings: _propTypes.default.bool
|
|
553
540
|
};
|
|
554
541
|
StyledTitleContent.defaultProps = {
|
|
555
|
-
theme: _base.default,
|
|
556
542
|
position: "top",
|
|
557
543
|
size: "default",
|
|
558
544
|
borders: false
|
|
@@ -562,7 +548,6 @@ StyledSelectedIndicator.propTypes = {
|
|
|
562
548
|
size: _propTypes.default.oneOf(["default", "large"])
|
|
563
549
|
};
|
|
564
550
|
StyledSelectedIndicator.defaultProps = {
|
|
565
|
-
theme: _base.default,
|
|
566
551
|
position: "top",
|
|
567
552
|
size: "default"
|
|
568
553
|
};
|
|
@@ -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
|
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
|
|
15
13
|
|
|
16
14
|
function _getRequireWildcardCache() { if (typeof WeakMap !== "function") return null; var cache = new WeakMap(); _getRequireWildcardCache = function () { return cache; }; return cache; }
|
|
@@ -36,7 +34,7 @@ const StyledTabsHeaderWrapper = _styledComponents.default.div`
|
|
|
36
34
|
}) => position === "left" && (0, _styledComponents.css)`
|
|
37
35
|
overflow-y: auto;
|
|
38
36
|
box-sizing: border-box;
|
|
39
|
-
padding:
|
|
37
|
+
padding: 3px;
|
|
40
38
|
|
|
41
39
|
${!isInSidebar && (0, _styledComponents.css)`
|
|
42
40
|
min-width: 20%;
|
|
@@ -52,10 +50,7 @@ const StyledTabsHeaderWrapper = _styledComponents.default.div`
|
|
|
52
50
|
exports.StyledTabsHeaderWrapper = StyledTabsHeaderWrapper;
|
|
53
51
|
const StyledTabsHeaderList = _styledComponents.default.div`
|
|
54
52
|
display: flex;
|
|
55
|
-
box-shadow: inset 0px ${computeLineWidth} 0px 0px
|
|
56
|
-
${({
|
|
57
|
-
theme
|
|
58
|
-
}) => theme.tab.background};
|
|
53
|
+
box-shadow: inset 0px ${computeLineWidth} 0px 0px var(--colorsActionMinor100);
|
|
59
54
|
${({
|
|
60
55
|
extendedLine
|
|
61
56
|
}) => !extendedLine && (0, _styledComponents.css)`
|
|
@@ -102,8 +97,7 @@ StyledTabsHeaderWrapper.propTypes = {
|
|
|
102
97
|
StyledTabsHeaderList.defaultProps = {
|
|
103
98
|
align: "left",
|
|
104
99
|
position: "top",
|
|
105
|
-
extendedLine: true
|
|
106
|
-
theme: _base.default
|
|
100
|
+
extendedLine: true
|
|
107
101
|
};
|
|
108
102
|
StyledTabsHeaderList.propTypes = {
|
|
109
103
|
align: _propTypes.default.oneOf(["left", "right"]),
|
|
@@ -27,10 +27,9 @@ const StyledTabs = _styledComponents.default.div`
|
|
|
27
27
|
${({
|
|
28
28
|
position,
|
|
29
29
|
inSidebar,
|
|
30
|
-
theme,
|
|
31
30
|
headerWidth
|
|
32
31
|
}) => (0, _styledComponents.css)`
|
|
33
|
-
color:
|
|
32
|
+
color: var(--colorsActionMinorYin090);
|
|
34
33
|
|
|
35
34
|
${position === "left" && (0, _styledComponents.css)`
|
|
36
35
|
${headerWidth && (0, _styledComponents.css)`
|
|
@@ -336,9 +336,6 @@ declare function _default(palette: any): {
|
|
|
336
336
|
background: any;
|
|
337
337
|
altHover: any;
|
|
338
338
|
};
|
|
339
|
-
note: {
|
|
340
|
-
timeStamp: string;
|
|
341
|
-
};
|
|
342
339
|
editorLinkPreview: {
|
|
343
340
|
background: any;
|
|
344
341
|
hoverBackground: any;
|
|
@@ -546,6 +543,7 @@ declare function _default(palette: any): {
|
|
|
546
543
|
colorsSemanticNegativeYang100: string;
|
|
547
544
|
colorsSemanticCaution400: string;
|
|
548
545
|
colorsSemanticCaution600: string;
|
|
546
|
+
colorsSemanticCaution650: string;
|
|
549
547
|
colorsSemanticCautionTransparent: string;
|
|
550
548
|
colorsSemanticCautionYin030: string;
|
|
551
549
|
colorsSemanticCautionYin055: string;
|
|
@@ -357,9 +357,6 @@ var _default = palette => {
|
|
|
357
357
|
background: palette.slateTint(80),
|
|
358
358
|
altHover: palette.slateTint(85)
|
|
359
359
|
},
|
|
360
|
-
note: {
|
|
361
|
-
timeStamp: "rgba(0,0,0,0.65)"
|
|
362
|
-
},
|
|
363
360
|
editorLinkPreview: {
|
|
364
361
|
background: palette.slateTint(95),
|
|
365
362
|
hoverBackground: palette.slateTint(80),
|
|
@@ -171,6 +171,7 @@ declare var _default: {
|
|
|
171
171
|
colorsSemanticCaution400: string;
|
|
172
172
|
colorsSemanticCaution500: string;
|
|
173
173
|
colorsSemanticCaution600: string;
|
|
174
|
+
colorsSemanticCaution650: string;
|
|
174
175
|
colorsSemanticCautionTransparent: string;
|
|
175
176
|
colorsSemanticCautionYin030: string;
|
|
176
177
|
colorsSemanticCautionYin055: string;
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "carbon-react",
|
|
3
|
-
"version": "104.
|
|
3
|
+
"version": "104.17.0",
|
|
4
4
|
"description": "A library of reusable React components for easily building user interfaces.",
|
|
5
5
|
"engineStrict": true,
|
|
6
6
|
"engines": {
|
|
@@ -156,7 +156,7 @@
|
|
|
156
156
|
"dependencies": {
|
|
157
157
|
"@octokit/rest": "^18.12.0",
|
|
158
158
|
"@popperjs/core": "^2.9.0",
|
|
159
|
-
"@sage/design-tokens": "^1.
|
|
159
|
+
"@sage/design-tokens": "^1.92.0",
|
|
160
160
|
"@styled-system/prop-types": "^5.1.5",
|
|
161
161
|
"@tippyjs/react": "^4.2.5",
|
|
162
162
|
"@types/styled-system": "^5.1.11",
|