carbon-react 147.1.0 → 147.2.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.
@@ -0,0 +1,2 @@
1
+ declare const getColoursForPortrait: (backgroundColour: string | undefined, darkBackground?: boolean, largeText?: boolean, strict?: boolean, foregroundColor?: string | undefined) => string;
2
+ export default getColoursForPortrait;
@@ -0,0 +1,75 @@
1
+ const getContrastRatio = (luminance1, luminance2) => {
2
+ const [L1, L2] = luminance1 > luminance2 ? [luminance1, luminance2] : [luminance2, luminance1];
3
+ return (L1 + 0.05) / (L2 + 0.05);
4
+ };
5
+ const calculateLuminance = hexColor => {
6
+ const hex = hexColor.replace("#", "");
7
+ const r = parseInt(hex.slice(0, 2), 16);
8
+ const g = parseInt(hex.slice(2, 4), 16);
9
+ const b = parseInt(hex.slice(4, 6), 16);
10
+ const normalize = value => {
11
+ const v = value / 255;
12
+ return v <= 0.03928 ? v / 12.92 : ((v + 0.055) / 1.055) ** 2.4;
13
+ };
14
+ const normalizedR = normalize(r);
15
+ const normalizedG = normalize(g);
16
+ const normalizedB = normalize(b);
17
+ const luminance = 0.2126 * normalizedR + 0.7152 * normalizedG + 0.0722 * normalizedB;
18
+ return luminance;
19
+ };
20
+ function getAccessibleForegroundColor(backgroundColor, largeText, strict) {
21
+ const bgLuminance = calculateLuminance(backgroundColor);
22
+ const whiteLuminance = calculateLuminance("#FFFFFF");
23
+ const blackLuminance = calculateLuminance("#000000");
24
+ const whiteContrast = getContrastRatio(bgLuminance, whiteLuminance);
25
+ const blackContrast = getContrastRatio(bgLuminance, blackLuminance);
26
+ const strictThreshold = largeText ? 4.5 : 7.0;
27
+ const nonStrictThreshold = largeText ? 3.0 : 4.5;
28
+ const minContrast = strict ? strictThreshold : nonStrictThreshold;
29
+
30
+ /* istanbul ignore else */
31
+ if (whiteContrast >= minContrast && whiteContrast > blackContrast) {
32
+ return "#FFFFFF";
33
+ }
34
+
35
+ /* istanbul ignore else */
36
+ if (blackContrast >= minContrast) {
37
+ return "var(--colorsUtilityYin090)";
38
+ }
39
+
40
+ // If no color meets the contrast ratio, return the color with the highest contrast
41
+ // In theory this is possible only if the background color is a shade of grey, but
42
+ // this is a fallback mechanism as finding a colour which fails both contrast ratios
43
+ // is highly unlikely.
44
+ /* istanbul ignore next */
45
+ return whiteContrast > blackContrast ? "#FFFFFF" : "var(--colorsUtilityYin090)";
46
+ }
47
+ const getColoursForPortrait = (backgroundColour,
48
+ // Whether the portrait is on a dark background
49
+ darkBackground = false,
50
+ // Whether the text is large
51
+ largeText = false,
52
+ /**
53
+ * Whether to use strict contrast (i.e., WCAG AAA). If this is false, it uses WCAG AA contrast
54
+ * ratios (4.5:1 for normal text, 3:1 for large text). If true, it uses 7:1 for normal text and
55
+ * 4.5:1 for large text.
56
+ */
57
+ strict = false,
58
+ // The custom foreground colour, if any
59
+ foregroundColor = undefined) => {
60
+ let fgColor = "var(--colorsUtilityYin090)";
61
+ let bgColor = "var(--colorsUtilityReadOnly400)";
62
+ if (darkBackground && !backgroundColour && !foregroundColor) {
63
+ bgColor = "var(--colorsUtilityYin090)";
64
+ fgColor = "var(--colorsUtilityReadOnly600)";
65
+ }
66
+ if (backgroundColour) {
67
+ bgColor = backgroundColour;
68
+ fgColor = getAccessibleForegroundColor(backgroundColour, largeText, strict);
69
+ }
70
+ if (foregroundColor) {
71
+ fgColor = foregroundColor;
72
+ }
73
+ return `background-color: ${bgColor}; color: ${fgColor};`;
74
+ };
75
+ export default getColoursForPortrait;
@@ -38,6 +38,10 @@ export interface PortraitProps extends MarginProps {
38
38
  tooltipBgColor?: string;
39
39
  /** [Legacy] Override font color of the Tooltip, provide any color from palette or any valid css color value. */
40
40
  tooltipFontColor?: string;
41
+ /** The hex code of the background colour */
42
+ backgroundColor?: string;
43
+ /** The hex code of the foreground colour. This will only take effect if use in conjunction with `backgroundColor` */
44
+ foregroundColor?: string;
41
45
  }
