carbon-react 144.20.0 → 144.21.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.
Files changed (31) hide show
  1. package/esm/components/button/button.component.d.ts +2 -2
  2. package/esm/components/checkbox/checkbox-group/checkbox-group.component.d.ts +3 -3
  3. package/esm/components/checkbox/checkbox-group/checkbox-group.component.js +0 -1
  4. package/esm/components/checkbox/checkbox.component.d.ts +2 -2
  5. package/esm/components/icon/icon.component.d.ts +7 -7
  6. package/esm/components/link/link.component.d.ts +2 -2
  7. package/esm/components/loader/loader-square.style.js +2 -2
  8. package/esm/components/menu/menu-item/menu-item.style.js +7 -17
  9. package/esm/components/portrait/portrait.component.d.ts +8 -8
  10. package/esm/components/radio-button/radio-button-group/radio-button-group.component.d.ts +2 -2
  11. package/esm/components/radio-button/radio-button-group/radio-button-group.component.js +0 -3
  12. package/esm/components/radio-button/radio-button.component.d.ts +2 -2
  13. package/esm/components/radio-button/radio-button.component.js +4 -13
  14. package/esm/components/search/search.component.d.ts +1 -1
  15. package/esm/components/tile/tile.style.js +2 -2
  16. package/lib/components/button/button.component.d.ts +2 -2
  17. package/lib/components/checkbox/checkbox-group/checkbox-group.component.d.ts +3 -3
  18. package/lib/components/checkbox/checkbox-group/checkbox-group.component.js +0 -1
  19. package/lib/components/checkbox/checkbox.component.d.ts +2 -2
  20. package/lib/components/icon/icon.component.d.ts +7 -7
  21. package/lib/components/link/link.component.d.ts +2 -2
  22. package/lib/components/loader/loader-square.style.js +2 -2
  23. package/lib/components/menu/menu-item/menu-item.style.js +21 -31
  24. package/lib/components/portrait/portrait.component.d.ts +8 -8
  25. package/lib/components/radio-button/radio-button-group/radio-button-group.component.d.ts +2 -2
  26. package/lib/components/radio-button/radio-button-group/radio-button-group.component.js +0 -3
  27. package/lib/components/radio-button/radio-button.component.d.ts +2 -2
  28. package/lib/components/radio-button/radio-button.component.js +4 -13
  29. package/lib/components/search/search.component.d.ts +1 -1
  30. package/lib/components/tile/tile.style.js +2 -2
  31. package/package.json +1 -1
