@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
@@ -6,21 +6,22 @@
6
6
  * Side Public License, v 1.
7
7
  */
8
8
 
9
- import classNames from 'classnames';
9
+ import { useMemo } from 'react';
10
10
  import PropTypes from "prop-types";
11
+ import classNames from 'classnames';
11
12
  import { cloneElementWithCss } from '../../../services';
12
- import { euiScreenReaderOnlyStyles } from './screen_reader_only.styles';
13
+ import { euiScreenReaderOnlyStyles as styles } from './screen_reader_only.styles';
13
14
  export var EuiScreenReaderOnly = function EuiScreenReaderOnly(_ref) {
14
15
  var children = _ref.children,
15
16
  className = _ref.className,
16
17
  showOnFocus = _ref.showOnFocus;
17
18
  var classes = classNames(className, children.props.className);
18
- var styles = euiScreenReaderOnlyStyles(showOnFocus);
19
- var cssStyles = [styles.euiScreenReaderOnly];
20
- var props = {
21
- className: classes.length ? classes : undefined,
22
- css: cssStyles
23
- };
19
+ var props = useMemo(function () {
20
+ return {
21
+ className: classes.length ? classes : undefined,
22
+ css: showOnFocus ? styles['euiScreenReaderOnly-showOnFocus'] : styles.euiScreenReaderOnly
23
+ };
24
+ }, [classes, showOnFocus]);
24
25
  return cloneElementWithCss(children, props);
25
26
  };
26
27
  EuiScreenReaderOnly.propTypes = {
@@ -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
  };
@@ -14,7 +14,7 @@ import React, { useCallback } from 'react';
14
14
  import PropTypes from "prop-types";
15
15
  import classNames from 'classnames';
16
16
  import { isTabbable } from 'tabbable';
17
- import { useEuiTheme } from '../../../services';
17
+ import { useEuiMemoizedStyles } from '../../../services';
18
18
  import { EuiButton } from '../../button/button';
19
19
  import { EuiScreenReaderOnly } from '../screen_reader_only';
20
20
  import { euiSkipLinkStyles } from './skip_link.styles';
