carbon-react 144.22.1 → 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.
Files changed (103) hide show
  1. package/esm/__internal__/input/input-presentation.style.js +2 -6
  2. package/esm/__internal__/input-icon-toggle/input-icon-toggle.style.js +2 -9
  3. package/esm/__internal__/validations/validation-icon.style.js +1 -6
  4. package/esm/components/accordion/accordion.style.js +1 -5
  5. package/esm/components/action-popover/action-popover.style.js +4 -13
  6. package/esm/components/advanced-color-picker/advanced-color-picker-cell.style.js +1 -8
  7. package/esm/components/anchor-navigation/anchor-navigation-item/anchor-navigation-item.style.js +1 -6
  8. package/esm/components/batch-selection/batch-selection.style.js +2 -9
  9. package/esm/components/box/box.style.js +3 -4
  10. package/esm/components/button/button.style.js +2 -4
  11. package/esm/components/button-toggle/button-toggle.style.js +1 -6
  12. package/esm/components/carbon-provider/__internal__/new-validation.context.d.ts +0 -8
  13. package/esm/components/carbon-provider/carbon-provider.component.d.ts +1 -1
  14. package/esm/components/carbon-provider/carbon-provider.component.js +8 -34
  15. package/esm/components/card/card.style.js +5 -8
  16. package/esm/components/checkbox/checkbox.style.js +2 -9
  17. package/esm/components/date/__internal__/date-picker/day-picker.style.js +4 -15
  18. package/esm/components/date/__internal__/navbar/button.style.js +3 -10
  19. package/esm/components/dismissible-box/dismissible-box.component.d.ts +1 -1
  20. package/esm/components/drawer/drawer.style.js +3 -10
  21. package/esm/components/flat-table/flat-table-row/flat-table-row.style.js +9 -46
  22. package/esm/components/flat-table/flat-table.style.js +2 -12
  23. package/esm/components/flat-table/sort/sort.style.js +1 -6
  24. package/esm/components/heading/heading.style.js +1 -4
  25. package/esm/components/help/help.style.js +1 -6
  26. package/esm/components/icon/icon.style.js +1 -2
  27. package/esm/components/icon-button/icon-button.style.js +1 -8
  28. package/esm/components/link/link.style.js +1 -1
  29. package/esm/components/link-preview/link-preview.style.js +1 -7
  30. package/esm/components/loader/loader-square.style.js +3 -4
  31. package/esm/components/menu/menu-full-screen/menu-full-screen.style.js +2 -7
  32. package/esm/components/menu/menu-item/menu-item.style.js +1 -7
  33. package/esm/components/multi-action-button/multi-action-button.style.js +1 -10
  34. package/esm/components/pill/pill.style.js +4 -49
  35. package/esm/components/portrait/portrait.component.js +4 -9
  36. package/esm/components/progress-tracker/progress-tracker.style.js +4 -6
  37. package/esm/components/simple-color-picker/simple-color/simple-color.style.js +1 -20
  38. package/esm/components/split-button/split-button-toggle.style.js +1 -10
  39. package/esm/components/split-button/split-button.style.js +3 -16
  40. package/esm/components/switch/__internal__/switch-slider.style.d.ts +1 -3
  41. package/esm/components/switch/__internal__/switch-slider.style.js +1 -10
  42. package/esm/components/switch/switch.style.js +2 -6
  43. package/esm/components/tabs/__internal__/tab-title/tab-title.style.js +5 -9
  44. package/esm/components/text-editor/__internal__/toolbar/toolbar-button/toolbar-button.style.js +2 -12
  45. package/esm/components/text-editor/text-editor.style.js +2 -6
  46. package/esm/components/tile-select/tile-select.style.js +2 -6
  47. package/esm/components/vertical-menu/vertical-menu.style.js +1 -7
  48. package/esm/style/design-tokens/carbon-scoped-tokens-provider/carbon-scoped-tokens-provider.component.d.ts +1 -2
  49. package/esm/style/design-tokens/carbon-scoped-tokens-provider/carbon-scoped-tokens-provider.component.js +2 -1
  50. package/esm/style/design-tokens/generate-css-variables.util.d.ts +1 -1
  51. package/esm/style/design-tokens/generate-css-variables.util.js +1 -6
  52. package/lib/__internal__/input/input-presentation.style.js +2 -6
  53. package/lib/__internal__/input-icon-toggle/input-icon-toggle.style.js +2 -9
  54. package/lib/__internal__/validations/validation-icon.style.js +1 -6
  55. package/lib/components/accordion/accordion.style.js +1 -5
  56. package/lib/components/action-popover/action-popover.style.js +4 -13
  57. package/lib/components/advanced-color-picker/advanced-color-picker-cell.style.js +1 -8
  58. package/lib/components/anchor-navigation/anchor-navigation-item/anchor-navigation-item.style.js +1 -6
  59. package/lib/components/batch-selection/batch-selection.style.js +2 -9
  60. package/lib/components/box/box.style.js +3 -4
  61. package/lib/components/button/button.style.js +2 -4
  62. package/lib/components/button-toggle/button-toggle.style.js +1 -6
  63. package/lib/components/carbon-provider/__internal__/new-validation.context.d.ts +0 -8
  64. package/lib/components/carbon-provider/carbon-provider.component.d.ts +1 -1
  65. package/lib/components/carbon-provider/carbon-provider.component.js +8 -36
  66. package/lib/components/card/card.style.js +5 -8
  67. package/lib/components/checkbox/checkbox.style.js +2 -9
  68. package/lib/components/date/__internal__/date-picker/day-picker.style.js +4 -15
  69. package/lib/components/date/__internal__/navbar/button.style.js +3 -10
  70. package/lib/components/dismissible-box/dismissible-box.component.d.ts +1 -1
  71. package/lib/components/drawer/drawer.style.js +3 -10
  72. package/lib/components/flat-table/flat-table-row/flat-table-row.style.js +9 -46
  73. package/lib/components/flat-table/flat-table.style.js +2 -12
  74. package/lib/components/flat-table/sort/sort.style.js +1 -6
  75. package/lib/components/heading/heading.style.js +1 -4
  76. package/lib/components/help/help.style.js +1 -6
  77. package/lib/components/icon/icon.style.js +1 -2
  78. package/lib/components/icon-button/icon-button.style.js +1 -8
  79. package/lib/components/link/link.style.js +1 -1
  80. package/lib/components/link-preview/link-preview.style.js +1 -7
  81. package/lib/components/loader/loader-square.style.js +3 -4
  82. package/lib/components/menu/menu-full-screen/menu-full-screen.style.js +2 -7
  83. package/lib/components/menu/menu-item/menu-item.style.js +1 -7
  84. package/lib/components/multi-action-button/multi-action-button.style.js +1 -10
  85. package/lib/components/pill/pill.style.js +4 -49
  86. package/lib/components/portrait/portrait.component.js +3 -8
  87. package/lib/components/progress-tracker/progress-tracker.style.js +4 -6
  88. package/lib/components/simple-color-picker/simple-color/simple-color.style.js +1 -20
  89. package/lib/components/split-button/split-button-toggle.style.js +1 -10
  90. package/lib/components/split-button/split-button.style.js +3 -18
  91. package/lib/components/switch/__internal__/switch-slider.style.d.ts +1 -3
  92. package/lib/components/switch/__internal__/switch-slider.style.js +1 -10
  93. package/lib/components/switch/switch.style.js +2 -6
  94. package/lib/components/tabs/__internal__/tab-title/tab-title.style.js +5 -9
  95. package/lib/components/text-editor/__internal__/toolbar/toolbar-button/toolbar-button.style.js +2 -12
  96. package/lib/components/text-editor/text-editor.style.js +2 -6
  97. package/lib/components/tile-select/tile-select.style.js +2 -6
  98. package/lib/components/vertical-menu/vertical-menu.style.js +1 -7
  99. package/lib/style/design-tokens/carbon-scoped-tokens-provider/carbon-scoped-tokens-provider.component.d.ts +1 -2
  100. package/lib/style/design-tokens/carbon-scoped-tokens-provider/carbon-scoped-tokens-provider.component.js +1 -1
  101. package/lib/style/design-tokens/generate-css-variables.util.d.ts +1 -1
  102. package/lib/style/design-tokens/generate-css-variables.util.js +1 -6
  103. package/package.json +1 -1
