@elastic/eui 116.5.0 → 117.0.0-snapshot.1783954480414

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 (309) hide show
  1. package/es/components/avatar/avatar.js +1 -1
  2. package/es/components/badge/badge.js +1 -1
  3. package/es/components/badge/beta_badge/beta_badge.js +1 -1
  4. package/es/components/basic_table/basic_table.js +4 -4
  5. package/es/components/basic_table/in_memory_table.js +13 -4
  6. package/es/components/button/button_display/_button_display_content.js +1 -1
  7. package/es/components/button/button_empty/button_empty.js +1 -1
  8. package/es/components/button/button_icon/button_icon.js +1 -1
  9. package/es/components/call_out/call_out.js +230 -30
  10. package/es/components/call_out/call_out.styles.js +36 -43
  11. package/es/components/call_out/call_out_action.js +45 -0
  12. package/es/components/call_out/types.js +11 -0
  13. package/es/components/call_out/use_layout_observer.js +54 -0
  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/collapsible_nav_beta/_kibana_solution/collapsible_nav_kibana_solution.js +1 -1
  17. package/es/components/collapsible_nav_beta/collapsible_nav_item/collapsed/collapsed_nav_button.js +1 -1
  18. package/es/components/collapsible_nav_beta/collapsible_nav_item/collapsed/collapsed_nav_item.js +2 -2
  19. package/es/components/collapsible_nav_beta/collapsible_nav_item/collapsed/collapsed_nav_popover.js +2 -2
  20. package/es/components/collapsible_nav_beta/collapsible_nav_item/collapsible_nav_item.js +4 -4
  21. package/es/components/comment_list/comment.js +2 -2
  22. package/es/components/comment_list/comment_event.js +1 -1
  23. package/es/components/comment_list/comment_list.js +2 -2
  24. package/es/components/comment_list/comment_timeline.js +1 -1
  25. package/es/components/context_menu/context_menu_item.js +1 -1
  26. package/es/components/datagrid/body/cell/data_grid_cell.js +12 -12
  27. package/es/components/datagrid/body/data_grid_body.js +7 -7
  28. package/es/components/datagrid/body/data_grid_body_custom.js +7 -7
  29. package/es/components/datagrid/body/data_grid_body_virtualized.js +7 -7
  30. package/es/components/datagrid/body/header/data_grid_header_cell.js +6 -6
  31. package/es/components/datagrid/controls/column_sorting.js +7 -7
  32. package/es/components/datagrid/controls/column_sorting_draggable.js +1 -1
  33. package/es/components/datagrid/controls/data_grid_toolbar_control.js +1 -20
  34. package/es/components/datagrid/utils/in_memory.js +6 -6
  35. package/es/components/date_picker/date_picker.js +2 -2
  36. package/es/components/date_picker/date_picker_range.js +1 -1
  37. package/es/components/empty_prompt/empty_prompt.js +1 -1
  38. package/es/components/flyout/flyout.component.js +12 -7
  39. package/es/components/flyout/flyout.styles.js +1 -1
  40. package/es/components/flyout/flyout_body.styles.js +1 -4
  41. package/es/components/flyout/flyout_menu.js +2 -2
  42. package/es/components/flyout/manager/flyout_child.js +1 -1
  43. package/es/components/flyout/manager/flyout_managed.js +1 -1
  44. package/es/components/form/field_number/field_number.js +2 -2
  45. package/es/components/form/field_text/field_text.js +2 -2
  46. package/es/components/form/form_control_button/form_control_button.js +1 -1
  47. package/es/components/form/form_control_layout/append_prepend/form_append_prepend.js +2 -2
  48. package/es/components/form/form_control_layout/form_control_layout.js +2 -2
  49. package/es/components/form/form_control_layout/form_control_layout_custom_icon.js +1 -1
  50. package/es/components/form/text_area/text_area.js +2 -2
  51. package/es/components/header/header_links/header_link.js +1 -1
  52. package/es/components/header/header_links/header_links.js +1 -1
  53. package/es/components/header/header_logo/header_logo.js +1 -1
  54. package/es/components/header/header_section/header_section_item_button.js +1 -1
  55. package/es/components/icon/assets/add_to_chat.js +43 -0
  56. package/es/components/icon/icon.js +1 -1
  57. package/es/components/icon/icon_map.js +1883 -912
  58. package/es/components/illustration/illustration.js +86 -0
  59. package/es/components/illustration/illustration.styles.js +16 -0
  60. package/es/components/illustration/index.js +9 -0
  61. package/es/components/index.js +1 -0
  62. package/es/components/key_pad_menu/key_pad_menu_item.js +1 -1
  63. package/es/components/list_group/list_group.js +2 -2
  64. package/es/components/list_group/list_group_item.js +2 -2
  65. package/es/components/list_group/list_group_item_extra_action.js +1 -1
  66. package/es/components/list_group/pinnable_list_group/pinnable_list_group.js +4 -4
  67. package/es/components/loading/loading_logo.js +1 -1
  68. package/es/components/markdown_editor/markdown_editor.js +1 -1
  69. package/es/components/markdown_editor/markdown_editor_drop_zone.js +1 -1
  70. package/es/components/markdown_editor/markdown_editor_footer.js +1 -1
  71. package/es/components/markdown_editor/markdown_editor_toolbar.js +1 -1
  72. package/es/components/page/page_header/page_header_content.js +1 -1
  73. package/es/components/pagination/pagination_button.js +1 -1
  74. package/es/components/panel/panel.styles.js +3 -3
  75. package/es/components/panel/split_panel/split_panel.styles.js +4 -4
  76. package/es/components/popover/with_popover.js +17 -0
  77. package/es/components/search_bar/search_bar.js +190 -376
  78. package/es/components/search_bar/search_filters.js +10 -3
  79. package/es/components/selectable/selectable_list/selectable_list.js +8 -1
  80. package/es/components/selectable/selectable_list/selectable_list_item.js +1 -1
  81. package/es/components/selectable/selectable_templates/selectable_template_sitewide.js +1 -1
  82. package/es/components/table/table_header_cell.js +1 -1
  83. package/es/components/timeline/timeline_item_icon.js +1 -1
  84. package/es/components/toast/global_toast_list.js +2 -2
  85. package/es/components/toast/toast.js +2 -2
  86. package/es/components/toast/toast.styles.js +2 -2
  87. package/es/components/tool_tip/icon_tip.js +1 -1
  88. package/es/components/tool_tip/with_tooltip.js +14 -0
  89. package/eui.d.ts +1107 -904
  90. package/lib/components/avatar/avatar.js +1 -1
  91. package/lib/components/badge/badge.js +1 -1
  92. package/lib/components/badge/beta_badge/beta_badge.js +1 -1
  93. package/lib/components/basic_table/basic_table.js +4 -4
  94. package/lib/components/basic_table/in_memory_table.js +13 -4
  95. package/lib/components/button/button_display/_button_display_content.js +1 -1
  96. package/lib/components/button/button_empty/button_empty.js +1 -1
  97. package/lib/components/button/button_icon/button_icon.js +1 -1
  98. package/lib/components/call_out/call_out.js +230 -30
  99. package/lib/components/call_out/call_out.styles.js +37 -42
  100. package/lib/components/call_out/call_out_action.js +51 -0
  101. package/lib/components/call_out/types.js +17 -0
  102. package/lib/components/call_out/use_layout_observer.js +58 -0
  103. package/lib/components/card/card.js +1 -1
  104. package/lib/components/collapsible_nav/collapsible_nav_group/collapsible_nav_group.js +1 -1
  105. package/lib/components/collapsible_nav_beta/_kibana_solution/collapsible_nav_kibana_solution.js +1 -1
  106. package/lib/components/collapsible_nav_beta/collapsible_nav_item/collapsed/collapsed_nav_button.js +1 -1
  107. package/lib/components/collapsible_nav_beta/collapsible_nav_item/collapsed/collapsed_nav_item.js +2 -2
  108. package/lib/components/collapsible_nav_beta/collapsible_nav_item/collapsed/collapsed_nav_popover.js +2 -2
  109. package/lib/components/collapsible_nav_beta/collapsible_nav_item/collapsible_nav_item.js +4 -4
  110. package/lib/components/comment_list/comment.js +2 -2
  111. package/lib/components/comment_list/comment_event.js +1 -1
  112. package/lib/components/comment_list/comment_list.js +2 -2
  113. package/lib/components/comment_list/comment_timeline.js +1 -1
  114. package/lib/components/context_menu/context_menu_item.js +1 -1
  115. package/lib/components/datagrid/body/cell/data_grid_cell.js +12 -12
  116. package/lib/components/datagrid/body/data_grid_body.js +7 -7
  117. package/lib/components/datagrid/body/data_grid_body_custom.js +7 -7
  118. package/lib/components/datagrid/body/data_grid_body_virtualized.js +7 -7
  119. package/lib/components/datagrid/body/header/data_grid_header_cell.js +6 -6
  120. package/lib/components/datagrid/controls/column_sorting.js +7 -7
  121. package/lib/components/datagrid/controls/column_sorting_draggable.js +1 -1
  122. package/lib/components/datagrid/controls/data_grid_toolbar_control.js +1 -20
  123. package/lib/components/datagrid/utils/in_memory.js +6 -6
  124. package/lib/components/date_picker/date_picker.js +2 -2
  125. package/lib/components/date_picker/date_picker_range.js +1 -1
  126. package/lib/components/empty_prompt/empty_prompt.js +1 -1
  127. package/lib/components/flyout/flyout.component.js +11 -6
  128. package/lib/components/flyout/flyout.styles.js +1 -1
  129. package/lib/components/flyout/flyout_body.styles.js +1 -4
  130. package/lib/components/flyout/flyout_menu.js +2 -2
  131. package/lib/components/flyout/manager/flyout_child.js +1 -1
  132. package/lib/components/form/field_number/field_number.js +2 -2
  133. package/lib/components/form/field_text/field_text.js +2 -2
  134. package/lib/components/form/form_control_button/form_control_button.js +1 -1
  135. package/lib/components/form/form_control_layout/append_prepend/form_append_prepend.js +2 -2
  136. package/lib/components/form/form_control_layout/form_control_layout.js +2 -2
  137. package/lib/components/form/form_control_layout/form_control_layout_custom_icon.js +1 -1
  138. package/lib/components/form/text_area/text_area.js +2 -2
  139. package/lib/components/header/header_links/header_link.js +1 -1
  140. package/lib/components/header/header_links/header_links.js +1 -1
  141. package/lib/components/header/header_logo/header_logo.js +1 -1
  142. package/lib/components/header/header_section/header_section_item_button.js +1 -1
  143. package/lib/components/icon/assets/add_to_chat.js +50 -0
  144. package/lib/components/icon/icon.js +1 -1
  145. package/lib/components/icon/icon_map.js +1886 -913
  146. package/lib/components/icon/svgs/add_to_chat.svg +6 -0
  147. package/lib/components/illustration/illustration.js +91 -0
  148. package/lib/components/illustration/illustration.styles.js +22 -0
  149. package/lib/components/illustration/index.js +12 -0
  150. package/lib/components/index.js +11 -0
  151. package/lib/components/key_pad_menu/key_pad_menu_item.js +1 -1
  152. package/lib/components/list_group/list_group.js +2 -2
  153. package/lib/components/list_group/list_group_item.js +2 -2
  154. package/lib/components/list_group/list_group_item_extra_action.js +1 -1
  155. package/lib/components/list_group/pinnable_list_group/pinnable_list_group.js +4 -4
  156. package/lib/components/loading/loading_logo.js +1 -1
  157. package/lib/components/markdown_editor/markdown_editor.js +1 -1
  158. package/lib/components/markdown_editor/markdown_editor_drop_zone.js +1 -1
  159. package/lib/components/markdown_editor/markdown_editor_footer.js +1 -1
  160. package/lib/components/markdown_editor/markdown_editor_toolbar.js +1 -1
  161. package/lib/components/page/page_header/page_header_content.js +1 -1
  162. package/lib/components/pagination/pagination_button.js +1 -1
  163. package/lib/components/panel/panel.styles.js +3 -3
  164. package/lib/components/panel/split_panel/split_panel.styles.js +4 -4
  165. package/lib/components/popover/with_popover.js +22 -0
  166. package/lib/components/search_bar/search_bar.js +193 -380
  167. package/lib/components/search_bar/search_filters.js +10 -3
  168. package/lib/components/selectable/selectable_list/selectable_list.js +8 -1
  169. package/lib/components/selectable/selectable_list/selectable_list_item.js +1 -1
  170. package/lib/components/selectable/selectable_templates/selectable_template_sitewide.js +1 -1
  171. package/lib/components/table/table_header_cell.js +1 -1
  172. package/lib/components/timeline/timeline_item_icon.js +1 -1
  173. package/lib/components/toast/global_toast_list.js +2 -2
  174. package/lib/components/toast/toast.js +2 -2
  175. package/lib/components/toast/toast.styles.js +2 -2
  176. package/lib/components/tool_tip/icon_tip.js +1 -1
  177. package/lib/components/tool_tip/with_tooltip.js +21 -0
  178. package/optimize/es/components/call_out/call_out.js +123 -28
  179. package/optimize/es/components/call_out/call_out.styles.js +36 -43
  180. package/optimize/es/components/call_out/call_out_action.js +44 -0
  181. package/optimize/es/components/call_out/types.js +11 -0
  182. package/optimize/es/components/call_out/use_layout_observer.js +49 -0
  183. package/optimize/es/components/flyout/flyout.component.js +12 -7
  184. package/optimize/es/components/flyout/flyout.styles.js +1 -1
  185. package/optimize/es/components/flyout/flyout_body.styles.js +1 -4
  186. package/optimize/es/components/icon/assets/add_to_chat.js +42 -0
  187. package/optimize/es/components/icon/icon_map.js +1878 -912
  188. package/optimize/es/components/illustration/illustration.js +57 -0
  189. package/optimize/es/components/illustration/illustration.styles.js +16 -0
  190. package/optimize/es/components/illustration/index.js +9 -0
  191. package/optimize/es/components/index.js +1 -0
  192. package/optimize/es/components/panel/panel.styles.js +3 -3
  193. package/optimize/es/components/panel/split_panel/split_panel.styles.js +4 -4
  194. package/optimize/es/components/popover/with_popover.js +17 -0
  195. package/optimize/es/components/search_bar/search_bar.js +184 -193
  196. package/optimize/es/components/search_bar/search_filters.js +5 -2
  197. package/optimize/es/components/selectable/selectable_list/selectable_list.js +7 -0
  198. package/optimize/es/components/toast/toast.styles.js +2 -2
  199. package/optimize/es/components/tool_tip/with_tooltip.js +14 -0
  200. package/optimize/lib/components/call_out/call_out.js +123 -28
  201. package/optimize/lib/components/call_out/call_out.styles.js +37 -42
  202. package/optimize/lib/components/call_out/call_out_action.js +50 -0
  203. package/optimize/lib/components/call_out/types.js +17 -0
  204. package/optimize/lib/components/call_out/use_layout_observer.js +56 -0
  205. package/optimize/lib/components/flyout/flyout.component.js +11 -6
  206. package/optimize/lib/components/flyout/flyout.styles.js +1 -1
  207. package/optimize/lib/components/flyout/flyout_body.styles.js +1 -4
  208. package/optimize/lib/components/icon/assets/add_to_chat.js +50 -0
  209. package/optimize/lib/components/icon/icon_map.js +1881 -913
  210. package/optimize/lib/components/icon/svgs/add_to_chat.svg +6 -0
  211. package/optimize/lib/components/illustration/illustration.js +62 -0
  212. package/optimize/lib/components/illustration/illustration.styles.js +22 -0
  213. package/optimize/lib/components/illustration/index.js +12 -0
  214. package/optimize/lib/components/index.js +11 -0
  215. package/optimize/lib/components/panel/panel.styles.js +3 -3
  216. package/optimize/lib/components/panel/split_panel/split_panel.styles.js +4 -4
  217. package/optimize/lib/components/popover/with_popover.js +24 -0
  218. package/optimize/lib/components/search_bar/search_bar.js +192 -200
  219. package/optimize/lib/components/search_bar/search_filters.js +5 -2
  220. package/optimize/lib/components/selectable/selectable_list/selectable_list.js +7 -0
  221. package/optimize/lib/components/toast/toast.styles.js +2 -2
  222. package/optimize/lib/components/tool_tip/with_tooltip.js +21 -0
  223. package/package.json +8 -25
  224. package/test-env/components/avatar/avatar.js +1 -1
  225. package/test-env/components/badge/badge.js +1 -1
  226. package/test-env/components/badge/beta_badge/beta_badge.js +1 -1
  227. package/test-env/components/basic_table/basic_table.js +4 -4
  228. package/test-env/components/basic_table/in_memory_table.js +13 -4
  229. package/test-env/components/button/button_display/_button_display_content.js +1 -1
  230. package/test-env/components/button/button_empty/button_empty.js +1 -1
  231. package/test-env/components/button/button_icon/button_icon.js +1 -1
  232. package/test-env/components/call_out/call_out.js +230 -30
  233. package/test-env/components/call_out/call_out.styles.js +37 -42
  234. package/test-env/components/call_out/call_out_action.js +50 -0
  235. package/test-env/components/call_out/types.js +17 -0
  236. package/test-env/components/call_out/use_layout_observer.js +56 -0
  237. package/test-env/components/card/card.js +1 -1
  238. package/test-env/components/collapsible_nav/collapsible_nav_group/collapsible_nav_group.js +1 -1
  239. package/test-env/components/collapsible_nav_beta/_kibana_solution/collapsible_nav_kibana_solution.js +1 -1
  240. package/test-env/components/collapsible_nav_beta/collapsible_nav_item/collapsed/collapsed_nav_button.js +1 -1
  241. package/test-env/components/collapsible_nav_beta/collapsible_nav_item/collapsed/collapsed_nav_item.js +2 -2
  242. package/test-env/components/collapsible_nav_beta/collapsible_nav_item/collapsed/collapsed_nav_popover.js +2 -2
  243. package/test-env/components/collapsible_nav_beta/collapsible_nav_item/collapsible_nav_item.js +4 -4
  244. package/test-env/components/comment_list/comment.js +2 -2
  245. package/test-env/components/comment_list/comment_event.js +1 -1
  246. package/test-env/components/comment_list/comment_list.js +2 -2
  247. package/test-env/components/comment_list/comment_timeline.js +1 -1
  248. package/test-env/components/context_menu/context_menu_item.js +1 -1
  249. package/test-env/components/datagrid/body/cell/data_grid_cell.js +12 -12
  250. package/test-env/components/datagrid/body/data_grid_body.js +7 -7
  251. package/test-env/components/datagrid/body/data_grid_body_custom.js +7 -7
  252. package/test-env/components/datagrid/body/data_grid_body_virtualized.js +7 -7
  253. package/test-env/components/datagrid/body/header/data_grid_header_cell.js +6 -6
  254. package/test-env/components/datagrid/controls/column_sorting.js +7 -7
  255. package/test-env/components/datagrid/controls/column_sorting_draggable.js +1 -1
  256. package/test-env/components/datagrid/controls/data_grid_toolbar_control.js +1 -20
  257. package/test-env/components/datagrid/utils/in_memory.js +6 -6
  258. package/test-env/components/date_picker/date_picker.js +2 -2
  259. package/test-env/components/date_picker/date_picker_range.js +1 -1
  260. package/test-env/components/empty_prompt/empty_prompt.js +1 -1
  261. package/test-env/components/flyout/flyout.component.js +11 -6
  262. package/test-env/components/flyout/flyout.styles.js +1 -1
  263. package/test-env/components/flyout/flyout_body.styles.js +1 -4
  264. package/test-env/components/flyout/flyout_menu.js +2 -2
  265. package/test-env/components/flyout/manager/flyout_child.js +1 -1
  266. package/test-env/components/form/field_number/field_number.js +2 -2
  267. package/test-env/components/form/field_text/field_text.js +2 -2
  268. package/test-env/components/form/form_control_button/form_control_button.js +1 -1
  269. package/test-env/components/form/form_control_layout/append_prepend/form_append_prepend.js +2 -2
  270. package/test-env/components/form/form_control_layout/form_control_layout.js +2 -2
  271. package/test-env/components/form/form_control_layout/form_control_layout_custom_icon.js +1 -1
  272. package/test-env/components/form/text_area/text_area.js +2 -2
  273. package/test-env/components/header/header_links/header_link.js +1 -1
  274. package/test-env/components/header/header_links/header_links.js +1 -1
  275. package/test-env/components/header/header_logo/header_logo.js +1 -1
  276. package/test-env/components/header/header_section/header_section_item_button.js +1 -1
  277. package/test-env/components/icon/assets/add_to_chat.js +50 -0
  278. package/test-env/components/icon/icon_map.js +1881 -913
  279. package/test-env/components/illustration/illustration.js +90 -0
  280. package/test-env/components/illustration/illustration.styles.js +22 -0
  281. package/test-env/components/illustration/index.js +12 -0
  282. package/test-env/components/index.js +11 -0
  283. package/test-env/components/key_pad_menu/key_pad_menu_item.js +1 -1
  284. package/test-env/components/list_group/list_group.js +2 -2
  285. package/test-env/components/list_group/list_group_item.js +2 -2
  286. package/test-env/components/list_group/list_group_item_extra_action.js +1 -1
  287. package/test-env/components/list_group/pinnable_list_group/pinnable_list_group.js +4 -4
  288. package/test-env/components/loading/loading_logo.js +1 -1
  289. package/test-env/components/markdown_editor/markdown_editor.js +1 -1
  290. package/test-env/components/markdown_editor/markdown_editor_drop_zone.js +1 -1
  291. package/test-env/components/markdown_editor/markdown_editor_footer.js +1 -1
  292. package/test-env/components/markdown_editor/markdown_editor_toolbar.js +1 -1
  293. package/test-env/components/page/page_header/page_header_content.js +1 -1
  294. package/test-env/components/pagination/pagination_button.js +1 -1
  295. package/test-env/components/panel/panel.styles.js +3 -3
  296. package/test-env/components/panel/split_panel/split_panel.styles.js +4 -4
  297. package/test-env/components/popover/with_popover.js +24 -0
  298. package/test-env/components/search_bar/search_bar.js +192 -379
  299. package/test-env/components/search_bar/search_filters.js +10 -3
  300. package/test-env/components/selectable/selectable_list/selectable_list.js +8 -1
  301. package/test-env/components/selectable/selectable_list/selectable_list_item.js +1 -1
  302. package/test-env/components/selectable/selectable_templates/selectable_template_sitewide.js +1 -1
  303. package/test-env/components/table/table_header_cell.js +1 -1
  304. package/test-env/components/timeline/timeline_item_icon.js +1 -1
  305. package/test-env/components/toast/global_toast_list.js +2 -2
  306. package/test-env/components/toast/toast.js +2 -2
  307. package/test-env/components/toast/toast.styles.js +2 -2
  308. package/test-env/components/tool_tip/icon_tip.js +1 -1
  309. package/test-env/components/tool_tip/with_tooltip.js +21 -0
