@elastic/eui 70.0.0 → 70.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_theme_dark.css +0 -179
- package/dist/eui_theme_dark.min.css +1 -1
- package/dist/eui_theme_light.css +0 -179
- package/dist/eui_theme_light.min.css +1 -1
- package/es/components/badge/beta_badge/beta_badge.js +6 -6
- package/es/components/basic_table/in_memory_table.js +8 -0
- package/es/components/button/button_display/_button_display.js +7 -6
- package/es/components/button/button_display/_button_display.styles.js +4 -4
- package/es/components/button/button_display/_button_display_content.js +6 -9
- package/es/components/button/button_display/_button_display_content.styles.js +3 -41
- package/es/components/datagrid/controls/column_selector.js +1 -1
- package/es/components/datagrid/controls/column_sorting.js +1 -1
- package/es/components/header/header_links/header_links.js +6 -0
- package/es/components/loading/loading_spinner.js +14 -3
- package/es/components/loading/loading_spinner.styles.js +11 -7
- package/es/components/modal/modal.js +17 -2
- package/es/components/page_template/page_template.js +6 -9
- package/es/components/popover/popover.js +13 -3
- package/es/components/popover/popover_arrow/_popover_arrow.js +1 -0
- package/es/components/popover/popover_panel/_popover_panel.js +8 -2
- package/es/components/popover/popover_panel/_popover_panel.styles.js +15 -1
- package/es/components/search_bar/search_bar.js +39 -5
- package/es/components/search_bar/search_box.js +37 -4
- package/es/components/tabs/tab.js +33 -13
- package/es/components/tabs/tab.styles.js +50 -0
- package/es/components/tabs/tabbed_content/tabbed_content.js +16 -0
- package/es/components/tabs/tabs.js +20 -14
- package/es/components/tabs/tabs.styles.js +23 -0
- package/es/components/tour/tour_step.js +6 -0
- package/eui.d.ts +110 -47
- package/i18ntokens.json +4 -4
- package/lib/components/badge/beta_badge/beta_badge.js +6 -10
- package/lib/components/basic_table/in_memory_table.js +8 -0
- package/lib/components/button/button_display/_button_display.js +7 -6
- package/lib/components/button/button_display/_button_display.styles.js +4 -4
- package/lib/components/button/button_display/_button_display_content.js +6 -9
- package/lib/components/button/button_display/_button_display_content.styles.js +10 -40
- package/lib/components/datagrid/controls/column_selector.js +1 -1
- package/lib/components/datagrid/controls/column_sorting.js +1 -1
- package/lib/components/header/header_links/header_links.js +6 -0
- package/lib/components/loading/loading_spinner.js +13 -2
- package/lib/components/loading/loading_spinner.styles.js +14 -6
- package/lib/components/modal/modal.js +23 -2
- package/lib/components/page_template/page_template.js +6 -9
- package/lib/components/popover/popover.js +13 -3
- package/lib/components/popover/popover_arrow/_popover_arrow.js +1 -0
- package/lib/components/popover/popover_panel/_popover_panel.js +8 -2
- package/lib/components/popover/popover_panel/_popover_panel.styles.js +16 -1
- package/lib/components/search_bar/search_bar.js +40 -5
- package/lib/components/search_bar/search_box.js +38 -4
- package/lib/components/tabs/tab.js +33 -12
- package/lib/components/tabs/tab.styles.js +56 -0
- package/lib/components/tabs/tabbed_content/tabbed_content.js +16 -0
- package/lib/components/tabs/tabs.js +24 -14
- package/lib/components/tabs/tabs.styles.js +34 -0
- package/optimize/es/components/badge/beta_badge/beta_badge.js +6 -6
- package/optimize/es/components/button/button_display/_button_display.js +6 -5
- package/optimize/es/components/button/button_display/_button_display.styles.js +4 -4
- package/optimize/es/components/button/button_display/_button_display_content.js +6 -9
- package/optimize/es/components/button/button_display/_button_display_content.styles.js +3 -41
- package/optimize/es/components/datagrid/controls/column_selector.js +1 -1
- package/optimize/es/components/datagrid/controls/column_sorting.js +1 -1
- package/optimize/es/components/loading/loading_spinner.js +13 -3
- package/optimize/es/components/loading/loading_spinner.styles.js +11 -7
- package/optimize/es/components/modal/modal.js +17 -2
- package/optimize/es/components/page_template/page_template.js +6 -9
- package/optimize/es/components/popover/popover.js +7 -3
- package/optimize/es/components/popover/popover_arrow/_popover_arrow.js +1 -0
- package/optimize/es/components/popover/popover_panel/_popover_panel.js +6 -1
- package/optimize/es/components/popover/popover_panel/_popover_panel.styles.js +15 -1
- package/optimize/es/components/search_bar/search_bar.js +31 -5
- package/optimize/es/components/search_bar/search_box.js +29 -3
- package/optimize/es/components/tabs/tab.js +21 -13
- package/optimize/es/components/tabs/tab.styles.js +50 -0
- package/optimize/es/components/tabs/tabs.js +20 -14
- package/optimize/es/components/tabs/tabs.styles.js +23 -0
- package/optimize/lib/components/badge/beta_badge/beta_badge.js +6 -13
- package/optimize/lib/components/button/button_display/_button_display.js +7 -6
- package/optimize/lib/components/button/button_display/_button_display.styles.js +4 -4
- package/optimize/lib/components/button/button_display/_button_display_content.js +6 -9
- package/optimize/lib/components/button/button_display/_button_display_content.styles.js +10 -40
- package/optimize/lib/components/datagrid/controls/column_selector.js +1 -1
- package/optimize/lib/components/datagrid/controls/column_sorting.js +1 -1
- package/optimize/lib/components/loading/loading_spinner.js +14 -2
- package/optimize/lib/components/loading/loading_spinner.styles.js +14 -6
- package/optimize/lib/components/modal/modal.js +22 -2
- package/optimize/lib/components/page_template/page_template.js +6 -9
- package/optimize/lib/components/popover/popover.js +7 -3
- package/optimize/lib/components/popover/popover_arrow/_popover_arrow.js +1 -0
- package/optimize/lib/components/popover/popover_panel/_popover_panel.js +6 -1
- package/optimize/lib/components/popover/popover_panel/_popover_panel.styles.js +16 -1
- package/optimize/lib/components/search_bar/search_bar.js +31 -5
- package/optimize/lib/components/search_bar/search_box.js +30 -3
- package/optimize/lib/components/tabs/tab.js +21 -12
- package/optimize/lib/components/tabs/tab.styles.js +56 -0
- package/optimize/lib/components/tabs/tabs.js +24 -14
- package/optimize/lib/components/tabs/tabs.styles.js +34 -0
- package/package.json +4 -4
- package/src/components/datagrid/controls/_data_grid_toolbar.scss +0 -8
- package/src/components/index.scss +0 -1
- package/src/themes/amsterdam/overrides/_index.scss +0 -1
- package/test-env/components/badge/beta_badge/beta_badge.js +6 -13
- package/test-env/components/basic_table/in_memory_table.js +8 -0
- package/test-env/components/button/button_display/_button_display.js +7 -6
- package/test-env/components/button/button_display/_button_display.styles.js +4 -4
- package/test-env/components/button/button_display/_button_display_content.js +6 -9
- package/test-env/components/button/button_display/_button_display_content.styles.js +10 -40
- package/test-env/components/datagrid/controls/column_selector.js +1 -1
- package/test-env/components/datagrid/controls/column_sorting.js +1 -1
- package/test-env/components/header/header_links/header_links.js +6 -0
- package/test-env/components/loading/loading_spinner.js +14 -2
- package/test-env/components/loading/loading_spinner.styles.js +14 -6
- package/test-env/components/modal/modal.js +22 -2
- package/test-env/components/page_template/page_template.js +6 -9
- package/test-env/components/popover/popover.js +13 -3
- package/test-env/components/popover/popover_arrow/_popover_arrow.js +1 -0
- package/test-env/components/popover/popover_panel/_popover_panel.js +8 -2
- package/test-env/components/popover/popover_panel/_popover_panel.styles.js +16 -1
- package/test-env/components/search_bar/search_bar.js +39 -5
- package/test-env/components/search_bar/search_box.js +38 -4
- package/test-env/components/tabs/tab.js +33 -12
- package/test-env/components/tabs/tab.styles.js +56 -0
- package/test-env/components/tabs/tabbed_content/tabbed_content.js +16 -0
- package/test-env/components/tabs/tabs.js +24 -14
- package/test-env/components/tabs/tabs.styles.js +34 -0
- package/src/components/tabs/_index.scss +0 -1
- package/src/components/tabs/_tabs.scss +0 -110
- package/src/themes/amsterdam/overrides/_tabs.scss +0 -80
|
@@ -11,7 +11,11 @@ var _react = _interopRequireWildcard(require("react"));
|
|
|
11
11
|
|
|
12
12
|
var _classnames = _interopRequireDefault(require("classnames"));
|
|
13
13
|
|
|
14
|
-
var
|
|
14
|
+
var _services = require("../../services");
|
|
15
|
+
|
|
16
|
+
var _clone_element = require("../../services/theme/clone_element");
|
|
17
|
+
|
|
18
|
+
var _tabs = require("./tabs.styles");
|
|
15
19
|
|
|
16
20
|
var _react2 = require("@emotion/react");
|
|
17
21
|
|
|
@@ -29,13 +33,7 @@ function _objectWithoutProperties(source, excluded) { if (source == null) return
|
|
|
29
33
|
|
|
30
34
|
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; }
|
|
31
35
|
|
|
32
|
-
var
|
|
33
|
-
s: 'euiTabs--small',
|
|
34
|
-
m: null,
|
|
35
|
-
l: 'euiTabs--large',
|
|
36
|
-
xl: 'euiTabs--xlarge'
|
|
37
|
-
};
|
|
38
|
-
var SIZES = (0, _common.keysOf)(sizeToClassNameMap);
|
|
36
|
+
var SIZES = ['s', 'm', 'l', 'xl'];
|
|
39
37
|
exports.SIZES = SIZES;
|
|
40
38
|
var EuiTabs = /*#__PURE__*/(0, _react.forwardRef)(function (_ref, ref) {
|
|
41
39
|
var children = _ref.children,
|
|
@@ -48,16 +46,28 @@ var EuiTabs = /*#__PURE__*/(0, _react.forwardRef)(function (_ref, ref) {
|
|
|
48
46
|
size = _ref$size === void 0 ? 'm' : _ref$size,
|
|
49
47
|
rest = _objectWithoutProperties(_ref, _excluded);
|
|
50
48
|
|
|
51
|
-
var
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
49
|
+
var euiTheme = (0, _services.useEuiTheme)();
|
|
50
|
+
var classes = (0, _classnames.default)('euiTabs', className);
|
|
51
|
+
var tabsStyles = (0, _tabs.euiTabsStyles)(euiTheme);
|
|
52
|
+
var computedStyles = [tabsStyles.euiTabs, tabsStyles[size], bottomBorder && tabsStyles.bottomBorder];
|
|
53
|
+
|
|
54
|
+
var tabItems = _react.default.Children.map(children, function (child) {
|
|
55
|
+
if ( /*#__PURE__*/_react.default.isValidElement(child)) {
|
|
56
|
+
return (0, _clone_element.cloneElementWithCss)(child, {
|
|
57
|
+
// we're passing the parent `size` and `expand` down to the children
|
|
58
|
+
size: size,
|
|
59
|
+
expand: expand
|
|
60
|
+
});
|
|
61
|
+
}
|
|
62
|
+
});
|
|
63
|
+
|
|
55
64
|
return (0, _react2.jsx)("div", _extends({
|
|
56
65
|
ref: ref,
|
|
57
|
-
className: classes
|
|
66
|
+
className: classes,
|
|
67
|
+
css: computedStyles
|
|
58
68
|
}, children && {
|
|
59
69
|
role: 'tablist'
|
|
60
|
-
}, rest),
|
|
70
|
+
}, rest), tabItems);
|
|
61
71
|
});
|
|
62
72
|
exports.EuiTabs = EuiTabs;
|
|
63
73
|
EuiTabs.displayName = 'EuiTabs';
|
|
@@ -0,0 +1,34 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
Object.defineProperty(exports, "__esModule", {
|
|
4
|
+
value: true
|
|
5
|
+
});
|
|
6
|
+
exports.euiTabsStyles = void 0;
|
|
7
|
+
|
|
8
|
+
var _react = require("@emotion/react");
|
|
9
|
+
|
|
10
|
+
var _global_styling = require("../../global_styling");
|
|
11
|
+
|
|
12
|
+
/*
|
|
13
|
+
* Copyright Elasticsearch B.V. and/or licensed to Elasticsearch B.V. under one
|
|
14
|
+
* or more contributor license agreements. Licensed under the Elastic License
|
|
15
|
+
* 2.0 and the Server Side Public License, v 1; you may not use this file except
|
|
16
|
+
* in compliance with, at your election, the Elastic License 2.0 or the Server
|
|
17
|
+
* Side Public License, v 1.
|
|
18
|
+
*/
|
|
19
|
+
var euiTabsStyles = function euiTabsStyles(euiThemeContext) {
|
|
20
|
+
var euiTheme = euiThemeContext.euiTheme;
|
|
21
|
+
return {
|
|
22
|
+
euiTabs: /*#__PURE__*/(0, _react.css)("display:flex;", (0, _global_styling.logicalCSS)('max-width', '100%'), ";", (0, _global_styling.logicalCSSWithFallback)('overflow-x', 'auto'), ";", (0, _global_styling.logicalCSSWithFallback)('overflow-y', 'hidden'), ";position:relative;flex-shrink:0;;label:euiTabs;"),
|
|
23
|
+
bottomBorder: /*#__PURE__*/(0, _react.css)("box-shadow:inset 0 ", (0, _global_styling.mathWithUnits)(euiTheme.border.width.thin, function (x) {
|
|
24
|
+
return x * -1;
|
|
25
|
+
}), " 0 ", euiTheme.border.color, ";;label:bottomBorder;"),
|
|
26
|
+
// sizes
|
|
27
|
+
s: /*#__PURE__*/(0, _react.css)("gap:", euiTheme.size.m, ";;label:s;"),
|
|
28
|
+
m: /*#__PURE__*/(0, _react.css)("gap:", euiTheme.size.base, ";;label:m;"),
|
|
29
|
+
l: /*#__PURE__*/(0, _react.css)("gap:", euiTheme.size.l, ";;label:l;"),
|
|
30
|
+
xl: /*#__PURE__*/(0, _react.css)("gap:", euiTheme.size.xl, ";;label:xl;")
|
|
31
|
+
};
|
|
32
|
+
};
|
|
33
|
+
|
|
34
|
+
exports.euiTabsStyles = euiTabsStyles;
|
|
@@ -10,7 +10,7 @@ var _excluded = ["className", "label", "color", "tooltipContent", "tooltipPositi
|
|
|
10
10
|
* in compliance with, at your election, the Elastic License 2.0 or the Server
|
|
11
11
|
* Side Public License, v 1.
|
|
12
12
|
*/
|
|
13
|
-
import React
|
|
13
|
+
import React from 'react';
|
|
14
14
|
import classNames from 'classnames';
|
|
15
15
|
import { getSecureRelForTarget, useEuiTheme } from '../../../services';
|
|
16
16
|
import { EuiToolTip } from '../../tool_tip';
|
|
@@ -94,7 +94,7 @@ export var EuiBetaBadge = function EuiBetaBadge(_ref) {
|
|
|
94
94
|
anchorProps: anchorProps
|
|
95
95
|
}, content);
|
|
96
96
|
} else {
|
|
97
|
-
return ___EmotionJSX(
|
|
97
|
+
return ___EmotionJSX("span", anchorProps, content);
|
|
98
98
|
}
|
|
99
99
|
} else {
|
|
100
100
|
if (tooltipContent) {
|
|
@@ -116,11 +116,11 @@ export var EuiBetaBadge = function EuiBetaBadge(_ref) {
|
|
|
116
116
|
console.warn("Only string titles are permitted on badges that do not use tooltips. Found: ".concat(_typeof(spanTitle)));
|
|
117
117
|
}
|
|
118
118
|
|
|
119
|
-
return ___EmotionJSX("span", _extends({
|
|
120
|
-
css: cssStyles,
|
|
119
|
+
return ___EmotionJSX("span", anchorProps, ___EmotionJSX("span", _extends({
|
|
121
120
|
className: classes,
|
|
122
|
-
title: spanTitle
|
|
123
|
-
|
|
121
|
+
title: spanTitle,
|
|
122
|
+
css: cssStyles
|
|
123
|
+
}, rest), icon || label));
|
|
124
124
|
}
|
|
125
125
|
}
|
|
126
126
|
};
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import _extends from "@babel/runtime/helpers/extends";
|
|
2
1
|
import _defineProperty from "@babel/runtime/helpers/defineProperty";
|
|
2
|
+
import _extends from "@babel/runtime/helpers/extends";
|
|
3
3
|
import _objectWithoutProperties from "@babel/runtime/helpers/objectWithoutProperties";
|
|
4
4
|
var _excluded = ["children", "iconType", "iconSide", "iconSize", "size", "isDisabled", "disabled", "isLoading", "isSelected", "fullWidth", "minWidth", "contentProps", "textProps", "href", "target", "rel", "type", "style"];
|
|
5
5
|
|
|
@@ -39,7 +39,8 @@ export function isButtonDisabled(_ref) {
|
|
|
39
39
|
export var EuiButtonDisplay = /*#__PURE__*/forwardRef(function (_ref2, ref) {
|
|
40
40
|
var children = _ref2.children,
|
|
41
41
|
iconType = _ref2.iconType,
|
|
42
|
-
iconSide = _ref2.iconSide,
|
|
42
|
+
_ref2$iconSide = _ref2.iconSide,
|
|
43
|
+
iconSide = _ref2$iconSide === void 0 ? 'left' : _ref2$iconSide,
|
|
43
44
|
iconSize = _ref2.iconSize,
|
|
44
45
|
_ref2$size = _ref2.size,
|
|
45
46
|
size = _ref2$size === void 0 ? 'm' : _ref2$size,
|
|
@@ -75,7 +76,7 @@ export var EuiButtonDisplay = /*#__PURE__*/forwardRef(function (_ref2, ref) {
|
|
|
75
76
|
iconType: iconType,
|
|
76
77
|
iconSide: iconSide,
|
|
77
78
|
iconSize: iconSize,
|
|
78
|
-
textProps:
|
|
79
|
+
textProps: textProps
|
|
79
80
|
}, contentProps), children);
|
|
80
81
|
|
|
81
82
|
var element = href && !buttonIsDisabled ? 'a' : 'button';
|
|
@@ -104,8 +105,8 @@ export var EuiButtonDisplay = /*#__PURE__*/forwardRef(function (_ref2, ref) {
|
|
|
104
105
|
|
|
105
106
|
return createElement(element, _objectSpread(_objectSpread(_objectSpread({
|
|
106
107
|
css: cssStyles,
|
|
107
|
-
style: minWidth ? _objectSpread(_objectSpread({}, style), {}, {
|
|
108
|
-
|
|
108
|
+
style: minWidth != null ? _objectSpread(_objectSpread({}, style), {}, {
|
|
109
|
+
minInlineSize: minWidth
|
|
109
110
|
}) : style,
|
|
110
111
|
ref: ref
|
|
111
112
|
}, elementProps), relObj), rest), innerNode);
|
|
@@ -20,11 +20,11 @@ var _buttonSize = function _buttonSize(size) {
|
|
|
20
20
|
};
|
|
21
21
|
|
|
22
22
|
var _ref = process.env.NODE_ENV === "production" ? {
|
|
23
|
-
name: "
|
|
24
|
-
styles: "
|
|
23
|
+
name: "8595p9-isDisabled",
|
|
24
|
+
styles: "cursor:not-allowed;label:isDisabled;"
|
|
25
25
|
} : {
|
|
26
|
-
name: "
|
|
27
|
-
styles: "
|
|
26
|
+
name: "8595p9-isDisabled",
|
|
27
|
+
styles: "cursor:not-allowed;label:isDisabled;",
|
|
28
28
|
toString: _EMOTION_STRINGIFIED_CSS_ERROR__
|
|
29
29
|
};
|
|
30
30
|
|
|
@@ -28,14 +28,13 @@ export var EuiButtonDisplayContent = function EuiButtonDisplayContent(_ref) {
|
|
|
28
28
|
iconType = _ref.iconType,
|
|
29
29
|
_ref$iconSize = _ref.iconSize,
|
|
30
30
|
iconSize = _ref$iconSize === void 0 ? 'm' : _ref$iconSize,
|
|
31
|
-
iconSide = _ref.iconSide,
|
|
31
|
+
_ref$iconSide = _ref.iconSide,
|
|
32
|
+
iconSide = _ref$iconSide === void 0 ? 'left' : _ref$iconSide,
|
|
32
33
|
contentProps = _objectWithoutProperties(_ref, _excluded);
|
|
33
34
|
|
|
34
35
|
var theme = useEuiTheme();
|
|
35
36
|
var styles = euiButtonDisplayContentStyles(theme);
|
|
36
|
-
var cssStyles = [styles.euiButtonDisplayContent
|
|
37
|
-
var cssSpinnerStyles = [styles.euiButtonDisplayContent__spinner];
|
|
38
|
-
var cssIconStyles = [styles.euiButtonDisplayContent__icon, iconSize && styles[iconSize]]; // Add an icon to the button if one exists.
|
|
37
|
+
var cssStyles = [styles.euiButtonDisplayContent]; // Add an icon to the button if one exists.
|
|
39
38
|
|
|
40
39
|
var icon; // When the button is disabled the text gets gray
|
|
41
40
|
// and in some buttons the background gets a light gray
|
|
@@ -44,18 +43,16 @@ export var EuiButtonDisplayContent = function EuiButtonDisplayContent(_ref) {
|
|
|
44
43
|
// are always visible. The default spinner color could be very light.
|
|
45
44
|
|
|
46
45
|
var loadingSpinnerColor = isDisabled ? {
|
|
47
|
-
border: '
|
|
46
|
+
border: 'currentcolor'
|
|
48
47
|
} : undefined;
|
|
49
48
|
|
|
50
49
|
if (isLoading) {
|
|
51
50
|
icon = ___EmotionJSX(EuiLoadingSpinner, {
|
|
52
|
-
css: cssSpinnerStyles,
|
|
53
51
|
size: iconSize,
|
|
54
52
|
color: loadingSpinnerColor
|
|
55
53
|
});
|
|
56
54
|
} else if (iconType) {
|
|
57
55
|
icon = ___EmotionJSX(EuiIcon, {
|
|
58
|
-
css: cssIconStyles,
|
|
59
56
|
type: iconType,
|
|
60
57
|
size: iconSize,
|
|
61
58
|
color: "inherit" // forces the icon to inherit its parent color
|
|
@@ -66,7 +63,7 @@ export var EuiButtonDisplayContent = function EuiButtonDisplayContent(_ref) {
|
|
|
66
63
|
var isText = typeof children === 'string';
|
|
67
64
|
return ___EmotionJSX("span", _extends({
|
|
68
65
|
css: cssStyles
|
|
69
|
-
}, contentProps), icon, isText ? ___EmotionJSX("span", _extends({}, textProps, {
|
|
66
|
+
}, contentProps), iconSide === 'left' && icon, isText || textProps ? ___EmotionJSX("span", _extends({}, textProps, {
|
|
70
67
|
className: classNames('eui-textTruncate', textProps === null || textProps === void 0 ? void 0 : textProps.className)
|
|
71
|
-
}), children) : children);
|
|
68
|
+
}), children) : children, iconSide === 'right' && icon);
|
|
72
69
|
};
|
|
@@ -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
|
|
@@ -9,46 +7,10 @@ function _EMOTION_STRINGIFIED_CSS_ERROR__() { return "You have tried to stringif
|
|
|
9
7
|
*/
|
|
10
8
|
import { css } from '@emotion/react';
|
|
11
9
|
import { logicalCSS } from '../../../global_styling';
|
|
12
|
-
|
|
13
|
-
var
|
|
14
|
-
name: "gtg6j-euiButtonDisplayContent__icon",
|
|
15
|
-
styles: "flex-shrink:0;label:euiButtonDisplayContent__icon;"
|
|
16
|
-
} : {
|
|
17
|
-
name: "gtg6j-euiButtonDisplayContent__icon",
|
|
18
|
-
styles: "flex-shrink:0;label:euiButtonDisplayContent__icon;",
|
|
19
|
-
toString: _EMOTION_STRINGIFIED_CSS_ERROR__
|
|
20
|
-
};
|
|
21
|
-
|
|
22
|
-
var _ref2 = process.env.NODE_ENV === "production" ? {
|
|
23
|
-
name: "10wlo76-euiButtonDisplayContent__spinner",
|
|
24
|
-
styles: "flex-shrink:0;label:euiButtonDisplayContent__spinner;"
|
|
25
|
-
} : {
|
|
26
|
-
name: "10wlo76-euiButtonDisplayContent__spinner",
|
|
27
|
-
styles: "flex-shrink:0;label:euiButtonDisplayContent__spinner;",
|
|
28
|
-
toString: _EMOTION_STRINGIFIED_CSS_ERROR__
|
|
29
|
-
};
|
|
30
|
-
|
|
31
|
-
var _ref3 = process.env.NODE_ENV === "production" ? {
|
|
32
|
-
name: "qfl6yj-right",
|
|
33
|
-
styles: "flex-direction:row-reverse;label:right;"
|
|
34
|
-
} : {
|
|
35
|
-
name: "qfl6yj-right",
|
|
36
|
-
styles: "flex-direction:row-reverse;label:right;",
|
|
37
|
-
toString: _EMOTION_STRINGIFIED_CSS_ERROR__
|
|
38
|
-
};
|
|
39
|
-
|
|
40
|
-
export var euiButtonDisplayContentStyles = function euiButtonDisplayContentStyles(_ref4) {
|
|
41
|
-
var euiTheme = _ref4.euiTheme;
|
|
10
|
+
export var euiButtonDisplayContentStyles = function euiButtonDisplayContentStyles(_ref) {
|
|
11
|
+
var euiTheme = _ref.euiTheme;
|
|
42
12
|
return {
|
|
43
13
|
// Base
|
|
44
|
-
euiButtonDisplayContent: /*#__PURE__*/css(logicalCSS('height', '100%'), ";", logicalCSS('width', '100%'), ";display:flex;justify-content:center;align-items:center;vertical-align:middle;gap:", euiTheme.size.s, ";;label:euiButtonDisplayContent;")
|
|
45
|
-
// Icon side
|
|
46
|
-
left: /*#__PURE__*/css(";label:left;"),
|
|
47
|
-
right: _ref3,
|
|
48
|
-
euiButtonDisplayContent__spinner: _ref2,
|
|
49
|
-
euiButtonDisplayContent__icon: _ref,
|
|
50
|
-
// Icon size
|
|
51
|
-
s: /*#__PURE__*/css(";label:s;"),
|
|
52
|
-
m: /*#__PURE__*/css(";label:m;")
|
|
14
|
+
euiButtonDisplayContent: /*#__PURE__*/css(logicalCSS('height', '100%'), ";", logicalCSS('width', '100%'), ";display:flex;justify-content:center;align-items:center;vertical-align:middle;gap:", euiTheme.size.s, ";;label:euiButtonDisplayContent;")
|
|
53
15
|
};
|
|
54
16
|
};
|
|
@@ -110,7 +110,7 @@ export var useDataGridColumnSelector = function useDataGridColumnSelector(availa
|
|
|
110
110
|
},
|
|
111
111
|
anchorPosition: "downLeft",
|
|
112
112
|
panelPaddingSize: "s",
|
|
113
|
-
|
|
113
|
+
hasDragDrop: true,
|
|
114
114
|
button: ___EmotionJSX(EuiButtonEmpty, {
|
|
115
115
|
size: "xs",
|
|
116
116
|
iconType: allowColumnHiding ? 'listAdd' : 'list',
|
|
@@ -123,7 +123,7 @@ export var useDataGridColumnSorting = function useDataGridColumnSorting(columns,
|
|
|
123
123
|
},
|
|
124
124
|
anchorPosition: "downLeft",
|
|
125
125
|
panelPaddingSize: "s",
|
|
126
|
-
|
|
126
|
+
hasDragDrop: true,
|
|
127
127
|
button: ___EmotionJSX(EuiButtonEmpty, {
|
|
128
128
|
size: "xs",
|
|
129
129
|
iconType: "sortable",
|
|
@@ -1,6 +1,11 @@
|
|
|
1
1
|
import _extends from "@babel/runtime/helpers/extends";
|
|
2
|
+
import _defineProperty from "@babel/runtime/helpers/defineProperty";
|
|
2
3
|
import _objectWithoutProperties from "@babel/runtime/helpers/objectWithoutProperties";
|
|
3
|
-
var _excluded = ["size", "className", "aria-label", "color"];
|
|
4
|
+
var _excluded = ["size", "className", "aria-label", "color", "style"];
|
|
5
|
+
|
|
6
|
+
function ownKeys(object, enumerableOnly) { var keys = Object.keys(object); if (Object.getOwnPropertySymbols) { var symbols = Object.getOwnPropertySymbols(object); if (enumerableOnly) { symbols = symbols.filter(function (sym) { return Object.getOwnPropertyDescriptor(object, sym).enumerable; }); } keys.push.apply(keys, symbols); } return keys; }
|
|
7
|
+
|
|
8
|
+
function _objectSpread(target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i] != null ? arguments[i] : {}; if (i % 2) { ownKeys(Object(source), true).forEach(function (key) { _defineProperty(target, key, source[key]); }); } else if (Object.getOwnPropertyDescriptors) { Object.defineProperties(target, Object.getOwnPropertyDescriptors(source)); } else { ownKeys(Object(source)).forEach(function (key) { Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key)); }); } } return target; }
|
|
4
9
|
|
|
5
10
|
/*
|
|
6
11
|
* Copyright Elasticsearch B.V. and/or licensed to Elasticsearch B.V. under one
|
|
@@ -13,7 +18,7 @@ import React from 'react';
|
|
|
13
18
|
import classNames from 'classnames';
|
|
14
19
|
import { useEuiTheme } from '../..//services';
|
|
15
20
|
import { useLoadingAriaLabel } from './_loading_strings';
|
|
16
|
-
import { euiLoadingSpinnerStyles } from './loading_spinner.styles';
|
|
21
|
+
import { euiLoadingSpinnerStyles, euiSpinnerBorderColorsCSS } from './loading_spinner.styles';
|
|
17
22
|
import { jsx as ___EmotionJSX } from "@emotion/react";
|
|
18
23
|
export var SIZES = ['s', 'm', 'l', 'xl', 'xxl'];
|
|
19
24
|
export var EuiLoadingSpinner = function EuiLoadingSpinner(_ref) {
|
|
@@ -22,16 +27,21 @@ export var EuiLoadingSpinner = function EuiLoadingSpinner(_ref) {
|
|
|
22
27
|
className = _ref.className,
|
|
23
28
|
ariaLabel = _ref['aria-label'],
|
|
24
29
|
color = _ref.color,
|
|
30
|
+
style = _ref.style,
|
|
25
31
|
rest = _objectWithoutProperties(_ref, _excluded);
|
|
26
32
|
|
|
27
33
|
var euiTheme = useEuiTheme();
|
|
28
|
-
var styles = euiLoadingSpinnerStyles(euiTheme
|
|
34
|
+
var styles = euiLoadingSpinnerStyles(euiTheme);
|
|
29
35
|
var cssStyles = [styles.euiLoadingSpinner, styles[size]];
|
|
30
36
|
var classes = classNames('euiLoadingSpinner', className);
|
|
31
37
|
var defaultLabel = useLoadingAriaLabel();
|
|
38
|
+
var customColorStyle = color ? _objectSpread(_objectSpread({}, style), {}, {
|
|
39
|
+
borderColor: euiSpinnerBorderColorsCSS(euiTheme, color)
|
|
40
|
+
}) : style;
|
|
32
41
|
return ___EmotionJSX("span", _extends({
|
|
33
42
|
className: classes,
|
|
34
43
|
css: cssStyles,
|
|
44
|
+
style: customColorStyle,
|
|
35
45
|
role: "progressbar",
|
|
36
46
|
"aria-label": ariaLabel || defaultLabel
|
|
37
47
|
}, rest));
|
|
@@ -21,15 +21,19 @@ var spinnerSizes = {
|
|
|
21
21
|
xl: 'xl',
|
|
22
22
|
xxl: 'xxl'
|
|
23
23
|
};
|
|
24
|
-
|
|
25
|
-
var spinnerColorsCSS = function spinnerColorsCSS(border, highlight) {
|
|
26
|
-
return "\n border-color: ".concat(highlight, " ").concat(border, " ").concat(border, " ").concat(border, ";\n ");
|
|
27
|
-
};
|
|
28
|
-
|
|
29
|
-
export var euiLoadingSpinnerStyles = function euiLoadingSpinnerStyles(_ref, color) {
|
|
24
|
+
export var euiSpinnerBorderColorsCSS = function euiSpinnerBorderColorsCSS(_ref) {
|
|
30
25
|
var euiTheme = _ref.euiTheme;
|
|
26
|
+
var colors = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {};
|
|
27
|
+
var _colors$border = colors.border,
|
|
28
|
+
border = _colors$border === void 0 ? euiTheme.colors.lightShade : _colors$border,
|
|
29
|
+
_colors$highlight = colors.highlight,
|
|
30
|
+
highlight = _colors$highlight === void 0 ? euiTheme.colors.primary : _colors$highlight;
|
|
31
|
+
return "".concat(highlight, " ").concat(border, " ").concat(border, " ").concat(border);
|
|
32
|
+
};
|
|
33
|
+
export var euiLoadingSpinnerStyles = function euiLoadingSpinnerStyles(euiThemeContext) {
|
|
34
|
+
var euiTheme = euiThemeContext.euiTheme;
|
|
31
35
|
return {
|
|
32
|
-
euiLoadingSpinner: /*#__PURE__*/css("flex-shrink:0;display:inline-block;border-radius:50%;border:", euiTheme.border.thick, ";
|
|
36
|
+
euiLoadingSpinner: /*#__PURE__*/css("flex-shrink:0;display:inline-block;border-radius:50%;border:", euiTheme.border.thick, ";border-color:", euiSpinnerBorderColorsCSS(euiThemeContext), ";", euiCanAnimate, "{animation:", _loadingSpinner, " 0.6s infinite linear;};label:euiLoadingSpinner;"),
|
|
33
37
|
// Sizes
|
|
34
38
|
s: /*#__PURE__*/css(logicalSizeCSS(euiTheme.size[spinnerSizes.s], euiTheme.size[spinnerSizes.s]), " border-width:calc(", euiTheme.border.width.thin, " * 1.5);;label:s;"),
|
|
35
39
|
m: /*#__PURE__*/css(logicalSizeCSS(euiTheme.size[spinnerSizes.m], euiTheme.size[spinnerSizes.m]), " border-width:calc(", euiTheme.border.width.thin, " * 1.5);;label:m;"),
|
|
@@ -14,7 +14,7 @@ function _objectSpread(target) { for (var i = 1; i < arguments.length; i++) { va
|
|
|
14
14
|
* in compliance with, at your election, the Elastic License 2.0 or the Server
|
|
15
15
|
* Side Public License, v 1.
|
|
16
16
|
*/
|
|
17
|
-
import React from 'react';
|
|
17
|
+
import React, { useRef, useCallback } from 'react';
|
|
18
18
|
import classnames from 'classnames';
|
|
19
19
|
import { keys } from '../../services';
|
|
20
20
|
import { EuiButtonIcon } from '../button';
|
|
@@ -32,6 +32,19 @@ export var EuiModal = function EuiModal(_ref) {
|
|
|
32
32
|
style = _ref.style,
|
|
33
33
|
rest = _objectWithoutProperties(_ref, _excluded);
|
|
34
34
|
|
|
35
|
+
// TODO: Remove this onFocus scroll workaround after react-focus-on supports focusOptions
|
|
36
|
+
// @see https://github.com/elastic/eui/issues/6304
|
|
37
|
+
var bodyScrollTop = useRef(typeof window === 'undefined' ? undefined : window.scrollY // Account for SSR
|
|
38
|
+
);
|
|
39
|
+
var onFocus = useCallback(function () {
|
|
40
|
+
if (bodyScrollTop.current != null) {
|
|
41
|
+
window.scrollTo({
|
|
42
|
+
top: bodyScrollTop.current
|
|
43
|
+
});
|
|
44
|
+
bodyScrollTop.current = undefined; // Unset after first auto focus
|
|
45
|
+
}
|
|
46
|
+
}, []);
|
|
47
|
+
|
|
35
48
|
var onKeyDown = function onKeyDown(event) {
|
|
36
49
|
if (event.key === keys.ESCAPE) {
|
|
37
50
|
event.preventDefault();
|
|
@@ -54,11 +67,13 @@ export var EuiModal = function EuiModal(_ref) {
|
|
|
54
67
|
|
|
55
68
|
var classes = classnames('euiModal', widthClassName, className);
|
|
56
69
|
return ___EmotionJSX(EuiOverlayMask, null, ___EmotionJSX(EuiFocusTrap, {
|
|
57
|
-
initialFocus: initialFocus
|
|
70
|
+
initialFocus: initialFocus,
|
|
71
|
+
scrollLock: true
|
|
58
72
|
}, ___EmotionJSX("div", _extends({
|
|
59
73
|
className: classes,
|
|
60
74
|
onKeyDown: onKeyDown,
|
|
61
75
|
tabIndex: 0,
|
|
76
|
+
onFocus: onFocus,
|
|
62
77
|
style: newStyle || style
|
|
63
78
|
}, rest), ___EmotionJSX(EuiI18n, {
|
|
64
79
|
token: "euiModal.closeModal",
|
|
@@ -132,15 +132,12 @@ export var _EuiPageTemplate = function _EuiPageTemplate(_ref) {
|
|
|
132
132
|
React.Children.toArray(children).forEach(function (child, index) {
|
|
133
133
|
if (! /*#__PURE__*/React.isValidElement(child)) return; // Skip non-components
|
|
134
134
|
|
|
135
|
-
|
|
136
|
-
|
|
137
|
-
sidebar.
|
|
138
|
-
|
|
139
|
-
|
|
140
|
-
|
|
141
|
-
|
|
142
|
-
default:
|
|
143
|
-
sections.push(child);
|
|
135
|
+
if (child.type === EuiPageSidebar || child.props.__EMOTION_TYPE_PLEASE_DO_NOT_USE__ === EuiPageSidebar) {
|
|
136
|
+
sidebar.push( /*#__PURE__*/React.cloneElement(child, _objectSpread(_objectSpread({
|
|
137
|
+
key: "sidebar".concat(index)
|
|
138
|
+
}, getSideBarProps()), child.props)));
|
|
139
|
+
} else {
|
|
140
|
+
sections.push(child);
|
|
144
141
|
}
|
|
145
142
|
});
|
|
146
143
|
|
|
@@ -10,7 +10,7 @@ import _possibleConstructorReturn from "@babel/runtime/helpers/possibleConstruct
|
|
|
10
10
|
import _getPrototypeOf from "@babel/runtime/helpers/getPrototypeOf";
|
|
11
11
|
import _defineProperty from "@babel/runtime/helpers/defineProperty";
|
|
12
12
|
import _slicedToArray from "@babel/runtime/helpers/slicedToArray";
|
|
13
|
-
var _excluded = ["anchorClassName", "anchorPosition", "button", "buttonRef", "insert", "isOpen", "ownFocus", "children", "className", "closePopover", "panelClassName", "panelPaddingSize", "panelProps", "panelRef", "panelStyle", "popoverScreenReaderText", "popoverRef", "hasArrow", "arrowChildren", "repositionOnScroll", "zIndex", "attachToAnchor", "display", "offset", "onPositionChange", "onTrapDeactivation", "buffer", "aria-label", "aria-labelledby", "container", "focusTrapProps", "initialFocus", "tabIndex"];
|
|
13
|
+
var _excluded = ["anchorClassName", "anchorPosition", "button", "buttonRef", "insert", "isOpen", "ownFocus", "children", "className", "closePopover", "panelClassName", "panelPaddingSize", "panelProps", "panelRef", "panelStyle", "popoverScreenReaderText", "popoverRef", "hasArrow", "arrowChildren", "repositionOnScroll", "hasDragDrop", "zIndex", "attachToAnchor", "display", "offset", "onPositionChange", "onTrapDeactivation", "buffer", "aria-label", "aria-labelledby", "container", "focusTrapProps", "initialFocus", "tabIndex"];
|
|
14
14
|
|
|
15
15
|
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; }
|
|
16
16
|
|
|
@@ -382,7 +382,8 @@ export var EuiPopover = /*#__PURE__*/function (_Component) {
|
|
|
382
382
|
}, {
|
|
383
383
|
key: "render",
|
|
384
384
|
value: function render() {
|
|
385
|
-
var
|
|
385
|
+
var _panelProps$tabIndex,
|
|
386
|
+
_this4 = this;
|
|
386
387
|
|
|
387
388
|
var _this$props = this.props,
|
|
388
389
|
anchorClassName = _this$props.anchorClassName,
|
|
@@ -405,6 +406,7 @@ export var EuiPopover = /*#__PURE__*/function (_Component) {
|
|
|
405
406
|
hasArrow = _this$props.hasArrow,
|
|
406
407
|
arrowChildren = _this$props.arrowChildren,
|
|
407
408
|
repositionOnScroll = _this$props.repositionOnScroll,
|
|
409
|
+
hasDragDrop = _this$props.hasDragDrop,
|
|
408
410
|
zIndex = _this$props.zIndex,
|
|
409
411
|
attachToAnchor = _this$props.attachToAnchor,
|
|
410
412
|
display = _this$props.display,
|
|
@@ -417,9 +419,10 @@ export var EuiPopover = /*#__PURE__*/function (_Component) {
|
|
|
417
419
|
container = _this$props.container,
|
|
418
420
|
focusTrapProps = _this$props.focusTrapProps,
|
|
419
421
|
initialFocusProp = _this$props.initialFocus,
|
|
420
|
-
|
|
422
|
+
_tabIndexProp = _this$props.tabIndex,
|
|
421
423
|
rest = _objectWithoutProperties(_this$props, _excluded);
|
|
422
424
|
|
|
425
|
+
var tabIndexProp = (_panelProps$tabIndex = panelProps === null || panelProps === void 0 ? void 0 : panelProps.tabIndex) !== null && _panelProps$tabIndex !== void 0 ? _panelProps$tabIndex : _tabIndexProp;
|
|
423
426
|
var styles = euiPopoverStyles();
|
|
424
427
|
var popoverStyles = [styles.euiPopover, {
|
|
425
428
|
display: display
|
|
@@ -483,6 +486,7 @@ export var EuiPopover = /*#__PURE__*/function (_Component) {
|
|
|
483
486
|
position: this.state.arrowPosition,
|
|
484
487
|
isAttached: attachToAnchor,
|
|
485
488
|
className: classNames(panelClassName, panelProps === null || panelProps === void 0 ? void 0 : panelProps.className),
|
|
489
|
+
hasDragDrop: hasDragDrop,
|
|
486
490
|
hasShadow: false,
|
|
487
491
|
paddingSize: panelPaddingSize,
|
|
488
492
|
tabIndex: tabIndex,
|
|
@@ -23,6 +23,7 @@ export var EuiPopoverArrow = function EuiPopoverArrow(_ref) {
|
|
|
23
23
|
var styles = euiPopoverArrowStyles(euiTheme);
|
|
24
24
|
var cssStyles = [styles.euiPopoverArrow, styles[position]];
|
|
25
25
|
return ___EmotionJSX("div", _extends({
|
|
26
|
+
className: "euiPopover__arrow",
|
|
26
27
|
"data-popover-arrow": position,
|
|
27
28
|
css: cssStyles
|
|
28
29
|
}, rest), children);
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import _extends from "@babel/runtime/helpers/extends";
|
|
2
2
|
import _toConsumableArray from "@babel/runtime/helpers/toConsumableArray";
|
|
3
3
|
import _objectWithoutProperties from "@babel/runtime/helpers/objectWithoutProperties";
|
|
4
|
-
var _excluded = ["children", "className", "isOpen", "isAttached", "position"];
|
|
4
|
+
var _excluded = ["children", "className", "isOpen", "isAttached", "hasDragDrop", "position"];
|
|
5
5
|
|
|
6
6
|
/*
|
|
7
7
|
* Copyright Elasticsearch B.V. and/or licensed to Elasticsearch B.V. under one
|
|
@@ -29,6 +29,7 @@ export var EuiPopoverPanel = function EuiPopoverPanel(_ref) {
|
|
|
29
29
|
className = _ref.className,
|
|
30
30
|
isOpen = _ref.isOpen,
|
|
31
31
|
isAttached = _ref.isAttached,
|
|
32
|
+
hasDragDrop = _ref.hasDragDrop,
|
|
32
33
|
position = _ref.position,
|
|
33
34
|
rest = _objectWithoutProperties(_ref, _excluded);
|
|
34
35
|
|
|
@@ -44,6 +45,10 @@ export var EuiPopoverPanel = function EuiPopoverPanel(_ref) {
|
|
|
44
45
|
panelCSS = [].concat(_toConsumableArray(panelCSS), [isOpen && styles.attached.isOpen, position && styles.attached[position]]);
|
|
45
46
|
}
|
|
46
47
|
|
|
48
|
+
if (hasDragDrop) {
|
|
49
|
+
panelCSS = [].concat(_toConsumableArray(panelCSS), [styles.hasDragDrop.hasDragDrop, position && styles.hasDragDrop[position]]);
|
|
50
|
+
}
|
|
51
|
+
|
|
47
52
|
return ___EmotionJSX(EuiPopoverPanelContext.Provider, {
|
|
48
53
|
value: panelContext
|
|
49
54
|
}, ___EmotionJSX(EuiPanel, _extends({
|
|
@@ -7,6 +7,7 @@
|
|
|
7
7
|
*/
|
|
8
8
|
import { css } from '@emotion/react';
|
|
9
9
|
import { euiShadow, euiShadowFlat, euiShadowMedium } from '../../../themes/amsterdam/global_styling/mixins';
|
|
10
|
+
import { getShadowColor } from '../../../themes/amsterdam/global_styling/functions';
|
|
10
11
|
import { euiCanAnimate, logicalCSS } from '../../../global_styling';
|
|
11
12
|
export var openAnimationTiming = 'slow';
|
|
12
13
|
var translateDistance = 's';
|
|
@@ -17,7 +18,8 @@ var translateDistance = 's';
|
|
|
17
18
|
*/
|
|
18
19
|
|
|
19
20
|
export var euiPopoverPanelStyles = function euiPopoverPanelStyles(euiThemeContext) {
|
|
20
|
-
var euiTheme = euiThemeContext.euiTheme
|
|
21
|
+
var euiTheme = euiThemeContext.euiTheme,
|
|
22
|
+
colorMode = euiThemeContext.colorMode;
|
|
21
23
|
return {
|
|
22
24
|
// Base
|
|
23
25
|
euiPopover__panel: /*#__PURE__*/css("position:absolute;", logicalCSS('min-width', "".concat(euiTheme.base * 7, "px")), ";", logicalCSS('max-width', "calc(100vw - ".concat(euiTheme.size.xl, ")")), ";backface-visibility:hidden;pointer-events:none;opacity:0;transform:translateY(0) translateX(0) translateZ(0);", euiShadowMedium(euiThemeContext, {
|
|
@@ -38,6 +40,18 @@ export var euiPopoverPanelStyles = function euiPopoverPanelStyles(euiThemeContex
|
|
|
38
40
|
// Satisfies TS
|
|
39
41
|
left: /*#__PURE__*/css(";label:left;"),
|
|
40
42
|
right: /*#__PURE__*/css(";label:right;")
|
|
43
|
+
},
|
|
44
|
+
// Overrides for drag & drop contexts within popovers. This is required because
|
|
45
|
+
// the fixed positions of drag and drop don't work inside of transformed elements
|
|
46
|
+
hasDragDrop: {
|
|
47
|
+
hasDragDrop: /*#__PURE__*/css("transform:none;filter:none;", euiShadowMedium(euiThemeContext, {
|
|
48
|
+
property: 'box-shadow'
|
|
49
|
+
}), ";;label:hasDragDrop;"),
|
|
50
|
+
// The offset transforms must be recreated in margins
|
|
51
|
+
top: /*#__PURE__*/css("margin-block-start:", euiTheme.size[translateDistance], ";;label:top;"),
|
|
52
|
+
bottom: /*#__PURE__*/css("margin-block-start:-", euiTheme.size[translateDistance], ";.euiPopover__arrow{filter:drop-shadow(\n 0 -6px 6px ", getShadowColor(euiTheme.colors.shadow, 0.12, colorMode), "\n );};label:bottom;"),
|
|
53
|
+
left: /*#__PURE__*/css("margin-inline-start:", euiTheme.size[translateDistance], ";.euiPopover__arrow{filter:drop-shadow(\n 6px 0 6px ", getShadowColor(euiTheme.colors.shadow, 0.12, colorMode), "\n );};label:left;"),
|
|
54
|
+
right: /*#__PURE__*/css("margin-inline-start:-", euiTheme.size[translateDistance], ";.euiPopover__arrow{filter:drop-shadow(\n -6px 0 6px ", getShadowColor(euiTheme.colors.shadow, 0.12, colorMode), "\n );};label:right;")
|
|
41
55
|
}
|
|
42
56
|
};
|
|
43
57
|
};
|