@pingux/astro 1.26.1-alpha.1 → 1.26.1-alpha.2

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.
@@ -42,7 +42,7 @@ var _isIterable = require("../../utils/devUtils/props/isIterable");
42
42
 
43
43
  var _react2 = require("@emotion/react");
44
44
 
45
- var _excluded = ["onPress", "onExpandedChange"];
45
+ var _excluded = ["onExpandedChange"];
46
46
 
47
47
  function _getRequireWildcardCache(nodeInterop) { if (typeof _WeakMap !== "function") return null; var cacheBabelInterop = new _WeakMap(); var cacheNodeInterop = new _WeakMap(); return (_getRequireWildcardCache = function _getRequireWildcardCache(nodeInterop) { return nodeInterop ? cacheNodeInterop : cacheBabelInterop; })(nodeInterop); }
48
48
 
@@ -59,8 +59,7 @@ function _interopRequireWildcard(obj, nodeInterop) { if (!nodeInterop && obj &&
59
59
  var AccordionGroup = /*#__PURE__*/(0, _react.forwardRef)(function (props, ref) {
60
60
  var _context;
61
61
 
62
- var onPress = props.onPress,
63
- onExpandedChange = props.onExpandedChange,
62
+ var onExpandedChange = props.onExpandedChange,
64
63
  others = (0, _objectWithoutProperties2["default"])(props, _excluded);
65
64
  var state = (0, _tree.useTreeState)(props);
66
65
  var accordionRef = (0, _react.useRef)();
@@ -90,9 +89,6 @@ AccordionGroup.propTypes = {
90
89
  /** Handler that is called when items are expanded or collapsed. */
91
90
  onExpandedChange: _propTypes["default"].func,
92
91
 
93
- /** Handler that is called when the press is released over the target. */
94
- onPress: _propTypes["default"].func,
95
-
96
92
  /** Item objects in the collection. */
97
93
  items: _isIterable.isIterableProp,
98
94
 
@@ -81,22 +81,6 @@ var getComponentInOverlayPanel = function getComponentInOverlayPanel() {
81
81
  }
82
82
  }
83
83
  });
84
- test('button press', function () {
85
- var onPress = jest.fn();
86
- getComponent({
87
- onPress: onPress
88
- });
89
-
90
- var buttons = _testWrapper.screen.getAllByRole('button');
91
-
92
- var selectedItem = buttons[0];
93
- expect(selectedItem).not.toHaveClass('is-pressed');
94
- expect(onPress).not.toHaveBeenCalled(); // Hold down the button to see pressed styles
95
-
96
- _testWrapper.fireEvent.mouseDown(selectedItem);
97
-
98
- expect(selectedItem).toHaveClass('is-pressed');
99
- });
100
84
  test('button press uses callback', function () {
101
85
  var onPress = jest.fn();
102
86
  getComponent({
@@ -2,7 +2,7 @@ import _extends from "@babel/runtime-corejs3/helpers/esm/extends";
2
2
  import _Array$from from "@babel/runtime-corejs3/core-js-stable/array/from";
3
3
  import _mapInstanceProperty from "@babel/runtime-corejs3/core-js-stable/instance/map";
4
4
  import _objectWithoutProperties from "@babel/runtime-corejs3/helpers/esm/objectWithoutProperties";
5
- var _excluded = ["onPress", "onExpandedChange"];
5
+ var _excluded = ["onExpandedChange"];
6
6
  import React, { forwardRef, useRef, useImperativeHandle } from 'react';
7
7
  import { useAccordion } from '@react-aria/accordion';
8
8
  import { useTreeState } from '@react-stately/tree';
@@ -24,8 +24,7 @@ import { jsx as ___EmotionJSX } from "@emotion/react";
24
24
  var AccordionGroup = /*#__PURE__*/forwardRef(function (props, ref) {
25
25
  var _context;
26
26
 
27
- var onPress = props.onPress,
28
- onExpandedChange = props.onExpandedChange,
27
+ var onExpandedChange = props.onExpandedChange,
29
28
  others = _objectWithoutProperties(props, _excluded);
30
29
 
31
30
  var state = useTreeState(props);
@@ -56,9 +55,6 @@ AccordionGroup.propTypes = {
56
55
  /** Handler that is called when items are expanded or collapsed. */
57
56
  onExpandedChange: PropTypes.func,
58
57
 
59
- /** Handler that is called when the press is released over the target. */
60
- onPress: PropTypes.func,
61
-
62
58
  /** Item objects in the collection. */
63
59
  items: isIterableProp,
64
60
 
@@ -66,19 +66,6 @@ axeTest(getComponent, {
66
66
  }
67
67
  }
68
68
  });
69
- test('button press', function () {
70
- var onPress = jest.fn();
71
- getComponent({
72
- onPress: onPress
73
- });
74
- var buttons = screen.getAllByRole('button');
75
- var selectedItem = buttons[0];
76
- expect(selectedItem).not.toHaveClass('is-pressed');
77
- expect(onPress).not.toHaveBeenCalled(); // Hold down the button to see pressed styles
78
-
79
- fireEvent.mouseDown(selectedItem);
80
- expect(selectedItem).toHaveClass('is-pressed');
81
- });
82
69
  test('button press uses callback', function () {
83
70
  var onPress = jest.fn();
84
71
  getComponent({
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@pingux/astro",
3
- "version": "1.26.1-alpha.1",
3
+ "version": "1.26.1-alpha.2",
4
4
  "description": "PingUX themeable React component library",
5
5
  "author": "ux-development@pingidentity.com",
6
6
  "license": "Apache-2.0",