@elastic/eui 122.1.0 → 123.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.
Files changed (46) hide show
  1. package/dist/eui-icons.json +94 -94
  2. package/es/components/datagrid/body/data_grid_body_virtualized.js +119 -36
  3. package/es/components/datagrid/utils/row_heights.js +4 -1
  4. package/es/components/flyout/flyout.component.js +129 -55
  5. package/es/components/flyout/flyout_menu/action_button.js +15 -21
  6. package/es/components/flyout/flyout_menu/flyout_menu.js +40 -46
  7. package/es/components/flyout/manager/flyout_managed.js +24 -6
  8. package/es/components/form/described_form_group/described_form_group.js +17 -4
  9. package/es/components/tabs/tabbed_content/tabbed_content.js +93 -138
  10. package/es/components/text_truncate/text_truncate.js +9 -4
  11. package/eui.d.ts +32 -58
  12. package/lib/components/datagrid/body/data_grid_body_virtualized.js +119 -36
  13. package/lib/components/datagrid/utils/row_heights.js +4 -1
  14. package/lib/components/flyout/flyout.component.js +134 -62
  15. package/lib/components/flyout/flyout_menu/action_button.js +18 -23
  16. package/lib/components/flyout/flyout_menu/flyout_menu.js +40 -46
  17. package/lib/components/flyout/manager/flyout_managed.js +23 -5
  18. package/lib/components/form/described_form_group/described_form_group.js +19 -3
  19. package/lib/components/tabs/tabbed_content/tabbed_content.js +98 -142
  20. package/lib/components/text_truncate/text_truncate.js +9 -4
  21. package/optimize/es/components/datagrid/body/data_grid_body_virtualized.js +116 -36
  22. package/optimize/es/components/datagrid/utils/row_heights.js +4 -1
  23. package/optimize/es/components/flyout/flyout.component.js +124 -50
  24. package/optimize/es/components/flyout/flyout_menu/action_button.js +14 -21
  25. package/optimize/es/components/flyout/manager/flyout_managed.js +24 -6
  26. package/optimize/es/components/form/described_form_group/described_form_group.js +17 -4
  27. package/optimize/es/components/tabs/tabbed_content/tabbed_content.js +87 -131
  28. package/optimize/es/components/text_truncate/text_truncate.js +4 -3
  29. package/optimize/lib/components/datagrid/body/data_grid_body_virtualized.js +116 -36
  30. package/optimize/lib/components/datagrid/utils/row_heights.js +4 -1
  31. package/optimize/lib/components/flyout/flyout.component.js +123 -49
  32. package/optimize/lib/components/flyout/flyout_menu/action_button.js +14 -22
  33. package/optimize/lib/components/flyout/manager/flyout_managed.js +23 -5
  34. package/optimize/lib/components/form/described_form_group/described_form_group.js +19 -3
  35. package/optimize/lib/components/tabs/tabbed_content/tabbed_content.js +87 -131
  36. package/optimize/lib/components/text_truncate/text_truncate.js +4 -3
  37. package/package.json +2 -2
  38. package/test-env/components/datagrid/body/data_grid_body_virtualized.js +119 -36
  39. package/test-env/components/datagrid/utils/row_heights.js +4 -1
  40. package/test-env/components/flyout/flyout.component.js +123 -49
  41. package/test-env/components/flyout/flyout_menu/action_button.js +14 -22
  42. package/test-env/components/flyout/flyout_menu/flyout_menu.js +40 -46
  43. package/test-env/components/flyout/manager/flyout_managed.js +23 -5
  44. package/test-env/components/form/described_form_group/described_form_group.js +19 -3
  45. package/test-env/components/tabs/tabbed_content/tabbed_content.js +88 -132
  46. package/test-env/components/text_truncate/text_truncate.js +9 -4
@@ -1,13 +1,14 @@
1
1
  "use strict";
2
2
 
3
3
  var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefault");
4
+ var _typeof = require("@babel/runtime/helpers/typeof");
4
5
  Object.defineProperty(exports, "__esModule", {
5
6
  value: true
6
7
  });
