@box/blueprint-web 9.5.0 → 9.5.1

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.
@@ -1,11 +1,16 @@
1
1
  const filterNonHtmlProps = restProps => {
2
2
  const div = document.createElement('div');
3
+ function isDivProperty(prop) {
4
+ return prop in div;
5
+ }
6
+ function isHtmlProperty(prop) {
7
+ return prop.toLowerCase().replace('capture', '') in HTMLElement.prototype;
8
+ }
9
+ function isException(prop) {
10
+ return prop.startsWith('data-') || prop.startsWith('aria-');
11
+ }
3
12
  return Object.fromEntries(Object.entries(restProps).filter(([prop, value]) => {
4
- const exceptions = new Set(['aria-selected', 'aria-label', 'data-active-item']);
5
- const isDivProperty = (prop in div);
6
- const isHtmlProperty = (prop.toLowerCase().replace('capture', '') in HTMLElement.prototype);
7
- const isException = exceptions.has(prop);
8
- return isDivProperty || isHtmlProperty || isException;
13
+ return isException(prop) || isDivProperty(prop) || isHtmlProperty(prop);
9
14
  }));
10
15
  };
11
16
 
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@box/blueprint-web",
3
- "version": "9.5.0",
3
+ "version": "9.5.1",
4
4
  "type": "module",
5
5
  "license": "SEE LICENSE IN LICENSE",
6
6
  "publishConfig": {
@@ -63,7 +63,7 @@
63
63
  "react-stately": "^3.31.1",
64
64
  "tsx": "^4.16.5"
65
65
  },
66
- "gitHead": "b2faf0831bb50c94a2fad4178d7e8b580c5a6c6e",
66
+ "gitHead": "164a2abe192db942df9ea7e09bd39fbd2a9a1d2e",
67
67
  "module": "lib-esm/index.js",
68
68
  "main": "lib-esm/index.js",
69
69
  "exports": {