carbon-react 144.17.1 → 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,
@@ -31,6 +31,8 @@ export interface MultiSelectProps extends Omit<FormInputPropTypes, "defaultValue
31
31
  onFilterChange?: (filterText: string) => void;
32
32
  /** A custom callback for when the dropdown menu opens */
33
33
  onOpen?: () => void;
34
+ /** A callback that is triggered when a user scrolls to the bottom of the list */
35
+ onListScrollBottom?: () => void;
34
36
  /** If true the Component opens on focus */
35
37
  openOnFocus?: boolean;
36
38
  /** SelectList table header, should consist of multiple th elements.
@@ -40,6 +40,7 @@ const MultiSelect = /*#__PURE__*/React.forwardRef(({
40
40
  noResultsMessage,
41
41
  placeholder,
42
42
  isLoading,
43
+ onListScrollBottom,
43
44
  tableHeader,
44
45
  multiColumn,
45
46
  tooltipPosition,
@@ -449,6 +450,7 @@ const MultiSelect = /*#__PURE__*/React.forwardRef(({
449
450
  highlightedValue: highlightedValue,
450
451
  noResultsMessage: noResultsMessage,
451
452
  isLoading: isLoading,
453
+ onListScrollBottom: onListScrollBottom,
452
454
  tableHeader: tableHeader,
453
455
  multiColumn: multiColumn,
454
456
  listPlacement: listWidth !== undefined ? placement : listPlacement,
@@ -912,6 +914,7 @@ if (process.env.NODE_ENV !== "production") {
912
914
  "onKeyPressCapture": PropTypes.func,
913
915
  "onKeyUp": PropTypes.func,
914
916
  "onKeyUpCapture": PropTypes.func,
917
+ "onListScrollBottom": PropTypes.func,
915
918
  "onLoad": PropTypes.func,
916
919
  "onLoadCapture": PropTypes.func,
917
920
  "onLoadedData": PropTypes.func,
@@ -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,
@@ -31,6 +31,8 @@ export interface MultiSelectProps extends Omit<FormInputPropTypes, "defaultValue
31
31
  onFilterChange?: (filterText: string) => void;
32
32
  /** A custom callback for when the dropdown menu opens */
33
33
  onOpen?: () => void;
34
+ /** A callback that is triggered when a user scrolls to the bottom of the list */
35
+ onListScrollBottom?: () => void;
34
36
  /** If true the Component opens on focus */
35
37
  openOnFocus?: boolean;
36
38
  /** SelectList table header, should consist of multiple th elements.
@@ -49,6 +49,7 @@ const MultiSelect = exports.MultiSelect = /*#__PURE__*/_react.default.forwardRef
49
49
  noResultsMessage,
50
50
  placeholder,
51
51
  isLoading,
52
+ onListScrollBottom,
52
53
  tableHeader,
53
54
  multiColumn,
54
55
  tooltipPosition,
@@ -458,6 +459,7 @@ const MultiSelect = exports.MultiSelect = /*#__PURE__*/_react.default.forwardRef
458
459
  highlightedValue: highlightedValue,
459
460
  noResultsMessage: noResultsMessage,
460
461
  isLoading: isLoading,
462
+ onListScrollBottom: onListScrollBottom,
461
463
  tableHeader: tableHeader,
462
464
  multiColumn: multiColumn,
463
465
  listPlacement: listWidth !== undefined ? placement : listPlacement,
@@ -921,6 +923,7 @@ if (process.env.NODE_ENV !== "production") {
921
923
  "onKeyPressCapture": _propTypes.default.func,
922
924
  "onKeyUp": _propTypes.default.func,
923
925
  "onKeyUpCapture": _propTypes.default.func,
926
+ "onListScrollBottom": _propTypes.default.func,
924
927
  "onLoad": _propTypes.default.func,
925
928
  "onLoadCapture": _propTypes.default.func,
926
929
  "onLoadedData": _propTypes.default.func,
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "carbon-react",
3
- "version": "144.17.1",
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",