carbon-react 104.31.0 → 104.33.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/navigation-bar/navigation-bar.component.d.ts +10 -2
- package/lib/components/navigation-bar/navigation-bar.component.js +33 -0
- package/lib/components/navigation-bar/navigation-bar.style.d.ts +8 -2
- package/lib/components/navigation-bar/navigation-bar.style.js +16 -2
- package/lib/components/step-sequence/step-sequence-item/step-sequence-item.component.d.ts +3 -0
- package/lib/components/step-sequence/step-sequence-item/step-sequence-item.component.js +8 -2
- package/lib/components/step-sequence/step-sequence-item/step-sequence-item.d.ts +2 -0
- package/lib/components/tabs/__internal__/tab-title/tab-title.component.js +1 -0
- package/lib/components/tabs/__internal__/tab-title/tab-title.style.js +122 -175
- package/package.json +1 -1
|
@@ -1,7 +1,9 @@
|
|
|
1
1
|
import React from "react";
|
|
2
2
|
import { PaddingProps, FlexboxProps } from "styled-system";
|
|
3
|
-
export declare type
|
|
3
|
+
export declare type Position = "sticky" | "fixed";
|
|
4
|
+
export declare type Orientation = "top" | "bottom";
|
|
4
5
|
export declare type NavigationType = "light" | "dark" | "white" | "black";
|
|
6
|
+
export declare type StickyPosition = "top" | "bottom";
|
|
5
7
|
export interface NavigationBarProps extends PaddingProps, FlexboxProps {
|
|
6
8
|
children?: React.ReactNode;
|
|
7
9
|
ariaLabel?: string;
|
|
@@ -13,6 +15,12 @@ export interface NavigationBarProps extends PaddingProps, FlexboxProps {
|
|
|
13
15
|
stickyPosition?: StickyPosition;
|
|
14
16
|
/** Defines the offset of sticky navigation bar */
|
|
15
17
|
stickyOffset?: string;
|
|
18
|
+
/** Defines whether the navigation bar should be positioned fixed or sticky */
|
|
19
|
+
position?: Position;
|
|
20
|
+
/** Defines the offset of navigation bar */
|
|
21
|
+
offset?: string;
|
|
22
|
+
/** Defines whether the navigation bar should be positioned top or bottom */
|
|
23
|
+
orientation?: Orientation;
|
|
16
24
|
}
|
|
17
|
-
export declare const NavigationBar: ({ navigationType, isLoading, children, ariaLabel, stickyOffset, stickyPosition, ...props }: NavigationBarProps) => JSX.Element;
|
|
25
|
+
export declare const NavigationBar: ({ navigationType, isLoading, children, ariaLabel, stickyOffset, stickyPosition, position, offset, orientation, ...props }: NavigationBarProps) => JSX.Element;
|
|
18
26
|
export default NavigationBar;
|
|
@@ -11,6 +11,10 @@ var _propTypes = _interopRequireDefault(require("prop-types"));
|
|
|
11
11
|
|
|
12
12
|
var _navigationBar = _interopRequireDefault(require("./navigation-bar.style"));
|
|
13
13
|
|
|
14
|
+
var _logger = _interopRequireDefault(
|
|
15
|
+
require("../../__internal__/utils/logger")
|
|
16
|
+
);
|
|
17
|
+
|
|
14
18
|
function _interopRequireDefault(obj) {
|
|
15
19
|
return obj && obj.__esModule ? obj : { default: obj };
|
|
16
20
|
}
|
|
@@ -32,6 +36,8 @@ function _extends() {
|
|
|
32
36
|
return _extends.apply(this, arguments);
|
|
33
37
|
}
|
|
34
38
|
|
|
39
|
+
let deprecatedWarnTriggered = false;
|
|
40
|
+
|
|
35
41
|
const NavigationBar = ({
|
|
36
42
|
navigationType = "light",
|
|
37
43
|
isLoading = false,
|
|
@@ -39,8 +45,20 @@ const NavigationBar = ({
|
|
|
39
45
|
ariaLabel,
|
|
40
46
|
stickyOffset = "0",
|
|
41
47
|
stickyPosition,
|
|
48
|
+
position,
|
|
49
|
+
offset = "0",
|
|
50
|
+
orientation,
|
|
42
51
|
...props
|
|
43
52
|
}) => {
|
|
53
|
+
if (!deprecatedWarnTriggered && stickyPosition) {
|
|
54
|
+
deprecatedWarnTriggered = true;
|
|
55
|
+
|
|
56
|
+
_logger.default.deprecate(
|
|
57
|
+
// eslint-disable-next-line max-len
|
|
58
|
+
"The `stickyPosition` and `stickyOffset` props are deprecated and will soon be removed. You should use the `position`, `offset` and `orientation` props to achieve the same layout. The following codemods are available to help with updating your code: https://github.com/Sage/carbon-codemod/tree/master/transforms/remove-prop and https://github.com/Sage/carbon-codemod/tree/master/transforms/add-prop"
|
|
59
|
+
);
|
|
60
|
+
}
|
|
61
|
+
|
|
44
62
|
return /*#__PURE__*/ _react.default.createElement(
|
|
45
63
|
_navigationBar.default,
|
|
46
64
|
_extends(
|
|
@@ -51,6 +69,9 @@ const NavigationBar = ({
|
|
|
51
69
|
"data-component": "navigation-bar",
|
|
52
70
|
stickyOffset: stickyOffset,
|
|
53
71
|
stickyPosition: stickyPosition,
|
|
72
|
+
position: position,
|
|
73
|
+
offset: offset,
|
|
74
|
+
orientation: orientation,
|
|
54
75
|
},
|
|
55
76
|
props
|
|
56
77
|
),
|
|
@@ -4694,6 +4715,10 @@ NavigationBar.propTypes = {
|
|
|
4694
4715
|
* Color scheme of navigation component
|
|
4695
4716
|
*/
|
|
4696
4717
|
navigationType: _propTypes.default.oneOf(["black", "dark", "light", "white"]),
|
|
4718
|
+
/**
|
|
4719
|
+
* Defines the offset of navigation bar
|
|
4720
|
+
*/
|
|
4721
|
+
offset: _propTypes.default.string,
|
|
4697
4722
|
/**
|
|
4698
4723
|
* The order CSS property sets the order to lay out an item in a flex or grid container. Items in a container
|
|
4699
4724
|
* are sorted by ascending order value and then by their source code order.
|
|
@@ -4786,6 +4811,10 @@ NavigationBar.propTypes = {
|
|
|
4786
4811
|
valueOf: _propTypes.default.func.isRequired,
|
|
4787
4812
|
}),
|
|
4788
4813
|
]),
|
|
4814
|
+
/**
|
|
4815
|
+
* Defines whether the navigation bar should be positioned top or bottom
|
|
4816
|
+
*/
|
|
4817
|
+
orientation: _propTypes.default.oneOf(["bottom", "top"]),
|
|
4789
4818
|
/**
|
|
4790
4819
|
* Padding on top, left, bottom and right
|
|
4791
4820
|
*/
|
|
@@ -5236,6 +5265,10 @@ NavigationBar.propTypes = {
|
|
|
5236
5265
|
}),
|
|
5237
5266
|
_propTypes.default.string,
|
|
5238
5267
|
]),
|
|
5268
|
+
/**
|
|
5269
|
+
* Defines whether the navigation bar should be positioned fixed or sticky
|
|
5270
|
+
*/
|
|
5271
|
+
position: _propTypes.default.oneOf(["fixed", "sticky"]),
|
|
5239
5272
|
/**
|
|
5240
5273
|
* Padding on right
|
|
5241
5274
|
*/
|
|
@@ -1,11 +1,17 @@
|
|
|
1
1
|
import { PaddingProps, FlexboxProps } from "styled-system";
|
|
2
|
-
import {
|
|
2
|
+
import { Position, Orientation, NavigationType } from "./navigation-bar.component";
|
|
3
3
|
declare const StyledNavigationBar: import("styled-components").StyledComponent<"nav", any, PaddingProps<Required<import("styled-system").Theme<import("styled-system").TLengthStyledSystem>>> & FlexboxProps<Required<import("styled-system").Theme<import("styled-system").TLengthStyledSystem>>> & {
|
|
4
4
|
/** Color scheme of navigation component */
|
|
5
5
|
navigationType?: NavigationType | undefined;
|
|
6
6
|
/** Defines the position of sticky navigation bar */
|
|
7
|
-
stickyPosition?:
|
|
7
|
+
stickyPosition?: Orientation | undefined;
|
|
8
8
|
/** Defines the offset of sticky navigation bar */
|
|
9
9
|
stickyOffset?: string | undefined;
|
|
10
|
+
/** Defines whether the navigation bar should be positioned fixed or sticky */
|
|
11
|
+
position?: Position | undefined;
|
|
12
|
+
/** Defines the offset of navigation bar */
|
|
13
|
+
offset?: string | undefined;
|
|
14
|
+
/** Defines whether the navigation bar should be positioned top or bottom */
|
|
15
|
+
orientation?: Orientation | undefined;
|
|
10
16
|
}, never>;
|
|
11
17
|
export default StyledNavigationBar;
|
|
@@ -54,8 +54,22 @@ const StyledNavigationBar = _styledComponents.default.nav`
|
|
|
54
54
|
stickyOffset
|
|
55
55
|
}) => stickyPosition && (0, _styledComponents.css)`
|
|
56
56
|
position: sticky;
|
|
57
|
-
${stickyPosition}: ${stickyOffset}
|
|
58
|
-
`}
|
|
57
|
+
${stickyPosition}: ${stickyOffset};
|
|
58
|
+
`}
|
|
59
|
+
|
|
60
|
+
${({
|
|
61
|
+
position,
|
|
62
|
+
orientation,
|
|
63
|
+
offset
|
|
64
|
+
}) => position && orientation && (0, _styledComponents.css)`
|
|
65
|
+
position: ${position};
|
|
66
|
+
${orientation}: ${offset};
|
|
67
|
+
|
|
68
|
+
${position === "fixed" && (0, _styledComponents.css)`
|
|
69
|
+
box-sizing: border-box;
|
|
70
|
+
width: 100%;
|
|
71
|
+
`}
|
|
72
|
+
`}
|
|
59
73
|
|
|
60
74
|
${({
|
|
61
75
|
navigationType,
|
|
@@ -4,6 +4,7 @@ declare namespace StepSequenceItem {
|
|
|
4
4
|
namespace propTypes {
|
|
5
5
|
const children: PropTypes.Validator<string | number | boolean | {} | PropTypes.ReactElementLike | PropTypes.ReactNodeArray>;
|
|
6
6
|
const indicator: PropTypes.Validator<string>;
|
|
7
|
+
const hideIndicator: PropTypes.Requireable<boolean>;
|
|
7
8
|
const ariaLabel: PropTypes.Requireable<string>;
|
|
8
9
|
const status: PropTypes.Requireable<string>;
|
|
9
10
|
const hiddenCompleteLabel: PropTypes.Requireable<string>;
|
|
@@ -12,6 +13,8 @@ declare namespace StepSequenceItem {
|
|
|
12
13
|
namespace defaultProps {
|
|
13
14
|
const status_1: string;
|
|
14
15
|
export { status_1 as status };
|
|
16
|
+
const hideIndicator_1: boolean;
|
|
17
|
+
export { hideIndicator_1 as hideIndicator };
|
|
15
18
|
}
|
|
16
19
|
}
|
|
17
20
|
import PropTypes from "prop-types";
|
|
@@ -24,7 +24,9 @@ function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { de
|
|
|
24
24
|
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); }
|
|
25
25
|
|
|
26
26
|
const StepSequenceItem = props => {
|
|
27
|
-
const indicatorText = () =>
|
|
27
|
+
const indicatorText = () => {
|
|
28
|
+
return !props.hideIndicator ? /*#__PURE__*/_react.default.createElement(_stepSequenceItemIndicator.default, null, props.indicator) : null;
|
|
29
|
+
};
|
|
28
30
|
|
|
29
31
|
const icon = () => props.status === "complete" ? /*#__PURE__*/_react.default.createElement(_icon.default, {
|
|
30
32
|
type: "tick"
|
|
@@ -62,6 +64,9 @@ StepSequenceItem.propTypes = {
|
|
|
62
64
|
/** Value to be displayed before text for uncompleted steps */
|
|
63
65
|
indicator: _propTypes.default.string.isRequired,
|
|
64
66
|
|
|
67
|
+
/** Flag to hide the indicator for uncompleted steps */
|
|
68
|
+
hideIndicator: _propTypes.default.bool,
|
|
69
|
+
|
|
65
70
|
/** Aria label */
|
|
66
71
|
ariaLabel: _propTypes.default.string,
|
|
67
72
|
|
|
@@ -75,7 +80,8 @@ StepSequenceItem.propTypes = {
|
|
|
75
80
|
hiddenCurrentLabel: _propTypes.default.string
|
|
76
81
|
};
|
|
77
82
|
StepSequenceItem.defaultProps = {
|
|
78
|
-
status: "incomplete"
|
|
83
|
+
status: "incomplete",
|
|
84
|
+
hideIndicator: false
|
|
79
85
|
};
|
|
80
86
|
var _default = StepSequenceItem;
|
|
81
87
|
exports.default = _default;
|
|
@@ -9,6 +9,8 @@ export interface StepSequenceItemProps {
|
|
|
9
9
|
hiddenCurrentLabel?: string;
|
|
10
10
|
/** Value to be displayed before text for uncomplete steps */
|
|
11
11
|
indicator: string;
|
|
12
|
+
/** Flag to hide the indicator for uncomplete steps */
|
|
13
|
+
hideIndicator?: boolean;
|
|
12
14
|
/** Status for the step */
|
|
13
15
|
status?: "complete" | "current" | "incomplete";
|
|
14
16
|
}
|
|
@@ -137,6 +137,7 @@ const TabTitle = /*#__PURE__*/_react.default.forwardRef(({
|
|
|
137
137
|
warning: warning,
|
|
138
138
|
info: info,
|
|
139
139
|
noRightBorder: noRightBorder,
|
|
140
|
+
noLeftBorder: noLeftBorder,
|
|
140
141
|
alternateStyling: alternateStyling || isInSidebar,
|
|
141
142
|
borders: borders,
|
|
142
143
|
isInSidebar: isInSidebar
|
|
@@ -22,21 +22,25 @@ function _interopRequireWildcard(obj) { if (obj && obj.__esModule) { return obj;
|
|
|
22
22
|
const StyledTitleContent = _styledComponents.default.span`
|
|
23
23
|
outline: none;
|
|
24
24
|
display: inline-block;
|
|
25
|
+
line-height: 20px;
|
|
26
|
+
margin: 0;
|
|
25
27
|
|
|
26
28
|
${({
|
|
29
|
+
hasCustomLayout,
|
|
30
|
+
error,
|
|
31
|
+
warning,
|
|
32
|
+
info,
|
|
27
33
|
size,
|
|
34
|
+
isTabSelected,
|
|
35
|
+
hasSiblings,
|
|
28
36
|
borders,
|
|
29
37
|
position,
|
|
30
38
|
noLeftBorder,
|
|
31
39
|
noRightBorder,
|
|
32
|
-
isTabSelected,
|
|
33
40
|
hasHref,
|
|
34
|
-
error,
|
|
35
41
|
alternateStyling,
|
|
36
42
|
align
|
|
37
43
|
}) => (0, _styledComponents.css)`
|
|
38
|
-
line-height: 20px;
|
|
39
|
-
margin: 0;
|
|
40
44
|
text-align: ${align};
|
|
41
45
|
|
|
42
46
|
${position === "left" && (0, _styledComponents.css)`
|
|
@@ -60,7 +64,7 @@ const StyledTitleContent = _styledComponents.default.span`
|
|
|
60
64
|
`}
|
|
61
65
|
|
|
62
66
|
${!hasHref && (0, _styledComponents.css)`
|
|
63
|
-
[data-component="icon"] {
|
|
67
|
+
[data-component="icon"]:not([color]) {
|
|
64
68
|
color: var(--colorsActionMinorYin065);
|
|
65
69
|
}
|
|
66
70
|
`}
|
|
@@ -97,27 +101,16 @@ const StyledTitleContent = _styledComponents.default.span`
|
|
|
97
101
|
${size === "large" && position === "left" && (0, _styledComponents.css)`
|
|
98
102
|
font-size: 16px;
|
|
99
103
|
padding: 14px 24px;
|
|
100
|
-
${!isTabSelected && !alternateStyling && error && `margin-right: -2px;`}
|
|
101
104
|
`}
|
|
102
105
|
|
|
103
106
|
${size === "default" && (0, _styledComponents.css)`
|
|
104
107
|
padding: 10px 16px;
|
|
105
108
|
|
|
106
109
|
${borders && `padding-bottom: 9px;`}
|
|
107
|
-
|
|
108
|
-
${position === "left" && !isTabSelected && !alternateStyling && error && `
|
|
109
|
-
margin-right: -2px;
|
|
110
|
-
`}
|
|
111
110
|
`}
|
|
112
|
-
|
|
111
|
+
|
|
113
112
|
|
|
114
|
-
|
|
115
|
-
position,
|
|
116
|
-
warning,
|
|
117
|
-
info,
|
|
118
|
-
size,
|
|
119
|
-
hasCustomLayout
|
|
120
|
-
}) => (warning || info) && (0, _styledComponents.css)`
|
|
113
|
+
${(warning || info) && (0, _styledComponents.css)`
|
|
121
114
|
outline: 1px solid;
|
|
122
115
|
outline-offset: -1px;
|
|
123
116
|
|
|
@@ -129,11 +122,11 @@ const StyledTitleContent = _styledComponents.default.span`
|
|
|
129
122
|
outline-color: var(--colorsSemanticCaution500);
|
|
130
123
|
`}
|
|
131
124
|
|
|
132
|
-
|
|
125
|
+
${position === "top" && (0, _styledComponents.css)`
|
|
133
126
|
border-bottom-color: transparent;
|
|
134
127
|
`}
|
|
135
128
|
|
|
136
|
-
|
|
129
|
+
${position === "left" && (0, _styledComponents.css)`
|
|
137
130
|
border-right-color: transparent;
|
|
138
131
|
padding-right: ${size === "large" ? "26px" : "18px"};
|
|
139
132
|
`}
|
|
@@ -150,7 +143,7 @@ const StyledTitleContent = _styledComponents.default.span`
|
|
|
150
143
|
outline-color: var(--colorsSemanticCaution500);
|
|
151
144
|
`}
|
|
152
145
|
|
|
153
|
-
|
|
146
|
+
${position === "top" && (0, _styledComponents.css)`
|
|
154
147
|
border-bottom-color: transparent;
|
|
155
148
|
|
|
156
149
|
${hasCustomLayout && (0, _styledComponents.css)`
|
|
@@ -158,19 +151,14 @@ const StyledTitleContent = _styledComponents.default.span`
|
|
|
158
151
|
`}
|
|
159
152
|
`}
|
|
160
153
|
|
|
161
|
-
|
|
154
|
+
${position === "left" && (0, _styledComponents.css)`
|
|
162
155
|
border-right-color: transparent;
|
|
163
156
|
padding-right: ${size === "large" ? "26px" : "18px"};
|
|
164
157
|
`}
|
|
165
158
|
}
|
|
166
159
|
`}
|
|
167
160
|
|
|
168
|
-
|
|
169
|
-
error,
|
|
170
|
-
position,
|
|
171
|
-
size,
|
|
172
|
-
hasCustomLayout
|
|
173
|
-
}) => error && (0, _styledComponents.css)`
|
|
161
|
+
${error && (0, _styledComponents.css)`
|
|
174
162
|
outline: 2px solid var(--colorsSemanticNegative500);
|
|
175
163
|
outline-offset: -2px;
|
|
176
164
|
|
|
@@ -201,32 +189,11 @@ const StyledTitleContent = _styledComponents.default.span`
|
|
|
201
189
|
}
|
|
202
190
|
`}
|
|
203
191
|
|
|
204
|
-
|
|
205
|
-
hasSiblings,
|
|
206
|
-
hasCustomLayout,
|
|
207
|
-
error,
|
|
208
|
-
warning,
|
|
209
|
-
info,
|
|
210
|
-
size,
|
|
211
|
-
isTabSelected,
|
|
212
|
-
position
|
|
213
|
-
}) => hasSiblings && !hasCustomLayout && position === "top" && (0, _styledComponents.css)`
|
|
192
|
+
${hasSiblings && !hasCustomLayout && position === "top" && (0, _styledComponents.css)`
|
|
214
193
|
height: 20px;
|
|
215
|
-
|
|
216
|
-
${size === "large" && !(error || warning || info) && isTabSelected && (0, _styledComponents.css)`
|
|
217
|
-
padding-bottom: 6px;
|
|
218
|
-
`}
|
|
219
194
|
`}
|
|
220
195
|
|
|
221
|
-
|
|
222
|
-
hasCustomLayout,
|
|
223
|
-
error,
|
|
224
|
-
warning,
|
|
225
|
-
info,
|
|
226
|
-
position,
|
|
227
|
-
size,
|
|
228
|
-
isTabSelected
|
|
229
|
-
}) => hasCustomLayout && (0, _styledComponents.css)`
|
|
196
|
+
${hasCustomLayout && (0, _styledComponents.css)`
|
|
230
197
|
display: flex;
|
|
231
198
|
|
|
232
199
|
${position === "left" && (0, _styledComponents.css)`
|
|
@@ -251,9 +218,10 @@ const StyledTitleContent = _styledComponents.default.span`
|
|
|
251
218
|
&:hover {
|
|
252
219
|
padding-bottom: ${size === "large" ? "4px" : "2px"};
|
|
253
220
|
}
|
|
254
|
-
`}
|
|
221
|
+
`}
|
|
255
222
|
`}
|
|
256
223
|
`}
|
|
224
|
+
`}
|
|
257
225
|
`;
|
|
258
226
|
exports.StyledTitleContent = StyledTitleContent;
|
|
259
227
|
const StyledTabTitle = _styledComponents.default.button`
|
|
@@ -268,131 +236,114 @@ const StyledTabTitle = _styledComponents.default.button`
|
|
|
268
236
|
text-decoration: none;
|
|
269
237
|
outline-offset: 0px;
|
|
270
238
|
margin: 0;
|
|
271
|
-
height: ${({
|
|
272
|
-
size
|
|
273
|
-
}) => size === "large" ? "var(--sizing600)" : "var(--sizing500)"};
|
|
274
239
|
|
|
275
240
|
a:visited {
|
|
276
241
|
color: inherit;
|
|
277
242
|
}
|
|
278
243
|
|
|
279
244
|
${({
|
|
245
|
+
size,
|
|
280
246
|
position,
|
|
281
247
|
borders,
|
|
282
248
|
noRightBorder,
|
|
283
|
-
noLeftBorder
|
|
249
|
+
noLeftBorder,
|
|
250
|
+
isTabSelected,
|
|
251
|
+
alternateStyling,
|
|
252
|
+
error,
|
|
253
|
+
warning,
|
|
254
|
+
info,
|
|
255
|
+
isInSidebar
|
|
284
256
|
}) => (0, _styledComponents.css)`
|
|
257
|
+
height: ${size === "large" ? "var(--sizing600)" : "var(--sizing500)"};
|
|
258
|
+
|
|
285
259
|
${position === "top" && (0, _styledComponents.css)`
|
|
286
|
-
|
|
287
|
-
|
|
288
|
-
|
|
289
|
-
|
|
290
|
-
|
|
291
|
-
|
|
292
|
-
|
|
260
|
+
${borders && !(noRightBorder || noLeftBorder) && (0, _styledComponents.css)`
|
|
261
|
+
&:nth-of-type(n + 1) {
|
|
262
|
+
margin-left: -1px;
|
|
263
|
+
}
|
|
264
|
+
&:first-child {
|
|
265
|
+
margin-left: 0;
|
|
266
|
+
}
|
|
267
|
+
`}
|
|
293
268
|
`}
|
|
294
|
-
`}
|
|
295
269
|
${position === "left" && (0, _styledComponents.css)`
|
|
296
|
-
|
|
297
|
-
|
|
298
|
-
|
|
299
|
-
|
|
300
|
-
|
|
301
|
-
|
|
302
|
-
|
|
270
|
+
${borders && (0, _styledComponents.css)`
|
|
271
|
+
&:nth-of-type(n + 1) {
|
|
272
|
+
margin-top: -1px;
|
|
273
|
+
}
|
|
274
|
+
&:first-child {
|
|
275
|
+
margin-top: 0;
|
|
276
|
+
}
|
|
277
|
+
`}
|
|
303
278
|
`}
|
|
304
|
-
`}
|
|
305
|
-
`}
|
|
306
279
|
|
|
307
|
-
|
|
308
|
-
isTabSelected
|
|
309
|
-
}) => !isTabSelected && (0, _styledComponents.css)`
|
|
310
|
-
color: var(--colorsActionMinorYin090);
|
|
311
|
-
|
|
312
|
-
&:hover {
|
|
313
|
-
background: var(--colorsActionMinor100);
|
|
314
|
-
color: var(--colorsActionMinorYin090);
|
|
315
|
-
outline: none;
|
|
316
|
-
}
|
|
317
|
-
&:focus {
|
|
280
|
+
${!isTabSelected && (0, _styledComponents.css)`
|
|
318
281
|
color: var(--colorsActionMinorYin090);
|
|
319
|
-
outline: none;
|
|
320
|
-
}
|
|
321
|
-
`}
|
|
322
|
-
|
|
323
|
-
${({
|
|
324
|
-
isTabSelected,
|
|
325
|
-
alternateStyling,
|
|
326
|
-
error,
|
|
327
|
-
warning,
|
|
328
|
-
info
|
|
329
|
-
}) => isTabSelected && (0, _styledComponents.css)`
|
|
330
|
-
color: var(--colorsActionMajorYin090);
|
|
331
|
-
background-color: var(--colorsActionMajorYang100);
|
|
332
282
|
|
|
333
|
-
|
|
334
|
-
|
|
283
|
+
&:hover {
|
|
284
|
+
background: var(--colorsActionMinor100);
|
|
285
|
+
color: var(--colorsActionMinorYin090);
|
|
286
|
+
outline: none;
|
|
287
|
+
}
|
|
288
|
+
&:focus {
|
|
289
|
+
color: var(--colorsActionMinorYin090);
|
|
290
|
+
outline: none;
|
|
291
|
+
}
|
|
335
292
|
`}
|
|
336
293
|
|
|
337
|
-
|
|
338
|
-
background-color: var(--colorsActionMajorYang100);
|
|
339
|
-
border-bottom-color: ${alternateStyling ? "var(--colorsActionMinor100)" : "var(--colorsActionMajor500)"};
|
|
294
|
+
${isTabSelected && (0, _styledComponents.css)`
|
|
340
295
|
color: var(--colorsActionMajorYin090);
|
|
341
|
-
|
|
342
|
-
|
|
343
|
-
|
|
296
|
+
background-color: var(--colorsActionMajorYang100);
|
|
297
|
+
|
|
298
|
+
${(error || warning || info) && (0, _styledComponents.css)`
|
|
299
|
+
padding-bottom: 0px;
|
|
300
|
+
`}
|
|
301
|
+
|
|
302
|
+
&:hover {
|
|
303
|
+
background-color: var(--colorsActionMajorYang100);
|
|
304
|
+
border-bottom-color: ${alternateStyling ? "var(--colorsActionMinor100)" : "var(--colorsActionMajor500)"};
|
|
305
|
+
color: var(--colorsActionMajorYin090);
|
|
306
|
+
cursor: default;
|
|
307
|
+
}
|
|
308
|
+
`}
|
|
344
309
|
|
|
345
|
-
${({
|
|
346
|
-
isInSidebar
|
|
347
|
-
}) => `
|
|
348
310
|
&:focus {
|
|
349
311
|
outline: ${isInSidebar ? "none;" : "var(--borderWidth300) solid var(--colorsSemanticFocus500);"}
|
|
350
312
|
z-index: 2;
|
|
351
313
|
}
|
|
352
|
-
`}
|
|
353
|
-
|
|
354
|
-
${({
|
|
355
|
-
position,
|
|
356
|
-
borders,
|
|
357
|
-
alternateStyling,
|
|
358
|
-
error,
|
|
359
|
-
warning,
|
|
360
|
-
info,
|
|
361
|
-
isInSidebar
|
|
362
|
-
}) => position === "left" && (0, _styledComponents.css)`
|
|
363
|
-
background-color: transparent;
|
|
364
|
-
border-bottom: 0px;
|
|
365
314
|
|
|
366
|
-
|
|
367
|
-
|
|
368
|
-
|
|
369
|
-
`}
|
|
315
|
+
${position === "left" && (0, _styledComponents.css)`
|
|
316
|
+
background-color: transparent;
|
|
317
|
+
border-bottom: 0px;
|
|
370
318
|
|
|
371
|
-
|
|
372
|
-
|
|
373
|
-
|
|
374
|
-
}
|
|
375
|
-
|
|
319
|
+
${!isInSidebar && !error && (0, _styledComponents.css)`
|
|
320
|
+
border-right: ${alternateStyling ? "1px" : "2px"} solid
|
|
321
|
+
var(--colorsActionMinor100);
|
|
322
|
+
`}
|
|
323
|
+
|
|
324
|
+
${!borders && (0, _styledComponents.css)`
|
|
325
|
+
${StyledTitleContent} {
|
|
326
|
+
border-bottom: none;
|
|
327
|
+
}
|
|
328
|
+
`}
|
|
376
329
|
|
|
377
330
|
display: flex;
|
|
378
|
-
|
|
379
|
-
|
|
331
|
+
height: auto;
|
|
332
|
+
margin-left: 0px;
|
|
380
333
|
|
|
381
|
-
|
|
382
|
-
|
|
383
|
-
|
|
334
|
+
&:first-child {
|
|
335
|
+
margin-top: 0;
|
|
336
|
+
}
|
|
384
337
|
|
|
385
|
-
|
|
386
|
-
|
|
387
|
-
|
|
338
|
+
&:hover {
|
|
339
|
+
${alternateStyling && "border-right-color: var(--colorsActionMinor100)"}
|
|
340
|
+
}
|
|
388
341
|
|
|
389
|
-
|
|
390
|
-
|
|
391
|
-
|
|
342
|
+
${(warning || info) && (0, _styledComponents.css)`
|
|
343
|
+
border-right: none;
|
|
344
|
+
`}
|
|
392
345
|
|
|
393
|
-
|
|
394
|
-
isTabSelected
|
|
395
|
-
}) => isTabSelected && (0, _styledComponents.css)`
|
|
346
|
+
${isTabSelected && (0, _styledComponents.css)`
|
|
396
347
|
${alternateStyling && (0, _styledComponents.css)`
|
|
397
348
|
border-right-color: var(--colorsActionMinor100);
|
|
398
349
|
`}
|
|
@@ -406,8 +357,8 @@ const StyledTabTitle = _styledComponents.default.button`
|
|
|
406
357
|
border-right: none;
|
|
407
358
|
}
|
|
408
359
|
`}
|
|
409
|
-
|
|
410
|
-
|
|
360
|
+
|
|
361
|
+
background-color: var(--colorsActionMajorYang100);
|
|
411
362
|
|
|
412
363
|
&:hover {
|
|
413
364
|
${alternateStyling && "border-right-color: var(--colorsActionMinor100);"}
|
|
@@ -419,43 +370,38 @@ const StyledTabTitle = _styledComponents.default.button`
|
|
|
419
370
|
${(error || warning || info) && "border-right-color: var(--colorsSemanticNegative500);"}
|
|
420
371
|
}
|
|
421
372
|
`}
|
|
422
|
-
|
|
373
|
+
`}
|
|
423
374
|
|
|
424
|
-
|
|
425
|
-
|
|
426
|
-
|
|
427
|
-
|
|
428
|
-
}) => alternateStyling && (0, _styledComponents.css)`
|
|
429
|
-
&:focus {
|
|
430
|
-
background-color: var(--colorsActionMinor100);
|
|
431
|
-
}
|
|
375
|
+
${alternateStyling && (0, _styledComponents.css)`
|
|
376
|
+
&:focus {
|
|
377
|
+
background-color: var(--colorsActionMinor100);
|
|
378
|
+
}
|
|
432
379
|
|
|
433
|
-
|
|
434
|
-
|
|
435
|
-
|
|
380
|
+
&:hover {
|
|
381
|
+
background-color: ${isTabSelected ? "var(--colorsActionMinor100)" : "var(--colorsActionMinor150)"};
|
|
382
|
+
}
|
|
436
383
|
|
|
437
|
-
|
|
438
|
-
|
|
439
|
-
|
|
384
|
+
${isTabSelected && (0, _styledComponents.css)`
|
|
385
|
+
background-color: var(--colorsActionMinor100);
|
|
386
|
+
`}
|
|
440
387
|
|
|
441
|
-
|
|
442
|
-
|
|
388
|
+
${isInSidebar && `padding-bottom: 1px;`}
|
|
389
|
+
`}
|
|
390
|
+
`}
|
|
443
391
|
`;
|
|
444
392
|
exports.StyledTabTitle = StyledTabTitle;
|
|
445
393
|
const StyledLayoutWrapper = _styledComponents.default.div`
|
|
446
|
-
${({
|
|
447
|
-
hasCustomLayout
|
|
448
|
-
}) => hasCustomLayout && (0, _styledComponents.css)`
|
|
449
|
-
flex-grow: 2;
|
|
450
|
-
min-width: 100px;
|
|
451
|
-
`}
|
|
452
|
-
|
|
453
394
|
${({
|
|
454
395
|
hasCustomLayout,
|
|
455
396
|
titlePosition,
|
|
456
397
|
hasCustomSibling,
|
|
457
398
|
position
|
|
458
|
-
}) =>
|
|
399
|
+
}) => (0, _styledComponents.css)`
|
|
400
|
+
${hasCustomLayout && (0, _styledComponents.css)`
|
|
401
|
+
flex-grow: 2;
|
|
402
|
+
`}
|
|
403
|
+
|
|
404
|
+
${!hasCustomLayout && (0, _styledComponents.css)`
|
|
459
405
|
display: inline-flex;
|
|
460
406
|
|
|
461
407
|
position: relative;
|
|
@@ -481,6 +427,7 @@ const StyledLayoutWrapper = _styledComponents.default.div`
|
|
|
481
427
|
}
|
|
482
428
|
}
|
|
483
429
|
`}
|
|
430
|
+
`}
|
|
484
431
|
`;
|
|
485
432
|
exports.StyledLayoutWrapper = StyledLayoutWrapper;
|
|
486
433
|
const StyledSelectedIndicator = _styledComponents.default.div`
|
|
@@ -489,7 +436,8 @@ const StyledSelectedIndicator = _styledComponents.default.div`
|
|
|
489
436
|
|
|
490
437
|
${({
|
|
491
438
|
position
|
|
492
|
-
}) =>
|
|
439
|
+
}) => (0, _styledComponents.css)`
|
|
440
|
+
${position === "top" && (0, _styledComponents.css)`
|
|
493
441
|
bottom: 0px;
|
|
494
442
|
left: 0px;
|
|
495
443
|
box-shadow: inset 0px calc(-1 * var(--sizing025)) 0px
|
|
@@ -498,9 +446,7 @@ const StyledSelectedIndicator = _styledComponents.default.div`
|
|
|
498
446
|
height: var(--sizing025);
|
|
499
447
|
`}
|
|
500
448
|
|
|
501
|
-
|
|
502
|
-
position
|
|
503
|
-
}) => position === "left" && (0, _styledComponents.css)`
|
|
449
|
+
${position === "left" && (0, _styledComponents.css)`
|
|
504
450
|
top: 0px;
|
|
505
451
|
right: 0px;
|
|
506
452
|
box-shadow: inset calc(-1 * var(--sizing025)) 0px 0px 0px
|
|
@@ -508,6 +454,7 @@ const StyledSelectedIndicator = _styledComponents.default.div`
|
|
|
508
454
|
height: 100%;
|
|
509
455
|
width: var(--sizing025);
|
|
510
456
|
`}
|
|
457
|
+
`}
|
|
511
458
|
`;
|
|
512
459
|
exports.StyledSelectedIndicator = StyledSelectedIndicator;
|
|
513
460
|
StyledTabTitle.propTypes = {
|