@elastic/eui 59.1.0-rc1 → 59.1.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/eui_charts_theme.js +330 -330
- package/dist/eui_charts_theme.js.map +1 -1
- package/es/components/accessibility/skip_link/skip_link.js +42 -7
- package/es/components/accessibility/skip_link/skip_link.styles.js +1 -1
- package/es/components/avatar/avatar.js +7 -9
- package/es/components/bottom_bar/bottom_bar.js +9 -8
- package/es/components/breadcrumbs/breadcrumbs.js +1 -2
- package/es/components/call_out/call_out.js +8 -9
- package/es/components/expression/expression.js +10 -11
- package/es/components/facet/facet_button.js +8 -9
- package/es/components/facet/facet_group.js +7 -8
- package/es/components/health/health.js +6 -7
- package/es/components/horizontal_rule/horizontal_rule.js +6 -7
- package/es/components/link/link.js +7 -8
- package/es/components/loading/loading_chart.js +6 -7
- package/es/components/loading/loading_content.js +6 -7
- package/es/components/loading/loading_logo.js +6 -7
- package/es/components/loading/loading_spinner.js +6 -7
- package/es/components/mark/mark.js +8 -9
- package/es/components/markdown_editor/markdown_format.js +6 -7
- package/es/components/panel/panel.js +7 -8
- package/es/components/provider/index.js +1 -1
- package/es/components/provider/provider.js +5 -39
- package/es/components/spacer/spacer.js +6 -7
- package/es/components/text/text.js +6 -7
- package/es/components/text/text_color.js +6 -7
- package/es/components/timeline/timeline_item.js +6 -7
- package/es/components/timeline/timeline_item_icon.js +6 -7
- package/es/components/title/title.js +6 -7
- package/es/services/theme/hooks.js +2 -2
- package/es/services/theme/provider.js +5 -1
- package/{optimize/es/components/provider/cache → es/themes/amsterdam}/index.js +2 -2
- package/es/themes/index.js +2 -1
- package/eui.d.ts +337 -827
- package/i18ntokens.json +12 -12
- package/lib/components/accessibility/skip_link/skip_link.js +45 -11
- package/lib/components/accessibility/skip_link/skip_link.styles.js +1 -1
- package/lib/components/avatar/avatar.js +8 -12
- package/lib/components/bottom_bar/bottom_bar.js +6 -9
- package/lib/components/breadcrumbs/breadcrumbs.js +1 -2
- package/lib/components/call_out/call_out.js +10 -14
- package/lib/components/expression/expression.js +12 -14
- package/lib/components/facet/facet_button.js +10 -12
- package/lib/components/facet/facet_group.js +9 -11
- package/lib/components/health/health.js +8 -10
- package/lib/components/horizontal_rule/horizontal_rule.js +8 -10
- package/lib/components/link/link.js +7 -13
- package/lib/components/loading/loading_chart.js +8 -10
- package/lib/components/loading/loading_content.js +8 -10
- package/lib/components/loading/loading_logo.js +8 -10
- package/lib/components/loading/loading_spinner.js +8 -10
- package/lib/components/mark/mark.js +10 -12
- package/lib/components/markdown_editor/markdown_format.js +8 -10
- package/lib/components/panel/panel.js +9 -11
- package/lib/components/provider/index.js +7 -12
- package/lib/components/provider/provider.js +5 -40
- package/lib/components/spacer/spacer.js +8 -10
- package/lib/components/text/text.js +8 -10
- package/lib/components/text/text_color.js +8 -10
- package/lib/components/timeline/timeline_item.js +8 -10
- package/lib/components/timeline/timeline_item_icon.js +8 -10
- package/lib/components/title/title.js +9 -11
- package/lib/services/theme/hooks.js +2 -2
- package/lib/services/theme/provider.js +6 -3
- package/{test-env/components/provider/system → lib/themes/amsterdam}/index.js +4 -4
- package/lib/themes/index.js +21 -1
- package/optimize/es/components/accessibility/skip_link/skip_link.js +27 -6
- package/optimize/es/components/accessibility/skip_link/skip_link.styles.js +1 -1
- package/optimize/es/components/avatar/avatar.js +5 -7
- package/optimize/es/components/bottom_bar/bottom_bar.js +9 -8
- package/optimize/es/components/breadcrumbs/breadcrumbs.js +1 -2
- package/optimize/es/components/call_out/call_out.js +7 -8
- package/optimize/es/components/expression/expression.js +9 -10
- package/optimize/es/components/facet/facet_button.js +7 -8
- package/optimize/es/components/facet/facet_group.js +6 -7
- package/optimize/es/components/health/health.js +5 -6
- package/optimize/es/components/horizontal_rule/horizontal_rule.js +5 -6
- package/optimize/es/components/link/link.js +6 -7
- package/optimize/es/components/loading/loading_chart.js +5 -6
- package/optimize/es/components/loading/loading_content.js +5 -6
- package/optimize/es/components/loading/loading_logo.js +5 -6
- package/optimize/es/components/loading/loading_spinner.js +5 -6
- package/optimize/es/components/mark/mark.js +7 -8
- package/optimize/es/components/markdown_editor/markdown_format.js +5 -6
- package/optimize/es/components/panel/panel.js +6 -7
- package/optimize/es/components/provider/index.js +1 -1
- package/optimize/es/components/provider/provider.js +5 -39
- package/optimize/es/components/spacer/spacer.js +5 -6
- package/optimize/es/components/text/text.js +5 -6
- package/optimize/es/components/text/text_color.js +5 -6
- package/optimize/es/components/timeline/timeline_item.js +5 -6
- package/optimize/es/components/timeline/timeline_item_icon.js +5 -6
- package/optimize/es/components/title/title.js +5 -6
- package/optimize/es/services/theme/hooks.js +2 -2
- package/optimize/es/services/theme/provider.js +5 -1
- package/optimize/es/{components/provider/system → themes/amsterdam}/index.js +2 -1
- package/optimize/es/themes/index.js +2 -1
- package/optimize/lib/components/accessibility/skip_link/skip_link.js +30 -8
- package/optimize/lib/components/accessibility/skip_link/skip_link.styles.js +1 -1
- package/optimize/lib/components/avatar/avatar.js +5 -9
- package/optimize/lib/components/bottom_bar/bottom_bar.js +6 -9
- package/optimize/lib/components/breadcrumbs/breadcrumbs.js +1 -2
- package/optimize/lib/components/call_out/call_out.js +9 -13
- package/optimize/lib/components/expression/expression.js +9 -11
- package/optimize/lib/components/facet/facet_button.js +7 -9
- package/optimize/lib/components/facet/facet_group.js +6 -8
- package/optimize/lib/components/health/health.js +5 -7
- package/optimize/lib/components/horizontal_rule/horizontal_rule.js +5 -7
- package/optimize/lib/components/link/link.js +6 -12
- package/optimize/lib/components/loading/loading_chart.js +5 -7
- package/optimize/lib/components/loading/loading_content.js +5 -7
- package/optimize/lib/components/loading/loading_logo.js +5 -7
- package/optimize/lib/components/loading/loading_spinner.js +5 -7
- package/optimize/lib/components/mark/mark.js +7 -9
- package/optimize/lib/components/markdown_editor/markdown_format.js +5 -7
- package/optimize/lib/components/panel/panel.js +6 -8
- package/optimize/lib/components/provider/index.js +7 -12
- package/optimize/lib/components/provider/provider.js +5 -40
- package/optimize/lib/components/spacer/spacer.js +5 -7
- package/optimize/lib/components/text/text.js +5 -7
- package/optimize/lib/components/text/text_color.js +5 -7
- package/optimize/lib/components/timeline/timeline_item.js +5 -7
- package/optimize/lib/components/timeline/timeline_item_icon.js +5 -7
- package/optimize/lib/components/title/title.js +6 -8
- package/optimize/lib/services/theme/hooks.js +2 -2
- package/optimize/lib/services/theme/provider.js +6 -3
- package/{lib/components/provider/system → optimize/lib/themes/amsterdam}/index.js +4 -4
- package/optimize/lib/themes/index.js +21 -1
- package/package.json +1 -1
- package/test-env/components/accessibility/skip_link/skip_link.js +46 -11
- package/test-env/components/accessibility/skip_link/skip_link.styles.js +1 -1
- package/test-env/components/avatar/avatar.js +8 -12
- package/test-env/components/bottom_bar/bottom_bar.js +6 -9
- package/test-env/components/breadcrumbs/breadcrumbs.js +1 -2
- package/test-env/components/call_out/call_out.js +10 -14
- package/test-env/components/expression/expression.js +12 -14
- package/test-env/components/facet/facet_button.js +10 -12
- package/test-env/components/facet/facet_group.js +9 -11
- package/test-env/components/health/health.js +8 -10
- package/test-env/components/horizontal_rule/horizontal_rule.js +8 -10
- package/test-env/components/link/link.js +7 -13
- package/test-env/components/loading/loading_chart.js +8 -10
- package/test-env/components/loading/loading_content.js +8 -10
- package/test-env/components/loading/loading_logo.js +8 -10
- package/test-env/components/loading/loading_spinner.js +8 -10
- package/test-env/components/mark/mark.js +10 -12
- package/test-env/components/markdown_editor/markdown_format.js +8 -10
- package/test-env/components/panel/panel.js +9 -11
- package/test-env/components/provider/index.js +7 -12
- package/test-env/components/provider/provider.js +5 -40
- package/test-env/components/spacer/spacer.js +8 -10
- package/test-env/components/text/text.js +8 -10
- package/test-env/components/text/text_color.js +8 -10
- package/test-env/components/timeline/timeline_item.js +8 -10
- package/test-env/components/timeline/timeline_item_icon.js +8 -10
- package/test-env/components/title/title.js +9 -11
- package/test-env/services/theme/hooks.js +2 -2
- package/test-env/services/theme/provider.js +6 -3
- package/{optimize/lib/components/provider/system → test-env/themes/amsterdam}/index.js +4 -4
- package/test-env/themes/index.js +21 -1
- package/es/components/provider/cache/cache_context.js +0 -12
- package/es/components/provider/cache/cache_provider.js +0 -17
- package/es/components/provider/cache/index.js +0 -9
- package/es/components/provider/system/index.js +0 -8
- package/es/components/provider/system/system.js +0 -33
- package/es/global_styling/utility/utility.js +0 -27
- package/lib/components/provider/cache/cache_context.js +0 -24
- package/lib/components/provider/cache/cache_provider.js +0 -29
- package/lib/components/provider/cache/index.js +0 -31
- package/lib/components/provider/system/system.js +0 -45
- package/lib/global_styling/utility/utility.js +0 -31
- package/optimize/es/components/provider/cache/cache_context.js +0 -12
- package/optimize/es/components/provider/cache/cache_provider.js +0 -17
- package/optimize/es/components/provider/system/system.js +0 -33
- package/optimize/es/global_styling/utility/utility.js +0 -27
- package/optimize/lib/components/provider/cache/cache_context.js +0 -24
- package/optimize/lib/components/provider/cache/cache_provider.js +0 -29
- package/optimize/lib/components/provider/cache/index.js +0 -31
- package/optimize/lib/components/provider/system/system.js +0 -54
- package/optimize/lib/global_styling/utility/utility.js +0 -31
- package/test-env/components/provider/cache/cache_context.js +0 -24
- package/test-env/components/provider/cache/cache_provider.js +0 -29
- package/test-env/components/provider/cache/index.js +0 -31
- package/test-env/components/provider/system/system.js +0 -54
- package/test-env/global_styling/utility/utility.js +0 -31
|
@@ -1,7 +1,13 @@
|
|
|
1
|
-
var _excluded = ["destinationId", "tabIndex", "position", "children", "className"
|
|
1
|
+
var _excluded = ["destinationId", "overrideLinkBehavior", "tabIndex", "position", "children", "className"];
|
|
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
|
|
|
5
|
+
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; }
|
|
6
|
+
|
|
7
|
+
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; }
|
|
8
|
+
|
|
9
|
+
function _defineProperty(obj, key, value) { if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; }
|
|
10
|
+
|
|
5
11
|
function _objectWithoutProperties(source, excluded) { if (source == null) return {}; var target = _objectWithoutPropertiesLoose(source, excluded); var key, i; if (Object.getOwnPropertySymbols) { var sourceSymbolKeys = Object.getOwnPropertySymbols(source); for (i = 0; i < sourceSymbolKeys.length; i++) { key = sourceSymbolKeys[i]; if (excluded.indexOf(key) >= 0) continue; if (!Object.prototype.propertyIsEnumerable.call(source, key)) continue; target[key] = source[key]; } } return target; }
|
|
6
12
|
|
|
7
13
|
function _objectWithoutPropertiesLoose(source, excluded) { if (source == null) return {}; var target = {}; var sourceKeys = Object.keys(source); var key, i; for (i = 0; i < sourceKeys.length; i++) { key = sourceKeys[i]; if (excluded.indexOf(key) >= 0) continue; target[key] = source[key]; } return target; }
|
|
@@ -16,22 +22,23 @@ function _objectWithoutPropertiesLoose(source, excluded) { if (source == null) r
|
|
|
16
22
|
import React from 'react';
|
|
17
23
|
import PropTypes from "prop-types";
|
|
18
24
|
import classNames from 'classnames';
|
|
25
|
+
import { useEuiTheme } from '../../../services';
|
|
19
26
|
import { EuiButton } from '../../button/button';
|
|
20
|
-
import { withEuiSystem } from '../../provider/system';
|
|
21
27
|
import { EuiScreenReaderOnly } from '../screen_reader_only';
|
|
22
28
|
import { euiSkipLinkStyles } from './skip_link.styles';
|
|
23
29
|
import { jsx as ___EmotionJSX } from "@emotion/react";
|
|
24
30
|
export var POSITIONS = ['static', 'fixed', 'absolute'];
|
|
25
|
-
export var
|
|
31
|
+
export var EuiSkipLink = function EuiSkipLink(_ref) {
|
|
26
32
|
var destinationId = _ref.destinationId,
|
|
33
|
+
overrideLinkBehavior = _ref.overrideLinkBehavior,
|
|
27
34
|
tabIndex = _ref.tabIndex,
|
|
28
35
|
_ref$position = _ref.position,
|
|
29
36
|
position = _ref$position === void 0 ? 'static' : _ref$position,
|
|
30
37
|
children = _ref.children,
|
|
31
38
|
className = _ref.className,
|
|
32
|
-
euiTheme = _ref.euiTheme,
|
|
33
39
|
rest = _objectWithoutProperties(_ref, _excluded);
|
|
34
40
|
|
|
41
|
+
var euiTheme = useEuiTheme();
|
|
35
42
|
var styles = euiSkipLinkStyles(euiTheme);
|
|
36
43
|
var classes = classNames('euiSkipLink', className);
|
|
37
44
|
var cssStyles = [styles.euiSkipLink, position !== 'static' ? styles[position] : undefined]; // Create the `href` from `destinationId`
|
|
@@ -44,6 +51,22 @@ export var _EuiSkipLink = function _EuiSkipLink(_ref) {
|
|
|
44
51
|
};
|
|
45
52
|
}
|
|
46
53
|
|
|
54
|
+
if (overrideLinkBehavior) {
|
|
55
|
+
optionalProps = _objectSpread(_objectSpread({}, optionalProps), {}, {
|
|
56
|
+
onClick: function onClick(e) {
|
|
57
|
+
e.preventDefault();
|
|
58
|
+
var destinationEl = document.getElementById(destinationId);
|
|
59
|
+
if (!destinationEl) return;
|
|
60
|
+
destinationEl.scrollIntoView();
|
|
61
|
+
destinationEl.tabIndex = -1; // Ensure the destination content is focusable
|
|
62
|
+
|
|
63
|
+
destinationEl.focus({
|
|
64
|
+
preventScroll: true
|
|
65
|
+
}); // Scrolling is already handled above, and focus's autoscroll behaves oddly around fixed headers
|
|
66
|
+
}
|
|
67
|
+
});
|
|
68
|
+
}
|
|
69
|
+
|
|
47
70
|
return ___EmotionJSX(EuiScreenReaderOnly, {
|
|
48
71
|
showOnFocus: true
|
|
49
72
|
}, ___EmotionJSX(EuiButton, _extends({
|
|
@@ -54,7 +77,7 @@ export var _EuiSkipLink = function _EuiSkipLink(_ref) {
|
|
|
54
77
|
fill: true
|
|
55
78
|
}, optionalProps, rest), children));
|
|
56
79
|
};
|
|
57
|
-
|
|
80
|
+
EuiSkipLink.propTypes = {
|
|
58
81
|
href: PropTypes.string,
|
|
59
82
|
onClick: PropTypes.func,
|
|
60
83
|
|
|
@@ -80,6 +103,19 @@ _EuiSkipLink.propTypes = {
|
|
|
80
103
|
*/
|
|
81
104
|
destinationId: PropTypes.string.isRequired,
|
|
82
105
|
|
|
106
|
+
/**
|
|
107
|
+
* If default HTML anchor link behavior is not desired (e.g. for SPAs with hash routing),
|
|
108
|
+
* setting this flag to true will manually scroll to and focus the destination element
|
|
109
|
+
* without changing the browser URL's hash
|
|
110
|
+
*/
|
|
111
|
+
|
|
112
|
+
/**
|
|
113
|
+
* If default HTML anchor link behavior is not desired (e.g. for SPAs with hash routing),
|
|
114
|
+
* setting this flag to true will manually scroll to and focus the destination element
|
|
115
|
+
* without changing the browser URL's hash
|
|
116
|
+
*/
|
|
117
|
+
overrideLinkBehavior: PropTypes.bool,
|
|
118
|
+
|
|
83
119
|
/**
|
|
84
120
|
* When position is fixed, this is forced to `0`
|
|
85
121
|
*/
|
|
@@ -163,5 +199,4 @@ _EuiSkipLink.propTypes = {
|
|
|
163
199
|
"aria-label": PropTypes.string,
|
|
164
200
|
"data-test-subj": PropTypes.string,
|
|
165
201
|
buttonRef: PropTypes.any
|
|
166
|
-
};
|
|
167
|
-
export var EuiSkipLink = withEuiSystem(_EuiSkipLink);
|
|
202
|
+
};
|
|
@@ -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
|
};
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
var _excluded = ["className", "color", "
|
|
1
|
+
var _excluded = ["className", "color", "imageUrl", "initials", "initialsLength", "iconType", "iconSize", "iconColor", "name", "size", "type", "isDisabled", "style"];
|
|
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
|
|
|
@@ -31,19 +31,17 @@ import React from 'react';
|
|
|
31
31
|
import PropTypes from "prop-types";
|
|
32
32
|
import classNames from 'classnames';
|
|
33
33
|
import { isColorDark, hexToRgb, isValidHex } from '../../services/color';
|
|
34
|
-
import {
|
|
35
|
-
import { euiPaletteColorBlindBehindText, toInitials } from '../../services';
|
|
34
|
+
import { euiPaletteColorBlindBehindText, toInitials, useEuiTheme } from '../../services';
|
|
36
35
|
import { EuiIcon } from '../icon';
|
|
37
36
|
import { euiAvatarStyles } from './avatar.styles';
|
|
38
37
|
import { jsx as ___EmotionJSX } from "@emotion/react";
|
|
39
38
|
export var SIZES = ['s', 'm', 'l', 'xl'];
|
|
40
39
|
export var TYPES = ['space', 'user'];
|
|
41
|
-
export var
|
|
40
|
+
export var EuiAvatar = function EuiAvatar(_ref) {
|
|
42
41
|
var _classNames;
|
|
43
42
|
|
|
44
43
|
var className = _ref.className,
|
|
45
44
|
color = _ref.color,
|
|
46
|
-
euiTheme = _ref.euiTheme,
|
|
47
45
|
imageUrl = _ref.imageUrl,
|
|
48
46
|
initials = _ref.initials,
|
|
49
47
|
initialsLength = _ref.initialsLength,
|
|
@@ -60,6 +58,7 @@ export var _EuiAvatar = function _EuiAvatar(_ref) {
|
|
|
60
58
|
style = _ref.style,
|
|
61
59
|
rest = _objectWithoutProperties(_ref, _excluded);
|
|
62
60
|
|
|
61
|
+
var euiTheme = useEuiTheme();
|
|
63
62
|
var styles = euiAvatarStyles(euiTheme);
|
|
64
63
|
var visColors = euiPaletteColorBlindBehindText();
|
|
65
64
|
var isPlain = color === 'plain';
|
|
@@ -112,8 +111,9 @@ export var _EuiAvatar = function _EuiAvatar(_ref) {
|
|
|
112
111
|
role: isDisabled ? 'presentation' : 'img',
|
|
113
112
|
title: name
|
|
114
113
|
}, rest), content);
|
|
115
|
-
};
|
|
116
|
-
|
|
114
|
+
}; // TODO: Migrate to a service
|
|
115
|
+
|
|
116
|
+
EuiAvatar.propTypes = {
|
|
117
117
|
className: PropTypes.string,
|
|
118
118
|
"aria-label": PropTypes.string,
|
|
119
119
|
"data-test-subj": PropTypes.string,
|
|
@@ -174,8 +174,6 @@ _EuiAvatar.propTypes = {
|
|
|
174
174
|
*/
|
|
175
175
|
isDisabled: PropTypes.bool
|
|
176
176
|
};
|
|
177
|
-
export var EuiAvatar = withEuiSystem(_EuiAvatar); // TODO: Migrate to a service
|
|
178
|
-
|
|
179
177
|
export var checkValidColor = function checkValidColor(color) {
|
|
180
178
|
var validHex = color && isValidHex(color) || color === 'plain' || color === 'subdued';
|
|
181
179
|
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
var _excluded = ["position", "paddingSize", "affordForDisplacement", "children", "className", "bodyClassName", "landmarkHeading", "usePortal", "left", "right", "bottom", "top", "style"
|
|
1
|
+
var _excluded = ["position", "paddingSize", "affordForDisplacement", "children", "className", "bodyClassName", "landmarkHeading", "usePortal", "left", "right", "bottom", "top", "style"];
|
|
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
|
|
|
@@ -34,14 +34,13 @@ function _objectWithoutPropertiesLoose(source, excluded) { if (source == null) r
|
|
|
34
34
|
import classNames from 'classnames';
|
|
35
35
|
import PropTypes from "prop-types";
|
|
36
36
|
import React, { forwardRef, useEffect, useState } from 'react';
|
|
37
|
-
import { useCombinedRefs } from '../../services';
|
|
37
|
+
import { useCombinedRefs, useEuiTheme } from '../../services';
|
|
38
38
|
import { EuiScreenReaderOnly } from '../accessibility';
|
|
39
39
|
import { EuiI18n } from '../i18n';
|
|
40
40
|
import { useResizeObserver } from '../observer/resize_observer';
|
|
41
41
|
import { EuiPortal } from '../portal';
|
|
42
|
-
import { withEuiSystem } from '../provider/system';
|
|
43
|
-
import { EuiThemeProvider } from '../../services/theme/provider';
|
|
44
42
|
import { euiBottomBarStyles } from './bottom_bar.styles';
|
|
43
|
+
import { EuiThemeProvider } from '../../services/theme/provider';
|
|
45
44
|
import { jsx as ___EmotionJSX } from "@emotion/react";
|
|
46
45
|
// Exported for testing
|
|
47
46
|
export var paddingSizeToClassNameMap = {
|
|
@@ -51,7 +50,8 @@ export var paddingSizeToClassNameMap = {
|
|
|
51
50
|
l: 'euiBottomBar--paddingLarge'
|
|
52
51
|
};
|
|
53
52
|
export var POSITIONS = ['static', 'fixed', 'sticky'];
|
|
54
|
-
|
|
53
|
+
|
|
54
|
+
var _EuiBottomBar = /*#__PURE__*/forwardRef(function (_ref, ref) {
|
|
55
55
|
var _ref$position = _ref.position,
|
|
56
56
|
position = _ref$position === void 0 ? 'fixed' : _ref$position,
|
|
57
57
|
_ref$paddingSize = _ref.paddingSize,
|
|
@@ -72,9 +72,9 @@ export var _EuiBottomBar = /*#__PURE__*/forwardRef(function (_ref, ref) {
|
|
|
72
72
|
bottom = _ref$bottom === void 0 ? 0 : _ref$bottom,
|
|
73
73
|
top = _ref.top,
|
|
74
74
|
style = _ref.style,
|
|
75
|
-
euiTheme = _ref.euiTheme,
|
|
76
75
|
rest = _objectWithoutProperties(_ref, _excluded);
|
|
77
76
|
|
|
77
|
+
var euiTheme = useEuiTheme();
|
|
78
78
|
var styles = euiBottomBarStyles(euiTheme); // Force some props if `fixed` position, but not if the user has supplied these
|
|
79
79
|
|
|
80
80
|
affordForDisplacement = position !== 'fixed' ? false : affordForDisplacement;
|
|
@@ -148,6 +148,7 @@ export var _EuiBottomBar = /*#__PURE__*/forwardRef(function (_ref, ref) {
|
|
|
148
148
|
|
|
149
149
|
return usePortal ? ___EmotionJSX(EuiPortal, null, bar) : bar;
|
|
150
150
|
});
|
|
151
|
+
|
|
151
152
|
_EuiBottomBar.propTypes = {
|
|
152
153
|
className: PropTypes.string,
|
|
153
154
|
"aria-label": PropTypes.string,
|
|
@@ -212,9 +213,9 @@ _EuiBottomBar.propTypes = {
|
|
|
212
213
|
left: PropTypes.any
|
|
213
214
|
};
|
|
214
215
|
export var EuiBottomBar = /*#__PURE__*/forwardRef(function (props, ref) {
|
|
215
|
-
var BottomBar =
|
|
216
|
+
var BottomBar = _EuiBottomBar;
|
|
216
217
|
return ___EmotionJSX(EuiThemeProvider, {
|
|
217
|
-
colorMode:
|
|
218
|
+
colorMode: 'dark'
|
|
218
219
|
}, ___EmotionJSX(BottomBar, _extends({
|
|
219
220
|
ref: ref
|
|
220
221
|
}, props)));
|
|
@@ -184,8 +184,7 @@ export var EuiBreadcrumbs = function EuiBreadcrumbs(_ref) {
|
|
|
184
184
|
}, linkProps, breadcrumbRest), text);
|
|
185
185
|
}
|
|
186
186
|
|
|
187
|
-
return ___EmotionJSX(EuiLink
|
|
188
|
-
, _extends({
|
|
187
|
+
return ___EmotionJSX(EuiLink, _extends({
|
|
189
188
|
ref: ref,
|
|
190
189
|
color: isLastBreadcrumb ? 'text' : 'subdued',
|
|
191
190
|
onClick: onClick,
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
var _excluded = ["title", "color", "size", "iconType", "children", "className", "heading"
|
|
1
|
+
var _excluded = ["title", "color", "size", "iconType", "children", "className", "heading"];
|
|
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
|
|
|
@@ -20,14 +20,14 @@ import PropTypes from "prop-types";
|
|
|
20
20
|
import classNames from 'classnames';
|
|
21
21
|
import { EuiIcon } from '../icon';
|
|
22
22
|
import { EuiText } from '../text';
|
|
23
|
-
import {
|
|
23
|
+
import { useEuiTheme } from '../../services';
|
|
24
24
|
import { EuiPanel } from '../panel';
|
|
25
25
|
import { EuiTitle } from '../title';
|
|
26
26
|
import { euiCallOutStyles, euiCallOutHeadingStyles } from './call_out.styles';
|
|
27
27
|
import { jsx as ___EmotionJSX } from "@emotion/react";
|
|
28
28
|
export var COLORS = ['primary', 'success', 'warning', 'danger'];
|
|
29
29
|
export var HEADINGS = ['h1', 'h2', 'h3', 'h4', 'h5', 'h6', 'p'];
|
|
30
|
-
export var
|
|
30
|
+
export var EuiCallOut = /*#__PURE__*/forwardRef(function (_ref, ref) {
|
|
31
31
|
var title = _ref.title,
|
|
32
32
|
_ref$color = _ref.color,
|
|
33
33
|
color = _ref$color === void 0 ? 'primary' : _ref$color,
|
|
@@ -38,14 +38,14 @@ export var _EuiCallOut = /*#__PURE__*/forwardRef(function (_ref, ref) {
|
|
|
38
38
|
className = _ref.className,
|
|
39
39
|
_ref$heading = _ref.heading,
|
|
40
40
|
heading = _ref$heading === void 0 ? 'p' : _ref$heading,
|
|
41
|
-
euiTheme = _ref.euiTheme,
|
|
42
41
|
rest = _objectWithoutProperties(_ref, _excluded);
|
|
43
42
|
|
|
44
|
-
var
|
|
43
|
+
var theme = useEuiTheme();
|
|
44
|
+
var styles = euiCallOutStyles(theme);
|
|
45
45
|
var cssStyles = [styles.euiCallOut];
|
|
46
46
|
var cssIconStyle = [styles.euiCallOut__icon];
|
|
47
47
|
var cssDescriptionStyle = [styles.euiCallOut__description];
|
|
48
|
-
var headerStyles = euiCallOutHeadingStyles(
|
|
48
|
+
var headerStyles = euiCallOutHeadingStyles(theme);
|
|
49
49
|
var cssHeaderStyles = [headerStyles.euiCallOutHeader, headerStyles[color]];
|
|
50
50
|
var classes = classNames('euiCallOut', _defineProperty({}, "euiCallOut--".concat(color), color), className);
|
|
51
51
|
var headerIcon;
|
|
@@ -93,7 +93,7 @@ export var _EuiCallOut = /*#__PURE__*/forwardRef(function (_ref, ref) {
|
|
|
93
93
|
grow: false
|
|
94
94
|
}, rest), header, optionalChildren);
|
|
95
95
|
});
|
|
96
|
-
|
|
96
|
+
EuiCallOut.propTypes = {
|
|
97
97
|
className: PropTypes.string,
|
|
98
98
|
"aria-label": PropTypes.string,
|
|
99
99
|
"data-test-subj": PropTypes.string,
|
|
@@ -103,5 +103,4 @@ _EuiCallOut.propTypes = {
|
|
|
103
103
|
size: PropTypes.oneOf(["s", "m"]),
|
|
104
104
|
heading: PropTypes.any
|
|
105
105
|
};
|
|
106
|
-
|
|
107
|
-
export var EuiCallOut = withEuiSystem(_EuiCallOut);
|
|
106
|
+
EuiCallOut.displayName = 'EuiCallOut';
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
var _excluded = ["className", "description", "descriptionProps", "value", "valueProps", "color", "uppercase", "isActive", "display", "descriptionWidth", "onClick", "isInvalid", "textWrap"
|
|
1
|
+
var _excluded = ["className", "description", "descriptionProps", "value", "valueProps", "color", "uppercase", "isActive", "display", "descriptionWidth", "onClick", "isInvalid", "textWrap"];
|
|
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
|
|
|
@@ -23,11 +23,11 @@ import React from 'react';
|
|
|
23
23
|
import PropTypes from "prop-types";
|
|
24
24
|
import classNames from 'classnames';
|
|
25
25
|
import { EuiIcon } from '../icon';
|
|
26
|
-
import {
|
|
26
|
+
import { useEuiTheme } from '../../services';
|
|
27
27
|
import { euiExpressionStyles, euiExpressionDescriptionStyles, euiExpressionValueStyles, euiExpressionIconStyles } from './expression.styles';
|
|
28
28
|
import { jsx as ___EmotionJSX } from "@emotion/react";
|
|
29
29
|
export var COLORS = ['subdued', 'primary', 'success', 'accent', 'warning', 'danger'];
|
|
30
|
-
export var
|
|
30
|
+
export var EuiExpression = function EuiExpression(_ref) {
|
|
31
31
|
var className = _ref.className,
|
|
32
32
|
description = _ref.description,
|
|
33
33
|
descriptionProps = _ref.descriptionProps,
|
|
@@ -48,17 +48,17 @@ export var _EuiExpression = function _EuiExpression(_ref) {
|
|
|
48
48
|
isInvalid = _ref$isInvalid === void 0 ? false : _ref$isInvalid,
|
|
49
49
|
_ref$textWrap = _ref.textWrap,
|
|
50
50
|
textWrap = _ref$textWrap === void 0 ? 'break-word' : _ref$textWrap,
|
|
51
|
-
euiTheme = _ref.euiTheme,
|
|
52
51
|
rest = _objectWithoutProperties(_ref, _excluded);
|
|
53
52
|
|
|
54
53
|
var calculatedColor = isInvalid ? 'danger' : color;
|
|
55
|
-
var
|
|
54
|
+
var theme = useEuiTheme();
|
|
55
|
+
var styles = euiExpressionStyles(theme);
|
|
56
56
|
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];
|
|
57
|
-
var descriptionStyles = euiExpressionDescriptionStyles(
|
|
57
|
+
var descriptionStyles = euiExpressionDescriptionStyles(theme);
|
|
58
58
|
var cssDescriptionStyles = [descriptionStyles.euiExpression__description, isInvalid ? descriptionStyles.danger : descriptionStyles[color], uppercase && descriptionStyles.isUppercase, textWrap === 'truncate' && descriptionStyles.truncate, display === 'columns' && descriptionStyles.columns];
|
|
59
|
-
var valueStyles = euiExpressionValueStyles(
|
|
59
|
+
var valueStyles = euiExpressionValueStyles(theme);
|
|
60
60
|
var cssValueStyles = [valueStyles.euiExpression__value, textWrap === 'truncate' && valueStyles.truncate, display === 'columns' && valueStyles.columns];
|
|
61
|
-
var iconStyles = euiExpressionIconStyles(
|
|
61
|
+
var iconStyles = euiExpressionIconStyles(theme);
|
|
62
62
|
var cssIconStyles = [iconStyles.euiExpression__icon, display === 'columns' && iconStyles.columns];
|
|
63
63
|
var classes = classNames('euiExpression', className);
|
|
64
64
|
var Component = onClick ? 'button' : 'span';
|
|
@@ -85,7 +85,7 @@ export var _EuiExpression = function _EuiExpression(_ref) {
|
|
|
85
85
|
css: cssValueStyles
|
|
86
86
|
}, valueProps), value), invalidIcon);
|
|
87
87
|
};
|
|
88
|
-
|
|
88
|
+
EuiExpression.propTypes = {
|
|
89
89
|
className: PropTypes.string,
|
|
90
90
|
"aria-label": PropTypes.string,
|
|
91
91
|
"data-test-subj": PropTypes.string,
|
|
@@ -187,5 +187,4 @@ _EuiExpression.propTypes = {
|
|
|
187
187
|
* Sets how to handle the wrapping of long text.
|
|
188
188
|
*/
|
|
189
189
|
textWrap: PropTypes.oneOf(["break-word", "truncate"])
|
|
190
|
-
};
|
|
191
|
-
export var EuiExpression = withEuiSystem(_EuiExpression);
|
|
190
|
+
};
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
var _excluded = ["children", "className", "icon", "isDisabled", "isLoading", "isSelected", "quantity", "buttonRef"
|
|
1
|
+
var _excluded = ["children", "className", "icon", "isDisabled", "isLoading", "isSelected", "quantity", "buttonRef"];
|
|
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
|
|
|
@@ -20,11 +20,11 @@ import { EuiNotificationBadge } from '../badge';
|
|
|
20
20
|
import { EuiLoadingSpinner } from '../loading';
|
|
21
21
|
import { EuiInnerText } from '../inner_text';
|
|
22
22
|
import { cloneElementWithCss } from '../../services/theme/clone_element';
|
|
23
|
-
import {
|
|
23
|
+
import { useEuiTheme } from '../../services';
|
|
24
24
|
import { euiFacetButtonStyles, euiFacetButtonTextStyles, euiFacetButtonIconStyles, euiFacetButtonQuantityStyles, euiFacetButtonLoadingSpinnerStyles } from './facet_button.styles';
|
|
25
25
|
import { EuiButtonDisplay } from '../button/button_display/_button_display';
|
|
26
26
|
import { jsx as ___EmotionJSX } from "@emotion/react";
|
|
27
|
-
export var
|
|
27
|
+
export var EuiFacetButton = function EuiFacetButton(_ref) {
|
|
28
28
|
var children = _ref.children,
|
|
29
29
|
className = _ref.className,
|
|
30
30
|
icon = _ref.icon,
|
|
@@ -36,16 +36,16 @@ export var _EuiFacetButton = function _EuiFacetButton(_ref) {
|
|
|
36
36
|
isSelected = _ref$isSelected === void 0 ? false : _ref$isSelected,
|
|
37
37
|
quantity = _ref.quantity,
|
|
38
38
|
buttonRef = _ref.buttonRef,
|
|
39
|
-
euiTheme = _ref.euiTheme,
|
|
40
39
|
rest = _objectWithoutProperties(_ref, _excluded);
|
|
41
40
|
|
|
42
41
|
// If in the loading state, force disabled to true
|
|
43
42
|
isDisabled = isLoading ? true : isDisabled;
|
|
44
43
|
var selection = isSelected ? 'isSelected' : 'unSelected';
|
|
45
44
|
var classes = classNames('euiFacetButton', className);
|
|
46
|
-
var
|
|
45
|
+
var theme = useEuiTheme();
|
|
46
|
+
var styles = euiFacetButtonStyles(theme);
|
|
47
47
|
var cssStyles = [styles.euiFacetButton];
|
|
48
|
-
var textStyles = euiFacetButtonTextStyles(
|
|
48
|
+
var textStyles = euiFacetButtonTextStyles(theme);
|
|
49
49
|
var cssTextStyles = [textStyles.euiFacetButton__text, textStyles[selection]];
|
|
50
50
|
var quantityStyles = euiFacetButtonQuantityStyles();
|
|
51
51
|
var cssQuantityStyles = [quantityStyles.euiFacetButton__quantity, isDisabled && quantityStyles.isDisabled];
|
|
@@ -97,7 +97,7 @@ export var _EuiFacetButton = function _EuiFacetButton(_ref) {
|
|
|
97
97
|
}, children), buttonQuantity);
|
|
98
98
|
});
|
|
99
99
|
};
|
|
100
|
-
|
|
100
|
+
EuiFacetButton.propTypes = {
|
|
101
101
|
buttonRef: PropTypes.any,
|
|
102
102
|
|
|
103
103
|
/**
|
|
@@ -129,5 +129,4 @@ _EuiFacetButton.propTypes = {
|
|
|
129
129
|
className: PropTypes.string,
|
|
130
130
|
"aria-label": PropTypes.string,
|
|
131
131
|
"data-test-subj": PropTypes.string
|
|
132
|
-
};
|
|
133
|
-
export var EuiFacetButton = withEuiSystem(_EuiFacetButton);
|
|
132
|
+
};
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
var _excluded = ["children", "className", "layout", "gutterSize"
|
|
1
|
+
var _excluded = ["children", "className", "layout", "gutterSize"];
|
|
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,22 +16,22 @@ 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 { useEuiTheme } from '../../services';
|
|
20
20
|
import { euiFacetGroupStyles } from './facet_group.styles';
|
|
21
21
|
import { jsx as ___EmotionJSX } from "@emotion/react";
|
|
22
22
|
export var LAYOUTS = ['vertical', 'horizontal'];
|
|
23
23
|
export var GUTTER_SIZES = ['none', 's', 'm', 'l'];
|
|
24
|
-
export var
|
|
24
|
+
export var EuiFacetGroup = function EuiFacetGroup(_ref) {
|
|
25
25
|
var children = _ref.children,
|
|
26
26
|
className = _ref.className,
|
|
27
27
|
_ref$layout = _ref.layout,
|
|
28
28
|
layout = _ref$layout === void 0 ? 'vertical' : _ref$layout,
|
|
29
29
|
_ref$gutterSize = _ref.gutterSize,
|
|
30
30
|
gutterSize = _ref$gutterSize === void 0 ? 'm' : _ref$gutterSize,
|
|
31
|
-
euiTheme = _ref.euiTheme,
|
|
32
31
|
rest = _objectWithoutProperties(_ref, _excluded);
|
|
33
32
|
|
|
34
|
-
var
|
|
33
|
+
var theme = useEuiTheme();
|
|
34
|
+
var styles = euiFacetGroupStyles(theme, layout);
|
|
35
35
|
var cssStyles = [styles.euiFacetGroup, styles[gutterSize], styles[layout]];
|
|
36
36
|
var classes = classNames('euiFacetGroup', className);
|
|
37
37
|
return ___EmotionJSX("div", _extends({
|
|
@@ -39,7 +39,7 @@ export var _EuiFacetGroup = function _EuiFacetGroup(_ref) {
|
|
|
39
39
|
css: cssStyles
|
|
40
40
|
}, rest), children);
|
|
41
41
|
};
|
|
42
|
-
|
|
42
|
+
EuiFacetGroup.propTypes = {
|
|
43
43
|
className: PropTypes.string,
|
|
44
44
|
"aria-label": PropTypes.string,
|
|
45
45
|
"data-test-subj": PropTypes.string,
|
|
@@ -54,5 +54,4 @@ _EuiFacetGroup.propTypes = {
|
|
|
54
54
|
* Horizontal layout always adds more distance horizontally between buttons.
|
|
55
55
|
*/
|
|
56
56
|
gutterSize: PropTypes.any
|
|
57
|
-
};
|
|
58
|
-
export var EuiFacetGroup = withEuiSystem(_EuiFacetGroup);
|
|
57
|
+
};
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
var _excluded = ["children", "className", "color", "
|
|
1
|
+
var _excluded = ["children", "className", "color", "textSize"];
|
|
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,21 +16,21 @@ 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 { useEuiTheme } from '../../services';
|
|
20
20
|
import { euiHealthStyles } from './health.styles';
|
|
21
21
|
import { EuiIcon } from '../icon';
|
|
22
22
|
import { EuiFlexGroup, EuiFlexItem } from '../flex';
|
|
23
23
|
import { jsx as ___EmotionJSX } from "@emotion/react";
|
|
24
24
|
export var TEXT_SIZES = ['xs', 's', 'm', 'inherit'];
|
|
25
|
-
export var
|
|
25
|
+
export var EuiHealth = function EuiHealth(_ref) {
|
|
26
26
|
var children = _ref.children,
|
|
27
27
|
className = _ref.className,
|
|
28
28
|
color = _ref.color,
|
|
29
|
-
euiTheme = _ref.euiTheme,
|
|
30
29
|
_ref$textSize = _ref.textSize,
|
|
31
30
|
textSize = _ref$textSize === void 0 ? 's' : _ref$textSize,
|
|
32
31
|
rest = _objectWithoutProperties(_ref, _excluded);
|
|
33
32
|
|
|
33
|
+
var euiTheme = useEuiTheme();
|
|
34
34
|
var styles = euiHealthStyles(euiTheme);
|
|
35
35
|
var cssStyles = [styles.euiHealth, styles[textSize]];
|
|
36
36
|
var classes = classNames('euiHealth', className);
|
|
@@ -50,7 +50,7 @@ export var _EuiHealth = function _EuiHealth(_ref) {
|
|
|
50
50
|
grow: false
|
|
51
51
|
}, children)));
|
|
52
52
|
};
|
|
53
|
-
|
|
53
|
+
EuiHealth.propTypes = {
|
|
54
54
|
className: PropTypes.string,
|
|
55
55
|
"aria-label": PropTypes.string,
|
|
56
56
|
"data-test-subj": PropTypes.string,
|
|
@@ -67,5 +67,4 @@ _EuiHealth.propTypes = {
|
|
|
67
67
|
* The `inherit` style will get its font size from the parent element
|
|
68
68
|
*/
|
|
69
69
|
textSize: PropTypes.any
|
|
70
|
-
};
|
|
71
|
-
export var EuiHealth = withEuiSystem(_EuiHealth);
|
|
70
|
+
};
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
var _excluded = ["className", "
|
|
1
|
+
var _excluded = ["className", "size", "margin"];
|
|
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,7 +18,7 @@ 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 { useEuiTheme } from '../../services';
|
|
22
22
|
import { euiHorizontalRuleStyles } from './horizontal_rule.styles';
|
|
23
23
|
import { jsx as ___EmotionJSX } from "@emotion/react";
|
|
24
24
|
export var SIZES = ['full', 'half', 'quarter'];
|
|
@@ -32,17 +32,17 @@ var marginToClassNameMap = {
|
|
|
32
32
|
xl: 'marginXLarge',
|
|
33
33
|
xxl: 'marginXXLarge'
|
|
34
34
|
};
|
|
35
|
-
export var
|
|
35
|
+
export var EuiHorizontalRule = function EuiHorizontalRule(_ref) {
|
|
36
36
|
var _classNames;
|
|
37
37
|
|
|
38
38
|
var className = _ref.className,
|
|
39
|
-
euiTheme = _ref.euiTheme,
|
|
40
39
|
_ref$size = _ref.size,
|
|
41
40
|
size = _ref$size === void 0 ? 'full' : _ref$size,
|
|
42
41
|
_ref$margin = _ref.margin,
|
|
43
42
|
margin = _ref$margin === void 0 ? 'l' : _ref$margin,
|
|
44
43
|
rest = _objectWithoutProperties(_ref, _excluded);
|
|
45
44
|
|
|
45
|
+
var euiTheme = useEuiTheme();
|
|
46
46
|
var styles = euiHorizontalRuleStyles(euiTheme);
|
|
47
47
|
var classes = classNames('euiHorizontalRule', (_classNames = {}, _defineProperty(_classNames, "euiHorizontalRule--".concat(size), size), _defineProperty(_classNames, "euiHorizontalRule--".concat(marginToClassNameMap[margin]), margin && margin !== 'none'), _classNames), className);
|
|
48
48
|
var cssStyles = [styles.euiHorizontalRule, styles[size], styles[margin]];
|
|
@@ -51,7 +51,7 @@ export var _EuiHorizontalRule = function _EuiHorizontalRule(_ref) {
|
|
|
51
51
|
className: classes
|
|
52
52
|
}, rest));
|
|
53
53
|
};
|
|
54
|
-
|
|
54
|
+
EuiHorizontalRule.propTypes = {
|
|
55
55
|
/**
|
|
56
56
|
* Defines the width of the HR.
|
|
57
57
|
*/
|
|
@@ -60,5 +60,4 @@ _EuiHorizontalRule.propTypes = {
|
|
|
60
60
|
className: PropTypes.string,
|
|
61
61
|
"aria-label": PropTypes.string,
|
|
62
62
|
"data-test-subj": PropTypes.string
|
|
63
|
-
};
|
|
64
|
-
export var EuiHorizontalRule = withEuiSystem(_EuiHorizontalRule);
|
|
63
|
+
};
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
var _excluded = ["children", "color", "className", "href", "external", "target", "rel", "type", "onClick", "disabled"
|
|
1
|
+
var _excluded = ["children", "color", "className", "href", "external", "target", "rel", "type", "onClick", "disabled"];
|
|
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
|
|
|
@@ -22,8 +22,7 @@ function _objectWithoutPropertiesLoose(source, excluded) { if (source == null) r
|
|
|
22
22
|
import React, { forwardRef } from 'react';
|
|
23
23
|
import PropTypes from "prop-types";
|
|
24
24
|
import classNames from 'classnames';
|
|
25
|
-
import { getSecureRelForTarget } from '../../services';
|
|
26
|
-
import { withEuiSystem } from '../provider/system';
|
|
25
|
+
import { getSecureRelForTarget, useEuiTheme } from '../../services';
|
|
27
26
|
import { euiLinkStyles } from './link.styles';
|
|
28
27
|
import { EuiIcon } from '../icon';
|
|
29
28
|
import { EuiI18n, useEuiI18n } from '../i18n';
|
|
@@ -31,7 +30,7 @@ import { EuiScreenReaderOnly } from '../accessibility';
|
|
|
31
30
|
import { validateHref } from '../../services/security/href_validator';
|
|
32
31
|
import { jsx as ___EmotionJSX } from "@emotion/react";
|
|
33
32
|
export var COLORS = ['primary', 'subdued', 'success', 'accent', 'danger', 'warning', 'text', 'ghost'];
|
|
34
|
-
|
|
33
|
+
var EuiLink = /*#__PURE__*/forwardRef(function (_ref, ref) {
|
|
35
34
|
var children = _ref.children,
|
|
36
35
|
_ref$color = _ref.color,
|
|
37
36
|
color = _ref$color === void 0 ? 'primary' : _ref$color,
|
|
@@ -44,9 +43,9 @@ export var _EuiLink = /*#__PURE__*/forwardRef(function (_ref, ref) {
|
|
|
44
43
|
type = _ref$type === void 0 ? 'button' : _ref$type,
|
|
45
44
|
onClick = _ref.onClick,
|
|
46
45
|
_disabled = _ref.disabled,
|
|
47
|
-
euiTheme = _ref.euiTheme,
|
|
48
46
|
rest = _objectWithoutProperties(_ref, _excluded);
|
|
49
47
|
|
|
48
|
+
var euiTheme = useEuiTheme();
|
|
50
49
|
var styles = euiLinkStyles(euiTheme);
|
|
51
50
|
var cssStyles = [styles.euiLink];
|
|
52
51
|
var cssScreenReaderTextStyles = [styles.euiLink__screenReaderText];
|
|
@@ -102,7 +101,7 @@ export var _EuiLink = /*#__PURE__*/forwardRef(function (_ref, ref) {
|
|
|
102
101
|
ref: ref
|
|
103
102
|
}, anchorProps), children, showExternalLinkIcon && externalLinkIcon, target === '_blank' && newTargetScreenreaderText);
|
|
104
103
|
});
|
|
105
|
-
|
|
104
|
+
EuiLink.propTypes = {
|
|
106
105
|
className: PropTypes.string,
|
|
107
106
|
"aria-label": PropTypes.string,
|
|
108
107
|
"data-test-subj": PropTypes.string,
|
|
@@ -124,5 +123,5 @@ _EuiLink.propTypes = {
|
|
|
124
123
|
*/
|
|
125
124
|
external: PropTypes.bool
|
|
126
125
|
};
|
|
127
|
-
|
|
128
|
-
export
|
|
126
|
+
EuiLink.displayName = 'EuiLink';
|
|
127
|
+
export { EuiLink };
|