@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
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import _defineProperty from "@babel/runtime/helpers/defineProperty";
|
|
2
2
|
import _objectWithoutProperties from "@babel/runtime/helpers/objectWithoutProperties";
|
|
3
|
-
var _excluded = ["children", "color", "component", "cloneElement", "style"
|
|
3
|
+
var _excluded = ["children", "color", "component", "cloneElement", "style"];
|
|
4
4
|
|
|
5
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
6
|
|
|
@@ -15,11 +15,11 @@ function _objectSpread(target) { for (var i = 1; i < arguments.length; i++) { va
|
|
|
15
15
|
*/
|
|
16
16
|
import React, { isValidElement } from 'react';
|
|
17
17
|
import { cloneElementWithCss } from '../../services/theme/clone_element';
|
|
18
|
-
import {
|
|
18
|
+
import { useEuiTheme } from '../../services';
|
|
19
19
|
import { euiTextColorStyles } from './text_color.styles';
|
|
20
20
|
import { jsx as ___EmotionJSX } from "@emotion/react";
|
|
21
21
|
export var COLORS = ['default', 'subdued', 'success', 'accent', 'danger', 'warning', 'ghost', 'inherit'];
|
|
22
|
-
export var
|
|
22
|
+
export var EuiTextColor = function EuiTextColor(_ref) {
|
|
23
23
|
var children = _ref.children,
|
|
24
24
|
_ref$color = _ref.color,
|
|
25
25
|
color = _ref$color === void 0 ? 'default' : _ref$color,
|
|
@@ -28,10 +28,10 @@ export var _EuiTextColor = function _EuiTextColor(_ref) {
|
|
|
28
28
|
_ref$cloneElement = _ref.cloneElement,
|
|
29
29
|
cloneElement = _ref$cloneElement === void 0 ? false : _ref$cloneElement,
|
|
30
30
|
style = _ref.style,
|
|
31
|
-
euiTheme = _ref.euiTheme,
|
|
32
31
|
rest = _objectWithoutProperties(_ref, _excluded);
|
|
33
32
|
|
|
34
33
|
var isNamedColor = COLORS.includes(color);
|
|
34
|
+
var euiTheme = useEuiTheme();
|
|
35
35
|
var styles = euiTextColorStyles(euiTheme);
|
|
36
36
|
var cssStyles = [styles.euiTextColor, isNamedColor ? styles[color] : styles.customColor]; // We're checking if is a custom color.
|
|
37
37
|
// If it is a custom color we set the `color` of the `.euiTextColor` div to that custom color.
|
|
@@ -56,5 +56,4 @@ export var _EuiTextColor = function _EuiTextColor(_ref) {
|
|
|
56
56
|
var Component = component;
|
|
57
57
|
return ___EmotionJSX(Component, props, children);
|
|
58
58
|
}
|
|
59
|
-
};
|
|
60
|
-
export var EuiTextColor = withEuiSystem(_EuiTextColor);
|
|
59
|
+
};
|
|
@@ -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 = ["className", "items", "children"];
|
|
3
|
+
var _excluded = ["className", "items", "children", "gutterSize"];
|
|
4
4
|
|
|
5
5
|
/*
|
|
6
6
|
* Copyright Elasticsearch B.V. and/or licensed to Elasticsearch B.V. under one
|
|
@@ -11,19 +11,28 @@ var _excluded = ["className", "items", "children"];
|
|
|
11
11
|
*/
|
|
12
12
|
import React from 'react';
|
|
13
13
|
import classNames from 'classnames';
|
|
14
|
+
import { useEuiTheme } from '../../services';
|
|
14
15
|
import { EuiTimelineItem } from './timeline_item';
|
|
16
|
+
import { euiTimelineStyles } from './timeline.styles';
|
|
15
17
|
import { jsx as ___EmotionJSX } from "@emotion/react";
|
|
18
|
+
export var GUTTER_SIZES = ['m', 'l', 'xl'];
|
|
16
19
|
export var EuiTimeline = function EuiTimeline(_ref) {
|
|
17
20
|
var className = _ref.className,
|
|
18
21
|
_ref$items = _ref.items,
|
|
19
22
|
items = _ref$items === void 0 ? [] : _ref$items,
|
|
20
23
|
children = _ref.children,
|
|
24
|
+
_ref$gutterSize = _ref.gutterSize,
|
|
25
|
+
gutterSize = _ref$gutterSize === void 0 ? 'xl' : _ref$gutterSize,
|
|
21
26
|
rest = _objectWithoutProperties(_ref, _excluded);
|
|
22
27
|
|
|
23
28
|
var classes = classNames('euiTimeline', className);
|
|
29
|
+
var euiTheme = useEuiTheme();
|
|
30
|
+
var styles = euiTimelineStyles(euiTheme);
|
|
31
|
+
var cssStyles = [styles.euiTimeline, styles[gutterSize]];
|
|
24
32
|
return (// eslint-disable-next-line jsx-a11y/no-redundant-roles
|
|
25
33
|
___EmotionJSX("ol", _extends({
|
|
26
34
|
className: classes,
|
|
35
|
+
css: cssStyles,
|
|
27
36
|
role: "list"
|
|
28
37
|
}, rest), items.map(function (item, index) {
|
|
29
38
|
return ___EmotionJSX(EuiTimelineItem, _extends({
|
|
@@ -0,0 +1,29 @@
|
|
|
1
|
+
/*
|
|
2
|
+
* Copyright Elasticsearch B.V. and/or licensed to Elasticsearch B.V. under one
|
|
3
|
+
* or more contributor license agreements. Licensed under the Elastic License
|
|
4
|
+
* 2.0 and the Server Side Public License, v 1; you may not use this file except
|
|
5
|
+
* in compliance with, at your election, the Elastic License 2.0 or the Server
|
|
6
|
+
* Side Public License, v 1.
|
|
7
|
+
*/
|
|
8
|
+
import { css } from '@emotion/react';
|
|
9
|
+
import { logicalCSS } from '../../global_styling';
|
|
10
|
+
|
|
11
|
+
var _gutterSizeAdjustment = function _gutterSizeAdjustment(gutterSize) {
|
|
12
|
+
return "\n gap: ".concat(gutterSize, ";\n\n // The vertical line height needs to be adjusted with the gutter size\n [class*='euiTimelineItem-']:not(:last-child) > [class*='euiTimelineItemIcon-']::before {\n ").concat(logicalCSS('height', "calc(100% + ".concat(gutterSize, ")")), ";\n }\n ");
|
|
13
|
+
}; // The vertical line should only appear when the EuiTimelineItem's
|
|
14
|
+
// are wrapped in a EuiTimeline. That's why these styles live here.
|
|
15
|
+
|
|
16
|
+
|
|
17
|
+
var timelineVerticalLine = function timelineVerticalLine(euiTheme) {
|
|
18
|
+
return " \n [class*='euiTimelineItem-'] > [class*='euiTimelineItemIcon-']::before {\n content: '';\n position: absolute;\n ".concat(logicalCSS('top', 0), ";\n ").concat(logicalCSS('width', euiTheme.size.xxs), ";\n background-color: ").concat(euiTheme.colors.lightShade, ";\n }\n\n > [class*='euiTimelineItem-center']:first-child > [class*='euiTimelineItemIcon-']::before {\n ").concat(logicalCSS('top', '50%'), ";\n }\n \n > [class*='euiTimelineItem-center']:last-child:not(:only-child) > [class*='euiTimelineItemIcon-']::before {\n ").concat(logicalCSS('height', '50%'), ";\n }\n ");
|
|
19
|
+
};
|
|
20
|
+
|
|
21
|
+
export var euiTimelineStyles = function euiTimelineStyles(_ref) {
|
|
22
|
+
var euiTheme = _ref.euiTheme;
|
|
23
|
+
return {
|
|
24
|
+
euiTimeline: /*#__PURE__*/css("display:flex;flex-direction:column;", timelineVerticalLine(euiTheme), ";;label:euiTimeline;"),
|
|
25
|
+
m: /*#__PURE__*/css(_gutterSizeAdjustment(euiTheme.size.base), ";label:m;"),
|
|
26
|
+
l: /*#__PURE__*/css(_gutterSizeAdjustment(euiTheme.size.l), ";label:l;"),
|
|
27
|
+
xl: /*#__PURE__*/css(_gutterSizeAdjustment(euiTheme.size.xl), ";label:xl;")
|
|
28
|
+
};
|
|
29
|
+
};
|
|
@@ -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", "verticalAlign", "icon", "iconAriaLabel", "className"
|
|
3
|
+
var _excluded = ["children", "verticalAlign", "icon", "iconAriaLabel", "className"];
|
|
4
4
|
|
|
5
5
|
/*
|
|
6
6
|
* Copyright Elasticsearch B.V. and/or licensed to Elasticsearch B.V. under one
|
|
@@ -10,28 +10,23 @@ var _excluded = ["children", "verticalAlign", "icon", "iconAriaLabel", "classNam
|
|
|
10
10
|
* Side Public License, v 1.
|
|
11
11
|
*/
|
|
12
12
|
import React from 'react';
|
|
13
|
-
import { withEuiSystem } from '../provider/system';
|
|
14
13
|
import { EuiTimelineItemEvent } from './timeline_item_event';
|
|
15
14
|
import { EuiTimelineItemIcon } from './timeline_item_icon';
|
|
16
15
|
import { euiTimelineItemStyles } from './timeline_item.styles';
|
|
17
16
|
import { jsx as ___EmotionJSX } from "@emotion/react";
|
|
18
17
|
export var VERTICAL_ALIGN = ['top', 'center'];
|
|
19
|
-
export var
|
|
18
|
+
export var EuiTimelineItem = function EuiTimelineItem(_ref) {
|
|
20
19
|
var children = _ref.children,
|
|
21
20
|
_ref$verticalAlign = _ref.verticalAlign,
|
|
22
21
|
verticalAlign = _ref$verticalAlign === void 0 ? 'center' : _ref$verticalAlign,
|
|
23
22
|
icon = _ref.icon,
|
|
24
23
|
iconAriaLabel = _ref.iconAriaLabel,
|
|
25
24
|
className = _ref.className,
|
|
26
|
-
_ref$component = _ref.component,
|
|
27
|
-
component = _ref$component === void 0 ? 'li' : _ref$component,
|
|
28
|
-
euiTheme = _ref.euiTheme,
|
|
29
25
|
rest = _objectWithoutProperties(_ref, _excluded);
|
|
30
26
|
|
|
31
|
-
var styles = euiTimelineItemStyles(
|
|
32
|
-
var cssStyles = [styles.euiTimelineItem];
|
|
33
|
-
|
|
34
|
-
return ___EmotionJSX(Element, _extends({
|
|
27
|
+
var styles = euiTimelineItemStyles();
|
|
28
|
+
var cssStyles = [styles.euiTimelineItem, styles[verticalAlign]];
|
|
29
|
+
return ___EmotionJSX("li", _extends({
|
|
35
30
|
css: cssStyles
|
|
36
31
|
}, rest), ___EmotionJSX(EuiTimelineItemIcon, {
|
|
37
32
|
icon: icon,
|
|
@@ -40,5 +35,4 @@ export var _EuiTimelineItem = function _EuiTimelineItem(_ref) {
|
|
|
40
35
|
}), ___EmotionJSX(EuiTimelineItemEvent, {
|
|
41
36
|
verticalAlign: verticalAlign
|
|
42
37
|
}, children));
|
|
43
|
-
};
|
|
44
|
-
export var EuiTimelineItem = withEuiSystem(_EuiTimelineItem);
|
|
38
|
+
};
|
|
@@ -1,3 +1,5 @@
|
|
|
1
|
+
function _EMOTION_STRINGIFIED_CSS_ERROR__() { return "You have tried to stringify object returned from `css` function. It isn't supposed to be used directly (e.g. as value of the `className` prop), but rather handed to emotion so it can handle it (e.g. as value of `css` prop)."; }
|
|
2
|
+
|
|
1
3
|
/*
|
|
2
4
|
* Copyright Elasticsearch B.V. and/or licensed to Elasticsearch B.V. under one
|
|
3
5
|
* or more contributor license agreements. Licensed under the Elastic License
|
|
@@ -6,9 +8,22 @@
|
|
|
6
8
|
* Side Public License, v 1.
|
|
7
9
|
*/
|
|
8
10
|
import { css } from '@emotion/react';
|
|
9
|
-
|
|
10
|
-
|
|
11
|
+
|
|
12
|
+
var _ref = process.env.NODE_ENV === "production" ? {
|
|
13
|
+
name: "5bggde-euiTimelineItem",
|
|
14
|
+
styles: "display:flex;position:relative;label:euiTimelineItem;"
|
|
15
|
+
} : {
|
|
16
|
+
name: "5bggde-euiTimelineItem",
|
|
17
|
+
styles: "display:flex;position:relative;label:euiTimelineItem;",
|
|
18
|
+
toString: _EMOTION_STRINGIFIED_CSS_ERROR__
|
|
19
|
+
};
|
|
20
|
+
|
|
21
|
+
export var euiTimelineItemStyles = function euiTimelineItemStyles() {
|
|
11
22
|
return {
|
|
12
|
-
euiTimelineItem:
|
|
23
|
+
euiTimelineItem: _ref,
|
|
24
|
+
// Vertical alignments
|
|
25
|
+
// These classes are being targeted in timeline.styles.ts
|
|
26
|
+
top: /*#__PURE__*/css(";label:top;"),
|
|
27
|
+
center: /*#__PURE__*/css(";label:center;")
|
|
13
28
|
};
|
|
14
29
|
};
|
|
@@ -7,15 +7,15 @@
|
|
|
7
7
|
*/
|
|
8
8
|
import React from 'react';
|
|
9
9
|
import { EuiAvatar } from '../avatar';
|
|
10
|
-
import {
|
|
10
|
+
import { useEuiTheme } from '../../services';
|
|
11
11
|
import { euiTimelineItemIconStyles } from './timeline_item_icon.styles';
|
|
12
12
|
import { jsx as ___EmotionJSX } from "@emotion/react";
|
|
13
|
-
export var
|
|
13
|
+
export var EuiTimelineItemIcon = function EuiTimelineItemIcon(_ref) {
|
|
14
14
|
var icon = _ref.icon,
|
|
15
15
|
_ref$verticalAlign = _ref.verticalAlign,
|
|
16
16
|
verticalAlign = _ref$verticalAlign === void 0 ? 'center' : _ref$verticalAlign,
|
|
17
|
-
iconAriaLabel = _ref.iconAriaLabel
|
|
18
|
-
|
|
17
|
+
iconAriaLabel = _ref.iconAriaLabel;
|
|
18
|
+
var euiTheme = useEuiTheme();
|
|
19
19
|
var styles = euiTimelineItemIconStyles(euiTheme);
|
|
20
20
|
var cssStyles = [styles.euiTimelineItemIcon, styles[verticalAlign]];
|
|
21
21
|
var cssContentStyles = styles.euiTimelineItemIcon__content;
|
|
@@ -30,5 +30,4 @@ export var _EuiTimelineItemIcon = function _EuiTimelineItemIcon(_ref) {
|
|
|
30
30
|
}, ___EmotionJSX("div", {
|
|
31
31
|
css: cssContentStyles
|
|
32
32
|
}, iconRender));
|
|
33
|
-
};
|
|
34
|
-
export var EuiTimelineItemIcon = withEuiSystem(_EuiTimelineItemIcon);
|
|
33
|
+
};
|
|
@@ -8,6 +8,7 @@ function _EMOTION_STRINGIFIED_CSS_ERROR__() { return "You have tried to stringif
|
|
|
8
8
|
* Side Public License, v 1.
|
|
9
9
|
*/
|
|
10
10
|
import { css } from '@emotion/react';
|
|
11
|
+
import { logicalCSS } from '../../global_styling';
|
|
11
12
|
|
|
12
13
|
var _ref = process.env.NODE_ENV === "production" ? {
|
|
13
14
|
name: "8391db-center",
|
|
@@ -27,11 +28,20 @@ var _ref2 = process.env.NODE_ENV === "production" ? {
|
|
|
27
28
|
toString: _EMOTION_STRINGIFIED_CSS_ERROR__
|
|
28
29
|
};
|
|
29
30
|
|
|
30
|
-
|
|
31
|
-
|
|
31
|
+
var _ref3 = process.env.NODE_ENV === "production" ? {
|
|
32
|
+
name: "kuz8oa-euiTimelineItemIcon__content",
|
|
33
|
+
styles: "display:flex;justify-content:center;align-items:center;position:relative;label:euiTimelineItemIcon__content;"
|
|
34
|
+
} : {
|
|
35
|
+
name: "kuz8oa-euiTimelineItemIcon__content",
|
|
36
|
+
styles: "display:flex;justify-content:center;align-items:center;position:relative;label:euiTimelineItemIcon__content;",
|
|
37
|
+
toString: _EMOTION_STRINGIFIED_CSS_ERROR__
|
|
38
|
+
};
|
|
39
|
+
|
|
40
|
+
export var euiTimelineItemIconStyles = function euiTimelineItemIconStyles(_ref4) {
|
|
41
|
+
var euiTheme = _ref4.euiTheme;
|
|
32
42
|
return {
|
|
33
|
-
euiTimelineItemIcon: /*#__PURE__*/css("display:flex;position:relative;flex-grow:0;
|
|
34
|
-
euiTimelineItemIcon__content:
|
|
43
|
+
euiTimelineItemIcon: /*#__PURE__*/css("display:flex;position:relative;flex-grow:0;justify-content:center;", logicalCSS('margin-right', euiTheme.size.base), ";;label:euiTimelineItemIcon;"),
|
|
44
|
+
euiTimelineItemIcon__content: _ref3,
|
|
35
45
|
// Vertical alignments
|
|
36
46
|
top: _ref2,
|
|
37
47
|
center: _ref
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import _defineProperty from "@babel/runtime/helpers/defineProperty";
|
|
2
2
|
import _objectWithoutProperties from "@babel/runtime/helpers/objectWithoutProperties";
|
|
3
|
-
var _excluded = ["size", "children", "className", "textTransform"
|
|
3
|
+
var _excluded = ["size", "children", "className", "textTransform"];
|
|
4
4
|
|
|
5
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
6
|
|
|
@@ -14,20 +14,20 @@ function _objectSpread(target) { for (var i = 1; i < arguments.length; i++) { va
|
|
|
14
14
|
* Side Public License, v 1.
|
|
15
15
|
*/
|
|
16
16
|
import classNames from 'classnames';
|
|
17
|
+
import { useEuiTheme } from '../../services';
|
|
17
18
|
import { cloneElementWithCss } from '../../services/theme/clone_element';
|
|
18
19
|
import { euiTitleStyles } from './title.styles';
|
|
19
|
-
import { withEuiSystem } from '../provider/system';
|
|
20
20
|
export var TITLE_SIZES = ['xxxs', 'xxs', 'xs', 's', 'm', 'l'];
|
|
21
21
|
export var TEXT_TRANSFORM = ['uppercase'];
|
|
22
|
-
export var
|
|
22
|
+
export var EuiTitle = function EuiTitle(_ref) {
|
|
23
23
|
var _ref$size = _ref.size,
|
|
24
24
|
size = _ref$size === void 0 ? 'm' : _ref$size,
|
|
25
25
|
children = _ref.children,
|
|
26
26
|
className = _ref.className,
|
|
27
27
|
textTransform = _ref.textTransform,
|
|
28
|
-
euiTheme = _ref.euiTheme,
|
|
29
28
|
rest = _objectWithoutProperties(_ref, _excluded);
|
|
30
29
|
|
|
30
|
+
var euiTheme = useEuiTheme();
|
|
31
31
|
var styles = euiTitleStyles(euiTheme);
|
|
32
32
|
var cssStyles = [styles.euiTitle, textTransform ? styles[textTransform] : undefined, styles[size]];
|
|
33
33
|
var classes = classNames('euiTitle', className, children.props.className);
|
|
@@ -38,5 +38,4 @@ export var _EuiTitle = function _EuiTitle(_ref) {
|
|
|
38
38
|
}, rest);
|
|
39
39
|
|
|
40
40
|
return cloneElementWithCss(children, props);
|
|
41
|
-
};
|
|
42
|
-
export var EuiTitle = withEuiSystem(_EuiTitle);
|
|
41
|
+
};
|
|
@@ -46,9 +46,9 @@ var logicalPaddings = {
|
|
|
46
46
|
};
|
|
47
47
|
var logicalPosition = {
|
|
48
48
|
top: 'inset-block-start',
|
|
49
|
-
right: 'inset-inline-
|
|
49
|
+
right: 'inset-inline-end',
|
|
50
50
|
bottom: 'inset-block-end',
|
|
51
|
-
left: 'inset-inline-
|
|
51
|
+
left: 'inset-inline-start',
|
|
52
52
|
horizontal: 'inset-block',
|
|
53
53
|
vertical: 'inset-inline',
|
|
54
54
|
inset: 'inset'
|
|
@@ -1,5 +1,3 @@
|
|
|
1
|
-
function _EMOTION_STRINGIFIED_CSS_ERROR__() { return "You have tried to stringify object returned from `css` function. It isn't supposed to be used directly (e.g. as value of the `className` prop), but rather handed to emotion so it can handle it (e.g. as value of `css` prop)."; }
|
|
2
|
-
|
|
3
1
|
/*
|
|
4
2
|
* Copyright Elasticsearch B.V. and/or licensed to Elasticsearch B.V. under one
|
|
5
3
|
* or more contributor license agreements. Licensed under the Elastic License
|
|
@@ -10,18 +8,8 @@ function _EMOTION_STRINGIFIED_CSS_ERROR__() { return "You have tried to stringif
|
|
|
10
8
|
import React from 'react';
|
|
11
9
|
import { Global, css } from '@emotion/react';
|
|
12
10
|
import { jsx as ___EmotionJSX } from "@emotion/react";
|
|
13
|
-
|
|
14
|
-
var _ref = process.env.NODE_ENV === "production" ? {
|
|
15
|
-
name: "bd8dxy-EuiUtilityClasses",
|
|
16
|
-
styles: ".euiYolo{color:coral;};label:EuiUtilityClasses;"
|
|
17
|
-
} : {
|
|
18
|
-
name: "bd8dxy-EuiUtilityClasses",
|
|
19
|
-
styles: ".euiYolo{color:coral;};label:EuiUtilityClasses;",
|
|
20
|
-
toString: _EMOTION_STRINGIFIED_CSS_ERROR__
|
|
21
|
-
};
|
|
22
|
-
|
|
23
11
|
export var EuiUtilityClasses = function EuiUtilityClasses() {
|
|
24
12
|
return ___EmotionJSX(Global, {
|
|
25
|
-
styles:
|
|
13
|
+
styles: /*#__PURE__*/css(";label:EuiUtilityClasses;")
|
|
26
14
|
});
|
|
27
15
|
};
|
|
@@ -0,0 +1,27 @@
|
|
|
1
|
+
import _typeof from "@babel/runtime/helpers/typeof";
|
|
2
|
+
import _inherits from "@babel/runtime/helpers/inherits";
|
|
3
|
+
import _setPrototypeOf from "@babel/runtime/helpers/setPrototypeOf";
|
|
4
|
+
|
|
5
|
+
function _wrapRegExp() { _wrapRegExp = function _wrapRegExp(re, groups) { return new BabelRegExp(re, undefined, groups); }; var _super = RegExp.prototype; var _groups = new WeakMap(); function BabelRegExp(re, flags, groups) { var _this = new RegExp(re, flags); _groups.set(_this, groups || _groups.get(re)); return _setPrototypeOf(_this, BabelRegExp.prototype); } _inherits(BabelRegExp, RegExp); BabelRegExp.prototype.exec = function (str) { var result = _super.exec.call(this, str); if (result) result.groups = buildGroups(result, this); return result; }; BabelRegExp.prototype[Symbol.replace] = function (str, substitution) { if (typeof substitution === "string") { var groups = _groups.get(this); return _super[Symbol.replace].call(this, str, substitution.replace(/\$<([^>]+)>/g, function (_, name) { return "$" + groups[name]; })); } else if (typeof substitution === "function") { var _this = this; return _super[Symbol.replace].call(this, str, function () { var args = arguments; if (_typeof(args[args.length - 1]) !== "object") { args = [].slice.call(args); args.push(buildGroups(args, _this)); } return substitution.apply(this, args); }); } else { return _super[Symbol.replace].call(this, str, substitution); } }; function buildGroups(result, re) { var g = _groups.get(re); return Object.keys(g).reduce(function (groups, name) { groups[name] = result[g[name]]; return groups; }, Object.create(null)); } return _wrapRegExp.apply(this, arguments); }
|
|
6
|
+
|
|
7
|
+
/*
|
|
8
|
+
* Copyright Elasticsearch B.V. and/or licensed to Elasticsearch B.V. under one
|
|
9
|
+
* or more contributor license agreements. Licensed under the Elastic License
|
|
10
|
+
* 2.0 and the Server Side Public License, v 1; you may not use this file except
|
|
11
|
+
* in compliance with, at your election, the Elastic License 2.0 or the Server
|
|
12
|
+
* Side Public License, v 1.
|
|
13
|
+
*/
|
|
14
|
+
export var replaceEmotionPrefix = function replaceEmotionPrefix(selector) {
|
|
15
|
+
var _euiMatch$groups;
|
|
16
|
+
|
|
17
|
+
// Matches the Emotion className pattern + the EUI variant naming convention.
|
|
18
|
+
// Starts with `css-[hash]-`.
|
|
19
|
+
// Contains `eui[ComponentName] or `Eui[ComponentName]`.
|
|
20
|
+
// Capture the component name (from above) and all variant additions until the end of the string.
|
|
21
|
+
var euiMatch = selector.match( /*#__PURE__*/_wrapRegExp(/css\x2D[0-9A-Z_a-z]{6,}\x2D([Ee]ui[A-Z][\x2D0-9A-Z_a-z]*$)/, {
|
|
22
|
+
euiComponent: 1
|
|
23
|
+
})); // Use the captured group (`euiComponent`) if available and prepend with `emotion-`,
|
|
24
|
+
// otherwise use the full selector.
|
|
25
|
+
|
|
26
|
+
return euiMatch !== null && euiMatch !== void 0 && (_euiMatch$groups = euiMatch.groups) !== null && _euiMatch$groups !== void 0 && _euiMatch$groups.euiComponent ? "emotion-".concat(euiMatch.groups.euiComponent) : selector;
|
|
27
|
+
};
|
|
@@ -36,6 +36,10 @@ declare module '@elastic/eui/optimize/es/test/react_warnings' {
|
|
|
36
36
|
declare module '@elastic/eui/optimize/es/test/sleep' {
|
|
37
37
|
export function sleep(ms?: number): Promise<unknown>;
|
|
38
38
|
|
|
39
|
+
}
|
|
40
|
+
declare module '@elastic/eui/optimize/es/test/emotion-prefix' {
|
|
41
|
+
export const replaceEmotionPrefix: (selector: string) => string;
|
|
42
|
+
|
|
39
43
|
}
|
|
40
44
|
declare module '@elastic/eui/optimize/es/test' {
|
|
41
45
|
export { requiredProps } from '@elastic/eui/optimize/es/test/required_props';
|
|
@@ -43,5 +47,6 @@ declare module '@elastic/eui/optimize/es/test' {
|
|
|
43
47
|
export { findTestSubject } from '@elastic/eui/optimize/es/test/find_test_subject';
|
|
44
48
|
export { startThrowingReactWarnings, stopThrowingReactWarnings, } from '@elastic/eui/optimize/es/test/react_warnings';
|
|
45
49
|
export { sleep } from '@elastic/eui/optimize/es/test/sleep';
|
|
50
|
+
export * from '@elastic/eui/optimize/es/test/emotion-prefix';
|
|
46
51
|
|
|
47
52
|
}
|
|
@@ -9,4 +9,5 @@ export { requiredProps } from './required_props';
|
|
|
9
9
|
export { takeMountedSnapshot } from './take_mounted_snapshot';
|
|
10
10
|
export { findTestSubject } from './find_test_subject';
|
|
11
11
|
export { startThrowingReactWarnings, stopThrowingReactWarnings } from './react_warnings';
|
|
12
|
-
export { sleep } from './sleep';
|
|
12
|
+
export { sleep } from './sleep';
|
|
13
|
+
export * from './emotion-prefix';
|
|
@@ -6,4 +6,5 @@
|
|
|
6
6
|
* Side Public License, v 1.
|
|
7
7
|
*/
|
|
8
8
|
export { EUI_THEMES, isDefaultTheme } from './themes';
|
|
9
|
-
export { AMSTERDAM_NAME_KEY, EuiThemeAmsterdam } from './amsterdam/theme';
|
|
9
|
+
export { AMSTERDAM_NAME_KEY, EuiThemeAmsterdam } from './amsterdam/theme';
|
|
10
|
+
export * from './amsterdam';
|
|
@@ -5,19 +5,21 @@ var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefau
|
|
|
5
5
|
Object.defineProperty(exports, "__esModule", {
|
|
6
6
|
value: true
|
|
7
7
|
});
|
|
8
|
-
exports.
|
|
8
|
+
exports.POSITIONS = exports.EuiSkipLink = void 0;
|
|
9
9
|
|
|
10
10
|
var _extends2 = _interopRequireDefault(require("@babel/runtime/helpers/extends"));
|
|
11
11
|
|
|
12
|
+
var _defineProperty2 = _interopRequireDefault(require("@babel/runtime/helpers/defineProperty"));
|
|
13
|
+
|
|
12
14
|
var _objectWithoutProperties2 = _interopRequireDefault(require("@babel/runtime/helpers/objectWithoutProperties"));
|
|
13
15
|
|
|
14
16
|
var _react = _interopRequireDefault(require("react"));
|
|
15
17
|
|
|
16
18
|
var _classnames = _interopRequireDefault(require("classnames"));
|
|
17
19
|
|
|
18
|
-
var
|
|
20
|
+
var _services = require("../../../services");
|
|
19
21
|
|
|
20
|
-
var
|
|
22
|
+
var _button = require("../../button/button");
|
|
21
23
|
|
|
22
24
|
var _screen_reader_only = require("../screen_reader_only");
|
|
23
25
|
|
|
@@ -25,19 +27,25 @@ var _skip_link = require("./skip_link.styles");
|
|
|
25
27
|
|
|
26
28
|
var _react2 = require("@emotion/react");
|
|
27
29
|
|
|
28
|
-
var _excluded = ["destinationId", "tabIndex", "position", "children", "className"
|
|
30
|
+
var _excluded = ["destinationId", "overrideLinkBehavior", "tabIndex", "position", "children", "className"];
|
|
31
|
+
|
|
32
|
+
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; }
|
|
33
|
+
|
|
34
|
+
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) { (0, _defineProperty2.default)(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; }
|
|
35
|
+
|
|
29
36
|
var POSITIONS = ['static', 'fixed', 'absolute'];
|
|
30
37
|
exports.POSITIONS = POSITIONS;
|
|
31
38
|
|
|
32
|
-
var
|
|
39
|
+
var EuiSkipLink = function EuiSkipLink(_ref) {
|
|
33
40
|
var destinationId = _ref.destinationId,
|
|
41
|
+
overrideLinkBehavior = _ref.overrideLinkBehavior,
|
|
34
42
|
tabIndex = _ref.tabIndex,
|
|
35
43
|
_ref$position = _ref.position,
|
|
36
44
|
position = _ref$position === void 0 ? 'static' : _ref$position,
|
|
37
45
|
children = _ref.children,
|
|
38
46
|
className = _ref.className,
|
|
39
|
-
euiTheme = _ref.euiTheme,
|
|
40
47
|
rest = (0, _objectWithoutProperties2.default)(_ref, _excluded);
|
|
48
|
+
var euiTheme = (0, _services.useEuiTheme)();
|
|
41
49
|
var styles = (0, _skip_link.euiSkipLinkStyles)(euiTheme);
|
|
42
50
|
var classes = (0, _classnames.default)('euiSkipLink', className);
|
|
43
51
|
var cssStyles = [styles.euiSkipLink, position !== 'static' ? styles[position] : undefined]; // Create the `href` from `destinationId`
|
|
@@ -50,6 +58,22 @@ var _EuiSkipLink = function _EuiSkipLink(_ref) {
|
|
|
50
58
|
};
|
|
51
59
|
}
|
|
52
60
|
|
|
61
|
+
if (overrideLinkBehavior) {
|
|
62
|
+
optionalProps = _objectSpread(_objectSpread({}, optionalProps), {}, {
|
|
63
|
+
onClick: function onClick(e) {
|
|
64
|
+
e.preventDefault();
|
|
65
|
+
var destinationEl = document.getElementById(destinationId);
|
|
66
|
+
if (!destinationEl) return;
|
|
67
|
+
destinationEl.scrollIntoView();
|
|
68
|
+
destinationEl.tabIndex = -1; // Ensure the destination content is focusable
|
|
69
|
+
|
|
70
|
+
destinationEl.focus({
|
|
71
|
+
preventScroll: true
|
|
72
|
+
}); // Scrolling is already handled above, and focus's autoscroll behaves oddly around fixed headers
|
|
73
|
+
}
|
|
74
|
+
});
|
|
75
|
+
}
|
|
76
|
+
|
|
53
77
|
return (0, _react2.jsx)(_screen_reader_only.EuiScreenReaderOnly, {
|
|
54
78
|
showOnFocus: true
|
|
55
79
|
}, (0, _react2.jsx)(_button.EuiButton, (0, _extends2.default)({
|
|
@@ -61,6 +85,4 @@ var _EuiSkipLink = function _EuiSkipLink(_ref) {
|
|
|
61
85
|
}, optionalProps, rest), children));
|
|
62
86
|
};
|
|
63
87
|
|
|
64
|
-
exports._EuiSkipLink = _EuiSkipLink;
|
|
65
|
-
var EuiSkipLink = (0, _system.withEuiSystem)(_EuiSkipLink);
|
|
66
88
|
exports.EuiSkipLink = EuiSkipLink;
|
|
@@ -35,7 +35,7 @@ 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__*/(0, _react.css)("
|
|
38
|
+
fixed: /*#__PURE__*/(0, _react.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
|
};
|
|
41
41
|
|
|
@@ -5,7 +5,7 @@ var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefau
|
|
|
5
5
|
Object.defineProperty(exports, "__esModule", {
|
|
6
6
|
value: true
|
|
7
7
|
});
|
|
8
|
-
exports.checkValidColor = exports.
|
|
8
|
+
exports.checkValidColor = exports.TYPES = exports.SIZES = exports.EuiAvatar = void 0;
|
|
9
9
|
|
|
10
10
|
var _extends2 = _interopRequireDefault(require("@babel/runtime/helpers/extends"));
|
|
11
11
|
|
|
@@ -21,8 +21,6 @@ var _classnames = _interopRequireDefault(require("classnames"));
|
|
|
21
21
|
|
|
22
22
|
var _color = require("../../services/color");
|
|
23
23
|
|
|
24
|
-
var _system = require("../provider/system");
|
|
25
|
-
|
|
26
24
|
var _services = require("../../services");
|
|
27
25
|
|
|
28
26
|
var _icon = require("../icon");
|
|
@@ -31,18 +29,17 @@ var _avatar = require("./avatar.styles");
|
|
|
31
29
|
|
|
32
30
|
var _react2 = require("@emotion/react");
|
|
33
31
|
|
|
34
|
-
var _excluded = ["className", "color", "
|
|
32
|
+
var _excluded = ["className", "color", "imageUrl", "initials", "initialsLength", "iconType", "iconSize", "iconColor", "name", "size", "type", "isDisabled", "style"];
|
|
35
33
|
var SIZES = ['s', 'm', 'l', 'xl'];
|
|
36
34
|
exports.SIZES = SIZES;
|
|
37
35
|
var TYPES = ['space', 'user'];
|
|
38
36
|
exports.TYPES = TYPES;
|
|
39
37
|
|
|
40
|
-
var
|
|
38
|
+
var EuiAvatar = function EuiAvatar(_ref) {
|
|
41
39
|
var _classNames;
|
|
42
40
|
|
|
43
41
|
var className = _ref.className,
|
|
44
42
|
color = _ref.color,
|
|
45
|
-
euiTheme = _ref.euiTheme,
|
|
46
43
|
imageUrl = _ref.imageUrl,
|
|
47
44
|
initials = _ref.initials,
|
|
48
45
|
initialsLength = _ref.initialsLength,
|
|
@@ -58,6 +55,7 @@ var _EuiAvatar = function _EuiAvatar(_ref) {
|
|
|
58
55
|
isDisabled = _ref$isDisabled === void 0 ? false : _ref$isDisabled,
|
|
59
56
|
style = _ref.style,
|
|
60
57
|
rest = (0, _objectWithoutProperties2.default)(_ref, _excluded);
|
|
58
|
+
var euiTheme = (0, _services.useEuiTheme)();
|
|
61
59
|
var styles = (0, _avatar.euiAvatarStyles)(euiTheme);
|
|
62
60
|
var visColors = (0, _services.euiPaletteColorBlindBehindText)();
|
|
63
61
|
var isPlain = color === 'plain';
|
|
@@ -110,10 +108,8 @@ var _EuiAvatar = function _EuiAvatar(_ref) {
|
|
|
110
108
|
role: isDisabled ? 'presentation' : 'img',
|
|
111
109
|
title: name
|
|
112
110
|
}, rest), content);
|
|
113
|
-
};
|
|
111
|
+
}; // TODO: Migrate to a service
|
|
114
112
|
|
|
115
|
-
exports._EuiAvatar = _EuiAvatar;
|
|
116
|
-
var EuiAvatar = (0, _system.withEuiSystem)(_EuiAvatar); // TODO: Migrate to a service
|
|
117
113
|
|
|
118
114
|
exports.EuiAvatar = EuiAvatar;
|
|
119
115
|
|
|
@@ -7,7 +7,7 @@ var _typeof = require("@babel/runtime/helpers/typeof");
|
|
|
7
7
|
Object.defineProperty(exports, "__esModule", {
|
|
8
8
|
value: true
|
|
9
9
|
});
|
|
10
|
-
exports.paddingSizeToClassNameMap = exports.
|
|
10
|
+
exports.paddingSizeToClassNameMap = exports.POSITIONS = exports.EuiBottomBar = void 0;
|
|
11
11
|
|
|
12
12
|
var _extends2 = _interopRequireDefault(require("@babel/runtime/helpers/extends"));
|
|
13
13
|
|
|
@@ -31,15 +31,13 @@ var _resize_observer = require("../observer/resize_observer");
|
|
|
31
31
|
|
|
32
32
|
var _portal = require("../portal");
|
|
33
33
|
|
|
34
|
-
var
|
|
34
|
+
var _bottom_bar = require("./bottom_bar.styles");
|
|
35
35
|
|
|
36
36
|
var _provider = require("../../services/theme/provider");
|
|
37
37
|
|
|
38
|
-
var _bottom_bar = require("./bottom_bar.styles");
|
|
39
|
-
|
|
40
38
|
var _react2 = require("@emotion/react");
|
|
41
39
|
|
|
42
|
-
var _excluded = ["position", "paddingSize", "affordForDisplacement", "children", "className", "bodyClassName", "landmarkHeading", "usePortal", "left", "right", "bottom", "top", "style"
|
|
40
|
+
var _excluded = ["position", "paddingSize", "affordForDisplacement", "children", "className", "bodyClassName", "landmarkHeading", "usePortal", "left", "right", "bottom", "top", "style"];
|
|
43
41
|
|
|
44
42
|
function _getRequireWildcardCache(nodeInterop) { if (typeof WeakMap !== "function") return null; var cacheBabelInterop = new WeakMap(); var cacheNodeInterop = new WeakMap(); return (_getRequireWildcardCache = function _getRequireWildcardCache(nodeInterop) { return nodeInterop ? cacheNodeInterop : cacheBabelInterop; })(nodeInterop); }
|
|
45
43
|
|
|
@@ -81,8 +79,8 @@ var _EuiBottomBar = /*#__PURE__*/(0, _react.forwardRef)(function (_ref, ref) {
|
|
|
81
79
|
bottom = _ref$bottom === void 0 ? 0 : _ref$bottom,
|
|
82
80
|
top = _ref.top,
|
|
83
81
|
style = _ref.style,
|
|
84
|
-
euiTheme = _ref.euiTheme,
|
|
85
82
|
rest = (0, _objectWithoutProperties2.default)(_ref, _excluded);
|
|
83
|
+
var euiTheme = (0, _services.useEuiTheme)();
|
|
86
84
|
var styles = (0, _bottom_bar.euiBottomBarStyles)(euiTheme); // Force some props if `fixed` position, but not if the user has supplied these
|
|
87
85
|
|
|
88
86
|
affordForDisplacement = position !== 'fixed' ? false : affordForDisplacement;
|
|
@@ -156,11 +154,10 @@ var _EuiBottomBar = /*#__PURE__*/(0, _react.forwardRef)(function (_ref, ref) {
|
|
|
156
154
|
return usePortal ? (0, _react2.jsx)(_portal.EuiPortal, null, bar) : bar;
|
|
157
155
|
});
|
|
158
156
|
|
|
159
|
-
exports._EuiBottomBar = _EuiBottomBar;
|
|
160
157
|
var EuiBottomBar = /*#__PURE__*/(0, _react.forwardRef)(function (props, ref) {
|
|
161
|
-
var BottomBar =
|
|
158
|
+
var BottomBar = _EuiBottomBar;
|
|
162
159
|
return (0, _react2.jsx)(_provider.EuiThemeProvider, {
|
|
163
|
-
colorMode:
|
|
160
|
+
colorMode: 'dark'
|
|
164
161
|
}, (0, _react2.jsx)(BottomBar, (0, _extends2.default)({
|
|
165
162
|
ref: ref
|
|
166
163
|
}, props)));
|
|
@@ -183,8 +183,7 @@ var EuiBreadcrumbs = function EuiBreadcrumbs(_ref) {
|
|
|
183
183
|
}, linkProps, breadcrumbRest), text);
|
|
184
184
|
}
|
|
185
185
|
|
|
186
|
-
return (0, _react2.jsx)(_link.EuiLink
|
|
187
|
-
, (0, _extends2.default)({
|
|
186
|
+
return (0, _react2.jsx)(_link.EuiLink, (0, _extends2.default)({
|
|
188
187
|
ref: ref,
|
|
189
188
|
color: isLastBreadcrumb ? 'text' : 'subdued',
|
|
190
189
|
onClick: onClick,
|