@@ -5,24 +5,29 @@ var _typeof = require("@babel/runtime/helpers/typeof");
5
5
  Object.defineProperty(exports, "__esModule", {
6
6
  value: true
7
7
  });
8
- exports.SIZES = exports.HEADINGS = exports.EuiCallOut = exports.COLORS = void 0;
8
+ exports.EuiCallOut = exports.COLOR_TO_NOTIFICATION_ICON_MAP = void 0;
9
9
  var _extends2 = _interopRequireDefault(require("@babel/runtime/helpers/extends"));
10
10
  var _defineProperty2 = _interopRequireDefault(require("@babel/runtime/helpers/defineProperty"));
11
11
  var _objectWithoutProperties2 = _interopRequireDefault(require("@babel/runtime/helpers/objectWithoutProperties"));
12
12
  var _react = _interopRequireWildcard(require("react"));
13
13
  var _classnames = _interopRequireDefault(require("classnames"));
14
+ var _euiThemeCommon = require("@elastic/eui-theme-common");
14
15
  var _services = require("../../services");
16
+ var _global_styling = require("../../global_styling");
15
17
  var _icon = require("../icon");
16
18
  var _button = require("../button");
17
19
  var _text = require("../text");
18
20
  var _panel = require("../panel");
19
- var _spacer = require("../spacer");
20
21
  var _title = require("../title");
