carbon-react 135.1.2 → 136.0.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.
@@ -13,7 +13,7 @@ const StyledAccordionContainer = styled.div`
13
13
  align-items: ${({
14
14
  buttonHeading,
15
15
  variant
16
- }) => buttonHeading || variant === "subtle" ? "flex-start" : "stretch"};
16
+ }) => (!buttonHeading || variant !== "subtle") && "stretch"};
17
17
  justify-content: center;
18
18
  flex-direction: column;
19
19
  box-sizing: border-box;
@@ -138,6 +138,7 @@ const StyledAccordionTitleContainer = styled.div`
138
138
  color: var(--colorsActionMajor500);
139
139
  padding: var(--spacing025);
140
140
  margin-bottom: ${isExpanded && "var(--spacing200)"};
141
+ width: fit-content;
141
142
 
142
143
  ${StyledAccordionIcon} {
143
144
  color: var(--colorsActionMajor500);
@@ -216,12 +217,6 @@ const StyledAccordionContent = styled.div`
216
217
  padding-top: var(--spacing100);
217
218
  overflow: hidden;
218
219
 
219
- ${({
220
- disableContentPadding
221
- }) => disableContentPadding && css`
222
- padding: 0;
223
- `}
224
-
225
220
  ${({
226
221
  variant
227
222
  }) => variant === "subtle" && css`
@@ -229,6 +224,12 @@ const StyledAccordionContent = styled.div`
229
224
  padding: var(--spacing100) var(--spacing200) var(--spacing300);
230
225
  border-left: 2px solid var(--colorsUtilityMajor100);
231
226
  `}
