@elastic/eui 123.2.0 → 123.3.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 (229) hide show
  1. package/dist/eui-icons.json +92 -91
  2. package/dist/svgs/add_to_chat.svg +3 -5
  3. package/dist/svgs/product_alert_zero.svg +5 -0
  4. package/es/components/avatar/avatar.js +1 -1
  5. package/es/components/badge/badge.js +1 -1
  6. package/es/components/badge/beta_badge/beta_badge.js +1 -1
  7. package/es/components/banner/banner.js +40 -3
  8. package/es/components/basic_table/basic_table.js +4 -4
  9. package/es/components/basic_table/in_memory_table.js +4 -4
  10. package/es/components/button/button_display/_button_display_content.js +1 -1
  11. package/es/components/button/button_empty/button_empty.js +1 -1
  12. package/es/components/button/button_icon/button_icon.js +1 -1
  13. package/es/components/call_out/call_out.js +40 -7
  14. package/es/components/card/card.js +1 -1
  15. package/es/components/collapsible_nav/collapsible_nav_group/collapsible_nav_group.js +1 -1
  16. package/es/components/comment_list/comment.js +2 -2
  17. package/es/components/comment_list/comment_event.js +1 -1
  18. package/es/components/comment_list/comment_list.js +2 -2
  19. package/es/components/comment_list/comment_timeline.js +1 -1
  20. package/es/components/context_menu/context_menu_item.js +1 -1
  21. package/es/components/datagrid/body/cell/data_grid_cell.js +24 -24
  22. package/es/components/datagrid/body/data_grid_body.js +13 -13
  23. package/es/components/datagrid/body/data_grid_body_custom.js +13 -13
  24. package/es/components/datagrid/body/data_grid_body_virtualized.js +13 -13
  25. package/es/components/datagrid/body/header/data_grid_header_cell.js +12 -12
  26. package/es/components/datagrid/controls/column_sorting.js +13 -13
  27. package/es/components/datagrid/controls/column_sorting_draggable.js +1 -1
  28. package/es/components/datagrid/controls/data_grid_toolbar_control.js +1 -1
  29. package/es/components/datagrid/utils/in_memory.js +12 -12
  30. package/es/components/date_picker/date_picker.js +2 -2
  31. package/es/components/date_picker/date_picker_range.js +1 -1
  32. package/es/components/empty_prompt/empty_prompt.js +1 -1
  33. package/es/components/flyout/flyout_menu/flyout_menu.js +2 -2
  34. package/es/components/form/field_number/field_number.js +2 -2
  35. package/es/components/form/field_text/field_text.js +2 -2
  36. package/es/components/form/form_control_button/form_control_button.js +1 -1
  37. package/es/components/form/form_control_layout/append_prepend/form_append_prepend.js +2 -2
  38. package/es/components/form/form_control_layout/form_control_layout.js +2 -2
  39. package/es/components/form/form_control_layout/form_control_layout_custom_icon.js +1 -1
  40. package/es/components/form/text_area/text_area.js +2 -2
  41. package/es/components/header/header_links/header_link.js +1 -1
  42. package/es/components/header/header_links/header_links.js +1 -1
  43. package/es/components/header/header_section/header_section_item_button.js +1 -1
  44. package/es/components/icon/assets/add_to_chat.js +2 -10
  45. package/es/components/icon/assets/product_alert_zero.js +33 -0
  46. package/es/components/icon/icon.js +1 -1
  47. package/es/components/icon/icon_map.js +5 -0
  48. package/es/components/icon/svgs/add_to_chat.svg +3 -5
  49. package/es/components/icon/svgs/product_alert_zero.svg +5 -0
  50. package/es/components/key_pad_menu/key_pad_menu_item.js +1 -1
  51. package/es/components/list_group/list_group.js +2 -2
  52. package/es/components/list_group/list_group_item.js +2 -2
  53. package/es/components/list_group/list_group_item_extra_action.js +1 -1
  54. package/es/components/list_group/pinnable_list_group/pinnable_list_group.js +4 -4
  55. package/es/components/loading/loading_logo.js +1 -1
  56. package/es/components/markdown_editor/markdown_editor.js +1 -1
  57. package/es/components/markdown_editor/markdown_editor_drop_zone.js +1 -1
  58. package/es/components/markdown_editor/markdown_editor_footer.js +1 -1
  59. package/es/components/markdown_editor/markdown_editor_toolbar.js +1 -1
  60. package/es/components/page/page_header/page_header_content.js +1 -1
  61. package/es/components/pagination/pagination_button.js +1 -1
  62. package/es/components/selectable/selectable_list/selectable_list.js +1 -1
  63. package/es/components/selectable/selectable_list/selectable_list_item.js +1 -1
  64. package/es/components/selectable/selectable_templates/selectable_template_sitewide.js +1 -1
  65. package/es/components/selectable/selectable_templates/selectable_template_sitewide.styles.js +5 -1
  66. package/es/components/table/table_header_cell.js +1 -1
  67. package/es/components/timeline/timeline_item_icon.js +1 -1
  68. package/es/components/toast/global_toast_list.js +2 -2
  69. package/es/components/toast/toast.js +2 -2
  70. package/es/components/token/token.styles.js +10 -4
  71. package/es/components/tool_tip/icon_tip.js +1 -1
  72. package/es/services/theme/provider.js +86 -101
  73. package/eui.d.ts +23 -11
  74. package/lib/components/avatar/avatar.js +1 -1
  75. package/lib/components/badge/badge.js +1 -1
  76. package/lib/components/badge/beta_badge/beta_badge.js +1 -1
  77. package/lib/components/banner/banner.js +39 -2
  78. package/lib/components/basic_table/basic_table.js +4 -4
  79. package/lib/components/basic_table/in_memory_table.js +4 -4
  80. package/lib/components/button/button_display/_button_display_content.js +1 -1
  81. package/lib/components/button/button_empty/button_empty.js +1 -1
  82. package/lib/components/button/button_icon/button_icon.js +1 -1
  83. package/lib/components/call_out/call_out.js +39 -6
  84. package/lib/components/card/card.js +1 -1
  85. package/lib/components/collapsible_nav/collapsible_nav_group/collapsible_nav_group.js +1 -1
  86. package/lib/components/comment_list/comment.js +2 -2
  87. package/lib/components/comment_list/comment_event.js +1 -1
  88. package/lib/components/comment_list/comment_list.js +2 -2
  89. package/lib/components/comment_list/comment_timeline.js +1 -1
  90. package/lib/components/context_menu/context_menu_item.js +1 -1
  91. package/lib/components/datagrid/body/cell/data_grid_cell.js +24 -24
  92. package/lib/components/datagrid/body/data_grid_body.js +13 -13
  93. package/lib/components/datagrid/body/data_grid_body_custom.js +13 -13
  94. package/lib/components/datagrid/body/data_grid_body_virtualized.js +13 -13
  95. package/lib/components/datagrid/body/header/data_grid_header_cell.js +12 -12
  96. package/lib/components/datagrid/controls/column_sorting.js +13 -13
  97. package/lib/components/datagrid/controls/column_sorting_draggable.js +1 -1
  98. package/lib/components/datagrid/controls/data_grid_toolbar_control.js +1 -1
  99. package/lib/components/datagrid/utils/in_memory.js +12 -12
  100. package/lib/components/date_picker/date_picker.js +2 -2
  101. package/lib/components/date_picker/date_picker_range.js +1 -1
  102. package/lib/components/empty_prompt/empty_prompt.js +1 -1
  103. package/lib/components/flyout/flyout_menu/flyout_menu.js +2 -2
  104. package/lib/components/form/field_number/field_number.js +2 -2
  105. package/lib/components/form/field_text/field_text.js +2 -2
  106. package/lib/components/form/form_control_button/form_control_button.js +1 -1
  107. package/lib/components/form/form_control_layout/append_prepend/form_append_prepend.js +2 -2
  108. package/lib/components/form/form_control_layout/form_control_layout.js +2 -2
  109. package/lib/components/form/form_control_layout/form_control_layout_custom_icon.js +1 -1
  110. package/lib/components/form/text_area/text_area.js +2 -2
  111. package/lib/components/header/header_links/header_link.js +1 -1
  112. package/lib/components/header/header_links/header_links.js +1 -1
  113. package/lib/components/header/header_section/header_section_item_button.js +1 -1
  114. package/lib/components/icon/assets/add_to_chat.js +2 -10
  115. package/lib/components/icon/assets/product_alert_zero.js +40 -0
  116. package/lib/components/icon/icon.js +1 -1
  117. package/lib/components/icon/icon_map.js +7 -0
  118. package/lib/components/icon/svgs/add_to_chat.svg +3 -5
  119. package/lib/components/icon/svgs/product_alert_zero.svg +5 -0
  120. package/lib/components/key_pad_menu/key_pad_menu_item.js +1 -1
  121. package/lib/components/list_group/list_group.js +2 -2
  122. package/lib/components/list_group/list_group_item.js +2 -2
  123. package/lib/components/list_group/list_group_item_extra_action.js +1 -1
  124. package/lib/components/list_group/pinnable_list_group/pinnable_list_group.js +4 -4
  125. package/lib/components/loading/loading_logo.js +1 -1
  126. package/lib/components/markdown_editor/markdown_editor.js +1 -1
  127. package/lib/components/markdown_editor/markdown_editor_drop_zone.js +1 -1
  128. package/lib/components/markdown_editor/markdown_editor_footer.js +1 -1
  129. package/lib/components/markdown_editor/markdown_editor_toolbar.js +1 -1
  130. package/lib/components/page/page_header/page_header_content.js +1 -1
  131. package/lib/components/pagination/pagination_button.js +1 -1
  132. package/lib/components/selectable/selectable_list/selectable_list.js +1 -1
  133. package/lib/components/selectable/selectable_list/selectable_list_item.js +1 -1
  134. package/lib/components/selectable/selectable_templates/selectable_template_sitewide.js +1 -1
  135. package/lib/components/selectable/selectable_templates/selectable_template_sitewide.styles.js +5 -1
  136. package/lib/components/table/table_header_cell.js +1 -1
  137. package/lib/components/timeline/timeline_item_icon.js +1 -1
  138. package/lib/components/toast/global_toast_list.js +2 -2
  139. package/lib/components/toast/toast.js +2 -2
  140. package/lib/components/token/token.styles.js +10 -4
  141. package/lib/components/tool_tip/icon_tip.js +1 -1
  142. package/lib/services/theme/provider.js +85 -102
  143. package/optimize/es/components/banner/banner.js +35 -3
  144. package/optimize/es/components/call_out/call_out.js +33 -5
  145. package/optimize/es/components/icon/assets/add_to_chat.js +2 -10
  146. package/optimize/es/components/icon/assets/product_alert_zero.js +32 -0
  147. package/optimize/es/components/icon/icon_map.js +5 -0
  148. package/optimize/es/components/icon/svgs/add_to_chat.svg +3 -5
  149. package/optimize/es/components/icon/svgs/product_alert_zero.svg +5 -0
  150. package/optimize/es/components/selectable/selectable_templates/selectable_template_sitewide.styles.js +5 -1
  151. package/optimize/es/components/token/token.styles.js +10 -4
  152. package/optimize/es/services/theme/provider.js +82 -97
  153. package/optimize/lib/components/banner/banner.js +34 -2
  154. package/optimize/lib/components/call_out/call_out.js +32 -4
  155. package/optimize/lib/components/icon/assets/add_to_chat.js +2 -10
  156. package/optimize/lib/components/icon/assets/product_alert_zero.js +40 -0
  157. package/optimize/lib/components/icon/icon_map.js +7 -0
  158. package/optimize/lib/components/icon/svgs/add_to_chat.svg +3 -5
  159. package/optimize/lib/components/icon/svgs/product_alert_zero.svg +5 -0
  160. package/optimize/lib/components/selectable/selectable_templates/selectable_template_sitewide.styles.js +5 -1
  161. package/optimize/lib/components/token/token.styles.js +10 -4
  162. package/optimize/lib/services/theme/provider.js +80 -97
  163. package/package.json +6 -6
  164. package/test-env/components/avatar/avatar.js +1 -1
  165. package/test-env/components/badge/badge.js +1 -1
  166. package/test-env/components/badge/beta_badge/beta_badge.js +1 -1
  167. package/test-env/components/banner/banner.js +34 -2
  168. package/test-env/components/basic_table/basic_table.js +4 -4
  169. package/test-env/components/basic_table/in_memory_table.js +4 -4
  170. package/test-env/components/button/button_display/_button_display_content.js +1 -1
  171. package/test-env/components/button/button_empty/button_empty.js +1 -1
  172. package/test-env/components/button/button_icon/button_icon.js +1 -1
  173. package/test-env/components/call_out/call_out.js +34 -6
  174. package/test-env/components/card/card.js +1 -1
  175. package/test-env/components/collapsible_nav/collapsible_nav_group/collapsible_nav_group.js +1 -1
  176. package/test-env/components/comment_list/comment.js +2 -2
  177. package/test-env/components/comment_list/comment_event.js +1 -1
  178. package/test-env/components/comment_list/comment_list.js +2 -2
  179. package/test-env/components/comment_list/comment_timeline.js +1 -1
  180. package/test-env/components/context_menu/context_menu_item.js +1 -1
  181. package/test-env/components/datagrid/body/cell/data_grid_cell.js +24 -24
  182. package/test-env/components/datagrid/body/data_grid_body.js +13 -13
  183. package/test-env/components/datagrid/body/data_grid_body_custom.js +13 -13
  184. package/test-env/components/datagrid/body/data_grid_body_virtualized.js +13 -13
  185. package/test-env/components/datagrid/body/header/data_grid_header_cell.js +12 -12
  186. package/test-env/components/datagrid/controls/column_sorting.js +13 -13
  187. package/test-env/components/datagrid/controls/column_sorting_draggable.js +1 -1
  188. package/test-env/components/datagrid/controls/data_grid_toolbar_control.js +1 -1
  189. package/test-env/components/datagrid/utils/in_memory.js +12 -12
  190. package/test-env/components/date_picker/date_picker.js +2 -2
  191. package/test-env/components/date_picker/date_picker_range.js +1 -1
  192. package/test-env/components/empty_prompt/empty_prompt.js +1 -1
  193. package/test-env/components/flyout/flyout_menu/flyout_menu.js +2 -2
  194. package/test-env/components/form/field_number/field_number.js +2 -2
  195. package/test-env/components/form/field_text/field_text.js +2 -2
  196. package/test-env/components/form/form_control_button/form_control_button.js +1 -1
  197. package/test-env/components/form/form_control_layout/append_prepend/form_append_prepend.js +2 -2
  198. package/test-env/components/form/form_control_layout/form_control_layout.js +2 -2
  199. package/test-env/components/form/form_control_layout/form_control_layout_custom_icon.js +1 -1
  200. package/test-env/components/form/text_area/text_area.js +2 -2
  201. package/test-env/components/header/header_links/header_link.js +1 -1
  202. package/test-env/components/header/header_links/header_links.js +1 -1
  203. package/test-env/components/header/header_section/header_section_item_button.js +1 -1
  204. package/test-env/components/icon/assets/add_to_chat.js +2 -10
  205. package/test-env/components/icon/assets/product_alert_zero.js +40 -0
  206. package/test-env/components/icon/icon_map.js +7 -0
  207. package/test-env/components/key_pad_menu/key_pad_menu_item.js +1 -1
  208. package/test-env/components/list_group/list_group.js +2 -2
  209. package/test-env/components/list_group/list_group_item.js +2 -2
  210. package/test-env/components/list_group/list_group_item_extra_action.js +1 -1
  211. package/test-env/components/list_group/pinnable_list_group/pinnable_list_group.js +4 -4
  212. package/test-env/components/loading/loading_logo.js +1 -1
  213. package/test-env/components/markdown_editor/markdown_editor.js +1 -1
  214. package/test-env/components/markdown_editor/markdown_editor_drop_zone.js +1 -1
  215. package/test-env/components/markdown_editor/markdown_editor_footer.js +1 -1
  216. package/test-env/components/markdown_editor/markdown_editor_toolbar.js +1 -1
  217. package/test-env/components/page/page_header/page_header_content.js +1 -1
  218. package/test-env/components/pagination/pagination_button.js +1 -1
  219. package/test-env/components/selectable/selectable_list/selectable_list.js +1 -1
  220. package/test-env/components/selectable/selectable_list/selectable_list_item.js +1 -1
  221. package/test-env/components/selectable/selectable_templates/selectable_template_sitewide.js +1 -1
  222. package/test-env/components/selectable/selectable_templates/selectable_template_sitewide.styles.js +5 -1
  223. package/test-env/components/table/table_header_cell.js +1 -1
  224. package/test-env/components/timeline/timeline_item_icon.js +1 -1
  225. package/test-env/components/toast/global_toast_list.js +2 -2
  226. package/test-env/components/toast/toast.js +2 -2
  227. package/test-env/components/token/token.styles.js +10 -4
  228. package/test-env/components/tool_tip/icon_tip.js +1 -1
  229. package/test-env/services/theme/provider.js +80 -97
