@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
|
@@ -15,7 +15,7 @@ function _objectWithoutPropertiesLoose(source, excluded) { if (source == null) r
|
|
|
15
15
|
* in compliance with, at your election, the Elastic License 2.0 or the Server
|
|
16
16
|
* Side Public License, v 1.
|
|
17
17
|
*/
|
|
18
|
-
import React
|
|
18
|
+
import React from 'react';
|
|
19
19
|
import PropTypes from "prop-types";
|
|
20
20
|
import classNames from 'classnames';
|
|
21
21
|
import { getSecureRelForTarget, useEuiTheme } from '../../../services';
|
|
@@ -100,7 +100,7 @@ export var EuiBetaBadge = function EuiBetaBadge(_ref) {
|
|
|
100
100
|
anchorProps: anchorProps
|
|
101
101
|
}, content);
|
|
102
102
|
} else {
|
|
103
|
-
return ___EmotionJSX(
|
|
103
|
+
return ___EmotionJSX("span", anchorProps, content);
|
|
104
104
|
}
|
|
105
105
|
} else {
|
|
106
106
|
if (tooltipContent) {
|
|
@@ -122,11 +122,11 @@ export var EuiBetaBadge = function EuiBetaBadge(_ref) {
|
|
|
122
122
|
console.warn("Only string titles are permitted on badges that do not use tooltips. Found: ".concat(_typeof(spanTitle)));
|
|
123
123
|
}
|
|
124
124
|
|
|
125
|
-
return ___EmotionJSX("span", _extends({
|
|
126
|
-
css: cssStyles,
|
|
125
|
+
return ___EmotionJSX("span", anchorProps, ___EmotionJSX("span", _extends({
|
|
127
126
|
className: classes,
|
|
128
|
-
title: spanTitle
|
|
129
|
-
|
|
127
|
+
title: spanTitle,
|
|
128
|
+
css: cssStyles
|
|
129
|
+
}, rest), icon || label));
|
|
130
130
|
}
|
|
131
131
|
}
|
|
132
132
|
};
|
|
@@ -1140,6 +1140,14 @@ EuiInMemoryTable.propTypes = {
|
|
|
1140
1140
|
* Date formatter to use when parsing date values
|
|
1141
1141
|
*/
|
|
1142
1142
|
dateFormat: PropTypes.any,
|
|
1143
|
+
|
|
1144
|
+
/**
|
|
1145
|
+
* Hint to render below the search bar
|
|
1146
|
+
*/
|
|
1147
|
+
hint: PropTypes.shape({
|
|
1148
|
+
content: PropTypes.node.isRequired,
|
|
1149
|
+
popoverProps: PropTypes.any
|
|
1150
|
+
}),
|
|
1143
1151
|
className: PropTypes.string,
|
|
1144
1152
|
"aria-label": PropTypes.string,
|
|
1145
1153
|
"data-test-subj": PropTypes.string,
|
|
@@ -1,13 +1,13 @@
|
|
|
1
1
|
var _excluded = ["children", "iconType", "iconSide", "iconSize", "size", "isDisabled", "disabled", "isLoading", "isSelected", "fullWidth", "minWidth", "contentProps", "textProps", "href", "target", "rel", "type", "style"];
|
|
2
2
|
|
|
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
|
-
|
|
5
3
|
function ownKeys(object, enumerableOnly) { var keys = Object.keys(object); if (Object.getOwnPropertySymbols) { var symbols = Object.getOwnPropertySymbols(object); if (enumerableOnly) { symbols = symbols.filter(function (sym) { return Object.getOwnPropertyDescriptor(object, sym).enumerable; }); } keys.push.apply(keys, symbols); } return keys; }
|
|
6
4
|
|
|
7
5
|
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
6
|
|
|
9
7
|
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
8
|
|
|
9
|
+
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); }
|
|
10
|
+
|
|
11
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; }
|
|
12
12
|
|
|
13
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; }
|
|
@@ -45,7 +45,8 @@ export function isButtonDisabled(_ref) {
|
|
|
45
45
|
export var EuiButtonDisplay = /*#__PURE__*/forwardRef(function (_ref2, ref) {
|
|
46
46
|
var children = _ref2.children,
|
|
47
47
|
iconType = _ref2.iconType,
|
|
48
|
-
iconSide = _ref2.iconSide,
|
|
48
|
+
_ref2$iconSide = _ref2.iconSide,
|
|
49
|
+
iconSide = _ref2$iconSide === void 0 ? 'left' : _ref2$iconSide,
|
|
49
50
|
iconSize = _ref2.iconSize,
|
|
50
51
|
_ref2$size = _ref2.size,
|
|
51
52
|
size = _ref2$size === void 0 ? 'm' : _ref2$size,
|
|
@@ -81,7 +82,7 @@ export var EuiButtonDisplay = /*#__PURE__*/forwardRef(function (_ref2, ref) {
|
|
|
81
82
|
iconType: iconType,
|
|
82
83
|
iconSide: iconSide,
|
|
83
84
|
iconSize: iconSize,
|
|
84
|
-
textProps:
|
|
85
|
+
textProps: textProps
|
|
85
86
|
}, contentProps), children);
|
|
86
87
|
|
|
87
88
|
var element = href && !buttonIsDisabled ? 'a' : 'button';
|
|
@@ -110,8 +111,8 @@ export var EuiButtonDisplay = /*#__PURE__*/forwardRef(function (_ref2, ref) {
|
|
|
110
111
|
|
|
111
112
|
return createElement(element, _objectSpread(_objectSpread(_objectSpread({
|
|
112
113
|
css: cssStyles,
|
|
113
|
-
style: minWidth ? _objectSpread(_objectSpread({}, style), {}, {
|
|
114
|
-
|
|
114
|
+
style: minWidth != null ? _objectSpread(_objectSpread({}, style), {}, {
|
|
115
|
+
minInlineSize: minWidth
|
|
115
116
|
}) : style,
|
|
116
117
|
ref: ref
|
|
117
118
|
}, 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
|
|
|
@@ -33,14 +33,13 @@ export var EuiButtonDisplayContent = function EuiButtonDisplayContent(_ref) {
|
|
|
33
33
|
iconType = _ref.iconType,
|
|
34
34
|
_ref$iconSize = _ref.iconSize,
|
|
35
35
|
iconSize = _ref$iconSize === void 0 ? 'm' : _ref$iconSize,
|
|
36
|
-
iconSide = _ref.iconSide,
|
|
36
|
+
_ref$iconSide = _ref.iconSide,
|
|
37
|
+
iconSide = _ref$iconSide === void 0 ? 'left' : _ref$iconSide,
|
|
37
38
|
contentProps = _objectWithoutProperties(_ref, _excluded);
|
|
38
39
|
|
|
39
40
|
var theme = useEuiTheme();
|
|
40
41
|
var styles = euiButtonDisplayContentStyles(theme);
|
|
41
|
-
var cssStyles = [styles.euiButtonDisplayContent
|
|
42
|
-
var cssSpinnerStyles = [styles.euiButtonDisplayContent__spinner];
|
|
43
|
-
var cssIconStyles = [styles.euiButtonDisplayContent__icon, iconSize && styles[iconSize]]; // Add an icon to the button if one exists.
|
|
42
|
+
var cssStyles = [styles.euiButtonDisplayContent]; // Add an icon to the button if one exists.
|
|
44
43
|
|
|
45
44
|
var icon; // When the button is disabled the text gets gray
|
|
46
45
|
// and in some buttons the background gets a light gray
|
|
@@ -49,18 +48,16 @@ export var EuiButtonDisplayContent = function EuiButtonDisplayContent(_ref) {
|
|
|
49
48
|
// are always visible. The default spinner color could be very light.
|
|
50
49
|
|
|
51
50
|
var loadingSpinnerColor = isDisabled ? {
|
|
52
|
-
border: '
|
|
51
|
+
border: 'currentcolor'
|
|
53
52
|
} : undefined;
|
|
54
53
|
|
|
55
54
|
if (isLoading) {
|
|
56
55
|
icon = ___EmotionJSX(EuiLoadingSpinner, {
|
|
57
|
-
css: cssSpinnerStyles,
|
|
58
56
|
size: iconSize,
|
|
59
57
|
color: loadingSpinnerColor
|
|
60
58
|
});
|
|
61
59
|
} else if (iconType) {
|
|
62
60
|
icon = ___EmotionJSX(EuiIcon, {
|
|
63
|
-
css: cssIconStyles,
|
|
64
61
|
type: iconType,
|
|
65
62
|
size: iconSize,
|
|
66
63
|
color: "inherit" // forces the icon to inherit its parent color
|
|
@@ -71,9 +68,9 @@ export var EuiButtonDisplayContent = function EuiButtonDisplayContent(_ref) {
|
|
|
71
68
|
var isText = typeof children === 'string';
|
|
72
69
|
return ___EmotionJSX("span", _extends({
|
|
73
70
|
css: cssStyles
|
|
74
|
-
}, contentProps), icon, isText ? ___EmotionJSX("span", _extends({}, textProps, {
|
|
71
|
+
}, contentProps), iconSide === 'left' && icon, isText || textProps ? ___EmotionJSX("span", _extends({}, textProps, {
|
|
75
72
|
className: classNames('eui-textTruncate', textProps === null || textProps === void 0 ? void 0 : textProps.className)
|
|
76
|
-
}), children) : children);
|
|
73
|
+
}), children) : children, iconSide === 'right' && icon);
|
|
77
74
|
};
|
|
78
75
|
EuiButtonDisplayContent.propTypes = {
|
|
79
76
|
/**
|
|
@@ -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
|
};
|
|
@@ -127,7 +127,7 @@ export var useDataGridColumnSelector = function useDataGridColumnSelector(availa
|
|
|
127
127
|
},
|
|
128
128
|
anchorPosition: "downLeft",
|
|
129
129
|
panelPaddingSize: "s",
|
|
130
|
-
|
|
130
|
+
hasDragDrop: true,
|
|
131
131
|
button: ___EmotionJSX(EuiButtonEmpty, {
|
|
132
132
|
size: "xs",
|
|
133
133
|
iconType: allowColumnHiding ? 'listAdd' : 'list',
|
|
@@ -140,7 +140,7 @@ export var useDataGridColumnSorting = function useDataGridColumnSorting(columns,
|
|
|
140
140
|
},
|
|
141
141
|
anchorPosition: "downLeft",
|
|
142
142
|
panelPaddingSize: "s",
|
|
143
|
-
|
|
143
|
+
hasDragDrop: true,
|
|
144
144
|
button: ___EmotionJSX(EuiButtonEmpty, {
|
|
145
145
|
size: "xs",
|
|
146
146
|
iconType: "sortable",
|
|
@@ -252,6 +252,12 @@ EuiHeaderLinks.propTypes = {
|
|
|
252
252
|
*/
|
|
253
253
|
repositionOnScroll: PropTypes.bool,
|
|
254
254
|
|
|
255
|
+
/**
|
|
256
|
+
* Must be set to true if using `EuiDragDropContext` within a popover,
|
|
257
|
+
* otherwise your nested drag & drop will have incorrect positioning
|
|
258
|
+
*/
|
|
259
|
+
hasDragDrop: PropTypes.bool,
|
|
260
|
+
|
|
255
261
|
/**
|
|
256
262
|
* By default, popover content inherits the z-index of the anchor
|
|
257
263
|
* component; pass `zIndex` to override
|
|
@@ -1,7 +1,13 @@
|
|
|
1
|
-
var _excluded = ["size", "className", "aria-label", "color"];
|
|
1
|
+
var _excluded = ["size", "className", "aria-label", "color", "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
|
|
|
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; }
|
|
@@ -18,7 +24,7 @@ import PropTypes from "prop-types";
|
|
|
18
24
|
import classNames from 'classnames';
|
|
19
25
|
import { useEuiTheme } from '../..//services';
|
|
20
26
|
import { useLoadingAriaLabel } from './_loading_strings';
|
|
21
|
-
import { euiLoadingSpinnerStyles } from './loading_spinner.styles';
|
|
27
|
+
import { euiLoadingSpinnerStyles, euiSpinnerBorderColorsCSS } from './loading_spinner.styles';
|
|
22
28
|
import { jsx as ___EmotionJSX } from "@emotion/react";
|
|
23
29
|
export var SIZES = ['s', 'm', 'l', 'xl', 'xxl'];
|
|
24
30
|
export var EuiLoadingSpinner = function EuiLoadingSpinner(_ref) {
|
|
@@ -27,16 +33,21 @@ export var EuiLoadingSpinner = function EuiLoadingSpinner(_ref) {
|
|
|
27
33
|
className = _ref.className,
|
|
28
34
|
ariaLabel = _ref['aria-label'],
|
|
29
35
|
color = _ref.color,
|
|
36
|
+
style = _ref.style,
|
|
30
37
|
rest = _objectWithoutProperties(_ref, _excluded);
|
|
31
38
|
|
|
32
39
|
var euiTheme = useEuiTheme();
|
|
33
|
-
var styles = euiLoadingSpinnerStyles(euiTheme
|
|
40
|
+
var styles = euiLoadingSpinnerStyles(euiTheme);
|
|
34
41
|
var cssStyles = [styles.euiLoadingSpinner, styles[size]];
|
|
35
42
|
var classes = classNames('euiLoadingSpinner', className);
|
|
36
43
|
var defaultLabel = useLoadingAriaLabel();
|
|
44
|
+
var customColorStyle = color ? _objectSpread(_objectSpread({}, style), {}, {
|
|
45
|
+
borderColor: euiSpinnerBorderColorsCSS(euiTheme, color)
|
|
46
|
+
}) : style;
|
|
37
47
|
return ___EmotionJSX("span", _extends({
|
|
38
48
|
className: classes,
|
|
39
49
|
css: cssStyles,
|
|
50
|
+
style: customColorStyle,
|
|
40
51
|
role: "progressbar",
|
|
41
52
|
"aria-label": ariaLabel || defaultLabel
|
|
42
53
|
}, 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;"),
|
|
@@ -19,7 +19,7 @@ function _objectWithoutPropertiesLoose(source, excluded) { if (source == null) r
|
|
|
19
19
|
* in compliance with, at your election, the Elastic License 2.0 or the Server
|
|
20
20
|
* Side Public License, v 1.
|
|
21
21
|
*/
|
|
22
|
-
import React from 'react';
|
|
22
|
+
import React, { useRef, useCallback } from 'react';
|
|
23
23
|
import PropTypes from "prop-types";
|
|
24
24
|
import classnames from 'classnames';
|
|
25
25
|
import { keys } from '../../services';
|
|
@@ -38,6 +38,19 @@ export var EuiModal = function EuiModal(_ref) {
|
|
|
38
38
|
style = _ref.style,
|
|
39
39
|
rest = _objectWithoutProperties(_ref, _excluded);
|
|
40
40
|
|
|
41
|
+
// TODO: Remove this onFocus scroll workaround after react-focus-on supports focusOptions
|
|
42
|
+
// @see https://github.com/elastic/eui/issues/6304
|
|
43
|
+
var bodyScrollTop = useRef(typeof window === 'undefined' ? undefined : window.scrollY // Account for SSR
|
|
44
|
+
);
|
|
45
|
+
var onFocus = useCallback(function () {
|
|
46
|
+
if (bodyScrollTop.current != null) {
|
|
47
|
+
window.scrollTo({
|
|
48
|
+
top: bodyScrollTop.current
|
|
49
|
+
});
|
|
50
|
+
bodyScrollTop.current = undefined; // Unset after first auto focus
|
|
51
|
+
}
|
|
52
|
+
}, []);
|
|
53
|
+
|
|
41
54
|
var onKeyDown = function onKeyDown(event) {
|
|
42
55
|
if (event.key === keys.ESCAPE) {
|
|
43
56
|
event.preventDefault();
|
|
@@ -60,11 +73,13 @@ export var EuiModal = function EuiModal(_ref) {
|
|
|
60
73
|
|
|
61
74
|
var classes = classnames('euiModal', widthClassName, className);
|
|
62
75
|
return ___EmotionJSX(EuiOverlayMask, null, ___EmotionJSX(EuiFocusTrap, {
|
|
63
|
-
initialFocus: initialFocus
|
|
76
|
+
initialFocus: initialFocus,
|
|
77
|
+
scrollLock: true
|
|
64
78
|
}, ___EmotionJSX("div", _extends({
|
|
65
79
|
className: classes,
|
|
66
80
|
onKeyDown: onKeyDown,
|
|
67
81
|
tabIndex: 0,
|
|
82
|
+
onFocus: onFocus,
|
|
68
83
|
style: newStyle || style
|
|
69
84
|
}, rest), ___EmotionJSX(EuiI18n, {
|
|
70
85
|
token: "euiModal.closeModal",
|
|
@@ -149,15 +149,12 @@ export var _EuiPageTemplate = function _EuiPageTemplate(_ref) {
|
|
|
149
149
|
React.Children.toArray(children).forEach(function (child, index) {
|
|
150
150
|
if (! /*#__PURE__*/React.isValidElement(child)) return; // Skip non-components
|
|
151
151
|
|
|
152
|
-
|
|
153
|
-
|
|
154
|
-
sidebar.
|
|
155
|
-
|
|
156
|
-
|
|
157
|
-
|
|
158
|
-
|
|
159
|
-
default:
|
|
160
|
-
sections.push(child);
|
|
152
|
+
if (child.type === EuiPageSidebar || child.props.__EMOTION_TYPE_PLEASE_DO_NOT_USE__ === EuiPageSidebar) {
|
|
153
|
+
sidebar.push( /*#__PURE__*/React.cloneElement(child, _objectSpread(_objectSpread({
|
|
154
|
+
key: "sidebar".concat(index)
|
|
155
|
+
}, getSideBarProps()), child.props)));
|
|
156
|
+
} else {
|
|
157
|
+
sections.push(child);
|
|
161
158
|
}
|
|
162
159
|
});
|
|
163
160
|
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
function _typeof(obj) { "@babel/helpers - typeof"; if (typeof Symbol === "function" && typeof Symbol.iterator === "symbol") { _typeof = function _typeof(obj) { return typeof obj; }; } else { _typeof = function _typeof(obj) { return obj && typeof Symbol === "function" && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj; }; } return _typeof(obj); }
|
|
2
2
|
|
|
3
3
|
import { css as _css } from "@emotion/react";
|
|
4
|
-
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"];
|
|
4
|
+
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"];
|
|
5
5
|
|
|
6
6
|
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); }
|
|
7
7
|
|
|
@@ -419,7 +419,8 @@ export var EuiPopover = /*#__PURE__*/function (_Component) {
|
|
|
419
419
|
}, {
|
|
420
420
|
key: "render",
|
|
421
421
|
value: function render() {
|
|
422
|
-
var
|
|
422
|
+
var _panelProps$tabIndex,
|
|
423
|
+
_this4 = this;
|
|
423
424
|
|
|
424
425
|
var _this$props = this.props,
|
|
425
426
|
anchorClassName = _this$props.anchorClassName,
|
|
@@ -442,6 +443,7 @@ export var EuiPopover = /*#__PURE__*/function (_Component) {
|
|
|
442
443
|
hasArrow = _this$props.hasArrow,
|
|
443
444
|
arrowChildren = _this$props.arrowChildren,
|
|
444
445
|
repositionOnScroll = _this$props.repositionOnScroll,
|
|
446
|
+
hasDragDrop = _this$props.hasDragDrop,
|
|
445
447
|
zIndex = _this$props.zIndex,
|
|
446
448
|
attachToAnchor = _this$props.attachToAnchor,
|
|
447
449
|
display = _this$props.display,
|
|
@@ -454,9 +456,10 @@ export var EuiPopover = /*#__PURE__*/function (_Component) {
|
|
|
454
456
|
container = _this$props.container,
|
|
455
457
|
focusTrapProps = _this$props.focusTrapProps,
|
|
456
458
|
initialFocusProp = _this$props.initialFocus,
|
|
457
|
-
|
|
459
|
+
_tabIndexProp = _this$props.tabIndex,
|
|
458
460
|
rest = _objectWithoutProperties(_this$props, _excluded);
|
|
459
461
|
|
|
462
|
+
var tabIndexProp = (_panelProps$tabIndex = panelProps === null || panelProps === void 0 ? void 0 : panelProps.tabIndex) !== null && _panelProps$tabIndex !== void 0 ? _panelProps$tabIndex : _tabIndexProp;
|
|
460
463
|
var styles = euiPopoverStyles();
|
|
461
464
|
var popoverStyles = [styles.euiPopover, {
|
|
462
465
|
display: display
|
|
@@ -520,6 +523,7 @@ export var EuiPopover = /*#__PURE__*/function (_Component) {
|
|
|
520
523
|
position: this.state.arrowPosition,
|
|
521
524
|
isAttached: attachToAnchor,
|
|
522
525
|
className: classNames(panelClassName, panelProps === null || panelProps === void 0 ? void 0 : panelProps.className),
|
|
526
|
+
hasDragDrop: hasDragDrop,
|
|
523
527
|
hasShadow: false,
|
|
524
528
|
paddingSize: panelPaddingSize,
|
|
525
529
|
tabIndex: tabIndex,
|
|
@@ -738,6 +742,12 @@ EuiPopover.propTypes = {
|
|
|
738
742
|
*/
|
|
739
743
|
repositionOnScroll: PropTypes.bool,
|
|
740
744
|
|
|
745
|
+
/**
|
|
746
|
+
* Must be set to true if using `EuiDragDropContext` within a popover,
|
|
747
|
+
* otherwise your nested drag & drop will have incorrect positioning
|
|
748
|
+
*/
|
|
749
|
+
hasDragDrop: PropTypes.bool,
|
|
750
|
+
|
|
741
751
|
/**
|
|
742
752
|
* By default, popover content inherits the z-index of the anchor
|
|
743
753
|
* component; pass `zIndex` to override
|
|
@@ -28,6 +28,7 @@ export var EuiPopoverArrow = function EuiPopoverArrow(_ref) {
|
|
|
28
28
|
var styles = euiPopoverArrowStyles(euiTheme);
|
|
29
29
|
var cssStyles = [styles.euiPopoverArrow, styles[position]];
|
|
30
30
|
return ___EmotionJSX("div", _extends({
|
|
31
|
+
className: "euiPopover__arrow",
|
|
31
32
|
"data-popover-arrow": position,
|
|
32
33
|
css: cssStyles
|
|
33
34
|
}, rest), children);
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
var _excluded = ["children", "className", "isOpen", "isAttached", "position"];
|
|
1
|
+
var _excluded = ["children", "className", "isOpen", "isAttached", "hasDragDrop", "position"];
|
|
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
|
|
|
@@ -45,6 +45,7 @@ export var EuiPopoverPanel = function EuiPopoverPanel(_ref) {
|
|
|
45
45
|
className = _ref.className,
|
|
46
46
|
isOpen = _ref.isOpen,
|
|
47
47
|
isAttached = _ref.isAttached,
|
|
48
|
+
hasDragDrop = _ref.hasDragDrop,
|
|
48
49
|
position = _ref.position,
|
|
49
50
|
rest = _objectWithoutProperties(_ref, _excluded);
|
|
50
51
|
|
|
@@ -60,6 +61,10 @@ export var EuiPopoverPanel = function EuiPopoverPanel(_ref) {
|
|
|
60
61
|
panelCSS = [].concat(_toConsumableArray(panelCSS), [isOpen && styles.attached.isOpen, position && styles.attached[position]]);
|
|
61
62
|
}
|
|
62
63
|
|
|
64
|
+
if (hasDragDrop) {
|
|
65
|
+
panelCSS = [].concat(_toConsumableArray(panelCSS), [styles.hasDragDrop.hasDragDrop, position && styles.hasDragDrop[position]]);
|
|
66
|
+
}
|
|
67
|
+
|
|
63
68
|
return ___EmotionJSX(EuiPopoverPanelContext.Provider, {
|
|
64
69
|
value: panelContext
|
|
65
70
|
}, ___EmotionJSX(EuiPanel, _extends({
|
|
@@ -111,5 +116,6 @@ EuiPopoverPanel.propTypes = {
|
|
|
111
116
|
css: PropTypes.any,
|
|
112
117
|
isOpen: PropTypes.bool,
|
|
113
118
|
isAttached: PropTypes.bool,
|
|
114
|
-
position: PropTypes.oneOfType([PropTypes.any.isRequired, PropTypes.oneOf([null])])
|
|
119
|
+
position: PropTypes.oneOfType([PropTypes.any.isRequired, PropTypes.oneOf([null])]),
|
|
120
|
+
hasDragDrop: PropTypes.bool
|
|
115
121
|
};
|
|
@@ -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
|
};
|