21
22
  var _i18n = require("../i18n");
22
23
  var _live_announcer = require("../accessibility/live_announcer");
24
+ var _notification_icon = require("../notification_icon/notification_icon");
25
+ var _use_layout_observer = require("./use_layout_observer");
26
+ var _call_out_action = require("./call_out_action");
23
27
  var _call_out = require("./call_out.styles");
28
+ var _notification_icon2 = require("../notification_icon/notification_icon.styles");
24
29
  var _react2 = require("@emotion/react");
25
- var _excluded = ["title", "color", "size", "iconType", "children", "className", "heading", "onDismiss", "dismissButtonProps", "announceOnMount"];
30
+ var _excluded = ["title", "text", "color", "size", "iconType", "children", "actionProps", "className", "heading", "onDismiss", "dismissButtonProps", "announceOnMount", "style", "data-test-subj"];
26
31
  /*
27
32
  * Copyright Elasticsearch B.V. and/or licensed to Elasticsearch B.V. under one
28
33
  * or more contributor license agreements. Licensed under the Elastic License
@@ -32,17 +37,29 @@ var _excluded = ["title", "color", "size", "iconType", "children", "className",
32
37
  */
33
38
  function _getRequireWildcardCache(e) { if ("function" != typeof WeakMap) return null; var r = new WeakMap(), t = new WeakMap(); return (_getRequireWildcardCache = function _getRequireWildcardCache(e) { return e ? t : r; })(e); }
