@elastic/eui 73.0.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.
Files changed (63) hide show
  1. package/dist/eui_theme_dark.css +0 -55
  2. package/dist/eui_theme_dark.min.css +1 -1
  3. package/dist/eui_theme_light.css +0 -55
  4. package/dist/eui_theme_light.min.css +1 -1
  5. package/es/components/basic_table/basic_table.js +56 -101
  6. package/es/components/basic_table/basic_table.styles.js +45 -0
  7. package/es/components/modal/confirm_modal.js +5 -3
  8. package/es/components/modal/modal.a11y.js +1 -1
  9. package/es/components/modal/modal_header_title.js +12 -3
  10. package/es/components/resizable_container/resizable_panel.js +5 -0
  11. package/es/services/security/get_secure_rel_for_target.js +2 -8
  12. package/es/services/theme/hooks.js +18 -0
  13. package/es/services/theme/index.js +1 -1
  14. package/eui.d.ts +46 -19
  15. package/i18ntokens.json +18 -18
  16. package/lib/components/basic_table/basic_table.js +56 -100
  17. package/lib/components/basic_table/basic_table.styles.js +54 -0
  18. package/lib/components/modal/confirm_modal.js +5 -3
  19. package/lib/components/modal/modal.a11y.js +1 -1
  20. package/lib/components/modal/modal_header_title.js +12 -3
  21. package/lib/components/resizable_container/resizable_panel.js +5 -0
  22. package/lib/services/security/get_secure_rel_for_target.js +2 -9
  23. package/lib/services/theme/hooks.js +22 -2
  24. package/lib/services/theme/index.js +6 -0
  25. package/optimize/es/components/basic_table/basic_table.js +56 -101
  26. package/optimize/es/components/basic_table/basic_table.styles.js +45 -0
  27. package/optimize/es/components/modal/confirm_modal.js +4 -3
  28. package/optimize/es/components/modal/modal.a11y.js +1 -1
  29. package/optimize/es/components/modal/modal_header_title.js +4 -2
  30. package/optimize/es/services/security/get_secure_rel_for_target.js +2 -8
  31. package/optimize/es/services/theme/hooks.js +18 -0
  32. package/optimize/es/services/theme/index.js +1 -1
  33. package/optimize/lib/components/basic_table/basic_table.js +56 -95
  34. package/optimize/lib/components/basic_table/basic_table.styles.js +56 -0
  35. package/optimize/lib/components/modal/confirm_modal.js +4 -3
  36. package/optimize/lib/components/modal/modal.a11y.js +1 -1
  37. package/optimize/lib/components/modal/modal_header_title.js +4 -2
  38. package/optimize/lib/services/security/get_secure_rel_for_target.js +2 -9
  39. package/optimize/lib/services/theme/hooks.js +22 -2
  40. package/optimize/lib/services/theme/index.js +6 -0
  41. package/package.json +1 -1
  42. package/src/components/index.scss +0 -1
  43. package/test-env/components/basic_table/basic_table.js +56 -95
  44. package/test-env/components/basic_table/basic_table.styles.js +56 -0
  45. package/test-env/components/modal/confirm_modal.js +5 -3
  46. package/test-env/components/modal/modal.a11y.js +1 -1
  47. package/test-env/components/modal/modal_header_title.js +12 -3
  48. package/test-env/components/resizable_container/resizable_panel.js +5 -0
  49. package/test-env/services/security/get_secure_rel_for_target.js +2 -9
  50. package/test-env/services/theme/hooks.js +22 -2
  51. package/test-env/services/theme/index.js +6 -0
  52. package/CHANGELOG.md +0 -6185
  53. package/es/services/url.js +0 -23
  54. package/lib/services/url.js +0 -32
  55. package/optimize/es/services/url.js +0 -23
  56. package/optimize/lib/services/url.js +0 -32
  57. package/src/components/basic_table/_basic_table.scss +0 -41
  58. package/src/components/basic_table/_index.scss +0 -1
  59. package/src/components/date_picker/react-datepicker/LICENSE +0 -21
  60. package/src/components/date_picker/react-datepicker/README.md +0 -168
  61. package/src/services/theme/README.md +0 -153
  62. package/src/test/README.md +0 -59
  63. package/test-env/services/url.js +0 -32
