carbon-react 144.18.0 → 144.19.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.
@@ -4,6 +4,8 @@ import { IconType } from "../../icon";
4
4
  export declare type ActionPopoverMenuButtonAria = {
5
5
  "aria-haspopup": string;
6
6
  "aria-label": string;
7
+ "aria-labelledby"?: string;
8
+ "aria-describedby"?: string;
7
9
  "aria-controls": string;
8
10
  "aria-expanded": string;
9
11
  };
@@ -26,7 +28,7 @@ export interface ActionPopoverMenuButtonProps {
26
28
  tabIndex: number;
27
29
  }
28
30
  export declare const ActionPopoverMenuButton: {
29
- ({ buttonType, iconType, iconPosition, size, children, ...props }: ActionPopoverMenuButtonProps): React.JSX.Element;
31
+ ({ buttonType, iconType, iconPosition, size, children, ariaAttributes, ...props }: ActionPopoverMenuButtonProps): React.JSX.Element;
30
32
  displayName: string;
31
33
  };
32
34
  export default ActionPopoverMenuButton;
@@ -9,12 +9,13 @@ export const ActionPopoverMenuButton = ({
9
9
  iconPosition,
10
10
  size,
11
11
  children,
12
+ ariaAttributes,
12
13
  ...props
13
14
  }) => /*#__PURE__*/React.createElement(MenuButtonOverrideWrapper, null, /*#__PURE__*/React.createElement(Button, _extends({
14
15
  buttonType: buttonType,
15
16
  iconType: iconType,
16
17
  iconPosition: iconPosition,
17
18
  size: size
18
- }, props), children));
19
+ }, ariaAttributes, props), children));
19
20
  ActionPopoverMenuButton.displayName = "ActionPopoverMenuButton";
20
21
  export default ActionPopoverMenuButton;
