@elastic/eui 79.0.1 → 81.0.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (300) hide show
  1. package/dist/eui_charts_theme.js.map +1 -1
  2. package/dist/eui_theme_dark.css +9 -11
  3. package/dist/eui_theme_dark.min.css +1 -1
  4. package/dist/eui_theme_light.css +11 -13
  5. package/dist/eui_theme_light.min.css +1 -1
  6. package/es/components/avatar/avatar.js +1 -1
  7. package/es/components/badge/badge.js +1 -1
  8. package/es/components/badge/beta_badge/beta_badge.js +1 -1
  9. package/es/components/basic_table/basic_table.js +1 -1
  10. package/es/components/basic_table/collapsed_item_actions.js +1 -1
  11. package/es/components/basic_table/in_memory_table.js +1 -1
  12. package/es/components/bottom_bar/bottom_bar.js +4 -1
  13. package/es/components/bottom_bar/bottom_bar.styles.js +2 -2
  14. package/es/components/button/_button_content_deprecated.js +1 -1
  15. package/es/components/button/button.js +4 -1
  16. package/es/components/button/button_display/_button_display.js +1 -1
  17. package/es/components/button/button_display/_button_display_content.js +1 -1
  18. package/es/components/button/button_empty/button_empty.js +5 -2
  19. package/es/components/button/button_group/button_group.js +1 -1
  20. package/es/components/button/button_group/button_group_button.js +1 -1
  21. package/es/components/button/button_icon/button_icon.js +5 -2
  22. package/es/components/call_out/call_out.js +1 -1
  23. package/es/components/card/card.js +1 -1
  24. package/es/components/collapsible_nav/collapsible_nav_group/collapsible_nav_group.js +1 -1
  25. package/es/components/combo_box/combo_box_input/combo_box_input.js +1 -1
  26. package/es/components/comment_list/comment.js +2 -2
  27. package/es/components/comment_list/comment_event.js +1 -1
  28. package/es/components/comment_list/comment_list.js +2 -2
  29. package/es/components/comment_list/comment_timeline.js +1 -1
  30. package/es/components/context_menu/context_menu.js +18 -7
  31. package/es/components/datagrid/body/data_grid_body.js +13 -13
  32. package/es/components/datagrid/body/data_grid_body_custom.js +13 -13
  33. package/es/components/datagrid/body/data_grid_body_virtualized.js +13 -13
  34. package/es/components/datagrid/body/data_grid_cell.js +24 -24
  35. package/es/components/datagrid/body/header/data_grid_header_cell.js +12 -12
  36. package/es/components/datagrid/body/header/data_grid_header_row.js +13 -13
  37. package/es/components/datagrid/controls/column_sorting_draggable.js +1 -1
  38. package/es/components/datagrid/data_grid.js +13 -13
  39. package/es/components/datagrid/utils/in_memory.js +12 -12
  40. package/es/components/date_picker/date_picker.js +2 -2
  41. package/es/components/date_picker/date_picker_range.js +1 -1
  42. package/es/components/empty_prompt/empty_prompt.js +1 -1
  43. package/es/components/facet/facet_button.js +1 -1
  44. package/es/components/filter_group/filter_group.a11y.js +2 -2
  45. package/es/components/form/field_number/field_number.js +25 -16
  46. package/es/components/form/field_text/field_text.js +2 -2
  47. package/es/components/form/form_control_layout/form_control_layout.js +2 -2
  48. package/es/components/form/form_control_layout/form_control_layout_custom_icon.js +1 -1
  49. package/es/components/form/form_control_layout/form_control_layout_icons.js +2 -2
  50. package/es/components/header/header_links/header_link.js +1 -1
  51. package/es/components/header/header_links/header_links.js +1 -1
  52. package/es/components/header/header_logo.js +1 -1
  53. package/es/components/icon/assets/app_vulnerability_management.js +36 -0
  54. package/es/components/icon/assets/logo_vulnerability_management.js +41 -0
  55. package/es/components/icon/icon.js +1 -1
  56. package/es/components/icon/icon_map.js +2 -0
  57. package/es/components/key_pad_menu/key_pad_menu_item.js +1 -1
  58. package/es/components/list_group/list_group.js +2 -2
  59. package/es/components/list_group/list_group_item.js +2 -2
  60. package/es/components/list_group/list_group_item_extra_action.js +1 -1
  61. package/es/components/list_group/pinnable_list_group/pinnable_list_group.js +4 -4
  62. package/es/components/loading/loading_logo.js +1 -1
  63. package/es/components/markdown_editor/markdown_editor.js +1 -1
  64. package/es/components/markdown_editor/markdown_editor_drop_zone.js +1 -1
  65. package/es/components/markdown_editor/markdown_editor_footer.js +1 -1
  66. package/es/components/markdown_editor/markdown_editor_toolbar.js +1 -1
  67. package/es/components/notification/notification_event.js +2 -2
  68. package/es/components/notification/notification_event_meta.js +1 -1
  69. package/es/components/overlay_mask/overlay_mask.js +25 -9
  70. package/es/components/page/page_header/page_header_content.js +1 -1
  71. package/es/components/pagination/pagination_button.js +1 -1
  72. package/es/components/portal/portal.js +17 -0
  73. package/es/components/selectable/selectable.a11y.js +39 -23
  74. package/es/components/selectable/selectable.js +4 -4
  75. package/es/components/selectable/selectable_list/selectable_list.js +6 -6
  76. package/es/components/selectable/selectable_list/selectable_list_item.js +120 -58
  77. package/es/components/selectable/selectable_templates/selectable_template_sitewide.js +5 -5
  78. package/es/components/suggest/suggest.js +1 -1
  79. package/es/components/suggest/suggest_item.js +1 -1
  80. package/es/components/table/table_header_button.js +1 -1
  81. package/es/components/timeline/timeline_item_icon.js +1 -1
  82. package/es/components/toast/global_toast_list.js +1 -1
  83. package/es/components/toast/toast.js +1 -1
  84. package/es/components/tool_tip/icon_tip.js +1 -1
  85. package/es/global_styling/reset/global_styles.js +1 -1
  86. package/es/services/theme/context.js +7 -1
  87. package/es/services/theme/index.js +1 -1
  88. package/es/services/theme/provider.js +47 -4
  89. package/eui.d.ts +79 -25
  90. package/i18ntokens.json +88 -52
  91. package/lib/components/avatar/avatar.js +1 -1
  92. package/lib/components/badge/badge.js +1 -1
  93. package/lib/components/badge/beta_badge/beta_badge.js +1 -1
  94. package/lib/components/basic_table/basic_table.js +1 -1
  95. package/lib/components/basic_table/collapsed_item_actions.js +1 -1
  96. package/lib/components/basic_table/in_memory_table.js +1 -1
  97. package/lib/components/bottom_bar/bottom_bar.js +4 -1
  98. package/lib/components/bottom_bar/bottom_bar.styles.js +2 -2
  99. package/lib/components/button/_button_content_deprecated.js +1 -1
  100. package/lib/components/button/button.js +4 -1
  101. package/lib/components/button/button_display/_button_display.js +1 -1
  102. package/lib/components/button/button_display/_button_display_content.js +1 -1
  103. package/lib/components/button/button_empty/button_empty.js +5 -2
  104. package/lib/components/button/button_group/button_group.js +1 -1
  105. package/lib/components/button/button_group/button_group_button.js +1 -1
  106. package/lib/components/button/button_icon/button_icon.js +5 -2
  107. package/lib/components/call_out/call_out.js +1 -1
  108. package/lib/components/card/card.js +1 -1
  109. package/lib/components/collapsible_nav/collapsible_nav_group/collapsible_nav_group.js +1 -1
  110. package/lib/components/combo_box/combo_box_input/combo_box_input.js +1 -1
  111. package/lib/components/comment_list/comment.js +2 -2
  112. package/lib/components/comment_list/comment_event.js +1 -1
  113. package/lib/components/comment_list/comment_list.js +2 -2
  114. package/lib/components/comment_list/comment_timeline.js +1 -1
  115. package/lib/components/context_menu/context_menu.js +18 -7
  116. package/lib/components/datagrid/body/data_grid_body.js +13 -13
  117. package/lib/components/datagrid/body/data_grid_body_custom.js +13 -13
  118. package/lib/components/datagrid/body/data_grid_body_virtualized.js +13 -13
  119. package/lib/components/datagrid/body/data_grid_cell.js +24 -24
  120. package/lib/components/datagrid/body/header/data_grid_header_cell.js +12 -12
  121. package/lib/components/datagrid/body/header/data_grid_header_row.js +13 -13
  122. package/lib/components/datagrid/controls/column_sorting_draggable.js +1 -1
  123. package/lib/components/datagrid/data_grid.js +13 -13
  124. package/lib/components/datagrid/utils/in_memory.js +12 -12
  125. package/lib/components/date_picker/date_picker.js +2 -2
  126. package/lib/components/date_picker/date_picker_range.js +1 -1
  127. package/lib/components/empty_prompt/empty_prompt.js +1 -1
  128. package/lib/components/facet/facet_button.js +1 -1
  129. package/lib/components/filter_group/filter_group.a11y.js +2 -2
  130. package/lib/components/form/field_number/field_number.js +25 -16
  131. package/lib/components/form/field_text/field_text.js +2 -2
  132. package/lib/components/form/form_control_layout/form_control_layout.js +2 -2
  133. package/lib/components/form/form_control_layout/form_control_layout_custom_icon.js +1 -1
  134. package/lib/components/form/form_control_layout/form_control_layout_icons.js +2 -2
  135. package/lib/components/header/header_links/header_link.js +1 -1
  136. package/lib/components/header/header_links/header_links.js +1 -1
  137. package/lib/components/header/header_logo.js +1 -1
  138. package/lib/components/icon/assets/app_vulnerability_management.js +36 -0
  139. package/lib/components/icon/assets/logo_vulnerability_management.js +41 -0
  140. package/lib/components/icon/icon.js +1 -1
  141. package/lib/components/icon/icon_map.js +2 -0
  142. package/lib/components/icon/svgs/app_vulnerability_management.svg +4 -0
  143. package/lib/components/icon/svgs/logo_vulnerability_management.svg +7 -0
  144. package/lib/components/key_pad_menu/key_pad_menu_item.js +1 -1
  145. package/lib/components/list_group/list_group.js +2 -2
  146. package/lib/components/list_group/list_group_item.js +2 -2
  147. package/lib/components/list_group/list_group_item_extra_action.js +1 -1
  148. package/lib/components/list_group/pinnable_list_group/pinnable_list_group.js +4 -4
  149. package/lib/components/loading/loading_logo.js +1 -1
  150. package/lib/components/markdown_editor/markdown_editor.js +1 -1
  151. package/lib/components/markdown_editor/markdown_editor_drop_zone.js +1 -1
  152. package/lib/components/markdown_editor/markdown_editor_footer.js +1 -1
  153. package/lib/components/markdown_editor/markdown_editor_toolbar.js +1 -1
  154. package/lib/components/notification/notification_event.js +2 -2
  155. package/lib/components/notification/notification_event_meta.js +1 -1
  156. package/lib/components/overlay_mask/overlay_mask.js +25 -4
  157. package/lib/components/page/page_header/page_header_content.js +1 -1
  158. package/lib/components/portal/portal.js +17 -0
  159. package/lib/components/selectable/selectable.a11y.js +39 -23
  160. package/lib/components/selectable/selectable.js +4 -4
  161. package/lib/components/selectable/selectable_list/selectable_list.js +6 -6
  162. package/lib/components/selectable/selectable_list/selectable_list_item.js +120 -58
  163. package/lib/components/selectable/selectable_templates/selectable_template_sitewide.js +5 -5
  164. package/lib/components/suggest/suggest.js +1 -1
  165. package/lib/components/suggest/suggest_item.js +1 -1
  166. package/lib/components/table/table_header_button.js +1 -1
  167. package/lib/components/timeline/timeline_item_icon.js +1 -1
  168. package/lib/components/toast/global_toast_list.js +1 -1
  169. package/lib/components/toast/toast.js +1 -1
  170. package/lib/components/tool_tip/icon_tip.js +1 -1
  171. package/lib/global_styling/reset/global_styles.js +1 -1
  172. package/lib/services/theme/context.js +9 -2
  173. package/lib/services/theme/index.js +6 -0
  174. package/lib/services/theme/provider.js +45 -2
  175. package/optimize/es/components/bottom_bar/bottom_bar.js +4 -1
  176. package/optimize/es/components/bottom_bar/bottom_bar.styles.js +2 -2
  177. package/optimize/es/components/button/button.js +4 -1
  178. package/optimize/es/components/button/button_empty/button_empty.js +4 -1
  179. package/optimize/es/components/button/button_icon/button_icon.js +4 -1
  180. package/optimize/es/components/combo_box/combo_box_input/combo_box_input.js +1 -1
  181. package/optimize/es/components/context_menu/context_menu.js +13 -7
  182. package/optimize/es/components/filter_group/filter_group.a11y.js +2 -2
  183. package/optimize/es/components/form/field_number/field_number.js +21 -13
  184. package/optimize/es/components/icon/assets/app_vulnerability_management.js +35 -0
  185. package/optimize/es/components/icon/assets/logo_vulnerability_management.js +40 -0
  186. package/optimize/es/components/icon/icon_map.js +2 -0
  187. package/optimize/es/components/overlay_mask/overlay_mask.js +22 -9
  188. package/optimize/es/components/portal/portal.js +18 -1
  189. package/optimize/es/components/selectable/selectable.a11y.js +39 -23
  190. package/optimize/es/components/selectable/selectable_list/selectable_list_item.js +117 -54
  191. package/optimize/es/global_styling/reset/global_styles.js +1 -1
  192. package/optimize/es/services/theme/context.js +7 -1
  193. package/optimize/es/services/theme/index.js +1 -1
  194. package/optimize/es/services/theme/provider.js +46 -4
  195. package/optimize/lib/components/bottom_bar/bottom_bar.js +4 -1
  196. package/optimize/lib/components/bottom_bar/bottom_bar.styles.js +2 -2
  197. package/optimize/lib/components/button/button.js +4 -1
  198. package/optimize/lib/components/button/button_empty/button_empty.js +4 -1
  199. package/optimize/lib/components/button/button_icon/button_icon.js +4 -1
  200. package/optimize/lib/components/combo_box/combo_box_input/combo_box_input.js +1 -1
  201. package/optimize/lib/components/context_menu/context_menu.js +13 -7
  202. package/optimize/lib/components/filter_group/filter_group.a11y.js +2 -2
  203. package/optimize/lib/components/form/field_number/field_number.js +21 -13
  204. package/optimize/lib/components/icon/assets/app_vulnerability_management.js +36 -0
  205. package/optimize/lib/components/icon/assets/logo_vulnerability_management.js +41 -0
  206. package/optimize/lib/components/icon/icon_map.js +2 -0
  207. package/optimize/lib/components/icon/svgs/app_vulnerability_management.svg +4 -0
  208. package/optimize/lib/components/icon/svgs/logo_vulnerability_management.svg +7 -0
  209. package/optimize/lib/components/overlay_mask/overlay_mask.js +22 -4
  210. package/optimize/lib/components/portal/portal.js +18 -1
  211. package/optimize/lib/components/selectable/selectable.a11y.js +39 -23
  212. package/optimize/lib/components/selectable/selectable_list/selectable_list_item.js +117 -54
  213. package/optimize/lib/global_styling/reset/global_styles.js +1 -1
  214. package/optimize/lib/services/theme/context.js +9 -2
  215. package/optimize/lib/services/theme/index.js +6 -0
  216. package/optimize/lib/services/theme/provider.js +44 -2
  217. package/package.json +2 -5
  218. package/src/components/combo_box/_combo_box.scss +9 -11
  219. package/src/components/selectable/selectable_templates/_variables.scss +9 -5
  220. package/test-env/components/avatar/avatar.js +1 -1
  221. package/test-env/components/badge/badge.js +1 -1
  222. package/test-env/components/badge/beta_badge/beta_badge.js +1 -1
  223. package/test-env/components/basic_table/basic_table.js +1 -1
  224. package/test-env/components/basic_table/collapsed_item_actions.js +1 -1
  225. package/test-env/components/basic_table/in_memory_table.js +1 -1
  226. package/test-env/components/bottom_bar/bottom_bar.js +4 -1
  227. package/test-env/components/bottom_bar/bottom_bar.styles.js +2 -2
  228. package/test-env/components/button/_button_content_deprecated.js +1 -1
  229. package/test-env/components/button/button.js +4 -1
  230. package/test-env/components/button/button_display/_button_display.js +1 -1
  231. package/test-env/components/button/button_display/_button_display_content.js +1 -1
  232. package/test-env/components/button/button_empty/button_empty.js +5 -2
  233. package/test-env/components/button/button_group/button_group.js +1 -1
  234. package/test-env/components/button/button_group/button_group_button.js +1 -1
  235. package/test-env/components/button/button_icon/button_icon.js +5 -2
  236. package/test-env/components/call_out/call_out.js +1 -1
  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/combo_box/combo_box_input/combo_box_input.js +1 -1
  240. package/test-env/components/comment_list/comment.js +2 -2
  241. package/test-env/components/comment_list/comment_event.js +1 -1
  242. package/test-env/components/comment_list/comment_list.js +2 -2
  243. package/test-env/components/comment_list/comment_timeline.js +1 -1
  244. package/test-env/components/context_menu/context_menu.js +18 -7
  245. package/test-env/components/datagrid/body/data_grid_body.js +13 -13
  246. package/test-env/components/datagrid/body/data_grid_body_custom.js +13 -13
  247. package/test-env/components/datagrid/body/data_grid_body_virtualized.js +13 -13
  248. package/test-env/components/datagrid/body/data_grid_cell.js +24 -24
  249. package/test-env/components/datagrid/body/header/data_grid_header_cell.js +12 -12
  250. package/test-env/components/datagrid/body/header/data_grid_header_row.js +13 -13
  251. package/test-env/components/datagrid/controls/column_sorting_draggable.js +1 -1
  252. package/test-env/components/datagrid/data_grid.js +13 -13
  253. package/test-env/components/datagrid/utils/in_memory.js +12 -12
  254. package/test-env/components/date_picker/date_picker.js +2 -2
  255. package/test-env/components/date_picker/date_picker_range.js +1 -1
  256. package/test-env/components/empty_prompt/empty_prompt.js +1 -1
  257. package/test-env/components/facet/facet_button.js +1 -1
  258. package/test-env/components/filter_group/filter_group.a11y.js +2 -2
  259. package/test-env/components/form/field_number/field_number.js +25 -16
  260. package/test-env/components/form/field_text/field_text.js +2 -2
  261. package/test-env/components/form/form_control_layout/form_control_layout.js +2 -2
  262. package/test-env/components/form/form_control_layout/form_control_layout_custom_icon.js +1 -1
  263. package/test-env/components/form/form_control_layout/form_control_layout_icons.js +2 -2
  264. package/test-env/components/header/header_links/header_link.js +1 -1
  265. package/test-env/components/header/header_links/header_links.js +1 -1
  266. package/test-env/components/header/header_logo.js +1 -1
  267. package/test-env/components/icon/assets/app_vulnerability_management.js +36 -0
  268. package/test-env/components/icon/assets/logo_vulnerability_management.js +41 -0
  269. package/test-env/components/icon/icon_map.js +2 -0
  270. package/test-env/components/key_pad_menu/key_pad_menu_item.js +1 -1
  271. package/test-env/components/list_group/list_group.js +2 -2
  272. package/test-env/components/list_group/list_group_item.js +2 -2
  273. package/test-env/components/list_group/list_group_item_extra_action.js +1 -1
  274. package/test-env/components/list_group/pinnable_list_group/pinnable_list_group.js +4 -4
  275. package/test-env/components/loading/loading_logo.js +1 -1
  276. package/test-env/components/markdown_editor/markdown_editor.js +1 -1
  277. package/test-env/components/markdown_editor/markdown_editor_drop_zone.js +1 -1
  278. package/test-env/components/markdown_editor/markdown_editor_footer.js +1 -1
  279. package/test-env/components/markdown_editor/markdown_editor_toolbar.js +1 -1
  280. package/test-env/components/notification/notification_event.js +2 -2
  281. package/test-env/components/notification/notification_event_meta.js +1 -1
  282. package/test-env/components/overlay_mask/overlay_mask.js +22 -4
  283. package/test-env/components/page/page_header/page_header_content.js +1 -1
  284. package/test-env/components/portal/portal.js +17 -0
  285. package/test-env/components/selectable/selectable.a11y.js +39 -23
  286. package/test-env/components/selectable/selectable.js +4 -4
  287. package/test-env/components/selectable/selectable_list/selectable_list.js +6 -6
  288. package/test-env/components/selectable/selectable_list/selectable_list_item.js +121 -58
  289. package/test-env/components/selectable/selectable_templates/selectable_template_sitewide.js +5 -5
  290. package/test-env/components/suggest/suggest.js +1 -1
  291. package/test-env/components/suggest/suggest_item.js +1 -1
  292. package/test-env/components/table/table_header_button.js +1 -1
  293. package/test-env/components/timeline/timeline_item_icon.js +1 -1
  294. package/test-env/components/toast/global_toast_list.js +1 -1
  295. package/test-env/components/toast/toast.js +1 -1
  296. package/test-env/components/tool_tip/icon_tip.js +1 -1
  297. package/test-env/global_styling/reset/global_styles.js +1 -1
  298. package/test-env/services/theme/context.js +9 -2
  299. package/test-env/services/theme/index.js +6 -0
  300. package/test-env/services/theme/provider.js +44 -2
