@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
@@ -8,8 +8,8 @@ var _react = _interopRequireDefault(require("react"));
8
8
  var _propTypes = _interopRequireDefault(require("prop-types"));
9
9
  var _classnames = _interopRequireDefault(require("classnames"));
10
10
  var _services = require("../../services");
11
+ var _loading_strings = require("./_loading_strings");
11
12
  var _loading_chart = require("./loading_chart.styles");
12
- var _i18n = require("../i18n");
13
13
  var _react2 = require("@emotion/react");
14
14
  var _excluded = ["size", "mono", "className", "aria-label"];
15
15
  /*
@@ -33,30 +33,25 @@ var EuiLoadingChart = function EuiLoadingChart(_ref) {
33
33
  className = _ref.className,
34
34
  ariaLabel = _ref['aria-label'],
35
35
  rest = _objectWithoutProperties(_ref, _excluded);
36
- var defaultAriaLabel = (0, _i18n.useEuiI18n)('euiLoadingChart.ariaLabel', 'Loading');
37
- var euiTheme = (0, _services.useEuiTheme)();
38
- var styles = (0, _loading_chart.euiLoadingChartStyles)(euiTheme);
39
- var barStyles = (0, _loading_chart.euiLoadingChartBarStyles)(euiTheme);
40
- var classes = (0, _classnames.default)('euiLoadingChart', {
41
- 'euiLoadingChart--mono': mono
42
- }, className);
36
+ var classes = (0, _classnames.default)('euiLoadingChart', className);
37
+ var styles = (0, _services.useEuiMemoizedStyles)(_loading_chart.euiLoadingChartStyles);
43
38
  var cssStyles = [styles.euiLoadingChart, styles[size]];
44
- var cssBarStyles = function cssBarStyles(index) {
45
- return [barStyles.euiLoadingChart__bar, barStyles[size], (0, _loading_chart._barIndex)(index, mono, euiTheme)];
46
- };
47
- var bars = [];
48
- for (var index = 0; index < 4; index++) {
49
- bars.push((0, _react2.jsx)("span", {
50
- key: index,
51
- css: cssBarStyles(index)
52
- }));
53
- }
39
+ var barStyles = (0, _services.useEuiMemoizedStyles)(_loading_chart.euiLoadingChartBarStyles);
40
+ var barCssStyles = [barStyles.euiLoadingChart__bar, mono ? barStyles.mono : barStyles.nonmono, barStyles[size]];
41
+ var defaultAriaLabel = (0, _loading_strings.useLoadingAriaLabel)();
54
42
  return (0, _react2.jsx)("span", _extends({
55
43
  className: classes,
56
44
  css: cssStyles,
57
45
  role: "progressbar",
58
46
  "aria-label": ariaLabel || defaultAriaLabel
59
- }, rest), bars);
47
+ }, rest), Array.from({
48
+ length: _loading_chart.BARS_COUNT
49
+ }, function (_, index) {
50
+ return (0, _react2.jsx)("span", {
51
+ key: index,
52
+ css: barCssStyles
53
+ });
54
+ }));
60
55
  };
61
56
  exports.EuiLoadingChart = EuiLoadingChart;
62
57
  EuiLoadingChart.propTypes = {
@@ -3,7 +3,7 @@
3
3
  Object.defineProperty(exports, "__esModule", {
4
4
  value: true
5
5
  });
6
- exports.euiLoadingChartStyles = exports.euiLoadingChartBarStyles = exports._barIndex = void 0;
6
+ exports.euiLoadingChartStyles = exports.euiLoadingChartBarStyles = exports.BARS_COUNT = void 0;
7
7
  var _react = require("@emotion/react");
8
8
  var _services = require("../../services");
9
9
  var _global_styling = require("../../global_styling");
@@ -16,6 +16,7 @@ function _EMOTION_STRINGIFIED_CSS_ERROR__() { return "You have tried to stringif
16
16
  * in compliance with, at your election, the Elastic License 2.0 or the Server
17
17
  * Side Public License, v 1.
18
18
  */
19
+ var nonMonoColors = (0, _services.euiPaletteColorBlind)();
19
20
  var _ref = process.env.NODE_ENV === "production" ? {
20
21
  name: "yovxj7-euiLoadingChart",
21
22
  styles: "overflow:hidden;display:inline-flex;label:euiLoadingChart;"
@@ -34,21 +35,38 @@ var euiLoadingChartStyles = function euiLoadingChartStyles(_ref2) {
34
35
  };
35
36
  };
36
37
  exports.euiLoadingChartStyles = euiLoadingChartStyles;