42
- declare const Portrait: ({ alt, name, darkBackground, iconType, initials, shape, size, src, onClick, tooltipMessage, tooltipId, tooltipIsVisible, tooltipPosition, tooltipType, tooltipSize, tooltipBgColor, tooltipFontColor, ...rest }: PortraitProps) => React.JSX.Element;
46
+ declare const Portrait: ({ alt, backgroundColor, foregroundColor, name, darkBackground, iconType, initials, shape, size, src, onClick, tooltipMessage, tooltipId, tooltipIsVisible, tooltipPosition, tooltipType, tooltipSize, tooltipBgColor, tooltipFontColor, ...rest }: PortraitProps) => React.JSX.Element;
43
47
  export default Portrait;
@@ -7,6 +7,8 @@ import { StyledCustomImg, StyledIcon, StyledPortraitContainer, StyledPortraitIni
7
7
  import { filterStyledSystemMarginProps } from "../../style/utils";
8
8
  const Portrait = ({
9
9
  alt,
10
+ backgroundColor,
11
+ foregroundColor = undefined,
10
12
  name,
11
13
  darkBackground = false,
12
14
  iconType = "individual",
@@ -66,7 +68,9 @@ const Portrait = ({
66
68
  hasValidImg: hasValidImg,
67
69
  darkBackground: darkBackground,
68
70
  size: size,
69
- shape: shape
71
+ shape: shape,
72
+ backgroundColor: backgroundColor,
73
+ foregroundColor: foregroundColor
70
74
  }), portrait));
71
75
  }