7
8
  exports.EuiDescribedFormGroup = void 0;
8
9
  var _extends2 = _interopRequireDefault(require("@babel/runtime/helpers/extends"));
9
10
  var _objectWithoutProperties2 = _interopRequireDefault(require("@babel/runtime/helpers/objectWithoutProperties"));
10
- var _react = _interopRequireDefault(require("react"));
11
+ var _react = _interopRequireWildcard(require("react"));
11
12
  var _propTypes = _interopRequireDefault(require("prop-types"));
12
13
  var _classnames = _interopRequireDefault(require("classnames"));
13
14
  var _services = require("../../../services");
@@ -17,7 +18,7 @@ var _flex = require("../../flex");
17
18
  var _eui_form_context = require("../eui_form_context");
18
19
  var _described_form_group = require("./described_form_group.styles");
19
20
  var _react2 = require("@emotion/react");
20
- var _excluded = ["children", "className", "gutterSize", "fullWidth", "ratio", "titleSize", "title", "description", "descriptionFlexItemProps", "fieldFlexItemProps"];
21
+ var _excluded = ["children", "className", "gutterSize", "fullWidth", "ratio", "titleSize", "title", "description", "descriptionFlexItemProps", "fieldFlexItemProps", "aria-label", "aria-labelledby"];
21
22
  /*
22
23
  * Copyright Elasticsearch B.V. and/or licensed to Elasticsearch B.V. under one
23
24
  * or more contributor license agreements. Licensed under the Elastic License
@@ -25,6 +26,8 @@ var _excluded = ["children", "className", "gutterSize", "fullWidth", "ratio", "t
25
26
  * in compliance with, at your election, the Elastic License 2.0 or the Server
26
27
  * Side Public License, v 1.
27
28
  */
29
+ function _getRequireWildcardCache(e) { if ("function" != typeof WeakMap) return null; var r = new WeakMap(), t = new WeakMap(); return (_getRequireWildcardCache = function _getRequireWildcardCache(e) { return e ? t : r; })(e); }
30
+ function _interopRequireWildcard(e, r) { if (!r && e && e.__esModule) return e; if (null === e || "object" != _typeof(e) && "function" != typeof e) return { default: e }; var t = _getRequireWildcardCache(r); if (t && t.has(e)) return t.get(e); var n = { __proto__: null }, a = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var u in e) if ("default" !== u && {}.hasOwnProperty.call(e, u)) { var i = a ? Object.getOwnPropertyDescriptor(e, u) : null; i && (i.get || i.set) ? Object.defineProperty(n, u, i) : n[u] = e[u]; } return n.default = e, t && t.set(e, n), n; }
28
31
  /**
29
32
  * @see {@link https://eui.elastic.co/docs/components/forms/layouts/described-groups/|EuiDescribedFormGroup documentation}
30
33
  */
@@ -45,7 +48,15 @@ var EuiDescribedFormGroup = exports.EuiDescribedFormGroup = function EuiDescribe
45
48
  description = props.description,
46
49
  descriptionFlexItemProps = props.descriptionFlexItemProps,
47
50
  fieldFlexItemProps = props.fieldFlexItemProps,
51
+ ariaLabel = props['aria-label'],
52
+ ariaLabelledby = props['aria-labelledby'],
48
53
  rest = (0, _objectWithoutProperties2.default)(props, _excluded);
54
+ var generatedTitleId = (0, _services.useGeneratedHtmlId)({
55
+ prefix: 'euiDescribedFormGroupTitle'
56
+ });
57
+ // Reuse an `id` already set on the title element, so that consumers
58
+ // referencing it from their own `aria-labelledby` keep working
59
+ var titleId = /*#__PURE__*/(0, _react.isValidElement)(title) && title.props.id || generatedTitleId;
49
60
  var styles = (0, _services.useEuiMemoizedStyles)(_described_form_group.euiDescribedFormGroupStyles);
50
61
  var cssStyles = [styles.euiDescribedFormGroup, fullWidth ? styles.fullWidth : styles.formWidth];