38
+ var BARS_COUNT = 4;
39
+ exports.BARS_COUNT = BARS_COUNT;
37
40
  var euiLoadingChartBarStyles = function euiLoadingChartBarStyles(_ref3) {
38
- var euiTheme = _ref3.euiTheme;
41
+ var euiTheme = _ref3.euiTheme,
42
+ colorMode = _ref3.colorMode;
39
43
  return {
40
- euiLoadingChart__bar: /*#__PURE__*/(0, _react.css)((0, _global_styling.logicalCSS)('height', '100%'), " display:inline-block;;label:euiLoadingChart__bar;"),
44
+ euiLoadingChart__bar: /*#__PURE__*/(0, _react.css)((0, _global_styling.logicalCSS)('height', '100%'), " display:inline-block;", _global_styling.euiCanAnimate, "{animation:", barAnimation, " 1s infinite;", outputNthChildCss(function (index) {
45
+ return "animation-delay: 0.".concat(index, "s;");
46
+ }), ";}", _global_styling.euiCantAnimate, "{", outputNthChildCss(function (index) {
47
+ return "transform: translateY(".concat(22 * index, "%);");
48
+ }), ";};label:euiLoadingChart__bar;"),
49
+ nonmono: /*#__PURE__*/(0, _react.css)(outputNthChildCss(function (index) {
50
+ return "background-color: ".concat(nonMonoColors[index]);
51
+ }), ";;label:nonmono;"),
52
+ mono: /*#__PURE__*/(0, _react.css)(outputNthChildCss(function (index) {
53
+ return "background-color: ".concat((0, _services.shadeOrTint)(euiTheme.colors.lightShade, index * 0.04, colorMode));
54
+ }), ";;label:mono;"),
41
55
  m: /*#__PURE__*/(0, _react.css)((0, _global_styling.logicalCSS)('width', euiTheme.size.xxs), " ", (0, _global_styling.logicalCSS)('margin-bottom', euiTheme.size.s), ";;label:m;"),
42
56
  l: /*#__PURE__*/(0, _react.css)((0, _global_styling.logicalCSS)('width', euiTheme.size.xs), " ", (0, _global_styling.logicalCSS)('margin-bottom', euiTheme.size.m), ";;label:l;"),
43
57
  xl: /*#__PURE__*/(0, _react.css)((0, _global_styling.logicalCSS)('width', euiTheme.size.s), " ", (0, _global_styling.logicalCSS)('margin-bottom', euiTheme.size.base), ";;label:xl;")
44
58
  };
45
59
  };
60
+
61
+ /**
62
+ * Small utility helper for generating nth-child CSS for each bar
63
+ */
46
64
  exports.euiLoadingChartBarStyles = euiLoadingChartBarStyles;
