@elastic/eui 65.0.2 → 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 (158) hide show
  1. package/dist/eui_theme_dark.css +24 -196
  2. package/dist/eui_theme_dark.min.css +1 -1
  3. package/dist/eui_theme_light.css +24 -196
  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/description_list/description_list.js +11 -3
  16. package/es/components/description_list/description_list_context.js +2 -1
  17. package/es/components/description_list/description_list_description.js +3 -1
  18. package/es/components/description_list/description_list_description.styles.js +5 -2
  19. package/es/components/description_list/description_list_title.js +3 -2
  20. package/es/components/description_list/description_list_title.styles.js +7 -3
  21. package/es/components/description_list/description_list_types.js +2 -1
  22. package/es/components/form/field_search/field_search.js +6 -16
  23. package/es/components/form/range/range_input.js +1 -1
  24. package/es/components/header/header_section/header_section_item.js +4 -3
  25. package/es/components/icon/icon.js +1 -9
  26. package/es/components/list_group/list_group.js +7 -1
  27. package/es/components/list_group/list_group_item.js +10 -3
  28. package/es/components/list_group/pinnable_list_group/pinnable_list_group.js +13 -1
  29. package/es/components/modal/modal.js +1 -3
  30. package/es/components/observer/mutation_observer/mutation_observer.js +1 -1
  31. package/es/components/page/page_sidebar/page_sidebar.js +5 -1
  32. package/es/components/table/table_row_cell.js +4 -6
  33. package/es/components/tabs/tabbed_content/tabbed_content.js +2 -19
  34. package/es/global_styling/mixins/_typography.js +1 -1
  35. package/es/services/theme/hooks.js +11 -16
  36. package/eui.d.ts +29 -10
  37. package/i18ntokens.json +18 -18
  38. package/lib/components/basic_table/basic_table.js +13 -2
  39. package/lib/components/basic_table/in_memory_table.js +13 -2
  40. package/lib/components/card/card.styles.js +2 -2
  41. package/lib/components/combo_box/combo_box.js +2 -15
  42. package/lib/components/datagrid/body/data_grid_body.js +17 -6
  43. package/lib/components/datagrid/body/data_grid_cell.js +29 -12
  44. package/lib/components/datagrid/body/header/data_grid_header_cell.js +17 -6
  45. package/lib/components/datagrid/body/header/data_grid_header_row.js +17 -6
  46. package/lib/components/datagrid/data_grid.js +17 -6
  47. package/lib/components/datagrid/utils/in_memory.js +17 -6
  48. package/lib/components/description_list/description_list.js +11 -3
  49. package/lib/components/description_list/description_list_context.js +2 -1
  50. package/lib/components/description_list/description_list_description.js +3 -1
  51. package/lib/components/description_list/description_list_description.styles.js +5 -2
  52. package/lib/components/description_list/description_list_title.js +3 -2
  53. package/lib/components/description_list/description_list_title.styles.js +7 -3
  54. package/lib/components/description_list/description_list_types.js +4 -2
  55. package/lib/components/form/field_search/field_search.js +6 -16
  56. package/lib/components/form/range/range_input.js +1 -1
  57. package/lib/components/header/header_section/header_section_item.js +4 -3
  58. package/lib/components/icon/icon.js +1 -9
  59. package/lib/components/list_group/list_group.js +7 -1
  60. package/lib/components/list_group/list_group_item.js +10 -3
  61. package/lib/components/list_group/pinnable_list_group/pinnable_list_group.js +13 -1
  62. package/lib/components/modal/modal.js +1 -3
  63. package/lib/components/observer/mutation_observer/mutation_observer.js +1 -1
  64. package/lib/components/page/page_sidebar/page_sidebar.js +5 -1
  65. package/lib/components/table/table_row_cell.js +4 -6
  66. package/lib/components/tabs/tabbed_content/tabbed_content.js +2 -19
  67. package/lib/global_styling/mixins/_typography.js +1 -1
  68. package/lib/services/theme/hooks.js +10 -15
  69. package/optimize/es/components/card/card.styles.js +2 -2
  70. package/optimize/es/components/combo_box/combo_box.js +2 -15
  71. package/optimize/es/components/description_list/description_list.js +5 -2
  72. package/optimize/es/components/description_list/description_list_context.js +2 -1
  73. package/optimize/es/components/description_list/description_list_description.js +3 -1
  74. package/optimize/es/components/description_list/description_list_description.styles.js +5 -2
  75. package/optimize/es/components/description_list/description_list_title.js +3 -2
  76. package/optimize/es/components/description_list/description_list_title.styles.js +7 -3
  77. package/optimize/es/components/description_list/description_list_types.js +2 -1
  78. package/optimize/es/components/form/field_search/field_search.js +6 -16
  79. package/optimize/es/components/form/range/range_input.js +1 -1
  80. package/optimize/es/components/header/header_section/header_section_item.js +4 -3
  81. package/optimize/es/components/icon/icon.js +1 -9
  82. package/optimize/es/components/list_group/list_group_item.js +3 -2
  83. package/optimize/es/components/modal/modal.js +1 -3
  84. package/optimize/es/components/observer/mutation_observer/mutation_observer.js +1 -1
  85. package/optimize/es/components/page/page_sidebar/page_sidebar.js +5 -1
  86. package/optimize/es/components/tabs/tabbed_content/tabbed_content.js +2 -19
  87. package/optimize/es/global_styling/mixins/_typography.js +1 -1
  88. package/optimize/es/services/theme/hooks.js +11 -16
  89. package/optimize/lib/components/card/card.styles.js +2 -2
  90. package/optimize/lib/components/combo_box/combo_box.js +2 -15
  91. package/optimize/lib/components/description_list/description_list.js +5 -2
  92. package/optimize/lib/components/description_list/description_list_context.js +2 -1
  93. package/optimize/lib/components/description_list/description_list_description.js +3 -1
  94. package/optimize/lib/components/description_list/description_list_description.styles.js +5 -2
  95. package/optimize/lib/components/description_list/description_list_title.js +3 -2
  96. package/optimize/lib/components/description_list/description_list_title.styles.js +7 -3
  97. package/optimize/lib/components/description_list/description_list_types.js +4 -2
  98. package/optimize/lib/components/form/field_search/field_search.js +6 -16
  99. package/optimize/lib/components/form/range/range_input.js +1 -1
  100. package/optimize/lib/components/header/header_section/header_section_item.js +4 -3
  101. package/optimize/lib/components/icon/icon.js +1 -9
  102. package/optimize/lib/components/list_group/list_group_item.js +3 -2
  103. package/optimize/lib/components/modal/modal.js +1 -3
  104. package/optimize/lib/components/observer/mutation_observer/mutation_observer.js +1 -1
  105. package/optimize/lib/components/page/page_sidebar/page_sidebar.js +5 -1
  106. package/optimize/lib/components/tabs/tabbed_content/tabbed_content.js +2 -19
  107. package/optimize/lib/global_styling/mixins/_typography.js +1 -1
  108. package/optimize/lib/services/theme/hooks.js +10 -15
  109. package/package.json +1 -1
  110. package/src/components/badge/_badge.scss +0 -5
  111. package/src/components/datagrid/body/header/_data_grid_header_row.scss +1 -1
  112. package/src/components/filter_group/_filter_group.scss +3 -1
  113. package/src/components/flex/_flex_group.scss +2 -11
  114. package/src/components/flex/_flex_item.scss +0 -6
  115. package/src/components/form/field_search/_field_search.scss +0 -5
  116. package/src/components/form/form_control_layout/_form_control_layout_delimited.scss +0 -3
  117. package/src/components/form/form_row/_form_row.scss +0 -1
  118. package/src/components/header/header_section/_header_section_item.scss +1 -1
  119. package/src/components/list_group/_list_group_item.scss +3 -25
  120. package/src/components/modal/_modal.scss +5 -20
  121. package/src/components/page/page_content/_page_content.scss +0 -1
  122. package/src/components/table/_responsive.scss +0 -1
  123. package/src/components/table/_table.scss +0 -5
  124. package/src/global_styling/mixins/_form.scss +0 -4
  125. package/src/global_styling/mixins/_helpers.scss +0 -8
  126. package/src/global_styling/mixins/_typography.scss +1 -5
  127. package/src/global_styling/utility/_index.scss +0 -1
  128. package/test-env/components/basic_table/basic_table.js +13 -2
  129. package/test-env/components/basic_table/in_memory_table.js +13 -2
  130. package/test-env/components/card/card.styles.js +2 -2
  131. package/test-env/components/combo_box/combo_box.js +2 -15
  132. package/test-env/components/datagrid/body/data_grid_body.js +17 -6
  133. package/test-env/components/datagrid/body/data_grid_cell.js +29 -12
  134. package/test-env/components/datagrid/body/header/data_grid_header_cell.js +17 -6
  135. package/test-env/components/datagrid/body/header/data_grid_header_row.js +17 -6
  136. package/test-env/components/datagrid/data_grid.js +17 -6
  137. package/test-env/components/datagrid/utils/in_memory.js +17 -6
  138. package/test-env/components/description_list/description_list.js +11 -3
  139. package/test-env/components/description_list/description_list_context.js +2 -1
  140. package/test-env/components/description_list/description_list_description.js +3 -1
  141. package/test-env/components/description_list/description_list_description.styles.js +5 -2
  142. package/test-env/components/description_list/description_list_title.js +3 -2
  143. package/test-env/components/description_list/description_list_title.styles.js +7 -3
  144. package/test-env/components/description_list/description_list_types.js +4 -2
  145. package/test-env/components/form/field_search/field_search.js +6 -16
  146. package/test-env/components/form/range/range_input.js +1 -1
  147. package/test-env/components/header/header_section/header_section_item.js +4 -3
  148. package/test-env/components/list_group/list_group.js +7 -1
  149. package/test-env/components/list_group/list_group_item.js +10 -3
  150. package/test-env/components/list_group/pinnable_list_group/pinnable_list_group.js +13 -1
  151. package/test-env/components/modal/modal.js +1 -3
  152. package/test-env/components/observer/mutation_observer/mutation_observer.js +1 -1
  153. package/test-env/components/page/page_sidebar/page_sidebar.js +5 -1
  154. package/test-env/components/table/table_row_cell.js +4 -6
  155. package/test-env/components/tabs/tabbed_content/tabbed_content.js +2 -19
  156. package/test-env/global_styling/mixins/_typography.js +1 -1
  157. package/test-env/services/theme/hooks.js +10 -15
  158. package/src/global_styling/utility/_utility.scss +0 -15
