carbon-react 142.0.0 → 142.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/components/heading/heading.style.js +2 -1
- package/esm/components/link-preview/__internal__/placeholder.component.js +2 -1
- package/esm/components/link-preview/link-preview.component.js +1 -0
- package/esm/components/message/__internal__/message-content/message-content.component.js +2 -1
- package/esm/components/pod/pod.component.js +3 -0
- package/lib/components/heading/heading.style.js +2 -1
- package/lib/components/link-preview/__internal__/placeholder.component.js +2 -1
- package/lib/components/link-preview/link-preview.component.js +1 -0
- package/lib/components/message/__internal__/message-content/message-content.component.js +2 -1
- package/lib/components/pod/pod.component.js +3 -0
- package/package.json +1 -1
|
@@ -47,11 +47,12 @@ const StyledHeader = styled.div`
|
|
|
47
47
|
const StyledHeadingBackButton = styled(Link)`
|
|
48
48
|
margin-right: 5px;
|
|
49
49
|
margin-top: 2px;
|
|
50
|
-
|
|
50
|
+
box-shadow: none;
|
|
51
51
|
a,
|
|
52
52
|
button {
|
|
53
53
|
margin: 0 1px 0 0;
|
|
54
54
|
text-decoration: none;
|
|
55
|
+
display: block;
|
|
55
56
|
|
|
56
57
|
&:focus {
|
|
57
58
|
background-color: transparent;
|
|
@@ -36,7 +36,8 @@ const Square = styled.div`
|
|
|
36
36
|
}) => left};
|
|
37
37
|
`;
|
|
38
38
|
const Placeholder = () => /*#__PURE__*/React.createElement(StyledPlaceHolder, {
|
|
39
|
-
"data-component": "link preview image placeholder"
|
|
39
|
+
"data-component": "link preview image placeholder",
|
|
40
|
+
"data-role": "link preview image placeholder"
|
|
40
41
|
}, /*#__PURE__*/React.createElement(Circle, null), /*#__PURE__*/React.createElement(Square, {
|
|
41
42
|
color: "var(--colorsUtilityMajor050)",
|
|
42
43
|
top: "120px",
|
|
@@ -40,6 +40,7 @@ export const LinkPreview = ({
|
|
|
40
40
|
rel: "noopener noreferrer"
|
|
41
41
|
} : {};
|
|
42
42
|
return /*#__PURE__*/React.createElement(StyledLinkPreview, _extends({
|
|
43
|
+
"data-role": "link-preview",
|
|
43
44
|
as: loadingState ? "div" : as,
|
|
44
45
|
tabIndex: loadingState || as === "div" ? -1 : 0
|
|
45
46
|
}, linkProps, rest), imageProps().src ? /*#__PURE__*/React.createElement(Image, imageProps()) : /*#__PURE__*/React.createElement(Placeholder, null), /*#__PURE__*/React.createElement(StyledPreviewWrapper, {
|
|
@@ -11,7 +11,8 @@ const MessageContent = ({
|
|
|
11
11
|
return /*#__PURE__*/React.createElement(MessageContentStyle, {
|
|
12
12
|
showCloseIcon: showCloseIcon,
|
|
13
13
|
reduceLeftPadding: reduceLeftPadding,
|
|
14
|
-
"data-element": "message-content"
|
|
14
|
+
"data-element": "message-content",
|
|
15
|
+
"data-role": "message-content"
|
|
15
16
|
}, /*#__PURE__*/React.createElement(Content, {
|
|
16
17
|
title: title
|
|
17
18
|
}, children));
|
|
@@ -61,6 +61,7 @@ const Pod = /*#__PURE__*/React.forwardRef(({
|
|
|
61
61
|
"data-role": dataRole
|
|
62
62
|
}, rest), /*#__PURE__*/React.createElement(StyledBlock, _extends({
|
|
63
63
|
"data-element": "block",
|
|
64
|
+
"data-role": "pod-block",
|
|
64
65
|
contentTriggersEdit: shouldContentHaveEditEvents,
|
|
65
66
|
hasButtons: hasButtons,
|
|
66
67
|
fullWidth: editContentFullWidth,
|
|
@@ -77,6 +78,7 @@ const Pod = /*#__PURE__*/React.forwardRef(({
|
|
|
77
78
|
"data-element": "content",
|
|
78
79
|
size: size
|
|
79
80
|
}, title && /*#__PURE__*/React.createElement(StyledHeader, {
|
|
81
|
+
"data-role": "pod-content-header",
|
|
80
82
|
alignTitle: alignTitle,
|
|
81
83
|
internalEditButton: internalEditButton,
|
|
82
84
|
size: size
|
|
@@ -91,6 +93,7 @@ const Pod = /*#__PURE__*/React.forwardRef(({
|
|
|
91
93
|
softDelete: softDelete
|
|
92
94
|
}, footer)), hasButtons && /*#__PURE__*/React.createElement(StyledActionsContainer, {
|
|
93
95
|
"data-element": "action-button-container",
|
|
96
|
+
"data-role": "action-button-container",
|
|
94
97
|
internalEditButton: internalEditButton
|
|
95
98
|
}, softDelete && onUndo && /*#__PURE__*/React.createElement(StyledUndoButton, {
|
|
96
99
|
"aria-label": l.pod.undo(),
|
|
@@ -56,11 +56,12 @@ const StyledHeader = exports.StyledHeader = _styledComponents.default.div`
|
|
|
56
56
|
const StyledHeadingBackButton = exports.StyledHeadingBackButton = (0, _styledComponents.default)(_link.default)`
|
|
57
57
|
margin-right: 5px;
|
|
58
58
|
margin-top: 2px;
|
|
59
|
-
|
|
59
|
+
box-shadow: none;
|
|
60
60
|
a,
|
|
61
61
|
button {
|
|
62
62
|
margin: 0 1px 0 0;
|
|
63
63
|
text-decoration: none;
|
|
64
|
+
display: block;
|
|
64
65
|
|
|
65
66
|
&:focus {
|
|
66
67
|
background-color: transparent;
|
|
@@ -43,7 +43,8 @@ const Square = _styledComponents.default.div`
|
|
|
43
43
|
}) => left};
|
|
44
44
|
`;
|
|
45
45
|
const Placeholder = () => /*#__PURE__*/_react.default.createElement(StyledPlaceHolder, {
|
|
46
|
-
"data-component": "link preview image placeholder"
|
|
46
|
+
"data-component": "link preview image placeholder",
|
|
47
|
+
"data-role": "link preview image placeholder"
|
|
47
48
|
}, /*#__PURE__*/_react.default.createElement(Circle, null), /*#__PURE__*/_react.default.createElement(Square, {
|
|
48
49
|
color: "var(--colorsUtilityMajor050)",
|
|
49
50
|
top: "120px",
|
|
@@ -47,6 +47,7 @@ const LinkPreview = ({
|
|
|
47
47
|
rel: "noopener noreferrer"
|
|
48
48
|
} : {};
|
|
49
49
|
return /*#__PURE__*/_react.default.createElement(_linkPreview.StyledLinkPreview, _extends({
|
|
50
|
+
"data-role": "link-preview",
|
|
50
51
|
as: loadingState ? "div" : as,
|
|
51
52
|
tabIndex: loadingState || as === "div" ? -1 : 0
|
|
52
53
|
}, linkProps, rest), imageProps().src ? /*#__PURE__*/_react.default.createElement(_image.default, imageProps()) : /*#__PURE__*/_react.default.createElement(_placeholder.default, null), /*#__PURE__*/_react.default.createElement(_linkPreview.StyledPreviewWrapper, {
|
|
@@ -18,7 +18,8 @@ const MessageContent = ({
|
|
|
18
18
|
return /*#__PURE__*/_react.default.createElement(_messageContent.default, {
|
|
19
19
|
showCloseIcon: showCloseIcon,
|
|
20
20
|
reduceLeftPadding: reduceLeftPadding,
|
|
21
|
-
"data-element": "message-content"
|
|
21
|
+
"data-element": "message-content",
|
|
22
|
+
"data-role": "message-content"
|
|
22
23
|
}, /*#__PURE__*/_react.default.createElement(_content.default, {
|
|
23
24
|
title: title
|
|
24
25
|
}, children));
|
|
@@ -70,6 +70,7 @@ const Pod = /*#__PURE__*/_react.default.forwardRef(({
|
|
|
70
70
|
"data-role": dataRole
|
|
71
71
|
}, rest), /*#__PURE__*/_react.default.createElement(_pod.StyledBlock, _extends({
|
|
72
72
|
"data-element": "block",
|
|
73
|
+
"data-role": "pod-block",
|
|
73
74
|
contentTriggersEdit: shouldContentHaveEditEvents,
|
|
74
75
|
hasButtons: hasButtons,
|
|
75
76
|
fullWidth: editContentFullWidth,
|
|
@@ -86,6 +87,7 @@ const Pod = /*#__PURE__*/_react.default.forwardRef(({
|
|
|
86
87
|
"data-element": "content",
|
|
87
88
|
size: size
|
|
88
89
|
}, title && /*#__PURE__*/_react.default.createElement(_pod.StyledHeader, {
|
|
90
|
+
"data-role": "pod-content-header",
|
|
89
91
|
alignTitle: alignTitle,
|
|
90
92
|
internalEditButton: internalEditButton,
|
|
91
93
|
size: size
|
|
@@ -100,6 +102,7 @@ const Pod = /*#__PURE__*/_react.default.forwardRef(({
|
|
|
100
102
|
softDelete: softDelete
|
|
101
103
|
}, footer)), hasButtons && /*#__PURE__*/_react.default.createElement(_pod.StyledActionsContainer, {
|
|
102
104
|
"data-element": "action-button-container",
|
|
105
|
+
"data-role": "action-button-container",
|
|
103
106
|
internalEditButton: internalEditButton
|
|
104
107
|
}, softDelete && onUndo && /*#__PURE__*/_react.default.createElement(_pod.StyledUndoButton, {
|
|
105
108
|
"aria-label": l.pod.undo(),
|