47
- var barAnimation = (0, _react.keyframes)(_templateObject || (_templateObject = _taggedTemplateLiteral(["\n 0% {\n transform: translateY(0);\n }\n\n 50% {\n transform: translateY(66%);\n }\n\n 100% {\n transform: translateY(0);\n }\n"])));
48
- var _barIndex = function _barIndex(index, mono, _ref4) {
49
- var euiTheme = _ref4.euiTheme,
50
- colorMode = _ref4.colorMode;
51
- var backgroundColor = mono ? (0, _services.shadeOrTint)(euiTheme.colors.lightShade, index * 0.04, colorMode) : (0, _services.euiPaletteColorBlind)()[index];
52
- return /*#__PURE__*/(0, _react.css)("background-color:", backgroundColor, ";transform:translateY(", 22 * index, "%);", _global_styling.euiCanAnimate, "{animation:", barAnimation, " 1s ", ".".concat(index, "s"), " infinite;}");
65
+ var outputNthChildCss = function outputNthChildCss(css) {
66
+ return Array.from({
67
+ length: BARS_COUNT
68
+ }, function (_, index) {
69
+ return "\n &:nth-child(".concat(index + 1, ") {\n ").concat(css(index), "\n }");
70
+ }).join();
53
71
  };
54
- exports._barIndex = _barIndex;
72
+ var barAnimation = (0, _react.keyframes)(_templateObject || (_templateObject = _taggedTemplateLiteral(["\n 0% {\n transform: translateY(0);\n }\n\n 50% {\n transform: translateY(66%);\n }\n\n 100% {\n transform: translateY(0);\n }\n"])));
@@ -31,13 +31,11 @@ var EuiLoadingElastic = function EuiLoadingElastic(_ref) {
31
31
  className = _ref.className,
32
32
  ariaLabel = _ref['aria-label'],
33
33
  rest = _objectWithoutProperties(_ref, _excluded);
34
- var styles = (0, _loading_elastic.euiLoadingElasticStyles)();
35
- var cssStyles = [styles.euiLoadingElastic];
36
- var defaultLabel = (0, _loading_strings.useLoadingAriaLabel)();
37
34
  var classes = (0, _classnames.default)('euiLoadingElastic', className);
35
+ var defaultLabel = (0, _loading_strings.useLoadingAriaLabel)();
38
36
  return (0, _react2.jsx)("span", _extends({
39
37
  className: classes,
40
- css: cssStyles,
38
+ css: _loading_elastic.euiLoadingElasticStyles.euiLoadingElastic,
41
39
  role: "progressbar",
42
40
  "aria-label": ariaLabel || defaultLabel
43
41
  }, rest), (0, _react2.jsx)(_icon.EuiIcon, {
@@ -16,9 +16,7 @@ var _templateObject;
16
16
  */
17
17
  function _taggedTemplateLiteral(strings, raw) { if (!raw) { raw = strings.slice(0); } return Object.freeze(Object.defineProperties(strings, { raw: { value: Object.freeze(raw) } })); }
18
18
  var loadingElastic = (0, _react.keyframes)(_templateObject || (_templateObject = _taggedTemplateLiteral(["\n 0% {\n transform: scale3d(.2, .2, -.7);\n opacity: .2;\n }\n\n 40% {\n transform: scale3d(1, 1, 2);\n opacity: 1;\n }\n\n 50% {\n transform: scale3d(.99, .99, 2);\n }\n\n 70% {\n transform: scale3d(.96, .96, -2.5);\n }\n\n 100% {\n transform: scale3d(.98, .98, 2);\n }\n"])));
19
- var euiLoadingElasticStyles = function euiLoadingElasticStyles() {
20
- return {
21
- euiLoadingElastic: /*#__PURE__*/(0, _react.css)("position:relative;display:inline-block;& path{", _global_styling.euiCanAnimate, "{animation-name:", loadingElastic, ";animation-fill-mode:forwards;animation-direction:alternate;transform-style:preserve-3d;animation-duration:1s;animation-timing-function:cubic-bezier(0, 0.63, 0.49, 1);animation-iteration-count:infinite;transform-origin:50% 50%;}&:nth-of-type(1){display:none;}&:nth-of-type(2){animation-delay:0.035s;}&:nth-of-type(3){animation-delay:0.125s;}&:nth-of-type(4){animation-delay:0.155s;}&:nth-of-type(5){animation-delay:0.075s;}&:nth-of-type(6){animation-delay:0.06s;}};label:euiLoadingElastic;")
22
- };
19
+ var euiLoadingElasticStyles = {
20
+ euiLoadingElastic: /*#__PURE__*/(0, _react.css)("position:relative;display:inline-block;& path{", _global_styling.euiCanAnimate, "{animation-name:", loadingElastic, ";animation-fill-mode:forwards;animation-direction:alternate;transform-style:preserve-3d;animation-duration:1s;animation-timing-function:cubic-bezier(0, 0.63, 0.49, 1);animation-iteration-count:infinite;transform-origin:50% 50%;}&:nth-of-type(1){display:none;}&:nth-of-type(2){animation-delay:0.035s;}&:nth-of-type(3){animation-delay:0.125s;}&:nth-of-type(4){animation-delay:0.155s;}&:nth-of-type(5){animation-delay:0.075s;}&:nth-of-type(6){animation-delay:0.06s;}};label:euiLoadingElastic;")
23
21
  };
24
22
  exports.euiLoadingElasticStyles = euiLoadingElasticStyles;
@@ -7,8 +7,8 @@ exports.SIZES = exports.EuiLoadingLogo = void 0;
7
7
  var _react = _interopRequireDefault(require("react"));
8
8
  var _propTypes = _interopRequireDefault(require("prop-types"));
9
9
  var _classnames = _interopRequireDefault(require("classnames"));
10
- var _icon = require("../icon");
11
10
  var _services = require("../../services");
11
+ var _icon = require("../icon");
12
12
  var _loading_strings = require("./_loading_strings");
13
13
  var _loading_logo = require("./loading_logo.styles");
14
14
  var _react2 = require("@emotion/react");
@@ -34,20 +34,17 @@ var EuiLoadingLogo = function EuiLoadingLogo(_ref) {
34
34
  ariaLabel = _ref['aria-label'],
35
35
  className = _ref.className,
36
36
  rest = _objectWithoutProperties(_ref, _excluded);
37
- var euiTheme = (0, _services.useEuiTheme)();
38
- var defaultLabel = (0, _loading_strings.useLoadingAriaLabel)();
39
- var styles = (0, _loading_logo.euiLoadingLogoStyles)(euiTheme);
40
- var cssStyles = [styles.euiLoadingLogo, styles[size]];
41
- var iconStyles = (0, _loading_logo.euiLoadingLogoIconStyles)(euiTheme);
42
- var iconCssStyles = [iconStyles.euiLoadingLogo__icon];
43
37
  var classes = (0, _classnames.default)('euiLoadingLogo', className);
38
+ var styles = (0, _services.useEuiMemoizedStyles)(_loading_logo.euiLoadingLogoStyles);
39
+ var cssStyles = [styles.euiLoadingLogo, styles[size]];
40
+ var defaultLabel = (0, _loading_strings.useLoadingAriaLabel)();
44
41
  return (0, _react2.jsx)("span", _extends({
45
42
  className: classes,
46
43
  css: cssStyles,
47
44
  role: "progressbar",
48
45
  "aria-label": ariaLabel || defaultLabel
49
46
  }, rest), (0, _react2.jsx)("span", {
50
- css: iconCssStyles
47
+ css: styles.euiLoadingLogo__icon
51
48
  }, (0, _react2.jsx)(_icon.EuiIcon, {
52
49
  type: logo,
53
50
  size: size
@@ -3,7 +3,7 @@
3
3
  Object.defineProperty(exports, "__esModule", {
4
4
  value: true
5
5
  });
6
- exports.euiLoadingLogoStyles = exports.euiLoadingLogoIconStyles = void 0;
6
+ exports.euiLoadingLogoStyles = void 0;
7
7
  var _react = require("@emotion/react");
8
8
  var _global_styling = require("../../global_styling");
9
9
  var _templateObject, _templateObject2, _templateObject3;
@@ -27,6 +27,7 @@ var euiLoadingLogoStyles = function euiLoadingLogoStyles(_ref) {
27
27
  var euiTheme = _ref.euiTheme;
28
28
  return {
29
29
  euiLoadingLogo: /*#__PURE__*/(0, _react.css)("position:relative;display:inline-block;", _global_styling.euiCanAnimate, "{&::before,&::after{position:absolute;content:'';inline-size:90%;inset-inline-start:5%;border-radius:50%;opacity:0.2;z-index:1;}&::before{box-shadow:0 0 ", euiTheme.size.s, " ", euiTheme.colors.fullShade, ";animation:1s ", loadingPulsateAndFade, " ", euiTheme.animation.resistance, " infinite;}&::after{background-color:", euiTheme.colors.fullShade, ";animation:1s ", loadingPulsate, " ", euiTheme.animation.resistance, " infinite;}};label:euiLoadingLogo;"),
30
+ euiLoadingLogo__icon: /*#__PURE__*/(0, _react.css)("display:inline-block;", _global_styling.euiCanAnimate, "{animation:1s ", loadingBounce, " ", euiTheme.animation.resistance, " infinite;};label:euiLoadingLogo__icon;"),
30
31
  /**
31
32
  * 1. Requires pixel math for animation
32
33
  * 2. Add a half the amount of animation distance padding to the top to give it more room
@@ -36,11 +37,4 @@ var euiLoadingLogoStyles = function euiLoadingLogoStyles(_ref) {
36
37
  xl: /*#__PURE__*/(0, _react.css)(_global_styling.euiCanAnimate, "{padding-block-start:", euiTheme.size[loadingPadding.xl], ";}&::before,&::after{block-size:", euiTheme.base * 0.5, "px;inset-block-end:-", euiTheme.size.m, ";};label:xl;")
37
38
  };
38
39
  };
39
- exports.euiLoadingLogoStyles = euiLoadingLogoStyles;
40
- var euiLoadingLogoIconStyles = function euiLoadingLogoIconStyles(_ref2) {
41
- var euiTheme = _ref2.euiTheme;
42
- return {
43
- euiLoadingLogo__icon: /*#__PURE__*/(0, _react.css)("display:inline-block;", _global_styling.euiCanAnimate, "{animation:1s ", loadingBounce, " ", euiTheme.animation.resistance, " infinite;};label:euiLoadingLogo__icon;")
44
- };
45
- };
46
- exports.euiLoadingLogoIconStyles = euiLoadingLogoIconStyles;
40
+ exports.euiLoadingLogoStyles = euiLoadingLogoStyles;
@@ -8,7 +8,7 @@ exports.SIZES = exports.EuiLoadingSpinner = void 0;
8
8
  var _react = _interopRequireDefault(require("react"));
9
9
  var _propTypes = _interopRequireDefault(require("prop-types"));
10
10
  var _classnames = _interopRequireDefault(require("classnames"));
11
- var _services = require("../..//services");
11
+ var _services = require("../../services");
12
12
  var _loading_strings = require("./_loading_strings");
13
13
  var _loading_spinner = require("./loading_spinner.styles");
14
14
  var _react2 = require("@emotion/react");
@@ -39,14 +39,14 @@ var EuiLoadingSpinner = function EuiLoadingSpinner(_ref) {
39
39
  color = _ref.color,
40
40
  style = _ref.style,
41
41
  rest = _objectWithoutProperties(_ref, _excluded);
42
- var euiTheme = (0, _services.useEuiTheme)();
43
- var styles = (0, _loading_spinner.euiLoadingSpinnerStyles)(euiTheme);
44
- var cssStyles = [styles.euiLoadingSpinner, styles[size]];
45
42
  var classes = (0, _classnames.default)('euiLoadingSpinner', className);
46
- var defaultLabel = (0, _loading_strings.useLoadingAriaLabel)();
43
+ var styles = (0, _services.useEuiMemoizedStyles)(_loading_spinner.euiLoadingSpinnerStyles);
44
+ var cssStyles = [styles.euiLoadingSpinner, styles[size]];
45
+ var euiTheme = (0, _services.useEuiTheme)();
47
46
  var customColorStyle = color ? _objectSpread(_objectSpread({}, style), {}, {
48
47
  borderColor: (0, _loading_spinner.euiSpinnerBorderColorsCSS)(euiTheme, color)
49
48
  }) : style;
49
+ var defaultLabel = (0, _loading_strings.useLoadingAriaLabel)();
50
50
  return (0, _react2.jsx)("span", _extends({
51
51
  className: classes,
52
52
  css: cssStyles,
@@ -299,7 +299,7 @@ EuiPageHeaderContent.propTypes = {
299
299
  */
300
300
  truncate: _propTypes.default.bool,
301
301
  /**
302
- * Accepts any EuiLink `color` when rendered as one (has `href`, `onClick`, or `popoverContent`)
302
+ * @deprecated - if a custom color is wanted, use the `css` prop to pass custom css
303
303
  */
304
304
  color: _propTypes.default.any,
305
305
  /**
@@ -43,11 +43,10 @@ var EuiResizableCollapseButton = function EuiResizableCollapseButton(_ref) {
43
43
  rest = _objectWithoutProperties(_ref, _excluded);
44
44
  var isHorizontal = direction === 'horizontal';
45
45
  var showOnFocus = !isCollapsed && !isVisible;
46
- var screenReaderOnlyStyles = (0, _screen_reader_only.euiScreenReaderOnlyStyles)(showOnFocus).euiScreenReaderOnly;
47
46
  var styles = (0, _services.useEuiMemoizedStyles)(_resizable_collapse_button.euiResizableCollapseButtonStyles);
48
47
  var collapsedStyles = [styles.collapsed.collapsed, styles.collapsed[direction], styles.collapsed["".concat(direction, "Positions")][internalPosition]];
49
48
  var collapsibleStyles = [styles.collapsible.collapsible, styles.collapsible[direction][externalPosition], styles.collapsible[direction][internalPosition]];
50
- var cssStyles = [styles.euiResizableCollapseButton, showOnFocus && screenReaderOnlyStyles].concat(_toConsumableArray(isCollapsed ? collapsedStyles : collapsibleStyles));
49
+ var cssStyles = [styles.euiResizableCollapseButton, showOnFocus && _screen_reader_only.euiScreenReaderOnlyStyles['euiScreenReaderOnly-showOnFocus']].concat(_toConsumableArray(isCollapsed ? collapsedStyles : collapsibleStyles));
51
50
  var COLLAPSED_ICON = '';
52
51
  var NOT_COLLAPSED_ICON = '';
53
52
  switch (externalPosition) {
@@ -41,7 +41,6 @@ var EuiTab = function EuiTab(_ref) {
41
41
  var _useContext = (0, _react.useContext)(_tabs_context.EuiTabsContext),
42
42
  size = _useContext.size,
43
43
  expand = _useContext.expand;
44
- var euiTheme = (0, _services.useEuiTheme)();
45
44
  var isHrefValid = !href || (0, _href_validator.validateHref)(href);
46
45
  var disabled = _disabled || !isHrefValid;
47
46
 
@@ -49,9 +48,9 @@ var EuiTab = function EuiTab(_ref) {
49
48
  var classes = (0, _classnames.default)('euiTab', className, {
50
49
  'euiTab-isSelected': isSelected
51
50
  });
52
- var tabStyles = (0, _tab.euiTabStyles)(euiTheme);
51
+ var tabStyles = (0, _services.useEuiMemoizedStyles)(_tab.euiTabStyles);
53
52
  var cssTabStyles = [tabStyles.euiTab, expand && tabStyles.expanded, disabled && tabStyles.disabled.disabled, isSelected && (disabled ? tabStyles.disabled.selected : tabStyles.selected)];
54
- var tabContentStyles = (0, _tab.euiTabContentStyles)(euiTheme);
53
+ var tabContentStyles = (0, _services.useEuiMemoizedStyles)(_tab.euiTabContentStyles);
55
54
  var cssTabContentStyles = [tabContentStyles.euiTab__content, size && tabContentStyles[size]];
56
55
  var prependNode = prepend && (0, _react2.jsx)("span", {
57
56
  className: "euiTab__prepend"
@@ -38,9 +38,8 @@ var EuiTabs = /*#__PURE__*/(0, _react.forwardRef)(function (_ref, ref) {
38
38
  _ref$size = _ref.size,
39
39
  size = _ref$size === void 0 ? 'm' : _ref$size,
40
40
  rest = _objectWithoutProperties(_ref, _excluded);
41
- var euiTheme = (0, _services.useEuiTheme)();
42
41
  var classes = (0, _classnames.default)('euiTabs', className);
43
- var styles = (0, _tabs.euiTabsStyles)(euiTheme);
42
+ var styles = (0, _services.useEuiMemoizedStyles)(_tabs.euiTabsStyles);
44
43
  var cssStyles = [styles.euiTabs, styles[size], bottomBorder && styles.bottomBorder];
45
44
  return (0, _react2.jsx)("div", _extends({
46
45
  ref: ref,
@@ -6,19 +6,20 @@
6
6
  * Side Public License, v 1.
7
7
  */
8
8
 
9
+ import { useMemo } from 'react';
9
10
  import classNames from 'classnames';
10
11
  import { cloneElementWithCss } from '../../../services';
11
- import { euiScreenReaderOnlyStyles } from './screen_reader_only.styles';
12
+ import { euiScreenReaderOnlyStyles as styles } from './screen_reader_only.styles';
12
13
  export var EuiScreenReaderOnly = function EuiScreenReaderOnly(_ref) {
13
14
  var children = _ref.children,
14
15
  className = _ref.className,
15
16
  showOnFocus = _ref.showOnFocus;
16
17
  var classes = classNames(className, children.props.className);
17
- var styles = euiScreenReaderOnlyStyles(showOnFocus);
18
- var cssStyles = [styles.euiScreenReaderOnly];
19
- var props = {
20
- className: classes.length ? classes : undefined,
21
- css: cssStyles
22
- };
18
+ var props = useMemo(function () {
19
+ return {
20
+ className: classes.length ? classes : undefined,
21
+ css: showOnFocus ? styles['euiScreenReaderOnly-showOnFocus'] : styles.euiScreenReaderOnly
22
+ };
23
+ }, [classes, showOnFocus]);
23
24
  return cloneElementWithCss(children, props);
24
25
  };
@@ -20,8 +20,7 @@ export var euiScreenReaderOnly = function euiScreenReaderOnly() {
20
20
  /*
21
21
  * Styles
22
22
  */
23
- export var euiScreenReaderOnlyStyles = function euiScreenReaderOnlyStyles(showOnFocus) {
24
- return {
25
- euiScreenReaderOnly: showOnFocus ? /*#__PURE__*/css("&:not(:focus, :active, :focus-within){", euiScreenReaderOnly(), ";};label:euiScreenReaderOnly;") : /*#__PURE__*/css(euiScreenReaderOnly(), ";label:euiScreenReaderOnly;")
26
- };
23
+ export var euiScreenReaderOnlyStyles = {
24
+ euiScreenReaderOnly: /*#__PURE__*/css(euiScreenReaderOnly(), ";label:euiScreenReaderOnly;"),
25
+ 'euiScreenReaderOnly-showOnFocus': /*#__PURE__*/css("&:not(:focus, :active, :focus-within){", euiScreenReaderOnly(), ";};label:euiScreenReaderOnly-showOnFocus;")
27
26
  };
@@ -12,7 +12,7 @@ var _excluded = ["destinationId", "fallbackDestination", "overrideLinkBehavior",
12
12
  import React, { useCallback } from 'react';
13
13
  import classNames from 'classnames';
14
14
  import { isTabbable } from 'tabbable';
15
- import { useEuiTheme } from '../../../services';
15
+ import { useEuiMemoizedStyles } from '../../../services';
16
16
  import { EuiButton } from '../../button/button';
17
17
  import { EuiScreenReaderOnly } from '../screen_reader_only';
18
18
  import { euiSkipLinkStyles } from './skip_link.styles';
@@ -30,9 +30,8 @@ export var EuiSkipLink = function EuiSkipLink(_ref) {
30
30
  className = _ref.className,
31
31
  _onClick = _ref.onClick,
32
32
  rest = _objectWithoutProperties(_ref, _excluded);
33
- var euiTheme = useEuiTheme();
34
- var styles = euiSkipLinkStyles(euiTheme);
35
33
  var classes = classNames('euiSkipLink', className);
34
+ var styles = useEuiMemoizedStyles(euiSkipLinkStyles);
36
35
  var cssStyles = [styles.euiSkipLink, position !== 'static' ? styles[position] : undefined];
37
36
  var onClick = useCallback(function (e) {
38
37
  var destinationEl = null;
@@ -1,6 +1,6 @@
1
1
  import _defineProperty from "@babel/runtime/helpers/defineProperty";
2
2
  import _objectWithoutProperties from "@babel/runtime/helpers/objectWithoutProperties";
3
- var _excluded = ["children", "className", "height", "width", "maxWidth", "style"];
3
+ var _excluded = ["children", "className", "style", "height", "width", "maxWidth"];
4
4
  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; }
5
5
  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; }
6
6
  /*
@@ -11,26 +11,28 @@ function _objectSpread(target) { for (var i = 1; i < arguments.length; i++) { va
11
11
  * Side Public License, v 1.
12
12
  */
13
13
 
14
- import React from 'react';
14
+ import React, { useMemo } from 'react';
15
15
  import classNames from 'classnames';
16
+ import { logicalStyles } from '../../global_styling';
16
17
  export var EuiAspectRatio = function EuiAspectRatio(_ref) {
17
18
  var children = _ref.children,
18
19
  className = _ref.className,
20
+ style = _ref.style,
19
21
  height = _ref.height,
20
22
  width = _ref.width,
21
23
  maxWidth = _ref.maxWidth,
22
- style = _ref.style,
23
24
  rest = _objectWithoutProperties(_ref, _excluded);
24
- var classes = classNames('euiAspectRatio', className);
25
- var euiAspectRatioStyle = _objectSpread(_objectSpread({}, children.props.style), {}, {
26
- aspectRatio: "".concat(width, " / ").concat(height),
27
- height: 'auto',
28
- width: '100%',
29
- maxWidth: maxWidth
30
- }, style);
31
- var props = _objectSpread({
25
+ var classes = classNames('euiAspectRatio', className, children.props.className);
26
+ var euiAspectRatioStyle = useMemo(function () {
27
+ return logicalStyles({
28
+ aspectRatio: "".concat(width, " / ").concat(height),
29
+ height: 'auto',
30
+ width: '100%',
31
+ maxWidth: maxWidth
32
+ });
33
+ }, [height, width, maxWidth]);
34
+ return /*#__PURE__*/React.cloneElement(children, _objectSpread(_objectSpread({}, rest), {}, {
32
35
  className: classes,
33
- style: euiAspectRatioStyle
34
- }, rest);
35
- return /*#__PURE__*/React.cloneElement(children, props);
36
+ style: _objectSpread(_objectSpread(_objectSpread({}, children.props.style), euiAspectRatioStyle), style)
37
+ }));
36
38
  };
@@ -14,13 +14,14 @@ function _objectSpread(target) { for (var i = 1; i < arguments.length; i++) { va
14
14
  * Side Public License, v 1.
15
15
  */
16
16
 
17
- import React from 'react';
17
+ import React, { useMemo } from 'react';
18
18
  import classNames from 'classnames';
19
19
  import { isColorDark, hexToRgb, isValidHex } from '../../services/color';
20
- import { euiPaletteColorBlindBehindText, toInitials, useEuiTheme } from '../../services';
20
+ import { euiPaletteColorBlindBehindText, toInitials, useEuiMemoizedStyles } from '../../services';
21
21
  import { EuiIcon } from '../icon';
22
22
  import { euiAvatarStyles } from './avatar.styles';
23
23
  import { jsx as ___EmotionJSX } from "@emotion/react";
24
+ var visColors = euiPaletteColorBlindBehindText();
24
25
  export var SIZES = ['s', 'm', 'l', 'xl'];
25
26
  export var TYPES = ['space', 'user'];
26
27
  export var CASING = ['capitalize', 'uppercase', 'lowercase', 'none'];
@@ -49,57 +50,55 @@ export var EuiAvatar = function EuiAvatar(_ref) {
49
50
  isDisabled = _ref$isDisabled === void 0 ? false : _ref$isDisabled,
50
51
  style = _ref.style,
51
52
  props = _objectWithoutProperties(_ref, _excluded);
53
+ checkValidInitials(initials);
52
54
  var _props$casing = props.casing,
53
55
  casing = _props$casing === void 0 ? type === 'space' ? 'none' : 'uppercase' : _props$casing,
54
56
  rest = _objectWithoutProperties(props, _excluded2);
55
- var euiTheme = useEuiTheme();
56
- var styles = euiAvatarStyles(euiTheme);
57
- var visColors = euiPaletteColorBlindBehindText();
58
57
  var isPlain = color === 'plain';
59
58
  var isSubdued = color === 'subdued';
59
+ var isNamedColor = isPlain || isSubdued || color === null;
60
60
  var classes = classNames('euiAvatar', (_classNames = {}, _defineProperty(_classNames, "euiAvatar--".concat(size), size), _defineProperty(_classNames, "euiAvatar--".concat(type), type), _defineProperty(_classNames, 'euiAvatar-isDisabled', isDisabled), _classNames), className);
61
+ var styles = useEuiMemoizedStyles(euiAvatarStyles);
61
62
  var cssStyles = [styles.euiAvatar, styles[type], styles[size], styles[casing], isPlain && styles.plain, isSubdued && styles.subdued, isDisabled && styles.isDisabled];
62
- checkValidInitials(initials);
63
- var avatarStyle = _objectSpread({}, style);
64
- var iconCustomColor = iconColor;
65
- var isNamedColor = color === 'plain' || color === 'subdued' || color === null;
66
- if (!isNamedColor) {
67
- checkValidColor(color);
68
- var assignedColor = color || visColors[Math.floor(name.length % visColors.length)];
69
- var textColor = isColorDark.apply(void 0, _toConsumableArray(hexToRgb(assignedColor))) ? '#FFFFFF' : '#000000';
70
- avatarStyle.backgroundColor = assignedColor;
71
- avatarStyle.color = textColor;
72
-
73
- // Allow consumers to let the icons keep their default color (like app icons)
74
- // when passing `iconColor = null`, otherwise continue to pass on `iconColor` or adjust with textColor
75
- iconCustomColor = iconColor || iconColor === null ? iconColor : textColor;
76
- }
77
- if (imageUrl) {
78
- avatarStyle.backgroundImage = "url(".concat(imageUrl, ")");
79
- }
80
- var content;
81
- if (!imageUrl && !iconType) {
82
- // Create the initials
83
- var calculatedInitials = toInitials(name, initialsLength, initials);
84
- content = ___EmotionJSX("span", {
85
- "aria-hidden": "true"
86
- }, calculatedInitials);
87
- } else if (iconType) {
88
- content = ___EmotionJSX(EuiIcon, {
89
- className: "euiAvatar__icon",
90
- size: iconSize || size,
91
- type: iconType,
92
- color: iconCustomColor === null ? undefined : iconCustomColor
93
- });
94
- }
63
+ var avatarStyle = useMemo(function () {
64
+ if (imageUrl) {
65
+ return {
66
+ backgroundImage: "url(".concat(imageUrl, ")")
67
+ };
68
+ }
69
+ if (!isNamedColor) {
70
+ checkValidColor(color);
71
+ var assignedColor = color || visColors[Math.floor(name.length % visColors.length)];
72
+ var textColor = isColorDark.apply(void 0, _toConsumableArray(hexToRgb(assignedColor))) ? '#FFFFFF' : '#000000';
73
+ return {
74
+ backgroundColor: assignedColor,
75
+ color: textColor
76
+ };
77
+ }
78
+ }, [imageUrl, color, isNamedColor, name.length]);
79
+ var iconCustomColor = useMemo(function () {
80
+ // `null` allows icons to keep their default color (e.g. app icons)
81
+ if (iconColor === null) return undefined;
82
+ // Otherwise continue to pass on `iconColor`
83
+ if (iconColor) return iconColor;
84
+ // Fall back to the adjusted text color if it exists
85
+ return avatarStyle === null || avatarStyle === void 0 ? void 0 : avatarStyle.color;
86
+ }, [iconColor, avatarStyle === null || avatarStyle === void 0 ? void 0 : avatarStyle.color]);
95
87
  return ___EmotionJSX("div", _extends({
96
88
  css: cssStyles,
97
89
  className: classes,
98
- style: avatarStyle,
90
+ style: _objectSpread(_objectSpread({}, style), avatarStyle),
99
91
  "aria-label": isDisabled ? undefined : name,
100
92
  role: isDisabled ? 'presentation' : 'img',
101
93
  title: name
102
- }, rest), content);
94
+ }, rest), !imageUrl && (iconType ? ___EmotionJSX(EuiIcon, {
95
+ className: "euiAvatar__icon",
96
+ size: iconSize || size,
97
+ type: iconType,
98
+ color: iconCustomColor
99
+ }) : ___EmotionJSX("span", {
100
+ "aria-hidden": "true"
101
+ }, toInitials(name, initialsLength, initials))));
103
102
  };
104
103
 
105
104
  // TODO: Migrate to a service
@@ -66,7 +66,7 @@ export var euiAvatarStyles = function euiAvatarStyles(_ref8) {
66
66
  var euiTheme = _ref8.euiTheme;
67
67
  return {
68
68
  // Base
69
- euiAvatar: /*#__PURE__*/css("flex-shrink:0;display:inline-flex;justify-content:center;align-items:center;vertical-align:middle;background-size:cover;", logicalTextAlignCSS('center'), " ", logicalCSS('overflow-x', 'hidden'), "font-weight:", euiTheme.font.weight.medium, ";;label:euiAvatar;"),
69
+ euiAvatar: /*#__PURE__*/css("flex-shrink:0;display:inline-flex;justify-content:center;align-items:center;vertical-align:middle;background-size:cover;background-color:", euiTheme.colors.lightShade, ";", logicalTextAlignCSS('center'), " ", logicalCSS('overflow-x', 'hidden'), "font-weight:", euiTheme.font.weight.medium, ";;label:euiAvatar;"),
70
70
  // Variants
71
71
  plain: /*#__PURE__*/css("background-color:", euiTheme.colors.emptyShade, ";;label:plain;"),
72
72
  subdued: /*#__PURE__*/css("background-color:", euiTheme.colors.lightestShade, ";;label:subdued;"),
@@ -14,10 +14,10 @@ function _objectSpread(target) { for (var i = 1; i < arguments.length; i++) { va
14
14
 
15
15
  import React, { useMemo } from 'react';
16
16
  import classNames from 'classnames';
17
- import { useEuiTheme, getSecureRelForTarget, wcagContrastMin } from '../../services';
17
+ import { useEuiTheme, useEuiMemoizedStyles, getSecureRelForTarget, wcagContrastMin } from '../../services';
18
+ import { validateHref } from '../../services/security/href_validator';
18
19
  import { EuiInnerText } from '../inner_text';
19
20
  import { EuiIcon } from '../icon';
20
- import { validateHref } from '../../services/security/href_validator';
21
21
  import { getTextColor, getColorContrast, getIsValidColor } from './color_utils';
22
22
  import { euiBadgeStyles } from './badge.styles';
23
23
  import { jsx as ___EmotionJSX } from "@emotion/react";
@@ -42,10 +42,10 @@ export var EuiBadge = function EuiBadge(_ref) {
42
42
  target = _ref.target,
43
43
  style = _ref.style,
44
44
  rest = _objectWithoutProperties(_ref, _excluded);
45
- var euiTheme = useEuiTheme();
46
45
  var isHrefValid = !href || validateHref(href);
47
46
  var isDisabled = _isDisabled || !isHrefValid;
48
47
  var isNamedColor = COLORS.includes(color);
48
+ var euiTheme = useEuiTheme();
49
49
  var customColorStyles = useMemo(function () {
50
50
  // Named colors set their styles via Emotion CSS and not inline styles
51
51
  if (isNamedColor) return style;
@@ -70,7 +70,7 @@ export var EuiBadge = function EuiBadge(_ref) {
70
70
  }
71
71
  }
72
72
  }, [color, isNamedColor, style, euiTheme]);
73
- var styles = euiBadgeStyles(euiTheme);
73
+ var styles = useEuiMemoizedStyles(euiBadgeStyles);
74
74
  var cssStyles = [styles.euiBadge, isNamedColor && styles[color], (onClick || href) && !iconOnClick && styles.clickable, isDisabled && styles.disabled];
75
75
  var textCssStyles = [styles.text.euiBadge__text, (onClick || href) && !isDisabled && styles.text.clickable];
76
76
  var iconCssStyles = [styles.icon.euiBadge__icon, styles.icon[iconSide]];
@@ -11,7 +11,7 @@ var _excluded = ["children", "className", "gutterSize"];
11
11
 
12
12
  import React, { forwardRef } from 'react';
13
13
  import classNames from 'classnames';
14
- import { useEuiTheme } from '../../../services';
14
+ import { useEuiMemoizedStyles } from '../../../services';
15
15
  import { euiBadgeGroupStyles } from './badge_group.styles';
16
16
  import { jsx as ___EmotionJSX } from "@emotion/react";
17
17
  export var GUTTER_SIZES = ['none', 'xs', 's'];
@@ -21,10 +21,9 @@ export var EuiBadgeGroup = /*#__PURE__*/forwardRef(function (_ref, ref) {
21
21
  _ref$gutterSize = _ref.gutterSize,
22
22
  gutterSize = _ref$gutterSize === void 0 ? 'xs' : _ref$gutterSize,
23
23
  rest = _objectWithoutProperties(_ref, _excluded);
24
- var euiTheme = useEuiTheme();
25
- var styles = euiBadgeGroupStyles(euiTheme);
26
- var cssStyles = [styles.euiBadgeGroup, styles[gutterSize]];
27
24
  var classes = classNames('euiBadgeGroup', className);
25
+ var styles = useEuiMemoizedStyles(euiBadgeGroupStyles);
26
+ var cssStyles = [styles.euiBadgeGroup, styles[gutterSize]];
28
27
  return ___EmotionJSX("div", _extends({
29
28
  css: cssStyles,
30
29
  className: classes,
@@ -12,7 +12,7 @@ var _excluded = ["className", "label", "color", "tooltipContent", "tooltipPositi
12
12
 
13
13
  import React from 'react';
14
14
  import classNames from 'classnames';
15
- import { getSecureRelForTarget, useEuiTheme } from '../../../services';
15
+ import { getSecureRelForTarget, useEuiMemoizedStyles } from '../../../services';
16
16
  import { EuiToolTip } from '../../tool_tip';
17
17
  import { EuiIcon } from '../../icon';
18
18
  import { euiBetaBadgeStyles } from './beta_badge.styles';
@@ -46,11 +46,10 @@ export var EuiBetaBadge = function EuiBetaBadge(_ref) {
46
46
  _ref$alignment = _ref.alignment,
47
47
  alignment = _ref$alignment === void 0 ? 'baseline' : _ref$alignment,
48
48
  rest = _objectWithoutProperties(_ref, _excluded);
49
- var euiTheme = useEuiTheme();
50
49
  var singleLetter = !!(typeof label === 'string' && label.length === 1);
51
50
  var isCircular = iconType || singleLetter;
52
51
  var classes = classNames('euiBetaBadge', className);
53
- var styles = euiBetaBadgeStyles(euiTheme);
52
+ var styles = useEuiMemoizedStyles(euiBetaBadgeStyles);
54
53
  var cssStyles = [styles.euiBetaBadge, styles[color], styles[size], styles[alignment], isCircular ? styles.badgeSizes.circle[size] : styles.badgeSizes.default[size]];
55
54
  var icon;
56
55
  if (iconType) {