@elastic/eui 59.0.1 → 59.1.0-rc1
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/dist/eui_theme_dark.css +2 -136
- package/dist/eui_theme_dark.json +0 -6
- package/dist/eui_theme_dark.json.d.ts +0 -6
- package/dist/eui_theme_dark.min.css +1 -1
- package/dist/eui_theme_light.css +2 -136
- package/dist/eui_theme_light.json +0 -6
- package/dist/eui_theme_light.json.d.ts +0 -6
- package/dist/eui_theme_light.min.css +1 -1
- package/es/components/accessibility/skip_link/skip_link.js +9 -7
- package/es/components/avatar/avatar.js +9 -7
- package/es/components/bottom_bar/bottom_bar.js +8 -9
- package/es/components/breadcrumbs/breadcrumbs.js +2 -1
- package/es/components/button/{button_content.js → _button_content_deprecated.js} +4 -3
- package/es/components/button/button.js +16 -10
- package/es/components/button/button_display/_button_display.js +141 -0
- package/es/components/button/button_display/_button_display.styles.js +53 -0
- package/es/components/button/button_display/_button_display_content.js +100 -0
- package/es/components/button/button_display/_button_display_content.styles.js +61 -0
- package/es/components/button/button_empty/button_empty.js +3 -2
- package/es/components/button/button_group/button_group.js +2 -1
- package/es/components/button/button_group/button_group_button.js +3 -2
- package/es/components/call_out/call_out.js +9 -8
- package/es/components/card/card.js +2 -1
- package/es/components/card/card_select.js +2 -1
- package/es/components/date_picker/auto_refresh/auto_refresh.js +2 -1
- package/es/components/expression/expression.js +11 -10
- package/es/components/facet/facet_button.js +36 -19
- package/es/components/facet/facet_button.styles.js +64 -0
- package/es/components/facet/facet_group.js +17 -27
- package/es/components/facet/facet_group.styles.js +79 -0
- package/es/components/header/header_links/header_link.js +2 -1
- package/es/components/health/health.js +7 -6
- package/es/components/horizontal_rule/horizontal_rule.js +7 -6
- package/es/components/link/link.js +8 -7
- package/es/components/loading/loading_chart.js +7 -6
- package/es/components/loading/loading_content.js +7 -6
- package/es/components/loading/loading_logo.js +7 -6
- package/es/components/loading/loading_spinner.js +20 -8
- package/es/components/loading/loading_spinner.styles.js +4 -4
- package/es/components/mark/mark.js +9 -8
- package/es/components/markdown_editor/markdown_format.js +7 -6
- package/es/components/notification/notification_event.js +2 -1
- package/es/components/pagination/pagination_button.js +2 -1
- package/es/components/panel/panel.js +8 -7
- package/es/components/provider/cache/cache_context.js +12 -0
- package/es/components/provider/cache/cache_provider.js +17 -0
- package/es/components/provider/cache/index.js +9 -0
- package/es/components/provider/index.js +1 -1
- package/es/components/provider/provider.js +39 -5
- package/es/components/provider/system/index.js +8 -0
- package/es/components/provider/system/system.js +33 -0
- package/es/components/spacer/spacer.js +7 -6
- package/es/components/text/text.js +7 -6
- package/es/components/text/text_color.js +7 -6
- package/es/components/timeline/timeline_item.js +7 -6
- package/es/components/timeline/timeline_item_icon.js +7 -6
- package/es/components/title/title.js +7 -6
- package/es/global_styling/utility/utility.js +27 -0
- package/es/services/theme/hooks.js +2 -2
- package/es/services/theme/provider.js +1 -5
- package/eui.d.ts +1030 -357
- package/i18ntokens.json +12 -12
- package/lib/components/accessibility/skip_link/skip_link.js +13 -10
- package/lib/components/avatar/avatar.js +12 -8
- package/lib/components/bottom_bar/bottom_bar.js +9 -6
- package/lib/components/breadcrumbs/breadcrumbs.js +2 -1
- package/lib/components/button/{button_content.js → _button_content_deprecated.js} +6 -5
- package/lib/components/button/button.js +19 -13
- package/lib/components/button/button_display/_button_display.js +146 -0
- package/lib/components/button/button_display/_button_display.styles.js +59 -0
- package/lib/components/button/button_display/_button_display_content.js +111 -0
- package/lib/components/button/button_display/_button_display_content.styles.js +64 -0
- package/lib/components/button/button_empty/button_empty.js +4 -3
- package/lib/components/button/button_group/button_group.js +2 -1
- package/lib/components/button/button_group/button_group_button.js +3 -2
- package/lib/components/call_out/call_out.js +14 -10
- package/lib/components/card/card.js +2 -1
- package/lib/components/card/card_select.js +2 -1
- package/lib/components/date_picker/auto_refresh/auto_refresh.js +2 -1
- package/lib/components/expression/expression.js +14 -12
- package/lib/components/facet/facet_button.js +43 -21
- package/lib/components/facet/facet_button.styles.js +79 -0
- package/lib/components/facet/facet_group.js +20 -29
- package/lib/components/facet/facet_group.styles.js +82 -0
- package/lib/components/header/header_links/header_link.js +2 -1
- package/lib/components/health/health.js +10 -8
- package/lib/components/horizontal_rule/horizontal_rule.js +10 -8
- package/lib/components/link/link.js +13 -7
- package/lib/components/loading/loading_chart.js +10 -8
- package/lib/components/loading/loading_content.js +10 -8
- package/lib/components/loading/loading_logo.js +10 -8
- package/lib/components/loading/loading_spinner.js +23 -10
- package/lib/components/loading/loading_spinner.styles.js +4 -4
- package/lib/components/mark/mark.js +12 -10
- package/lib/components/markdown_editor/markdown_format.js +10 -8
- package/lib/components/notification/notification_event.js +2 -1
- package/lib/components/panel/panel.js +11 -9
- package/lib/components/provider/cache/cache_context.js +24 -0
- package/lib/components/provider/cache/cache_provider.js +29 -0
- package/lib/components/provider/cache/index.js +31 -0
- package/lib/components/provider/index.js +12 -7
- package/lib/components/provider/provider.js +40 -5
- package/lib/components/provider/system/index.js +18 -0
- package/lib/components/provider/system/system.js +45 -0
- package/lib/components/spacer/spacer.js +10 -8
- package/lib/components/text/text.js +10 -8
- package/lib/components/text/text_color.js +10 -8
- package/lib/components/timeline/timeline_item.js +10 -8
- package/lib/components/timeline/timeline_item_icon.js +10 -8
- package/lib/components/title/title.js +11 -9
- package/lib/global_styling/utility/utility.js +31 -0
- package/lib/services/theme/hooks.js +2 -2
- package/lib/services/theme/provider.js +3 -6
- package/optimize/es/components/accessibility/skip_link/skip_link.js +6 -5
- package/optimize/es/components/avatar/avatar.js +7 -5
- package/optimize/es/components/bottom_bar/bottom_bar.js +8 -9
- package/optimize/es/components/breadcrumbs/breadcrumbs.js +2 -1
- package/optimize/es/components/button/{button_content.js → _button_content_deprecated.js} +1 -1
- package/optimize/es/components/button/button.js +13 -8
- package/optimize/es/components/button/button_display/_button_display.js +73 -0
- package/optimize/es/components/button/button_display/_button_display.styles.js +53 -0
- package/optimize/es/components/button/button_display/_button_display_content.js +67 -0
- package/optimize/es/components/button/button_display/_button_display_content.styles.js +61 -0
- package/optimize/es/components/button/button_empty/button_empty.js +1 -1
- package/optimize/es/components/button/button_group/button_group_button.js +1 -1
- package/optimize/es/components/call_out/call_out.js +8 -7
- package/optimize/es/components/expression/expression.js +10 -9
- package/optimize/es/components/facet/facet_button.js +35 -18
- package/optimize/es/components/facet/facet_button.styles.js +64 -0
- package/optimize/es/components/facet/facet_group.js +14 -24
- package/optimize/es/components/facet/facet_group.styles.js +79 -0
- package/optimize/es/components/health/health.js +6 -5
- package/optimize/es/components/horizontal_rule/horizontal_rule.js +6 -5
- package/optimize/es/components/link/link.js +7 -6
- package/optimize/es/components/loading/loading_chart.js +6 -5
- package/optimize/es/components/loading/loading_content.js +6 -5
- package/optimize/es/components/loading/loading_logo.js +6 -5
- package/optimize/es/components/loading/loading_spinner.js +8 -6
- package/optimize/es/components/loading/loading_spinner.styles.js +4 -4
- package/optimize/es/components/mark/mark.js +8 -7
- package/optimize/es/components/markdown_editor/markdown_format.js +6 -5
- package/optimize/es/components/panel/panel.js +7 -6
- package/optimize/es/components/provider/cache/cache_context.js +12 -0
- package/optimize/es/components/provider/cache/cache_provider.js +17 -0
- package/optimize/es/components/provider/cache/index.js +9 -0
- package/optimize/es/components/provider/index.js +1 -1
- package/optimize/es/components/provider/provider.js +39 -5
- package/optimize/es/components/provider/system/index.js +8 -0
- package/optimize/es/components/provider/system/system.js +33 -0
- package/optimize/es/components/spacer/spacer.js +6 -5
- package/optimize/es/components/text/text.js +6 -5
- package/optimize/es/components/text/text_color.js +6 -5
- package/optimize/es/components/timeline/timeline_item.js +6 -5
- package/optimize/es/components/timeline/timeline_item_icon.js +6 -5
- package/optimize/es/components/title/title.js +6 -5
- package/optimize/es/global_styling/utility/utility.js +27 -0
- package/optimize/es/services/theme/hooks.js +2 -2
- package/optimize/es/services/theme/provider.js +1 -5
- package/optimize/lib/components/accessibility/skip_link/skip_link.js +8 -6
- package/optimize/lib/components/avatar/avatar.js +9 -5
- package/optimize/lib/components/bottom_bar/bottom_bar.js +9 -6
- package/optimize/lib/components/breadcrumbs/breadcrumbs.js +2 -1
- package/optimize/lib/components/button/{button_content.js → _button_content_deprecated.js} +3 -3
- package/optimize/lib/components/button/button.js +16 -11
- package/optimize/lib/components/button/button_display/_button_display.js +79 -0
- package/optimize/lib/components/button/button_display/_button_display.styles.js +59 -0
- package/optimize/lib/components/button/button_display/_button_display_content.js +78 -0
- package/optimize/lib/components/button/button_display/_button_display_content.styles.js +64 -0
- package/optimize/lib/components/button/button_empty/button_empty.js +2 -2
- package/optimize/lib/components/button/button_group/button_group_button.js +1 -1
- package/optimize/lib/components/call_out/call_out.js +13 -9
- package/optimize/lib/components/expression/expression.js +11 -9
- package/optimize/lib/components/facet/facet_button.js +40 -18
- package/optimize/lib/components/facet/facet_button.styles.js +79 -0
- package/optimize/lib/components/facet/facet_group.js +15 -24
- package/optimize/lib/components/facet/facet_group.styles.js +82 -0
- package/optimize/lib/components/health/health.js +7 -5
- package/optimize/lib/components/horizontal_rule/horizontal_rule.js +7 -5
- package/optimize/lib/components/link/link.js +12 -6
- package/optimize/lib/components/loading/loading_chart.js +7 -5
- package/optimize/lib/components/loading/loading_content.js +7 -5
- package/optimize/lib/components/loading/loading_logo.js +7 -5
- package/optimize/lib/components/loading/loading_spinner.js +9 -6
- package/optimize/lib/components/loading/loading_spinner.styles.js +4 -4
- package/optimize/lib/components/mark/mark.js +9 -7
- package/optimize/lib/components/markdown_editor/markdown_format.js +7 -5
- package/optimize/lib/components/panel/panel.js +8 -6
- package/optimize/lib/components/provider/cache/cache_context.js +24 -0
- package/optimize/lib/components/provider/cache/cache_provider.js +29 -0
- package/optimize/lib/components/provider/cache/index.js +31 -0
- package/optimize/lib/components/provider/index.js +12 -7
- package/optimize/lib/components/provider/provider.js +40 -5
- package/optimize/lib/components/provider/system/index.js +18 -0
- package/optimize/lib/components/provider/system/system.js +54 -0
- package/optimize/lib/components/spacer/spacer.js +7 -5
- package/optimize/lib/components/text/text.js +7 -5
- package/optimize/lib/components/text/text_color.js +7 -5
- package/optimize/lib/components/timeline/timeline_item.js +7 -5
- package/optimize/lib/components/timeline/timeline_item_icon.js +7 -5
- package/optimize/lib/components/title/title.js +8 -6
- package/optimize/lib/global_styling/utility/utility.js +31 -0
- package/optimize/lib/services/theme/hooks.js +2 -2
- package/optimize/lib/services/theme/provider.js +3 -6
- package/package.json +1 -1
- package/src/components/index.scss +0 -1
- package/src/components/selectable/selectable_message/_selectable_message.scss +1 -0
- package/src/themes/amsterdam/overrides/_index.scss +0 -1
- package/test-env/components/accessibility/skip_link/skip_link.js +13 -10
- package/test-env/components/avatar/avatar.js +12 -8
- package/test-env/components/bottom_bar/bottom_bar.js +9 -6
- package/test-env/components/breadcrumbs/breadcrumbs.js +2 -1
- package/test-env/components/button/{button_content.js → _button_content_deprecated.js} +6 -5
- package/test-env/components/button/button.js +19 -13
- package/test-env/components/button/button_display/_button_display.js +143 -0
- package/test-env/components/button/button_display/_button_display.styles.js +59 -0
- package/test-env/components/button/button_display/_button_display_content.js +108 -0
- package/test-env/components/button/button_display/_button_display_content.styles.js +64 -0
- package/test-env/components/button/button_empty/button_empty.js +4 -3
- package/test-env/components/button/button_group/button_group.js +2 -1
- package/test-env/components/button/button_group/button_group_button.js +3 -2
- package/test-env/components/call_out/call_out.js +14 -10
- package/test-env/components/card/card.js +2 -1
- package/test-env/components/card/card_select.js +2 -1
- package/test-env/components/date_picker/auto_refresh/auto_refresh.js +2 -1
- package/test-env/components/expression/expression.js +14 -12
- package/test-env/components/facet/facet_button.js +43 -21
- package/test-env/components/facet/facet_button.styles.js +79 -0
- package/test-env/components/facet/facet_group.js +20 -29
- package/test-env/components/facet/facet_group.styles.js +82 -0
- package/test-env/components/header/header_links/header_link.js +2 -1
- package/test-env/components/health/health.js +10 -8
- package/test-env/components/horizontal_rule/horizontal_rule.js +10 -8
- package/test-env/components/link/link.js +13 -7
- package/test-env/components/loading/loading_chart.js +10 -8
- package/test-env/components/loading/loading_content.js +10 -8
- package/test-env/components/loading/loading_logo.js +10 -8
- package/test-env/components/loading/loading_spinner.js +23 -10
- package/test-env/components/loading/loading_spinner.styles.js +4 -4
- package/test-env/components/mark/mark.js +12 -10
- package/test-env/components/markdown_editor/markdown_format.js +10 -8
- package/test-env/components/notification/notification_event.js +2 -1
- package/test-env/components/panel/panel.js +11 -9
- package/test-env/components/provider/cache/cache_context.js +24 -0
- package/test-env/components/provider/cache/cache_provider.js +29 -0
- package/test-env/components/provider/cache/index.js +31 -0
- package/test-env/components/provider/index.js +12 -7
- package/test-env/components/provider/provider.js +40 -5
- package/test-env/components/provider/system/index.js +18 -0
- package/test-env/components/provider/system/system.js +54 -0
- package/test-env/components/spacer/spacer.js +10 -8
- package/test-env/components/text/text.js +10 -8
- package/test-env/components/text/text_color.js +10 -8
- package/test-env/components/timeline/timeline_item.js +10 -8
- package/test-env/components/timeline/timeline_item_icon.js +10 -8
- package/test-env/components/title/title.js +11 -9
- package/test-env/global_styling/utility/utility.js +31 -0
- package/test-env/services/theme/hooks.js +2 -2
- package/test-env/services/theme/provider.js +3 -6
- package/src/components/facet/_facet_button.scss +0 -69
- package/src/components/facet/_facet_group.scss +0 -24
- package/src/components/facet/_index.scss +0 -4
- package/src/components/facet/_variables.scss +0 -6
- package/src/themes/amsterdam/overrides/_facet.scss +0 -10
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import _extends from "@babel/runtime/helpers/extends";
|
|
2
2
|
import _defineProperty from "@babel/runtime/helpers/defineProperty";
|
|
3
3
|
import _objectWithoutProperties from "@babel/runtime/helpers/objectWithoutProperties";
|
|
4
|
-
var _excluded = ["className", "size", "margin"];
|
|
4
|
+
var _excluded = ["className", "euiTheme", "size", "margin"];
|
|
5
5
|
|
|
6
6
|
/*
|
|
7
7
|
* Copyright Elasticsearch B.V. and/or licensed to Elasticsearch B.V. under one
|
|
@@ -12,7 +12,7 @@ var _excluded = ["className", "size", "margin"];
|
|
|
12
12
|
*/
|
|
13
13
|
import React from 'react';
|
|
14
14
|
import classNames from 'classnames';
|
|
15
|
-
import {
|
|
15
|
+
import { withEuiSystem } from '../provider/system';
|
|
16
16
|
import { euiHorizontalRuleStyles } from './horizontal_rule.styles';
|
|
17
17
|
import { jsx as ___EmotionJSX } from "@emotion/react";
|
|
18
18
|
export var SIZES = ['full', 'half', 'quarter'];
|
|
@@ -26,17 +26,17 @@ var marginToClassNameMap = {
|
|
|
26
26
|
xl: 'marginXLarge',
|
|
27
27
|
xxl: 'marginXXLarge'
|
|
28
28
|
};
|
|
29
|
-
export var
|
|
29
|
+
export var _EuiHorizontalRule = function _EuiHorizontalRule(_ref) {
|
|
30
30
|
var _classNames;
|
|
31
31
|
|
|
32
32
|
var className = _ref.className,
|
|
33
|
+
euiTheme = _ref.euiTheme,
|
|
33
34
|
_ref$size = _ref.size,
|
|
34
35
|
size = _ref$size === void 0 ? 'full' : _ref$size,
|
|
35
36
|
_ref$margin = _ref.margin,
|
|
36
37
|
margin = _ref$margin === void 0 ? 'l' : _ref$margin,
|
|
37
38
|
rest = _objectWithoutProperties(_ref, _excluded);
|
|
38
39
|
|
|
39
|
-
var euiTheme = useEuiTheme();
|
|
40
40
|
var styles = euiHorizontalRuleStyles(euiTheme);
|
|
41
41
|
var classes = classNames('euiHorizontalRule', (_classNames = {}, _defineProperty(_classNames, "euiHorizontalRule--".concat(size), size), _defineProperty(_classNames, "euiHorizontalRule--".concat(marginToClassNameMap[margin]), margin && margin !== 'none'), _classNames), className);
|
|
42
42
|
var cssStyles = [styles.euiHorizontalRule, styles[size], styles[margin]];
|
|
@@ -44,4 +44,5 @@ export var EuiHorizontalRule = function EuiHorizontalRule(_ref) {
|
|
|
44
44
|
css: cssStyles,
|
|
45
45
|
className: classes
|
|
46
46
|
}, rest));
|
|
47
|
-
};
|
|
47
|
+
};
|
|
48
|
+
export var EuiHorizontalRule = withEuiSystem(_EuiHorizontalRule);
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import _extends from "@babel/runtime/helpers/extends";
|
|
2
2
|
import _defineProperty from "@babel/runtime/helpers/defineProperty";
|
|
3
3
|
import _objectWithoutProperties from "@babel/runtime/helpers/objectWithoutProperties";
|
|
4
|
-
var _excluded = ["children", "color", "className", "href", "external", "target", "rel", "type", "onClick", "disabled"];
|
|
4
|
+
var _excluded = ["children", "color", "className", "href", "external", "target", "rel", "type", "onClick", "disabled", "euiTheme"];
|
|
5
5
|
|
|
6
6
|
function ownKeys(object, enumerableOnly) { var keys = Object.keys(object); if (Object.getOwnPropertySymbols) { var symbols = Object.getOwnPropertySymbols(object); if (enumerableOnly) { symbols = symbols.filter(function (sym) { return Object.getOwnPropertyDescriptor(object, sym).enumerable; }); } keys.push.apply(keys, symbols); } return keys; }
|
|
7
7
|
|
|
@@ -16,7 +16,8 @@ function _objectSpread(target) { for (var i = 1; i < arguments.length; i++) { va
|
|
|
16
16
|
*/
|
|
17
17
|
import React, { forwardRef } from 'react';
|
|
18
18
|
import classNames from 'classnames';
|
|
19
|
-
import { getSecureRelForTarget
|
|
19
|
+
import { getSecureRelForTarget } from '../../services';
|
|
20
|
+
import { withEuiSystem } from '../provider/system';
|
|
20
21
|
import { euiLinkStyles } from './link.styles';
|
|
21
22
|
import { EuiIcon } from '../icon';
|
|
22
23
|
import { EuiI18n, useEuiI18n } from '../i18n';
|
|
@@ -24,7 +25,7 @@ import { EuiScreenReaderOnly } from '../accessibility';
|
|
|
24
25
|
import { validateHref } from '../../services/security/href_validator';
|
|
25
26
|
import { jsx as ___EmotionJSX } from "@emotion/react";
|
|
26
27
|
export var COLORS = ['primary', 'subdued', 'success', 'accent', 'danger', 'warning', 'text', 'ghost'];
|
|
27
|
-
var
|
|
28
|
+
export var _EuiLink = /*#__PURE__*/forwardRef(function (_ref, ref) {
|
|
28
29
|
var children = _ref.children,
|
|
29
30
|
_ref$color = _ref.color,
|
|
30
31
|
color = _ref$color === void 0 ? 'primary' : _ref$color,
|
|
@@ -37,9 +38,9 @@ var EuiLink = /*#__PURE__*/forwardRef(function (_ref, ref) {
|
|
|
37
38
|
type = _ref$type === void 0 ? 'button' : _ref$type,
|
|
38
39
|
onClick = _ref.onClick,
|
|
39
40
|
_disabled = _ref.disabled,
|
|
41
|
+
euiTheme = _ref.euiTheme,
|
|
40
42
|
rest = _objectWithoutProperties(_ref, _excluded);
|
|
41
43
|
|
|
42
|
-
var euiTheme = useEuiTheme();
|
|
43
44
|
var styles = euiLinkStyles(euiTheme);
|
|
44
45
|
var cssStyles = [styles.euiLink];
|
|
45
46
|
var cssScreenReaderTextStyles = [styles.euiLink__screenReaderText];
|
|
@@ -95,5 +96,5 @@ var EuiLink = /*#__PURE__*/forwardRef(function (_ref, ref) {
|
|
|
95
96
|
ref: ref
|
|
96
97
|
}, anchorProps), children, showExternalLinkIcon && externalLinkIcon, target === '_blank' && newTargetScreenreaderText);
|
|
97
98
|
});
|
|
98
|
-
|
|
99
|
-
export
|
|
99
|
+
_EuiLink.displayName = 'EuiLink';
|
|
100
|
+
export var EuiLink = withEuiSystem(_EuiLink);
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import _extends from "@babel/runtime/helpers/extends";
|
|
2
2
|
import _objectWithoutProperties from "@babel/runtime/helpers/objectWithoutProperties";
|
|
3
|
-
var _excluded = ["size", "mono", "className", "aria-label"];
|
|
3
|
+
var _excluded = ["size", "mono", "className", "aria-label", "euiTheme"];
|
|
4
4
|
|
|
5
5
|
/*
|
|
6
6
|
* Copyright Elasticsearch B.V. and/or licensed to Elasticsearch B.V. under one
|
|
@@ -11,22 +11,22 @@ var _excluded = ["size", "mono", "className", "aria-label"];
|
|
|
11
11
|
*/
|
|
12
12
|
import React from 'react';
|
|
13
13
|
import classNames from 'classnames';
|
|
14
|
-
import {
|
|
14
|
+
import { withEuiSystem } from '../provider/system';
|
|
15
15
|
import { euiLoadingChartStyles, euiLoadingChartBarStyles, _barIndex } from './loading_chart.styles';
|
|
16
16
|
import { useEuiI18n } from '../i18n';
|
|
17
17
|
import { jsx as ___EmotionJSX } from "@emotion/react";
|
|
18
18
|
export var SIZES = ['m', 'l', 'xl'];
|
|
19
|
-
export var
|
|
19
|
+
export var _EuiLoadingChart = function _EuiLoadingChart(_ref) {
|
|
20
20
|
var _ref$size = _ref.size,
|
|
21
21
|
size = _ref$size === void 0 ? 'm' : _ref$size,
|
|
22
22
|
_ref$mono = _ref.mono,
|
|
23
23
|
mono = _ref$mono === void 0 ? false : _ref$mono,
|
|
24
24
|
className = _ref.className,
|
|
25
25
|
ariaLabel = _ref['aria-label'],
|
|
26
|
+
euiTheme = _ref.euiTheme,
|
|
26
27
|
rest = _objectWithoutProperties(_ref, _excluded);
|
|
27
28
|
|
|
28
29
|
var defaultAriaLabel = useEuiI18n('euiLoadingChart.ariaLabel', 'Loading');
|
|
29
|
-
var euiTheme = useEuiTheme();
|
|
30
30
|
var styles = euiLoadingChartStyles(euiTheme);
|
|
31
31
|
var barStyles = euiLoadingChartBarStyles(euiTheme);
|
|
32
32
|
var classes = classNames('euiLoadingChart', {
|
|
@@ -53,4 +53,5 @@ export var EuiLoadingChart = function EuiLoadingChart(_ref) {
|
|
|
53
53
|
role: "progressbar",
|
|
54
54
|
"aria-label": ariaLabel || defaultAriaLabel
|
|
55
55
|
}, rest), bars);
|
|
56
|
-
};
|
|
56
|
+
};
|
|
57
|
+
export var EuiLoadingChart = withEuiSystem(_EuiLoadingChart);
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import _extends from "@babel/runtime/helpers/extends";
|
|
2
2
|
import _objectWithoutProperties from "@babel/runtime/helpers/objectWithoutProperties";
|
|
3
|
-
var _excluded = ["lines", "className", "aria-label"];
|
|
3
|
+
var _excluded = ["lines", "className", "aria-label", "euiTheme"];
|
|
4
4
|
|
|
5
5
|
/*
|
|
6
6
|
* Copyright Elasticsearch B.V. and/or licensed to Elasticsearch B.V. under one
|
|
@@ -11,18 +11,18 @@ var _excluded = ["lines", "className", "aria-label"];
|
|
|
11
11
|
*/
|
|
12
12
|
import React from 'react';
|
|
13
13
|
import classNames from 'classnames';
|
|
14
|
-
import {
|
|
14
|
+
import { withEuiSystem } from '../provider/system';
|
|
15
15
|
import { useLoadingAriaLabel } from './_loading_strings';
|
|
16
16
|
import { euiLoadingContentStyles } from './loading_content.styles';
|
|
17
17
|
import { jsx as ___EmotionJSX } from "@emotion/react";
|
|
18
|
-
export var
|
|
18
|
+
export var _EuiLoadingContent = function _EuiLoadingContent(_ref) {
|
|
19
19
|
var _ref$lines = _ref.lines,
|
|
20
20
|
lines = _ref$lines === void 0 ? 3 : _ref$lines,
|
|
21
21
|
className = _ref.className,
|
|
22
22
|
ariaLabel = _ref['aria-label'],
|
|
23
|
+
euiTheme = _ref.euiTheme,
|
|
23
24
|
rest = _objectWithoutProperties(_ref, _excluded);
|
|
24
25
|
|
|
25
|
-
var euiTheme = useEuiTheme();
|
|
26
26
|
var styles = euiLoadingContentStyles(euiTheme);
|
|
27
27
|
var lineCssStyles = [styles.euiLoadingContent__singleLine];
|
|
28
28
|
var defaultLabel = useLoadingAriaLabel();
|
|
@@ -41,4 +41,5 @@ export var EuiLoadingContent = function EuiLoadingContent(_ref) {
|
|
|
41
41
|
role: "progressbar",
|
|
42
42
|
"aria-label": ariaLabel || defaultLabel
|
|
43
43
|
}, rest), lineElements);
|
|
44
|
-
};
|
|
44
|
+
};
|
|
45
|
+
export var EuiLoadingContent = withEuiSystem(_EuiLoadingContent);
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import _extends from "@babel/runtime/helpers/extends";
|
|
2
2
|
import _objectWithoutProperties from "@babel/runtime/helpers/objectWithoutProperties";
|
|
3
|
-
var _excluded = ["size", "logo", "aria-label", "className"];
|
|
3
|
+
var _excluded = ["size", "logo", "aria-label", "className", "euiTheme"];
|
|
4
4
|
|
|
5
5
|
/*
|
|
6
6
|
* Copyright Elasticsearch B.V. and/or licensed to Elasticsearch B.V. under one
|
|
@@ -12,21 +12,21 @@ var _excluded = ["size", "logo", "aria-label", "className"];
|
|
|
12
12
|
import React from 'react';
|
|
13
13
|
import classNames from 'classnames';
|
|
14
14
|
import { EuiIcon } from '../icon';
|
|
15
|
-
import {
|
|
15
|
+
import { withEuiSystem } from '../provider/system';
|
|
16
16
|
import { useLoadingAriaLabel } from './_loading_strings';
|
|
17
17
|
import { euiLoadingLogoStyles, euiLoadingLogoIconStyles } from './loading_logo.styles';
|
|
18
18
|
import { jsx as ___EmotionJSX } from "@emotion/react";
|
|
19
19
|
export var SIZES = ['m', 'l', 'xl'];
|
|
20
|
-
export var
|
|
20
|
+
export var _EuiLoadingLogo = function _EuiLoadingLogo(_ref) {
|
|
21
21
|
var _ref$size = _ref.size,
|
|
22
22
|
size = _ref$size === void 0 ? 'm' : _ref$size,
|
|
23
23
|
_ref$logo = _ref.logo,
|
|
24
24
|
logo = _ref$logo === void 0 ? 'logoKibana' : _ref$logo,
|
|
25
25
|
ariaLabel = _ref['aria-label'],
|
|
26
26
|
className = _ref.className,
|
|
27
|
+
euiTheme = _ref.euiTheme,
|
|
27
28
|
rest = _objectWithoutProperties(_ref, _excluded);
|
|
28
29
|
|
|
29
|
-
var euiTheme = useEuiTheme();
|
|
30
30
|
var defaultLabel = useLoadingAriaLabel();
|
|
31
31
|
var styles = euiLoadingLogoStyles(euiTheme);
|
|
32
32
|
var cssStyles = [styles.euiLoadingLogo, styles[size]];
|
|
@@ -44,4 +44,5 @@ export var EuiLoadingLogo = function EuiLoadingLogo(_ref) {
|
|
|
44
44
|
type: logo,
|
|
45
45
|
size: size
|
|
46
46
|
})));
|
|
47
|
-
};
|
|
47
|
+
};
|
|
48
|
+
export var EuiLoadingLogo = withEuiSystem(_EuiLoadingLogo);
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import _extends from "@babel/runtime/helpers/extends";
|
|
2
2
|
import _objectWithoutProperties from "@babel/runtime/helpers/objectWithoutProperties";
|
|
3
|
-
var _excluded = ["size", "className", "aria-label"];
|
|
3
|
+
var _excluded = ["size", "className", "aria-label", "color", "euiTheme"];
|
|
4
4
|
|
|
5
5
|
/*
|
|
6
6
|
* Copyright Elasticsearch B.V. and/or licensed to Elasticsearch B.V. under one
|
|
@@ -11,20 +11,21 @@ var _excluded = ["size", "className", "aria-label"];
|
|
|
11
11
|
*/
|
|
12
12
|
import React from 'react';
|
|
13
13
|
import classNames from 'classnames';
|
|
14
|
-
import {
|
|
14
|
+
import { withEuiSystem } from '../provider/system';
|
|
15
15
|
import { useLoadingAriaLabel } from './_loading_strings';
|
|
16
16
|
import { euiLoadingSpinnerStyles } from './loading_spinner.styles';
|
|
17
17
|
import { jsx as ___EmotionJSX } from "@emotion/react";
|
|
18
18
|
export var SIZES = ['s', 'm', 'l', 'xl', 'xxl'];
|
|
19
|
-
export var
|
|
19
|
+
export var _EuiLoadingSpinner = function _EuiLoadingSpinner(_ref) {
|
|
20
20
|
var _ref$size = _ref.size,
|
|
21
21
|
size = _ref$size === void 0 ? 'm' : _ref$size,
|
|
22
22
|
className = _ref.className,
|
|
23
23
|
ariaLabel = _ref['aria-label'],
|
|
24
|
+
color = _ref.color,
|
|
25
|
+
euiTheme = _ref.euiTheme,
|
|
24
26
|
rest = _objectWithoutProperties(_ref, _excluded);
|
|
25
27
|
|
|
26
|
-
var
|
|
27
|
-
var styles = euiLoadingSpinnerStyles(euiTheme);
|
|
28
|
+
var styles = euiLoadingSpinnerStyles(euiTheme, color);
|
|
28
29
|
var cssStyles = [styles.euiLoadingSpinner, styles[size]];
|
|
29
30
|
var classes = classNames('euiLoadingSpinner', className);
|
|
30
31
|
var defaultLabel = useLoadingAriaLabel();
|
|
@@ -34,4 +35,5 @@ export var EuiLoadingSpinner = function EuiLoadingSpinner(_ref) {
|
|
|
34
35
|
role: "progressbar",
|
|
35
36
|
"aria-label": ariaLabel || defaultLabel
|
|
36
37
|
}, rest));
|
|
37
|
-
};
|
|
38
|
+
};
|
|
39
|
+
export var EuiLoadingSpinner = withEuiSystem(_EuiLoadingSpinner);
|
|
@@ -22,14 +22,14 @@ var spinnerSizes = {
|
|
|
22
22
|
xxl: 'xxl'
|
|
23
23
|
};
|
|
24
24
|
|
|
25
|
-
var
|
|
26
|
-
return "".concat(highlight, " ").concat(
|
|
25
|
+
var spinnerColorsCSS = function spinnerColorsCSS(border, highlight) {
|
|
26
|
+
return "\n border-color: ".concat(highlight, " ").concat(border, " ").concat(border, " ").concat(border, ";\n ");
|
|
27
27
|
};
|
|
28
28
|
|
|
29
|
-
export var euiLoadingSpinnerStyles = function euiLoadingSpinnerStyles(_ref) {
|
|
29
|
+
export var euiLoadingSpinnerStyles = function euiLoadingSpinnerStyles(_ref, color) {
|
|
30
30
|
var euiTheme = _ref.euiTheme;
|
|
31
31
|
return {
|
|
32
|
-
euiLoadingSpinner: /*#__PURE__*/css("flex-shrink:0;display:inline-block;border-radius:50%;border:", euiTheme.border.thick, ";
|
|
32
|
+
euiLoadingSpinner: /*#__PURE__*/css("flex-shrink:0;display:inline-block;border-radius:50%;border:", euiTheme.border.thick, ";", spinnerColorsCSS((color === null || color === void 0 ? void 0 : color.border) || euiTheme.colors.lightShade, (color === null || color === void 0 ? void 0 : color.highlight) || euiTheme.colors.primary), ";", euiCanAnimate, "{animation:", _loadingSpinner, " 0.6s infinite linear;};label:euiLoadingSpinner;"),
|
|
33
33
|
// Sizes
|
|
34
34
|
s: /*#__PURE__*/css("width:", euiTheme.size[spinnerSizes.s], ";height:", euiTheme.size[spinnerSizes.s], ";border-width:calc(", euiTheme.border.width.thin, " * 1.5);;label:s;"),
|
|
35
35
|
m: /*#__PURE__*/css("width:", euiTheme.size[spinnerSizes.m], ";height:", euiTheme.size[spinnerSizes.m], ";border-width:calc(", euiTheme.border.width.thin, " * 1.5);;label:m;"),
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import _extends from "@babel/runtime/helpers/extends";
|
|
2
2
|
import _objectWithoutProperties from "@babel/runtime/helpers/objectWithoutProperties";
|
|
3
|
-
var _excluded = ["children", "className", "hasScreenReaderHelpText"];
|
|
3
|
+
var _excluded = ["children", "className", "euiTheme", "hasScreenReaderHelpText"];
|
|
4
4
|
|
|
5
5
|
/*
|
|
6
6
|
* Copyright Elasticsearch B.V. and/or licensed to Elasticsearch B.V. under one
|
|
@@ -12,27 +12,28 @@ var _excluded = ["children", "className", "hasScreenReaderHelpText"];
|
|
|
12
12
|
import React from 'react';
|
|
13
13
|
import classNames from 'classnames';
|
|
14
14
|
import { useEuiI18n } from '../i18n';
|
|
15
|
-
import {
|
|
15
|
+
import { withEuiSystem } from '../provider/system';
|
|
16
16
|
import { euiMarkStyles } from './mark.styles';
|
|
17
17
|
import { jsx as ___EmotionJSX } from "@emotion/react";
|
|
18
|
-
export var
|
|
18
|
+
export var _EuiMark = function _EuiMark(_ref) {
|
|
19
19
|
var children = _ref.children,
|
|
20
20
|
className = _ref.className,
|
|
21
|
+
euiTheme = _ref.euiTheme,
|
|
21
22
|
_ref$hasScreenReaderH = _ref.hasScreenReaderHelpText,
|
|
22
23
|
hasScreenReaderHelpText = _ref$hasScreenReaderH === void 0 ? true : _ref$hasScreenReaderH,
|
|
23
24
|
rest = _objectWithoutProperties(_ref, _excluded);
|
|
24
25
|
|
|
25
|
-
var useTheme = useEuiTheme();
|
|
26
26
|
var highlightStart = useEuiI18n('euiMark.highlightStart', 'highlight start');
|
|
27
27
|
var highlightEnd = useEuiI18n('euiMark.highlightEnd', 'highlight end');
|
|
28
|
-
var styles = euiMarkStyles(
|
|
28
|
+
var styles = euiMarkStyles(euiTheme, {
|
|
29
29
|
hasScreenReaderHelpText: hasScreenReaderHelpText,
|
|
30
30
|
highlightStart: highlightStart,
|
|
31
31
|
highlightEnd: highlightEnd
|
|
32
32
|
});
|
|
33
33
|
var classes = classNames('euiMark', className);
|
|
34
34
|
return ___EmotionJSX("mark", _extends({
|
|
35
|
-
css: [styles
|
|
35
|
+
css: [styles],
|
|
36
36
|
className: classes
|
|
37
37
|
}, rest), children);
|
|
38
|
-
};
|
|
38
|
+
};
|
|
39
|
+
export var EuiMark = withEuiSystem(_EuiMark);
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import _extends from "@babel/runtime/helpers/extends";
|
|
2
2
|
import _objectWithoutProperties from "@babel/runtime/helpers/objectWithoutProperties";
|
|
3
|
-
var _excluded = ["children", "className", "parsingPluginList", "processingPluginList", "textSize"];
|
|
3
|
+
var _excluded = ["children", "className", "parsingPluginList", "processingPluginList", "textSize", "euiTheme"];
|
|
4
4
|
|
|
5
5
|
/*
|
|
6
6
|
* Copyright Elasticsearch B.V. and/or licensed to Elasticsearch B.V. under one
|
|
@@ -13,11 +13,11 @@ import React, { useMemo } from 'react';
|
|
|
13
13
|
import unified from 'unified';
|
|
14
14
|
import classNames from 'classnames';
|
|
15
15
|
import { EuiText } from '../text/text';
|
|
16
|
-
import {
|
|
16
|
+
import { withEuiSystem } from '../provider/system';
|
|
17
17
|
import { euiMarkdownFormatStyles } from './markdown_format.styles';
|
|
18
18
|
import { defaultProcessingPlugins, defaultParsingPlugins } from './plugins/markdown_default_plugins';
|
|
19
19
|
import { jsx as ___EmotionJSX } from "@emotion/react";
|
|
20
|
-
export var
|
|
20
|
+
export var _EuiMarkdownFormat = function _EuiMarkdownFormat(_ref) {
|
|
21
21
|
var children = _ref.children,
|
|
22
22
|
className = _ref.className,
|
|
23
23
|
_ref$parsingPluginLis = _ref.parsingPluginList,
|
|
@@ -26,6 +26,7 @@ export var EuiMarkdownFormat = function EuiMarkdownFormat(_ref) {
|
|
|
26
26
|
processingPluginList = _ref$processingPlugin === void 0 ? defaultProcessingPlugins : _ref$processingPlugin,
|
|
27
27
|
_ref$textSize = _ref.textSize,
|
|
28
28
|
textSize = _ref$textSize === void 0 ? 'm' : _ref$textSize,
|
|
29
|
+
euiTheme = _ref.euiTheme,
|
|
29
30
|
rest = _objectWithoutProperties(_ref, _excluded);
|
|
30
31
|
|
|
31
32
|
var processor = useMemo(function () {
|
|
@@ -43,7 +44,6 @@ export var EuiMarkdownFormat = function EuiMarkdownFormat(_ref) {
|
|
|
43
44
|
return children;
|
|
44
45
|
}
|
|
45
46
|
}, [children, processor]);
|
|
46
|
-
var euiTheme = useEuiTheme();
|
|
47
47
|
var styles = euiMarkdownFormatStyles(euiTheme);
|
|
48
48
|
var cssStyles = [styles.euiMarkdownFormat, styles[textSize]];
|
|
49
49
|
var classes = classNames('euiMarkdownFormat', className);
|
|
@@ -52,4 +52,5 @@ export var EuiMarkdownFormat = function EuiMarkdownFormat(_ref) {
|
|
|
52
52
|
css: cssStyles,
|
|
53
53
|
className: classes
|
|
54
54
|
}, rest), result);
|
|
55
|
-
};
|
|
55
|
+
};
|
|
56
|
+
export var EuiMarkdownFormat = withEuiSystem(_EuiMarkdownFormat);
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import _extends from "@babel/runtime/helpers/extends";
|
|
2
2
|
import _defineProperty from "@babel/runtime/helpers/defineProperty";
|
|
3
3
|
import _objectWithoutProperties from "@babel/runtime/helpers/objectWithoutProperties";
|
|
4
|
-
var _excluded = ["children", "className", "paddingSize", "borderRadius", "color", "hasShadow", "hasBorder", "grow", "panelRef", "element"];
|
|
4
|
+
var _excluded = ["children", "className", "paddingSize", "borderRadius", "color", "hasShadow", "hasBorder", "grow", "panelRef", "element", "euiTheme"];
|
|
5
5
|
|
|
6
6
|
/*
|
|
7
7
|
* Copyright Elasticsearch B.V. and/or licensed to Elasticsearch B.V. under one
|
|
@@ -12,7 +12,7 @@ var _excluded = ["children", "className", "paddingSize", "borderRadius", "color"
|
|
|
12
12
|
*/
|
|
13
13
|
import React from 'react';
|
|
14
14
|
import classNames from 'classnames';
|
|
15
|
-
import {
|
|
15
|
+
import { withEuiSystem } from '../provider/system';
|
|
16
16
|
import { useEuiBackgroundColorCSS, useEuiPaddingCSS, BACKGROUND_COLORS, PADDING_SIZES } from '../../global_styling';
|
|
17
17
|
import { keysOf } from '../common';
|
|
18
18
|
import { euiPanelStyles } from './panel.style';
|
|
@@ -31,7 +31,7 @@ var _SIZES = keysOf(paddingSizeToClassNameMap);
|
|
|
31
31
|
|
|
32
32
|
export var BORDER_RADII = ['none', 'm'];
|
|
33
33
|
export var COLORS = BACKGROUND_COLORS;
|
|
34
|
-
export var
|
|
34
|
+
export var _EuiPanel = function _EuiPanel(_ref) {
|
|
35
35
|
var children = _ref.children,
|
|
36
36
|
className = _ref.className,
|
|
37
37
|
_ref$paddingSize = _ref.paddingSize,
|
|
@@ -48,10 +48,10 @@ export var EuiPanel = function EuiPanel(_ref) {
|
|
|
48
48
|
grow = _ref$grow === void 0 ? true : _ref$grow,
|
|
49
49
|
panelRef = _ref.panelRef,
|
|
50
50
|
element = _ref.element,
|
|
51
|
+
euiTheme = _ref.euiTheme,
|
|
51
52
|
rest = _objectWithoutProperties(_ref, _excluded);
|
|
52
53
|
|
|
53
|
-
|
|
54
|
-
|
|
54
|
+
// Shadows are only allowed when there's a white background (plain)
|
|
55
55
|
var canHaveShadow = !hasBorder && color === 'plain';
|
|
56
56
|
var canHaveBorder = color === 'plain' || color === 'transparent';
|
|
57
57
|
var styles = euiPanelStyles(euiTheme);
|
|
@@ -70,4 +70,5 @@ export var EuiPanel = function EuiPanel(_ref) {
|
|
|
70
70
|
className: classes,
|
|
71
71
|
css: cssStyles
|
|
72
72
|
}, rest), children);
|
|
73
|
-
};
|
|
73
|
+
};
|
|
74
|
+
export var EuiPanel = withEuiSystem(_EuiPanel);
|
|
@@ -0,0 +1,12 @@
|
|
|
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
|
+
};
|
|
@@ -0,0 +1,17 @@
|
|
|
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
|
+
};
|
|
@@ -0,0 +1,9 @@
|
|
|
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 './cache_context';
|
|
9
|
+
export * from './cache_provider';
|
|
@@ -7,22 +7,56 @@
|
|
|
7
7
|
*/
|
|
8
8
|
import React from 'react';
|
|
9
9
|
import { EuiGlobalStyles } from '../../global_styling/reset/global_styles';
|
|
10
|
+
import { EuiUtilityClasses } from '../../global_styling/utility/utility';
|
|
10
11
|
import { EuiThemeProvider } from '../../services';
|
|
11
12
|
import { EuiThemeAmsterdam } from '../../themes';
|
|
13
|
+
import { EuiCacheContext, EuiCacheProvider } from './cache';
|
|
12
14
|
import { jsx as ___EmotionJSX } from "@emotion/react";
|
|
15
|
+
|
|
16
|
+
var isEmotionCacheObject = function isEmotionCacheObject(obj) {
|
|
17
|
+
return obj.hasOwnProperty('key');
|
|
18
|
+
};
|
|
19
|
+
|
|
13
20
|
export var EuiProvider = function EuiProvider(_ref) {
|
|
14
21
|
var cache = _ref.cache,
|
|
15
22
|
_ref$theme = _ref.theme,
|
|
16
23
|
theme = _ref$theme === void 0 ? EuiThemeAmsterdam : _ref$theme,
|
|
17
24
|
_ref$globalStyles = _ref.globalStyles,
|
|
18
|
-
|
|
25
|
+
Globals = _ref$globalStyles === void 0 ? EuiGlobalStyles : _ref$globalStyles,
|
|
26
|
+
_ref$utilityClasses = _ref.utilityClasses,
|
|
27
|
+
Utilities = _ref$utilityClasses === void 0 ? EuiUtilityClasses : _ref$utilityClasses,
|
|
19
28
|
colorMode = _ref.colorMode,
|
|
20
29
|
modify = _ref.modify,
|
|
21
30
|
children = _ref.children;
|
|
22
|
-
|
|
31
|
+
var defaultCache;
|
|
32
|
+
var euiCache;
|
|
33
|
+
var globalCache;
|
|
34
|
+
var utilityCache;
|
|
35
|
+
|
|
36
|
+
if (cache) {
|
|
37
|
+
if (isEmotionCacheObject(cache)) {
|
|
38
|
+
defaultCache = cache;
|
|
39
|
+
} else {
|
|
40
|
+
defaultCache = cache.default;
|
|
41
|
+
euiCache = cache.eui;
|
|
42
|
+
globalCache = cache.global;
|
|
43
|
+
utilityCache = cache.utility;
|
|
44
|
+
}
|
|
45
|
+
}
|
|
46
|
+
|
|
47
|
+
return ___EmotionJSX(EuiCacheProvider, {
|
|
48
|
+
cache: defaultCache
|
|
49
|
+
}, ___EmotionJSX(EuiCacheContext.Provider, {
|
|
50
|
+
value: euiCache
|
|
51
|
+
}, ___EmotionJSX(EuiThemeProvider, {
|
|
23
52
|
theme: theme !== null && theme !== void 0 ? theme : undefined,
|
|
24
53
|
colorMode: colorMode,
|
|
25
|
-
modify: modify
|
|
26
|
-
|
|
27
|
-
|
|
54
|
+
modify: modify
|
|
55
|
+
}, theme && ___EmotionJSX(React.Fragment, null, ___EmotionJSX(EuiCacheProvider, {
|
|
56
|
+
cache: globalCache || euiCache,
|
|
57
|
+
children: Globals && ___EmotionJSX(Globals, null)
|
|
58
|
+
}), ___EmotionJSX(EuiCacheProvider, {
|
|
59
|
+
cache: utilityCache,
|
|
60
|
+
children: Utilities && ___EmotionJSX(Utilities, null)
|
|
61
|
+
})), children)));
|
|
28
62
|
};
|
|
@@ -0,0 +1,8 @@
|
|
|
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';
|
|
@@ -0,0 +1,33 @@
|
|
|
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,7 +1,7 @@
|
|
|
1
1
|
import _extends from "@babel/runtime/helpers/extends";
|
|
2
2
|
import _defineProperty from "@babel/runtime/helpers/defineProperty";
|
|
3
3
|
import _objectWithoutProperties from "@babel/runtime/helpers/objectWithoutProperties";
|
|
4
|
-
var _excluded = ["className", "size"];
|
|
4
|
+
var _excluded = ["className", "euiTheme", "size"];
|
|
5
5
|
|
|
6
6
|
/*
|
|
7
7
|
* Copyright Elasticsearch B.V. and/or licensed to Elasticsearch B.V. under one
|
|
@@ -12,17 +12,17 @@ var _excluded = ["className", "size"];
|
|
|
12
12
|
*/
|
|
13
13
|
import React from 'react';
|
|
14
14
|
import classNames from 'classnames';
|
|
15
|
-
import {
|
|
15
|
+
import { withEuiSystem } from '../provider/system';
|
|
16
16
|
import { euiSpacerStyles } from './spacer.styles';
|
|
17
17
|
import { jsx as ___EmotionJSX } from "@emotion/react";
|
|
18
18
|
export var SIZES = ['xs', 's', 'm', 'l', 'xl', 'xxl'];
|
|
19
|
-
export var
|
|
19
|
+
export var _EuiSpacer = function _EuiSpacer(_ref) {
|
|
20
20
|
var className = _ref.className,
|
|
21
|
+
euiTheme = _ref.euiTheme,
|
|
21
22
|
_ref$size = _ref.size,
|
|
22
23
|
size = _ref$size === void 0 ? 'l' : _ref$size,
|
|
23
24
|
rest = _objectWithoutProperties(_ref, _excluded);
|
|
24
25
|
|
|
25
|
-
var euiTheme = useEuiTheme();
|
|
26
26
|
var styles = euiSpacerStyles(euiTheme);
|
|
27
27
|
var classes = classNames('euiSpacer', _defineProperty({}, "euiSpacer--".concat(size), size), className);
|
|
28
28
|
var cssStyles = [styles.euiSpacer, styles[size]];
|
|
@@ -30,4 +30,5 @@ export var EuiSpacer = function EuiSpacer(_ref) {
|
|
|
30
30
|
className: classes,
|
|
31
31
|
css: cssStyles
|
|
32
32
|
}, rest));
|
|
33
|
-
};
|
|
33
|
+
};
|
|
34
|
+
export var EuiSpacer = withEuiSystem(_EuiSpacer);
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import _extends from "@babel/runtime/helpers/extends";
|
|
2
2
|
import _objectWithoutProperties from "@babel/runtime/helpers/objectWithoutProperties";
|
|
3
|
-
var _excluded = ["size", "color", "grow", "textAlign", "children", "className"];
|
|
3
|
+
var _excluded = ["size", "color", "grow", "textAlign", "children", "className", "euiTheme"];
|
|
4
4
|
|
|
5
5
|
/*
|
|
6
6
|
* Copyright Elasticsearch B.V. and/or licensed to Elasticsearch B.V. under one
|
|
@@ -11,13 +11,13 @@ var _excluded = ["size", "color", "grow", "textAlign", "children", "className"];
|
|
|
11
11
|
*/
|
|
12
12
|
import React from 'react';
|
|
13
13
|
import classNames from 'classnames';
|
|
14
|
-
import {
|
|
14
|
+
import { withEuiSystem } from '../provider/system';
|
|
15
15
|
import { euiTextStyles } from './text.styles';
|
|
16
16
|
import { EuiTextColor } from './text_color';
|
|
17
17
|
import { EuiTextAlign } from './text_align';
|
|
18
18
|
import { jsx as ___EmotionJSX } from "@emotion/react";
|
|
19
19
|
export var TEXT_SIZES = ['xs', 's', 'm', 'relative'];
|
|
20
|
-
export var
|
|
20
|
+
export var _EuiText = function _EuiText(_ref) {
|
|
21
21
|
var _ref$size = _ref.size,
|
|
22
22
|
size = _ref$size === void 0 ? 'm' : _ref$size,
|
|
23
23
|
color = _ref.color,
|
|
@@ -26,9 +26,9 @@ export var EuiText = function EuiText(_ref) {
|
|
|
26
26
|
textAlign = _ref.textAlign,
|
|
27
27
|
children = _ref.children,
|
|
28
28
|
className = _ref.className,
|
|
29
|
+
euiTheme = _ref.euiTheme,
|
|
29
30
|
rest = _objectWithoutProperties(_ref, _excluded);
|
|
30
31
|
|
|
31
|
-
var euiTheme = useEuiTheme();
|
|
32
32
|
var styles = euiTextStyles(euiTheme);
|
|
33
33
|
var cssStyles = [styles.euiText, !grow ? styles.constrainedWidth : undefined, styles[size]];
|
|
34
34
|
var classes = classNames('euiText', className);
|
|
@@ -53,4 +53,5 @@ export var EuiText = function EuiText(_ref) {
|
|
|
53
53
|
}
|
|
54
54
|
|
|
55
55
|
return text;
|
|
56
|
-
};
|
|
56
|
+
};
|
|
57
|
+
export var EuiText = withEuiSystem(_EuiText);
|