@elastic/eui 116.3.0 → 116.3.1-snapshot.1782218964187

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 (218) hide show
  1. package/es/components/avatar/avatar.js +4 -0
  2. package/es/components/avatar/avatar.styles.js +16 -16
  3. package/es/components/banner/banner.js +1 -2
  4. package/es/components/banner/banner.styles.js +1 -1
  5. package/es/components/basic_table/basic_table.js +35 -5
  6. package/es/components/basic_table/basic_table.styles.js +19 -1
  7. package/es/components/basic_table/in_memory_table.js +17 -0
  8. package/es/components/basic_table/index.js +2 -1
  9. package/es/components/basic_table/pagination_bar.js +19 -4
  10. package/es/components/basic_table/pagination_bar.styles.js +21 -0
  11. package/es/components/basic_table/panel.styles.js +14 -0
  12. package/es/components/basic_table/use_panel_props.js +28 -0
  13. package/es/components/date_picker/auto_refresh/refresh_interval.js +176 -229
  14. package/es/components/flyout/flyout.component.js +10 -6
  15. package/es/components/flyout/flyout_menu.js +122 -19
  16. package/es/components/flyout/flyout_menu.styles.js +2 -1
  17. package/es/components/flyout/manager/actions.js +20 -0
  18. package/es/components/flyout/manager/flyout_child.js +23 -1
  19. package/es/components/flyout/manager/flyout_managed.js +65 -19
  20. package/es/components/flyout/manager/hooks.js +1 -1
  21. package/es/components/flyout/manager/index.js +2 -2
  22. package/es/components/flyout/manager/reducer.js +32 -8
  23. package/es/components/flyout/manager/selectors.js +8 -2
  24. package/es/components/flyout/manager/store.js +35 -2
  25. package/es/components/flyout/use_flyout_menu.js +2 -2
  26. package/es/components/form/form_control_layout/form_control_layout_icons.js +95 -143
  27. package/es/components/notification_icon/assets/info_fill.js +34 -0
  28. package/es/components/notification_icon/assets/warning_static.js +40 -0
  29. package/es/components/notification_icon/notification_icon.js +87 -0
  30. package/es/components/notification_icon/notification_icon.styles.js +22 -0
  31. package/es/components/table/mobile/table_sort_mobile.js +64 -103
  32. package/es/components/table/store/use_unique_column_id.js +25 -0
  33. package/es/components/table/table_header_cell.js +7 -8
  34. package/es/components/table/table_header_cell_checkbox.js +5 -6
  35. package/es/components/toast/global_toast_list.js +132 -6
  36. package/es/components/toast/global_toast_list.styles.js +31 -7
  37. package/es/components/toast/toast.js +242 -47
  38. package/es/components/toast/toast.styles.js +35 -47
  39. package/es/components/toast/toast_action.js +34 -0
  40. package/es/components/toast/types.js +9 -0
  41. package/es/components/tool_tip/tool_tip.js +61 -30
  42. package/es/components/tool_tip/tool_tip_anchor.js +5 -5
  43. package/es/components/tool_tip/tool_tip_manager.js +27 -2
  44. package/eui.d.ts +811 -552
  45. package/i18ntokens.json +981 -927
  46. package/lib/components/avatar/avatar.js +4 -0
  47. package/lib/components/avatar/avatar.styles.js +16 -16
  48. package/lib/components/banner/banner.js +1 -2
  49. package/lib/components/banner/banner.styles.js +1 -1
  50. package/lib/components/basic_table/basic_table.js +34 -4
  51. package/lib/components/basic_table/basic_table.styles.js +19 -1
  52. package/lib/components/basic_table/in_memory_table.js +17 -0
  53. package/lib/components/basic_table/index.js +8 -1
  54. package/lib/components/basic_table/pagination_bar.js +19 -4
  55. package/lib/components/basic_table/pagination_bar.styles.js +26 -0
  56. package/lib/components/basic_table/panel.styles.js +20 -0
  57. package/lib/components/basic_table/use_panel_props.js +33 -0
  58. package/lib/components/date_picker/auto_refresh/refresh_interval.js +175 -229
  59. package/lib/components/flyout/flyout.component.js +10 -6
  60. package/lib/components/flyout/flyout_menu.js +120 -19
  61. package/lib/components/flyout/flyout_menu.styles.js +2 -1
  62. package/lib/components/flyout/manager/actions.js +21 -1
  63. package/lib/components/flyout/manager/flyout_child.js +23 -1
  64. package/lib/components/flyout/manager/flyout_managed.js +41 -17
  65. package/lib/components/flyout/manager/hooks.js +6 -0
  66. package/lib/components/flyout/manager/index.js +12 -0
  67. package/lib/components/flyout/manager/reducer.js +31 -7
  68. package/lib/components/flyout/manager/selectors.js +9 -3
  69. package/lib/components/flyout/manager/store.js +34 -1
  70. package/lib/components/flyout/use_flyout_menu.js +2 -2
  71. package/lib/components/form/form_control_layout/form_control_layout_icons.js +95 -145
  72. package/lib/components/notification_icon/assets/info_fill.js +41 -0
  73. package/lib/components/notification_icon/assets/warning_static.js +47 -0
  74. package/lib/components/notification_icon/notification_icon.js +93 -0
  75. package/lib/components/notification_icon/notification_icon.styles.js +28 -0
  76. package/lib/components/notification_icon/svgs/info_fill.svg +3 -0
  77. package/lib/components/notification_icon/svgs/warning_static.svg +5 -0
  78. package/lib/components/table/mobile/table_sort_mobile.js +71 -108
  79. package/lib/components/table/store/use_unique_column_id.js +34 -0
  80. package/lib/components/table/table_header_cell.js +7 -8
  81. package/lib/components/table/table_header_cell_checkbox.js +5 -6
  82. package/lib/components/toast/global_toast_list.js +132 -6
  83. package/lib/components/toast/global_toast_list.styles.js +31 -8
  84. package/lib/components/toast/toast.js +244 -47
  85. package/lib/components/toast/toast.styles.js +32 -45
  86. package/lib/components/toast/toast_action.js +40 -0
  87. package/lib/components/toast/types.js +15 -0
  88. package/lib/components/tool_tip/tool_tip.js +59 -29
  89. package/lib/components/tool_tip/tool_tip_anchor.js +5 -5
  90. package/lib/components/tool_tip/tool_tip_manager.js +27 -2
  91. package/optimize/es/components/avatar/avatar.js +4 -0
  92. package/optimize/es/components/avatar/avatar.styles.js +16 -16
  93. package/optimize/es/components/banner/banner.js +1 -2
  94. package/optimize/es/components/banner/banner.styles.js +1 -1
  95. package/optimize/es/components/basic_table/basic_table.js +18 -5
  96. package/optimize/es/components/basic_table/basic_table.styles.js +19 -1
  97. package/optimize/es/components/basic_table/index.js +2 -1
  98. package/optimize/es/components/basic_table/pagination_bar.js +19 -4
  99. package/optimize/es/components/basic_table/pagination_bar.styles.js +21 -0
  100. package/optimize/es/components/basic_table/panel.styles.js +14 -0
  101. package/optimize/es/components/basic_table/use_panel_props.js +28 -0
  102. package/optimize/es/components/date_picker/auto_refresh/refresh_interval.js +172 -196
  103. package/optimize/es/components/flyout/flyout.component.js +10 -6
  104. package/optimize/es/components/flyout/flyout_menu.js +99 -18
  105. package/optimize/es/components/flyout/flyout_menu.styles.js +2 -1
  106. package/optimize/es/components/flyout/manager/actions.js +20 -0
  107. package/optimize/es/components/flyout/manager/flyout_managed.js +42 -18
  108. package/optimize/es/components/flyout/manager/hooks.js +1 -1
  109. package/optimize/es/components/flyout/manager/index.js +2 -2
  110. package/optimize/es/components/flyout/manager/reducer.js +32 -8
  111. package/optimize/es/components/flyout/manager/selectors.js +8 -2
  112. package/optimize/es/components/flyout/manager/store.js +35 -2
  113. package/optimize/es/components/flyout/use_flyout_menu.js +2 -2
  114. package/optimize/es/components/form/form_control_layout/form_control_layout_icons.js +96 -115
  115. package/optimize/es/components/notification_icon/assets/info_fill.js +33 -0
  116. package/optimize/es/components/notification_icon/assets/warning_static.js +39 -0
  117. package/optimize/es/components/notification_icon/notification_icon.js +77 -0
  118. package/optimize/es/components/notification_icon/notification_icon.styles.js +22 -0
  119. package/optimize/es/components/table/mobile/table_sort_mobile.js +59 -82
  120. package/optimize/es/components/table/store/use_unique_column_id.js +25 -0
  121. package/optimize/es/components/table/table_header_cell.js +7 -8
  122. package/optimize/es/components/table/table_header_cell_checkbox.js +5 -6
  123. package/optimize/es/components/toast/global_toast_list.js +31 -6
  124. package/optimize/es/components/toast/global_toast_list.styles.js +31 -7
  125. package/optimize/es/components/toast/toast.js +143 -47
  126. package/optimize/es/components/toast/toast.styles.js +35 -47
  127. package/optimize/es/components/toast/toast_action.js +33 -0
  128. package/optimize/es/components/toast/types.js +9 -0
  129. package/optimize/es/components/tool_tip/tool_tip.js +58 -30
  130. package/optimize/es/components/tool_tip/tool_tip_anchor.js +5 -5
  131. package/optimize/es/components/tool_tip/tool_tip_manager.js +27 -2
  132. package/optimize/lib/components/avatar/avatar.js +4 -0
  133. package/optimize/lib/components/avatar/avatar.styles.js +16 -16
  134. package/optimize/lib/components/banner/banner.js +1 -2
  135. package/optimize/lib/components/banner/banner.styles.js +1 -1
  136. package/optimize/lib/components/basic_table/basic_table.js +17 -4
  137. package/optimize/lib/components/basic_table/basic_table.styles.js +19 -1
  138. package/optimize/lib/components/basic_table/index.js +8 -1
  139. package/optimize/lib/components/basic_table/pagination_bar.js +19 -4
  140. package/optimize/lib/components/basic_table/pagination_bar.styles.js +26 -0
  141. package/optimize/lib/components/basic_table/panel.styles.js +20 -0
  142. package/optimize/lib/components/basic_table/use_panel_props.js +33 -0
  143. package/optimize/lib/components/date_picker/auto_refresh/refresh_interval.js +170 -194
  144. package/optimize/lib/components/flyout/flyout.component.js +10 -6
  145. package/optimize/lib/components/flyout/flyout_menu.js +98 -18
  146. package/optimize/lib/components/flyout/flyout_menu.styles.js +2 -1
  147. package/optimize/lib/components/flyout/manager/actions.js +21 -1
  148. package/optimize/lib/components/flyout/manager/flyout_managed.js +41 -17
  149. package/optimize/lib/components/flyout/manager/hooks.js +6 -0
  150. package/optimize/lib/components/flyout/manager/index.js +12 -0
  151. package/optimize/lib/components/flyout/manager/reducer.js +31 -7
  152. package/optimize/lib/components/flyout/manager/selectors.js +9 -3
  153. package/optimize/lib/components/flyout/manager/store.js +34 -1
  154. package/optimize/lib/components/flyout/use_flyout_menu.js +2 -2
  155. package/optimize/lib/components/form/form_control_layout/form_control_layout_icons.js +96 -117
  156. package/optimize/lib/components/notification_icon/assets/info_fill.js +41 -0
  157. package/optimize/lib/components/notification_icon/assets/warning_static.js +47 -0
  158. package/optimize/lib/components/notification_icon/notification_icon.js +83 -0
  159. package/optimize/lib/components/notification_icon/notification_icon.styles.js +28 -0
  160. package/optimize/lib/components/notification_icon/svgs/info_fill.svg +3 -0
  161. package/optimize/lib/components/notification_icon/svgs/warning_static.svg +5 -0
  162. package/optimize/lib/components/table/mobile/table_sort_mobile.js +61 -83
  163. package/optimize/lib/components/table/store/use_unique_column_id.js +34 -0
  164. package/optimize/lib/components/table/table_header_cell.js +7 -8
  165. package/optimize/lib/components/table/table_header_cell_checkbox.js +5 -6
  166. package/optimize/lib/components/toast/global_toast_list.js +31 -6
  167. package/optimize/lib/components/toast/global_toast_list.styles.js +30 -7
  168. package/optimize/lib/components/toast/toast.js +146 -47
  169. package/optimize/lib/components/toast/toast.styles.js +33 -45
  170. package/optimize/lib/components/toast/toast_action.js +39 -0
  171. package/optimize/lib/components/toast/types.js +15 -0
  172. package/optimize/lib/components/tool_tip/tool_tip.js +57 -29
  173. package/optimize/lib/components/tool_tip/tool_tip_anchor.js +5 -5
  174. package/optimize/lib/components/tool_tip/tool_tip_manager.js +27 -2
  175. package/package.json +9 -6
  176. package/test-env/components/avatar/avatar.js +4 -0
  177. package/test-env/components/avatar/avatar.styles.js +16 -16
  178. package/test-env/components/banner/banner.js +1 -2
  179. package/test-env/components/banner/banner.styles.js +1 -1
  180. package/test-env/components/basic_table/basic_table.js +34 -4
  181. package/test-env/components/basic_table/basic_table.styles.js +19 -1
  182. package/test-env/components/basic_table/in_memory_table.js +17 -0
  183. package/test-env/components/basic_table/index.js +8 -1
  184. package/test-env/components/basic_table/pagination_bar.js +19 -4
  185. package/test-env/components/basic_table/pagination_bar.styles.js +26 -0
  186. package/test-env/components/basic_table/panel.styles.js +20 -0
  187. package/test-env/components/basic_table/use_panel_props.js +33 -0
  188. package/test-env/components/date_picker/auto_refresh/refresh_interval.js +170 -220
  189. package/test-env/components/flyout/flyout.component.js +10 -6
  190. package/test-env/components/flyout/flyout_menu.js +121 -19
  191. package/test-env/components/flyout/flyout_menu.styles.js +2 -1
  192. package/test-env/components/flyout/manager/actions.js +21 -1
  193. package/test-env/components/flyout/manager/flyout_child.js +23 -1
  194. package/test-env/components/flyout/manager/flyout_managed.js +41 -17
  195. package/test-env/components/flyout/manager/hooks.js +6 -0
  196. package/test-env/components/flyout/manager/index.js +12 -0
  197. package/test-env/components/flyout/manager/reducer.js +31 -7
  198. package/test-env/components/flyout/manager/selectors.js +9 -3
  199. package/test-env/components/flyout/manager/store.js +34 -1
  200. package/test-env/components/flyout/use_flyout_menu.js +2 -2
  201. package/test-env/components/form/form_control_layout/form_control_layout_icons.js +95 -139
  202. package/test-env/components/notification_icon/assets/info_fill.js +41 -0
  203. package/test-env/components/notification_icon/assets/warning_static.js +47 -0
  204. package/test-env/components/notification_icon/notification_icon.js +46 -0
  205. package/test-env/components/notification_icon/notification_icon.styles.js +28 -0
  206. package/test-env/components/table/mobile/table_sort_mobile.js +61 -98
  207. package/test-env/components/table/store/use_unique_column_id.js +34 -0
  208. package/test-env/components/table/table_header_cell.js +7 -8
  209. package/test-env/components/table/table_header_cell_checkbox.js +5 -6
  210. package/test-env/components/toast/global_toast_list.js +132 -6
  211. package/test-env/components/toast/global_toast_list.styles.js +30 -7
  212. package/test-env/components/toast/toast.js +242 -47
  213. package/test-env/components/toast/toast.styles.js +33 -45
  214. package/test-env/components/toast/toast_action.js +39 -0
  215. package/test-env/components/toast/types.js +15 -0
  216. package/test-env/components/tool_tip/tool_tip.js +57 -29
  217. package/test-env/components/tool_tip/tool_tip_anchor.js +5 -5
  218. package/test-env/components/tool_tip/tool_tip_manager.js +27 -2