@@ -260,6 +260,7 @@ export var typeToPathMap = {
260
260
  logoSketch: 'logo_sketch',
261
261
  logoSlack: 'logo_slack',
262
262
  logoUptime: 'logo_uptime',
263
+ logoVulnerabilityManagement: 'logo_vulnerability_management',
263
264
  logoWebhook: 'logo_webhook',
264
265
  logoWindows: 'logo_windows',
265
266
  logoWorkplaceSearch: 'logo_workplace_search',
@@ -415,6 +416,7 @@ export var typeToPathMap = {
415
416
  visVega: 'vis_vega',
416
417
  visVisualBuilder: 'vis_visual_builder',
417
418
  visualizeApp: 'app_visualize',
419
+ vulnerabilityManagementApp: 'app_vulnerability_management',
418
420
  warning: 'warning',
419
421
  alert: 'warning',
420
422
  // NOTE: This is an undocumented alias for `warning`, added for legacy compatability with Elastic Charts
@@ -1,3 +1,4 @@
1
+ import _toConsumableArray from "@babel/runtime/helpers/toConsumableArray";
1
2
  import _slicedToArray from "@babel/runtime/helpers/slicedToArray";
2
3
  import _objectWithoutProperties from "@babel/runtime/helpers/objectWithoutProperties";
3
4
  var _excluded = ["className", "children", "headerZindexLocation", "maskRef"];
@@ -9,11 +10,6 @@ var _excluded = ["className", "children", "headerZindexLocation", "maskRef"];
9
10
  * Side Public License, v 1.
10
11
  */
11
12
 
12
- /**
13
- * NOTE: We can't test this component because Enzyme doesn't support rendering
14
- * into portals.
15
- */
16
-
17
13
  import React, { useEffect, useState } from 'react';
18
14
  import { cx } from '@emotion/css';
19
15
  import { Global } from '@emotion/react';
@@ -50,11 +46,28 @@ export var EuiOverlayMask = function EuiOverlayMask(_ref) {
50
46
  });
51
47
  }, [overlayMaskNode]); // eslint-disable-line react-hooks/exhaustive-deps
