@zendeskgarden/react-theming 8.62.1 → 8.63.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.
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
|
};
|
|
@@ -6,10 +6,10 @@
|
|
|
6
6
|
*/
|
|
7
7
|
import { ThemeProps } from 'styled-components';
|
|
8
8
|
export declare const ARROW_POSITION: readonly ["top", "top-left", "top-right", "right", "right-top", "right-bottom", "bottom", "bottom-left", "bottom-right", "left", "left-top", "left-bottom"];
|
|
9
|
-
export
|
|
9
|
+
export type ArrowPosition = (typeof ARROW_POSITION)[number];
|
|
10
10
|
export declare const MENU_POSITION: readonly ["top", "right", "bottom", "left"];
|
|
11
|
-
export
|
|
12
|
-
|
|
11
|
+
export type MenuPosition = (typeof MENU_POSITION)[number];
|
|
12
|
+
type Hue = Record<number | string, string> | string;
|
|
13
13
|
export interface IGardenTheme {
|
|
14
14
|
rtl: boolean;
|
|
15
15
|
document?: any;
|
|
@@ -5,7 +5,7 @@
|
|
|
5
5
|
* found at http://www.apache.org/licenses/LICENSE-2.0.
|
|
6
6
|
*/
|
|
7
7
|
import { DefaultTheme } from 'styled-components';
|
|
8
|
-
|
|
8
|
+
type Hue = Record<number | string, string> | string;
|
|
9
9
|
/**
|
|
10
10
|
* Get the palette color for the given hue, shade, and theme.
|
|
11
11
|
*
|
|
@@ -5,8 +5,8 @@
|
|
|
5
5
|
* found at http://www.apache.org/licenses/LICENSE-2.0.
|
|
6
6
|
*/
|
|
7
7
|
import { DefaultTheme } from 'styled-components';
|
|
8
|
-
|
|
9
|
-
|
|
8
|
+
type QUERY = 'up' | 'down' | 'only' | 'between';
|
|
9
|
+
type BREAKPOINT = 'xs' | 'sm' | 'md' | 'lg' | 'xl';
|
|
10
10
|
/**
|
|
11
11
|
* Get a media query string for the given query specifier, breakpoint name, and theme.
|
|
12
12
|
*
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@zendeskgarden/react-theming",
|
|
3
|
-
"version": "8.
|
|
3
|
+
"version": "8.63.0",
|
|
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": "^1.0.0",
|
|
25
|
-
"@zendeskgarden/container-utilities": "^0.
|
|
25
|
+
"@zendeskgarden/container-utilities": "^1.0.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": "4b8715305a769881b143c7195c5b31e687422926"
|
|
45
45
|
}
|