@elastic/eui 102.0.0 → 102.1.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 (136) hide show
  1. package/es/components/accessibility/skip_link/skip_link.js +7 -0
  2. package/es/components/button/button.js +7 -0
  3. package/es/components/button/button_empty/button_empty.js +7 -0
  4. package/es/components/button/button_group/button_group.js +5 -0
  5. package/es/components/button/button_icon/button_icon.js +7 -0
  6. package/es/components/card/card.js +7 -0
  7. package/es/components/card/card_select/card_select.js +7 -0
  8. package/es/components/collapsible_nav_beta/_kibana_solution/collapsible_nav_kibana_solution.js +7 -0
  9. package/es/components/color_picker/color_picker.js +13 -8
  10. package/es/components/color_picker/hue.js +27 -6
  11. package/es/components/color_picker/hue.styles.js +3 -2
  12. package/es/components/color_picker/saturation.js +16 -11
  13. package/es/components/color_picker/saturation.styles.js +2 -1
  14. package/es/components/datagrid/body/cell/data_grid_cell.js +7 -0
  15. package/es/components/datagrid/body/cell/data_grid_cell_actions.js +2 -2
  16. package/es/components/datagrid/body/cell/data_grid_cell_actions.styles.js +1 -1
  17. package/es/components/datagrid/body/data_grid_body.js +7 -0
  18. package/es/components/datagrid/body/data_grid_body_custom.js +7 -0
  19. package/es/components/datagrid/body/data_grid_body_virtualized.js +7 -0
  20. package/es/components/datagrid/body/header/data_grid_header_cell.js +7 -0
  21. package/es/components/datagrid/controls/column_sorting.js +7 -0
  22. package/es/components/datagrid/controls/data_grid_toolbar_control.js +7 -0
  23. package/es/components/datagrid/utils/in_memory.js +7 -0
  24. package/es/components/date_picker/auto_refresh/auto_refresh.js +7 -0
  25. package/es/components/filter_group/filter_button.js +10 -1
  26. package/es/components/header/header_links/header_link.js +7 -0
  27. package/es/components/header/header_section/header_section_item_button.js +7 -0
  28. package/es/components/list_group/list_group.js +7 -0
  29. package/es/components/list_group/list_group_item.js +7 -0
  30. package/es/components/list_group/list_group_item_extra_action.js +7 -0
  31. package/es/components/list_group/pinnable_list_group/pinnable_list_group.js +7 -0
  32. package/es/components/pagination/pagination_button.js +7 -0
  33. package/es/components/table/table_header_cell.js +30 -12
  34. package/es/components/tool_tip/tool_tip.js +4 -1
  35. package/es/global_styling/mixins/_button.js +13 -3
  36. package/es/global_styling/mixins/_color.js +9 -2
  37. package/es/test/index.d.ts +2 -1
  38. package/eui.d.ts +828 -639
  39. package/lib/components/accessibility/skip_link/skip_link.js +7 -0
  40. package/lib/components/button/button.js +7 -0
  41. package/lib/components/button/button_empty/button_empty.js +7 -0
  42. package/lib/components/button/button_group/button_group.js +5 -0
  43. package/lib/components/button/button_icon/button_icon.js +7 -0
  44. package/lib/components/card/card.js +7 -0
  45. package/lib/components/card/card_select/card_select.js +7 -0
  46. package/lib/components/collapsible_nav_beta/_kibana_solution/collapsible_nav_kibana_solution.js +7 -0
  47. package/lib/components/color_picker/color_picker.js +13 -8
  48. package/lib/components/color_picker/hue.js +26 -5
  49. package/lib/components/color_picker/hue.styles.js +3 -2
  50. package/lib/components/color_picker/saturation.js +16 -11
  51. package/lib/components/color_picker/saturation.styles.js +2 -1
  52. package/lib/components/datagrid/body/cell/data_grid_cell.js +7 -0
  53. package/lib/components/datagrid/body/cell/data_grid_cell_actions.js +2 -2
  54. package/lib/components/datagrid/body/cell/data_grid_cell_actions.styles.js +1 -1
  55. package/lib/components/datagrid/body/data_grid_body.js +7 -0
  56. package/lib/components/datagrid/body/data_grid_body_custom.js +7 -0
  57. package/lib/components/datagrid/body/data_grid_body_virtualized.js +7 -0
  58. package/lib/components/datagrid/body/header/data_grid_header_cell.js +7 -0
  59. package/lib/components/datagrid/controls/column_sorting.js +7 -0
  60. package/lib/components/datagrid/controls/data_grid_toolbar_control.js +7 -0
  61. package/lib/components/datagrid/utils/in_memory.js +7 -0
  62. package/lib/components/date_picker/auto_refresh/auto_refresh.js +7 -0
  63. package/lib/components/filter_group/filter_button.js +10 -1
  64. package/lib/components/header/header_links/header_link.js +7 -0
  65. package/lib/components/header/header_section/header_section_item_button.js +7 -0
  66. package/lib/components/list_group/list_group.js +7 -0
  67. package/lib/components/list_group/list_group_item.js +7 -0
  68. package/lib/components/list_group/list_group_item_extra_action.js +7 -0
  69. package/lib/components/list_group/pinnable_list_group/pinnable_list_group.js +7 -0
  70. package/lib/components/pagination/pagination_button.js +7 -0
  71. package/lib/components/table/table_header_cell.js +28 -10
  72. package/lib/components/tool_tip/tool_tip.js +4 -1
  73. package/lib/global_styling/mixins/_button.js +13 -4
  74. package/lib/global_styling/mixins/_color.js +11 -4
  75. package/lib/test/index.d.ts +2 -1
  76. package/optimize/es/components/color_picker/color_picker.js +13 -8
  77. package/optimize/es/components/color_picker/hue.js +22 -6
  78. package/optimize/es/components/color_picker/hue.styles.js +3 -2
  79. package/optimize/es/components/color_picker/saturation.js +16 -11
  80. package/optimize/es/components/color_picker/saturation.styles.js +2 -1
  81. package/optimize/es/components/datagrid/body/cell/data_grid_cell_actions.js +2 -2
  82. package/optimize/es/components/datagrid/body/cell/data_grid_cell_actions.styles.js +1 -1
  83. package/optimize/es/components/table/table_header_cell.js +26 -11
  84. package/optimize/es/components/tool_tip/tool_tip.js +4 -1
  85. package/optimize/es/global_styling/mixins/_button.js +8 -3
  86. package/optimize/es/global_styling/mixins/_color.js +4 -2
  87. package/optimize/es/test/index.d.ts +2 -1
  88. package/optimize/lib/components/color_picker/color_picker.js +13 -8
  89. package/optimize/lib/components/color_picker/hue.js +21 -5
  90. package/optimize/lib/components/color_picker/hue.styles.js +3 -2
  91. package/optimize/lib/components/color_picker/saturation.js +16 -11
  92. package/optimize/lib/components/color_picker/saturation.styles.js +2 -1
  93. package/optimize/lib/components/datagrid/body/cell/data_grid_cell_actions.js +2 -2
  94. package/optimize/lib/components/datagrid/body/cell/data_grid_cell_actions.styles.js +1 -1
  95. package/optimize/lib/components/table/table_header_cell.js +25 -11
  96. package/optimize/lib/components/tool_tip/tool_tip.js +4 -1
  97. package/optimize/lib/global_styling/mixins/_button.js +8 -4
  98. package/optimize/lib/global_styling/mixins/_color.js +4 -2
  99. package/optimize/lib/test/index.d.ts +2 -1
  100. package/package.json +2 -2
  101. package/test-env/components/accessibility/skip_link/skip_link.js +7 -0
  102. package/test-env/components/button/button.js +7 -0
  103. package/test-env/components/button/button_empty/button_empty.js +7 -0
  104. package/test-env/components/button/button_group/button_group.js +5 -0
  105. package/test-env/components/button/button_icon/button_icon.js +7 -0
  106. package/test-env/components/card/card.js +7 -0
  107. package/test-env/components/card/card_select/card_select.js +7 -0
  108. package/test-env/components/collapsible_nav_beta/_kibana_solution/collapsible_nav_kibana_solution.js +7 -0
  109. package/test-env/components/color_picker/color_picker.js +13 -8
  110. package/test-env/components/color_picker/hue.js +21 -5
  111. package/test-env/components/color_picker/hue.styles.js +3 -2
  112. package/test-env/components/color_picker/saturation.js +16 -11
  113. package/test-env/components/color_picker/saturation.styles.js +2 -1
  114. package/test-env/components/datagrid/body/cell/data_grid_cell.js +7 -0
  115. package/test-env/components/datagrid/body/cell/data_grid_cell_actions.js +2 -2
  116. package/test-env/components/datagrid/body/cell/data_grid_cell_actions.styles.js +1 -1
  117. package/test-env/components/datagrid/body/data_grid_body.js +7 -0
  118. package/test-env/components/datagrid/body/data_grid_body_custom.js +7 -0
  119. package/test-env/components/datagrid/body/data_grid_body_virtualized.js +7 -0
  120. package/test-env/components/datagrid/body/header/data_grid_header_cell.js +7 -0
  121. package/test-env/components/datagrid/controls/column_sorting.js +7 -0
  122. package/test-env/components/datagrid/controls/data_grid_toolbar_control.js +7 -0
  123. package/test-env/components/datagrid/utils/in_memory.js +7 -0
  124. package/test-env/components/date_picker/auto_refresh/auto_refresh.js +7 -0
  125. package/test-env/components/filter_group/filter_button.js +10 -1
  126. package/test-env/components/header/header_links/header_link.js +7 -0
  127. package/test-env/components/header/header_section/header_section_item_button.js +7 -0
  128. package/test-env/components/list_group/list_group.js +7 -0
  129. package/test-env/components/list_group/list_group_item.js +7 -0
  130. package/test-env/components/list_group/list_group_item_extra_action.js +7 -0
  131. package/test-env/components/list_group/pinnable_list_group/pinnable_list_group.js +7 -0
  132. package/test-env/components/pagination/pagination_button.js +7 -0
  133. package/test-env/components/table/table_header_cell.js +26 -12
  134. package/test-env/components/tool_tip/tool_tip.js +4 -1
  135. package/test-env/global_styling/mixins/_button.js +8 -4
  136. package/test-env/global_styling/mixins/_color.js +4 -2