52
48
 
49
+ // Note: Use `classList.add/remove` instead of setting the entire `className`
50
+ // so as not to override any existing classes set by `EuiPortal`
53
51
  useEffect(function () {
54
- if (!overlayMaskNode) return;
55
- overlayMaskNode.className = cx('euiOverlayMask', cssStyles, className);
56
- overlayMaskNode.dataset.relativeToHeader = headerZindexLocation;
57
- }, [overlayMaskNode, className, cssStyles, headerZindexLocation]);
52
+ if (overlayMaskNode) {
53
+ overlayMaskNode.classList.add('euiOverlayMask', cssStyles);
54
+ overlayMaskNode.dataset.relativeToHeader = headerZindexLocation;
55
+ return function () {
56
+ return overlayMaskNode.classList.remove(cssStyles);
57
+ };
58
+ }
59
+ }, [overlayMaskNode, cssStyles, headerZindexLocation]);
60
+ useEffect(function () {
61
+ if (className && overlayMaskNode) {
62
+ var _overlayMaskNode$clas;
63
+ var classNameArgs = className.split(' '); // The `classList` API doesn't support multiple classes in the same string
64
+ (_overlayMaskNode$clas = overlayMaskNode.classList).add.apply(_overlayMaskNode$clas, _toConsumableArray(classNameArgs));
65
+ return function () {
66
+ var _overlayMaskNode$clas2;
67
+ return (_overlayMaskNode$clas2 = overlayMaskNode.classList).remove.apply(_overlayMaskNode$clas2, _toConsumableArray(classNameArgs));
68
+ };
69
+ }
70
+ }, [overlayMaskNode, className]);
58
71
  return ___EmotionJSX(EuiPortal, {
59
72
  portalRef: combinedMaskRef
60
73
  }, ___EmotionJSX(Global, {
@@ -22,6 +22,7 @@ function _isNativeReflectConstruct() { if (typeof Reflect === "undefined" || !Re
22
22
 
23
23
  import { Component } from 'react';
24
24
  import { createPortal } from 'react-dom';
25
+ import { EuiNestedThemeContext } from '../../services';
25
26
  import { keysOf } from '../common';
26
27
  export var insertPositions = {
27
28
  after: 'afterend',
@@ -55,6 +56,7 @@ export var EuiPortal = /*#__PURE__*/function (_Component) {
55
56
  _createClass(EuiPortal, [{
56
57
  key: "componentDidMount",
57
58
  value: function componentDidMount() {
59
+ this.setThemeColor();
58
60
  this.updatePortalRef(this.portalNode);
59
61
  }
60
62
  }, {
@@ -66,6 +68,20 @@ export var EuiPortal = /*#__PURE__*/function (_Component) {
66
68
  }
67
69
  this.updatePortalRef(null);
68
70
  }
71
+
72
+ // Set the inherited color of the portal based on the wrapping EuiThemeProvider
73
+ }, {
74
+ key: "setThemeColor",
75
+ value: function setThemeColor() {
76
+ if (this.portalNode && this.context) {
77
+ var _this$context = this.context,
78
+ hasDifferentColorFromGlobalTheme = _this$context.hasDifferentColorFromGlobalTheme,
79
+ colorClassName = _this$context.colorClassName;
80
+ if (hasDifferentColorFromGlobalTheme && this.props.insert == null) {
81
+ this.portalNode.classList.add(colorClassName);
82
+ }
83
+ }
84
+ }
69
85
  }, {
70
86
  key: "updatePortalRef",
71
87
  value: function updatePortalRef(ref) {
@@ -80,4 +96,5 @@ export var EuiPortal = /*#__PURE__*/function (_Component) {
80
96
  }
81
97
  }]);
82
98
  return EuiPortal;
83
- }(Component);
99
+ }(Component);
100
+ _defineProperty(EuiPortal, "contextType", EuiNestedThemeContext);
@@ -1,5 +1,4 @@
1
1
  import _slicedToArray from "@babel/runtime/helpers/slicedToArray";
2
- import _extends from "@babel/runtime/helpers/extends";
3
2
  /*
4
3
  * Copyright Elasticsearch B.V. and/or licensed to Elasticsearch B.V. under one
5
4
  * or more contributor license agreements. Licensed under the Elastic License
@@ -25,27 +24,27 @@ var options = [{
25
24
  }, {
26
25
  label: "Pandora is one of Saturn's moons, named for a Titaness of Greek mythology"
27
26
  }];
28
- var EuiSelectableListboxOnly = function EuiSelectableListboxOnly(args) {
29
- return ___EmotionJSX(EuiSelectable, _extends({
30
- options: options
31
- }, args), function (list) {
32
- return ___EmotionJSX(React.Fragment, null, list);
33
- });
34
- };
35
- var EuiSelectableWithSearchInput = function EuiSelectableWithSearchInput(args) {
36
- return ___EmotionJSX(EuiSelectable, _extends({
37
- searchable: true,
38
- options: options
39
- }, args), function (list, search) {
40
- return ___EmotionJSX(React.Fragment, null, search, list);
41
- });
42
- };
27
+ var excludedOptions = [{
28
+ label: 'Titan',
29
+ 'data-test-subj': 'titanOption',
30
+ checked: 'on'
31
+ }, {
32
+ label: 'Enceladus',
33
+ checked: 'off'
34
+ }, {
35
+ label: "Pandora is one of Saturn's moons, named for a Titaness of Greek mythology",
36
+ checked: 'mixed'
37
+ }];
43
38
  describe('EuiSelectable', function () {
44
39
  describe('with a `searchable` configuration', function () {
45
40
  it('has no accessibility errors', function () {
46
41
  var onChange = cy.stub();
47
- cy.realMount(___EmotionJSX(EuiSelectableWithSearchInput, {
48
- onChange: onChange
42
+ cy.realMount(___EmotionJSX(EuiSelectable, {
43
+ options: options,
44
+ onChange: onChange,
45
+ searchable: true
46
+ }, function (list, search) {
47
+ return ___EmotionJSX(React.Fragment, null, search, list);
49
48
  }));
50
49
  cy.checkAxe();
51
50
  });
@@ -53,9 +52,25 @@ describe('EuiSelectable', function () {
53
52
  describe('without a `searchable` configuration', function () {
54
53
  it('has no accessibility errors', function () {
55
54
  var onChange = cy.stub();
56
- cy.realMount(___EmotionJSX(EuiSelectableListboxOnly, {
55
+ cy.realMount(___EmotionJSX(EuiSelectable, {
57
56
  "aria-label": "No search box",
57
+ options: options,
58
58
  onChange: onChange
59
+ }, function (list) {
60
+ return ___EmotionJSX(React.Fragment, null, list);
61
+ }));
62
+ cy.checkAxe();
63
+ });
64
+ });
65
+ describe('with excluded and mixed options configuration', function () {
66
+ it('has no accessibility errors', function () {
67
+ var onChange = cy.stub();
68
+ cy.realMount(___EmotionJSX(EuiSelectable, {
69
+ "aria-label": "Excluded and mixed options",
70
+ options: excludedOptions,
71
+ onChange: onChange
72
+ }, function (list) {
73
+ return ___EmotionJSX(React.Fragment, null, list);
59
74
  }));
60
75
  cy.checkAxe();
61
76
  });
@@ -82,12 +97,13 @@ describe('EuiSelectable', function () {
82
97
  button: button,
83
98
  isOpen: isPopoverOpen,
84
99
  closePopover: onClosePopover
85
- }, ___EmotionJSX(EuiSelectableWithSearchInput, {
100
+ }, ___EmotionJSX(EuiSelectable, {
86
101
  "aria-label": "With popover",
87
102
  options: options,
88
- onChange: onChange
89
- }, function (list) {
90
- return ___EmotionJSX(React.Fragment, null, list);
103
+ onChange: onChange,
104
+ searchable: true
105
+ }, function (list, search) {
106
+ return ___EmotionJSX(React.Fragment, null, search, list);
91
107
  }));
92
108
  };
93
109
  it('has no accessibility errors', function () {
@@ -2,6 +2,7 @@ import _extends from "@babel/runtime/helpers/extends";
2
2
  import _objectWithoutProperties from "@babel/runtime/helpers/objectWithoutProperties";
3
3
  import _classCallCheck from "@babel/runtime/helpers/classCallCheck";
4
4
  import _createClass from "@babel/runtime/helpers/createClass";
5
+ import _assertThisInitialized from "@babel/runtime/helpers/assertThisInitialized";
5
6
  import _inherits from "@babel/runtime/helpers/inherits";
6
7
  import _possibleConstructorReturn from "@babel/runtime/helpers/possibleConstructorReturn";
7
8
  import _getPrototypeOf from "@babel/runtime/helpers/getPrototypeOf";
@@ -27,18 +28,28 @@ import { EuiScreenReaderOnly } from '../../accessibility';
27
28
  import { EuiBadge } from '../../badge';
28
29
  import { jsx as ___EmotionJSX } from "@emotion/react";
29
30
  function resolveIconAndColor(checked) {
30
- if (!checked) {
31
- return {
32
- icon: 'empty'
33
- };
31
+ switch (checked) {
32
+ case 'on':
33
+ return {
34
+ icon: 'check',
35
+ color: 'text'
36
+ };
37
+ case 'off':
38
+ return {
39
+ icon: 'cross',
40
+ color: 'text'
41
+ };
42
+ case 'mixed':
43
+ return {
44
+ icon: 'minus',
45
+ color: 'text'
46
+ };
47
+ case undefined:
48
+ default:
49
+ return {
50
+ icon: 'empty'
51
+ };
34
52
  }
35
- return checked === 'on' ? {
36
- icon: 'check',
37
- color: 'text'
38
- } : {
39
- icon: 'cross',
40
- color: 'text'
41
- };
42
53
  }
43
54
  var paddingSizeToClassNameMap = {
44
55
  none: null,
@@ -50,8 +61,32 @@ export var EuiSelectableListItem = /*#__PURE__*/function (_Component) {
50
61
  _inherits(EuiSelectableListItem, _Component);
51
62
  var _super = _createSuper(EuiSelectableListItem);
52
63
  function EuiSelectableListItem(props) {
64
+ var _this;
53
65
  _classCallCheck(this, EuiSelectableListItem);
54
- return _super.call(this, props);
66
+ _this = _super.call(this, props);
67
+ // aria-checked is intended to be used with role="checkbox" but
68
+ // the MDN documentation lists it as a possibility for role="option".
69
+ // See https://developer.mozilla.org/en-US/docs/Web/Accessibility/ARIA/Attributes/aria-checked
70
+ // and https://developer.mozilla.org/en-US/docs/Web/Accessibility/ARIA/Roles/option_role
71
+ _defineProperty(_assertThisInitialized(_this), "isChecked", function (role, checked) {
72
+ var rolesThatCanBeMixed = ['option', 'checkbox', 'menuitemcheckbox'];
73
+ var rolesThatCanBeChecked = [].concat(rolesThatCanBeMixed, ['radio', 'menuitemradio', 'switch']);
74
+ if (!rolesThatCanBeChecked.includes(role)) return undefined;
75
+ switch (checked) {
76
+ case 'on':
77
+ case 'off':
78
+ return true;
79
+ case 'mixed':
80
+ if (rolesThatCanBeMixed.includes(role)) {
81
+ return 'mixed';
82
+ } else {
83
+ return false;
84
+ }
85
+ default:
86
+ return false;
87
+ }
88
+ });
89
+ return _this;
55
90
  }
56
91
  _createClass(EuiSelectableListItem, [{
57
92
  key: "render",
@@ -90,41 +125,71 @@ export var EuiSelectableListItem = /*#__PURE__*/function (_Component) {
90
125
  });
91
126
  }
92
127
  var state;
93
- var instruction;
94
- if (allowExclusions && checked === 'on') {
95
- state = ___EmotionJSX(EuiI18n, {
96
- token: "euiSelectableListItem.includedOption",
97
- default: "Selected option."
98
- });
99
- instruction = ___EmotionJSX(EuiI18n, {
100
- token: "euiSelectableListItem.includedOptionInstructions",
101
- default: "To exclude this option, press enter."
102
- });
103
- } else if (allowExclusions && checked === 'off') {
104
- state = ___EmotionJSX(EuiI18n, {
105
- token: "euiSelectableListItem.excludedOption",
106
- default: "Excluded option."
107
- });
108
- instruction = ___EmotionJSX(EuiI18n, {
109
- token: "euiSelectableListItem.excludedOptionInstructions",
110
- default: "To uncheck this option, press enter."
111
- });
112
- } else if (allowExclusions && !checked) {
113
- instruction = ___EmotionJSX(EuiI18n, {
114
- token: "euiSelectableListItem.unckeckedOptionInstructions",
115
- default: "To select this option, press enter."
116
- });
117
- }
118
- var isChecked = !disabled && typeof checked === 'string';
119
- if (!allowExclusions && isChecked) {
120
- state = ___EmotionJSX(EuiI18n, {
121
- token: "euiSelectableListItem.checkedOption",
122
- default: "Checked option."
123
- });
124
- instruction = searchable ? ___EmotionJSX(EuiI18n, {
125
- token: "euiSelectableListItem.checkedOptionInstructions",
126
- default: "To uncheck this option, press enter."
127
- }) : undefined;
128
+ var instructions;
129
+ var screenReaderStrings = {
130
+ checked: {
131
+ state: ___EmotionJSX(EuiI18n, {
132
+ token: "euiSelectableListItem.checkedOption",
133
+ default: "Checked option."
134
+ }),
135
+ instructions: ___EmotionJSX(EuiI18n, {
136
+ token: "euiSelectableListItem.checkOptionInstructions",
137
+ default: "To check this option, press Enter."
138
+ })
139
+ },
140
+ unchecked: {
141
+ instructions: ___EmotionJSX(EuiI18n, {
142
+ token: "euiSelectableListItem.uncheckOptionInstructions",
143
+ default: "To uncheck this option, press Enter."
144
+ })
145
+ },
146
+ excluded: {
147
+ state: ___EmotionJSX(EuiI18n, {
148
+ token: "euiSelectableListItem.excludedOption",
149
+ default: "Excluded option."
150
+ }),
151
+ instructions: ___EmotionJSX(EuiI18n, {
152
+ token: "euiSelectableListItem.excludeOptionInstructions",
153
+ default: "To exclude this option, press Enter."
154
+ })
155
+ },
156
+ mixed: {
157
+ state: ___EmotionJSX(EuiI18n, {
158
+ token: "euiSelectableListItem.mixedOption",
159
+ default: "Mixed (indeterminate) option."
160
+ }),
161
+ instructions: ___EmotionJSX(EuiI18n, {
162
+ token: "euiSelectableListItem.mixedOptionInstructions",
163
+ default: "To check this option for all, press Enter once."
164
+ }),
165
+ uncheckInstructions: ___EmotionJSX(EuiI18n, {
166
+ token: "euiSelectableListItem.mixedOptionUncheckInstructions",
167
+ default: "To uncheck this option for all, press Enter twice."
168
+ }),
169
+ excludeInstructions: ___EmotionJSX(EuiI18n, {
170
+ token: "euiSelectableListItem.mixedOptionExcludeInstructions",
171
+ default: "To exclude this option for all, press Enter twice."
172
+ })
173
+ }
174
+ };
175
+ switch (checked) {
176
+ case 'on':
177
+ state = screenReaderStrings.checked.state;
178
+ // eslint-disable-next-line no-nested-ternary
179
+ instructions = allowExclusions ? screenReaderStrings.excluded.instructions : searchable ? screenReaderStrings.unchecked.instructions : undefined;
180
+ break;
181
+ case 'off':
182
+ state = screenReaderStrings.excluded.state;
183
+ instructions = screenReaderStrings.unchecked.instructions;
184
+ break;
185
+ case 'mixed':
186
+ state = screenReaderStrings.mixed.state;
187
+ instructions = ___EmotionJSX(React.Fragment, null, screenReaderStrings.mixed.instructions, ' ', allowExclusions ? screenReaderStrings.mixed.excludeInstructions : screenReaderStrings.mixed.uncheckInstructions);
188
+ break;
189
+ case undefined:
190
+ default:
191
+ instructions = allowExclusions || searchable ? screenReaderStrings.checked.instructions : undefined;
192
+ break;
128
193
  }
129
194
  var prependNode;
130
195
  if (prepend) {
@@ -161,22 +226,20 @@ export var EuiSelectableListItem = /*#__PURE__*/function (_Component) {
161
226
  }, append, " ", isFocused && !disabled ? onFocusBadgeNode : null);
162
227
  }
163
228
  }
164
- var instructions = (instruction || state) && ___EmotionJSX(EuiScreenReaderOnly, null, ___EmotionJSX("div", null, state || instruction ? ' - ' : null, state, state && instruction ? ' ' : null, instruction));
229
+ var screenReaderText = (state || instructions) && ___EmotionJSX(EuiScreenReaderOnly, null, ___EmotionJSX("div", null, state || instructions ? '. ' : null, state, state && instructions ? ' ' : null, instructions));
165
230
  return ___EmotionJSX("li", _extends({
166
231
  role: role,
167
- "data-test-selected": isChecked // Whether the item is checked/selected
168
- ,
169
- "aria-checked": role === 'option' ? isChecked : undefined // Whether the item is "checked"
232
+ "aria-disabled": disabled,
233
+ "aria-checked": this.isChecked(role, checked) // Whether the item is "checked"
170
234
  ,
171
235
  "aria-selected": !disabled && isFocused // Whether the item has keyboard focus per W3 spec
172
236
  ,
173
- className: classes,
174
- "aria-disabled": disabled
237
+ className: classes
175
238
  }, rest), ___EmotionJSX("span", {
176
239
  className: "euiSelectableListItem__content"
177
240
  }, optionIcon, prependNode, ___EmotionJSX("span", {
178
241
  className: textClasses
179
- }, children, instructions), appendNode));
242
+ }, children, screenReaderText), appendNode));
180
243
  }
181
244
  }]);