34
39
  function _interopRequireWildcard(e, r) { if (!r && e && e.__esModule) return e; if (null === e || "object" != _typeof(e) && "function" != typeof e) return { default: e }; var t = _getRequireWildcardCache(r); if (t && t.has(e)) return t.get(e); var n = { __proto__: null }, a = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var u in e) if ("default" !== u && {}.hasOwnProperty.call(e, u)) { var i = a ? Object.getOwnPropertyDescriptor(e, u) : null; i && (i.get || i.set) ? Object.defineProperty(n, u, i) : n[u] = e[u]; } return n.default = e, t && t.set(e, n), n; }
35
- var COLORS = exports.COLORS = ['primary', 'success', 'warning', 'danger', 'accent'];
36
- var HEADINGS = exports.HEADINGS = ['h1', 'h2', 'h3', 'h4', 'h5', 'h6', 'p'];
37
- var SIZES = exports.SIZES = ['s', 'm'];
40
+ 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; }
41
+ function _objectSpread(e) { for (var r = 1; r < arguments.length; r++) { var t = null != arguments[r] ? arguments[r] : {}; r % 2 ? ownKeys(Object(t), !0).forEach(function (r) { (0, _defineProperty2.default)(e, r, t[r]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e, Object.getOwnPropertyDescriptors(t)) : ownKeys(Object(t)).forEach(function (r) { Object.defineProperty(e, r, Object.getOwnPropertyDescriptor(t, r)); }); } return e; }
42
+ var COLOR_TO_NOTIFICATION_ICON_MAP = exports.COLOR_TO_NOTIFICATION_ICON_MAP = {
43
+ primary: 'info',
44
+ success: 'success',
45
+ warning: 'warning',
46
+ danger: 'error'
47
+ };
48
+
49
+ /** Get correct color with fallback */
50
+ var getCallOutColor = function getCallOutColor(color) {
51
+ return typeof color === 'string' && COLOR_TO_NOTIFICATION_ICON_MAP.hasOwnProperty(color) ? color : 'primary';
52
+ };
38
53
  var EuiCallOut = exports.EuiCallOut = /*#__PURE__*/(0, _react.forwardRef)(function (_ref, ref) {
39
54
  var title = _ref.title,
55
+ text = _ref.text,
40
56
  _ref$color = _ref.color,
41
- color = _ref$color === void 0 ? 'primary' : _ref$color,
57
+ _color = _ref$color === void 0 ? 'primary' : _ref$color,
42
58
  _ref$size = _ref.size,
43
59
  size = _ref$size === void 0 ? 'm' : _ref$size,
44
60
  iconType = _ref.iconType,
45
61
  children = _ref.children,
62
+ actionProps = _ref.actionProps,
46
63
  className = _ref.className,
47
64
  _ref$heading = _ref.heading,
48
65
  heading = _ref$heading === void 0 ? 'p' : _ref$heading,
@@ -50,13 +67,36 @@ var EuiCallOut = exports.EuiCallOut = /*#__PURE__*/(0, _react.forwardRef)(functi
50
67
  dismissButtonProps = _ref.dismissButtonProps,
51
68
  _ref$announceOnMount = _ref.announceOnMount,
52
69
  announceOnMount = _ref$announceOnMount === void 0 ? false : _ref$announceOnMount,
70
+ style = _ref.style,
71
+ dataTestSubj = _ref['data-test-subj'],
53
72
  rest = (0, _objectWithoutProperties2.default)(_ref, _excluded);
73
+ var _useEuiTheme = (0, _services.useEuiTheme)(),
74
+ euiTheme = _useEuiTheme.euiTheme;
75
+ var color = getCallOutColor(_color);
76
+
77
+ /* Uses resize observer to determine the container width/layout instead of native container queries,
78
+ because callouts can be placed in containers without defined size (absolute positioned, no-grow flex layout etc.)
79
+ where container queries would collapse by design instead of adjusting to the content dimensions. */
80
+ var layoutRef = (0, _use_layout_observer.useLayoutObserver)(size);
81
+ // Memoize the refs array so `useCombinedRefs` returns a stable callback-ref across renders
82
+ var combinedRefs = (0, _react.useMemo)(function () {
83
+ return [layoutRef, ref];
84
+ }, [layoutRef, ref]);
85
+ var panelRef = (0, _services.useCombinedRefs)(combinedRefs);
86
+ var borderColors = (0, _global_styling.useEuiBorderColorCSS)();
54
87
  var styles = (0, _services.useEuiMemoizedStyles)(_call_out.euiCallOutStyles);
55
- var cssStyles = [styles.euiCallOut, onDismiss && styles.hasDismissButton.hasDimissButton, onDismiss && styles.hasDismissButton[size]];
88
+ var cssStyles = [styles.euiCallOut, borderColors[color], onDismiss && styles.hasDismissButton];
89
+ var highlightColorToken = (0, _euiThemeCommon.getTokenName)('borderStrong', color);
90
+ var typeColor = euiTheme.colors[highlightColorToken];
91
+ var cssVariables = (0, _react.useMemo)(function () {
92
+ return {
93
+ '--euiCallOutTypeColor': typeColor
94
+ };
95
+ }, [typeColor]);
56
96
  var classes = (0, _classnames.default)('euiCallOut', (0, _defineProperty2.default)({}, "euiCallOut--".concat(color), color), className);
57
97
  var dismissButton = (0, _react.useMemo)(function () {
58
98
  if (!onDismiss) return;
59
- var cssStyles = [styles.dismissButton.euiCallOut__dismissButton, styles.dismissButton[size]];
99
+ var cssStyles = [styles.dismissButton.euiCallOut__dismissButton];
60
100
  return (0, _react2.jsx)(_i18n.EuiI18n, {
61
101
  token: "euiCallOut.dismissAriaLabel",
62
102
  default: "Dismiss this callout"
@@ -68,46 +108,101 @@ var EuiCallOut = exports.EuiCallOut = /*#__PURE__*/(0, _react.forwardRef)(functi
68
108
  }, dismissButtonProps, {
69
109
  iconType: "cross",
70
110
  color: color,
111
+ size: "xs",
71
112
  onClick: onDismiss
72
113
  }));
73
114
  });
74
- }, [onDismiss, styles, color, size]);
115
+ }, [onDismiss, styles, color, dismissButtonProps]);
75
116
  var headerStyles = (0, _services.useEuiMemoizedStyles)(_call_out.euiCallOutHeaderStyles);
117
+ var iconStyles = (0, _services.useEuiMemoizedStyles)(_notification_icon2.euiNotificationIconStyles);
76
118
  var header = (0, _react.useMemo)(function () {
77
119
  if (!title) return;
78
120
  var H = heading;
79
- var cssStyles = [headerStyles.euiCallOutHeader, headerStyles[color]];
121
+ var cssStyles = [headerStyles.euiCallOutHeader];
80
122
  return (0, _react2.jsx)(_title.EuiTitle, {
81
123
  size: size === 's' ? 'xxs' : 'xs',
82
124
  css: cssStyles
83
125
  }, (0, _react2.jsx)(H, {
84
126
  className: "euiCallOutHeader__title"
85
- }, iconType && (0, _react2.jsx)(_icon.EuiIcon, {
86
- css: headerStyles.euiCallOut__icon,
127
+ }, title));
128
+ }, [title, heading, size, headerStyles]);
129
+ var icon = (0, _react.useMemo)(function () {
130
+ if (!iconType) {
131
+ var _COLOR_TO_NOTIFICATIO;
132
+ var _iconType = (_COLOR_TO_NOTIFICATIO = COLOR_TO_NOTIFICATION_ICON_MAP[color]) !== null && _COLOR_TO_NOTIFICATIO !== void 0 ? _COLOR_TO_NOTIFICATIO : 'info';
133
+ return (0, _react2.jsx)(_notification_icon.EuiNotificationIcon, {
134
+ css: styles.icon,
135
+ type: _iconType,
136
+ size: size === 's' ? 'm' : 'l'
137
+ });
138
+ }
139
+ return (0, _react2.jsx)(_icon.EuiIcon, {
140
+ css: [styles.icon, size === 'm' && iconStyles.size.l, ";label:icon;"],
87
141
  type: iconType,
88
- size: "m",
142
+ size: size === 's' ? 'm' : 'l',
89
143
  "aria-hidden": "true",
90
- color: "inherit"
91
- }), title));
92
- }, [title, heading, iconType, size, color, headerStyles]);
93
- var optionalChildren = children && (0, _react2.jsx)(_text.EuiText, {
144
+ color: typeColor
145
+ });
146
+ }, [iconType, color, size, typeColor, styles, iconStyles]);
147
+ var optionalChildren = (text || children) && (0, _react2.jsx)(_react.default.Fragment, null, text && (0, _react2.jsx)(_text.EuiText, {
148
+ size: "s",
149
+ color: "default",
150
+ className: "euiCallOut__text",
151
+ "data-test-subj": dataTestSubj && "".concat(dataTestSubj, "__message")
152
+ }, text), children && (0, _react2.jsx)(_text.EuiText, {
153
+ className: "euiCallOut__additionalContent",
94
154
  size: size === 's' ? 'xs' : 's',
95
- color: "default"
96
- }, children);
155
+ color: "default",
156
+ "data-test-subj": dataTestSubj && "".concat(dataTestSubj, "__content")
157
+ }, children));
158
+ var actionControls = (0, _react.useMemo)(function () {
159
+ var actionPrimaryProps = _objectSpread(_objectSpread({}, actionProps === null || actionProps === void 0 ? void 0 : actionProps.primary), {}, {
160
+ color: color
161
+ });
162
+ var actionSecondaryProps = _objectSpread(_objectSpread({}, actionProps === null || actionProps === void 0 ? void 0 : actionProps.secondary), {}, {
163
+ color: color
164
+ });
165
+ var hasActionPrimary = Boolean(actionProps === null || actionProps === void 0 ? void 0 : actionProps.primary);
166
+ var hasActionSecondary = Boolean(actionProps === null || actionProps === void 0 ? void 0 : actionProps.secondary);
167
+ if (!hasActionPrimary && !hasActionSecondary) return null;
168
+ var actionPrimary = hasActionPrimary && (0, _react2.jsx)(_call_out_action.EuiCallOutAction, (0, _extends2.default)({
169
+ actionType: "primary"
170
+ }, actionPrimaryProps));
171
+ var actionSecondary = hasActionSecondary && (0, _react2.jsx)(_call_out_action.EuiCallOutAction, (0, _extends2.default)({
172
+ actionType: "secondary"
173
+ }, actionSecondaryProps));
174
+ return (0, _react2.jsx)("div", {
175
+ css: styles.actions,
176
+ "data-test-subj": dataTestSubj && "".concat(dataTestSubj, "__actions")
177
+ }, actionPrimary, actionSecondary);
178
+ }, [actionProps, color, styles, dataTestSubj]);
179
+ var announcement = (0, _react.useMemo)(function () {
180
+ if (!announceOnMount || !(title || text || children)) return null;
181
+ return (0, _react2.jsx)(_live_announcer.EuiLiveAnnouncer, null, title, title && text && ",\xA0", text, (title || text) && children && ",\xA0", children);
182
+ }, [announceOnMount, title, text, children]);
97
183
  return (0, _react2.jsx)(_panel.EuiPanel, (0, _extends2.default)({
98
184
  borderRadius: "none",
99
185
  color: color,
100
- css: cssStyles,
101
- paddingSize: size === 's' ? 's' : 'm',
186
+ css: cssStyles
187
+ // uses custom padding
188
+ ,
189
+ paddingSize: "none",
102
190
  className: classes,
103
- panelRef: ref,
104
- grow: false
105
- }, rest),
191
+ panelRef: panelRef,
192
+ grow: false,
193
+ style: _objectSpread(_objectSpread({}, cssVariables), style),
194
+ "data-size": size,
195
+ "data-test-subj": dataTestSubj
196
+ }, rest), (0, _react2.jsx)("div", {
197
+ css: styles.wrapper
198
+ }, (0, _react2.jsx)("div", {
199
+ css: styles.body
200
+ }, icon, (0, _react2.jsx)("div", {
201
+ css: styles.content
202
+ },
106
203
  // Note: the DOM position of the dismiss button matters to screen reader users.
107
204
  // We generally want them to have some context of _what_ they're dismissing,
108
205
  // instead of navigating to the dismiss button first before the callout content
109
- header && optionalChildren ? (0, _react2.jsx)(_react.default.Fragment, null, header, dismissButton, (0, _react2.jsx)(_spacer.EuiSpacer, {
110
- size: "s"
111
- }), optionalChildren) : (0, _react2.jsx)(_react.default.Fragment, null, header || optionalChildren, dismissButton), announceOnMount && (title || children) && (0, _react2.jsx)(_live_announcer.EuiLiveAnnouncer, null, title && "".concat(title, ", "), children));
206
+ header && optionalChildren ? (0, _react2.jsx)(_react.default.Fragment, null, header, dismissButton, optionalChildren) : (0, _react2.jsx)(_react.default.Fragment, null, header || optionalChildren, dismissButton))), actionControls, announcement));
112
207
  });