@@ -26,23 +26,39 @@ function _extends() { return _extends = Object.assign ? Object.assign.bind() : f
26
26
  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; }
27
27
  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; }
28
28
  function _taggedTemplateLiteral(e, t) { return t || (t = e.slice(0)), Object.freeze(Object.defineProperties(e, { raw: { value: Object.freeze(t) } })); }
29
- 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; }
30
- 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) { _defineProperty(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; }
31
- 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; }
32
- function _toPropertyKey(t) { var i = _toPrimitive(t, "string"); return "symbol" == _typeof(i) ? i : i + ""; }
33
- 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); }
34
29
  function _slicedToArray(r, e) { return _arrayWithHoles(r) || _iterableToArrayLimit(r, e) || _unsupportedIterableToArray(r, e) || _nonIterableRest(); }
35
30
  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."); }
36
31
  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; } }
37
32
  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; }
38
33
  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; } }
39
- function _arrayWithHoles(r) { if (Array.isArray(r)) return r; } /*
34
+ function _arrayWithHoles(r) { if (Array.isArray(r)) return r; }
35
+ 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; }
36
+ 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) { _defineProperty(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; }
37
+ 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; }
38
+ function _toPropertyKey(t) { var i = _toPrimitive(t, "string"); return "symbol" == _typeof(i) ? i : i + ""; }
39
+ 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); } /*
40
40
  * Copyright Elasticsearch B.V. and/or licensed to Elasticsearch B.V. under one
41
41
  * or more contributor license agreements. Licensed under the Elastic License
42
42
  * 2.0 and the Server Side Public License, v 1; you may not use this file except
43
43
  * in compliance with, at your election, the Elastic License 2.0 or the Server
44
44
  * Side Public License, v 1.
45
+ */ /**
46
+ * Caches `value` during render, only swapping in a new one once `isSame`
47
+ * reports that it actually differs from the cached one.
48
+ *
49
+ * This keeps derived objects referentially stable (so that the - comparatively
50
+ * expensive - theme computation isn't rerun on every render) without deferring
51
+ * them to a `useEffect`/`setState` pair. Effect-synchronised state costs an
52
+ * extra commit, in which consumers would see e.g. an updated `colorMode`
53
+ * alongside a theme that is still computed from the previous one.
45
54
  */