@@ -32,9 +32,9 @@ export interface ButtonProps extends SpaceProps, TagProps {
32
32
  href?: string;
33
33
  /** Defines an Icon position related to the children: "before" | "after" */
34
34
  iconPosition?: ButtonIconPosition;
35
- /** Provides a tooltip message when the icon is hovered. */
35
+ /** [Legacy] Provides a tooltip message when the icon is hovered. */
36
36
  iconTooltipMessage?: string;
37
- /** Provides positioning when the tooltip is displayed. */
37
+ /** [Legacy] Provides positioning when the tooltip is displayed. */
38
38
  iconTooltipPosition?: TooltipPositions;
39
39
  /** Defines an Icon type within the button */
40
40
  iconType?: IconType;
@@ -5,8 +5,8 @@ export interface CheckboxGroupProps extends ValidationProps, MarginProps {
5
5
  /** The content for the CheckboxGroup Legend */
6
6
  legend?: string;
7
7
  /**
8
- * The content for the CheckboxGroup Help tooltip,
9
- * will be rendered as hint text when `validationRedesignOptIn` is true.
8
+ * The content for the CheckboxGroup hint text,
9
+ * will only be rendered when `validationRedesignOptIn` is true.
10
10
  */
11
11
  legendHelp?: string;
12
12
  /** [Legacy] When true, legend is placed inline with the checkboxes */
@@ -27,7 +27,7 @@ export interface CheckboxGroupProps extends ValidationProps, MarginProps {
27
27
  isOptional?: boolean;
28
28
  /** [Legacy] Overrides the default tooltip */
29
29
  tooltipPosition?: "top" | "bottom" | "left" | "right";
30
- /** When true, Checkboxes are in line */
30
+ /** When true, Checkboxes are inline */
31
31
  inline?: boolean;
32
32
  }
33
33
  export declare const CheckboxGroup: {
@@ -40,7 +40,6 @@ export const CheckboxGroup = props => {
40
40
  legendSpacing: legendSpacing,
41
41
  error: error,
42
42
  warning: warning,
43
- info: info,
44
43
  isRequired: required,
45
44
  isOptional: isOptional
46
45
  }, tagComponent("checkboxgroup", props), {
@@ -12,13 +12,13 @@ export interface CheckboxProps extends CommonCheckableInputProps, MarginProps {
12
12
  "data-element"?: string;
13
13
  /** Identifier used for testing purposes, applied to the root element of the component. */
14
14
  "data-role"?: string;
15
- /** Aria label for rendered help component */
15
+ /** [Legacy] Aria label for rendered help component */
16
16
  helpAriaLabel?: string;
17
17
  /** When true label is inline */
18
18
  labelInline?: boolean;
19
19
  /** Accepts a callback function which is triggered on click event */
20
20
  onClick?: (ev: React.MouseEvent<HTMLInputElement>) => void;
21
- /** Overrides the default tooltip position */
21
+ /** [Legacy] Overrides the default tooltip position */
22
22
  tooltipPosition?: "top" | "bottom" | "left" | "right";
23
23
  /** The value of the checkbox, passed on form submit */
24
24
  value?: string;
@@ -14,19 +14,19 @@ export interface IconProps extends Omit<StyledIconProps, "type">, MarginProps, O
14
14
  id?: string;
15
15
  /** The ARIA role to be applied to the Icon */
16
16
  role?: string;
17
- /** The message to be displayed within the tooltip */
17
+ /** [Legacy] The message to be displayed within the tooltip */
18
18
  tooltipMessage?: React.ReactNode;
19
- /** The position to display the tooltip */
19
+ /** [Legacy] The position to display the tooltip */
20
20
  tooltipPosition?: TooltipPositions;
21
- /** Control whether the tooltip is visible */
21
+ /** [Legacy] Control whether the tooltip is visible */
22
22
  tooltipVisible?: boolean;
23
- /** Override background color of the Tooltip, provide any color from palette or any valid css color value. */
23
+ /** [Legacy] Override background color of the Tooltip, provide any color from palette or any valid css color value. */
24
24
  tooltipBgColor?: string;
25
- /** Override font color of the Tooltip, provide any color from palette or any valid css color value. */
25
+ /** [Legacy] Override font color of the Tooltip, provide any color from palette or any valid css color value. */
26
26
  tooltipFontColor?: string;
27
- /** Overrides the default flip behaviour of the Tooltip */
27
+ /** [Legacy] Overrides the default flip behaviour of the Tooltip */
28
28
  tooltipFlipOverrides?: TooltipPositions[];
29
- /** Id passed to the tooltip container, used for accessibility purposes */
29
+ /** [Legacy] Id passed to the tooltip container, used for accessibility purposes */
30
30
  tooltipId?: string;
31
31
  /**
32
32
  * Icon type
@@ -12,9 +12,9 @@ export interface LinkProps extends StyledLinkProps, React.AriaAttributes {
12
12
  onKeyDown?: (ev: React.KeyboardEvent<HTMLAnchorElement> | React.KeyboardEvent<HTMLButtonElement>) => void;
13
13
  /** Function called when a mouse down event triggers. */
14
14
  onMouseDown?: (ev: React.MouseEvent<HTMLAnchorElement> | React.MouseEvent<HTMLButtonElement>) => void;
15
- /** A message to display as a tooltip to the link. */
15
+ /** [Legacy] A message to display as a tooltip to the link. */
16
16
  tooltipMessage?: string;
17
- /** Positions the tooltip with the link. */
17
+ /** [Legacy] Positions the tooltip with the link. */
18
18
  tooltipPosition?: "bottom" | "left" | "right" | "top";
19
19
  /** Child content to render in the link. */
20
20
  children?: React.ReactNode;
@@ -10,7 +10,7 @@ const loaderAnimation = keyframes`
10
10
  transform: scale(1);
11
11
  }
12
12
  `;
13
- const getDimentions = (size, roundedCornersOptOut) => {
13
+ const getDimensions = (size, roundedCornersOptOut) => {
14
14
  let width;
15
15
  let marginRight;
16
16
  switch (size) {
@@ -44,7 +44,7 @@ const StyledLoaderSquare = styled.div`
44
44
  animation: ${loaderAnimation} 1s infinite ease-in-out both;
45
45
  background-color: ${backgroundColor};
46
46
  display: inline-block;
47
- ${getDimentions(size, theme.roundedCornersOptOut)}
47
+ ${getDimensions(size, theme.roundedCornersOptOut)}
48
48
 
49
49
  ${isInsideButton && css`
50
50
  background-color: ${isActive ? "var(--colorsUtilityYang100)" : "var(--colorsSemanticNeutral500)"};
@@ -1,13 +1,13 @@
1
1
  import styled, { css } from "styled-components";
2
2
  import { padding } from "styled-system";
3
- import StyledButton from "../../button/button.style";
4
- import { StyledContent, StyledLink } from "../../link/link.style";
5
- import StyledIcon from "../../icon/icon.style";
6
- import StyledIconButton from "../../icon-button/icon-button.style";
7
3
  import menuConfigVariants from "../menu.config";
8
4
  import Link from "../../link";
9
- import addFocusStyling from "../../../style/utils/add-focus-styling";
5
+ import StyledButton from "../../button/button.style";
6
+ import StyledIconButton from "../../icon-button/icon-button.style";
7
+ import StyledIcon from "../../icon/icon.style";
8
+ import { StyledContent, StyledLink } from "../../link/link.style";
10
9
  import { baseTheme } from "../../../style/themes";
10
+ import addFocusStyling from "../../../style/utils/add-focus-styling";
11
11
  const BASE_SPACING = 16;
12
12
  const parsePadding = props => {
13
13
  const {
@@ -121,16 +121,6 @@ const StyledMenuItemWrapper = styled.a.attrs({
121
121
  `}
122
122
  }
123
123
 
124
- ${!maxWidth && css`
125
- a:has([data-component="icon"]):not(:has(button))
126
- ${StyledContent},
127
- button:has([data-component="icon"]):not(:has(button))
128
- ${StyledContent} {
129
- position: relative;
130
- top: -1px;
131
- }
132
- `}
133
-
134
124
  :has([data-element="input"]) ${StyledContent} {
135
125
  width: 100%;
136
126
  }
@@ -209,7 +199,7 @@ const StyledMenuItemWrapper = styled.a.attrs({
209
199
 
210
200
  > a:has(${StyledButton}:not(.search-button)) {
211
201
  height: 100%;
212
-
202
+
213
203
  ${StyledContent} {
214
204
  height: inherit;
215
205
 
@@ -445,7 +435,7 @@ const StyledMenuItemWrapper = styled.a.attrs({
445
435
  }
446
436
  `}
447
437
 
448
-
438
+
449
439
  > a, > button {
450
440
  min-height: 40px;
451
441
  line-height: 40px;
@@ -24,21 +24,21 @@ export interface PortraitProps extends MarginProps {
24
24
  darkBackground?: boolean;
25
25
  /** Prop for `onClick` events. */
26
26
  onClick?: (ev: React.MouseEvent<HTMLElement>) => void;
27
- /** The message to be displayed within the tooltip */
27
+ /** [Legacy] The message to be displayed within the tooltip */
28
28
  tooltipMessage?: React.ReactNode;
29
- /** The id attribute to use for the tooltip */
29
+ /** [Legacy] The id attribute to use for the tooltip */
30
30
  tooltipId?: string;
31
- /** Whether to to show the Tooltip */
31
+ /** [Legacy] Whether to to show the Tooltip */
32
32
  tooltipIsVisible?: boolean;
33
- /** Sets position of the tooltip */
33
+ /** [Legacy] Sets position of the tooltip */
34
34
  tooltipPosition?: "top" | "bottom" | "left" | "right";
35
- /** Defines the message type */
35
+ /** [Legacy] Defines the message type */
36
36
  tooltipType?: string;
37
- /** Defines the size of the tooltip content */
37
+ /** [Legacy] Defines the size of the tooltip content */
38
38
  tooltipSize?: "medium" | "large";
39
- /** Override background color of the Tooltip, provide any color from palette or any valid css color value. */
39
+ /** [Legacy] Override background color of the Tooltip, provide any color from palette or any valid css color value. */
40
40
  tooltipBgColor?: string;
41
- /** Override font color of the Tooltip, provide any color from palette or any valid css color value. */
41
+ /** [Legacy] Override font color of the Tooltip, provide any color from palette or any valid css color value. */
42
42
  tooltipFontColor?: string;
43
43
  }
44
44
  declare const Portrait: ({ alt, name, darkBackground, gravatar, iconType, initials, shape, size, src, onClick, tooltipMessage, tooltipId, tooltipIsVisible, tooltipPosition, tooltipType, tooltipSize, tooltipBgColor, tooltipFontColor, ...rest }: PortraitProps) => React.JSX.Element;
@@ -15,8 +15,8 @@ export interface RadioButtonGroupProps extends ValidationProps, MarginProps {
15
15
  /** The content for the RadioGroup Legend */
16
16
  legend?: string;
17
17
  /**
18
- * The content for the RadioButtonGroup Legend Help tooltip,
19
- * will be rendered as hint text when `validationRedesignOptIn` is true.
18
+ * The content for the RadioButtonGroup hint text,
19
+ * will only be rendered when `validationRedesignOptIn` is true.
20
20
  */
21
21
  legendHelp?: string;
22
22
  /** [Legacy] Text alignment of legend when inline */
@@ -61,7 +61,6 @@ export const RadioButtonGroup = props => {
61
61
  legend: legend,
62
62
  error: error,
63
63
  warning: warning,
64
- info: info,
65
64
  inline: inlineLegend,
66
65
  legendWidth: legendWidth,
67
66
  legendAlign: legendAlign,
@@ -99,8 +98,6 @@ export const RadioButtonGroup = props => {
99
98
  labelSpacing,
100
99
  error: !!error,
101
100
  warning: !!warning,
102
- info: !!info,
103
- required,
104
101
  ...child.props
105
102
  });
106
103
  }))))) : /*#__PURE__*/React.createElement(TooltipProvider, {
@@ -15,9 +15,9 @@ export interface RadioButtonProps extends Omit<CommonCheckableInputProps, "requi
15
15
  onClick?: (ev: React.MouseEvent<HTMLInputElement>) => void;
16
16
  /** the value of the Radio Button, passed on form submit */
17
17
  value: string;
18
- /** Overrides the default tooltip position */
18
+ /** [Legacy] Overrides the default tooltip position */
19
19
  tooltipPosition?: "top" | "bottom" | "left" | "right";
20
- /** Aria label for rendered help component */
20
+ /** [Legacy] Aria label for rendered help component */
21
21
  helpAriaLabel?: string;
22
22
  }
23
23
  export declare const RadioButton: React.ForwardRefExoticComponent<RadioButtonProps & InternalRadioButtonProps & React.RefAttributes<HTMLInputElement>>;
@@ -52,23 +52,19 @@ const RadioButton = /*#__PURE__*/React.forwardRef(({
52
52
  event.target.focus();
53
53
  }, [onChange]);
54
54
  const validationProps = {
55
- disabled,
56
- inputWidth,
57
55
  error,
58
56
  warning,
59
57
  info
60
58
  };
61
59
  const commonProps = {
62
60
  ...validationProps,
61
+ disabled,
62
+ inputWidth,
63
63
  fieldHelpInline,
64
64
  labelSpacing
65
65
  };
66
66
  const inputProps = {
67
- ...(validationRedesignOptIn ? {
68
- ...validationProps
69
- } : {
70
- ...commonProps
71
- }),
67
+ ...commonProps,
72
68
  autoFocus,
73
69
  checked,
74
70
  fieldHelp,
@@ -101,12 +97,7 @@ const RadioButton = /*#__PURE__*/React.forwardRef(({
101
97
  inline: inline,
102
98
  reverse: reverse,
103
99
  size: size
104
- }, validationRedesignOptIn ? {
105
- ...validationProps
106
- } : {
107
- ...commonProps,
108
- fieldHelp
109
- }, marginProps), /*#__PURE__*/React.createElement(CheckableInput, inputProps, /*#__PURE__*/React.createElement(RadioButtonSvg, null)));
100
+ }, commonProps, marginProps), /*#__PURE__*/React.createElement(CheckableInput, inputProps, /*#__PURE__*/React.createElement(RadioButtonSvg, null)));
110
101
  return /*#__PURE__*/React.createElement(React.Fragment, null, validationRedesignOptIn ? componentToRender : /*#__PURE__*/React.createElement(TooltipProvider, {
111
102
  helpAriaLabel: helpAriaLabel,
112
103
  tooltipPosition: tooltipPosition
@@ -58,7 +58,7 @@ export interface SearchProps extends ValidationProps, MarginProps {
58
58
  variant?: "default" | "dark";
59
59
  /** Input tabindex */
60
60
  tabIndex?: number;
61
- /** Overrides the default tooltip position */
61
+ /** [Legacy] Overrides the default tooltip position */
62
62
  tooltipPosition?: "top" | "bottom" | "left" | "right";
63
63
  }
64
64
  export declare type SearchHandle = {
@@ -36,7 +36,7 @@ const getBorderRadius = roundness => {
36
36
  return "var(--borderRadius100)";
37
37
  }
38
38
  };
39
- const getHeighlightVariant = variant => {
39
+ const getHighlightVariant = variant => {
40
40
  switch (variant) {
41
41
  case "success":
42
42
  return "var(--colorsSemanticPositive500)";
@@ -115,7 +115,7 @@ export const StyledHighlight = styled.div`
115
115
  position: relative;
116
116
  background: ${({
117
117
  variant
118
- }) => getHeighlightVariant(variant)};
118
+ }) => getHighlightVariant(variant)};
119
119
  border-radius: ${({
120
120
  roundness
121
121
  }) => getBorderRadius(roundness)};
@@ -32,9 +32,9 @@ export interface ButtonProps extends SpaceProps, TagProps {
32
32
  href?: string;
33
33
  /** Defines an Icon position related to the children: "before" | "after" */
34
34
  iconPosition?: ButtonIconPosition;
35
- /** Provides a tooltip message when the icon is hovered. */
35
+ /** [Legacy] Provides a tooltip message when the icon is hovered. */
36
36
  iconTooltipMessage?: string;
37
- /** Provides positioning when the tooltip is displayed. */
37
+ /** [Legacy] Provides positioning when the tooltip is displayed. */
38
38
  iconTooltipPosition?: TooltipPositions;
39
39
  /** Defines an Icon type within the button */
40
40
  iconType?: IconType;
@@ -5,8 +5,8 @@ export interface CheckboxGroupProps extends ValidationProps, MarginProps {
5
5
  /** The content for the CheckboxGroup Legend */
6
6
  legend?: string;
7
7
  /**
8
- * The content for the CheckboxGroup Help tooltip,
9
- * will be rendered as hint text when `validationRedesignOptIn` is true.
8
+ * The content for the CheckboxGroup hint text,
9
+ * will only be rendered when `validationRedesignOptIn` is true.
10
10
  */
11
11
  legendHelp?: string;
12
12
  /** [Legacy] When true, legend is placed inline with the checkboxes */
@@ -27,7 +27,7 @@ export interface CheckboxGroupProps extends ValidationProps, MarginProps {
27
27
  isOptional?: boolean;
28
28
  /** [Legacy] Overrides the default tooltip */
29
29
  tooltipPosition?: "top" | "bottom" | "left" | "right";
30
- /** When true, Checkboxes are in line */
30
+ /** When true, Checkboxes are inline */
31
31
  inline?: boolean;
32
32
  }
33
33
  export declare const CheckboxGroup: {
@@ -49,7 +49,6 @@ const CheckboxGroup = props => {
49
49
  legendSpacing: legendSpacing,
50
50
  error: error,
51
51
  warning: warning,
52
- info: info,
53
52
  isRequired: required,
54
53
  isOptional: isOptional
55
54
  }, (0, _tags.default)("checkboxgroup", props), {
@@ -12,13 +12,13 @@ export interface CheckboxProps extends CommonCheckableInputProps, MarginProps {
12
12
  "data-element"?: string;
13
13
  /** Identifier used for testing purposes, applied to the root element of the component. */
14
14
  "data-role"?: string;
15
- /** Aria label for rendered help component */
15
+ /** [Legacy] Aria label for rendered help component */
16
16
  helpAriaLabel?: string;
17
17
  /** When true label is inline */
18
18
  labelInline?: boolean;
19
19
  /** Accepts a callback function which is triggered on click event */
20
20
  onClick?: (ev: React.MouseEvent<HTMLInputElement>) => void;
21
- /** Overrides the default tooltip position */
21
+ /** [Legacy] Overrides the default tooltip position */
22
22
  tooltipPosition?: "top" | "bottom" | "left" | "right";
23
23
  /** The value of the checkbox, passed on form submit */
24
24
  value?: string;
@@ -14,19 +14,19 @@ export interface IconProps extends Omit<StyledIconProps, "type">, MarginProps, O
14
14
  id?: string;
15
15
  /** The ARIA role to be applied to the Icon */
16
16
  role?: string;
17
- /** The message to be displayed within the tooltip */
17
+ /** [Legacy] The message to be displayed within the tooltip */
18
18
  tooltipMessage?: React.ReactNode;
19
- /** The position to display the tooltip */
19
+ /** [Legacy] The position to display the tooltip */
20
20
  tooltipPosition?: TooltipPositions;
21
- /** Control whether the tooltip is visible */
21
+ /** [Legacy] Control whether the tooltip is visible */
22
22
  tooltipVisible?: boolean;
23
- /** Override background color of the Tooltip, provide any color from palette or any valid css color value. */
23
+ /** [Legacy] Override background color of the Tooltip, provide any color from palette or any valid css color value. */
24
24
  tooltipBgColor?: string;
25
- /** Override font color of the Tooltip, provide any color from palette or any valid css color value. */
25
+ /** [Legacy] Override font color of the Tooltip, provide any color from palette or any valid css color value. */
26
26
  tooltipFontColor?: string;
27
- /** Overrides the default flip behaviour of the Tooltip */
27
+ /** [Legacy] Overrides the default flip behaviour of the Tooltip */
28
28
  tooltipFlipOverrides?: TooltipPositions[];
29
- /** Id passed to the tooltip container, used for accessibility purposes */
29
+ /** [Legacy] Id passed to the tooltip container, used for accessibility purposes */
30
30
  tooltipId?: string;
31
31
  /**
32
32
  * Icon type
@@ -12,9 +12,9 @@ export interface LinkProps extends StyledLinkProps, React.AriaAttributes {
12
12
  onKeyDown?: (ev: React.KeyboardEvent<HTMLAnchorElement> | React.KeyboardEvent<HTMLButtonElement>) => void;
13
13
  /** Function called when a mouse down event triggers. */
14
14
  onMouseDown?: (ev: React.MouseEvent<HTMLAnchorElement> | React.MouseEvent<HTMLButtonElement>) => void;
15
- /** A message to display as a tooltip to the link. */
15
+ /** [Legacy] A message to display as a tooltip to the link. */
16
16
  tooltipMessage?: string;
17
- /** Positions the tooltip with the link. */
17
+ /** [Legacy] Positions the tooltip with the link. */
18
18
  tooltipPosition?: "bottom" | "left" | "right" | "top";
19
19
  /** Child content to render in the link. */
20
20
  children?: React.ReactNode;
@@ -19,7 +19,7 @@ const loaderAnimation = (0, _styledComponents.keyframes)`
19
19
  transform: scale(1);
20
20
  }
21
21
  `;
22
- const getDimentions = (size, roundedCornersOptOut) => {
22
+ const getDimensions = (size, roundedCornersOptOut) => {
23
23
  let width;
24
24
  let marginRight;
25
25
  switch (size) {
@@ -53,7 +53,7 @@ const StyledLoaderSquare = _styledComponents.default.div`
53
53
  animation: ${loaderAnimation} 1s infinite ease-in-out both;
54
54
  background-color: ${backgroundColor};
55
55
  display: inline-block;
56
- ${getDimentions(size, theme.roundedCornersOptOut)}
56
+ ${getDimensions(size, theme.roundedCornersOptOut)}
57
57
 
58
58
  ${isInsideButton && (0, _styledComponents.css)`
59
59
  background-color: ${isActive ? "var(--colorsUtilityYang100)" : "var(--colorsSemanticNeutral500)"};
@@ -6,14 +6,14 @@ Object.defineProperty(exports, "__esModule", {
6
6
  exports.default = void 0;
7
7
  var _styledComponents = _interopRequireWildcard(require("styled-components"));
8
8
  var _styledSystem = require("styled-system");
9
+ var _menu = _interopRequireDefault(require("../menu.config"));
10
+ var _link = _interopRequireDefault(require("../../link"));
9
11
  var _button = _interopRequireDefault(require("../../button/button.style"));
10
- var _link = require("../../link/link.style");
11
- var _icon = _interopRequireDefault(require("../../icon/icon.style"));
12
12
  var _iconButton = _interopRequireDefault(require("../../icon-button/icon-button.style"));
13
- var _menu = _interopRequireDefault(require("../menu.config"));
14
- var _link2 = _interopRequireDefault(require("../../link"));
15
- var _addFocusStyling = _interopRequireDefault(require("../../../style/utils/add-focus-styling"));
13
+ var _icon = _interopRequireDefault(require("../../icon/icon.style"));
14
+ var _link2 = require("../../link/link.style");
16
15
  var _themes = require("../../../style/themes");
16
+ var _addFocusStyling = _interopRequireDefault(require("../../../style/utils/add-focus-styling"));
17
17
  function _interopRequireDefault(e) { return e && e.__esModule ? e : { default: e }; }
18
18
  function _getRequireWildcardCache(e) { if ("function" != typeof WeakMap) return null; var r = new WeakMap(), t = new WeakMap(); return (_getRequireWildcardCache = function (e) { return e ? t : r; })(e); }
19
19
  function _interopRequireWildcard(e, r) { if (!r && e && e.__esModule) return e; if (null === e || "object" != typeof e && "function" != typeof e) return { default: e }; var t = _getRequireWildcardCache(r); if (t && t.has(e)) return t.get(e); var n = { __proto__: null }, a = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var u in e) if ("default" !== u && {}.hasOwnProperty.call(e, u)) { var i = a ? Object.getOwnPropertyDescriptor(e, u) : null; i && (i.get || i.set) ? Object.defineProperty(n, u, i) : n[u] = e[u]; } return n.default = e, t && t.set(e, n), n; }
@@ -87,7 +87,7 @@ const oldFocusStyling = `
87
87
  box-shadow: inset 0 0 0 var(--borderWidth300) var(--colorsSemanticFocus500);
88
88
  `;
89
89
  const StyledMenuItemWrapper = _styledComponents.default.a.attrs({
90
- as: _link2.default
90
+ as: _link.default
91
91
  })`
92
92
  ${({
93
93
  menuType,
@@ -130,17 +130,7 @@ const StyledMenuItemWrapper = _styledComponents.default.a.attrs({
130
130
  `}
131
131
  }
132
132
 
133
- ${!maxWidth && (0, _styledComponents.css)`
134
- a:has([data-component="icon"]):not(:has(button))
135
- ${_link.StyledContent},
136
- button:has([data-component="icon"]):not(:has(button))
137
- ${_link.StyledContent} {
138
- position: relative;
139
- top: -1px;
140
- }
141
- `}
142
-
143
- :has([data-element="input"]) ${_link.StyledContent} {
133
+ :has([data-element="input"]) ${_link2.StyledContent} {
144
134
  width: 100%;
145
135
  }
146
136
 
@@ -218,8 +208,8 @@ const StyledMenuItemWrapper = _styledComponents.default.a.attrs({
218
208
 
219
209
  > a:has(${_button.default}:not(.search-button)) {
220
210
  height: 100%;
221
-
222
- ${_link.StyledContent} {
211
+
212
+ ${_link2.StyledContent} {
223
213
  height: inherit;
224
214
 
225
215
  div {
@@ -252,25 +242,25 @@ const StyledMenuItemWrapper = _styledComponents.default.a.attrs({
252
242
  ` : `
253
243
  ${hasSubmenu || maxWidth && !inFullscreenView ? `
254
244
  a,
255
- ${_link.StyledLink} a,
245
+ ${_link2.StyledLink} a,
256
246
  button,
257
- ${_link.StyledLink} button {
247
+ ${_link2.StyledLink} button {
258
248
  padding: 11px 16px ${hasSubmenu && maxWidth ? "12px" : "10px"};
259
249
  }
260
250
  ` : `
261
251
  a,
262
- ${_link.StyledLink} a,
252
+ ${_link2.StyledLink} a,
263
253
  button,
264
- ${_link.StyledLink} button {
254
+ ${_link2.StyledLink} button {
265
255
  padding: ${!inFullscreenView ? "11px" : "0px"} 16px;
266
256
  }
267
257
  `}
268
258
  `}
269
259
 
270
260
  button,
271
- ${_link.StyledLink} button,
261
+ ${_link2.StyledLink} button,
272
262
  a,
273
- ${_link.StyledLink} a {
263
+ ${_link2.StyledLink} a {
274
264
  margin: 0px;
275
265
  text-align: left;
276
266
 
@@ -288,9 +278,9 @@ const StyledMenuItemWrapper = _styledComponents.default.a.attrs({
288
278
  a,
289
279
  button,
290
280
  [data-component="icon"],
291
- ${_link.StyledLink} a,
292
- ${_link.StyledLink} button,
293
- ${_link.StyledLink} [data-component="icon"] {
281
+ ${_link2.StyledLink} a,
282
+ ${_link2.StyledLink} button,
283
+ ${_link2.StyledLink} [data-component="icon"] {
294
284
  font-weight: 500;
295
285
  text-decoration: none;
296
286
  ${!hasInput && `color: ${_menu.default[menuType].color};`}
@@ -454,16 +444,16 @@ const StyledMenuItemWrapper = _styledComponents.default.a.attrs({
454
444
  }
455
445
  `}
456
446
 
457
-
447
+
458
448
  > a, > button {
459
449
  min-height: 40px;
460
450
  line-height: 40px;
461
451
  }
462
452
 
463
453
  a,
464
- ${_link.StyledLink} a,
454
+ ${_link2.StyledLink} a,
465
455
  button,
466
- ${_link.StyledLink} button {
456
+ ${_link2.StyledLink} button {
467
457
  width: 100vw;
468
458
  box-sizing: border-box;
469
459
  }
@@ -24,21 +24,21 @@ export interface PortraitProps extends MarginProps {
24
24
  darkBackground?: boolean;
25
25
  /** Prop for `onClick` events. */
26
26
  onClick?: (ev: React.MouseEvent<HTMLElement>) => void;
27
- /** The message to be displayed within the tooltip */
27
+ /** [Legacy] The message to be displayed within the tooltip */
28
28
  tooltipMessage?: React.ReactNode;
29
- /** The id attribute to use for the tooltip */
29
+ /** [Legacy] The id attribute to use for the tooltip */
30
30
  tooltipId?: string;
31
- /** Whether to to show the Tooltip */
31
+ /** [Legacy] Whether to to show the Tooltip */
32
32
  tooltipIsVisible?: boolean;
33
- /** Sets position of the tooltip */
33
+ /** [Legacy] Sets position of the tooltip */
34
34
  tooltipPosition?: "top" | "bottom" | "left" | "right";
35
- /** Defines the message type */
35
+ /** [Legacy] Defines the message type */
36
36
  tooltipType?: string;
37
- /** Defines the size of the tooltip content */
37
+ /** [Legacy] Defines the size of the tooltip content */
38
38
  tooltipSize?: "medium" | "large";
39
- /** Override background color of the Tooltip, provide any color from palette or any valid css color value. */
39
+ /** [Legacy] Override background color of the Tooltip, provide any color from palette or any valid css color value. */
40
40
  tooltipBgColor?: string;
41
- /** Override font color of the Tooltip, provide any color from palette or any valid css color value. */
41
+ /** [Legacy] Override font color of the Tooltip, provide any color from palette or any valid css color value. */
42
42
  tooltipFontColor?: string;
43
43
  }
44
44
  declare const Portrait: ({ alt, name, darkBackground, gravatar, iconType, initials, shape, size, src, onClick, tooltipMessage, tooltipId, tooltipIsVisible, tooltipPosition, tooltipType, tooltipSize, tooltipBgColor, tooltipFontColor, ...rest }: PortraitProps) => React.JSX.Element;
@@ -15,8 +15,8 @@ export interface RadioButtonGroupProps extends ValidationProps, MarginProps {
15
15
  /** The content for the RadioGroup Legend */
16
16
  legend?: string;
17
17
  /**
18
- * The content for the RadioButtonGroup Legend Help tooltip,
19
- * will be rendered as hint text when `validationRedesignOptIn` is true.
18
+ * The content for the RadioButtonGroup hint text,
19
+ * will only be rendered when `validationRedesignOptIn` is true.
20
20
  */
21
21
  legendHelp?: string;
22
22
  /** [Legacy] Text alignment of legend when inline */
@@ -70,7 +70,6 @@ const RadioButtonGroup = props => {
70
70
  legend: legend,
71
71
  error: error,
72
72
  warning: warning,
73
- info: info,
74
73
  inline: inlineLegend,
75
74
  legendWidth: legendWidth,
76
75
  legendAlign: legendAlign,
@@ -108,8 +107,6 @@ const RadioButtonGroup = props => {
108
107
  labelSpacing,
109
108
  error: !!error,
110
109
  warning: !!warning,
111
- info: !!info,
112
- required,
113
110
  ...child.props
114
111
  });
115
112
  }))))) : /*#__PURE__*/_react.default.createElement(_tooltipProvider.TooltipProvider, {
@@ -15,9 +15,9 @@ export interface RadioButtonProps extends Omit<CommonCheckableInputProps, "requi
15
15
  onClick?: (ev: React.MouseEvent<HTMLInputElement>) => void;
16
16
  /** the value of the Radio Button, passed on form submit */
17
17
  value: string;
18
- /** Overrides the default tooltip position */
18
+ /** [Legacy] Overrides the default tooltip position */
19
19
  tooltipPosition?: "top" | "bottom" | "left" | "right";
20
- /** Aria label for rendered help component */
20
+ /** [Legacy] Aria label for rendered help component */
21
21
  helpAriaLabel?: string;
22
22
  }
23
23
  export declare const RadioButton: React.ForwardRefExoticComponent<RadioButtonProps & InternalRadioButtonProps & React.RefAttributes<HTMLInputElement>>;
@@ -61,23 +61,19 @@ const RadioButton = exports.RadioButton = /*#__PURE__*/_react.default.forwardRef
61
61
  event.target.focus();
62
62
  }, [onChange]);
63
63
  const validationProps = {
64
- disabled,
65
- inputWidth,
66
64
  error,
67
65
  warning,
68
66
  info
69
67
  };
70
68
  const commonProps = {
71
69
  ...validationProps,
70
+ disabled,
71
+ inputWidth,
72
72
  fieldHelpInline,
73
73
  labelSpacing
74
74
  };
75
75
  const inputProps = {
76
- ...(validationRedesignOptIn ? {
77
- ...validationProps
78
- } : {
79
- ...commonProps
80
- }),
76
+ ...commonProps,
81
77
  autoFocus,
82
78
  checked,
83
79
  fieldHelp,
@@ -110,12 +106,7 @@ const RadioButton = exports.RadioButton = /*#__PURE__*/_react.default.forwardRef
110
106
  inline: inline,
111
107
  reverse: reverse,
112
108
  size: size
113
- }, validationRedesignOptIn ? {
114
- ...validationProps
115
- } : {
116
- ...commonProps,
117
- fieldHelp
118
- }, marginProps), /*#__PURE__*/_react.default.createElement(_checkableInput.default, inputProps, /*#__PURE__*/_react.default.createElement(_radioButtonSvg.default, null)));
109
+ }, commonProps, marginProps), /*#__PURE__*/_react.default.createElement(_checkableInput.default, inputProps, /*#__PURE__*/_react.default.createElement(_radioButtonSvg.default, null)));
119
110
  return /*#__PURE__*/_react.default.createElement(_react.default.Fragment, null, validationRedesignOptIn ? componentToRender : /*#__PURE__*/_react.default.createElement(_tooltipProvider.TooltipProvider, {
120
111
  helpAriaLabel: helpAriaLabel,
121
112
  tooltipPosition: tooltipPosition
@@ -58,7 +58,7 @@ export interface SearchProps extends ValidationProps, MarginProps {
58
58
  variant?: "default" | "dark";
59
59
  /** Input tabindex */
60
60
  tabIndex?: number;
61
- /** Overrides the default tooltip position */
61
+ /** [Legacy] Overrides the default tooltip position */
62
62
  tooltipPosition?: "top" | "bottom" | "left" | "right";
63
63
  }
64
64
  export declare type SearchHandle = {
@@ -45,7 +45,7 @@ const getBorderRadius = roundness => {
45
45
  return "var(--borderRadius100)";
46
46
  }
47
47
  };
48
- const getHeighlightVariant = variant => {
48
+ const getHighlightVariant = variant => {
49
49
  switch (variant) {
50
50
  case "success":
51
51
  return "var(--colorsSemanticPositive500)";
@@ -124,7 +124,7 @@ const StyledHighlight = exports.StyledHighlight = _styledComponents.default.div`
124
124
  position: relative;
125
125
  background: ${({
126
126
  variant
127
- }) => getHeighlightVariant(variant)};
127
+ }) => getHighlightVariant(variant)};
128
128
  border-radius: ${({
129
129
  roundness
130
130
  }) => getBorderRadius(roundness)};
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "carbon-react",
3
- "version": "144.20.0",
3
+ "version": "144.21.0",
4
4
  "description": "A library of reusable React components for easily building user interfaces.",
5
5
  "files": [
6
6
  "lib",