113
208
  EuiCallOut.displayName = 'EuiCallOut';
@@ -6,59 +6,54 @@ Object.defineProperty(exports, "__esModule", {
6
6
  exports.euiCallOutStyles = exports.euiCallOutHeaderStyles = void 0;
7
7
  var _react = require("@emotion/react");
8
8
  var _global_styling = require("../../global_styling");
9
- function _EMOTION_STRINGIFIED_CSS_ERROR__() { return "You have tried to stringify object returned from `css` function. It isn't supposed to be used directly (e.g. as value of the `className` prop), but rather handed to emotion so it can handle it (e.g. as value of `css` prop)."; } /*
9
+ /*
10
10
  * Copyright Elasticsearch B.V. and/or licensed to Elasticsearch B.V. under one
11
11
  * or more contributor license agreements. Licensed under the Elastic License
12
12
  * 2.0 and the Server Side Public License, v 1; you may not use this file except
13
13
  * in compliance with, at your election, the Elastic License 2.0 or the Server
14
14
  * Side Public License, v 1.
15
15
  */
16
- var _ref = process.env.NODE_ENV === "production" ? {
17
- name: "173v8a4-euiCallOut__dismissButton",
18
- styles: "position:absolute;label:euiCallOut__dismissButton;"
19
- } : {
20
- name: "173v8a4-euiCallOut__dismissButton",
21
- styles: "position:absolute;label:euiCallOut__dismissButton;",
22
- toString: _EMOTION_STRINGIFIED_CSS_ERROR__
23
- };
24
- var _ref2 = process.env.NODE_ENV === "production" ? {
25
- name: "192kin0-euiCallOut",
26
- styles: "position:relative;label:euiCallOut;"
27
- } : {
28
- name: "192kin0-euiCallOut",
29
- styles: "position:relative;label:euiCallOut;",
30
- toString: _EMOTION_STRINGIFIED_CSS_ERROR__
31
- };
32
- var euiCallOutStyles = exports.euiCallOutStyles = function euiCallOutStyles(_ref3) {
33
- var euiTheme = _ref3.euiTheme;
16
+
17
+ /** Maximum reading width for `text` and `children` slots. */
18
+ var TEXT_MAX_WIDTH = 1200;
19
+ var euiCallOutStyles = exports.euiCallOutStyles = function euiCallOutStyles(euiThemeContext) {
20
+ var euiTheme = euiThemeContext.euiTheme;
21
+ var paddingSizes = {
22
+ s: euiTheme.size.m,
23
+ m: euiTheme.size.base
24
+ };
25
+ var borderRadius = euiTheme.border.radius.small;
26
+ var highlightSize = (0, _global_styling.mathWithUnits)([euiTheme.border.width.thin, euiTheme.border.width.thick], function (x, y) {
27
+ return x + y;
28
+ });
29
+ var highlightOffset = euiTheme.border.width.thin;
30
+ var highlightSizeOffset = (0, _global_styling.mathWithUnits)([highlightOffset], function (x) {
31
+ return x * 2;
32
+ });
33
+ var separatorSize = (0, _global_styling.mathWithUnits)([euiTheme.size.s, euiTheme.size.xxs], function (x, y) {
34
+ return x + y;
35
+ });
34
36
  return {
35
- euiCallOut: _ref2,
36
- hasDismissButton: {
37
- // Ensure that only the top-most (first-child) title or child text
38
- // has a padding-right on it (to account for the dismiss button)
39
- hasDimissButton: /*#__PURE__*/(0, _react.css)("&>:first-child:is(.euiTitle),&>:first-child:is(.euiText)>:first-child{", (0, _global_styling.logicalCSS)('padding-right', euiTheme.size.base), ";};label:hasDimissButton;"),
40
- // Ensure the callout always has enough height for the button
41
- s: /*#__PURE__*/(0, _react.css)((0, _global_styling.logicalCSS)('min-height', euiTheme.size.xl), ";;label:s;"),
42
- m: /*#__PURE__*/(0, _react.css)((0, _global_styling.logicalCSS)('min-height', euiTheme.size.xxl), ";;label:m;")
43
- },
37
+ euiCallOut: /*#__PURE__*/(0, _react.css)("position:relative;display:flex;max-inline-size:100%;align-items:center;border:", euiTheme.border.width.thin, " solid;border-radius:", borderRadius, ";&:focus{outline-offset:2px;}&::before{content:'';position:absolute;inset-block-start:-", euiTheme.border.width.thin, ";inset-inline-start:-", euiTheme.border.width.thin, ";block-size:calc(100% + ", highlightSizeOffset, ");border-inline-start:", highlightSize, " solid var(--euiCallOutTypeColor);border-start-start-radius:", borderRadius, ";border-end-start-radius:", borderRadius, ";pointer-events:none;", (0, _global_styling.preventForcedColors)(euiThemeContext), ";}&:where([data-size='s']){", (0, _global_styling.logicalShorthandCSS)('padding', "".concat(paddingSizes.s, " ").concat(paddingSizes.m)), ";}&:where([data-size='m']){padding:", paddingSizes.m, ";};label:euiCallOut;"),
38
+ // handles content + actions layout
39
+ wrapper: /*#__PURE__*/(0, _react.css)("display:flex;flex-direction:column;inline-size:100%;&:where([data-size='s'] &){gap:", euiTheme.size.s, ";}&:where([data-size='m'] &){gap:", euiTheme.size.m, ";}&:where([data-layout='wide'] &){flex-direction:row;gap:", euiTheme.size.xxl, ";};label:wrapper;"),
40
+ // handles icon + text layout
41
+ body: /*#__PURE__*/(0, _react.css)("display:flex;flex-direction:row;align-self:center;inline-size:100%;&:where([data-size='s'] &){gap:", euiTheme.size.s, ";}&:where([data-size='m'] &){gap:", euiTheme.size.m, ";};label:body;"),
42
+ // handles text layout
43
+ content: /*#__PURE__*/(0, _react.css)("align-self:center;inline-size:100%;max-inline-size:", TEXT_MAX_WIDTH, "px;&:where([data-size='s'] &){gap:", euiTheme.size.s, ";block-size:min-content;>.euiTitle{display:inline;", (0, _global_styling.logicalCSS)('margin-right', euiTheme.size.xxs), ";}>.euiCallOut__text{display:inline;*{display:inline;}&:where(:not(:first-child)){&::before{content:'\xB7';display:inline-block;inline-size:", separatorSize, ";text-align:center;color:", euiTheme.colors.textHeading, ";}}}.euiCallOut__additionalContent:not(:first-child){", (0, _global_styling.logicalCSS)('margin-top', euiTheme.size.xs), ";}}&:where([data-size='m'] &){display:flex;flex-direction:column;gap:", euiTheme.size.xs, ";.euiCallOut__text+.euiCallOut__additionalContent{", (0, _global_styling.logicalCSS)('margin-top', euiTheme.size.s), ";}};label:content;"),
44
+ hasDismissButton: /*#__PURE__*/(0, _react.css)("&:where([data-size]){padding-inline-end:", euiTheme.size.xxl, ";};label:hasDismissButton;"),
44
45
  dismissButton: {
45
- euiCallOut__dismissButton: _ref,
46
- s: /*#__PURE__*/(0, _react.css)((0, _global_styling.logicalCSS)('top', euiTheme.size.xs), " ", (0, _global_styling.logicalCSS)('right', euiTheme.size.xs), ";;label:s;"),
47
- m: /*#__PURE__*/(0, _react.css)((0, _global_styling.logicalCSS)('top', euiTheme.size.s), " ", (0, _global_styling.logicalCSS)('right', euiTheme.size.s), ";;label:m;")
48
- }
46
+ euiCallOut__dismissButton: /*#__PURE__*/(0, _react.css)("position:absolute;", (0, _global_styling.logicalCSS)('top', euiTheme.size.s), " ", (0, _global_styling.logicalCSS)('right', euiTheme.size.s), ";;label:euiCallOut__dismissButton;")
47
+ },
48
+ icon: /*#__PURE__*/(0, _react.css)("position:relative;", (0, _global_styling.logicalCSS)('margin-vertical', euiTheme.size.xxs), ";;label:icon;"),
49
+ actions: /*#__PURE__*/(0, _react.css)("display:flex;gap:", euiTheme.size.s, ";&:where([data-size='s'] &){", (0, _global_styling.logicalCSS)('margin-left', euiTheme.size.l), ";}&:where([data-size='m'] &){", (0, _global_styling.logicalCSS)('margin-left', euiTheme.size.xl), ";}&:where([data-layout='superNarrow'] &){flex-wrap:wrap;*:has(.euiCallOutAction),.euiCallOutAction{inline-size:100%;}}&:where([data-layout='wide'] &){", (0, _global_styling.logicalCSS)('margin-left', '0'), " align-self:center;flex-shrink:0;flex-direction:row-reverse;};label:actions;")
49
50
  };
50
51
  };
51
- var euiCallOutHeaderStyles = exports.euiCallOutHeaderStyles = function euiCallOutHeaderStyles(_ref4) {
52
- var euiTheme = _ref4.euiTheme;
52
+ var euiCallOutHeaderStyles = exports.euiCallOutHeaderStyles = function euiCallOutHeaderStyles(_ref) {
53
+ var euiTheme = _ref.euiTheme;
53
54
  return {
54
- euiCallOutHeader: /*#__PURE__*/(0, _react.css)("font-weight:", euiTheme.font.weight.medium, ";", (0, _global_styling.logicalCSS)('margin-bottom', '0 !important'
55
+ euiCallOutHeader: /*#__PURE__*/(0, _react.css)("font-weight:", euiTheme.font.weight.bold, ";", (0, _global_styling.logicalCSS)('margin-bottom', '0 !important'
55
56
  // In case it's nested inside EuiText
56
- ), ";;label:euiCallOutHeader;"),
57
- primary: /*#__PURE__*/(0, _react.css)("color:", euiTheme.colors.textPrimary, ";;label:primary;"),
58
- success: /*#__PURE__*/(0, _react.css)("color:", euiTheme.colors.textSuccess, ";;label:success;"),
59
- warning: /*#__PURE__*/(0, _react.css)("color:", euiTheme.colors.textWarning, ";;label:warning;"),
60
- danger: /*#__PURE__*/(0, _react.css)("color:", euiTheme.colors.textDanger, ";;label:danger;"),
61
- accent: /*#__PURE__*/(0, _react.css)("color:", euiTheme.colors.textAccent, ";;label:accent;"),
62
- euiCallOut__icon: /*#__PURE__*/(0, _react.css)("position:relative;", (0, _global_styling.logicalCSS)('top', '-1px'), " ", (0, _global_styling.logicalCSS)('margin-right', euiTheme.size.s), ";;label:euiCallOut__icon;")
57
+ ), "&&{color:", euiTheme.colors.textHeading, ";};label:euiCallOutHeader;")
63
58
  };
64
59
  };
@@ -0,0 +1,50 @@
1
+ "use strict";
2
+
3
+ var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefault");
4
+ Object.defineProperty(exports, "__esModule", {
5
+ value: true
6
+ });
7
+ exports.EuiCallOutAction = void 0;
8
+ var _extends2 = _interopRequireDefault(require("@babel/runtime/helpers/extends"));
9
+ var _objectWithoutProperties2 = _interopRequireDefault(require("@babel/runtime/helpers/objectWithoutProperties"));
10
+ var _react = _interopRequireDefault(require("react"));
11
+ var _classnames = _interopRequireDefault(require("classnames"));
12
+ var _button2 = require("../button");
13
+ var _with_popover = require("../popover/with_popover");
14
+ var _with_tooltip = require("../tool_tip/with_tooltip");
15
+ var _react2 = require("@emotion/react");
16
+ var _excluded = ["children", "actionType", "color", "tooltipProps", "popoverProps", "className"];
17
+ /*
18
+ * Copyright Elasticsearch B.V. and/or licensed to Elasticsearch B.V. under one
19
+ * or more contributor license agreements. Licensed under the Elastic License
20
+ * 2.0 and the Server Side Public License, v 1; you may not use this file except
21
+ * in compliance with, at your election, the Elastic License 2.0 or the Server
22
+ * Side Public License, v 1.
23
+ */
24
+ var EuiCallOutAction = exports.EuiCallOutAction = function EuiCallOutAction(_ref) {
25
+ var children = _ref.children,
26
+ _ref$actionType = _ref.actionType,
27
+ actionType = _ref$actionType === void 0 ? 'primary' : _ref$actionType,
28
+ _ref$color = _ref.color,
29
+ color = _ref$color === void 0 ? 'primary' : _ref$color,
30
+ tooltipProps = _ref.tooltipProps,
31
+ popoverProps = _ref.popoverProps,
32
+ className = _ref.className,
33
+ rest = (0, _objectWithoutProperties2.default)(_ref, _excluded);
34
+ var classes = (0, _classnames.default)('euiCallOutAction', className);
35
+ if (actionType === 'primary') {
36
+ var button = (0, _react2.jsx)(_button2.EuiButton, (0, _extends2.default)({
37
+ className: classes,
38
+ size: "s",
39
+ color: color
40
+ }, rest), children);
41
+ return (0, _with_popover.withEuiPopover)((0, _with_tooltip.withEuiToolTip)(button, tooltipProps), popoverProps);
42
+ } else {
43
+ var _button = (0, _react2.jsx)(_button2.EuiButtonEmpty, (0, _extends2.default)({
44
+ className: classes,
45
+ size: "s",
46
+ color: color
47
+ }, rest), children);
48
+ return (0, _with_popover.withEuiPopover)((0, _with_tooltip.withEuiToolTip)(_button, tooltipProps), popoverProps);
49
+ }
50
+ };
@@ -0,0 +1,17 @@
1
+ "use strict";
2
+
3
+ Object.defineProperty(exports, "__esModule", {
4
+ value: true
5
+ });
6
+ exports.SIZES = exports.HEADINGS = exports.COLORS = void 0;
7
+ /*
8
+ * Copyright Elasticsearch B.V. and/or licensed to Elasticsearch B.V. under one
9
+ * or more contributor license agreements. Licensed under the Elastic License
10
+ * 2.0 and the Server Side Public License, v 1; you may not use this file except
11
+ * in compliance with, at your election, the Elastic License 2.0 or the Server
12
+ * Side Public License, v 1.
13
+ */
14
+
15
+ var COLORS = exports.COLORS = ['primary', 'success', 'warning', 'danger'];
16
+ var SIZES = exports.SIZES = ['s', 'm'];
17
+ var HEADINGS = exports.HEADINGS = ['h1', 'h2', 'h3', 'h4', 'h5', 'h6', 'p'];
@@ -0,0 +1,56 @@
1
+ "use strict";
2
+
3
+ var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefault");
4
+ Object.defineProperty(exports, "__esModule", {
5
+ value: true
6
+ });
7
+ exports.useLayoutObserver = void 0;
8
+ var _slicedToArray2 = _interopRequireDefault(require("@babel/runtime/helpers/slicedToArray"));
9
+ var _react = require("react");
10
+ var _resize_observer = require("../observer/resize_observer/resize_observer");
11
+ /*
12
+ * Copyright Elasticsearch B.V. and/or licensed to Elasticsearch B.V. under one
13
+ * or more contributor license agreements. Licensed under the Elastic License
14
+ * 2.0 and the Server Side Public License, v 1; you may not use this file except
15
+ * in compliance with, at your election, the Elastic License 2.0 or the Server
16
+ * Side Public License, v 1.
17
+ */
18
+
19
+ var SUPER_NARROW_WIDTH = 400;
20
+ var WIDE_BREAKPOINTS = {
21
+ s: 800,
22
+ m: 1000
23
+ };
24
+
25
+ /**
26
+ * Observes the rendered width and sets `data-layout` on the root
27
+ * element so that CSS can respond to size changes.
28
+ *
29
+ * This is an alternative to native CSS container queries. Its purpose is to handle cases where
30
+ * container queries would collapse if the element is placed inside a container without a defined size.
31
+ */
32
+ var useLayoutObserver = exports.useLayoutObserver = function useLayoutObserver(size) {
33
+ var elementRef = (0, _react.useRef)(null);
34
+ (0, _react.useEffect)(function () {
35
+ var element = elementRef.current;
36
+ if (!element || !_resize_observer.hasResizeObserver) return;
37
+ var wide = WIDE_BREAKPOINTS[size];
38
+ var observer = new ResizeObserver(function (_ref) {
39
+ var _ref2 = (0, _slicedToArray2.default)(_ref, 1),
40
+ entry = _ref2[0];
41
+ var width = entry.borderBoxSize[0].inlineSize;
42
+ if (width <= SUPER_NARROW_WIDTH) {
43
+ element.setAttribute('data-layout', 'superNarrow');
44
+ } else if (width >= wide) {
45
+ element.setAttribute('data-layout', 'wide');
46
+ } else {
47
+ element.removeAttribute('data-layout');
48
+ }
49
+ });
50
+ observer.observe(element);
51
+ return function () {
52
+ return observer.disconnect();
53
+ };
54
+ }, [size]);
55
+ return elementRef;
56
+ };
@@ -430,6 +430,8 @@ var EuiFlyoutComponent = exports.EuiFlyoutComponent = /*#__PURE__*/(0, _react.fo
430
430
  }),
431
431
  flyoutZIndex = _useEuiFlyoutZIndex.flyoutZIndex,
432
432
  maskZIndex = _useEuiFlyoutZIndex.maskZIndex;
433
+ var _useEuiTheme = (0, _services.useEuiTheme)(),
434
+ euiTheme = _useEuiTheme.euiTheme;
433
435
 
434
436
  /**
435
437
  * Inline styles position the flyout inside the reference container's
@@ -483,14 +485,17 @@ var EuiFlyoutComponent = exports.EuiFlyoutComponent = /*#__PURE__*/(0, _react.fo
483
485
  containerRelativeWidth = size;
484
486
  }
485
487
 
486
- // All container-scoped flyouts get top/height from the container rect.
487
- // Reset minInlineSize to 0 so that the CSS `min-inline-size` (which
488
- // resolves against the viewport for `position: fixed`) does not
489
- // prevent the container-relative width constraints from taking effect.
488
+ // Pixel-based min-widths for named sizes within containers
489
+ var containerMinWidthMap = {
490
+ s: Math.round(euiTheme.breakpoint.m * 0.42),
491
+ m: Math.round(euiTheme.breakpoint.m * 0.5)
492
+ };
493
+ var sizeMinWidth = typeof size === 'string' ? containerMinWidthMap[size] : undefined;
494
+ var containerMinInlineSize = sizeMinWidth !== undefined ? Math.min(sizeMinWidth, containerMaxWidth) : 0;
490
495
  containerPositionStyles = {
491
496
  top: containerRect.top,
492
497
  height: containerRect.height,
493
- minInlineSize: 0
498
+ minInlineSize: containerMinInlineSize
494
499
  };
495
500
  if (isChildFlyout) {
496
501
  // Child flyouts position themselves relative to the main flyout.
@@ -536,7 +541,7 @@ var EuiFlyoutComponent = exports.EuiFlyoutComponent = /*#__PURE__*/(0, _react.fo
536
541
  }
537
542
  }
538
543
  return _objectSpread(_objectSpread(_objectSpread({}, style), composedStyles), containerPositionStyles);
539
- }, [style, size, layoutMode, siblingFlyoutId, siblingFlyoutWidth, maxWidth, flyoutZIndex, containerRect, side, isChildFlyout]);
544
+ }, [style, size, layoutMode, siblingFlyoutId, siblingFlyoutWidth, maxWidth, flyoutZIndex, containerRect, side, isChildFlyout, euiTheme.breakpoint.m]);
540
545
  var styles = (0, _services.useEuiMemoizedStyles)(_flyout.euiFlyoutStyles);
