@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.
- package/dist/eui-icons.json +92 -91
- package/dist/svgs/add_to_chat.svg +3 -5
- package/dist/svgs/product_alert_zero.svg +5 -0
- package/es/components/avatar/avatar.js +1 -1
- package/es/components/badge/badge.js +1 -1
- package/es/components/badge/beta_badge/beta_badge.js +1 -1
- package/es/components/banner/banner.js +40 -3
- package/es/components/basic_table/basic_table.js +4 -4
- package/es/components/basic_table/in_memory_table.js +4 -4
- package/es/components/button/button_display/_button_display_content.js +1 -1
- package/es/components/button/button_empty/button_empty.js +1 -1
- package/es/components/button/button_icon/button_icon.js +1 -1
- package/es/components/call_out/call_out.js +40 -7
- package/es/components/card/card.js +1 -1
- package/es/components/collapsible_nav/collapsible_nav_group/collapsible_nav_group.js +1 -1
- package/es/components/comment_list/comment.js +2 -2
- package/es/components/comment_list/comment_event.js +1 -1
- package/es/components/comment_list/comment_list.js +2 -2
- package/es/components/comment_list/comment_timeline.js +1 -1
- package/es/components/context_menu/context_menu_item.js +1 -1
- package/es/components/datagrid/body/cell/data_grid_cell.js +24 -24
- package/es/components/datagrid/body/data_grid_body.js +13 -13
- package/es/components/datagrid/body/data_grid_body_custom.js +13 -13
- package/es/components/datagrid/body/data_grid_body_virtualized.js +13 -13
- package/es/components/datagrid/body/header/data_grid_header_cell.js +12 -12
- package/es/components/datagrid/controls/column_sorting.js +13 -13
- package/es/components/datagrid/controls/column_sorting_draggable.js +1 -1
- package/es/components/datagrid/controls/data_grid_toolbar_control.js +1 -1
- package/es/components/datagrid/utils/in_memory.js +12 -12
- package/es/components/date_picker/date_picker.js +2 -2
- package/es/components/date_picker/date_picker_range.js +1 -1
- package/es/components/empty_prompt/empty_prompt.js +1 -1
- package/es/components/flyout/flyout_menu/flyout_menu.js +2 -2
- package/es/components/form/field_number/field_number.js +2 -2
- package/es/components/form/field_text/field_text.js +2 -2
- package/es/components/form/form_control_button/form_control_button.js +1 -1
- package/es/components/form/form_control_layout/append_prepend/form_append_prepend.js +2 -2
- package/es/components/form/form_control_layout/form_control_layout.js +2 -2
- package/es/components/form/form_control_layout/form_control_layout_custom_icon.js +1 -1
- package/es/components/form/text_area/text_area.js +2 -2
- package/es/components/header/header_links/header_link.js +1 -1
- package/es/components/header/header_links/header_links.js +1 -1
- package/es/components/header/header_section/header_section_item_button.js +1 -1
- package/es/components/icon/assets/add_to_chat.js +2 -10
- package/es/components/icon/assets/product_alert_zero.js +33 -0
- package/es/components/icon/icon.js +1 -1
- package/es/components/icon/icon_map.js +5 -0
- package/es/components/icon/svgs/add_to_chat.svg +3 -5
- package/es/components/icon/svgs/product_alert_zero.svg +5 -0
- package/es/components/key_pad_menu/key_pad_menu_item.js +1 -1
- package/es/components/list_group/list_group.js +2 -2
- package/es/components/list_group/list_group_item.js +2 -2
- package/es/components/list_group/list_group_item_extra_action.js +1 -1
- package/es/components/list_group/pinnable_list_group/pinnable_list_group.js +4 -4
- package/es/components/loading/loading_logo.js +1 -1
- package/es/components/markdown_editor/markdown_editor.js +1 -1
- package/es/components/markdown_editor/markdown_editor_drop_zone.js +1 -1
- package/es/components/markdown_editor/markdown_editor_footer.js +1 -1
- package/es/components/markdown_editor/markdown_editor_toolbar.js +1 -1
- package/es/components/page/page_header/page_header_content.js +1 -1
- package/es/components/pagination/pagination_button.js +1 -1
- package/es/components/selectable/selectable_list/selectable_list.js +1 -1
- package/es/components/selectable/selectable_list/selectable_list_item.js +1 -1
- package/es/components/selectable/selectable_templates/selectable_template_sitewide.js +1 -1
- package/es/components/selectable/selectable_templates/selectable_template_sitewide.styles.js +5 -1
- package/es/components/table/table_header_cell.js +1 -1
- package/es/components/timeline/timeline_item_icon.js +1 -1
- package/es/components/toast/global_toast_list.js +2 -2
- package/es/components/toast/toast.js +2 -2
- package/es/components/token/token.styles.js +10 -4
- package/es/components/tool_tip/icon_tip.js +1 -1
- package/es/services/theme/provider.js +86 -101
- package/eui.d.ts +23 -11
- package/lib/components/avatar/avatar.js +1 -1
- package/lib/components/badge/badge.js +1 -1
- package/lib/components/badge/beta_badge/beta_badge.js +1 -1
- package/lib/components/banner/banner.js +39 -2
- package/lib/components/basic_table/basic_table.js +4 -4
- package/lib/components/basic_table/in_memory_table.js +4 -4
- package/lib/components/button/button_display/_button_display_content.js +1 -1
- package/lib/components/button/button_empty/button_empty.js +1 -1
- package/lib/components/button/button_icon/button_icon.js +1 -1
- package/lib/components/call_out/call_out.js +39 -6
- package/lib/components/card/card.js +1 -1
- package/lib/components/collapsible_nav/collapsible_nav_group/collapsible_nav_group.js +1 -1
- package/lib/components/comment_list/comment.js +2 -2
- package/lib/components/comment_list/comment_event.js +1 -1
- package/lib/components/comment_list/comment_list.js +2 -2
- package/lib/components/comment_list/comment_timeline.js +1 -1
- package/lib/components/context_menu/context_menu_item.js +1 -1
- package/lib/components/datagrid/body/cell/data_grid_cell.js +24 -24
- package/lib/components/datagrid/body/data_grid_body.js +13 -13
- package/lib/components/datagrid/body/data_grid_body_custom.js +13 -13
- package/lib/components/datagrid/body/data_grid_body_virtualized.js +13 -13
- package/lib/components/datagrid/body/header/data_grid_header_cell.js +12 -12
- package/lib/components/datagrid/controls/column_sorting.js +13 -13
- package/lib/components/datagrid/controls/column_sorting_draggable.js +1 -1
- package/lib/components/datagrid/controls/data_grid_toolbar_control.js +1 -1
- package/lib/components/datagrid/utils/in_memory.js +12 -12
- package/lib/components/date_picker/date_picker.js +2 -2
- package/lib/components/date_picker/date_picker_range.js +1 -1
- package/lib/components/empty_prompt/empty_prompt.js +1 -1
- package/lib/components/flyout/flyout_menu/flyout_menu.js +2 -2
- package/lib/components/form/field_number/field_number.js +2 -2
- package/lib/components/form/field_text/field_text.js +2 -2
- package/lib/components/form/form_control_button/form_control_button.js +1 -1
- package/lib/components/form/form_control_layout/append_prepend/form_append_prepend.js +2 -2
- package/lib/components/form/form_control_layout/form_control_layout.js +2 -2
- package/lib/components/form/form_control_layout/form_control_layout_custom_icon.js +1 -1
- package/lib/components/form/text_area/text_area.js +2 -2
- package/lib/components/header/header_links/header_link.js +1 -1
- package/lib/components/header/header_links/header_links.js +1 -1
- package/lib/components/header/header_section/header_section_item_button.js +1 -1
- package/lib/components/icon/assets/add_to_chat.js +2 -10
- package/lib/components/icon/assets/product_alert_zero.js +40 -0
- package/lib/components/icon/icon.js +1 -1
- package/lib/components/icon/icon_map.js +7 -0
- package/lib/components/icon/svgs/add_to_chat.svg +3 -5
- package/lib/components/icon/svgs/product_alert_zero.svg +5 -0
- package/lib/components/key_pad_menu/key_pad_menu_item.js +1 -1
- package/lib/components/list_group/list_group.js +2 -2
- package/lib/components/list_group/list_group_item.js +2 -2
- package/lib/components/list_group/list_group_item_extra_action.js +1 -1
- package/lib/components/list_group/pinnable_list_group/pinnable_list_group.js +4 -4
- package/lib/components/loading/loading_logo.js +1 -1
- package/lib/components/markdown_editor/markdown_editor.js +1 -1
- package/lib/components/markdown_editor/markdown_editor_drop_zone.js +1 -1
- package/lib/components/markdown_editor/markdown_editor_footer.js +1 -1
- package/lib/components/markdown_editor/markdown_editor_toolbar.js +1 -1
- package/lib/components/page/page_header/page_header_content.js +1 -1
- package/lib/components/pagination/pagination_button.js +1 -1
- package/lib/components/selectable/selectable_list/selectable_list.js +1 -1
- package/lib/components/selectable/selectable_list/selectable_list_item.js +1 -1
- package/lib/components/selectable/selectable_templates/selectable_template_sitewide.js +1 -1
- package/lib/components/selectable/selectable_templates/selectable_template_sitewide.styles.js +5 -1
- package/lib/components/table/table_header_cell.js +1 -1
- package/lib/components/timeline/timeline_item_icon.js +1 -1
- package/lib/components/toast/global_toast_list.js +2 -2
- package/lib/components/toast/toast.js +2 -2
- package/lib/components/token/token.styles.js +10 -4
- package/lib/components/tool_tip/icon_tip.js +1 -1
- package/lib/services/theme/provider.js +85 -102
- package/optimize/es/components/banner/banner.js +35 -3
- package/optimize/es/components/call_out/call_out.js +33 -5
- package/optimize/es/components/icon/assets/add_to_chat.js +2 -10
- package/optimize/es/components/icon/assets/product_alert_zero.js +32 -0
- package/optimize/es/components/icon/icon_map.js +5 -0
- package/optimize/es/components/icon/svgs/add_to_chat.svg +3 -5
- package/optimize/es/components/icon/svgs/product_alert_zero.svg +5 -0
- package/optimize/es/components/selectable/selectable_templates/selectable_template_sitewide.styles.js +5 -1
- package/optimize/es/components/token/token.styles.js +10 -4
- package/optimize/es/services/theme/provider.js +82 -97
- package/optimize/lib/components/banner/banner.js +34 -2
- package/optimize/lib/components/call_out/call_out.js +32 -4
- package/optimize/lib/components/icon/assets/add_to_chat.js +2 -10
- package/optimize/lib/components/icon/assets/product_alert_zero.js +40 -0
- package/optimize/lib/components/icon/icon_map.js +7 -0
- package/optimize/lib/components/icon/svgs/add_to_chat.svg +3 -5
- package/optimize/lib/components/icon/svgs/product_alert_zero.svg +5 -0
- package/optimize/lib/components/selectable/selectable_templates/selectable_template_sitewide.styles.js +5 -1
- package/optimize/lib/components/token/token.styles.js +10 -4
- package/optimize/lib/services/theme/provider.js +80 -97
- package/package.json +6 -6
- package/test-env/components/avatar/avatar.js +1 -1
- package/test-env/components/badge/badge.js +1 -1
- package/test-env/components/badge/beta_badge/beta_badge.js +1 -1
- package/test-env/components/banner/banner.js +34 -2
- package/test-env/components/basic_table/basic_table.js +4 -4
- package/test-env/components/basic_table/in_memory_table.js +4 -4
- package/test-env/components/button/button_display/_button_display_content.js +1 -1
- package/test-env/components/button/button_empty/button_empty.js +1 -1
- package/test-env/components/button/button_icon/button_icon.js +1 -1
- package/test-env/components/call_out/call_out.js +34 -6
- package/test-env/components/card/card.js +1 -1
- package/test-env/components/collapsible_nav/collapsible_nav_group/collapsible_nav_group.js +1 -1
- package/test-env/components/comment_list/comment.js +2 -2
- package/test-env/components/comment_list/comment_event.js +1 -1
- package/test-env/components/comment_list/comment_list.js +2 -2
- package/test-env/components/comment_list/comment_timeline.js +1 -1
- package/test-env/components/context_menu/context_menu_item.js +1 -1
- package/test-env/components/datagrid/body/cell/data_grid_cell.js +24 -24
- package/test-env/components/datagrid/body/data_grid_body.js +13 -13
- package/test-env/components/datagrid/body/data_grid_body_custom.js +13 -13
- package/test-env/components/datagrid/body/data_grid_body_virtualized.js +13 -13
- package/test-env/components/datagrid/body/header/data_grid_header_cell.js +12 -12
- package/test-env/components/datagrid/controls/column_sorting.js +13 -13
- package/test-env/components/datagrid/controls/column_sorting_draggable.js +1 -1
- package/test-env/components/datagrid/controls/data_grid_toolbar_control.js +1 -1
- package/test-env/components/datagrid/utils/in_memory.js +12 -12
- package/test-env/components/date_picker/date_picker.js +2 -2
- package/test-env/components/date_picker/date_picker_range.js +1 -1
- package/test-env/components/empty_prompt/empty_prompt.js +1 -1
- package/test-env/components/flyout/flyout_menu/flyout_menu.js +2 -2
- package/test-env/components/form/field_number/field_number.js +2 -2
- package/test-env/components/form/field_text/field_text.js +2 -2
- package/test-env/components/form/form_control_button/form_control_button.js +1 -1
- package/test-env/components/form/form_control_layout/append_prepend/form_append_prepend.js +2 -2
- package/test-env/components/form/form_control_layout/form_control_layout.js +2 -2
- package/test-env/components/form/form_control_layout/form_control_layout_custom_icon.js +1 -1
- package/test-env/components/form/text_area/text_area.js +2 -2
- package/test-env/components/header/header_links/header_link.js +1 -1
- package/test-env/components/header/header_links/header_links.js +1 -1
- package/test-env/components/header/header_section/header_section_item_button.js +1 -1
- package/test-env/components/icon/assets/add_to_chat.js +2 -10
- package/test-env/components/icon/assets/product_alert_zero.js +40 -0
- package/test-env/components/icon/icon_map.js +7 -0
- package/test-env/components/key_pad_menu/key_pad_menu_item.js +1 -1
- package/test-env/components/list_group/list_group.js +2 -2
- package/test-env/components/list_group/list_group_item.js +2 -2
- package/test-env/components/list_group/list_group_item_extra_action.js +1 -1
- package/test-env/components/list_group/pinnable_list_group/pinnable_list_group.js +4 -4
- package/test-env/components/loading/loading_logo.js +1 -1
- package/test-env/components/markdown_editor/markdown_editor.js +1 -1
- package/test-env/components/markdown_editor/markdown_editor_drop_zone.js +1 -1
- package/test-env/components/markdown_editor/markdown_editor_footer.js +1 -1
- package/test-env/components/markdown_editor/markdown_editor_toolbar.js +1 -1
- package/test-env/components/page/page_header/page_header_content.js +1 -1
- package/test-env/components/pagination/pagination_button.js +1 -1
- package/test-env/components/selectable/selectable_list/selectable_list.js +1 -1
- package/test-env/components/selectable/selectable_list/selectable_list_item.js +1 -1
- package/test-env/components/selectable/selectable_templates/selectable_template_sitewide.js +1 -1
- package/test-env/components/selectable/selectable_templates/selectable_template_sitewide.styles.js +5 -1
- package/test-env/components/table/table_header_cell.js +1 -1
- package/test-env/components/timeline/timeline_item_icon.js +1 -1
- package/test-env/components/toast/global_toast_list.js +2 -2
- package/test-env/components/toast/toast.js +2 -2
- package/test-env/components/token/token.styles.js +10 -4
- package/test-env/components/tool_tip/icon_tip.js +1 -1
- 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
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
var
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
var
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
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
|
-
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
|
|
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
|
-
|
|
109
|
-
|
|
110
|
-
|
|
111
|
-
|
|
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
|
-
|
|
114
|
-
|
|
115
|
-
|
|
116
|
-
|
|
117
|
-
|
|
118
|
-
|
|
119
|
-
|
|
120
|
-
|
|
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
|
-
|
|
177
|
-
|
|
178
|
-
|
|
179
|
-
|
|
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
|
-
}, [
|
|
182
|
-
var
|
|
183
|
-
|
|
184
|
-
themeCSSVariables =
|
|
185
|
-
_setThemeCSSVariables =
|
|
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)),
|
|
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
|
|
169
|
-
|
|
170
|
-
|
|
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
|
-
|
|
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: "
|
|
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
|
|
3
|
-
<path d="
|
|
4
|
-
|
|
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
|
-
|
|
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
|
-
//
|
|
22
|
-
//
|
|
23
|
-
|
|
24
|
-
|
|
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';
|