@@ -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}
@@ -32,7 +32,6 @@ function adjustIconBgSize(fontSize, bgSize) {
32
32
  /* istanbul ignore next */
33
33
  return bgSize ? iconConfig.backgroundSize[bgSize] : undefined;
34
34
  }
35
- const oldFocusStyling = "outline: 2px solid var(--colorsSemanticFocus500);";
36
35
  const StyledIcon = styled.span`
37
36
  ${({
38
37
  theme,
@@ -132,7 +131,7 @@ const StyledIcon = styled.span`
132
131
 
133
132
  ${hasTooltip && `
134
133
  :focus {
135
- ${!theme.focusRedesignOptOut ? addFocusStyling() : oldFocusStyling}
134
+ ${addFocusStyling()}
136
135
  }
137
136
  `}
138
137
 
@@ -3,11 +3,6 @@ import { space } from "styled-system";
3
3
  import StyledIcon from "../icon/icon.style";
4
4
  import { baseTheme } from "../../style/themes";
5
5
  import addFocusStyling from "../../style/utils/add-focus-styling";
6
- const oldFocusStyling = `
7
- background-color: transparent;
8
- outline: solid 3px var(--colorsSemanticFocus500);
9
- z-index: 1;
10
- `;
11
6
  const StyledIconButton = styled.button.attrs({
12
7
  type: "button"
13
8
  })`
@@ -22,9 +17,7 @@ const StyledIconButton = styled.button.attrs({
22
17
  border-radius: var(--borderRadius050);
23
18
 
24
19
  &:focus {
25
- ${({
26
- theme
27
- }) => `${!theme.focusRedesignOptOut ? addFocusStyling() : /* istanbul ignore next */oldFocusStyling}`}
20
+ ${addFocusStyling()}
28
21
  }
29
22
 
30
23
  &:hover {
@@ -168,7 +168,7 @@ const StyledLink = styled.span`
168
168
  `}
169
169
  }
170
170
 
171
- ${!isSkipLink && !disabled && !theme.focusRedesignOptOut && hasFocus && css`
171
+ ${!isSkipLink && !disabled && hasFocus && css`
172
172
  > a,
173
173
  > button {
174
174
  outline: none;
@@ -2,10 +2,6 @@ import styled, { css } from "styled-components";
2
2
  import { StyledPreview, StyledPreviewPlaceholder } from "../preview/preview.style";
3
3
  import addFocusStyling from "../../style/utils/add-focus-styling";
4
4
  import baseTheme from "../../style/themes/base";
5
- const oldFocusStyling = `
6
- outline: solid 2px var(--colorsSemanticFocus500);
7
- outline-offset: -1px;
8
- `;
9
5
  const StyledLinkPreview = styled.a`
10
6
  display: flex;
11
7
  margin: 8px;
@@ -22,9 +18,7 @@ const StyledLinkPreview = styled.a`
22
18
 
23
19
  ${as !== "div" && css`
24
20
  :focus {
25
- ${({
26
- theme
27
- }) => `${!theme.focusRedesignOptOut ? addFocusStyling() : /* istanbul ignore next */oldFocusStyling}`}
21
+ ${addFocusStyling()}
28
22
  }
29
23
 
30
24
  :hover {
@@ -10,7 +10,7 @@ const loaderAnimation = keyframes`
10
10
  transform: scale(1);
11
11
  }
12
12
  `;
13
- const getDimensions = (size, roundedCornersOptOut) => {
13
+ const getDimensions = size => {
14
14
  let width;
15
15
  let marginRight;
16
16
  switch (size) {
@@ -30,7 +30,6 @@ const getDimensions = (size, roundedCornersOptOut) => {
30
30
  width: ${width};
31
31
  height: ${width};
32
32
  margin-right: ${marginRight};
33
- ${!roundedCornersOptOut && "border-radius: var(--borderRadiusCircle);"}
34
33
  `;
35
34
  };
36
35
  const StyledLoaderSquare = styled.div`
@@ -38,13 +37,13 @@ const StyledLoaderSquare = styled.div`
38
37
  size,
39
38
  isInsideButton,
40
39
  isActive,
41
- theme,
42
40
  backgroundColor
43
41
  }) => css`
44
42
  animation: ${loaderAnimation} 1s infinite ease-in-out both;
45
43
  background-color: ${backgroundColor};
46
44
  display: inline-block;
47
- ${getDimensions(size, theme.roundedCornersOptOut)}
45
+ ${getDimensions(size)}
46
+ border-radius: var(--borderRadiusCircle);
48
47
 
49
48
  ${isInsideButton && css`
50
49
  background-color: ${isActive ? "var(--colorsUtilityYang100)" : "var(--colorsSemanticNeutral500)"};
@@ -8,10 +8,6 @@ import StyledButton from "../../button/button.style";
8
8
  import menuConfigVariants from "../menu.config";
9
9
  import addFocusStyling from "../../../style/utils/add-focus-styling";
10
10
  import { StyledLink } from "../../link/link.style";
11
- const oldFocusStyling = `
12
- outline: solid 3px var(--colorsSemanticFocus500);
13
- box-shadow: none;
14
- `;
15
11
  const StyledMenuFullscreen = styled.div`
16
12
  position: fixed;
17
13
  top: 0;
@@ -68,8 +64,7 @@ const StyledMenuModal = styled.div`
68
64
  }
69
65
 
70
66
  ${({
71
- menuType,
72
- theme
67
+ menuType
73
68
  }) => css`
74
69
  background-color: ${menuConfigVariants[menuType].background};
75
70
 
@@ -89,7 +84,7 @@ const StyledMenuModal = styled.div`
89
84
  border-bottom-right-radius: var(--borderRadius050);
90
85
  border-top-right-radius: var(--borderRadius050);
91
86
 
92
- ${!theme.focusRedesignOptOut ? addFocusStyling() : /* istanbul ignore next */oldFocusStyling}
87
+ ${addFocusStyling()}
93
88
  }
94
89
  }
95
90
  }
@@ -74,9 +74,6 @@ const parsePadding = props => {
74
74
  };
75
75
  }
76
76
  };
77
- const oldFocusStyling = `
78
- box-shadow: inset 0 0 0 var(--borderWidth300) var(--colorsSemanticFocus500);
79
- `;
80
77
  const StyledMenuItemWrapper = styled.a.attrs({
81
78
  as: Link
82
79
  })`
@@ -115,10 +112,7 @@ const StyledMenuItemWrapper = styled.a.attrs({
115
112
 
116
113
  a:focus,
117
114
  button:focus {
118
- ${({
119
- theme
120
- }) => `${!theme.focusRedesignOptOut ? addFocusStyling(true) : /* istanbul ignore next */oldFocusStyling}
121
- `}
115
+ ${addFocusStyling(true)}
122
116
  }
123
117
 
124
118
  :has([data-element="input"]) ${StyledContent} {
@@ -33,10 +33,7 @@ const StyledMultiActionButton = styled.div`
33
33
 
34
34
  &:focus {
35
35
  background-color: var(--colorsActionMajor700);
36
- border: 3px solid
37
- ${({
38
- theme
39
- }) => !theme.focusRedesignOptOut ? "var(--colorsActionMajor700)" : /* istanbul ignore next */"var(--colorsSemanticFocus500)"};
36
+ border: 3px solid var(--colorsActionMajor700);
40
37
  outline: none;
41
38
  margin: 0 -1px;
42
39
 
@@ -58,12 +55,6 @@ const StyledMultiActionButton = styled.div`
58
55
  }
59
56
 
60
57
  &:focus {
61
- ${({
62
- theme
63
- }) => /* istanbul ignore next */
64
- theme.focusRedesignOptOut && css`
65
- border-color: var(--colorsSemanticFocus500);
66
- `}
67
58
  margin: 0 -1px;
68
59
  }
69
60
  `}
@@ -58,9 +58,7 @@ const StyledPill = styled.span`
58
58
  align-items: center;
59
59
  justify-content: center;
60
60
  border: 2px solid ${pillColor};
61
- ${!theme.roundedCornersOptOut && css`
62
- border-radius: var(--borderRadius025);
63
- `}
61
+ border-radius: var(--borderRadius025);
64
62
  height: auto;
65
63
 
66
64
  ${!wrapText && css`
@@ -87,10 +85,6 @@ const StyledPill = styled.span`
87
85
  line-height: 16px;
88
86
  font-size: 12px;
89
87
  padding: 0 8px;
90
-
91
- ${theme.roundedCornersOptOut && css`
92
- border-radius: 12px;
93
- `}
94
88
  `}
95
89
 
96
90
  ${size === "M" && css`
@@ -98,10 +92,6 @@ const StyledPill = styled.span`
98
92
  line-height: 20px;
99
93
  font-size: 14px;
100
94
  padding: 0 8px;
101
-
102
- ${theme.roundedCornersOptOut && css`
103
- border-radius: 12px;
104
- `}
105
95
  `}
106
96
 
107
97
  ${size === "L" && css`
@@ -109,10 +99,6 @@ const StyledPill = styled.span`
109
99
  line-height: 24px;
110
100
  font-size: 14px;
111
101
  padding: 0 8px;
112
-
113
- ${theme.roundedCornersOptOut && css`
114
- border-radius: 13px;
115
- `}
116
102
  `}
117
103
 
118
104
  ${size === "XL" && css`
@@ -120,18 +106,12 @@ const StyledPill = styled.span`
120
106
  line-height: 28px;
121
107
  font-size: 16px;
122
108
  padding: 0 12px;
123
-
124
- ${theme.roundedCornersOptOut && css`
125
- border-radius: 15px;
126
- `}
127
109
  `}
128
110
 
129
111
  ${isDeletable && css`
130
112
  ${StyledIconButton} {
131
113
  -webkit-appearance: none;
132
- ${!theme.roundedCornersOptOut && css`
133
- border-radius: var(--borderRadius000);
134
- `}
114
+ border-radius: var(--borderRadius000);
135
115
  border: none;
136
116
  bottom: 0;
137
117
  font-size: 100%;
@@ -143,18 +123,9 @@ const StyledPill = styled.span`
143
123
  line-height: 16px;
144
124
 
145
125
  &:focus {
146
- ${theme.focusRedesignOptOut && /* istanbul ignore next */
147
- css`
148
- outline: none;
149
- box-shadow: 0 0 0 3px var(--colorsSemanticFocus500);
150
- `}
151
-
152
126
  background-color: ${buttonFocusColor};
153
- ${!theme.roundedCornersOptOut && css`
154
- border-radius: var(--borderRadius000) var(--borderRadius025)
155
- var(--borderRadius025) var(--borderRadius000);
156
- `}
157
-
127
+ border-radius: var(--borderRadius000) var(--borderRadius025)
128
+ var(--borderRadius025) var(--borderRadius000);
158
129
  ::-moz-focus-inner {
159
130
  border: 0;
160
131
  }
@@ -198,10 +169,6 @@ const StyledPill = styled.span`
198
169
  font-size: 16px;
199
170
  }
200
171
  }
201
-
202
- ${theme.roundedCornersOptOut && css`
203
- border-radius: 0 10px 10px 0;
204
- `}
205
172
  }
206
173
  `}
207
174
 
@@ -212,10 +179,6 @@ const StyledPill = styled.span`
212
179
  width: 24px;
213
180
  padding: 0;
214
181
  line-height: 15px;
215
-
216
- ${theme.roundedCornersOptOut && css`
217
- border-radius: 0 10px 10px 0;
218
- `}
219
182
  }
220
183
  `}
221
184
 
@@ -226,10 +189,6 @@ const StyledPill = styled.span`
226
189
  width: 28px;
227
190
  padding: 0;
228
191
  line-height: 16px;
229
-
230
- ${theme.roundedCornersOptOut && css`
231
- border-radius: 0 11px 11px 0;
232
- `}
233
192
  }
234
193
  `}
235
194
 
@@ -240,10 +199,6 @@ const StyledPill = styled.span`
240
199
  width: 32px;
241
200
  padding: 0;
242
201
  line-height: 18px;
243
-
244
- ${theme.roundedCornersOptOut && css`
245
- border-radius: 0 12px 12px 0;
246
- `}
247
202
  }
248
203
  `}
249
204
  `}
@@ -1,5 +1,5 @@
1
1
  function _extends() { return _extends = Object.assign ? Object.assign.bind() : function (n) { for (var e = 1; e < arguments.length; e++) { var t = arguments[e]; for (var r in t) ({}).hasOwnProperty.call(t, r) && (n[r] = t[r]); } return n; }, _extends.apply(null, arguments); }
2
- import React, { useEffect, useState, useContext } from "react";
2
+ import React, { useEffect, useState } from "react";
3
3
  import PropTypes from "prop-types";
4
4
  import MD5 from "crypto-js/md5";
5
5
  import invariant from "invariant";
@@ -9,7 +9,6 @@ import tagComponent from "../../__internal__/utils/helpers/tags/tags";
9
9
  import { PORTRAIT_SIZE_PARAMS } from "./portrait.config";
10
10
  import { StyledCustomImg, StyledIcon, StyledPortraitContainer, StyledPortraitInitials, StyledPortraitGravatar } from "./portrait.style";
11
11
  import { filterStyledSystemMarginProps } from "../../style/utils";
12
- import RoundedCornersOptOutContext from "../carbon-provider/__internal__/new-validation.context";
13
12
  let deprecatedGravatarWarnTriggered = false;
14
13
  const Portrait = ({
15
14
  alt,
@@ -18,7 +17,7 @@ const Portrait = ({
18
17
  gravatar = "",
19
18
  iconType = "individual",
20
19
  initials,
21
- shape,
20
+ shape = "circle",
22
21
  size = "M",
23
22
  src,
24
23
  onClick,
@@ -33,10 +32,6 @@ const Portrait = ({
33
32
  ...rest
34
33
  }) => {
35
34
  const [externalError, setExternalError] = useState(false);
36
- const {
37
- roundedCornersOptOut
38
- } = useContext(RoundedCornersOptOutContext);
39
- const defaultShape = roundedCornersOptOut ? "square" : "circle";
40
35
  !!(src && gravatar) ? process.env.NODE_ENV !== "production" ? invariant(false, "The `src` prop cannot be used in conjunction with the `gravatar` prop." + " Please use one or the other.") : invariant(false) : void 0;
41
36
  const logGravatarDeprecationWarning = () => {
42
37
  deprecatedGravatarWarnTriggered = true;
@@ -99,7 +94,7 @@ const Portrait = ({
99
94
  }, tagProps, {
100
95
  darkBackground: darkBackground,
101
96
  size: size,
102
- shape: shape || defaultShape
97
+ shape: shape
103
98
  }), portrait));
104
99
  }
105
100
  return /*#__PURE__*/React.createElement(StyledPortraitContainer, _extends({}, filterStyledSystemMarginProps(rest), {
@@ -107,7 +102,7 @@ const Portrait = ({
107
102
  }, tagProps, {
108
103
  darkBackground: darkBackground,
109
104
  size: size,
110
- shape: shape || defaultShape
105
+ shape: shape
111
106
  }), portrait);
112
107
  };
113
108
  return renderComponent();
@@ -47,8 +47,7 @@ const StyledProgressTracker = styled.div`
47
47
  const StyledProgressBar = styled.span`
48
48
  ${({
49
49
  progress,
50
- error,
51
- theme
50
+ error
52
51
  }) => css`
53
52
  display: flex;
54
53
  position: relative;
@@ -57,7 +56,7 @@ const StyledProgressBar = styled.span`
57
56
  progress,
58
57
  error
59
58
  })};
60
- border-radius: ${theme.roundedCornersOptOut ? "25px" : "var(--borderRadius400)"};
59
+ border-radius: var(--borderRadius400);
61
60
  overflow-x: hidden;
62
61
  width: 100%
63
62
  min-height: fit-content;
@@ -108,8 +107,7 @@ const InnerBar = styled.span`
108
107
  ${({
109
108
  progress,
110
109
  size,
111
- error,
112
- theme
110
+ error
113
111
  }) => css`
114
112
  position: relative;
115
113
  left: 0;
@@ -117,7 +115,7 @@ const InnerBar = styled.span`
117
115
  progress,
118
116
  error
119
117
  })};
120
- border-radius: ${theme.roundedCornersOptOut ? "25px" : "var(--borderRadius400)"};
118
+ border-radius: var(--borderRadius400);
121
119
  width: ${progress}%;
122
120
  min-width: 2px;
123
121
  height: ${getHeight(size)};
@@ -14,10 +14,6 @@ export const StyledSimpleColor = styled.div`
14
14
  cursor: pointer;
15
15
  }
16
16
  `;
17
- const oldFocusStyling = `
18
- box-shadow: inset 0px 0px 0px var(--borderWidth200) var(--colorsUtilityYang100);
19
- border: 2px solid var(--colorsSemanticFocus500);
20
- `;
21
17
  export const StyledColorSampleBox = styled.div`
22
18
  height: 100%;
23
19
  width: 100%;
@@ -25,10 +21,6 @@ export const StyledColorSampleBox = styled.div`
25
21
  display: flex;
26
22
  align-items: center;
27
23
  justify-content: center;
28
- ${({
29
- theme
30
- }) => /* istanbul ignore next */
31
- theme.focusRedesignOptOut && "border: 2px solid transparent;"}
32
24
 
33
25
  ${({
34
26
  color
@@ -61,18 +53,7 @@ export const StyledSimpleColorInput = styled(Input)`
61
53
  }
62
54
 
63
55
  &:focus + ${StyledColorSampleBox} {
64
- ${({
65
- theme
66
- }) => css`
67
- ${theme.focusRedesignOptOut && /* istanbul ignore next */
68
- `
69
- ${oldFocusStyling}
70
- `}
71
-
72
- ${!theme.focusRedesignOptOut && `
73
- ${addFocusStyling(true)}
74
- `}
75
- `}
56
+ ${addFocusStyling(true)}
76
57
  }
77
58
  `;
78
59
  const getIconColor = color => {
@@ -12,8 +12,7 @@ const StyledSplitButtonToggle = styled(StyledButton)`
12
12
  buttonType,
13
13
  disabled,
14
14
  displayed,
15
- size,
16
- theme
15
+ size
17
16
  }) => css`
18
17
  border-top-left-radius: var(--borderRadius000);
19
18
  border-bottom-left-radius: var(--borderRadius000);
@@ -49,14 +48,6 @@ const StyledSplitButtonToggle = styled(StyledButton)`
49
48
 
50
49
  ${StyledButton} + & {
51
50
  margin-left: 0;
52
-
53
- ${buttonType === "secondary" && /* istanbul ignore next */
54
- theme.focusRedesignOptOut && /* istanbul ignore next */
55
- css`
56
- &:focus {
57
- margin-left: -3px;
58
- }
59
- `}
60
51
  }
61
52
 
62
53
  ${StyledButton} + & ${StyledIcon} {
@@ -1,4 +1,4 @@
1
- import styled, { css } from "styled-components";
1
+ import styled from "styled-components";
2
2
  import { margin } from "styled-system";
3
3
  import StyledButton from "../button/button.style";
4
4
  import baseTheme from "../../style/themes/base";
@@ -15,21 +15,8 @@ const StyledSplitButton = styled.div`
15
15
  & > ${StyledButton} {
16
16
  margin: 0;
17
17
  &:focus {
18
- ${({
19
- theme
20
- }) => css`
21
- ${theme.focusRedesignOptOut && /* istanbul ignore next */
22
- `
23
- border: 3px solid var(--colorsSemanticFocus500);
24
- margin: -1px;
25
- outline: none;
26
- `}
27
-
28
- ${!theme.focusRedesignOptOut && `
29
- position: relative;
30
- z-index: 1;
31
- `}
32
- `}
18
+ position: relative;
19
+ z-index: 1;
33
20
  }
34
21
  }
35
22
  `;
@@ -1,11 +1,9 @@
1
- import { ThemeObject } from "../../../style/themes/base";
2
1
  import { SwitchSliderProps } from "./switch-slider.component";
3
2
  interface StyledSwitchSliderProps extends Pick<SwitchSliderProps, "checked" | "disabled" | "size" | "error" | "warning"> {
4
3
  isLoading?: boolean;
5
- theme?: Partial<ThemeObject>;
6
4
  isDarkBackground?: boolean;
7
5
  }
8
- declare const StyledSwitchSlider: import("styled-components").StyledComponent<"div", any, {}, never>;
6
+ declare const StyledSwitchSlider: import("styled-components").StyledComponent<"div", any, StyledSwitchSliderProps, never>;
9
7
  declare const HiddenContent: import("styled-components").StyledComponent<"div", any, Pick<StyledSwitchSliderProps, "size">, never>;
10
8
  export { StyledSwitchSlider, HiddenContent };
11
9
  export default StyledSwitchSlider;
@@ -1,6 +1,5 @@
1
1
  import styled, { css } from "styled-components";
2
2
  import StyledValidationIcon from "../../../__internal__/validations/validation-icon.style";
3
- import baseTheme from "../../../style/themes/base";
4
3
  import SwitchSliderPanel from "./switch-slider-panel.style";
5
4
  const StyledSwitchSlider = styled.div`
6
5
  ${({
@@ -10,7 +9,6 @@ const StyledSwitchSlider = styled.div`
10
9
  size,
11
10
  error,
12
11
  warning,
13
- theme,
14
12
  isDarkBackground
15
13
  }) => css`
16
14
  display: flex;
@@ -24,7 +22,7 @@ const StyledSwitchSlider = styled.div`
24
22
  top: 0;
25
23
  width: 100%
26
24
  z-index: 2;
27
- border-radius: ${theme?.roundedCornersOptOut ? "90px" : "var(--borderRadius400)"};
25
+ border-radius: var(--borderRadius400);
28
26
  border-style: solid;
29
27
  border-color: ${isDarkBackground ? "var(--colorsUtilityYang100)" : "var(--colorsActionMinor400)"};
30
28
  border-width: var(--borderWidth200);
@@ -83,10 +81,6 @@ const StyledSwitchSlider = styled.div`
83
81
  `}
84
82
  `}
85
83
 
86
- ${size === "large" && css`
87
- ${theme?.roundedCornersOptOut ? "border-radius: 30px;" : ""}
88
- `}
89
-
90
84
  ${isLoading && css`
91
85
  &::before {
92
86
  display: none;
@@ -117,8 +111,5 @@ const HiddenContent = styled.div`
117
111
  padding-left: ${size === "large" ? "var(--spacing700)" : "var(--spacing500)"};
118
112
  `}
119
113
  `;
120
- StyledSwitchSlider.defaultProps = {
121
- theme: baseTheme
122
- };
123
114
  export { StyledSwitchSlider, HiddenContent };
124
115
  export default StyledSwitchSlider;
@@ -9,9 +9,6 @@ import StyledValidationIcon from "../../__internal__/validations/validation-icon
9
9
  import baseTheme from "../../style/themes/base";
10
10
  import addFocusStyling from "../../style/utils/add-focus-styling";
11
11
  import StyledSwitchSlider from "./__internal__/switch-slider.style";
12
- const oldFocusStyling = `
13
- outline: solid 3px var(--colorsSemanticFocus500);
14
- `;
15
12
  export const ErrorBorder = styled.span`
16
13
  ${({
17
14
  reverse,
@@ -47,8 +44,7 @@ const StyledSwitch = styled.div`
47
44
  fieldHelpInline,
48
45
  labelInline,
49
46
  reverse,
50
- size,
51
- theme
47
+ size
52
48
  }) => css`
53
49
  ${margin}
54
50
  ${FieldLineStyle} {
@@ -82,7 +78,7 @@ const StyledSwitch = styled.div`
82
78
 
83
79
  ${HiddenCheckableInputStyle}:not([disabled]) {
84
80
  &:focus ~ ${StyledSwitchSlider} {
85
- ${!theme.focusRedesignOptOut ? addFocusStyling() : /* istanbul ignore next */oldFocusStyling}
81
+ ${addFocusStyling()}
86
82
  }
87
83
  }
88
84
 
@@ -326,12 +326,8 @@ const tabTitleStyles = css`
326
326
  cursor: default;
327
327
  }
328
328
  `}
329
-
330
- ${({
331
- theme
332
- }) => `
333
329
  &:focus {
334
- outline: 4px solid ${!theme.focusRedesignOptOut ? "black" : /* istanbul ignore next */"var(--colorsSemanticFocus500)"};
330
+ outline: 4px solid black;
335
331
  top: -2px;
336
332
  z-index: 6;
337
333
 
@@ -347,7 +343,7 @@ const tabTitleStyles = css`
347
343
  border-bottom-left-radius: var(--borderRadius100);
348
344
  `}
349
345
 
350
- ${!theme.focusRedesignOptOut ? `::before {
346
+ ::before {
351
347
  content: "";
352
348
  position: absolute;
353
349
  top: 0;
@@ -376,10 +372,10 @@ const tabTitleStyles = css`
376
372
  bottom: 2px;
377
373
  right: 1px;
378
374
  `}
379
- }` : /* istanbul ignore next */""}
375
+ }
376
+ }
380
377
  }
381
- `}
382
-
378
+
383
379
  ${position === "left" && css`
384
380
  background-color: transparent;
385
381
  border-bottom: 0px;