@pingux/astro 2.120.0-alpha.1 → 2.120.0-alpha.3

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.
@@ -82,7 +82,6 @@ var Menu = /*#__PURE__*/(0, _react.forwardRef)(function (props, ref) {
82
82
  key: element.key,
83
83
  section: element,
84
84
  state: state,
85
- onAction: onAction,
86
85
  isDisabled: isDisabled,
87
86
  isFocusVisible: isFocusVisible,
88
87
  isNotFocusedOnHover: isNotFocusedOnHover
@@ -92,7 +91,6 @@ var Menu = /*#__PURE__*/(0, _react.forwardRef)(function (props, ref) {
92
91
  key: element.key,
93
92
  item: element,
94
93
  state: state,
95
- onAction: onAction,
96
94
  isDisabled: isDisabled,
97
95
  isFocusVisible: isFocusVisible,
98
96
  isNotFocusedOnHover: isNotFocusedOnHover
@@ -148,9 +148,11 @@ test('should fire onAction', function () {
148
148
  key: 'Enter'
149
149
  });
150
150
  expect(onAction).toHaveBeenNthCalledWith(1, defaultItems[0].id);
151
+ expect(onAction).toHaveBeenCalledTimes(1);
151
152
 
152
153
  // Click events
153
154
  _userEvent["default"].click(menuItems[1]);
155
+ expect(onAction).toHaveBeenCalledTimes(2);
154
156
  expect(onAction).toHaveBeenNthCalledWith(2, defaultItems[1].id);
155
157
  });
156
158
  test('should not fire onSelectionChange when selectionMode is none', function () {
@@ -33,7 +33,6 @@ var MenuItem = /*#__PURE__*/(0, _react.forwardRef)(function (props, ref) {
33
33
  isFocusVisible = props.isFocusVisible,
34
34
  isNotFocusedOnHover = props.isNotFocusedOnHover,
35
35
  className = props.className,
36
- onAction = props.onAction,
37
36
  state = props.state;
38
37
  var _useMenuContext = (0, _MenuContext.useMenuContext)(),
39
38
  onClose = _useMenuContext.onClose,
@@ -54,7 +53,6 @@ var MenuItem = /*#__PURE__*/(0, _react.forwardRef)(function (props, ref) {
54
53
  key: item === null || item === void 0 ? void 0 : item.key,
55
54
  'aria-label': item === null || item === void 0 ? void 0 : item['aria-label'],
56
55
  isDisabled: isDisabled,
57
- onAction: onAction,
58
56
  isSelected: isSelected,
59
57
  onClose: onClose,
60
58
  closeOnSelect: closeOnSelect
@@ -29,7 +29,6 @@ function _interopRequireWildcard(obj, nodeInterop) { if (!nodeInterop && obj &&
29
29
  var _context;
30
30
  var section = props.section,
31
31
  state = props.state,
32
- onAction = props.onAction,
33
32
  isDisabled = props.isDisabled,
34
33
  isFocusVisible = props.isFocusVisible,
35
34
  isNotFocusedOnHover = props.isNotFocusedOnHover;
@@ -65,7 +64,6 @@ function _interopRequireWildcard(obj, nodeInterop) { if (!nodeInterop && obj &&
65
64
  key: node.key,
66
65
  item: node,
67
66
  state: state,
68
- onAction: onAction,
69
67
  isDisabled: isDisabled,
70
68
  isFocusVisible: isFocusVisible,
71
69
  isNotFocusedOnHover: isNotFocusedOnHover
@@ -71,7 +71,6 @@ var Menu = /*#__PURE__*/forwardRef(function (props, ref) {
71
71
  key: element.key,
72
72
  section: element,
73
73
  state: state,
74
- onAction: onAction,
75
74
  isDisabled: isDisabled,
76
75
  isFocusVisible: isFocusVisible,
77
76
  isNotFocusedOnHover: isNotFocusedOnHover
@@ -81,7 +80,6 @@ var Menu = /*#__PURE__*/forwardRef(function (props, ref) {
81
80
  key: element.key,
82
81
  item: element,
83
82
  state: state,
84
- onAction: onAction,
85
83
  isDisabled: isDisabled,
86
84
  isFocusVisible: isFocusVisible,
87
85
  isNotFocusedOnHover: isNotFocusedOnHover
@@ -145,9 +145,11 @@ test('should fire onAction', function () {
145
145
  key: 'Enter'
146
146
  });
147
147
  expect(onAction).toHaveBeenNthCalledWith(1, defaultItems[0].id);
148
+ expect(onAction).toHaveBeenCalledTimes(1);
148
149
 
149
150
  // Click events
150
151
  userEvent.click(menuItems[1]);
152
+ expect(onAction).toHaveBeenCalledTimes(2);
151
153
  expect(onAction).toHaveBeenNthCalledWith(2, defaultItems[1].id);
152
154
  });
153
155
  test('should not fire onSelectionChange when selectionMode is none', function () {
@@ -21,7 +21,6 @@ var MenuItem = /*#__PURE__*/forwardRef(function (props, ref) {
21
21
  isFocusVisible = props.isFocusVisible,
22
22
  isNotFocusedOnHover = props.isNotFocusedOnHover,
23
23
  className = props.className,
24
- onAction = props.onAction,
25
24
  state = props.state;
26
25
  var _useMenuContext = useMenuContext(),
27
26
  onClose = _useMenuContext.onClose,
@@ -42,7 +41,6 @@ var MenuItem = /*#__PURE__*/forwardRef(function (props, ref) {
42
41
  key: item === null || item === void 0 ? void 0 : item.key,
43
42
  'aria-label': item === null || item === void 0 ? void 0 : item['aria-label'],
44
43
  isDisabled: isDisabled,
45
- onAction: onAction,
46
44
  isSelected: isSelected,
47
45
  onClose: onClose,
48
46
  closeOnSelect: closeOnSelect
@@ -18,7 +18,6 @@ var MenuSection = /*#__PURE__*/forwardRef(function (props, ref) {
18
18
  var _context;
19
19
  var section = props.section,
20
20
  state = props.state,
21
- onAction = props.onAction,
22
21
  isDisabled = props.isDisabled,
23
22
  isFocusVisible = props.isFocusVisible,
24
23
  isNotFocusedOnHover = props.isNotFocusedOnHover;
@@ -54,7 +53,6 @@ var MenuSection = /*#__PURE__*/forwardRef(function (props, ref) {
54
53
  key: node.key,
55
54
  item: node,
56
55
  state: state,
57
- onAction: onAction,
58
56
  isDisabled: isDisabled,
59
57
  isFocusVisible: isFocusVisible,
60
58
  isNotFocusedOnHover: isNotFocusedOnHover
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@pingux/astro",
3
- "version": "2.120.0-alpha.1",
3
+ "version": "2.120.0-alpha.3",
4
4
  "description": "React component library for Ping Identity's design system",
5
5
  "repository": {
6
6
  "type": "git",