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
@@ -169,9 +169,6 @@ const StyledDrawerContent = exports.StyledDrawerContent = _styledComponents.defa
169
169
  }
170
170
  }
171
171
  `;
172
- const oldFocusStyling = `
173
- outline: solid 3px var(--colorsSemanticFocus500);
174
- `;
175
172
  const StyledSidebarToggleButton = exports.StyledSidebarToggleButton = _styledComponents.default.button.attrs({
176
173
  type: "button"
177
174
  })`
@@ -195,13 +192,9 @@ const StyledSidebarToggleButton = exports.StyledSidebarToggleButton = _styledCom
195
192
  animation: ${buttonClose} ${animationDuration} ease-in-out;
196
193
  border-radius: var(--borderRadius050);
197
194
 
198
- ${({
199
- theme
200
- }) => `
201
- &:focus {
202
- ${!theme.focusRedesignOptOut ? (0, _addFocusStyling.default)() : /* istanbul ignore next */oldFocusStyling}
203
- }
204
- `}
195
+ &:focus {
196
+ ${(0, _addFocusStyling.default)()}
197
+ }
205
198
 
206
199
  &:hover {
207
200
  cursor: pointer;
@@ -21,13 +21,6 @@ const horizontalBorderSizes = {
21
21
  medium: "2px",
22
22
  large: "4px"
23
23
  };
24
- const oldFocusStyling = `
25
- border: 2px solid var(--colorsSemanticFocus500);
26
- `;
27
- const firstColumnOldFocusStyling = `
28
- outline: 2px solid var(--colorsSemanticFocus500);
29
- outline-offset: -1px;
30
- `;
31
24
  const newFocusStyling = theme => {
32
25
  return `
33
26
  ${(0, _addFocusStyling.default)(true)}
@@ -48,11 +41,7 @@ themeOptOut && /* istanbul ignore next */
48
41
  border-right: 2px solid var(--colorsSemanticFocus500);
49
42
  }
50
43
  `;
51
- const stickyColumnFocusStyling = theme => {
52
- /* istanbul ignore else */
53
- if (!theme.focusRedesignOptOut) return ``;
54
- /* istanbul ignore next */
55
- return `
44
+ const stickyColumnFocusStyling = theme => `
56
45
  width: calc(100% + 1px);
57
46
  z-index: ${theme.zIndex.overlay};
58
47
  :before {
@@ -69,7 +58,6 @@ const stickyColumnFocusStyling = theme => {
69
58
  }
70
59
  }
71
60
  `;
72
- };
73
61
  const borderColor = colorTheme => {
74
62
  switch (colorTheme) {
75
63
  case "light":
@@ -212,7 +200,7 @@ const StyledFlatTableRow = _styledComponents.default.tr`
212
200
  right: 0px;
213
201
  top: 0;
214
202
  bottom: 0px;
215
- ${!theme.focusRedesignOptOut ? newFocusStyling(theme) : /* istanbul ignore next */oldFocusStyling}
203
+ ${newFocusStyling(theme)}
216
204
  pointer-events: none;
217
205
  }
218
206
 
@@ -231,37 +219,12 @@ const StyledFlatTableRow = _styledComponents.default.tr`
231
219
 
232
220
  /* Styling for safari. Position relative does not work on tr elements on Safari */
233
221
  ${(0, _browserTypeCheck.isSafari)(navigator) && (0, _styledComponents.css)`
234
- ${theme.focusRedesignOptOut && /* istanbul ignore next */
235
- (0, _styledComponents.css)`
236
- outline: 2px solid var(--colorsSemanticFocus500);
237
- outline-offset: -2px;
238
- position: static;
239
-
240
- :after {
241
- content: none;
242
- border: none;
243
- }
244
- `}
245
- ${!theme.focusRedesignOptOut && /* istanbul ignore next */
246
- (0, _styledComponents.css)`
247
- position: -webkit-sticky;
248
- :after {
249
- border: none;
250
- content: "";
251
- height: ${rowHeight}px;
252
- ${newFocusStyling(theme)}
253
- }
254
- `}
255
- `}
256
-
257
- ${theme.focusRedesignOptOut && /* istanbul ignore next */
258
- (0, _styledComponents.css)`
259
- td:first-of-type:not(:nth-child(${lhsRowHeaderIndex + 2}))::before {
260
- border-left: 3px solid var(--colorsSemanticFocus500);
261
- }
262
-
263
- td:last-of-type:not(:nth-child(${rhsRowHeaderIndex})) {
264
- border-right: 2px solid var(--colorsSemanticFocus500);
222
+ position: -webkit-sticky;
223
+ :after {
224
+ border: none;
225
+ content: "";
226
+ height: ${rowHeight}px;
227
+ ${newFocusStyling(theme)}
265
228
  }
266
229
  `}
267
230
 
@@ -297,7 +260,7 @@ const StyledFlatTableRow = _styledComponents.default.tr`
297
260
  cursor: pointer;
298
261
 
299
262
  :focus {
300
- ${!theme.focusRedesignOptOut ? newFocusStyling(theme) : /* istanbul ignore next */firstColumnOldFocusStyling}
263
+ ${newFocusStyling(theme)}
301
264
  }
302
265
 
303
266
  :hover {
@@ -22,9 +22,6 @@ function _interopRequireWildcard(e, r) { if (!r && e && e.__esModule) return e;
22
22
  const HEADER_OVERLAY_INCREMENT = 3;
23
23
  const STICKY_FOOTER_OVERLAY_INCREMENT = 1;
24
24
  const ROW_HEADER_OVERLAY_INCREMENT = 5;
25
- const oldFocusStyling = `
26
- outline: 2px solid var(--colorsSemanticFocus500);
27
- `;
28
25
  const StyledTableContainer = exports.StyledTableContainer = _styledComponents.default.div`
29
26
  ${({
30
27
  width,
@@ -134,22 +131,15 @@ const StyledFlatTableWrapper = exports.StyledFlatTableWrapper = (0, _styledCompo
134
131
 
135
132
  ${({
136
133
  isInSidebar,
137
- theme,
138
134
  isFocused
139
135
  }) => (0, _styledComponents.css)`
140
136
  box-sizing: border-box;
141
137
 
142
- /* istanbul ignore next */
143
- ${theme.focusRedesignOptOut && isFocused && /* istanbul ignore next */
144
- (0, _styledComponents.css)`
145
- ${oldFocusStyling}
146
- `}
147
-
148
- ${!theme.focusRedesignOptOut && isFocused && (0, _styledComponents.css)`
138
+ ${isFocused && (0, _styledComponents.css)`
149
139
  ${(0, _addFocusStyling.default)()}
150
140
  `}
151
141
 
152
- ${isInSidebar ? "min-width: fit-content;" : ""}
142
+ ${isInSidebar ? "min-width: fit-content;" : ""}
153
143
  `}
154
144
 
155
145
  ${({
@@ -9,9 +9,6 @@ var _icon = _interopRequireDefault(require("../../icon"));
9
9
  var _addFocusStyling = _interopRequireDefault(require("../../../style/utils/add-focus-styling"));
10
10
  var _base = _interopRequireDefault(require("../../../style/themes/base"));
11
11
  function _interopRequireDefault(e) { return e && e.__esModule ? e : { default: e }; }
12
- const oldFocusStyling = `
13
- outline: solid 1px var(--colorsSemanticFocus500);
14
- `;
15
12
  const StyledSort = exports.StyledSort = _styledComponents.default.div`
16
13
  display: inline-flex;
17
14
  align-items: center;
@@ -26,9 +23,7 @@ const StyledSort = exports.StyledSort = _styledComponents.default.div`
26
23
  }
27
24
 
28
25
  :focus {
29
- ${({
30
- theme
31
- }) => `${!theme.focusRedesignOptOut ? (0, _addFocusStyling.default)() : /* istanbul ignore next */oldFocusStyling}`}
26
+ ${(0, _addFocusStyling.default)()}
32
27
  border-radius: var(--borderRadius025);
33
28
  }
34
29
  `;
@@ -28,7 +28,6 @@ const StyledHeaderContent = exports.StyledHeaderContent = _styledComponents.defa
28
28
  display: inline-flex;
29
29
  align-items: flex-end;
30
30
  `;
31
- const oldFocusStyling = "outline: 3px solid var(--colorsSemanticFocus500);";
32
31
  const StyledHeader = exports.StyledHeader = _styledComponents.default.div`
33
32
  ${({
34
33
  divider,
@@ -65,9 +64,7 @@ const StyledHeadingBackButton = exports.StyledHeadingBackButton = (0, _styledCom
65
64
 
66
65
  &:focus {
67
66
  background-color: transparent;
68
- ${({
69
- theme
70
- }) => !theme.focusRedesignOptOut ? (0, _addFocusStyling.default)() : oldFocusStyling}
67
+ ${(0, _addFocusStyling.default)()}
71
68
  }
72
69
 
73
70
  &:hover {
@@ -12,9 +12,6 @@ var _addFocusStyling = _interopRequireDefault(require("../../style/utils/add-foc
12
12
  function _interopRequireDefault(e) { return e && e.__esModule ? e : { default: e }; }
13
13
  function _getRequireWildcardCache(e) { if ("function" != typeof WeakMap) return null; var r = new WeakMap(), t = new WeakMap(); return (_getRequireWildcardCache = function (e) { return e ? t : r; })(e); }
14
14
  function _interopRequireWildcard(e, r) { if (!r && e && e.__esModule) return e; if (null === e || "object" != typeof e && "function" != typeof e) return { default: e }; var t = _getRequireWildcardCache(r); if (t && t.has(e)) return t.get(e); var n = { __proto__: null }, a = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var u in e) if ("default" !== u && {}.hasOwnProperty.call(e, u)) { var i = a ? Object.getOwnPropertyDescriptor(e, u) : null; i && (i.get || i.set) ? Object.defineProperty(n, u, i) : n[u] = e[u]; } return n.default = e, t && t.set(e, n), n; }
15
- const oldFocusStyling = `
16
- outline: solid 2px var(--colorsSemanticFocus500);
17
- `;
18
15
  const StyledHelp = _styledComponents.default.div`
19
16
  background: none;
20
17
  cursor: default;
@@ -46,9 +43,7 @@ const StyledHelp = _styledComponents.default.div`
46
43
 
47
44
  &:focus ${_icon.default} {
48
45
  border-radius: var(--borderRadius050);
49
- ${({
50
- theme
51
- }) => `${!theme.focusRedesignOptOut ? (0, _addFocusStyling.default)() : /* istanbul ignore next */oldFocusStyling}`}
46
+ ${(0, _addFocusStyling.default)()}
52
47
  }
53
48
 
54
49
  ${_styledSystem.margin}
@@ -41,7 +41,6 @@ function adjustIconBgSize(fontSize, bgSize) {
41
41
  /* istanbul ignore next */
42
42
  return bgSize ? _iconConfig.default.backgroundSize[bgSize] : undefined;
43
43
  }
44
- const oldFocusStyling = "outline: 2px solid var(--colorsSemanticFocus500);";
45
44
  const StyledIcon = _styledComponents.default.span`
46
45
  ${({
47
46
  theme,
@@ -141,7 +140,7 @@ const StyledIcon = _styledComponents.default.span`
141
140
 
142
141
  ${hasTooltip && `
143
142
  :focus {
144
- ${!theme.focusRedesignOptOut ? (0, _addFocusStyling.default)() : oldFocusStyling}
143
+ ${(0, _addFocusStyling.default)()}
145
144
  }
146
145
  `}
147
146
 
@@ -12,11 +12,6 @@ var _addFocusStyling = _interopRequireDefault(require("../../style/utils/add-foc
12
12
  function _interopRequireDefault(e) { return e && e.__esModule ? e : { default: e }; }
13
13
  function _getRequireWildcardCache(e) { if ("function" != typeof WeakMap) return null; var r = new WeakMap(), t = new WeakMap(); return (_getRequireWildcardCache = function (e) { return e ? t : r; })(e); }
14
14
  function _interopRequireWildcard(e, r) { if (!r && e && e.__esModule) return e; if (null === e || "object" != typeof e && "function" != typeof e) return { default: e }; var t = _getRequireWildcardCache(r); if (t && t.has(e)) return t.get(e); var n = { __proto__: null }, a = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var u in e) if ("default" !== u && {}.hasOwnProperty.call(e, u)) { var i = a ? Object.getOwnPropertyDescriptor(e, u) : null; i && (i.get || i.set) ? Object.defineProperty(n, u, i) : n[u] = e[u]; } return n.default = e, t && t.set(e, n), n; }
15
- const oldFocusStyling = `
16
- background-color: transparent;
17
- outline: solid 3px var(--colorsSemanticFocus500);
18
- z-index: 1;
19
- `;
20
15
  const StyledIconButton = _styledComponents.default.button.attrs({
21
16
  type: "button"
22
17
  })`
@@ -31,9 +26,7 @@ const StyledIconButton = _styledComponents.default.button.attrs({
31
26
  border-radius: var(--borderRadius050);
32
27
 
33
28
  &:focus {
34
- ${({
35
- theme
36
- }) => `${!theme.focusRedesignOptOut ? (0, _addFocusStyling.default)() : /* istanbul ignore next */oldFocusStyling}`}
29
+ ${(0, _addFocusStyling.default)()}
37
30
  }
38
31
 
39
32
  &:hover {
@@ -177,7 +177,7 @@ const StyledLink = exports.StyledLink = _styledComponents.default.span`
177
177
  `}
178
178
  }
179
179
 
180
- ${!isSkipLink && !disabled && !theme.focusRedesignOptOut && hasFocus && (0, _styledComponents.css)`
180
+ ${!isSkipLink && !disabled && hasFocus && (0, _styledComponents.css)`
181
181
  > a,
182
182
  > button {
183
183
  outline: none;
@@ -11,10 +11,6 @@ var _base = _interopRequireDefault(require("../../style/themes/base"));
11
11
  function _interopRequireDefault(e) { return e && e.__esModule ? e : { default: e }; }
12
12
  function _getRequireWildcardCache(e) { if ("function" != typeof WeakMap) return null; var r = new WeakMap(), t = new WeakMap(); return (_getRequireWildcardCache = function (e) { return e ? t : r; })(e); }
13
13
  function _interopRequireWildcard(e, r) { if (!r && e && e.__esModule) return e; if (null === e || "object" != typeof e && "function" != typeof e) return { default: e }; var t = _getRequireWildcardCache(r); if (t && t.has(e)) return t.get(e); var n = { __proto__: null }, a = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var u in e) if ("default" !== u && {}.hasOwnProperty.call(e, u)) { var i = a ? Object.getOwnPropertyDescriptor(e, u) : null; i && (i.get || i.set) ? Object.defineProperty(n, u, i) : n[u] = e[u]; } return n.default = e, t && t.set(e, n), n; }
14
- const oldFocusStyling = `
15
- outline: solid 2px var(--colorsSemanticFocus500);
16
- outline-offset: -1px;
17
- `;
18
14
  const StyledLinkPreview = exports.StyledLinkPreview = _styledComponents.default.a`
19
15
  display: flex;
20
16
  margin: 8px;
@@ -31,9 +27,7 @@ const StyledLinkPreview = exports.StyledLinkPreview = _styledComponents.default.
31
27
 
32
28
  ${as !== "div" && (0, _styledComponents.css)`
33
29
  :focus {
34
- ${({
35
- theme
36
- }) => `${!theme.focusRedesignOptOut ? (0, _addFocusStyling.default)() : /* istanbul ignore next */oldFocusStyling}`}
30
+ ${(0, _addFocusStyling.default)()}
37
31
  }
38
32
 
39
33
  :hover {
@@ -19,7 +19,7 @@ const loaderAnimation = (0, _styledComponents.keyframes)`
19
19
  transform: scale(1);
20
20
  }
21
21
  `;
22
- const getDimensions = (size, roundedCornersOptOut) => {
22
+ const getDimensions = size => {
23
23
  let width;
24
24
  let marginRight;
25
25
  switch (size) {
@@ -39,7 +39,6 @@ const getDimensions = (size, roundedCornersOptOut) => {
39
39
  width: ${width};
40
40
  height: ${width};
41
41
  margin-right: ${marginRight};
42
- ${!roundedCornersOptOut && "border-radius: var(--borderRadiusCircle);"}
43
42
  `;
44
43
  };
45
44
  const StyledLoaderSquare = _styledComponents.default.div`
@@ -47,13 +46,13 @@ const StyledLoaderSquare = _styledComponents.default.div`
47
46
  size,
48
47
  isInsideButton,
49
48
  isActive,
50
- theme,
51
49
  backgroundColor
52
50
  }) => (0, _styledComponents.css)`
53
51
  animation: ${loaderAnimation} 1s infinite ease-in-out both;
54
52
  background-color: ${backgroundColor};
55
53
  display: inline-block;
56
- ${getDimensions(size, theme.roundedCornersOptOut)}
54
+ ${getDimensions(size)}
55
+ border-radius: var(--borderRadiusCircle);
57
56
 
58
57
  ${isInsideButton && (0, _styledComponents.css)`
59
58
  background-color: ${isActive ? "var(--colorsUtilityYang100)" : "var(--colorsSemanticNeutral500)"};
@@ -17,10 +17,6 @@ var _link = require("../../link/link.style");
17
17
  function _interopRequireDefault(e) { return e && e.__esModule ? e : { default: e }; }
18
18
  function _getRequireWildcardCache(e) { if ("function" != typeof WeakMap) return null; var r = new WeakMap(), t = new WeakMap(); return (_getRequireWildcardCache = function (e) { return e ? t : r; })(e); }
19
19
  function _interopRequireWildcard(e, r) { if (!r && e && e.__esModule) return e; if (null === e || "object" != typeof e && "function" != typeof e) return { default: e }; var t = _getRequireWildcardCache(r); if (t && t.has(e)) return t.get(e); var n = { __proto__: null }, a = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var u in e) if ("default" !== u && {}.hasOwnProperty.call(e, u)) { var i = a ? Object.getOwnPropertyDescriptor(e, u) : null; i && (i.get || i.set) ? Object.defineProperty(n, u, i) : n[u] = e[u]; } return n.default = e, t && t.set(e, n), n; }
20
- const oldFocusStyling = `
21
- outline: solid 3px var(--colorsSemanticFocus500);
22
- box-shadow: none;
23
- `;
24
20
  const StyledMenuFullscreen = exports.StyledMenuFullscreen = _styledComponents.default.div`
25
21
  position: fixed;
26
22
  top: 0;
@@ -77,8 +73,7 @@ const StyledMenuModal = exports.StyledMenuModal = _styledComponents.default.div`
77
73
  }
78
74
 
79
75
  ${({
80
- menuType,
81
- theme
76
+ menuType
82
77
  }) => (0, _styledComponents.css)`
83
78
  background-color: ${_menu.default[menuType].background};
84
79
 
@@ -98,7 +93,7 @@ const StyledMenuModal = exports.StyledMenuModal = _styledComponents.default.div`
98
93
  border-bottom-right-radius: var(--borderRadius050);
99
94
  border-top-right-radius: var(--borderRadius050);
100
95
 
101
- ${!theme.focusRedesignOptOut ? (0, _addFocusStyling.default)() : /* istanbul ignore next */oldFocusStyling}
96
+ ${(0, _addFocusStyling.default)()}
102
97
  }
103
98
  }
104
99
  }
@@ -83,9 +83,6 @@ const parsePadding = props => {
83
83
  };
84
84
  }
85
85
  };
86
- const oldFocusStyling = `
87
- box-shadow: inset 0 0 0 var(--borderWidth300) var(--colorsSemanticFocus500);
88
- `;
89
86
  const StyledMenuItemWrapper = _styledComponents.default.a.attrs({
90
87
  as: _link.default
91
88
  })`
@@ -124,10 +121,7 @@ const StyledMenuItemWrapper = _styledComponents.default.a.attrs({
124
121
 
125
122
  a:focus,
126
123
  button:focus {
127
- ${({
128
- theme
129
- }) => `${!theme.focusRedesignOptOut ? (0, _addFocusStyling.default)(true) : /* istanbul ignore next */oldFocusStyling}
130
- `}
124
+ ${(0, _addFocusStyling.default)(true)}
131
125
  }
132
126
 
133
127
  :has([data-element="input"]) ${_link2.StyledContent} {
@@ -42,10 +42,7 @@ const StyledMultiActionButton = exports.StyledMultiActionButton = _styledCompone
42
42
 
43
43
  &:focus {
44
44
  background-color: var(--colorsActionMajor700);
45
- border: 3px solid
46
- ${({
47
- theme
48
- }) => !theme.focusRedesignOptOut ? "var(--colorsActionMajor700)" : /* istanbul ignore next */"var(--colorsSemanticFocus500)"};
45
+ border: 3px solid var(--colorsActionMajor700);
49
46
  outline: none;
50
47
  margin: 0 -1px;
51
48
 
@@ -67,12 +64,6 @@ const StyledMultiActionButton = exports.StyledMultiActionButton = _styledCompone
67
64
  }
68
65
 
69
66
  &:focus {
70
- ${({
71
- theme
72
- }) => /* istanbul ignore next */
73
- theme.focusRedesignOptOut && (0, _styledComponents.css)`
74
- border-color: var(--colorsSemanticFocus500);
75
- `}
76
67
  margin: 0 -1px;
77
68
  }
78
69
  `}
@@ -67,9 +67,7 @@ const StyledPill = _styledComponents.default.span`
67
67
  align-items: center;
68
68
  justify-content: center;
69
69
  border: 2px solid ${pillColor};
70
- ${!theme.roundedCornersOptOut && (0, _styledComponents.css)`
71
- border-radius: var(--borderRadius025);
72
- `}
70
+ border-radius: var(--borderRadius025);
73
71
  height: auto;
74
72
 
75
73
  ${!wrapText && (0, _styledComponents.css)`
@@ -96,10 +94,6 @@ const StyledPill = _styledComponents.default.span`
96
94
  line-height: 16px;
97
95
  font-size: 12px;
98
96
  padding: 0 8px;
99
-
100
- ${theme.roundedCornersOptOut && (0, _styledComponents.css)`
101
- border-radius: 12px;
102
- `}
103
97
  `}
104
98
 
105
99
  ${size === "M" && (0, _styledComponents.css)`
@@ -107,10 +101,6 @@ const StyledPill = _styledComponents.default.span`
107
101
  line-height: 20px;
108
102
  font-size: 14px;
109
103
  padding: 0 8px;
110
-
111
- ${theme.roundedCornersOptOut && (0, _styledComponents.css)`
112
- border-radius: 12px;
113
- `}
114
104
  `}
115
105
 
116
106
  ${size === "L" && (0, _styledComponents.css)`
@@ -118,10 +108,6 @@ const StyledPill = _styledComponents.default.span`
118
108
  line-height: 24px;
119
109
  font-size: 14px;
120
110
  padding: 0 8px;
121
-
122
- ${theme.roundedCornersOptOut && (0, _styledComponents.css)`
123
- border-radius: 13px;
124
- `}
125
111
  `}
126
112
 
127
113
  ${size === "XL" && (0, _styledComponents.css)`
@@ -129,18 +115,12 @@ const StyledPill = _styledComponents.default.span`
129
115
  line-height: 28px;
130
116
  font-size: 16px;
131
117
  padding: 0 12px;
132
-
133
- ${theme.roundedCornersOptOut && (0, _styledComponents.css)`
134
- border-radius: 15px;
135
- `}
136
118
  `}
137
119
 
138
120
  ${isDeletable && (0, _styledComponents.css)`
139
121
  ${_iconButton.default} {
140
122
  -webkit-appearance: none;
141
- ${!theme.roundedCornersOptOut && (0, _styledComponents.css)`
142
- border-radius: var(--borderRadius000);
143
- `}
123
+ border-radius: var(--borderRadius000);
144
124
  border: none;
145
125
  bottom: 0;
146
126
  font-size: 100%;
@@ -152,18 +132,9 @@ const StyledPill = _styledComponents.default.span`
152
132
  line-height: 16px;
153
133
 
154
134
  &:focus {
155
- ${theme.focusRedesignOptOut && /* istanbul ignore next */
156
- (0, _styledComponents.css)`
157
- outline: none;
158
- box-shadow: 0 0 0 3px var(--colorsSemanticFocus500);
159
- `}
160
-
161
135
  background-color: ${buttonFocusColor};
162
- ${!theme.roundedCornersOptOut && (0, _styledComponents.css)`
163
- border-radius: var(--borderRadius000) var(--borderRadius025)
164
- var(--borderRadius025) var(--borderRadius000);
165
- `}
166
-
136
+ border-radius: var(--borderRadius000) var(--borderRadius025)
137
+ var(--borderRadius025) var(--borderRadius000);
167
138
  ::-moz-focus-inner {
168
139
  border: 0;
169
140
  }
@@ -207,10 +178,6 @@ const StyledPill = _styledComponents.default.span`
207
178
  font-size: 16px;
208
179
  }
209
180
  }
210
-
211
- ${theme.roundedCornersOptOut && (0, _styledComponents.css)`
212
- border-radius: 0 10px 10px 0;
213
- `}
214
181
  }
215
182
  `}
216
183
 
@@ -221,10 +188,6 @@ const StyledPill = _styledComponents.default.span`
221
188
  width: 24px;
222
189
  padding: 0;
223
190
  line-height: 15px;
224
-
225
- ${theme.roundedCornersOptOut && (0, _styledComponents.css)`
226
- border-radius: 0 10px 10px 0;
227
- `}
228
191
  }
229
192
  `}
230
193
 
@@ -235,10 +198,6 @@ const StyledPill = _styledComponents.default.span`
235
198
  width: 28px;
236
199
  padding: 0;
237
200
  line-height: 16px;
238
-
239
- ${theme.roundedCornersOptOut && (0, _styledComponents.css)`
240
- border-radius: 0 11px 11px 0;
241
- `}
242
201
  }
243
202
  `}
244
203
 
@@ -249,10 +208,6 @@ const StyledPill = _styledComponents.default.span`
249
208
  width: 32px;
250
209
  padding: 0;
251
210
  line-height: 18px;
252
-
253
- ${theme.roundedCornersOptOut && (0, _styledComponents.css)`
254
- border-radius: 0 12px 12px 0;
255
- `}
256
211
  }
257
212
  `}
258
213
  `}
@@ -14,7 +14,6 @@ var _tags = _interopRequireDefault(require("../../__internal__/utils/helpers/tag
14
14
  var _portrait = require("./portrait.config");
15
15
  var _portrait2 = require("./portrait.style");
16
16
  var _utils = require("../../style/utils");
17
- var _newValidation = _interopRequireDefault(require("../carbon-provider/__internal__/new-validation.context"));
18
17
  function _interopRequireDefault(e) { return e && e.__esModule ? e : { default: e }; }
19
18
  function _getRequireWildcardCache(e) { if ("function" != typeof WeakMap) return null; var r = new WeakMap(), t = new WeakMap(); return (_getRequireWildcardCache = function (e) { return e ? t : r; })(e); }
20
19
  function _interopRequireWildcard(e, r) { if (!r && e && e.__esModule) return e; if (null === e || "object" != typeof e && "function" != typeof e) return { default: e }; var t = _getRequireWildcardCache(r); if (t && t.has(e)) return t.get(e); var n = { __proto__: null }, a = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var u in e) if ("default" !== u && {}.hasOwnProperty.call(e, u)) { var i = a ? Object.getOwnPropertyDescriptor(e, u) : null; i && (i.get || i.set) ? Object.defineProperty(n, u, i) : n[u] = e[u]; } return n.default = e, t && t.set(e, n), n; }
@@ -27,7 +26,7 @@ const Portrait = ({
27
26
  gravatar = "",
28
27
  iconType = "individual",
29
28
  initials,
30
- shape,
29
+ shape = "circle",
31
30
  size = "M",
32
31
  src,
33
32
  onClick,
@@ -42,10 +41,6 @@ const Portrait = ({
42
41
  ...rest
43
42
  }) => {
44
43
  const [externalError, setExternalError] = (0, _react.useState)(false);
45
- const {
46
- roundedCornersOptOut
47
- } = (0, _react.useContext)(_newValidation.default);
48
- const defaultShape = roundedCornersOptOut ? "square" : "circle";
49
44
  !!(src && gravatar) ? process.env.NODE_ENV !== "production" ? (0, _invariant.default)(false, "The `src` prop cannot be used in conjunction with the `gravatar` prop." + " Please use one or the other.") : (0, _invariant.default)(false) : void 0;
50
45
  const logGravatarDeprecationWarning = () => {
51
46
  deprecatedGravatarWarnTriggered = true;
@@ -108,7 +103,7 @@ const Portrait = ({
108
103
  }, tagProps, {
109
104
  darkBackground: darkBackground,
110
105
  size: size,
111
- shape: shape || defaultShape
106
+ shape: shape
112
107
  }), portrait));
113
108
  }
114
109
  return /*#__PURE__*/_react.default.createElement(_portrait2.StyledPortraitContainer, _extends({}, (0, _utils.filterStyledSystemMarginProps)(rest), {
@@ -116,7 +111,7 @@ const Portrait = ({
116
111
  }, tagProps, {
117
112
  darkBackground: darkBackground,
118
113
  size: size,
119
- shape: shape || defaultShape
114
+ shape: shape
120
115
  }), portrait);
121
116
  };
122
117
  return renderComponent();
@@ -56,8 +56,7 @@ const StyledProgressTracker = exports.StyledProgressTracker = _styledComponents.
56
56
  const StyledProgressBar = exports.StyledProgressBar = _styledComponents.default.span`
57
57
  ${({
58
58
  progress,
59
- error,
60
- theme
59
+ error
61
60
  }) => (0, _styledComponents.css)`
62
61
  display: flex;
63
62
  position: relative;
@@ -66,7 +65,7 @@ const StyledProgressBar = exports.StyledProgressBar = _styledComponents.default.
66
65
  progress,
67
66
  error
68
67
  })};
69
- border-radius: ${theme.roundedCornersOptOut ? "25px" : "var(--borderRadius400)"};
68
+ border-radius: var(--borderRadius400);
70
69
  overflow-x: hidden;
71
70
  width: 100%
72
71
  min-height: fit-content;
@@ -117,8 +116,7 @@ const InnerBar = exports.InnerBar = _styledComponents.default.span`
117
116
  ${({
118
117
  progress,
119
118
  size,
120
- error,
121
- theme
119
+ error
122
120
  }) => (0, _styledComponents.css)`
123
121
  position: relative;
124
122
  left: 0;
@@ -126,7 +124,7 @@ const InnerBar = exports.InnerBar = _styledComponents.default.span`
126
124
  progress,
127
125
  error
128
126
  })};
129
- border-radius: ${theme.roundedCornersOptOut ? "25px" : "var(--borderRadius400)"};
127
+ border-radius: var(--borderRadius400);
130
128
  width: ${progress}%;
131
129
  min-width: 2px;
132
130
  height: ${getHeight(size)};
@@ -23,10 +23,6 @@ const StyledSimpleColor = exports.StyledSimpleColor = _styledComponents.default.
23
23
  cursor: pointer;
24
24
  }
25
25
  `;
26
- const oldFocusStyling = `
27
- box-shadow: inset 0px 0px 0px var(--borderWidth200) var(--colorsUtilityYang100);
28
- border: 2px solid var(--colorsSemanticFocus500);
29
- `;
30
26
  const StyledColorSampleBox = exports.StyledColorSampleBox = _styledComponents.default.div`
31
27
  height: 100%;
32
28
  width: 100%;
@@ -34,10 +30,6 @@ const StyledColorSampleBox = exports.StyledColorSampleBox = _styledComponents.de
34
30
  display: flex;
35
31
  align-items: center;
36
32
  justify-content: center;
37
- ${({
38
- theme
39
- }) => /* istanbul ignore next */
40
- theme.focusRedesignOptOut && "border: 2px solid transparent;"}
41
33
 
42
34
  ${({
43
35
  color
@@ -70,18 +62,7 @@ const StyledSimpleColorInput = exports.StyledSimpleColorInput = (0, _styledCompo
70
62
  }
71
63
 
72
64
  &:focus + ${StyledColorSampleBox} {
73
- ${({
74
- theme
75
- }) => (0, _styledComponents.css)`
76
- ${theme.focusRedesignOptOut && /* istanbul ignore next */
77
- `
78
- ${oldFocusStyling}
79
- `}
80
-
81
- ${!theme.focusRedesignOptOut && `
82
- ${(0, _addFocusStyling.default)(true)}
83
- `}
84
- `}
65
+ ${(0, _addFocusStyling.default)(true)}
85
66
  }
86
67
  `;
87
68
  const getIconColor = color => {