carbon-react 102.6.1 → 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.
@@ -74,7 +74,6 @@ const DialogStyle = _styledComponents.default.div`
74
74
  }
75
75
 
76
76
  ${_form.StyledFormContent}.sticky {
77
- height: calc(100vh - 210px);
78
77
  padding-right: ${HORIZONTAL_PADDING}px;
79
78
  padding-left: ${HORIZONTAL_PADDING}px;
80
79
  padding-top: 20px;
@@ -18,37 +18,31 @@ const StyledContent = _styledComponents.default.div`
18
18
  padding: 0 16px;
19
19
  flex: 1;
20
20
 
21
- ${({
22
- headingHeight
23
- }) => (0, _styledComponents.css)`
24
- ${_form.StyledFormContent}.sticky {
25
- height: calc(100vh - ${headingHeight + 72}px);
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
- @media screen and (min-width: 600px) {
33
- padding-right: 24px;
34
- padding-left: 24px;
35
- margin-right: -24px;
36
- margin-left: -24px;
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
- height: calc(100vh - 72px);
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
  `}
@@ -9,8 +9,6 @@ var _styledComponents = _interopRequireWildcard(require("styled-components"));
9
9
 
10
10
  var _propTypes = _interopRequireDefault(require("prop-types"));
11
11
 
12
- var _base = _interopRequireDefault(require("../../style/themes/base"));
13
-
14
12
  var _loader = require("./loader.config");
15
13
 
16
14
  function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
@@ -59,18 +57,17 @@ const getDimentions = size => {
59
57
 
60
58
  const StyledLoaderSquare = _styledComponents.default.div`
61
59
  ${({
62
- theme,
63
60
  size,
64
61
  isInsideButton,
65
62
  isActive
66
63
  }) => (0, _styledComponents.css)`
67
64
  animation: ${loaderAnimation} 1s infinite ease-in-out both;
68
- background-color: ${theme.colors.primary};
65
+ background-color: var(--colorsActionMajor500);
69
66
  display: inline-block;
70
67
  ${getDimentions(size)}
71
68
 
72
69
  ${isInsideButton && (0, _styledComponents.css)`
73
- background-color: ${isActive ? theme.colors.white : theme.colors.border};
70
+ background-color: ${isActive ? "var(--colorsYang100)" : "var(--colorsSemanticNeutral500)"};
74
71
  `}
75
72
 
76
73
  &:nth-of-type(1) {
@@ -88,7 +85,6 @@ const StyledLoaderSquare = _styledComponents.default.div`
88
85
  `}
89
86
  `;
90
87
  StyledLoaderSquare.defaultProps = {
91
- theme: _base.default,
92
88
  size: "small",
93
89
  isInsideButton: false,
94
90
  isActive: true
@@ -40,24 +40,22 @@ const innerBarAnimation = (0, _styledComponents.keyframes)`
40
40
  `;
41
41
  const StyledLoaderBar = _styledComponents.default.div`
42
42
  ${({
43
- size,
44
- theme
43
+ size
45
44
  }) => (0, _styledComponents.css)`
46
45
  display: inline-block;
47
46
  height: ${getHeight(size)};
48
47
  width: 100%;
49
- background-color: ${theme.colors.loadingBarBackground};
48
+ background-color: var(--colorsActionMajor150);
50
49
  overflow: hidden;
51
50
  position: relative;
52
51
  `}
53
52
  `;
54
53
  const InnerBar = _styledComponents.default.div`
55
54
  ${({
56
- theme,
57
55
  size
58
56
  }) => (0, _styledComponents.css)`
59
57
  position: absolute;
60
- background-color: ${theme.colors.primary};
58
+ background-color: var(--colorsActionMajor500);
61
59
  width: ${INNER_BAR_LENGTH};
62
60
  height: ${getHeight(size)};
63
61
  animation: 2s ${innerBarAnimation} linear 0s infinite normal none running;
@@ -82,11 +80,9 @@ StyledLoader.defaultProps = {
82
80
  theme: _base.default
83
81
  };
84
82
  StyledLoaderBar.defaultProps = {
85
- theme: _base.default,
86
83
  size: "medium"
87
84
  };
88
85
  InnerBar.defaultProps = {
89
- theme: _base.default,
90
86
  size: "medium"
91
87
  };
92
88
  StyledLoaderBar.propTypes = {
@@ -14,6 +14,7 @@ function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { de
14
14
  const MessageContentStyle = _styledComponents.default.div`
15
15
  padding: 15px 50px 15px 20px;
16
16
  white-space: pre-wrap;
17
+ flex: 1;
17
18
 
18
19
  .carbon-content__title {
19
20
  margin-bottom: 2px;
@@ -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 _appWrapper = _interopRequireDefault(require("../../app-wrapper"));
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(_appWrapper.default, null, children))));
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
@@ -194,6 +194,7 @@ const Textarea = ({
194
194
  "aria-describedby": ariaDescribedBy,
195
195
  autoFocus: autoFocus,
196
196
  name: name,
197
+ value: value,
197
198
  ref: inputRef,
198
199
  maxLength: enforceCharacterLimit && characterLimit ? characterLimit : undefined,
199
200
  onChange: onChange,
@@ -31,7 +31,8 @@ var _default = palette => {
31
31
  get compatibility() {
32
32
  return {
33
33
  colorsActionMajor500: this.colors.primary,
34
- colorsActionMajor600: this.colors.secondary
34
+ colorsActionMajor600: this.colors.secondary,
35
+ colorsActionMajor150: this.colors.loadingBarBackground
35
36
  };
36
37
  }
37
38
 
@@ -343,6 +343,7 @@ var _default = palette => {
343
343
 
344
344
  get compatibility() {
345
345
  return { ..._common.default,
346
+ colorsActionMajor150: this.colors.loadingBarBackground,
346
347
  colorsActionMajor500: this.colors.primary,
347
348
  colorsActionMajor600: this.colors.secondary,
348
349
  colorsActionDisabled500: this.disabled.background,
@@ -25,7 +25,8 @@ var _default = palette => {
25
25
  get compatibility() {
26
26
  return {
27
27
  colorsActionMajor500: this.colors.primary,
28
- colorsActionMajor600: this.colors.secondary
28
+ colorsActionMajor600: this.colors.secondary,
29
+ colorsActionMajor150: this.colors.loadingBarBackground
29
30
  };
30
31
  }
31
32
 
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "carbon-react",
3
- "version": "102.6.1",
3
+ "version": "102.7.3",
4
4
  "description": "A library of reusable React components for easily building user interfaces.",
5
5
  "engineStrict": true,
6
6
  "engines": {