182
245
  return EuiSelectableListItem;
@@ -42,7 +42,7 @@ export var EuiGlobalStyles = function EuiGlobalStyles(_ref) {
42
42
  /**
43
43
  * Final styles
44
44
  */
45
- var styles = /*#__PURE__*/css(reset, " html{", scrollbarStyles, " ", fontReset, " text-size-adjust:100%;font-kerning:normal;", logicalCSS('height', '100%'), " background-color:", colors.body, ";color:", colors.text, ";}code,pre,kbd,samp{font-family:", font.familyCode, ";}input,textarea,select{", fontReset, ";}button{font-family:", font.family, ";}em{font-style:italic;}strong{font-weight:", font.weight.bold, ";}*:focus{", euiFocusRing(euiThemeContext), ";}::selection{background:", transparentize(colors.primary, colorMode === 'LIGHT' ? 0.1 : 0.2), ";}a{color:", colors.primaryText, ";&,&:hover,&:focus{text-decoration:none;}}.euiBody-hasPortalContent{position:relative;};label:styles;");
45
+ var styles = /*#__PURE__*/css(reset, " html{", scrollbarStyles, " ", fontReset, " text-size-adjust:100%;font-kerning:normal;", logicalCSS('height', '100%'), " background-color:", colors.body, ";color:", colors.text, ";}code,pre,kbd,samp{font-family:", font.familyCode, ";}input,textarea,select{", fontReset, ";}select:disabled{opacity:1;}button{font-family:", font.family, ";}em{font-style:italic;}strong{font-weight:", font.weight.bold, ";}*:focus{", euiFocusRing(euiThemeContext), ";}::selection{background:", transparentize(colors.primary, colorMode === 'LIGHT' ? 0.1 : 0.2), ";}a{color:", colors.primaryText, ";&,&:hover,&:focus{text-decoration:none;}}.euiBody-hasPortalContent{position:relative;};label:styles;");
46
46
  return ___EmotionJSX(Global, {
47
47
  styles: styles
48
48
  });
@@ -13,4 +13,10 @@ export var EuiSystemContext = /*#__PURE__*/createContext(EuiThemeAmsterdam);
13
13
  export var EuiModificationsContext = /*#__PURE__*/createContext({});
14
14
  export var EuiColorModeContext = /*#__PURE__*/createContext(DEFAULT_COLOR_MODE);
15
15
  export var defaultComputedTheme = getComputed(EuiThemeAmsterdam, {}, DEFAULT_COLOR_MODE);
16
- export var EuiThemeContext = /*#__PURE__*/createContext(defaultComputedTheme);
16
+ export var EuiThemeContext = /*#__PURE__*/createContext(defaultComputedTheme);
17
+ export var EuiNestedThemeContext = /*#__PURE__*/createContext({
18
+ isGlobalTheme: true,
19
+ hasDifferentColorFromGlobalTheme: false,
20
+ bodyColor: '',
21
+ colorClassName: ''
22
+ });
@@ -6,7 +6,7 @@
6
6
  * Side Public License, v 1.
7
7
  */
8
8
 
9
- export { EuiSystemContext, EuiThemeContext, EuiModificationsContext, EuiColorModeContext } from './context';
9
+ export { EuiSystemContext, EuiThemeContext, EuiNestedThemeContext, EuiModificationsContext, EuiColorModeContext } from './context';
10
10
  export { useEuiTheme, withEuiTheme, RenderWithEuiTheme } from './hooks';
11
11
  export { EuiThemeProvider, getEuiDevProviderWarning, setEuiDevProviderWarning } from './provider';
12
12
  export { buildTheme, computed, isInverseColorMode, getColorMode, getComputed, getOn, mergeDeep, setOn, Computed } from './utils';
@@ -1,5 +1,8 @@
1
+ import _extends from "@babel/runtime/helpers/extends";
2
+ import _objectWithoutProperties from "@babel/runtime/helpers/objectWithoutProperties";
1
3
  import _defineProperty from "@babel/runtime/helpers/defineProperty";
2
4
  import _slicedToArray from "@babel/runtime/helpers/slicedToArray";
5
+ var _excluded = ["cloneElement", "className"];
3
6
  function ownKeys(object, enumerableOnly) { var keys = Object.keys(object); if (Object.getOwnPropertySymbols) { var symbols = Object.getOwnPropertySymbols(object); enumerableOnly && (symbols = symbols.filter(function (sym) { return Object.getOwnPropertyDescriptor(object, sym).enumerable; })), keys.push.apply(keys, symbols); } return keys; }
4
7
  function _objectSpread(target) { for (var i = 1; i < arguments.length; i++) { var source = null != arguments[i] ? arguments[i] : {}; i % 2 ? ownKeys(Object(source), !0).forEach(function (key) { _defineProperty(target, key, source[key]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(target, Object.getOwnPropertyDescriptors(source)) : ownKeys(Object(source)).forEach(function (key) { Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key)); }); } return target; }
5
8
  /*
@@ -10,9 +13,11 @@ function _objectSpread(target) { for (var i = 1; i < arguments.length; i++) { va
10
13
  * Side Public License, v 1.
11
14
  */
12
15
 
13
- import React, { useContext, useEffect, useRef, useState } from 'react';
16
+ import React, { useContext, useEffect, useRef, useMemo, useState } from 'react';
17
+ import classNames from 'classnames';
18
+ import { css } from '@emotion/css';
14
19
  import isEqual from 'lodash/isEqual';
15
- import { EuiSystemContext, EuiThemeContext, EuiModificationsContext, EuiColorModeContext } from './context';
20
+ import { EuiSystemContext, EuiThemeContext, EuiNestedThemeContext, EuiModificationsContext, EuiColorModeContext } from './context';
16
21
  import { buildTheme, getColorMode, getComputed, mergeDeep } from './utils';
17
22
  import { jsx as ___EmotionJSX } from "@emotion/react";
18
23
  var providerWarning = undefined;
@@ -26,7 +31,11 @@ export var EuiThemeProvider = function EuiThemeProvider(_ref) {
26
31
  var _system = _ref.theme,
27
32
  _colorMode = _ref.colorMode,
28
33
  _modifications = _ref.modify,
29
- children = _ref.children;
34
+ children = _ref.children,
35
+ wrapperProps = _ref.wrapperProps;
36
+ var _useContext = useContext(EuiNestedThemeContext),
37
+ isGlobalTheme = _useContext.isGlobalTheme,
38
+ bodyColor = _useContext.bodyColor;
30
39
  var parentSystem = useContext(EuiSystemContext);
31
40
  var parentModifications = useContext(EuiModificationsContext);
32
41
  var parentColorMode = useContext(EuiColorModeContext);
@@ -81,6 +90,37 @@ export var EuiThemeProvider = function EuiThemeProvider(_ref) {
81
90
  setTheme(getComputed(system, buildTheme(modifications, "_".concat(system.key)), colorMode));
82
91
  }
83
92
  }, [colorMode, system, modifications]);
93
+ var nestedThemeContext = useMemo(function () {
94
+ return {
95
+ isGlobalTheme: false,
96
+ // The theme that determines the global body styles
97
+ bodyColor: isGlobalTheme ? theme.colors.text : bodyColor,
98
+ hasDifferentColorFromGlobalTheme: isGlobalTheme ? false : bodyColor !== theme.colors.text,
99
+ colorClassName: /*#__PURE__*/css("label:euiColorMode-", _colorMode, ";color:", theme.colors.text, ";;label:colorClassName;")
100
+ };
101
+ }, [theme, isGlobalTheme, bodyColor, _colorMode]);
102
+ var renderedChildren = useMemo(function () {
103
+ if (isGlobalTheme) {
104
+ return children; // No wrapper
105
+ }
106
+
107
+ var _ref2 = wrapperProps || {},
108
+ cloneElement = _ref2.cloneElement,
109
+ className = _ref2.className,
110
+ rest = _objectWithoutProperties(_ref2, _excluded);
111
+ var props = _objectSpread(_objectSpread({}, rest), {}, {
112
+ className: classNames(className, nestedThemeContext.colorClassName)
113
+ });
114
+ if (cloneElement) {
115
+ return /*#__PURE__*/React.cloneElement(children, _objectSpread(_objectSpread({}, props), {}, {
116
+ className: classNames(children.props.className, props.className)
117
+ }));
118
+ } else {
119
+ return ___EmotionJSX("span", _extends({}, props, {
120
+ className: classNames('euiThemeProvider', props.className)
121
+ }), children);
122
+ }
123
+ }, [isGlobalTheme, nestedThemeContext, wrapperProps, children]);
84
124
  return ___EmotionJSX(EuiColorModeContext.Provider, {
85
125
  value: colorMode
86
126
  }, ___EmotionJSX(EuiSystemContext.Provider, {
@@ -89,5 +129,7 @@ export var EuiThemeProvider = function EuiThemeProvider(_ref) {
89
129
  value: modifications
90
130
  }, ___EmotionJSX(EuiThemeContext.Provider, {
91
131
  value: theme
92
- }, children))));
132
+ }, ___EmotionJSX(EuiNestedThemeContext.Provider, {
133
+ value: nestedThemeContext
134
+ }, renderedChildren)))));
93
135
  };