@@ -64,6 +64,8 @@ var _delay_render = require("../delay_render");
64
64
 
65
65
  var _accessibility2 = require("../../services/accessibility");
66
66
 
67
+ var _basic_table = require("./basic_table.styles");
68
+
67
69
  var _react2 = require("@emotion/react");
68
70
 
69
71
  var _excluded = ["className", "loading", "items", "itemId", "columns", "pagination", "sorting", "selection", "onChange", "error", "noItemsMessage", "compressed", "itemIdToExpandedRowMap", "responsive", "isSelectable", "isExpandable", "hasActions", "rowProps", "cellProps", "tableCaption", "rowHeader", "tableLayout"],
@@ -184,40 +186,6 @@ var EuiBasicTable = /*#__PURE__*/function (_Component) {
184
186
 
185
187
  (0, _classCallCheck2.default)(this, EuiBasicTable);
186
188
  _this = _super.call(this, props);
187
- (0, _defineProperty2.default)((0, _assertThisInitialized2.default)(_this), "cleanups", []);
188
- (0, _defineProperty2.default)((0, _assertThisInitialized2.default)(_this), "tbody", null);
189
- (0, _defineProperty2.default)((0, _assertThisInitialized2.default)(_this), "setTbody", function (tbody) {
190
- // remove listeners from an existing element
191
- _this.removeLoadingListeners(); // update the ref
192
-
193
-
194
- _this.tbody = tbody; // if loading, add listeners
195
-
196
- if (_this.props.loading === true && tbody) {
197
- _this.addLoadingListeners(tbody);
198
- }
199
- });
200
- (0, _defineProperty2.default)((0, _assertThisInitialized2.default)(_this), "addLoadingListeners", function (tbody) {
201
- var listener = function listener(event) {
202
- event.stopPropagation();
203
- event.preventDefault();
204
- };
205
-
206
- ['mousedown', 'mouseup', 'mouseover', 'mouseout', 'mouseenter', 'mouseleave', 'click', 'dblclick', 'keydown', 'keyup', 'keypress'].forEach(function (event) {
207
- tbody.addEventListener(event, listener, true);
208
-
209
- _this.cleanups.push(function () {
210
- tbody.removeEventListener(event, listener, true);
211
- });
212
- });
213
- });
214
- (0, _defineProperty2.default)((0, _assertThisInitialized2.default)(_this), "removeLoadingListeners", function () {
215
- _this.cleanups.forEach(function (cleanup) {
216
- return cleanup();
217
- });
218
-
219
- _this.cleanups.length = 0;
220
- });
221
189
  (0, _defineProperty2.default)((0, _assertThisInitialized2.default)(_this), "tableId", (0, _accessibility2.htmlIdGenerator)('__table')());
222
190
  (0, _defineProperty2.default)((0, _assertThisInitialized2.default)(_this), "selectAllIdGenerator", (0, _accessibility2.htmlIdGenerator)('_selection_column-checkbox'));
223
191
  (0, _defineProperty2.default)((0, _assertThisInitialized2.default)(_this), "renderSelectAll", function (isMobile) {
@@ -304,27 +272,13 @@ var EuiBasicTable = /*#__PURE__*/function (_Component) {
304
272
  (0, _createClass2.default)(EuiBasicTable, [{
305
273
  key: "componentDidMount",
306
274
  value: function componentDidMount() {
307
- if (this.props.loading && this.tbody) this.addLoadingListeners(this.tbody);
308
275
  this.getInitialSelection();
309
276
  }
310
277
  }, {
311
278
  key: "componentDidUpdate",
312
- value: function componentDidUpdate(prevProps) {
313
- if (prevProps.loading !== this.props.loading) {
314
- if (this.props.loading && this.tbody) {
315
- this.addLoadingListeners(this.tbody);
316
- } else {
317
- this.removeLoadingListeners();
318
- }
319
- }
320
-
279
+ value: function componentDidUpdate() {
321
280
  this.getInitialSelection();
322
281
  }
323
- }, {
324
- key: "componentWillUnmount",
325
- value: function componentWillUnmount() {
326
- this.removeLoadingListeners();
327
- }
328
282
  }, {
329
283
  key: "getInitialSelection",
330
284
  value: function getInitialSelection() {
@@ -484,7 +438,8 @@ var EuiBasicTable = /*#__PURE__*/function (_Component) {
484
438
  var _this$props3 = this.props,
485
439
  compressed = _this$props3.compressed,
486
440
  responsive = _this$props3.responsive,
487
- tableLayout = _this$props3.tableLayout;
441
+ tableLayout = _this$props3.tableLayout,
442
+ loading = _this$props3.loading;
488
443
  var mobileHeader = responsive ? (0, _react2.jsx)(_table.EuiTableHeaderMobile, null, (0, _react2.jsx)(_flex.EuiFlexGroup, {
489
444
  responsive: false,
490
445
  justifyContent: "spaceBetween",
@@ -502,7 +457,8 @@ var EuiBasicTable = /*#__PURE__*/function (_Component) {
502
457
  id: this.tableId,
503
458
  tableLayout: tableLayout,
504
459
  responsive: responsive,
505
- compressed: compressed
460
+ compressed: compressed,
461
+ css: loading && _basic_table.safariLoadingWorkaround
506
462
  }, caption, head, body, footer));
507
463
  }
508
464
  }, {
@@ -765,30 +721,35 @@ var EuiBasicTable = /*#__PURE__*/function (_Component) {
765
721
  value: function renderTableBody() {
766
722
  var _this4 = this;
767
723
 
768
- if (this.props.error) {
769
- return this.renderErrorBody(this.props.error);
770
- }
771
-
772
- var items = this.props.items;
773
-
774
- if (items.length === 0) {
775
- return this.renderEmptyBody();
724
+ var _this$props8 = this.props,
725
+ error = _this$props8.error,
726
+ loading = _this$props8.loading,
727
+ items = _this$props8.items;
728
+ var content;
729
+
730
+ if (error) {
731
+ content = this.renderErrorMessage(error);
732
+ } else if (items.length === 0) {
733
+ content = this.renderEmptyMessage();
734
+ } else {
735
+ content = items.map(function (item, index) {
736
+ // if there's pagination the item's index must be adjusted to the where it is in the whole dataset
737
+ var tableItemIndex = hasPagination(_this4.props) && _this4.props.pagination.pageSize > 0 ? _this4.props.pagination.pageIndex * _this4.props.pagination.pageSize + index : index;
738
+ return _this4.renderItemRow(item, tableItemIndex);
739
+ });
776
740
  }
777
741
 
778
- var rows = items.map(function (item, index) {
779
- // if there's pagination the item's index must be adjusted to the where it is in the whole dataset
780
- var tableItemIndex = hasPagination(_this4.props) && _this4.props.pagination.pageSize > 0 ? _this4.props.pagination.pageIndex * _this4.props.pagination.pageSize + index : index;
781
- return _this4.renderItemRow(item, tableItemIndex);
742
+ return (0, _react2.jsx)(_services.RenderWithEuiTheme, null, function (theme) {
743
+ return (0, _react2.jsx)(_table.EuiTableBody, {
744
+ css: loading && (0, _basic_table.euiBasicTableBodyLoading)(theme)
745
+ }, content);
782
746
  });
783
- return (0, _react2.jsx)(_table.EuiTableBody, {
784
- bodyRef: this.setTbody
785
- }, rows);
786
747
  }
787
748
  }, {
788
- key: "renderErrorBody",
789
- value: function renderErrorBody(error) {
749
+ key: "renderErrorMessage",
750
+ value: function renderErrorMessage(error) {
790
751
  var colSpan = this.props.columns.length + (this.props.selection ? 1 : 0);
791
- return (0, _react2.jsx)(_table.EuiTableBody, null, (0, _react2.jsx)(_table.EuiTableRow, null, (0, _react2.jsx)(_table.EuiTableRowCell, {
752
+ return (0, _react2.jsx)(_table.EuiTableRow, null, (0, _react2.jsx)(_table.EuiTableRowCell, {
792
753
  align: "center",
793
754
  colSpan: colSpan,
794
755
  mobileOptions: {
@@ -797,38 +758,38 @@ var EuiBasicTable = /*#__PURE__*/function (_Component) {
797
758
  }, (0, _react2.jsx)(_icon.EuiIcon, {
798
759
  type: "minusInCircle",
799
760
  color: "danger"
800
- }), " ", error)));
761
+ }), " ", error));
801
762
  }
802
763
  }, {
803
- key: "renderEmptyBody",
804
- value: function renderEmptyBody() {
805
- var _this$props8 = this.props,
806
- columns = _this$props8.columns,
807
- selection = _this$props8.selection,
808
- noItemsMessage = _this$props8.noItemsMessage;
764
+ key: "renderEmptyMessage",
765
+ value: function renderEmptyMessage() {
766
+ var _this$props9 = this.props,
767
+ columns = _this$props9.columns,
768
+ selection = _this$props9.selection,
769
+ noItemsMessage = _this$props9.noItemsMessage;
809
770
  var colSpan = columns.length + (selection ? 1 : 0);
810
- return (0, _react2.jsx)(_table.EuiTableBody, null, (0, _react2.jsx)(_table.EuiTableRow, null, (0, _react2.jsx)(_table.EuiTableRowCell, {
771
+ return (0, _react2.jsx)(_table.EuiTableRow, null, (0, _react2.jsx)(_table.EuiTableRowCell, {
811
772
  align: "center",
812
773
  colSpan: colSpan,
813
774
  mobileOptions: {
814
775
  width: '100%'
815
776
  }
816
- }, noItemsMessage)));
777
+ }, noItemsMessage));
817
778
  }
818
779
  }, {
819
780
  key: "renderItemRow",
820
781
  value: function renderItemRow(item, rowIndex) {
821
782
  var _this5 = this;
822
783
 
823
- var _this$props9 = this.props,
824
- columns = _this$props9.columns,
825
- selection = _this$props9.selection,
826
- isSelectable = _this$props9.isSelectable,
827
- hasActions = _this$props9.hasActions,
828
- rowHeader = _this$props9.rowHeader,
829
- _this$props9$itemIdTo = _this$props9.itemIdToExpandedRowMap,
830
- itemIdToExpandedRowMap = _this$props9$itemIdTo === void 0 ? {} : _this$props9$itemIdTo,
831
- isExpandable = _this$props9.isExpandable;
784
+ var _this$props10 = this.props,
785
+ columns = _this$props10.columns,
786
+ selection = _this$props10.selection,
787
+ isSelectable = _this$props10.isSelectable,
788
+ hasActions = _this$props10.hasActions,
789
+ rowHeader = _this$props10.rowHeader,
790
+ _this$props10$itemIdT = _this$props10.itemIdToExpandedRowMap,
791
+ itemIdToExpandedRowMap = _this$props10$itemIdT === void 0 ? {} : _this$props10$itemIdT,
792
+ isExpandable = _this$props10.isExpandable;
832
793
  var cells = [];
833
794
  var itemIdCallback = this.props.itemId;
834
795
  var itemId = getItemId(item, itemIdCallback) != null ? getItemId(item, itemIdCallback) : rowIndex;
@@ -980,7 +941,8 @@ var EuiBasicTable = /*#__PURE__*/function (_Component) {
980
941
  key: key,
981
942
  align: "right",
982
943
  textOnly: false,
983
- hasActions: true
944
+ hasActions: true,
945
+ css: _basic_table.euiBasicTableActionsWrapper
984
946
  }, tools);
985
947
  }
986
948
  }, {
@@ -1064,11 +1026,11 @@ var EuiBasicTable = /*#__PURE__*/function (_Component) {
1064
1026
  value: function renderPaginationBar() {
1065
1027
  var _this8 = this;
1066
1028
 
1067
- var _this$props10 = this.props,
1068
- error = _this$props10.error,
1069
- pagination = _this$props10.pagination,
1070
- tableCaption = _this$props10.tableCaption,
1071
- onChange = _this$props10.onChange;
1029
+ var _this$props11 = this.props,
1030
+ error = _this$props11.error,
1031
+ pagination = _this$props11.pagination,
1032
+ tableCaption = _this$props11.tableCaption,
1033
+ onChange = _this$props11.onChange;
1072
1034
 
1073
1035
  if (!error && pagination && pagination.totalItemCount > 0) {
1074
1036
  if (!onChange) {
@@ -1120,8 +1082,7 @@ var EuiBasicTable = /*#__PURE__*/function (_Component) {
1120
1082
  }
1121
1083
 
1122
1084
  return null;
1123
- } // used for moving in & out of `loading` state
1124
-
1085
+ }
1125
1086
  }]);
1126
1087
  return EuiBasicTable;
1127
1088
  }(_react.Component);
@@ -0,0 +1,56 @@
1
+ "use strict";
2
+
3
+ var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefault");
4
+
5
+ Object.defineProperty(exports, "__esModule", {
6
+ value: true
7
+ });
8
+ exports.safariLoadingWorkaround = exports.euiBasicTableBodyLoading = exports.euiBasicTableActionsWrapper = void 0;
9
+
10
+ var _taggedTemplateLiteral2 = _interopRequireDefault(require("@babel/runtime/helpers/taggedTemplateLiteral"));
11
+
12
+ var _react = require("@emotion/react");
13
+
14
+ var _global_styling = require("../../global_styling");
15
+
16
+ var _templateObject;
17
+
18
+ function _EMOTION_STRINGIFIED_CSS_ERROR__() { return "You have tried to stringify object returned from `css` function. It isn't supposed to be used directly (e.g. as value of the `className` prop), but rather handed to emotion so it can handle it (e.g. as value of `css` prop)."; }
19
+
20
+ var tableLoadingLine = (0, _react.keyframes)(_templateObject || (_templateObject = (0, _taggedTemplateLiteral2.default)(["\n from {\n ", "\n ", "\n }\n\n 20% {\n ", "\n ", "\n }\n\n 80% {\n ", "\n ", "\n }\n\n 100% {\n ", "\n ", "\n }\n"])), (0, _global_styling.logicalCSS)('left', 0), (0, _global_styling.logicalCSS)('width', 0), (0, _global_styling.logicalCSS)('left', 0), (0, _global_styling.logicalCSS)('width', '40%'), (0, _global_styling.logicalCSS)('left', '60%'), (0, _global_styling.logicalCSS)('width', '40%'), (0, _global_styling.logicalCSS)('left', '100%'), (0, _global_styling.logicalCSS)('width', 0));
21
+
22
+ var euiBasicTableBodyLoading = function euiBasicTableBodyLoading(_ref2) {
23
+ var euiTheme = _ref2.euiTheme;
24
+ return /*#__PURE__*/(0, _react.css)("position:relative;overflow:hidden;&::before{position:absolute;content:'';", (0, _global_styling.logicalCSS)('width', '100%'), " ", (0, _global_styling.logicalCSS)('height', euiTheme.border.width.thick), " background-color:", euiTheme.colors.primary, ";animation:", tableLoadingLine, " 1s linear infinite;", _global_styling.euiCantAnimate, "{animation-duration:2s;}};label:euiBasicTableBodyLoading;");
25
+ }; // Fix to make the loading indicator position correctly in Safari
26
+ // For whatever annoying reason, Safari doesn't respect `position: relative;`
27
+ // on `tbody` without `position: relative` on the parent `table`
28
+
29
+
30
+ exports.euiBasicTableBodyLoading = euiBasicTableBodyLoading;
31
+
32
+ var _ref = process.env.NODE_ENV === "production" ? {
33
+ name: "6xbnw4-safariLoadingWorkaround",
34
+ styles: "position:relative;label:safariLoadingWorkaround;"
35
+ } : {
36
+ name: "6xbnw4-safariLoadingWorkaround",
37
+ styles: "position:relative;label:safariLoadingWorkaround;",
38
+ toString: _EMOTION_STRINGIFIED_CSS_ERROR__
39
+ };
40
+
41
+ var safariLoadingWorkaround = function safariLoadingWorkaround() {
42
+ return _ref;
43
+ }; // Unsets the extra height caused by tooltip/popover wrappers around table action buttons
44
+ // Without this, the row height jumps whenever actions are disabled
45
+
46
+
47
+ exports.safariLoadingWorkaround = safariLoadingWorkaround;
48
+ var euiBasicTableActionsWrapper = process.env.NODE_ENV === "production" ? {
49
+ name: "1mshepa-euiBasicTableActionsWrapper",
50
+ styles: "line-height:1;label:euiBasicTableActionsWrapper;"
51
+ } : {
52
+ name: "1mshepa-euiBasicTableActionsWrapper",
53
+ styles: "line-height:1;label:euiBasicTableActionsWrapper;",
54
+ toString: _EMOTION_STRINGIFIED_CSS_ERROR__
55
+ };
56
+ exports.euiBasicTableActionsWrapper = euiBasicTableActionsWrapper;
@@ -41,7 +41,7 @@ var _text = require("../text");
41
41
 
42
42
  var _react2 = require("@emotion/react");
43
43
 
44
- var _excluded = ["children", "title", "onCancel", "onConfirm", "cancelButtonText", "confirmButtonText", "confirmButtonDisabled", "className", "buttonColor", "defaultFocusedButton", "isLoading"];
44
+ var _excluded = ["children", "title", "titleProps", "onCancel", "onConfirm", "cancelButtonText", "confirmButtonText", "confirmButtonDisabled", "className", "buttonColor", "defaultFocusedButton", "isLoading"];
45
45
 
46
46
  function _getRequireWildcardCache(nodeInterop) { if (typeof WeakMap !== "function") return null; var cacheBabelInterop = new WeakMap(); var cacheNodeInterop = new WeakMap(); return (_getRequireWildcardCache = function _getRequireWildcardCache(nodeInterop) { return nodeInterop ? cacheNodeInterop : cacheBabelInterop; })(nodeInterop); }
47
47
 
@@ -55,6 +55,7 @@ exports.CANCEL_BUTTON = CANCEL_BUTTON;
55
55
  var EuiConfirmModal = function EuiConfirmModal(_ref) {
56
56
  var children = _ref.children,
57
57
  title = _ref.title,
58
+ titleProps = _ref.titleProps,
58
59
  onCancel = _ref.onCancel,
59
60
  onConfirm = _ref.onConfirm,
60
61
  cancelButtonText = _ref.cancelButtonText,
@@ -106,9 +107,9 @@ var EuiConfirmModal = function EuiConfirmModal(_ref) {
106
107
  var modalTitle;
107
108
 
108
109
  if (title) {
109
- modalTitle = (0, _react2.jsx)(_modal_header.EuiModalHeader, null, (0, _react2.jsx)(_modal_header_title.EuiModalHeaderTitle, {
110
+ modalTitle = (0, _react2.jsx)(_modal_header.EuiModalHeader, null, (0, _react2.jsx)(_modal_header_title.EuiModalHeaderTitle, (0, _extends2.default)({
110
111
  "data-test-subj": "confirmModalTitleText"
111
- }, title));
112
+ }, titleProps), title));
112
113
  }
113
114
 
114
115
  var message;
@@ -147,6 +148,7 @@ EuiConfirmModal.propTypes = {
147
148
  */
148
149
  children: _propTypes.default.node,
149
150
  title: _propTypes.default.node,
151
+ titleProps: _propTypes.default.any,
150
152
  cancelButtonText: _propTypes.default.node,
151
153
  confirmButtonText: _propTypes.default.node,
152
154
  onCancel: _propTypes.default.func.isRequired,
@@ -47,7 +47,7 @@ var Modal = function Modal() {
47
47
  };
48
48
  return (0, _react2.jsx)("div", null, (0, _react2.jsx)(_button.EuiButton, {
49
49
  onClick: showModal
50
- }, "Show confirm modal"), isModalVisible && (0, _react2.jsx)(_index.EuiModal, modalProps, (0, _react2.jsx)(_index.EuiModalHeader, null, (0, _react2.jsx)(_index.EuiModalHeaderTitle, null, (0, _react2.jsx)("h1", null, "Title of modal"))), (0, _react2.jsx)(_index.EuiModalBody, null, (0, _react2.jsx)("p", null, "This is a simple modal body")), (0, _react2.jsx)(_index.EuiModalFooter, null, (0, _react2.jsx)(_button.EuiButton, {
50
+ }, "Show confirm modal"), isModalVisible && (0, _react2.jsx)(_index.EuiModal, modalProps, (0, _react2.jsx)(_index.EuiModalHeader, null, (0, _react2.jsx)(_index.EuiModalHeaderTitle, null, "Title of modal")), (0, _react2.jsx)(_index.EuiModalBody, null, (0, _react2.jsx)("p", null, "This is a simple modal body")), (0, _react2.jsx)(_index.EuiModalFooter, null, (0, _react2.jsx)(_button.EuiButton, {
51
51
  onClick: closeModal,
52
52
  fill: true
53
53
  }, "Close"))));
@@ -21,17 +21,19 @@ var _title = require("../title");
21
21
 
22
22
  var _react2 = require("@emotion/react");
23
23
 
24
- var _excluded = ["className", "children"];
24
+ var _excluded = ["className", "children", "component"];
25
25
 
26
26
  var EuiModalHeaderTitle = function EuiModalHeaderTitle(_ref) {
27
27
  var className = _ref.className,
28
28
  children = _ref.children,
29
+ _ref$component = _ref.component,
30
+ Component = _ref$component === void 0 ? 'h1' : _ref$component,
29
31
  rest = (0, _objectWithoutProperties2.default)(_ref, _excluded);
30
32
  var classes = (0, _classnames.default)('euiModalHeader__title', className);
31
33
  return (0, _react2.jsx)(_title.EuiTitle, (0, _extends2.default)({
32
34
  size: "m",
33
35
  className: classes
34
- }, rest), /*#__PURE__*/_react.default.isValidElement(children) ? children : (0, _react2.jsx)("h1", null, children));
36
+ }, rest), (0, _react2.jsx)(Component, null, children));
35
37
  };
36
38
 
37
39
  exports.EuiModalHeaderTitle = EuiModalHeaderTitle;
@@ -39,5 +41,12 @@ EuiModalHeaderTitle.propTypes = {
39
41
  className: _propTypes.default.string,
40
42
  "aria-label": _propTypes.default.string,
41
43
  "data-test-subj": _propTypes.default.string,
42
- css: _propTypes.default.any
44
+ css: _propTypes.default.any,
45
+
46
+ /**
47
+ * The tag to render. Can be changed to a lower heading
48
+ * level like `h2` or a container `div`.
49
+ * @default h1
50
+ */
51
+ component: _propTypes.default.any
43
52
  };
@@ -329,6 +329,11 @@ EuiResizablePanel.propTypes = {
329
329
  */
330
330
  style: _propTypes.default.any,
331
331
 
332
+ /**
333
+ * tabIndex={0} provides full keyboard access when content overflows `<EuiResizablePanel />`
334
+ */
335
+ tabIndex: _propTypes.default.number,
336
+
332
337
  /**
333
338
  * Props to add to the wrapping `.euiResizablePanel` div
334
339
  */
@@ -5,8 +5,6 @@ Object.defineProperty(exports, "__esModule", {
5
5
  });
6
6
  exports.getSecureRelForTarget = void 0;
7
7
 
8
- var _url = require("../url");
9
-
10
8
  /*
11
9
  * Copyright Elasticsearch B.V. and/or licensed to Elasticsearch B.V. under one
12
10
  * or more contributor license agreements. Licensed under the Elastic License
@@ -20,18 +18,13 @@ var _url = require("../url");
20
18
  * https://www.jitbit.com/alexblog/256-targetblank---the-most-underestimated-vulnerability-ever/
21
19
  */
22
20
  var getSecureRelForTarget = function getSecureRelForTarget(_ref) {
23
- var href = _ref.href,
24
- _ref$target = _ref.target,
21
+ var _ref$target = _ref.target,
25
22
  target = _ref$target === void 0 ? '' : _ref$target,
26
23
  rel = _ref.rel;
27
- var isElasticHref = !!href && (0, _url.isDomainSecure)(href);
28
24
  var relParts = !!rel ? rel.split(' ').filter(function (part) {
29
25
  return !!part.length && part !== 'noreferrer';
30
26
  }) : [];
31
-
32
- if (!isElasticHref) {
33
- relParts.push('noreferrer');
34
- }
27
+ relParts.push('noreferrer');
35
28
 
36
29
  if (target.includes('_blank') && relParts.indexOf('noopener') === -1) {
37
30
  relParts.push('noopener');
@@ -7,7 +7,7 @@ var _typeof = require("@babel/runtime/helpers/typeof");
7
7
  Object.defineProperty(exports, "__esModule", {
8
8
  value: true
9
9
  });
10
- exports.withEuiTheme = exports.useEuiTheme = void 0;
10
+ exports.withEuiTheme = exports.useEuiTheme = exports.RenderWithEuiTheme = void 0;
11
11
 
12
12
  var _extends2 = _interopRequireDefault(require("@babel/runtime/helpers/extends"));
13
13
 
@@ -31,6 +31,9 @@ function _interopRequireWildcard(obj, nodeInterop) { if (!nodeInterop && obj &&
31
31
  * Side Public License, v 1.
32
32
  */
33
33
  var providerMessage = "`EuiProvider` is missing which can result in negative effects.\nWrap your component in `EuiProvider`: https://ela.st/euiprovider.";
34
+ /**
35
+ * Hook for function components
36
+ */
34
37
 
35
38
  var useEuiTheme = function useEuiTheme() {
36
39
  var theme = (0, _react.useContext)(_context.EuiThemeContext);
@@ -66,6 +69,10 @@ var useEuiTheme = function useEuiTheme() {
66
69
  }, [theme, colorMode, modifications]);
67
70
  return assembledTheme;
68
71
  };
72
+ /**
73
+ * HOC for class components
74
+ */
75
+
69
76
 
70
77
  exports.useEuiTheme = useEuiTheme;
71
78
 
@@ -86,5 +93,18 @@ var withEuiTheme = function withEuiTheme(Component) {
86
93
  WithEuiTheme.displayName = componentName;
87
94
  return WithEuiTheme;
88
95
  };
96
+ /**
97
+ * Render prop alternative for complex class components
98
+ * Most useful for scenarios where a HOC may interfere with typing
99
+ */
100
+
101
+
102
+ exports.withEuiTheme = withEuiTheme;
103
+
104
+ var RenderWithEuiTheme = function RenderWithEuiTheme(_ref) {
105
+ var children = _ref.children;
106
+ var theme = useEuiTheme();
107
+ return children(theme);
108
+ };
89
109
 
90
- exports.withEuiTheme = withEuiTheme;
110
+ exports.RenderWithEuiTheme = RenderWithEuiTheme;
@@ -45,6 +45,12 @@ Object.defineProperty(exports, "EuiThemeProvider", {
45
45
  return _provider.EuiThemeProvider;
46
46
  }
47
47
  });
48
+ Object.defineProperty(exports, "RenderWithEuiTheme", {
49
+ enumerable: true,
50
+ get: function get() {
51
+ return _hooks.RenderWithEuiTheme;
52
+ }
53
+ });
48
54
  Object.defineProperty(exports, "buildTheme", {
49
55
  enumerable: true,
50
56
  get: function get() {