@@ -1,21 +1,13 @@
1
1
  var _excluded = ["className", "anchorPosition", "items"];
2
- function _typeof(o) { "@babel/helpers - typeof"; return _typeof = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function (o) { return typeof o; } : function (o) { return o && "function" == typeof Symbol && o.constructor === Symbol && o !== Symbol.prototype ? "symbol" : typeof o; }, _typeof(o); }
3
2
  function _extends() { return _extends = Object.assign ? Object.assign.bind() : function (n) { for (var e = 1; e < arguments.length; e++) { var t = arguments[e]; for (var r in t) ({}).hasOwnProperty.call(t, r) && (n[r] = t[r]); } return n; }, _extends.apply(null, arguments); }
3
+ function _slicedToArray(r, e) { return _arrayWithHoles(r) || _iterableToArrayLimit(r, e) || _unsupportedIterableToArray(r, e) || _nonIterableRest(); }
4
+ function _nonIterableRest() { throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method."); }
5
+ function _unsupportedIterableToArray(r, a) { if (r) { if ("string" == typeof r) return _arrayLikeToArray(r, a); var t = {}.toString.call(r).slice(8, -1); return "Object" === t && r.constructor && (t = r.constructor.name), "Map" === t || "Set" === t ? Array.from(r) : "Arguments" === t || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(t) ? _arrayLikeToArray(r, a) : void 0; } }
6
+ function _arrayLikeToArray(r, a) { (null == a || a > r.length) && (a = r.length); for (var e = 0, n = Array(a); e < a; e++) n[e] = r[e]; return n; }
7
+ function _iterableToArrayLimit(r, l) { var t = null == r ? null : "undefined" != typeof Symbol && r[Symbol.iterator] || r["@@iterator"]; if (null != t) { var e, n, i, u, a = [], f = !0, o = !1; try { if (i = (t = t.call(r)).next, 0 === l) { if (Object(t) !== t) return; f = !1; } else for (; !(f = (e = i.call(t)).done) && (a.push(e.value), a.length !== l); f = !0); } catch (r) { o = !0, n = r; } finally { try { if (!f && null != t.return && (u = t.return(), Object(u) !== u)) return; } finally { if (o) throw n; } } return a; } }
8
+ function _arrayWithHoles(r) { if (Array.isArray(r)) return r; }
4
9
  function _objectWithoutProperties(e, t) { if (null == e) return {}; var o, r, i = _objectWithoutPropertiesLoose(e, t); if (Object.getOwnPropertySymbols) { var n = Object.getOwnPropertySymbols(e); for (r = 0; r < n.length; r++) o = n[r], t.indexOf(o) >= 0 || {}.propertyIsEnumerable.call(e, o) && (i[o] = e[o]); } return i; }
5
10
  function _objectWithoutPropertiesLoose(r, e) { if (null == r) return {}; var t = {}; for (var n in r) if ({}.hasOwnProperty.call(r, n)) { if (e.indexOf(n) >= 0) continue; t[n] = r[n]; } return t; }
6
- function _classCallCheck(a, n) { if (!(a instanceof n)) throw new TypeError("Cannot call a class as a function"); }
7
- function _defineProperties(e, r) { for (var t = 0; t < r.length; t++) { var o = r[t]; o.enumerable = o.enumerable || !1, o.configurable = !0, "value" in o && (o.writable = !0), Object.defineProperty(e, _toPropertyKey(o.key), o); } }
8
- function _createClass(e, r, t) { return r && _defineProperties(e.prototype, r), t && _defineProperties(e, t), Object.defineProperty(e, "prototype", { writable: !1 }), e; }
9
- function _callSuper(t, o, e) { return o = _getPrototypeOf(o), _possibleConstructorReturn(t, _isNativeReflectConstruct() ? Reflect.construct(o, e || [], _getPrototypeOf(t).constructor) : o.apply(t, e)); }
10
- function _possibleConstructorReturn(t, e) { if (e && ("object" == _typeof(e) || "function" == typeof e)) return e; if (void 0 !== e) throw new TypeError("Derived constructors may only return object or undefined"); return _assertThisInitialized(t); }
11
- function _assertThisInitialized(e) { if (void 0 === e) throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); return e; }
12
- function _isNativeReflectConstruct() { try { var t = !Boolean.prototype.valueOf.call(Reflect.construct(Boolean, [], function () {})); } catch (t) {} return (_isNativeReflectConstruct = function _isNativeReflectConstruct() { return !!t; })(); }
13
- function _getPrototypeOf(t) { return _getPrototypeOf = Object.setPrototypeOf ? Object.getPrototypeOf.bind() : function (t) { return t.__proto__ || Object.getPrototypeOf(t); }, _getPrototypeOf(t); }
14
- function _inherits(t, e) { if ("function" != typeof e && null !== e) throw new TypeError("Super expression must either be null or a function"); t.prototype = Object.create(e && e.prototype, { constructor: { value: t, writable: !0, configurable: !0 } }), Object.defineProperty(t, "prototype", { writable: !1 }), e && _setPrototypeOf(t, e); }
15
- function _setPrototypeOf(t, e) { return _setPrototypeOf = Object.setPrototypeOf ? Object.setPrototypeOf.bind() : function (t, e) { return t.__proto__ = e, t; }, _setPrototypeOf(t, e); }
16
- function _defineProperty(e, r, t) { return (r = _toPropertyKey(r)) in e ? Object.defineProperty(e, r, { value: t, enumerable: !0, configurable: !0, writable: !0 }) : e[r] = t, e; }
17
- function _toPropertyKey(t) { var i = _toPrimitive(t, "string"); return "symbol" == _typeof(i) ? i : i + ""; }
18
- function _toPrimitive(t, r) { if ("object" != _typeof(t) || !t) return t; var e = t[Symbol.toPrimitive]; if (void 0 !== e) { var i = e.call(t, r || "default"); if ("object" != _typeof(i)) return i; throw new TypeError("@@toPrimitive must return a primitive value."); } return ("string" === r ? String : Number)(t); }
19
11
  /*
20
12
  * Copyright Elasticsearch B.V. and/or licensed to Elasticsearch B.V. under one
21
13
  * or more contributor license agreements. Licensed under the Elastic License
@@ -24,8 +16,7 @@ function _toPrimitive(t, r) { if ("object" != _typeof(t) || !t) return t; var e
24
16
  * Side Public License, v 1.
25
17
  */
