@elastic/eui 93.5.2 → 93.6.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 (334) hide show
  1. package/es/components/accessibility/screen_reader_only/screen_reader_only.js +9 -8
  2. package/es/components/accessibility/screen_reader_only/screen_reader_only.styles.js +3 -4
  3. package/es/components/accessibility/skip_link/skip_link.js +2 -3
  4. package/es/components/aspect_ratio/aspect_ratio.js +16 -14
  5. package/es/components/avatar/avatar.js +41 -42
  6. package/es/components/avatar/avatar.styles.js +1 -1
  7. package/es/components/badge/badge.js +4 -4
  8. package/es/components/badge/badge_group/badge_group.js +3 -4
  9. package/es/components/badge/beta_badge/beta_badge.js +2 -3
  10. package/es/components/badge/notification_badge/badge_notification.js +3 -4
  11. package/es/components/bottom_bar/bottom_bar.js +8 -18
  12. package/es/components/bottom_bar/bottom_bar.styles.js +3 -2
  13. package/es/components/breadcrumbs/_breadcrumb_content.js +8 -11
  14. package/es/components/breadcrumbs/_breadcrumb_content.styles.js +17 -4
  15. package/es/components/breadcrumbs/breadcrumbs.js +4 -3
  16. package/es/components/button/button_display/_button_display_content.js +28 -30
  17. package/es/components/button/button_group/button_group_button.js +5 -6
  18. package/es/components/button/button_group/button_group_button.styles.js +21 -10
  19. package/es/components/call_out/call_out.js +45 -42
  20. package/es/components/call_out/call_out.styles.js +4 -4
  21. package/es/components/code/code_block_annotations.js +7 -6
  22. package/es/components/code/code_block_annotations.style.js +2 -1
  23. package/es/components/collapsible_nav/collapsible_nav.js +2 -3
  24. package/es/components/collapsible_nav/collapsible_nav_group/collapsible_nav_group.js +2 -3
  25. package/es/components/collapsible_nav_beta/collapsible_nav_beta.js +4 -4
  26. package/es/components/collapsible_nav_beta/collapsible_nav_body_footer.js +2 -3
  27. package/es/components/collapsible_nav_beta/collapsible_nav_button/collapsible_nav_button.js +2 -3
  28. package/es/components/collapsible_nav_beta/collapsible_nav_group/collapsible_nav_group.js +2 -3
  29. package/es/components/collapsible_nav_beta/collapsible_nav_item/collapsed/collapsed_nav_button.js +3 -4
  30. package/es/components/collapsible_nav_beta/collapsible_nav_item/collapsed/collapsed_nav_popover.js +2 -3
  31. package/es/components/collapsible_nav_beta/collapsible_nav_item/collapsible_nav_accordion.js +2 -3
  32. package/es/components/collapsible_nav_beta/collapsible_nav_item/collapsible_nav_group.js +2 -3
  33. package/es/components/collapsible_nav_beta/collapsible_nav_item/collapsible_nav_item.js +2 -3
  34. package/es/components/collapsible_nav_beta/collapsible_nav_item/collapsible_nav_link.js +2 -3
  35. package/es/components/color_picker/color_palette_picker/color_palette_picker.js +1 -0
  36. package/es/components/combo_box/combo_box.js +22 -16
  37. package/es/components/comment_list/comment_event.js +4 -5
  38. package/es/components/context_menu/context_menu.js +6 -7
  39. package/es/components/context_menu/context_menu_item.js +2 -3
  40. package/es/components/context_menu/context_menu_panel.js +5 -5
  41. package/es/components/description_list/description_list.js +14 -16
  42. package/es/components/description_list/description_list_description.js +2 -3
  43. package/es/components/description_list/description_list_title.js +2 -3
  44. package/es/components/empty_prompt/empty_prompt.js +2 -5
  45. package/es/components/flyout/_flyout_close_button.js +45 -0
  46. package/es/components/flyout/_flyout_close_button.styles.js +27 -0
  47. package/es/components/flyout/flyout.js +77 -64
  48. package/es/components/flyout/flyout.styles.js +3 -17
  49. package/es/components/flyout/flyout_body.js +5 -8
  50. package/es/components/flyout/flyout_body.styles.js +2 -1
  51. package/es/components/flyout/flyout_footer.js +3 -5
  52. package/es/components/flyout/flyout_header.js +2 -3
  53. package/es/components/flyout/flyout_resizable.js +2 -3
  54. package/es/components/form/super_select/super_select.js +33 -22
  55. package/es/components/form/super_select/super_select_control.js +39 -5
  56. package/es/components/header/header_breadcrumbs/header_breadcrumbs.js +4 -3
  57. package/es/components/horizontal_rule/horizontal_rule.js +3 -18
  58. package/es/components/loading/loading_chart.js +16 -21
  59. package/es/components/loading/loading_chart.styles.js +28 -10
  60. package/es/components/loading/loading_elastic.js +3 -5
  61. package/es/components/loading/loading_elastic.styles.js +2 -4
  62. package/es/components/loading/loading_logo.js +6 -9
  63. package/es/components/loading/loading_logo.styles.js +1 -6
  64. package/es/components/loading/loading_spinner.js +5 -5
  65. package/es/components/page/page_header/page_header_content.js +1 -1
  66. package/es/components/resizable_container/resizable_collapse_button.js +1 -2
  67. package/es/components/tabs/tab.js +3 -4
  68. package/es/components/tabs/tabs.js +2 -3
  69. package/eui.d.ts +71 -57
  70. package/i18ntokens.json +82 -100
  71. package/lib/components/accessibility/screen_reader_only/screen_reader_only.js +8 -7
  72. package/lib/components/accessibility/screen_reader_only/screen_reader_only.styles.js +3 -4
  73. package/lib/components/accessibility/skip_link/skip_link.js +1 -2
  74. package/lib/components/aspect_ratio/aspect_ratio.js +18 -14
  75. package/lib/components/avatar/avatar.js +42 -41
  76. package/lib/components/avatar/avatar.styles.js +1 -1
  77. package/lib/components/badge/badge.js +3 -3
  78. package/lib/components/badge/badge_group/badge_group.js +2 -3
  79. package/lib/components/badge/beta_badge/beta_badge.js +1 -2
  80. package/lib/components/badge/notification_badge/badge_notification.js +2 -3
  81. package/lib/components/bottom_bar/bottom_bar.js +10 -20
  82. package/lib/components/bottom_bar/bottom_bar.styles.js +3 -2
  83. package/lib/components/breadcrumbs/_breadcrumb_content.js +8 -11
  84. package/lib/components/breadcrumbs/_breadcrumb_content.styles.js +16 -3
  85. package/lib/components/breadcrumbs/breadcrumbs.js +4 -3
  86. package/lib/components/button/button_display/_button_display_content.js +30 -29
  87. package/lib/components/button/button_group/button_group_button.js +3 -4
  88. package/lib/components/button/button_group/button_group_button.styles.js +22 -12
  89. package/lib/components/call_out/call_out.js +43 -40
  90. package/lib/components/call_out/call_out.styles.js +6 -6
  91. package/lib/components/code/code_block_annotations.js +6 -5
  92. package/lib/components/code/code_block_annotations.style.js +2 -1
  93. package/lib/components/collapsible_nav/collapsible_nav.js +1 -2
  94. package/lib/components/collapsible_nav/collapsible_nav_group/collapsible_nav_group.js +1 -2
  95. package/lib/components/collapsible_nav_beta/collapsible_nav_beta.js +3 -3
  96. package/lib/components/collapsible_nav_beta/collapsible_nav_body_footer.js +1 -2
  97. package/lib/components/collapsible_nav_beta/collapsible_nav_button/collapsible_nav_button.js +1 -2
  98. package/lib/components/collapsible_nav_beta/collapsible_nav_group/collapsible_nav_group.js +1 -2
  99. package/lib/components/collapsible_nav_beta/collapsible_nav_item/collapsed/collapsed_nav_button.js +2 -3
  100. package/lib/components/collapsible_nav_beta/collapsible_nav_item/collapsed/collapsed_nav_popover.js +1 -2
  101. package/lib/components/collapsible_nav_beta/collapsible_nav_item/collapsible_nav_accordion.js +1 -2
  102. package/lib/components/collapsible_nav_beta/collapsible_nav_item/collapsible_nav_group.js +1 -2
  103. package/lib/components/collapsible_nav_beta/collapsible_nav_item/collapsible_nav_item.js +1 -2
  104. package/lib/components/collapsible_nav_beta/collapsible_nav_item/collapsible_nav_link.js +1 -2
  105. package/lib/components/color_picker/color_palette_picker/color_palette_picker.js +1 -0
  106. package/lib/components/combo_box/combo_box.js +22 -16
  107. package/lib/components/comment_list/comment_event.js +3 -4
  108. package/lib/components/context_menu/context_menu.js +5 -6
  109. package/lib/components/context_menu/context_menu_item.js +1 -2
  110. package/lib/components/context_menu/context_menu_panel.js +4 -4
  111. package/lib/components/description_list/description_list.js +13 -15
  112. package/lib/components/description_list/description_list_description.js +1 -2
  113. package/lib/components/description_list/description_list_title.js +1 -2
  114. package/lib/components/empty_prompt/empty_prompt.js +1 -4
  115. package/lib/components/flyout/_flyout_close_button.js +52 -0
  116. package/lib/components/flyout/_flyout_close_button.styles.js +34 -0
  117. package/lib/components/flyout/flyout.js +76 -63
  118. package/lib/components/flyout/flyout.styles.js +5 -19
  119. package/lib/components/flyout/flyout_body.js +4 -7
  120. package/lib/components/flyout/flyout_body.styles.js +2 -1
  121. package/lib/components/flyout/flyout_footer.js +2 -4
  122. package/lib/components/flyout/flyout_header.js +1 -2
  123. package/lib/components/flyout/flyout_resizable.js +1 -2
  124. package/lib/components/form/super_select/super_select.js +32 -21
  125. package/lib/components/form/super_select/super_select_control.js +38 -4
  126. package/lib/components/header/header_breadcrumbs/header_breadcrumbs.js +4 -3
  127. package/lib/components/horizontal_rule/horizontal_rule.js +2 -17
  128. package/lib/components/loading/loading_chart.js +14 -19
  129. package/lib/components/loading/loading_chart.styles.js +28 -10
  130. package/lib/components/loading/loading_elastic.js +2 -4
  131. package/lib/components/loading/loading_elastic.styles.js +2 -4
  132. package/lib/components/loading/loading_logo.js +5 -8
  133. package/lib/components/loading/loading_logo.styles.js +3 -9
  134. package/lib/components/loading/loading_spinner.js +5 -5
  135. package/lib/components/page/page_header/page_header_content.js +1 -1
  136. package/lib/components/resizable_container/resizable_collapse_button.js +1 -2
  137. package/lib/components/tabs/tab.js +2 -3
  138. package/lib/components/tabs/tabs.js +1 -2
  139. package/optimize/es/components/accessibility/screen_reader_only/screen_reader_only.js +8 -7
  140. package/optimize/es/components/accessibility/screen_reader_only/screen_reader_only.styles.js +3 -4
  141. package/optimize/es/components/accessibility/skip_link/skip_link.js +2 -3
  142. package/optimize/es/components/aspect_ratio/aspect_ratio.js +16 -14
  143. package/optimize/es/components/avatar/avatar.js +39 -40
  144. package/optimize/es/components/avatar/avatar.styles.js +1 -1
  145. package/optimize/es/components/badge/badge.js +4 -4
  146. package/optimize/es/components/badge/badge_group/badge_group.js +3 -4
  147. package/optimize/es/components/badge/beta_badge/beta_badge.js +2 -3
  148. package/optimize/es/components/badge/notification_badge/badge_notification.js +3 -4
  149. package/optimize/es/components/bottom_bar/bottom_bar.js +6 -16
  150. package/optimize/es/components/bottom_bar/bottom_bar.styles.js +3 -2
  151. package/optimize/es/components/breadcrumbs/_breadcrumb_content.js +7 -10
  152. package/optimize/es/components/breadcrumbs/_breadcrumb_content.styles.js +17 -4
  153. package/optimize/es/components/button/button_display/_button_display_content.js +28 -30
  154. package/optimize/es/components/button/button_group/button_group_button.js +5 -6
  155. package/optimize/es/components/button/button_group/button_group_button.styles.js +13 -10
  156. package/optimize/es/components/call_out/call_out.js +45 -42
  157. package/optimize/es/components/call_out/call_out.styles.js +4 -4
  158. package/optimize/es/components/code/code_block_annotations.js +7 -6
  159. package/optimize/es/components/code/code_block_annotations.style.js +2 -1
  160. package/optimize/es/components/collapsible_nav/collapsible_nav.js +2 -3
  161. package/optimize/es/components/collapsible_nav/collapsible_nav_group/collapsible_nav_group.js +2 -3
  162. package/optimize/es/components/collapsible_nav_beta/collapsible_nav_beta.js +4 -4
  163. package/optimize/es/components/collapsible_nav_beta/collapsible_nav_body_footer.js +2 -3
  164. package/optimize/es/components/collapsible_nav_beta/collapsible_nav_button/collapsible_nav_button.js +2 -3
  165. package/optimize/es/components/collapsible_nav_beta/collapsible_nav_group/collapsible_nav_group.js +2 -3
  166. package/optimize/es/components/collapsible_nav_beta/collapsible_nav_item/collapsed/collapsed_nav_button.js +3 -4
  167. package/optimize/es/components/collapsible_nav_beta/collapsible_nav_item/collapsed/collapsed_nav_popover.js +2 -3
  168. package/optimize/es/components/collapsible_nav_beta/collapsible_nav_item/collapsible_nav_accordion.js +2 -3
  169. package/optimize/es/components/collapsible_nav_beta/collapsible_nav_item/collapsible_nav_group.js +2 -3
  170. package/optimize/es/components/collapsible_nav_beta/collapsible_nav_item/collapsible_nav_item.js +2 -3
  171. package/optimize/es/components/collapsible_nav_beta/collapsible_nav_item/collapsible_nav_link.js +2 -3
  172. package/optimize/es/components/combo_box/combo_box.js +22 -16
  173. package/optimize/es/components/comment_list/comment_event.js +4 -5
  174. package/optimize/es/components/context_menu/context_menu.js +6 -7
  175. package/optimize/es/components/context_menu/context_menu_item.js +2 -3
  176. package/optimize/es/components/context_menu/context_menu_panel.js +5 -5
  177. package/optimize/es/components/description_list/description_list.js +14 -16
  178. package/optimize/es/components/description_list/description_list_description.js +2 -3
  179. package/optimize/es/components/description_list/description_list_title.js +2 -3
  180. package/optimize/es/components/empty_prompt/empty_prompt.js +2 -5
  181. package/optimize/es/components/flyout/_flyout_close_button.js +44 -0
  182. package/optimize/es/components/flyout/_flyout_close_button.styles.js +27 -0
  183. package/optimize/es/components/flyout/flyout.js +57 -64
  184. package/optimize/es/components/flyout/flyout.styles.js +3 -17
  185. package/optimize/es/components/flyout/flyout_body.js +5 -8
  186. package/optimize/es/components/flyout/flyout_body.styles.js +2 -1
  187. package/optimize/es/components/flyout/flyout_footer.js +3 -5
  188. package/optimize/es/components/flyout/flyout_header.js +2 -3
  189. package/optimize/es/components/flyout/flyout_resizable.js +2 -3
  190. package/optimize/es/components/form/super_select/super_select.js +32 -22
  191. package/optimize/es/components/form/super_select/super_select_control.js +34 -5
  192. package/optimize/es/components/horizontal_rule/horizontal_rule.js +3 -15
  193. package/optimize/es/components/loading/loading_chart.js +16 -21
  194. package/optimize/es/components/loading/loading_chart.styles.js +28 -10
  195. package/optimize/es/components/loading/loading_elastic.js +3 -5
  196. package/optimize/es/components/loading/loading_elastic.styles.js +2 -4
  197. package/optimize/es/components/loading/loading_logo.js +6 -9
  198. package/optimize/es/components/loading/loading_logo.styles.js +1 -6
  199. package/optimize/es/components/loading/loading_spinner.js +5 -5
  200. package/optimize/es/components/resizable_container/resizable_collapse_button.js +1 -2
  201. package/optimize/es/components/tabs/tab.js +3 -4
  202. package/optimize/es/components/tabs/tabs.js +2 -3
  203. package/optimize/lib/components/accessibility/screen_reader_only/screen_reader_only.js +7 -6
  204. package/optimize/lib/components/accessibility/screen_reader_only/screen_reader_only.styles.js +3 -4
  205. package/optimize/lib/components/accessibility/skip_link/skip_link.js +1 -2
  206. package/optimize/lib/components/aspect_ratio/aspect_ratio.js +19 -14
  207. package/optimize/lib/components/avatar/avatar.js +41 -39
  208. package/optimize/lib/components/avatar/avatar.styles.js +1 -1
  209. package/optimize/lib/components/badge/badge.js +3 -3
  210. package/optimize/lib/components/badge/badge_group/badge_group.js +2 -3
  211. package/optimize/lib/components/badge/beta_badge/beta_badge.js +1 -2
  212. package/optimize/lib/components/badge/notification_badge/badge_notification.js +2 -3
  213. package/optimize/lib/components/bottom_bar/bottom_bar.js +8 -18
  214. package/optimize/lib/components/bottom_bar/bottom_bar.styles.js +3 -2
  215. package/optimize/lib/components/breadcrumbs/_breadcrumb_content.js +7 -10
  216. package/optimize/lib/components/breadcrumbs/_breadcrumb_content.styles.js +16 -3
  217. package/optimize/lib/components/button/button_display/_button_display_content.js +30 -29
  218. package/optimize/lib/components/button/button_group/button_group_button.js +3 -4
  219. package/optimize/lib/components/button/button_group/button_group_button.styles.js +15 -12
  220. package/optimize/lib/components/call_out/call_out.js +43 -40
  221. package/optimize/lib/components/call_out/call_out.styles.js +6 -6
  222. package/optimize/lib/components/code/code_block_annotations.js +6 -5
  223. package/optimize/lib/components/code/code_block_annotations.style.js +2 -1
  224. package/optimize/lib/components/collapsible_nav/collapsible_nav.js +1 -2
  225. package/optimize/lib/components/collapsible_nav/collapsible_nav_group/collapsible_nav_group.js +1 -2
  226. package/optimize/lib/components/collapsible_nav_beta/collapsible_nav_beta.js +3 -3
  227. package/optimize/lib/components/collapsible_nav_beta/collapsible_nav_body_footer.js +1 -2
  228. package/optimize/lib/components/collapsible_nav_beta/collapsible_nav_button/collapsible_nav_button.js +1 -2
  229. package/optimize/lib/components/collapsible_nav_beta/collapsible_nav_group/collapsible_nav_group.js +1 -2
  230. package/optimize/lib/components/collapsible_nav_beta/collapsible_nav_item/collapsed/collapsed_nav_button.js +2 -3
  231. package/optimize/lib/components/collapsible_nav_beta/collapsible_nav_item/collapsed/collapsed_nav_popover.js +1 -2
  232. package/optimize/lib/components/collapsible_nav_beta/collapsible_nav_item/collapsible_nav_accordion.js +1 -2
  233. package/optimize/lib/components/collapsible_nav_beta/collapsible_nav_item/collapsible_nav_group.js +1 -2
  234. package/optimize/lib/components/collapsible_nav_beta/collapsible_nav_item/collapsible_nav_item.js +1 -2
  235. package/optimize/lib/components/collapsible_nav_beta/collapsible_nav_item/collapsible_nav_link.js +1 -2
  236. package/optimize/lib/components/combo_box/combo_box.js +22 -16
  237. package/optimize/lib/components/comment_list/comment_event.js +3 -4
  238. package/optimize/lib/components/context_menu/context_menu.js +5 -6
  239. package/optimize/lib/components/context_menu/context_menu_item.js +1 -2
  240. package/optimize/lib/components/context_menu/context_menu_panel.js +4 -4
  241. package/optimize/lib/components/description_list/description_list.js +13 -15
  242. package/optimize/lib/components/description_list/description_list_description.js +1 -2
  243. package/optimize/lib/components/description_list/description_list_title.js +1 -2
  244. package/optimize/lib/components/empty_prompt/empty_prompt.js +1 -4
  245. package/optimize/lib/components/flyout/_flyout_close_button.js +51 -0
  246. package/optimize/lib/components/flyout/_flyout_close_button.styles.js +34 -0
  247. package/optimize/lib/components/flyout/flyout.js +55 -62
  248. package/optimize/lib/components/flyout/flyout.styles.js +5 -19
  249. package/optimize/lib/components/flyout/flyout_body.js +4 -7
  250. package/optimize/lib/components/flyout/flyout_body.styles.js +2 -1
  251. package/optimize/lib/components/flyout/flyout_footer.js +2 -4
  252. package/optimize/lib/components/flyout/flyout_header.js +1 -2
  253. package/optimize/lib/components/flyout/flyout_resizable.js +1 -2
  254. package/optimize/lib/components/form/super_select/super_select.js +31 -21
  255. package/optimize/lib/components/form/super_select/super_select_control.js +33 -4
  256. package/optimize/lib/components/horizontal_rule/horizontal_rule.js +2 -14
  257. package/optimize/lib/components/loading/loading_chart.js +14 -19
  258. package/optimize/lib/components/loading/loading_chart.styles.js +28 -10
  259. package/optimize/lib/components/loading/loading_elastic.js +2 -4
  260. package/optimize/lib/components/loading/loading_elastic.styles.js +2 -4
  261. package/optimize/lib/components/loading/loading_logo.js +5 -8
  262. package/optimize/lib/components/loading/loading_logo.styles.js +3 -9
  263. package/optimize/lib/components/loading/loading_spinner.js +5 -5
  264. package/optimize/lib/components/resizable_container/resizable_collapse_button.js +1 -2
  265. package/optimize/lib/components/tabs/tab.js +2 -3
  266. package/optimize/lib/components/tabs/tabs.js +1 -2
  267. package/package.json +1 -1
  268. package/test-env/components/accessibility/screen_reader_only/screen_reader_only.js +8 -7
  269. package/test-env/components/accessibility/screen_reader_only/screen_reader_only.styles.js +3 -4
  270. package/test-env/components/accessibility/skip_link/skip_link.js +1 -2
  271. package/test-env/components/aspect_ratio/aspect_ratio.js +19 -14
  272. package/test-env/components/avatar/avatar.js +41 -39
  273. package/test-env/components/avatar/avatar.styles.js +1 -1
  274. package/test-env/components/badge/badge.js +3 -3
  275. package/test-env/components/badge/badge_group/badge_group.js +2 -3
  276. package/test-env/components/badge/beta_badge/beta_badge.js +1 -2
  277. package/test-env/components/badge/notification_badge/badge_notification.js +2 -3
  278. package/test-env/components/bottom_bar/bottom_bar.js +10 -20
  279. package/test-env/components/bottom_bar/bottom_bar.styles.js +3 -2
  280. package/test-env/components/breadcrumbs/_breadcrumb_content.js +8 -11
  281. package/test-env/components/breadcrumbs/_breadcrumb_content.styles.js +16 -3
  282. package/test-env/components/breadcrumbs/breadcrumbs.js +4 -3
  283. package/test-env/components/button/button_display/_button_display_content.js +30 -29
  284. package/test-env/components/button/button_group/button_group_button.js +3 -4
  285. package/test-env/components/button/button_group/button_group_button.styles.js +15 -12
  286. package/test-env/components/call_out/call_out.js +43 -40
  287. package/test-env/components/call_out/call_out.styles.js +6 -6
  288. package/test-env/components/code/code_block_annotations.js +6 -5
  289. package/test-env/components/code/code_block_annotations.style.js +2 -1
  290. package/test-env/components/collapsible_nav/collapsible_nav.js +1 -2
  291. package/test-env/components/collapsible_nav/collapsible_nav_group/collapsible_nav_group.js +1 -2
  292. package/test-env/components/collapsible_nav_beta/collapsible_nav_beta.js +3 -3
  293. package/test-env/components/collapsible_nav_beta/collapsible_nav_body_footer.js +1 -2
  294. package/test-env/components/collapsible_nav_beta/collapsible_nav_button/collapsible_nav_button.js +1 -2
  295. package/test-env/components/collapsible_nav_beta/collapsible_nav_group/collapsible_nav_group.js +1 -2
  296. package/test-env/components/collapsible_nav_beta/collapsible_nav_item/collapsed/collapsed_nav_button.js +2 -3
  297. package/test-env/components/collapsible_nav_beta/collapsible_nav_item/collapsed/collapsed_nav_popover.js +1 -2
  298. package/test-env/components/collapsible_nav_beta/collapsible_nav_item/collapsible_nav_accordion.js +1 -2
  299. package/test-env/components/collapsible_nav_beta/collapsible_nav_item/collapsible_nav_group.js +1 -2
  300. package/test-env/components/collapsible_nav_beta/collapsible_nav_item/collapsible_nav_item.js +1 -2
  301. package/test-env/components/collapsible_nav_beta/collapsible_nav_item/collapsible_nav_link.js +1 -2
  302. package/test-env/components/color_picker/color_palette_picker/color_palette_picker.js +1 -0
  303. package/test-env/components/combo_box/combo_box.js +22 -16
  304. package/test-env/components/comment_list/comment_event.js +3 -4
  305. package/test-env/components/context_menu/context_menu.js +5 -6
  306. package/test-env/components/context_menu/context_menu_item.js +1 -2
  307. package/test-env/components/context_menu/context_menu_panel.js +4 -4
  308. package/test-env/components/description_list/description_list.js +13 -15
  309. package/test-env/components/description_list/description_list_description.js +1 -2
  310. package/test-env/components/description_list/description_list_title.js +1 -2
  311. package/test-env/components/empty_prompt/empty_prompt.js +1 -4
  312. package/test-env/components/flyout/_flyout_close_button.js +51 -0
  313. package/test-env/components/flyout/_flyout_close_button.styles.js +34 -0
  314. package/test-env/components/flyout/flyout.styles.js +5 -19
  315. package/test-env/components/flyout/flyout_body.js +4 -7
  316. package/test-env/components/flyout/flyout_body.styles.js +2 -1
  317. package/test-env/components/flyout/flyout_footer.js +2 -4
  318. package/test-env/components/flyout/flyout_header.js +1 -2
  319. package/test-env/components/flyout/flyout_resizable.js +1 -2
  320. package/test-env/components/form/super_select/super_select.js +32 -21
  321. package/test-env/components/form/super_select/super_select_control.js +33 -4
  322. package/test-env/components/header/header_breadcrumbs/header_breadcrumbs.js +4 -3
  323. package/test-env/components/horizontal_rule/horizontal_rule.js +2 -14
  324. package/test-env/components/loading/loading_chart.js +14 -19
  325. package/test-env/components/loading/loading_chart.styles.js +28 -10
  326. package/test-env/components/loading/loading_elastic.js +2 -4
  327. package/test-env/components/loading/loading_elastic.styles.js +2 -4
  328. package/test-env/components/loading/loading_logo.js +5 -8
  329. package/test-env/components/loading/loading_logo.styles.js +3 -9
  330. package/test-env/components/loading/loading_spinner.js +5 -5
  331. package/test-env/components/page/page_header/page_header_content.js +1 -1
  332. package/test-env/components/resizable_container/resizable_collapse_button.js +1 -2
  333. package/test-env/components/tabs/tab.js +2 -3
  334. package/test-env/components/tabs/tabs.js +1 -2