227
+
228
+ ${({
229
+ disableContentPadding
230
+ }) => disableContentPadding && css`
231
+ padding: 0;
232
+ `}
232
233
  `;
233
234
  StyledAccordionGroup.defaultProps = {
234
235
  theme: baseTheme
@@ -23,8 +23,6 @@ export interface TextareaProps extends ValidationProps, MarginProps, Omit<Common
23
23
  characterLimit?: number;
24
24
  /** Type of the icon that will be rendered next to the input */
25
25
  children?: React.ReactNode;
26
- /** The visible width of the text control, in average character widths */
27
- cols?: number;
28
26
  /** If true, the component will be disabled */
29
27
  disabled?: boolean;
30
28
  /** Indicate that error has occurred
@@ -83,10 +81,6 @@ export interface TextareaProps extends ValidationProps, MarginProps, Omit<Common
83
81
  isOptional?: boolean;
84
82
  /** The number of visible text lines for the control */
85
83
  rows?: number;
86
- /** One of type of size to apply to the textarea */
87
- size?: "small" | "medium" | "large";
88
- /** Message to be displayed in a Tooltip when the user hovers over the help icon */
89
- tooltipMessage?: string;
90
84
  /** Overrides the default tooltip position */
91
85
  tooltipPosition?: "top" | "bottom" | "left" | "right";
92
86
  /** When true, validation icon will be placed on label instead of being placed on the input */
@@ -25,7 +25,6 @@ const Textarea = /*#__PURE__*/React.forwardRef(({
25
25
  inputHint,
26
26
  fieldHelp,
27
27
  label,
28
- size,
29
28
  children,
30
29
  characterLimit,
31
30
  onChange,
@@ -44,7 +43,6 @@ const Textarea = /*#__PURE__*/React.forwardRef(({
44
43
  placeholder,
45
44
  expandable = false,
46
45
  rows,
47
- cols,
48
46
  validationOnLabel = false,
49
47
  adaptiveLabelBreakpoint,
50
48
  inputWidth,
@@ -153,7 +151,6 @@ const Textarea = /*#__PURE__*/React.forwardRef(({
153
151
  const inputHintId = inputHint ? hintId.current : undefined;
154
152
  const combinedAriaDescribedBy = [ariaDescribedBy, inputHintId, visuallyHiddenHintId].filter(Boolean).join(" ");
155
153
  const input = /*#__PURE__*/React.createElement(InputPresentation, {
156
- size: size,
157
154
  disabled: disabled,
158
155
  readOnly: readOnly,
159
156
  inputWidth: typeof inputWidth === "number" ? inputWidth : 100 - labelWidth,
@@ -176,7 +173,6 @@ const Textarea = /*#__PURE__*/React.forwardRef(({
176
173
  readOnly: readOnly,
177
174
  placeholder: disabled ? "" : placeholder,
178
175
  rows: rows,
179
- cols: cols,
180
176
  id: id,
181
177
  as: "textarea",
182
178
  validationIconId: validationRedesignOptIn ? undefined : validationId,
@@ -186,7 +182,6 @@ const Textarea = /*#__PURE__*/React.forwardRef(({
186
182
  disabled: disabled,
187
183
  readOnly: readOnly,
188
184
  inputIcon: inputIcon,
189
- size: size,
190
185
  error: error,
191
186
  warning: warning,
192
187
  info: info,
@@ -306,7 +301,6 @@ if (process.env.NODE_ENV !== "production") {
306
301
  "children": PropTypes.node,
307
302
  "className": PropTypes.string,
308
303
  "color": PropTypes.string,
309
- "cols": PropTypes.number,
310
304
  "content": PropTypes.string,
311
305
  "contentEditable": PropTypes.oneOfType([PropTypes.oneOf(["false", "inherit", "true"]), PropTypes.bool]),
312
306
  "contextMenu": PropTypes.string,
@@ -745,7 +739,6 @@ if (process.env.NODE_ENV !== "production") {
745
739
  })]),
746
740
  "rows": PropTypes.number,
747
741
  "security": PropTypes.string,
748
- "size": PropTypes.oneOf(["large", "medium", "small"]),
749
742
  "slot": PropTypes.string,
750
743
  "spellCheck": PropTypes.oneOfType([PropTypes.oneOf(["false", "true"]), PropTypes.bool]),
751
744
  "src": PropTypes.string,
@@ -755,7 +748,6 @@ if (process.env.NODE_ENV !== "production") {
755
748
  "suppressHydrationWarning": PropTypes.bool,
756
749
  "tabIndex": PropTypes.number,
757
750
  "title": PropTypes.string,
758
- "tooltipMessage": PropTypes.string,
759
751
  "tooltipPosition": PropTypes.oneOf(["bottom", "left", "right", "top"]),
760
752
  "translate": PropTypes.oneOf(["no", "yes"]),
761
753
  "typeof": PropTypes.string,
@@ -22,7 +22,7 @@ const StyledAccordionContainer = exports.StyledAccordionContainer = _styledCompo
22
22
  align-items: ${({
23
23
  buttonHeading,
24
24
  variant
25
- }) => buttonHeading || variant === "subtle" ? "flex-start" : "stretch"};
25
+ }) => (!buttonHeading || variant !== "subtle") && "stretch"};
26
26
  justify-content: center;
27
27
  flex-direction: column;
28
28
  box-sizing: border-box;
@@ -147,6 +147,7 @@ const StyledAccordionTitleContainer = exports.StyledAccordionTitleContainer = _s
147
147
  color: var(--colorsActionMajor500);
148
148
  padding: var(--spacing025);
149
149
  margin-bottom: ${isExpanded && "var(--spacing200)"};
150
+ width: fit-content;
150
151
 
151
152
  ${StyledAccordionIcon} {
152
153
  color: var(--colorsActionMajor500);
@@ -225,12 +226,6 @@ const StyledAccordionContent = exports.StyledAccordionContent = _styledComponent
225
226
  padding-top: var(--spacing100);
226
227
  overflow: hidden;
227
228
 
228
- ${({
229
- disableContentPadding
230
- }) => disableContentPadding && (0, _styledComponents.css)`
231
- padding: 0;
232
- `}
233
-
234
229
  ${({
235
230
  variant
236
231
  }) => variant === "subtle" && (0, _styledComponents.css)`
@@ -238,6 +233,12 @@ const StyledAccordionContent = exports.StyledAccordionContent = _styledComponent
238
233
  padding: var(--spacing100) var(--spacing200) var(--spacing300);
239
234
  border-left: 2px solid var(--colorsUtilityMajor100);
240
235
  `}
236
+
237
+ ${({
238
+ disableContentPadding
239
+ }) => disableContentPadding && (0, _styledComponents.css)`
240
+ padding: 0;
241
+ `}
241
242
  `;
