@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
@@ -29,7 +29,7 @@ var _description_list_context = require("./description_list_context");
29
29
 
30
30
  var _react2 = require("@emotion/react");
31
31
 
32
- var _excluded = ["align", "children", "className", "compressed", "descriptionProps", "listItems", "textStyle", "titleProps", "type"];
32
+ var _excluded = ["align", "children", "className", "compressed", "descriptionProps", "listItems", "textStyle", "titleProps", "type", "gutterSize"];
33
33
 
34
34
  var EuiDescriptionList = function EuiDescriptionList(_ref) {
35
35
  var _ref$align = _ref.align,
@@ -45,6 +45,8 @@ var EuiDescriptionList = function EuiDescriptionList(_ref) {
45
45
  titleProps = _ref.titleProps,
46
46
  _ref$type = _ref.type,
47
47
  type = _ref$type === void 0 ? 'row' : _ref$type,
48
+ _ref$gutterSize = _ref.gutterSize,
49
+ gutterSize = _ref$gutterSize === void 0 ? 'm' : _ref$gutterSize,
48
50
  rest = (0, _objectWithoutProperties2.default)(_ref, _excluded);
49
51
  var euiTheme = (0, _services.useEuiTheme)();
50
52
  var styles = (0, _description_list.euiDescriptionListStyles)(euiTheme);
@@ -69,7 +71,8 @@ var EuiDescriptionList = function EuiDescriptionList(_ref) {
69
71
  type: type,
70
72
  compressed: compressed,
71
73
  textStyle: textStyle,
72
- align: align
74
+ align: align,
75
+ gutterSize: gutterSize
73
76
  }
74
77
  }, (0, _react2.jsx)("dl", (0, _extends2.default)({
75
78
  className: classes,
@@ -129,5 +132,10 @@ EuiDescriptionList.propTypes = {
129
132
  "aria-label": _propTypes.default.string,
130
133
  "data-test-subj": _propTypes.default.string,
131
134
  css: _propTypes.default.any
132
- })
135
+ }),
136
+
137
+ /**
138
+ * Vertical spacing added between `EuiDescriptionList` elements
139
+ */
140
+ gutterSize: _propTypes.default.any
133
141
  };
@@ -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);
@@ -44,7 +44,8 @@ var EuiDescriptionListDescription = function EuiDescriptionListDescription(_ref)
44
44
  type = _useContext.type,
45
45
  textStyle = _useContext.textStyle,
46
46
  compressed = _useContext.compressed,
47
- align = _useContext.align;
47
+ align = _useContext.align,
48
+ gutterSize = _useContext.gutterSize;
48
49
 
49
50
  var theme = (0, _services.useEuiTheme)();
50
51
  var styles = (0, _description_list_description.euiDescriptionListDescriptionStyles)(theme);
@@ -61,6 +62,7 @@ var EuiDescriptionListDescription = function EuiDescriptionListDescription(_ref)
61
62
  conditionalStyles.push(styles.left);
62
63
  }
63
64
 
65
+ conditionalStyles.push(styles[gutterSize]);
64
66
  break;
65
67
  }
66
68
 
@@ -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
 