@@ -32,9 +32,8 @@ export var EuiSkipLink = function EuiSkipLink(_ref) {
32
32
  className = _ref.className,
33
33
  _onClick = _ref.onClick,
34
34
  rest = _objectWithoutProperties(_ref, _excluded);
35
- var euiTheme = useEuiTheme();
36
- var styles = euiSkipLinkStyles(euiTheme);
37
35
  var classes = classNames('euiSkipLink', className);
36
+ var styles = useEuiMemoizedStyles(euiSkipLinkStyles);
38
37
  var cssStyles = [styles.euiSkipLink, position !== 'static' ? styles[position] : undefined];
39
38
  var onClick = useCallback(function (e) {
40
39
  var destinationEl = null;
@@ -1,5 +1,5 @@
1
1
  function _typeof(obj) { "@babel/helpers - typeof"; return _typeof = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function (obj) { return typeof obj; } : function (obj) { return obj && "function" == typeof Symbol && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj; }, _typeof(obj); }
2
- var _excluded = ["children", "className", "height", "width", "maxWidth", "style"];
2
+ var _excluded = ["children", "className", "style", "height", "width", "maxWidth"];
3
3
  function ownKeys(object, enumerableOnly) { var keys = Object.keys(object); if (Object.getOwnPropertySymbols) { var symbols = Object.getOwnPropertySymbols(object); enumerableOnly && (symbols = symbols.filter(function (sym) { return Object.getOwnPropertyDescriptor(object, sym).enumerable; })), keys.push.apply(keys, symbols); } return keys; }
4
4
  function _objectSpread(target) { for (var i = 1; i < arguments.length; i++) { var source = null != arguments[i] ? arguments[i] : {}; i % 2 ? ownKeys(Object(source), !0).forEach(function (key) { _defineProperty(target, key, source[key]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(target, Object.getOwnPropertyDescriptors(source)) : ownKeys(Object(source)).forEach(function (key) { Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key)); }); } return target; }
5
5
  function _defineProperty(obj, key, value) { key = _toPropertyKey(key); if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; }
@@ -15,29 +15,31 @@ function _objectWithoutPropertiesLoose(source, excluded) { if (source == null) r
15
15
  * Side Public License, v 1.
16
16
  */
17
17
 
18
- import React from 'react';
18
+ import React, { useMemo } from 'react';
19
19
  import PropTypes from "prop-types";
20
20
  import classNames from 'classnames';
21
+ import { logicalStyles } from '../../global_styling';
21
22
  export var EuiAspectRatio = function EuiAspectRatio(_ref) {
22
23
  var children = _ref.children,
23
24
  className = _ref.className,
25
+ style = _ref.style,
24
26
  height = _ref.height,
25
27
  width = _ref.width,
26
28
  maxWidth = _ref.maxWidth,
27
- style = _ref.style,
28
29
  rest = _objectWithoutProperties(_ref, _excluded);
29
- var classes = classNames('euiAspectRatio', className);
30
- var euiAspectRatioStyle = _objectSpread(_objectSpread({}, children.props.style), {}, {
31
- aspectRatio: "".concat(width, " / ").concat(height),
32
- height: 'auto',
33
- width: '100%',
34
- maxWidth: maxWidth
35
- }, style);
36
- var props = _objectSpread({
30
+ var classes = classNames('euiAspectRatio', className, children.props.className);
31
+ var euiAspectRatioStyle = useMemo(function () {
32
+ return logicalStyles({
33
+ aspectRatio: "".concat(width, " / ").concat(height),
34
+ height: 'auto',
35
+ width: '100%',
36
+ maxWidth: maxWidth
37
+ });
38
+ }, [height, width, maxWidth]);
39
+ return /*#__PURE__*/React.cloneElement(children, _objectSpread(_objectSpread({}, rest), {}, {
37
40
  className: classes,
38
- style: euiAspectRatioStyle
39
- }, rest);
40
- return /*#__PURE__*/React.cloneElement(children, props);
41
+ style: _objectSpread(_objectSpread(_objectSpread({}, children.props.style), euiAspectRatioStyle), style)
42
+ }));
41
43
  };
42
44
  EuiAspectRatio.propTypes = {
43
45
  className: PropTypes.string,
@@ -2,14 +2,14 @@ function _typeof(obj) { "@babel/helpers - typeof"; return _typeof = "function" =
2
2
  var _excluded = ["className", "color", "imageUrl", "initials", "initialsLength", "iconType", "iconSize", "iconColor", "name", "size", "type", "isDisabled", "style"],
3
3
  _excluded2 = ["casing"];
4
4
  function _extends() { _extends = Object.assign ? Object.assign.bind() : function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; return _extends.apply(this, arguments); }
5
+ 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; }
6
+ function _objectSpread(target) { for (var i = 1; i < arguments.length; i++) { var source = null != arguments[i] ? arguments[i] : {}; i % 2 ? ownKeys(Object(source), !0).forEach(function (key) { _defineProperty(target, key, source[key]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(target, Object.getOwnPropertyDescriptors(source)) : ownKeys(Object(source)).forEach(function (key) { Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key)); }); } return target; }
5
7
  function _toConsumableArray(arr) { return _arrayWithoutHoles(arr) || _iterableToArray(arr) || _unsupportedIterableToArray(arr) || _nonIterableSpread(); }
6
8
  function _nonIterableSpread() { throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method."); }
7
9
  function _unsupportedIterableToArray(o, minLen) { if (!o) return; if (typeof o === "string") return _arrayLikeToArray(o, minLen); var n = Object.prototype.toString.call(o).slice(8, -1); if (n === "Object" && o.constructor) n = o.constructor.name; if (n === "Map" || n === "Set") return Array.from(o); if (n === "Arguments" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)) return _arrayLikeToArray(o, minLen); }
8
10
  function _iterableToArray(iter) { if (typeof Symbol !== "undefined" && iter[Symbol.iterator] != null || iter["@@iterator"] != null) return Array.from(iter); }
9
11
  function _arrayWithoutHoles(arr) { if (Array.isArray(arr)) return _arrayLikeToArray(arr); }
10
12
  function _arrayLikeToArray(arr, len) { if (len == null || len > arr.length) len = arr.length; for (var i = 0, arr2 = new Array(len); i < len; i++) arr2[i] = arr[i]; return arr2; }
11
- 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; }
12
- 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; }
13
13
  function _defineProperty(obj, key, value) { key = _toPropertyKey(key); if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; }
14
14
  function _toPropertyKey(arg) { var key = _toPrimitive(arg, "string"); return _typeof(key) === "symbol" ? key : String(key); }
15
15
  function _toPrimitive(input, hint) { if (_typeof(input) !== "object" || input === null) return input; var prim = input[Symbol.toPrimitive]; if (prim !== undefined) { var res = prim.call(input, hint || "default"); if (_typeof(res) !== "object") return res; throw new TypeError("@@toPrimitive must return a primitive value."); } return (hint === "string" ? String : Number)(input); }
@@ -23,14 +23,15 @@ function _objectWithoutPropertiesLoose(source, excluded) { if (source == null) r
23
23
  * Side Public License, v 1.
24
24
  */
25
25
 
26
- import React from 'react';
26
+ import React, { useMemo } from 'react';
27
27
  import PropTypes from "prop-types";
28
28
  import classNames from 'classnames';
29
29
  import { isColorDark, hexToRgb, isValidHex } from '../../services/color';
30
- import { euiPaletteColorBlindBehindText, toInitials, useEuiTheme } from '../../services';
30
+ import { euiPaletteColorBlindBehindText, toInitials, useEuiMemoizedStyles } from '../../services';
31
31
  import { EuiIcon } from '../icon';
32
32
  import { euiAvatarStyles } from './avatar.styles';
33
33
  import { jsx as ___EmotionJSX } from "@emotion/react";
34
+ var visColors = euiPaletteColorBlindBehindText();
34
35
  export var SIZES = ['s', 'm', 'l', 'xl'];
35
36
  export var TYPES = ['space', 'user'];
36
37
  export var CASING = ['capitalize', 'uppercase', 'lowercase', 'none'];
@@ -59,57 +60,55 @@ export var EuiAvatar = function EuiAvatar(_ref) {
59
60
  isDisabled = _ref$isDisabled === void 0 ? false : _ref$isDisabled,
60
61
  style = _ref.style,
61
62
  props = _objectWithoutProperties(_ref, _excluded);
63
+ checkValidInitials(initials);
62
64
  var _props$casing = props.casing,
63
65
  casing = _props$casing === void 0 ? type === 'space' ? 'none' : 'uppercase' : _props$casing,
64
66
  rest = _objectWithoutProperties(props, _excluded2);
65
- var euiTheme = useEuiTheme();
66
- var styles = euiAvatarStyles(euiTheme);
67
- var visColors = euiPaletteColorBlindBehindText();
68
67
  var isPlain = color === 'plain';
69
68
  var isSubdued = color === 'subdued';
69
+ var isNamedColor = isPlain || isSubdued || color === null;
70
70
  var classes = classNames('euiAvatar', (_classNames = {}, _defineProperty(_classNames, "euiAvatar--".concat(size), size), _defineProperty(_classNames, "euiAvatar--".concat(type), type), _defineProperty(_classNames, 'euiAvatar-isDisabled', isDisabled), _classNames), className);
71
+ var styles = useEuiMemoizedStyles(euiAvatarStyles);
71
72
  var cssStyles = [styles.euiAvatar, styles[type], styles[size], styles[casing], isPlain && styles.plain, isSubdued && styles.subdued, isDisabled && styles.isDisabled];
72
- checkValidInitials(initials);
73
- var avatarStyle = _objectSpread({}, style);
74
- var iconCustomColor = iconColor;
75
- var isNamedColor = color === 'plain' || color === 'subdued' || color === null;
76
- if (!isNamedColor) {
77
- checkValidColor(color);
78
- var assignedColor = color || visColors[Math.floor(name.length % visColors.length)];
79
- var textColor = isColorDark.apply(void 0, _toConsumableArray(hexToRgb(assignedColor))) ? '#FFFFFF' : '#000000';
80
- avatarStyle.backgroundColor = assignedColor;
81
- avatarStyle.color = textColor;
82
-
83
- // Allow consumers to let the icons keep their default color (like app icons)
84
- // when passing `iconColor = null`, otherwise continue to pass on `iconColor` or adjust with textColor
85
- iconCustomColor = iconColor || iconColor === null ? iconColor : textColor;
86
- }
87
- if (imageUrl) {
88
- avatarStyle.backgroundImage = "url(".concat(imageUrl, ")");
89
- }
90
- var content;
91
- if (!imageUrl && !iconType) {
92
- // Create the initials
93
- var calculatedInitials = toInitials(name, initialsLength, initials);
94
- content = ___EmotionJSX("span", {
95
- "aria-hidden": "true"
96
- }, calculatedInitials);
97
- } else if (iconType) {
98
- content = ___EmotionJSX(EuiIcon, {
99
- className: "euiAvatar__icon",
100
- size: iconSize || size,
101
- type: iconType,
102
- color: iconCustomColor === null ? undefined : iconCustomColor
103
- });
104
- }
73
+ var avatarStyle = useMemo(function () {
74
+ if (imageUrl) {
75
+ return {
76
+ backgroundImage: "url(".concat(imageUrl, ")")
77
+ };
78
+ }
79
+ if (!isNamedColor) {
80
+ checkValidColor(color);
81
+ var assignedColor = color || visColors[Math.floor(name.length % visColors.length)];
82
+ var textColor = isColorDark.apply(void 0, _toConsumableArray(hexToRgb(assignedColor))) ? '#FFFFFF' : '#000000';
83
+ return {
84
+ backgroundColor: assignedColor,
85
+ color: textColor
86
+ };
87
+ }
88
+ }, [imageUrl, color, isNamedColor, name.length]);
89
+ var iconCustomColor = useMemo(function () {
90
+ // `null` allows icons to keep their default color (e.g. app icons)
91
+ if (iconColor === null) return undefined;
92
+ // Otherwise continue to pass on `iconColor`
93
+ if (iconColor) return iconColor;
94
+ // Fall back to the adjusted text color if it exists
95
+ return avatarStyle === null || avatarStyle === void 0 ? void 0 : avatarStyle.color;
96
+ }, [iconColor, avatarStyle === null || avatarStyle === void 0 ? void 0 : avatarStyle.color]);
105
97
  return ___EmotionJSX("div", _extends({
106
98
  css: cssStyles,
107
99
  className: classes,
108
- style: avatarStyle,
100
+ style: _objectSpread(_objectSpread({}, style), avatarStyle),
109
101
  "aria-label": isDisabled ? undefined : name,
110
102
  role: isDisabled ? 'presentation' : 'img',
111
103
  title: name
112
- }, rest), content);
104
+ }, rest), !imageUrl && (iconType ? ___EmotionJSX(EuiIcon, {
105
+ className: "euiAvatar__icon",
106
+ size: iconSize || size,
107
+ type: iconType,
108
+ color: iconCustomColor
109
+ }) : ___EmotionJSX("span", {
110
+ "aria-hidden": "true"
111
+ }, toInitials(name, initialsLength, initials))));
113
112
  };
114
113
 
115
114
  // 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;"),
@@ -19,10 +19,10 @@ function _objectWithoutPropertiesLoose(source, excluded) { if (source == null) r
19
19
  import React, { useMemo } from 'react';
20
20
  import PropTypes from "prop-types";
21
21
  import classNames from 'classnames';
22
- import { useEuiTheme, getSecureRelForTarget, wcagContrastMin } from '../../services';
22
+ import { useEuiTheme, useEuiMemoizedStyles, getSecureRelForTarget, wcagContrastMin } from '../../services';
23
+ import { validateHref } from '../../services/security/href_validator';
23
24
  import { EuiInnerText } from '../inner_text';
24
25
  import { EuiIcon } from '../icon';
25
- import { validateHref } from '../../services/security/href_validator';
26
26
  import { getTextColor, getColorContrast, getIsValidColor } from './color_utils';
27
27
  import { euiBadgeStyles } from './badge.styles';
28
28
  import { jsx as ___EmotionJSX } from "@emotion/react";
@@ -47,10 +47,10 @@ export var EuiBadge = function EuiBadge(_ref) {
47
47
  target = _ref.target,
48
48
  style = _ref.style,
49
49
  rest = _objectWithoutProperties(_ref, _excluded);
50
- var euiTheme = useEuiTheme();
51
50
  var isHrefValid = !href || validateHref(href);
52
51
  var isDisabled = _isDisabled || !isHrefValid;
53
52
  var isNamedColor = COLORS.includes(color);
53
+ var euiTheme = useEuiTheme();
54
54
  var customColorStyles = useMemo(function () {
55
55
  // Named colors set their styles via Emotion CSS and not inline styles
56
56
  if (isNamedColor) return style;
@@ -75,7 +75,7 @@ export var EuiBadge = function EuiBadge(_ref) {
75
75
  }
76
76
  }
77
77
  }, [color, isNamedColor, style, euiTheme]);
78
- var styles = euiBadgeStyles(euiTheme);
78
+ var styles = useEuiMemoizedStyles(euiBadgeStyles);
79
79
  var cssStyles = [styles.euiBadge, isNamedColor && styles[color], (onClick || href) && !iconOnClick && styles.clickable, isDisabled && styles.disabled];
80
80
  var textCssStyles = [styles.text.euiBadge__text, (onClick || href) && !isDisabled && styles.text.clickable];
81
81
  var iconCssStyles = [styles.icon.euiBadge__icon, styles.icon[iconSide]];
@@ -13,7 +13,7 @@ function _objectWithoutPropertiesLoose(source, excluded) { if (source == null) r
13
13
  import React, { forwardRef } from 'react';
14
14
  import PropTypes from "prop-types";
15
15
  import classNames from 'classnames';
16
- import { useEuiTheme } from '../../../services';
16
+ import { useEuiMemoizedStyles } from '../../../services';
17
17
  import { euiBadgeGroupStyles } from './badge_group.styles';
18
18
  import { jsx as ___EmotionJSX } from "@emotion/react";
19
19
  export var GUTTER_SIZES = ['none', 'xs', 's'];
@@ -23,10 +23,9 @@ export var EuiBadgeGroup = /*#__PURE__*/forwardRef(function (_ref, ref) {
23
23
  _ref$gutterSize = _ref.gutterSize,
24
24
  gutterSize = _ref$gutterSize === void 0 ? 'xs' : _ref$gutterSize,
25
25
  rest = _objectWithoutProperties(_ref, _excluded);
26
- var euiTheme = useEuiTheme();
27
- var styles = euiBadgeGroupStyles(euiTheme);
28
- var cssStyles = [styles.euiBadgeGroup, styles[gutterSize]];
29
26
  var classes = classNames('euiBadgeGroup', className);
27
+ var styles = useEuiMemoizedStyles(euiBadgeGroupStyles);
28
+ var cssStyles = [styles.euiBadgeGroup, styles[gutterSize]];
30
29
  return ___EmotionJSX("div", _extends({
31
30
  css: cssStyles,
32
31
  className: classes,
@@ -14,7 +14,7 @@ function _objectWithoutPropertiesLoose(source, excluded) { if (source == null) r
14
14
  import React from 'react';
15
15
  import PropTypes from "prop-types";
16
16
  import classNames from 'classnames';
17
- import { getSecureRelForTarget, useEuiTheme } from '../../../services';
17
+ import { getSecureRelForTarget, useEuiMemoizedStyles } from '../../../services';
18
18
  import { EuiToolTip } from '../../tool_tip';
19
19
  import { EuiIcon } from '../../icon';
20
20
  import { euiBetaBadgeStyles } from './beta_badge.styles';
@@ -48,11 +48,10 @@ export var EuiBetaBadge = function EuiBetaBadge(_ref) {
48
48
  _ref$alignment = _ref.alignment,
49
49
  alignment = _ref$alignment === void 0 ? 'baseline' : _ref$alignment,
50
50
  rest = _objectWithoutProperties(_ref, _excluded);
51
- var euiTheme = useEuiTheme();
52
51
  var singleLetter = !!(typeof label === 'string' && label.length === 1);
53
52
  var isCircular = iconType || singleLetter;
54
53
  var classes = classNames('euiBetaBadge', className);
55
- var styles = euiBetaBadgeStyles(euiTheme);
54
+ var styles = useEuiMemoizedStyles(euiBetaBadgeStyles);
56
55
  var cssStyles = [styles.euiBetaBadge, styles[color], styles[size], styles[alignment], isCircular ? styles.badgeSizes.circle[size] : styles.badgeSizes.default[size]];
57
56
  var icon;
58
57
  if (iconType) {
@@ -13,7 +13,7 @@ function _objectWithoutPropertiesLoose(source, excluded) { if (source == null) r
13
13
  import React from 'react';
14
14
  import PropTypes from "prop-types";
15
15
  import classNames from 'classnames';
16
- import { useEuiTheme } from '../../../services';
16
+ import { useEuiMemoizedStyles } from '../../../services';
17
17
  import { euiNotificationBadgeStyles } from './badge_notification.styles';
18
18
  import { jsx as ___EmotionJSX } from "@emotion/react";
19
19
  export var COLORS = ['accent', 'subdued', 'success'];
@@ -26,10 +26,9 @@ export var EuiNotificationBadge = function EuiNotificationBadge(_ref) {
26
26
  _ref$color = _ref.color,
27
27
  color = _ref$color === void 0 ? 'accent' : _ref$color,
28
28
  rest = _objectWithoutProperties(_ref, _excluded);
29
- var euiTheme = useEuiTheme();
30
- var styles = euiNotificationBadgeStyles(euiTheme);
31
- var cssStyles = [styles.euiNotificationBadge, styles[size], styles[color]];
32
29
  var classes = classNames('euiNotificationBadge', className);
30
+ var styles = useEuiMemoizedStyles(euiNotificationBadgeStyles);
31
+ var cssStyles = [styles.euiNotificationBadge, styles[size], styles[color]];
33
32
  return ___EmotionJSX("span", _extends({
34
33
  css: cssStyles,
35
34
  className: classes
@@ -25,21 +25,14 @@ function _objectWithoutPropertiesLoose(source, excluded) { if (source == null) r
25
25
  import classNames from 'classnames';
26
26
  import PropTypes from "prop-types";
27
27
  import React, { forwardRef, useEffect, useState } from 'react';
28
- import { useCombinedRefs, useEuiTheme } from '../../services';
28
+ import { useCombinedRefs, useEuiMemoizedStyles, EuiThemeProvider } from '../../services';
29
29
  import { EuiScreenReaderOnly } from '../accessibility';
30
30
  import { EuiI18n } from '../i18n';
31
31
  import { useResizeObserver } from '../observer/resize_observer';
32
32
  import { EuiPortal } from '../portal';
33
33
  import { euiBottomBarStyles } from './bottom_bar.styles';
34
- import { EuiThemeProvider } from '../../services/theme/provider';
35
34
  import { jsx as ___EmotionJSX } from "@emotion/react";
36
- // Exported for testing
37
- export var paddingSizeToClassNameMap = {
38
- none: null,
39
- s: 'euiBottomBar--paddingSmall',
40
- m: 'euiBottomBar--paddingMedium',
41
- l: 'euiBottomBar--paddingLarge'
42
- };
35
+ export var PADDING_SIZES = ['none', 's', 'm', 'l'];
43
36
  export var POSITIONS = ['static', 'fixed', 'sticky'];
44
37
  var _EuiBottomBar = /*#__PURE__*/forwardRef(function (_ref, ref) {
45
38
  var _ref$position = _ref.position,
@@ -63,8 +56,7 @@ var _EuiBottomBar = /*#__PURE__*/forwardRef(function (_ref, ref) {
63
56
  top = _ref.top,
64
57
  style = _ref.style,
65
58
  rest = _objectWithoutProperties(_ref, _excluded);
66
- var euiTheme = useEuiTheme();
67
- var styles = euiBottomBarStyles(euiTheme);
59
+ var styles = useEuiMemoizedStyles(euiBottomBarStyles);
68
60
 
69
61
  // Force some props if `fixed` position, but not if the user has supplied these
70
62
  affordForDisplacement = position !== 'fixed' ? false : affordForDisplacement;
@@ -92,10 +84,8 @@ var _EuiBottomBar = /*#__PURE__*/forwardRef(function (_ref, ref) {
92
84
  }
93
85
  };
94
86
  }, [affordForDisplacement, usePortal, dimensions, bodyClassName]);
95
- var classes = classNames('euiBottomBar', "euiBottomBar--".concat(position), paddingSizeToClassNameMap[paddingSize], className);
96
- var cssStyles = [styles.euiBottomBar, styles[position], styles[paddingSize], {
97
- position: position
98
- }];
87
+ var classes = classNames('euiBottomBar', "euiBottomBar--".concat(position), className);
88
+ var cssStyles = [styles.euiBottomBar, styles[position], styles[paddingSize]];
99
89
  var newStyle = _objectSpread({
100
90
  left: left,
101
91
  right: right,
@@ -171,7 +161,7 @@ _EuiBottomBar.propTypes = {
171
161
  /**
172
162
  * Padding applied to the bar. Default is 'm'.
173
163
  */
174
- paddingSize: PropTypes.oneOf(["none", "s", "m", "l"]),
164
+ paddingSize: PropTypes.any,
175
165
  /**
176
166
  * Optional class applied to the body element on mount.
177
167
  */
@@ -208,7 +198,7 @@ _EuiBottomBar.propTypes = {
208
198
  export var EuiBottomBar = /*#__PURE__*/forwardRef(function (props, ref) {
209
199
  var BottomBar = _EuiBottomBar;
210
200
  return ___EmotionJSX(EuiThemeProvider, {
211
- colorMode: 'dark',
201
+ colorMode: "dark",
212
202
  wrapperProps: {
213
203
  cloneElement: true
214
204
  }
@@ -245,7 +235,7 @@ EuiBottomBar.propTypes = {
245
235
  /**
246
236
  * Padding applied to the bar. Default is 'm'.
247
237
  */
248
- paddingSize: PropTypes.oneOf(["none", "s", "m", "l"]),
238
+ paddingSize: PropTypes.any,
249
239
  /**
250
240
  * Optional class applied to the body element on mount.
251
241
  */
@@ -20,8 +20,9 @@ export var euiBottomBarStyles = function euiBottomBarStyles(euiThemeContext) {
20
20
  // `color` is inherited from the wrapping `EuiThemeProvider colorMode="dark"`
21
21
  euiBottomBar: /*#__PURE__*/css(euiShadowFlat(euiThemeContext), " background:", shade(euiTheme.colors.lightestShade, 0.5), ";", euiCanAnimate, "{animation:", euiBottomBarAppear, " ", euiTheme.animation.slow, " ", euiTheme.animation.resistance, ";};label:euiBottomBar;"),
22
22
  static: /*#__PURE__*/css(";label:static;"),
23
- fixed: /*#__PURE__*/css("z-index:", Number(euiTheme.levels.header) - 2, ";;label:fixed;"),
24
- sticky: /*#__PURE__*/css("z-index:", Number(euiTheme.levels.header) - 2, ";;label:sticky;"),
23
+ // Default
24
+ fixed: /*#__PURE__*/css("position:fixed;z-index:", Number(euiTheme.levels.header) - 2, ";;label:fixed;"),
25
+ sticky: /*#__PURE__*/css("position:sticky;z-index:", Number(euiTheme.levels.header) - 2, ";;label:sticky;"),
25
26
  // Padding
26
27
  s: /*#__PURE__*/css("padding:", euiTheme.size.s, ";;label:s;"),
27
28
  m: /*#__PURE__*/css("padding:", euiTheme.size.base, ";;label:m;"),
@@ -27,7 +27,6 @@ import PropTypes from "prop-types";
27
27
  import classNames from 'classnames';
28
28
  import { useEuiMemoizedStyles } from '../../services';
29
29
  import { EuiInnerText } from '../inner_text';
30
- import { EuiTextColor } from '../text';
31
30
  import { EuiLink } from '../link';
32
31
  import { EuiPopover } from '../popover';
33
32
  import { EuiIcon } from '../icon';
@@ -51,10 +50,11 @@ export var EuiBreadcrumbContent = function EuiBreadcrumbContent(_ref) {
51
50
  highlightLastBreadcrumb = _ref.highlightLastBreadcrumb,
52
51
  truncateLastBreadcrumb = _ref.truncateLastBreadcrumb,
53
52
  rest = _objectWithoutProperties(_ref, _excluded);
53
+ var isApplication = type === 'application';
54
54
  var classes = classNames('euiBreadcrumb__content', className);
55
55
  var styles = useEuiMemoizedStyles(euiBreadcrumbContentStyles);
56
56
  var cssStyles = [styles.euiBreadcrumb__content, styles[type]];
57
- if (type === 'application') {
57
+ if (isApplication) {
58
58
  if (isOnlyBreadcrumb) {
59
59
  cssStyles.push(styles.applicationStyles.onlyChild);
60
60
  } else if (isFirstBreadcrumb) {
@@ -66,9 +66,9 @@ export var EuiBreadcrumbContent = function EuiBreadcrumbContent(_ref) {
66
66
  var truncationStyles = [truncate && !truncateLastBreadcrumb && styles.isTruncated, truncateLastBreadcrumb && styles.isTruncatedLast];
67
67
  var isBreadcrumbWithPopover = !!popoverContent;
68
68
  var isInteractiveBreadcrumb = href || onClick;
69
- var linkColor = color || (highlightLastBreadcrumb ? 'text' : 'subdued');
70
- var plainTextColor = highlightLastBreadcrumb ? 'default' : 'subdued'; // Does not inherit `color` prop
69
+ var linkColor = color || 'subdued';
71
70
  var ariaCurrent = highlightLastBreadcrumb ? 'page' : undefined;
71
+ var interactionStyles = (isInteractiveBreadcrumb || isBreadcrumbWithPopover) && !isApplication && styles.isInteractive;
72
72
  return ___EmotionJSX(EuiInnerText, null, function (ref, innerText) {
73
73
  var title = innerText === '' ? undefined : innerText;
74
74
  var baseProps = {
@@ -76,13 +76,13 @@ export var EuiBreadcrumbContent = function EuiBreadcrumbContent(_ref) {
76
76
  title: title,
77
77
  'aria-current': ariaCurrent,
78
78
  className: classes,
79
- css: [].concat(cssStyles, truncationStyles)
79
+ css: [].concat(cssStyles, truncationStyles, [interactionStyles])
80
80
  };
81
81
  if (isBreadcrumbWithPopover) {
82
82
  var _ = baseProps.css,
83
83
  popoverButtonProps = _objectWithoutProperties(baseProps, _excluded2);
84
84
  return ___EmotionJSX(EuiBreadcrumbPopover, _extends({}, popoverButtonProps, {
85
- breadcrumbCss: cssStyles,
85
+ breadcrumbCss: [].concat(cssStyles, [interactionStyles]),
86
86
  truncationCss: truncationStyles,
87
87
  isLastBreadcrumb: isLastBreadcrumb,
88
88
  type: type,
@@ -98,10 +98,7 @@ export var EuiBreadcrumbContent = function EuiBreadcrumbContent(_ref) {
98
98
  rel: rel
99
99
  }, rest), text);
100
100
  } else {
101
- return ___EmotionJSX(EuiTextColor, {
102
- color: plainTextColor,
103
- cloneElement: true
104
- }, ___EmotionJSX("span", _extends({}, baseProps, rest), text));
101
+ return ___EmotionJSX("span", _extends({}, baseProps, rest), text);
105
102
  }
106
103
  });
107
104
  };
@@ -122,7 +119,7 @@ EuiBreadcrumbContent.propTypes = {
122
119
  */
123
120
  truncate: PropTypes.bool,
124
121
  /**
125
- * Accepts any EuiLink `color` when rendered as one (has `href`, `onClick`, or `popoverContent`)
122
+ * @deprecated - if a custom color is wanted, use the `css` prop to pass custom css
126
123
  */
127
124
  color: PropTypes.any,
128
125
  /**
@@ -7,24 +7,37 @@
7
7
  */
8
8
 
9
9
  import { css } from '@emotion/react';
10
- import { transparentize } from '../../services/color';
10
+ import { tintOrShade } from '../../services/color';
11
11
  import { euiFontSize, euiTextTruncate, euiFocusRing, logicalCSS, logicalBorderRadiusCSS, mathWithUnits } from '../../global_styling';
12
+ import { euiButtonColor } from '../../themes/amsterdam/global_styling/mixins/button';
12
13
 
13
14
  /**
14
15
  * Styles cast to inner <a>, <button>, <span> elements
15
16
  */
16
17
  export var euiBreadcrumbContentStyles = function euiBreadcrumbContentStyles(euiThemeContext) {
17
- var euiTheme = euiThemeContext.euiTheme;
18
+ var euiTheme = euiThemeContext.euiTheme,
19
+ colorMode = euiThemeContext.colorMode;
20
+
21
+ // Reuse button colors for `type="application`" clickable breadcrumbs
22
+ var applicationButtonColors = euiButtonColor(euiThemeContext, 'primary');
23
+
24
+ // Create custom darker gray colors for non-clickable application breadcrumbs
25
+ // The numbers/ratios are fairly specific here to pass WCAG AA contrast minimums
26
+ var applicationTextColors = {
27
+ backgroundColor: tintOrShade(euiTheme.colors.darkestShade, colorMode === 'DARK' ? 0.7 : 0.85, colorMode),
28
+ color: tintOrShade(euiTheme.colors.darkestShade, 0.2, colorMode)
29
+ };
18
30
  return {
19
- euiBreadcrumb__content: /*#__PURE__*/css("font-weight:", euiTheme.font.weight.medium, ";text-align:center;vertical-align:baseline;;label:euiBreadcrumb__content;"),
31
+ euiBreadcrumb__content: /*#__PURE__*/css("font-weight:", euiTheme.font.weight.regular, ";text-align:center;vertical-align:baseline;&:not(.euiLink){color:", euiTheme.colors.subduedText, ";};label:euiBreadcrumb__content;"),
20
32
  // Truncation styles
21
33
  isTruncated: /*#__PURE__*/css(euiTextTruncate(mathWithUnits(euiTheme.size.base, function (x) {
22
34
  return x * 10;
23
35
  })), ";;label:isTruncated;"),
24
36
  isTruncatedLast: /*#__PURE__*/css(euiTextTruncate('none'), ";;label:isTruncatedLast;"),
37
+ isInteractive: /*#__PURE__*/css("&:not(:disabled){text-decoration:underline;&[class*='euiLink-subdued']{&:hover,&:focus{color:", euiTheme.colors.text, ";}}};label:isInteractive;"),
25
38
  // Types
26
39
  page: /*#__PURE__*/css("&:is(a):focus{", euiFocusRing(euiThemeContext, 'inset'), ";}&:is(button):focus{", euiFocusRing(euiThemeContext, 'center'), ";};label:page;"),
27
- application: /*#__PURE__*/css(euiFontSize(euiThemeContext, 'xs'), " background-color:", transparentize(euiTheme.colors.darkestShade, 0.2), ";clip-path:polygon(\n 0 0,\n calc(100% - ", euiTheme.size.s, ") 0,\n 100% 50%,\n calc(100% - ", euiTheme.size.s, ") 100%,\n 0 100%,\n ", euiTheme.size.s, " 50%\n );color:", euiTheme.colors.darkestShade, ";line-height:", euiTheme.size.base, ";", logicalCSS('padding-vertical', euiTheme.size.xs), " ", logicalCSS('padding-horizontal', euiTheme.size.base), " &:is(a),&:is(button){background-color:", transparentize(euiTheme.colors.primary, 0.2), ";color:", euiTheme.colors.link, ";:focus{", euiFocusRing(euiThemeContext, 'inset'), " :focus-visible{border-radius:", euiTheme.border.radius.medium, ";clip-path:none;}}};label:application;"),
40
+ application: /*#__PURE__*/css(euiFontSize(euiThemeContext, 'xs'), " font-weight:", euiTheme.font.weight.medium, ";background-color:", applicationTextColors.backgroundColor, ";clip-path:polygon(\n 0 0,\n calc(100% - ", euiTheme.size.s, ") 0,\n 100% 50%,\n calc(100% - ", euiTheme.size.s, ") 100%,\n 0 100%,\n ", euiTheme.size.s, " 50%\n );color:", applicationTextColors.color, ";line-height:", euiTheme.size.base, ";", logicalCSS('padding-vertical', euiTheme.size.xs), " ", logicalCSS('padding-horizontal', euiTheme.size.base), " &:is(a),&:is(button){background-color:", applicationButtonColors.backgroundColor, ";color:", applicationButtonColors.color, ";:focus{", euiFocusRing(euiThemeContext, 'inset'), " :focus-visible{border-radius:", euiTheme.border.radius.medium, ";clip-path:none;}}};label:application;"),
28
41
  applicationStyles: {
29
42
  onlyChild: /*#__PURE__*/css("border-radius:", euiTheme.border.radius.medium, ";clip-path:none;", logicalCSS('padding-horizontal', euiTheme.size.m), ";;label:onlyChild;"),
30
43
  firstChild: /*#__PURE__*/css(logicalBorderRadiusCSS("".concat(euiTheme.border.radius.medium, " 0 0 ").concat(euiTheme.border.radius.medium), true), " clip-path:polygon(\n 0 0,\n calc(100% - ", euiTheme.size.s, ") 0,\n 100% 50%,\n calc(100% - ", euiTheme.size.s, ") 100%,\n 0 100%\n );", logicalCSS('padding-left', euiTheme.size.m), ";;label:firstChild;"),
@@ -132,7 +132,7 @@ EuiBreadcrumbs.propTypes = {
132
132
  */
133
133
  truncate: PropTypes.bool,
134
134
  /**
135
- * Accepts any EuiLink `color` when rendered as one (has `href`, `onClick`, or `popoverContent`)
135
+ * @deprecated - if a custom color is wanted, use the `css` prop to pass custom css
136
136
  */
137
137
  color: PropTypes.any,
138
138
  /**
@@ -310,8 +310,9 @@ EuiBreadcrumbs.propTypes = {
310
310
  */
311
311
  type: PropTypes.oneOf(["page", "application"]),
312
312
  /**
313
- * Whether the last breadcrumb should visually (and accessibly, to screen readers)
314
- * be highlighted as the current page. Defaults to true.
313
+ * Whether the last breadcrumb should be semantically highlighted as the
314
+ * current page. (improves accessibility for screen readers users)
315
+ * Defaults to true.
315
316
  */
316
317
  lastBreadcrumbIsCurrentPage: PropTypes.bool
317
318
  };