@zendeskgarden/react-theming 8.47.0 → 8.48.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.
package/dist/index.cjs.js
CHANGED
|
@@ -24,14 +24,9 @@ function ownKeys(object, enumerableOnly) {
|
|
|
24
24
|
|
|
25
25
|
if (Object.getOwnPropertySymbols) {
|
|
26
26
|
var symbols = Object.getOwnPropertySymbols(object);
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
return Object.getOwnPropertyDescriptor(object, sym).enumerable;
|
|
31
|
-
});
|
|
32
|
-
}
|
|
33
|
-
|
|
34
|
-
keys.push.apply(keys, symbols);
|
|
27
|
+
enumerableOnly && (symbols = symbols.filter(function (sym) {
|
|
28
|
+
return Object.getOwnPropertyDescriptor(object, sym).enumerable;
|
|
29
|
+
})), keys.push.apply(keys, symbols);
|
|
35
30
|
}
|
|
36
31
|
|
|
37
32
|
return keys;
|
|
@@ -39,19 +34,12 @@ function ownKeys(object, enumerableOnly) {
|
|
|
39
34
|
|
|
40
35
|
function _objectSpread2(target) {
|
|
41
36
|
for (var i = 1; i < arguments.length; i++) {
|
|
42
|
-
var source = arguments[i]
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
} else if (Object.getOwnPropertyDescriptors) {
|
|
49
|
-
Object.defineProperties(target, Object.getOwnPropertyDescriptors(source));
|
|
50
|
-
} else {
|
|
51
|
-
ownKeys(Object(source)).forEach(function (key) {
|
|
52
|
-
Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key));
|
|
53
|
-
});
|
|
54
|
-
}
|
|
37
|
+
var source = null != arguments[i] ? arguments[i] : {};
|
|
38
|
+
i % 2 ? ownKeys(Object(source), !0).forEach(function (key) {
|
|
39
|
+
_defineProperty(target, key, source[key]);
|
|
40
|
+
}) : Object.getOwnPropertyDescriptors ? Object.defineProperties(target, Object.getOwnPropertyDescriptors(source)) : ownKeys(Object(source)).forEach(function (key) {
|
|
41
|
+
Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key));
|
|
42
|
+
});
|
|
55
43
|
}
|
|
56
44
|
|
|
57
45
|
return target;
|
|
@@ -60,17 +48,11 @@ function _objectSpread2(target) {
|
|
|
60
48
|
function _typeof(obj) {
|
|
61
49
|
"@babel/helpers - typeof";
|
|
62
50
|
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
}
|
|
68
|
-
_typeof = function (obj) {
|
|
69
|
-
return obj && typeof Symbol === "function" && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj;
|
|
70
|
-
};
|
|
71
|
-
}
|
|
72
|
-
|
|
73
|
-
return _typeof(obj);
|
|
51
|
+
return _typeof = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function (obj) {
|
|
52
|
+
return typeof obj;
|
|
53
|
+
} : function (obj) {
|
|
54
|
+
return obj && "function" == typeof Symbol && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj;
|
|
55
|
+
}, _typeof(obj);
|
|
74
56
|
}
|
|
75
57
|
|
|
76
58
|
function _defineProperty(obj, key, value) {
|
|
@@ -496,14 +478,14 @@ var ThemeProvider = function ThemeProvider(_ref) {
|
|
|
496
478
|
other = _objectWithoutProperties(_ref, _excluded);
|
|
497
479
|
var scopeRef = React.useRef(null);
|
|
498
480
|
var relativeDocument = useDocument(theme);
|
|
499
|
-
var controlledScopeRef = focusVisibleRef === null ? React__default[
|
|
481
|
+
var controlledScopeRef = focusVisibleRef === null ? React__default["default"].createRef() : containerUtilities.getControlledValue(focusVisibleRef, scopeRef);
|
|
500
482
|
containerFocusvisible.useFocusVisible({
|
|
501
483
|
scope: controlledScopeRef,
|
|
502
484
|
relativeDocument: relativeDocument
|
|
503
485
|
});
|
|
504
|
-
return React__default[
|
|
486
|
+
return React__default["default"].createElement(styledComponents.ThemeProvider, _extends({
|
|
505
487
|
theme: theme
|
|
506
|
-
}, other), focusVisibleRef === undefined ? React__default[
|
|
488
|
+
}, other), focusVisibleRef === undefined ? React__default["default"].createElement("div", {
|
|
507
489
|
ref: scopeRef
|
|
508
490
|
}, children) : children);
|
|
509
491
|
};
|
package/dist/index.esm.js
CHANGED
|
@@ -16,14 +16,9 @@ function ownKeys(object, enumerableOnly) {
|
|
|
16
16
|
|
|
17
17
|
if (Object.getOwnPropertySymbols) {
|
|
18
18
|
var symbols = Object.getOwnPropertySymbols(object);
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
return Object.getOwnPropertyDescriptor(object, sym).enumerable;
|
|
23
|
-
});
|
|
24
|
-
}
|
|
25
|
-
|
|
26
|
-
keys.push.apply(keys, symbols);
|
|
19
|
+
enumerableOnly && (symbols = symbols.filter(function (sym) {
|
|
20
|
+
return Object.getOwnPropertyDescriptor(object, sym).enumerable;
|
|
21
|
+
})), keys.push.apply(keys, symbols);
|
|
27
22
|
}
|
|
28
23
|
|
|
29
24
|
return keys;
|
|
@@ -31,19 +26,12 @@ function ownKeys(object, enumerableOnly) {
|
|
|
31
26
|
|
|
32
27
|
function _objectSpread2(target) {
|
|
33
28
|
for (var i = 1; i < arguments.length; i++) {
|
|
34
|
-
var source = arguments[i]
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
} else if (Object.getOwnPropertyDescriptors) {
|
|
41
|
-
Object.defineProperties(target, Object.getOwnPropertyDescriptors(source));
|
|
42
|
-
} else {
|
|
43
|
-
ownKeys(Object(source)).forEach(function (key) {
|
|
44
|
-
Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key));
|
|
45
|
-
});
|
|
46
|
-
}
|
|
29
|
+
var source = null != arguments[i] ? arguments[i] : {};
|
|
30
|
+
i % 2 ? ownKeys(Object(source), !0).forEach(function (key) {
|
|
31
|
+
_defineProperty(target, key, source[key]);
|
|
32
|
+
}) : Object.getOwnPropertyDescriptors ? Object.defineProperties(target, Object.getOwnPropertyDescriptors(source)) : ownKeys(Object(source)).forEach(function (key) {
|
|
33
|
+
Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key));
|
|
34
|
+
});
|
|
47
35
|
}
|
|
48
36
|
|
|
49
37
|
return target;
|
|
@@ -52,17 +40,11 @@ function _objectSpread2(target) {
|
|
|
52
40
|
function _typeof(obj) {
|
|
53
41
|
"@babel/helpers - typeof";
|
|
54
42
|
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
}
|
|
60
|
-
_typeof = function (obj) {
|
|
61
|
-
return obj && typeof Symbol === "function" && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj;
|
|
62
|
-
};
|
|
63
|
-
}
|
|
64
|
-
|
|
65
|
-
return _typeof(obj);
|
|
43
|
+
return _typeof = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function (obj) {
|
|
44
|
+
return typeof obj;
|
|
45
|
+
} : function (obj) {
|
|
46
|
+
return obj && "function" == typeof Symbol && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj;
|
|
47
|
+
}, _typeof(obj);
|
|
66
48
|
}
|
|
67
49
|
|
|
68
50
|
function _defineProperty(obj, key, value) {
|
|
@@ -4,7 +4,7 @@
|
|
|
4
4
|
* Use of this source code is governed under the Apache License, Version 2.0
|
|
5
5
|
* found at http://www.apache.org/licenses/LICENSE-2.0.
|
|
6
6
|
*/
|
|
7
|
-
import React from 'react';
|
|
7
|
+
import React, { PropsWithChildren } from 'react';
|
|
8
8
|
import { ThemeProps } from 'styled-components';
|
|
9
9
|
import { IGardenTheme } from './theme';
|
|
10
10
|
export interface IThemeProviderProps extends Partial<ThemeProps<IGardenTheme>> {
|
|
@@ -22,5 +22,9 @@ export interface IThemeProviderProps extends Partial<ThemeProps<IGardenTheme>> {
|
|
|
22
22
|
*/
|
|
23
23
|
focusVisibleRef?: React.RefObject<HTMLElement> | null;
|
|
24
24
|
}
|
|
25
|
-
declare const ThemeProvider:
|
|
26
|
-
|
|
25
|
+
export declare const ThemeProvider: {
|
|
26
|
+
({ theme, focusVisibleRef, children, ...other }: PropsWithChildren<IThemeProviderProps>): JSX.Element;
|
|
27
|
+
defaultProps: {
|
|
28
|
+
theme: IGardenTheme;
|
|
29
|
+
};
|
|
30
|
+
};
|
package/dist/typings/index.d.ts
CHANGED
|
@@ -4,7 +4,7 @@
|
|
|
4
4
|
* Use of this source code is governed under the Apache License, Version 2.0
|
|
5
5
|
* found at http://www.apache.org/licenses/LICENSE-2.0.
|
|
6
6
|
*/
|
|
7
|
-
export {
|
|
7
|
+
export { ThemeProvider } from './elements/ThemeProvider';
|
|
8
8
|
export type { IThemeProviderProps } from './elements/ThemeProvider';
|
|
9
9
|
export { default as DEFAULT_THEME } from './elements/theme';
|
|
10
10
|
export type { IGardenTheme } from './elements/theme';
|
|
@@ -4,8 +4,5 @@
|
|
|
4
4
|
* Use of this source code is governed under the Apache License, Version 2.0
|
|
5
5
|
* found at http://www.apache.org/licenses/LICENSE-2.0.
|
|
6
6
|
*/
|
|
7
|
-
/// <reference types="react" />
|
|
8
7
|
/** @component */
|
|
9
|
-
export default function withTheme(WrappedComponent: any):
|
|
10
|
-
theme?: any;
|
|
11
|
-
}>;
|
|
8
|
+
export default function withTheme(WrappedComponent: any): any;
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@zendeskgarden/react-theming",
|
|
3
|
-
"version": "8.
|
|
3
|
+
"version": "8.48.1",
|
|
4
4
|
"description": "Theming utilities and components within the Garden Design System",
|
|
5
5
|
"license": "Apache-2.0",
|
|
6
6
|
"author": "Zendesk Garden <garden@zendesk.com>",
|
|
@@ -22,7 +22,7 @@
|
|
|
22
22
|
"types": "dist/typings/index.d.ts",
|
|
23
23
|
"dependencies": {
|
|
24
24
|
"@zendeskgarden/container-focusvisible": "^0.4.6",
|
|
25
|
-
"@zendeskgarden/container-utilities": "^0.
|
|
25
|
+
"@zendeskgarden/container-utilities": "^0.7.0",
|
|
26
26
|
"polished": "^4.0.0",
|
|
27
27
|
"prop-types": "^15.5.7"
|
|
28
28
|
},
|
|
@@ -41,5 +41,5 @@
|
|
|
41
41
|
"access": "public"
|
|
42
42
|
},
|
|
43
43
|
"zendeskgarden:src": "src/index.ts",
|
|
44
|
-
"gitHead": "
|
|
44
|
+
"gitHead": "82c621bfbc943904baa6647a2f5e89d3271d7edf"
|
|
45
45
|
}
|