carbon-react 145.0.0 → 146.0.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/esm/__internal__/input/input-presentation.style.js +2 -6
- package/esm/__internal__/input-icon-toggle/input-icon-toggle.style.js +2 -9
- package/esm/__internal__/validations/validation-icon.style.js +1 -6
- package/esm/components/accordion/accordion.style.js +1 -5
- package/esm/components/action-popover/action-popover.style.js +4 -13
- package/esm/components/advanced-color-picker/advanced-color-picker-cell.style.js +1 -8
- package/esm/components/anchor-navigation/anchor-navigation-item/anchor-navigation-item.style.js +1 -6
- package/esm/components/batch-selection/batch-selection.style.js +2 -9
- package/esm/components/button/button.style.js +2 -4
- package/esm/components/button-toggle/button-toggle.style.js +1 -6
- package/esm/components/carbon-provider/__internal__/new-validation.context.d.ts +0 -4
- package/esm/components/carbon-provider/carbon-provider.component.d.ts +1 -1
- package/esm/components/carbon-provider/carbon-provider.component.js +8 -24
- package/esm/components/card/card.style.js +5 -8
- package/esm/components/checkbox/checkbox.style.js +2 -9
- package/esm/components/date/__internal__/date-picker/day-picker.style.js +4 -15
- package/esm/components/date/__internal__/navbar/button.style.js +3 -10
- package/esm/components/drawer/drawer.style.js +3 -10
- package/esm/components/flat-table/flat-table-row/flat-table-row.style.js +9 -46
- package/esm/components/flat-table/flat-table.style.js +2 -12
- package/esm/components/flat-table/sort/sort.style.js +1 -6
- package/esm/components/heading/heading.style.js +1 -4
- package/esm/components/help/help.style.js +1 -6
- package/esm/components/icon/icon.style.js +1 -2
- package/esm/components/icon-button/icon-button.style.js +1 -8
- package/esm/components/link/link.style.js +1 -1
- package/esm/components/link-preview/link-preview.style.js +1 -7
- package/esm/components/menu/menu-full-screen/menu-full-screen.style.js +2 -7
- package/esm/components/menu/menu-item/menu-item.style.js +1 -7
- package/esm/components/multi-action-button/multi-action-button.style.js +1 -10
- package/esm/components/pill/pill.style.js +0 -6
- package/esm/components/simple-color-picker/simple-color/simple-color.style.js +1 -20
- package/esm/components/split-button/split-button-toggle.style.js +1 -10
- package/esm/components/split-button/split-button.style.js +3 -16
- package/esm/components/switch/switch.style.js +2 -6
- package/esm/components/tabs/__internal__/tab-title/tab-title.style.js +5 -9
- package/esm/components/text-editor/__internal__/toolbar/toolbar-button/toolbar-button.style.js +2 -12
- package/esm/components/text-editor/text-editor.style.js +2 -6
- package/esm/components/tile-select/tile-select.style.js +2 -6
- package/esm/components/vertical-menu/vertical-menu.style.js +1 -7
- package/lib/__internal__/input/input-presentation.style.js +2 -6
- package/lib/__internal__/input-icon-toggle/input-icon-toggle.style.js +2 -9
- package/lib/__internal__/validations/validation-icon.style.js +1 -6
- package/lib/components/accordion/accordion.style.js +1 -5
- package/lib/components/action-popover/action-popover.style.js +4 -13
- package/lib/components/advanced-color-picker/advanced-color-picker-cell.style.js +1 -8
- package/lib/components/anchor-navigation/anchor-navigation-item/anchor-navigation-item.style.js +1 -6
- package/lib/components/batch-selection/batch-selection.style.js +2 -9
- package/lib/components/button/button.style.js +2 -4
- package/lib/components/button-toggle/button-toggle.style.js +1 -6
- package/lib/components/carbon-provider/__internal__/new-validation.context.d.ts +0 -4
- package/lib/components/carbon-provider/carbon-provider.component.d.ts +1 -1
- package/lib/components/carbon-provider/carbon-provider.component.js +8 -26
- package/lib/components/card/card.style.js +5 -8
- package/lib/components/checkbox/checkbox.style.js +2 -9
- package/lib/components/date/__internal__/date-picker/day-picker.style.js +4 -15
- package/lib/components/date/__internal__/navbar/button.style.js +3 -10
- package/lib/components/drawer/drawer.style.js +3 -10
- package/lib/components/flat-table/flat-table-row/flat-table-row.style.js +9 -46
- package/lib/components/flat-table/flat-table.style.js +2 -12
- package/lib/components/flat-table/sort/sort.style.js +1 -6
- package/lib/components/heading/heading.style.js +1 -4
- package/lib/components/help/help.style.js +1 -6
- package/lib/components/icon/icon.style.js +1 -2
- package/lib/components/icon-button/icon-button.style.js +1 -8
- package/lib/components/link/link.style.js +1 -1
- package/lib/components/link-preview/link-preview.style.js +1 -7
- package/lib/components/menu/menu-full-screen/menu-full-screen.style.js +2 -7
- package/lib/components/menu/menu-item/menu-item.style.js +1 -7
- package/lib/components/multi-action-button/multi-action-button.style.js +1 -10
- package/lib/components/pill/pill.style.js +0 -6
- package/lib/components/simple-color-picker/simple-color/simple-color.style.js +1 -20
- package/lib/components/split-button/split-button-toggle.style.js +1 -10
- package/lib/components/split-button/split-button.style.js +3 -18
- package/lib/components/switch/switch.style.js +2 -6
- package/lib/components/tabs/__internal__/tab-title/tab-title.style.js +5 -9
- package/lib/components/text-editor/__internal__/toolbar/toolbar-button/toolbar-button.style.js +2 -12
- package/lib/components/text-editor/text-editor.style.js +2 -6
- package/lib/components/tile-select/tile-select.style.js +2 -6
- package/lib/components/vertical-menu/vertical-menu.style.js +1 -7
- package/package.json +1 -1
|
@@ -2,9 +2,6 @@ import styled, { css } from "styled-components";
|
|
|
2
2
|
import sizes from "./input-sizes.style";
|
|
3
3
|
import StyledInput from "./input.style";
|
|
4
4
|
import addFocusStyling from "../../style/utils/add-focus-styling";
|
|
5
|
-
const oldFocusStyling = `
|
|
6
|
-
outline: solid 3px var(--colorsSemanticFocus500);
|
|
7
|
-
`;
|
|
8
5
|
export const StyledInputPresentationContainer = styled.div`
|
|
9
6
|
flex: 0 0 ${({
|
|
10
7
|
inputWidth
|
|
@@ -87,11 +84,10 @@ const InputPresentationStyle = styled.div`
|
|
|
87
84
|
`}
|
|
88
85
|
|
|
89
86
|
${({
|
|
90
|
-
hasFocus
|
|
91
|
-
theme
|
|
87
|
+
hasFocus
|
|
92
88
|
}) => hasFocus && css`
|
|
93
89
|
& {
|
|
94
|
-
${
|
|
90
|
+
${addFocusStyling()}
|
|
95
91
|
z-index: 2;
|
|
96
92
|
}
|
|
97
93
|
`}
|
|
@@ -1,9 +1,6 @@
|
|
|
1
1
|
import styled, { css } from "styled-components";
|
|
2
2
|
import sizes from "../input/input-sizes.style";
|
|
3
3
|
import addFocusStyling from "../../style/utils/add-focus-styling";
|
|
4
|
-
const oldFocusStyling = `
|
|
5
|
-
outline: solid 3px var(--colorsSemanticFocus500);
|
|
6
|
-
`;
|
|
7
4
|
const InputIconToggleStyle = styled.span.attrs(({
|
|
8
5
|
onClick
|
|
9
6
|
}) => ({
|
|
@@ -38,12 +35,8 @@ const InputIconToggleStyle = styled.span.attrs(({
|
|
|
38
35
|
cursor: default;
|
|
39
36
|
`}
|
|
40
37
|
|
|
41
|
-
${({
|
|
42
|
-
theme
|
|
43
|
-
}) => `
|
|
44
38
|
&:focus {
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
`}
|
|
39
|
+
${addFocusStyling()}
|
|
40
|
+
}
|
|
48
41
|
`;
|
|
49
42
|
export default InputIconToggleStyle;
|
|
@@ -8,9 +8,6 @@ const validationIconTypes = {
|
|
|
8
8
|
info: "var(--colorsSemanticInfo500)",
|
|
9
9
|
warning: "var(--colorsSemanticCaution500)"
|
|
10
10
|
};
|
|
11
|
-
const oldFocusStyling = `
|
|
12
|
-
outline: solid 2px var(--colorsSemanticFocus500);
|
|
13
|
-
`;
|
|
14
11
|
const ValidationIconStyle = styled.span`
|
|
15
12
|
background: none;
|
|
16
13
|
cursor: default;
|
|
@@ -34,9 +31,7 @@ const ValidationIconStyle = styled.span`
|
|
|
34
31
|
}
|
|
35
32
|
|
|
36
33
|
${StyledIcon}:focus {
|
|
37
|
-
${(
|
|
38
|
-
theme
|
|
39
|
-
}) => !theme.focusRedesignOptOut ? addFocusStyling() : /* istanbul ignore next */oldFocusStyling}
|
|
34
|
+
${addFocusStyling()}
|
|
40
35
|
}
|
|
41
36
|
|
|
42
37
|
${margin}
|
|
@@ -102,9 +102,6 @@ const StyledAccordionHeadingsContainer = styled.div`
|
|
|
102
102
|
}
|
|
103
103
|
`}
|
|
104
104
|
`;
|
|
105
|
-
const oldFocusStyling = `
|
|
106
|
-
outline: solid 3px var(--colorsSemanticFocus500);
|
|
107
|
-
`;
|
|
108
105
|
const StyledAccordionTitleContainer = styled.div`
|
|
109
106
|
${({
|
|
110
107
|
buttonHeading,
|
|
@@ -112,7 +109,6 @@ const StyledAccordionTitleContainer = styled.div`
|
|
|
112
109
|
iconAlign,
|
|
113
110
|
size,
|
|
114
111
|
hasButtonProps,
|
|
115
|
-
theme,
|
|
116
112
|
isExpanded,
|
|
117
113
|
variant
|
|
118
114
|
}) => css`
|
|
@@ -131,7 +127,7 @@ const StyledAccordionTitleContainer = styled.div`
|
|
|
131
127
|
z-index: 1;
|
|
132
128
|
|
|
133
129
|
&:focus {
|
|
134
|
-
${
|
|
130
|
+
${addFocusStyling()}
|
|
135
131
|
}
|
|
136
132
|
|
|
137
133
|
${variant === "subtle" && css`
|
|
@@ -5,9 +5,6 @@ import StyledIcon from "../icon/icon.style";
|
|
|
5
5
|
import StyledButton from "../button/button.style";
|
|
6
6
|
import addFocusStyling from "../../style/utils/add-focus-styling";
|
|
7
7
|
import baseTheme from "../../style/themes/base";
|
|
8
|
-
const oldFocusStyling = `
|
|
9
|
-
outline: solid 3px var(--colorsSemanticFocus500);
|
|
10
|
-
`;
|
|
11
8
|
const Menu = styled.ul`
|
|
12
9
|
${({
|
|
13
10
|
isOpen
|
|
@@ -119,9 +116,7 @@ const StyledMenuItem = styled.button`
|
|
|
119
116
|
font-weight: 500;
|
|
120
117
|
|
|
121
118
|
&:focus {
|
|
122
|
-
${(
|
|
123
|
-
theme
|
|
124
|
-
}) => `${!theme.focusRedesignOptOut ? addFocusStyling() : /* istanbul ignore next */oldFocusStyling}`}
|
|
119
|
+
${addFocusStyling()}
|
|
125
120
|
z-index: 1;
|
|
126
121
|
border-radius: var(--borderRadius000);
|
|
127
122
|
}
|
|
@@ -188,13 +183,9 @@ const ButtonIcon = styled(Icon)`
|
|
|
188
183
|
}
|
|
189
184
|
`;
|
|
190
185
|
const StyledButtonIcon = styled.div`
|
|
191
|
-
|
|
192
|
-
|
|
193
|
-
}
|
|
194
|
-
&:focus {
|
|
195
|
-
${!theme.focusRedesignOptOut ? addFocusStyling() : /* istanbul ignore next */oldFocusStyling}
|
|
196
|
-
}
|
|
197
|
-
`}
|
|
186
|
+
&:focus {
|
|
187
|
+
${addFocusStyling()}
|
|
188
|
+
}
|
|
198
189
|
border-radius: var(--borderRadius050);
|
|
199
190
|
`;
|
|
200
191
|
const MenuItemIcon = styled(Icon)`
|
|
@@ -2,9 +2,6 @@ import styled, { css } from "styled-components";
|
|
|
2
2
|
import baseTheme from "../../style/themes/base";
|
|
3
3
|
import addFocusStyling from "../../style/utils/add-focus-styling";
|
|
4
4
|
const transparentSvg = "%3Csvg%20xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%" + "2Fsvg%22%20width%3D%22400%22%20height%3D%22400%22%20fill-opacity%3D%22." + "45%22%3E%3Crect%20x%3D%22200%22%20width%3D%22200%22%20height%3D%22200%22%20%2" + "F%3E%3Crect%20y%3D%22200%22%20width%3D%22200%22%20height%3D%22200%22%20%2F%3E%3C%2Fsvg%3E";
|
|
5
|
-
const oldFocusStyling = `
|
|
6
|
-
outline: solid 3px var(--colorsSemanticFocus500);
|
|
7
|
-
`;
|
|
8
5
|
const StyledAdvancedColorPickerCell = styled.button.attrs({
|
|
9
6
|
type: "button"
|
|
10
7
|
})`
|
|
@@ -31,11 +28,7 @@ const StyledAdvancedColorPickerCell = styled.button.attrs({
|
|
|
31
28
|
}
|
|
32
29
|
|
|
33
30
|
&:focus {
|
|
34
|
-
${(
|
|
35
|
-
theme
|
|
36
|
-
}) => `
|
|
37
|
-
${!theme.focusRedesignOptOut ? addFocusStyling() : /* istanbul ignore next */oldFocusStyling}
|
|
38
|
-
`}
|
|
31
|
+
${addFocusStyling()}
|
|
39
32
|
}
|
|
40
33
|
|
|
41
34
|
&::-moz-focus-inner {
|
package/esm/components/anchor-navigation/anchor-navigation-item/anchor-navigation-item.style.js
CHANGED
|
@@ -1,8 +1,5 @@
|
|
|
1
1
|
import styled, { css } from "styled-components";
|
|
2
2
|
import addFocusStyling from "../../../style/utils/add-focus-styling";
|
|
3
|
-
const oldFocusStyling = `
|
|
4
|
-
outline: solid 3px var(--colorsSemanticFocus500);
|
|
5
|
-
`;
|
|
6
3
|
const StyledNavigationItem = styled.li`
|
|
7
4
|
width: 100%;
|
|
8
5
|
|
|
@@ -19,9 +16,7 @@ const StyledNavigationItem = styled.li`
|
|
|
19
16
|
border-bottom-right-radius: var(--borderRadius100);
|
|
20
17
|
|
|
21
18
|
&:focus {
|
|
22
|
-
${(
|
|
23
|
-
theme
|
|
24
|
-
}) => `${!theme.focusRedesignOptOut ? addFocusStyling() : /* istanbul ignore next */oldFocusStyling}`}
|
|
19
|
+
${addFocusStyling()}
|
|
25
20
|
position: relative;
|
|
26
21
|
}
|
|
27
22
|
|
|
@@ -2,9 +2,6 @@ import styled, { css } from "styled-components";
|
|
|
2
2
|
import StyledIconButton from "../icon-button/icon-button.style";
|
|
3
3
|
import StyledIcon from "../icon/icon.style";
|
|
4
4
|
import addFocusStyling from "../../style/utils/add-focus-styling";
|
|
5
|
-
const oldFocusStyling = `
|
|
6
|
-
outline: solid 3px var(--colorsSemanticFocus500);
|
|
7
|
-
`;
|
|
8
5
|
const StyledBatchSelection = styled.div`
|
|
9
6
|
${({
|
|
10
7
|
disabled,
|
|
@@ -20,9 +17,7 @@ const StyledBatchSelection = styled.div`
|
|
|
20
17
|
${StyledIcon} {
|
|
21
18
|
${!disabled && `color: var(--colorsActionMajorYin065);`}
|
|
22
19
|
&:focus {
|
|
23
|
-
${(
|
|
24
|
-
theme
|
|
25
|
-
}) => `${!theme.focusRedesignOptOut ? addFocusStyling() : /* istanbul ignore next */oldFocusStyling}`}
|
|
20
|
+
${addFocusStyling()}
|
|
26
21
|
}
|
|
27
22
|
}
|
|
28
23
|
|
|
@@ -64,9 +59,7 @@ const StyledBatchSelection = styled.div`
|
|
|
64
59
|
${StyledIconButton}:focus {
|
|
65
60
|
border-radius: var(--borderRadius100);
|
|
66
61
|
z-index: 1;
|
|
67
|
-
${(
|
|
68
|
-
theme
|
|
69
|
-
}) => `${!theme.focusRedesignOptOut ? addFocusStyling() : /* istanbul ignore next */oldFocusStyling}`}
|
|
62
|
+
${addFocusStyling()}
|
|
70
63
|
}
|
|
71
64
|
|
|
72
65
|
${disabled && css`
|
|
@@ -53,13 +53,11 @@ function stylingForType({
|
|
|
53
53
|
${iconOnly && stylingForIconOnly(size)}
|
|
54
54
|
`;
|
|
55
55
|
}
|
|
56
|
-
const oldFocusStyling = "outline: solid 3px var(--colorsSemanticFocus500);";
|
|
57
56
|
const StyledButton = styled.button`
|
|
58
57
|
${space}
|
|
59
58
|
${({
|
|
60
59
|
disabled,
|
|
61
|
-
noWrap
|
|
62
|
-
theme
|
|
60
|
+
noWrap
|
|
63
61
|
}) => css`
|
|
64
62
|
align-items: center;
|
|
65
63
|
cursor: ${disabled ? "not-allowed" : "pointer"};
|
|
@@ -75,7 +73,7 @@ const StyledButton = styled.button`
|
|
|
75
73
|
border-radius: var(--borderRadius400);
|
|
76
74
|
|
|
77
75
|
&:focus {
|
|
78
|
-
${
|
|
76
|
+
${addFocusStyling()}
|
|
79
77
|
}
|
|
80
78
|
|
|
81
79
|
${stylingForType}
|
|
@@ -35,9 +35,6 @@ const StyledButtonToggleContentWrapper = styled.div`
|
|
|
35
35
|
height: 100%;
|
|
36
36
|
flex-flow: wrap;
|
|
37
37
|
`;
|
|
38
|
-
const oldFocusStyling = `
|
|
39
|
-
outline: solid 3px var(--colorsSemanticFocus500);
|
|
40
|
-
`;
|
|
41
38
|
const StyledButtonToggle = styled.button`
|
|
42
39
|
display: inline-flex;
|
|
43
40
|
justify-content: center;
|
|
@@ -78,9 +75,7 @@ const StyledButtonToggle = styled.button`
|
|
|
78
75
|
`}
|
|
79
76
|
|
|
80
77
|
&:focus {
|
|
81
|
-
${(
|
|
82
|
-
theme
|
|
83
|
-
}) => `${!theme.focusRedesignOptOut ? addFocusStyling() : /* istanbul ignore next */oldFocusStyling}`}
|
|
78
|
+
${addFocusStyling()}
|
|
84
79
|
z-index: 100;
|
|
85
80
|
}
|
|
86
81
|
|
|
@@ -4,10 +4,6 @@ export interface NewValidationContextProps {
|
|
|
4
4
|
*
|
|
5
5
|
* NOTE - Will eventually be set to `true` by default in the future. */
|
|
6
6
|
validationRedesignOptIn?: boolean;
|
|
7
|
-
/** (Deprecated) Feature flag for opting out of the focus redesign.
|
|
8
|
-
*
|
|
9
|
-
* NOTE - This feature flag will soon be removed, along with the legacy styling. */
|
|
10
|
-
focusRedesignOptOut?: boolean;
|
|
11
7
|
}
|
|
12
8
|
declare const _default: React.Context<NewValidationContextProps>;
|
|
13
9
|
export default _default;
|
|
@@ -6,5 +6,5 @@ export interface CarbonProviderProps extends NewValidationContextProps {
|
|
|
6
6
|
/** Theme which specifies styles to apply to all child components. Set to `sageTheme` by default. */
|
|
7
7
|
theme?: Partial<ThemeObject>;
|
|
8
8
|
}
|
|
9
|
-
export declare const CarbonProvider: ({ children, theme, validationRedesignOptIn,
|
|
9
|
+
export declare const CarbonProvider: ({ children, theme, validationRedesignOptIn, }: CarbonProviderProps) => React.JSX.Element;
|
|
10
10
|
export default CarbonProvider;
|
|
@@ -1,35 +1,19 @@
|
|
|
1
|
-
import React
|
|
1
|
+
import React from "react";
|
|
2
2
|
import PropTypes from "prop-types";
|
|
3
3
|
import { ThemeProvider } from "styled-components";
|
|
4
4
|
import CarbonScopedTokensProvider from "../../style/design-tokens/carbon-scoped-tokens-provider";
|
|
5
5
|
import { sageTheme } from "../../style/themes";
|
|
6
6
|
import NewValidationContext from "./__internal__/new-validation.context";
|
|
7
7
|
import TopModalProvider from "./__internal__/top-modal-provider.component";
|
|
8
|
-
import Logger from "../../__internal__/utils/logger";
|
|
9
|
-
let deprecatedFocusRedesignOptOut = false;
|
|
10
8
|
export const CarbonProvider = ({
|
|
11
9
|
children,
|
|
12
10
|
theme = sageTheme,
|
|
13
|
-
validationRedesignOptIn = false
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
const focusRedesignOptOutValue = existingFocusRedesignOptOut || focusRedesignOptOut;
|
|
20
|
-
if (!deprecatedFocusRedesignOptOut && focusRedesignOptOutValue) {
|
|
21
|
-
deprecatedFocusRedesignOptOut = true;
|
|
22
|
-
Logger.deprecate("The `focusRedesignOptOut` feature flag has been deprecated and will soon be removed. " + "Along with this feature flag, the legacy focus styling will also be removed. ");
|
|
11
|
+
validationRedesignOptIn = false
|
|
12
|
+
}) => /*#__PURE__*/React.createElement(ThemeProvider, {
|
|
13
|
+
theme: theme
|
|
14
|
+
}, /*#__PURE__*/React.createElement(CarbonScopedTokensProvider, null, /*#__PURE__*/React.createElement(NewValidationContext.Provider, {
|
|
15
|
+
value: {
|
|
16
|
+
validationRedesignOptIn
|
|
23
17
|
}
|
|
24
|
-
|
|
25
|
-
theme: {
|
|
26
|
-
...theme,
|
|
27
|
-
focusRedesignOptOut: focusRedesignOptOutValue
|
|
28
|
-
}
|
|
29
|
-
}, /*#__PURE__*/React.createElement(CarbonScopedTokensProvider, null, /*#__PURE__*/React.createElement(NewValidationContext.Provider, {
|
|
30
|
-
value: {
|
|
31
|
-
validationRedesignOptIn
|
|
32
|
-
}
|
|
33
|
-
}, /*#__PURE__*/React.createElement(TopModalProvider, null, children))));
|
|
34
|
-
};
|
|
18
|
+
}, /*#__PURE__*/React.createElement(TopModalProvider, null, children))));
|
|
35
19
|
export default CarbonProvider;
|
|
@@ -76,20 +76,17 @@ const StyledCardContent = styled.div.attrs(({
|
|
|
76
76
|
return {};
|
|
77
77
|
})`
|
|
78
78
|
${({
|
|
79
|
-
interactive
|
|
80
|
-
theme
|
|
79
|
+
interactive
|
|
81
80
|
}) => interactive && css`
|
|
82
81
|
cursor: pointer;
|
|
83
82
|
display: inline-flex;
|
|
84
83
|
flex-direction: column;
|
|
85
84
|
height: 100%;
|
|
86
85
|
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
}
|
|
92
|
-
`}
|
|
86
|
+
:focus {
|
|
87
|
+
${addFocusStyling()};
|
|
88
|
+
position: relative;
|
|
89
|
+
}
|
|
93
90
|
`}
|
|
94
91
|
|
|
95
92
|
align-items: stretch;
|
|
@@ -8,9 +8,6 @@ import StyledLabel, { StyledLabelContainer } from "../../__internal__/label/labe
|
|
|
8
8
|
import StyledValidationIcon from "../../__internal__/validations/validation-icon.style";
|
|
9
9
|
import baseTheme from "../../style/themes/base";
|
|
10
10
|
import addFocusStyling from "../../style/utils/add-focus-styling";
|
|
11
|
-
const oldFocusStyling = `
|
|
12
|
-
box-shadow: 0 0 0 3px var(--colorsSemanticFocus500);
|
|
13
|
-
`;
|
|
14
11
|
const StyledCheckbox = styled.div`
|
|
15
12
|
${margin}
|
|
16
13
|
${({
|
|
@@ -69,14 +66,10 @@ const StyledCheckbox = styled.div`
|
|
|
69
66
|
|
|
70
67
|
// prettier-ignore
|
|
71
68
|
${StyledHiddenCheckableInput}:not([disabled]) {
|
|
72
|
-
${({
|
|
73
|
-
theme
|
|
74
|
-
}) => `
|
|
75
69
|
&:focus + ${StyledCheckableInputSvgWrapper} ,
|
|
76
70
|
&:hover + ${StyledCheckableInputSvgWrapper} {
|
|
77
|
-
${
|
|
78
|
-
|
|
79
|
-
`}
|
|
71
|
+
${addFocusStyling()}
|
|
72
|
+
}
|
|
80
73
|
}
|
|
81
74
|
|
|
82
75
|
${StyledLabelContainer} {
|
|
@@ -1,9 +1,6 @@
|
|
|
1
1
|
import styled, { css } from "styled-components";
|
|
2
2
|
import baseTheme from "../../../../style/themes/base";
|
|
3
3
|
import addFocusStyling from "../../../../style/utils/add-focus-styling";
|
|
4
|
-
const oldFocusStyling = `
|
|
5
|
-
outline: solid 3px var(--colorsSemanticFocus500);
|
|
6
|
-
`;
|
|
7
4
|
const officialReactDayPickerStyling = () => css`
|
|
8
5
|
/* Variables declaration */
|
|
9
6
|
/* prettier-ignore */
|
|
@@ -449,22 +446,14 @@ const StyledDayPicker = styled.div`
|
|
|
449
446
|
}
|
|
450
447
|
|
|
451
448
|
.rdp-focused:not(.rdp-disabled):not(.rdp-outside) {
|
|
452
|
-
${(
|
|
453
|
-
theme
|
|
454
|
-
}) => css`
|
|
455
|
-
${!theme.focusRedesignOptOut ? addFocusStyling(true) : /* istanbul ignore next */oldFocusStyling}
|
|
456
|
-
`}
|
|
449
|
+
${addFocusStyling(true)}
|
|
457
450
|
border-radius: var(--borderRadius400);
|
|
458
451
|
}
|
|
459
452
|
|
|
460
453
|
.rdp-day.rdp-selected {
|
|
461
|
-
|
|
462
|
-
|
|
463
|
-
}
|
|
464
|
-
&:focus {
|
|
465
|
-
${!theme.focusRedesignOptOut ? addFocusStyling(true) : /* istanbul ignore next */oldFocusStyling}
|
|
466
|
-
}
|
|
467
|
-
`}
|
|
454
|
+
&:focus {
|
|
455
|
+
${addFocusStyling(true)}
|
|
456
|
+
}
|
|
468
457
|
}
|
|
469
458
|
`;
|
|
470
459
|
StyledDayPicker.defaultProps = {
|
|
@@ -1,9 +1,6 @@
|
|
|
1
1
|
import styled from "styled-components";
|
|
2
2
|
import addFocusStyling from "../../../../style/utils/add-focus-styling";
|
|
3
3
|
import { baseTheme } from "../../../../style/themes";
|
|
4
|
-
const oldFocusStyling = `
|
|
5
|
-
outline: solid 3px var(--colorsSemanticFocus500);
|
|
6
|
-
`;
|
|
7
4
|
const StyledButton = styled.button.attrs({
|
|
8
5
|
type: "button"
|
|
9
6
|
})`
|
|
@@ -20,13 +17,9 @@ const StyledButton = styled.button.attrs({
|
|
|
20
17
|
box-sizing: border-box;
|
|
21
18
|
border-radius: var(--borderRadius050);
|
|
22
19
|
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
}
|
|
26
|
-
&:focus {
|
|
27
|
-
${!theme.focusRedesignOptOut ? addFocusStyling() : /* istanbul ignore next */oldFocusStyling}
|
|
28
|
-
}
|
|
29
|
-
`}
|
|
20
|
+
&:focus {
|
|
21
|
+
${addFocusStyling()}
|
|
22
|
+
}
|
|
30
23
|
`;
|
|
31
24
|
StyledButton.defaultProps = {
|
|
32
25
|
theme: baseTheme
|
|
@@ -160,9 +160,6 @@ const StyledDrawerContent = styled.aside`
|
|
|
160
160
|
}
|
|
161
161
|
}
|
|
162
162
|
`;
|
|
163
|
-
const oldFocusStyling = `
|
|
164
|
-
outline: solid 3px var(--colorsSemanticFocus500);
|
|
165
|
-
`;
|
|
166
163
|
const StyledSidebarToggleButton = styled.button.attrs({
|
|
167
164
|
type: "button"
|
|
168
165
|
})`
|
|
@@ -186,13 +183,9 @@ const StyledSidebarToggleButton = styled.button.attrs({
|
|
|
186
183
|
animation: ${buttonClose} ${animationDuration} ease-in-out;
|
|
187
184
|
border-radius: var(--borderRadius050);
|
|
188
185
|
|
|
189
|
-
|
|
190
|
-
|
|
191
|
-
}
|
|
192
|
-
&:focus {
|
|
193
|
-
${!theme.focusRedesignOptOut ? addFocusStyling() : /* istanbul ignore next */oldFocusStyling}
|
|
194
|
-
}
|
|
195
|
-
`}
|
|
186
|
+
&:focus {
|
|
187
|
+
${addFocusStyling()}
|
|
188
|
+
}
|
|
196
189
|
|
|
197
190
|
&:hover {
|
|
198
191
|
cursor: pointer;
|
|
@@ -12,13 +12,6 @@ const horizontalBorderSizes = {
|
|
|
12
12
|
medium: "2px",
|
|
13
13
|
large: "4px"
|
|
14
14
|
};
|
|
15
|
-
const oldFocusStyling = `
|
|
16
|
-
border: 2px solid var(--colorsSemanticFocus500);
|
|
17
|
-
`;
|
|
18
|
-
const firstColumnOldFocusStyling = `
|
|
19
|
-
outline: 2px solid var(--colorsSemanticFocus500);
|
|
20
|
-
outline-offset: -1px;
|
|
21
|
-
`;
|
|
22
15
|
const newFocusStyling = theme => {
|
|
23
16
|
return `
|
|
24
17
|
${addFocusStyling(true)}
|
|
@@ -39,11 +32,7 @@ css`
|
|
|
39
32
|
border-right: 2px solid var(--colorsSemanticFocus500);
|
|
40
33
|
}
|
|
41
34
|
`;
|
|
42
|
-
const stickyColumnFocusStyling = theme =>
|
|
43
|
-
/* istanbul ignore else */
|
|
44
|
-
if (!theme.focusRedesignOptOut) return ``;
|
|
45
|
-
/* istanbul ignore next */
|
|
46
|
-
return `
|
|
35
|
+
const stickyColumnFocusStyling = theme => `
|
|
47
36
|
width: calc(100% + 1px);
|
|
48
37
|
z-index: ${theme.zIndex.overlay};
|
|
49
38
|
:before {
|
|
@@ -60,7 +49,6 @@ const stickyColumnFocusStyling = theme => {
|
|
|
60
49
|
}
|
|
61
50
|
}
|
|
62
51
|
`;
|
|
63
|
-
};
|
|
64
52
|
const borderColor = colorTheme => {
|
|
65
53
|
switch (colorTheme) {
|
|
66
54
|
case "light":
|
|
@@ -203,7 +191,7 @@ const StyledFlatTableRow = styled.tr`
|
|
|
203
191
|
right: 0px;
|
|
204
192
|
top: 0;
|
|
205
193
|
bottom: 0px;
|
|
206
|
-
${
|
|
194
|
+
${newFocusStyling(theme)}
|
|
207
195
|
pointer-events: none;
|
|
208
196
|
}
|
|
209
197
|
|
|
@@ -222,37 +210,12 @@ const StyledFlatTableRow = styled.tr`
|
|
|
222
210
|
|
|
223
211
|
/* Styling for safari. Position relative does not work on tr elements on Safari */
|
|
224
212
|
${isSafari(navigator) && css`
|
|
225
|
-
|
|
226
|
-
|
|
227
|
-
|
|
228
|
-
|
|
229
|
-
|
|
230
|
-
|
|
231
|
-
:after {
|
|
232
|
-
content: none;
|
|
233
|
-
border: none;
|
|
234
|
-
}
|
|
235
|
-
`}
|
|
236
|
-
${!theme.focusRedesignOptOut && /* istanbul ignore next */
|
|
237
|
-
css`
|
|
238
|
-
position: -webkit-sticky;
|
|
239
|
-
:after {
|
|
240
|
-
border: none;
|
|
241
|
-
content: "";
|
|
242
|
-
height: ${rowHeight}px;
|
|
243
|
-
${newFocusStyling(theme)}
|
|
244
|
-
}
|
|
245
|
-
`}
|
|
246
|
-
`}
|
|
247
|
-
|
|
248
|
-
${theme.focusRedesignOptOut && /* istanbul ignore next */
|
|
249
|
-
css`
|
|
250
|
-
td:first-of-type:not(:nth-child(${lhsRowHeaderIndex + 2}))::before {
|
|
251
|
-
border-left: 3px solid var(--colorsSemanticFocus500);
|
|
252
|
-
}
|
|
253
|
-
|
|
254
|
-
td:last-of-type:not(:nth-child(${rhsRowHeaderIndex})) {
|
|
255
|
-
border-right: 2px solid var(--colorsSemanticFocus500);
|
|
213
|
+
position: -webkit-sticky;
|
|
214
|
+
:after {
|
|
215
|
+
border: none;
|
|
216
|
+
content: "";
|
|
217
|
+
height: ${rowHeight}px;
|
|
218
|
+
${newFocusStyling(theme)}
|
|
256
219
|
}
|
|
257
220
|
`}
|
|
258
221
|
|
|
@@ -288,7 +251,7 @@ const StyledFlatTableRow = styled.tr`
|
|
|
288
251
|
cursor: pointer;
|
|
289
252
|
|
|
290
253
|
:focus {
|
|
291
|
-
${
|
|
254
|
+
${newFocusStyling(theme)}
|
|
292
255
|
}
|
|
293
256
|
|
|
294
257
|
:hover {
|
|
@@ -13,9 +13,6 @@ import addFocusStyling from "../../style/utils/add-focus-styling";
|
|
|
13
13
|
const HEADER_OVERLAY_INCREMENT = 3;
|
|
14
14
|
const STICKY_FOOTER_OVERLAY_INCREMENT = 1;
|
|
15
15
|
const ROW_HEADER_OVERLAY_INCREMENT = 5;
|
|
16
|
-
const oldFocusStyling = `
|
|
17
|
-
outline: 2px solid var(--colorsSemanticFocus500);
|
|
18
|
-
`;
|
|
19
16
|
const StyledTableContainer = styled.div`
|
|
20
17
|
${({
|
|
21
18
|
width,
|
|
@@ -125,22 +122,15 @@ const StyledFlatTableWrapper = styled(StyledBox)`
|
|
|
125
122
|
|
|
126
123
|
${({
|
|
127
124
|
isInSidebar,
|
|
128
|
-
theme,
|
|
129
125
|
isFocused
|
|
130
126
|
}) => css`
|
|
131
127
|
box-sizing: border-box;
|
|
132
128
|
|
|
133
|
-
|
|
134
|
-
${theme.focusRedesignOptOut && isFocused && /* istanbul ignore next */
|
|
135
|
-
css`
|
|
136
|
-
${oldFocusStyling}
|
|
137
|
-
`}
|
|
138
|
-
|
|
139
|
-
${!theme.focusRedesignOptOut && isFocused && css`
|
|
129
|
+
${isFocused && css`
|
|
140
130
|
${addFocusStyling()}
|
|
141
131
|
`}
|
|
142
132
|
|
|
143
|
-
|
|
133
|
+
${isInSidebar ? "min-width: fit-content;" : ""}
|
|
144
134
|
`}
|
|
145
135
|
|
|
146
136
|
${({
|
|
@@ -2,9 +2,6 @@ import styled from "styled-components";
|
|
|
2
2
|
import Icon from "../../icon";
|
|
3
3
|
import addFocusStyling from "../../../style/utils/add-focus-styling";
|
|
4
4
|
import baseTheme from "../../../style/themes/base";
|
|
5
|
-
const oldFocusStyling = `
|
|
6
|
-
outline: solid 1px var(--colorsSemanticFocus500);
|
|
7
|
-
`;
|
|
8
5
|
const StyledSort = styled.div`
|
|
9
6
|
display: inline-flex;
|
|
10
7
|
align-items: center;
|
|
@@ -19,9 +16,7 @@ const StyledSort = styled.div`
|
|
|
19
16
|
}
|
|
20
17
|
|
|
21
18
|
:focus {
|
|
22
|
-
${(
|
|
23
|
-
theme
|
|
24
|
-
}) => `${!theme.focusRedesignOptOut ? addFocusStyling() : /* istanbul ignore next */oldFocusStyling}`}
|
|
19
|
+
${addFocusStyling()}
|
|
25
20
|
border-radius: var(--borderRadius025);
|
|
26
21
|
}
|
|
27
22
|
`;
|
|
@@ -19,7 +19,6 @@ const StyledHeaderContent = styled.div`
|
|
|
19
19
|
display: inline-flex;
|
|
20
20
|
align-items: flex-end;
|
|
21
21
|
`;
|
|
22
|
-
const oldFocusStyling = "outline: 3px solid var(--colorsSemanticFocus500);";
|
|
23
22
|
const StyledHeader = styled.div`
|
|
24
23
|
${({
|
|
25
24
|
divider,
|
|
@@ -56,9 +55,7 @@ const StyledHeadingBackButton = styled(Link)`
|
|
|
56
55
|
|
|
57
56
|
&:focus {
|
|
58
57
|
background-color: transparent;
|
|
59
|
-
${(
|
|
60
|
-
theme
|
|
61
|
-
}) => !theme.focusRedesignOptOut ? addFocusStyling() : oldFocusStyling}
|
|
58
|
+
${addFocusStyling()}
|
|
62
59
|
}
|
|
63
60
|
|
|
64
61
|
&:hover {
|
|
@@ -3,9 +3,6 @@ import { margin } from "styled-system";
|
|
|
3
3
|
import baseTheme from "../../style/themes/base";
|
|
4
4
|
import StyledIcon from "../icon/icon.style";
|
|
5
5
|
import addFocusStyling from "../../style/utils/add-focus-styling";
|
|
6
|
-
const oldFocusStyling = `
|
|
7
|
-
outline: solid 2px var(--colorsSemanticFocus500);
|
|
8
|
-
`;
|
|
9
6
|
const StyledHelp = styled.div`
|
|
10
7
|
background: none;
|
|
11
8
|
cursor: default;
|
|
@@ -37,9 +34,7 @@ const StyledHelp = styled.div`
|
|
|
37
34
|
|
|
38
35
|
&:focus ${StyledIcon} {
|
|
39
36
|
border-radius: var(--borderRadius050);
|
|
40
|
-
${(
|
|
41
|
-
theme
|
|
42
|
-
}) => `${!theme.focusRedesignOptOut ? addFocusStyling() : /* istanbul ignore next */oldFocusStyling}`}
|
|
37
|
+
${addFocusStyling()}
|
|
43
38
|
}
|
|
44
39
|
|
|
45
40
|
${margin}
|