@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,8 @@ function _EMOTION_STRINGIFIED_CSS_ERROR__() { return "You have tried to stringif
11
11
 
12
12
  import { css, keyframes } from '@emotion/react';
13
13
  import { euiPaletteColorBlind, shadeOrTint } from '../../services';
14
- import { euiCanAnimate, logicalCSS } from '../../global_styling';
14
+ import { euiCanAnimate, euiCantAnimate, logicalCSS } from '../../global_styling';
15
+ var nonMonoColors = euiPaletteColorBlind();
15
16
  var _ref = process.env.NODE_ENV === "production" ? {
16
17
  name: "yovxj7-euiLoadingChart",
17
18
  styles: "overflow:hidden;display:inline-flex;label:euiLoadingChart;"
@@ -29,19 +30,36 @@ export var euiLoadingChartStyles = function euiLoadingChartStyles(_ref2) {
29
30
  xl: /*#__PURE__*/css(logicalCSS('height', euiTheme.size.xl), " gap:", euiTheme.size.xs, ";;label:xl;")
30
31
  };
31
32
  };
33
+ export var BARS_COUNT = 4;
32
34
  export var euiLoadingChartBarStyles = function euiLoadingChartBarStyles(_ref3) {
33
- var euiTheme = _ref3.euiTheme;
35
+ var euiTheme = _ref3.euiTheme,
36
+ colorMode = _ref3.colorMode;
34
37
  return {
35
- euiLoadingChart__bar: /*#__PURE__*/css(logicalCSS('height', '100%'), " display:inline-block;;label:euiLoadingChart__bar;"),
38
+ euiLoadingChart__bar: /*#__PURE__*/css(logicalCSS('height', '100%'), " display:inline-block;", euiCanAnimate, "{animation:", barAnimation, " 1s infinite;", outputNthChildCss(function (index) {
39
+ return "animation-delay: 0.".concat(index, "s;");
40
+ }), ";}", euiCantAnimate, "{", outputNthChildCss(function (index) {
41
+ return "transform: translateY(".concat(22 * index, "%);");
42
+ }), ";};label:euiLoadingChart__bar;"),
43
+ nonmono: /*#__PURE__*/css(outputNthChildCss(function (index) {
44
+ return "background-color: ".concat(nonMonoColors[index]);
45
+ }), ";;label:nonmono;"),
46
+ mono: /*#__PURE__*/css(outputNthChildCss(function (index) {
47
+ return "background-color: ".concat(shadeOrTint(euiTheme.colors.lightShade, index * 0.04, colorMode));
48
+ }), ";;label:mono;"),
36
49
  m: /*#__PURE__*/css(logicalCSS('width', euiTheme.size.xxs), " ", logicalCSS('margin-bottom', euiTheme.size.s), ";;label:m;"),
37
50
  l: /*#__PURE__*/css(logicalCSS('width', euiTheme.size.xs), " ", logicalCSS('margin-bottom', euiTheme.size.m), ";;label:l;"),
38
51
  xl: /*#__PURE__*/css(logicalCSS('width', euiTheme.size.s), " ", logicalCSS('margin-bottom', euiTheme.size.base), ";;label:xl;")
39
52
  };
40
53
  };
41
- var barAnimation = 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"])));
42
- export var _barIndex = function _barIndex(index, mono, _ref4) {
43
- var euiTheme = _ref4.euiTheme,
44
- colorMode = _ref4.colorMode;
45
- var backgroundColor = mono ? shadeOrTint(euiTheme.colors.lightShade, index * 0.04, colorMode) : euiPaletteColorBlind()[index];
46
- return /*#__PURE__*/css("background-color:", backgroundColor, ";transform:translateY(", 22 * index, "%);", euiCanAnimate, "{animation:", barAnimation, " 1s ", ".".concat(index, "s"), " infinite;}");
47
- };
54
+
55
+ /**
56
+ * Small utility helper for generating nth-child CSS for each bar
57
+ */
58
+ var outputNthChildCss = function outputNthChildCss(css) {
59
+ return Array.from({
60
+ length: BARS_COUNT
61
+ }, function (_, index) {
62
+ return "\n &:nth-child(".concat(index + 1, ") {\n ").concat(css(index), "\n }");
63
+ }).join();
64
+ };
65
+ var barAnimation = 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"])));
@@ -13,7 +13,7 @@ import React from 'react';
13
13
  import classNames from 'classnames';
14
14
  import { EuiIcon } from '../icon';
15
15
  import { useLoadingAriaLabel } from './_loading_strings';
16
- import { euiLoadingElasticStyles } from './loading_elastic.styles';
16
+ import { euiLoadingElasticStyles as styles } from './loading_elastic.styles';
17
17
  import { jsx as ___EmotionJSX } from "@emotion/react";
18
18
  export var SIZES = ['m', 'l', 'xl', 'xxl'];
19
19
  export var EuiLoadingElastic = function EuiLoadingElastic(_ref) {
@@ -22,13 +22,11 @@ export var EuiLoadingElastic = function EuiLoadingElastic(_ref) {
22
22
  className = _ref.className,
23
23
  ariaLabel = _ref['aria-label'],
24
24
  rest = _objectWithoutProperties(_ref, _excluded);
25
- var styles = euiLoadingElasticStyles();
26
- var cssStyles = [styles.euiLoadingElastic];
27
- var defaultLabel = useLoadingAriaLabel();
28
25
  var classes = classNames('euiLoadingElastic', className);
26
+ var defaultLabel = useLoadingAriaLabel();
29
27
  return ___EmotionJSX("span", _extends({
30
28
  className: classes,
31
- css: cssStyles,
29
+ css: styles.euiLoadingElastic,
32
30
  role: "progressbar",
33
31
  "aria-label": ariaLabel || defaultLabel
34
32
  }, rest), ___EmotionJSX(EuiIcon, {
@@ -11,8 +11,6 @@ var _templateObject;
11
11
  import { css, keyframes } from '@emotion/react';
12
12
  import { euiCanAnimate } from '../../global_styling';
13
13
  var loadingElastic = 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"])));
14
- export var euiLoadingElasticStyles = function euiLoadingElasticStyles() {
15
- return {
16
- euiLoadingElastic: /*#__PURE__*/css("position:relative;display:inline-block;& path{", 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;")
17
- };
14
+ export var euiLoadingElasticStyles = {
15
+ euiLoadingElastic: /*#__PURE__*/css("position:relative;display:inline-block;& path{", 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;")
18
16
  };
@@ -11,10 +11,10 @@ var _excluded = ["size", "logo", "aria-label", "className"];
11
11
 
12
12
  import React from 'react';
13
13
  import classNames from 'classnames';
14
+ import { useEuiMemoizedStyles } from '../../services';
14
15
  import { EuiIcon } from '../icon';
15
- import { useEuiTheme } from '../../services';
16
16
  import { useLoadingAriaLabel } from './_loading_strings';
17
- import { euiLoadingLogoStyles, euiLoadingLogoIconStyles } from './loading_logo.styles';
17
+ import { euiLoadingLogoStyles } from './loading_logo.styles';
18
18
  import { jsx as ___EmotionJSX } from "@emotion/react";
19
19
  export var SIZES = ['m', 'l', 'xl'];
20
20
  export var EuiLoadingLogo = function EuiLoadingLogo(_ref) {
@@ -25,20 +25,17 @@ export var EuiLoadingLogo = function EuiLoadingLogo(_ref) {
25
25
  ariaLabel = _ref['aria-label'],
26
26
  className = _ref.className,
27
27
  rest = _objectWithoutProperties(_ref, _excluded);
28
- var euiTheme = useEuiTheme();
29
- var defaultLabel = useLoadingAriaLabel();
30
- var styles = euiLoadingLogoStyles(euiTheme);
31
- var cssStyles = [styles.euiLoadingLogo, styles[size]];
32
- var iconStyles = euiLoadingLogoIconStyles(euiTheme);
33
- var iconCssStyles = [iconStyles.euiLoadingLogo__icon];
34
28
  var classes = classNames('euiLoadingLogo', className);
29
+ var styles = useEuiMemoizedStyles(euiLoadingLogoStyles);
30
+ var cssStyles = [styles.euiLoadingLogo, styles[size]];
31
+ var defaultLabel = useLoadingAriaLabel();
35
32
  return ___EmotionJSX("span", _extends({
36
33
  className: classes,
37
34
  css: cssStyles,
38
35
  role: "progressbar",
39
36
  "aria-label": ariaLabel || defaultLabel
40
37
  }, rest), ___EmotionJSX("span", {
41
- css: iconCssStyles
38
+ css: styles.euiLoadingLogo__icon
42
39
  }, ___EmotionJSX(EuiIcon, {
43
40
  type: logo,
44
41
  size: size
@@ -22,6 +22,7 @@ export var euiLoadingLogoStyles = function euiLoadingLogoStyles(_ref) {
22
22
  var euiTheme = _ref.euiTheme;
23
23
  return {
24
24
  euiLoadingLogo: /*#__PURE__*/css("position:relative;display:inline-block;", 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;"),
25
+ euiLoadingLogo__icon: /*#__PURE__*/css("display:inline-block;", euiCanAnimate, "{animation:1s ", loadingBounce, " ", euiTheme.animation.resistance, " infinite;};label:euiLoadingLogo__icon;"),
25
26
  /**
26
27
  * 1. Requires pixel math for animation
27
28
  * 2. Add a half the amount of animation distance padding to the top to give it more room
@@ -30,10 +31,4 @@ export var euiLoadingLogoStyles = function euiLoadingLogoStyles(_ref) {
30
31
  l: /*#__PURE__*/css(euiCanAnimate, "{padding-block-start:", euiTheme.size[loadingPadding.l], ";}&::before,&::after{block-size:", euiTheme.base * 0.375, "px;inset-block-end:-", euiTheme.size.s, ";};label:l;"),
31
32
  xl: /*#__PURE__*/css(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;")
32
33
  };
33
- };
34
- export var euiLoadingLogoIconStyles = function euiLoadingLogoIconStyles(_ref2) {
35
- var euiTheme = _ref2.euiTheme;
36
- return {
37
- euiLoadingLogo__icon: /*#__PURE__*/css("display:inline-block;", euiCanAnimate, "{animation:1s ", loadingBounce, " ", euiTheme.animation.resistance, " infinite;};label:euiLoadingLogo__icon;")
38
- };
39
34
  };
@@ -14,7 +14,7 @@ function _objectSpread(target) { for (var i = 1; i < arguments.length; i++) { va
14
14
 
15
15
  import React from 'react';
16
16
  import classNames from 'classnames';
17
- import { useEuiTheme } from '../..//services';
17
+ import { useEuiTheme, useEuiMemoizedStyles } from '../../services';
18
18
  import { useLoadingAriaLabel } from './_loading_strings';
19
19
  import { euiLoadingSpinnerStyles, euiSpinnerBorderColorsCSS } from './loading_spinner.styles';
20
20
  import { jsx as ___EmotionJSX } from "@emotion/react";
@@ -27,14 +27,14 @@ export var EuiLoadingSpinner = function EuiLoadingSpinner(_ref) {
27
27
  color = _ref.color,
28
28
  style = _ref.style,
29
29
  rest = _objectWithoutProperties(_ref, _excluded);
30
- var euiTheme = useEuiTheme();
31
- var styles = euiLoadingSpinnerStyles(euiTheme);
32
- var cssStyles = [styles.euiLoadingSpinner, styles[size]];
33
30
  var classes = classNames('euiLoadingSpinner', className);
34
- var defaultLabel = useLoadingAriaLabel();
31
+ var styles = useEuiMemoizedStyles(euiLoadingSpinnerStyles);
32
+ var cssStyles = [styles.euiLoadingSpinner, styles[size]];
33
+ var euiTheme = useEuiTheme();
35
34
  var customColorStyle = color ? _objectSpread(_objectSpread({}, style), {}, {
36
35
  borderColor: euiSpinnerBorderColorsCSS(euiTheme, color)
37
36
  }) : style;
37
+ var defaultLabel = useLoadingAriaLabel();
38
38
  return ___EmotionJSX("span", _extends({
39
39
  className: classes,
40
40
  css: cssStyles,
@@ -30,11 +30,10 @@ export var EuiResizableCollapseButton = function EuiResizableCollapseButton(_ref
30
30
  rest = _objectWithoutProperties(_ref, _excluded);
31
31
  var isHorizontal = direction === 'horizontal';
32
32
  var showOnFocus = !isCollapsed && !isVisible;
33
- var screenReaderOnlyStyles = euiScreenReaderOnlyStyles(showOnFocus).euiScreenReaderOnly;
34
33
  var styles = useEuiMemoizedStyles(euiResizableCollapseButtonStyles);
35
34
  var collapsedStyles = [styles.collapsed.collapsed, styles.collapsed[direction], styles.collapsed["".concat(direction, "Positions")][internalPosition]];
36
35
  var collapsibleStyles = [styles.collapsible.collapsible, styles.collapsible[direction][externalPosition], styles.collapsible[direction][internalPosition]];
37
- var cssStyles = [styles.euiResizableCollapseButton, showOnFocus && screenReaderOnlyStyles].concat(_toConsumableArray(isCollapsed ? collapsedStyles : collapsibleStyles));
36
+ var cssStyles = [styles.euiResizableCollapseButton, showOnFocus && euiScreenReaderOnlyStyles['euiScreenReaderOnly-showOnFocus']].concat(_toConsumableArray(isCollapsed ? collapsedStyles : collapsibleStyles));
38
37
  var COLLAPSED_ICON = '';
39
38
  var NOT_COLLAPSED_ICON = '';
40
39
  switch (externalPosition) {
@@ -11,7 +11,7 @@ var _excluded = ["isSelected", "children", "className", "disabled", "href", "tar
11
11
 
12
12
  import React, { useContext } from 'react';
13
13
  import classNames from 'classnames';
14
- import { getSecureRelForTarget, useEuiTheme } from '../../services';
14
+ import { getSecureRelForTarget, useEuiMemoizedStyles } from '../../services';
15
15
  import { validateHref } from '../../services/security/href_validator';
16
16
  import { euiTabStyles, euiTabContentStyles } from './tab.styles';
17
17
  import { EuiTabsContext } from './tabs_context';
@@ -30,7 +30,6 @@ export var EuiTab = function EuiTab(_ref) {
30
30
  var _useContext = useContext(EuiTabsContext),
31
31
  size = _useContext.size,
32
32
  expand = _useContext.expand;
33
- var euiTheme = useEuiTheme();
34
33
  var isHrefValid = !href || validateHref(href);
35
34
  var disabled = _disabled || !isHrefValid;
36
35
 
@@ -38,9 +37,9 @@ export var EuiTab = function EuiTab(_ref) {
38
37
  var classes = classNames('euiTab', className, {
39
38
  'euiTab-isSelected': isSelected
40
39
  });
41
- var tabStyles = euiTabStyles(euiTheme);
40
+ var tabStyles = useEuiMemoizedStyles(euiTabStyles);
42
41
  var cssTabStyles = [tabStyles.euiTab, expand && tabStyles.expanded, disabled && tabStyles.disabled.disabled, isSelected && (disabled ? tabStyles.disabled.selected : tabStyles.selected)];
43
- var tabContentStyles = euiTabContentStyles(euiTheme);
42
+ var tabContentStyles = useEuiMemoizedStyles(euiTabContentStyles);
44
43
  var cssTabContentStyles = [tabContentStyles.euiTab__content, size && tabContentStyles[size]];
45
44
  var prependNode = prepend && ___EmotionJSX("span", {
46
45
  className: "euiTab__prepend"
@@ -11,7 +11,7 @@ var _excluded = ["children", "className", "bottomBorder", "expand", "size"];
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 { euiTabsStyles } from './tabs.styles';
16
16
  import { EuiTabsContext } from './tabs_context';
17
17
  import { jsx as ___EmotionJSX } from "@emotion/react";
@@ -26,9 +26,8 @@ export var EuiTabs = /*#__PURE__*/forwardRef(function (_ref, ref) {
26
26
  _ref$size = _ref.size,
27
27
  size = _ref$size === void 0 ? 'm' : _ref$size,
28
28
  rest = _objectWithoutProperties(_ref, _excluded);
29
- var euiTheme = useEuiTheme();
30
29
  var classes = classNames('euiTabs', className);
31
- var styles = euiTabsStyles(euiTheme);
30
+ var styles = useEuiMemoizedStyles(euiTabsStyles);
32
31
  var cssStyles = [styles.euiTabs, styles[size], bottomBorder && styles.bottomBorder];
33
32
  return ___EmotionJSX("div", _extends({
34
33
  ref: ref,
@@ -5,6 +5,7 @@ Object.defineProperty(exports, "__esModule", {
5
5
  value: true
6
6
  });
7
7
  exports.EuiScreenReaderOnly = void 0;
8
+ var _react = require("react");
8
9
  var _classnames = _interopRequireDefault(require("classnames"));
9
10
  var _services = require("../../../services");
10
11
  var _screen_reader_only = require("./screen_reader_only.styles");
@@ -21,12 +22,12 @@ var EuiScreenReaderOnly = function EuiScreenReaderOnly(_ref) {
21
22
  className = _ref.className,
22
23
  showOnFocus = _ref.showOnFocus;
23
24
  var classes = (0, _classnames.default)(className, children.props.className);
24
- var styles = (0, _screen_reader_only.euiScreenReaderOnlyStyles)(showOnFocus);
25
- var cssStyles = [styles.euiScreenReaderOnly];
26
- var props = {
27
- className: classes.length ? classes : undefined,
28
- css: cssStyles
29
- };
25
+ var props = (0, _react.useMemo)(function () {
26
+ return {
27
+ className: classes.length ? classes : undefined,
28
+ css: showOnFocus ? _screen_reader_only.euiScreenReaderOnlyStyles['euiScreenReaderOnly-showOnFocus'] : _screen_reader_only.euiScreenReaderOnlyStyles.euiScreenReaderOnly
29
+ };
30
+ }, [classes, showOnFocus]);
30
31
  return (0, _services.cloneElementWithCss)(children, props);
31
32
  };
32
33
  exports.EuiScreenReaderOnly = EuiScreenReaderOnly;
@@ -26,9 +26,8 @@ var euiScreenReaderOnly = function euiScreenReaderOnly() {
26
26
  * Styles
27
27
  */
28
28
  exports.euiScreenReaderOnly = euiScreenReaderOnly;
29
- var euiScreenReaderOnlyStyles = function euiScreenReaderOnlyStyles(showOnFocus) {
30
- return {
31
- euiScreenReaderOnly: showOnFocus ? /*#__PURE__*/(0, _react.css)("&:not(:focus, :active, :focus-within){", euiScreenReaderOnly(), ";};label:euiScreenReaderOnly;") : /*#__PURE__*/(0, _react.css)(euiScreenReaderOnly(), ";label:euiScreenReaderOnly;")
32
- };
29
+ var euiScreenReaderOnlyStyles = {
30
+ euiScreenReaderOnly: /*#__PURE__*/(0, _react.css)(euiScreenReaderOnly(), ";label:euiScreenReaderOnly;"),
31
+ 'euiScreenReaderOnly-showOnFocus': /*#__PURE__*/(0, _react.css)("&:not(:focus, :active, :focus-within){", euiScreenReaderOnly(), ";};label:euiScreenReaderOnly-showOnFocus;")
33
32
  };
34
33
  exports.euiScreenReaderOnlyStyles = euiScreenReaderOnlyStyles;
@@ -40,9 +40,8 @@ var EuiSkipLink = function EuiSkipLink(_ref) {
40
40
  className = _ref.className,
41
41
  _onClick = _ref.onClick,
42
42
  rest = (0, _objectWithoutProperties2.default)(_ref, _excluded);
43
- var euiTheme = (0, _services.useEuiTheme)();
44
- var styles = (0, _skip_link.euiSkipLinkStyles)(euiTheme);
45
43
  var classes = (0, _classnames.default)('euiSkipLink', className);
44
+ var styles = (0, _services.useEuiMemoizedStyles)(_skip_link.euiSkipLinkStyles);
46
45
  var cssStyles = [styles.euiSkipLink, position !== 'static' ? styles[position] : undefined];
47
46
  var onClick = (0, _react.useCallback)(function (e) {
48
47
  var destinationEl = null;
@@ -1,15 +1,17 @@
1
1
  "use strict";
2
2
 
3
3
  var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefault");
4
+ var _typeof = require("@babel/runtime/helpers/typeof");
4
5
  Object.defineProperty(exports, "__esModule", {
5
6
  value: true
6
7
  });
7
8
  exports.EuiAspectRatio = void 0;
8
9
  var _defineProperty2 = _interopRequireDefault(require("@babel/runtime/helpers/defineProperty"));
9
10
  var _objectWithoutProperties2 = _interopRequireDefault(require("@babel/runtime/helpers/objectWithoutProperties"));
10
- var _react = _interopRequireDefault(require("react"));
11
+ var _react = _interopRequireWildcard(require("react"));
11
12
  var _classnames = _interopRequireDefault(require("classnames"));
12
- var _excluded = ["children", "className", "height", "width", "maxWidth", "style"];
13
+ var _global_styling = require("../../global_styling");
14
+ var _excluded = ["children", "className", "style", "height", "width", "maxWidth"];
13
15
  /*
14
16
  * Copyright Elasticsearch B.V. and/or licensed to Elasticsearch B.V. under one
15
17
  * or more contributor license agreements. Licensed under the Elastic License
@@ -17,27 +19,30 @@ var _excluded = ["children", "className", "height", "width", "maxWidth", "style"
17
19
  * in compliance with, at your election, the Elastic License 2.0 or the Server
18
20
  * Side Public License, v 1.
19
21
  */
22
+ function _getRequireWildcardCache(nodeInterop) { if (typeof WeakMap !== "function") return null; var cacheBabelInterop = new WeakMap(); var cacheNodeInterop = new WeakMap(); return (_getRequireWildcardCache = function _getRequireWildcardCache(nodeInterop) { return nodeInterop ? cacheNodeInterop : cacheBabelInterop; })(nodeInterop); }
23
+ function _interopRequireWildcard(obj, nodeInterop) { if (!nodeInterop && obj && obj.__esModule) { return obj; } if (obj === null || _typeof(obj) !== "object" && typeof obj !== "function") { return { default: obj }; } var cache = _getRequireWildcardCache(nodeInterop); if (cache && cache.has(obj)) { return cache.get(obj); } var newObj = {}; var hasPropertyDescriptor = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var key in obj) { if (key !== "default" && Object.prototype.hasOwnProperty.call(obj, key)) { var desc = hasPropertyDescriptor ? Object.getOwnPropertyDescriptor(obj, key) : null; if (desc && (desc.get || desc.set)) { Object.defineProperty(newObj, key, desc); } else { newObj[key] = obj[key]; } } } newObj.default = obj; if (cache) { cache.set(obj, newObj); } return newObj; }
20
24
  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; }
21
25
  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) { (0, _defineProperty2.default)(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; }
22
26
  var EuiAspectRatio = function EuiAspectRatio(_ref) {
23
27
  var children = _ref.children,
24
28
  className = _ref.className,
29
+ style = _ref.style,
25
30
  height = _ref.height,
26
31
  width = _ref.width,
27
32
  maxWidth = _ref.maxWidth,
28
- style = _ref.style,
29
33
  rest = (0, _objectWithoutProperties2.default)(_ref, _excluded);
30
- var classes = (0, _classnames.default)('euiAspectRatio', className);
31
- var euiAspectRatioStyle = _objectSpread(_objectSpread({}, children.props.style), {}, {
32
- aspectRatio: "".concat(width, " / ").concat(height),
33
- height: 'auto',
34
- width: '100%',
35
- maxWidth: maxWidth
36
- }, style);
37
- var props = _objectSpread({
34
+ var classes = (0, _classnames.default)('euiAspectRatio', className, children.props.className);
35
+ var euiAspectRatioStyle = (0, _react.useMemo)(function () {
36
+ return (0, _global_styling.logicalStyles)({
37
+ aspectRatio: "".concat(width, " / ").concat(height),
38
+ height: 'auto',
39
+ width: '100%',
40
+ maxWidth: maxWidth
41
+ });
42
+ }, [height, width, maxWidth]);
43
+ return /*#__PURE__*/_react.default.cloneElement(children, _objectSpread(_objectSpread({}, rest), {}, {
38
44
  className: classes,
39
- style: euiAspectRatioStyle
40
- }, rest);
41
- return /*#__PURE__*/_react.default.cloneElement(children, props);
45
+ style: _objectSpread(_objectSpread(_objectSpread({}, children.props.style), euiAspectRatioStyle), style)
46
+ }));
42
47
  };
43
48
  exports.EuiAspectRatio = EuiAspectRatio;
@@ -1,6 +1,7 @@
1
1
  "use strict";
2
2
 
3
3
  var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefault");
4
+ var _typeof = require("@babel/runtime/helpers/typeof");
4
5
  Object.defineProperty(exports, "__esModule", {
5
6
  value: true
6
7
  });
@@ -9,7 +10,7 @@ var _extends2 = _interopRequireDefault(require("@babel/runtime/helpers/extends")
9
10
  var _toConsumableArray2 = _interopRequireDefault(require("@babel/runtime/helpers/toConsumableArray"));
10
11
  var _defineProperty2 = _interopRequireDefault(require("@babel/runtime/helpers/defineProperty"));
11
12
  var _objectWithoutProperties2 = _interopRequireDefault(require("@babel/runtime/helpers/objectWithoutProperties"));
12
- var _react = _interopRequireDefault(require("react"));
13
+ var _react = _interopRequireWildcard(require("react"));
13
14
  var _classnames = _interopRequireDefault(require("classnames"));
14
15
  var _color = require("../../services/color");
15
16
  var _services = require("../../services");
@@ -25,8 +26,11 @@ var _excluded = ["className", "color", "imageUrl", "initials", "initialsLength",
25
26
  * in compliance with, at your election, the Elastic License 2.0 or the Server
26
27
  * Side Public License, v 1.
27
28
  */
29
+ function _getRequireWildcardCache(nodeInterop) { if (typeof WeakMap !== "function") return null; var cacheBabelInterop = new WeakMap(); var cacheNodeInterop = new WeakMap(); return (_getRequireWildcardCache = function _getRequireWildcardCache(nodeInterop) { return nodeInterop ? cacheNodeInterop : cacheBabelInterop; })(nodeInterop); }
30
+ function _interopRequireWildcard(obj, nodeInterop) { if (!nodeInterop && obj && obj.__esModule) { return obj; } if (obj === null || _typeof(obj) !== "object" && typeof obj !== "function") { return { default: obj }; } var cache = _getRequireWildcardCache(nodeInterop); if (cache && cache.has(obj)) { return cache.get(obj); } var newObj = {}; var hasPropertyDescriptor = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var key in obj) { if (key !== "default" && Object.prototype.hasOwnProperty.call(obj, key)) { var desc = hasPropertyDescriptor ? Object.getOwnPropertyDescriptor(obj, key) : null; if (desc && (desc.get || desc.set)) { Object.defineProperty(newObj, key, desc); } else { newObj[key] = obj[key]; } } } newObj.default = obj; if (cache) { cache.set(obj, newObj); } return newObj; }
28
31
  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; }
29
32
  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) { (0, _defineProperty2.default)(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; }
33
+ var visColors = (0, _services.euiPaletteColorBlindBehindText)();
30
34
  var SIZES = ['s', 'm', 'l', 'xl'];
31
35
  exports.SIZES = SIZES;
32
36
  var TYPES = ['space', 'user'];
@@ -57,57 +61,55 @@ var EuiAvatar = function EuiAvatar(_ref) {
57
61
  isDisabled = _ref$isDisabled === void 0 ? false : _ref$isDisabled,
58
62
  style = _ref.style,
59
63
  props = (0, _objectWithoutProperties2.default)(_ref, _excluded);
64
+ checkValidInitials(initials);
60
65
  var _props$casing = props.casing,
61
66
  casing = _props$casing === void 0 ? type === 'space' ? 'none' : 'uppercase' : _props$casing,
62
67
  rest = (0, _objectWithoutProperties2.default)(props, _excluded2);
63
- var euiTheme = (0, _services.useEuiTheme)();
64
- var styles = (0, _avatar.euiAvatarStyles)(euiTheme);
65
- var visColors = (0, _services.euiPaletteColorBlindBehindText)();
66
68
  var isPlain = color === 'plain';
67
69
  var isSubdued = color === 'subdued';
70
+ var isNamedColor = isPlain || isSubdued || color === null;
68
71
  var classes = (0, _classnames.default)('euiAvatar', (_classNames = {}, (0, _defineProperty2.default)(_classNames, "euiAvatar--".concat(size), size), (0, _defineProperty2.default)(_classNames, "euiAvatar--".concat(type), type), (0, _defineProperty2.default)(_classNames, 'euiAvatar-isDisabled', isDisabled), _classNames), className);
72
+ var styles = (0, _services.useEuiMemoizedStyles)(_avatar.euiAvatarStyles);
69
73
  var cssStyles = [styles.euiAvatar, styles[type], styles[size], styles[casing], isPlain && styles.plain, isSubdued && styles.subdued, isDisabled && styles.isDisabled];
70
- checkValidInitials(initials);
71
- var avatarStyle = _objectSpread({}, style);
72
- var iconCustomColor = iconColor;
73
- var isNamedColor = color === 'plain' || color === 'subdued' || color === null;
74
- if (!isNamedColor) {
75
- checkValidColor(color);
76
- var assignedColor = color || visColors[Math.floor(name.length % visColors.length)];
77
- var textColor = _color.isColorDark.apply(void 0, (0, _toConsumableArray2.default)((0, _color.hexToRgb)(assignedColor))) ? '#FFFFFF' : '#000000';
78
- avatarStyle.backgroundColor = assignedColor;
79
- avatarStyle.color = textColor;
80
-
81
- // Allow consumers to let the icons keep their default color (like app icons)
82
- // when passing `iconColor = null`, otherwise continue to pass on `iconColor` or adjust with textColor
83
- iconCustomColor = iconColor || iconColor === null ? iconColor : textColor;
84
- }
85
- if (imageUrl) {
86
- avatarStyle.backgroundImage = "url(".concat(imageUrl, ")");
87
- }
88
- var content;
89
- if (!imageUrl && !iconType) {
90
- // Create the initials
91
- var calculatedInitials = (0, _services.toInitials)(name, initialsLength, initials);
92
- content = (0, _react2.jsx)("span", {
93
- "aria-hidden": "true"
94
- }, calculatedInitials);
95
- } else if (iconType) {
96
- content = (0, _react2.jsx)(_icon.EuiIcon, {
97
- className: "euiAvatar__icon",
98
- size: iconSize || size,
99
- type: iconType,
100
- color: iconCustomColor === null ? undefined : iconCustomColor
101
- });
102
- }
74
+ var avatarStyle = (0, _react.useMemo)(function () {
75
+ if (imageUrl) {
76
+ return {
77
+ backgroundImage: "url(".concat(imageUrl, ")")
78
+ };
79
+ }
80
+ if (!isNamedColor) {
81
+ checkValidColor(color);
82
+ var assignedColor = color || visColors[Math.floor(name.length % visColors.length)];
83
+ var textColor = _color.isColorDark.apply(void 0, (0, _toConsumableArray2.default)((0, _color.hexToRgb)(assignedColor))) ? '#FFFFFF' : '#000000';
84
+ return {
85
+ backgroundColor: assignedColor,
86
+ color: textColor
87
+ };
88
+ }
89
+ }, [imageUrl, color, isNamedColor, name.length]);
90
+ var iconCustomColor = (0, _react.useMemo)(function () {
91
+ // `null` allows icons to keep their default color (e.g. app icons)
92
+ if (iconColor === null) return undefined;
93
+ // Otherwise continue to pass on `iconColor`
94
+ if (iconColor) return iconColor;
95
+ // Fall back to the adjusted text color if it exists
96
+ return avatarStyle === null || avatarStyle === void 0 ? void 0 : avatarStyle.color;
97
+ }, [iconColor, avatarStyle === null || avatarStyle === void 0 ? void 0 : avatarStyle.color]);
103
98
  return (0, _react2.jsx)("div", (0, _extends2.default)({
104
99
  css: cssStyles,
105
100
  className: classes,
106
- style: avatarStyle,
101
+ style: _objectSpread(_objectSpread({}, style), avatarStyle),
107
102
  "aria-label": isDisabled ? undefined : name,
108
103
  role: isDisabled ? 'presentation' : 'img',
109
104
  title: name
110
- }, rest), content);
105
+ }, rest), !imageUrl && (iconType ? (0, _react2.jsx)(_icon.EuiIcon, {
106
+ className: "euiAvatar__icon",
107
+ size: iconSize || size,
108
+ type: iconType,
109
+ color: iconCustomColor
110
+ }) : (0, _react2.jsx)("span", {
111
+ "aria-hidden": "true"
112
+ }, (0, _services.toInitials)(name, initialsLength, initials))));
111
113
  };
112
114
 
113
115
  // TODO: Migrate to a service
@@ -70,7 +70,7 @@ var euiAvatarStyles = function euiAvatarStyles(_ref8) {
70
70
  var euiTheme = _ref8.euiTheme;
71
71
  return {
72
72
  // Base
73
- euiAvatar: /*#__PURE__*/(0, _react.css)("flex-shrink:0;display:inline-flex;justify-content:center;align-items:center;vertical-align:middle;background-size:cover;", (0, _global_styling.logicalTextAlignCSS)('center'), " ", (0, _global_styling.logicalCSS)('overflow-x', 'hidden'), "font-weight:", euiTheme.font.weight.medium, ";;label:euiAvatar;"),
73
+ euiAvatar: /*#__PURE__*/(0, _react.css)("flex-shrink:0;display:inline-flex;justify-content:center;align-items:center;vertical-align:middle;background-size:cover;background-color:", euiTheme.colors.lightShade, ";", (0, _global_styling.logicalTextAlignCSS)('center'), " ", (0, _global_styling.logicalCSS)('overflow-x', 'hidden'), "font-weight:", euiTheme.font.weight.medium, ";;label:euiAvatar;"),
74
74
  // Variants
75
75
  plain: /*#__PURE__*/(0, _react.css)("background-color:", euiTheme.colors.emptyShade, ";;label:plain;"),
76
76
  subdued: /*#__PURE__*/(0, _react.css)("background-color:", euiTheme.colors.lightestShade, ";;label:subdued;"),
@@ -12,9 +12,9 @@ var _objectWithoutProperties2 = _interopRequireDefault(require("@babel/runtime/h
12
12
  var _react = _interopRequireWildcard(require("react"));
13
13
  var _classnames = _interopRequireDefault(require("classnames"));
14
14
  var _services = require("../../services");
15
+ var _href_validator = require("../../services/security/href_validator");
15
16
  var _inner_text = require("../inner_text");
16
17
  var _icon = require("../icon");
17
- var _href_validator = require("../../services/security/href_validator");
18
18
  var _color_utils = require("./color_utils");
19
19
  var _badge = require("./badge.styles");
20
20
  var _react2 = require("@emotion/react");
@@ -53,10 +53,10 @@ var EuiBadge = function EuiBadge(_ref) {
53
53
  target = _ref.target,
54
54
  style = _ref.style,
55
55
  rest = (0, _objectWithoutProperties2.default)(_ref, _excluded);
56
- var euiTheme = (0, _services.useEuiTheme)();
57
56
  var isHrefValid = !href || (0, _href_validator.validateHref)(href);
58
57
  var isDisabled = _isDisabled || !isHrefValid;
59
58
  var isNamedColor = COLORS.includes(color);
59
+ var euiTheme = (0, _services.useEuiTheme)();
60
60
  var customColorStyles = (0, _react.useMemo)(function () {
61
61
  // Named colors set their styles via Emotion CSS and not inline styles
62
62
  if (isNamedColor) return style;
@@ -81,7 +81,7 @@ var EuiBadge = function EuiBadge(_ref) {
81
81
  }
82
82
  }
83
83
  }, [color, isNamedColor, style, euiTheme]);
84
- var styles = (0, _badge.euiBadgeStyles)(euiTheme);
84
+ var styles = (0, _services.useEuiMemoizedStyles)(_badge.euiBadgeStyles);
85
85
  var cssStyles = [styles.euiBadge, isNamedColor && styles[color], (onClick || href) && !iconOnClick && styles.clickable, isDisabled && styles.disabled];
86
86
  var textCssStyles = [styles.text.euiBadge__text, (onClick || href) && !isDisabled && styles.text.clickable];
87
87
  var iconCssStyles = [styles.icon.euiBadge__icon, styles.icon[iconSide]];
@@ -31,10 +31,9 @@ var EuiBadgeGroup = /*#__PURE__*/(0, _react.forwardRef)(function (_ref, ref) {
31
31
  _ref$gutterSize = _ref.gutterSize,
32
32
  gutterSize = _ref$gutterSize === void 0 ? 'xs' : _ref$gutterSize,
33
33
  rest = (0, _objectWithoutProperties2.default)(_ref, _excluded);
34
- var euiTheme = (0, _services.useEuiTheme)();
35
- var styles = (0, _badge_group.euiBadgeGroupStyles)(euiTheme);
36
- var cssStyles = [styles.euiBadgeGroup, styles[gutterSize]];
37
34
  var classes = (0, _classnames.default)('euiBadgeGroup', className);
35
+ var styles = (0, _services.useEuiMemoizedStyles)(_badge_group.euiBadgeGroupStyles);
36
+ var cssStyles = [styles.euiBadgeGroup, styles[gutterSize]];
38
37
  return (0, _react2.jsx)("div", (0, _extends2.default)({
39
38
  css: cssStyles,
40
39
  className: classes,
@@ -55,11 +55,10 @@ var EuiBetaBadge = function EuiBetaBadge(_ref) {
55
55
  _ref$alignment = _ref.alignment,
56
56
  alignment = _ref$alignment === void 0 ? 'baseline' : _ref$alignment,
57
57
  rest = (0, _objectWithoutProperties2.default)(_ref, _excluded);
58
- var euiTheme = (0, _services.useEuiTheme)();
59
58
  var singleLetter = !!(typeof label === 'string' && label.length === 1);
60
59
  var isCircular = iconType || singleLetter;
61
60
  var classes = (0, _classnames.default)('euiBetaBadge', className);
62
- var styles = (0, _beta_badge.euiBetaBadgeStyles)(euiTheme);
61
+ var styles = (0, _services.useEuiMemoizedStyles)(_beta_badge.euiBetaBadgeStyles);
63
62
  var cssStyles = [styles.euiBetaBadge, styles[color], styles[size], styles[alignment], isCircular ? styles.badgeSizes.circle[size] : styles.badgeSizes.default[size]];
64
63
  var icon;
65
64
  if (iconType) {
@@ -32,10 +32,9 @@ var EuiNotificationBadge = function EuiNotificationBadge(_ref) {
32
32
  _ref$color = _ref.color,
33
33
  color = _ref$color === void 0 ? 'accent' : _ref$color,
34
34
  rest = (0, _objectWithoutProperties2.default)(_ref, _excluded);
35
- var euiTheme = (0, _services.useEuiTheme)();
36
- var styles = (0, _badge_notification.euiNotificationBadgeStyles)(euiTheme);
37
- var cssStyles = [styles.euiNotificationBadge, styles[size], styles[color]];
38
35
  var classes = (0, _classnames.default)('euiNotificationBadge', className);
36
+ var styles = (0, _services.useEuiMemoizedStyles)(_badge_notification.euiNotificationBadgeStyles);
37
+ var cssStyles = [styles.euiNotificationBadge, styles[size], styles[color]];
39
38
  return (0, _react2.jsx)("span", (0, _extends2.default)({
40
39
  css: cssStyles,
41
40
  className: classes