grommet 2.25.2 → 2.25.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.
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "grommet",
3
- "version": "2.25.2",
3
+ "version": "2.25.3",
4
4
  "main": "index.js",
5
5
  "module": "es6/index.js",
6
6
  "jsnext:main": "es6/index.js",
@@ -52,13 +52,10 @@
52
52
  "styled-components": ">= 5.1"
53
53
  },
54
54
  "dependencies": {
55
- "@testing-library/testcafe": "^4.4.1",
56
55
  "grommet-icons": "^4.7.0",
57
56
  "hoist-non-react-statics": "^3.2.0",
58
57
  "markdown-to-jsx": "^7.1.5",
59
- "prop-types": "^15.8.1",
60
- "testcafe": "^1.20.1",
61
- "testcafe-react-selectors": "^5.0.2"
58
+ "prop-types": "^15.8.1"
62
59
  },
63
60
  "devDependencies": {
64
61
  "@babel/cli": "^7.18.9",
@@ -83,6 +80,7 @@
83
80
  "@testing-library/dom": "8.14.0",
84
81
  "@testing-library/jest-dom": "^5.16.4",
85
82
  "@testing-library/react": "^13.3.0",
83
+ "@testing-library/testcafe": "^4.4.1",
86
84
  "@testing-library/user-event": "14.2.1",
87
85
  "@types/jest": "^28.1.6",
88
86
  "@types/jest-axe": "^3.5.4",
@@ -138,6 +136,8 @@
138
136
  "simple-git": "^3.10.0",
139
137
  "styled-components": "^5.3.5",
140
138
  "tarball-extract": "^0.0.6",
139
+ "testcafe": "^2.0.0",
140
+ "testcafe-react-selectors": "^5.0.2",
141
141
  "ts-jest": "^28.0.7",
142
142
  "ts-loader": "^8.4.0",
143
143
  "typescript": "^4.7.4",
package/utils/DOM.js CHANGED
@@ -1,7 +1,7 @@
1
1
  "use strict";
2
2
 
3
3
  exports.__esModule = true;
4
- exports.shouldKeepFocus = exports.setFocusWithoutScroll = exports.makeNodeUnfocusable = exports.makeNodeFocusable = exports.isNodeBeforeScroll = exports.isNodeAfterScroll = exports.isFocusable = exports.getNewContainer = exports.getFirstFocusableDescendant = exports.findVisibleParent = exports.findScrollParents = exports.findScrollParent = exports.containsFocus = void 0;
4
+ exports.shouldKeepFocus = exports.setFocusWithoutScroll = exports.makeNodeUnfocusable = exports.makeNodeFocusable = exports.isNodeBeforeScroll = exports.isNodeAfterScroll = exports.isFocusable = exports.getNewContainer = exports.getFirstFocusableDescendant = exports.findVisibleParent = exports.findScrollParents = exports.findScrollParent = exports.findButtonParent = exports.containsFocus = void 0;
5
5
 
6
6
  var findScrollParent = function findScrollParent(element, horizontal) {
7
7
  var result;
@@ -242,4 +242,11 @@ var isNodeBeforeScroll = function isNodeBeforeScroll(node, target) {
242
242
  return top <= targetTop;
243
243
  };
244
244
 
245
- exports.isNodeBeforeScroll = isNodeBeforeScroll;
245
+ exports.isNodeBeforeScroll = isNodeBeforeScroll;
246
+
247
+ var findButtonParent = function findButtonParent(element) {
248
+ if (element && element.nodeName !== 'BUTTON' && element.nodeName !== 'A') return findButtonParent(element.parentElement);
249
+ return element;
250
+ };
251
+
252
+ exports.findButtonParent = findButtonParent;