51
62
  var descriptionColumnStyles = [styles.euiDescribedFormGroup__descriptionColumn, descriptionFlexItemProps === null || descriptionFlexItemProps === void 0 ? void 0 : descriptionFlexItemProps.css];
@@ -79,7 +90,11 @@ var EuiDescribedFormGroup = exports.EuiDescribedFormGroup = function EuiDescribe
79
90
  break;
80
91
  }
81
92
  return (0, _react2.jsx)(_flex.EuiFlexGroup, (0, _extends2.default)({
82
- role: "group"
93
+ role: "group",
94
+ "aria-label": ariaLabel
95
+ // The title names the group, unless the consumer provides their own label
96
+ ,
97
+ "aria-labelledby": ariaLabelledby !== null && ariaLabelledby !== void 0 ? ariaLabelledby : ariaLabel == null ? titleId : undefined
83
98
  }, rest, {
84
99
  css: cssStyles,
85
100
  className: classes,
@@ -91,6 +106,7 @@ var EuiDescribedFormGroup = exports.EuiDescribedFormGroup = function EuiDescribe
91
106
  css: descriptionColumnStyles,
92
107
  className: (0, _classnames.default)('euiDescribedFormGroup__descriptionColumn', descriptionFlexItemProps === null || descriptionFlexItemProps === void 0 ? void 0 : descriptionFlexItemProps.className)
93
108
  }), (0, _react2.jsx)(_title.EuiTitle, {
109
+ id: titleId,
94
110
  size: titleSize,
95
111
  className: "euiDescribedFormGroup__title"
96
112
  }, title), renderedDescription), (0, _react2.jsx)(_flex.EuiFlexItem, (0, _extends2.default)({
@@ -7,27 +7,17 @@ Object.defineProperty(exports, "__esModule", {
7
7
  });
8
8
  exports.EuiTabbedContent = exports.AUTOFOCUS = void 0;
9
9
  var _extends2 = _interopRequireDefault(require("@babel/runtime/helpers/extends"));
10
+ var _slicedToArray2 = _interopRequireDefault(require("@babel/runtime/helpers/slicedToArray"));
10
11
  var _objectWithoutProperties2 = _interopRequireDefault(require("@babel/runtime/helpers/objectWithoutProperties"));
11
- var _classCallCheck2 = _interopRequireDefault(require("@babel/runtime/helpers/classCallCheck"));
12
- var _createClass2 = _interopRequireDefault(require("@babel/runtime/helpers/createClass"));
13
- var _possibleConstructorReturn2 = _interopRequireDefault(require("@babel/runtime/helpers/possibleConstructorReturn"));
14
- var _getPrototypeOf2 = _interopRequireDefault(require("@babel/runtime/helpers/getPrototypeOf"));
15
- var _inherits2 = _interopRequireDefault(require("@babel/runtime/helpers/inherits"));
16
- var _defineProperty2 = _interopRequireDefault(require("@babel/runtime/helpers/defineProperty"));
17
12
  var _react = _interopRequireWildcard(require("react"));
18
13
  var _propTypes = _interopRequireDefault(require("prop-types"));
19
- var _services = require("../../../services");
20
14
  var _tabs = require("../tabs");
21
15
  var _tab = require("../tab");
16
+ var _services = require("../../../services");
22
17
  var _react2 = require("@emotion/react");
23
- var _excluded = ["className", "expand", "initialSelectedTab", "onTabClick", "selectedTab", "size", "tabs", "autoFocus"],
18
+ var _excluded = ["autoFocus", "className", "expand", "initialSelectedTab", "onTabClick", "selectedTab", "size", "tabs"],
24
19
  _excluded2 = ["id", "name", "content"];
25
- function _getRequireWildcardCache(e) { if ("function" != typeof WeakMap) return null; var r = new WeakMap(), t = new WeakMap(); return (_getRequireWildcardCache = function _getRequireWildcardCache(e) { return e ? t : r; })(e); }
26
- function _interopRequireWildcard(e, r) { if (!r && e && e.__esModule) return e; if (null === e || "object" != _typeof(e) && "function" != typeof e) return { default: e }; var t = _getRequireWildcardCache(r); if (t && t.has(e)) return t.get(e); var n = { __proto__: null }, a = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var u in e) if ("default" !== u && {}.hasOwnProperty.call(e, u)) { var i = a ? Object.getOwnPropertyDescriptor(e, u) : null; i && (i.get || i.set) ? Object.defineProperty(n, u, i) : n[u] = e[u]; } return n.default = e, t && t.set(e, n), n; }
27
- function ownKeys(e, r) { var t = Object.keys(e); if (Object.getOwnPropertySymbols) { var o = Object.getOwnPropertySymbols(e); r && (o = o.filter(function (r) { return Object.getOwnPropertyDescriptor(e, r).enumerable; })), t.push.apply(t, o); } return t; }
28
- function _objectSpread(e) { for (var r = 1; r < arguments.length; r++) { var t = null != arguments[r] ? arguments[r] : {}; r % 2 ? ownKeys(Object(t), !0).forEach(function (r) { (0, _defineProperty2.default)(e, r, t[r]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e, Object.getOwnPropertyDescriptors(t)) : ownKeys(Object(t)).forEach(function (r) { Object.defineProperty(e, r, Object.getOwnPropertyDescriptor(t, r)); }); } return e; }
29
- function _callSuper(t, o, e) { return o = (0, _getPrototypeOf2.default)(o), (0, _possibleConstructorReturn2.default)(t, _isNativeReflectConstruct() ? Reflect.construct(o, e || [], (0, _getPrototypeOf2.default)(t).constructor) : o.apply(t, e)); }
30
- function _isNativeReflectConstruct() { try { var t = !Boolean.prototype.valueOf.call(Reflect.construct(Boolean, [], function () {})); } catch (t) {} return (_isNativeReflectConstruct = function _isNativeReflectConstruct() { return !!t; })(); } /*
20
+ /*
31
21
  * Copyright Elasticsearch B.V. and/or licensed to Elasticsearch B.V. under one
32
22
  * or more contributor license agreements. Licensed under the Elastic License
33
23
  * 2.0 and the Server Side Public License, v 1; you may not use this file except
@@ -37,129 +27,94 @@ function _isNativeReflectConstruct() { try { var t = !Boolean.prototype.valueOf.
37
27
  /**
38
28
  * Marked as const so type is `['initial', 'selected']` instead of `string[]`
39
29
  */
30
+ function _getRequireWildcardCache(e) { if ("function" != typeof WeakMap) return null; var r = new WeakMap(), t = new WeakMap(); return (_getRequireWildcardCache = function _getRequireWildcardCache(e) { return e ? t : r; })(e); }
31
+ function _interopRequireWildcard(e, r) { if (!r && e && e.__esModule) return e; if (null === e || "object" != _typeof(e) && "function" != typeof e) return { default: e }; var t = _getRequireWildcardCache(r); if (t && t.has(e)) return t.get(e); var n = { __proto__: null }, a = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var u in e) if ("default" !== u && {}.hasOwnProperty.call(e, u)) { var i = a ? Object.getOwnPropertyDescriptor(e, u) : null; i && (i.get || i.set) ? Object.defineProperty(n, u, i) : n[u] = e[u]; } return n.default = e, t && t.set(e, n), n; }
40
32
  var AUTOFOCUS = exports.AUTOFOCUS = ['initial', 'selected'];
41
- var EuiTabbedContent = exports.EuiTabbedContent = /*#__PURE__*/function (_Component) {
42
- function EuiTabbedContent(props) {
43
- var _this;
44
- (0, _classCallCheck2.default)(this, EuiTabbedContent);
45
- _this = _callSuper(this, EuiTabbedContent, [props]);
46
- (0, _defineProperty2.default)(_this, "rootId", (0, _services.htmlIdGenerator)()());
47
- (0, _defineProperty2.default)(_this, "tabsRef", /*#__PURE__*/(0, _react.createRef)());
48
- (0, _defineProperty2.default)(_this, "focusTab", function () {
49
- var targetTab = _this.tabsRef.current.querySelector("#".concat(_this.state.selectedTabId));
50
- targetTab.focus();
51
- });
52
- (0, _defineProperty2.default)(_this, "initializeFocus", function () {
53
- if (!_this.state.inFocus && _this.props.autoFocus === 'selected') {
54
- // Must wait for setState to finish before calling `.focus()`
55
- // as the focus call triggers a blur on the first tab
56
- _this.setState({
57
- inFocus: true
58
- }, function () {
59
- _this.focusTab();
60
- });
61
- }
62
- });
63
- (0, _defineProperty2.default)(_this, "removeFocus", function (blurEvent) {
64
- // only set inFocus to false if the wrapping div doesn't contain the now-focusing element
65
- var currentTarget = blurEvent.currentTarget;
66
- var relatedTarget = blurEvent.relatedTarget;
67
- if (currentTarget.contains(relatedTarget) === false) {
68
- _this.setState({
69
- inFocus: false
70
- });
71
- }
72
- });
73
- (0, _defineProperty2.default)(_this, "onTabClick", function (selectedTab) {
74
- var _this$props = _this.props,
75
- onTabClick = _this$props.onTabClick,
76
- externalSelectedTab = _this$props.selectedTab;
77
- if (onTabClick) {
78
- onTabClick(selectedTab);
79
- }
80
-
81
- // Only track selection state if it's not controlled externally.
82
- if (!externalSelectedTab) {
83
- _this.setState({
84
- selectedTabId: selectedTab.id
85
- }, function () {
86
- _this.focusTab();
87
- });
88
- }
89
- });
90
- var initialSelectedTab = props.initialSelectedTab,
91
- _selectedTab = props.selectedTab,
92
- tabs = props.tabs;
33
+ var EuiTabbedContent = exports.EuiTabbedContent = function EuiTabbedContent(_ref) {
34
+ var _ref$autoFocus = _ref.autoFocus,
35
+ autoFocus = _ref$autoFocus === void 0 ? 'initial' : _ref$autoFocus,
36
+ className = _ref.className,
37
+ expand = _ref.expand,
38
+ initialSelectedTab = _ref.initialSelectedTab,
39
+ onTabClick = _ref.onTabClick,
40
+ externalSelectedTab = _ref.selectedTab,
41
+ size = _ref.size,
42
+ tabs = _ref.tabs,
43
+ rest = (0, _objectWithoutProperties2.default)(_ref, _excluded);
44
+ var rootId = (0, _services.useGeneratedHtmlId)();
45
+ var tabsRef = (0, _react.useRef)(null);
46
+ var inFocusRef = (0, _react.useRef)(false);
47
+ var _useState = (0, _react.useState)(function () {
48
+ return externalSelectedTab ? undefined : (initialSelectedTab === null || initialSelectedTab === void 0 ? void 0 : initialSelectedTab.id) || tabs[0].id;
49
+ }),
50
+ _useState2 = (0, _slicedToArray2.default)(_useState, 2),
51
+ selectedTabId = _useState2[0],
52
+ setSelectedTabId = _useState2[1];
53
+ var focusTab = function focusTab(id) {
54
+ var _tabsRef$current;
55
+ var targetTab = (_tabsRef$current = tabsRef.current) === null || _tabsRef$current === void 0 ? void 0 : _tabsRef$current.querySelector("#".concat(id));
56
+ targetTab === null || targetTab === void 0 || targetTab.focus();
57
+ };
58
+ var initializeFocus = function initializeFocus() {
59
+ if (!inFocusRef.current && autoFocus === 'selected') {
60
+ inFocusRef.current = true;
61
+ focusTab(selectedTabId);
62
+ }
63
+ };
64
+ var removeFocus = function removeFocus(blurEvent) {
65
+ // only set inFocus to false if the wrapping div doesn't contain the now-focusing element
66
+ var currentTarget = blurEvent.currentTarget;
67
+ var relatedTarget = blurEvent.relatedTarget;
68
+ if (currentTarget.contains(relatedTarget) === false) {
69
+ inFocusRef.current = false;
70
+ }
71
+ };
72
+ var handleTabClick = function handleTabClick(tab) {
73
+ onTabClick === null || onTabClick === void 0 || onTabClick(tab);
93
74
 
94
75
  // Only track selection state if it's not controlled externally.
95
- var selectedTabId;
96
- if (!_selectedTab) {
97
- selectedTabId = (initialSelectedTab === null || initialSelectedTab === void 0 ? void 0 : initialSelectedTab.id) || tabs[0].id;
76
+ if (!externalSelectedTab) {
77
+ setSelectedTabId(tab.id);
78
+ focusTab(tab.id);
98
79
  }
99
- _this.state = {
100
- selectedTabId: selectedTabId,
101
- inFocus: false
102
- };
103
- return _this;
104
- }
105
- (0, _inherits2.default)(EuiTabbedContent, _Component);
106
- return (0, _createClass2.default)(EuiTabbedContent, [{
107
- key: "render",
108
- value: function render() {
109
- var _this2 = this;
110
- var _this$props2 = this.props,
111
- className = _this$props2.className,
112
- expand = _this$props2.expand,
113
- initialSelectedTab = _this$props2.initialSelectedTab,
114
- onTabClick = _this$props2.onTabClick,
115
- externalSelectedTab = _this$props2.selectedTab,
116
- size = _this$props2.size,
117
- tabs = _this$props2.tabs,
118
- autoFocus = _this$props2.autoFocus,
119
- rest = (0, _objectWithoutProperties2.default)(_this$props2, _excluded);
80
+ };
120
81
 
121
- // Allow the consumer to control tab selection.
122
- var selectedTab = externalSelectedTab || tabs.find(function (tab) {
123
- return tab.id === _this2.state.selectedTabId;
124
- }) || tabs[0]; // Fall back to the first tab if a selected tab can't be found
82
+ // Allow the consumer to control tab selection.
83
+ var selectedTab = externalSelectedTab || tabs.find(function (tab) {
84
+ return tab.id === selectedTabId;
85
+ }) || tabs[0]; // Fall back to the first tab if a selected tab can't be found
125
86
 
126
- var selectedTabContent = selectedTab.content,
127
- selectedTabId = selectedTab.id;
128
- return (0, _react2.jsx)("div", (0, _extends2.default)({
129
- className: className
130
- }, rest), (0, _react2.jsx)(_tabs.EuiTabs, {
131
- ref: this.tabsRef,
132
- expand: expand,
133
- size: size,
134
- onFocus: this.initializeFocus,
135
- onBlur: this.removeFocus
136
- }, tabs.map(function (tab) {
137
- var id = tab.id,
138
- name = tab.name,
139
- content = tab.content,
140
- tabProps = (0, _objectWithoutProperties2.default)(tab, _excluded2);
141
- var props = _objectSpread(_objectSpread({
142
- key: id,
143
- id: id
144
- }, tabProps), {}, {
145
- onClick: function onClick() {
146
- return _this2.onTabClick(tab);
147
- },
148
- isSelected: tab === selectedTab,
149
- 'aria-controls': "".concat(_this2.rootId)
150
- });
151
- return (0, _react2.jsx)(_tab.EuiTab, props, name);
152
- })), (0, _react2.jsx)("div", {
153
- role: "tabpanel",
154
- id: "".concat(this.rootId),
155
- "aria-labelledby": selectedTabId
156
- }, selectedTabContent));
157
- }
158
- }]);
159
- }(_react.Component);
160
- (0, _defineProperty2.default)(EuiTabbedContent, "defaultProps", {
161
- autoFocus: 'initial'
162
- });
87
+ var selectedTabContent = selectedTab.content,
88
+ selectedTabContentId = selectedTab.id;
89
+ return (0, _react2.jsx)("div", (0, _extends2.default)({
90
+ className: className
91
+ }, rest), (0, _react2.jsx)(_tabs.EuiTabs, {
92
+ ref: tabsRef,
93
+ expand: expand,
94
+ size: size,
95
+ onFocus: initializeFocus,
96
+ onBlur: removeFocus
97
+ }, tabs.map(function (tab) {
98
+ var id = tab.id,
99
+ name = tab.name,
100
+ content = tab.content,
101
+ tabProps = (0, _objectWithoutProperties2.default)(tab, _excluded2);
102
+ return (0, _react2.jsx)(_tab.EuiTab, (0, _extends2.default)({
103
+ key: id,
104
+ id: id
105
+ }, tabProps, {
106
+ onClick: function onClick() {
107
+ return handleTabClick(tab);
108
+ },
109
+ isSelected: tab === selectedTab,
110
+ "aria-controls": rootId
111
+ }), name);
112
+ })), (0, _react2.jsx)("div", {
113
+ role: "tabpanel",
114
+ id: rootId,
115
+ "aria-labelledby": selectedTabContentId
116
+ }, selectedTabContent));
117
+ };
163
118
  EuiTabbedContent.propTypes = {
164
119
  className: _propTypes.default.string,
165
120
  "aria-label": _propTypes.default.string,
@@ -235,4 +190,5 @@ EuiTabbedContent.propTypes = {
235
190
  "data-test-subj": _propTypes.default.string,
236
191
  css: _propTypes.default.any
237
192
  }).isRequired).isRequired
238
- };
193
+ };
194
+ EuiTabbedContent.displayName = 'EuiTabbedContent';
@@ -19,7 +19,7 @@ var _utils = require("./utils");
19
19
  var _text_truncate = require("./text_truncate.styles");
20
20
  var _react2 = require("@emotion/react");
21
21
  var _excluded = ["width", "onResize"],
22
- _excluded2 = ["width", "children", "text", "truncation", "truncationOffset", "truncationPosition", "ellipsis", "calculationDelayMs", "containerRef", "className"],
22
+ _excluded2 = ["width", "children", "text", "truncation", "truncationOffset", "truncationPosition", "ellipsis", "calculationDelayMs", "containerRef", "className", "toolTipProps"],
23
23
  _excluded3 = ["onResize"];
24
24
  /*
25
25
  * Copyright Elasticsearch B.V. and/or licensed to Elasticsearch B.V. under one
@@ -108,7 +108,11 @@ EuiTextTruncate.propTypes = {
108
108
  * fonts are done loading or layout is done shifting or settling. Adding a delay
109
109
  * may help resolve any rendering issues.
110
110
  */
111
- calculationDelayMs: _propTypes.default.number
111
+ calculationDelayMs: _propTypes.default.number,
112
+ /**
113
+ * Placement of the tooltip that shows the full text while truncating.
114
+ */
115
+ toolTipProps: _propTypes.default.any
112
116
  };