55
+ var useStableValue = function useStableValue(value, isSame) {
56
+ var ref = (0, _react2.useRef)(value);
57
+ if (ref.current !== value && !isSame(ref.current, value)) {
58
+ ref.current = value;
59
+ }
60
+ return ref.current;
61
+ };
46
62
  var EuiThemeProvider = exports.EuiThemeProvider = function EuiThemeProvider(_ref) {
47
63
  var _system = _ref.theme,
48
64
  _colorMode = _ref.colorMode,
@@ -71,118 +87,85 @@ var EuiThemeProvider = exports.EuiThemeProvider = function EuiThemeProvider(_ref
71
87
  var EuiConditionalBreakpointProvider = (0, _react2.useMemo)(function () {
72
88
  return isGlobalTheme || _modifications !== null && _modifications !== void 0 && _modifications.breakpoint ? _current_breakpoint.CurrentEuiBreakpointProvider : _react2.Fragment;
73
89
  }, [isGlobalTheme, _modifications]);
74
- var _useState = (0, _react2.useState)(_system || parentSystem),
75
- _useState2 = _slicedToArray(_useState, 2),
76
- system = _useState2[0],
77
- setSystem = _useState2[1];
78
- var prevSystemKey = (0, _react2.useRef)(system.key);
79
- var _useState3 = (0, _react2.useState)((0, _utils.mergeDeep)(parentModifications, _modifications)),
80
- _useState4 = _slicedToArray(_useState3, 2),
81
- modifications = _useState4[0],
82
- setModifications = _useState4[1];
83
- var prevModifications = (0, _react2.useRef)(modifications);
84
- var _useState5 = (0, _react2.useState)((0, _utils.getColorMode)(_colorMode, parentColorMode, isForced)),
85
- _useState6 = _slicedToArray(_useState5, 2),
86
- colorMode = _useState6[0],
87
- setColorMode = _useState6[1];
88
- var prevColorMode = (0, _react2.useRef)(colorMode);
90
+
91
+ // Every value below is derived from props/parent context during render, so
92
+ // that all context values this provider exposes - most notably `colorMode`
93
+ // and the computed `theme` - always change within the same commit
94
+ var system = useStableValue(_system || parentSystem, function (previous, next) {
95
+ return previous.key === next.key;
96
+ });
97
+ var mergedModifications = (0, _react2.useMemo)(function () {
98
+ return (0, _utils.mergeDeep)(parentModifications, _modifications);
99
+ }, [parentModifications, _modifications]);
100
+ var modifications = useStableValue(mergedModifications, _isEqual.default);
101
+ var colorMode = (0, _react2.useMemo)(function () {
102
+ return (0, _utils.getColorMode)(_colorMode, parentColorMode, isForced);
103
+ }, [_colorMode, parentColorMode, isForced]);
89
104
  var highContrastMode = (0, _react2.useMemo)(function () {
90
105
  if (isForced) return 'forced'; // System forced high contrast mode will always supercede application settings
91
106
  if (_highContrastMode === true) return 'preferred'; // Convert the boolean prop to our internal enum
92
107
  if (_highContrastMode === false) return false; // Allow `false` prop to override user/system preference
93
108
  return parentHighContrastMode; // Fall back to the parent/system setting
94
109
  }, [_highContrastMode, parentHighContrastMode, isForced]);
95
- var prevHighContrastMode = (0, _react2.useRef)(highContrastMode);
96
110
  var modificationsWithHighContrast = (0, _high_contrast_overrides.useHighContrastModifications)({
97
111
  highContrastMode: highContrastMode,
98
112
  colorMode: colorMode,
99
113
  system: system,
100
114
  modifications: modifications
101
115
  });
102
- var isParentTheme = (0, _react2.useRef)(isGlobalTheme ? prevSystemKey.current === _context.DEFAULTS.system.key && colorMode === _context.DEFAULTS.colorMode && highContrastMode === _context.DEFAULTS.highContrastMode && !_modifications : prevSystemKey.current === parentSystem.key && colorMode === parentColorMode && highContrastMode === parentHighContrastMode && (0, _isEqual.default)(parentModifications, modifications));
103
- var updateVisColorStore = (0, _react2.useCallback)(function (theme, isGlobalTheme) {
104
- if (isGlobalTheme) {
105
- _color.EUI_VIS_COLOR_STORE.setVisColors(theme.colors.vis);
116
+
117
+ // If this provider resolves to the exact same theme as its parent, the
118
+ // already computed parent theme can be reused instead of recomputing it
119
+ var isParentTheme = (0, _react2.useMemo)(function () {
120
+ return isGlobalTheme ? system.key === _context.DEFAULTS.system.key && colorMode === _context.DEFAULTS.colorMode && highContrastMode === _context.DEFAULTS.highContrastMode && !_modifications : system.key === parentSystem.key && colorMode === parentColorMode && highContrastMode === parentHighContrastMode && (0, _isEqual.default)(parentModifications, modifications);
121
+ }, [isGlobalTheme, system, colorMode, highContrastMode, _modifications, parentSystem, parentColorMode, parentHighContrastMode, parentModifications, modifications]);
122
+
123
+ // Depending on `parentTheme` itself would recompute this provider's theme every
124
+ // time the parent's did, even where the parent's theme is not an input to it -
125
+ // `parentModifications` already reaches `getComputed` through `modifications`
126
+ var reusableParentTheme = isParentTheme && Object.keys(parentTheme).length ? parentTheme : null;
127
+ var theme = (0, _react2.useMemo)(function () {
128
+ if (reusableParentTheme) {
129
+ return _objectSpread({}, reusableParentTheme); // Intentionally create a new object to break referential equality
106
130
  }
107
- }, []);
108
- var getInitialTheme = function getInitialTheme() {
109
- var theme = (0, _utils.getComputed)(system, (0, _utils.buildTheme)(modificationsWithHighContrast, "_".concat(system.key)), colorMode, highContrastMode);
110
- setTimeout(function () {
111
- updateVisColorStore(theme, isGlobalTheme);
131
+
132
+ /* Enables recomputation of component colors when flags are overridden on the provider
133
+ by adding the respective key to modifications to trigger a recomputation. */
134
+ // NOTE: Keeping this as placeholder for potential future usage during Borealis changes
135
+ // TODO: remove once visual refresh is completed and flags are obsolete
136
+ var flagsToRecompute = [];
137
+ var keys = {};
138
+ var forceRecomputeComponents = flagsToRecompute.some(function (item) {
139
+ var _modifications$flags, _modifications$compon;
140
+ if (!item) return false;
141
+ if (Object.keys((_modifications$flags = modifications.flags) !== null && _modifications$flags !== void 0 ? _modifications$flags : {}).includes(item.flag) && !Object.keys((_modifications$compon = modifications.components) !== null && _modifications$compon !== void 0 ? _modifications$compon : {}).includes(item.componentKey)) {
142
+ keys[item.componentKey] = {
143
+ LIGHT: {},
144
+ DARK: {}
145
+ };
146
+ return true;
147
+ }
148
+ return false;
112
149
  });
113
- return theme;
114
- };
115
- var _useState7 = (0, _react2.useState)(isParentTheme.current && Object.keys(parentTheme).length ? _objectSpread({}, parentTheme) // Intentionally create a new object to break referential equality
116
- : getInitialTheme()),
117
- _useState8 = _slicedToArray(_useState7, 2),
118
- theme = _useState8[0],
119
- setTheme = _useState8[1];
120
- (0, _react2.useEffect)(function () {
121
- var newSystem = _system || parentSystem;
122
- if (prevSystemKey.current !== newSystem.key) {
123
- setSystem(newSystem);
124
- prevSystemKey.current = newSystem.key;
125
- isParentTheme.current = false;
126
- }
127
- }, [_system, parentSystem, theme, updateVisColorStore]);
128
- (0, _react2.useEffect)(function () {
129
- updateVisColorStore(theme, isGlobalTheme);
130
- }, [theme, colorMode, isGlobalTheme, updateVisColorStore]);
131
- (0, _react2.useEffect)(function () {
132
- var newModifications = (0, _utils.mergeDeep)(parentModifications, _modifications);
133
- if (!(0, _isEqual.default)(prevModifications.current, newModifications)) {
134
- setModifications(newModifications);
135
- prevModifications.current = newModifications;
136
- isParentTheme.current = false;
137
- }
138
- }, [_modifications, parentModifications]);
139
- (0, _react2.useEffect)(function () {
140
- var newColorMode = (0, _utils.getColorMode)(_colorMode, parentColorMode, isForced);
141
- if (!(0, _isEqual.default)(newColorMode, prevColorMode.current)) {
142
- setColorMode(newColorMode);
143
- prevColorMode.current = newColorMode;
144
- isParentTheme.current = false;
145
- }
146
- }, [_colorMode, parentColorMode, isForced]);
147
- (0, _react2.useEffect)(function () {
148
- if (prevHighContrastMode.current !== highContrastMode) {
149
- isParentTheme.current = false;
150
- }
151
- }, [highContrastMode]);
152
- (0, _react2.useEffect)(function () {
153
- if (!isParentTheme.current) {
154
- /* Enables recomputation of component colors when flags are overridden on the provider
155
- by adding the respective key to modifications to trigger a recomputation. */
156
- // NOTE: Keeping this as placeholder for potential future usage during Borealis changes
157
- // TODO: remove once visual refresh is completed and flags are obsolete
158
- var flagsToRecompute = [];
159
- var keys = {};
160
- var forceRecomputeComponents = flagsToRecompute.some(function (item) {
161
- var _modifications$flags, _modifications$compon;
162
- if (!item) return false;
163
- if (Object.keys((_modifications$flags = modifications.flags) !== null && _modifications$flags !== void 0 ? _modifications$flags : {}).includes(item.flag) && !Object.keys((_modifications$compon = modifications.components) !== null && _modifications$compon !== void 0 ? _modifications$compon : {}).includes(item.componentKey)) {
164
- keys[item.componentKey] = {
165
- LIGHT: {},
166
- DARK: {}
167
- };
168
- return true;
169
- }
170
- return false;
171
- });
172
- var componentModifications = forceRecomputeComponents ? {
173
- components: keys
174
- } : {};
150
+ var componentModifications = forceRecomputeComponents ? {
151
+ components: keys
152
+ } : {};
153
+
154
+ // force recomputing of color & component tokens based on flag changes
155
+ var enhancedModifications = _objectSpread(_objectSpread({}, modificationsWithHighContrast), componentModifications);
156
+ return (0, _utils.getComputed)(system, (0, _utils.buildTheme)(enhancedModifications, "_".concat(system.key)), colorMode, highContrastMode);
157
+ }, [reusableParentTheme, system, colorMode, highContrastMode, modifications, modificationsWithHighContrast]);
175
158
 
176
- // force recomputing of color & component tokens based on flag changes
177
- var enhancedModifications = _objectSpread(_objectSpread({}, modificationsWithHighContrast), componentModifications);
178
- var rebuiltTheme = (0, _utils.getComputed)(system, (0, _utils.buildTheme)(enhancedModifications, "_".concat(system.key)), colorMode, highContrastMode);
179
- setTheme(rebuiltTheme);
159
+ // Genuine side effect - the vis color store is consumed outside of React
160
+ (0, _react2.useEffect)(function () {
161
+ if (isGlobalTheme) {
162
+ _color.EUI_VIS_COLOR_STORE.setVisColors(theme.colors.vis);
180
163
  }
181
- }, [colorMode, highContrastMode, system, modificationsWithHighContrast, modifications]);
182
- var _useState9 = (0, _react2.useState)(),
183
- _useState10 = _slicedToArray(_useState9, 2),
184
- themeCSSVariables = _useState10[0],
185
- _setThemeCSSVariables = _useState10[1];
164
+ }, [theme, isGlobalTheme]);
165
+ var _useState = (0, _react2.useState)(),
166
+ _useState2 = _slicedToArray(_useState, 2),
167
+ themeCSSVariables = _useState2[0],
168
+ _setThemeCSSVariables = _useState2[1];
186
169
  var setThemeCSSVariables = (0, _react2.useCallback)(function (variables) {
187
170
  return _setThemeCSSVariables(function (previous) {
188
171
  var merged = _objectSpread(_objectSpread({}, previous), variables);
@@ -1,4 +1,5 @@
1
1
  import _extends from "@babel/runtime/helpers/extends";
2
+ import _slicedToArray from "@babel/runtime/helpers/slicedToArray";
2
3
  import _objectWithoutProperties from "@babel/runtime/helpers/objectWithoutProperties";
3
4
  var _excluded = ["title", "headingElement", "text", "size", "color", "actionProps", "media", "onDismiss", "dismissButtonProps", "children", "className", "announceOnMount", "data-test-subj"];
4
5
  /*
@@ -9,7 +10,7 @@ var _excluded = ["title", "headingElement", "text", "size", "color", "actionProp
9
10
  * Side Public License, v 1.
10
11
  */
11
12
 
12
- import React, { forwardRef } from 'react';
13
+ import React, { forwardRef, useEffect, useRef, useState } from 'react';
13
14
  import classNames from 'classnames';
14
15
  import { useEuiMemoizedStyles } from '../../services';
15
16
  import { useEuiBackgroundColorCSS } from '../../global_styling';
@@ -52,6 +53,29 @@ export var EuiBanner = /*#__PURE__*/forwardRef(function (_ref, ref) {
52
53
  var primaryActionProps = actionProps === null || actionProps === void 0 ? void 0 : actionProps.primary;
53
54
  var secondaryActionProps = actionProps === null || actionProps === void 0 ? void 0 : actionProps.secondary;
54
55
  var hasActions = Boolean(primaryActionProps) || Boolean(secondaryActionProps);
56
+ var titleRef = useRef(null);
57
+ var contentRef = useRef(null);
58
+ var _useState = useState(''),
59
+ _useState2 = _slicedToArray(_useState, 2),
60
+ announcement = _useState2[0],
61
+ setAnnouncement = _useState2[1];
62
+ useEffect(function () {
63
+ var content = contentRef.current;
64
+ if (!announceOnMount || !content) {
65
+ setAnnouncement('');
66
+ return;
67
+ }
68
+
69
+ // `EuiText` does not forward refs. The text slot is the first direct
70
+ // `.euiText` child, since `children` render after it.
71
+ var textNode = text ? Array.from(content.children).find(function (node) {
72
+ return node.classList.contains('euiText');
73
+ }) : undefined;
74
+ var childrenText = Array.from(content.childNodes).filter(function (node) {
75
+ return node !== titleRef.current && node !== textNode;
76
+ }).map(readText).filter(Boolean).join(' ');
77
+ setAnnouncement([readText(titleRef.current), readText(textNode), childrenText].filter(Boolean).join(",\xA0"));
78
+ }, [announceOnMount, title, text, children]);
55
79
  var componentClass = 'euiBanner';
56
80
  var classes = classNames(componentClass, className);
57
81
  var backgroundColorStyles = useEuiBackgroundColorCSS()[color];
@@ -75,11 +99,13 @@ export var EuiBanner = /*#__PURE__*/forwardRef(function (_ref, ref) {
75
99
  className: "".concat(componentClass, "__body"),
76
100
  css: styles.body
77
101
  }, ___EmotionJSX("div", {
102
+ ref: contentRef,
78
103
  className: "".concat(componentClass, "__content"),
79
104
  css: styles.content
80
105
  }, ___EmotionJSX(EuiTitle, {
81
106
  size: headingSize
82
107
  }, ___EmotionJSX(Heading, {
108
+ ref: titleRef,
83
109
  css: styles.title,
84
110
  "data-test-subj": "".concat(dataTestSubj, "-title")
85
111
  }, title)), onDismiss ? ___EmotionJSX(EuiButtonIcon, _extends({
@@ -109,6 +135,12 @@ export var EuiBanner = /*#__PURE__*/forwardRef(function (_ref, ref) {
109
135
  }, secondaryActionProps, {
110
136
  color: "primary",
111
137
  size: "s"
112
- })) : null) : null)), announceOnMount && ___EmotionJSX(EuiLiveAnnouncer, null, title && title, title && text && ",\xA0", text && text, (title || text) && children && ",\xA0", children && children));
138
+ })) : null) : null)), announcement ? ___EmotionJSX(EuiLiveAnnouncer, null, announcement) : null);
113
139
  });
114
- EuiBanner.displayName = 'EuiBanner';
140
+ EuiBanner.displayName = 'EuiBanner';
141
+
142
+ // jsdom has no `innerText`, so tests read `textContent`
143
+ var readText = function readText(node) {
144
+ var _ref2, _innerText;
145
+ return (_ref2 = (_innerText = node === null || node === void 0 ? void 0 : node.innerText) !== null && _innerText !== void 0 ? _innerText : node === null || node === void 0 ? void 0 : node.textContent) === null || _ref2 === void 0 ? void 0 : _ref2.trim();
146
+ };
@@ -1,3 +1,4 @@
1
+ import _slicedToArray from "@babel/runtime/helpers/slicedToArray";
1
2
  import _extends from "@babel/runtime/helpers/extends";
2
3
  import _defineProperty from "@babel/runtime/helpers/defineProperty";
3
4
  import _objectWithoutProperties from "@babel/runtime/helpers/objectWithoutProperties";
@@ -12,7 +13,7 @@ function _objectSpread(e) { for (var r = 1; r < arguments.length; r++) { var t =
12
13
  * Side Public License, v 1.
13
14
  */
14
15
 
15
- import React, { forwardRef, useMemo } from 'react';
16
+ import React, { forwardRef, useEffect, useMemo, useRef, useState } from 'react';
16
17
  import classNames from 'classnames';
17
18
  import { getTokenName } from '@elastic/eui-theme-common';
18
19
  import { useCombinedRefs, useEuiMemoizedStyles, useEuiTheme } from '../../services';
@@ -165,9 +166,35 @@ export var EuiCallOut = /*#__PURE__*/forwardRef(function (_ref, ref) {
165
166
  "data-test-subj": dataTestSubj && "".concat(dataTestSubj, "__actions")
166
167
  }, actionPrimary, actionSecondary);
167
168
  }, [actionProps, color, styles, dataTestSubj]);
168
- var announcement = useMemo(function () {
169
- if (!announceOnMount || !(title || text || children)) return null;
170
- return ___EmotionJSX(EuiLiveAnnouncer, null, title, title && text && ",\xA0", text, (title || text) && children && ",\xA0", children);
169
+ var contentRef = useRef(null);
170
+ var _useState = useState(''),
171
+ _useState2 = _slicedToArray(_useState, 2),
172
+ announcement = _useState2[0],
173
+ setAnnouncement = _useState2[1];
174
+ useEffect(function () {
175
+ var content = contentRef.current;
176
+ if (!announceOnMount || !content) {
177
+ setAnnouncement('');
178
+ return;
179
+ }
180
+
181
+ // Read the nodes already on screen. The live region gets that text,
182
+ // not a second copy of the React tree. Only direct slots are read, so a
183
+ // callout nested in `children` is not picked up as this one's slots.
184
+ // Not `:scope >`: jsdom resolves `:scope` by tag and class, which the
185
+ // nested callout's content shares.
186
+ var parts = Array.from(content.children).filter(function (_ref2) {
187
+ var classList = _ref2.classList;
188
+ return ['euiCallOutHeader__title', 'euiCallOut__text', 'euiCallOut__additionalContent'].some(function (className) {
189
+ return classList.contains(className);
190
+ });
191
+ })
192
+ // jsdom has no `innerText`, so tests read `textContent`
193
+ .map(function (node) {
194
+ var _ref3, _node$innerText;
195
+ return (_ref3 = (_node$innerText = node.innerText) !== null && _node$innerText !== void 0 ? _node$innerText : node.textContent) === null || _ref3 === void 0 ? void 0 : _ref3.trim();
196
+ }).filter(Boolean);
197
+ setAnnouncement(parts.join(",\xA0"));
171
198
  }, [announceOnMount, title, text, children]);
172
199
  return ___EmotionJSX(EuiPanel, _extends({
173
200
  borderRadius: "none",
@@ -187,11 +214,12 @@ export var EuiCallOut = /*#__PURE__*/forwardRef(function (_ref, ref) {
187
214
  }, ___EmotionJSX("div", {
188
215
  css: styles.body
189
216
  }, icon, ___EmotionJSX("div", {
217
+ ref: contentRef,
190
218
  css: styles.content
191
219
  },
192
220
  // Note: the DOM position of the dismiss button matters to screen reader users.
193
221
  // We generally want them to have some context of _what_ they're dismissing,
194
222
  // instead of navigating to the dismiss button first before the callout content
195
- header && optionalChildren ? ___EmotionJSX(React.Fragment, null, header, dismissButton, optionalChildren) : ___EmotionJSX(React.Fragment, null, header || optionalChildren, dismissButton))), actionControls, announcement));
223
+ header && optionalChildren ? ___EmotionJSX(React.Fragment, null, header, dismissButton, optionalChildren) : ___EmotionJSX(React.Fragment, null, header || optionalChildren, dismissButton))), actionControls, announcement ? ___EmotionJSX(EuiLiveAnnouncer, null, announcement) : null));
196
224
  });
197
225
  EuiCallOut.displayName = 'EuiCallOut';
@@ -26,17 +26,9 @@ var EuiIconAddToChat = function EuiIconAddToChat(_ref) {
26
26
  }, props), title ? ___EmotionJSX("title", {
27
27
  id: titleId
28
28
  }, title) : null, ___EmotionJSX("path", {
29
- fillRule: "evenodd",
30
- d: "M8 0a1.5 1.5 0 0 1 .5 2.912V4H11a3 3 0 0 1 3 3h1l.102.005A1 1 0 0 1 16 8v1h-1V8h-1v1h-1V7a2 2 0 0 0-2-2H5a2 2 0 0 0-2 2v7h6v1H3a1 1 0 0 1-1-1v-2H1a1 1 0 0 1-1-1V8a1 1 0 0 1 1-1h1a3 3 0 0 1 3-3h2.5V2.912A1.498 1.498 0 0 1 8 0ZM1 11h1V8H1v3ZM8 1a.5.5 0 1 0 0 1 .5.5 0 0 0 0-1Z",
31
- clipRule: "evenodd"
29
+ d: "M14 13h2v1h-2v2h-1v-2h-2v-1h2v-2h1z"
32
30
  }), ___EmotionJSX("path", {
33
- d: "M10.447 11.523C9.826 12.767 8.59 13 8 13c-.59 0-1.826-.233-2.447-1.477l.894-.447C6.826 11.833 7.59 12 8 12c.41 0 1.174-.167 1.553-.924l.894.447Z"
34
- }), ___EmotionJSX("path", {
35
- fillRule: "evenodd",
36
- d: "M5.5 7a1.5 1.5 0 1 1 0 3 1.5 1.5 0 0 1 0-3Zm0 1a.5.5 0 1 0 0 1 .5.5 0 0 0 0-1Zm5-1a1.5 1.5 0 1 1 0 3 1.5 1.5 0 0 1 0-3Zm0 1a.5.5 0 1 0 0 1 .5.5 0 0 0 0-1Z",
37
- clipRule: "evenodd"
38
- }), ___EmotionJSX("path", {
39
- d: "M14 13h2v1h-2v2h-1v-2h-2v-1h2v-2h1v2Z"
31
+ d: "M9.389 1c.4 0 .783.116 1.078.328.294.212.533.55.533.972V3h1a3 3 0 0 1 3 3v1h1v2h-2V6a2 2 0 0 0-2-2H4a2 2 0 0 0-2 2v6a2 2 0 0 0 2 2h5v1H4a3 3 0 0 1-3-3v-2H0V7h1V6a3 3 0 0 1 3-3h1v-.7c0-.423.239-.76.533-.972A1.85 1.85 0 0 1 6.611 1zM6 10H5V7h1zm5 0h-1V7h1zM6 3h4V2H6z"
40
32
  }));