@@ -11,7 +11,7 @@ var _excluded = ["children", "className", "size", "color"];
11
11
 
12
12
  import React from 'react';
13
13
  import classNames from 'classnames';
14
- import { useEuiTheme } from '../../../services';
14
+ import { useEuiMemoizedStyles } from '../../../services';
15
15
  import { euiNotificationBadgeStyles } from './badge_notification.styles';
16
16
  import { jsx as ___EmotionJSX } from "@emotion/react";
17
17
  export var COLORS = ['accent', 'subdued', 'success'];
@@ -24,10 +24,9 @@ export var EuiNotificationBadge = function EuiNotificationBadge(_ref) {
24
24
  _ref$color = _ref.color,
25
25
  color = _ref$color === void 0 ? 'accent' : _ref$color,
26
26
  rest = _objectWithoutProperties(_ref, _excluded);
27
- var euiTheme = useEuiTheme();
28
- var styles = euiNotificationBadgeStyles(euiTheme);
29
- var cssStyles = [styles.euiNotificationBadge, styles[size], styles[color]];
30
27
  var classes = classNames('euiNotificationBadge', className);
28
+ var styles = useEuiMemoizedStyles(euiNotificationBadgeStyles);
29
+ var cssStyles = [styles.euiNotificationBadge, styles[size], styles[color]];
31
30
  return ___EmotionJSX("span", _extends({
32
31
  css: cssStyles,
33
32
  className: classes
@@ -15,21 +15,14 @@ function _objectSpread(target) { for (var i = 1; i < arguments.length; i++) { va
15
15
 
16
16
  import classNames from 'classnames';
17
17
  import React, { forwardRef, useEffect, useState } from 'react';
18
- import { useCombinedRefs, useEuiTheme } from '../../services';
18
+ import { useCombinedRefs, useEuiMemoizedStyles, EuiThemeProvider } from '../../services';
19
19
  import { EuiScreenReaderOnly } from '../accessibility';
20
20
  import { EuiI18n } from '../i18n';
21
21
  import { useResizeObserver } from '../observer/resize_observer';
22
22
  import { EuiPortal } from '../portal';
23
23
  import { euiBottomBarStyles } from './bottom_bar.styles';
24
- import { EuiThemeProvider } from '../../services/theme/provider';
25
24
  import { jsx as ___EmotionJSX } from "@emotion/react";
26
- // Exported for testing
27
- export var paddingSizeToClassNameMap = {
28
- none: null,
29
- s: 'euiBottomBar--paddingSmall',
30
- m: 'euiBottomBar--paddingMedium',
31
- l: 'euiBottomBar--paddingLarge'
32
- };
25
+ export var PADDING_SIZES = ['none', 's', 'm', 'l'];
33
26
  export var POSITIONS = ['static', 'fixed', 'sticky'];
34
27
  var _EuiBottomBar = /*#__PURE__*/forwardRef(function (_ref, ref) {
35
28
  var _ref$position = _ref.position,
@@ -53,8 +46,7 @@ var _EuiBottomBar = /*#__PURE__*/forwardRef(function (_ref, ref) {
53
46
  top = _ref.top,
54
47
  style = _ref.style,
55
48
  rest = _objectWithoutProperties(_ref, _excluded);
56
- var euiTheme = useEuiTheme();
57
- var styles = euiBottomBarStyles(euiTheme);
49
+ var styles = useEuiMemoizedStyles(euiBottomBarStyles);
58
50
 
59
51
  // Force some props if `fixed` position, but not if the user has supplied these
60
52
  affordForDisplacement = position !== 'fixed' ? false : affordForDisplacement;
@@ -82,10 +74,8 @@ var _EuiBottomBar = /*#__PURE__*/forwardRef(function (_ref, ref) {
82
74
  }
83
75
  };
84
76
  }, [affordForDisplacement, usePortal, dimensions, bodyClassName]);
85
- var classes = classNames('euiBottomBar', "euiBottomBar--".concat(position), paddingSizeToClassNameMap[paddingSize], className);
86
- var cssStyles = [styles.euiBottomBar, styles[position], styles[paddingSize], {
87
- position: position
88
- }];
77
+ var classes = classNames('euiBottomBar', "euiBottomBar--".concat(position), className);
78
+ var cssStyles = [styles.euiBottomBar, styles[position], styles[paddingSize]];
89
79
  var newStyle = _objectSpread({
90
80
  left: left,
91
81
  right: right,
@@ -125,7 +115,7 @@ var _EuiBottomBar = /*#__PURE__*/forwardRef(function (_ref, ref) {
125
115
  export var EuiBottomBar = /*#__PURE__*/forwardRef(function (props, ref) {
126
116
  var BottomBar = _EuiBottomBar;
127
117
  return ___EmotionJSX(EuiThemeProvider, {
128
- colorMode: 'dark',
118
+ colorMode: "dark",
129
119
  wrapperProps: {
130
120
  cloneElement: true
131
121
  }
@@ -20,8 +20,9 @@ export var euiBottomBarStyles = function euiBottomBarStyles(euiThemeContext) {
20
20
  // `color` is inherited from the wrapping `EuiThemeProvider colorMode="dark"`
21
21
  euiBottomBar: /*#__PURE__*/css(euiShadowFlat(euiThemeContext), " background:", shade(euiTheme.colors.lightestShade, 0.5), ";", euiCanAnimate, "{animation:", euiBottomBarAppear, " ", euiTheme.animation.slow, " ", euiTheme.animation.resistance, ";};label:euiBottomBar;"),
22
22
  static: /*#__PURE__*/css(";label:static;"),
23
- fixed: /*#__PURE__*/css("z-index:", Number(euiTheme.levels.header) - 2, ";;label:fixed;"),
24
- sticky: /*#__PURE__*/css("z-index:", Number(euiTheme.levels.header) - 2, ";;label:sticky;"),
23
+ // Default
24
+ fixed: /*#__PURE__*/css("position:fixed;z-index:", Number(euiTheme.levels.header) - 2, ";;label:fixed;"),
25
+ sticky: /*#__PURE__*/css("position:sticky;z-index:", Number(euiTheme.levels.header) - 2, ";;label:sticky;"),
25
26
  // Padding
26
27
  s: /*#__PURE__*/css("padding:", euiTheme.size.s, ";;label:s;"),
27
28
  m: /*#__PURE__*/css("padding:", euiTheme.size.base, ";;label:m;"),
@@ -17,7 +17,6 @@ import React, { useState, useCallback, forwardRef } from 'react';
17
17
  import classNames from 'classnames';
18
18
  import { useEuiMemoizedStyles } from '../../services';
19
19
  import { EuiInnerText } from '../inner_text';
20
- import { EuiTextColor } from '../text';
21
20
  import { EuiLink } from '../link';
22
21
  import { EuiPopover } from '../popover';
23
22
  import { EuiIcon } from '../icon';
@@ -41,10 +40,11 @@ export var EuiBreadcrumbContent = function EuiBreadcrumbContent(_ref) {
41
40
  highlightLastBreadcrumb = _ref.highlightLastBreadcrumb,
42
41
  truncateLastBreadcrumb = _ref.truncateLastBreadcrumb,
43
42
  rest = _objectWithoutProperties(_ref, _excluded);
43
+ var isApplication = type === 'application';
44
44
  var classes = classNames('euiBreadcrumb__content', className);
45
45
  var styles = useEuiMemoizedStyles(euiBreadcrumbContentStyles);
46
46
  var cssStyles = [styles.euiBreadcrumb__content, styles[type]];
47
- if (type === 'application') {
47
+ if (isApplication) {
48
48
  if (isOnlyBreadcrumb) {
49
49
  cssStyles.push(styles.applicationStyles.onlyChild);
50
50
  } else if (isFirstBreadcrumb) {
@@ -56,9 +56,9 @@ export var EuiBreadcrumbContent = function EuiBreadcrumbContent(_ref) {
56
56
  var truncationStyles = [truncate && !truncateLastBreadcrumb && styles.isTruncated, truncateLastBreadcrumb && styles.isTruncatedLast];
57
57
  var isBreadcrumbWithPopover = !!popoverContent;
58
58
  var isInteractiveBreadcrumb = href || onClick;
59
- var linkColor = color || (highlightLastBreadcrumb ? 'text' : 'subdued');
60
- var plainTextColor = highlightLastBreadcrumb ? 'default' : 'subdued'; // Does not inherit `color` prop
59
+ var linkColor = color || 'subdued';
61
60
  var ariaCurrent = highlightLastBreadcrumb ? 'page' : undefined;
61
+ var interactionStyles = (isInteractiveBreadcrumb || isBreadcrumbWithPopover) && !isApplication && styles.isInteractive;
62
62
  return ___EmotionJSX(EuiInnerText, null, function (ref, innerText) {
63
63
  var title = innerText === '' ? undefined : innerText;
64
64
  var baseProps = {
@@ -66,13 +66,13 @@ export var EuiBreadcrumbContent = function EuiBreadcrumbContent(_ref) {
66
66
  title: title,
67
67
  'aria-current': ariaCurrent,
68
68
  className: classes,
69
- css: [].concat(cssStyles, truncationStyles)
69
+ css: [].concat(cssStyles, truncationStyles, [interactionStyles])
70
70
  };
71
71
  if (isBreadcrumbWithPopover) {
72
72
  var _ = baseProps.css,
73
73
  popoverButtonProps = _objectWithoutProperties(baseProps, _excluded2);
74
74
  return ___EmotionJSX(EuiBreadcrumbPopover, _extends({}, popoverButtonProps, {
75
- breadcrumbCss: cssStyles,
75
+ breadcrumbCss: [].concat(cssStyles, [interactionStyles]),
76
76
  truncationCss: truncationStyles,
77
77
  isLastBreadcrumb: isLastBreadcrumb,
78
78
  type: type,
@@ -88,10 +88,7 @@ export var EuiBreadcrumbContent = function EuiBreadcrumbContent(_ref) {
88
88
  rel: rel
89
89
  }, rest), text);
90
90
  } else {
91
- return ___EmotionJSX(EuiTextColor, {
92
- color: plainTextColor,
93
- cloneElement: true
94
- }, ___EmotionJSX("span", _extends({}, baseProps, rest), text));
91
+ return ___EmotionJSX("span", _extends({}, baseProps, rest), text);
95
92
  }
96
93
  });
97
94
  };
@@ -7,24 +7,37 @@
7
7
  */
8
8
 
9
9
  import { css } from '@emotion/react';
10
- import { transparentize } from '../../services/color';
10
+ import { tintOrShade } from '../../services/color';
11
11
  import { euiFontSize, euiTextTruncate, euiFocusRing, logicalCSS, logicalBorderRadiusCSS, mathWithUnits } from '../../global_styling';
12
+ import { euiButtonColor } from '../../themes/amsterdam/global_styling/mixins/button';
12
13
 
13
14
  /**
14
15
  * Styles cast to inner <a>, <button>, <span> elements
15
16
  */
16
17
  export var euiBreadcrumbContentStyles = function euiBreadcrumbContentStyles(euiThemeContext) {
17
- var euiTheme = euiThemeContext.euiTheme;
18
+ var euiTheme = euiThemeContext.euiTheme,
19
+ colorMode = euiThemeContext.colorMode;
20
+
21
+ // Reuse button colors for `type="application`" clickable breadcrumbs
22
+ var applicationButtonColors = euiButtonColor(euiThemeContext, 'primary');
23
+
24
+ // Create custom darker gray colors for non-clickable application breadcrumbs
25
+ // The numbers/ratios are fairly specific here to pass WCAG AA contrast minimums
26
+ var applicationTextColors = {
27
+ backgroundColor: tintOrShade(euiTheme.colors.darkestShade, colorMode === 'DARK' ? 0.7 : 0.85, colorMode),
28
+ color: tintOrShade(euiTheme.colors.darkestShade, 0.2, colorMode)
29
+ };
18
30
  return {
19
- euiBreadcrumb__content: /*#__PURE__*/css("font-weight:", euiTheme.font.weight.medium, ";text-align:center;vertical-align:baseline;;label:euiBreadcrumb__content;"),
31
+ euiBreadcrumb__content: /*#__PURE__*/css("font-weight:", euiTheme.font.weight.regular, ";text-align:center;vertical-align:baseline;&:not(.euiLink){color:", euiTheme.colors.subduedText, ";};label:euiBreadcrumb__content;"),
20
32
  // Truncation styles
21
33
  isTruncated: /*#__PURE__*/css(euiTextTruncate(mathWithUnits(euiTheme.size.base, function (x) {
22
34
  return x * 10;
23
35
  })), ";;label:isTruncated;"),
24
36
  isTruncatedLast: /*#__PURE__*/css(euiTextTruncate('none'), ";;label:isTruncatedLast;"),
37
+ isInteractive: /*#__PURE__*/css("&:not(:disabled){text-decoration:underline;&[class*='euiLink-subdued']{&:hover,&:focus{color:", euiTheme.colors.text, ";}}};label:isInteractive;"),
25
38
  // Types
26
39
  page: /*#__PURE__*/css("&:is(a):focus{", euiFocusRing(euiThemeContext, 'inset'), ";}&:is(button):focus{", euiFocusRing(euiThemeContext, 'center'), ";};label:page;"),
27
- application: /*#__PURE__*/css(euiFontSize(euiThemeContext, 'xs'), " background-color:", transparentize(euiTheme.colors.darkestShade, 0.2), ";clip-path:polygon(\n 0 0,\n calc(100% - ", euiTheme.size.s, ") 0,\n 100% 50%,\n calc(100% - ", euiTheme.size.s, ") 100%,\n 0 100%,\n ", euiTheme.size.s, " 50%\n );color:", euiTheme.colors.darkestShade, ";line-height:", euiTheme.size.base, ";", logicalCSS('padding-vertical', euiTheme.size.xs), " ", logicalCSS('padding-horizontal', euiTheme.size.base), " &:is(a),&:is(button){background-color:", transparentize(euiTheme.colors.primary, 0.2), ";color:", euiTheme.colors.link, ";:focus{", euiFocusRing(euiThemeContext, 'inset'), " :focus-visible{border-radius:", euiTheme.border.radius.medium, ";clip-path:none;}}};label:application;"),
40
+ application: /*#__PURE__*/css(euiFontSize(euiThemeContext, 'xs'), " font-weight:", euiTheme.font.weight.medium, ";background-color:", applicationTextColors.backgroundColor, ";clip-path:polygon(\n 0 0,\n calc(100% - ", euiTheme.size.s, ") 0,\n 100% 50%,\n calc(100% - ", euiTheme.size.s, ") 100%,\n 0 100%,\n ", euiTheme.size.s, " 50%\n );color:", applicationTextColors.color, ";line-height:", euiTheme.size.base, ";", logicalCSS('padding-vertical', euiTheme.size.xs), " ", logicalCSS('padding-horizontal', euiTheme.size.base), " &:is(a),&:is(button){background-color:", applicationButtonColors.backgroundColor, ";color:", applicationButtonColors.color, ";:focus{", euiFocusRing(euiThemeContext, 'inset'), " :focus-visible{border-radius:", euiTheme.border.radius.medium, ";clip-path:none;}}};label:application;"),
28
41
  applicationStyles: {
29
42
  onlyChild: /*#__PURE__*/css("border-radius:", euiTheme.border.radius.medium, ";clip-path:none;", logicalCSS('padding-horizontal', euiTheme.size.m), ";;label:onlyChild;"),
30
43
  firstChild: /*#__PURE__*/css(logicalBorderRadiusCSS("".concat(euiTheme.border.radius.medium, " 0 0 ").concat(euiTheme.border.radius.medium), true), " clip-path:polygon(\n 0 0,\n calc(100% - ", euiTheme.size.s, ") 0,\n 100% 50%,\n calc(100% - ", euiTheme.size.s, ") 100%,\n 0 100%\n );", logicalCSS('padding-left', euiTheme.size.m), ";;label:firstChild;"),
@@ -9,12 +9,12 @@ var _excluded = ["children", "textProps", "isLoading", "isDisabled", "iconType",
9
9
  * Side Public License, v 1.
10
10
  */
11
11
 
12
- import React from 'react';
13
- import { useEuiTheme } from '../../../services';
12
+ import React, { useMemo } from 'react';
13
+ import classNames from 'classnames';
14
+ import { useEuiMemoizedStyles } from '../../../services';
14
15
  import { EuiLoadingSpinner } from '../../loading';
15
16
  import { EuiIcon } from '../../icon';
16
17
  import { euiButtonDisplayContentStyles } from './_button_display_content.styles';
17
- import classNames from 'classnames';
18
18
  import { jsx as ___EmotionJSX } from "@emotion/react";
19
19
  export var ICON_SIZES = ['s', 'm'];
20
20
  export var ICON_SIDES = ['left', 'right'];
@@ -37,39 +37,37 @@ export var EuiButtonDisplayContent = function EuiButtonDisplayContent(_ref) {
37
37
  _ref$iconSide = _ref.iconSide,
38
38
  iconSide = _ref$iconSide === void 0 ? 'left' : _ref$iconSide,
39
39
  contentProps = _objectWithoutProperties(_ref, _excluded);
40
- var theme = useEuiTheme();
41
- var styles = euiButtonDisplayContentStyles(theme);
42
- var cssStyles = [styles.euiButtonDisplayContent];
40
+ var styles = useEuiMemoizedStyles(euiButtonDisplayContentStyles);
43
41
 
44
42
  // Add an icon to the button if one exists.
45
- var icon;
46
-
47
- // When the button is disabled the text gets gray
48
- // and in some buttons the background gets a light gray
49
- // for better contrast we want to change the border of the spinner
50
- // to have the same color of the text. This way we ensure the borders
51
- // are always visible. The default spinner color could be very light.
52
- var loadingSpinnerColor = isDisabled ? {
53
- border: 'currentcolor'
54
- } : undefined;
55
- if (isLoading) {
56
- icon = ___EmotionJSX(EuiLoadingSpinner, {
57
- size: iconSize,
58
- color: loadingSpinnerColor
59
- });
60
- } else if (iconType) {
61
- icon = ___EmotionJSX(EuiIcon, {
62
- type: iconType,
63
- size: iconSize,
64
- color: "inherit" // forces the icon to inherit its parent color
65
- });
66
- }
67
-
43
+ var icon = useMemo(function () {
44
+ if (isLoading) {
45
+ // When the button is disabled the text gets gray
46
+ // and in some buttons the background gets a light gray
47
+ // for better contrast we want to change the border of the spinner
48
+ // to have the same color of the text. This way we ensure the borders
49
+ // are always visible. The default spinner color could be very light.
50
+ var loadingSpinnerColor = isDisabled ? {
51
+ border: 'currentcolor'
52
+ } : undefined;
53
+ return ___EmotionJSX(EuiLoadingSpinner, {
54
+ size: iconSize,
55
+ color: loadingSpinnerColor
56
+ });
57
+ }
58
+ if (iconType) {
59
+ return ___EmotionJSX(EuiIcon, {
60
+ type: iconType,
61
+ size: iconSize,
62
+ color: "inherit" // forces the icon to inherit its parent color
63
+ });
64
+ }
65
+ }, [iconType, iconSize, isLoading, isDisabled]);
68
66
  var isText = typeof children === 'string';
69
67
  var doNotRenderTextWrapper = textProps === false;
70
68
  var renderTextWrapper = (isText || textProps) && !doNotRenderTextWrapper;
71
69
  return ___EmotionJSX("span", _extends({
72
- css: cssStyles
70
+ css: styles.euiButtonDisplayContent
73
71
  }, contentProps), iconSide === 'left' && icon, renderTextWrapper ? ___EmotionJSX("span", _extends({}, textProps, {
74
72
  className: classNames('eui-textTruncate', textProps === null || textProps === void 0 ? void 0 : textProps.className)
75
73
  }), children) : children, iconSide === 'right' && icon);
@@ -15,11 +15,11 @@ function _objectSpread(target) { for (var i = 1; i < arguments.length; i++) { va
15
15
 
16
16
  import classNames from 'classnames';
17
17
  import React from 'react';
18
- import { useEuiTheme } from '../../../services';
18
+ import { useEuiMemoizedStyles } from '../../../services';
19
19
  import { useEuiButtonColorCSS } from '../../../themes/amsterdam/global_styling/mixins/button';
20
20
  import { useInnerText } from '../../inner_text';
21
21
  import { EuiButtonDisplay } from '../button_display/_button_display';
22
- import { euiButtonGroupButtonStyles, _compressedButtonFocusColor, _uncompressedButtonFocus } from './button_group_button.styles';
22
+ import { euiButtonGroupButtonStyles, _compressedButtonFocusColors } from './button_group_button.styles';
23
23
  import { EuiToolTip } from '../../../components/tool_tip';
24
24
  import { jsx as ___EmotionJSX } from "@emotion/react";
25
25
  export var EuiButtonGroupButton = function EuiButtonGroupButton(_ref) {
@@ -41,13 +41,12 @@ export var EuiButtonGroupButton = function EuiButtonGroupButton(_ref) {
41
41
  var color = isDisabled ? 'disabled' : _color;
42
42
  var display = isSelected ? 'fill' : isCompressed ? 'empty' : 'base';
43
43
  var hasToolTip = !!toolTipContent;
44
- var euiTheme = useEuiTheme();
44
+ var styles = useEuiMemoizedStyles(euiButtonGroupButtonStyles);
45
+ var focusColorStyles = useEuiMemoizedStyles(_compressedButtonFocusColors);
45
46
  var buttonColorStyles = useEuiButtonColorCSS({
46
47
  display: display
47
48
  })[color];
48
- var focusColorStyles = isCompressed ? _compressedButtonFocusColor(euiTheme, color) : _uncompressedButtonFocus(euiTheme);
49
- var styles = euiButtonGroupButtonStyles(euiTheme);
50
- var cssStyles = [styles.euiButtonGroupButton, isIconOnly && styles.iconOnly, !isCompressed && (hasToolTip ? styles.uncompressed.hasToolTip : styles.uncompressed[size]), isCompressed ? styles.compressed : styles.uncompressed.uncompressed, isDisabled && isSelected ? styles.disabledAndSelected : buttonColorStyles, !isDisabled && focusColorStyles];
49
+ var cssStyles = [styles.euiButtonGroupButton, isIconOnly && styles.iconOnly, !isCompressed && (hasToolTip ? styles.uncompressed.hasToolTip : styles.uncompressed[size]), isCompressed ? styles.compressed : styles.uncompressed.uncompressed, isDisabled && isSelected ? styles.disabledAndSelected : buttonColorStyles, !isDisabled && isCompressed && focusColorStyles[color]];
51
50
  var tooltipWrapperStyles = [styles.tooltipWrapper, !isCompressed && styles.uncompressed[size]];
52
51
  var contentStyles = [styles.content.euiButtonGroupButton__content, isCompressed && styles.content.compressed];
53
52
  var textStyles = [isIconOnly ? styles.text.euiButtonGroupButton__iconOnly : styles.text.euiButtonGroupButton__text];
@@ -1,3 +1,7 @@
1
+ import _defineProperty from "@babel/runtime/helpers/defineProperty";
2
+ import _toConsumableArray from "@babel/runtime/helpers/toConsumableArray";
3
+ 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
+ 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; }
1
5
  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)."; }
2
6
  /*
3
7
  * Copyright Elasticsearch B.V. and/or licensed to Elasticsearch B.V. under one
@@ -10,7 +14,7 @@ function _EMOTION_STRINGIFIED_CSS_ERROR__() { return "You have tried to stringif
10
14
  import { css } from '@emotion/react';
11
15
  import { makeDisabledContrastColor, transparentize } from '../../../services';
12
16
  import { mathWithUnits, logicalCSS, logicalShorthandCSS, euiTextShift, euiOutline, euiCanAnimate } from '../../../global_styling';
13
- import { euiButtonFillColor } from '../../../themes/amsterdam/global_styling/mixins/button';
17
+ import { euiButtonFillColor, BUTTON_COLORS } from '../../../themes/amsterdam/global_styling/mixins/button';
14
18
  import { euiScreenReaderOnly } from '../../accessibility';
15
19
  import { euiFormVariables } from '../../form/form.styles';
16
20
  var _ref = process.env.NODE_ENV === "production" ? {
@@ -46,7 +50,7 @@ export var euiButtonGroupButtonStyles = function euiButtonGroupButtonStyles(euiT
46
50
  iconOnly: /*#__PURE__*/css("padding-inline:", euiTheme.size.s, ";;label:iconOnly;"),
47
51
  // Sizes
48
52
  uncompressed: {
49
- uncompressed: /*#__PURE__*/css("&:is(.euiButtonGroupButton-isSelected){font-weight:", euiTheme.font.weight.bold, ";};label:uncompressed;"),
53
+ uncompressed: /*#__PURE__*/css("&:is(.euiButtonGroupButton-isSelected){font-weight:", euiTheme.font.weight.bold, ";}&:focus-visible{", euiOutline(euiThemeContext, 'inset', euiTheme.colors.fullShade), ";};label:uncompressed;"),
50
54
  get borders() {
51
55
  var selectors = '.euiButtonGroupButton-isSelected, .euiButtonGroup__tooltipWrapper-isSelected';
52
56
  var selectedColor = transparentize(euiTheme.colors.emptyShade, 0.2);
@@ -86,12 +90,11 @@ export var euiButtonGroupButtonStyles = function euiButtonGroupButtonStyles(euiT
86
90
  }
87
91
  };
88
92
  };
89
- export var _compressedButtonFocusColor = function _compressedButtonFocusColor(euiThemeContext, color) {
90
- var _euiButtonFillColor = euiButtonFillColor(euiThemeContext, color),
91
- backgroundColor = _euiButtonFillColor.backgroundColor;
92
- return /*#__PURE__*/css("&:focus-visible{", euiOutline(euiThemeContext, 'center', backgroundColor), " &:is(.euiButtonGroupButton-isSelected){outline-offset:0;}}");
93
- };
94
- export var _uncompressedButtonFocus = function _uncompressedButtonFocus(euiThemeContext) {
95
- var euiTheme = euiThemeContext.euiTheme;
96
- return /*#__PURE__*/css("&:focus-visible{", euiOutline(euiThemeContext, 'inset', euiTheme.colors.fullShade), ";}");
93
+ export var _compressedButtonFocusColors = function _compressedButtonFocusColors(euiThemeContext) {
94
+ var colors = [].concat(_toConsumableArray(BUTTON_COLORS), ['disabled']);
95
+ return colors.reduce(function (acc, color) {
96
+ var _euiButtonFillColor = euiButtonFillColor(euiThemeContext, color),
97
+ backgroundColor = _euiButtonFillColor.backgroundColor;
98
+ return _objectSpread(_objectSpread({}, acc), {}, _defineProperty({}, color, /*#__PURE__*/css("&:focus-visible{", euiOutline(euiThemeContext, 'center', backgroundColor), " &:is(.euiButtonGroupButton-isSelected){outline-offset:0;}}")));
99
+ }, {});
97
100
  };
@@ -10,17 +10,17 @@ var _excluded = ["title", "color", "size", "iconType", "children", "className",
10
10
  * Side Public License, v 1.
11
11
  */
12
12
 
13
- import React, { forwardRef } from 'react';
13
+ import React, { forwardRef, useMemo } from 'react';
14
14
  import classNames from 'classnames';
15
+ import { useEuiMemoizedStyles } from '../../services';
15
16
  import { EuiIcon } from '../icon';
16
17
  import { EuiButtonIcon } from '../button';
17
18
  import { EuiText } from '../text';
18
- import { useEuiTheme } from '../../services';
19
19
  import { EuiPanel } from '../panel';
20
20
  import { EuiSpacer } from '../spacer';
21
21
  import { EuiTitle } from '../title';
22
22
  import { EuiI18n } from '../i18n';
23
- import { euiCallOutStyles, euiCallOutHeadingStyles } from './call_out.styles';
23
+ import { euiCallOutStyles, euiCallOutHeaderStyles } from './call_out.styles';
24
24
  import { jsx as ___EmotionJSX } from "@emotion/react";
25
25
  export var COLORS = ['primary', 'success', 'warning', 'danger'];
26
26
  export var HEADINGS = ['h1', 'h2', 'h3', 'h4', 'h5', 'h6', 'p'];
@@ -37,51 +37,48 @@ export var EuiCallOut = /*#__PURE__*/forwardRef(function (_ref, ref) {
37
37
  heading = _ref$heading === void 0 ? 'p' : _ref$heading,
38
38
  onDismiss = _ref.onDismiss,
39
39
  rest = _objectWithoutProperties(_ref, _excluded);
40
- var theme = useEuiTheme();
41
- var styles = euiCallOutStyles(theme);
40
+ var styles = useEuiMemoizedStyles(euiCallOutStyles);
42
41
  var cssStyles = [styles.euiCallOut, onDismiss && styles.hasDismissButton.hasDimissButton, onDismiss && styles.hasDismissButton[size]];
43
- var cssDismissButtonStyles = [styles.dismissButton.euiCallOut__dismissButton, styles.dismissButton[size]];
44
- var headerStyles = euiCallOutHeadingStyles(theme);
45
- var cssHeaderStyles = [headerStyles.euiCallOutHeader, headerStyles[color]];
46
42
  var classes = classNames('euiCallOut', _defineProperty({}, "euiCallOut--".concat(color), color), className);
47
- var dismissButton = onDismiss && ___EmotionJSX(EuiI18n, {
48
- token: "euiCallOut.dismissAriaLabel",
49
- default: "Dismiss this callout"
50
- }, function (dismissAriaLabel) {
51
- return ___EmotionJSX(EuiButtonIcon, {
52
- iconType: "cross",
53
- onClick: onDismiss,
54
- "aria-label": dismissAriaLabel,
55
- css: cssDismissButtonStyles,
56
- color: color,
57
- "data-test-subj": "euiDismissCalloutButton"
43
+ var dismissButton = useMemo(function () {
44
+ if (!onDismiss) return;
45
+ var cssStyles = [styles.dismissButton.euiCallOut__dismissButton, styles.dismissButton[size]];
46
+ return ___EmotionJSX(EuiI18n, {
47
+ token: "euiCallOut.dismissAriaLabel",
48
+ default: "Dismiss this callout"
49
+ }, function (dismissAriaLabel) {
50
+ return ___EmotionJSX(EuiButtonIcon, {
51
+ iconType: "cross",
52
+ onClick: onDismiss,
53
+ "aria-label": dismissAriaLabel,
54
+ css: cssStyles,
55
+ color: color,
56
+ "data-test-subj": "euiDismissCalloutButton"
57
+ });
58
58
  });
59
- });
60
- var headerIcon = iconType && ___EmotionJSX(EuiIcon, {
61
- css: styles.euiCallOut__icon,
62
- type: iconType,
63
- size: "m",
64
- "aria-hidden": "true",
65
- color: "inherit"
66
- });
67
- var H = heading;
68
- var header = title && ___EmotionJSX(EuiTitle, {
69
- size: size === 's' ? 'xxs' : 'xs',
70
- css: cssHeaderStyles
71
- }, ___EmotionJSX(H, {
72
- className: "euiCallOutHeader__title"
73
- }, headerIcon, title));
59
+ }, [onDismiss, styles, color, size]);
60
+ var headerStyles = useEuiMemoizedStyles(euiCallOutHeaderStyles);
61
+ var header = useMemo(function () {
62
+ if (!title) return;
63
+ var H = heading;
64
+ var cssStyles = [headerStyles.euiCallOutHeader, headerStyles[color]];
65
+ return ___EmotionJSX(EuiTitle, {
66
+ size: size === 's' ? 'xxs' : 'xs',
67
+ css: cssStyles
68
+ }, ___EmotionJSX(H, {
69
+ className: "euiCallOutHeader__title"
70
+ }, iconType && ___EmotionJSX(EuiIcon, {
71
+ css: headerStyles.euiCallOut__icon,
72
+ type: iconType,
73
+ size: "m",
74
+ "aria-hidden": "true",
75
+ color: "inherit"
76
+ }), title));
77
+ }, [title, heading, iconType, size, color, headerStyles]);
74
78
  var optionalChildren = children && ___EmotionJSX(EuiText, {
75
79
  size: size === 's' ? 'xs' : 's',
76
80
  color: "default"
77
81
  }, children);
78
-
79
- // Note: the DOM position of the dismiss button matters to screen reader users.
80
- // We generally want them to have some context of _what_ they're dismissing,
81
- // instead of navigating to the dismiss button first before the callout content
82
- var calloutContent = header && optionalChildren ? ___EmotionJSX(React.Fragment, null, header, dismissButton, ___EmotionJSX(EuiSpacer, {
83
- size: "s"
84
- }), optionalChildren) : ___EmotionJSX(React.Fragment, null, header || optionalChildren, dismissButton);
85
82
  return ___EmotionJSX(EuiPanel, _extends({
86
83
  borderRadius: "none",
87
84
  color: color,
@@ -90,6 +87,12 @@ export var EuiCallOut = /*#__PURE__*/forwardRef(function (_ref, ref) {
90
87
  className: classes,
91
88
  panelRef: ref,
92
89
  grow: false
93
- }, rest), calloutContent);
90
+ }, rest),
91
+ // Note: the DOM position of the dismiss button matters to screen reader users.
92
+ // We generally want them to have some context of _what_ they're dismissing,
93
+ // instead of navigating to the dismiss button first before the callout content
94
+ header && optionalChildren ? ___EmotionJSX(React.Fragment, null, header, dismissButton, ___EmotionJSX(EuiSpacer, {
95
+ size: "s"
96
+ }), optionalChildren) : ___EmotionJSX(React.Fragment, null, header || optionalChildren, dismissButton));
94
97
  });
95
98
  EuiCallOut.displayName = 'EuiCallOut';
@@ -41,11 +41,10 @@ export var euiCallOutStyles = function euiCallOutStyles(_ref3) {
41
41
  euiCallOut__dismissButton: _ref,
42
42
  s: /*#__PURE__*/css(logicalCSS('top', euiTheme.size.xs), " ", logicalCSS('right', euiTheme.size.xs), ";;label:s;"),
43
43
  m: /*#__PURE__*/css(logicalCSS('top', euiTheme.size.s), " ", logicalCSS('right', euiTheme.size.s), ";;label:m;")
44
- },
45
- euiCallOut__icon: /*#__PURE__*/css("position:relative;", logicalCSS('top', '-1px'), " ", logicalCSS('margin-right', euiTheme.size.s), ";;label:euiCallOut__icon;")
44
+ }
46
45
  };
47
46
  };
48
- export var euiCallOutHeadingStyles = function euiCallOutHeadingStyles(_ref4) {
47
+ export var euiCallOutHeaderStyles = function euiCallOutHeaderStyles(_ref4) {
49
48
  var euiTheme = _ref4.euiTheme;
50
49
  return {
51
50
  euiCallOutHeader: /*#__PURE__*/css("font-weight:", euiTheme.font.weight.medium, ";", logicalCSS('margin-bottom', '0 !important'
@@ -54,6 +53,7 @@ export var euiCallOutHeadingStyles = function euiCallOutHeadingStyles(_ref4) {
54
53
  primary: /*#__PURE__*/css("color:", euiTheme.colors.primaryText, ";;label:primary;"),
55
54
  success: /*#__PURE__*/css("color:", euiTheme.colors.successText, ";;label:success;"),
56
55
  warning: /*#__PURE__*/css("color:", euiTheme.colors.warningText, ";;label:warning;"),
57
- danger: /*#__PURE__*/css("color:", euiTheme.colors.dangerText, ";;label:danger;")
56
+ danger: /*#__PURE__*/css("color:", euiTheme.colors.dangerText, ";;label:danger;"),
57
+ euiCallOut__icon: /*#__PURE__*/css("position:relative;", logicalCSS('top', '-1px'), " ", logicalCSS('margin-right', euiTheme.size.s), ";;label:euiCallOut__icon;")
58
58
  };
59
59
  };
@@ -11,11 +11,11 @@ var _excluded = ["lineNumber", "children"];
11
11
  */
12
12
 
13
13
  import React, { useState } from 'react';
14
- import { useEuiTheme } from '../../services';
14
+ import { useEuiTheme, useEuiMemoizedStyles } from '../../services';
15
+ import { useEuiButtonFocusCSS } from '../../themes/amsterdam/global_styling/mixins/button';
15
16
  import { useEuiI18n } from '../i18n';
16
17
  import { EuiPopover } from '../popover';
17
18
  import { EuiIcon } from '../icon';
18
- import { useEuiButtonFocusCSS } from '../../themes/amsterdam/global_styling/mixins/button';
19
19
  import { euiCodeBlockAnnotationsStyles } from './code_block_annotations.style';
20
20
  import { jsx as ___EmotionJSX } from "@emotion/react";
21
21
  export var EuiCodeBlockAnnotation = function EuiCodeBlockAnnotation(_ref) {
@@ -29,13 +29,14 @@ export var EuiCodeBlockAnnotation = function EuiCodeBlockAnnotation(_ref) {
29
29
  var ariaLabel = useEuiI18n('euiCodeBlockAnnotations.ariaLabel', 'Click to view a code annotation for line {lineNumber}', {
30
30
  lineNumber: lineNumber
31
31
  });
32
+ var styles = useEuiMemoizedStyles(euiCodeBlockAnnotationsStyles);
33
+ var buttonIconFocusStyle = useEuiButtonFocusCSS();
34
+ var cssButtonIconStyles = [styles.euiCodeBlockAnnotation__buttonIcon, buttonIconFocusStyle];
32
35
  var _useEuiTheme = useEuiTheme(),
33
36
  euiTheme = _useEuiTheme.euiTheme,
34
37
  colorMode = _useEuiTheme.colorMode;
35
- var styles = euiCodeBlockAnnotationsStyles(euiTheme);
36
- var buttonIconFocusStyle = useEuiButtonFocusCSS();
37
- var cssButtonIconStyles = [styles.euiCodeBlockAnnotation__buttonIcon, buttonIconFocusStyle];
38
38
  var isDarkMode = colorMode === 'DARK';
39
+ var iconColor = isDarkMode ? euiTheme.colors.ink : 'ghost';
39
40
  return ___EmotionJSX(EuiPopover, _extends({
40
41
  css: styles.euiCodeBlockAnnotation
41
42
  }, rest, {
@@ -53,7 +54,7 @@ export var EuiCodeBlockAnnotation = function EuiCodeBlockAnnotation(_ref) {
53
54
  }, ___EmotionJSX(EuiIcon, {
54
55
  type: AnnotationInfoIcon,
55
56
  size: "s",
56
- color: isDarkMode ? euiTheme.colors.ink : 'ghost'
57
+ color: iconColor
57
58
  })),
58
59
  zIndex: Number(euiTheme.levels.mask) + 1 // Ensure fullscreen annotation popovers sit above the mask
59
60
  ,
@@ -8,7 +8,8 @@
8
8
 
9
9
  import { css } from '@emotion/react';
10
10
  import { logicalCSS, logicalSizeCSS, mathWithUnits } from '../../global_styling';
11
- export var euiCodeBlockAnnotationsStyles = function euiCodeBlockAnnotationsStyles(euiTheme) {
11
+ export var euiCodeBlockAnnotationsStyles = function euiCodeBlockAnnotationsStyles(_ref) {
12
+ var euiTheme = _ref.euiTheme;
12
13
  var buttonIconSize = mathWithUnits(euiTheme.size.base, function (x) {
13
14
  return x - 1.5;
14
15
  });
@@ -15,7 +15,7 @@ function _objectSpread(target) { for (var i = 1; i < arguments.length; i++) { va
15
15
 
16
16
  import React, { cloneElement, useRef } from 'react';
17
17
  import classNames from 'classnames';
18
- import { useEuiTheme, useGeneratedHtmlId, useIsWithinMinBreakpoint, useCombinedRefs } from '../../services';
18
+ import { useEuiMemoizedStyles, useGeneratedHtmlId, useIsWithinMinBreakpoint, useCombinedRefs } from '../../services';
19
19
  import { EuiFlyout } from '../flyout';
20
20
  import { euiCollapsibleNavStyles } from './collapsible_nav.styles';
21
21
 
@@ -64,8 +64,7 @@ export var EuiCollapsibleNav = function EuiCollapsibleNav(_ref) {
64
64
  var navIsDocked = isDocked && windowIsLargeEnoughToPush;
65
65
  var flyoutType = navIsDocked ? 'push' : 'overlay';
66
66
  var classes = classNames('euiCollapsibleNav', className);
67
- var euiTheme = useEuiTheme();
68
- var styles = euiCollapsibleNavStyles(euiTheme);
67
+ var styles = useEuiMemoizedStyles(euiCollapsibleNavStyles);
69
68
  var cssStyles = [styles.euiCollapsibleNav, styles[flyoutType]];
70
69
 
71
70
  // Show a trigger button if one was passed but
@@ -11,7 +11,7 @@ var _excluded = ["className", "children", "id", "title", "iconType", "iconSize",
11
11
 
12
12
  import React from 'react';
13
13
  import classNames from 'classnames';
14
- import { EuiThemeProvider, useEuiTheme, useGeneratedHtmlId } from '../../../services';
14
+ import { EuiThemeProvider, useEuiMemoizedStyles, useGeneratedHtmlId } from '../../../services';
15
15
  import { EuiAccordion } from '../../accordion';
16
16
  import { EuiIcon } from '../../icon';
17
17
  import { EuiFlexGroup, EuiFlexItem } from '../../flex';
@@ -41,8 +41,7 @@ export var EuiCollapsibleNavGroup = function EuiCollapsibleNavGroup(_ref) {
41
41
  conditionalId: id
42
42
  });
43
43
  var titleID = "".concat(groupID, "__title");
44
- var euiTheme = useEuiTheme();
45
- var styles = euiCollapsibleNavGroupStyles(euiTheme);
44
+ var styles = useEuiMemoizedStyles(euiCollapsibleNavGroupStyles);
46
45
  var cssStyles = [styles.euiCollapsibleNavGroup, isCollapsible ? styles.isCollapsible : styles.notCollapsible, background && styles[background]];
47
46
  var classes = classNames('euiCollapsibleNavGroup', className);
48
47