@box/blueprint-web 9.5.0 → 9.6.0
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.
|
@@ -27,7 +27,8 @@ const useCustomBranding = brandColor => {
|
|
|
27
27
|
--surface-nav-surface-brand-focus: ${buieTheme.primary.backgroundActive};
|
|
28
28
|
--surface-nav-surface-brand-hover: ${buieTheme.primary.backgroundHover};
|
|
29
29
|
--surface-nav-surface-brand: ${buieTheme.primary.background};
|
|
30
|
-
|
|
30
|
+
--surface-nav-surface-brand-foreground: ${buieTheme.primary.foreground};
|
|
31
|
+
|
|
31
32
|
/* Illustrations branding tokens */
|
|
32
33
|
--surface-illustration-surface-box-neutral: ${isBrandingEnabled ? Gray65 : BoxBlue100}
|
|
33
34
|
}`, 0);
|
|
@@ -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
|
-
|
|
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.
|
|
3
|
+
"version": "9.6.0",
|
|
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": "
|
|
66
|
+
"gitHead": "a0915a3746214234c39d00067ebf7fff64fae0cc",
|
|
67
67
|
"module": "lib-esm/index.js",
|
|
68
68
|
"main": "lib-esm/index.js",
|
|
69
69
|
"exports": {
|