113
117
  var EuiTextTruncateWithWidth = function EuiTextTruncateWithWidth(_ref2) {
114
118
  var width = _ref2.width,
@@ -124,6 +128,7 @@ var EuiTextTruncateWithWidth = function EuiTextTruncateWithWidth(_ref2) {
124
128
  calculationDelayMs = _ref2.calculationDelayMs,
125
129
  containerRef = _ref2.containerRef,
126
130
  className = _ref2.className,
131
+ toolTipProps = _ref2.toolTipProps,
127
132
  rest = (0, _objectWithoutProperties2.default)(_ref2, _excluded2);
128
133
  // Note: This needs to be a state and not a ref to trigger a rerender on mount
129
134
  var _useState = (0, _react.useState)(null),
@@ -225,11 +230,11 @@ var EuiTextTruncateWithWidth = function EuiTextTruncateWithWidth(_ref2) {
225
230
  className: "euiTextTruncate__fullText",
226
231
  "data-test-subj": "fullText"
227
232
  }, children ? children(text) : text));
228
- return isTruncating ? (0, _react2.jsx)(_tool_tip.EuiToolTip, {
233
+ return isTruncating ? (0, _react2.jsx)(_tool_tip.EuiToolTip, (0, _extends2.default)({
229
234
  content: text,
230
235
  disableScreenReaderOutput: true,
231
236
  display: "block"
232
- }, content) : content;
237
+ }, toolTipProps), content) : content;
233
238
  };
234
239
  EuiTextTruncateWithWidth.propTypes = {
235
240
  width: _propTypes.default.number.isRequired,