@elastic/eui 67.1.6 → 67.1.7
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 -6
- package/dist/eui_theme_dark.min.css +1 -1
- package/dist/eui_theme_light.css +0 -6
- package/dist/eui_theme_light.min.css +1 -1
- package/es/components/badge/beta_badge/beta_badge.js +4 -4
- package/es/components/basic_table/in_memory_table.js +16 -2
- package/es/components/breadcrumbs/breadcrumb.js +9 -5
- package/es/components/breadcrumbs/breadcrumbs.js +7 -4
- 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/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/query/ast.js +14 -3
- package/es/components/search_bar/search_bar.js +39 -5
- package/es/components/search_bar/search_box.js +37 -4
- package/es/components/tour/tour.styles.js +4 -3
- package/es/components/tour/tour_step.js +13 -5
- package/eui.d.ts +41 -5
- package/lib/components/badge/beta_badge/beta_badge.js +4 -8
- package/lib/components/basic_table/in_memory_table.js +16 -2
- package/lib/components/breadcrumbs/breadcrumb.js +9 -5
- package/lib/components/breadcrumbs/breadcrumbs.js +7 -4
- 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/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/query/ast.js +14 -3
- package/lib/components/search_bar/search_bar.js +40 -5
- package/lib/components/search_bar/search_box.js +38 -4
- package/lib/components/tour/tour.styles.js +3 -2
- package/lib/components/tour/tour_step.js +7 -5
- package/optimize/es/components/badge/beta_badge/beta_badge.js +4 -4
- package/optimize/es/components/basic_table/in_memory_table.js +1 -1
- package/optimize/es/components/breadcrumbs/breadcrumb.js +3 -2
- package/optimize/es/components/breadcrumbs/breadcrumbs.js +7 -4
- 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/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/query/ast.js +14 -3
- 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/tour/tour.styles.js +4 -3
- package/optimize/es/components/tour/tour_step.js +7 -5
- package/optimize/lib/components/badge/beta_badge/beta_badge.js +4 -11
- package/optimize/lib/components/basic_table/in_memory_table.js +1 -1
- package/optimize/lib/components/breadcrumbs/breadcrumb.js +3 -2
- package/optimize/lib/components/breadcrumbs/breadcrumbs.js +7 -4
- 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/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/query/ast.js +14 -3
- 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/tour/tour.styles.js +3 -2
- package/optimize/lib/components/tour/tour_step.js +7 -5
- package/package.json +1 -1
- package/src/components/datagrid/controls/_data_grid_toolbar.scss +0 -8
- package/test-env/components/badge/beta_badge/beta_badge.js +4 -11
- package/test-env/components/basic_table/in_memory_table.js +16 -2
- package/test-env/components/breadcrumbs/breadcrumb.js +9 -5
- package/test-env/components/breadcrumbs/breadcrumbs.js +7 -4
- 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/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/query/ast.js +14 -3
- 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/tour/tour.styles.js +3 -2
- package/test-env/components/tour/tour_step.js +7 -5
|
@@ -9,6 +9,8 @@ var _react = require("@emotion/react");
|
|
|
9
9
|
|
|
10
10
|
var _mixins = require("../../../themes/amsterdam/global_styling/mixins");
|
|
11
11
|
|
|
12
|
+
var _functions = require("../../../themes/amsterdam/global_styling/functions");
|
|
13
|
+
|
|
12
14
|
var _global_styling = require("../../../global_styling");
|
|
13
15
|
|
|
14
16
|
/*
|
|
@@ -28,7 +30,8 @@ var translateDistance = 's';
|
|
|
28
30
|
*/
|
|
29
31
|
|
|
30
32
|
var euiPopoverPanelStyles = function euiPopoverPanelStyles(euiThemeContext) {
|
|
31
|
-
var euiTheme = euiThemeContext.euiTheme
|
|
33
|
+
var euiTheme = euiThemeContext.euiTheme,
|
|
34
|
+
colorMode = euiThemeContext.colorMode;
|
|
32
35
|
return {
|
|
33
36
|
// Base
|
|
34
37
|
euiPopover__panel: /*#__PURE__*/(0, _react.css)("position:absolute;", (0, _global_styling.logicalCSS)('min-width', "".concat(euiTheme.base * 7, "px")), ";", (0, _global_styling.logicalCSS)('max-width', "calc(100vw - ".concat(euiTheme.size.xl, ")")), ";backface-visibility:hidden;pointer-events:none;opacity:0;transform:translateY(0) translateX(0) translateZ(0);", (0, _mixins.euiShadowMedium)(euiThemeContext, {
|
|
@@ -49,6 +52,18 @@ var euiPopoverPanelStyles = function euiPopoverPanelStyles(euiThemeContext) {
|
|
|
49
52
|
// Satisfies TS
|
|
50
53
|
left: /*#__PURE__*/(0, _react.css)(";label:left;"),
|
|
51
54
|
right: /*#__PURE__*/(0, _react.css)(";label:right;")
|
|
55
|
+
},
|
|
56
|
+
// Overrides for drag & drop contexts within popovers. This is required because
|
|
57
|
+
// the fixed positions of drag and drop don't work inside of transformed elements
|
|
58
|
+
hasDragDrop: {
|
|
59
|
+
hasDragDrop: /*#__PURE__*/(0, _react.css)("transform:none;filter:none;", (0, _mixins.euiShadowMedium)(euiThemeContext, {
|
|
60
|
+
property: 'box-shadow'
|
|
61
|
+
}), ";;label:hasDragDrop;"),
|
|
62
|
+
// The offset transforms must be recreated in margins
|
|
63
|
+
top: /*#__PURE__*/(0, _react.css)("margin-block-start:", euiTheme.size[translateDistance], ";;label:top;"),
|
|
64
|
+
bottom: /*#__PURE__*/(0, _react.css)("margin-block-start:-", euiTheme.size[translateDistance], ";.euiPopover__arrow{filter:drop-shadow(\n 0 -6px 6px ", (0, _functions.getShadowColor)(euiTheme.colors.shadow, 0.12, colorMode), "\n );};label:bottom;"),
|
|
65
|
+
left: /*#__PURE__*/(0, _react.css)("margin-inline-start:", euiTheme.size[translateDistance], ";.euiPopover__arrow{filter:drop-shadow(\n 6px 0 6px ", (0, _functions.getShadowColor)(euiTheme.colors.shadow, 0.12, colorMode), "\n );};label:left;"),
|
|
66
|
+
right: /*#__PURE__*/(0, _react.css)("margin-inline-start:-", euiTheme.size[translateDistance], ";.euiPopover__arrow{filter:drop-shadow(\n -6px 0 6px ", (0, _functions.getShadowColor)(euiTheme.colors.shadow, 0.12, colorMode), "\n );};label:right;")
|
|
52
67
|
}
|
|
53
68
|
};
|
|
54
69
|
};
|
|
@@ -287,6 +287,10 @@ var arrayIncludesValue = function arrayIncludesValue(array, value) {
|
|
|
287
287
|
return valuesEqual(item, value);
|
|
288
288
|
});
|
|
289
289
|
};
|
|
290
|
+
|
|
291
|
+
var mustToMatch = function mustToMatch(must) {
|
|
292
|
+
return must === true ? Match.MUST : Match.MUST_NOT;
|
|
293
|
+
};
|
|
290
294
|
/**
|
|
291
295
|
* The AST structure is an array of clauses. There are 3 types of clauses that are supported:
|
|
292
296
|
*
|
|
@@ -411,9 +415,16 @@ var _AST = /*#__PURE__*/function () {
|
|
|
411
415
|
}
|
|
412
416
|
}, {
|
|
413
417
|
key: "getOrFieldClause",
|
|
414
|
-
value: function getOrFieldClause(field, value) {
|
|
418
|
+
value: function getOrFieldClause(field, value, must, operator) {
|
|
415
419
|
return this.getFieldClause(field, function (clause) {
|
|
416
|
-
|
|
420
|
+
if (!(0, _predicate.isArray)(clause.value)) {
|
|
421
|
+
return false;
|
|
422
|
+
}
|
|
423
|
+
|
|
424
|
+
var matchValue = (0, _predicate.isNil)(value) || arrayIncludesValue(clause.value, value);
|
|
425
|
+
var matchMust = (0, _predicate.isNil)(must) || mustToMatch(must) === clause.match;
|
|
426
|
+
var matchOperator = (0, _predicate.isNil)(operator) || operator === clause.operator;
|
|
427
|
+
return matchValue && matchMust && matchOperator;
|
|
417
428
|
});
|
|
418
429
|
}
|
|
419
430
|
}, {
|
|
@@ -421,7 +432,7 @@ var _AST = /*#__PURE__*/function () {
|
|
|
421
432
|
value: function addOrFieldValue(field, value) {
|
|
422
433
|
var must = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : true;
|
|
423
434
|
var operator = arguments.length > 3 && arguments[3] !== undefined ? arguments[3] : Operator.EQ;
|
|
424
|
-
var existingClause = this.getOrFieldClause(field);
|
|
435
|
+
var existingClause = this.getOrFieldClause(field, undefined, must, operator);
|
|
425
436
|
|
|
426
437
|
if (!existingClause) {
|
|
427
438
|
var newClause = must ? Field.must[operator](field, [value]) : Field.mustNot[operator](field, [value]);
|
|
@@ -21,6 +21,8 @@ var _propTypes = _interopRequireDefault(require("prop-types"));
|
|
|
21
21
|
|
|
22
22
|
var _react = _interopRequireWildcard(require("react"));
|
|
23
23
|
|
|
24
|
+
var _accessibility = require("../../services/accessibility");
|
|
25
|
+
|
|
24
26
|
var _predicate = require("../../services/predicate");
|
|
25
27
|
|
|
26
28
|
var _flex = require("../flex");
|
|
@@ -43,6 +45,10 @@ function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { de
|
|
|
43
45
|
|
|
44
46
|
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); }
|
|
45
47
|
|
|
48
|
+
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; }
|
|
49
|
+
|
|
50
|
+
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; }
|
|
51
|
+
|
|
46
52
|
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; }
|
|
47
53
|
|
|
48
54
|
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; }
|
|
@@ -103,6 +109,8 @@ var EuiSearchBar = /*#__PURE__*/function (_Component) {
|
|
|
103
109
|
|
|
104
110
|
_this = _super.call(this, props);
|
|
105
111
|
|
|
112
|
+
_defineProperty(_assertThisInitialized(_this), "hintId", (0, _accessibility.htmlIdGenerator)('__hint')());
|
|
113
|
+
|
|
106
114
|
_defineProperty(_assertThisInitialized(_this), "onSearch", function (queryText) {
|
|
107
115
|
try {
|
|
108
116
|
var query = parseQuery(queryText, _this.props);
|
|
@@ -159,7 +167,8 @@ var EuiSearchBar = /*#__PURE__*/function (_Component) {
|
|
|
159
167
|
_this.state = {
|
|
160
168
|
query: _query,
|
|
161
169
|
queryText: _query.text,
|
|
162
|
-
error: null
|
|
170
|
+
error: null,
|
|
171
|
+
isHintVisible: false
|
|
163
172
|
};
|
|
164
173
|
return _this;
|
|
165
174
|
}
|
|
@@ -221,10 +230,15 @@ var EuiSearchBar = /*#__PURE__*/function (_Component) {
|
|
|
221
230
|
}, {
|
|
222
231
|
key: "render",
|
|
223
232
|
value: function render() {
|
|
233
|
+
var _hint$popoverProps$is,
|
|
234
|
+
_hint$popoverProps,
|
|
235
|
+
_this2 = this;
|
|
236
|
+
|
|
224
237
|
var _this$state = this.state,
|
|
225
238
|
query = _this$state.query,
|
|
226
239
|
queryText = _this$state.queryText,
|
|
227
|
-
error = _this$state.error
|
|
240
|
+
error = _this$state.error,
|
|
241
|
+
isHintVisibleState = _this$state.isHintVisible;
|
|
228
242
|
var _this$props = this.props,
|
|
229
243
|
_this$props$box = _this$props.box;
|
|
230
244
|
_this$props$box = _this$props$box === void 0 ? {
|
|
@@ -235,7 +249,8 @@ var EuiSearchBar = /*#__PURE__*/function (_Component) {
|
|
|
235
249
|
box = _objectWithoutProperties(_this$props$box, _excluded),
|
|
236
250
|
filters = _this$props.filters,
|
|
237
251
|
toolsLeft = _this$props.toolsLeft,
|
|
238
|
-
toolsRight = _this$props.toolsRight
|
|
252
|
+
toolsRight = _this$props.toolsRight,
|
|
253
|
+
hint = _this$props.hint;
|
|
239
254
|
|
|
240
255
|
var toolsLeftEl = this.renderTools(toolsLeft);
|
|
241
256
|
var filtersBar = !filters ? undefined : (0, _react2.jsx)(_flex.EuiFlexItem, {
|
|
@@ -247,6 +262,7 @@ var EuiSearchBar = /*#__PURE__*/function (_Component) {
|
|
|
247
262
|
onChange: this.onFiltersChange
|
|
248
263
|
}));
|
|
249
264
|
var toolsRightEl = this.renderTools(toolsRight);
|
|
265
|
+
var isHintVisible = (_hint$popoverProps$is = hint === null || hint === void 0 ? void 0 : (_hint$popoverProps = hint.popoverProps) === null || _hint$popoverProps === void 0 ? void 0 : _hint$popoverProps.isOpen) !== null && _hint$popoverProps$is !== void 0 ? _hint$popoverProps$is : isHintVisibleState;
|
|
250
266
|
return (0, _react2.jsx)(_flex.EuiFlexGroup, {
|
|
251
267
|
gutterSize: "m",
|
|
252
268
|
alignItems: "center",
|
|
@@ -258,7 +274,17 @@ var EuiSearchBar = /*#__PURE__*/function (_Component) {
|
|
|
258
274
|
query: queryText,
|
|
259
275
|
onSearch: this.onSearch,
|
|
260
276
|
isInvalid: error != null,
|
|
261
|
-
title: error ? error.message : undefined
|
|
277
|
+
title: error ? error.message : undefined,
|
|
278
|
+
"aria-describedby": isHintVisible ? "".concat(this.hintId) : undefined,
|
|
279
|
+
hint: hint ? _objectSpread({
|
|
280
|
+
isVisible: isHintVisible,
|
|
281
|
+
setIsVisible: function setIsVisible(isVisible) {
|
|
282
|
+
_this2.setState({
|
|
283
|
+
isHintVisible: isVisible
|
|
284
|
+
});
|
|
285
|
+
},
|
|
286
|
+
id: this.hintId
|
|
287
|
+
}, hint) : undefined
|
|
262
288
|
}))), filtersBar, toolsRightEl);
|
|
263
289
|
}
|
|
264
290
|
}], [{
|
|
@@ -269,7 +295,8 @@ var EuiSearchBar = /*#__PURE__*/function (_Component) {
|
|
|
269
295
|
return {
|
|
270
296
|
query: query,
|
|
271
297
|
queryText: query.text,
|
|
272
|
-
error: null
|
|
298
|
+
error: null,
|
|
299
|
+
isHintVisible: prevState.isHintVisible
|
|
273
300
|
};
|
|
274
301
|
}
|
|
275
302
|
|
|
@@ -457,6 +484,14 @@ EuiSearchBar.propTypes = {
|
|
|
457
484
|
* Date formatter to use when parsing date values
|
|
458
485
|
*/
|
|
459
486
|
dateFormat: _propTypes.default.any,
|
|
487
|
+
|
|
488
|
+
/**
|
|
489
|
+
* Hint to render below the search bar
|
|
490
|
+
*/
|
|
491
|
+
hint: _propTypes.default.shape({
|
|
492
|
+
content: _propTypes.default.node.isRequired,
|
|
493
|
+
popoverProps: _propTypes.default.any
|
|
494
|
+
}),
|
|
460
495
|
className: _propTypes.default.string,
|
|
461
496
|
"aria-label": _propTypes.default.string,
|
|
462
497
|
"data-test-subj": _propTypes.default.string,
|
|
@@ -13,9 +13,11 @@ var _propTypes = _interopRequireDefault(require("prop-types"));
|
|
|
13
13
|
|
|
14
14
|
var _form = require("../form");
|
|
15
15
|
|
|
16
|
+
var _popover = require("../popover");
|
|
17
|
+
|
|
16
18
|
var _react2 = require("@emotion/react");
|
|
17
19
|
|
|
18
|
-
var _excluded = ["query", "incremental"];
|
|
20
|
+
var _excluded = ["query", "incremental", "hint"];
|
|
19
21
|
|
|
20
22
|
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
|
|
21
23
|
|
|
@@ -88,6 +90,7 @@ var EuiSearchBox = /*#__PURE__*/function (_Component) {
|
|
|
88
90
|
var _this$props = this.props,
|
|
89
91
|
query = _this$props.query,
|
|
90
92
|
incremental = _this$props.incremental,
|
|
93
|
+
hint = _this$props.hint,
|
|
91
94
|
rest = _objectWithoutProperties(_this$props, _excluded);
|
|
92
95
|
|
|
93
96
|
var ariaLabel;
|
|
@@ -98,15 +101,39 @@ var EuiSearchBox = /*#__PURE__*/function (_Component) {
|
|
|
98
101
|
ariaLabel = 'This is a search bar. After typing your query, hit enter to filter the results lower in the page.';
|
|
99
102
|
}
|
|
100
103
|
|
|
101
|
-
|
|
104
|
+
var search = (0, _react2.jsx)(_form.EuiFieldSearch, _extends({
|
|
102
105
|
inputRef: function inputRef(input) {
|
|
103
106
|
return _this2.inputElement = input;
|
|
104
107
|
},
|
|
105
108
|
fullWidth: true,
|
|
106
109
|
defaultValue: query,
|
|
107
110
|
incremental: incremental,
|
|
108
|
-
"aria-label": ariaLabel
|
|
111
|
+
"aria-label": ariaLabel,
|
|
112
|
+
onFocus: function onFocus() {
|
|
113
|
+
hint === null || hint === void 0 ? void 0 : hint.setIsVisible(true);
|
|
114
|
+
}
|
|
109
115
|
}, rest));
|
|
116
|
+
|
|
117
|
+
if (hint) {
|
|
118
|
+
return (0, _react2.jsx)(_popover.EuiInputPopover, _extends({
|
|
119
|
+
disableFocusTrap: true,
|
|
120
|
+
input: search,
|
|
121
|
+
isOpen: hint.isVisible,
|
|
122
|
+
fullWidth: true,
|
|
123
|
+
closePopover: function closePopover() {
|
|
124
|
+
hint.setIsVisible(false);
|
|
125
|
+
},
|
|
126
|
+
panelProps: {
|
|
127
|
+
'aria-live': undefined,
|
|
128
|
+
'aria-modal': undefined,
|
|
129
|
+
role: undefined,
|
|
130
|
+
tabIndex: -1,
|
|
131
|
+
id: hint.id
|
|
132
|
+
}
|
|
133
|
+
}, hint.popoverProps), hint.content);
|
|
134
|
+
}
|
|
135
|
+
|
|
136
|
+
return search;
|
|
110
137
|
}
|
|
111
138
|
}]);
|
|
112
139
|
|
|
@@ -123,5 +150,12 @@ _defineProperty(EuiSearchBox, "defaultProps", {
|
|
|
123
150
|
EuiSearchBox.propTypes = {
|
|
124
151
|
query: _propTypes.default.string.isRequired,
|
|
125
152
|
// This is optional in EuiFieldSearchProps
|
|
126
|
-
onSearch: _propTypes.default.func.isRequired
|
|
153
|
+
onSearch: _propTypes.default.func.isRequired,
|
|
154
|
+
hint: _propTypes.default.shape({
|
|
155
|
+
id: _propTypes.default.string.isRequired,
|
|
156
|
+
isVisible: _propTypes.default.bool.isRequired,
|
|
157
|
+
setIsVisible: _propTypes.default.func.isRequired,
|
|
158
|
+
content: _propTypes.default.node.isRequired,
|
|
159
|
+
popoverProps: _propTypes.default.any
|
|
160
|
+
})
|
|
127
161
|
};
|
|
@@ -31,7 +31,7 @@ var euiTourStyles = function euiTourStyles(_ref) {
|
|
|
31
31
|
colorMode = _ref.colorMode;
|
|
32
32
|
return {
|
|
33
33
|
// Targets EuiPopoverPanel
|
|
34
|
-
euiTour: /*#__PURE__*/(0, _react.css)("
|
|
34
|
+
euiTour: /*#__PURE__*/(0, _react.css)("[data-popover-arrow='top']::before{", (0, _global_styling.logicalCSS)('border-top-color', backgroundColor(euiTheme.colors.lightestShade, colorMode)), ";};label:euiTour;")
|
|
35
35
|
};
|
|
36
36
|
};
|
|
37
37
|
|
|
@@ -48,7 +48,8 @@ var euiTourBeaconStyles = function euiTourBeaconStyles(_ref2) {
|
|
|
48
48
|
});
|
|
49
49
|
return {
|
|
50
50
|
// Base
|
|
51
|
-
euiTourBeacon: /*#__PURE__*/(0, _react.css)("pointer-events:none;position:absolute;opacity:0;transition:opacity 0s ", euiTheme.animation[_popover_panel.openAnimationTiming], "
|
|
51
|
+
euiTourBeacon: /*#__PURE__*/(0, _react.css)("pointer-events:none;position:absolute;", _global_styling.euiCanAnimate, "{opacity:0;transition:opacity 0s ", euiTheme.animation[_popover_panel.openAnimationTiming], ";};label:euiTourBeacon;"),
|
|
52
|
+
isOpen: /*#__PURE__*/(0, _react.css)(_global_styling.euiCanAnimate, "{opacity:1;};label:isOpen;"),
|
|
52
53
|
// Positions
|
|
53
54
|
right: /*#__PURE__*/(0, _react.css)((0, _global_styling.logicalCSS)('top', arrowHalfSize), ";", (0, _global_styling.logicalCSS)('left', arrowOffset), ";;label:right;"),
|
|
54
55
|
left: /*#__PURE__*/(0, _react.css)((0, _global_styling.logicalCSS)('top', arrowHalfSize), ";", (0, _global_styling.logicalCSS)('left', arrowSize), ";;label:left;"),
|
|
@@ -33,7 +33,7 @@ var _tour = require("./tour.styles");
|
|
|
33
33
|
|
|
34
34
|
var _react2 = require("@emotion/react");
|
|
35
35
|
|
|
36
|
-
var _excluded = ["anchorPosition", "anchor", "children", "className", "closePopover", "content", "isStepOpen", "minWidth", "maxWidth", "onFinish", "step", "stepsTotal", "style", "subtitle", "title", "decoration", "footerAction"];
|
|
36
|
+
var _excluded = ["anchorPosition", "anchor", "children", "className", "css", "closePopover", "content", "isStepOpen", "minWidth", "maxWidth", "onFinish", "step", "stepsTotal", "style", "subtitle", "title", "decoration", "footerAction", "panelProps"];
|
|
37
37
|
|
|
38
38
|
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
|
|
39
39
|
|
|
@@ -79,6 +79,7 @@ var EuiTourStep = function EuiTourStep(_ref) {
|
|
|
79
79
|
anchor = _ref.anchor,
|
|
80
80
|
children = _ref.children,
|
|
81
81
|
className = _ref.className,
|
|
82
|
+
css = _ref.css,
|
|
82
83
|
_ref$closePopover = _ref.closePopover,
|
|
83
84
|
closePopover = _ref$closePopover === void 0 ? function () {} : _ref$closePopover,
|
|
84
85
|
content = _ref.content,
|
|
@@ -98,6 +99,7 @@ var EuiTourStep = function EuiTourStep(_ref) {
|
|
|
98
99
|
_ref$decoration = _ref.decoration,
|
|
99
100
|
decoration = _ref$decoration === void 0 ? 'beacon' : _ref$decoration,
|
|
100
101
|
footerAction = _ref.footerAction,
|
|
102
|
+
panelProps = _ref.panelProps,
|
|
101
103
|
rest = _objectWithoutProperties(_ref, _excluded);
|
|
102
104
|
|
|
103
105
|
var titleId = (0, _services.useGeneratedHtmlId)();
|
|
@@ -141,7 +143,7 @@ var EuiTourStep = function EuiTourStep(_ref) {
|
|
|
141
143
|
var headerStyles = (0, _tour.euiTourHeaderStyles)(euiTheme);
|
|
142
144
|
var footerStyles = (0, _tour.euiTourFooterStyles)(euiTheme);
|
|
143
145
|
var beaconStyles = (0, _tour.euiTourBeaconStyles)(euiTheme);
|
|
144
|
-
var beaconCss = [beaconStyles.euiTourBeacon, popoverPosition && beaconStyles[popoverPosition]];
|
|
146
|
+
var beaconCss = [beaconStyles.euiTourBeacon, isStepOpen && beaconStyles.isOpen, popoverPosition && beaconStyles[popoverPosition]];
|
|
145
147
|
var finishButtonProps = {
|
|
146
148
|
color: 'text',
|
|
147
149
|
flush: 'right',
|
|
@@ -200,9 +202,9 @@ var EuiTourStep = function EuiTourStep(_ref) {
|
|
|
200
202
|
ownFocus: false,
|
|
201
203
|
panelClassName: classes,
|
|
202
204
|
panelStyle: style,
|
|
203
|
-
panelProps: {
|
|
204
|
-
css: tourStyles.euiTour
|
|
205
|
-
},
|
|
205
|
+
panelProps: _objectSpread(_objectSpread({}, panelProps), {}, {
|
|
206
|
+
css: [tourStyles.euiTour, css, panelProps === null || panelProps === void 0 ? void 0 : panelProps.css]
|
|
207
|
+
}),
|
|
206
208
|
offset: hasBeacon ? 10 : 0,
|
|
207
209
|
'aria-labelledby': titleId,
|
|
208
210
|
arrowChildren: hasBeacon && (0, _react2.jsx)(_beacon.EuiBeacon, {
|
|
@@ -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 { keysOf } from '../../common';
|
|
16
16
|
import { getSecureRelForTarget } from '../../../services';
|
|
@@ -106,7 +106,7 @@ export var EuiBetaBadge = function EuiBetaBadge(_ref) {
|
|
|
106
106
|
anchorProps: anchorProps
|
|
107
107
|
}, content);
|
|
108
108
|
} else {
|
|
109
|
-
return ___EmotionJSX(
|
|
109
|
+
return ___EmotionJSX("span", anchorProps, content);
|
|
110
110
|
}
|
|
111
111
|
} else {
|
|
112
112
|
if (tooltipContent) {
|
|
@@ -127,10 +127,10 @@ export var EuiBetaBadge = function EuiBetaBadge(_ref) {
|
|
|
127
127
|
console.warn("Only string titles are permitted on badges that do not use tooltips. Found: ".concat(_typeof(spanTitle)));
|
|
128
128
|
}
|
|
129
129
|
|
|
130
|
-
return ___EmotionJSX("span", _extends({
|
|
130
|
+
return ___EmotionJSX("span", anchorProps, ___EmotionJSX("span", _extends({
|
|
131
131
|
className: classes,
|
|
132
132
|
title: spanTitle
|
|
133
|
-
}, rest), icon || label);
|
|
133
|
+
}, rest), icon || label));
|
|
134
134
|
}
|
|
135
135
|
}
|
|
136
136
|
};
|
|
@@ -382,7 +382,7 @@ export var EuiInMemoryTable = /*#__PURE__*/function (_Component) {
|
|
|
382
382
|
sortName = _this$state2.sortName,
|
|
383
383
|
pageIndex = _this$state2.pageIndex,
|
|
384
384
|
pageSize = _this$state2.pageSize;
|
|
385
|
-
var matchingItems = query ? EuiSearchBar.Query.execute(query, items, executeQueryOptions) : items;
|
|
385
|
+
var matchingItems = query !== null && (executeQueryOptions === null || executeQueryOptions === void 0 ? void 0 : executeQueryOptions.enabled) !== false ? EuiSearchBar.Query.execute(query, items, executeQueryOptions) : items;
|
|
386
386
|
var sortedItems = sortName ? matchingItems.slice(0) // avoid mutating the source array
|
|
387
387
|
.sort(this.getItemSorter()) // sort, causes mutation
|
|
388
388
|
: matchingItems;
|
|
@@ -2,7 +2,7 @@ import _slicedToArray from "@babel/runtime/helpers/slicedToArray";
|
|
|
2
2
|
import _extends from "@babel/runtime/helpers/extends";
|
|
3
3
|
import _objectWithoutProperties from "@babel/runtime/helpers/objectWithoutProperties";
|
|
4
4
|
var _excluded = ["children", "className", "type", "truncate"],
|
|
5
|
-
_excluded2 = ["text", "truncate", "type", "href", "rel", "onClick", "className", "color", "isFirstBreadcrumb", "isLastBreadcrumb", "isOnlyBreadcrumb", "highlightLastBreadcrumb"];
|
|
5
|
+
_excluded2 = ["text", "truncate", "type", "href", "rel", "onClick", "className", "color", "isFirstBreadcrumb", "isLastBreadcrumb", "isOnlyBreadcrumb", "highlightLastBreadcrumb", "truncateLastBreadcrumb"];
|
|
6
6
|
|
|
7
7
|
/*
|
|
8
8
|
* Copyright Elasticsearch B.V. and/or licensed to Elasticsearch B.V. under one
|
|
@@ -51,12 +51,13 @@ export var EuiBreadcrumbContent = function EuiBreadcrumbContent(_ref2) {
|
|
|
51
51
|
isLastBreadcrumb = _ref2.isLastBreadcrumb,
|
|
52
52
|
isOnlyBreadcrumb = _ref2.isOnlyBreadcrumb,
|
|
53
53
|
highlightLastBreadcrumb = _ref2.highlightLastBreadcrumb,
|
|
54
|
+
truncateLastBreadcrumb = _ref2.truncateLastBreadcrumb,
|
|
54
55
|
rest = _objectWithoutProperties(_ref2, _excluded2);
|
|
55
56
|
|
|
56
57
|
var classes = classNames('euiBreadcrumb__content', className);
|
|
57
58
|
var euiTheme = useEuiTheme();
|
|
58
59
|
var styles = euiBreadcrumbContentStyles(euiTheme);
|
|
59
|
-
var cssStyles = [styles.euiBreadcrumb__content, styles[type], truncate &&
|
|
60
|
+
var cssStyles = [styles.euiBreadcrumb__content, styles[type], truncate && !truncateLastBreadcrumb && styles.isTruncated, truncateLastBreadcrumb && styles.isTruncatedLast];
|
|
60
61
|
|
|
61
62
|
if (type === 'application') {
|
|
62
63
|
if (isOnlyBreadcrumb) {
|
|
@@ -48,12 +48,14 @@ export var EuiBreadcrumbs = function EuiBreadcrumbs(_ref) {
|
|
|
48
48
|
}, [breadcrumbs, responsiveMax]);
|
|
49
49
|
var breadcrumbChildren = useMemo(function () {
|
|
50
50
|
return visibleBreadcrumbs.map(function (breadcrumb, index) {
|
|
51
|
+
var _breadcrumb$truncate;
|
|
52
|
+
|
|
51
53
|
var isFirstBreadcrumb = index === 0;
|
|
52
54
|
var isLastBreadcrumb = index === visibleBreadcrumbs.length - 1;
|
|
53
55
|
var isOnlyBreadcrumb = visibleBreadcrumbs.length === 1;
|
|
54
56
|
var sharedProps = {
|
|
55
57
|
type: type,
|
|
56
|
-
truncate: truncate
|
|
58
|
+
truncate: (_breadcrumb$truncate = breadcrumb.truncate) !== null && _breadcrumb$truncate !== void 0 ? _breadcrumb$truncate : truncate
|
|
57
59
|
};
|
|
58
60
|
return breadcrumb.isCollapsedButton ? ___EmotionJSX(EuiBreadcrumbCollapsed, _extends({
|
|
59
61
|
key: "collapsed"
|
|
@@ -67,12 +69,13 @@ export var EuiBreadcrumbs = function EuiBreadcrumbs(_ref) {
|
|
|
67
69
|
max: 0
|
|
68
70
|
})) : ___EmotionJSX(EuiBreadcrumb, _extends({
|
|
69
71
|
key: index
|
|
70
|
-
}, sharedProps), ___EmotionJSX(EuiBreadcrumbContent, _extends({
|
|
72
|
+
}, sharedProps), ___EmotionJSX(EuiBreadcrumbContent, _extends({}, breadcrumb, sharedProps, {
|
|
71
73
|
isFirstBreadcrumb: isFirstBreadcrumb,
|
|
72
74
|
isLastBreadcrumb: isLastBreadcrumb,
|
|
73
75
|
isOnlyBreadcrumb: isOnlyBreadcrumb,
|
|
74
|
-
highlightLastBreadcrumb: isLastBreadcrumb && lastBreadcrumbIsCurrentPage
|
|
75
|
-
|
|
76
|
+
highlightLastBreadcrumb: isLastBreadcrumb && lastBreadcrumbIsCurrentPage,
|
|
77
|
+
truncateLastBreadcrumb: isLastBreadcrumb && truncate && breadcrumb.truncate == null
|
|
78
|
+
})));
|
|
76
79
|
});
|
|
77
80
|
}, [visibleBreadcrumbs, truncate, type, lastBreadcrumbIsCurrentPage]);
|
|
78
81
|
return ___EmotionJSX("nav", _extends({
|
|
@@ -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",
|
|
@@ -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({
|