242
243
  StyledAccordionGroup.defaultProps = {
243
244
  theme: _themes.baseTheme
@@ -23,8 +23,6 @@ export interface TextareaProps extends ValidationProps, MarginProps, Omit<Common
23
23
  characterLimit?: number;
24
24
  /** Type of the icon that will be rendered next to the input */
25
25
  children?: React.ReactNode;
26
- /** The visible width of the text control, in average character widths */
27
- cols?: number;
28
26
  /** If true, the component will be disabled */
29
27
  disabled?: boolean;
30
28
  /** Indicate that error has occurred
@@ -83,10 +81,6 @@ export interface TextareaProps extends ValidationProps, MarginProps, Omit<Common
83
81
  isOptional?: boolean;
84
82
  /** The number of visible text lines for the control */
85
83
  rows?: number;
86
- /** One of type of size to apply to the textarea */
87
- size?: "small" | "medium" | "large";
88
- /** Message to be displayed in a Tooltip when the user hovers over the help icon */
89
- tooltipMessage?: string;
90
84
  /** Overrides the default tooltip position */
91
85
  tooltipPosition?: "top" | "bottom" | "left" | "right";
92
86
  /** When true, validation icon will be placed on label instead of being placed on the input */
@@ -34,7 +34,6 @@ const Textarea = exports.OriginalTextarea = exports.Textarea = /*#__PURE__*/_rea
34
34
  inputHint,
35
35
  fieldHelp,
36
36
  label,
37
- size,
38
37
  children,
39
38
  characterLimit,
40
39
  onChange,
@@ -53,7 +52,6 @@ const Textarea = exports.OriginalTextarea = exports.Textarea = /*#__PURE__*/_rea
53
52
  placeholder,
54
53
  expandable = false,
55
54
  rows,
56
- cols,
57
55
  validationOnLabel = false,
58
56
  adaptiveLabelBreakpoint,
59
57
  inputWidth,
@@ -162,7 +160,6 @@ const Textarea = exports.OriginalTextarea = exports.Textarea = /*#__PURE__*/_rea
162
160
  const inputHintId = inputHint ? hintId.current : undefined;
163
161
  const combinedAriaDescribedBy = [ariaDescribedBy, inputHintId, visuallyHiddenHintId].filter(Boolean).join(" ");
164
162
  const input = /*#__PURE__*/_react.default.createElement(_input.InputPresentation, {
165
- size: size,
166
163
  disabled: disabled,
167
164
  readOnly: readOnly,
168
165
  inputWidth: typeof inputWidth === "number" ? inputWidth : 100 - labelWidth,
@@ -185,7 +182,6 @@ const Textarea = exports.OriginalTextarea = exports.Textarea = /*#__PURE__*/_rea
185
182
  readOnly: readOnly,
186
183
  placeholder: disabled ? "" : placeholder,
187
184
  rows: rows,
188
- cols: cols,
189
185
  id: id,
190
186
  as: "textarea",
191
187
  validationIconId: validationRedesignOptIn ? undefined : validationId,
@@ -195,7 +191,6 @@ const Textarea = exports.OriginalTextarea = exports.Textarea = /*#__PURE__*/_rea
195
191
  disabled: disabled,
196
192
  readOnly: readOnly,
197
193
  inputIcon: inputIcon,
198
- size: size,
199
194
  error: error,
200
195
  warning: warning,
201
196
  info: info,
@@ -315,7 +310,6 @@ if (process.env.NODE_ENV !== "production") {
315
310
  "children": _propTypes.default.node,
316
311
  "className": _propTypes.default.string,
317
312
  "color": _propTypes.default.string,
318
- "cols": _propTypes.default.number,
319
313
  "content": _propTypes.default.string,
320
314
  "contentEditable": _propTypes.default.oneOfType([_propTypes.default.oneOf(["false", "inherit", "true"]), _propTypes.default.bool]),
321
315
  "contextMenu": _propTypes.default.string,
@@ -754,7 +748,6 @@ if (process.env.NODE_ENV !== "production") {
754
748
  })]),
755
749
  "rows": _propTypes.default.number,
756
750
  "security": _propTypes.default.string,
757
- "size": _propTypes.default.oneOf(["large", "medium", "small"]),
758
751
  "slot": _propTypes.default.string,
759
752
  "spellCheck": _propTypes.default.oneOfType([_propTypes.default.oneOf(["false", "true"]), _propTypes.default.bool]),
760
753
  "src": _propTypes.default.string,
@@ -764,7 +757,6 @@ if (process.env.NODE_ENV !== "production") {
764
757
  "suppressHydrationWarning": _propTypes.default.bool,
765
758
  "tabIndex": _propTypes.default.number,
766
759
  "title": _propTypes.default.string,
767
- "tooltipMessage": _propTypes.default.string,
768
760
  "tooltipPosition": _propTypes.default.oneOf(["bottom", "left", "right", "top"]),
769
761
  "translate": _propTypes.default.oneOf(["no", "yes"]),
770
762
  "typeof": _propTypes.default.string,
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "carbon-react",
3
- "version": "135.1.2",
3
+ "version": "136.0.0",
4
4
  "description": "A library of reusable React components for easily building user interfaces.",
5
5
  "files": [
6
6
  "lib",