41
33
  };
42
34
  export var icon = EuiIconAddToChat;
@@ -0,0 +1,32 @@
1
+ import _extends from "@babel/runtime/helpers/extends";
2
+ import _objectWithoutProperties from "@babel/runtime/helpers/objectWithoutProperties";
3
+ var _excluded = ["title", "titleId"];
4
+ /*
5
+ * Copyright Elasticsearch B.V. and/or licensed to Elasticsearch B.V. under one
6
+ * or more contributor license agreements. Licensed under the Elastic License
7
+ * 2.0 and the Server Side Public License, v 1; you may not use this file except
8
+ * in compliance with, at your election, the Elastic License 2.0 or the Server
9
+ * Side Public License, v 1.
10
+ */
11
+
12
+ // THIS IS A GENERATED FILE. DO NOT MODIFY MANUALLY. @see scripts/compile-icons.js
13
+
14
+ import * as React from 'react';
15
+ import { jsx as ___EmotionJSX } from "@emotion/react";
16
+ var EuiIconProductAlertZero = function EuiIconProductAlertZero(_ref) {
17
+ var title = _ref.title,
18
+ titleId = _ref.titleId,
19
+ props = _objectWithoutProperties(_ref, _excluded);
20
+ return ___EmotionJSX("svg", _extends({
21
+ xmlns: "http://www.w3.org/2000/svg",
22
+ width: 16,
23
+ height: 16,
24
+ viewBox: "0 0 16 16",
25
+ "aria-labelledby": titleId
26
+ }, props), title ? ___EmotionJSX("title", {
27
+ id: titleId
28
+ }, title) : null, ___EmotionJSX("path", {
29
+ d: "M11.283 14.24A7 7 0 0 1 8 15.053l-.362-.01a7 7 0 0 1-2.976-.833l.642-.793A6 6 0 0 0 8 14.053c.989 0 1.921-.24 2.745-.661zM8 .016a1.486 1.486 0 0 1 .365 2.925v2.084A2.997 2.997 0 0 1 10.995 8l-.003.153a3 3 0 0 1-.231 1.002l1.826 1.055a1.485 1.485 0 1 1-.382.648l-1.82-1.05a2.99 2.99 0 0 1-2.386 1.19l-.154-.005a3 3 0 0 1-2.22-1.166L3.8 10.88a1.485 1.485 0 0 1-2.722 1.125 1.487 1.487 0 0 1 2.35-1.78l1.815-1.048a3 3 0 0 1-.238-1.025L5 8a3 3 0 0 1 2.612-2.974v-2.09A1.485 1.485 0 0 1 8 .016M2.787 11.019a.487.487 0 1 0-.844.487.487.487 0 0 0 .844-.487m11.09-.18a.487.487 0 1 0-.484.844.487.487 0 0 0 .485-.843M8 6.002a1.998 1.998 0 1 0 0 3.997A1.998 1.998 0 0 0 8 6m0-4.985a.487.487 0 1 0 0 .974.487.487 0 0 0 0-.973M4.802 2.878A6.04 6.04 0 0 0 1.955 7.99l-1 .023v-.005A7.04 7.04 0 0 1 4.28 2.023zm6.993-.806a7.04 7.04 0 0 1 3.249 5.925l-1 .006a6.04 6.04 0 0 0-2.835-5.117z"
30
+ }));
31
+ };
32
+ export var icon = EuiIconProductAlertZero;
@@ -1907,6 +1907,11 @@ export var typeToPathMap = {
1907
1907
  }, {
1908
1908
  synonyms: ['agent', 'product', 'elastic agent', 'fleet', 'monitoring']
1909
1909
  }),
