@elastic/eui 65.0.0 → 66.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 (169) hide show
  1. package/dist/eui_theme_dark.css +28 -197
  2. package/dist/eui_theme_dark.min.css +1 -1
  3. package/dist/eui_theme_light.css +28 -197
  4. package/dist/eui_theme_light.min.css +1 -1
  5. package/es/components/basic_table/basic_table.js +13 -2
  6. package/es/components/basic_table/in_memory_table.js +13 -2
  7. package/es/components/card/card.styles.js +2 -2
  8. package/es/components/combo_box/combo_box.js +2 -15
  9. package/es/components/datagrid/body/data_grid_body.js +17 -6
  10. package/es/components/datagrid/body/data_grid_cell.js +29 -12
  11. package/es/components/datagrid/body/header/data_grid_header_cell.js +17 -6
  12. package/es/components/datagrid/body/header/data_grid_header_row.js +17 -6
  13. package/es/components/datagrid/data_grid.js +17 -6
  14. package/es/components/datagrid/utils/in_memory.js +17 -6
  15. package/es/components/date_picker/react-datepicker/original.package.json +124 -0
  16. package/es/components/description_list/description_list.js +11 -3
  17. package/es/components/description_list/description_list_context.js +2 -1
  18. package/es/components/description_list/description_list_description.js +3 -1
  19. package/es/components/description_list/description_list_description.styles.js +5 -2
  20. package/es/components/description_list/description_list_title.js +4 -3
  21. package/es/components/description_list/description_list_title.styles.js +7 -3
  22. package/es/components/description_list/description_list_types.js +2 -1
  23. package/es/components/form/field_search/field_search.js +6 -16
  24. package/es/components/form/range/range_input.js +1 -1
  25. package/es/components/header/header_section/header_section_item.js +4 -3
  26. package/es/components/icon/icon.js +3 -10
  27. package/es/components/list_group/list_group.js +7 -1
  28. package/es/components/list_group/list_group_item.js +10 -3
  29. package/es/components/list_group/pinnable_list_group/pinnable_list_group.js +13 -1
  30. package/es/components/modal/modal.js +1 -3
  31. package/es/components/observer/mutation_observer/mutation_observer.js +1 -1
  32. package/es/components/page/page_sidebar/page_sidebar.js +5 -1
  33. package/es/components/table/table_row_cell.js +4 -6
  34. package/es/components/tabs/tabbed_content/tabbed_content.js +2 -19
  35. package/es/global_styling/functions/logicals.json +56 -0
  36. package/es/global_styling/mixins/_typography.js +1 -1
  37. package/es/services/theme/hooks.js +11 -16
  38. package/eui.d.ts +29 -10
  39. package/i18ntokens.json +18 -18
  40. package/lib/components/basic_table/basic_table.js +13 -2
  41. package/lib/components/basic_table/in_memory_table.js +13 -2
  42. package/lib/components/card/card.styles.js +2 -2
  43. package/lib/components/combo_box/combo_box.js +2 -15
  44. package/lib/components/datagrid/body/data_grid_body.js +17 -6
  45. package/lib/components/datagrid/body/data_grid_cell.js +29 -12
  46. package/lib/components/datagrid/body/header/data_grid_header_cell.js +17 -6
  47. package/lib/components/datagrid/body/header/data_grid_header_row.js +17 -6
  48. package/lib/components/datagrid/data_grid.js +17 -6
  49. package/lib/components/datagrid/utils/in_memory.js +17 -6
  50. package/lib/components/date_picker/react-datepicker/original.package.json +124 -0
  51. package/lib/components/description_list/description_list.js +11 -3
  52. package/lib/components/description_list/description_list_context.js +2 -1
  53. package/lib/components/description_list/description_list_description.js +3 -1
  54. package/lib/components/description_list/description_list_description.styles.js +5 -2
  55. package/lib/components/description_list/description_list_title.js +4 -3
  56. package/lib/components/description_list/description_list_title.styles.js +7 -3
  57. package/lib/components/description_list/description_list_types.js +4 -2
  58. package/lib/components/form/field_search/field_search.js +6 -16
  59. package/lib/components/form/range/range_input.js +1 -1
  60. package/lib/components/header/header_section/header_section_item.js +4 -3
  61. package/lib/components/icon/icon.js +3 -10
  62. package/lib/components/list_group/list_group.js +7 -1
  63. package/lib/components/list_group/list_group_item.js +10 -3
  64. package/lib/components/list_group/pinnable_list_group/pinnable_list_group.js +13 -1
  65. package/lib/components/modal/modal.js +1 -3
  66. package/lib/components/observer/mutation_observer/mutation_observer.js +1 -1
  67. package/lib/components/page/page_sidebar/page_sidebar.js +5 -1
  68. package/lib/components/table/table_row_cell.js +4 -6
  69. package/lib/components/tabs/tabbed_content/tabbed_content.js +2 -19
  70. package/lib/global_styling/functions/logicals.json +56 -0
  71. package/lib/global_styling/mixins/_typography.js +1 -1
  72. package/lib/services/theme/hooks.js +10 -15
  73. package/optimize/es/components/card/card.styles.js +2 -2
  74. package/optimize/es/components/combo_box/combo_box.js +2 -15
  75. package/optimize/es/components/date_picker/react-datepicker/original.package.json +124 -0
  76. package/optimize/es/components/description_list/description_list.js +5 -2
  77. package/optimize/es/components/description_list/description_list_context.js +2 -1
  78. package/optimize/es/components/description_list/description_list_description.js +3 -1
  79. package/optimize/es/components/description_list/description_list_description.styles.js +5 -2
  80. package/optimize/es/components/description_list/description_list_title.js +4 -3
  81. package/optimize/es/components/description_list/description_list_title.styles.js +7 -3
  82. package/optimize/es/components/description_list/description_list_types.js +2 -1
  83. package/optimize/es/components/form/field_search/field_search.js +6 -16
  84. package/optimize/es/components/form/range/range_input.js +1 -1
  85. package/optimize/es/components/header/header_section/header_section_item.js +4 -3
  86. package/optimize/es/components/icon/icon.js +3 -10
  87. package/optimize/es/components/list_group/list_group_item.js +3 -2
  88. package/optimize/es/components/modal/modal.js +1 -3
  89. package/optimize/es/components/observer/mutation_observer/mutation_observer.js +1 -1
  90. package/optimize/es/components/page/page_sidebar/page_sidebar.js +5 -1
  91. package/optimize/es/components/tabs/tabbed_content/tabbed_content.js +2 -19
  92. package/optimize/es/global_styling/functions/logicals.json +56 -0
  93. package/optimize/es/global_styling/mixins/_typography.js +1 -1
  94. package/optimize/es/services/theme/hooks.js +11 -16
  95. package/optimize/lib/components/card/card.styles.js +2 -2
  96. package/optimize/lib/components/combo_box/combo_box.js +2 -15
  97. package/optimize/lib/components/date_picker/react-datepicker/original.package.json +124 -0
  98. package/optimize/lib/components/description_list/description_list.js +5 -2
  99. package/optimize/lib/components/description_list/description_list_context.js +2 -1
  100. package/optimize/lib/components/description_list/description_list_description.js +3 -1
  101. package/optimize/lib/components/description_list/description_list_description.styles.js +5 -2
  102. package/optimize/lib/components/description_list/description_list_title.js +4 -3
  103. package/optimize/lib/components/description_list/description_list_title.styles.js +7 -3
  104. package/optimize/lib/components/description_list/description_list_types.js +4 -2
  105. package/optimize/lib/components/form/field_search/field_search.js +6 -16
  106. package/optimize/lib/components/form/range/range_input.js +1 -1
  107. package/optimize/lib/components/header/header_section/header_section_item.js +4 -3
  108. package/optimize/lib/components/icon/icon.js +3 -10
  109. package/optimize/lib/components/list_group/list_group_item.js +3 -2
  110. package/optimize/lib/components/modal/modal.js +1 -3
  111. package/optimize/lib/components/observer/mutation_observer/mutation_observer.js +1 -1
  112. package/optimize/lib/components/page/page_sidebar/page_sidebar.js +5 -1
  113. package/optimize/lib/components/tabs/tabbed_content/tabbed_content.js +2 -19
  114. package/optimize/lib/global_styling/functions/logicals.json +56 -0
  115. package/optimize/lib/global_styling/mixins/_typography.js +1 -1
  116. package/optimize/lib/services/theme/hooks.js +10 -15
  117. package/package.json +1 -1
  118. package/src/components/badge/_badge.scss +0 -5
  119. package/src/components/datagrid/_data_grid_data_row.scss +7 -0
  120. package/src/components/datagrid/body/header/_data_grid_header_row.scss +1 -1
  121. package/src/components/filter_group/_filter_group.scss +3 -1
  122. package/src/components/flex/_flex_group.scss +2 -11
  123. package/src/components/flex/_flex_item.scss +0 -6
  124. package/src/components/form/field_search/_field_search.scss +0 -5
  125. package/src/components/form/form_control_layout/_form_control_layout_delimited.scss +0 -3
  126. package/src/components/form/form_row/_form_row.scss +0 -1
  127. package/src/components/header/header_section/_header_section_item.scss +1 -1
  128. package/src/components/list_group/_list_group_item.scss +3 -25
  129. package/src/components/modal/_modal.scss +5 -20
  130. package/src/components/page/page_content/_page_content.scss +0 -1
  131. package/src/components/table/_responsive.scss +0 -1
  132. package/src/components/table/_table.scss +0 -5
  133. package/src/global_styling/mixins/_form.scss +0 -4
  134. package/src/global_styling/mixins/_helpers.scss +0 -8
  135. package/src/global_styling/mixins/_typography.scss +1 -5
  136. package/src/global_styling/utility/_index.scss +0 -1
  137. package/test-env/components/basic_table/basic_table.js +13 -2
  138. package/test-env/components/basic_table/in_memory_table.js +13 -2
  139. package/test-env/components/card/card.styles.js +2 -2
  140. package/test-env/components/combo_box/combo_box.js +2 -15
  141. package/test-env/components/datagrid/body/data_grid_body.js +17 -6
  142. package/test-env/components/datagrid/body/data_grid_cell.js +29 -12
  143. package/test-env/components/datagrid/body/header/data_grid_header_cell.js +17 -6
  144. package/test-env/components/datagrid/body/header/data_grid_header_row.js +17 -6
  145. package/test-env/components/datagrid/data_grid.js +17 -6
  146. package/test-env/components/datagrid/utils/in_memory.js +17 -6
  147. package/test-env/components/date_picker/react-datepicker/original.package.json +124 -0
  148. package/test-env/components/description_list/description_list.js +11 -3
  149. package/test-env/components/description_list/description_list_context.js +2 -1
  150. package/test-env/components/description_list/description_list_description.js +3 -1
  151. package/test-env/components/description_list/description_list_description.styles.js +5 -2
  152. package/test-env/components/description_list/description_list_title.js +4 -3
  153. package/test-env/components/description_list/description_list_title.styles.js +7 -3
  154. package/test-env/components/description_list/description_list_types.js +4 -2
  155. package/test-env/components/form/field_search/field_search.js +6 -16
  156. package/test-env/components/form/range/range_input.js +1 -1
  157. package/test-env/components/header/header_section/header_section_item.js +4 -3
  158. package/test-env/components/list_group/list_group.js +7 -1
  159. package/test-env/components/list_group/list_group_item.js +10 -3
  160. package/test-env/components/list_group/pinnable_list_group/pinnable_list_group.js +13 -1
  161. package/test-env/components/modal/modal.js +1 -3
  162. package/test-env/components/observer/mutation_observer/mutation_observer.js +1 -1
  163. package/test-env/components/page/page_sidebar/page_sidebar.js +5 -1
  164. package/test-env/components/table/table_row_cell.js +4 -6
  165. package/test-env/components/tabs/tabbed_content/tabbed_content.js +2 -19
  166. package/test-env/global_styling/functions/logicals.json +56 -0
  167. package/test-env/global_styling/mixins/_typography.js +1 -1
  168. package/test-env/services/theme/hooks.js +10 -15
  169. package/src/global_styling/utility/_utility.scss +0 -15
