carbon-react 102.7.1 → 102.8.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.
@@ -47,8 +47,7 @@ const CheckboxStyle = _styledComponents.default.div`
47
47
  inputWidth,
48
48
  reverse,
49
49
  size,
50
- adaptiveSpacingSmallScreen,
51
- theme
50
+ adaptiveSpacingSmallScreen
52
51
  }) => (0, _styledComponents.css)`
53
52
  ${adaptiveSpacingSmallScreen && "margin-left: 0;"}
54
53
 
@@ -61,13 +60,13 @@ const CheckboxStyle = _styledComponents.default.div`
61
60
  }
62
61
 
63
62
  svg {
64
- background-color: ${theme.colors.white};
63
+ background-color: var(--colorsUtilityYang100);
65
64
  ${!disabled && (0, _styledComponents.css)`
66
- border: 1px solid ${theme.colors.border};
65
+ border: 1px solid var(--colorsUtilityMajor300);
67
66
 
68
- ${info && `border: 1px solid ${theme.colors.info};`}
69
- ${warning && `border: 1px solid ${theme.colors.warning};`}
70
- ${error && `border: 2px solid ${theme.colors.error};`}
67
+ ${info && `border: 1px solid var(--colorsSemanticInfo500);`}
68
+ ${warning && `border: 1px solid var(--colorsSemanticCaution500);`}
69
+ ${error && `border: 2px solid var(--colorsSemanticNegative500);`}
71
70
  `}
72
71
  }
73
72
 
@@ -91,7 +90,7 @@ const CheckboxStyle = _styledComponents.default.div`
91
90
  ${_hiddenCheckableInput.default}:not([disabled]) {
92
91
  &:focus + ${_checkableInputSvgWrapper.default},
93
92
  &:hover + ${_checkableInputSvgWrapper.default} {
94
- box-shadow: 0 0 0 3px ${theme.colors.focus};
93
+ box-shadow: 0 0 0 3px var(--colorsSemanticFocus500);
95
94
  }
96
95
  }
97
96
 
@@ -103,7 +102,7 @@ const CheckboxStyle = _styledComponents.default.div`
103
102
  ${_fieldHelp.default} {
104
103
  margin-left: 16px;
105
104
  margin-top: 0;
106
- padding-left: ${labelSpacing * theme.spacing}px;
105
+ padding-left: ${labelSpacing === 1 ? "var(--spacing100)" : "var(--spacing200)"};
107
106
  }
108
107
 
109
108
  ${_validationIcon.default} {
@@ -126,7 +125,7 @@ const CheckboxStyle = _styledComponents.default.div`
126
125
 
127
126
  ${_fieldHelp.default} {
128
127
  margin-left: 24px;
129
- padding-left: ${labelSpacing * theme.spacing}px;
128
+ padding-left: ${labelSpacing === 1 ? "var(--spacing100)" : "var(--spacing200)"};
130
129
  }
131
130
 
132
131
  ${fieldHelpInline && (0, _styledComponents.css)`
@@ -137,21 +136,21 @@ const CheckboxStyle = _styledComponents.default.div`
137
136
  `}
138
137
 
139
138
  ${_hiddenCheckableInput.default}:checked ~ ${_checkableInputSvgWrapper.default} svg path {
140
- fill: ${theme.checkable.checked};
139
+ fill: var(--colorsUtilityYin090);
141
140
  }
142
141
 
143
142
  ${disabled && (0, _styledComponents.css)`
144
143
  svg {
145
- background-color: ${theme.disabled.input};
146
- border: 1px solid ${theme.disabled.border};
144
+ background-color: var(--colorsUtilityDisabled400);
145
+ border: 1px solid var(--colorsUtilityDisabled600);
147
146
  }
148
147
 
149
148
  svg path {
150
- fill: ${theme.disabled.input};
149
+ fill: var(--colorsUtilityDisabled400);
151
150
  }
152
151
 
153
152
  ${_hiddenCheckableInput.default}:checked ~ ${_checkableInputSvgWrapper.default} svg path {
154
- fill: ${theme.disabled.border};
153
+ fill: var(--colorsUtilityYin030);
155
154
  }
156
155
 
157
156
  ${_checkableInputSvgWrapper.default} {
@@ -211,7 +210,10 @@ CheckboxStyle.propTypes = {
211
210
  info: _propTypes.default.oneOfType([_propTypes.default.bool, _propTypes.default.string]),
212
211
  fieldHelpInline: _propTypes.default.bool,
213
212
  inputWidth: _propTypes.default.oneOfType([_propTypes.default.number, _propTypes.default.string]),
214
- size: _propTypes.default.string
213
+ size: _propTypes.default.string,
214
+ labelSpacing: _propTypes.default.oneOf([1, 2]),
215
+ reverse: _propTypes.default.bool,
216
+ adaptiveSpacingSmallScreen: _propTypes.default.bool
215
217
  };
216
218
  const StyledCheckboxGroup = _styledComponents.default.div`
217
219
  display: flex;
@@ -249,8 +251,8 @@ const StyledCheckboxGroup = _styledComponents.default.div`
249
251
  `}
250
252
  `;
251
253
  exports.StyledCheckboxGroup = StyledCheckboxGroup;
252
- StyledCheckboxGroup.defaultProps = {
253
- theme: _base.default
254
+ StyledCheckboxGroup.propTypes = {
255
+ legendInline: _propTypes.default.bool
254
256
  };
255
257
  var _default = CheckboxStyle;
256
258
  exports.default = _default;
@@ -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
  `}
@@ -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
@@ -183,7 +183,8 @@ const SplitButton = ({
183
183
  "aria-expanded": showAdditionalButtons,
184
184
  "aria-label": "Show more",
185
185
  "data-element": "toggle-button",
186
- key: "toggle-button"
186
+ key: "toggle-button",
187
+ type: "button"
187
188
  }, toggleButtonProps()), /*#__PURE__*/_react.default.createElement(_icon.default, {
188
189
  type: "dropdown",
189
190
  bgSize: "extra-small",
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "carbon-react",
3
- "version": "102.7.1",
3
+ "version": "102.8.0",
4
4
  "description": "A library of reusable React components for easily building user interfaces.",
5
5
  "engineStrict": true,
6
6
  "engines": {