72
76
  return /*#__PURE__*/React.createElement(StyledPortraitContainer, _extends({}, filterStyledSystemMarginProps(rest), {
@@ -75,7 +79,9 @@ const Portrait = ({
75
79
  hasValidImg: hasValidImg,
76
80
  darkBackground: darkBackground,
77
81
  size: size,
78
- shape: shape
82
+ shape: shape,
83
+ backgroundColor: backgroundColor,
84
+ foregroundColor: foregroundColor
79
85
  }), portrait);
80
86
  };
81
87
  return renderComponent();
@@ -2,6 +2,8 @@ import React from "react";
2
2
  import { MarginProps } from "styled-system";
3
3
  import { PortraitSizes, PortraitShapes } from "./portrait.component";
4
4
  declare type StyledPortraitProps = {
5
+ backgroundColor?: string;
6
+ foregroundColor?: string;
5
7
  darkBackground?: boolean;
6
8
  size: PortraitSizes;
7
9
  shape?: PortraitShapes;
@@ -1,9 +1,10 @@
1
1
  import styled from "styled-components";
2
2
  import { margin } from "styled-system";
3
- import BaseTheme from "../../style/themes/base";
4
3
  import Icon from "../icon";
5
- import { PORTRAIT_SIZE_PARAMS } from "./portrait.config";
6
4
  import profileConfigSizes from "../profile/profile.config";
5
+ import BaseTheme from "../../style/themes/base";
6
+ import { PORTRAIT_SIZE_PARAMS } from "./portrait.config";
7
+ import getColoursForPortrait from "./__internal__/utils";
7
8
  export const StyledPortraitInitials = styled.div`
8
9
  font-weight: 500;
9
10
  font-size: ${({
@@ -37,12 +38,12 @@ export const StyledIcon = styled(Icon)`
37
38
  }
38
39
  `;
39
40
  export const StyledPortraitContainer = styled.div`
40
- color: ${({
41
- darkBackground
42
- }) => darkBackground ? "var(--colorsUtilityReadOnly600)" : "var(--colorsUtilityYin090)"};
43
- background-color: ${({
44
- darkBackground
45
- }) => darkBackground ? "var(--colorsUtilityYin090)" : "var(--colorsUtilityReadOnly400)"};
41
+ ${({
42
+ darkBackground,
43
+ backgroundColor,
44
+ size,
45
+ foregroundColor
46
+ }) => getColoursForPortrait(backgroundColor, darkBackground, !["XS", "S"].includes(size), true, foregroundColor)};
46
47
  ${({
47
48
  hasValidImg,
48
49
  size
@@ -24,6 +24,10 @@ export interface ProfileProps extends MarginProps {
24
24
  size?: ProfileSize;
25
25
  /** Use a dark background. */
26
26
  darkBackground?: boolean;
27
+ /** The hex code of the background colour to be passed to the avatar */
28
+ backgroundColor?: string;
29
+ /** The hex code of the foreground colour to be passed to the avatar. Must be used in conjunction with `backgroundColor` */
30
+ foregroundColor?: string;
27
31
  }
28
- export declare const Profile: ({ src, alt, className, initials, name, size, email, text, darkBackground, ...props }: ProfileProps) => React.JSX.Element;
32
+ export declare const Profile: ({ src, alt, className, initials, name, size, email, text, darkBackground, backgroundColor, foregroundColor, ...props }: ProfileProps) => React.JSX.Element;
29
33
  export default Profile;
@@ -21,6 +21,8 @@ export const Profile = ({
21
21
  email,
22
22
  text,
23
23
  darkBackground,
24
+ backgroundColor,
25
+ foregroundColor,
24
26
  ...props
25
27
  }) => {
26
28
  const getInitials = () => {
@@ -32,7 +34,10 @@ export const Profile = ({
32
34
  alt,
33
35
  name,
34
36
  initials: getInitials(),
35
- size
37
+ size,
38
+ backgroundColor,
39
+ foregroundColor,
40
+ "data-role": "profile-portrait"
36
41
  };
37
42
  const avatar = () => {
38
43
  if (src) {
@@ -10,5 +10,5 @@ declare const ProfileEmailStyle: import("styled-components").StyledComponent<imp
10
10
  declare const ProfileTextStyle: import("styled-components").StyledComponent<"span", any, ProfileSProps, never>;
11
11
  declare const ProfileStyle: import("styled-components").StyledComponent<"div", any, Pick<ProfileSProps, "darkBackground" | "hasSrc">, never>;
12
12
  declare const ProfileDetailsStyle: import("styled-components").StyledComponent<"div", any, Pick<ProfileSProps, "size" | "hasSrc">, never>;
13
- declare const ProfileAvatarStyle: import("styled-components").StyledComponent<({ alt, name, darkBackground, iconType, initials, shape, size, src, onClick, tooltipMessage, tooltipId, tooltipIsVisible, tooltipPosition, tooltipType, tooltipSize, tooltipBgColor, tooltipFontColor, ...rest }: import("../portrait").PortraitProps) => import("react").JSX.Element, any, {}, never>;
13
+ declare const ProfileAvatarStyle: import("styled-components").StyledComponent<({ alt, backgroundColor, foregroundColor, name, darkBackground, iconType, initials, shape, size, src, onClick, tooltipMessage, tooltipId, tooltipIsVisible, tooltipPosition, tooltipType, tooltipSize, tooltipBgColor, tooltipFontColor, ...rest }: import("../portrait").PortraitProps) => import("react").JSX.Element, any, {}, never>;
14
14
  export { ProfileStyle, ProfileNameStyle, ProfileDetailsStyle, ProfileAvatarStyle, ProfileEmailStyle, ProfileTextStyle, };
@@ -194,8 +194,6 @@ const Switch = /*#__PURE__*/React.forwardRef(({
194
194
  width: labelInline ? "100%" : "auto"
195
195
  }, /*#__PURE__*/React.createElement(Box, {
196
196
  "data-role": "label-wrapper"
197
- // width={labelInline ? rest.labelWidth : 30}
198
- // minWidth={label && labelInline ? "32px" : 0}
199
197
  }, /*#__PURE__*/React.createElement(Label, {
200
198
  isDarkBackground: isDarkBackground,
201
199
  labelId: labelId.current,
@@ -0,0 +1,2 @@
1
+ declare const getColoursForPortrait: (backgroundColour: string | undefined, darkBackground?: boolean, largeText?: boolean, strict?: boolean, foregroundColor?: string | undefined) => string;
2
+ export default getColoursForPortrait;
@@ -0,0 +1,81 @@
1
+ "use strict";
2
+
3
+ Object.defineProperty(exports, "__esModule", {
4
+ value: true
5
+ });
6
+ exports.default = void 0;
7
+ const getContrastRatio = (luminance1, luminance2) => {
8
+ const [L1, L2] = luminance1 > luminance2 ? [luminance1, luminance2] : [luminance2, luminance1];
9
+ return (L1 + 0.05) / (L2 + 0.05);
10
+ };
11
+ const calculateLuminance = hexColor => {
12
+ const hex = hexColor.replace("#", "");
13
+ const r = parseInt(hex.slice(0, 2), 16);
14
+ const g = parseInt(hex.slice(2, 4), 16);
15
+ const b = parseInt(hex.slice(4, 6), 16);
16
+ const normalize = value => {
17
+ const v = value / 255;
18
+ return v <= 0.03928 ? v / 12.92 : ((v + 0.055) / 1.055) ** 2.4;
19
+ };
20
+ const normalizedR = normalize(r);
21
+ const normalizedG = normalize(g);
22
+ const normalizedB = normalize(b);
23
+ const luminance = 0.2126 * normalizedR + 0.7152 * normalizedG + 0.0722 * normalizedB;
24
+ return luminance;
25
+ };
26
+ function getAccessibleForegroundColor(backgroundColor, largeText, strict) {
27
+ const bgLuminance = calculateLuminance(backgroundColor);
28
+ const whiteLuminance = calculateLuminance("#FFFFFF");
29
+ const blackLuminance = calculateLuminance("#000000");
30
+ const whiteContrast = getContrastRatio(bgLuminance, whiteLuminance);
31
+ const blackContrast = getContrastRatio(bgLuminance, blackLuminance);
32
+ const strictThreshold = largeText ? 4.5 : 7.0;
33
+ const nonStrictThreshold = largeText ? 3.0 : 4.5;
34
+ const minContrast = strict ? strictThreshold : nonStrictThreshold;
35
+
36
+ /* istanbul ignore else */
37
+ if (whiteContrast >= minContrast && whiteContrast > blackContrast) {
38
+ return "#FFFFFF";
39
+ }
40
+
41
+ /* istanbul ignore else */
42
+ if (blackContrast >= minContrast) {
43
+ return "var(--colorsUtilityYin090)";
44
+ }
45
+
46
+ // If no color meets the contrast ratio, return the color with the highest contrast
47
+ // In theory this is possible only if the background color is a shade of grey, but
48
+ // this is a fallback mechanism as finding a colour which fails both contrast ratios
49
+ // is highly unlikely.
50
+ /* istanbul ignore next */
51
+ return whiteContrast > blackContrast ? "#FFFFFF" : "var(--colorsUtilityYin090)";
52
+ }
53
+ const getColoursForPortrait = (backgroundColour,
54
+ // Whether the portrait is on a dark background
55
+ darkBackground = false,
56
+ // Whether the text is large
57
+ largeText = false,
58
+ /**
59
+ * Whether to use strict contrast (i.e., WCAG AAA). If this is false, it uses WCAG AA contrast
60
+ * ratios (4.5:1 for normal text, 3:1 for large text). If true, it uses 7:1 for normal text and
61
+ * 4.5:1 for large text.
62
+ */
63
+ strict = false,
64
+ // The custom foreground colour, if any
65
+ foregroundColor = undefined) => {
66
+ let fgColor = "var(--colorsUtilityYin090)";
67
+ let bgColor = "var(--colorsUtilityReadOnly400)";
68
+ if (darkBackground && !backgroundColour && !foregroundColor) {
69
+ bgColor = "var(--colorsUtilityYin090)";
70
+ fgColor = "var(--colorsUtilityReadOnly600)";
71
+ }
72
+ if (backgroundColour) {
73
+ bgColor = backgroundColour;
74
+ fgColor = getAccessibleForegroundColor(backgroundColour, largeText, strict);
75
+ }
76
+ if (foregroundColor) {
77
+ fgColor = foregroundColor;
78
+ }
79
+ return `background-color: ${bgColor}; color: ${fgColor};`;
80
+ };
81
+ var _default = exports.default = getColoursForPortrait;
@@ -38,6 +38,10 @@ export interface PortraitProps extends MarginProps {
38
38
  tooltipBgColor?: string;
39
39
  /** [Legacy] Override font color of the Tooltip, provide any color from palette or any valid css color value. */
40
40
  tooltipFontColor?: string;
41
+ /** The hex code of the background colour */
42
+ backgroundColor?: string;
43
+ /** The hex code of the foreground colour. This will only take effect if use in conjunction with `backgroundColor` */
44
+ foregroundColor?: string;
41
45
  }
42
- declare const Portrait: ({ alt, name, darkBackground, iconType, initials, shape, size, src, onClick, tooltipMessage, tooltipId, tooltipIsVisible, tooltipPosition, tooltipType, tooltipSize, tooltipBgColor, tooltipFontColor, ...rest }: PortraitProps) => React.JSX.Element;
46
+ declare const Portrait: ({ alt, backgroundColor, foregroundColor, name, darkBackground, iconType, initials, shape, size, src, onClick, tooltipMessage, tooltipId, tooltipIsVisible, tooltipPosition, tooltipType, tooltipSize, tooltipBgColor, tooltipFontColor, ...rest }: PortraitProps) => React.JSX.Element;
43
47
  export default Portrait;
@@ -16,6 +16,8 @@ function _interopRequireWildcard(e, r) { if (!r && e && e.__esModule) return e;
16
16
  function _extends() { return _extends = Object.assign ? Object.assign.bind() : function (n) { for (var e = 1; e < arguments.length; e++) { var t = arguments[e]; for (var r in t) ({}).hasOwnProperty.call(t, r) && (n[r] = t[r]); } return n; }, _extends.apply(null, arguments); }
17
17
  const Portrait = ({
18
18
  alt,
19
+ backgroundColor,
20
+ foregroundColor = undefined,
19
21
  name,
20
22
  darkBackground = false,
21
23
  iconType = "individual",
@@ -75,7 +77,9 @@ const Portrait = ({
75
77
  hasValidImg: hasValidImg,
76
78
  darkBackground: darkBackground,
77
79
  size: size,
78
- shape: shape
80
+ shape: shape,
81
+ backgroundColor: backgroundColor,
82
+ foregroundColor: foregroundColor
79
83
  }), portrait));
80
84
  }
81
85
  return /*#__PURE__*/_react.default.createElement(_portrait.StyledPortraitContainer, _extends({}, (0, _utils.filterStyledSystemMarginProps)(rest), {
@@ -84,7 +88,9 @@ const Portrait = ({
84
88
  hasValidImg: hasValidImg,
85
89
  darkBackground: darkBackground,
86
90
  size: size,
87
- shape: shape
91
+ shape: shape,
92
+ backgroundColor: backgroundColor,
93
+ foregroundColor: foregroundColor
88
94
  }), portrait);
89
95
  };
90
96
  return renderComponent();
@@ -2,6 +2,8 @@ import React from "react";
2
2
  import { MarginProps } from "styled-system";
3
3
  import { PortraitSizes, PortraitShapes } from "./portrait.component";
4
4
  declare type StyledPortraitProps = {
5
+ backgroundColor?: string;
6
+ foregroundColor?: string;
5
7
  darkBackground?: boolean;
6
8
  size: PortraitSizes;
7
9
  shape?: PortraitShapes;
@@ -6,10 +6,11 @@ Object.defineProperty(exports, "__esModule", {
6
6
  exports.StyledPortraitInitials = exports.StyledPortraitContainer = exports.StyledIcon = exports.StyledCustomImg = void 0;
7
7
  var _styledComponents = _interopRequireDefault(require("styled-components"));
8
8
  var _styledSystem = require("styled-system");
9
- var _base = _interopRequireDefault(require("../../style/themes/base"));
10
9
  var _icon = _interopRequireDefault(require("../icon"));
11
- var _portrait = require("./portrait.config");
12
10
  var _profile = _interopRequireDefault(require("../profile/profile.config"));
11
+ var _base = _interopRequireDefault(require("../../style/themes/base"));
12
+ var _portrait = require("./portrait.config");
13
+ var _utils = _interopRequireDefault(require("./__internal__/utils"));
13
14
  function _interopRequireDefault(e) { return e && e.__esModule ? e : { default: e }; }
14
15
  const StyledPortraitInitials = exports.StyledPortraitInitials = _styledComponents.default.div`
15
16
  font-weight: 500;
@@ -44,12 +45,12 @@ const StyledIcon = exports.StyledIcon = (0, _styledComponents.default)(_icon.def
44
45
  }
45
46
  `;
46
47
  const StyledPortraitContainer = exports.StyledPortraitContainer = _styledComponents.default.div`
47
- color: ${({
48
- darkBackground
49
- }) => darkBackground ? "var(--colorsUtilityReadOnly600)" : "var(--colorsUtilityYin090)"};
50
- background-color: ${({
51
- darkBackground
52
- }) => darkBackground ? "var(--colorsUtilityYin090)" : "var(--colorsUtilityReadOnly400)"};
48
+ ${({
49
+ darkBackground,
50
+ backgroundColor,
51
+ size,
52
+ foregroundColor
53
+ }) => (0, _utils.default)(backgroundColor, darkBackground, !["XS", "S"].includes(size), true, foregroundColor)};
53
54
  ${({
54
55
  hasValidImg,
55
56
  size
@@ -24,6 +24,10 @@ export interface ProfileProps extends MarginProps {
24
24
  size?: ProfileSize;
25
25
  /** Use a dark background. */
26
26
  darkBackground?: boolean;
27
+ /** The hex code of the background colour to be passed to the avatar */
28
+ backgroundColor?: string;
29
+ /** The hex code of the foreground colour to be passed to the avatar. Must be used in conjunction with `backgroundColor` */
30
+ foregroundColor?: string;
27
31
  }
28
- export declare const Profile: ({ src, alt, className, initials, name, size, email, text, darkBackground, ...props }: ProfileProps) => React.JSX.Element;
32
+ export declare const Profile: ({ src, alt, className, initials, name, size, email, text, darkBackground, backgroundColor, foregroundColor, ...props }: ProfileProps) => React.JSX.Element;
29
33
  export default Profile;
@@ -28,6 +28,8 @@ const Profile = ({
28
28
  email,
29
29
  text,
30
30
  darkBackground,
31
+ backgroundColor,
32
+ foregroundColor,
31
33
  ...props
32
34
  }) => {
33
35
  const getInitials = () => {
@@ -39,7 +41,10 @@ const Profile = ({
39
41
  alt,
40
42
  name,
41
43
  initials: getInitials(),
42
- size
44
+ size,
45
+ backgroundColor,
46
+ foregroundColor,
47
+ "data-role": "profile-portrait"
43
48
  };
44
49
  const avatar = () => {
45
50
  if (src) {
@@ -10,5 +10,5 @@ declare const ProfileEmailStyle: import("styled-components").StyledComponent<imp
10
10
  declare const ProfileTextStyle: import("styled-components").StyledComponent<"span", any, ProfileSProps, never>;
11
11
  declare const ProfileStyle: import("styled-components").StyledComponent<"div", any, Pick<ProfileSProps, "darkBackground" | "hasSrc">, never>;
12
12
  declare const ProfileDetailsStyle: import("styled-components").StyledComponent<"div", any, Pick<ProfileSProps, "size" | "hasSrc">, never>;
13
- declare const ProfileAvatarStyle: import("styled-components").StyledComponent<({ alt, name, darkBackground, iconType, initials, shape, size, src, onClick, tooltipMessage, tooltipId, tooltipIsVisible, tooltipPosition, tooltipType, tooltipSize, tooltipBgColor, tooltipFontColor, ...rest }: import("../portrait").PortraitProps) => import("react").JSX.Element, any, {}, never>;
13
+ declare const ProfileAvatarStyle: import("styled-components").StyledComponent<({ alt, backgroundColor, foregroundColor, name, darkBackground, iconType, initials, shape, size, src, onClick, tooltipMessage, tooltipId, tooltipIsVisible, tooltipPosition, tooltipType, tooltipSize, tooltipBgColor, tooltipFontColor, ...rest }: import("../portrait").PortraitProps) => import("react").JSX.Element, any, {}, never>;
14
14
  export { ProfileStyle, ProfileNameStyle, ProfileDetailsStyle, ProfileAvatarStyle, ProfileEmailStyle, ProfileTextStyle, };
@@ -203,8 +203,6 @@ const Switch = exports.Switch = /*#__PURE__*/_react.default.forwardRef(({
203
203
  width: labelInline ? "100%" : "auto"
204
204
  }, /*#__PURE__*/_react.default.createElement(_box.default, {
205
205
  "data-role": "label-wrapper"
206
- // width={labelInline ? rest.labelWidth : 30}
207
- // minWidth={label && labelInline ? "32px" : 0}
208
206
  }, /*#__PURE__*/_react.default.createElement(_label.default, {
209
207
  isDarkBackground: isDarkBackground,
210
208
  labelId: labelId.current,
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "carbon-react",
3
- "version": "147.1.0",
3
+ "version": "147.2.0",
4
4
  "description": "A library of reusable React components for easily building user interfaces.",
5
5
  "files": [
6
6
  "lib",