@elastic/eui 59.1.0-rc1 → 60.0.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/dist/eui_theme_dark.css +0 -48
- package/dist/eui_theme_dark.min.css +1 -1
- package/dist/eui_theme_light.css +0 -48
- package/dist/eui_theme_light.min.css +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/combo_box/matching_options.js +3 -2
- 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/cache/index.js +0 -1
- package/es/components/provider/index.js +1 -1
- package/es/components/provider/provider.js +3 -7
- package/es/components/selectable/selectable.js +39 -22
- package/es/components/spacer/spacer.js +6 -7
- package/es/components/stat/stat.js +28 -35
- package/es/components/stat/stat.styles.js +38 -0
- package/es/components/text/text.js +6 -7
- package/es/components/text/text_color.js +6 -7
- package/es/components/timeline/timeline.js +15 -8
- package/es/components/timeline/timeline.styles.js +29 -0
- package/es/components/timeline/timeline_item.js +7 -20
- package/es/components/timeline/timeline_item.styles.js +18 -3
- package/es/components/timeline/timeline_item_icon.js +6 -7
- package/es/components/timeline/timeline_item_icon.styles.js +14 -4
- package/es/components/title/title.js +6 -7
- package/es/global_styling/functions/logicals.js +2 -2
- package/es/global_styling/utility/utility.js +1 -13
- package/es/test/emotion-prefix.js +29 -0
- package/es/test/index.d.ts +5 -0
- package/es/test/index.js +2 -1
- package/es/{components/provider/system → themes/amsterdam}/index.js +2 -1
- package/es/themes/index.js +2 -1
- package/eui.d.ts +507 -941
- package/i18ntokens.json +28 -28
- 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/combo_box/matching_options.js +3 -2
- 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/cache/index.js +0 -13
- package/lib/components/provider/index.js +7 -12
- package/lib/components/provider/provider.js +2 -6
- package/lib/components/selectable/selectable.js +39 -22
- package/lib/components/spacer/spacer.js +8 -10
- package/lib/components/stat/stat.js +30 -40
- package/lib/components/stat/stat.styles.js +45 -0
- package/lib/components/text/text.js +8 -10
- package/lib/components/text/text_color.js +8 -10
- package/lib/components/timeline/timeline.js +20 -9
- package/lib/components/timeline/timeline.styles.js +39 -0
- package/lib/components/timeline/timeline_item.js +9 -24
- package/lib/components/timeline/timeline_item.styles.js +17 -10
- package/lib/components/timeline/timeline_item_icon.js +8 -10
- package/lib/components/timeline/timeline_item_icon.styles.js +15 -4
- package/lib/components/title/title.js +9 -11
- package/lib/global_styling/functions/logicals.js +2 -2
- package/lib/global_styling/utility/utility.js +8 -12
- package/lib/test/emotion-prefix.js +38 -0
- package/lib/test/index.d.ts +5 -0
- package/lib/test/index.js +23 -1
- package/lib/{components/provider/system → 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/combo_box/matching_options.js +3 -2
- 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/cache/index.js +0 -1
- package/optimize/es/components/provider/index.js +1 -1
- package/optimize/es/components/provider/provider.js +3 -7
- package/optimize/es/components/selectable/selectable.js +33 -22
- package/optimize/es/components/spacer/spacer.js +5 -6
- package/optimize/es/components/stat/stat.js +25 -33
- package/optimize/es/components/stat/stat.styles.js +38 -0
- 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.js +10 -1
- package/optimize/es/components/timeline/timeline.styles.js +29 -0
- package/optimize/es/components/timeline/timeline_item.js +6 -12
- package/optimize/es/components/timeline/timeline_item.styles.js +18 -3
- package/optimize/es/components/timeline/timeline_item_icon.js +5 -6
- package/optimize/es/components/timeline/timeline_item_icon.styles.js +14 -4
- package/optimize/es/components/title/title.js +5 -6
- package/optimize/es/global_styling/functions/logicals.js +2 -2
- package/optimize/es/global_styling/utility/utility.js +1 -13
- package/optimize/es/test/emotion-prefix.js +27 -0
- package/optimize/es/test/index.d.ts +5 -0
- package/optimize/es/test/index.js +2 -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/combo_box/matching_options.js +3 -2
- 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/cache/index.js +0 -13
- package/optimize/lib/components/provider/index.js +7 -12
- package/optimize/lib/components/provider/provider.js +2 -6
- package/optimize/lib/components/selectable/selectable.js +33 -22
- package/optimize/lib/components/spacer/spacer.js +5 -7
- package/optimize/lib/components/stat/stat.js +27 -37
- package/optimize/lib/components/stat/stat.styles.js +47 -0
- 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.js +14 -2
- package/optimize/lib/components/timeline/timeline.styles.js +39 -0
- package/optimize/lib/components/timeline/timeline_item.js +6 -14
- package/optimize/lib/components/timeline/timeline_item.styles.js +17 -10
- package/optimize/lib/components/timeline/timeline_item_icon.js +5 -7
- package/optimize/lib/components/timeline/timeline_item_icon.styles.js +15 -4
- package/optimize/lib/components/title/title.js +6 -8
- package/optimize/lib/global_styling/functions/logicals.js +2 -2
- package/optimize/lib/global_styling/utility/utility.js +8 -12
- package/optimize/lib/test/emotion-prefix.js +40 -0
- package/optimize/lib/test/index.d.ts +5 -0
- package/optimize/lib/test/index.js +23 -1
- package/{test-env/components/provider/system → optimize/lib/themes/amsterdam}/index.js +4 -4
- package/optimize/lib/themes/index.js +21 -1
- package/package.json +2 -2
- package/src/components/index.scss +0 -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/combo_box/matching_options.js +3 -2
- 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/cache/index.js +0 -13
- package/test-env/components/provider/index.js +7 -12
- package/test-env/components/provider/provider.js +2 -6
- package/test-env/components/selectable/selectable.js +39 -22
- package/test-env/components/spacer/spacer.js +8 -10
- package/test-env/components/stat/stat.js +29 -39
- package/test-env/components/stat/stat.styles.js +47 -0
- 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.js +19 -9
- package/test-env/components/timeline/timeline.styles.js +39 -0
- package/test-env/components/timeline/timeline_item.js +9 -24
- package/test-env/components/timeline/timeline_item.styles.js +17 -10
- package/test-env/components/timeline/timeline_item_icon.js +8 -10
- package/test-env/components/timeline/timeline_item_icon.styles.js +15 -4
- package/test-env/components/title/title.js +9 -11
- package/test-env/global_styling/functions/logicals.js +2 -2
- package/test-env/global_styling/utility/utility.js +8 -12
- package/test-env/test/emotion-prefix.js +40 -0
- package/test-env/test/index.js +23 -1
- 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/system/system.js +0 -33
- package/lib/components/provider/cache/cache_context.js +0 -24
- package/lib/components/provider/system/system.js +0 -45
- package/optimize/es/components/provider/cache/cache_context.js +0 -12
- package/optimize/es/components/provider/system/system.js +0 -33
- package/optimize/lib/components/provider/cache/cache_context.js +0 -24
- package/optimize/lib/components/provider/system/system.js +0 -54
- package/src/components/stat/_index.scss +0 -1
- package/src/components/stat/_stat.scss +0 -50
- package/test-env/components/provider/cache/cache_context.js +0 -24
- package/test-env/components/provider/system/system.js +0 -54
|
@@ -4,15 +4,15 @@ Object.defineProperty(exports, "__esModule", {
|
|
|
4
4
|
value: true
|
|
5
5
|
});
|
|
6
6
|
|
|
7
|
-
var
|
|
7
|
+
var _shadow = require("./global_styling/mixins/shadow");
|
|
8
8
|
|
|
9
|
-
Object.keys(
|
|
9
|
+
Object.keys(_shadow).forEach(function (key) {
|
|
10
10
|
if (key === "default" || key === "__esModule") return;
|
|
11
|
-
if (key in exports && exports[key] ===
|
|
11
|
+
if (key in exports && exports[key] === _shadow[key]) return;
|
|
12
12
|
Object.defineProperty(exports, key, {
|
|
13
13
|
enumerable: true,
|
|
14
14
|
get: function get() {
|
|
15
|
-
return
|
|
15
|
+
return _shadow[key];
|
|
16
16
|
}
|
|
17
17
|
});
|
|
18
18
|
});
|
package/lib/themes/index.js
CHANGED
|
@@ -3,6 +3,12 @@
|
|
|
3
3
|
Object.defineProperty(exports, "__esModule", {
|
|
4
4
|
value: true
|
|
5
5
|
});
|
|
6
|
+
var _exportNames = {
|
|
7
|
+
EUI_THEMES: true,
|
|
8
|
+
isDefaultTheme: true,
|
|
9
|
+
AMSTERDAM_NAME_KEY: true,
|
|
10
|
+
EuiThemeAmsterdam: true
|
|
11
|
+
};
|
|
6
12
|
Object.defineProperty(exports, "AMSTERDAM_NAME_KEY", {
|
|
7
13
|
enumerable: true,
|
|
8
14
|
get: function get() {
|
|
@@ -30,4 +36,18 @@ Object.defineProperty(exports, "isDefaultTheme", {
|
|
|
30
36
|
|
|
31
37
|
var _themes = require("./themes");
|
|
32
38
|
|
|
33
|
-
var _theme = require("./amsterdam/theme");
|
|
39
|
+
var _theme = require("./amsterdam/theme");
|
|
40
|
+
|
|
41
|
+
var _amsterdam = require("./amsterdam");
|
|
42
|
+
|
|
43
|
+
Object.keys(_amsterdam).forEach(function (key) {
|
|
44
|
+
if (key === "default" || key === "__esModule") return;
|
|
45
|
+
if (Object.prototype.hasOwnProperty.call(_exportNames, key)) return;
|
|
46
|
+
if (key in exports && exports[key] === _amsterdam[key]) return;
|
|
47
|
+
Object.defineProperty(exports, key, {
|
|
48
|
+
enumerable: true,
|
|
49
|
+
get: function get() {
|
|
50
|
+
return _amsterdam[key];
|
|
51
|
+
}
|
|
52
|
+
});
|
|
53
|
+
});
|
|
@@ -1,6 +1,11 @@
|
|
|
1
1
|
import _extends from "@babel/runtime/helpers/extends";
|
|
2
|
+
import _defineProperty from "@babel/runtime/helpers/defineProperty";
|
|
2
3
|
import _objectWithoutProperties from "@babel/runtime/helpers/objectWithoutProperties";
|
|
3
|
-
var _excluded = ["destinationId", "tabIndex", "position", "children", "className"
|
|
4
|
+
var _excluded = ["destinationId", "overrideLinkBehavior", "tabIndex", "position", "children", "className"];
|
|
5
|
+
|
|
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
|
+
|
|
8
|
+
function _objectSpread(target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i] != null ? arguments[i] : {}; if (i % 2) { ownKeys(Object(source), true).forEach(function (key) { _defineProperty(target, key, source[key]); }); } else if (Object.getOwnPropertyDescriptors) { Object.defineProperties(target, Object.getOwnPropertyDescriptors(source)); } else { ownKeys(Object(source)).forEach(function (key) { Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key)); }); } } return target; }
|
|
4
9
|
|
|
5
10
|
/*
|
|
6
11
|
* Copyright Elasticsearch B.V. and/or licensed to Elasticsearch B.V. under one
|
|
@@ -11,22 +16,23 @@ var _excluded = ["destinationId", "tabIndex", "position", "children", "className
|
|
|
11
16
|
*/
|
|
12
17
|
import React from 'react';
|
|
13
18
|
import classNames from 'classnames';
|
|
19
|
+
import { useEuiTheme } from '../../../services';
|
|
14
20
|
import { EuiButton } from '../../button/button';
|
|
15
|
-
import { withEuiSystem } from '../../provider/system';
|
|
16
21
|
import { EuiScreenReaderOnly } from '../screen_reader_only';
|
|
17
22
|
import { euiSkipLinkStyles } from './skip_link.styles';
|
|
18
23
|
import { jsx as ___EmotionJSX } from "@emotion/react";
|
|
19
24
|
export var POSITIONS = ['static', 'fixed', 'absolute'];
|
|
20
|
-
export var
|
|
25
|
+
export var EuiSkipLink = function EuiSkipLink(_ref) {
|
|
21
26
|
var destinationId = _ref.destinationId,
|
|
27
|
+
overrideLinkBehavior = _ref.overrideLinkBehavior,
|
|
22
28
|
tabIndex = _ref.tabIndex,
|
|
23
29
|
_ref$position = _ref.position,
|
|
24
30
|
position = _ref$position === void 0 ? 'static' : _ref$position,
|
|
25
31
|
children = _ref.children,
|
|
26
32
|
className = _ref.className,
|
|
27
|
-
euiTheme = _ref.euiTheme,
|
|
28
33
|
rest = _objectWithoutProperties(_ref, _excluded);
|
|
29
34
|
|
|
35
|
+
var euiTheme = useEuiTheme();
|
|
30
36
|
var styles = euiSkipLinkStyles(euiTheme);
|
|
31
37
|
var classes = classNames('euiSkipLink', className);
|
|
32
38
|
var cssStyles = [styles.euiSkipLink, position !== 'static' ? styles[position] : undefined]; // Create the `href` from `destinationId`
|
|
@@ -39,6 +45,22 @@ export var _EuiSkipLink = function _EuiSkipLink(_ref) {
|
|
|
39
45
|
};
|
|
40
46
|
}
|
|
41
47
|
|
|
48
|
+
if (overrideLinkBehavior) {
|
|
49
|
+
optionalProps = _objectSpread(_objectSpread({}, optionalProps), {}, {
|
|
50
|
+
onClick: function onClick(e) {
|
|
51
|
+
e.preventDefault();
|
|
52
|
+
var destinationEl = document.getElementById(destinationId);
|
|
53
|
+
if (!destinationEl) return;
|
|
54
|
+
destinationEl.scrollIntoView();
|
|
55
|
+
destinationEl.tabIndex = -1; // Ensure the destination content is focusable
|
|
56
|
+
|
|
57
|
+
destinationEl.focus({
|
|
58
|
+
preventScroll: true
|
|
59
|
+
}); // Scrolling is already handled above, and focus's autoscroll behaves oddly around fixed headers
|
|
60
|
+
}
|
|
61
|
+
});
|
|
62
|
+
}
|
|
63
|
+
|
|
42
64
|
return ___EmotionJSX(EuiScreenReaderOnly, {
|
|
43
65
|
showOnFocus: true
|
|
44
66
|
}, ___EmotionJSX(EuiButton, _extends({
|
|
@@ -48,5 +70,4 @@ export var _EuiSkipLink = function _EuiSkipLink(_ref) {
|
|
|
48
70
|
size: "s",
|
|
49
71
|
fill: true
|
|
50
72
|
}, optionalProps, rest), children));
|
|
51
|
-
};
|
|
52
|
-
export var EuiSkipLink = withEuiSystem(_EuiSkipLink);
|
|
73
|
+
};
|
|
@@ -35,6 +35,6 @@ export var euiSkipLinkStyles = function euiSkipLinkStyles(_ref3) {
|
|
|
35
35
|
// Set positions on focus only as to not override screenReaderOnly position
|
|
36
36
|
// When positioned absolutely, consumers still need to tell it WHERE (top,left,etc...)
|
|
37
37
|
absolute: _ref,
|
|
38
|
-
fixed: /*#__PURE__*/css("
|
|
38
|
+
fixed: /*#__PURE__*/css("position:fixed!important;&:focus{inset-block-start:", euiTheme.size.xs, ";inset-inline-start:", euiTheme.size.xs, ";z-index:", Number(euiTheme.levels.header) + 1, ";};label:fixed;")
|
|
39
39
|
};
|
|
40
40
|
};
|
|
@@ -2,7 +2,7 @@ import _extends from "@babel/runtime/helpers/extends";
|
|
|
2
2
|
import _toConsumableArray from "@babel/runtime/helpers/toConsumableArray";
|
|
3
3
|
import _defineProperty from "@babel/runtime/helpers/defineProperty";
|
|
4
4
|
import _objectWithoutProperties from "@babel/runtime/helpers/objectWithoutProperties";
|
|
5
|
-
var _excluded = ["className", "color", "
|
|
5
|
+
var _excluded = ["className", "color", "imageUrl", "initials", "initialsLength", "iconType", "iconSize", "iconColor", "name", "size", "type", "isDisabled", "style"];
|
|
6
6
|
|
|
7
7
|
/*
|
|
8
8
|
* Copyright Elasticsearch B.V. and/or licensed to Elasticsearch B.V. under one
|
|
@@ -14,19 +14,17 @@ var _excluded = ["className", "color", "euiTheme", "imageUrl", "initials", "init
|
|
|
14
14
|
import React from 'react';
|
|
15
15
|
import classNames from 'classnames';
|
|
16
16
|
import { isColorDark, hexToRgb, isValidHex } from '../../services/color';
|
|
17
|
-
import {
|
|
18
|
-
import { euiPaletteColorBlindBehindText, toInitials } from '../../services';
|
|
17
|
+
import { euiPaletteColorBlindBehindText, toInitials, useEuiTheme } from '../../services';
|
|
19
18
|
import { EuiIcon } from '../icon';
|
|
20
19
|
import { euiAvatarStyles } from './avatar.styles';
|
|
21
20
|
import { jsx as ___EmotionJSX } from "@emotion/react";
|
|
22
21
|
export var SIZES = ['s', 'm', 'l', 'xl'];
|
|
23
22
|
export var TYPES = ['space', 'user'];
|
|
24
|
-
export var
|
|
23
|
+
export var EuiAvatar = function EuiAvatar(_ref) {
|
|
25
24
|
var _classNames;
|
|
26
25
|
|
|
27
26
|
var className = _ref.className,
|
|
28
27
|
color = _ref.color,
|
|
29
|
-
euiTheme = _ref.euiTheme,
|
|
30
28
|
imageUrl = _ref.imageUrl,
|
|
31
29
|
initials = _ref.initials,
|
|
32
30
|
initialsLength = _ref.initialsLength,
|
|
@@ -43,6 +41,7 @@ export var _EuiAvatar = function _EuiAvatar(_ref) {
|
|
|
43
41
|
style = _ref.style,
|
|
44
42
|
rest = _objectWithoutProperties(_ref, _excluded);
|
|
45
43
|
|
|
44
|
+
var euiTheme = useEuiTheme();
|
|
46
45
|
var styles = euiAvatarStyles(euiTheme);
|
|
47
46
|
var visColors = euiPaletteColorBlindBehindText();
|
|
48
47
|
var isPlain = color === 'plain';
|
|
@@ -95,8 +94,7 @@ export var _EuiAvatar = function _EuiAvatar(_ref) {
|
|
|
95
94
|
role: isDisabled ? 'presentation' : 'img',
|
|
96
95
|
title: name
|
|
97
96
|
}, rest), content);
|
|
98
|
-
};
|
|
99
|
-
export var EuiAvatar = withEuiSystem(_EuiAvatar); // TODO: Migrate to a service
|
|
97
|
+
}; // TODO: Migrate to a service
|
|
100
98
|
|
|
101
99
|
export var checkValidColor = function checkValidColor(color) {
|
|
102
100
|
var validHex = color && isValidHex(color) || color === 'plain' || color === 'subdued';
|
|
@@ -2,7 +2,7 @@ import _extends from "@babel/runtime/helpers/extends";
|
|
|
2
2
|
import _defineProperty from "@babel/runtime/helpers/defineProperty";
|
|
3
3
|
import _slicedToArray from "@babel/runtime/helpers/slicedToArray";
|
|
4
4
|
import _objectWithoutProperties from "@babel/runtime/helpers/objectWithoutProperties";
|
|
5
|
-
var _excluded = ["position", "paddingSize", "affordForDisplacement", "children", "className", "bodyClassName", "landmarkHeading", "usePortal", "left", "right", "bottom", "top", "style"
|
|
5
|
+
var _excluded = ["position", "paddingSize", "affordForDisplacement", "children", "className", "bodyClassName", "landmarkHeading", "usePortal", "left", "right", "bottom", "top", "style"];
|
|
6
6
|
|
|
7
7
|
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; }
|
|
8
8
|
|
|
@@ -17,14 +17,13 @@ function _objectSpread(target) { for (var i = 1; i < arguments.length; i++) { va
|
|
|
17
17
|
*/
|
|
18
18
|
import classNames from 'classnames';
|
|
19
19
|
import React, { forwardRef, useEffect, useState } from 'react';
|
|
20
|
-
import { useCombinedRefs } from '../../services';
|
|
20
|
+
import { useCombinedRefs, useEuiTheme } from '../../services';
|
|
21
21
|
import { EuiScreenReaderOnly } from '../accessibility';
|
|
22
22
|
import { EuiI18n } from '../i18n';
|
|
23
23
|
import { useResizeObserver } from '../observer/resize_observer';
|
|
24
24
|
import { EuiPortal } from '../portal';
|
|
25
|
-
import { withEuiSystem } from '../provider/system';
|
|
26
|
-
import { EuiThemeProvider } from '../../services/theme/provider';
|
|
27
25
|
import { euiBottomBarStyles } from './bottom_bar.styles';
|
|
26
|
+
import { EuiThemeProvider } from '../../services/theme/provider';
|
|
28
27
|
import { jsx as ___EmotionJSX } from "@emotion/react";
|
|
29
28
|
// Exported for testing
|
|
30
29
|
export var paddingSizeToClassNameMap = {
|
|
@@ -34,7 +33,8 @@ export var paddingSizeToClassNameMap = {
|
|
|
34
33
|
l: 'euiBottomBar--paddingLarge'
|
|
35
34
|
};
|
|
36
35
|
export var POSITIONS = ['static', 'fixed', 'sticky'];
|
|
37
|
-
|
|
36
|
+
|
|
37
|
+
var _EuiBottomBar = /*#__PURE__*/forwardRef(function (_ref, ref) {
|
|
38
38
|
var _ref$position = _ref.position,
|
|
39
39
|
position = _ref$position === void 0 ? 'fixed' : _ref$position,
|
|
40
40
|
_ref$paddingSize = _ref.paddingSize,
|
|
@@ -55,9 +55,9 @@ export var _EuiBottomBar = /*#__PURE__*/forwardRef(function (_ref, ref) {
|
|
|
55
55
|
bottom = _ref$bottom === void 0 ? 0 : _ref$bottom,
|
|
56
56
|
top = _ref.top,
|
|
57
57
|
style = _ref.style,
|
|
58
|
-
euiTheme = _ref.euiTheme,
|
|
59
58
|
rest = _objectWithoutProperties(_ref, _excluded);
|
|
60
59
|
|
|
60
|
+
var euiTheme = useEuiTheme();
|
|
61
61
|
var styles = euiBottomBarStyles(euiTheme); // Force some props if `fixed` position, but not if the user has supplied these
|
|
62
62
|
|
|
63
63
|
affordForDisplacement = position !== 'fixed' ? false : affordForDisplacement;
|
|
@@ -131,10 +131,11 @@ export var _EuiBottomBar = /*#__PURE__*/forwardRef(function (_ref, ref) {
|
|
|
131
131
|
|
|
132
132
|
return usePortal ? ___EmotionJSX(EuiPortal, null, bar) : bar;
|
|
133
133
|
});
|
|
134
|
+
|
|
134
135
|
export var EuiBottomBar = /*#__PURE__*/forwardRef(function (props, ref) {
|
|
135
|
-
var BottomBar =
|
|
136
|
+
var BottomBar = _EuiBottomBar;
|
|
136
137
|
return ___EmotionJSX(EuiThemeProvider, {
|
|
137
|
-
colorMode:
|
|
138
|
+
colorMode: 'dark'
|
|
138
139
|
}, ___EmotionJSX(BottomBar, _extends({
|
|
139
140
|
ref: ref
|
|
140
141
|
}, props)));
|
|
@@ -166,8 +166,7 @@ export var EuiBreadcrumbs = function EuiBreadcrumbs(_ref) {
|
|
|
166
166
|
}, linkProps, breadcrumbRest), text);
|
|
167
167
|
}
|
|
168
168
|
|
|
169
|
-
return ___EmotionJSX(EuiLink
|
|
170
|
-
, _extends({
|
|
169
|
+
return ___EmotionJSX(EuiLink, _extends({
|
|
171
170
|
ref: ref,
|
|
172
171
|
color: isLastBreadcrumb ? 'text' : 'subdued',
|
|
173
172
|
onClick: onClick,
|
|
@@ -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 = ["title", "color", "size", "iconType", "children", "className", "heading"
|
|
4
|
+
var _excluded = ["title", "color", "size", "iconType", "children", "className", "heading"];
|
|
5
5
|
|
|
6
6
|
/*
|
|
7
7
|
* Copyright Elasticsearch B.V. and/or licensed to Elasticsearch B.V. under one
|
|
@@ -14,14 +14,14 @@ import React, { forwardRef } from 'react';
|
|
|
14
14
|
import classNames from 'classnames';
|
|
15
15
|
import { EuiIcon } from '../icon';
|
|
16
16
|
import { EuiText } from '../text';
|
|
17
|
-
import {
|
|
17
|
+
import { useEuiTheme } from '../../services';
|
|
18
18
|
import { EuiPanel } from '../panel';
|
|
19
19
|
import { EuiTitle } from '../title';
|
|
20
20
|
import { euiCallOutStyles, euiCallOutHeadingStyles } from './call_out.styles';
|
|
21
21
|
import { jsx as ___EmotionJSX } from "@emotion/react";
|
|
22
22
|
export var COLORS = ['primary', 'success', 'warning', 'danger'];
|
|
23
23
|
export var HEADINGS = ['h1', 'h2', 'h3', 'h4', 'h5', 'h6', 'p'];
|
|
24
|
-
export var
|
|
24
|
+
export var EuiCallOut = /*#__PURE__*/forwardRef(function (_ref, ref) {
|
|
25
25
|
var title = _ref.title,
|
|
26
26
|
_ref$color = _ref.color,
|
|
27
27
|
color = _ref$color === void 0 ? 'primary' : _ref$color,
|
|
@@ -32,14 +32,14 @@ export var _EuiCallOut = /*#__PURE__*/forwardRef(function (_ref, ref) {
|
|
|
32
32
|
className = _ref.className,
|
|
33
33
|
_ref$heading = _ref.heading,
|
|
34
34
|
heading = _ref$heading === void 0 ? 'p' : _ref$heading,
|
|
35
|
-
euiTheme = _ref.euiTheme,
|
|
36
35
|
rest = _objectWithoutProperties(_ref, _excluded);
|
|
37
36
|
|
|
38
|
-
var
|
|
37
|
+
var theme = useEuiTheme();
|
|
38
|
+
var styles = euiCallOutStyles(theme);
|
|
39
39
|
var cssStyles = [styles.euiCallOut];
|
|
40
40
|
var cssIconStyle = [styles.euiCallOut__icon];
|
|
41
41
|
var cssDescriptionStyle = [styles.euiCallOut__description];
|
|
42
|
-
var headerStyles = euiCallOutHeadingStyles(
|
|
42
|
+
var headerStyles = euiCallOutHeadingStyles(theme);
|
|
43
43
|
var cssHeaderStyles = [headerStyles.euiCallOutHeader, headerStyles[color]];
|
|
44
44
|
var classes = classNames('euiCallOut', _defineProperty({}, "euiCallOut--".concat(color), color), className);
|
|
45
45
|
var headerIcon;
|
|
@@ -87,5 +87,4 @@ export var _EuiCallOut = /*#__PURE__*/forwardRef(function (_ref, ref) {
|
|
|
87
87
|
grow: false
|
|
88
88
|
}, rest), header, optionalChildren);
|
|
89
89
|
});
|
|
90
|
-
|
|
91
|
-
export var EuiCallOut = withEuiSystem(_EuiCallOut);
|
|
90
|
+
EuiCallOut.displayName = 'EuiCallOut';
|
|
@@ -10,7 +10,7 @@ import _toConsumableArray from "@babel/runtime/helpers/toConsumableArray";
|
|
|
10
10
|
export var flattenOptionGroups = function flattenOptionGroups(optionsOrGroups) {
|
|
11
11
|
return optionsOrGroups.reduce(function (options, optionOrGroup) {
|
|
12
12
|
if (optionOrGroup.options) {
|
|
13
|
-
options.
|
|
13
|
+
options = options.concat(optionOrGroup.options);
|
|
14
14
|
} else {
|
|
15
15
|
options.push(optionOrGroup);
|
|
16
16
|
}
|
|
@@ -68,8 +68,9 @@ export var getMatchingOptions = function getMatchingOptions(options, selectedOpt
|
|
|
68
68
|
label: option.label,
|
|
69
69
|
isGroupLabelOption: true
|
|
70
70
|
}); // Add matching options for group
|
|
71
|
+
// use concat over spreading to support large arrays - https://mathiasbynens.be/demo/javascript-argument-count
|
|
71
72
|
|
|
72
|
-
matchingOptions.
|
|
73
|
+
matchingOptions = matchingOptions.concat(matchingOptionsForGroup);
|
|
73
74
|
}
|
|
74
75
|
} else {
|
|
75
76
|
collectMatchingOption(matchingOptions, option, selectedOptions, normalizedSearchValue, isPreFiltered, showPrevSelected);
|
|
@@ -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", "description", "descriptionProps", "value", "valueProps", "color", "uppercase", "isActive", "display", "descriptionWidth", "onClick", "isInvalid", "textWrap"
|
|
4
|
+
var _excluded = ["className", "description", "descriptionProps", "value", "valueProps", "color", "uppercase", "isActive", "display", "descriptionWidth", "onClick", "isInvalid", "textWrap"];
|
|
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
|
|
|
@@ -17,11 +17,11 @@ function _objectSpread(target) { for (var i = 1; i < arguments.length; i++) { va
|
|
|
17
17
|
import React from 'react';
|
|
18
18
|
import classNames from 'classnames';
|
|
19
19
|
import { EuiIcon } from '../icon';
|
|
20
|
-
import {
|
|
20
|
+
import { useEuiTheme } from '../../services';
|
|
21
21
|
import { euiExpressionStyles, euiExpressionDescriptionStyles, euiExpressionValueStyles, euiExpressionIconStyles } from './expression.styles';
|
|
22
22
|
import { jsx as ___EmotionJSX } from "@emotion/react";
|
|
23
23
|
export var COLORS = ['subdued', 'primary', 'success', 'accent', 'warning', 'danger'];
|
|
24
|
-
export var
|
|
24
|
+
export var EuiExpression = function EuiExpression(_ref) {
|
|
25
25
|
var className = _ref.className,
|
|
26
26
|
description = _ref.description,
|
|
27
27
|
descriptionProps = _ref.descriptionProps,
|
|
@@ -42,17 +42,17 @@ export var _EuiExpression = function _EuiExpression(_ref) {
|
|
|
42
42
|
isInvalid = _ref$isInvalid === void 0 ? false : _ref$isInvalid,
|
|
43
43
|
_ref$textWrap = _ref.textWrap,
|
|
44
44
|
textWrap = _ref$textWrap === void 0 ? 'break-word' : _ref$textWrap,
|
|
45
|
-
euiTheme = _ref.euiTheme,
|
|
46
45
|
rest = _objectWithoutProperties(_ref, _excluded);
|
|
47
46
|
|
|
48
47
|
var calculatedColor = isInvalid ? 'danger' : color;
|
|
49
|
-
var
|
|
48
|
+
var theme = useEuiTheme();
|
|
49
|
+
var styles = euiExpressionStyles(theme);
|
|
50
50
|
var cssStyles = [styles.euiExpression, onClick && styles.isClickable, styles[color], isActive && styles.isActive.base, isActive && styles.isActive[color], display === 'columns' && styles.columns, textWrap === 'truncate' && styles.truncate];
|
|
51
|
-
var descriptionStyles = euiExpressionDescriptionStyles(
|
|
51
|
+
var descriptionStyles = euiExpressionDescriptionStyles(theme);
|
|
52
52
|
var cssDescriptionStyles = [descriptionStyles.euiExpression__description, isInvalid ? descriptionStyles.danger : descriptionStyles[color], uppercase && descriptionStyles.isUppercase, textWrap === 'truncate' && descriptionStyles.truncate, display === 'columns' && descriptionStyles.columns];
|
|
53
|
-
var valueStyles = euiExpressionValueStyles(
|
|
53
|
+
var valueStyles = euiExpressionValueStyles(theme);
|
|
54
54
|
var cssValueStyles = [valueStyles.euiExpression__value, textWrap === 'truncate' && valueStyles.truncate, display === 'columns' && valueStyles.columns];
|
|
55
|
-
var iconStyles = euiExpressionIconStyles(
|
|
55
|
+
var iconStyles = euiExpressionIconStyles(theme);
|
|
56
56
|
var cssIconStyles = [iconStyles.euiExpression__icon, display === 'columns' && iconStyles.columns];
|
|
57
57
|
var classes = classNames('euiExpression', className);
|
|
58
58
|
var Component = onClick ? 'button' : 'span';
|
|
@@ -78,5 +78,4 @@ export var _EuiExpression = function _EuiExpression(_ref) {
|
|
|
78
78
|
className: "euiExpression__value",
|
|
79
79
|
css: cssValueStyles
|
|
80
80
|
}, valueProps), value), invalidIcon);
|
|
81
|
-
};
|
|
82
|
-
export var EuiExpression = withEuiSystem(_EuiExpression);
|
|
81
|
+
};
|
|
@@ -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", "icon", "isDisabled", "isLoading", "isSelected", "quantity", "buttonRef"
|
|
3
|
+
var _excluded = ["children", "className", "icon", "isDisabled", "isLoading", "isSelected", "quantity", "buttonRef"];
|
|
4
4
|
|
|
5
5
|
/*
|
|
6
6
|
* Copyright Elasticsearch B.V. and/or licensed to Elasticsearch B.V. under one
|
|
@@ -15,11 +15,11 @@ import { EuiNotificationBadge } from '../badge';
|
|
|
15
15
|
import { EuiLoadingSpinner } from '../loading';
|
|
16
16
|
import { EuiInnerText } from '../inner_text';
|
|
17
17
|
import { cloneElementWithCss } from '../../services/theme/clone_element';
|
|
18
|
-
import {
|
|
18
|
+
import { useEuiTheme } from '../../services';
|
|
19
19
|
import { euiFacetButtonStyles, euiFacetButtonTextStyles, euiFacetButtonIconStyles, euiFacetButtonQuantityStyles, euiFacetButtonLoadingSpinnerStyles } from './facet_button.styles';
|
|
20
20
|
import { EuiButtonDisplay } from '../button/button_display/_button_display';
|
|
21
21
|
import { jsx as ___EmotionJSX } from "@emotion/react";
|
|
22
|
-
export var
|
|
22
|
+
export var EuiFacetButton = function EuiFacetButton(_ref) {
|
|
23
23
|
var children = _ref.children,
|
|
24
24
|
className = _ref.className,
|
|
25
25
|
icon = _ref.icon,
|
|
@@ -31,16 +31,16 @@ export var _EuiFacetButton = function _EuiFacetButton(_ref) {
|
|
|
31
31
|
isSelected = _ref$isSelected === void 0 ? false : _ref$isSelected,
|
|
32
32
|
quantity = _ref.quantity,
|
|
33
33
|
buttonRef = _ref.buttonRef,
|
|
34
|
-
euiTheme = _ref.euiTheme,
|
|
35
34
|
rest = _objectWithoutProperties(_ref, _excluded);
|
|
36
35
|
|
|
37
36
|
// If in the loading state, force disabled to true
|
|
38
37
|
isDisabled = isLoading ? true : isDisabled;
|
|
39
38
|
var selection = isSelected ? 'isSelected' : 'unSelected';
|
|
40
39
|
var classes = classNames('euiFacetButton', className);
|
|
41
|
-
var
|
|
40
|
+
var theme = useEuiTheme();
|
|
41
|
+
var styles = euiFacetButtonStyles(theme);
|
|
42
42
|
var cssStyles = [styles.euiFacetButton];
|
|
43
|
-
var textStyles = euiFacetButtonTextStyles(
|
|
43
|
+
var textStyles = euiFacetButtonTextStyles(theme);
|
|
44
44
|
var cssTextStyles = [textStyles.euiFacetButton__text, textStyles[selection]];
|
|
45
45
|
var quantityStyles = euiFacetButtonQuantityStyles();
|
|
46
46
|
var cssQuantityStyles = [quantityStyles.euiFacetButton__quantity, isDisabled && quantityStyles.isDisabled];
|
|
@@ -91,5 +91,4 @@ export var _EuiFacetButton = function _EuiFacetButton(_ref) {
|
|
|
91
91
|
ref: ref
|
|
92
92
|
}, children), buttonQuantity);
|
|
93
93
|
});
|
|
94
|
-
};
|
|
95
|
-
export var EuiFacetButton = withEuiSystem(_EuiFacetButton);
|
|
94
|
+
};
|
|
@@ -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", "layout", "gutterSize"
|
|
3
|
+
var _excluded = ["children", "className", "layout", "gutterSize"];
|
|
4
4
|
|
|
5
5
|
/*
|
|
6
6
|
* Copyright Elasticsearch B.V. and/or licensed to Elasticsearch B.V. under one
|
|
@@ -11,27 +11,26 @@ var _excluded = ["children", "className", "layout", "gutterSize", "euiTheme"];
|
|
|
11
11
|
*/
|
|
12
12
|
import React from 'react';
|
|
13
13
|
import classNames from 'classnames';
|
|
14
|
-
import {
|
|
14
|
+
import { useEuiTheme } from '../../services';
|
|
15
15
|
import { euiFacetGroupStyles } from './facet_group.styles';
|
|
16
16
|
import { jsx as ___EmotionJSX } from "@emotion/react";
|
|
17
17
|
export var LAYOUTS = ['vertical', 'horizontal'];
|
|
18
18
|
export var GUTTER_SIZES = ['none', 's', 'm', 'l'];
|
|
19
|
-
export var
|
|
19
|
+
export var EuiFacetGroup = function EuiFacetGroup(_ref) {
|
|
20
20
|
var children = _ref.children,
|
|
21
21
|
className = _ref.className,
|
|
22
22
|
_ref$layout = _ref.layout,
|
|
23
23
|
layout = _ref$layout === void 0 ? 'vertical' : _ref$layout,
|
|
24
24
|
_ref$gutterSize = _ref.gutterSize,
|
|
25
25
|
gutterSize = _ref$gutterSize === void 0 ? 'm' : _ref$gutterSize,
|
|
26
|
-
euiTheme = _ref.euiTheme,
|
|
27
26
|
rest = _objectWithoutProperties(_ref, _excluded);
|
|
28
27
|
|
|
29
|
-
var
|
|
28
|
+
var theme = useEuiTheme();
|
|
29
|
+
var styles = euiFacetGroupStyles(theme, layout);
|
|
30
30
|
var cssStyles = [styles.euiFacetGroup, styles[gutterSize], styles[layout]];
|
|
31
31
|
var classes = classNames('euiFacetGroup', className);
|
|
32
32
|
return ___EmotionJSX("div", _extends({
|
|
33
33
|
className: classes,
|
|
34
34
|
css: cssStyles
|
|
35
35
|
}, rest), children);
|
|
36
|
-
};
|
|
37
|
-
export var EuiFacetGroup = withEuiSystem(_EuiFacetGroup);
|
|
36
|
+
};
|
|
@@ -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", "color", "
|
|
3
|
+
var _excluded = ["children", "className", "color", "textSize"];
|
|
4
4
|
|
|
5
5
|
/*
|
|
6
6
|
* Copyright Elasticsearch B.V. and/or licensed to Elasticsearch B.V. under one
|
|
@@ -11,21 +11,21 @@ var _excluded = ["children", "className", "color", "euiTheme", "textSize"];
|
|
|
11
11
|
*/
|
|
12
12
|
import React from 'react';
|
|
13
13
|
import classNames from 'classnames';
|
|
14
|
-
import {
|
|
14
|
+
import { useEuiTheme } from '../../services';
|
|
15
15
|
import { euiHealthStyles } from './health.styles';
|
|
16
16
|
import { EuiIcon } from '../icon';
|
|
17
17
|
import { EuiFlexGroup, EuiFlexItem } from '../flex';
|
|
18
18
|
import { jsx as ___EmotionJSX } from "@emotion/react";
|
|
19
19
|
export var TEXT_SIZES = ['xs', 's', 'm', 'inherit'];
|
|
20
|
-
export var
|
|
20
|
+
export var EuiHealth = function EuiHealth(_ref) {
|
|
21
21
|
var children = _ref.children,
|
|
22
22
|
className = _ref.className,
|
|
23
23
|
color = _ref.color,
|
|
24
|
-
euiTheme = _ref.euiTheme,
|
|
25
24
|
_ref$textSize = _ref.textSize,
|
|
26
25
|
textSize = _ref$textSize === void 0 ? 's' : _ref$textSize,
|
|
27
26
|
rest = _objectWithoutProperties(_ref, _excluded);
|
|
28
27
|
|
|
28
|
+
var euiTheme = useEuiTheme();
|
|
29
29
|
var styles = euiHealthStyles(euiTheme);
|
|
30
30
|
var cssStyles = [styles.euiHealth, styles[textSize]];
|
|
31
31
|
var classes = classNames('euiHealth', className);
|
|
@@ -44,5 +44,4 @@ export var _EuiHealth = function _EuiHealth(_ref) {
|
|
|
44
44
|
})), ___EmotionJSX(EuiFlexItem, {
|
|
45
45
|
grow: false
|
|
46
46
|
}, children)));
|
|
47
|
-
};
|
|
48
|
-
export var EuiHealth = withEuiSystem(_EuiHealth);
|
|
47
|
+
};
|
|
@@ -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", "
|
|
4
|
+
var _excluded = ["className", "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", "euiTheme", "size", "margin"];
|
|
|
12
12
|
*/
|
|
13
13
|
import React from 'react';
|
|
14
14
|
import classNames from 'classnames';
|
|
15
|
-
import {
|
|
15
|
+
import { useEuiTheme } from '../../services';
|
|
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,
|
|
34
33
|
_ref$size = _ref.size,
|
|
35
34
|
size = _ref$size === void 0 ? 'full' : _ref$size,
|
|
36
35
|
_ref$margin = _ref.margin,
|
|
37
36
|
margin = _ref$margin === void 0 ? 'l' : _ref$margin,
|
|
38
37
|
rest = _objectWithoutProperties(_ref, _excluded);
|
|
39
38
|
|
|
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,5 +44,4 @@ export var _EuiHorizontalRule = function _EuiHorizontalRule(_ref) {
|
|
|
44
44
|
css: cssStyles,
|
|
45
45
|
className: classes
|
|
46
46
|
}, rest));
|
|
47
|
-
};
|
|
48
|
-
export var EuiHorizontalRule = withEuiSystem(_EuiHorizontalRule);
|
|
47
|
+
};
|
|
@@ -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"];
|
|
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,8 +16,7 @@ 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 } from '../../services';
|
|
20
|
-
import { withEuiSystem } from '../provider/system';
|
|
19
|
+
import { getSecureRelForTarget, useEuiTheme } from '../../services';
|
|
21
20
|
import { euiLinkStyles } from './link.styles';
|
|
22
21
|
import { EuiIcon } from '../icon';
|
|
23
22
|
import { EuiI18n, useEuiI18n } from '../i18n';
|
|
@@ -25,7 +24,7 @@ import { EuiScreenReaderOnly } from '../accessibility';
|
|
|
25
24
|
import { validateHref } from '../../services/security/href_validator';
|
|
26
25
|
import { jsx as ___EmotionJSX } from "@emotion/react";
|
|
27
26
|
export var COLORS = ['primary', 'subdued', 'success', 'accent', 'danger', 'warning', 'text', 'ghost'];
|
|
28
|
-
|
|
27
|
+
var EuiLink = /*#__PURE__*/forwardRef(function (_ref, ref) {
|
|
29
28
|
var children = _ref.children,
|
|
30
29
|
_ref$color = _ref.color,
|
|
31
30
|
color = _ref$color === void 0 ? 'primary' : _ref$color,
|
|
@@ -38,9 +37,9 @@ export var _EuiLink = /*#__PURE__*/forwardRef(function (_ref, ref) {
|
|
|
38
37
|
type = _ref$type === void 0 ? 'button' : _ref$type,
|
|
39
38
|
onClick = _ref.onClick,
|
|
40
39
|
_disabled = _ref.disabled,
|
|
41
|
-
euiTheme = _ref.euiTheme,
|
|
42
40
|
rest = _objectWithoutProperties(_ref, _excluded);
|
|
43
41
|
|
|
42
|
+
var euiTheme = useEuiTheme();
|
|
44
43
|
var styles = euiLinkStyles(euiTheme);
|
|
45
44
|
var cssStyles = [styles.euiLink];
|
|
46
45
|
var cssScreenReaderTextStyles = [styles.euiLink__screenReaderText];
|
|
@@ -96,5 +95,5 @@ export var _EuiLink = /*#__PURE__*/forwardRef(function (_ref, ref) {
|
|
|
96
95
|
ref: ref
|
|
97
96
|
}, anchorProps), children, showExternalLinkIcon && externalLinkIcon, target === '_blank' && newTargetScreenreaderText);
|
|
98
97
|
});
|
|
99
|
-
|
|
100
|
-
export
|
|
98
|
+
EuiLink.displayName = 'EuiLink';
|
|
99
|
+
export { 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"];
|
|
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", "euiTheme"];
|
|
|
11
11
|
*/
|
|
12
12
|
import React from 'react';
|
|
13
13
|
import classNames from 'classnames';
|
|
14
|
-
import {
|
|
14
|
+
import { useEuiTheme } from '../../services';
|
|
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,
|
|
27
26
|
rest = _objectWithoutProperties(_ref, _excluded);
|
|
28
27
|
|
|
29
28
|
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,5 +53,4 @@ export var _EuiLoadingChart = function _EuiLoadingChart(_ref) {
|
|
|
53
53
|
role: "progressbar",
|
|
54
54
|
"aria-label": ariaLabel || defaultAriaLabel
|
|
55
55
|
}, rest), bars);
|
|
56
|
-
};
|
|
57
|
-
export var EuiLoadingChart = withEuiSystem(_EuiLoadingChart);
|
|
56
|
+
};
|