541
546
  var cssStyles = [styles.euiFlyout, styles.paddingSizes[paddingSize], (0, _const2.isEuiFlyoutSizeNamed)(size) && styles[size], maxWidth === false && styles.noMaxWidth, isPushed ? styles.push.push : styles.overlay.overlay, isPushed ? styles.push[side] : styles.overlay[side], !hasAnimation && styles.noAnimation, styles[side]];
542
547
  var classes = (0, _classnames.default)('euiFlyout', isChildFlyout && hasChildBackground && 'euiFlyout--hasChildBackground', className);
@@ -165,7 +165,7 @@ var composeFlyoutPadding = function composeFlyoutPadding(euiThemeContext, paddin
165
165
  return x / 1.5;
166
166
  }), " ").concat(euiTheme.size.l, ";")
167
167
  };
168
- return "\n .euiFlyoutHeader {\n ".concat((0, _global_styling.logicalCSS)('padding-horizontal', paddingModifierMap[paddingSize]), "\n ").concat((0, _global_styling.logicalCSS)('padding-top', paddingModifierMap[paddingSize]), "\n }\n\n [class*='euiFlyoutHeader-hasBorder'] {\n ").concat((0, _global_styling.logicalCSS)('padding-bottom', paddingModifierMap[paddingSize]), "\n }\n\n .euiFlyoutBody__overflowContent {\n padding: ").concat(paddingModifierMap[paddingSize], ";\n }\n\n .euiFlyoutBody__banner .euiCallOut {\n ").concat((0, _global_styling.logicalCSS)('padding-horizontal', paddingModifierMap[paddingSize]), "\n }\n\n .euiFlyoutFooter {\n padding: ").concat(footerPaddingSizes[paddingSize], ";\n }\n ");
168
+ return "\n .euiFlyoutHeader {\n ".concat((0, _global_styling.logicalCSS)('padding-horizontal', paddingModifierMap[paddingSize]), "\n ").concat((0, _global_styling.logicalCSS)('padding-top', paddingModifierMap[paddingSize]), "\n }\n\n [class*='euiFlyoutHeader-hasBorder'] {\n ").concat((0, _global_styling.logicalCSS)('padding-bottom', paddingModifierMap[paddingSize]), "\n }\n\n .euiFlyoutBody__overflowContent {\n padding: ").concat(paddingModifierMap[paddingSize], ";\n }\n\n .euiFlyoutFooter {\n padding: ").concat(footerPaddingSizes[paddingSize], ";\n }\n ");
169
169
  };