@@ -7,6 +7,8 @@ export interface RenderButtonProps {
7
7
  ariaAttributes: {
8
8
  "aria-haspopup": string;
9
9
  "aria-label": string;
10
+ "aria-labelledby"?: string;
11
+ "aria-describedby"?: string;
10
12
  "aria-controls": string;
11
13
  "aria-expanded": string;
12
14
  };
@@ -32,6 +34,10 @@ export interface ActionPopoverProps extends MarginProps {
32
34
  rightAlignMenu?: boolean;
33
35
  /** Prop to specify an aria-label for the component */
34
36
  "aria-label"?: string;
37
+ /** Prop to specify an aria-labelledby for the component */
38
+ "aria-labelledby"?: string;
39
+ /** Prop to specify an aria-describedby for the component */
40
+ "aria-describedby"?: string;
35
41
  }
36
- export declare const ActionPopover: ({ children, id, onOpen, onClose, rightAlignMenu, renderButton, placement, horizontalAlignment, submenuPosition, "aria-label": ariaLabel, ...rest }: ActionPopoverProps) => React.JSX.Element;
42
+ export declare const ActionPopover: ({ children, id, onOpen, onClose, rightAlignMenu, renderButton, placement, horizontalAlignment, submenuPosition, "aria-label": ariaLabel, "aria-labelledby": ariaLabelledBy, "aria-describedby": ariaDescribedBy, ...rest }: ActionPopoverProps) => React.JSX.Element;
37
43
  export default ActionPopover;
@@ -26,6 +26,8 @@ export const ActionPopover = ({
26
26
  horizontalAlignment = "left",
27
27
  submenuPosition = "left",
28
28
  "aria-label": ariaLabel,
29
+ "aria-labelledby": ariaLabelledBy,
30
+ "aria-describedby": ariaDescribedBy,
29
31
  ...rest
30
32
  }) => {
31
33
  const l = useLocale();
@@ -143,6 +145,8 @@ export const ActionPopover = ({
143
145
  ariaAttributes: {
144
146
  "aria-haspopup": "true",
145
147
  "aria-label": ariaLabel || l.actionPopover.ariaLabel(),
148
+ "aria-labelledby": ariaLabelledBy,
149
+ "aria-describedby": ariaDescribedBy,
146
150
  "aria-controls": menuID,
147
151
  "aria-expanded": `${isOpen}`
148
152
  }
@@ -152,6 +156,8 @@ export const ActionPopover = ({
152
156
  role: "button",
153
157
  "aria-haspopup": "true",
154
158
  "aria-label": ariaLabel || l.actionPopover.ariaLabel(),
159
+ "aria-labelledby": ariaLabelledBy,
160
+ "aria-describedby": ariaDescribedBy,
155
161
  "aria-controls": menuID,
156
162
  "aria-expanded": isOpen,
157
163
  tabIndex: isOpen ? -1 : 0,
@@ -4,6 +4,8 @@ import { IconType } from "../../icon";
4
4
  export declare type ActionPopoverMenuButtonAria = {
5
5
  "aria-haspopup": string;
6
6
  "aria-label": string;
7
+ "aria-labelledby"?: string;
8
+ "aria-describedby"?: string;
7
9
  "aria-controls": string;
8
10
  "aria-expanded": string;
9
11
  };
@@ -26,7 +28,7 @@ export interface ActionPopoverMenuButtonProps {
26
28
  tabIndex: number;
27
29
  }
28
30
  export declare const ActionPopoverMenuButton: {
29
- ({ buttonType, iconType, iconPosition, size, children, ...props }: ActionPopoverMenuButtonProps): React.JSX.Element;
31
+ ({ buttonType, iconType, iconPosition, size, children, ariaAttributes, ...props }: ActionPopoverMenuButtonProps): React.JSX.Element;
30
32
  displayName: string;
31
33
  };
32
34
  export default ActionPopoverMenuButton;
@@ -16,13 +16,14 @@ const ActionPopoverMenuButton = ({
16
16
  iconPosition,
17
17
  size,
18
18
  children,
19
+ ariaAttributes,
19
20
  ...props
20
21
  }) => /*#__PURE__*/_react.default.createElement(_actionPopover.MenuButtonOverrideWrapper, null, /*#__PURE__*/_react.default.createElement(_button.default, _extends({
21
22
  buttonType: buttonType,
22
23
  iconType: iconType,
23
24
  iconPosition: iconPosition,
24
25
  size: size
25
- }, props), children));
26
+ }, ariaAttributes, props), children));
26
27
  exports.ActionPopoverMenuButton = ActionPopoverMenuButton;
27
28
  ActionPopoverMenuButton.displayName = "ActionPopoverMenuButton";
28
29
  var _default = exports.default = ActionPopoverMenuButton;
@@ -7,6 +7,8 @@ export interface RenderButtonProps {
7
7
  ariaAttributes: {
8
8
  "aria-haspopup": string;
9
9
  "aria-label": string;
10
+ "aria-labelledby"?: string;
11
+ "aria-describedby"?: string;
10
12
  "aria-controls": string;
11
13
  "aria-expanded": string;
12
14
  };
@@ -32,6 +34,10 @@ export interface ActionPopoverProps extends MarginProps {
32
34
  rightAlignMenu?: boolean;
33
35
  /** Prop to specify an aria-label for the component */
34
36
  "aria-label"?: string;
37
+ /** Prop to specify an aria-labelledby for the component */
38
+ "aria-labelledby"?: string;
39
+ /** Prop to specify an aria-describedby for the component */
40
+ "aria-describedby"?: string;
35
41
  }
36
- export declare const ActionPopover: ({ children, id, onOpen, onClose, rightAlignMenu, renderButton, placement, horizontalAlignment, submenuPosition, "aria-label": ariaLabel, ...rest }: ActionPopoverProps) => React.JSX.Element;
42
+ export declare const ActionPopover: ({ children, id, onOpen, onClose, rightAlignMenu, renderButton, placement, horizontalAlignment, submenuPosition, "aria-label": ariaLabel, "aria-labelledby": ariaLabelledBy, "aria-describedby": ariaDescribedBy, ...rest }: ActionPopoverProps) => React.JSX.Element;
37
43
  export default ActionPopover;
@@ -35,6 +35,8 @@ const ActionPopover = ({
35
35
  horizontalAlignment = "left",
36
36
  submenuPosition = "left",
37
37
  "aria-label": ariaLabel,
38
+ "aria-labelledby": ariaLabelledBy,
39
+ "aria-describedby": ariaDescribedBy,
38
40
  ...rest
39
41
  }) => {
40
42
  const l = (0, _useLocale.default)();
@@ -152,6 +154,8 @@ const ActionPopover = ({
152
154
  ariaAttributes: {
153
155
  "aria-haspopup": "true",
154
156
  "aria-label": ariaLabel || l.actionPopover.ariaLabel(),
157
+ "aria-labelledby": ariaLabelledBy,
158
+ "aria-describedby": ariaDescribedBy,
155
159
  "aria-controls": menuID,
156
160
  "aria-expanded": `${isOpen}`
157
161
  }
@@ -161,6 +165,8 @@ const ActionPopover = ({
161
165
  role: "button",
162
166
  "aria-haspopup": "true",
163
167
  "aria-label": ariaLabel || l.actionPopover.ariaLabel(),
168
+ "aria-labelledby": ariaLabelledBy,
169
+ "aria-describedby": ariaDescribedBy,
164
170
  "aria-controls": menuID,
165
171
  "aria-expanded": isOpen,
166
172
  tabIndex: isOpen ? -1 : 0,
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "carbon-react",
3
- "version": "144.18.0",
3
+ "version": "144.19.0",
4
4
  "description": "A library of reusable React components for easily building user interfaces.",
5
5
  "files": [
6
6
  "lib",