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
@@ -14,23 +14,13 @@ const StyledToolbarButton = styled.button.attrs({
14
14
  cursor: pointer;
15
15
 
16
16
  ${({
17
- isActive,
18
- theme
17
+ isActive
19
18
  }) => css`
20
19
  :focus,
21
20
  :active {
22
21
  z-index: 1;
23
22
  position: relative;
24
-
25
- ${theme.focusRedesignOptOut && /* istanbul ignore next */
26
- css`
27
- outline: 2px solid var(--colorsSemanticFocus500);
28
- outline-offset: -2px;
29
- `}
30
-
31
- ${!theme.focusRedesignOptOut && css`
32
- ${addFocusStyling()}
33
- `}
23
+ ${addFocusStyling()}
34
24
  }
35
25
 
36
26
  :hover {
@@ -57,17 +57,13 @@ const StyledEditorContainer = styled.div`
57
57
  const StyledEditorOutline = styled.div`
58
58
  ${({
59
59
  isFocused,
60
- hasError,
61
- theme
60
+ hasError
62
61
  }) => css`
63
62
  border-radius: var(--borderRadius050);
64
63
  outline: none;
65
64
 
66
65
  ${isFocused && css`
67
- ${!theme.focusRedesignOptOut ? addFocusStyling() : `
68
- outline: 3px solid var(--colorsSemanticFocus500);
69
- outline-offset: ${hasError ? "2px" : "1px"};
70
- `}
66
+ ${addFocusStyling()}
71
67
  `}
72
68
  `}
73
69
  `;
@@ -55,14 +55,10 @@ const StyledTileSelect = styled.div`
55
55
  }
56
56
  `}
57
57
  `;
58
- const oldFocusStyling = `
59
- outline: solid 3px var(--colorsSemanticFocus500);
60
- `;
61
58
  const StyledFocusWrapper = styled.div`
62
59
  ${({
63
60
  checked,
64
- hasFocus,
65
- theme
61
+ hasFocus
66
62
  }) => css`
67
63
  position: relative;
68
64
  border: 1px solid var(--colorsActionMinor250);
@@ -75,7 +71,7 @@ const StyledFocusWrapper = styled.div`
75
71
  `}
76
72
 
77
73
  ${hasFocus && css`
78
- ${!theme.focusRedesignOptOut ? addFocusStyling() : /* istanbul ignore next */oldFocusStyling}
74
+ ${addFocusStyling()}
79
75
  z-index: 15;
80
76
  `}
81
77
  `}
@@ -10,10 +10,6 @@ export const StyledList = styled.ul`
10
10
  margin: 0;
11
11
  padding: 0;
12
12
  `;
13
- const oldFocusStyling = `
14
- outline: 3px solid var(--colorsSemanticFocus500);
15
- outline-offset: -3px;
16
- `;
17
13
  export const StyledVerticalMenuItem = styled.div`
18
14
  min-height: ${({
19
15
  height
@@ -38,9 +34,7 @@ export const StyledVerticalMenuItem = styled.div`
38
34
  }
39
35
 
40
36
  &:focus {
41
- ${({
42
- theme
43
- }) => !theme.focusRedesignOptOut ? addFocusStyling(true) : /* istanbul ignore next */oldFocusStyling}
37
+ ${addFocusStyling(true)}
44
38
  }
45
39
 
46
40
  ${({
@@ -1,10 +1,9 @@
1
1
  import { ThemeObject } from "../../themes/base";
2
- import { CarbonProviderProps } from "../../../components/carbon-provider";
3
2
  /**
4
3
  *
5
4
  * Converts theme properties to css variables form and set them locally for
6
5
  * given scope
7
6
  *
8
7
  */
9
- declare const CarbonScopedTokensProvider: import("styled-components").StyledComponent<"div", any, ThemeObject & Pick<CarbonProviderProps, "roundedCornersOptOut">, never>;
8
+ declare const CarbonScopedTokensProvider: import("styled-components").StyledComponent<"div", any, ThemeObject, never>;
10
9
  export default CarbonScopedTokensProvider;
@@ -1,6 +1,7 @@
1
1
  import styled from "styled-components";
2
2
  import { baseTheme } from "../../themes";
3
3
  import generateCssVariables from "../generate-css-variables.util";
4
+
4
5
  /**
5
6
  *
6
7
  * Converts theme properties to css variables form and set them locally for
@@ -16,7 +17,7 @@ const CarbonScopedTokensProvider = styled.div`
16
17
 
17
18
  ${({
18
19
  theme
19
- }) => generateCssVariables(theme.compatibility, theme.roundedCornersOptOut)}
20
+ }) => generateCssVariables(theme.compatibility)}
20
21
  `;
21
22
  CarbonScopedTokensProvider.defaultProps = {
22
23
  theme: baseTheme
@@ -7,5 +7,5 @@ import { ThemeObject } from "../themes/base";
7
7
  * form of CSS variables along with styled-components ThemeProvider.
8
8
  *
9
9
  */
10
- declare const _default: (theme: ThemeObject | Record<string, string>, roundedCornersOptOut?: boolean) => string;
10
+ declare const _default: (theme: ThemeObject | Record<string, string>) => string;
11
11
  export default _default;
@@ -7,9 +7,4 @@
7
7
  *
8
8
  */
9
9
 
10
- export default (theme, roundedCornersOptOut) => Object.entries(theme).map(([key, value]) => {
11
- if (roundedCornersOptOut && key.startsWith("borderRadius") && key !== "borderRadiusCircle") {
12
- return `--${key}: 0px;`;
13
- }
14
- return `--${key}: ${value};`;
15
- }).join("\r\n");
10
+ export default theme => Object.entries(theme).map(([key, value]) => `--${key}: ${value};`).join("\r\n");
@@ -11,9 +11,6 @@ var _addFocusStyling = _interopRequireDefault(require("../../style/utils/add-foc
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 3px var(--colorsSemanticFocus500);
16
- `;
17
14
  const StyledInputPresentationContainer = exports.StyledInputPresentationContainer = _styledComponents.default.div`
18
15
  flex: 0 0 ${({
19
16
  inputWidth
@@ -96,11 +93,10 @@ const InputPresentationStyle = _styledComponents.default.div`
96
93
  `}
97
94
 
98
95
  ${({
99
- hasFocus,
100
- theme
96
+ hasFocus
101
97
  }) => hasFocus && (0, _styledComponents.css)`
102
98
  & {
103
- ${!theme.focusRedesignOptOut ? (0, _addFocusStyling.default)() : /* istanbul ignore next */oldFocusStyling}
99
+ ${(0, _addFocusStyling.default)()}
104
100
  z-index: 2;
105
101
  }
106
102
  `}
@@ -10,9 +10,6 @@ var _addFocusStyling = _interopRequireDefault(require("../../style/utils/add-foc
10
10
  function _interopRequireDefault(e) { return e && e.__esModule ? e : { default: e }; }
11
11
  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); }
12
12
  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; }
13
- const oldFocusStyling = `
14
- outline: solid 3px var(--colorsSemanticFocus500);
15
- `;
16
13
  const InputIconToggleStyle = _styledComponents.default.span.attrs(({
17
14
  onClick
18
15
  }) => ({
@@ -47,12 +44,8 @@ const InputIconToggleStyle = _styledComponents.default.span.attrs(({
47
44
  cursor: default;
48
45
  `}
49
46
 
50
- ${({
51
- theme
52
- }) => `
53
47
  &:focus {
54
- ${!theme.focusRedesignOptOut ? (0, _addFocusStyling.default)() : /* istanbul ignore next */oldFocusStyling}
55
- }
56
- `}
48
+ ${(0, _addFocusStyling.default)()}
49
+ }
57
50
  `;
58
51
  var _default = exports.default = InputIconToggleStyle;
@@ -17,9 +17,6 @@ const validationIconTypes = {
17
17
  info: "var(--colorsSemanticInfo500)",
18
18
  warning: "var(--colorsSemanticCaution500)"
19
19
  };
20
- const oldFocusStyling = `
21
- outline: solid 2px var(--colorsSemanticFocus500);
22
- `;
23
20
  const ValidationIconStyle = _styledComponents.default.span`
24
21
  background: none;
25
22
  cursor: default;
@@ -43,9 +40,7 @@ const ValidationIconStyle = _styledComponents.default.span`
43
40
  }
44
41
 
45
42
  ${_icon.default}:focus {
46
- ${({
47
- theme
48
- }) => !theme.focusRedesignOptOut ? (0, _addFocusStyling.default)() : /* istanbul ignore next */oldFocusStyling}
43
+ ${(0, _addFocusStyling.default)()}
49
44
  }
50
45
 
51
46
  ${_styledSystem.margin}
@@ -111,9 +111,6 @@ const StyledAccordionHeadingsContainer = exports.StyledAccordionHeadingsContaine
111
111
  }
112
112
  `}
113
113
  `;
114
- const oldFocusStyling = `
115
- outline: solid 3px var(--colorsSemanticFocus500);
116
- `;
117
114
  const StyledAccordionTitleContainer = exports.StyledAccordionTitleContainer = _styledComponents.default.div`
118
115
  ${({
119
116
  buttonHeading,
@@ -121,7 +118,6 @@ const StyledAccordionTitleContainer = exports.StyledAccordionTitleContainer = _s
121
118
  iconAlign,
122
119
  size,
123
120
  hasButtonProps,
124
- theme,
125
121
  isExpanded,
126
122
  variant
127
123
  }) => (0, _styledComponents.css)`
@@ -140,7 +136,7 @@ const StyledAccordionTitleContainer = exports.StyledAccordionTitleContainer = _s
140
136
  z-index: 1;
141
137
 
142
138
  &:focus {
143
- ${!theme.focusRedesignOptOut ? (0, _addFocusStyling.default)() : /* istanbul ignore next */oldFocusStyling}
139
+ ${(0, _addFocusStyling.default)()}
144
140
  }
145
141
 
146
142
  ${variant === "subtle" && (0, _styledComponents.css)`
@@ -14,9 +14,6 @@ var _base = _interopRequireDefault(require("../../style/themes/base"));
14
14
  function _interopRequireDefault(e) { return e && e.__esModule ? e : { default: e }; }
15
15
  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); }
16
16
  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; }
17
- const oldFocusStyling = `
18
- outline: solid 3px var(--colorsSemanticFocus500);
19
- `;
20
17
  const Menu = exports.Menu = _styledComponents.default.ul`
21
18
  ${({
22
19
  isOpen
@@ -128,9 +125,7 @@ const StyledMenuItem = exports.StyledMenuItem = _styledComponents.default.button
128
125
  font-weight: 500;
129
126
 
130
127
  &:focus {
131
- ${({
132
- theme
133
- }) => `${!theme.focusRedesignOptOut ? (0, _addFocusStyling.default)() : /* istanbul ignore next */oldFocusStyling}`}
128
+ ${(0, _addFocusStyling.default)()}
134
129
  z-index: 1;
135
130
  border-radius: var(--borderRadius000);
136
131
  }
@@ -197,13 +192,9 @@ const ButtonIcon = exports.ButtonIcon = (0, _styledComponents.default)(_icon.def
197
192
  }
198
193
  `;
199
194
  const StyledButtonIcon = exports.StyledButtonIcon = _styledComponents.default.div`
200
- ${({
201
- theme
202
- }) => `
203
- &:focus {
204
- ${!theme.focusRedesignOptOut ? (0, _addFocusStyling.default)() : /* istanbul ignore next */oldFocusStyling}
205
- }
206
- `}
195
+ &:focus {
196
+ ${(0, _addFocusStyling.default)()}
197
+ }
207
198
  border-radius: var(--borderRadius050);
208
199
  `;
209
200
  const MenuItemIcon = exports.MenuItemIcon = (0, _styledComponents.default)(_icon.default)`
@@ -11,9 +11,6 @@ function _interopRequireDefault(e) { return e && e.__esModule ? e : { default: e
11
11
  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); }
12
12
  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; }
13
13
  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";
14
- const oldFocusStyling = `
15
- outline: solid 3px var(--colorsSemanticFocus500);
16
- `;
17
14
  const StyledAdvancedColorPickerCell = _styledComponents.default.button.attrs({
18
15
  type: "button"
19
16
  })`
@@ -40,11 +37,7 @@ const StyledAdvancedColorPickerCell = _styledComponents.default.button.attrs({
40
37
  }
41
38
 
42
39
  &:focus {
43
- ${({
44
- theme
45
- }) => `
46
- ${!theme.focusRedesignOptOut ? (0, _addFocusStyling.default)() : /* istanbul ignore next */oldFocusStyling}
47
- `}
40
+ ${(0, _addFocusStyling.default)()}
48
41
  }
49
42
 
50
43
  &::-moz-focus-inner {
@@ -9,9 +9,6 @@ var _addFocusStyling = _interopRequireDefault(require("../../../style/utils/add-
9
9
  function _interopRequireDefault(e) { return e && e.__esModule ? e : { default: e }; }
10
10
  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); }
11
11
  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; }
12
- const oldFocusStyling = `
13
- outline: solid 3px var(--colorsSemanticFocus500);
14
- `;
15
12
  const StyledNavigationItem = _styledComponents.default.li`
16
13
  width: 100%;
17
14
 
@@ -28,9 +25,7 @@ const StyledNavigationItem = _styledComponents.default.li`
28
25
  border-bottom-right-radius: var(--borderRadius100);
29
26
 
30
27
  &:focus {
31
- ${({
32
- theme
33
- }) => `${!theme.focusRedesignOptOut ? (0, _addFocusStyling.default)() : /* istanbul ignore next */oldFocusStyling}`}
28
+ ${(0, _addFocusStyling.default)()}
34
29
  position: relative;
35
30
  }
36
31
 
@@ -11,9 +11,6 @@ var _addFocusStyling = _interopRequireDefault(require("../../style/utils/add-foc
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 3px var(--colorsSemanticFocus500);
16
- `;
17
14
  const StyledBatchSelection = exports.StyledBatchSelection = _styledComponents.default.div`
18
15
  ${({
19
16
  disabled,
@@ -29,9 +26,7 @@ const StyledBatchSelection = exports.StyledBatchSelection = _styledComponents.de
29
26
  ${_icon.default} {
30
27
  ${!disabled && `color: var(--colorsActionMajorYin065);`}
31
28
  &:focus {
32
- ${({
33
- theme
34
- }) => `${!theme.focusRedesignOptOut ? (0, _addFocusStyling.default)() : /* istanbul ignore next */oldFocusStyling}`}
29
+ ${(0, _addFocusStyling.default)()}
35
30
  }
36
31
  }
37
32
 
@@ -73,9 +68,7 @@ const StyledBatchSelection = exports.StyledBatchSelection = _styledComponents.de
73
68
  ${_iconButton.default}:focus {
74
69
  border-radius: var(--borderRadius100);
75
70
  z-index: 1;
76
- ${({
77
- theme
78
- }) => `${!theme.focusRedesignOptOut ? (0, _addFocusStyling.default)() : /* istanbul ignore next */oldFocusStyling}`}
71
+ ${(0, _addFocusStyling.default)()}
79
72
  }
80
73
 
81
74
  ${disabled && (0, _styledComponents.css)`
@@ -32,11 +32,10 @@ const StyledBox = _styledComponents.default.div`
32
32
  ${calculatePosition}
33
33
 
34
34
  ${({
35
- theme,
36
35
  borderRadius = "borderRadius000"
37
- }) => !theme.roundedCornersOptOut && (0, _styledComponents.css)`
38
- border-radius: var(--${borderRadius});
39
- `}
36
+ }) => (0, _styledComponents.css)`
37
+ border-radius: var(--${borderRadius});
38
+ `}
40
39
 
41
40
  ${({
42
41
  cssProps,
@@ -62,13 +62,11 @@ function stylingForType({
62
62
  ${iconOnly && stylingForIconOnly(size)}
63
63
  `;
64
64
  }
65
- const oldFocusStyling = "outline: solid 3px var(--colorsSemanticFocus500);";
66
65
  const StyledButton = _styledComponents.default.button`
67
66
  ${_styledSystem.space}
68
67
  ${({
69
68
  disabled,
70
- noWrap,
71
- theme
69
+ noWrap
72
70
  }) => (0, _styledComponents.css)`
73
71
  align-items: center;
74
72
  cursor: ${disabled ? "not-allowed" : "pointer"};
@@ -84,7 +82,7 @@ const StyledButton = _styledComponents.default.button`
84
82
  border-radius: var(--borderRadius400);
85
83
 
86
84
  &:focus {
87
- ${!theme.focusRedesignOptOut ? (0, _addFocusStyling.default)() : /* istanbul ignore next */oldFocusStyling}
85
+ ${(0, _addFocusStyling.default)()}
88
86
  }
89
87
 
90
88
  ${stylingForType}
@@ -44,9 +44,6 @@ const StyledButtonToggleContentWrapper = exports.StyledButtonToggleContentWrappe
44
44
  height: 100%;
45
45
  flex-flow: wrap;
46
46
  `;
47
- const oldFocusStyling = `
48
- outline: solid 3px var(--colorsSemanticFocus500);
49
- `;
50
47
  const StyledButtonToggle = exports.StyledButtonToggle = _styledComponents.default.button`
51
48
  display: inline-flex;
52
49
  justify-content: center;
@@ -87,9 +84,7 @@ const StyledButtonToggle = exports.StyledButtonToggle = _styledComponents.defaul
87
84
  `}
88
85
 
89
86
  &:focus {
90
- ${({
91
- theme
92
- }) => `${!theme.focusRedesignOptOut ? (0, _addFocusStyling.default)() : /* istanbul ignore next */oldFocusStyling}`}
87
+ ${(0, _addFocusStyling.default)()}
93
88
  z-index: 100;
94
89
  }
95
90
 
@@ -4,14 +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 styling components to have rounded corners.
8
- *
9
- * NOTE - This feature flag will soon be removed, along with the legacy styling. */
10
- roundedCornersOptOut?: boolean;
11
- /** (Deprecated) Feature flag for opting out of the focus redesign.
12
- *
13
- * NOTE - This feature flag will soon be removed, along with the legacy styling. */
14
- focusRedesignOptOut?: boolean;
15
7
  }
16
8
  declare const _default: React.Context<NewValidationContextProps>;
17
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, roundedCornersOptOut, focusRedesignOptOut, }: CarbonProviderProps) => React.JSX.Element;
9
+ export declare const CarbonProvider: ({ children, theme, validationRedesignOptIn, }: CarbonProviderProps) => React.JSX.Element;
10
10
  export default CarbonProvider;
@@ -4,52 +4,24 @@ Object.defineProperty(exports, "__esModule", {
4
4
  value: true
5
5
  });
6
6
  exports.default = exports.CarbonProvider = void 0;
7
- var _react = _interopRequireWildcard(require("react"));
7
+ var _react = _interopRequireDefault(require("react"));
8
8
  var _propTypes = _interopRequireDefault(require("prop-types"));
9
9
  var _styledComponents = require("styled-components");
10
10
  var _carbonScopedTokensProvider = _interopRequireDefault(require("../../style/design-tokens/carbon-scoped-tokens-provider"));
11
11
  var _themes = require("../../style/themes");
12
12
  var _newValidation = _interopRequireDefault(require("./__internal__/new-validation.context"));
13
13
  var _topModalProvider = _interopRequireDefault(require("./__internal__/top-modal-provider.component"));
14
- var _logger = _interopRequireDefault(require("../../__internal__/utils/logger"));
15
14
  function _interopRequireDefault(e) { return e && e.__esModule ? e : { default: e }; }
16
- 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); }
17
- 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; }
18
- let deprecatedRoundedCornersOptOut = false;
19
- let deprecatedFocusRedesignOptOut = false;
20
15
  const CarbonProvider = ({
21
16
  children,
22
17
  theme = _themes.sageTheme,
23
- validationRedesignOptIn = false,
24
- roundedCornersOptOut = false,
25
- focusRedesignOptOut = false
26
- }) => {
27
- const {
28
- roundedCornersOptOut: existingRoundedCornersOptOut,
29
- focusRedesignOptOut: existingFocusRedesignOptOut
30
- } = (0, _react.useContext)(_newValidation.default);
31
- const roundedCornersOptOutValue = existingRoundedCornersOptOut || roundedCornersOptOut;
32
- const focusRedesignOptOutValue = existingFocusRedesignOptOut || focusRedesignOptOut;
33
- if (!deprecatedRoundedCornersOptOut && roundedCornersOptOutValue) {
34
- deprecatedRoundedCornersOptOut = true;
35
- _logger.default.deprecate("The `roundedCornersOptOut` feature flag has been deprecated and will soon be removed. " + "Along with this feature flag, the legacy pre-rounded corners styling will also be removed. ");
18
+ validationRedesignOptIn = false
19
+ }) => /*#__PURE__*/_react.default.createElement(_styledComponents.ThemeProvider, {
20
+ theme: theme
21
+ }, /*#__PURE__*/_react.default.createElement(_carbonScopedTokensProvider.default, null, /*#__PURE__*/_react.default.createElement(_newValidation.default.Provider, {
22
+ value: {
23
+ validationRedesignOptIn
36
24
  }
37
- if (!deprecatedFocusRedesignOptOut && focusRedesignOptOutValue) {
38
- deprecatedFocusRedesignOptOut = true;
39
- _logger.default.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. ");
40
- }
41
- return /*#__PURE__*/_react.default.createElement(_styledComponents.ThemeProvider, {
42
- theme: {
43
- ...theme,
44
- roundedCornersOptOut: roundedCornersOptOutValue,
45
- focusRedesignOptOut: focusRedesignOptOutValue
46
- }
47
- }, /*#__PURE__*/_react.default.createElement(_carbonScopedTokensProvider.default, null, /*#__PURE__*/_react.default.createElement(_newValidation.default.Provider, {
48
- value: {
49
- validationRedesignOptIn,
50
- roundedCornersOptOut: roundedCornersOptOutValue
51
- }
52
- }, /*#__PURE__*/_react.default.createElement(_topModalProvider.default, null, children))));
53
- };
25
+ }, /*#__PURE__*/_react.default.createElement(_topModalProvider.default, null, children))));
54
26
  exports.CarbonProvider = CarbonProvider;
55
27
  var _default = exports.default = CarbonProvider;
@@ -85,20 +85,17 @@ const StyledCardContent = exports.StyledCardContent = _styledComponents.default.
85
85
  return {};
86
86
  })`
87
87
  ${({
88
- interactive,
89
- theme
88
+ interactive
90
89
  }) => interactive && (0, _styledComponents.css)`
91
90
  cursor: pointer;
92
91
  display: inline-flex;
93
92
  flex-direction: column;
94
93
  height: 100%;
95
94
 
96
- ${!theme.focusRedesignOptOut && (0, _styledComponents.css)`
97
- :focus {
98
- ${(0, _addFocusStyling.default)()};
99
- position: relative;
100
- }
101
- `}
95
+ :focus {
96
+ ${(0, _addFocusStyling.default)()};
97
+ position: relative;
98
+ }
102
99
  `}
103
100
 
104
101
  align-items: stretch;
@@ -17,9 +17,6 @@ var _addFocusStyling = _interopRequireDefault(require("../../style/utils/add-foc
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
- box-shadow: 0 0 0 3px var(--colorsSemanticFocus500);
22
- `;
23
20
  const StyledCheckbox = _styledComponents.default.div`
24
21
  ${_styledSystem.margin}
25
22
  ${({
@@ -78,14 +75,10 @@ const StyledCheckbox = _styledComponents.default.div`
78
75
 
79
76
  // prettier-ignore
80
77
  ${_hiddenCheckableInput.default}:not([disabled]) {
81
- ${({
82
- theme
83
- }) => `
84
78
  &:focus + ${_checkableInputSvgWrapper.default} ,
85
79
  &:hover + ${_checkableInputSvgWrapper.default} {
86
- ${!theme.focusRedesignOptOut ? (0, _addFocusStyling.default)() : /* istanbul ignore next */oldFocusStyling}
87
- }
88
- `}
80
+ ${(0, _addFocusStyling.default)()}
81
+ }
89
82
  }
90
83
 
91
84
  ${_label.StyledLabelContainer} {
@@ -10,9 +10,6 @@ var _addFocusStyling = _interopRequireDefault(require("../../../../style/utils/a
10
10
  function _interopRequireDefault(e) { return e && e.__esModule ? e : { default: e }; }
11
11
  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); }
12
12
  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; }
13
- const oldFocusStyling = `
14
- outline: solid 3px var(--colorsSemanticFocus500);
15
- `;
16
13
  const officialReactDayPickerStyling = () => (0, _styledComponents.css)`
17
14
  /* Variables declaration */
18
15
  /* prettier-ignore */
@@ -458,22 +455,14 @@ const StyledDayPicker = _styledComponents.default.div`
458
455
  }
459
456
 
460
457
  .rdp-focused:not(.rdp-disabled):not(.rdp-outside) {
461
- ${({
462
- theme
463
- }) => (0, _styledComponents.css)`
464
- ${!theme.focusRedesignOptOut ? (0, _addFocusStyling.default)(true) : /* istanbul ignore next */oldFocusStyling}
465
- `}
458
+ ${(0, _addFocusStyling.default)(true)}
466
459
  border-radius: var(--borderRadius400);
467
460
  }
468
461
 
469
462
  .rdp-day.rdp-selected {
470
- ${({
471
- theme
472
- }) => (0, _styledComponents.css)`
473
- &:focus {
474
- ${!theme.focusRedesignOptOut ? (0, _addFocusStyling.default)(true) : /* istanbul ignore next */oldFocusStyling}
475
- }
476
- `}
463
+ &:focus {
464
+ ${(0, _addFocusStyling.default)(true)}
465
+ }
477
466
  }
478
467
  `;
479
468
  StyledDayPicker.defaultProps = {
@@ -8,9 +8,6 @@ var _styledComponents = _interopRequireDefault(require("styled-components"));
8
8
  var _addFocusStyling = _interopRequireDefault(require("../../../../style/utils/add-focus-styling"));
9
9
  var _themes = require("../../../../style/themes");
10
10
  function _interopRequireDefault(e) { return e && e.__esModule ? e : { default: e }; }
11
- const oldFocusStyling = `
12
- outline: solid 3px var(--colorsSemanticFocus500);
13
- `;
14
11
  const StyledButton = _styledComponents.default.button.attrs({
15
12
  type: "button"
16
13
  })`
@@ -27,13 +24,9 @@ const StyledButton = _styledComponents.default.button.attrs({
27
24
  box-sizing: border-box;
28
25
  border-radius: var(--borderRadius050);
29
26
 
30
- ${({
31
- theme
32
- }) => `
33
- &:focus {
34
- ${!theme.focusRedesignOptOut ? (0, _addFocusStyling.default)() : /* istanbul ignore next */oldFocusStyling}
35
- }
36
- `}
27
+ &:focus {
28
+ ${(0, _addFocusStyling.default)()}
29
+ }
37
30
  `;
38
31
  StyledButton.defaultProps = {
39
32
  theme: _themes.baseTheme
@@ -3,7 +3,7 @@ import { SpaceProps } from "styled-system";
3
3
  import { StyledDismissibleBoxProps } from "./dismissible-box.style";
4
4
  import { BoxProps } from "../box";
5
5
  import { TagProps } from "../../__internal__/utils/helpers/tags";
6
- export interface DismissibleBoxProps extends SpaceProps, StyledDismissibleBoxProps, Omit<BoxProps, "display" | "justifyContent">, Omit<TagProps, "data-component"> {
6
+ export interface DismissibleBoxProps extends SpaceProps, StyledDismissibleBoxProps, Omit<BoxProps, "display" | "justifyContent" | "bg" | "backgroundColor">, Omit<TagProps, "data-component"> {
7
7
  /** The content to render in the component */
8
8
  children?: React.ReactNode;
9
9
  /** Data tag prop bag for close Button */