170
170
 
171
171
  /**
@@ -6,7 +6,6 @@ Object.defineProperty(exports, "__esModule", {
6
6
  exports.euiFlyoutBodyStyles = void 0;
7
7
  var _react = require("@emotion/react");
8
8
  var _global_styling = require("../../global_styling");
9
- var _high_contrast = require("../../global_styling/functions/high_contrast");
10
9
  /*
11
10
  * Copyright Elasticsearch B.V. and/or licensed to Elasticsearch B.V. under one
12
11
  * or more contributor license agreements. Licensed under the Elastic License
@@ -26,8 +25,6 @@ var euiFlyoutBodyStyles = exports.euiFlyoutBodyStyles = function euiFlyoutBodySt
26
25
  side: 'end'
27
26
  }), ";;label:hasBanner;")
28
27
  },
29
- euiFlyoutBody__banner: /*#__PURE__*/(0, _react.css)((0, _global_styling.logicalCSSWithFallback)('overflow-x', 'hidden'), " ", (0, _high_contrast.highContrastModeStyles)(euiThemeContext, {
30
- preferred: (0, _global_styling.logicalCSS)('border-bottom', euiTheme.border.thin)
31
- }), ";;label:euiFlyoutBody__banner;")
28
+ euiFlyoutBody__banner: /*#__PURE__*/(0, _react.css)("overflow:hidden;.euiCallOut{", (0, _global_styling.logicalCSS)('margin-top', "".concat(euiTheme.size.s)), " ", (0, _global_styling.logicalCSS)('margin-left', "".concat(euiTheme.size.l)), " ", (0, _global_styling.logicalCSS)('margin-right', "".concat(euiTheme.size.l)), ";}.euiFlyout:not(:has(.euiFlyoutHeader)) &{.euiCallOut{", (0, _global_styling.logicalCSS)('margin-right', "".concat(euiTheme.size.xxl)), ";}};label:euiFlyoutBody__banner;")
32
29
  };
