carbon-react 104.15.0 → 104.18.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/portrait/portrait-gravatar.component.d.ts +0 -1
- package/lib/components/portrait/portrait-gravatar.component.js +0 -3
- package/lib/components/portrait/portrait-gravatar.d.ts +0 -2
- package/lib/components/portrait/portrait-initials.component.d.ts +22 -7
- package/lib/components/portrait/portrait-initials.component.js +8 -18
- package/lib/components/portrait/portrait-initials.d.ts +0 -2
- package/lib/components/portrait/portrait.config.js +2 -2
- package/lib/components/portrait/portrait.style.d.ts +4 -4
- package/lib/components/portrait/portrait.style.js +16 -32
- package/lib/components/profile/profile.config.d.ts +12 -24
- package/lib/components/profile/profile.config.js +14 -21
- package/lib/components/profile/profile.style.js +5 -17
- 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 -0
- 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;
|
|
@@ -9,7 +9,6 @@ declare function PortraitGravatar({ gravatarEmail, size, alt, shape, errorCallba
|
|
|
9
9
|
}): JSX.Element;
|
|
10
10
|
declare namespace PortraitGravatar {
|
|
11
11
|
namespace propTypes {
|
|
12
|
-
const theme: PropTypes.Requireable<object>;
|
|
13
12
|
const gravatarEmail: PropTypes.Validator<string>;
|
|
14
13
|
const size: PropTypes.Validator<string>;
|
|
15
14
|
const shape: PropTypes.Requireable<string>;
|
|
@@ -1,8 +1,6 @@
|
|
|
1
1
|
import { PortraitSizes, PortraitShapes } from "./portrait";
|
|
2
2
|
|
|
3
3
|
export interface PortraitGravatarProps {
|
|
4
|
-
/** The theme to use. */
|
|
5
|
-
theme?: Record<string, unknown>;
|
|
6
4
|
/** The user's email address for the Gravatar. */
|
|
7
5
|
gravatarEmail: string;
|
|
8
6
|
/** The size of the Gravatar. */
|
|
@@ -1,8 +1,23 @@
|
|
|
1
|
-
|
|
1
|
+
export default PortraitInitials;
|
|
2
|
+
declare function PortraitInitials({ initials, size, shape, darkBackground, alt, ...rest }: {
|
|
2
3
|
[x: string]: any;
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
4
|
+
initials: any;
|
|
5
|
+
size: any;
|
|
6
|
+
shape: any;
|
|
7
|
+
darkBackground: any;
|
|
8
|
+
alt: any;
|
|
9
|
+
}): JSX.Element;
|
|
10
|
+
declare namespace PortraitInitials {
|
|
11
|
+
namespace propTypes {
|
|
12
|
+
const initials: PropTypes.Validator<string>;
|
|
13
|
+
const size: PropTypes.Validator<string>;
|
|
14
|
+
const darkBackground: PropTypes.Requireable<boolean>;
|
|
15
|
+
const shape: PropTypes.Requireable<string>;
|
|
16
|
+
const alt: PropTypes.Requireable<string>;
|
|
17
|
+
}
|
|
18
|
+
namespace defaultProps {
|
|
19
|
+
const shape_1: string;
|
|
20
|
+
export { shape_1 as shape };
|
|
21
|
+
}
|
|
22
|
+
}
|
|
23
|
+
import PropTypes from "prop-types";
|
|
@@ -9,9 +9,7 @@ var _react = _interopRequireWildcard(require("react"));
|
|
|
9
9
|
|
|
10
10
|
var _propTypes = _interopRequireDefault(require("prop-types"));
|
|
11
11
|
|
|
12
|
-
var
|
|
13
|
-
|
|
14
|
-
var _base = _interopRequireDefault(require("../../style/themes/base"));
|
|
12
|
+
var _common = _interopRequireDefault(require("@sage/design-tokens/js/base/common"));
|
|
15
13
|
|
|
16
14
|
var _browser = _interopRequireDefault(require("../../__internal__/utils/helpers/browser"));
|
|
17
15
|
|
|
@@ -28,7 +26,6 @@ function _interopRequireWildcard(obj) { if (obj && obj.__esModule) { return obj;
|
|
|
28
26
|
function _extends() { _extends = Object.assign || 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); }
|
|
29
27
|
|
|
30
28
|
const PortraitInitials = ({
|
|
31
|
-
theme,
|
|
32
29
|
initials,
|
|
33
30
|
size,
|
|
34
31
|
shape,
|
|
@@ -39,7 +36,7 @@ const PortraitInitials = ({
|
|
|
39
36
|
const [cachedImageDataUrl, setCachedImageDataUrl] = (0, _react.useState)();
|
|
40
37
|
(0, _react.useEffect)(() => {
|
|
41
38
|
setCachedImageDataUrl(null);
|
|
42
|
-
}, [
|
|
39
|
+
}, [initials, size, darkBackground]);
|
|
43
40
|
|
|
44
41
|
const generateDataUrl = () => {
|
|
45
42
|
if (cachedImageDataUrl) {
|
|
@@ -49,7 +46,7 @@ const PortraitInitials = ({
|
|
|
49
46
|
const {
|
|
50
47
|
textColor,
|
|
51
48
|
bgColor
|
|
52
|
-
} = (0, _portrait.getColorsForInitials)(
|
|
49
|
+
} = (0, _portrait.getColorsForInitials)(darkBackground);
|
|
53
50
|
|
|
54
51
|
let canvas = _browser.default.getDocument().createElement("canvas");
|
|
55
52
|
|
|
@@ -66,9 +63,9 @@ const PortraitInitials = ({
|
|
|
66
63
|
context.font = `${Math.round(canvas.width / 2.4)}px Lato, Arial`;
|
|
67
64
|
context.textAlign = "center"; // Setup background and front color
|
|
68
65
|
|
|
69
|
-
context.fillStyle = bgColor;
|
|
66
|
+
context.fillStyle = _common.default[bgColor];
|
|
70
67
|
context.fillRect(0, 0, dimensions, dimensions);
|
|
71
|
-
context.fillStyle = textColor;
|
|
68
|
+
context.fillStyle = _common.default[textColor];
|
|
72
69
|
context.fillText(initials.slice(0, 3).toUpperCase(), dimensions / 2, dimensions / 1.5); // Set image representation in default format (png)
|
|
73
70
|
|
|
74
71
|
const dataURI = canvas.toDataURL(); // Dispose canvas element
|
|
@@ -81,8 +78,7 @@ const PortraitInitials = ({
|
|
|
81
78
|
return /*#__PURE__*/_react.default.createElement(_portrait.StyledPortraitInitials, _extends({
|
|
82
79
|
"data-element": "initials",
|
|
83
80
|
size: size,
|
|
84
|
-
shape: shape
|
|
85
|
-
theme: theme
|
|
81
|
+
shape: shape
|
|
86
82
|
}, rest), /*#__PURE__*/_react.default.createElement(_portrait.StyledPortraitInitialsImg, {
|
|
87
83
|
src: generateDataUrl(),
|
|
88
84
|
alt: alt
|
|
@@ -90,9 +86,6 @@ const PortraitInitials = ({
|
|
|
90
86
|
};
|
|
91
87
|
|
|
92
88
|
PortraitInitials.propTypes = {
|
|
93
|
-
/** The theme to use. */
|
|
94
|
-
theme: _propTypes.default.object,
|
|
95
|
-
|
|
96
89
|
/** The user's initials to render. */
|
|
97
90
|
initials: _propTypes.default.string.isRequired,
|
|
98
91
|
|
|
@@ -109,10 +102,7 @@ PortraitInitials.propTypes = {
|
|
|
109
102
|
alt: _propTypes.default.string
|
|
110
103
|
};
|
|
111
104
|
PortraitInitials.defaultProps = {
|
|
112
|
-
shape: "square"
|
|
113
|
-
theme: _base.default
|
|
105
|
+
shape: "square"
|
|
114
106
|
};
|
|
115
|
-
|
|
116
|
-
var _default = (0, _styledComponents.withTheme)(PortraitInitials);
|
|
117
|
-
|
|
107
|
+
var _default = PortraitInitials;
|
|
118
108
|
exports.default = _default;
|
|
@@ -1,8 +1,6 @@
|
|
|
1
1
|
import { PortraitSizes, PortraitShapes } from "./portrait";
|
|
2
2
|
|
|
3
3
|
export interface PortraitInitialsProps {
|
|
4
|
-
/** The theme to use. */
|
|
5
|
-
theme?: Record<string, unknown>;
|
|
6
4
|
/** The user's initials to render. */
|
|
7
5
|
initials: string;
|
|
8
6
|
/** The size of the initials image. */
|
|
@@ -1,10 +1,10 @@
|
|
|
1
|
-
export function getColorsForInitials(
|
|
2
|
-
textColor:
|
|
3
|
-
bgColor:
|
|
1
|
+
export function getColorsForInitials(darkBackground: any): {
|
|
2
|
+
textColor: string;
|
|
3
|
+
bgColor: string;
|
|
4
4
|
};
|
|
5
5
|
export const StyledPortraitInitials: import("styled-components").StyledComponent<"div", any, {}, never>;
|
|
6
6
|
export const StyledPortraitInitialsImg: import("styled-components").StyledComponent<"img", any, {}, never>;
|
|
7
7
|
export const StyledPortraitGravatar: import("styled-components").StyledComponent<"img", any, {}, never>;
|
|
8
8
|
export const StyledCustomImg: import("styled-components").StyledComponent<"img", any, {}, never>;
|
|
9
|
-
export const StyledIcon: import("styled-components").StyledComponent<({ darkBackground, ...rest }: any) => JSX.Element, any, {}, never>;
|
|
9
|
+
export const StyledIcon: import("styled-components").StyledComponent<({ size, darkBackground, ...rest }: any) => JSX.Element, any, {}, never>;
|
|
10
10
|
export const StyledPortraitContainer: import("styled-components").StyledComponent<"div", any, {}, never>;
|
|
@@ -54,7 +54,6 @@ function stylingForShape({
|
|
|
54
54
|
|
|
55
55
|
function stylingForIcon({
|
|
56
56
|
size,
|
|
57
|
-
theme,
|
|
58
57
|
darkBackground
|
|
59
58
|
}) {
|
|
60
59
|
const params = _portrait.PORTRAIT_SIZE_PARAMS[size];
|
|
@@ -63,31 +62,28 @@ function stylingForIcon({
|
|
|
63
62
|
return (0, _styledComponents.css)``;
|
|
64
63
|
}
|
|
65
64
|
|
|
66
|
-
let color =
|
|
67
|
-
let backgroundColor =
|
|
65
|
+
let color = "var(--colorsUtilityMajor200)";
|
|
66
|
+
let backgroundColor = "var(--colorsUtilityMajor025)";
|
|
68
67
|
|
|
69
68
|
if (darkBackground) {
|
|
70
|
-
color =
|
|
71
|
-
backgroundColor =
|
|
69
|
+
color = "var(--colorsUtilityMajor025)";
|
|
70
|
+
backgroundColor = "var(--colorsUtilityMajor200)";
|
|
72
71
|
}
|
|
73
72
|
|
|
74
73
|
return (0, _styledComponents.css)`
|
|
75
74
|
background-color: ${backgroundColor};
|
|
76
75
|
color: ${color};
|
|
77
76
|
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
height: ${params.iconDimensions}px;
|
|
82
|
-
}
|
|
83
|
-
`}
|
|
77
|
+
::before {
|
|
78
|
+
font-size: ${params.iconDimensions}px;
|
|
79
|
+
}
|
|
84
80
|
`;
|
|
85
81
|
}
|
|
86
82
|
|
|
87
|
-
function getColorsForInitials(
|
|
83
|
+
function getColorsForInitials(darkBackground) {
|
|
88
84
|
return {
|
|
89
|
-
textColor: darkBackground ?
|
|
90
|
-
bgColor: darkBackground ?
|
|
85
|
+
textColor: darkBackground ? "colorsUtilityYang100" : "colorsUtilityYin055",
|
|
86
|
+
bgColor: darkBackground ? "colorsUtilityMajor400" : "colorsUtilityMajor025"
|
|
91
87
|
};
|
|
92
88
|
}
|
|
93
89
|
|
|
@@ -97,20 +93,14 @@ const StyledPortraitInitials = _styledComponents.default.div`
|
|
|
97
93
|
box-sizing: border-box;
|
|
98
94
|
${stylingForSize}
|
|
99
95
|
${stylingForShape}
|
|
100
|
-
|
|
101
|
-
theme
|
|
102
|
-
}) => (0, _styledComponents.css)`
|
|
103
|
-
border: 1px solid ${theme.portrait.border};
|
|
104
|
-
`}
|
|
96
|
+
border: 1px solid var(--colorsUtilityMajor200);
|
|
105
97
|
`;
|
|
106
98
|
exports.StyledPortraitInitials = StyledPortraitInitials;
|
|
107
99
|
StyledPortraitInitials.propTypes = {
|
|
108
|
-
theme: _propTypes.default.object,
|
|
109
100
|
size: _propTypes.default.oneOf(_portrait.PORTRAIT_SIZES).isRequired,
|
|
110
101
|
shape: _propTypes.default.oneOf(_portrait.PORTRAIT_SHAPES)
|
|
111
102
|
};
|
|
112
103
|
StyledPortraitInitials.defaultProps = {
|
|
113
|
-
theme: _base.default,
|
|
114
104
|
shape: "square"
|
|
115
105
|
};
|
|
116
106
|
const StyledPortraitInitialsImg = _styledComponents.default.img`
|
|
@@ -134,9 +124,6 @@ StyledPortraitGravatar.propTypes = {
|
|
|
134
124
|
src: _propTypes.default.string.isRequired,
|
|
135
125
|
alt: _propTypes.default.string
|
|
136
126
|
};
|
|
137
|
-
StyledPortraitGravatar.defaultProps = {
|
|
138
|
-
theme: _base.default
|
|
139
|
-
};
|
|
140
127
|
const StyledCustomImg = _styledComponents.default.img`
|
|
141
128
|
display: block;
|
|
142
129
|
${stylingForSize}
|
|
@@ -151,6 +138,7 @@ StyledCustomImg.propTypes = {
|
|
|
151
138
|
}; // && is used here to increase the specificity
|
|
152
139
|
|
|
153
140
|
const StyledIcon = (0, _styledComponents.default)(({
|
|
141
|
+
size,
|
|
154
142
|
darkBackground,
|
|
155
143
|
...rest
|
|
156
144
|
}) => /*#__PURE__*/_react.default.createElement(_icon.default, rest))`
|
|
@@ -160,11 +148,9 @@ const StyledIcon = (0, _styledComponents.default)(({
|
|
|
160
148
|
${stylingForSize}
|
|
161
149
|
${stylingForIcon}
|
|
162
150
|
${stylingForShape}
|
|
163
|
-
${({
|
|
164
|
-
|
|
165
|
-
}) => (
|
|
166
|
-
border: 1px dashed ${theme.portrait.border};
|
|
167
|
-
`}
|
|
151
|
+
border: 1px dashed ${({
|
|
152
|
+
darkBackground
|
|
153
|
+
}) => darkBackground ? "var(--colorsUtilityMajorTransparent)" : "var(--colorsUtilityMajor200)"};
|
|
168
154
|
}
|
|
169
155
|
`;
|
|
170
156
|
exports.StyledIcon = StyledIcon;
|
|
@@ -172,14 +158,12 @@ StyledIcon.propTypes = {
|
|
|
172
158
|
darkBackground: _propTypes.default.bool,
|
|
173
159
|
size: _propTypes.default.oneOf(_portrait.PORTRAIT_SIZES),
|
|
174
160
|
shape: _propTypes.default.oneOf(_portrait.PORTRAIT_SHAPES),
|
|
175
|
-
theme: _propTypes.default.object,
|
|
176
161
|
type: _propTypes.default.string.isRequired
|
|
177
162
|
};
|
|
178
163
|
StyledIcon.defaultProps = {
|
|
179
164
|
darkBackground: false,
|
|
180
165
|
size: "M",
|
|
181
|
-
shape: "square"
|
|
182
|
-
theme: _base.default
|
|
166
|
+
shape: "square"
|
|
183
167
|
};
|
|
184
168
|
const StyledPortraitContainer = _styledComponents.default.div`
|
|
185
169
|
display: inline-block;
|
|
@@ -1,7 +1,6 @@
|
|
|
1
1
|
export const PROFILE_SIZES: string[];
|
|
2
2
|
declare namespace _default {
|
|
3
3
|
namespace XS {
|
|
4
|
-
const dimensions: number;
|
|
5
4
|
const nameSize: string;
|
|
6
5
|
const emailSize: string;
|
|
7
6
|
const lineHeight: string;
|
|
@@ -9,11 +8,10 @@ declare namespace _default {
|
|
|
9
8
|
const marginTop: string;
|
|
10
9
|
}
|
|
11
10
|
namespace S {
|
|
12
|
-
const dimensions_1: number;
|
|
13
|
-
export { dimensions_1 as dimensions };
|
|
14
11
|
const nameSize_1: string;
|
|
15
12
|
export { nameSize_1 as nameSize };
|
|
16
|
-
|
|
13
|
+
const emailSize_1: string;
|
|
14
|
+
export { emailSize_1 as emailSize };
|
|
17
15
|
const lineHeight_1: string;
|
|
18
16
|
export { lineHeight_1 as lineHeight };
|
|
19
17
|
const marginLeft_1: string;
|
|
@@ -22,12 +20,10 @@ declare namespace _default {
|
|
|
22
20
|
export { marginTop_1 as marginTop };
|
|
23
21
|
}
|
|
24
22
|
namespace M {
|
|
25
|
-
const dimensions_2: number;
|
|
26
|
-
export { dimensions_2 as dimensions };
|
|
27
23
|
const nameSize_2: string;
|
|
28
24
|
export { nameSize_2 as nameSize };
|
|
29
|
-
const
|
|
30
|
-
export {
|
|
25
|
+
const emailSize_2: string;
|
|
26
|
+
export { emailSize_2 as emailSize };
|
|
31
27
|
const lineHeight_2: string;
|
|
32
28
|
export { lineHeight_2 as lineHeight };
|
|
33
29
|
const marginLeft_2: string;
|
|
@@ -36,12 +32,10 @@ declare namespace _default {
|
|
|
36
32
|
export { marginTop_2 as marginTop };
|
|
37
33
|
}
|
|
38
34
|
namespace ML {
|
|
39
|
-
const dimensions_3: number;
|
|
40
|
-
export { dimensions_3 as dimensions };
|
|
41
35
|
const nameSize_3: string;
|
|
42
36
|
export { nameSize_3 as nameSize };
|
|
43
|
-
const
|
|
44
|
-
export {
|
|
37
|
+
const emailSize_3: string;
|
|
38
|
+
export { emailSize_3 as emailSize };
|
|
45
39
|
const lineHeight_3: string;
|
|
46
40
|
export { lineHeight_3 as lineHeight };
|
|
47
41
|
const marginLeft_3: string;
|
|
@@ -50,12 +44,10 @@ declare namespace _default {
|
|
|
50
44
|
export { marginTop_3 as marginTop };
|
|
51
45
|
}
|
|
52
46
|
namespace L {
|
|
53
|
-
const dimensions_4: number;
|
|
54
|
-
export { dimensions_4 as dimensions };
|
|
55
47
|
const nameSize_4: string;
|
|
56
48
|
export { nameSize_4 as nameSize };
|
|
57
|
-
const
|
|
58
|
-
export {
|
|
49
|
+
const emailSize_4: string;
|
|
50
|
+
export { emailSize_4 as emailSize };
|
|
59
51
|
const lineHeight_4: string;
|
|
60
52
|
export { lineHeight_4 as lineHeight };
|
|
61
53
|
const marginLeft_4: string;
|
|
@@ -64,12 +56,10 @@ declare namespace _default {
|
|
|
64
56
|
export { marginTop_4 as marginTop };
|
|
65
57
|
}
|
|
66
58
|
namespace XL {
|
|
67
|
-
const dimensions_5: number;
|
|
68
|
-
export { dimensions_5 as dimensions };
|
|
69
59
|
const nameSize_5: string;
|
|
70
60
|
export { nameSize_5 as nameSize };
|
|
71
|
-
const
|
|
72
|
-
export {
|
|
61
|
+
const emailSize_5: string;
|
|
62
|
+
export { emailSize_5 as emailSize };
|
|
73
63
|
const lineHeight_5: string;
|
|
74
64
|
export { lineHeight_5 as lineHeight };
|
|
75
65
|
const marginLeft_5: string;
|
|
@@ -78,12 +68,10 @@ declare namespace _default {
|
|
|
78
68
|
export { marginTop_5 as marginTop };
|
|
79
69
|
}
|
|
80
70
|
namespace XXL {
|
|
81
|
-
const dimensions_6: number;
|
|
82
|
-
export { dimensions_6 as dimensions };
|
|
83
71
|
const nameSize_6: string;
|
|
84
72
|
export { nameSize_6 as nameSize };
|
|
85
|
-
const
|
|
86
|
-
export {
|
|
73
|
+
const emailSize_6: string;
|
|
74
|
+
export { emailSize_6 as emailSize };
|
|
87
75
|
const lineHeight_6: string;
|
|
88
76
|
export { lineHeight_6 as lineHeight };
|
|
89
77
|
const marginLeft_6: string;
|
|
@@ -8,57 +8,50 @@ const PROFILE_SIZES = ["XS", "S", "M", "ML", "L", "XL", "XXL"];
|
|
|
8
8
|
exports.PROFILE_SIZES = PROFILE_SIZES;
|
|
9
9
|
var _default = {
|
|
10
10
|
XS: {
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
emailSize: "12px",
|
|
11
|
+
nameSize: "var(--fontSizes050)",
|
|
12
|
+
emailSize: "var(--fontSizes025)",
|
|
14
13
|
lineHeight: "12px",
|
|
15
14
|
marginLeft: "16px",
|
|
16
15
|
marginTop: "1px"
|
|
17
16
|
},
|
|
18
17
|
S: {
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
emailsize: "12px",
|
|
18
|
+
nameSize: "var(--fontSizes100)",
|
|
19
|
+
emailSize: "var(--fontSizes100)",
|
|
22
20
|
lineHeight: "16px",
|
|
23
21
|
marginLeft: "16px",
|
|
24
22
|
marginTop: "1px"
|
|
25
23
|
},
|
|
26
24
|
M: {
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
emailSize: "14px",
|
|
25
|
+
nameSize: "var(--fontSizes100)",
|
|
26
|
+
emailSize: "var(--fontSizes100)",
|
|
30
27
|
lineHeight: "16px",
|
|
31
28
|
marginLeft: "16px",
|
|
32
29
|
marginTop: "4px"
|
|
33
30
|
},
|
|
34
31
|
ML: {
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
emailSize: "14px",
|
|
32
|
+
nameSize: "var(--fontSizes200)",
|
|
33
|
+
emailSize: "var(--fontSizes100)",
|
|
38
34
|
lineHeight: "20px",
|
|
39
35
|
marginLeft: "24px",
|
|
40
36
|
marginTop: "8px"
|
|
41
37
|
},
|
|
42
38
|
L: {
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
emailSize: "14px",
|
|
39
|
+
nameSize: "var(--fontSizes400)",
|
|
40
|
+
emailSize: "var(--fontSizes100)",
|
|
46
41
|
lineHeight: "22px",
|
|
47
42
|
marginLeft: "24px",
|
|
48
43
|
marginTop: "14px"
|
|
49
44
|
},
|
|
50
45
|
XL: {
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
emailSize: "20px",
|
|
46
|
+
nameSize: "var(--fontSizes600)",
|
|
47
|
+
emailSize: "var(--fontSizes300)",
|
|
54
48
|
lineHeight: "26px",
|
|
55
49
|
marginLeft: "32px",
|
|
56
50
|
marginTop: "24px"
|
|
57
51
|
},
|
|
58
52
|
XXL: {
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
emailSize: "24px",
|
|
53
|
+
nameSize: "var(--fontSizes700)",
|
|
54
|
+
emailSize: "var(--fontSizes600)",
|
|
62
55
|
lineHeight: "30px",
|
|
63
56
|
marginLeft: "40px",
|
|
64
57
|
marginTop: "32px"
|
|
@@ -5,7 +5,7 @@ Object.defineProperty(exports, "__esModule", {
|
|
|
5
5
|
});
|
|
6
6
|
exports.ProfileEmailStyle = exports.ProfileAvatarStyle = exports.ProfileDetailsStyle = exports.ProfileNameStyle = exports.ProfileStyle = void 0;
|
|
7
7
|
|
|
8
|
-
var _styledComponents =
|
|
8
|
+
var _styledComponents = _interopRequireDefault(require("styled-components"));
|
|
9
9
|
|
|
10
10
|
var _styledSystem = require("styled-system");
|
|
11
11
|
|
|
@@ -17,10 +17,6 @@ var _profile = _interopRequireDefault(require("./profile.config"));
|
|
|
17
17
|
|
|
18
18
|
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
|
|
19
19
|
|
|
20
|
-
function _getRequireWildcardCache() { if (typeof WeakMap !== "function") return null; var cache = new WeakMap(); _getRequireWildcardCache = function () { return cache; }; return cache; }
|
|
21
|
-
|
|
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; }
|
|
23
|
-
|
|
24
20
|
const ProfileNameStyle = _styledComponents.default.span`
|
|
25
21
|
font-weight: bold;
|
|
26
22
|
display: block;
|
|
@@ -37,12 +33,7 @@ const ProfileEmailStyle = _styledComponents.default.span`
|
|
|
37
33
|
exports.ProfileEmailStyle = ProfileEmailStyle;
|
|
38
34
|
const ProfileStyle = _styledComponents.default.div`
|
|
39
35
|
white-space: nowrap;
|
|
40
|
-
|
|
41
|
-
theme
|
|
42
|
-
}) => (0, _styledComponents.css)`
|
|
43
|
-
color: ${theme.text.color};
|
|
44
|
-
`};
|
|
45
|
-
|
|
36
|
+
color: var(--colorsUtilityYin090);
|
|
46
37
|
display: ${({
|
|
47
38
|
hasSrc
|
|
48
39
|
}) => hasSrc ? "flex" : ""};
|
|
@@ -73,14 +64,11 @@ ProfileStyle.defaultProps = {
|
|
|
73
64
|
theme: _base.default
|
|
74
65
|
};
|
|
75
66
|
ProfileNameStyle.defaultProps = {
|
|
76
|
-
size: "M"
|
|
77
|
-
theme: _base.default
|
|
67
|
+
size: "M"
|
|
78
68
|
};
|
|
79
69
|
ProfileEmailStyle.defaultProps = {
|
|
80
|
-
size: "M"
|
|
81
|
-
theme: _base.default
|
|
70
|
+
size: "M"
|
|
82
71
|
};
|
|
83
72
|
ProfileDetailsStyle.defaultProps = {
|
|
84
|
-
size: "M"
|
|
85
|
-
theme: _base.default
|
|
73
|
+
size: "M"
|
|
86
74
|
};
|
|
@@ -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)`
|
|
@@ -543,6 +543,7 @@ declare function _default(palette: any): {
|
|
|
543
543
|
colorsSemanticNegativeYang100: string;
|
|
544
544
|
colorsSemanticCaution400: string;
|
|
545
545
|
colorsSemanticCaution600: string;
|
|
546
|
+
colorsSemanticCaution650: string;
|
|
546
547
|
colorsSemanticCautionTransparent: string;
|
|
547
548
|
colorsSemanticCautionYin030: string;
|
|
548
549
|
colorsSemanticCautionYin055: string;
|
|
@@ -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.18.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",
|