@@ -134,7 +134,7 @@ var EuiIconClass = /*#__PURE__*/function (_PureComponent) {
134
134
 
135
135
  (0, _classCallCheck2.default)(this, EuiIconClass);
136
136
  _this = _super.call(this, props);
137
- (0, _defineProperty2.default)((0, _assertThisInitialized2.default)(_this), "isMounted", true);
137
+ (0, _defineProperty2.default)((0, _assertThisInitialized2.default)(_this), "isMounted", false);
138
138
  (0, _defineProperty2.default)((0, _assertThisInitialized2.default)(_this), "loadIconComponent", function (iconType) {
139
139
  if (iconComponentCache.hasOwnProperty(iconType)) {
140
140
  // exists in cache
@@ -191,6 +191,7 @@ var EuiIconClass = /*#__PURE__*/function (_PureComponent) {
191
191
  (0, _createClass2.default)(EuiIconClass, [{
192
192
  key: "componentDidMount",
193
193
  value: function componentDidMount() {
194
+ this.isMounted = true;
194
195
  var type = this.props.type;
195
196
 
196
197
  if (isEuiIconType(type) && this.state.icon == null) {
@@ -266,14 +267,7 @@ var EuiIconClass = /*#__PURE__*/function (_PureComponent) {
266
267
 
267
268
  var styles = (0, _icon.euiIconStyles)(theme);
268
269
  var cssStyles = [styles.euiIcon, styles[size], color && (0, _named_colors.isNamedColor)(color) && styles[color], isCustomColor && styles.customColor, isElasticLogoOutline && styles.logoElasticOutline, isAppIcon && !appIconHasColor && styles.app, isLoading && styles.isLoading, !isLoading && neededLoading && styles.isLoaded];
269
- var icon = this.state.icon || _empty.icon; // This is a fix for IE and Edge, which ignores tabindex="-1" on an SVG, but respects
270
- // focusable="false".
271
- // - If there's no tabindex specified, we'll default the icon to not be focusable,
272
- // which is how SVGs behave in Chrome, Safari, and FF.
273
- // - If tabindex is -1, then the consumer wants the icon to be focusable by JavaScript only.
274
- // - If the tabindex is 0, the consumer wants the icon to be keyboard focusable.
275
-
276
- var focusable = tabIndex == null || tabIndex === -1 ? 'false' : 'true';
270
+ var icon = this.state.icon || _empty.icon;
277
271
 
278
272
  if (typeof icon === 'string') {
279
273
  return (0, _react3.jsx)("img", (0, _extends2.default)({
@@ -305,7 +299,6 @@ var EuiIconClass = /*#__PURE__*/function (_PureComponent) {
305
299
  style: optionalCustomStyles,
306
300
  css: cssStyles,
307
301
  tabIndex: tabIndex,
308
- focusable: focusable,
309
302
  role: "img",
310
303
  title: title,
311
304
  "data-icon-type": iconTitle,
@@ -33,7 +33,7 @@ var _href_validator = require("../../services/security/href_validator");
33
33
 
34
34
  var _react2 = require("@emotion/react");
35
35
 
36
- var _excluded = ["label", "isActive", "isDisabled", "href", "target", "rel", "className", "iconType", "icon", "iconProps", "extraAction", "onClick", "size", "color", "showToolTip", "wrapText", "buttonRef"],
36
+ var _excluded = ["label", "isActive", "isDisabled", "href", "target", "rel", "className", "iconType", "icon", "iconProps", "extraAction", "onClick", "size", "color", "showToolTip", "wrapText", "buttonRef", "toolTipText"],
37
37
  _excluded2 = ["iconType", "alwaysShow", "className", "isDisabled"];
38
38
 
39
39
  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); }
@@ -81,6 +81,7 @@ var EuiListGroupItem = function EuiListGroupItem(_ref) {
81
81
  showToolTip = _ref$showToolTip === void 0 ? false : _ref$showToolTip,
82
82
  wrapText = _ref.wrapText,
83
83
  buttonRef = _ref.buttonRef,
84
+ toolTipText = _ref.toolTipText,
84
85
  rest = (0, _objectWithoutProperties2.default)(_ref, _excluded);
85
86
 
86
87
  var isHrefValid = !href || (0, _href_validator.validateHref)(href);
@@ -182,7 +183,7 @@ var EuiListGroupItem = function EuiListGroupItem(_ref) {
182
183
  className: classes
183
184
  }, (0, _react2.jsx)(_tool_tip.EuiToolTip, {
184
185
  anchorClassName: "euiListGroupItem__tooltip",
185
- content: label,
186
+ content: toolTipText !== null && toolTipText !== void 0 ? toolTipText : label,
186
187
  position: "right",
187
188
  delay: "long"
188
189
  }, itemContent));
@@ -84,9 +84,7 @@ var EuiModal = function EuiModal(_ref) {
84
84
  color: "text",
85
85
  "aria-label": closeModal
86
86
  });
87
- }), (0, _react2.jsx)("div", {
88
- className: "euiModal__flex"
89
- }, children))));
87
+ }), children)));
90
88
  };
91
89
 
92
90
  exports.EuiModal = EuiModal;
@@ -63,7 +63,7 @@ var EuiMutationObserver = /*#__PURE__*/function (_EuiObserver) {
63
63
  exports.EuiMutationObserver = EuiMutationObserver;
64
64
 
65
65
  var makeMutationObserver = function makeMutationObserver(node, _observerOptions, callback) {
66
- // IE11 and the MutationObserver polyfill used in Kibana (for Jest) implement
66
+ // The MutationObserver polyfill used in Kibana (for Jest) implements
67
67
  // an older spec in which specifying `attributeOldValue` or `attributeFilter`
68
68
  // without specifying `attributes` results in a `SyntaxError`.
69
69
  // The following logic patches the newer spec in which `attributes: true` can be
@@ -63,13 +63,17 @@ var EuiPageSidebar = function EuiPageSidebar(_ref) {
63
63
  setInlineStyles = _useState2[1];
64
64
 
65
65
  (0, _react.useEffect)(function () {
66
+ var updatedStyles = _objectSpread(_objectSpread({}, style), (0, _global_styling.logicalStyle)('min-width', isResponding ? '100%' : minWidth));
67
+
66
68
  if (sticky) {
67
69
  var _document$body$datase;
68
70
 
69
71
  var euiHeaderFixedCounter = Number((_document$body$datase = document.body.dataset.fixedHeaders) !== null && _document$body$datase !== void 0 ? _document$body$datase : 0);
70
72
  var offset = (0, _typeof2.default)(sticky) === 'object' ? sticky === null || sticky === void 0 ? void 0 : sticky.offset : themeContext.euiTheme.base * 3 * euiHeaderFixedCounter;
71
- setInlineStyles(_objectSpread(_objectSpread(_objectSpread(_objectSpread({}, style), (0, _global_styling.logicalStyle)('min-width', isResponding ? '100%' : minWidth)), (0, _global_styling.logicalStyle)('top', offset)), (0, _global_styling.logicalStyle)('max-height', "calc(100vh - ".concat(offset, "px)"))));
73
+ updatedStyles = _objectSpread(_objectSpread(_objectSpread({}, updatedStyles), (0, _global_styling.logicalStyle)('top', offset)), (0, _global_styling.logicalStyle)('max-height', "calc(100vh - ".concat(offset, "px)")));
72
74
  }
75
+
76
+ setInlineStyles(updatedStyles);
73
77
  }, [style, sticky, themeContext.euiTheme.base, isResponding, minWidth]);
74
78
  return (0, _react2.jsx)("div", (0, _extends2.default)({
75
79
  className: className,
@@ -133,24 +133,6 @@ var EuiTabbedContent = /*#__PURE__*/function (_Component) {
133
133
  }
134
134
 
135
135
  (0, _createClass2.default)(EuiTabbedContent, [{
136
- key: "componentDidMount",
137
- value: function componentDidMount() {
138
- // IE11 doesn't support the `relatedTarget` event property for blur events
139
- // but does add it for focusout. React doesn't support `onFocusOut` so here we are.
140
- if (this.tabsRef.current) {
141
- // Current short-term solution for event listener (see https://github.com/elastic/eui/pull/2717)
142
- this.tabsRef.current.addEventListener('focusout', this.removeFocus);
143
- }
144
- }
145
- }, {
146
- key: "componentWillUnmount",
147
- value: function componentWillUnmount() {
148
- if (this.tabsRef.current) {
149
- // Current short-term solution for event listener (see https://github.com/elastic/eui/pull/2717)
150
- this.tabsRef.current.removeEventListener('focusout', this.removeFocus);
151
- }
152
- }
153
- }, {
154
136
  key: "render",
155
137
  value: function render() {
156
138
  var _this2 = this;
@@ -178,7 +160,8 @@ var EuiTabbedContent = /*#__PURE__*/function (_Component) {
178
160
  ref: this.tabsRef,
179
161
  expand: expand,
180
162
  size: size,
181
- onFocus: this.initializeFocus
163
+ onFocus: this.initializeFocus,
164
+ onBlur: this.removeFocus
182
165
  }, tabs.map(function (tab) {
183
166
  var id = tab.id,
184
167
  name = tab.name,
@@ -0,0 +1,56 @@
1
+ {
2
+ "height": "block-size",
3
+ "width": "inline-size",
4
+ "max-height": "max-block-size",
5
+ "max-width": "max-inline-size",
6
+ "min-height": "min-block-size",
7
+ "min-width": "min-inline-size",
8
+ "top": "inset-block-start",
9
+ "right": "inset-inline-end",
10
+ "bottom": "inset-block-end",
11
+ "left": "inset-inline-start",
12
+ "horizontal": "inset-block",
13
+ "vertical": "inset-inline",
14
+ "margin-left": "margin-inline-start",
15
+ "margin-right": "margin-inline-end",
16
+ "margin-top": "margin-block-start",
17
+ "margin-bottom": "margin-block-end",
18
+ "margin-horizontal": "margin-inline",
19
+ "margin-vertical": "margin-block",
20
+ "padding-left": "padding-inline-start",
21
+ "padding-right": "padding-inline-end",
22
+ "padding-top": "padding-block-start",
23
+ "padding-bottom": "padding-block-end",
24
+ "padding-horizontal": "padding-inline",
25
+ "padding-vertical": "padding-block",
26
+ "overflow-x": "overflow-inline",
27
+ "overflow-y": "overflow-block",
28
+ "border-horizontal": "border-inline",
29
+ "border-horizontal-color": "border-inline-color",
30
+ "border-horizontal-width": "border-inline-width",
31
+ "border-horizontal-style": "border-inline-style",
32
+ "border-vertical": "border-block",
33
+ "border-vertical-color": "border-block-color",
34
+ "border-vertical-width": "border-block-width",
35
+ "border-vertical-style": "border-block-style",
36
+ "border-bottom": "border-block-end",
37
+ "border-bottom-color": "border-block-end-color",
38
+ "border-bottom-style": "border-block-end-style",
39
+ "border-bottom-width": "border-block-end-width",
40
+ "border-top": "border-block-start",
41
+ "border-top-color": "border-block-start-color",
42
+ "border-top-style": "border-block-start-style",
43
+ "border-top-width": "border-block-start-width",
44
+ "border-right": "border-inline-end",
45
+ "border-right-color": "border-inline-end-color",
46
+ "border-right-style": "border-inline-end-style",
47
+ "border-right-width": "border-inline-end-width",
48
+ "border-left": "border-inline-start",
49
+ "border-left-color": "border-inline-start-color",
50
+ "border-left-style": "border-inline-start-style",
51
+ "border-left-width": "border-inline-start-width",
52
+ "border-top-left-radius": "border-start-start-radius",
53
+ "border-top-right-radius": "border-start-end-radius",
54
+ "border-bottom-left-radius": "border-end-start-radius",
55
+ "border-bottom-right-radius": "border-end-end-radius"
56
+ }
@@ -45,7 +45,7 @@ var useEuiFontSize = function useEuiFontSize(scale, options) {
45
45
  exports.useEuiFontSize = useEuiFontSize;
46
46
 
47
47
  var euiTextBreakWord = function euiTextBreakWord() {
48
- return "\n overflow-wrap: break-word !important; // makes sure the long string will wrap and not bust out of the container\n word-wrap: break-word !important; // spec says, they are literally just alternate names for each other but some browsers support one and not the other\n word-break: break-word; // IE doesn't understand but that's ok\n";
48
+ return "\n overflow-wrap: break-word !important; // makes sure the long string will wrap and not bust out of the container\n word-break: break-word;\n";
49
49
  };
50
50
  /**
51
51
  * Prevent text from wrapping onto multiple lines, and truncate with an ellipsis.
@@ -32,11 +32,14 @@ var useEuiTheme = function useEuiTheme() {
32
32
  var theme = (0, _react.useContext)(_context.EuiThemeContext);
33
33
  var colorMode = (0, _react.useContext)(_context.EuiColorModeContext);
34
34
  var modifications = (0, _react.useContext)(_context.EuiModificationsContext);
35
- return {
36
- euiTheme: theme,
37
- colorMode: colorMode,
38
- modifications: modifications
39
- };
35
+ var assembledTheme = (0, _react.useMemo)(function () {
36
+ return {
37
+ euiTheme: theme,
38
+ colorMode: colorMode,
39
+ modifications: modifications
40
+ };
41
+ }, [theme, colorMode, modifications]);
42
+ return assembledTheme;
40
43
  };
41
44
 
42
45
  exports.useEuiTheme = useEuiTheme;
@@ -47,17 +50,9 @@ var withEuiTheme = function withEuiTheme(Component) {
47
50
  var componentName = Component.displayName || Component.name || 'ComponentWithTheme';
48
51
 
49
52
  var Render = function Render(props, ref) {
50
- var _useEuiTheme = useEuiTheme(),
51
- euiTheme = _useEuiTheme.euiTheme,
52
- colorMode = _useEuiTheme.colorMode,
53
- modifications = _useEuiTheme.modifications;
54
-
53
+ var theme = useEuiTheme();
55
54
  return (0, _react2.jsx)(Component, (0, _extends2.default)({
56
- theme: {
57
- euiTheme: euiTheme,
58
- colorMode: colorMode,
59
- modifications: modifications
60
- },
55
+ theme: theme,
61
56
  ref: ref
62
57
  }, props));
63
58
  };
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@elastic/eui",
3
3
  "description": "Elastic UI Component Library",
4
- "version": "65.0.0",
4
+ "version": "66.0.0",
5
5
  "license": "SEE LICENSE IN LICENSE.txt",
6
6
  "main": "lib",
7
7
  "module": "es",
@@ -43,7 +43,6 @@
43
43
 
44
44
  .euiBadge__childButton {
45
45
  @include euiTextTruncate;
46
- flex: 1 1 auto; // Must be 1 and 1 for IE to properly truncate
47
46
  text-align: inherit;
48
47
  font-weight: inherit;
49
48
  line-height: inherit;
@@ -62,7 +61,6 @@
62
61
  }
63
62
 
64
63
  .euiBadge__iconButton {
65
- flex: 0 0 auto;
66
64
  font-size: 0; // Makes the button only as large as the icon so it aligns vertically better
67
65
  margin-left: $euiSizeXS;
68
66
 
@@ -84,13 +82,10 @@
84
82
 
85
83
  .euiBadge__text {
86
84
  @include euiTextTruncate;
87
- flex: 1 1 auto;
88
85
  cursor: default;
89
86
  }
90
87
 
91
88
  .euiBadge__icon {
92
- flex: 0 0 auto;
93
-
94
89
  &:not(:only-child) {
95
90
  margin-left: $euiSizeXS;
96
91
  }
@@ -104,6 +104,13 @@
104
104
  max-width: 400px !important;
105
105
  max-height: 400px !important;
106
106
  z-index: $euiZDataGridCellPopover !important;
107
+ // Workaround for a Safari CSS bug when using both `overflow: auto` & `filter: drop-shadow`
108
+ // (see https://github.com/elastic/eui/issues/6151)
109
+ // Disables the default EuiPopover filter drop-shadow and uses box-shadow instead,
110
+ // since we don't use the popover arrow in any case for cell popovers
111
+ filter: none;
112
+ // sass-lint:disable-block mixins-before-declarations
113
+ @include euiBottomShadow; // TODO: Convert to euiShadowMedium() in Emotion
107
114
  }
108
115
 
109
116
  .euiDataGridRowCell__expandFlex {
@@ -2,7 +2,7 @@
2
2
  display: flex;
3
3
  z-index: 3; // Needs to sit above the content and focused cells
4
4
  background: $euiColorEmptyShade;
5
- position: sticky; // In IE11 this does not work, but doesn't cause a break.
5
+ position: sticky;
6
6
  top: 0;
7
7
  }
8
8
 
@@ -36,9 +36,11 @@
36
36
  display: flex;
37
37
  }
38
38
 
39
- // A fixed width is required in IE11 because of the shift in widths that can be caused
39
+ // A fixed width is required because of the shift in widths that can be caused
40
40
  // by the loading animation that precedes the results.
41
41
  .euiFilterGroup__popoverPanel {
42
+ // Note for Emotion conversion: there are unfortunately 5+ direct
43
+ // usages of this className in Kibana that will need to be refactored
42
44
  width: $euiSize * 18;
43
45
  }
44
46
 
@@ -1,20 +1,11 @@
1
- /**
2
- * 1. Not always needed, but fixes an IE11 issue when flex-groups are nested under display: flex elements.
3
- * 2. IE requires a unit to grow.
4
- */
5
-
6
1
  .euiFlexGroup {
7
2
  display: flex;
8
3
  align-items: stretch;
9
- flex-grow: 1; /* 1 */
4
+ flex-grow: 1; // Grow nested flex-groups by default
10
5
 
11
6
  .euiFlexItem {
12
- @include internetExplorerOnly {
13
- min-width: 1px;
14
- }
15
-
16
7
  flex-grow: 1;
17
- flex-basis: 0%; /* 2 */
8
+ flex-basis: 0%;
18
9
  }
19
10
  }
20
11
 
@@ -1,13 +1,7 @@
1
1
  /**
2
2
  * 1. Allow EuiPanels to expand to fill the item.
3
- * 2. IE11 hack forces inner content of flex items to respect a higher parent's width (mostly) and
4
- * not cause weird wrapping issues.
5
3
  */
6
4
  .euiFlexItem {
7
- @include internetExplorerOnly {
8
- min-width: 1px; /* 2 */
9
- }
10
-
11
5
  display: flex; /* 1 */
12
6
  flex-direction: column; /* 1 */
13
7
 
@@ -1,7 +1,6 @@
1
1
  /*
2
2
  * 1. Fix for Safari to ensure that it renders like a normal text input
3
3
  * and doesn't add extra spacing around text
4
- * 2. Remove the X clear button from input type search in Chrome and IE
5
4
  */
6
5
 
7
6
  .euiFieldSearch {
@@ -16,10 +15,6 @@
16
15
  &::-webkit-search-cancel-button {
17
16
  -webkit-appearance: none; /* 1, 2 */
18
17
  }
19
-
20
- &::-ms-clear {
21
- display: none; /* 2 */
22
- }
23
18
  }
24
19
 
25
20
  .euiFieldSearch--compressed {
@@ -22,8 +22,6 @@
22
22
 
23
23
  .euiFormControlLayoutDelimited__input {
24
24
  height: 100%;
25
- padding-top: 0; // Fixes IE
26
- padding-bottom: 0; // Fixes IE
27
25
  padding-left: $euiFormControlCompressedPadding;
28
26
  padding-right: $euiFormControlCompressedPadding;
29
27
  }
@@ -66,7 +64,6 @@
66
64
  position: static; // Overrider absolute
67
65
  padding-left: $euiFormControlPadding;
68
66
  padding-right: $euiFormControlPadding;
69
- flex-shrink: 0; // Fixes IE
70
67
 
71
68
  &:not(.euiFormControlLayoutIcons--right) {
72
69
  order: -1;
@@ -39,7 +39,6 @@
39
39
 
40
40
  .euiFormRow__label {
41
41
  hyphens: auto;
42
- max-width: 100%; // Fixes IE
43
42
  }
44
43
 
45
44
  .euiFormRow__labelWrapper {
@@ -41,4 +41,4 @@
41
41
  display: none;
42
42
  }
43
43
  }
44
- }
44
+ }
@@ -7,21 +7,13 @@
7
7
  position: relative;
8
8
 
9
9
  &.euiListGroupItem-isActive,
10
- &.euiListGroupItem-isClickable:hover {
11
- background-color: $euiListGroupItemHoverBackground;
12
- }
13
-
14
- // Can't be grouped with above or else IE will ignore the whole group
10
+ &.euiListGroupItem-isClickable:hover,
15
11
  &.euiListGroupItem-isClickable:focus-within {
16
12
  background-color: $euiListGroupItemHoverBackground;
17
13
  }
18
14
 
19
15
  &.euiListGroupItem--ghost {
20
- &.euiListGroupItem-isClickable:hover {
21
- background-color: $euiListGroupItemHoverBackgroundGhost;
22
- }
23
-
24
- // Can't be grouped with above or else IE will ignore the whole group
16
+ &.euiListGroupItem-isClickable:hover,
25
17
  &.euiListGroupItem-isClickable:focus-within {
26
18
  background-color: $euiListGroupItemHoverBackgroundGhost;
27
19
  }
@@ -46,27 +38,13 @@
46
38
  }
47
39
  }
48
40
 
49
- // IE doesn't support :focus-within
50
- @include internetExplorerOnly {
51
- .euiListGroupItem__button:hover,
52
- .euiListGroupItem__button:focus {
53
- background-color: $euiListGroupItemHoverBackground;
54
- border-radius: $euiBorderRadius;
55
-
56
- .euiListGroupItem--ghost .euiListGroupItem__button:hover,
57
- .euiListGroupItem--ghost .euiListGroupItem__button:focus {
58
- background-color: $euiListGroupItemHoverBackgroundGhost;
59
- }
60
- }
61
- }
62
-
63
41
  .euiListGroupItem__text,
64
42
  .euiListGroupItem__button {
65
43
  line-height: $euiSizeL;
66
44
  padding: $euiSizeXS $euiSizeS;
67
45
  display: flex;
68
46
  align-items: center;
69
- flex: 1 0 auto; // The flex-shrink and flex-basis values are needed for IE11
47
+ flex-grow: 1;
70
48
  text-align: left;
71
49
  max-width: 100%;
72
50
  font-weight: inherit;
@@ -1,15 +1,11 @@
1
- /**
2
- * 1. Fix IE overflow issue (min-height) by adding a separate wrapper for the
3
- * flex display. https://github.com/philipwalton/flexbugs#flexbug-3
4
- * 2. IE has trouble with min-widths on flex elements. Use the pixel value
5
- * from our forms since that's usually the smallest we want them.
6
- */
7
-
8
1
  .euiModal {
9
2
  border: $euiBorderThin;
10
3
  // This mixin overwrites some of the border above
11
4
  @include euiBottomShadowLarge; // sass-lint:disable-line mixins-before-declarations
12
- display: flex; /* 1 */
5
+ display: flex;
6
+ flex-direction: column;
7
+ max-height: 75vh; // We overflow the modal body based off this
8
+ overflow: hidden; // Ensure long, non-breaking text doesn't expand beyond the modal bounds
13
9
 
14
10
  position: relative;
15
11
  background-color: $euiColorEmptyShade;
@@ -23,14 +19,6 @@
23
19
  &:focus {
24
20
  outline: none;
25
21
  }
26
-
27
- .euiModal__flex { /* 1 */
28
- flex: 1 1 auto;
29
- display: flex;
30
- flex-direction: column;
31
- max-height: 75vh; // We overflow the modal body based off this
32
- overflow: hidden; // Ensure long, non-breaking text doesn't expand beyond the modal bounds
33
- }
34
22
  }
35
23
 
36
24
  .euiModal--maxWidth-default {
@@ -123,6 +111,7 @@
123
111
  width: 100vw !important;
124
112
  max-width: none !important;
125
113
  min-width: 0 !important;
114
+ max-height: 100vh;
126
115
  left: 0;
127
116
  right: 0;
128
117
  bottom: 0;
@@ -134,10 +123,6 @@
134
123
  @include euiBottomShadowLarge($reverse: true);
135
124
  top: auto;
136
125
  }
137
-
138
- .euiModal__flex { /* 1 */
139
- max-height: 100vh;
140
- }
141
126
  }
142
127
 
143
128
  .euiModalHeader {
@@ -18,7 +18,6 @@
18
18
 
19
19
  &.euiPageContent--horizontalCenter {
20
20
  width: auto;
21
- max-width: 100%; // Fixes IE
22
21
  margin-left: auto;
23
22
  margin-right: auto;
24
23
  flex-grow: 0; // Offsets the properties of .euiPanel within flexboxes
@@ -152,7 +152,6 @@
152
152
  }
153
153
 
154
154
  .euiTableRowCell {
155
- display: block; /* IE requires block to grow and wrap. */
156
155
  min-width: 50%;
157
156
  border: none;
158
157
  }
@@ -1,7 +1,3 @@
1
- /**
2
- * NOTE: table-layout: fixed causes a bug in IE11 and Edge (see #9929). It also prevents us from
3
- * specifying a column width, e.g. the checkbox column.
4
- */
5
1
  .euiTable {
6
2
  @include euiFontSizeS;
7
3
  @include euiNumberFormat;
@@ -194,7 +190,6 @@
194
190
  overflow: visible;
195
191
  white-space: normal;
196
192
  //* 4 */ overflow-wrap is not supported on flex parents
197
- word-break: break-all; // Fallback for FF and IE
198
193
  word-break: break-word;
199
194
  }
200
195
 
@@ -78,10 +78,6 @@
78
78
  font-size: $euiFontSizeS;
79
79
  color: $euiTextColor;
80
80
 
81
- @include internetExplorerOnly {
82
- line-height: 1em; // fixes text alignment in IE
83
- }
84
-
85
81
  // sass-lint:disable-block mixins-before-declarations
86
82
  @include euiPlaceholderPerBrowser {
87
83
  color: $euiFormControlPlaceholderText;
@@ -112,14 +112,6 @@
112
112
  margin: -1px;
113
113
  }
114
114
 
115
- // Specifically target IE11, but not Edge.
116
- @mixin internetExplorerOnly {
117
- // sass-lint:disable-block no-vendor-prefixes
118
- @media screen and (-ms-high-contrast: active), screen and (-ms-high-contrast: none) {
119
- @content;
120
- }
121
- }
122
-
123
115
  // Doesn't have reduced motion turned on
124
116
  @mixin euiCanAnimate {
125
117
  @media screen and (prefers-reduced-motion: no-preference) {
@@ -127,8 +127,7 @@
127
127
  @mixin euiTextBreakWord {
128
128
  // https://css-tricks.com/snippets/css/prevent-long-urls-from-breaking-out-of-container/
129
129
  overflow-wrap: break-word !important; // makes sure the long string will wrap and not bust out of the container
130
- word-wrap: break-word !important; // spec says, they are literally just alternate names for each other but some browsers support one and not the other
131
- word-break: break-word; // IE doesn't understand but that's ok
130
+ word-break: break-word;
132
131
  }
133
132
 
134
133
  // Text truncation
@@ -138,8 +137,6 @@
138
137
  //
139
138
  // 1. Ensure that the node has a maximum width after which truncation can
140
139
  // occur.
141
- // 2. Fix for IE 8/9 if `word-wrap: break-word` is in effect on ancestor
142
- // nodes.
143
140
 
144
141
  @mixin euiTextTruncate {
145
142
  // sass-lint:disable-block no-important
@@ -147,7 +144,6 @@
147
144
  overflow: hidden !important;
148
145
  text-overflow: ellipsis !important;
149
146
  white-space: nowrap !important;
150
- word-wrap: normal !important; // 2
151
147
  }
152
148
 
153
149
  @mixin euiNumberFormat {
@@ -1,2 +1 @@
1
1
  @import 'animations';
2
- @import 'utility';
@@ -1218,6 +1218,11 @@ EuiBasicTable.propTypes = {
1218
1218
  */
1219
1219
  sortable: _propTypes.default.oneOfType([_propTypes.default.bool.isRequired, _propTypes.default.func.isRequired]),
1220
1220
  isExpander: _propTypes.default.bool,
1221
+
1222
+ /**
1223
+ * Creates a text wrapper around cell content that helps word break or truncate
1224
+ * long text correctly.
1225
+ */
1221
1226
  textOnly: _propTypes.default.bool,
1222
1227
 
1223
1228
  /**
@@ -1564,11 +1569,17 @@ EuiBasicTable.propTypes = {
1564
1569
  tableLayout: _propTypes.default.oneOf(["fixed", "auto"]),
1565
1570
 
1566
1571
  /**
1567
- * Applied to table cells => Any cell using render function will set this to be false, leading to unnecessary word breaks. Apply textOnly: true in order to ensure it breaks properly
1572
+ * Applied to table cells. Any cell using a render function will set this to be false.
1573
+ *
1574
+ * Creates a text wrapper around cell content that helps word break or truncate
1575
+ * long text correctly.
1568
1576
  */
1569
1577
 
1570
1578
  /**
1571
- * Applied to table cells => Any cell using render function will set this to be false, leading to unnecessary word breaks. Apply textOnly: true in order to ensure it breaks properly
1579
+ * Applied to table cells. Any cell using a render function will set this to be false.
1580
+ *
1581
+ * Creates a text wrapper around cell content that helps word break or truncate
1582
+ * long text correctly.
1572
1583
  */
1573
1584
  textOnly: _propTypes.default.bool
1574
1585
  };