@zendeskgarden/react-theming 8.62.1 → 8.62.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.
- package/dist/index.cjs.js +5 -7
- package/package.json +2 -2
package/dist/index.cjs.js
CHANGED
|
@@ -7,17 +7,15 @@
|
|
|
7
7
|
|
|
8
8
|
'use strict';
|
|
9
9
|
|
|
10
|
-
Object.defineProperty(exports, '__esModule', { value: true });
|
|
11
|
-
|
|
12
10
|
var React = require('react');
|
|
13
11
|
var styledComponents = require('styled-components');
|
|
14
12
|
var containerFocusvisible = require('@zendeskgarden/container-focusvisible');
|
|
15
13
|
var containerUtilities = require('@zendeskgarden/container-utilities');
|
|
16
14
|
var polished = require('polished');
|
|
17
15
|
|
|
18
|
-
function
|
|
16
|
+
function _interopDefault (e) { return e && e.__esModule ? e : { default: e }; }
|
|
19
17
|
|
|
20
|
-
var React__default = /*#__PURE__*/
|
|
18
|
+
var React__default = /*#__PURE__*/_interopDefault(React);
|
|
21
19
|
|
|
22
20
|
function _extends() {
|
|
23
21
|
_extends = Object.assign ? Object.assign.bind() : function (target) {
|
|
@@ -313,14 +311,14 @@ const ThemeProvider = _ref => {
|
|
|
313
311
|
} = _ref;
|
|
314
312
|
const scopeRef = React.useRef(null);
|
|
315
313
|
const relativeDocument = useDocument(theme);
|
|
316
|
-
const controlledScopeRef = focusVisibleRef === null ? React__default
|
|
314
|
+
const controlledScopeRef = focusVisibleRef === null ? React__default.default.createRef() : containerUtilities.getControlledValue(focusVisibleRef, scopeRef);
|
|
317
315
|
containerFocusvisible.useFocusVisible({
|
|
318
316
|
scope: controlledScopeRef,
|
|
319
317
|
relativeDocument
|
|
320
318
|
});
|
|
321
|
-
return React__default
|
|
319
|
+
return React__default.default.createElement(styledComponents.ThemeProvider, _extends({
|
|
322
320
|
theme: theme
|
|
323
|
-
}, other), focusVisibleRef === undefined ? React__default
|
|
321
|
+
}, other), focusVisibleRef === undefined ? React__default.default.createElement("div", {
|
|
324
322
|
ref: scopeRef
|
|
325
323
|
}, children) : children);
|
|
326
324
|
};
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@zendeskgarden/react-theming",
|
|
3
|
-
"version": "8.62.
|
|
3
|
+
"version": "8.62.2",
|
|
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>",
|
|
@@ -41,5 +41,5 @@
|
|
|
41
41
|
"access": "public"
|
|
42
42
|
},
|
|
43
43
|
"zendeskgarden:src": "src/index.ts",
|
|
44
|
-
"gitHead": "
|
|
44
|
+
"gitHead": "27a7d6c021f3360396af60d51ecbf66e9076a405"
|
|
45
45
|
}
|