carbon-react 102.7.2 → 102.7.3
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/lib/components/dialog/dialog.style.js +0 -1
- package/lib/components/dialog-full-screen/content.style.js +23 -29
- package/lib/components/dialog-full-screen/dialog-full-screen.component.js +1 -16
- package/lib/components/dialog-full-screen/dialog-full-screen.style.js +6 -0
- package/lib/components/form/form.style.js +6 -2
- package/lib/components/pages/page/page.component.js +8 -2
- package/lib/components/pages/pages.style.js +0 -6
- package/lib/components/sidebar/sidebar.component.js +2 -1
- package/package.json +1 -1
|
@@ -18,37 +18,31 @@ const StyledContent = _styledComponents.default.div`
|
|
|
18
18
|
padding: 0 16px;
|
|
19
19
|
flex: 1;
|
|
20
20
|
|
|
21
|
-
${
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
padding-right: 16px;
|
|
28
|
-
padding-left: 16px;
|
|
29
|
-
margin-right: -16px;
|
|
30
|
-
margin-left: -16px;
|
|
21
|
+
${_form.StyledFormContent}.sticky {
|
|
22
|
+
padding-right: 16px;
|
|
23
|
+
padding-left: 16px;
|
|
24
|
+
margin-right: -16px;
|
|
25
|
+
margin-left: -16px;
|
|
31
26
|
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
}
|
|
38
|
-
@media screen and (min-width: 960px) {
|
|
39
|
-
padding-right: 32px;
|
|
40
|
-
padding-left: 32px;
|
|
41
|
-
margin-right: -32px;
|
|
42
|
-
margin-left: -32px;
|
|
43
|
-
}
|
|
44
|
-
@media screen and (min-width: 1260px) {
|
|
45
|
-
padding-right: 40px;
|
|
46
|
-
padding-left: 40px;
|
|
47
|
-
margin-right: -40px;
|
|
48
|
-
margin-left: -40px;
|
|
49
|
-
}
|
|
27
|
+
@media screen and (min-width: 600px) {
|
|
28
|
+
padding-right: 24px;
|
|
29
|
+
padding-left: 24px;
|
|
30
|
+
margin-right: -24px;
|
|
31
|
+
margin-left: -24px;
|
|
50
32
|
}
|
|
51
|
-
|
|
33
|
+
@media screen and (min-width: 960px) {
|
|
34
|
+
padding-right: 32px;
|
|
35
|
+
padding-left: 32px;
|
|
36
|
+
margin-right: -32px;
|
|
37
|
+
margin-left: -32px;
|
|
38
|
+
}
|
|
39
|
+
@media screen and (min-width: 1260px) {
|
|
40
|
+
padding-right: 40px;
|
|
41
|
+
padding-left: 40px;
|
|
42
|
+
margin-right: -40px;
|
|
43
|
+
margin-left: -40px;
|
|
44
|
+
}
|
|
45
|
+
}
|
|
52
46
|
|
|
53
47
|
${_form.StyledFormFooter}.sticky {
|
|
54
48
|
padding: 16px;
|
|
@@ -25,8 +25,6 @@ var _iconButton = _interopRequireDefault(require("../icon-button"));
|
|
|
25
25
|
|
|
26
26
|
var _icon = _interopRequireDefault(require("../icon"));
|
|
27
27
|
|
|
28
|
-
var _useResizeObserver = _interopRequireDefault(require("../../hooks/__internal__/useResizeObserver"));
|
|
29
|
-
|
|
30
28
|
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
|
|
31
29
|
|
|
32
30
|
function _getRequireWildcardCache() { if (typeof WeakMap !== "function") return null; var cache = new WeakMap(); _getRequireWildcardCache = function () { return cache; }; return cache; }
|
|
@@ -54,18 +52,6 @@ const DialogFullScreen = ({
|
|
|
54
52
|
}) => {
|
|
55
53
|
const dialogRef = (0, _react.useRef)();
|
|
56
54
|
const headingRef = (0, _react.useRef)();
|
|
57
|
-
const [headingHeight, setHeadingHeight] = (0, _react.useState)(101);
|
|
58
|
-
|
|
59
|
-
const updateheadingHeight = () => {
|
|
60
|
-
setHeadingHeight(headingRef.current.offsetHeight);
|
|
61
|
-
};
|
|
62
|
-
|
|
63
|
-
(0, _react.useEffect)(() => {
|
|
64
|
-
if (open && headingRef.current) {
|
|
65
|
-
updateheadingHeight();
|
|
66
|
-
}
|
|
67
|
-
}, [open]);
|
|
68
|
-
(0, _useResizeObserver.default)(headingRef, updateheadingHeight, !headingRef.current);
|
|
69
55
|
|
|
70
56
|
const closeIcon = () => {
|
|
71
57
|
if (!showCloseIcon || !onCancel) return null;
|
|
@@ -111,8 +97,7 @@ const DialogFullScreen = ({
|
|
|
111
97
|
hasHeader: title !== undefined,
|
|
112
98
|
"data-element": "content",
|
|
113
99
|
ref: contentRef,
|
|
114
|
-
disableContentPadding: disableContentPadding
|
|
115
|
-
headingHeight: headingHeight
|
|
100
|
+
disableContentPadding: disableContentPadding
|
|
116
101
|
}, children), closeIcon())));
|
|
117
102
|
};
|
|
118
103
|
|
|
@@ -17,6 +17,8 @@ var _fullScreenHeading = _interopRequireDefault(require("../../__internal__/full
|
|
|
17
17
|
|
|
18
18
|
var _heading = require("../heading/heading.style");
|
|
19
19
|
|
|
20
|
+
var _form = require("../form/form.style");
|
|
21
|
+
|
|
20
22
|
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
|
|
21
23
|
|
|
22
24
|
function _getRequireWildcardCache() { if (typeof WeakMap !== "function") return null; var cache = new WeakMap(); _getRequireWildcardCache = function () { return cache; }; return cache; }
|
|
@@ -38,6 +40,10 @@ const StyledDialogFullScreen = _styledComponents.default.div`
|
|
|
38
40
|
display: flex;
|
|
39
41
|
flex-direction: column;
|
|
40
42
|
|
|
43
|
+
${_form.StyledForm} {
|
|
44
|
+
min-height: 100%;
|
|
45
|
+
}
|
|
46
|
+
|
|
41
47
|
${_heading.StyledHeaderContent} {
|
|
42
48
|
align-items: baseline;
|
|
43
49
|
}
|
|
@@ -39,7 +39,7 @@ const StyledFormContent = _styledComponents.default.div`
|
|
|
39
39
|
}) => (0, _styledComponents.css)`
|
|
40
40
|
${stickyFooter && (0, _styledComponents.css)`
|
|
41
41
|
overflow-y: auto;
|
|
42
|
-
|
|
42
|
+
flex: 1;
|
|
43
43
|
`}
|
|
44
44
|
`}
|
|
45
45
|
`;
|
|
@@ -69,6 +69,8 @@ const StyledFormFooter = _styledComponents.default.div`
|
|
|
69
69
|
padding: 16px 32px;
|
|
70
70
|
width: 100%;
|
|
71
71
|
z-index: 1000;
|
|
72
|
+
position: sticky;
|
|
73
|
+
bottom: 0;
|
|
72
74
|
`}
|
|
73
75
|
`}
|
|
74
76
|
`;
|
|
@@ -112,10 +114,11 @@ const StyledForm = _styledComponents.default.form`
|
|
|
112
114
|
}) => stickyFooter && (0, _styledComponents.css)`
|
|
113
115
|
display: flex;
|
|
114
116
|
flex-direction: column;
|
|
117
|
+
position: relative;
|
|
115
118
|
|
|
116
119
|
${isInSidebar && (0, _styledComponents.css)`
|
|
120
|
+
min-height: 100%;
|
|
117
121
|
${StyledFormContent}.sticky {
|
|
118
|
-
height: calc(100vh - 184px);
|
|
119
122
|
padding-right: ${theme.space[4]}px;
|
|
120
123
|
padding-left: ${theme.space[4]}px;
|
|
121
124
|
padding-top: 27px;
|
|
@@ -130,6 +133,7 @@ const StyledForm = _styledComponents.default.form`
|
|
|
130
133
|
width: calc(100% + ${2 * theme.space[4]}px);
|
|
131
134
|
padding-left: ${theme.space[4]}px;
|
|
132
135
|
padding-right: ${theme.space[4]}px;
|
|
136
|
+
bottom: -32px;
|
|
133
137
|
}
|
|
134
138
|
`}
|
|
135
139
|
`}
|
|
@@ -15,7 +15,7 @@ var _tags = _interopRequireDefault(require("../../../__internal__/utils/helpers/
|
|
|
15
15
|
|
|
16
16
|
var _fullScreenHeading = _interopRequireDefault(require("../../../__internal__/full-screen-heading"));
|
|
17
17
|
|
|
18
|
-
var
|
|
18
|
+
var _box = _interopRequireDefault(require("../../box"));
|
|
19
19
|
|
|
20
20
|
var _page = require("./page.style");
|
|
21
21
|
|
|
@@ -41,7 +41,13 @@ const Page = ({
|
|
|
41
41
|
hasContent: title
|
|
42
42
|
}, title), /*#__PURE__*/_react.default.createElement(_page.StyledPageContent, {
|
|
43
43
|
"data-element": "carbon-page-content"
|
|
44
|
-
}, /*#__PURE__*/_react.default.createElement(
|
|
44
|
+
}, /*#__PURE__*/_react.default.createElement(_box.default, {
|
|
45
|
+
boxSizing: "border-box",
|
|
46
|
+
maxWidth: "100%",
|
|
47
|
+
minWidth: "auto",
|
|
48
|
+
margin: "0 auto",
|
|
49
|
+
padding: "4px 0px"
|
|
50
|
+
}, children))));
|
|
45
51
|
};
|
|
46
52
|
|
|
47
53
|
Page.propTypes = {
|
|
@@ -18,12 +18,6 @@ function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { de
|
|
|
18
18
|
const PagesContent = _styledComponents.default.div`
|
|
19
19
|
border: none;
|
|
20
20
|
|
|
21
|
-
.carbon-app-wrapper {
|
|
22
|
-
min-width: auto;
|
|
23
|
-
max-width: 100%;
|
|
24
|
-
padding: 4px 0 0 0;
|
|
25
|
-
}
|
|
26
|
-
|
|
27
21
|
${_heading.StyledHeading} {
|
|
28
22
|
padding-left: 45px;
|
|
29
23
|
margin-bottom: 34px;
|
|
@@ -80,7 +80,8 @@ const Sidebar = /*#__PURE__*/_react.default.forwardRef(({
|
|
|
80
80
|
p: 4,
|
|
81
81
|
pt: "27px",
|
|
82
82
|
scrollVariant: "light",
|
|
83
|
-
overflow: "auto"
|
|
83
|
+
overflow: "auto",
|
|
84
|
+
flex: "1"
|
|
84
85
|
}, /*#__PURE__*/_react.default.createElement(SidebarContext.Provider, {
|
|
85
86
|
value: {
|
|
86
87
|
isInSidebar: true
|