33
30
  };
@@ -0,0 +1,50 @@
1
+ "use strict";
2
+
3
+ var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefault");
4
+ var _typeof = require("@babel/runtime/helpers/typeof");
5
+ Object.defineProperty(exports, "__esModule", {
6
+ value: true
7
+ });
8
+ exports.icon = void 0;
9
+ var _extends2 = _interopRequireDefault(require("@babel/runtime/helpers/extends"));
10
+ var _objectWithoutProperties2 = _interopRequireDefault(require("@babel/runtime/helpers/objectWithoutProperties"));
11
+ var React = _interopRequireWildcard(require("react"));
12
+ var _react2 = require("@emotion/react");
13
+ var _excluded = ["title", "titleId"];
14
+ /*
15
+ * Copyright Elasticsearch B.V. and/or licensed to Elasticsearch B.V. under one
16
+ * or more contributor license agreements. Licensed under the Elastic License
17
+ * 2.0 and the Server Side Public License, v 1; you may not use this file except
18
+ * in compliance with, at your election, the Elastic License 2.0 or the Server
19
+ * Side Public License, v 1.
20
+ */
21
+ // THIS IS A GENERATED FILE. DO NOT MODIFY MANUALLY. @see scripts/compile-icons.js
22
+ function _getRequireWildcardCache(e) { if ("function" != typeof WeakMap) return null; var r = new WeakMap(), t = new WeakMap(); return (_getRequireWildcardCache = function _getRequireWildcardCache(e) { return e ? t : r; })(e); }
23
+ function _interopRequireWildcard(e, r) { if (!r && e && e.__esModule) return e; if (null === e || "object" != _typeof(e) && "function" != typeof e) return { default: e }; var t = _getRequireWildcardCache(r); if (t && t.has(e)) return t.get(e); var n = { __proto__: null }, a = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var u in e) if ("default" !== u && {}.hasOwnProperty.call(e, u)) { var i = a ? Object.getOwnPropertyDescriptor(e, u) : null; i && (i.get || i.set) ? Object.defineProperty(n, u, i) : n[u] = e[u]; } return n.default = e, t && t.set(e, n), n; }
24
+ var EuiIconAddToChat = function EuiIconAddToChat(_ref) {
25
+ var title = _ref.title,
26
+ titleId = _ref.titleId,
27
+ props = (0, _objectWithoutProperties2.default)(_ref, _excluded);
28
+ return (0, _react2.jsx)("svg", (0, _extends2.default)({
29
+ xmlns: "http://www.w3.org/2000/svg",
30
+ width: 16,
31
+ height: 16,
32
+ viewBox: "0 0 16 16",
33
+ "aria-labelledby": titleId
34
+ }, props), title ? (0, _react2.jsx)("title", {
35
+ id: titleId
36
+ }, title) : null, (0, _react2.jsx)("path", {
37
+ fillRule: "evenodd",
38
+ 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",
39
+ clipRule: "evenodd"
40
+ }), (0, _react2.jsx)("path", {
41
+ 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"
42
+ }), (0, _react2.jsx)("path", {
43
+ fillRule: "evenodd",
44
+ 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",
45
+ clipRule: "evenodd"
46
+ }), (0, _react2.jsx)("path", {
47
+ d: "M14 13h2v1h-2v2h-1v-2h-2v-1h2v-2h1v2Z"
48
+ }));
49
+ };
50
+ var icon = exports.icon = EuiIconAddToChat;