@@ -180,7 +180,10 @@ var EuiToolTip = exports.EuiToolTip = /*#__PURE__*/function (_Component) {
180
180
  });
181
181
  (0, _defineProperty2.default)(_this, "onEscapeKey", function (event) {
182
182
  if (event.key === _services.keys.ESCAPE) {
183
- if (_this.state.visible) event.stopPropagation();
183
+ // when the tooltip is only visual, we don't want it to add an additional key stop
184
+ if (!_this.props.disableScreenReaderOutput) {
185
+ if (_this.state.visible) event.stopPropagation();
186
+ }
184
187
  _this.setState({
185
188
  hasFocus: false
186
189
  }); // Allows mousing over back into the tooltip to work correctly
@@ -4,8 +4,9 @@ var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefau
4
4
  Object.defineProperty(exports, "__esModule", {
5
5
  value: true
6
6
  });
7
- exports.useEuiButtonFocusCSS = exports.useEuiButtonColorCSS = exports.euiButtonSizeMap = exports.euiButtonFillColor = exports.euiButtonEmptyColor = exports.euiButtonColor = exports.BUTTON_DISPLAYS = exports.BUTTON_COLORS = void 0;
7
+ exports.useEuiButtonFocusCSS = exports.useEuiButtonColorCSS = exports.euiButtonSizeMap = exports.euiButtonFillColor = exports.euiButtonEmptyColor = exports.euiButtonColor = exports.SEVERITY_COLORS = exports.EXTENDED_BUTTON_COLORS = exports.BUTTON_DISPLAYS = exports.BUTTON_COLORS = void 0;
8
8
  var _taggedTemplateLiteral2 = _interopRequireDefault(require("@babel/runtime/helpers/taggedTemplateLiteral"));
9
+ var _toConsumableArray2 = _interopRequireDefault(require("@babel/runtime/helpers/toConsumableArray"));
9
10
  var _defineProperty2 = _interopRequireDefault(require("@babel/runtime/helpers/defineProperty"));
10
11
  var _react = require("@emotion/react");
11
12
  var _euiThemeCommon = require("@elastic/eui-theme-common");
@@ -19,7 +20,10 @@ function _objectSpread(e) { for (var r = 1; r < arguments.length; r++) { var t =
19
20
  * in compliance with, at your election, the Elastic License 2.0 or the Server
20
21
  * Side Public License, v 1.
21
22
  */
22
- var BUTTON_COLORS = exports.BUTTON_COLORS = ['text', 'accent', 'accentSecondary', 'primary', 'neutral', 'success', 'warning', 'risk', 'danger'];
23
+ /** Tentative usage; these exist only to be used as button directly when used within other components */
24
+ var SEVERITY_COLORS = exports.SEVERITY_COLORS = ['neutral', 'risk'];
25
+ var BUTTON_COLORS = exports.BUTTON_COLORS = ['text', 'accent', 'accentSecondary', 'primary', 'success', 'warning', 'danger'];
26
+ var EXTENDED_BUTTON_COLORS = exports.EXTENDED_BUTTON_COLORS = [].concat(BUTTON_COLORS, SEVERITY_COLORS);
23
27
  var BUTTON_DISPLAYS = exports.BUTTON_DISPLAYS = ['base', 'fill', 'empty'];
24
28
  /**
25
29
  * Creates the `base` version of button styles with proper text contrast.
@@ -91,7 +95,7 @@ var euiButtonEmptyColor = exports.euiButtonEmptyColor = function euiButtonEmptyC
91
95
  /**
92
96
  * Given the button display type, returns the Emotion based color keys.
93
97
  * @param options Button display type
94
- * @returns An object of `_EuiButtonColor` keys including `disabled`
98
+ * @returns An object of `_EuiExtendedButtonColor` keys including `disabled`
95
99
  */
96
100
  var useEuiButtonColorCSS = exports.useEuiButtonColorCSS = function useEuiButtonColorCSS() {
97
101
  var options = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {};
@@ -101,7 +105,7 @@ var useEuiButtonColorCSS = exports.useEuiButtonColorCSS = function useEuiButtonC
101
105
  return colorsDisplaysMap[display];
102
106
  };
103
107
  var euiButtonDisplaysColors = function euiButtonDisplaysColors(euiThemeContext) {
104
- var COLORS = [].concat(BUTTON_COLORS, ['disabled']);
108
+ var COLORS = [].concat((0, _toConsumableArray2.default)(EXTENDED_BUTTON_COLORS), ['disabled']);
105
109
  var displaysColorsMap = {};
106
110
  BUTTON_DISPLAYS.forEach(function (display) {
107
111
  displaysColorsMap[display] = {};
@@ -6,9 +6,11 @@ Object.defineProperty(exports, "__esModule", {
6
6
  });
7
7
  exports.useEuiBorderColorCSS = exports.useEuiBackgroundColorCSS = exports.useEuiBackgroundColor = exports.euiBorderColor = exports.euiBackgroundColor = exports.BACKGROUND_COLORS = void 0;
8
8
  var _defineProperty2 = _interopRequireDefault(require("@babel/runtime/helpers/defineProperty"));
9
+ var _toConsumableArray2 = _interopRequireDefault(require("@babel/runtime/helpers/toConsumableArray"));
9
10
  var _react = require("@emotion/react");
10
- var _services = require("../../services");
11
11
  var _euiThemeCommon = require("@elastic/eui-theme-common");
12
+ var _services = require("../../services");
13
+ var _button = require("./_button");
12
14
  function ownKeys(e, r) { var t = Object.keys(e); if (Object.getOwnPropertySymbols) { var o = Object.getOwnPropertySymbols(e); r && (o = o.filter(function (r) { return Object.getOwnPropertyDescriptor(e, r).enumerable; })), t.push.apply(t, o); } return t; }
13
15
  function _objectSpread(e) { for (var r = 1; r < arguments.length; r++) { var t = null != arguments[r] ? arguments[r] : {}; r % 2 ? ownKeys(Object(t), !0).forEach(function (r) { (0, _defineProperty2.default)(e, r, t[r]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e, Object.getOwnPropertyDescriptors(t)) : ownKeys(Object(t)).forEach(function (r) { Object.defineProperty(e, r, Object.getOwnPropertyDescriptor(t, r)); }); } return e; } /*
14
16
  * Copyright Elasticsearch B.V. and/or licensed to Elasticsearch B.V. under one
@@ -17,7 +19,7 @@ function _objectSpread(e) { for (var r = 1; r < arguments.length; r++) { var t =
17
19
  * in compliance with, at your election, the Elastic License 2.0 or the Server
18
20
  * Side Public License, v 1.
19
21
  */
20
- var BACKGROUND_COLORS = exports.BACKGROUND_COLORS = ['transparent', 'plain', 'subdued', 'highlighted', 'accent', 'accentSecondary', 'primary', 'neutral', 'success', 'warning', 'risk', 'danger'];
22
+ var BACKGROUND_COLORS = exports.BACKGROUND_COLORS = ['transparent', 'plain', 'subdued', 'highlighted', 'accent', 'accentSecondary', 'primary', 'success', 'warning', 'danger'].concat((0, _toConsumableArray2.default)(_button.SEVERITY_COLORS));
21
23
  /**
22
24
  * @deprecated - use background tokens directly
23
25
  * @returns A single background color with optional alpha transparency