@elastic/eui 72.2.0 → 74.0.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/eui_theme_dark.css +15 -67
- package/dist/eui_theme_dark.min.css +1 -1
- package/dist/eui_theme_light.css +15 -67
- package/dist/eui_theme_light.min.css +1 -1
- package/es/components/basic_table/basic_table.js +56 -101
- package/es/components/basic_table/basic_table.styles.js +45 -0
- package/es/components/datagrid/controls/column_selector.js +23 -7
- package/es/components/datagrid/controls/column_sorting_draggable.js +17 -8
- package/es/components/datagrid/data_grid.a11y.js +3 -2
- package/es/components/modal/confirm_modal.js +5 -3
- package/es/components/modal/modal.a11y.js +1 -1
- package/es/components/modal/modal_header_title.js +12 -3
- package/es/components/notification/notification_event.a11y.js +113 -0
- package/es/components/page/page_header/page_header.a11y.js +32 -0
- package/es/components/portal/portal.a11y.js +70 -0
- package/es/components/resizable_container/resizable_panel.js +5 -0
- package/es/components/tool_tip/tool_tip.js +10 -5
- package/es/components/tool_tip/tool_tip_manager.js +42 -0
- package/es/services/security/get_secure_rel_for_target.js +2 -8
- package/es/services/theme/hooks.js +18 -0
- package/es/services/theme/index.js +1 -1
- package/eui.d.ts +57 -19
- package/i18ntokens.json +54 -38
- package/lib/components/basic_table/basic_table.js +56 -100
- package/lib/components/basic_table/basic_table.styles.js +54 -0
- package/lib/components/datagrid/controls/column_selector.js +21 -6
- package/lib/components/datagrid/controls/column_sorting_draggable.js +17 -8
- package/lib/components/datagrid/data_grid.a11y.js +3 -2
- package/lib/components/modal/confirm_modal.js +5 -3
- package/lib/components/modal/modal.a11y.js +1 -1
- package/lib/components/modal/modal_header_title.js +12 -3
- package/lib/components/notification/notification_event.a11y.js +117 -0
- package/lib/components/page/page_header/page_header.a11y.js +40 -0
- package/lib/components/portal/portal.a11y.js +73 -0
- package/lib/components/resizable_container/resizable_panel.js +5 -0
- package/lib/components/tool_tip/tool_tip.js +13 -7
- package/lib/components/tool_tip/tool_tip_manager.js +50 -0
- package/lib/services/security/get_secure_rel_for_target.js +2 -9
- package/lib/services/theme/hooks.js +22 -2
- package/lib/services/theme/index.js +6 -0
- package/optimize/es/components/basic_table/basic_table.js +56 -101
- package/optimize/es/components/basic_table/basic_table.styles.js +45 -0
- package/optimize/es/components/datagrid/controls/column_selector.js +22 -7
- package/optimize/es/components/datagrid/controls/column_sorting_draggable.js +17 -8
- package/optimize/es/components/datagrid/data_grid.a11y.js +3 -2
- package/optimize/es/components/modal/confirm_modal.js +4 -3
- package/optimize/es/components/modal/modal.a11y.js +1 -1
- package/optimize/es/components/modal/modal_header_title.js +4 -2
- package/optimize/es/components/notification/notification_event.a11y.js +103 -0
- package/optimize/es/components/page/page_header/page_header.a11y.js +32 -0
- package/optimize/es/components/portal/portal.a11y.js +60 -0
- package/optimize/es/components/tool_tip/tool_tip.js +10 -5
- package/optimize/es/components/tool_tip/tool_tip_manager.js +41 -0
- package/optimize/es/services/security/get_secure_rel_for_target.js +2 -8
- package/optimize/es/services/theme/hooks.js +18 -0
- package/optimize/es/services/theme/index.js +1 -1
- package/optimize/lib/components/basic_table/basic_table.js +56 -95
- package/optimize/lib/components/basic_table/basic_table.styles.js +56 -0
- package/optimize/lib/components/datagrid/controls/column_selector.js +21 -6
- package/optimize/lib/components/datagrid/controls/column_sorting_draggable.js +17 -8
- package/optimize/lib/components/datagrid/data_grid.a11y.js +3 -2
- package/optimize/lib/components/modal/confirm_modal.js +4 -3
- package/optimize/lib/components/modal/modal.a11y.js +1 -1
- package/optimize/lib/components/modal/modal_header_title.js +4 -2
- package/optimize/lib/components/notification/notification_event.a11y.js +117 -0
- package/optimize/lib/components/page/page_header/page_header.a11y.js +40 -0
- package/optimize/lib/components/portal/portal.a11y.js +73 -0
- package/optimize/lib/components/tool_tip/tool_tip.js +13 -7
- package/optimize/lib/components/tool_tip/tool_tip_manager.js +49 -0
- package/optimize/lib/services/security/get_secure_rel_for_target.js +2 -9
- package/optimize/lib/services/theme/hooks.js +22 -2
- package/optimize/lib/services/theme/index.js +6 -0
- package/package.json +1 -1
- package/src/components/datagrid/controls/_data_grid_column_sorting.scss +14 -13
- package/src/components/index.scss +0 -1
- package/test-env/components/basic_table/basic_table.js +56 -95
- package/test-env/components/basic_table/basic_table.styles.js +56 -0
- package/test-env/components/datagrid/controls/column_selector.js +21 -6
- package/test-env/components/datagrid/controls/column_sorting_draggable.js +17 -8
- package/test-env/components/datagrid/data_grid.a11y.js +3 -2
- package/test-env/components/modal/confirm_modal.js +5 -3
- package/test-env/components/modal/modal.a11y.js +1 -1
- package/test-env/components/modal/modal_header_title.js +12 -3
- package/test-env/components/notification/notification_event.a11y.js +117 -0
- package/test-env/components/page/page_header/page_header.a11y.js +40 -0
- package/test-env/components/portal/portal.a11y.js +73 -0
- package/test-env/components/resizable_container/resizable_panel.js +5 -0
- package/test-env/components/tool_tip/tool_tip.js +13 -7
- package/test-env/components/tool_tip/tool_tip_manager.js +49 -0
- package/test-env/services/security/get_secure_rel_for_target.js +2 -9
- package/test-env/services/theme/hooks.js +22 -2
- package/test-env/services/theme/index.js +6 -0
- package/es/services/url.js +0 -23
- package/lib/services/url.js +0 -32
- package/optimize/es/services/url.js +0 -23
- package/optimize/lib/services/url.js +0 -32
- package/src/components/basic_table/_basic_table.scss +0 -41
- package/src/components/basic_table/_index.scss +0 -1
- package/test-env/services/url.js +0 -32
|
@@ -0,0 +1,32 @@
|
|
|
1
|
+
/*
|
|
2
|
+
* Copyright Elasticsearch B.V. and/or licensed to Elasticsearch B.V. under one
|
|
3
|
+
* or more contributor license agreements. Licensed under the Elastic License
|
|
4
|
+
* 2.0 and the Server Side Public License, v 1; you may not use this file except
|
|
5
|
+
* in compliance with, at your election, the Elastic License 2.0 or the Server
|
|
6
|
+
* Side Public License, v 1.
|
|
7
|
+
*/
|
|
8
|
+
/// <reference types="../../../../cypress/support"/>
|
|
9
|
+
import React from 'react';
|
|
10
|
+
import { EuiButton } from '../../button';
|
|
11
|
+
import { EuiPageHeader } from './page_header';
|
|
12
|
+
import { jsx as ___EmotionJSX } from "@emotion/react";
|
|
13
|
+
describe('EuiPageHeader', function () {
|
|
14
|
+
beforeEach(function () {
|
|
15
|
+
cy.viewport(1024, 768); // medium breakpoint
|
|
16
|
+
|
|
17
|
+
cy.realMount(___EmotionJSX(EuiPageHeader, {
|
|
18
|
+
pageTitle: "Page title",
|
|
19
|
+
iconType: "logoKibana",
|
|
20
|
+
description: "This description should be describing the current page as depicted by the page title. It will never extend beneath the right side content.",
|
|
21
|
+
rightSideItems: [___EmotionJSX(EuiButton, {
|
|
22
|
+
fill: true
|
|
23
|
+
}, "Add something"), ___EmotionJSX(EuiButton, null, "Do something")]
|
|
24
|
+
}));
|
|
25
|
+
cy.get('h1.euiTitle').should('exist');
|
|
26
|
+
});
|
|
27
|
+
describe('Automated accessibility check', function () {
|
|
28
|
+
it('has zero violations on first render', function () {
|
|
29
|
+
cy.checkAxe();
|
|
30
|
+
});
|
|
31
|
+
});
|
|
32
|
+
});
|
|
@@ -0,0 +1,70 @@
|
|
|
1
|
+
function _slicedToArray(arr, i) { return _arrayWithHoles(arr) || _iterableToArrayLimit(arr, i) || _unsupportedIterableToArray(arr, i) || _nonIterableRest(); }
|
|
2
|
+
|
|
3
|
+
function _nonIterableRest() { throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method."); }
|
|
4
|
+
|
|
5
|
+
function _unsupportedIterableToArray(o, minLen) { if (!o) return; if (typeof o === "string") return _arrayLikeToArray(o, minLen); var n = Object.prototype.toString.call(o).slice(8, -1); if (n === "Object" && o.constructor) n = o.constructor.name; if (n === "Map" || n === "Set") return Array.from(o); if (n === "Arguments" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)) return _arrayLikeToArray(o, minLen); }
|
|
6
|
+
|
|
7
|
+
function _arrayLikeToArray(arr, len) { if (len == null || len > arr.length) len = arr.length; for (var i = 0, arr2 = new Array(len); i < len; i++) { arr2[i] = arr[i]; } return arr2; }
|
|
8
|
+
|
|
9
|
+
function _iterableToArrayLimit(arr, i) { var _i = arr == null ? null : typeof Symbol !== "undefined" && arr[Symbol.iterator] || arr["@@iterator"]; if (_i == null) return; var _arr = []; var _n = true; var _d = false; var _s, _e; try { for (_i = _i.call(arr); !(_n = (_s = _i.next()).done); _n = true) { _arr.push(_s.value); if (i && _arr.length === i) break; } } catch (err) { _d = true; _e = err; } finally { try { if (!_n && _i["return"] != null) _i["return"](); } finally { if (_d) throw _e; } } return _arr; }
|
|
10
|
+
|
|
11
|
+
function _arrayWithHoles(arr) { if (Array.isArray(arr)) return arr; }
|
|
12
|
+
|
|
13
|
+
/*
|
|
14
|
+
* Copyright Elasticsearch B.V. and/or licensed to Elasticsearch B.V. under one
|
|
15
|
+
* or more contributor license agreements. Licensed under the Elastic License
|
|
16
|
+
* 2.0 and the Server Side Public License, v 1; you may not use this file except
|
|
17
|
+
* in compliance with, at your election, the Elastic License 2.0 or the Server
|
|
18
|
+
* Side Public License, v 1.
|
|
19
|
+
*/
|
|
20
|
+
/// <reference types="../../../cypress/support"/>
|
|
21
|
+
import React, { useState } from 'react';
|
|
22
|
+
import { EuiButton } from '../button';
|
|
23
|
+
import { EuiPortal } from './portal';
|
|
24
|
+
import { jsx as ___EmotionJSX } from "@emotion/react";
|
|
25
|
+
|
|
26
|
+
var Portal = function Portal() {
|
|
27
|
+
var _useState = useState(false),
|
|
28
|
+
_useState2 = _slicedToArray(_useState, 2),
|
|
29
|
+
isPortalVisible = _useState2[0],
|
|
30
|
+
setIsPortalVisible = _useState2[1];
|
|
31
|
+
|
|
32
|
+
var togglePortal = function togglePortal() {
|
|
33
|
+
setIsPortalVisible(!isPortalVisible);
|
|
34
|
+
};
|
|
35
|
+
|
|
36
|
+
var closePortal = function closePortal() {
|
|
37
|
+
setIsPortalVisible(false);
|
|
38
|
+
};
|
|
39
|
+
|
|
40
|
+
var customPortal;
|
|
41
|
+
|
|
42
|
+
if (isPortalVisible) {
|
|
43
|
+
customPortal = ___EmotionJSX(EuiPortal, null, ___EmotionJSX("div", null, "This is the portal. Click anywhere to close."), ___EmotionJSX(EuiButton, {
|
|
44
|
+
onClick: closePortal
|
|
45
|
+
}, "Close portal"));
|
|
46
|
+
}
|
|
47
|
+
|
|
48
|
+
return ___EmotionJSX("div", null, ___EmotionJSX(EuiButton, {
|
|
49
|
+
onClick: togglePortal
|
|
50
|
+
}, "View guide"), customPortal);
|
|
51
|
+
};
|
|
52
|
+
|
|
53
|
+
describe('EuiPortal', function () {
|
|
54
|
+
beforeEach(function () {
|
|
55
|
+
cy.viewport(1024, 768); // medium breakpoint
|
|
56
|
+
|
|
57
|
+
cy.realMount(___EmotionJSX(Portal, null));
|
|
58
|
+
cy.get('div[data-relative-to-header="above"]').should('not.exist');
|
|
59
|
+
});
|
|
60
|
+
describe('Automated accessibility check', function () {
|
|
61
|
+
it('has zero violations on first render', function () {
|
|
62
|
+
cy.checkAxe();
|
|
63
|
+
});
|
|
64
|
+
it('has zero violations after the portal is activated', function () {
|
|
65
|
+
cy.get('button[type="button"]').contains('View guide').realClick();
|
|
66
|
+
cy.get('div[data-euiportal="true"]').should('exist');
|
|
67
|
+
cy.checkAxe();
|
|
68
|
+
});
|
|
69
|
+
});
|
|
70
|
+
});
|
|
@@ -303,6 +303,11 @@ EuiResizablePanel.propTypes = {
|
|
|
303
303
|
*/
|
|
304
304
|
style: PropTypes.any,
|
|
305
305
|
|
|
306
|
+
/**
|
|
307
|
+
* tabIndex={0} provides full keyboard access when content overflows `<EuiResizablePanel />`
|
|
308
|
+
*/
|
|
309
|
+
tabIndex: PropTypes.number,
|
|
310
|
+
|
|
306
311
|
/**
|
|
307
312
|
* Props to add to the wrapping `.euiResizablePanel` div
|
|
308
313
|
*/
|
|
@@ -41,13 +41,14 @@ import React, { Component } from 'react';
|
|
|
41
41
|
import PropTypes from "prop-types";
|
|
42
42
|
import classNames from 'classnames';
|
|
43
43
|
import { keysOf } from '../common';
|
|
44
|
+
import { findPopoverPosition, htmlIdGenerator } from '../../services';
|
|
45
|
+
import { enqueueStateChange } from '../../services/react';
|
|
46
|
+
import { EuiResizeObserver } from '../observer/resize_observer';
|
|
44
47
|
import { EuiPortal } from '../portal';
|
|
48
|
+
import { EuiToolTipPopover } from './tool_tip_popover';
|
|
45
49
|
import { EuiToolTipAnchor } from './tool_tip_anchor';
|
|
46
50
|
import { EuiToolTipArrow } from './tool_tip_arrow';
|
|
47
|
-
import {
|
|
48
|
-
import { enqueueStateChange } from '../../services/react';
|
|
49
|
-
import { findPopoverPosition, htmlIdGenerator } from '../../services';
|
|
50
|
-
import { EuiResizeObserver } from '../observer/resize_observer';
|
|
51
|
+
import { toolTipManager } from './tool_tip_manager';
|
|
51
52
|
import { jsx as ___EmotionJSX } from "@emotion/react";
|
|
52
53
|
var positionsToClassNameMap = {
|
|
53
54
|
top: 'euiToolTip--top',
|
|
@@ -142,9 +143,11 @@ export var EuiToolTip = /*#__PURE__*/function (_Component) {
|
|
|
142
143
|
if (!_this.timeoutId) {
|
|
143
144
|
_this.timeoutId = setTimeout(function () {
|
|
144
145
|
enqueueStateChange(function () {
|
|
145
|
-
|
|
146
|
+
_this.setState({
|
|
146
147
|
visible: true
|
|
147
148
|
});
|
|
149
|
+
|
|
150
|
+
toolTipManager.registerTooltip(_this.hideToolTip);
|
|
148
151
|
});
|
|
149
152
|
}, delayToMsMap[_this.props.delay]);
|
|
150
153
|
}
|
|
@@ -205,6 +208,8 @@ export var EuiToolTip = /*#__PURE__*/function (_Component) {
|
|
|
205
208
|
toolTipStyles: DEFAULT_TOOLTIP_STYLES,
|
|
206
209
|
arrowStyles: undefined
|
|
207
210
|
});
|
|
211
|
+
|
|
212
|
+
toolTipManager.deregisterToolTip(_this.hideToolTip);
|
|
208
213
|
}
|
|
209
214
|
});
|
|
210
215
|
});
|
|
@@ -0,0 +1,42 @@
|
|
|
1
|
+
function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } }
|
|
2
|
+
|
|
3
|
+
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; }
|
|
4
|
+
|
|
5
|
+
/*
|
|
6
|
+
* Copyright Elasticsearch B.V. and/or licensed to Elasticsearch B.V. under one
|
|
7
|
+
* or more contributor license agreements. Licensed under the Elastic License
|
|
8
|
+
* 2.0 and the Server Side Public License, v 1; you may not use this file except
|
|
9
|
+
* in compliance with, at your election, the Elastic License 2.0 or the Server
|
|
10
|
+
* Side Public License, v 1.
|
|
11
|
+
*/
|
|
12
|
+
|
|
13
|
+
/**
|
|
14
|
+
* Manager utility that ensures only one tooltip is visible at a time
|
|
15
|
+
*
|
|
16
|
+
* UX rationale (primarily for mouse-only users):
|
|
17
|
+
* @see https://github.com/elastic/kibana/issues/144482
|
|
18
|
+
* @see https://github.com/elastic/eui/issues/5883
|
|
19
|
+
*/
|
|
20
|
+
var ToolTipManager = function ToolTipManager() {
|
|
21
|
+
var _this = this;
|
|
22
|
+
|
|
23
|
+
_classCallCheck(this, ToolTipManager);
|
|
24
|
+
|
|
25
|
+
_defineProperty(this, "toolTipsToHide", new Set());
|
|
26
|
+
|
|
27
|
+
_defineProperty(this, "registerTooltip", function (hideCallback) {
|
|
28
|
+
_this.toolTipsToHide.forEach(function (hide) {
|
|
29
|
+
return hide();
|
|
30
|
+
});
|
|
31
|
+
|
|
32
|
+
_this.toolTipsToHide.clear();
|
|
33
|
+
|
|
34
|
+
_this.toolTipsToHide.add(hideCallback);
|
|
35
|
+
});
|
|
36
|
+
|
|
37
|
+
_defineProperty(this, "deregisterToolTip", function (hideCallback) {
|
|
38
|
+
_this.toolTipsToHide.delete(hideCallback);
|
|
39
|
+
});
|
|
40
|
+
};
|
|
41
|
+
|
|
42
|
+
export var toolTipManager = new ToolTipManager();
|
|
@@ -10,20 +10,14 @@
|
|
|
10
10
|
* Secures outbound links. For more info:
|
|
11
11
|
* https://www.jitbit.com/alexblog/256-targetblank---the-most-underestimated-vulnerability-ever/
|
|
12
12
|
*/
|
|
13
|
-
import { isDomainSecure } from '../url';
|
|
14
13
|
export var getSecureRelForTarget = function getSecureRelForTarget(_ref) {
|
|
15
|
-
var
|
|
16
|
-
_ref$target = _ref.target,
|
|
14
|
+
var _ref$target = _ref.target,
|
|
17
15
|
target = _ref$target === void 0 ? '' : _ref$target,
|
|
18
16
|
rel = _ref.rel;
|
|
19
|
-
var isElasticHref = !!href && isDomainSecure(href);
|
|
20
17
|
var relParts = !!rel ? rel.split(' ').filter(function (part) {
|
|
21
18
|
return !!part.length && part !== 'noreferrer';
|
|
22
19
|
}) : [];
|
|
23
|
-
|
|
24
|
-
if (!isElasticHref) {
|
|
25
|
-
relParts.push('noreferrer');
|
|
26
|
-
}
|
|
20
|
+
relParts.push('noreferrer');
|
|
27
21
|
|
|
28
22
|
if (target.includes('_blank') && relParts.indexOf('noopener') === -1) {
|
|
29
23
|
relParts.push('noopener');
|
|
@@ -12,6 +12,10 @@ import { EuiThemeContext, EuiModificationsContext, EuiColorModeContext, defaultC
|
|
|
12
12
|
import { getEuiDevProviderWarning } from './provider';
|
|
13
13
|
import { jsx as ___EmotionJSX } from "@emotion/react";
|
|
14
14
|
var providerMessage = "`EuiProvider` is missing which can result in negative effects.\nWrap your component in `EuiProvider`: https://ela.st/euiprovider.";
|
|
15
|
+
/**
|
|
16
|
+
* Hook for function components
|
|
17
|
+
*/
|
|
18
|
+
|
|
15
19
|
export var useEuiTheme = function useEuiTheme() {
|
|
16
20
|
var theme = useContext(EuiThemeContext);
|
|
17
21
|
var colorMode = useContext(EuiColorModeContext);
|
|
@@ -46,6 +50,10 @@ export var useEuiTheme = function useEuiTheme() {
|
|
|
46
50
|
}, [theme, colorMode, modifications]);
|
|
47
51
|
return assembledTheme;
|
|
48
52
|
};
|
|
53
|
+
/**
|
|
54
|
+
* HOC for class components
|
|
55
|
+
*/
|
|
56
|
+
|
|
49
57
|
// Provide the component props interface as the generic to allow the docs props table to populate.
|
|
50
58
|
// e.g., `const EuiComponent = withEuiTheme<EuiComponentProps>(_EuiComponent)`
|
|
51
59
|
export var withEuiTheme = function withEuiTheme(Component) {
|
|
@@ -62,4 +70,14 @@ export var withEuiTheme = function withEuiTheme(Component) {
|
|
|
62
70
|
var WithEuiTheme = /*#__PURE__*/forwardRef(Render);
|
|
63
71
|
WithEuiTheme.displayName = componentName;
|
|
64
72
|
return WithEuiTheme;
|
|
73
|
+
};
|
|
74
|
+
/**
|
|
75
|
+
* Render prop alternative for complex class components
|
|
76
|
+
* Most useful for scenarios where a HOC may interfere with typing
|
|
77
|
+
*/
|
|
78
|
+
|
|
79
|
+
export var RenderWithEuiTheme = function RenderWithEuiTheme(_ref) {
|
|
80
|
+
var children = _ref.children;
|
|
81
|
+
var theme = useEuiTheme();
|
|
82
|
+
return children(theme);
|
|
65
83
|
};
|
|
@@ -6,7 +6,7 @@
|
|
|
6
6
|
* Side Public License, v 1.
|
|
7
7
|
*/
|
|
8
8
|
export { EuiSystemContext, EuiThemeContext, EuiModificationsContext, EuiColorModeContext } from './context';
|
|
9
|
-
export { useEuiTheme, withEuiTheme } from './hooks';
|
|
9
|
+
export { useEuiTheme, withEuiTheme, RenderWithEuiTheme } from './hooks';
|
|
10
10
|
export { EuiThemeProvider, getEuiDevProviderWarning, setEuiDevProviderWarning } from './provider';
|
|
11
11
|
export { buildTheme, computed, isInverseColorMode, getColorMode, getComputed, getOn, mergeDeep, setOn, Computed } from './utils';
|
|
12
12
|
export { COLOR_MODES_STANDARD } from './types';
|
package/eui.d.ts
CHANGED
|
@@ -5695,6 +5695,16 @@ declare module '@elastic/eui/src/components/tool_tip/tool_tip_arrow' {
|
|
|
5695
5695
|
position: ToolTipPositions;
|
|
5696
5696
|
} & HTMLAttributes<HTMLDivElement>>;
|
|
5697
5697
|
|
|
5698
|
+
}
|
|
5699
|
+
declare module '@elastic/eui/src/components/tool_tip/tool_tip_manager' {
|
|
5700
|
+
class ToolTipManager {
|
|
5701
|
+
toolTipsToHide: Set<Function>;
|
|
5702
|
+
registerTooltip: (hideCallback: Function) => void;
|
|
5703
|
+
deregisterToolTip: (hideCallback: Function) => void;
|
|
5704
|
+
}
|
|
5705
|
+
export const toolTipManager: ToolTipManager;
|
|
5706
|
+
export {};
|
|
5707
|
+
|
|
5698
5708
|
}
|
|
5699
5709
|
declare module '@elastic/eui/src/components/tool_tip/tool_tip' {
|
|
5700
5710
|
import { Component, ReactElement, ReactNode, MouseEvent as ReactMouseEvent, HTMLAttributes } from 'react';
|
|
@@ -6936,7 +6946,7 @@ declare module '@elastic/eui/src/global_styling/functions/size' {
|
|
|
6936
6946
|
declare module '@elastic/eui/src/services/theme/provider' {
|
|
6937
6947
|
import React, { PropsWithChildren } from 'react';
|
|
6938
6948
|
import { EuiThemeColorMode, EuiThemeSystem, EuiThemeModifications } from '@elastic/eui/src/services/theme/types'; type LEVELS = 'log' | 'warn' | 'error';
|
|
6939
|
-
export const setEuiDevProviderWarning: (level: LEVELS) => LEVELS;
|
|
6949
|
+
export const setEuiDevProviderWarning: (level: LEVELS | undefined) => LEVELS | undefined;
|
|
6940
6950
|
export const getEuiDevProviderWarning: () => LEVELS | undefined;
|
|
6941
6951
|
export interface EuiThemeProviderProps<T> {
|
|
6942
6952
|
theme?: EuiThemeSystem<T>;
|
|
@@ -6951,16 +6961,29 @@ declare module '@elastic/eui/src/services/theme/provider' {
|
|
|
6951
6961
|
declare module '@elastic/eui/src/services/theme/hooks' {
|
|
6952
6962
|
import React from 'react';
|
|
6953
6963
|
import { EuiThemeColorModeStandard, EuiThemeModifications, EuiThemeComputed } from '@elastic/eui/src/services/theme/types';
|
|
6964
|
+
/**
|
|
6965
|
+
* Hook for function components
|
|
6966
|
+
*/
|
|
6954
6967
|
export interface UseEuiTheme<T extends {} = {}> {
|
|
6955
6968
|
euiTheme: EuiThemeComputed<T>;
|
|
6956
6969
|
colorMode: EuiThemeColorModeStandard;
|
|
6957
6970
|
modifications: EuiThemeModifications<T>;
|
|
6958
6971
|
}
|
|
6959
6972
|
export const useEuiTheme: <T extends {} = {}>() => UseEuiTheme<T>;
|
|
6973
|
+
/**
|
|
6974
|
+
* HOC for class components
|
|
6975
|
+
*/
|
|
6960
6976
|
export interface WithEuiThemeProps<P extends {} = {}> {
|
|
6961
6977
|
theme: UseEuiTheme<P>;
|
|
6962
6978
|
}
|
|
6963
6979
|
export const withEuiTheme: <T extends {} = {}, U extends {} = {}>(Component: React.ComponentType<T & WithEuiThemeProps<U>>) => React.ForwardRefExoticComponent<React.PropsWithoutRef<Omit<T, "theme">> & React.RefAttributes<Omit<T, "theme">>>;
|
|
6980
|
+
/**
|
|
6981
|
+
* Render prop alternative for complex class components
|
|
6982
|
+
* Most useful for scenarios where a HOC may interfere with typing
|
|
6983
|
+
*/
|
|
6984
|
+
export const RenderWithEuiTheme: <T extends {} = {}>({ children, }: {
|
|
6985
|
+
children: (theme: UseEuiTheme) => React.ReactElement;
|
|
6986
|
+
}) => React.ReactElement<any, string | React.JSXElementConstructor<any>>;
|
|
6964
6987
|
|
|
6965
6988
|
}
|
|
6966
6989
|
declare module '@elastic/eui/src/global_styling/functions/typography' {
|
|
@@ -7069,7 +7092,7 @@ declare module '@elastic/eui/src/services/theme/context' {
|
|
|
7069
7092
|
declare module '@elastic/eui/src/services/theme' {
|
|
7070
7093
|
export { EuiSystemContext, EuiThemeContext, EuiModificationsContext, EuiColorModeContext, } from '@elastic/eui/src/services/theme/context';
|
|
7071
7094
|
export type { UseEuiTheme, WithEuiThemeProps } from '@elastic/eui/src/services/theme/hooks';
|
|
7072
|
-
export { useEuiTheme, withEuiTheme } from '@elastic/eui/src/services/theme/hooks';
|
|
7095
|
+
export { useEuiTheme, withEuiTheme, RenderWithEuiTheme } from '@elastic/eui/src/services/theme/hooks';
|
|
7073
7096
|
export type { EuiThemeProviderProps } from '@elastic/eui/src/services/theme/provider';
|
|
7074
7097
|
export { EuiThemeProvider, getEuiDevProviderWarning, setEuiDevProviderWarning, } from '@elastic/eui/src/services/theme/provider';
|
|
7075
7098
|
export { buildTheme, computed, isInverseColorMode, getColorMode, getComputed, getOn, mergeDeep, setOn, Computed, } from '@elastic/eui/src/services/theme/utils';
|
|
@@ -7373,13 +7396,13 @@ declare module '@elastic/eui/src/services/random' {
|
|
|
7373
7396
|
}) => moment.Moment;
|
|
7374
7397
|
}
|
|
7375
7398
|
|
|
7376
|
-
}
|
|
7377
|
-
declare module '@elastic/eui/src/services/url' {
|
|
7378
|
-
export const isDomainSecure: (url?: string) => boolean;
|
|
7379
|
-
|
|
7380
7399
|
}
|
|
7381
7400
|
declare module '@elastic/eui/src/services/security/get_secure_rel_for_target' {
|
|
7382
|
-
|
|
7401
|
+
/**
|
|
7402
|
+
* Secures outbound links. For more info:
|
|
7403
|
+
* https://www.jitbit.com/alexblog/256-targetblank---the-most-underestimated-vulnerability-ever/
|
|
7404
|
+
*/
|
|
7405
|
+
export const getSecureRelForTarget: ({ target, rel, }: {
|
|
7383
7406
|
href?: string | undefined;
|
|
7384
7407
|
target?: string | undefined;
|
|
7385
7408
|
rel?: string | undefined;
|
|
@@ -15854,9 +15877,16 @@ declare module '@elastic/eui/src/components/modal/modal_header' {
|
|
|
15854
15877
|
|
|
15855
15878
|
}
|
|
15856
15879
|
declare module '@elastic/eui/src/components/modal/modal_header_title' {
|
|
15857
|
-
import { FunctionComponent, HTMLAttributes } from 'react';
|
|
15880
|
+
import { FunctionComponent, HTMLAttributes, ElementType } from 'react';
|
|
15858
15881
|
import { CommonProps } from '@elastic/eui/src/components/common';
|
|
15859
|
-
export type EuiModalHeaderTitleProps = FunctionComponent<HTMLAttributes<
|
|
15882
|
+
export type EuiModalHeaderTitleProps = FunctionComponent<HTMLAttributes<HTMLHeadingElement> & CommonProps & {
|
|
15883
|
+
/**
|
|
15884
|
+
* The tag to render. Can be changed to a lower heading
|
|
15885
|
+
* level like `h2` or a container `div`.
|
|
15886
|
+
* @default h1
|
|
15887
|
+
*/
|
|
15888
|
+
component?: ElementType;
|
|
15889
|
+
}>;
|
|
15860
15890
|
export const EuiModalHeaderTitle: EuiModalHeaderTitleProps;
|
|
15861
15891
|
|
|
15862
15892
|
}
|
|
@@ -15876,8 +15906,9 @@ declare module '@elastic/eui/src/components/modal/modal_body' {
|
|
|
15876
15906
|
|
|
15877
15907
|
}
|
|
15878
15908
|
declare module '@elastic/eui/src/components/modal/confirm_modal' {
|
|
15879
|
-
import React, { FunctionComponent, ReactNode } from 'react';
|
|
15909
|
+
import React, { FunctionComponent, ComponentProps, ReactNode } from 'react';
|
|
15880
15910
|
import { EuiModalProps } from '@elastic/eui/src/components/modal/modal';
|
|
15911
|
+
import { EuiModalHeaderTitleProps } from '@elastic/eui/src/components/modal/modal_header_title';
|
|
15881
15912
|
import { EuiButtonColor } from '@elastic/eui/src/components/button';
|
|
15882
15913
|
export interface EuiConfirmModalProps extends Omit<EuiModalProps, 'children' | 'onClose' | 'title'> {
|
|
15883
15914
|
/**
|
|
@@ -15885,6 +15916,7 @@ declare module '@elastic/eui/src/components/modal/confirm_modal' {
|
|
|
15885
15916
|
*/
|
|
15886
15917
|
children?: ReactNode;
|
|
15887
15918
|
title?: ReactNode;
|
|
15919
|
+
titleProps?: ComponentProps<EuiModalHeaderTitleProps>;
|
|
15888
15920
|
cancelButtonText?: ReactNode;
|
|
15889
15921
|
confirmButtonText?: ReactNode;
|
|
15890
15922
|
onCancel: (event?: React.KeyboardEvent<HTMLDivElement> | React.MouseEvent<HTMLButtonElement>) => void;
|
|
@@ -19996,6 +20028,13 @@ declare module '@elastic/eui/src/components/basic_table/expanded_item_actions' {
|
|
|
19996
20028
|
}
|
|
19997
20029
|
export const ExpandedItemActions: <T extends {}>({ actions, itemId, item, actionEnabled, className, }: ExpandedItemActionsProps<T>) => ReactElement;
|
|
19998
20030
|
|
|
20031
|
+
}
|
|
20032
|
+
declare module '@elastic/eui/src/components/basic_table/basic_table.styles' {
|
|
20033
|
+
import { UseEuiTheme } from '@elastic/eui/src/services';
|
|
20034
|
+
export const euiBasicTableBodyLoading: ({ euiTheme }: UseEuiTheme) => import("@emotion/utils").SerializedStyles;
|
|
20035
|
+
export const safariLoadingWorkaround: () => import("@emotion/utils").SerializedStyles;
|
|
20036
|
+
export const euiBasicTableActionsWrapper: import("@emotion/utils").SerializedStyles;
|
|
20037
|
+
|
|
19999
20038
|
}
|
|
20000
20039
|
declare module '@elastic/eui/src/components/basic_table/basic_table' {
|
|
20001
20040
|
import { Component, HTMLAttributes, ReactNode } from 'react';
|
|
@@ -20130,17 +20169,11 @@ declare module '@elastic/eui/src/components/basic_table/basic_table' {
|
|
|
20130
20169
|
static getDerivedStateFromProps<T>(nextProps: EuiBasicTableProps<T>, prevState: State<T>): {
|
|
20131
20170
|
selection: T[];
|
|
20132
20171
|
} | null;
|
|
20133
|
-
private cleanups;
|
|
20134
|
-
private tbody;
|
|
20135
20172
|
constructor(props: EuiBasicTableProps<T>);
|
|
20136
20173
|
componentDidMount(): void;
|
|
20137
|
-
componentDidUpdate(
|
|
20138
|
-
componentWillUnmount(): void;
|
|
20174
|
+
componentDidUpdate(): void;
|
|
20139
20175
|
getInitialSelection(): void;
|
|
20140
20176
|
setSelection(newSelection: T[]): void;
|
|
20141
|
-
private setTbody;
|
|
20142
|
-
private addLoadingListeners;
|
|
20143
|
-
private removeLoadingListeners;
|
|
20144
20177
|
buildCriteria(props: EuiBasicTableProps<T>): Criteria<T>;
|
|
20145
20178
|
changeSelection(selection: T[]): void;
|
|
20146
20179
|
clearSelection(): void;
|
|
@@ -20157,8 +20190,8 @@ declare module '@elastic/eui/src/components/basic_table/basic_table' {
|
|
|
20157
20190
|
renderTableHead(): JSX.Element;
|
|
20158
20191
|
renderTableFooter(): JSX.Element | null;
|
|
20159
20192
|
renderTableBody(): JSX.Element;
|
|
20160
|
-
|
|
20161
|
-
|
|
20193
|
+
renderErrorMessage(error: string): JSX.Element;
|
|
20194
|
+
renderEmptyMessage(): JSX.Element;
|
|
20162
20195
|
renderItemRow(item: T, rowIndex: number): JSX.Element;
|
|
20163
20196
|
renderItemSelectionCell(itemId: ItemId<T>, item: T, selected: boolean): JSX.Element;
|
|
20164
20197
|
renderItemActionsCell(itemId: ItemIdResolved, item: T, column: EuiTableActionsColumnType<T>, columnIndex: number): JSX.Element;
|
|
@@ -20767,6 +20800,10 @@ declare module '@elastic/eui/src/components/resizable_container/resizable_panel'
|
|
|
20767
20800
|
* Custom CSS properties applied to the wrapping `.euiResizablePanel` div
|
|
20768
20801
|
*/
|
|
20769
20802
|
style?: CSSProperties;
|
|
20803
|
+
/**
|
|
20804
|
+
* tabIndex={0} provides full keyboard access when content overflows `<EuiResizablePanel />`
|
|
20805
|
+
*/
|
|
20806
|
+
tabIndex?: number;
|
|
20770
20807
|
/**
|
|
20771
20808
|
* Props to add to the wrapping `.euiResizablePanel` div
|
|
20772
20809
|
*/
|
|
@@ -25755,6 +25792,7 @@ declare module '@elastic/eui' {
|
|
|
25755
25792
|
"euiDataGridHeaderCell.sortedByAscendingMultiple": any;
|
|
25756
25793
|
"euiDataGridHeaderCell.sortedByDescendingMultiple": any;
|
|
25757
25794
|
"euiDataGridHeaderCell.actionsPopoverScreenReaderText": any;
|
|
25795
|
+
"euiColumnSelector.dragHandleAriaLabel": any;
|
|
25758
25796
|
"euiColumnSelector.button": any;
|
|
25759
25797
|
"euiColumnSelector.buttonActiveSingular": any;
|
|
25760
25798
|
"euiColumnSelector.buttonActivePlural": any;
|