26
18
 
27
- import React, { Component } from 'react';
28
- import PropTypes from "prop-types";
19
+ import React, { useState } from 'react';
29
20
  import classNames from 'classnames';
30
21
  import { EuiButtonEmpty } from '../../button/button_empty';
31
22
  import { EuiPopover } from '../../popover';
@@ -33,91 +24,61 @@ import { EuiContextMenuPanel } from '../../context_menu';
33
24
  import { EuiI18n } from '../../i18n';
34
25
  import { EuiTableSortMobileItem } from './table_sort_mobile_item';
35
26
  import { jsx as ___EmotionJSX } from "@emotion/react";
36
- export var EuiTableSortMobile = /*#__PURE__*/function (_Component) {
37
- function EuiTableSortMobile() {
38
- var _this;
39
- _classCallCheck(this, EuiTableSortMobile);
40
- for (var _len = arguments.length, args = new Array(_len), _key = 0; _key < _len; _key++) {
41
- args[_key] = arguments[_key];
42
- }
43
- _this = _callSuper(this, EuiTableSortMobile, [].concat(args));
44
- _defineProperty(_this, "state", {
45
- isPopoverOpen: false
27
+ // Aligns the button to the right even when it's the only element present
28
+ var euiTableSortMobileStyles = {
29
+ marginInlineStart: 'auto',
30
+ label: 'euiTableSortMobile'
31
+ };
32
+ export var EuiTableSortMobile = function EuiTableSortMobile(_ref) {
33
+ var className = _ref.className,
34
+ anchorPosition = _ref.anchorPosition,
35
+ items = _ref.items,
36
+ rest = _objectWithoutProperties(_ref, _excluded);
37
+ var _useState = useState(false),
38
+ _useState2 = _slicedToArray(_useState, 2),
39
+ isPopoverOpen = _useState2[0],
40
+ setIsPopoverOpen = _useState2[1];
41
+ var classes = classNames('euiTableSortMobile', className);
42
+ var onButtonClick = function onButtonClick() {
43
+ setIsPopoverOpen(function (isOpen) {
44
+ return !isOpen;
46
45
  });
47
- _defineProperty(_this, "onButtonClick", function () {
48
- _this.setState({
49
- isPopoverOpen: !_this.state.isPopoverOpen
50
- });
51
- });
52
- _defineProperty(_this, "closePopover", function () {
53
- _this.setState({
54
- isPopoverOpen: false
55
- });
56
- });
57
- // Aligns the button to the right even when it's the only element present
58
- _defineProperty(_this, "euiTableSortMobileStyles", {
59
- marginInlineStart: 'auto',
60
- label: 'euiTableSortMobile'
61
- });
62
- return _this;
63
- }
64
- _inherits(EuiTableSortMobile, _Component);
65
- return _createClass(EuiTableSortMobile, [{
66
- key: "render",
67
- value: function render() {
68
- var _this$props = this.props,
69
- className = _this$props.className,
70
- anchorPosition = _this$props.anchorPosition,
71
- items = _this$props.items,
72
- rest = _objectWithoutProperties(_this$props, _excluded);
73
- var classes = classNames('euiTableSortMobile', className);
74
- var mobileSortButton = ___EmotionJSX(EuiButtonEmpty, {
75
- iconType: "chevronSingleDown",
76
- iconSide: "right",
77
- onClick: this.onButtonClick.bind(this),
78
- flush: "right",
79
- size: "xs"
80
- }, ___EmotionJSX(EuiI18n, {
81
- token: "euiTableSortMobile.sorting",
82
- default: "Sorting"
83
- }));
84
- var mobileSortPopover = ___EmotionJSX(EuiPopover, _extends({
85
- button: mobileSortButton,
86
- isOpen: this.state.isPopoverOpen,
87
- closePopover: this.closePopover,
88
- anchorPosition: anchorPosition || 'downRight',
89
- panelPaddingSize: "none"
90
- }, rest), ___EmotionJSX(EuiContextMenuPanel, {
91
- style: {
92
- minWidth: 200
93
- },
94
- items: items && items.length ? items.map(function (item) {
95
- return ___EmotionJSX(EuiTableSortMobileItem, {
96
- key: item.key,
97
- onSort: item.onSort,
98
- isSorted: item.isSorted,
99
- isSortAscending: item.isSortAscending
100
- }, item.name);
101
- }) : undefined
102
- }));
103
- return ___EmotionJSX("div", {
104
- className: classes,
105
- css: this.euiTableSortMobileStyles
106
- }, mobileSortPopover);
107
- }
108
- }]);
109
- }(Component);
110
- EuiTableSortMobile.propTypes = {
111
- anchorPosition: PropTypes.any,
112
- items: PropTypes.arrayOf(PropTypes.shape({
113
- name: PropTypes.node.isRequired,
114
- key: PropTypes.any,
115
- onSort: PropTypes.func,
116
- isSorted: PropTypes.bool,
117
- isSortAscending: PropTypes.bool
118
- }).isRequired),
119
- className: PropTypes.string,
120
- "aria-label": PropTypes.string,
121
- "data-test-subj": PropTypes.string,
122
- css: PropTypes.any
123
- };
46
+ };
47
+ var closePopover = function closePopover() {
48
+ setIsPopoverOpen(false);
49
+ };
50
+ var mobileSortButton = ___EmotionJSX(EuiButtonEmpty, {
51
+ iconType: "chevronSingleDown",
52
+ iconSide: "right",
53
+ onClick: onButtonClick,
54
+ flush: "right",
55
+ size: "xs"
56
+ }, ___EmotionJSX(EuiI18n, {
57
+ token: "euiTableSortMobile.sorting",
58
+ default: "Sorting"
59
+ }));
60
+ var mobileSortPopover = ___EmotionJSX(EuiPopover, _extends({
61
+ button: mobileSortButton,
62
+ isOpen: isPopoverOpen,
63
+ closePopover: closePopover,
64
+ anchorPosition: anchorPosition || 'downRight',
65
+ panelPaddingSize: "none"
66
+ }, rest), ___EmotionJSX(EuiContextMenuPanel, {
67
+ style: {
68
+ minWidth: 200
69
+ },
70
+ items: items !== null && items !== void 0 && items.length ? items.map(function (item) {
71
+ return ___EmotionJSX(EuiTableSortMobileItem, {
72
+ key: item.key,
73
+ onSort: item.onSort,
74
+ isSorted: item.isSorted,
75
+ isSortAscending: item.isSortAscending
76
+ }, item.name);
77
+ }) : undefined
78
+ }));
79
+ return ___EmotionJSX("div", {
80
+ className: classes,
81
+ css: euiTableSortMobileStyles
82
+ }, mobileSortPopover);
83
+ };
84
+ EuiTableSortMobile.displayName = 'EuiTableSortMobile';
@@ -0,0 +1,25 @@
1
+ /*
2
+ * Copyright Elasticsearch B.V. and/or licensed to Elasticsearch B.V. under one
3
+ * or more contributor license agreements. Licensed under the Elastic License
4
+ * 2.0 and the Server Side Public License, v 1; you may not use this file except
5
+ * in compliance with, at your election, the Elastic License 2.0 or the Server
6
+ * Side Public License, v 1.
7
+ */
8
+
9
+ import React, { useId, useRef } from 'react';
10
+ import { v4 as uuidv4 } from 'uuid';
11
+ var useEuiTableStoreUniqueColumnIdFallback = function useEuiTableStoreUniqueColumnIdFallback() {
12
+ var ref = useRef(uuidv4());
13
+ return ref.current;
14
+ };
15
+
16
+ /**
17
+ * Returns a stable unique column ID to be used when registering columns.
18
+ * It uses `React.useId()` when available and falls back to UUID v4 on React 17.
19
+ *
20
+ * This is needed so that static `uuid` mocks don't break column registration
21
+ * (at least in React 18+; in older versions this function would need
22
+ * to be mocked to return something unique, but stable).
23
+ * @internal
24
+ */
25
+ export var useEuiTableStoreUniqueColumnId = 'useId' in React ? useId : useEuiTableStoreUniqueColumnIdFallback;
@@ -20,7 +20,6 @@ function _extends() { return _extends = Object.assign ? Object.assign.bind() : f
20
20
  import React, { useEffect, useCallback, useRef } from 'react';
21
21
  import classNames from 'classnames';
22
22
  import { useEuiMemoizedStyles, LEFT_ALIGNMENT } from '../../services';
23
- import { useGeneratedHtmlId } from '../../services/accessibility/html_id_generator';
24
23
  import { EuiI18n } from '../i18n';
25
24
  import { EuiScreenReaderOnly } from '../accessibility';
26
25
  import { EuiIcon } from '../icon';
@@ -32,6 +31,7 @@ import { EuiTableCellContent } from './_table_cell_content';
32
31
  import { euiTableHeaderFooterCellStyles, _useEuiTableStickyCellStyles } from './table_cells_shared.styles';
33
32
  import { useEuiTableColumnDataStore } from './store/provider';
34
33
  import { useEuiTableWithinStickyHeader } from './sticky_header';
34
+ import { useEuiTableStoreUniqueColumnId } from './store/use_unique_column_id';
35
35
  import { jsx as ___EmotionJSX } from "@emotion/react";
36
36
  var CellContents = function CellContents(_ref) {
37
37
  var className = _ref.className,
@@ -109,7 +109,7 @@ export var EuiTableHeaderCell = function EuiTableHeaderCell(_ref2) {
109
109
  sticky = _ref2.sticky,
110
110
  rest = _objectWithoutProperties(_ref2, _excluded);
111
111
  var selfRef = useRef(null);
112
- var internalCellId = useGeneratedHtmlId();
112
+ var storeCellId = useEuiTableStoreUniqueColumnId();
113
113
  var store = useEuiTableColumnDataStore();
114
114
  var isWithinStickyHeader = useEuiTableWithinStickyHeader();
115
115
  var styles = useEuiMemoizedStyles(euiTableHeaderFooterCellStyles);
@@ -174,15 +174,15 @@ export var EuiTableHeaderCell = function EuiTableHeaderCell(_ref2) {
174
174
  if (!entry) {
175
175
  return;
176
176
  }
177
- store.updateColumnWidth(internalCellId, entry.contentRect.width);
178
- }, [store, internalCellId]);
177
+ store.updateColumnWidth(storeCellId, entry.contentRect.width);
178
+ }, [store, storeCellId]);
179
179
  useEffect(function () {
180
180
  // Don't register the column inside the sticky header as the original
181
181
  // column is already registered. This would cause an infinite loop.
182
182
  if (isWithinStickyHeader || !selfRef.current || !renderHeaderCellRef.current) {
183
183
  return;
184
184
  }
185
- var unregisterColumn = store.registerColumn(internalCellId, {
185
+ var unregisterColumn = store.registerColumn(storeCellId, {
186
186
  renderHeaderCellRef: renderHeaderCellRef,
187
187
  // getBoundingClientRect is not the cheapest, but we call it only once
188
188
  currentWidth: selfRef.current.getBoundingClientRect().width
@@ -204,8 +204,7 @@ export var EuiTableHeaderCell = function EuiTableHeaderCell(_ref2) {
204
204
  unregisterColumn();
205
205
  (_resizeObserver = resizeObserver) === null || _resizeObserver === void 0 || _resizeObserver.disconnect();
206
206
  };
207
- // eslint-disable-next-line react-hooks/exhaustive-deps
208
- }, [store, internalCellId, isWithinStickyHeader]);
207
+ }, [store, isWithinStickyHeader, handleResize, storeCellId]);
209
208
 
210
209
  // Notify the store on every render so the sticky header stays in sync.
211
210
  // React's reconciliation will efficiently handle any duplicate renders.
@@ -220,7 +219,7 @@ export var EuiTableHeaderCell = function EuiTableHeaderCell(_ref2) {
220
219
  if (!selfRef.current) {
221
220
  return;
222
221
  }
223
- store.updateColumn(internalCellId, {
222
+ store.updateColumn(storeCellId, {
224
223
  renderHeaderCellRef: renderHeaderCellRef
225
224
  });
226
225
  });
@@ -14,11 +14,11 @@ import React, { useEffect, useRef } from 'react';
14
14
  import PropTypes from "prop-types";
15
15
  import classNames from 'classnames';
16
16
  import { useEuiMemoizedStyles } from '../../services';
17
- import { useGeneratedHtmlId } from '../../services/accessibility/html_id_generator';
18
17
  import { resolveWidthPropsAsStyle } from './utils';
19
18
  import { euiTableCellCheckboxStyles } from './table_cells_shared.styles';
20
19
  import { useEuiTableColumnDataStore } from './store/provider';
21
20
  import { useEuiTableWithinStickyHeader } from './sticky_header';
21
+ import { useEuiTableStoreUniqueColumnId } from './store/use_unique_column_id';
22
22
  import { jsx as ___EmotionJSX } from "@emotion/react";
23
23
  export var EuiTableHeaderCellCheckbox = function EuiTableHeaderCellCheckbox(props) {
24
24
  var children = props.children,
@@ -31,7 +31,7 @@ export var EuiTableHeaderCellCheckbox = function EuiTableHeaderCellCheckbox(prop
31
31
  maxWidth = props.maxWidth,
32
32
  append = props.append,
33
33
  rest = _objectWithoutProperties(props, _excluded);
34
- var internalCellId = useGeneratedHtmlId();
34
+ var storeCellId = useEuiTableStoreUniqueColumnId();
35
35
  var store = useEuiTableColumnDataStore();
36
36
  var isWithinStickyHeader = useEuiTableWithinStickyHeader();
37
37
  var styles = useEuiMemoizedStyles(euiTableCellCheckboxStyles);
@@ -58,21 +58,20 @@ export var EuiTableHeaderCellCheckbox = function EuiTableHeaderCellCheckbox(prop
58
58
  if (isWithinStickyHeader) {
59
59
  return;
60
60
  }
61
- var unregisterColumn = store.registerColumn(internalCellId, {
61
+ var unregisterColumn = store.registerColumn(storeCellId, {
62
62
  renderHeaderCellRef: renderHeaderCellRef
63
63
  });
64
64
  return function () {
65
65
  unregisterColumn();
66
66
  };
67
- // eslint-disable-next-line react-hooks/exhaustive-deps
68
- }, [store, internalCellId, isWithinStickyHeader]);
67
+ }, [store, isWithinStickyHeader, storeCellId]);
69
68
  useEffect(function () {
70
69
  // Notify the store on every render so the sticky header stays in sync.
71
70
  // React's reconciliation will efficiently handle any duplicate renders.
72
71
  if (isWithinStickyHeader) {
73
72
  return;
74
73
  }
75
- store.updateColumn(internalCellId, {
74
+ store.updateColumn(storeCellId, {
76
75
  renderHeaderCellRef: renderHeaderCellRef
77
76
  });
78
77
  });
@@ -1,5 +1,5 @@
1
1
  function _typeof(o) { "@babel/helpers - typeof"; return _typeof = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function (o) { return typeof o; } : function (o) { return o && "function" == typeof Symbol && o.constructor === Symbol && o !== Symbol.prototype ? "symbol" : typeof o; }, _typeof(o); }
2
- var _excluded = ["className", "toasts", "dismissToast", "toastLifeTimeMs", "onClearAllToasts", "side", "showClearAllButtonAt"],
2
+ var _excluded = ["className", "toasts", "dismissToast", "toastLifeTimeMs", "onClearAllToasts", "side", "showClearAllButtonAt", "showNotificationBadge"],
3
3
  _excluded2 = ["text", "toastLifeTimeMs"];
4
4
  function _extends() { return _extends = Object.assign ? Object.assign.bind() : function (n) { for (var e = 1; e < arguments.length; e++) { var t = arguments[e]; for (var r in t) ({}).hasOwnProperty.call(t, r) && (n[r] = t[r]); } return n; }, _extends.apply(null, arguments); }
5
5
  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; }
@@ -38,6 +38,7 @@ import { EuiToast } from './toast';
38
38
  import { euiGlobalToastListStyles } from './global_toast_list.styles';
39
39
  import { EuiButton } from '../button';
40
40
  import { EuiI18n } from '../i18n';
41
+ import { EuiNotificationBadge } from '../badge';
41
42
  import { jsx as ___EmotionJSX } from "@emotion/react";
42
43
  var sideToClassNameMap = {
43
44
  left: 'euiGlobalToastList--left',
@@ -57,6 +58,8 @@ export var EuiGlobalToastList = function EuiGlobalToastList(_ref) {
57
58
  side = _ref$side === void 0 ? 'right' : _ref$side,
58
59
  _ref$showClearAllButt = _ref.showClearAllButtonAt,
59
60
  showClearAllButtonAt = _ref$showClearAllButt === void 0 ? CLEAR_ALL_TOASTS_THRESHOLD_DEFAULT : _ref$showClearAllButt,
61
+ _ref$showNotification = _ref.showNotificationBadge,
62
+ showNotificationBadge = _ref$showNotification === void 0 ? false : _ref$showNotification,
60
63
  rest = _objectWithoutProperties(_ref, _excluded);
61
64
  var _useState = useState({}),
62
65
  _useState2 = _slicedToArray(_useState, 2),
@@ -231,8 +234,9 @@ export var EuiGlobalToastList = function EuiGlobalToastList(_ref) {
231
234
  var renderedToasts = useMemo(function () {
232
235
  return toasts.map(function (toast) {
233
236
  var text = toast.text,
234
- toastLifeTimeMs = toast.toastLifeTimeMs,
237
+ perToastLifeTimeMs = toast.toastLifeTimeMs,
235
238
  rest = _objectWithoutProperties(toast, _excluded2);
239
+ var effectiveLifeTimeMs = perToastLifeTimeMs !== null && perToastLifeTimeMs !== void 0 ? perToastLifeTimeMs : toastLifeTimeMs;
236
240
  var onClose = function onClose() {
237
241
  return dismissToast(toast);
238
242
  };
@@ -243,9 +247,12 @@ export var EuiGlobalToastList = function EuiGlobalToastList(_ref) {
243
247
  onClose: onClose,
244
248
  onFocus: onMouseEnter,
245
249
  onBlur: onMouseLeave
246
- }, rest), text));
250
+ }, rest, {
251
+ animationMs: effectiveLifeTimeMs,
252
+ text: text
253
+ })));
247
254
  });
248
- }, [toasts, toastIdToDismissedMap, dismissToast, onMouseEnter, onMouseLeave]);
255
+ }, [toasts, toastIdToDismissedMap, dismissToast, onMouseEnter, onMouseLeave, toastLifeTimeMs]);
249
256
  var clearAllButton = useMemo(function () {
250
257
  if (toasts.length && showClearAllButtonAt && toasts.length >= showClearAllButtonAt) {
251
258
  return ___EmotionJSX(EuiI18n, {
@@ -259,7 +266,8 @@ export var EuiGlobalToastList = function EuiGlobalToastList(_ref) {
259
266
  return ___EmotionJSX(EuiGlobalToastListItem, {
260
267
  isDismissed: false
261
268
  }, ___EmotionJSX(EuiButton, {
262
- fill: true,
269
+ fullWidth: true,
270
+ size: "s",
263
271
  color: "text",
264
272
  onClick: function onClick() {
265
273
  toasts.forEach(function (toast) {
@@ -275,23 +283,135 @@ export var EuiGlobalToastList = function EuiGlobalToastList(_ref) {
275
283
  }
276
284
  }, [showClearAllButtonAt, onClearAllToasts, toasts, dismissToastProp, styles]);
277
285
  var classes = classNames('euiGlobalToastList', className);
286
+ var hasContent = renderedToasts.length > 0 || clearAllButton != null;
287
+ var notificationBadge = useMemo(function () {
288
+ var _toastIdToDismissedMa, _toasts$;
289
+ var toastWasDismissed = (_toastIdToDismissedMa = toastIdToDismissedMap[(_toasts$ = toasts[0]) === null || _toasts$ === void 0 ? void 0 : _toasts$.id]) !== null && _toastIdToDismissedMa !== void 0 ? _toastIdToDismissedMa : false;
290
+ var isListEmpty = toasts.every(function (t) {
291
+ return toastIdToDismissedMap[t.id];
292
+ });
293
+ return showNotificationBadge && toasts.length > 0 && ___EmotionJSX(EuiNotificationBadge, {
294
+ className: "euiGlobalToastList__countBadge",
295
+ css: [styles.notificationBadge.notificationBadge, toastWasDismissed && styles.notificationBadge.hasFadeOut, isListEmpty && styles.notificationBadge.hasFadeOut, ";label:notificationBadge;"],
296
+ size: "m",
297
+ color: "subdued",
298
+ "data-test-subj": "euiGlobalToastListNotificationBadge"
299
+ }, toasts.length);
300
+ }, [showNotificationBadge, toasts, toastIdToDismissedMap, styles]);
278
301
  return ___EmotionJSX("div", _extends({
279
302
  "aria-live": "polite",
280
303
  role: "log",
281
304
  ref: listElement,
282
305
  css: cssStyles,
283
306
  className: classes
284
- }, rest), renderedToasts, clearAllButton);
307
+ }, rest), hasContent && ___EmotionJSX("div", {
308
+ css: styles.content
309
+ }, notificationBadge, renderedToasts, clearAllButton));
285
310
  };
286
311
  EuiGlobalToastList.propTypes = {
287
312
  toasts: PropTypes.arrayOf(PropTypes.shape({
288
313
  id: PropTypes.string.isRequired,
314
+ /**
315
+ * Main component text. Accepts text, text block elements such as `<p>`, and inline elements such as `<span>`, `<strong>`, `<em>` or `<EuiLink>`.
316
+ * Avoid passing complex layouts or custom components. Use `children` instead.
317
+ */
289
318
  text: PropTypes.node,
290
319
  toastLifeTimeMs: PropTypes.number,
320
+ /**
321
+ * Title of the toast. Should be used with text only. Do not pass complex content or custom components.
322
+ * Ensure to always pass a title. It's currently marked as optional for backwards compatibility.
323
+ * In a future major release, this will be required.
324
+ */
291
325
  title: PropTypes.node,
326
+ /**
327
+ * Can be used for additional, non-inline content. Use sparingly, as toasts are not meant to have complex content.
328
+ * Where possible, use `text` and `actionProps` instead to display text and actions.
329
+ */
330
+ children: PropTypes.node,
292
331
  color: PropTypes.any,
332
+ /**
333
+ * Defines a custom icon to be displayed.
334
+ * When no `iconType` is set, a default icon will be used based on the `color` of the toast.
335
+ */
293
336
  iconType: PropTypes.oneOfType([PropTypes.oneOf(["accessibility", "addDataApp", "addToDashboard", "advancedSettingsApp", "agentApp", "aggregate", "alignBottom", "alignBottomLeft", "alignBottomRight", "alignCenterHorizontal", "alignCenterVertical", "alignLeft", "alignRight", "alignTop", "alignTopLeft", "alignTopRight", "alert", "analyzeEvent", "annotation", "anomalyChart", "chartAnomaly", "anomalySwimLane", "apmApp", "apmTrace", "chartWaterfall", "appSearchApp", "apps", "arrowDown", "chevronSingleDown", "arrowLeft", "chevronSingleLeft", "arrowRight", "chevronSingleRight", "arrowUp", "chevronSingleUp", "arrowStart", "chevronLimitLeft", "arrowEnd", "chevronLimitRight", "article", "asterisk", "at", "archive", "axisX", "axisYLeft", "axisYRight", "auditbeatApp", "backgroundTask", "beaker", "bell", "bellSlash", "beta", "bolt", "boxesHorizontal", "boxesVertical", "branch", "briefcase", "branchUser", "broom", "brush", "bug", "bulb", "bullseye", "calendar", "canvasApp", "casesApp", "changePointDetection", "chartChangePoint", "chartArea", "chartAreaStack", "chartBarHorizontal", "chartBarHorizontalStack", "chartBarVertical", "chartBarVerticalStack", "chartGauge", "chartHeatmap", "chartLine", "chartPie", "chartTagCloud", "chartThreshold", "check", "checkCircle", "checkInCircleFilled", "checkCircleFill", "cheer", "popper", "classificationJob", "clickLeft", "clickRight", "clock", "clockCounter", "clockControl", "cloud", "cloudDrizzle", "cloudStormy", "cloudSunny", "cluster", "code", "codeApp", "color", "paintBucket", "commandLine", "comment", "compare", "compute", "processor", "console", "consoleApp", "container", "continuityAbove", "continuityAboveBelow", "continuityBelow", "continuityWithin", "contrast", "contrastHigh", "contrastFill", "controls", "controlsHorizontal", "controlsVertical", "copy", "copyClipboard", "crossProjectSearch", "createAdvancedJob", "createGenericJob", "createGeoJob", "createMultiMetricJob", "createPopulationJob", "createSingleMetricJob", "cross", "crossClusterReplicationApp", "crossInCircle", "crossCircle", "crosshair", "crosshairs", "currency", "money", "cut", "scissors", "dashboardApp", "dashedCircle", "dataVisualizer", "database", "desktop", "display", "devToolsApp", "diff", "discoverApp", "distributeHorizontal", "distributeVertical", "download", "drag", "dragHorizontal", "dragVertical", "discuss", "document", "documentEdit", "documentation", "documents", "dot", "dotInCircle", "doubleArrowLeft", "chevronDoubleLeft", "doubleArrowRight", "chevronDoubleRight", "ellipsis", "editorAlignCenter", "textAlignCenter", "editorAlignLeft", "textAlignLeft", "editorAlignRight", "textAlignRight", "editorBold", "textBold", "editorChecklist", "listCheck", "editorCodeBlock", "editorComment", "editorDistributeHorizontal", "editorDistributeVertical", "editorHeading", "textHeading", "editorItalic", "textItalic", "editorItemAlignBottom", "editorItemAlignCenter", "editorItemAlignLeft", "editorItemAlignMiddle", "editorItemAlignRight", "editorItemAlignTop", "editorLink", "editorOrderedList", "listNumber", "editorPositionBottomLeft", "editorPositionBottomRight", "editorPositionTopLeft", "editorPositionTopRight", "editorRedo", "redo", "editorStrike", "textStrike", "editorTable", "table", "editorUnderline", "textUnderline", "editorUndo", "undo", "editorUnorderedList", "listBullet", "email", "mail", "empty", "emsApp", "endpoint", "eql", "query", "eraser", "error", "errorFilled", "errorFill", "esqlVis", "exit", "logOut", "expand", "maximize", "expandMini", "export", "exportAction", "upload", "external", "eye", "eyeClosed", "eyeSlash", "faceHappy", "faceNeutral", "faceSad", "fieldStatistics", "tableInfo", "filebeatApp", "filter", "filterExclude", "filterIgnore", "filterInclude", "filterInCircle", "flask", "flag", "fleetApp", "fold", "folder", "folderClosed", "folderClose", "folderCheck", "folderExclamation", "folderOpen", "folderOpened", "frameNext", "framePrevious", "fullScreen", "fullScreenExit", "function", "gear", "gisApp", "glasses", "globe", "grab", "grabHorizontal", "grabOmnidirectional", "gradient", "graphApp", "grid", "grokApp", "heart", "heartbeatApp", "heatmap", "help", "home", "hourglass", "if", "info", "image", "importAction", "index", "indexClose", "indexEdit", "indexFlush", "indexManagementApp", "indexMapping", "mapping", "indexOpen", "indexPatternApp", "indexRollupApp", "indexRuntime", "indexSettings", "indexTemporary", "tableTime", "infinity", "inputOutput", "inspect", "invert", "ip", "key", "keyboard", "kqlField", "queryField", "kqlFunction", "kqlOperand", "queryOperand", "kqlSelector", "querySelector", "kqlValue", "queryValue", "kubernetesNode", "kubernetesPod", "launch", "rocket", "layers", "lensApp", "lettering", "text", "lineBreak", "lineBreakSlash", "lineDash", "lineDashed", "lineDot", "lineDotted", "lineSolid", "link", "linkSlash", "list", "listAdd", "lock", "lockOpen", "logPatternAnalysis", "pattern", "logRateAnalysis", "logoAWS", "logoAWSMono", "logoAerospike", "logoApache", "logoAppSearch", "logoAzure", "logoAzureMono", "logoBeats", "logoBusinessAnalytics", "logoCeph", "logoCloud", "logoCloudEnterprise", "logoCode", "logoCodesandbox", "logoCouchbase", "logoDocker", "logoDropwizard", "logoElastic", "logoElasticStack", "logoElasticsearch", "logoEnterpriseSearch", "logoEtcd", "logoGCP", "logoGCPMono", "logoGithub", "logoGmail", "logoGolang", "logoGoogleG", "logoHAproxy", "logoIBM", "logoIBMMono", "logoKafka", "logoKibana", "logoKubernetes", "logoLogging", "logoLogstash", "logoMaps", "logoMemcached", "logoMetrics", "logoMongodb", "logoMySQL", "logoNginx", "logoObservability", "logoOsquery", "logoPhp", "logoPostgres", "logoPrometheus", "logoRabbitmq", "logoRedis", "logoSecurity", "logoSiteSearch", "logoSketch", "logoSlack", "logoUptime", "logoVulnerabilityManagement", "logoWebhook", "logoWindows", "logoWorkplaceSearch", "logsApp", "logstashFilter", "logstashIf", "logstashInput", "logstashOutput", "logstashQueue", "queue", "machineLearningApp", "magnet", "magnify", "magnifyExclamation", "magnifyMinus", "magnifyPlus", "magnifyWithExclamation", "magnifyWithMinus", "magnifyWithPlus", "managementApp", "map", "mapMarker", "waypoint", "megaphone", "memory", "menu", "menuDown", "menuLeft", "menuRight", "menuUp", "merge", "metricbeatApp", "metricsApp", "minimize", "minus", "minusCircle", "minusInCircle", "minusInCircleFilled", "minusInSquare", "minusSquare", "mobile", "monitoringApp", "moon", "move", "namespace", "nested", "newChat", "node", "vectorTriangle", "notebookApp", "number", "offline", "wifiSlash", "online", "wifi", "outlierDetectionJob", "package", "packetbeatApp", "pageSelect", "pagesSelect", "palette", "paperClip", "partial", "pause", "payment", "pencil", "percent", "pin", "pinFill", "pinFilled", "pipeBreaks", "pipelineApp", "pipeNoBreaks", "pivot", "play", "playFilled", "plugs", "plus", "plusCircle", "plusInCircle", "plusInCircleFilled", "plusInSquare", "plusSquare", "popout", "presentation", "productRobot", "productAgent", "productCloudInfra", "productDashboard", "productDiscover", "productML", "productStreamsClassic", "productStreamsWired", "push", "send", "question", "quote", "radar", "readOnly", "recentlyViewedApp", "refresh", "regressionJob", "reporter", "reportingApp", "return", "returnKey", "save", "savedObjectsApp", "scale", "search", "searchProfilerApp", "section", "securityAnalyticsApp", "securityApp", "securitySignal", "securitySignalDetected", "securitySignalResolved", "server", "sessionViewer", "shard", "share", "significantEvents", "singleMetricViewer", "snowflake", "sortAscending", "sortDescending", "sortDown", "sortLeft", "sortRight", "sortUp", "sortable", "spaces", "spacesApp", "sparkles", "sqlApp", "star", "starEmpty", "starEmptySpace", "starFill", "starFilled", "starFillSpace", "starFilledSpace", "starMinusEmpty", "starMinusFill", "starMinusFilled", "starPlusEmpty", "starPlusFill", "starPlusFilled", "stats", "stop", "stopFill", "stopFilled", "stopSlash", "storage", "streamsClassic", "streamsWired", "string", "submodule", "sun", "swatchInput", "symlink", "tableDensityCompact", "tableDensityHigh", "tableDensityExpanded", "tableDensityLow", "tableDensityNormal", "tableOfContents", "tag", "tear", "temperature", "thermometer", "thumbDown", "thumbUp", "timeline", "timelineWithArrow", "timelionApp", "timeRefresh", "refreshTime", "timeslider", "training", "transitionBottomIn", "transitionBottomOut", "transitionLeftIn", "transitionLeftOut", "transitionTopIn", "transitionTopOut", "trash", "unfold", "unlink", "upgradeAssistantApp", "uptimeApp", "user", "userAvatar", "users", "usersRolesApp", "unarchive", "vector", "vectorSquare", "videoPlayer", "visArea", "visAreaStacked", "visBarHorizontal", "visBarHorizontalStacked", "visBarVertical", "visBarVerticalStacked", "visGauge", "visGoal", "visLine", "visMapCoordinate", "visMapRegion", "visMetric", "chartMetric", "visPie", "visTable", "visTagCloud", "visText", "visTimelion", "visVega", "visVisualBuilder", "visualizeApp", "vulnerabilityManagementApp", "warning", "warningFilled", "warningFill", "watchesApp", "web", "wordWrap", "wordWrapDisabled", "workflowsApp", "workflow", "workplaceSearchApp", "wrench", "tokenAlias", "tokenAnnotation", "tokenArray", "tokenBinary", "tokenBoolean", "tokenClass", "tokenCompletionSuggester", "tokenConstant", "tokenDate", "tokenDimension", "tokenElement", "tokenEnum", "tokenEnumMember", "tokenEvent", "tokenException", "tokenField", "tokenFile", "tokenFlattened", "tokenFunction", "tokenGeo", "tokenHistogram", "tokenInterface", "tokenIP", "tokenJoin", "tokenKey", "tokenKeyword", "tokenMethod", "tokenMetricCounter", "tokenMetricGauge", "tokenModule", "tokenNamespace", "tokenNested", "tokenNull", "tokenNumber", "tokenObject", "tokenOperator", "tokenPackage", "tokenParameter", "tokenPercolator", "tokenProperty", "tokenRange", "tokenRankFeature", "tokenRankFeatures", "tokenRepo", "tokenSearchType", "tokenSemanticText", "tokenShape", "tokenString", "tokenStruct", "tokenSymbol", "tokenTag", "tokenText", "tokenTokenCount", "tokenVariable", "tokenVectorDense", "tokenDenseVector", "tokenVectorSparse"]).isRequired, PropTypes.string.isRequired, PropTypes.elementType.isRequired]),
294
337
  onClose: PropTypes.func,
338
+ /**
339
+ * Duration in milliseconds that drives a countdown animation on the toast's decor bar.
340
+ * When not set the bar is static at full width.
341
+ */
342
+ animationMs: PropTypes.number,
343
+ /**
344
+ * Props for primary and secondary actions within the toast.
345
+ */
346
+ actionProps: PropTypes.shape({
347
+ primary: PropTypes.any,
348
+ secondary: PropTypes.shape({
349
+ href: PropTypes.string,
350
+ onClick: PropTypes.func,
351
+ /**
352
+ * Force disables the button and changes the icon to a loading spinner
353
+ */
354
+ /**
355
+ * Force disables the button and changes the icon to a loading spinner
356
+ */
357
+ isLoading: PropTypes.bool,
358
+ target: PropTypes.string,
359
+ rel: PropTypes.string,
360
+ type: PropTypes.any,
361
+ buttonRef: PropTypes.any,
362
+ /**
363
+ * Object of props passed to the `<span>` wrapping the button's content
364
+ */
365
+ /**
366
+ * Object of props passed to the `<span>` wrapping the button's content
367
+ */
368
+ contentProps: PropTypes.shape({
369
+ className: PropTypes.string,
370
+ "aria-label": PropTypes.string,
371
+ "data-test-subj": PropTypes.string,
372
+ css: PropTypes.any
373
+ }),
374
+ /**
375
+ * Any `type` accepted by EuiIcon
376
+ */
377
+ iconType: PropTypes.oneOfType([PropTypes.oneOf(["accessibility", "addDataApp", "addToDashboard", "advancedSettingsApp", "agentApp", "aggregate", "alignBottom", "alignBottomLeft", "alignBottomRight", "alignCenterHorizontal", "alignCenterVertical", "alignLeft", "alignRight", "alignTop", "alignTopLeft", "alignTopRight", "alert", "analyzeEvent", "annotation", "anomalyChart", "chartAnomaly", "anomalySwimLane", "apmApp", "apmTrace", "chartWaterfall", "appSearchApp", "apps", "arrowDown", "chevronSingleDown", "arrowLeft", "chevronSingleLeft", "arrowRight", "chevronSingleRight", "arrowUp", "chevronSingleUp", "arrowStart", "chevronLimitLeft", "arrowEnd", "chevronLimitRight", "article", "asterisk", "at", "archive", "axisX", "axisYLeft", "axisYRight", "auditbeatApp", "backgroundTask", "beaker", "bell", "bellSlash", "beta", "bolt", "boxesHorizontal", "boxesVertical", "branch", "briefcase", "branchUser", "broom", "brush", "bug", "bulb", "bullseye", "calendar", "canvasApp", "casesApp", "changePointDetection", "chartChangePoint", "chartArea", "chartAreaStack", "chartBarHorizontal", "chartBarHorizontalStack", "chartBarVertical", "chartBarVerticalStack", "chartGauge", "chartHeatmap", "chartLine", "chartPie", "chartTagCloud", "chartThreshold", "check", "checkCircle", "checkInCircleFilled", "checkCircleFill", "cheer", "popper", "classificationJob", "clickLeft", "clickRight", "clock", "clockCounter", "clockControl", "cloud", "cloudDrizzle", "cloudStormy", "cloudSunny", "cluster", "code", "codeApp", "color", "paintBucket", "commandLine", "comment", "compare", "compute", "processor", "console", "consoleApp", "container", "continuityAbove", "continuityAboveBelow", "continuityBelow", "continuityWithin", "contrast", "contrastHigh", "contrastFill", "controls", "controlsHorizontal", "controlsVertical", "copy", "copyClipboard", "crossProjectSearch", "createAdvancedJob", "createGenericJob", "createGeoJob", "createMultiMetricJob", "createPopulationJob", "createSingleMetricJob", "cross", "crossClusterReplicationApp", "crossInCircle", "crossCircle", "crosshair", "crosshairs", "currency", "money", "cut", "scissors", "dashboardApp", "dashedCircle", "dataVisualizer", "database", "desktop", "display", "devToolsApp", "diff", "discoverApp", "distributeHorizontal", "distributeVertical", "download", "drag", "dragHorizontal", "dragVertical", "discuss", "document", "documentEdit", "documentation", "documents", "dot", "dotInCircle", "doubleArrowLeft", "chevronDoubleLeft", "doubleArrowRight", "chevronDoubleRight", "ellipsis", "editorAlignCenter", "textAlignCenter", "editorAlignLeft", "textAlignLeft", "editorAlignRight", "textAlignRight", "editorBold", "textBold", "editorChecklist", "listCheck", "editorCodeBlock", "editorComment", "editorDistributeHorizontal", "editorDistributeVertical", "editorHeading", "textHeading", "editorItalic", "textItalic", "editorItemAlignBottom", "editorItemAlignCenter", "editorItemAlignLeft", "editorItemAlignMiddle", "editorItemAlignRight", "editorItemAlignTop", "editorLink", "editorOrderedList", "listNumber", "editorPositionBottomLeft", "editorPositionBottomRight", "editorPositionTopLeft", "editorPositionTopRight", "editorRedo", "redo", "editorStrike", "textStrike", "editorTable", "table", "editorUnderline", "textUnderline", "editorUndo", "undo", "editorUnorderedList", "listBullet", "email", "mail", "empty", "emsApp", "endpoint", "eql", "query", "eraser", "error", "errorFilled", "errorFill", "esqlVis", "exit", "logOut", "expand", "maximize", "expandMini", "export", "exportAction", "upload", "external", "eye", "eyeClosed", "eyeSlash", "faceHappy", "faceNeutral", "faceSad", "fieldStatistics", "tableInfo", "filebeatApp", "filter", "filterExclude", "filterIgnore", "filterInclude", "filterInCircle", "flask", "flag", "fleetApp", "fold", "folder", "folderClosed", "folderClose", "folderCheck", "folderExclamation", "folderOpen", "folderOpened", "frameNext", "framePrevious", "fullScreen", "fullScreenExit", "function", "gear", "gisApp", "glasses", "globe", "grab", "grabHorizontal", "grabOmnidirectional", "gradient", "graphApp", "grid", "grokApp", "heart", "heartbeatApp", "heatmap", "help", "home", "hourglass", "if", "info", "image", "importAction", "index", "indexClose", "indexEdit", "indexFlush", "indexManagementApp", "indexMapping", "mapping", "indexOpen", "indexPatternApp", "indexRollupApp", "indexRuntime", "indexSettings", "indexTemporary", "tableTime", "infinity", "inputOutput", "inspect", "invert", "ip", "key", "keyboard", "kqlField", "queryField", "kqlFunction", "kqlOperand", "queryOperand", "kqlSelector", "querySelector", "kqlValue", "queryValue", "kubernetesNode", "kubernetesPod", "launch", "rocket", "layers", "lensApp", "lettering", "text", "lineBreak", "lineBreakSlash", "lineDash", "lineDashed", "lineDot", "lineDotted", "lineSolid", "link", "linkSlash", "list", "listAdd", "lock", "lockOpen", "logPatternAnalysis", "pattern", "logRateAnalysis", "logoAWS", "logoAWSMono", "logoAerospike", "logoApache", "logoAppSearch", "logoAzure", "logoAzureMono", "logoBeats", "logoBusinessAnalytics", "logoCeph", "logoCloud", "logoCloudEnterprise", "logoCode", "logoCodesandbox", "logoCouchbase", "logoDocker", "logoDropwizard", "logoElastic", "logoElasticStack", "logoElasticsearch", "logoEnterpriseSearch", "logoEtcd", "logoGCP", "logoGCPMono", "logoGithub", "logoGmail", "logoGolang", "logoGoogleG", "logoHAproxy", "logoIBM", "logoIBMMono", "logoKafka", "logoKibana", "logoKubernetes", "logoLogging", "logoLogstash", "logoMaps", "logoMemcached", "logoMetrics", "logoMongodb", "logoMySQL", "logoNginx", "logoObservability", "logoOsquery", "logoPhp", "logoPostgres", "logoPrometheus", "logoRabbitmq", "logoRedis", "logoSecurity", "logoSiteSearch", "logoSketch", "logoSlack", "logoUptime", "logoVulnerabilityManagement", "logoWebhook", "logoWindows", "logoWorkplaceSearch", "logsApp", "logstashFilter", "logstashIf", "logstashInput", "logstashOutput", "logstashQueue", "queue", "machineLearningApp", "magnet", "magnify", "magnifyExclamation", "magnifyMinus", "magnifyPlus", "magnifyWithExclamation", "magnifyWithMinus", "magnifyWithPlus", "managementApp", "map", "mapMarker", "waypoint", "megaphone", "memory", "menu", "menuDown", "menuLeft", "menuRight", "menuUp", "merge", "metricbeatApp", "metricsApp", "minimize", "minus", "minusCircle", "minusInCircle", "minusInCircleFilled", "minusInSquare", "minusSquare", "mobile", "monitoringApp", "moon", "move", "namespace", "nested", "newChat", "node", "vectorTriangle", "notebookApp", "number", "offline", "wifiSlash", "online", "wifi", "outlierDetectionJob", "package", "packetbeatApp", "pageSelect", "pagesSelect", "palette", "paperClip", "partial", "pause", "payment", "pencil", "percent", "pin", "pinFill", "pinFilled", "pipeBreaks", "pipelineApp", "pipeNoBreaks", "pivot", "play", "playFilled", "plugs", "plus", "plusCircle", "plusInCircle", "plusInCircleFilled", "plusInSquare", "plusSquare", "popout", "presentation", "productRobot", "productAgent", "productCloudInfra", "productDashboard", "productDiscover", "productML", "productStreamsClassic", "productStreamsWired", "push", "send", "question", "quote", "radar", "readOnly", "recentlyViewedApp", "refresh", "regressionJob", "reporter", "reportingApp", "return", "returnKey", "save", "savedObjectsApp", "scale", "search", "searchProfilerApp", "section", "securityAnalyticsApp", "securityApp", "securitySignal", "securitySignalDetected", "securitySignalResolved", "server", "sessionViewer", "shard", "share", "significantEvents", "singleMetricViewer", "snowflake", "sortAscending", "sortDescending", "sortDown", "sortLeft", "sortRight", "sortUp", "sortable", "spaces", "spacesApp", "sparkles", "sqlApp", "star", "starEmpty", "starEmptySpace", "starFill", "starFilled", "starFillSpace", "starFilledSpace", "starMinusEmpty", "starMinusFill", "starMinusFilled", "starPlusEmpty", "starPlusFill", "starPlusFilled", "stats", "stop", "stopFill", "stopFilled", "stopSlash", "storage", "streamsClassic", "streamsWired", "string", "submodule", "sun", "swatchInput", "symlink", "tableDensityCompact", "tableDensityHigh", "tableDensityExpanded", "tableDensityLow", "tableDensityNormal", "tableOfContents", "tag", "tear", "temperature", "thermometer", "thumbDown", "thumbUp", "timeline", "timelineWithArrow", "timelionApp", "timeRefresh", "refreshTime", "timeslider", "training", "transitionBottomIn", "transitionBottomOut", "transitionLeftIn", "transitionLeftOut", "transitionTopIn", "transitionTopOut", "trash", "unfold", "unlink", "upgradeAssistantApp", "uptimeApp", "user", "userAvatar", "users", "usersRolesApp", "unarchive", "vector", "vectorSquare", "videoPlayer", "visArea", "visAreaStacked", "visBarHorizontal", "visBarHorizontalStacked", "visBarVertical", "visBarVerticalStacked", "visGauge", "visGoal", "visLine", "visMapCoordinate", "visMapRegion", "visMetric", "chartMetric", "visPie", "visTable", "visTagCloud", "visText", "visTimelion", "visVega", "visVisualBuilder", "visualizeApp", "vulnerabilityManagementApp", "warning", "warningFilled", "warningFill", "watchesApp", "web", "wordWrap", "wordWrapDisabled", "workflowsApp", "workflow", "workplaceSearchApp", "wrench", "tokenAlias", "tokenAnnotation", "tokenArray", "tokenBinary", "tokenBoolean", "tokenClass", "tokenCompletionSuggester", "tokenConstant", "tokenDate", "tokenDimension", "tokenElement", "tokenEnum", "tokenEnumMember", "tokenEvent", "tokenException", "tokenField", "tokenFile", "tokenFlattened", "tokenFunction", "tokenGeo", "tokenHistogram", "tokenInterface", "tokenIP", "tokenJoin", "tokenKey", "tokenKeyword", "tokenMethod", "tokenMetricCounter", "tokenMetricGauge", "tokenModule", "tokenNamespace", "tokenNested", "tokenNull", "tokenNumber", "tokenObject", "tokenOperator", "tokenPackage", "tokenParameter", "tokenPercolator", "tokenProperty", "tokenRange", "tokenRankFeature", "tokenRankFeatures", "tokenRepo", "tokenSearchType", "tokenSemanticText", "tokenShape", "tokenString", "tokenStruct", "tokenSymbol", "tokenTag", "tokenText", "tokenTokenCount", "tokenVariable", "tokenVectorDense", "tokenDenseVector", "tokenVectorSparse"]).isRequired, PropTypes.string.isRequired, PropTypes.elementType.isRequired]),
378
+ /**
379
+ * Can only be one side `left` or `right`
380
+ */
381
+ iconSide: PropTypes.oneOfType([PropTypes.any.isRequired, PropTypes.oneOf([undefined])]),
382
+ /**
383
+ * Object of props passed to the `<span>` wrapping the content's text/children only (not icon)
384
+ *
385
+ * This span wrapper can be removed by passing `textProps={false}`.
386
+ */
387
+ textProps: PropTypes.oneOfType([PropTypes.shape({
388
+ className: PropTypes.string,
389
+ "aria-label": PropTypes.string,
390
+ "data-test-subj": PropTypes.string,
391
+ css: PropTypes.any,
392
+ ref: PropTypes.any,
393
+ "data-text": PropTypes.string
394
+ }).isRequired, PropTypes.oneOf([false])]),
395
+ iconSize: PropTypes.any,
396
+ /**
397
+ * Controls the disabled behavior via the native `disabled` attribute.
398
+ */
399
+ isDisabled: PropTypes.bool,
400
+ className: PropTypes.string,
401
+ "aria-label": PropTypes.string,
402
+ "data-test-subj": PropTypes.string,
403
+ css: PropTypes.any,
404
+ /**
405
+ * NOTE: Beta feature, may be changed or removed in the future
406
+ *
407
+ * Changes the native `disabled` attribute to `aria-disabled` to preserve focusability.
408
+ * This results in a semantically disabled button without the default browser handling of the disabled state.
409
+ *
410
+ * Use e.g. when a disabled button should have a tooltip.
411
+ */
412
+ hasAriaDisabled: PropTypes.bool
413
+ })
414
+ }),
295
415
  className: PropTypes.string,
296
416
  "aria-label": PropTypes.string,
297
417
  "data-test-subj": PropTypes.string,
@@ -324,6 +444,12 @@ EuiGlobalToastList.propTypes = {
324
444
  * @default log
325
445
  */
326
446
  role: PropTypes.any,
447
+ /**
448
+ * Renders a notification badge indicating the amount of toasts in the list.
449
+ *
450
+ * @default false
451
+ */
452
+ showNotificationBadge: PropTypes.bool,
327
453
  className: PropTypes.string,
328
454
  "aria-label": PropTypes.string,
329
455
  "data-test-subj": PropTypes.string,