@elastic/eui 59.1.0-rc1 → 59.1.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/eui_charts_theme.js +330 -330
- package/dist/eui_charts_theme.js.map +1 -1
- package/es/components/accessibility/skip_link/skip_link.js +42 -7
- package/es/components/accessibility/skip_link/skip_link.styles.js +1 -1
- package/es/components/avatar/avatar.js +7 -9
- package/es/components/bottom_bar/bottom_bar.js +9 -8
- package/es/components/breadcrumbs/breadcrumbs.js +1 -2
- package/es/components/call_out/call_out.js +8 -9
- package/es/components/expression/expression.js +10 -11
- package/es/components/facet/facet_button.js +8 -9
- package/es/components/facet/facet_group.js +7 -8
- package/es/components/health/health.js +6 -7
- package/es/components/horizontal_rule/horizontal_rule.js +6 -7
- package/es/components/link/link.js +7 -8
- package/es/components/loading/loading_chart.js +6 -7
- package/es/components/loading/loading_content.js +6 -7
- package/es/components/loading/loading_logo.js +6 -7
- package/es/components/loading/loading_spinner.js +6 -7
- package/es/components/mark/mark.js +8 -9
- package/es/components/markdown_editor/markdown_format.js +6 -7
- package/es/components/panel/panel.js +7 -8
- package/es/components/provider/index.js +1 -1
- package/es/components/provider/provider.js +5 -39
- package/es/components/spacer/spacer.js +6 -7
- package/es/components/text/text.js +6 -7
- package/es/components/text/text_color.js +6 -7
- package/es/components/timeline/timeline_item.js +6 -7
- package/es/components/timeline/timeline_item_icon.js +6 -7
- package/es/components/title/title.js +6 -7
- package/es/services/theme/hooks.js +2 -2
- package/es/services/theme/provider.js +5 -1
- package/{optimize/es/components/provider/cache → es/themes/amsterdam}/index.js +2 -2
- package/es/themes/index.js +2 -1
- package/eui.d.ts +337 -827
- package/i18ntokens.json +12 -12
- package/lib/components/accessibility/skip_link/skip_link.js +45 -11
- package/lib/components/accessibility/skip_link/skip_link.styles.js +1 -1
- package/lib/components/avatar/avatar.js +8 -12
- package/lib/components/bottom_bar/bottom_bar.js +6 -9
- package/lib/components/breadcrumbs/breadcrumbs.js +1 -2
- package/lib/components/call_out/call_out.js +10 -14
- package/lib/components/expression/expression.js +12 -14
- package/lib/components/facet/facet_button.js +10 -12
- package/lib/components/facet/facet_group.js +9 -11
- package/lib/components/health/health.js +8 -10
- package/lib/components/horizontal_rule/horizontal_rule.js +8 -10
- package/lib/components/link/link.js +7 -13
- package/lib/components/loading/loading_chart.js +8 -10
- package/lib/components/loading/loading_content.js +8 -10
- package/lib/components/loading/loading_logo.js +8 -10
- package/lib/components/loading/loading_spinner.js +8 -10
- package/lib/components/mark/mark.js +10 -12
- package/lib/components/markdown_editor/markdown_format.js +8 -10
- package/lib/components/panel/panel.js +9 -11
- package/lib/components/provider/index.js +7 -12
- package/lib/components/provider/provider.js +5 -40
- package/lib/components/spacer/spacer.js +8 -10
- package/lib/components/text/text.js +8 -10
- package/lib/components/text/text_color.js +8 -10
- package/lib/components/timeline/timeline_item.js +8 -10
- package/lib/components/timeline/timeline_item_icon.js +8 -10
- package/lib/components/title/title.js +9 -11
- package/lib/services/theme/hooks.js +2 -2
- package/lib/services/theme/provider.js +6 -3
- package/{test-env/components/provider/system → lib/themes/amsterdam}/index.js +4 -4
- package/lib/themes/index.js +21 -1
- package/optimize/es/components/accessibility/skip_link/skip_link.js +27 -6
- package/optimize/es/components/accessibility/skip_link/skip_link.styles.js +1 -1
- package/optimize/es/components/avatar/avatar.js +5 -7
- package/optimize/es/components/bottom_bar/bottom_bar.js +9 -8
- package/optimize/es/components/breadcrumbs/breadcrumbs.js +1 -2
- package/optimize/es/components/call_out/call_out.js +7 -8
- package/optimize/es/components/expression/expression.js +9 -10
- package/optimize/es/components/facet/facet_button.js +7 -8
- package/optimize/es/components/facet/facet_group.js +6 -7
- package/optimize/es/components/health/health.js +5 -6
- package/optimize/es/components/horizontal_rule/horizontal_rule.js +5 -6
- package/optimize/es/components/link/link.js +6 -7
- package/optimize/es/components/loading/loading_chart.js +5 -6
- package/optimize/es/components/loading/loading_content.js +5 -6
- package/optimize/es/components/loading/loading_logo.js +5 -6
- package/optimize/es/components/loading/loading_spinner.js +5 -6
- package/optimize/es/components/mark/mark.js +7 -8
- package/optimize/es/components/markdown_editor/markdown_format.js +5 -6
- package/optimize/es/components/panel/panel.js +6 -7
- package/optimize/es/components/provider/index.js +1 -1
- package/optimize/es/components/provider/provider.js +5 -39
- package/optimize/es/components/spacer/spacer.js +5 -6
- package/optimize/es/components/text/text.js +5 -6
- package/optimize/es/components/text/text_color.js +5 -6
- package/optimize/es/components/timeline/timeline_item.js +5 -6
- package/optimize/es/components/timeline/timeline_item_icon.js +5 -6
- package/optimize/es/components/title/title.js +5 -6
- package/optimize/es/services/theme/hooks.js +2 -2
- package/optimize/es/services/theme/provider.js +5 -1
- package/optimize/es/{components/provider/system → themes/amsterdam}/index.js +2 -1
- package/optimize/es/themes/index.js +2 -1
- package/optimize/lib/components/accessibility/skip_link/skip_link.js +30 -8
- package/optimize/lib/components/accessibility/skip_link/skip_link.styles.js +1 -1
- package/optimize/lib/components/avatar/avatar.js +5 -9
- package/optimize/lib/components/bottom_bar/bottom_bar.js +6 -9
- package/optimize/lib/components/breadcrumbs/breadcrumbs.js +1 -2
- package/optimize/lib/components/call_out/call_out.js +9 -13
- package/optimize/lib/components/expression/expression.js +9 -11
- package/optimize/lib/components/facet/facet_button.js +7 -9
- package/optimize/lib/components/facet/facet_group.js +6 -8
- package/optimize/lib/components/health/health.js +5 -7
- package/optimize/lib/components/horizontal_rule/horizontal_rule.js +5 -7
- package/optimize/lib/components/link/link.js +6 -12
- package/optimize/lib/components/loading/loading_chart.js +5 -7
- package/optimize/lib/components/loading/loading_content.js +5 -7
- package/optimize/lib/components/loading/loading_logo.js +5 -7
- package/optimize/lib/components/loading/loading_spinner.js +5 -7
- package/optimize/lib/components/mark/mark.js +7 -9
- package/optimize/lib/components/markdown_editor/markdown_format.js +5 -7
- package/optimize/lib/components/panel/panel.js +6 -8
- package/optimize/lib/components/provider/index.js +7 -12
- package/optimize/lib/components/provider/provider.js +5 -40
- package/optimize/lib/components/spacer/spacer.js +5 -7
- package/optimize/lib/components/text/text.js +5 -7
- package/optimize/lib/components/text/text_color.js +5 -7
- package/optimize/lib/components/timeline/timeline_item.js +5 -7
- package/optimize/lib/components/timeline/timeline_item_icon.js +5 -7
- package/optimize/lib/components/title/title.js +6 -8
- package/optimize/lib/services/theme/hooks.js +2 -2
- package/optimize/lib/services/theme/provider.js +6 -3
- package/{lib/components/provider/system → optimize/lib/themes/amsterdam}/index.js +4 -4
- package/optimize/lib/themes/index.js +21 -1
- package/package.json +1 -1
- package/test-env/components/accessibility/skip_link/skip_link.js +46 -11
- package/test-env/components/accessibility/skip_link/skip_link.styles.js +1 -1
- package/test-env/components/avatar/avatar.js +8 -12
- package/test-env/components/bottom_bar/bottom_bar.js +6 -9
- package/test-env/components/breadcrumbs/breadcrumbs.js +1 -2
- package/test-env/components/call_out/call_out.js +10 -14
- package/test-env/components/expression/expression.js +12 -14
- package/test-env/components/facet/facet_button.js +10 -12
- package/test-env/components/facet/facet_group.js +9 -11
- package/test-env/components/health/health.js +8 -10
- package/test-env/components/horizontal_rule/horizontal_rule.js +8 -10
- package/test-env/components/link/link.js +7 -13
- package/test-env/components/loading/loading_chart.js +8 -10
- package/test-env/components/loading/loading_content.js +8 -10
- package/test-env/components/loading/loading_logo.js +8 -10
- package/test-env/components/loading/loading_spinner.js +8 -10
- package/test-env/components/mark/mark.js +10 -12
- package/test-env/components/markdown_editor/markdown_format.js +8 -10
- package/test-env/components/panel/panel.js +9 -11
- package/test-env/components/provider/index.js +7 -12
- package/test-env/components/provider/provider.js +5 -40
- package/test-env/components/spacer/spacer.js +8 -10
- package/test-env/components/text/text.js +8 -10
- package/test-env/components/text/text_color.js +8 -10
- package/test-env/components/timeline/timeline_item.js +8 -10
- package/test-env/components/timeline/timeline_item_icon.js +8 -10
- package/test-env/components/title/title.js +9 -11
- package/test-env/services/theme/hooks.js +2 -2
- package/test-env/services/theme/provider.js +6 -3
- package/{optimize/lib/components/provider/system → test-env/themes/amsterdam}/index.js +4 -4
- package/test-env/themes/index.js +21 -1
- package/es/components/provider/cache/cache_context.js +0 -12
- package/es/components/provider/cache/cache_provider.js +0 -17
- package/es/components/provider/cache/index.js +0 -9
- package/es/components/provider/system/index.js +0 -8
- package/es/components/provider/system/system.js +0 -33
- package/es/global_styling/utility/utility.js +0 -27
- package/lib/components/provider/cache/cache_context.js +0 -24
- package/lib/components/provider/cache/cache_provider.js +0 -29
- package/lib/components/provider/cache/index.js +0 -31
- package/lib/components/provider/system/system.js +0 -45
- package/lib/global_styling/utility/utility.js +0 -31
- package/optimize/es/components/provider/cache/cache_context.js +0 -12
- package/optimize/es/components/provider/cache/cache_provider.js +0 -17
- package/optimize/es/components/provider/system/system.js +0 -33
- package/optimize/es/global_styling/utility/utility.js +0 -27
- package/optimize/lib/components/provider/cache/cache_context.js +0 -24
- package/optimize/lib/components/provider/cache/cache_provider.js +0 -29
- package/optimize/lib/components/provider/cache/index.js +0 -31
- package/optimize/lib/components/provider/system/system.js +0 -54
- package/optimize/lib/global_styling/utility/utility.js +0 -31
- package/test-env/components/provider/cache/cache_context.js +0 -24
- package/test-env/components/provider/cache/cache_provider.js +0 -29
- package/test-env/components/provider/cache/index.js +0 -31
- package/test-env/components/provider/system/system.js +0 -54
- package/test-env/global_styling/utility/utility.js +0 -31
|
@@ -1,8 +0,0 @@
|
|
|
1
|
-
/*
|
|
2
|
-
* Copyright Elasticsearch B.V. and/or licensed to Elasticsearch B.V. under one
|
|
3
|
-
* or more contributor license agreements. Licensed under the Elastic License
|
|
4
|
-
* 2.0 and the Server Side Public License, v 1; you may not use this file except
|
|
5
|
-
* in compliance with, at your election, the Elastic License 2.0 or the Server
|
|
6
|
-
* Side Public License, v 1.
|
|
7
|
-
*/
|
|
8
|
-
export * from './system';
|
|
@@ -1,33 +0,0 @@
|
|
|
1
|
-
function _extends() { _extends = Object.assign || function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; return _extends.apply(this, arguments); }
|
|
2
|
-
|
|
3
|
-
/*
|
|
4
|
-
* Copyright Elasticsearch B.V. and/or licensed to Elasticsearch B.V. under one
|
|
5
|
-
* or more contributor license agreements. Licensed under the Elastic License
|
|
6
|
-
* 2.0 and the Server Side Public License, v 1; you may not use this file except
|
|
7
|
-
* in compliance with, at your election, the Elastic License 2.0 or the Server
|
|
8
|
-
* Side Public License, v 1.
|
|
9
|
-
*/
|
|
10
|
-
import React, { forwardRef } from 'react';
|
|
11
|
-
import { useEuiTheme } from '../../../services';
|
|
12
|
-
import { EuiCacheProvider, useEuiCacheContext } from '../cache';
|
|
13
|
-
import { jsx as ___EmotionJSX } from "@emotion/react";
|
|
14
|
-
// If a component usese `forwardRef` you'll need to pass its props directly via `T` (`withEuiTheme<EuiComponentProps>(EuiComponent)`)
|
|
15
|
-
// TypeScript cannot infer correctly with the extra `forwardRef` types.
|
|
16
|
-
export var withEuiSystem = function withEuiSystem(Component) {
|
|
17
|
-
var componentName = Component.displayName || Component.name || 'Component';
|
|
18
|
-
|
|
19
|
-
var Render = function Render(props, ref) {
|
|
20
|
-
var euiTheme = useEuiTheme();
|
|
21
|
-
var cache = useEuiCacheContext();
|
|
22
|
-
return ___EmotionJSX(EuiCacheProvider, {
|
|
23
|
-
cache: cache
|
|
24
|
-
}, ___EmotionJSX(Component, _extends({
|
|
25
|
-
euiTheme: euiTheme,
|
|
26
|
-
ref: ref
|
|
27
|
-
}, props)));
|
|
28
|
-
};
|
|
29
|
-
|
|
30
|
-
var WithEuiSystem = /*#__PURE__*/forwardRef(Render);
|
|
31
|
-
WithEuiSystem.displayName = componentName.replace(/^_{1}/, '');
|
|
32
|
-
return WithEuiSystem;
|
|
33
|
-
};
|
|
@@ -1,27 +0,0 @@
|
|
|
1
|
-
function _EMOTION_STRINGIFIED_CSS_ERROR__() { return "You have tried to stringify object returned from `css` function. It isn't supposed to be used directly (e.g. as value of the `className` prop), but rather handed to emotion so it can handle it (e.g. as value of `css` prop)."; }
|
|
2
|
-
|
|
3
|
-
/*
|
|
4
|
-
* Copyright Elasticsearch B.V. and/or licensed to Elasticsearch B.V. under one
|
|
5
|
-
* or more contributor license agreements. Licensed under the Elastic License
|
|
6
|
-
* 2.0 and the Server Side Public License, v 1; you may not use this file except
|
|
7
|
-
* in compliance with, at your election, the Elastic License 2.0 or the Server
|
|
8
|
-
* Side Public License, v 1.
|
|
9
|
-
*/
|
|
10
|
-
import React from 'react';
|
|
11
|
-
import { Global, css } from '@emotion/react';
|
|
12
|
-
import { jsx as ___EmotionJSX } from "@emotion/react";
|
|
13
|
-
|
|
14
|
-
var _ref = process.env.NODE_ENV === "production" ? {
|
|
15
|
-
name: "bd8dxy-EuiUtilityClasses",
|
|
16
|
-
styles: ".euiYolo{color:coral;};label:EuiUtilityClasses;"
|
|
17
|
-
} : {
|
|
18
|
-
name: "bd8dxy-EuiUtilityClasses",
|
|
19
|
-
styles: ".euiYolo{color:coral;};label:EuiUtilityClasses;",
|
|
20
|
-
toString: _EMOTION_STRINGIFIED_CSS_ERROR__
|
|
21
|
-
};
|
|
22
|
-
|
|
23
|
-
export var EuiUtilityClasses = function EuiUtilityClasses() {
|
|
24
|
-
return ___EmotionJSX(Global, {
|
|
25
|
-
styles: _ref
|
|
26
|
-
});
|
|
27
|
-
};
|
|
@@ -1,24 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
|
|
3
|
-
Object.defineProperty(exports, "__esModule", {
|
|
4
|
-
value: true
|
|
5
|
-
});
|
|
6
|
-
exports.useEuiCacheContext = exports.EuiCacheContext = void 0;
|
|
7
|
-
|
|
8
|
-
var _react = require("react");
|
|
9
|
-
|
|
10
|
-
/*
|
|
11
|
-
* Copyright Elasticsearch B.V. and/or licensed to Elasticsearch B.V. under one
|
|
12
|
-
* or more contributor license agreements. Licensed under the Elastic License
|
|
13
|
-
* 2.0 and the Server Side Public License, v 1; you may not use this file except
|
|
14
|
-
* in compliance with, at your election, the Elastic License 2.0 or the Server
|
|
15
|
-
* Side Public License, v 1.
|
|
16
|
-
*/
|
|
17
|
-
var EuiCacheContext = /*#__PURE__*/(0, _react.createContext)(undefined);
|
|
18
|
-
exports.EuiCacheContext = EuiCacheContext;
|
|
19
|
-
|
|
20
|
-
var useEuiCacheContext = function useEuiCacheContext() {
|
|
21
|
-
return (0, _react.useContext)(EuiCacheContext);
|
|
22
|
-
};
|
|
23
|
-
|
|
24
|
-
exports.useEuiCacheContext = useEuiCacheContext;
|
|
@@ -1,29 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
|
|
3
|
-
Object.defineProperty(exports, "__esModule", {
|
|
4
|
-
value: true
|
|
5
|
-
});
|
|
6
|
-
exports.EuiCacheProvider = void 0;
|
|
7
|
-
|
|
8
|
-
var _react = _interopRequireDefault(require("react"));
|
|
9
|
-
|
|
10
|
-
var _react2 = require("@emotion/react");
|
|
11
|
-
|
|
12
|
-
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
|
|
13
|
-
|
|
14
|
-
/*
|
|
15
|
-
* Copyright Elasticsearch B.V. and/or licensed to Elasticsearch B.V. under one
|
|
16
|
-
* or more contributor license agreements. Licensed under the Elastic License
|
|
17
|
-
* 2.0 and the Server Side Public License, v 1; you may not use this file except
|
|
18
|
-
* in compliance with, at your election, the Elastic License 2.0 or the Server
|
|
19
|
-
* Side Public License, v 1.
|
|
20
|
-
*/
|
|
21
|
-
var EuiCacheProvider = function EuiCacheProvider(_ref) {
|
|
22
|
-
var cache = _ref.cache,
|
|
23
|
-
children = _ref.children;
|
|
24
|
-
return children && cache ? (0, _react2.jsx)(_react2.CacheProvider, {
|
|
25
|
-
value: cache
|
|
26
|
-
}, children) : (0, _react2.jsx)(_react.default.Fragment, null, children);
|
|
27
|
-
};
|
|
28
|
-
|
|
29
|
-
exports.EuiCacheProvider = EuiCacheProvider;
|
|
@@ -1,31 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
|
|
3
|
-
Object.defineProperty(exports, "__esModule", {
|
|
4
|
-
value: true
|
|
5
|
-
});
|
|
6
|
-
|
|
7
|
-
var _cache_context = require("./cache_context");
|
|
8
|
-
|
|
9
|
-
Object.keys(_cache_context).forEach(function (key) {
|
|
10
|
-
if (key === "default" || key === "__esModule") return;
|
|
11
|
-
if (key in exports && exports[key] === _cache_context[key]) return;
|
|
12
|
-
Object.defineProperty(exports, key, {
|
|
13
|
-
enumerable: true,
|
|
14
|
-
get: function get() {
|
|
15
|
-
return _cache_context[key];
|
|
16
|
-
}
|
|
17
|
-
});
|
|
18
|
-
});
|
|
19
|
-
|
|
20
|
-
var _cache_provider = require("./cache_provider");
|
|
21
|
-
|
|
22
|
-
Object.keys(_cache_provider).forEach(function (key) {
|
|
23
|
-
if (key === "default" || key === "__esModule") return;
|
|
24
|
-
if (key in exports && exports[key] === _cache_provider[key]) return;
|
|
25
|
-
Object.defineProperty(exports, key, {
|
|
26
|
-
enumerable: true,
|
|
27
|
-
get: function get() {
|
|
28
|
-
return _cache_provider[key];
|
|
29
|
-
}
|
|
30
|
-
});
|
|
31
|
-
});
|
|
@@ -1,45 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
|
|
3
|
-
function _typeof(obj) { "@babel/helpers - typeof"; if (typeof Symbol === "function" && typeof Symbol.iterator === "symbol") { _typeof = function _typeof(obj) { return typeof obj; }; } else { _typeof = function _typeof(obj) { return obj && typeof Symbol === "function" && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj; }; } return _typeof(obj); }
|
|
4
|
-
|
|
5
|
-
Object.defineProperty(exports, "__esModule", {
|
|
6
|
-
value: true
|
|
7
|
-
});
|
|
8
|
-
exports.withEuiSystem = void 0;
|
|
9
|
-
|
|
10
|
-
var _react = _interopRequireWildcard(require("react"));
|
|
11
|
-
|
|
12
|
-
var _services = require("../../../services");
|
|
13
|
-
|
|
14
|
-
var _cache = require("../cache");
|
|
15
|
-
|
|
16
|
-
var _react2 = require("@emotion/react");
|
|
17
|
-
|
|
18
|
-
function _getRequireWildcardCache(nodeInterop) { if (typeof WeakMap !== "function") return null; var cacheBabelInterop = new WeakMap(); var cacheNodeInterop = new WeakMap(); return (_getRequireWildcardCache = function _getRequireWildcardCache(nodeInterop) { return nodeInterop ? cacheNodeInterop : cacheBabelInterop; })(nodeInterop); }
|
|
19
|
-
|
|
20
|
-
function _interopRequireWildcard(obj, nodeInterop) { if (!nodeInterop && obj && obj.__esModule) { return obj; } if (obj === null || _typeof(obj) !== "object" && typeof obj !== "function") { return { default: obj }; } var cache = _getRequireWildcardCache(nodeInterop); if (cache && cache.has(obj)) { return cache.get(obj); } var newObj = {}; var hasPropertyDescriptor = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var key in obj) { if (key !== "default" && Object.prototype.hasOwnProperty.call(obj, key)) { var desc = hasPropertyDescriptor ? Object.getOwnPropertyDescriptor(obj, key) : null; if (desc && (desc.get || desc.set)) { Object.defineProperty(newObj, key, desc); } else { newObj[key] = obj[key]; } } } newObj.default = obj; if (cache) { cache.set(obj, newObj); } return newObj; }
|
|
21
|
-
|
|
22
|
-
function _extends() { _extends = Object.assign || function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; return _extends.apply(this, arguments); }
|
|
23
|
-
|
|
24
|
-
// If a component usese `forwardRef` you'll need to pass its props directly via `T` (`withEuiTheme<EuiComponentProps>(EuiComponent)`)
|
|
25
|
-
// TypeScript cannot infer correctly with the extra `forwardRef` types.
|
|
26
|
-
var withEuiSystem = function withEuiSystem(Component) {
|
|
27
|
-
var componentName = Component.displayName || Component.name || 'Component';
|
|
28
|
-
|
|
29
|
-
var Render = function Render(props, ref) {
|
|
30
|
-
var euiTheme = (0, _services.useEuiTheme)();
|
|
31
|
-
var cache = (0, _cache.useEuiCacheContext)();
|
|
32
|
-
return (0, _react2.jsx)(_cache.EuiCacheProvider, {
|
|
33
|
-
cache: cache
|
|
34
|
-
}, (0, _react2.jsx)(Component, _extends({
|
|
35
|
-
euiTheme: euiTheme,
|
|
36
|
-
ref: ref
|
|
37
|
-
}, props)));
|
|
38
|
-
};
|
|
39
|
-
|
|
40
|
-
var WithEuiSystem = /*#__PURE__*/(0, _react.forwardRef)(Render);
|
|
41
|
-
WithEuiSystem.displayName = componentName.replace(/^_{1}/, '');
|
|
42
|
-
return WithEuiSystem;
|
|
43
|
-
};
|
|
44
|
-
|
|
45
|
-
exports.withEuiSystem = withEuiSystem;
|
|
@@ -1,31 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
|
|
3
|
-
Object.defineProperty(exports, "__esModule", {
|
|
4
|
-
value: true
|
|
5
|
-
});
|
|
6
|
-
exports.EuiUtilityClasses = void 0;
|
|
7
|
-
|
|
8
|
-
var _react = _interopRequireDefault(require("react"));
|
|
9
|
-
|
|
10
|
-
var _react2 = require("@emotion/react");
|
|
11
|
-
|
|
12
|
-
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
|
|
13
|
-
|
|
14
|
-
function _EMOTION_STRINGIFIED_CSS_ERROR__() { return "You have tried to stringify object returned from `css` function. It isn't supposed to be used directly (e.g. as value of the `className` prop), but rather handed to emotion so it can handle it (e.g. as value of `css` prop)."; }
|
|
15
|
-
|
|
16
|
-
var _ref = process.env.NODE_ENV === "production" ? {
|
|
17
|
-
name: "bd8dxy-EuiUtilityClasses",
|
|
18
|
-
styles: ".euiYolo{color:coral;};label:EuiUtilityClasses;"
|
|
19
|
-
} : {
|
|
20
|
-
name: "bd8dxy-EuiUtilityClasses",
|
|
21
|
-
styles: ".euiYolo{color:coral;};label:EuiUtilityClasses;",
|
|
22
|
-
toString: _EMOTION_STRINGIFIED_CSS_ERROR__
|
|
23
|
-
};
|
|
24
|
-
|
|
25
|
-
var EuiUtilityClasses = function EuiUtilityClasses() {
|
|
26
|
-
return (0, _react2.jsx)(_react2.Global, {
|
|
27
|
-
styles: _ref
|
|
28
|
-
});
|
|
29
|
-
};
|
|
30
|
-
|
|
31
|
-
exports.EuiUtilityClasses = EuiUtilityClasses;
|
|
@@ -1,12 +0,0 @@
|
|
|
1
|
-
/*
|
|
2
|
-
* Copyright Elasticsearch B.V. and/or licensed to Elasticsearch B.V. under one
|
|
3
|
-
* or more contributor license agreements. Licensed under the Elastic License
|
|
4
|
-
* 2.0 and the Server Side Public License, v 1; you may not use this file except
|
|
5
|
-
* in compliance with, at your election, the Elastic License 2.0 or the Server
|
|
6
|
-
* Side Public License, v 1.
|
|
7
|
-
*/
|
|
8
|
-
import { createContext, useContext } from 'react';
|
|
9
|
-
export var EuiCacheContext = /*#__PURE__*/createContext(undefined);
|
|
10
|
-
export var useEuiCacheContext = function useEuiCacheContext() {
|
|
11
|
-
return useContext(EuiCacheContext);
|
|
12
|
-
};
|
|
@@ -1,17 +0,0 @@
|
|
|
1
|
-
/*
|
|
2
|
-
* Copyright Elasticsearch B.V. and/or licensed to Elasticsearch B.V. under one
|
|
3
|
-
* or more contributor license agreements. Licensed under the Elastic License
|
|
4
|
-
* 2.0 and the Server Side Public License, v 1; you may not use this file except
|
|
5
|
-
* in compliance with, at your election, the Elastic License 2.0 or the Server
|
|
6
|
-
* Side Public License, v 1.
|
|
7
|
-
*/
|
|
8
|
-
import React from 'react';
|
|
9
|
-
import { CacheProvider } from '@emotion/react';
|
|
10
|
-
import { jsx as ___EmotionJSX } from "@emotion/react";
|
|
11
|
-
export var EuiCacheProvider = function EuiCacheProvider(_ref) {
|
|
12
|
-
var cache = _ref.cache,
|
|
13
|
-
children = _ref.children;
|
|
14
|
-
return children && cache ? ___EmotionJSX(CacheProvider, {
|
|
15
|
-
value: cache
|
|
16
|
-
}, children) : ___EmotionJSX(React.Fragment, null, children);
|
|
17
|
-
};
|
|
@@ -1,33 +0,0 @@
|
|
|
1
|
-
import _extends from "@babel/runtime/helpers/extends";
|
|
2
|
-
|
|
3
|
-
/*
|
|
4
|
-
* Copyright Elasticsearch B.V. and/or licensed to Elasticsearch B.V. under one
|
|
5
|
-
* or more contributor license agreements. Licensed under the Elastic License
|
|
6
|
-
* 2.0 and the Server Side Public License, v 1; you may not use this file except
|
|
7
|
-
* in compliance with, at your election, the Elastic License 2.0 or the Server
|
|
8
|
-
* Side Public License, v 1.
|
|
9
|
-
*/
|
|
10
|
-
import React, { forwardRef } from 'react';
|
|
11
|
-
import { useEuiTheme } from '../../../services';
|
|
12
|
-
import { EuiCacheProvider, useEuiCacheContext } from '../cache';
|
|
13
|
-
import { jsx as ___EmotionJSX } from "@emotion/react";
|
|
14
|
-
// If a component usese `forwardRef` you'll need to pass its props directly via `T` (`withEuiTheme<EuiComponentProps>(EuiComponent)`)
|
|
15
|
-
// TypeScript cannot infer correctly with the extra `forwardRef` types.
|
|
16
|
-
export var withEuiSystem = function withEuiSystem(Component) {
|
|
17
|
-
var componentName = Component.displayName || Component.name || 'Component';
|
|
18
|
-
|
|
19
|
-
var Render = function Render(props, ref) {
|
|
20
|
-
var euiTheme = useEuiTheme();
|
|
21
|
-
var cache = useEuiCacheContext();
|
|
22
|
-
return ___EmotionJSX(EuiCacheProvider, {
|
|
23
|
-
cache: cache
|
|
24
|
-
}, ___EmotionJSX(Component, _extends({
|
|
25
|
-
euiTheme: euiTheme,
|
|
26
|
-
ref: ref
|
|
27
|
-
}, props)));
|
|
28
|
-
};
|
|
29
|
-
|
|
30
|
-
var WithEuiSystem = /*#__PURE__*/forwardRef(Render);
|
|
31
|
-
WithEuiSystem.displayName = componentName.replace(/^_{1}/, '');
|
|
32
|
-
return WithEuiSystem;
|
|
33
|
-
};
|
|
@@ -1,27 +0,0 @@
|
|
|
1
|
-
function _EMOTION_STRINGIFIED_CSS_ERROR__() { return "You have tried to stringify object returned from `css` function. It isn't supposed to be used directly (e.g. as value of the `className` prop), but rather handed to emotion so it can handle it (e.g. as value of `css` prop)."; }
|
|
2
|
-
|
|
3
|
-
/*
|
|
4
|
-
* Copyright Elasticsearch B.V. and/or licensed to Elasticsearch B.V. under one
|
|
5
|
-
* or more contributor license agreements. Licensed under the Elastic License
|
|
6
|
-
* 2.0 and the Server Side Public License, v 1; you may not use this file except
|
|
7
|
-
* in compliance with, at your election, the Elastic License 2.0 or the Server
|
|
8
|
-
* Side Public License, v 1.
|
|
9
|
-
*/
|
|
10
|
-
import React from 'react';
|
|
11
|
-
import { Global, css } from '@emotion/react';
|
|
12
|
-
import { jsx as ___EmotionJSX } from "@emotion/react";
|
|
13
|
-
|
|
14
|
-
var _ref = process.env.NODE_ENV === "production" ? {
|
|
15
|
-
name: "bd8dxy-EuiUtilityClasses",
|
|
16
|
-
styles: ".euiYolo{color:coral;};label:EuiUtilityClasses;"
|
|
17
|
-
} : {
|
|
18
|
-
name: "bd8dxy-EuiUtilityClasses",
|
|
19
|
-
styles: ".euiYolo{color:coral;};label:EuiUtilityClasses;",
|
|
20
|
-
toString: _EMOTION_STRINGIFIED_CSS_ERROR__
|
|
21
|
-
};
|
|
22
|
-
|
|
23
|
-
export var EuiUtilityClasses = function EuiUtilityClasses() {
|
|
24
|
-
return ___EmotionJSX(Global, {
|
|
25
|
-
styles: _ref
|
|
26
|
-
});
|
|
27
|
-
};
|
|
@@ -1,24 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
|
|
3
|
-
Object.defineProperty(exports, "__esModule", {
|
|
4
|
-
value: true
|
|
5
|
-
});
|
|
6
|
-
exports.useEuiCacheContext = exports.EuiCacheContext = void 0;
|
|
7
|
-
|
|
8
|
-
var _react = require("react");
|
|
9
|
-
|
|
10
|
-
/*
|
|
11
|
-
* Copyright Elasticsearch B.V. and/or licensed to Elasticsearch B.V. under one
|
|
12
|
-
* or more contributor license agreements. Licensed under the Elastic License
|
|
13
|
-
* 2.0 and the Server Side Public License, v 1; you may not use this file except
|
|
14
|
-
* in compliance with, at your election, the Elastic License 2.0 or the Server
|
|
15
|
-
* Side Public License, v 1.
|
|
16
|
-
*/
|
|
17
|
-
var EuiCacheContext = /*#__PURE__*/(0, _react.createContext)(undefined);
|
|
18
|
-
exports.EuiCacheContext = EuiCacheContext;
|
|
19
|
-
|
|
20
|
-
var useEuiCacheContext = function useEuiCacheContext() {
|
|
21
|
-
return (0, _react.useContext)(EuiCacheContext);
|
|
22
|
-
};
|
|
23
|
-
|
|
24
|
-
exports.useEuiCacheContext = useEuiCacheContext;
|
|
@@ -1,29 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
|
|
3
|
-
var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefault");
|
|
4
|
-
|
|
5
|
-
Object.defineProperty(exports, "__esModule", {
|
|
6
|
-
value: true
|
|
7
|
-
});
|
|
8
|
-
exports.EuiCacheProvider = void 0;
|
|
9
|
-
|
|
10
|
-
var _react = _interopRequireDefault(require("react"));
|
|
11
|
-
|
|
12
|
-
var _react2 = require("@emotion/react");
|
|
13
|
-
|
|
14
|
-
/*
|
|
15
|
-
* Copyright Elasticsearch B.V. and/or licensed to Elasticsearch B.V. under one
|
|
16
|
-
* or more contributor license agreements. Licensed under the Elastic License
|
|
17
|
-
* 2.0 and the Server Side Public License, v 1; you may not use this file except
|
|
18
|
-
* in compliance with, at your election, the Elastic License 2.0 or the Server
|
|
19
|
-
* Side Public License, v 1.
|
|
20
|
-
*/
|
|
21
|
-
var EuiCacheProvider = function EuiCacheProvider(_ref) {
|
|
22
|
-
var cache = _ref.cache,
|
|
23
|
-
children = _ref.children;
|
|
24
|
-
return children && cache ? (0, _react2.jsx)(_react2.CacheProvider, {
|
|
25
|
-
value: cache
|
|
26
|
-
}, children) : (0, _react2.jsx)(_react.default.Fragment, null, children);
|
|
27
|
-
};
|
|
28
|
-
|
|
29
|
-
exports.EuiCacheProvider = EuiCacheProvider;
|
|
@@ -1,31 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
|
|
3
|
-
Object.defineProperty(exports, "__esModule", {
|
|
4
|
-
value: true
|
|
5
|
-
});
|
|
6
|
-
|
|
7
|
-
var _cache_context = require("./cache_context");
|
|
8
|
-
|
|
9
|
-
Object.keys(_cache_context).forEach(function (key) {
|
|
10
|
-
if (key === "default" || key === "__esModule") return;
|
|
11
|
-
if (key in exports && exports[key] === _cache_context[key]) return;
|
|
12
|
-
Object.defineProperty(exports, key, {
|
|
13
|
-
enumerable: true,
|
|
14
|
-
get: function get() {
|
|
15
|
-
return _cache_context[key];
|
|
16
|
-
}
|
|
17
|
-
});
|
|
18
|
-
});
|
|
19
|
-
|
|
20
|
-
var _cache_provider = require("./cache_provider");
|
|
21
|
-
|
|
22
|
-
Object.keys(_cache_provider).forEach(function (key) {
|
|
23
|
-
if (key === "default" || key === "__esModule") return;
|
|
24
|
-
if (key in exports && exports[key] === _cache_provider[key]) return;
|
|
25
|
-
Object.defineProperty(exports, key, {
|
|
26
|
-
enumerable: true,
|
|
27
|
-
get: function get() {
|
|
28
|
-
return _cache_provider[key];
|
|
29
|
-
}
|
|
30
|
-
});
|
|
31
|
-
});
|
|
@@ -1,54 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
|
|
3
|
-
var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefault");
|
|
4
|
-
|
|
5
|
-
var _typeof = require("@babel/runtime/helpers/typeof");
|
|
6
|
-
|
|
7
|
-
Object.defineProperty(exports, "__esModule", {
|
|
8
|
-
value: true
|
|
9
|
-
});
|
|
10
|
-
exports.withEuiSystem = void 0;
|
|
11
|
-
|
|
12
|
-
var _extends2 = _interopRequireDefault(require("@babel/runtime/helpers/extends"));
|
|
13
|
-
|
|
14
|
-
var _react = _interopRequireWildcard(require("react"));
|
|
15
|
-
|
|
16
|
-
var _services = require("../../../services");
|
|
17
|
-
|
|
18
|
-
var _cache = require("../cache");
|
|
19
|
-
|
|
20
|
-
var _react2 = require("@emotion/react");
|
|
21
|
-
|
|
22
|
-
function _getRequireWildcardCache(nodeInterop) { if (typeof WeakMap !== "function") return null; var cacheBabelInterop = new WeakMap(); var cacheNodeInterop = new WeakMap(); return (_getRequireWildcardCache = function _getRequireWildcardCache(nodeInterop) { return nodeInterop ? cacheNodeInterop : cacheBabelInterop; })(nodeInterop); }
|
|
23
|
-
|
|
24
|
-
function _interopRequireWildcard(obj, nodeInterop) { if (!nodeInterop && obj && obj.__esModule) { return obj; } if (obj === null || _typeof(obj) !== "object" && typeof obj !== "function") { return { default: obj }; } var cache = _getRequireWildcardCache(nodeInterop); if (cache && cache.has(obj)) { return cache.get(obj); } var newObj = {}; var hasPropertyDescriptor = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var key in obj) { if (key !== "default" && Object.prototype.hasOwnProperty.call(obj, key)) { var desc = hasPropertyDescriptor ? Object.getOwnPropertyDescriptor(obj, key) : null; if (desc && (desc.get || desc.set)) { Object.defineProperty(newObj, key, desc); } else { newObj[key] = obj[key]; } } } newObj.default = obj; if (cache) { cache.set(obj, newObj); } return newObj; }
|
|
25
|
-
|
|
26
|
-
/*
|
|
27
|
-
* Copyright Elasticsearch B.V. and/or licensed to Elasticsearch B.V. under one
|
|
28
|
-
* or more contributor license agreements. Licensed under the Elastic License
|
|
29
|
-
* 2.0 and the Server Side Public License, v 1; you may not use this file except
|
|
30
|
-
* in compliance with, at your election, the Elastic License 2.0 or the Server
|
|
31
|
-
* Side Public License, v 1.
|
|
32
|
-
*/
|
|
33
|
-
// If a component usese `forwardRef` you'll need to pass its props directly via `T` (`withEuiTheme<EuiComponentProps>(EuiComponent)`)
|
|
34
|
-
// TypeScript cannot infer correctly with the extra `forwardRef` types.
|
|
35
|
-
var withEuiSystem = function withEuiSystem(Component) {
|
|
36
|
-
var componentName = Component.displayName || Component.name || 'Component';
|
|
37
|
-
|
|
38
|
-
var Render = function Render(props, ref) {
|
|
39
|
-
var euiTheme = (0, _services.useEuiTheme)();
|
|
40
|
-
var cache = (0, _cache.useEuiCacheContext)();
|
|
41
|
-
return (0, _react2.jsx)(_cache.EuiCacheProvider, {
|
|
42
|
-
cache: cache
|
|
43
|
-
}, (0, _react2.jsx)(Component, (0, _extends2.default)({
|
|
44
|
-
euiTheme: euiTheme,
|
|
45
|
-
ref: ref
|
|
46
|
-
}, props)));
|
|
47
|
-
};
|
|
48
|
-
|
|
49
|
-
var WithEuiSystem = /*#__PURE__*/(0, _react.forwardRef)(Render);
|
|
50
|
-
WithEuiSystem.displayName = componentName.replace(/^_{1}/, '');
|
|
51
|
-
return WithEuiSystem;
|
|
52
|
-
};
|
|
53
|
-
|
|
54
|
-
exports.withEuiSystem = withEuiSystem;
|
|
@@ -1,31 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
|
|
3
|
-
var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefault");
|
|
4
|
-
|
|
5
|
-
Object.defineProperty(exports, "__esModule", {
|
|
6
|
-
value: true
|
|
7
|
-
});
|
|
8
|
-
exports.EuiUtilityClasses = void 0;
|
|
9
|
-
|
|
10
|
-
var _react = _interopRequireDefault(require("react"));
|
|
11
|
-
|
|
12
|
-
var _react2 = require("@emotion/react");
|
|
13
|
-
|
|
14
|
-
function _EMOTION_STRINGIFIED_CSS_ERROR__() { return "You have tried to stringify object returned from `css` function. It isn't supposed to be used directly (e.g. as value of the `className` prop), but rather handed to emotion so it can handle it (e.g. as value of `css` prop)."; }
|
|
15
|
-
|
|
16
|
-
var _ref = process.env.NODE_ENV === "production" ? {
|
|
17
|
-
name: "bd8dxy-EuiUtilityClasses",
|
|
18
|
-
styles: ".euiYolo{color:coral;};label:EuiUtilityClasses;"
|
|
19
|
-
} : {
|
|
20
|
-
name: "bd8dxy-EuiUtilityClasses",
|
|
21
|
-
styles: ".euiYolo{color:coral;};label:EuiUtilityClasses;",
|
|
22
|
-
toString: _EMOTION_STRINGIFIED_CSS_ERROR__
|
|
23
|
-
};
|
|
24
|
-
|
|
25
|
-
var EuiUtilityClasses = function EuiUtilityClasses() {
|
|
26
|
-
return (0, _react2.jsx)(_react2.Global, {
|
|
27
|
-
styles: _ref
|
|
28
|
-
});
|
|
29
|
-
};
|
|
30
|
-
|
|
31
|
-
exports.EuiUtilityClasses = EuiUtilityClasses;
|
|
@@ -1,24 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
|
|
3
|
-
Object.defineProperty(exports, "__esModule", {
|
|
4
|
-
value: true
|
|
5
|
-
});
|
|
6
|
-
exports.useEuiCacheContext = exports.EuiCacheContext = void 0;
|
|
7
|
-
|
|
8
|
-
var _react = require("react");
|
|
9
|
-
|
|
10
|
-
/*
|
|
11
|
-
* Copyright Elasticsearch B.V. and/or licensed to Elasticsearch B.V. under one
|
|
12
|
-
* or more contributor license agreements. Licensed under the Elastic License
|
|
13
|
-
* 2.0 and the Server Side Public License, v 1; you may not use this file except
|
|
14
|
-
* in compliance with, at your election, the Elastic License 2.0 or the Server
|
|
15
|
-
* Side Public License, v 1.
|
|
16
|
-
*/
|
|
17
|
-
var EuiCacheContext = /*#__PURE__*/(0, _react.createContext)(undefined);
|
|
18
|
-
exports.EuiCacheContext = EuiCacheContext;
|
|
19
|
-
|
|
20
|
-
var useEuiCacheContext = function useEuiCacheContext() {
|
|
21
|
-
return (0, _react.useContext)(EuiCacheContext);
|
|
22
|
-
};
|
|
23
|
-
|
|
24
|
-
exports.useEuiCacheContext = useEuiCacheContext;
|
|
@@ -1,29 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
|
|
3
|
-
var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefault");
|
|
4
|
-
|
|
5
|
-
Object.defineProperty(exports, "__esModule", {
|
|
6
|
-
value: true
|
|
7
|
-
});
|
|
8
|
-
exports.EuiCacheProvider = void 0;
|
|
9
|
-
|
|
10
|
-
var _react = _interopRequireDefault(require("react"));
|
|
11
|
-
|
|
12
|
-
var _react2 = require("@emotion/react");
|
|
13
|
-
|
|
14
|
-
/*
|
|
15
|
-
* Copyright Elasticsearch B.V. and/or licensed to Elasticsearch B.V. under one
|
|
16
|
-
* or more contributor license agreements. Licensed under the Elastic License
|
|
17
|
-
* 2.0 and the Server Side Public License, v 1; you may not use this file except
|
|
18
|
-
* in compliance with, at your election, the Elastic License 2.0 or the Server
|
|
19
|
-
* Side Public License, v 1.
|
|
20
|
-
*/
|
|
21
|
-
var EuiCacheProvider = function EuiCacheProvider(_ref) {
|
|
22
|
-
var cache = _ref.cache,
|
|
23
|
-
children = _ref.children;
|
|
24
|
-
return children && cache ? (0, _react2.jsx)(_react2.CacheProvider, {
|
|
25
|
-
value: cache
|
|
26
|
-
}, children) : (0, _react2.jsx)(_react.default.Fragment, null, children);
|
|
27
|
-
};
|
|
28
|
-
|
|
29
|
-
exports.EuiCacheProvider = EuiCacheProvider;
|
|
@@ -1,31 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
|
|
3
|
-
Object.defineProperty(exports, "__esModule", {
|
|
4
|
-
value: true
|
|
5
|
-
});
|
|
6
|
-
|
|
7
|
-
var _cache_context = require("./cache_context");
|
|
8
|
-
|
|
9
|
-
Object.keys(_cache_context).forEach(function (key) {
|
|
10
|
-
if (key === "default" || key === "__esModule") return;
|
|
11
|
-
if (key in exports && exports[key] === _cache_context[key]) return;
|
|
12
|
-
Object.defineProperty(exports, key, {
|
|
13
|
-
enumerable: true,
|
|
14
|
-
get: function get() {
|
|
15
|
-
return _cache_context[key];
|
|
16
|
-
}
|
|
17
|
-
});
|
|
18
|
-
});
|
|
19
|
-
|
|
20
|
-
var _cache_provider = require("./cache_provider");
|
|
21
|
-
|
|
22
|
-
Object.keys(_cache_provider).forEach(function (key) {
|
|
23
|
-
if (key === "default" || key === "__esModule") return;
|
|
24
|
-
if (key in exports && exports[key] === _cache_provider[key]) return;
|
|
25
|
-
Object.defineProperty(exports, key, {
|
|
26
|
-
enumerable: true,
|
|
27
|
-
get: function get() {
|
|
28
|
-
return _cache_provider[key];
|
|
29
|
-
}
|
|
30
|
-
});
|
|
31
|
-
});
|
|
@@ -1,54 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
|
|
3
|
-
var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefault");
|
|
4
|
-
|
|
5
|
-
var _typeof = require("@babel/runtime/helpers/typeof");
|
|
6
|
-
|
|
7
|
-
Object.defineProperty(exports, "__esModule", {
|
|
8
|
-
value: true
|
|
9
|
-
});
|
|
10
|
-
exports.withEuiSystem = void 0;
|
|
11
|
-
|
|
12
|
-
var _extends2 = _interopRequireDefault(require("@babel/runtime/helpers/extends"));
|
|
13
|
-
|
|
14
|
-
var _react = _interopRequireWildcard(require("react"));
|
|
15
|
-
|
|
16
|
-
var _services = require("../../../services");
|
|
17
|
-
|
|
18
|
-
var _cache = require("../cache");
|
|
19
|
-
|
|
20
|
-
var _react2 = require("@emotion/react");
|
|
21
|
-
|
|
22
|
-
function _getRequireWildcardCache(nodeInterop) { if (typeof WeakMap !== "function") return null; var cacheBabelInterop = new WeakMap(); var cacheNodeInterop = new WeakMap(); return (_getRequireWildcardCache = function _getRequireWildcardCache(nodeInterop) { return nodeInterop ? cacheNodeInterop : cacheBabelInterop; })(nodeInterop); }
|
|
23
|
-
|
|
24
|
-
function _interopRequireWildcard(obj, nodeInterop) { if (!nodeInterop && obj && obj.__esModule) { return obj; } if (obj === null || _typeof(obj) !== "object" && typeof obj !== "function") { return { default: obj }; } var cache = _getRequireWildcardCache(nodeInterop); if (cache && cache.has(obj)) { return cache.get(obj); } var newObj = {}; var hasPropertyDescriptor = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var key in obj) { if (key !== "default" && Object.prototype.hasOwnProperty.call(obj, key)) { var desc = hasPropertyDescriptor ? Object.getOwnPropertyDescriptor(obj, key) : null; if (desc && (desc.get || desc.set)) { Object.defineProperty(newObj, key, desc); } else { newObj[key] = obj[key]; } } } newObj.default = obj; if (cache) { cache.set(obj, newObj); } return newObj; }
|
|
25
|
-
|
|
26
|
-
/*
|
|
27
|
-
* Copyright Elasticsearch B.V. and/or licensed to Elasticsearch B.V. under one
|
|
28
|
-
* or more contributor license agreements. Licensed under the Elastic License
|
|
29
|
-
* 2.0 and the Server Side Public License, v 1; you may not use this file except
|
|
30
|
-
* in compliance with, at your election, the Elastic License 2.0 or the Server
|
|
31
|
-
* Side Public License, v 1.
|
|
32
|
-
*/
|
|
33
|
-
// If a component usese `forwardRef` you'll need to pass its props directly via `T` (`withEuiTheme<EuiComponentProps>(EuiComponent)`)
|
|
34
|
-
// TypeScript cannot infer correctly with the extra `forwardRef` types.
|
|
35
|
-
var withEuiSystem = function withEuiSystem(Component) {
|
|
36
|
-
var componentName = Component.displayName || Component.name || 'Component';
|
|
37
|
-
|
|
38
|
-
var Render = function Render(props, ref) {
|
|
39
|
-
var euiTheme = (0, _services.useEuiTheme)();
|
|
40
|
-
var cache = (0, _cache.useEuiCacheContext)();
|
|
41
|
-
return (0, _react2.jsx)(_cache.EuiCacheProvider, {
|
|
42
|
-
cache: cache
|
|
43
|
-
}, (0, _react2.jsx)(Component, (0, _extends2.default)({
|
|
44
|
-
euiTheme: euiTheme,
|
|
45
|
-
ref: ref
|
|
46
|
-
}, props)));
|
|
47
|
-
};
|
|
48
|
-
|
|
49
|
-
var WithEuiSystem = /*#__PURE__*/(0, _react.forwardRef)(Render);
|
|
50
|
-
WithEuiSystem.displayName = componentName.replace(/^_{1}/, '');
|
|
51
|
-
return WithEuiSystem;
|
|
52
|
-
};
|
|
53
|
-
|
|
54
|
-
exports.withEuiSystem = withEuiSystem;
|