@@ -231,14 +231,7 @@ export var EuiIconClass = /*#__PURE__*/function (_PureComponent) {
231
231
 
232
232
  var styles = euiIconStyles(theme);
233
233
  var cssStyles = [styles.euiIcon, styles[size], color && isNamedColor(color) && styles[color], isCustomColor && styles.customColor, isElasticLogoOutline && styles.logoElasticOutline, isAppIcon && !appIconHasColor && styles.app, isLoading && styles.isLoading, !isLoading && neededLoading && styles.isLoaded];
234
- var icon = this.state.icon || empty; // This is a fix for IE and Edge, which ignores tabindex="-1" on an SVG, but respects
235
- // focusable="false".
236
- // - If there's no tabindex specified, we'll default the icon to not be focusable,
237
- // which is how SVGs behave in Chrome, Safari, and FF.
238
- // - If tabindex is -1, then the consumer wants the icon to be focusable by JavaScript only.
239
- // - If the tabindex is 0, the consumer wants the icon to be keyboard focusable.
240
-
241
- var focusable = tabIndex == null || tabIndex === -1 ? 'false' : 'true';
234
+ var icon = this.state.icon || empty;
242
235
 
243
236
  if (typeof icon === 'string') {
244
237
  return ___EmotionJSX("img", _extends({
@@ -270,7 +263,6 @@ export var EuiIconClass = /*#__PURE__*/function (_PureComponent) {
270
263
  style: optionalCustomStyles,
271
264
  css: cssStyles,
272
265
  tabIndex: tabIndex,
273
- focusable: focusable,
274
266
  role: "img",
275
267
  title: title,
276
268
  "data-icon-type": iconTitle,
@@ -1,7 +1,7 @@
1
1
  import _slicedToArray from "@babel/runtime/helpers/slicedToArray";
2
2
  import _extends from "@babel/runtime/helpers/extends";
3
3
  import _objectWithoutProperties from "@babel/runtime/helpers/objectWithoutProperties";
4
- var _excluded = ["label", "isActive", "isDisabled", "href", "target", "rel", "className", "iconType", "icon", "iconProps", "extraAction", "onClick", "size", "color", "showToolTip", "wrapText", "buttonRef"],
4
+ var _excluded = ["label", "isActive", "isDisabled", "href", "target", "rel", "className", "iconType", "icon", "iconProps", "extraAction", "onClick", "size", "color", "showToolTip", "wrapText", "buttonRef", "toolTipText"],
5
5
  _excluded2 = ["iconType", "alwaysShow", "className", "isDisabled"];
6
6
 
7
7
  /*
@@ -58,6 +58,7 @@ export var EuiListGroupItem = function EuiListGroupItem(_ref) {
58
58
  showToolTip = _ref$showToolTip === void 0 ? false : _ref$showToolTip,
59
59
  wrapText = _ref.wrapText,
60
60
  buttonRef = _ref.buttonRef,
61
+ toolTipText = _ref.toolTipText,
61
62
  rest = _objectWithoutProperties(_ref, _excluded);
62
63
 
63
64
  var isHrefValid = !href || validateHref(href);
@@ -159,7 +160,7 @@ export var EuiListGroupItem = function EuiListGroupItem(_ref) {
159
160
  className: classes
160
161
  }, ___EmotionJSX(EuiToolTip, {
161
162
  anchorClassName: "euiListGroupItem__tooltip",
162
- content: label,
163
+ content: toolTipText !== null && toolTipText !== void 0 ? toolTipText : label,
163
164
  position: "right",
164
165
  delay: "long"
165
166
  }, itemContent));
@@ -71,7 +71,5 @@ export var EuiModal = function EuiModal(_ref) {
71
71
  color: "text",
72
72
  "aria-label": closeModal
73
73
  });
74
- }), ___EmotionJSX("div", {
75
- className: "euiModal__flex"
76
- }, children))));
74
+ }), children)));
77
75
  };
@@ -56,7 +56,7 @@ export var EuiMutationObserver = /*#__PURE__*/function (_EuiObserver) {
56
56
  }(EuiObserver);
57
57
 
58
58
  var makeMutationObserver = function makeMutationObserver(node, _observerOptions, callback) {
59
- // IE11 and the MutationObserver polyfill used in Kibana (for Jest) implement
59
+ // The MutationObserver polyfill used in Kibana (for Jest) implements
60
60
  // an older spec in which specifying `attributeOldValue` or `attributeFilter`
61
61
  // without specifying `attributes` results in a `SyntaxError`.
62
62
  // The following logic patches the newer spec in which `attributes: true` can be
@@ -46,13 +46,17 @@ export var EuiPageSidebar = function EuiPageSidebar(_ref) {
46
46
  setInlineStyles = _useState2[1];
47
47
 
48
48
  useEffect(function () {
49
+ var updatedStyles = _objectSpread(_objectSpread({}, style), logicalStyle('min-width', isResponding ? '100%' : minWidth));
50
+
49
51
  if (sticky) {
50
52
  var _document$body$datase;
51
53
 
52
54
  var euiHeaderFixedCounter = Number((_document$body$datase = document.body.dataset.fixedHeaders) !== null && _document$body$datase !== void 0 ? _document$body$datase : 0);
53
55
  var offset = _typeof(sticky) === 'object' ? sticky === null || sticky === void 0 ? void 0 : sticky.offset : themeContext.euiTheme.base * 3 * euiHeaderFixedCounter;
54
- setInlineStyles(_objectSpread(_objectSpread(_objectSpread(_objectSpread({}, style), logicalStyle('min-width', isResponding ? '100%' : minWidth)), logicalStyle('top', offset)), logicalStyle('max-height', "calc(100vh - ".concat(offset, "px)"))));
56
+ updatedStyles = _objectSpread(_objectSpread(_objectSpread({}, updatedStyles), logicalStyle('top', offset)), logicalStyle('max-height', "calc(100vh - ".concat(offset, "px)")));
55
57
  }
58
+
59
+ setInlineStyles(updatedStyles);
56
60
  }, [style, sticky, themeContext.euiTheme.base, isResponding, minWidth]);
57
61
  return ___EmotionJSX("div", _extends({
58
62
  className: className,
@@ -118,24 +118,6 @@ export var EuiTabbedContent = /*#__PURE__*/function (_Component) {
118
118
  }
119
119
 
120
120
  _createClass(EuiTabbedContent, [{
121
- key: "componentDidMount",
122
- value: function componentDidMount() {
123
- // IE11 doesn't support the `relatedTarget` event property for blur events
124
- // but does add it for focusout. React doesn't support `onFocusOut` so here we are.
125
- if (this.tabsRef.current) {
126
- // Current short-term solution for event listener (see https://github.com/elastic/eui/pull/2717)
127
- this.tabsRef.current.addEventListener('focusout', this.removeFocus);
128
- }
129
- }
130
- }, {
131
- key: "componentWillUnmount",
132
- value: function componentWillUnmount() {
133
- if (this.tabsRef.current) {
134
- // Current short-term solution for event listener (see https://github.com/elastic/eui/pull/2717)
135
- this.tabsRef.current.removeEventListener('focusout', this.removeFocus);
136
- }
137
- }
138
- }, {
139
121
  key: "render",
140
122
  value: function render() {
141
123
  var _this2 = this;
@@ -164,7 +146,8 @@ export var EuiTabbedContent = /*#__PURE__*/function (_Component) {
164
146
  ref: this.tabsRef,
165
147
  expand: expand,
166
148
  size: size,
167
- onFocus: this.initializeFocus
149
+ onFocus: this.initializeFocus,
150
+ onBlur: this.removeFocus
168
151
  }, tabs.map(function (tab) {
169
152
  var id = tab.id,
170
153
  name = tab.name,
@@ -29,7 +29,7 @@ export var useEuiFontSize = function useEuiFontSize(scale, options) {
29
29
  */
30
30
 
31
31
  export var euiTextBreakWord = function euiTextBreakWord() {
32
- 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";
32
+ 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";
33
33
  };
34
34
  /**
35
35
  * Prevent text from wrapping onto multiple lines, and truncate with an ellipsis.
@@ -7,18 +7,21 @@ import _extends from "@babel/runtime/helpers/extends";
7
7
  * in compliance with, at your election, the Elastic License 2.0 or the Server
8
8
  * Side Public License, v 1.
9
9
  */
10
- import React, { forwardRef, useContext } from 'react';
10
+ import React, { forwardRef, useContext, useMemo } from 'react';
11
11
  import { EuiThemeContext, EuiModificationsContext, EuiColorModeContext } from './context';
12
12
  import { jsx as ___EmotionJSX } from "@emotion/react";
13
13
  export var useEuiTheme = function useEuiTheme() {
14
14
  var theme = useContext(EuiThemeContext);
15
15
  var colorMode = useContext(EuiColorModeContext);
16
16
  var modifications = useContext(EuiModificationsContext);
17
- return {
18
- euiTheme: theme,
19
- colorMode: colorMode,
20
- modifications: modifications
21
- };
17
+ var assembledTheme = useMemo(function () {
18
+ return {
19
+ euiTheme: theme,
20
+ colorMode: colorMode,
21
+ modifications: modifications
22
+ };
23
+ }, [theme, colorMode, modifications]);
24
+ return assembledTheme;
22
25
  };
23
26
  // Provide the component props interface as the generic to allow the docs props table to populate.
24
27
  // e.g., `const EuiComponent = withEuiTheme<EuiComponentProps>(_EuiComponent)`
@@ -26,17 +29,9 @@ export var withEuiTheme = function withEuiTheme(Component) {
26
29
  var componentName = Component.displayName || Component.name || 'ComponentWithTheme';
27
30
 
28
31
  var Render = function Render(props, ref) {
29
- var _useEuiTheme = useEuiTheme(),
30
- euiTheme = _useEuiTheme.euiTheme,
31
- colorMode = _useEuiTheme.colorMode,
32
- modifications = _useEuiTheme.modifications;
33
-
32
+ var theme = useEuiTheme();
34
33
  return ___EmotionJSX(Component, _extends({
35
- theme: {
36
- euiTheme: euiTheme,
37
- colorMode: colorMode,
38
- modifications: modifications
39
- },
34
+ theme: theme,
40
35
  ref: ref
41
36
  }, props));
42
37
  };
@@ -87,14 +87,14 @@ var euiCardStyles = function euiCardStyles(euiThemeContext, paddingSize, color)
87
87
  euiCard__description: /*#__PURE__*/(0, _react.css)((0, _global_styling.logicalCSS)('margin-top', halfSpacing), ";;label:euiCard__description;"),
88
88
  euiCard__footer: /*#__PURE__*/(0, _react.css)("flex-grow:0;", (0, _global_styling.logicalCSS)('width', '100%'), ";", (0, _global_styling.logicalCSS)('margin-top', spacing), ";;label:euiCard__footer;"),
89
89
  top: {
90
- euiCard__top: /*#__PURE__*/(0, _react.css)("flex-grow:0;font-size:0;position:relative;", (0, _global_styling.logicalCSS)('min-height', '1px'), ";", (0, _global_styling.logicalCSS)('margin-bottom', spacing), ";;label:euiCard__top;"),
90
+ euiCard__top: /*#__PURE__*/(0, _react.css)("flex-grow:0;font-size:0;position:relative;", (0, _global_styling.logicalCSS)('margin-bottom', spacing), ";;label:euiCard__top;"),
91
91
  layout: {
92
92
  vertical: /*#__PURE__*/(0, _react.css)((0, _global_styling.logicalCSS)('width', '100%'), ";;label:vertical;"),
93
93
  horizontal: /*#__PURE__*/(0, _react.css)((0, _global_styling.logicalCSS)('width', 'auto'), ";;label:horizontal;")
94
94
  },
95
95
  disabled: _ref2
96
96
  },
97
- euiCard__image: /*#__PURE__*/(0, _react.css)("position:relative;overflow:hidden;", (0, _global_styling.logicalCSS)('width', "calc(100% + (".concat(paddingAmount, " * 2))")), ";", (0, _global_styling.logicalCSS)('left', "-".concat(paddingAmount)), ";", (0, _global_styling.logicalCSS)('top', "-".concat(paddingAmount)), ";", (0, _global_styling.logicalCSS)('margin-bottom', "-".concat(paddingAmount)), ";", _global_styling.logicals['border-top-left-radius'], ":calc(", euiTheme.border.radius.medium, " - 1px);", _global_styling.logicals['border-top-right-radius'], ":calc(", euiTheme.border.radius.medium, " - 1px);", color === 'transparent' ? "border-radius: ".concat(euiTheme.border.radius.medium, ";") : undefined, " img{", (0, _global_styling.logicalCSS)('width', '100%'), ";};label:euiCard__image;"),
97
+ euiCard__image: /*#__PURE__*/(0, _react.css)("position:relative;overflow:hidden;", (0, _global_styling.logicalCSS)('width', "calc(100% + (".concat(paddingAmount, " * 2))")), ";", (0, _global_styling.logicalCSS)('left', "-".concat(paddingAmount)), ";", (0, _global_styling.logicalCSS)('top', "-".concat(paddingAmount)), ";", (0, _global_styling.logicalCSS)('margin-bottom', "-".concat(paddingAmount)), ";", (0, _global_styling.logicalCSS)('border-top-left-radius', "calc(".concat(euiTheme.border.radius.medium, " - ").concat(euiTheme.border.width.thin, ")")), " ", _global_styling.logicals['border-top-right-radius'], ":calc(", euiTheme.border.radius.medium, " - ", euiTheme.border.width.thin, ");", color === 'transparent' ? "border-radius: ".concat(euiTheme.border.radius.medium, ";") : undefined, " img{", (0, _global_styling.logicalCSS)('width', '100%'), ";};label:euiCard__image;"),
98
98
  icon: {
99
99
  euiCard__icon: /*#__PURE__*/(0, _react.css)(";label:euiCard__icon;"),
100
100
  withImage: /*#__PURE__*/(0, _react.css)("position:absolute;", (0, _global_styling.logicalCSS)('top', '50%'), ";", (0, _global_styling.logicalCSS)('left', '50%'), ";transform:translate(-50%, calc(-50% + -", paddingAmount, "))!important;;label:withImage;"),
@@ -93,17 +93,9 @@ var EuiComboBox = /*#__PURE__*/function (_Component) {
93
93
  (0, _defineProperty2.default)((0, _assertThisInitialized2.default)(_this), "rootId", (0, _services.htmlIdGenerator)());
94
94
  (0, _defineProperty2.default)((0, _assertThisInitialized2.default)(_this), "comboBoxRefInstance", null);
95
95
  (0, _defineProperty2.default)((0, _assertThisInitialized2.default)(_this), "comboBoxRefCallback", function (ref) {
96
- // IE11 doesn't support the `relatedTarget` event property for blur events
97
- // but does add it for focusout. React doesn't support `onFocusOut` so here we are.
98
- if (_this.comboBoxRefInstance) {
99
- _this.comboBoxRefInstance.removeEventListener('focusout', _this.onContainerBlur);
100
- }
101
-
102
96
  _this.comboBoxRefInstance = ref;
103
97
 
104
98
  if (_this.comboBoxRefInstance) {
105
- _this.comboBoxRefInstance.addEventListener('focusout', _this.onContainerBlur);
106
-
107
99
  var comboBoxBounds = _this.comboBoxRefInstance.getBoundingClientRect();
108
100
 
109
101
  _this.setState({
@@ -388,13 +380,7 @@ var EuiComboBox = /*#__PURE__*/function (_Component) {
388
380
  });
389
381
  (0, _defineProperty2.default)((0, _assertThisInitialized2.default)(_this), "onContainerBlur", function (event) {
390
382
  // close the options list, unless the user clicked on an option
391
-
392
- /**
393
- * FireFox returns `relatedTarget` as `null` for security reasons, but provides a proprietary `explicitOriginalTarget`.
394
- * @see https://developer.mozilla.org/en-US/docs/Web/API/Event/explicitOriginalTarget
395
- */
396
- var focusEvent = event;
397
- var relatedTarget = focusEvent.relatedTarget || focusEvent.explicitOriginalTarget;
383
+ var relatedTarget = event.relatedTarget;
398
384
 
399
385
  var focusedInOptionsList = relatedTarget && _this.listRefInstance && _this.listRefInstance.contains(relatedTarget);
400
386
 
@@ -825,6 +811,7 @@ var EuiComboBox = /*#__PURE__*/function (_Component) {
825
811
  className: classes,
826
812
  "data-test-subj": dataTestSubj,
827
813
  onKeyDown: this.onKeyDown,
814
+ onBlur: this.onContainerBlur,
828
815
  ref: this.comboBoxRefCallback
829
816
  }), (0, _react2.jsx)(_combo_box_input.EuiComboBoxInput, {
830
817
  autoSizeInputRef: this.autoSizeInputRefCallback,
@@ -27,7 +27,7 @@ var _description_list_context = require("./description_list_context");
27
27
 
28
28
  var _react2 = require("@emotion/react");
29
29
 
30
- var _excluded = ["align", "children", "className", "compressed", "descriptionProps", "listItems", "textStyle", "titleProps", "type"];
30
+ var _excluded = ["align", "children", "className", "compressed", "descriptionProps", "listItems", "textStyle", "titleProps", "type", "gutterSize"];
31
31
 
32
32
  var EuiDescriptionList = function EuiDescriptionList(_ref) {
33
33
  var _ref$align = _ref.align,
@@ -43,6 +43,8 @@ var EuiDescriptionList = function EuiDescriptionList(_ref) {
43
43
  titleProps = _ref.titleProps,
44
44
  _ref$type = _ref.type,
45
45
  type = _ref$type === void 0 ? 'row' : _ref$type,
46
+ _ref$gutterSize = _ref.gutterSize,
47
+ gutterSize = _ref$gutterSize === void 0 ? 'm' : _ref$gutterSize,
46
48
  rest = (0, _objectWithoutProperties2.default)(_ref, _excluded);
47
49
  var euiTheme = (0, _services.useEuiTheme)();
48
50
  var styles = (0, _description_list.euiDescriptionListStyles)(euiTheme);
@@ -67,7 +69,8 @@ var EuiDescriptionList = function EuiDescriptionList(_ref) {
67
69
  type: type,
68
70
  compressed: compressed,
69
71
  textStyle: textStyle,
70
- align: align
72
+ align: align,
73
+ gutterSize: gutterSize
71
74
  }
72
75
  }, (0, _react2.jsx)("dl", (0, _extends2.default)({
73
76
  className: classes,
@@ -17,7 +17,8 @@ var _react = require("react");
17
17
  var contextDefaults = {
18
18
  type: 'row',
19
19
  textStyle: 'normal',
20
- align: 'left'
20
+ align: 'left',
21
+ gutterSize: 'm'
21
22
  };
22
23
  exports.contextDefaults = contextDefaults;
23
24
  var EuiDescriptionListContext = /*#__PURE__*/(0, _react.createContext)(contextDefaults);
@@ -42,7 +42,8 @@ var EuiDescriptionListDescription = function EuiDescriptionListDescription(_ref)
42
42
  type = _useContext.type,
43
43
  textStyle = _useContext.textStyle,
44
44
  compressed = _useContext.compressed,
45
- align = _useContext.align;
45
+ align = _useContext.align,
46
+ gutterSize = _useContext.gutterSize;
46
47
 
47
48
  var theme = (0, _services.useEuiTheme)();
48
49
  var styles = (0, _description_list_description.euiDescriptionListDescriptionStyles)(theme);
@@ -59,6 +60,7 @@ var EuiDescriptionListDescription = function EuiDescriptionListDescription(_ref)
59
60
  conditionalStyles.push(styles.left);
60
61
  }
61
62
 
63
+ conditionalStyles.push(styles[gutterSize]);
62
64
  break;
63
65
  }
64
66
 
@@ -24,7 +24,7 @@ var _ref = process.env.NODE_ENV === "production" ? {
24
24
 
25
25
  var euiDescriptionListDescriptionStyles = function euiDescriptionListDescriptionStyles(euiThemeContext) {
26
26
  var euiTheme = euiThemeContext.euiTheme;
27
- var columnDisplay = "\n ".concat((0, _global_styling.logicalCSS)('width', '50%'), " // Flex-basis doesn't work in IE with padding\n ").concat((0, _global_styling.logicalCSS)('padding-left', euiTheme.size.s), "\n &:not(:first-of-type) {\n ").concat((0, _global_styling.logicalCSS)('margin-top', euiTheme.size.base), "\n }\n ");
27
+ var columnDisplay = "\n ".concat((0, _global_styling.logicalCSS)('width', '50%'), "\n ").concat((0, _global_styling.logicalCSS)('padding-left', euiTheme.size.s), "\n ");
28
28
  return {
29
29
  euiDescriptionList__description: /*#__PURE__*/(0, _react.css)(";label:euiDescriptionList__description;"),
30
30
  // Types
@@ -44,7 +44,10 @@ var euiDescriptionListDescriptionStyles = function euiDescriptionListDescription
44
44
  normal: /*#__PURE__*/(0, _react.css)((0, _global_styling.euiFontSize)(euiThemeContext, 's'), ";;label:normal;")
45
45
  },
46
46
  // Column types should align description text to the left when EuiDecriptionList is centered
47
- left: /*#__PURE__*/(0, _react.css)((0, _global_styling.logicalTextAlignCSS)('left'), ";;label:left;")
47
+ left: /*#__PURE__*/(0, _react.css)((0, _global_styling.logicalTextAlignCSS)('left'), ";;label:left;"),
48
+ // Gutter
49
+ s: /*#__PURE__*/(0, _react.css)("&:not(:first-of-type){", (0, _global_styling.logicalCSS)('margin-top', euiTheme.size.s), ";};label:s;"),
50
+ m: /*#__PURE__*/(0, _react.css)("&:not(:first-of-type){", (0, _global_styling.logicalCSS)('margin-top', euiTheme.size.base), ";};label:m;")
48
51
  };
49
52
  };
50
53
 
@@ -42,7 +42,8 @@ var EuiDescriptionListTitle = function EuiDescriptionListTitle(_ref) {
42
42
  type = _useContext.type,
43
43
  textStyle = _useContext.textStyle,
44
44
  compressed = _useContext.compressed,
45
- align = _useContext.align;
45
+ align = _useContext.align,
46
+ gutterSize = _useContext.gutterSize;
46
47
 
47
48
  var theme = (0, _services.useEuiTheme)();
48
49
  var styles = (0, _description_list_title.euiDescriptionListTitleStyles)(theme);
@@ -62,7 +63,7 @@ var EuiDescriptionListTitle = function EuiDescriptionListTitle(_ref) {
62
63
  break;
63
64
  }
64
65
 
65
- var cssStyles = [styles.euiDescriptionList__title, styles[type]].concat((0, _toConsumableArray2.default)(conditionalStyles));
66
+ var cssStyles = [styles.euiDescriptionList__title, styles[type], styles[gutterSize]].concat((0, _toConsumableArray2.default)(conditionalStyles));
66
67
  var classes = (0, _classnames.default)('euiDescriptionList__title', className);
67
68
  return (0, _react2.jsx)("dt", (0, _extends2.default)({
68
69
  className: classes,
@@ -23,9 +23,9 @@ var _title = require("../title/title.styles");
23
23
  var euiDescriptionListTitleStyles = function euiDescriptionListTitleStyles(euiThemeContext) {
24
24
  var euiTheme = euiThemeContext.euiTheme,
25
25
  colorMode = euiThemeContext.colorMode;
26
- var columnDisplay = "\n ".concat((0, _global_styling.logicalCSS)('width', '50%'), " // Flex-basis doesn't work in IE with padding\n ").concat((0, _global_styling.logicalCSS)('padding-right', euiTheme.size.s), "\n ");
26
+ var columnDisplay = "\n ".concat((0, _global_styling.logicalCSS)('width', '50%'), "\n ").concat((0, _global_styling.logicalCSS)('padding-right', euiTheme.size.s), "\n ");
27
27
  return {
28
- euiDescriptionList__title: /*#__PURE__*/(0, _react.css)((0, _global_styling.euiTextBreakWord)(), "&:not(:first-of-type){", (0, _global_styling.logicalCSS)('margin-top', euiTheme.size.base), ";};label:euiDescriptionList__title;"),
28
+ euiDescriptionList__title: /*#__PURE__*/(0, _react.css)((0, _global_styling.euiTextBreakWord)(), ";;label:euiDescriptionList__title;"),
29
29
  // Types
30
30
  row: /*#__PURE__*/(0, _react.css)(";label:row;"),
31
31
  column: /*#__PURE__*/(0, _react.css)(columnDisplay, ";;label:column;"),
@@ -43,7 +43,11 @@ var euiDescriptionListTitleStyles = function euiDescriptionListTitleStyles(euiTh
43
43
  compressed: /*#__PURE__*/(0, _react.css)((0, _global_styling.euiFontSize)(euiThemeContext, 'xs'), ";", (0, _global_styling.logicalCSS)('padding-vertical', '0'), " ", (0, _global_styling.logicalCSS)('padding-horizontal', euiTheme.size.xs), ";;label:compressed;")
44
44
  },
45
45
  // Alignment
46
- right: /*#__PURE__*/(0, _react.css)((0, _global_styling.logicalTextAlignCSS)('right'), ";;label:right;")
46
+ right: /*#__PURE__*/(0, _react.css)((0, _global_styling.logicalTextAlignCSS)('right'), ";;label:right;"),
47
+ // Gutter
48
+ // Add margin only to the non-first <dt>.
49
+ s: /*#__PURE__*/(0, _react.css)("&:not(:first-of-type){", (0, _global_styling.logicalCSS)('margin-top', euiTheme.size.s), ";};label:s;"),
50
+ m: /*#__PURE__*/(0, _react.css)("&:not(:first-of-type){", (0, _global_styling.logicalCSS)('margin-top', euiTheme.size.base), ";};label:m;")
47
51
  };
48
52
  };
49
53
 
@@ -3,7 +3,7 @@
3
3
  Object.defineProperty(exports, "__esModule", {
4
4
  value: true
5
5
  });
6
- exports.TYPES = exports.TEXT_STYLES = exports.ALIGNMENTS = void 0;
6
+ exports.TYPES = exports.TEXT_STYLES = exports.GUTTER_SIZES = exports.ALIGNMENTS = void 0;
7
7
 
8
8
  /*
9
9
  * Copyright Elasticsearch B.V. and/or licensed to Elasticsearch B.V. under one
@@ -17,4 +17,6 @@ exports.TYPES = TYPES;
17
17
  var ALIGNMENTS = ['center', 'left'];
18
18
  exports.ALIGNMENTS = ALIGNMENTS;
19
19
  var TEXT_STYLES = ['normal', 'reverse'];
20
- exports.TEXT_STYLES = TEXT_STYLES;
20
+ exports.TEXT_STYLES = TEXT_STYLES;
21
+ var GUTTER_SIZES = ['s', 'm'];
22
+ exports.GUTTER_SIZES = GUTTER_SIZES;
@@ -90,26 +90,16 @@ var EuiFieldSearch = /*#__PURE__*/function (_Component) {
90
90
 
91
91
  if (nativeInputValueSetter) {
92
92
  nativeInputValueSetter.call(_this.inputElement, '');
93
- } // dispatch input event, with IE11 support/fallback
93
+ } // dispatch input event
94
94
 
95
95
 
96
- var event;
97
-
98
- if ('Event' in window && typeof Event === 'function') {
99
- event = new Event('input', {
100
- bubbles: true,
101
- cancelable: false
102
- });
103
- } else {
104
- // IE11
105
- event = document.createEvent('Event');
106
- event.initEvent('input', true, false);
107
- }
96
+ var event = new Event('input', {
97
+ bubbles: true,
98
+ cancelable: false
99
+ });
108
100
 
109
101
  if (_this.inputElement) {
110
- if (event) {
111
- _this.inputElement.dispatchEvent(event);
112
- } // set focus on the search field
102
+ _this.inputElement.dispatchEvent(event); // set focus on the search field
113
103
 
114
104
 
115
105
  _this.inputElement.focus();
@@ -35,7 +35,7 @@ var EuiRangeInput = function EuiRangeInput(_ref) {
35
35
  _ref$autoSize = _ref.autoSize,
36
36
  autoSize = _ref$autoSize === void 0 ? true : _ref$autoSize,
37
37
  rest = (0, _objectWithoutProperties2.default)(_ref, _excluded);
38
- // Chrome will properly size the input based on the max value, but FF & IE do not.
38
+ // Chrome will properly size the input based on the max value, but FF does not.
39
39
  // Calculate the width of the input based on highest number of characters.
40
40
  // Add 2 to accommodate for input stepper
41
41
  var widthStyle = autoSize ? {
@@ -30,10 +30,11 @@ var EuiHeaderSectionItem = function EuiHeaderSectionItem(_ref) {
30
30
  children = _ref.children,
31
31
  className = _ref.className,
32
32
  rest = (0, _objectWithoutProperties2.default)(_ref, _excluded);
33
- var classes = (0, _classnames.default)('euiHeaderSectionItem', borderToClassNameMap[border], className);
34
- return (0, _react2.jsx)("div", (0, _extends2.default)({
33
+ var classes = (0, _classnames.default)('euiHeaderSectionItem', borderToClassNameMap[border], className); // we check if there is any children and if not, we don't render anything
34
+
35
+ return children ? (0, _react2.jsx)("div", (0, _extends2.default)({
35
36
  className: classes
36
- }, rest), children);
37
+ }, rest), children) : null;
37
38
  };
38
39
 
39
40
  exports.EuiHeaderSectionItem = EuiHeaderSectionItem;
@@ -267,14 +267,7 @@ var EuiIconClass = /*#__PURE__*/function (_PureComponent) {
267
267
 
268
268
  var styles = (0, _icon.euiIconStyles)(theme);
269
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];
270
- var icon = this.state.icon || _empty.icon; // This is a fix for IE and Edge, which ignores tabindex="-1" on an SVG, but respects
271
- // focusable="false".
272
- // - If there's no tabindex specified, we'll default the icon to not be focusable,
273
- // which is how SVGs behave in Chrome, Safari, and FF.
274
- // - If tabindex is -1, then the consumer wants the icon to be focusable by JavaScript only.
275
- // - If the tabindex is 0, the consumer wants the icon to be keyboard focusable.
276
-
277
- var focusable = tabIndex == null || tabIndex === -1 ? 'false' : 'true';
270
+ var icon = this.state.icon || _empty.icon;
278
271
 
279
272
  if (typeof icon === 'string') {
280
273
  return (0, _react3.jsx)("img", (0, _extends2.default)({
@@ -306,7 +299,6 @@ var EuiIconClass = /*#__PURE__*/function (_PureComponent) {
306
299
  style: optionalCustomStyles,
307
300
  css: cssStyles,
308
301
  tabIndex: tabIndex,
309
- focusable: focusable,
310
302
  role: "img",
311
303
  title: title,
312
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,
@@ -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.