1910
+ productAlertZero: withMetadata(function () {
1911
+ return import('./assets/product_alert_zero');
1912
+ }, {
1913
+ synonyms: ['alertzero', 'alert', 'zero', 'attack', 'security']
1914
+ }),
1910
1915
  productCanvas: withMetadata(function () {
1911
1916
  return import('./assets/product_canvas');
1912
1917
  }, {
@@ -1,6 +1,4 @@
1
1
  <svg xmlns="http://www.w3.org/2000/svg" width="16" height="16" viewBox="0 0 16 16">
2
- <path fill-rule="evenodd" d="M8 0a1.5 1.5 0 0 1 .5 2.912V4H11a3 3 0 0 1 3 3h1l.102.005A1 1 0 0 1 16 8v1h-1V8h-1v1h-1V7a2 2 0 0 0-2-2H5a2 2 0 0 0-2 2v7h6v1H3a1 1 0 0 1-1-1v-2H1a1 1 0 0 1-1-1V8a1 1 0 0 1 1-1h1a3 3 0 0 1 3-3h2.5V2.912A1.498 1.498 0 0 1 8 0ZM1 11h1V8H1v3ZM8 1a.5.5 0 1 0 0 1 .5.5 0 0 0 0-1Z" clip-rule="evenodd"/>
3
- <path d="M10.447 11.523C9.826 12.767 8.59 13 8 13c-.59 0-1.826-.233-2.447-1.477l.894-.447C6.826 11.833 7.59 12 8 12c.41 0 1.174-.167 1.553-.924l.894.447Z"/>
4
- <path fill-rule="evenodd" d="M5.5 7a1.5 1.5 0 1 1 0 3 1.5 1.5 0 0 1 0-3Zm0 1a.5.5 0 1 0 0 1 .5.5 0 0 0 0-1Zm5-1a1.5 1.5 0 1 1 0 3 1.5 1.5 0 0 1 0-3Zm0 1a.5.5 0 1 0 0 1 .5.5 0 0 0 0-1Z" clip-rule="evenodd"/>
5
- <path d="M14 13h2v1h-2v2h-1v-2h-2v-1h2v-2h1v2Z"/>
6
- </svg>
2
+ <path d="M14 13h2v1h-2v2h-1v-2h-2v-1h2v-2h1z"/>
3
+ <path d="M9.389 1c.4 0 .783.116 1.078.328.294.212.533.55.533.972V3h1a3 3 0 0 1 3 3v1h1v2h-2V6a2 2 0 0 0-2-2H4a2 2 0 0 0-2 2v6a2 2 0 0 0 2 2h5v1H4a3 3 0 0 1-3-3v-2H0V7h1V6a3 3 0 0 1 3-3h1v-.7c0-.423.239-.76.533-.972A1.85 1.85 0 0 1 6.611 1zM6 10H5V7h1zm5 0h-1V7h1zM6 3h4V2H6z"/>
4
+ </svg>
@@ -0,0 +1,5 @@
1
+ <svg xmlns="http://www.w3.org/2000/svg" width="16" height="16" viewBox="0 0 16 16">
2
+ <path d="M11.283 14.24A7 7 0 0 1 8 15.053l-.362-.01a7 7 0 0 1-2.976-.833l.642-.793A6 6 0 0 0 8 14.053c.989 0 1.921-.24 2.745-.661z"/>
3
+ <path d="M8 .016a1.486 1.486 0 0 1 .365 2.925v2.084A2.997 2.997 0 0 1 10.995 8l-.003.153a3 3 0 0 1-.231 1.002l1.826 1.055a1.485 1.485 0 1 1-.382.648l-1.82-1.05a2.99 2.99 0 0 1-2.386 1.19l-.154-.005a3 3 0 0 1-2.22-1.166L3.8 10.88a1.485 1.485 0 0 1-2.722 1.125 1.487 1.487 0 0 1 2.35-1.78l1.815-1.048a3 3 0 0 1-.238-1.025L5 8a3 3 0 0 1 2.612-2.974v-2.09A1.485 1.485 0 0 1 8 .016M2.787 11.019a.487.487 0 1 0-.844.487.487.487 0 0 0 .844-.487m11.09-.18a.487.487 0 1 0-.484.844.487.487 0 0 0 .485-.843M8 6.002a1.998 1.998 0 1 0 0 3.997A1.998 1.998 0 0 0 8 6m0-4.985a.487.487 0 1 0 0 .974.487.487 0 0 0 0-.973"/>
4
+ <path d="M4.802 2.878A6.04 6.04 0 0 0 1.955 7.99l-1 .023v-.005A7.04 7.04 0 0 1 4.28 2.023zm6.993-.806a7.04 7.04 0 0 1 3.249 5.925l-1 .006a6.04 6.04 0 0 0-2.835-5.117z"/>
5
+ </svg>
@@ -20,7 +20,11 @@ var _ref = process.env.NODE_ENV === "production" ? {
20
20
  };
21
21
  export var euiSelectableTemplateSitewideStyles = function euiSelectableTemplateSitewideStyles(euiThemeContext) {
22
22
  var euiTheme = euiThemeContext.euiTheme;
23
- var visColors = euiPaletteColorBlind();
23
+
24
+ // Pass the theme's vis colors explicitly - see the note in token.styles.ts
25
+ var visColors = euiPaletteColorBlind({
26
+ colors: euiTheme.colors.vis
27
+ });
24
28
  return {
25
29
  euiSelectableTemplateSitewide: _ref,
26
30
  euiSelectableTemplateSitewide__optionMetasList: /*#__PURE__*/css("display:block;", euiFontSize(euiThemeContext, 'xs'), " color:", euiTheme.colors.textSubdued, ";;label:euiSelectableTemplateSitewide__optionMetasList;"),
@@ -18,10 +18,16 @@ var getTokenColor = function getTokenColor(euiThemeContext, fill, color) {
18
18
  var euiTheme = euiThemeContext.euiTheme,
19
19
  colorMode = euiThemeContext.colorMode,
20
20
  highContrastMode = euiThemeContext.highContrastMode;
21
- // use inside function as they are not returning constants,
22
- // but internally depend on EUI_VIS_COLOR_STORE to update per theme
23
- var visColors = euiPaletteColorBlind();
24
- var visColorsBehindText = euiPaletteColorBlindBehindText();
21
+ // Pass the theme's vis colors explicitly rather than letting these fall back to
22
+ // EUI_VIS_COLOR_STORE - the store is only updated in an effect, so on the first
23
+ // render it can still hold the previous theme's palette. Memoized styles are not
24
+ // regenerated for a store update, so those colors would stay stale.
25
+ var visColors = euiPaletteColorBlind({
26
+ colors: euiTheme.colors.vis
27
+ });
28
+ var visColorsBehindText = euiPaletteColorBlindBehindText({
29
+ colors: euiTheme.colors.vis
30
+ });
25
31
  var isVizColor = typeof color === 'number';
26
32
  var iconColor = isVizColor ? visColors[color] : euiTheme.colors.darkShade;
27
33
  var isDarkMode = colorMode === 'DARK';