@jetbrains/ring-ui 4.0.43 → 4.0.44

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.
@@ -11,7 +11,8 @@ const {children, ...dropdownPropTypes} = Dropdown.propTypes || {};
11
11
  const {
12
12
  id: idPropType,
13
13
  data: dataPropType,
14
- ariaLabel: ariaLabelPropType
14
+ ariaLabel: ariaLabelPropType,
15
+ onSelect: onSelectPropType
15
16
  } = PopupMenu.propTypes || {};
16
17
 
17
18
  const defaultAriaLabel = 'Dropdown menu';
@@ -37,7 +38,7 @@ function DropdownAnchorWrapper({anchor, pinned, active, activeListItemId, listId
37
38
  );
38
39
  }
39
40
  if (typeof anchor === 'function') {
40
- return anchor(anchorProps);
41
+ return anchor(({active, pinned, ...restProps}), anchorAriaProps);
41
42
  }
42
43
  if (!Array.isArray(anchor)) {
43
44
  return cloneElement(anchor, typeof anchor.type === 'string' ? anchorAriaProps : anchorProps);
@@ -56,7 +57,7 @@ DropdownAnchorWrapper.propTypes = {
56
57
  };
57
58
 
58
59
  const DropdownMenu = React.forwardRef(function DropdownMenu(
59
- {id, anchor, ariaLabel, data, menuProps, ...restDropdownProps},
60
+ {id, anchor, ariaLabel, data, onSelect, menuProps, ...restDropdownProps},
60
61
  forwardedRef
61
62
  ) {
62
63
  const listId = useMemo(() => id || getUID('dropdown-menu-list'), [id]);
@@ -87,6 +88,7 @@ const DropdownMenu = React.forwardRef(function DropdownMenu(
87
88
  closeOnSelect
88
89
  activateFirstItem
89
90
  data={data}
91
+ onSelect={onSelect}
90
92
  {...menuProps}
91
93
  />
92
94
  </Dropdown>
@@ -98,6 +100,7 @@ DropdownMenu.propTypes = {
98
100
  id: idPropType,
99
101
  data: dataPropType,
100
102
  ariaLabel: ariaLabelPropType,
103
+ onSelect: onSelectPropType,
101
104
  menuProps: PropTypes.object,
102
105
  ...dropdownPropTypes
103
106
  };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@jetbrains/ring-ui",
3
- "version": "4.0.43",
3
+ "version": "4.0.44",
4
4
  "description": "JetBrains UI library",
5
5
  "author": "JetBrains",
6
6
  "license": "Apache-2.0",
@@ -207,5 +207,5 @@
207
207
  "node": ">=7.4",
208
208
  "npm": ">=6.0.0"
209
209
  },
210
- "gitHead": "ef0147be4eea764b49b5cd663b3daf92a56e0618"
210
+ "gitHead": "00b6bd2545cdb03747a9db9517bd063a1d4033b3"
211
211
  }