@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
|
@@ -0,0 +1,33 @@
|
|
|
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,4 +1,4 @@
|
|
|
1
|
-
var _excluded = ["className", "size"];
|
|
1
|
+
var _excluded = ["className", "euiTheme", "size"];
|
|
2
2
|
|
|
3
3
|
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); }
|
|
4
4
|
|
|
@@ -18,17 +18,17 @@ function _objectWithoutPropertiesLoose(source, excluded) { if (source == null) r
|
|
|
18
18
|
import React from 'react';
|
|
19
19
|
import PropTypes from "prop-types";
|
|
20
20
|
import classNames from 'classnames';
|
|
21
|
-
import {
|
|
21
|
+
import { withEuiSystem } from '../provider/system';
|
|
22
22
|
import { euiSpacerStyles } from './spacer.styles';
|
|
23
23
|
import { jsx as ___EmotionJSX } from "@emotion/react";
|
|
24
24
|
export var SIZES = ['xs', 's', 'm', 'l', 'xl', 'xxl'];
|
|
25
|
-
export var
|
|
25
|
+
export var _EuiSpacer = function _EuiSpacer(_ref) {
|
|
26
26
|
var className = _ref.className,
|
|
27
|
+
euiTheme = _ref.euiTheme,
|
|
27
28
|
_ref$size = _ref.size,
|
|
28
29
|
size = _ref$size === void 0 ? 'l' : _ref$size,
|
|
29
30
|
rest = _objectWithoutProperties(_ref, _excluded);
|
|
30
31
|
|
|
31
|
-
var euiTheme = useEuiTheme();
|
|
32
32
|
var styles = euiSpacerStyles(euiTheme);
|
|
33
33
|
var classes = classNames('euiSpacer', _defineProperty({}, "euiSpacer--".concat(size), size), className);
|
|
34
34
|
var cssStyles = [styles.euiSpacer, styles[size]];
|
|
@@ -37,9 +37,10 @@ export var EuiSpacer = function EuiSpacer(_ref) {
|
|
|
37
37
|
css: cssStyles
|
|
38
38
|
}, rest));
|
|
39
39
|
};
|
|
40
|
-
|
|
40
|
+
_EuiSpacer.propTypes = {
|
|
41
41
|
className: PropTypes.string,
|
|
42
42
|
"aria-label": PropTypes.string,
|
|
43
43
|
"data-test-subj": PropTypes.string,
|
|
44
44
|
size: PropTypes.any
|
|
45
|
-
};
|
|
45
|
+
};
|
|
46
|
+
export var EuiSpacer = withEuiSystem(_EuiSpacer);
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
var _excluded = ["size", "color", "grow", "textAlign", "children", "className"];
|
|
1
|
+
var _excluded = ["size", "color", "grow", "textAlign", "children", "className", "euiTheme"];
|
|
2
2
|
|
|
3
3
|
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); }
|
|
4
4
|
|
|
@@ -16,13 +16,13 @@ function _objectWithoutPropertiesLoose(source, excluded) { if (source == null) r
|
|
|
16
16
|
import React from 'react';
|
|
17
17
|
import PropTypes from "prop-types";
|
|
18
18
|
import classNames from 'classnames';
|
|
19
|
-
import {
|
|
19
|
+
import { withEuiSystem } from '../provider/system';
|
|
20
20
|
import { euiTextStyles } from './text.styles';
|
|
21
21
|
import { EuiTextColor } from './text_color';
|
|
22
22
|
import { EuiTextAlign } from './text_align';
|
|
23
23
|
import { jsx as ___EmotionJSX } from "@emotion/react";
|
|
24
24
|
export var TEXT_SIZES = ['xs', 's', 'm', 'relative'];
|
|
25
|
-
export var
|
|
25
|
+
export var _EuiText = function _EuiText(_ref) {
|
|
26
26
|
var _ref$size = _ref.size,
|
|
27
27
|
size = _ref$size === void 0 ? 'm' : _ref$size,
|
|
28
28
|
color = _ref.color,
|
|
@@ -31,9 +31,9 @@ export var EuiText = function EuiText(_ref) {
|
|
|
31
31
|
textAlign = _ref.textAlign,
|
|
32
32
|
children = _ref.children,
|
|
33
33
|
className = _ref.className,
|
|
34
|
+
euiTheme = _ref.euiTheme,
|
|
34
35
|
rest = _objectWithoutProperties(_ref, _excluded);
|
|
35
36
|
|
|
36
|
-
var euiTheme = useEuiTheme();
|
|
37
37
|
var styles = euiTextStyles(euiTheme);
|
|
38
38
|
var cssStyles = [styles.euiText, !grow ? styles.constrainedWidth : undefined, styles[size]];
|
|
39
39
|
var classes = classNames('euiText', className);
|
|
@@ -59,7 +59,7 @@ export var EuiText = function EuiText(_ref) {
|
|
|
59
59
|
|
|
60
60
|
return text;
|
|
61
61
|
};
|
|
62
|
-
|
|
62
|
+
_EuiText.propTypes = {
|
|
63
63
|
className: PropTypes.string,
|
|
64
64
|
"aria-label": PropTypes.string,
|
|
65
65
|
"data-test-subj": PropTypes.string,
|
|
@@ -75,4 +75,5 @@ EuiText.propTypes = {
|
|
|
75
75
|
*/
|
|
76
76
|
color: PropTypes.oneOfType([PropTypes.any.isRequired, PropTypes.any.isRequired]),
|
|
77
77
|
grow: PropTypes.bool
|
|
78
|
-
};
|
|
78
|
+
};
|
|
79
|
+
export var EuiText = withEuiSystem(_EuiText);
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
var _excluded = ["children", "color", "component", "cloneElement", "style"];
|
|
1
|
+
var _excluded = ["children", "color", "component", "cloneElement", "style", "euiTheme"];
|
|
2
2
|
|
|
3
3
|
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; }
|
|
4
4
|
|
|
@@ -20,11 +20,11 @@ function _objectWithoutPropertiesLoose(source, excluded) { if (source == null) r
|
|
|
20
20
|
import React, { isValidElement } from 'react';
|
|
21
21
|
import PropTypes from "prop-types";
|
|
22
22
|
import { cloneElementWithCss } from '../../services/theme/clone_element';
|
|
23
|
-
import {
|
|
23
|
+
import { withEuiSystem } from '../provider/system';
|
|
24
24
|
import { euiTextColorStyles } from './text_color.styles';
|
|
25
25
|
import { jsx as ___EmotionJSX } from "@emotion/react";
|
|
26
26
|
export var COLORS = ['default', 'subdued', 'success', 'accent', 'danger', 'warning', 'ghost', 'inherit'];
|
|
27
|
-
export var
|
|
27
|
+
export var _EuiTextColor = function _EuiTextColor(_ref) {
|
|
28
28
|
var children = _ref.children,
|
|
29
29
|
_ref$color = _ref.color,
|
|
30
30
|
color = _ref$color === void 0 ? 'default' : _ref$color,
|
|
@@ -33,10 +33,10 @@ export var EuiTextColor = function EuiTextColor(_ref) {
|
|
|
33
33
|
_ref$cloneElement = _ref.cloneElement,
|
|
34
34
|
cloneElement = _ref$cloneElement === void 0 ? false : _ref$cloneElement,
|
|
35
35
|
style = _ref.style,
|
|
36
|
+
euiTheme = _ref.euiTheme,
|
|
36
37
|
rest = _objectWithoutProperties(_ref, _excluded);
|
|
37
38
|
|
|
38
39
|
var isNamedColor = COLORS.includes(color);
|
|
39
|
-
var euiTheme = useEuiTheme();
|
|
40
40
|
var styles = euiTextColorStyles(euiTheme);
|
|
41
41
|
var cssStyles = [styles.euiTextColor, isNamedColor ? styles[color] : styles.customColor]; // We're checking if is a custom color.
|
|
42
42
|
// If it is a custom color we set the `color` of the `.euiTextColor` div to that custom color.
|
|
@@ -62,7 +62,7 @@ export var EuiTextColor = function EuiTextColor(_ref) {
|
|
|
62
62
|
return ___EmotionJSX(Component, props, children);
|
|
63
63
|
}
|
|
64
64
|
};
|
|
65
|
-
|
|
65
|
+
_EuiTextColor.propTypes = {
|
|
66
66
|
className: PropTypes.string,
|
|
67
67
|
"aria-label": PropTypes.string,
|
|
68
68
|
"data-test-subj": PropTypes.string,
|
|
@@ -82,4 +82,5 @@ EuiTextColor.propTypes = {
|
|
|
82
82
|
* Can only be used when wrapping a *single* child element/tag, and not raw text.
|
|
83
83
|
*/
|
|
84
84
|
cloneElement: PropTypes.bool
|
|
85
|
-
};
|
|
85
|
+
};
|
|
86
|
+
export var EuiTextColor = withEuiSystem(_EuiTextColor);
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
var _excluded = ["children", "verticalAlign", "icon", "iconAriaLabel", "className", "component"];
|
|
1
|
+
var _excluded = ["children", "verticalAlign", "icon", "iconAriaLabel", "className", "component", "euiTheme"];
|
|
2
2
|
|
|
3
3
|
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); }
|
|
4
4
|
|
|
@@ -15,13 +15,13 @@ function _objectWithoutPropertiesLoose(source, excluded) { if (source == null) r
|
|
|
15
15
|
*/
|
|
16
16
|
import React from 'react';
|
|
17
17
|
import PropTypes from "prop-types";
|
|
18
|
-
import {
|
|
18
|
+
import { withEuiSystem } from '../provider/system';
|
|
19
19
|
import { EuiTimelineItemEvent } from './timeline_item_event';
|
|
20
20
|
import { EuiTimelineItemIcon } from './timeline_item_icon';
|
|
21
21
|
import { euiTimelineItemStyles } from './timeline_item.styles';
|
|
22
22
|
import { jsx as ___EmotionJSX } from "@emotion/react";
|
|
23
23
|
export var VERTICAL_ALIGN = ['top', 'center'];
|
|
24
|
-
export var
|
|
24
|
+
export var _EuiTimelineItem = function _EuiTimelineItem(_ref) {
|
|
25
25
|
var children = _ref.children,
|
|
26
26
|
_ref$verticalAlign = _ref.verticalAlign,
|
|
27
27
|
verticalAlign = _ref$verticalAlign === void 0 ? 'center' : _ref$verticalAlign,
|
|
@@ -30,9 +30,9 @@ export var EuiTimelineItem = function EuiTimelineItem(_ref) {
|
|
|
30
30
|
className = _ref.className,
|
|
31
31
|
_ref$component = _ref.component,
|
|
32
32
|
component = _ref$component === void 0 ? 'li' : _ref$component,
|
|
33
|
+
euiTheme = _ref.euiTheme,
|
|
33
34
|
rest = _objectWithoutProperties(_ref, _excluded);
|
|
34
35
|
|
|
35
|
-
var euiTheme = useEuiTheme();
|
|
36
36
|
var styles = euiTimelineItemStyles(euiTheme);
|
|
37
37
|
var cssStyles = [styles.euiTimelineItem];
|
|
38
38
|
var Element = component;
|
|
@@ -46,7 +46,7 @@ export var EuiTimelineItem = function EuiTimelineItem(_ref) {
|
|
|
46
46
|
verticalAlign: verticalAlign
|
|
47
47
|
}, children));
|
|
48
48
|
};
|
|
49
|
-
|
|
49
|
+
_EuiTimelineItem.propTypes = {
|
|
50
50
|
/**
|
|
51
51
|
* Vertical alignment of the event with the icon
|
|
52
52
|
*/
|
|
@@ -61,4 +61,5 @@ EuiTimelineItem.propTypes = {
|
|
|
61
61
|
className: PropTypes.string,
|
|
62
62
|
"aria-label": PropTypes.string,
|
|
63
63
|
"data-test-subj": PropTypes.string
|
|
64
|
-
};
|
|
64
|
+
};
|
|
65
|
+
export var EuiTimelineItem = withEuiSystem(_EuiTimelineItem);
|
|
@@ -8,15 +8,15 @@
|
|
|
8
8
|
import React from 'react';
|
|
9
9
|
import PropTypes from "prop-types";
|
|
10
10
|
import { EuiAvatar } from '../avatar';
|
|
11
|
-
import {
|
|
11
|
+
import { withEuiSystem } from '../provider/system';
|
|
12
12
|
import { euiTimelineItemIconStyles } from './timeline_item_icon.styles';
|
|
13
13
|
import { jsx as ___EmotionJSX } from "@emotion/react";
|
|
14
|
-
export var
|
|
14
|
+
export var _EuiTimelineItemIcon = function _EuiTimelineItemIcon(_ref) {
|
|
15
15
|
var icon = _ref.icon,
|
|
16
16
|
_ref$verticalAlign = _ref.verticalAlign,
|
|
17
17
|
verticalAlign = _ref$verticalAlign === void 0 ? 'center' : _ref$verticalAlign,
|
|
18
|
-
iconAriaLabel = _ref.iconAriaLabel
|
|
19
|
-
|
|
18
|
+
iconAriaLabel = _ref.iconAriaLabel,
|
|
19
|
+
euiTheme = _ref.euiTheme;
|
|
20
20
|
var styles = euiTimelineItemIconStyles(euiTheme);
|
|
21
21
|
var cssStyles = [styles.euiTimelineItemIcon, styles[verticalAlign]];
|
|
22
22
|
var cssContentStyles = styles.euiTimelineItemIcon__content;
|
|
@@ -32,7 +32,7 @@ export var EuiTimelineItemIcon = function EuiTimelineItemIcon(_ref) {
|
|
|
32
32
|
css: cssContentStyles
|
|
33
33
|
}, iconRender));
|
|
34
34
|
};
|
|
35
|
-
|
|
35
|
+
_EuiTimelineItemIcon.propTypes = {
|
|
36
36
|
/**
|
|
37
37
|
* Any `ReactNode`, but preferably `EuiAvatar`, or a `string` as an `EuiIcon['type']`.
|
|
38
38
|
*/
|
|
@@ -44,4 +44,5 @@ EuiTimelineItemIcon.propTypes = {
|
|
|
44
44
|
* If no `aria-label` is passed we assume the icon is purely decorative.
|
|
45
45
|
*/
|
|
46
46
|
iconAriaLabel: PropTypes.string
|
|
47
|
-
};
|
|
47
|
+
};
|
|
48
|
+
export var EuiTimelineItemIcon = withEuiSystem(_EuiTimelineItemIcon);
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
var _excluded = ["size", "children", "className", "textTransform"];
|
|
1
|
+
var _excluded = ["size", "children", "className", "textTransform", "euiTheme"];
|
|
2
2
|
|
|
3
3
|
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; }
|
|
4
4
|
|
|
@@ -19,20 +19,20 @@ function _objectWithoutPropertiesLoose(source, excluded) { if (source == null) r
|
|
|
19
19
|
*/
|
|
20
20
|
import classNames from 'classnames';
|
|
21
21
|
import PropTypes from "prop-types";
|
|
22
|
-
import { useEuiTheme } from '../../services';
|
|
23
22
|
import { cloneElementWithCss } from '../../services/theme/clone_element';
|
|
24
23
|
import { euiTitleStyles } from './title.styles';
|
|
24
|
+
import { withEuiSystem } from '../provider/system';
|
|
25
25
|
export var TITLE_SIZES = ['xxxs', 'xxs', 'xs', 's', 'm', 'l'];
|
|
26
26
|
export var TEXT_TRANSFORM = ['uppercase'];
|
|
27
|
-
export var
|
|
27
|
+
export var _EuiTitle = function _EuiTitle(_ref) {
|
|
28
28
|
var _ref$size = _ref.size,
|
|
29
29
|
size = _ref$size === void 0 ? 'm' : _ref$size,
|
|
30
30
|
children = _ref.children,
|
|
31
31
|
className = _ref.className,
|
|
32
32
|
textTransform = _ref.textTransform,
|
|
33
|
+
euiTheme = _ref.euiTheme,
|
|
33
34
|
rest = _objectWithoutProperties(_ref, _excluded);
|
|
34
35
|
|
|
35
|
-
var euiTheme = useEuiTheme();
|
|
36
36
|
var styles = euiTitleStyles(euiTheme);
|
|
37
37
|
var cssStyles = [styles.euiTitle, textTransform ? styles[textTransform] : undefined, styles[size]];
|
|
38
38
|
var classes = classNames('euiTitle', className, children.props.className);
|
|
@@ -44,7 +44,7 @@ export var EuiTitle = function EuiTitle(_ref) {
|
|
|
44
44
|
|
|
45
45
|
return cloneElementWithCss(children, props);
|
|
46
46
|
};
|
|
47
|
-
|
|
47
|
+
_EuiTitle.propTypes = {
|
|
48
48
|
className: PropTypes.string,
|
|
49
49
|
"aria-label": PropTypes.string,
|
|
50
50
|
"data-test-subj": PropTypes.string,
|
|
@@ -56,4 +56,5 @@ EuiTitle.propTypes = {
|
|
|
56
56
|
size: PropTypes.any,
|
|
57
57
|
textTransform: PropTypes.any,
|
|
58
58
|
id: PropTypes.string
|
|
59
|
-
};
|
|
59
|
+
};
|
|
60
|
+
export var EuiTitle = withEuiSystem(_EuiTitle);
|
|
@@ -0,0 +1,27 @@
|
|
|
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
|
+
};
|
|
@@ -21,7 +21,7 @@ export var useEuiTheme = function useEuiTheme() {
|
|
|
21
21
|
};
|
|
22
22
|
};
|
|
23
23
|
export var withEuiTheme = function withEuiTheme(Component) {
|
|
24
|
-
var componentName = Component.displayName || Component.name || '
|
|
24
|
+
var componentName = Component.displayName || Component.name || 'ComponentWithTheme';
|
|
25
25
|
|
|
26
26
|
var Render = function Render(props, ref) {
|
|
27
27
|
var _useEuiTheme = useEuiTheme(),
|
|
@@ -40,6 +40,6 @@ export var withEuiTheme = function withEuiTheme(Component) {
|
|
|
40
40
|
};
|
|
41
41
|
|
|
42
42
|
var WithEuiTheme = /*#__PURE__*/forwardRef(Render);
|
|
43
|
-
WithEuiTheme.displayName =
|
|
43
|
+
WithEuiTheme.displayName = componentName;
|
|
44
44
|
return WithEuiTheme;
|
|
45
45
|
};
|
|
@@ -18,7 +18,6 @@ function _arrayWithHoles(arr) { if (Array.isArray(arr)) return arr; }
|
|
|
18
18
|
* Side Public License, v 1.
|
|
19
19
|
*/
|
|
20
20
|
import React, { useContext, useEffect, useRef, useState } from 'react';
|
|
21
|
-
import { CacheProvider } from '@emotion/react';
|
|
22
21
|
import isEqual from 'lodash/isEqual';
|
|
23
22
|
import { EuiSystemContext, EuiThemeContext, EuiModificationsContext, EuiColorModeContext } from './context';
|
|
24
23
|
import { buildTheme, getColorMode, getComputed, mergeDeep } from './utils';
|
|
@@ -27,7 +26,6 @@ export var EuiThemeProvider = function EuiThemeProvider(_ref) {
|
|
|
27
26
|
var _system = _ref.theme,
|
|
28
27
|
_colorMode = _ref.colorMode,
|
|
29
28
|
_modifications = _ref.modify,
|
|
30
|
-
cache = _ref.cache,
|
|
31
29
|
children = _ref.children;
|
|
32
30
|
var parentSystem = useContext(EuiSystemContext);
|
|
33
31
|
var parentModifications = useContext(EuiModificationsContext);
|
|
@@ -101,7 +99,5 @@ export var EuiThemeProvider = function EuiThemeProvider(_ref) {
|
|
|
101
99
|
value: modifications
|
|
102
100
|
}, ___EmotionJSX(EuiThemeContext.Provider, {
|
|
103
101
|
value: theme
|
|
104
|
-
},
|
|
105
|
-
value: cache
|
|
106
|
-
}, children) : children))));
|
|
102
|
+
}, children))));
|
|
107
103
|
};
|