@@ -129,7 +129,10 @@ var _EuiBottomBar = /*#__PURE__*/(0, _react.forwardRef)(function (_ref, ref) {
129
129
  var EuiBottomBar = /*#__PURE__*/(0, _react.forwardRef)(function (props, ref) {
130
130
  var BottomBar = _EuiBottomBar;
131
131
  return (0, _react2.jsx)(_provider.EuiThemeProvider, {
132
- colorMode: 'dark'
132
+ colorMode: 'dark',
133
+ wrapperProps: {
134
+ cloneElement: true
135
+ }
133
136
  }, (0, _react2.jsx)(BottomBar, (0, _extends2.default)({
134
137
  ref: ref
135
138
  }, props)));
@@ -16,8 +16,8 @@ var euiBottomBarStyles = function euiBottomBarStyles(euiThemeContext) {
16
16
  var euiTheme = euiThemeContext.euiTheme;
17
17
  return {
18
18
  // Base
19
- // Text color needs to be reapplied to properly scope the forced `colorMode`
20
- euiBottomBar: /*#__PURE__*/(0, _react.css)((0, _mixins.euiShadowFlat)(euiThemeContext), ";background:", (0, _services.shade)(euiTheme.colors.lightestShade, 0.5), ";color:", euiTheme.colors.text, ";", _global_styling.euiCanAnimate, "{animation:", euiBottomBarAppear, " ", euiTheme.animation.slow, " ", euiTheme.animation.resistance, ";};label:euiBottomBar;"),
19
+ // `color` is inherited from the wrapping `EuiThemeProvider colorMode="dark"`
20
+ euiBottomBar: /*#__PURE__*/(0, _react.css)((0, _mixins.euiShadowFlat)(euiThemeContext), ";background:", (0, _services.shade)(euiTheme.colors.lightestShade, 0.5), ";", _global_styling.euiCanAnimate, "{animation:", euiBottomBarAppear, " ", euiTheme.animation.slow, " ", euiTheme.animation.resistance, ";};label:euiBottomBar;"),
21
21
  static: /*#__PURE__*/(0, _react.css)(";label:static;"),
22
22
  fixed: /*#__PURE__*/(0, _react.css)("z-index:", Number(euiTheme.levels.header) - 2, ";;label:fixed;"),
23
23
  sticky: /*#__PURE__*/(0, _react.css)("z-index:", Number(euiTheme.levels.header) - 2, ";;label:sticky;"),
@@ -53,7 +53,10 @@ var EuiButton = function EuiButton(props) {
53
53
  if (_color === 'ghost') {
54
54
  // INCEPTION: If `ghost`, re-implement with a wrapping dark mode theme provider
55
55
  return (0, _react2.jsx)(_services.EuiThemeProvider, {
56
- colorMode: "dark"
56
+ colorMode: "dark",
57
+ wrapperProps: {
58
+ cloneElement: true
59
+ }
57
60
  }, (0, _react2.jsx)(EuiButton, (0, _extends2.default)({}, props, {
58
61
  color: "text"
59
62
  })));
@@ -78,7 +78,10 @@ var EuiButtonEmpty = function EuiButtonEmpty(props) {
78
78
  if (_color === 'ghost') {
79
79
  // INCEPTION: If `ghost`, re-implement with a wrapping dark mode theme provider
80
80
  return (0, _react2.jsx)(_services.EuiThemeProvider, {
81
- colorMode: "dark"
81
+ colorMode: "dark",
82
+ wrapperProps: {
83
+ cloneElement: true
84
+ }
82
85
  }, (0, _react2.jsx)(EuiButtonEmpty, (0, _extends2.default)({}, props, {
83
86
  color: "text"
84
87
  })));
@@ -80,7 +80,10 @@ var EuiButtonIcon = function EuiButtonIcon(props) {
80
80
  if (_color === 'ghost') {
81
81
  // INCEPTION: If `ghost`, re-implement with a wrapping dark mode theme provider
82
82
  return (0, _react2.jsx)(_services.EuiThemeProvider, {
83
- colorMode: "dark"
83
+ colorMode: "dark",
84
+ wrapperProps: {
85
+ cloneElement: true
86
+ }
84
87
  }, (0, _react2.jsx)(EuiButtonIcon, (0, _extends2.default)({}, props, {
85
88
  color: "text"
86
89
  })));
@@ -190,7 +190,7 @@ var EuiComboBoxInput = /*#__PURE__*/function (_Component) {
190
190
  };
191
191
  }
192
192
  var icon;
193
- if (!noIcon) {
193
+ if (!noIcon && !isDisabled) {
194
194
  icon = {
195
195
  'aria-label': isListOpen ? 'Close list of options' : 'Open list of options',
196
196
  'data-test-subj': 'comboBoxToggleListButton',