carbon-react 145.0.0 → 146.0.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/esm/__internal__/input/input-presentation.style.js +2 -6
- package/esm/__internal__/input-icon-toggle/input-icon-toggle.style.js +2 -9
- package/esm/__internal__/validations/validation-icon.style.js +1 -6
- package/esm/components/accordion/accordion.style.js +1 -5
- package/esm/components/action-popover/action-popover.style.js +4 -13
- package/esm/components/advanced-color-picker/advanced-color-picker-cell.style.js +1 -8
- package/esm/components/anchor-navigation/anchor-navigation-item/anchor-navigation-item.style.js +1 -6
- package/esm/components/batch-selection/batch-selection.style.js +2 -9
- package/esm/components/button/button.style.js +2 -4
- package/esm/components/button-toggle/button-toggle.style.js +1 -6
- package/esm/components/carbon-provider/__internal__/new-validation.context.d.ts +0 -4
- package/esm/components/carbon-provider/carbon-provider.component.d.ts +1 -1
- package/esm/components/carbon-provider/carbon-provider.component.js +8 -24
- package/esm/components/card/card.style.js +5 -8
- package/esm/components/checkbox/checkbox.style.js +2 -9
- package/esm/components/date/__internal__/date-picker/day-picker.style.js +4 -15
- package/esm/components/date/__internal__/navbar/button.style.js +3 -10
- package/esm/components/drawer/drawer.style.js +3 -10
- package/esm/components/flat-table/flat-table-row/flat-table-row.style.js +9 -46
- package/esm/components/flat-table/flat-table.style.js +2 -12
- package/esm/components/flat-table/sort/sort.style.js +1 -6
- package/esm/components/heading/heading.style.js +1 -4
- package/esm/components/help/help.style.js +1 -6
- package/esm/components/icon/icon.style.js +1 -2
- package/esm/components/icon-button/icon-button.style.js +1 -8
- package/esm/components/link/link.style.js +1 -1
- package/esm/components/link-preview/link-preview.style.js +1 -7
- package/esm/components/menu/menu-full-screen/menu-full-screen.style.js +2 -7
- package/esm/components/menu/menu-item/menu-item.style.js +1 -7
- package/esm/components/multi-action-button/multi-action-button.component.js +1 -0
- package/esm/components/multi-action-button/multi-action-button.style.js +1 -10
- package/esm/components/pill/pill.style.js +0 -6
- package/esm/components/simple-color-picker/simple-color/simple-color.style.js +1 -20
- package/esm/components/split-button/split-button-toggle.style.js +1 -10
- package/esm/components/split-button/split-button.component.js +1 -0
- package/esm/components/split-button/split-button.style.js +3 -16
- package/esm/components/switch/switch.style.js +2 -6
- package/esm/components/tabs/__internal__/tab-title/tab-title.style.js +5 -9
- package/esm/components/text-editor/__internal__/toolbar/toolbar-button/toolbar-button.style.js +2 -12
- package/esm/components/text-editor/text-editor.style.js +2 -6
- package/esm/components/tile-select/tile-select.style.js +2 -6
- package/esm/components/vertical-menu/vertical-menu.style.js +1 -7
- package/lib/__internal__/input/input-presentation.style.js +2 -6
- package/lib/__internal__/input-icon-toggle/input-icon-toggle.style.js +2 -9
- package/lib/__internal__/validations/validation-icon.style.js +1 -6
- package/lib/components/accordion/accordion.style.js +1 -5
- package/lib/components/action-popover/action-popover.style.js +4 -13
- package/lib/components/advanced-color-picker/advanced-color-picker-cell.style.js +1 -8
- package/lib/components/anchor-navigation/anchor-navigation-item/anchor-navigation-item.style.js +1 -6
- package/lib/components/batch-selection/batch-selection.style.js +2 -9
- package/lib/components/button/button.style.js +2 -4
- package/lib/components/button-toggle/button-toggle.style.js +1 -6
- package/lib/components/carbon-provider/__internal__/new-validation.context.d.ts +0 -4
- package/lib/components/carbon-provider/carbon-provider.component.d.ts +1 -1
- package/lib/components/carbon-provider/carbon-provider.component.js +8 -26
- package/lib/components/card/card.style.js +5 -8
- package/lib/components/checkbox/checkbox.style.js +2 -9
- package/lib/components/date/__internal__/date-picker/day-picker.style.js +4 -15
- package/lib/components/date/__internal__/navbar/button.style.js +3 -10
- package/lib/components/drawer/drawer.style.js +3 -10
- package/lib/components/flat-table/flat-table-row/flat-table-row.style.js +9 -46
- package/lib/components/flat-table/flat-table.style.js +2 -12
- package/lib/components/flat-table/sort/sort.style.js +1 -6
- package/lib/components/heading/heading.style.js +1 -4
- package/lib/components/help/help.style.js +1 -6
- package/lib/components/icon/icon.style.js +1 -2
- package/lib/components/icon-button/icon-button.style.js +1 -8
- package/lib/components/link/link.style.js +1 -1
- package/lib/components/link-preview/link-preview.style.js +1 -7
- package/lib/components/menu/menu-full-screen/menu-full-screen.style.js +2 -7
- package/lib/components/menu/menu-item/menu-item.style.js +1 -7
- package/lib/components/multi-action-button/multi-action-button.component.js +1 -0
- package/lib/components/multi-action-button/multi-action-button.style.js +1 -10
- package/lib/components/pill/pill.style.js +0 -6
- package/lib/components/simple-color-picker/simple-color/simple-color.style.js +1 -20
- package/lib/components/split-button/split-button-toggle.style.js +1 -10
- package/lib/components/split-button/split-button.component.js +1 -0
- package/lib/components/split-button/split-button.style.js +3 -18
- package/lib/components/switch/switch.style.js +2 -6
- package/lib/components/tabs/__internal__/tab-title/tab-title.style.js +5 -9
- package/lib/components/text-editor/__internal__/toolbar/toolbar-button/toolbar-button.style.js +2 -12
- package/lib/components/text-editor/text-editor.style.js +2 -6
- package/lib/components/tile-select/tile-select.style.js +2 -6
- package/lib/components/vertical-menu/vertical-menu.style.js +1 -7
- package/package.json +1 -1
|
@@ -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 => {
|
|
@@ -21,8 +21,7 @@ const StyledSplitButtonToggle = (0, _styledComponents.default)(_button.default)`
|
|
|
21
21
|
buttonType,
|
|
22
22
|
disabled,
|
|
23
23
|
displayed,
|
|
24
|
-
size
|
|
25
|
-
theme
|
|
24
|
+
size
|
|
26
25
|
}) => (0, _styledComponents.css)`
|
|
27
26
|
border-top-left-radius: var(--borderRadius000);
|
|
28
27
|
border-bottom-left-radius: var(--borderRadius000);
|
|
@@ -58,14 +57,6 @@ const StyledSplitButtonToggle = (0, _styledComponents.default)(_button.default)`
|
|
|
58
57
|
|
|
59
58
|
${_button.default} + & {
|
|
60
59
|
margin-left: 0;
|
|
61
|
-
|
|
62
|
-
${buttonType === "secondary" && /* istanbul ignore next */
|
|
63
|
-
theme.focusRedesignOptOut && /* istanbul ignore next */
|
|
64
|
-
(0, _styledComponents.css)`
|
|
65
|
-
&:focus {
|
|
66
|
-
margin-left: -3px;
|
|
67
|
-
}
|
|
68
|
-
`}
|
|
69
60
|
}
|
|
70
61
|
|
|
71
62
|
${_button.default} + & ${_icon.default} {
|
|
@@ -128,6 +128,7 @@ const SplitButton = ({
|
|
|
128
128
|
return /*#__PURE__*/_react.default.createElement(_popover.default, {
|
|
129
129
|
disablePortal: true,
|
|
130
130
|
placement: position === "left" ? /* istanbul ignore next */"bottom-start" : "bottom-end",
|
|
131
|
+
popoverStrategy: "fixed",
|
|
131
132
|
reference: buttonNode,
|
|
132
133
|
middleware: [(0, _dom.offset)(6), (0, _dom.flip)({
|
|
133
134
|
fallbackStrategy: "initialPlacement"
|
|
@@ -4,13 +4,11 @@ Object.defineProperty(exports, "__esModule", {
|
|
|
4
4
|
value: true
|
|
5
5
|
});
|
|
6
6
|
exports.default = void 0;
|
|
7
|
-
var _styledComponents =
|
|
7
|
+
var _styledComponents = _interopRequireDefault(require("styled-components"));
|
|
8
8
|
var _styledSystem = require("styled-system");
|
|
9
9
|
var _button = _interopRequireDefault(require("../button/button.style"));
|
|
10
10
|
var _base = _interopRequireDefault(require("../../style/themes/base"));
|
|
11
11
|
function _interopRequireDefault(e) { return e && e.__esModule ? e : { default: e }; }
|
|
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
|
-
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
12
|
const StyledSplitButton = _styledComponents.default.div`
|
|
15
13
|
${_styledSystem.margin}
|
|
16
14
|
display: inline-block;
|
|
@@ -24,21 +22,8 @@ const StyledSplitButton = _styledComponents.default.div`
|
|
|
24
22
|
& > ${_button.default} {
|
|
25
23
|
margin: 0;
|
|
26
24
|
&:focus {
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
}) => (0, _styledComponents.css)`
|
|
30
|
-
${theme.focusRedesignOptOut && /* istanbul ignore next */
|
|
31
|
-
`
|
|
32
|
-
border: 3px solid var(--colorsSemanticFocus500);
|
|
33
|
-
margin: -1px;
|
|
34
|
-
outline: none;
|
|
35
|
-
`}
|
|
36
|
-
|
|
37
|
-
${!theme.focusRedesignOptOut && `
|
|
38
|
-
position: relative;
|
|
39
|
-
z-index: 1;
|
|
40
|
-
`}
|
|
41
|
-
`}
|
|
25
|
+
position: relative;
|
|
26
|
+
z-index: 1;
|
|
42
27
|
}
|
|
43
28
|
}
|
|
44
29
|
`;
|
|
@@ -18,9 +18,6 @@ var _switchSlider = _interopRequireDefault(require("./__internal__/switch-slider
|
|
|
18
18
|
function _interopRequireDefault(e) { return e && e.__esModule ? e : { default: e }; }
|
|
19
19
|
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
20
|
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; }
|
|
21
|
-
const oldFocusStyling = `
|
|
22
|
-
outline: solid 3px var(--colorsSemanticFocus500);
|
|
23
|
-
`;
|
|
24
21
|
const ErrorBorder = exports.ErrorBorder = _styledComponents.default.span`
|
|
25
22
|
${({
|
|
26
23
|
reverse,
|
|
@@ -56,8 +53,7 @@ const StyledSwitch = _styledComponents.default.div`
|
|
|
56
53
|
fieldHelpInline,
|
|
57
54
|
labelInline,
|
|
58
55
|
reverse,
|
|
59
|
-
size
|
|
60
|
-
theme
|
|
56
|
+
size
|
|
61
57
|
}) => (0, _styledComponents.css)`
|
|
62
58
|
${_styledSystem.margin}
|
|
63
59
|
${_formField.FieldLineStyle} {
|
|
@@ -91,7 +87,7 @@ const StyledSwitch = _styledComponents.default.div`
|
|
|
91
87
|
|
|
92
88
|
${_hiddenCheckableInput.default}:not([disabled]) {
|
|
93
89
|
&:focus ~ ${_switchSlider.default} {
|
|
94
|
-
${
|
|
90
|
+
${(0, _addFocusStyling.default)()}
|
|
95
91
|
}
|
|
96
92
|
}
|
|
97
93
|
|
|
@@ -335,12 +335,8 @@ const tabTitleStyles = (0, _styledComponents.css)`
|
|
|
335
335
|
cursor: default;
|
|
336
336
|
}
|
|
337
337
|
`}
|
|
338
|
-
|
|
339
|
-
${({
|
|
340
|
-
theme
|
|
341
|
-
}) => `
|
|
342
338
|
&:focus {
|
|
343
|
-
outline: 4px solid
|
|
339
|
+
outline: 4px solid black;
|
|
344
340
|
top: -2px;
|
|
345
341
|
z-index: 6;
|
|
346
342
|
|
|
@@ -356,7 +352,7 @@ const tabTitleStyles = (0, _styledComponents.css)`
|
|
|
356
352
|
border-bottom-left-radius: var(--borderRadius100);
|
|
357
353
|
`}
|
|
358
354
|
|
|
359
|
-
|
|
355
|
+
::before {
|
|
360
356
|
content: "";
|
|
361
357
|
position: absolute;
|
|
362
358
|
top: 0;
|
|
@@ -385,10 +381,10 @@ const tabTitleStyles = (0, _styledComponents.css)`
|
|
|
385
381
|
bottom: 2px;
|
|
386
382
|
right: 1px;
|
|
387
383
|
`}
|
|
388
|
-
}
|
|
384
|
+
}
|
|
385
|
+
}
|
|
389
386
|
}
|
|
390
|
-
|
|
391
|
-
|
|
387
|
+
|
|
392
388
|
${position === "left" && (0, _styledComponents.css)`
|
|
393
389
|
background-color: transparent;
|
|
394
390
|
border-bottom: 0px;
|
package/lib/components/text-editor/__internal__/toolbar/toolbar-button/toolbar-button.style.js
CHANGED
|
@@ -23,23 +23,13 @@ const StyledToolbarButton = _styledComponents.default.button.attrs({
|
|
|
23
23
|
cursor: pointer;
|
|
24
24
|
|
|
25
25
|
${({
|
|
26
|
-
isActive
|
|
27
|
-
theme
|
|
26
|
+
isActive
|
|
28
27
|
}) => (0, _styledComponents.css)`
|
|
29
28
|
:focus,
|
|
30
29
|
:active {
|
|
31
30
|
z-index: 1;
|
|
32
31
|
position: relative;
|
|
33
|
-
|
|
34
|
-
${theme.focusRedesignOptOut && /* istanbul ignore next */
|
|
35
|
-
(0, _styledComponents.css)`
|
|
36
|
-
outline: 2px solid var(--colorsSemanticFocus500);
|
|
37
|
-
outline-offset: -2px;
|
|
38
|
-
`}
|
|
39
|
-
|
|
40
|
-
${!theme.focusRedesignOptOut && (0, _styledComponents.css)`
|
|
41
|
-
${(0, _addFocusStyling.default)()}
|
|
42
|
-
`}
|
|
32
|
+
${(0, _addFocusStyling.default)()}
|
|
43
33
|
}
|
|
44
34
|
|
|
45
35
|
:hover {
|
|
@@ -66,17 +66,13 @@ const StyledEditorContainer = exports.StyledEditorContainer = _styledComponents.
|
|
|
66
66
|
const StyledEditorOutline = exports.StyledEditorOutline = _styledComponents.default.div`
|
|
67
67
|
${({
|
|
68
68
|
isFocused,
|
|
69
|
-
hasError
|
|
70
|
-
theme
|
|
69
|
+
hasError
|
|
71
70
|
}) => (0, _styledComponents.css)`
|
|
72
71
|
border-radius: var(--borderRadius050);
|
|
73
72
|
outline: none;
|
|
74
73
|
|
|
75
74
|
${isFocused && (0, _styledComponents.css)`
|
|
76
|
-
${
|
|
77
|
-
outline: 3px solid var(--colorsSemanticFocus500);
|
|
78
|
-
outline-offset: ${hasError ? "2px" : "1px"};
|
|
79
|
-
`}
|
|
75
|
+
${(0, _addFocusStyling.default)()}
|
|
80
76
|
`}
|
|
81
77
|
`}
|
|
82
78
|
`;
|
|
@@ -64,14 +64,10 @@ const StyledTileSelect = exports.StyledTileSelect = _styledComponents.default.di
|
|
|
64
64
|
}
|
|
65
65
|
`}
|
|
66
66
|
`;
|
|
67
|
-
const oldFocusStyling = `
|
|
68
|
-
outline: solid 3px var(--colorsSemanticFocus500);
|
|
69
|
-
`;
|
|
70
67
|
const StyledFocusWrapper = exports.StyledFocusWrapper = _styledComponents.default.div`
|
|
71
68
|
${({
|
|
72
69
|
checked,
|
|
73
|
-
hasFocus
|
|
74
|
-
theme
|
|
70
|
+
hasFocus
|
|
75
71
|
}) => (0, _styledComponents.css)`
|
|
76
72
|
position: relative;
|
|
77
73
|
border: 1px solid var(--colorsActionMinor250);
|
|
@@ -84,7 +80,7 @@ const StyledFocusWrapper = exports.StyledFocusWrapper = _styledComponents.defaul
|
|
|
84
80
|
`}
|
|
85
81
|
|
|
86
82
|
${hasFocus && (0, _styledComponents.css)`
|
|
87
|
-
${
|
|
83
|
+
${(0, _addFocusStyling.default)()}
|
|
88
84
|
z-index: 15;
|
|
89
85
|
`}
|
|
90
86
|
`}
|
|
@@ -19,10 +19,6 @@ const StyledList = exports.StyledList = _styledComponents.default.ul`
|
|
|
19
19
|
margin: 0;
|
|
20
20
|
padding: 0;
|
|
21
21
|
`;
|
|
22
|
-
const oldFocusStyling = `
|
|
23
|
-
outline: 3px solid var(--colorsSemanticFocus500);
|
|
24
|
-
outline-offset: -3px;
|
|
25
|
-
`;
|
|
26
22
|
const StyledVerticalMenuItem = exports.StyledVerticalMenuItem = _styledComponents.default.div`
|
|
27
23
|
min-height: ${({
|
|
28
24
|
height
|
|
@@ -47,9 +43,7 @@ const StyledVerticalMenuItem = exports.StyledVerticalMenuItem = _styledComponent
|
|
|
47
43
|
}
|
|
48
44
|
|
|
49
45
|
&:focus {
|
|
50
|
-
${(
|
|
51
|
-
theme
|
|
52
|
-
}) => !theme.focusRedesignOptOut ? (0, _addFocusStyling.default)(true) : /* istanbul ignore next */oldFocusStyling}
|
|
46
|
+
${(0, _addFocusStyling.default)(true)}
|
|
53
47
|
}
|
|
54
48
|
|
|
55
49
|
${({
|