@@ -44,11 +44,12 @@ var EuiDescriptionListTitle = function EuiDescriptionListTitle(_ref) {
44
44
  type = _useContext.type,
45
45
  textStyle = _useContext.textStyle,
46
46
  compressed = _useContext.compressed,
47
- align = _useContext.align;
47
+ align = _useContext.align,
48
+ gutterSize = _useContext.gutterSize;
48
49
 
49
50
  var theme = (0, _services.useEuiTheme)();
50
51
  var styles = (0, _description_list_title.euiDescriptionListTitleStyles)(theme);
51
- var conditionalStyles = compressed && textStyle === 'reverse' ? [styles.fontStyles.compressed] : [styles.fontStyles[textStyle]];
52
+ var conditionalStyles = compressed && textStyle !== 'reverse' ? [styles.fontStyles.compressed] : [styles.fontStyles[textStyle]];
52
53
 
53
54
  switch (type) {
54
55
  case 'inline':
@@ -64,7 +65,7 @@ var EuiDescriptionListTitle = function EuiDescriptionListTitle(_ref) {
64
65
  break;
65
66
  }
66
67
 
67
- var cssStyles = [styles.euiDescriptionList__title, styles[type]].concat((0, _toConsumableArray2.default)(conditionalStyles));
68
+ var cssStyles = [styles.euiDescriptionList__title, styles[type], styles[gutterSize]].concat((0, _toConsumableArray2.default)(conditionalStyles));
68
69
  var classes = (0, _classnames.default)('euiDescriptionList__title', className);
69
70
  return (0, _react2.jsx)("dt", (0, _extends2.default)({
70
71
  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;
@@ -92,26 +92,16 @@ var EuiFieldSearch = /*#__PURE__*/function (_Component) {
92
92
 
93
93
  if (nativeInputValueSetter) {
94
94
  nativeInputValueSetter.call(_this.inputElement, '');
95
- } // dispatch input event, with IE11 support/fallback
95
+ } // dispatch input event
96
96
 
97
97
 
98
- var event;
99
-
100
- if ('Event' in window && typeof Event === 'function') {
101
- event = new Event('input', {
102
- bubbles: true,
103
- cancelable: false
104
- });
105
- } else {
106
- // IE11
107
- event = document.createEvent('Event');
108
- event.initEvent('input', true, false);
109
- }
98
+ var event = new Event('input', {
99
+ bubbles: true,
100
+ cancelable: false
101
+ });
110
102
 
111
103
  if (_this.inputElement) {
112
- if (event) {
113
- _this.inputElement.dispatchEvent(event);
114
- } // set focus on the search field
104
+ _this.inputElement.dispatchEvent(event); // set focus on the search field
115
105
 
116
106
 
117
107
  _this.inputElement.focus();
@@ -37,7 +37,7 @@ var EuiRangeInput = function EuiRangeInput(_ref) {
37
37
  _ref$autoSize = _ref.autoSize,
38
38
  autoSize = _ref$autoSize === void 0 ? true : _ref$autoSize,
39
39
  rest = (0, _objectWithoutProperties2.default)(_ref, _excluded);
40
- // Chrome will properly size the input based on the max value, but FF & IE do not.
40
+ // Chrome will properly size the input based on the max value, but FF does not.
41
41
  // Calculate the width of the input based on highest number of characters.
42
42
  // Add 2 to accommodate for input stepper
43
43
  var widthStyle = autoSize ? {
@@ -32,10 +32,11 @@ var EuiHeaderSectionItem = function EuiHeaderSectionItem(_ref) {
32
32
  children = _ref.children,
33
33
  className = _ref.className,
34
34
  rest = (0, _objectWithoutProperties2.default)(_ref, _excluded);
35
- var classes = (0, _classnames.default)('euiHeaderSectionItem', borderToClassNameMap[border], className);
36
- return (0, _react2.jsx)("div", (0, _extends2.default)({
35
+ var classes = (0, _classnames.default)('euiHeaderSectionItem', borderToClassNameMap[border], className); // we check if there is any children and if not, we don't render anything
36
+
37
+ return children ? (0, _react2.jsx)("div", (0, _extends2.default)({
37
38
  className: classes
38
- }, rest), children);
39
+ }, rest), children) : null;
39
40
  };
40
41
 
41
42
  exports.EuiHeaderSectionItem = EuiHeaderSectionItem;
@@ -270,7 +270,13 @@ EuiListGroup.propTypes = {
270
270
  * Pass-through ref reference specifically for targeting
271
271
  * instances where the item content is rendered as a `button`
272
272
  */
273
- buttonRef: _propTypes.default.any
273
+ buttonRef: _propTypes.default.any,
274
+
275
+ /**
276
+ * Text to be displayed in the tooltip when `showToolTip` is true.
277
+ * By default the text will be same as the label text.
278
+ */
279
+ toolTipText: _propTypes.default.string
274
280
  }).isRequired),
275
281
 
276
282
  /**
@@ -35,7 +35,7 @@ var _href_validator = require("../../services/security/href_validator");
35
35
 
36
36
  var _react2 = require("@emotion/react");
37
37
 
38
- var _excluded = ["label", "isActive", "isDisabled", "href", "target", "rel", "className", "iconType", "icon", "iconProps", "extraAction", "onClick", "size", "color", "showToolTip", "wrapText", "buttonRef"],
38
+ var _excluded = ["label", "isActive", "isDisabled", "href", "target", "rel", "className", "iconType", "icon", "iconProps", "extraAction", "onClick", "size", "color", "showToolTip", "wrapText", "buttonRef", "toolTipText"],
39
39
  _excluded2 = ["iconType", "alwaysShow", "className", "isDisabled"];
40
40
 
41
41
  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); }
@@ -83,6 +83,7 @@ var EuiListGroupItem = function EuiListGroupItem(_ref) {
83
83
  showToolTip = _ref$showToolTip === void 0 ? false : _ref$showToolTip,
84
84
  wrapText = _ref.wrapText,
85
85
  buttonRef = _ref.buttonRef,
86
+ toolTipText = _ref.toolTipText,
86
87
  rest = (0, _objectWithoutProperties2.default)(_ref, _excluded);
87
88
 
88
89
  var isHrefValid = !href || (0, _href_validator.validateHref)(href);
@@ -184,7 +185,7 @@ var EuiListGroupItem = function EuiListGroupItem(_ref) {
184
185
  className: classes
185
186
  }, (0, _react2.jsx)(_tool_tip.EuiToolTip, {
186
187
  anchorClassName: "euiListGroupItem__tooltip",
187
- content: label,
188
+ content: toolTipText !== null && toolTipText !== void 0 ? toolTipText : label,
188
189
  position: "right",
189
190
  delay: "long"
190
191
  }, itemContent));
@@ -329,5 +330,11 @@ EuiListGroupItem.propTypes = {
329
330
  * Pass-through ref reference specifically for targeting
330
331
  * instances where the item content is rendered as a `button`
331
332
  */
332
- buttonRef: _propTypes.default.any
333
+ buttonRef: _propTypes.default.any,
334
+
335
+ /**
336
+ * Text to be displayed in the tooltip when `showToolTip` is true.
337
+ * By default the text will be same as the label text.
338
+ */
339
+ toolTipText: _propTypes.default.string
333
340
  };
@@ -249,6 +249,12 @@ EuiPinnableListGroup.propTypes = {
249
249
  */
250
250
  buttonRef: _propTypes.default.any,
251
251
 
252
+ /**
253
+ * Text to be displayed in the tooltip when `showToolTip` is true.
254
+ * By default the text will be same as the label text.
255
+ */
256
+ toolTipText: _propTypes.default.string,
257
+
252
258
  /**
253
259
  * Saves the pinned status and changes the visibility of the pin icon
254
260
  */
@@ -359,7 +365,13 @@ EuiPinnableListGroup.propTypes = {
359
365
  * Pass-through ref reference specifically for targeting
360
366
  * instances where the item content is rendered as a `button`
361
367
  */
362
- buttonRef: _propTypes.default.any
368
+ buttonRef: _propTypes.default.any,
369
+
370
+ /**
371
+ * Text to be displayed in the tooltip when `showToolTip` is true.
372
+ * By default the text will be same as the label text.
373
+ */
374
+ toolTipText: _propTypes.default.string
363
375
  }).isRequired)]),
364
376
 
365
377
  /**
@@ -86,9 +86,7 @@ var EuiModal = function EuiModal(_ref) {
86
86
  color: "text",
87
87
  "aria-label": closeModal
88
88
  });
89
- }), (0, _react2.jsx)("div", {
90
- className: "euiModal__flex"
91
- }, children))));
89
+ }), children)));
92
90
  };
93
91
 
94
92
  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
@@ -65,13 +65,17 @@ var EuiPageSidebar = function EuiPageSidebar(_ref) {
65
65
  setInlineStyles = _useState2[1];
66
66
 
67
67
  (0, _react.useEffect)(function () {
68
+ var updatedStyles = _objectSpread(_objectSpread({}, style), (0, _global_styling.logicalStyle)('min-width', isResponding ? '100%' : minWidth));
69
+
68
70
  if (sticky) {
69
71
  var _document$body$datase;
70
72
 
71
73
  var euiHeaderFixedCounter = Number((_document$body$datase = document.body.dataset.fixedHeaders) !== null && _document$body$datase !== void 0 ? _document$body$datase : 0);
72
74
  var offset = (0, _typeof2.default)(sticky) === 'object' ? sticky === null || sticky === void 0 ? void 0 : sticky.offset : themeContext.euiTheme.base * 3 * euiHeaderFixedCounter;
73
- 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)"))));
75
+ updatedStyles = _objectSpread(_objectSpread(_objectSpread({}, updatedStyles), (0, _global_styling.logicalStyle)('top', offset)), (0, _global_styling.logicalStyle)('max-height', "calc(100vh - ".concat(offset, "px)")));
74
76
  }
77
+
78
+ setInlineStyles(updatedStyles);
75
79
  }, [style, sticky, themeContext.euiTheme.base, isResponding, minWidth]);
76
80
  return (0, _react2.jsx)("div", (0, _extends2.default)({
77
81
  className: className,
@@ -216,9 +216,8 @@ EuiTableRowCell.propTypes = {
216
216
  showOnHover: _propTypes.default.bool,
217
217
 
218
218
  /**
219
- * Setting `textOnly` to `false` will break words unnecessarily on FF and
220
- * IE. To combat this problem on FF, wrap contents with the css utility
221
- * `.eui-textBreakWord`.
219
+ * Creates a text wrapper around cell content that helps word break or truncate
220
+ * long text correctly.
222
221
  */
223
222
  textOnly: _propTypes.default.bool,
224
223
 
@@ -239,9 +238,8 @@ EuiTableRowCell.propTypes = {
239
238
  showOnHover: _propTypes.default.bool,
240
239
 
241
240
  /**
242
- * Setting `textOnly` to `false` will break words unnecessarily on FF and
243
- * IE. To combat this problem on FF, wrap contents with the css utility
244
- * `.eui-textBreakWord`.
241
+ * Creates a text wrapper around cell content that helps word break or truncate
242
+ * long text correctly.
245
243
  */
246
244
  textOnly: _propTypes.default.bool,
247
245
 
@@ -135,24 +135,6 @@ var EuiTabbedContent = /*#__PURE__*/function (_Component) {
135
135
  }
136
136
 
137
137
  (0, _createClass2.default)(EuiTabbedContent, [{
138
- key: "componentDidMount",
139
- value: function componentDidMount() {
140
- // IE11 doesn't support the `relatedTarget` event property for blur events
141
- // but does add it for focusout. React doesn't support `onFocusOut` so here we are.
142
- if (this.tabsRef.current) {
143
- // Current short-term solution for event listener (see https://github.com/elastic/eui/pull/2717)
144
- this.tabsRef.current.addEventListener('focusout', this.removeFocus);
145
- }
146
- }
147
- }, {
148
- key: "componentWillUnmount",
149
- value: function componentWillUnmount() {
150
- if (this.tabsRef.current) {
151
- // Current short-term solution for event listener (see https://github.com/elastic/eui/pull/2717)
152
- this.tabsRef.current.removeEventListener('focusout', this.removeFocus);
153
- }
154
- }
155
- }, {
156
138
  key: "render",
157
139
  value: function render() {
158
140
  var _this2 = this;
@@ -180,7 +162,8 @@ var EuiTabbedContent = /*#__PURE__*/function (_Component) {
180
162
  ref: this.tabsRef,
181
163
  expand: expand,
182
164
  size: size,
183
- onFocus: this.initializeFocus
165
+ onFocus: this.initializeFocus,
166
+ onBlur: this.removeFocus
184
167
  }, tabs.map(function (tab) {
185
168
  var id = tab.id,
186
169
  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
  };
@@ -1,15 +0,0 @@
1
- // This file utilizes !importants on purpose
2
- // sass-lint:disable no-important
3
-
4
- /**
5
- * IE doesn't properly wrap groups if it is within a flex-item of a flex-group.
6
- * Adding the following styles to the flex-item that contains the wrapping group, will fix IE.
7
- * https://github.com/philipwalton/flexbugs/issues/104
8
- */
9
- .euiIEFlexWrapFix {
10
- @include internetExplorerOnly {
11
- flex-grow: 1;
12
- flex-shrink: 1;
13
- flex-basis: 0%;
14
- }
15
- }