@elastic/eui 91.0.0 → 91.1.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 (382) hide show
  1. package/dist/eui_theme_dark.css +191 -124
  2. package/dist/eui_theme_dark.min.css +1 -1
  3. package/dist/eui_theme_light.css +191 -124
  4. package/dist/eui_theme_light.min.css +1 -1
  5. package/es/components/accordion/accordion.a11y.js +1 -3
  6. package/es/components/basic_table/action_types.js +5 -0
  7. package/es/components/basic_table/basic_table.a11y.js +1 -2
  8. package/es/components/basic_table/basic_table.js +8 -8
  9. package/es/components/basic_table/collapsed_item_actions.js +120 -249
  10. package/es/components/basic_table/custom_item_action.js +9 -95
  11. package/es/components/basic_table/default_item_action.js +23 -14
  12. package/es/components/basic_table/in_memory_table.a11y.js +13 -11
  13. package/es/components/basic_table/in_memory_table.js +8 -8
  14. package/es/components/breadcrumbs/breadcrumb.js +11 -7
  15. package/es/components/breadcrumbs/breadcrumb.styles.js +5 -0
  16. package/es/components/button/button_display/_button_display.js +5 -3
  17. package/es/components/button/button_display/_button_display_content.js +8 -4
  18. package/es/components/button/button_empty/button_empty.js +9 -7
  19. package/es/components/button/button_group/button_group.js +5 -3
  20. package/es/components/button/button_group/button_group_button.js +5 -3
  21. package/es/components/card/card.a11y.js +5 -18
  22. package/es/components/collapsible_nav_beta/collapsible_nav_beta.styles.js +2 -2
  23. package/es/components/collapsible_nav_beta/collapsible_nav_body_footer.js +4 -1
  24. package/es/components/collapsible_nav_beta/collapsible_nav_body_footer.styles.js +12 -9
  25. package/es/components/collapsible_nav_beta/collapsible_nav_group/collapsible_nav_group.js +1 -101
  26. package/es/components/collapsible_nav_beta/collapsible_nav_item/collapsed/collapsed_nav_button.js +20 -58
  27. package/es/components/collapsible_nav_beta/collapsible_nav_item/collapsed/collapsed_nav_item.js +89 -37
  28. package/es/components/collapsible_nav_beta/collapsible_nav_item/collapsed/collapsed_nav_popover.js +67 -81
  29. package/es/components/collapsible_nav_beta/collapsible_nav_item/collapsed/collapsed_nav_popover.styles.js +1 -19
  30. package/es/components/collapsible_nav_beta/collapsible_nav_item/collapsible_nav_accordion.js +7 -102
  31. package/es/components/collapsible_nav_beta/collapsible_nav_item/collapsible_nav_accordion.styles.js +4 -4
  32. package/es/components/collapsible_nav_beta/collapsible_nav_item/collapsible_nav_group.js +7 -90
  33. package/es/components/collapsible_nav_beta/collapsible_nav_item/collapsible_nav_item.js +150 -130
  34. package/es/components/collapsible_nav_beta/collapsible_nav_item/collapsible_nav_link.js +0 -10
  35. package/es/components/combo_box/combo_box.js +1 -1
  36. package/es/components/context_menu/context_menu_item.js +16 -8
  37. package/es/components/context_menu/context_menu_item.styles.js +1 -1
  38. package/es/components/datagrid/body/data_grid_body.js +16 -6
  39. package/es/components/datagrid/body/data_grid_body_custom.js +16 -6
  40. package/es/components/datagrid/body/data_grid_body_virtualized.js +16 -6
  41. package/es/components/datagrid/body/data_grid_cell.js +67 -44
  42. package/es/components/datagrid/body/data_grid_cell_actions.js +12 -12
  43. package/es/components/datagrid/body/data_grid_cell_popover.js +43 -10
  44. package/es/components/datagrid/body/header/data_grid_header_cell.js +65 -34
  45. package/es/components/datagrid/body/header/data_grid_header_row.js +16 -6
  46. package/es/components/datagrid/controls/column_selector.js +19 -39
  47. package/es/components/datagrid/controls/column_sorting.js +18 -29
  48. package/es/components/datagrid/controls/data_grid_toolbar_control.js +154 -0
  49. package/es/components/datagrid/controls/display_selector.js +0 -1
  50. package/es/components/datagrid/controls/fullscreen_selector.js +2 -6
  51. package/es/components/datagrid/controls/index.js +2 -1
  52. package/es/components/datagrid/index.js +1 -1
  53. package/es/components/datagrid/utils/in_memory.js +16 -6
  54. package/es/components/datagrid/utils/row_heights.js +1 -1
  55. package/es/components/date_picker/auto_refresh/auto_refresh.js +6 -4
  56. package/es/components/date_picker/super_date_picker/super_update_button.js +1 -1
  57. package/es/components/error_boundary/error_boundary.a11y.js +1 -1
  58. package/es/components/expression/expression.a11y.js +2 -4
  59. package/es/components/facet/facet_button.js +5 -3
  60. package/es/components/filter_group/filter_button.js +2 -2
  61. package/es/components/focus_trap/focus_trap.a11y.js +3 -3
  62. package/es/components/form/range/range.a11y.js +5 -10
  63. package/es/components/form/super_select/super_select.js +3 -2
  64. package/es/components/form/super_select/super_select_control.js +13 -20
  65. package/es/components/header/header.a11y.js +1 -1
  66. package/es/components/header/header_links/header_link.js +7 -5
  67. package/es/components/header/header_section/header_section_item_button.js +7 -5
  68. package/es/components/image/image.a11y.js +1 -2
  69. package/es/components/key_pad_menu/key_pad_menu.a11y.js +5 -5
  70. package/es/components/link/external_link_icon.js +51 -0
  71. package/es/components/link/link.js +6 -20
  72. package/es/components/link/link.styles.js +2 -5
  73. package/es/components/list_group/list_group.js +6 -1
  74. package/es/components/list_group/list_group_item.js +14 -4
  75. package/es/components/list_group/list_group_item.styles.js +2 -1
  76. package/es/components/list_group/pinnable_list_group/pinnable_list_group.js +12 -2
  77. package/es/components/notification/notification_event.a11y.js +1 -2
  78. package/es/components/notification/notification_event.js +7 -5
  79. package/es/components/pagination/pagination_button.js +7 -5
  80. package/es/components/popover/popover.js +4 -1
  81. package/es/components/resizable_container/resizable_container.a11y.js +4 -8
  82. package/es/components/search_bar/search_bar.a11y.js +3 -6
  83. package/es/components/selectable/selectable.js +16 -1
  84. package/es/components/selectable/selectable_list/selectable_list.js +227 -78
  85. package/es/components/selectable/selectable_templates/selectable_template_sitewide.js +16 -1
  86. package/es/components/text/text.styles.js +2 -2
  87. package/es/components/text_truncate/text_truncate.js +33 -10
  88. package/eui.d.ts +466 -136
  89. package/i18ntokens.json +224 -260
  90. package/lib/components/accordion/accordion.a11y.js +1 -3
  91. package/lib/components/basic_table/action_types.js +8 -2
  92. package/lib/components/basic_table/basic_table.a11y.js +1 -2
  93. package/lib/components/basic_table/basic_table.js +8 -8
  94. package/lib/components/basic_table/collapsed_item_actions.js +128 -257
  95. package/lib/components/basic_table/custom_item_action.js +18 -104
  96. package/lib/components/basic_table/default_item_action.js +23 -14
  97. package/lib/components/basic_table/in_memory_table.a11y.js +13 -11
  98. package/lib/components/basic_table/in_memory_table.js +8 -8
  99. package/lib/components/breadcrumbs/breadcrumb.js +11 -7
  100. package/lib/components/breadcrumbs/breadcrumb.styles.js +5 -0
  101. package/lib/components/button/button_display/_button_display.js +5 -3
  102. package/lib/components/button/button_display/_button_display_content.js +8 -4
  103. package/lib/components/button/button_empty/button_empty.js +9 -7
  104. package/lib/components/button/button_group/button_group.js +5 -3
  105. package/lib/components/button/button_group/button_group_button.js +5 -3
  106. package/lib/components/card/card.a11y.js +5 -18
  107. package/lib/components/collapsible_nav_beta/collapsible_nav_beta.styles.js +1 -1
  108. package/lib/components/collapsible_nav_beta/collapsible_nav_body_footer.js +4 -1
  109. package/lib/components/collapsible_nav_beta/collapsible_nav_body_footer.styles.js +12 -9
  110. package/lib/components/collapsible_nav_beta/collapsible_nav_group/collapsible_nav_group.js +1 -101
  111. package/lib/components/collapsible_nav_beta/collapsible_nav_item/collapsed/collapsed_nav_button.js +20 -58
  112. package/lib/components/collapsible_nav_beta/collapsible_nav_item/collapsed/collapsed_nav_item.js +89 -37
  113. package/lib/components/collapsible_nav_beta/collapsible_nav_item/collapsed/collapsed_nav_popover.js +66 -80
  114. package/lib/components/collapsible_nav_beta/collapsible_nav_item/collapsed/collapsed_nav_popover.styles.js +11 -28
  115. package/lib/components/collapsible_nav_beta/collapsible_nav_item/collapsible_nav_accordion.js +7 -104
  116. package/lib/components/collapsible_nav_beta/collapsible_nav_item/collapsible_nav_accordion.styles.js +4 -4
  117. package/lib/components/collapsible_nav_beta/collapsible_nav_item/collapsible_nav_group.js +7 -90
  118. package/lib/components/collapsible_nav_beta/collapsible_nav_item/collapsible_nav_item.js +150 -130
  119. package/lib/components/collapsible_nav_beta/collapsible_nav_item/collapsible_nav_link.js +0 -10
  120. package/lib/components/combo_box/combo_box.js +1 -1
  121. package/lib/components/context_menu/context_menu_item.js +16 -8
  122. package/lib/components/context_menu/context_menu_item.styles.js +1 -1
  123. package/lib/components/datagrid/body/data_grid_body.js +16 -6
  124. package/lib/components/datagrid/body/data_grid_body_custom.js +16 -6
  125. package/lib/components/datagrid/body/data_grid_body_virtualized.js +16 -6
  126. package/lib/components/datagrid/body/data_grid_cell.js +67 -44
  127. package/lib/components/datagrid/body/data_grid_cell_actions.js +12 -13
  128. package/lib/components/datagrid/body/data_grid_cell_popover.js +43 -10
  129. package/lib/components/datagrid/body/header/data_grid_header_cell.js +65 -34
  130. package/lib/components/datagrid/body/header/data_grid_header_row.js +16 -6
  131. package/lib/components/datagrid/controls/column_selector.js +19 -39
  132. package/lib/components/datagrid/controls/column_sorting.js +18 -30
  133. package/lib/components/datagrid/controls/data_grid_toolbar_control.js +159 -0
  134. package/lib/components/datagrid/controls/display_selector.js +0 -1
  135. package/lib/components/datagrid/controls/fullscreen_selector.js +2 -7
  136. package/lib/components/datagrid/controls/index.js +8 -1
  137. package/lib/components/datagrid/index.js +8 -1
  138. package/lib/components/datagrid/utils/in_memory.js +16 -6
  139. package/lib/components/datagrid/utils/row_heights.js +1 -1
  140. package/lib/components/date_picker/auto_refresh/auto_refresh.js +6 -4
  141. package/lib/components/date_picker/super_date_picker/super_update_button.js +1 -1
  142. package/lib/components/error_boundary/error_boundary.a11y.js +1 -1
  143. package/lib/components/expression/expression.a11y.js +2 -4
  144. package/lib/components/facet/facet_button.js +5 -3
  145. package/lib/components/filter_group/filter_button.js +2 -2
  146. package/lib/components/focus_trap/focus_trap.a11y.js +3 -3
  147. package/lib/components/form/range/range.a11y.js +5 -10
  148. package/lib/components/form/super_select/super_select.js +3 -2
  149. package/lib/components/form/super_select/super_select_control.js +12 -19
  150. package/lib/components/header/header.a11y.js +1 -1
  151. package/lib/components/header/header_links/header_link.js +7 -5
  152. package/lib/components/header/header_section/header_section_item_button.js +7 -5
  153. package/lib/components/image/image.a11y.js +1 -2
  154. package/lib/components/key_pad_menu/key_pad_menu.a11y.js +5 -5
  155. package/lib/components/link/external_link_icon.js +57 -0
  156. package/lib/components/link/link.js +6 -20
  157. package/lib/components/link/link.styles.js +1 -4
  158. package/lib/components/list_group/list_group.js +6 -1
  159. package/lib/components/list_group/list_group_item.js +14 -4
  160. package/lib/components/list_group/list_group_item.styles.js +2 -1
  161. package/lib/components/list_group/pinnable_list_group/pinnable_list_group.js +12 -2
  162. package/lib/components/notification/notification_event.a11y.js +1 -2
  163. package/lib/components/notification/notification_event.js +7 -5
  164. package/lib/components/popover/popover.js +4 -1
  165. package/lib/components/resizable_container/resizable_container.a11y.js +4 -8
  166. package/lib/components/search_bar/search_bar.a11y.js +3 -6
  167. package/lib/components/selectable/selectable.js +16 -1
  168. package/lib/components/selectable/selectable_list/selectable_list.js +227 -78
  169. package/lib/components/selectable/selectable_templates/selectable_template_sitewide.js +16 -1
  170. package/lib/components/text/text.styles.js +2 -2
  171. package/lib/components/text_truncate/text_truncate.js +32 -9
  172. package/optimize/es/components/accordion/accordion.a11y.js +1 -3
  173. package/optimize/es/components/basic_table/action_types.js +5 -0
  174. package/optimize/es/components/basic_table/basic_table.a11y.js +1 -2
  175. package/optimize/es/components/basic_table/collapsed_item_actions.js +116 -169
  176. package/optimize/es/components/basic_table/custom_item_action.js +10 -83
  177. package/optimize/es/components/basic_table/default_item_action.js +23 -14
  178. package/optimize/es/components/basic_table/in_memory_table.a11y.js +13 -11
  179. package/optimize/es/components/breadcrumbs/breadcrumb.js +11 -7
  180. package/optimize/es/components/breadcrumbs/breadcrumb.styles.js +5 -0
  181. package/optimize/es/components/button/button_display/_button_display_content.js +3 -1
  182. package/optimize/es/components/button/button_empty/button_empty.js +2 -2
  183. package/optimize/es/components/card/card.a11y.js +5 -18
  184. package/optimize/es/components/collapsible_nav_beta/collapsible_nav_beta.styles.js +2 -2
  185. package/optimize/es/components/collapsible_nav_beta/collapsible_nav_body_footer.js +4 -1
  186. package/optimize/es/components/collapsible_nav_beta/collapsible_nav_body_footer.styles.js +12 -9
  187. package/optimize/es/components/collapsible_nav_beta/collapsible_nav_item/collapsed/collapsed_nav_button.js +1 -3
  188. package/optimize/es/components/collapsible_nav_beta/collapsible_nav_item/collapsed/collapsed_nav_item.js +10 -5
  189. package/optimize/es/components/collapsible_nav_beta/collapsible_nav_item/collapsed/collapsed_nav_popover.js +8 -36
  190. package/optimize/es/components/collapsible_nav_beta/collapsible_nav_item/collapsed/collapsed_nav_popover.styles.js +1 -19
  191. package/optimize/es/components/collapsible_nav_beta/collapsible_nav_item/collapsible_nav_accordion.js +6 -23
  192. package/optimize/es/components/collapsible_nav_beta/collapsible_nav_item/collapsible_nav_accordion.styles.js +4 -4
  193. package/optimize/es/components/collapsible_nav_beta/collapsible_nav_item/collapsible_nav_group.js +6 -10
  194. package/optimize/es/components/collapsible_nav_beta/collapsible_nav_item/collapsible_nav_item.js +9 -5
  195. package/optimize/es/components/context_menu/context_menu_item.js +9 -6
  196. package/optimize/es/components/context_menu/context_menu_item.styles.js +1 -1
  197. package/optimize/es/components/datagrid/body/data_grid_cell.js +38 -30
  198. package/optimize/es/components/datagrid/body/data_grid_cell_actions.js +12 -12
  199. package/optimize/es/components/datagrid/body/data_grid_cell_popover.js +43 -10
  200. package/optimize/es/components/datagrid/body/header/data_grid_header_cell.js +49 -28
  201. package/optimize/es/components/datagrid/controls/column_selector.js +19 -39
  202. package/optimize/es/components/datagrid/controls/column_sorting.js +18 -29
  203. package/optimize/es/components/datagrid/controls/data_grid_toolbar_control.js +70 -0
  204. package/optimize/es/components/datagrid/controls/display_selector.js +0 -1
  205. package/optimize/es/components/datagrid/controls/fullscreen_selector.js +2 -6
  206. package/optimize/es/components/datagrid/controls/index.js +2 -1
  207. package/optimize/es/components/datagrid/index.js +1 -1
  208. package/optimize/es/components/datagrid/utils/row_heights.js +1 -1
  209. package/optimize/es/components/date_picker/super_date_picker/super_update_button.js +1 -1
  210. package/optimize/es/components/error_boundary/error_boundary.a11y.js +1 -1
  211. package/optimize/es/components/expression/expression.a11y.js +2 -4
  212. package/optimize/es/components/filter_group/filter_button.js +2 -2
  213. package/optimize/es/components/focus_trap/focus_trap.a11y.js +3 -3
  214. package/optimize/es/components/form/range/range.a11y.js +5 -10
  215. package/optimize/es/components/form/super_select/super_select.js +3 -2
  216. package/optimize/es/components/form/super_select/super_select_control.js +13 -20
  217. package/optimize/es/components/header/header.a11y.js +1 -1
  218. package/optimize/es/components/image/image.a11y.js +1 -2
  219. package/optimize/es/components/key_pad_menu/key_pad_menu.a11y.js +5 -5
  220. package/optimize/es/components/link/external_link_icon.js +41 -0
  221. package/optimize/es/components/link/link.js +6 -20
  222. package/optimize/es/components/link/link.styles.js +2 -5
  223. package/optimize/es/components/list_group/list_group_item.js +8 -3
  224. package/optimize/es/components/list_group/list_group_item.styles.js +2 -1
  225. package/optimize/es/components/notification/notification_event.a11y.js +1 -2
  226. package/optimize/es/components/popover/popover.js +4 -1
  227. package/optimize/es/components/resizable_container/resizable_container.a11y.js +4 -8
  228. package/optimize/es/components/search_bar/search_bar.a11y.js +3 -6
  229. package/optimize/es/components/selectable/selectable_list/selectable_list.js +199 -76
  230. package/optimize/es/components/text/text.styles.js +2 -2
  231. package/optimize/es/components/text_truncate/text_truncate.js +26 -9
  232. package/optimize/lib/components/accordion/accordion.a11y.js +1 -3
  233. package/optimize/lib/components/basic_table/action_types.js +8 -2
  234. package/optimize/lib/components/basic_table/basic_table.a11y.js +1 -2
  235. package/optimize/lib/components/basic_table/collapsed_item_actions.js +123 -174
  236. package/optimize/lib/components/basic_table/custom_item_action.js +17 -91
  237. package/optimize/lib/components/basic_table/default_item_action.js +23 -14
  238. package/optimize/lib/components/basic_table/in_memory_table.a11y.js +13 -11
  239. package/optimize/lib/components/breadcrumbs/breadcrumb.js +11 -7
  240. package/optimize/lib/components/breadcrumbs/breadcrumb.styles.js +5 -0
  241. package/optimize/lib/components/button/button_display/_button_display_content.js +3 -1
  242. package/optimize/lib/components/button/button_empty/button_empty.js +2 -2
  243. package/optimize/lib/components/card/card.a11y.js +5 -18
  244. package/optimize/lib/components/collapsible_nav_beta/collapsible_nav_beta.styles.js +1 -1
  245. package/optimize/lib/components/collapsible_nav_beta/collapsible_nav_body_footer.js +4 -1
  246. package/optimize/lib/components/collapsible_nav_beta/collapsible_nav_body_footer.styles.js +12 -9
  247. package/optimize/lib/components/collapsible_nav_beta/collapsible_nav_item/collapsed/collapsed_nav_button.js +1 -3
  248. package/optimize/lib/components/collapsible_nav_beta/collapsible_nav_item/collapsed/collapsed_nav_item.js +10 -5
  249. package/optimize/lib/components/collapsible_nav_beta/collapsible_nav_item/collapsed/collapsed_nav_popover.js +8 -36
  250. package/optimize/lib/components/collapsible_nav_beta/collapsible_nav_item/collapsed/collapsed_nav_popover.styles.js +11 -28
  251. package/optimize/lib/components/collapsible_nav_beta/collapsible_nav_item/collapsible_nav_accordion.js +6 -26
  252. package/optimize/lib/components/collapsible_nav_beta/collapsible_nav_item/collapsible_nav_accordion.styles.js +4 -4
  253. package/optimize/lib/components/collapsible_nav_beta/collapsible_nav_item/collapsible_nav_group.js +6 -10
  254. package/optimize/lib/components/collapsible_nav_beta/collapsible_nav_item/collapsible_nav_item.js +9 -5
  255. package/optimize/lib/components/context_menu/context_menu_item.js +9 -6
  256. package/optimize/lib/components/context_menu/context_menu_item.styles.js +1 -1
  257. package/optimize/lib/components/datagrid/body/data_grid_cell.js +38 -30
  258. package/optimize/lib/components/datagrid/body/data_grid_cell_actions.js +12 -12
  259. package/optimize/lib/components/datagrid/body/data_grid_cell_popover.js +43 -10
  260. package/optimize/lib/components/datagrid/body/header/data_grid_header_cell.js +55 -36
  261. package/optimize/lib/components/datagrid/controls/column_selector.js +19 -39
  262. package/optimize/lib/components/datagrid/controls/column_sorting.js +18 -29
  263. package/optimize/lib/components/datagrid/controls/data_grid_toolbar_control.js +75 -0
  264. package/optimize/lib/components/datagrid/controls/display_selector.js +0 -1
  265. package/optimize/lib/components/datagrid/controls/fullscreen_selector.js +2 -6
  266. package/optimize/lib/components/datagrid/controls/index.js +8 -1
  267. package/optimize/lib/components/datagrid/index.js +8 -1
  268. package/optimize/lib/components/datagrid/utils/row_heights.js +1 -1
  269. package/optimize/lib/components/date_picker/super_date_picker/super_update_button.js +1 -1
  270. package/optimize/lib/components/error_boundary/error_boundary.a11y.js +1 -1
  271. package/optimize/lib/components/expression/expression.a11y.js +2 -4
  272. package/optimize/lib/components/filter_group/filter_button.js +2 -2
  273. package/optimize/lib/components/focus_trap/focus_trap.a11y.js +3 -3
  274. package/optimize/lib/components/form/range/range.a11y.js +5 -10
  275. package/optimize/lib/components/form/super_select/super_select.js +3 -2
  276. package/optimize/lib/components/form/super_select/super_select_control.js +12 -19
  277. package/optimize/lib/components/header/header.a11y.js +1 -1
  278. package/optimize/lib/components/image/image.a11y.js +1 -2
  279. package/optimize/lib/components/key_pad_menu/key_pad_menu.a11y.js +5 -5
  280. package/optimize/lib/components/link/external_link_icon.js +47 -0
  281. package/optimize/lib/components/link/link.js +6 -20
  282. package/optimize/lib/components/link/link.styles.js +1 -4
  283. package/optimize/lib/components/list_group/list_group_item.js +8 -3
  284. package/optimize/lib/components/list_group/list_group_item.styles.js +2 -1
  285. package/optimize/lib/components/notification/notification_event.a11y.js +1 -2
  286. package/optimize/lib/components/popover/popover.js +4 -1
  287. package/optimize/lib/components/resizable_container/resizable_container.a11y.js +4 -8
  288. package/optimize/lib/components/search_bar/search_bar.a11y.js +3 -6
  289. package/optimize/lib/components/selectable/selectable_list/selectable_list.js +199 -76
  290. package/optimize/lib/components/text/text.styles.js +2 -2
  291. package/optimize/lib/components/text_truncate/text_truncate.js +25 -8
  292. package/package.json +4 -4
  293. package/src/components/datagrid/_data_grid_data_row.scss +139 -100
  294. package/src/components/datagrid/_mixins.scss +2 -2
  295. package/src/components/datagrid/body/header/_data_grid_header_row.scss +36 -28
  296. package/src/components/datagrid/controls/_data_grid_toolbar.scss +0 -5
  297. package/src/components/form/form_row/_form_row.scss +1 -1
  298. package/src/components/table/_responsive.scss +19 -0
  299. package/src/components/table/_table.scss +4 -9
  300. package/test-env/components/accordion/accordion.a11y.js +1 -3
  301. package/test-env/components/auto_sizer/auto_sizer.js +10 -3
  302. package/test-env/components/basic_table/action_types.js +8 -2
  303. package/test-env/components/basic_table/basic_table.a11y.js +1 -2
  304. package/test-env/components/basic_table/basic_table.js +8 -8
  305. package/test-env/components/basic_table/collapsed_item_actions.js +124 -251
  306. package/test-env/components/basic_table/custom_item_action.js +18 -100
  307. package/test-env/components/basic_table/default_item_action.js +23 -14
  308. package/test-env/components/basic_table/in_memory_table.a11y.js +13 -11
  309. package/test-env/components/basic_table/in_memory_table.js +8 -8
  310. package/test-env/components/breadcrumbs/breadcrumb.js +11 -7
  311. package/test-env/components/breadcrumbs/breadcrumb.styles.js +5 -0
  312. package/test-env/components/button/button_display/_button_display.js +5 -3
  313. package/test-env/components/button/button_display/_button_display_content.js +8 -4
  314. package/test-env/components/button/button_empty/button_empty.js +9 -7
  315. package/test-env/components/button/button_group/button_group.js +5 -3
  316. package/test-env/components/button/button_group/button_group_button.js +5 -3
  317. package/test-env/components/card/card.a11y.js +5 -18
  318. package/test-env/components/collapsible_nav_beta/collapsible_nav_beta.styles.js +1 -1
  319. package/test-env/components/collapsible_nav_beta/collapsible_nav_body_footer.js +4 -1
  320. package/test-env/components/collapsible_nav_beta/collapsible_nav_body_footer.styles.js +12 -9
  321. package/test-env/components/collapsible_nav_beta/collapsible_nav_group/collapsible_nav_group.js +1 -101
  322. package/test-env/components/collapsible_nav_beta/collapsible_nav_item/collapsed/collapsed_nav_button.js +20 -58
  323. package/test-env/components/collapsible_nav_beta/collapsible_nav_item/collapsed/collapsed_nav_item.js +89 -37
  324. package/test-env/components/collapsible_nav_beta/collapsible_nav_item/collapsed/collapsed_nav_popover.js +66 -80
  325. package/test-env/components/collapsible_nav_beta/collapsible_nav_item/collapsed/collapsed_nav_popover.styles.js +11 -28
  326. package/test-env/components/collapsible_nav_beta/collapsible_nav_item/collapsible_nav_accordion.js +7 -105
  327. package/test-env/components/collapsible_nav_beta/collapsible_nav_item/collapsible_nav_accordion.styles.js +4 -4
  328. package/test-env/components/collapsible_nav_beta/collapsible_nav_item/collapsible_nav_group.js +7 -90
  329. package/test-env/components/collapsible_nav_beta/collapsible_nav_item/collapsible_nav_item.js +150 -130
  330. package/test-env/components/collapsible_nav_beta/collapsible_nav_item/collapsible_nav_link.js +0 -10
  331. package/test-env/components/combo_box/combo_box.js +1 -1
  332. package/test-env/components/context_menu/context_menu_item.js +16 -8
  333. package/test-env/components/context_menu/context_menu_item.styles.js +1 -1
  334. package/test-env/components/datagrid/body/data_grid_body.js +16 -6
  335. package/test-env/components/datagrid/body/data_grid_body_custom.js +16 -6
  336. package/test-env/components/datagrid/body/data_grid_body_virtualized.js +16 -6
  337. package/test-env/components/datagrid/body/data_grid_cell.js +67 -44
  338. package/test-env/components/datagrid/body/data_grid_cell_actions.js +12 -12
  339. package/test-env/components/datagrid/body/data_grid_cell_popover.js +43 -10
  340. package/test-env/components/datagrid/body/header/data_grid_header_cell.js +71 -42
  341. package/test-env/components/datagrid/body/header/data_grid_header_row.js +16 -6
  342. package/test-env/components/datagrid/controls/column_selector.js +19 -39
  343. package/test-env/components/datagrid/controls/column_sorting.js +18 -29
  344. package/test-env/components/datagrid/controls/data_grid_toolbar_control.js +158 -0
  345. package/test-env/components/datagrid/controls/display_selector.js +0 -1
  346. package/test-env/components/datagrid/controls/fullscreen_selector.js +2 -6
  347. package/test-env/components/datagrid/controls/index.js +8 -1
  348. package/test-env/components/datagrid/index.js +8 -1
  349. package/test-env/components/datagrid/utils/in_memory.js +16 -6
  350. package/test-env/components/datagrid/utils/row_heights.js +1 -1
  351. package/test-env/components/date_picker/auto_refresh/auto_refresh.js +6 -4
  352. package/test-env/components/date_picker/super_date_picker/super_update_button.js +1 -1
  353. package/test-env/components/error_boundary/error_boundary.a11y.js +1 -1
  354. package/test-env/components/expression/expression.a11y.js +2 -4
  355. package/test-env/components/facet/facet_button.js +5 -3
  356. package/test-env/components/filter_group/filter_button.js +2 -2
  357. package/test-env/components/focus_trap/focus_trap.a11y.js +3 -3
  358. package/test-env/components/form/range/range.a11y.js +5 -10
  359. package/test-env/components/form/super_select/super_select.js +3 -2
  360. package/test-env/components/form/super_select/super_select_control.js +12 -19
  361. package/test-env/components/header/header.a11y.js +1 -1
  362. package/test-env/components/header/header_links/header_link.js +7 -5
  363. package/test-env/components/header/header_section/header_section_item_button.js +7 -5
  364. package/test-env/components/image/image.a11y.js +1 -2
  365. package/test-env/components/key_pad_menu/key_pad_menu.a11y.js +5 -5
  366. package/test-env/components/link/external_link_icon.js +56 -0
  367. package/test-env/components/link/link.js +6 -20
  368. package/test-env/components/link/link.styles.js +1 -4
  369. package/test-env/components/list_group/list_group.js +6 -1
  370. package/test-env/components/list_group/list_group_item.js +14 -4
  371. package/test-env/components/list_group/list_group_item.styles.js +2 -1
  372. package/test-env/components/list_group/pinnable_list_group/pinnable_list_group.js +12 -2
  373. package/test-env/components/notification/notification_event.a11y.js +1 -2
  374. package/test-env/components/notification/notification_event.js +7 -5
  375. package/test-env/components/popover/popover.js +4 -1
  376. package/test-env/components/resizable_container/resizable_container.a11y.js +4 -8
  377. package/test-env/components/search_bar/search_bar.a11y.js +3 -6
  378. package/test-env/components/selectable/selectable.js +16 -1
  379. package/test-env/components/selectable/selectable_list/selectable_list.js +227 -78
  380. package/test-env/components/selectable/selectable_templates/selectable_template_sitewide.js +16 -1
  381. package/test-env/components/text/text.styles.js +2 -2
  382. package/test-env/components/text_truncate/text_truncate.js +32 -9
@@ -2,7 +2,7 @@ import _defineProperty from "@babel/runtime/helpers/defineProperty";
2
2
  import _slicedToArray from "@babel/runtime/helpers/slicedToArray";
3
3
  import _extends from "@babel/runtime/helpers/extends";
4
4
  import _objectWithoutProperties from "@babel/runtime/helpers/objectWithoutProperties";
5
- var _excluded = ["label", "isActive", "isDisabled", "href", "target", "rel", "className", "css", "style", "iconType", "icon", "iconProps", "extraAction", "onClick", "size", "color", "showToolTip", "wrapText", "buttonRef", "toolTipText", "toolTipProps"],
5
+ var _excluded = ["label", "isActive", "isDisabled", "href", "rel", "target", "external", "className", "css", "style", "iconType", "icon", "iconProps", "extraAction", "onClick", "size", "color", "showToolTip", "wrapText", "buttonRef", "toolTipText", "toolTipProps"],
6
6
  _excluded2 = ["iconType", "alwaysShow", "isDisabled"];
7
7
  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; }
8
8
  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; }
@@ -22,6 +22,7 @@ import { useInnerText } from '../inner_text';
22
22
  import { EuiListGroupItemExtraAction } from './list_group_item_extra_action';
23
23
  import { getSecureRelForTarget, useEuiTheme, cloneElementWithCss } from '../../services';
24
24
  import { validateHref } from '../../services/security/href_validator';
25
+ import { EuiExternalLinkIcon } from '../link/external_link_icon';
25
26
  import { euiListGroupItemStyles, euiListGroupItemIconStyles, euiListGroupItemInnerStyles, euiListGroupItemTooltipStyles, euiListGroupItemLabelStyles } from './list_group_item.styles';
26
27
  import { jsx as ___EmotionJSX } from "@emotion/react";
27
28
  export var SIZES = ['xs', 's', 'm', 'l'];
@@ -33,8 +34,9 @@ export var EuiListGroupItem = function EuiListGroupItem(_ref) {
33
34
  _ref$isDisabled = _ref.isDisabled,
34
35
  _isDisabled = _ref$isDisabled === void 0 ? false : _ref$isDisabled,
35
36
  href = _ref.href,
36
- target = _ref.target,
37
37
  rel = _ref.rel,
38
+ target = _ref.target,
39
+ external = _ref.external,
38
40
  className = _ref.className,
39
41
  customCss = _ref.css,
40
42
  style = _ref.style,
@@ -134,7 +136,10 @@ export var EuiListGroupItem = function EuiListGroupItem(_ref) {
134
136
  target: target
135
137
  }),
136
138
  onClick: onClick
137
- }, rest), iconNode, labelContent);
139
+ }, rest), iconNode, labelContent, ___EmotionJSX(EuiExternalLinkIcon, {
140
+ external: external,
141
+ target: target
142
+ }));
138
143
  } else if (href && isDisabled || onClick) {
139
144
  itemContent = ___EmotionJSX("button", _extends({
140
145
  type: "button",
@@ -67,7 +67,8 @@ export var euiListGroupItemInnerStyles = function euiListGroupItemInnerStyles(eu
67
67
  // Variants
68
68
  isDisabled: /*#__PURE__*/css("cursor:not-allowed;&,&:hover,&:focus{color:", euiButtonColor(euiThemeContext, 'disabled').color, ";cursor:not-allowed;background-color:transparent;text-decoration:none;};label:isDisabled;"),
69
69
  isActive: /*#__PURE__*/css(";label:isActive;"),
70
- isClickable: _ref
70
+ isClickable: _ref,
71
+ externalIcon: /*#__PURE__*/css(logicalCSS('margin-left', euiTheme.size.xs), ";;label:externalIcon;")
71
72
  };
72
73
  };
73
74
  export var euiListGroupItemLabelStyles = function euiListGroupItemLabelStyles() {
@@ -87,8 +87,7 @@ describe('EuiNotificationEvent', function () {
87
87
  });
88
88
  describe('Keyboard accessibility', function () {
89
89
  it('has zero violations when the popover is opened by keyboard', function () {
90
- cy.repeatRealPress('Tab');
91
- cy.get('button[data-test-subj="cy-eui-notification-1-notificationEventMetaButton"]').should('have.focus');
90
+ cy.get('button[data-test-subj="cy-eui-notification-1-notificationEventMetaButton"]').focus();
92
91
  cy.realPress('Enter');
93
92
  cy.get('div.euiPopover__panel').should('exist');
94
93
  cy.checkAxe();
@@ -198,9 +198,12 @@ export var EuiPopover = /*#__PURE__*/function (_Component) {
198
198
  anchor: _this.button,
199
199
  popover: _this.panel,
200
200
  offset: _this.props.attachToAnchor ? offset : _this.props.hasArrow ? 16 + offset : 8 + offset,
201
- arrowConfig: {
201
+ arrowConfig: _this.props.hasArrow ? {
202
202
  arrowWidth: 24,
203
203
  arrowBuffer: 10
204
+ } : {
205
+ arrowWidth: 0,
206
+ arrowBuffer: 0
204
207
  },
205
208
  returnBoundingBox: _this.props.attachToAnchor,
206
209
  allowCrossAxis: _this.props.repositionToCrossAxis,
@@ -49,22 +49,19 @@ describe('Horizontal EuiResizableContainer', function () {
49
49
  });
50
50
  describe('Keyboard accessibility check', function () {
51
51
  it('has zero violations when first panel is scrolled vertically', function () {
52
- cy.realPress('Tab');
53
- cy.get('div.euiPanel').first().should('have.focus');
52
+ cy.get('div.euiPanel').first().focus();
54
53
  cy.realPress('End');
55
54
  cy.get('a[data-test-subj="hello-world-link"]').should('be.visible');
56
55
  cy.checkAxe();
57
56
  });
58
57
  it('has zero violations when second panel is scrolled vertically', function () {
59
- cy.repeatRealPress('Tab', 4);
60
- cy.get('div.euiPanel').last().should('have.focus');
58
+ cy.get('div.euiPanel').last().focus();
61
59
  cy.realPress('End');
62
60
  cy.realPress('Home');
63
61
  cy.checkAxe();
64
62
  });
65
63
  it('has zero violations when the horizontal panels are resized', function () {
66
- cy.repeatRealPress('Tab', 3);
67
- cy.get('button.euiResizableButton').should('have.focus');
64
+ cy.get('button.euiResizableButton').focus();
68
65
  cy.repeatRealPress('ArrowRight', 10);
69
66
  cy.checkAxe();
70
67
  });
@@ -99,8 +96,7 @@ describe('Vertical EuiResizableContainer', function () {
99
96
  cy.checkAxe();
100
97
  });
101
98
  it('has zero violations when the vertical panels are resized', function () {
102
- cy.repeatRealPress('Tab');
103
- cy.get('button.euiResizableButton').should('have.focus');
99
+ cy.get('button.euiResizableButton').focus();
104
100
  cy.repeatRealPress('ArrowDown', 10);
105
101
  cy.checkAxe();
106
102
  });
@@ -172,8 +172,7 @@ describe('EuiSearchBar', function () {
172
172
  });
173
173
  describe('Keyboard accessibility', function () {
174
174
  it('has zero violations after a full-text search', function () {
175
- cy.realPress('Tab');
176
- cy.get('input[type="search"]').should('have.focus');
175
+ cy.get('input[type="search"]').focus();
177
176
  cy.get('input[type="search"]').type('watch');
178
177
  cy.realPress('Enter');
179
178
  cy.get('table.euiTable tbody').find('tr').should('have.length', 1);
@@ -185,8 +184,7 @@ describe('EuiSearchBar', function () {
185
184
  cy.checkAxe();
186
185
  });
187
186
  it('has zero violations after filtering on Open items', function () {
188
- cy.repeatRealPress('Tab');
189
- cy.get('button.euiButtonEmpty').first().should('have.focus');
187
+ cy.get('button.euiButtonEmpty').first().focus();
190
188
  cy.realPress('Enter');
191
189
  cy.get('table.euiTable tbody').find('tr').should('have.length', 3);
192
190
  cy.checkAxe();
@@ -197,8 +195,7 @@ describe('EuiSearchBar', function () {
197
195
  cy.checkAxe();
198
196
  });
199
197
  it('has zero violations after filtering by Tags', function () {
200
- cy.repeatRealPress('Tab', 4);
201
- cy.get('button.euiButtonEmpty').last().should('have.focus');
198
+ cy.get('button.euiButtonEmpty').last().focus();
202
199
  cy.realPress('Enter');
203
200
  cy.realPress('Tab');
204
201
  cy.realPress('ArrowDown');
@@ -8,8 +8,8 @@ import _possibleConstructorReturn from "@babel/runtime/helpers/possibleConstruct
8
8
  import _getPrototypeOf from "@babel/runtime/helpers/getPrototypeOf";
9
9
  import _defineProperty from "@babel/runtime/helpers/defineProperty";
10
10
  var _excluded = ["data"],
11
- _excluded2 = ["label", "isGroupLabel", "checked", "disabled", "prepend", "append", "ref", "key", "searchableLabel", "data"],
12
- _excluded3 = ["className", "options", "searchValue", "onOptionClick", "renderOption", "height", "windowProps", "rowHeight", "activeOptionIndex", "makeOptionId", "showIcons", "singleSelection", "visibleOptions", "allowExclusions", "bordered", "paddingSize", "searchable", "onFocusBadge", "listId", "setActiveOptionIndex", "aria-label", "aria-labelledby", "aria-describedby", "role", "isVirtualized", "textWrap"];
11
+ _excluded2 = ["label", "isGroupLabel", "checked", "disabled", "prepend", "append", "ref", "key", "searchableLabel", "data", "truncationProps"],
12
+ _excluded3 = ["className", "options", "searchValue", "onOptionClick", "renderOption", "height", "windowProps", "rowHeight", "activeOptionIndex", "makeOptionId", "showIcons", "singleSelection", "visibleOptions", "allowExclusions", "bordered", "paddingSize", "searchable", "onFocusBadge", "listId", "setActiveOptionIndex", "aria-label", "aria-labelledby", "aria-describedby", "role", "isVirtualized", "textWrap", "truncationProps"];
13
13
  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; }
14
14
  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; }
15
15
  function _createSuper(Derived) { var hasNativeReflectConstruct = _isNativeReflectConstruct(); return function _createSuperInternal() { var Super = _getPrototypeOf(Derived), result; if (hasNativeReflectConstruct) { var NewTarget = _getPrototypeOf(this).constructor; result = Reflect.construct(Super, arguments, NewTarget); } else { result = Super.apply(this, arguments); } return _possibleConstructorReturn(this, result); }; }
@@ -27,6 +27,8 @@ import classNames from 'classnames';
27
27
  import { FixedSizeList, areEqual } from 'react-window';
28
28
  import { EuiAutoSizer } from '../../auto_sizer';
29
29
  import { EuiHighlight } from '../../highlight';
30
+ import { EuiMark } from '../../mark';
31
+ import { EuiTextTruncate } from '../../text_truncate';
30
32
  import { EuiSelectableListItem } from './selectable_list_item';
31
33
 
32
34
  // Consumer Configurable Props via `EuiSelectable.listProps`
@@ -81,20 +83,23 @@ export var EuiSelectableList = /*#__PURE__*/function (_Component) {
81
83
  }
82
84
  }
83
85
  });
84
- _defineProperty(_assertThisInitialized(_this), "ariaSetSize", 0);
85
- _defineProperty(_assertThisInitialized(_this), "ariaPosInSetMap", {});
86
+ // This utility is necessary to exclude group labels from the aria set count
86
87
  _defineProperty(_assertThisInitialized(_this), "calculateAriaSetAttrs", function (optionArray) {
87
- _this.ariaPosInSetMap = {};
88
+ var ariaPosInSetMap = {};
88
89
  var latestAriaPosIndex = 0;
89
90
  optionArray.forEach(function (option, index) {
90
91
  if (!option.isGroupLabel) {
91
92
  latestAriaPosIndex++;
92
- _this.ariaPosInSetMap[index] = latestAriaPosIndex;
93
+ ariaPosInSetMap[index] = latestAriaPosIndex;
93
94
  }
94
95
  });
95
- _this.ariaSetSize = latestAriaPosIndex;
96
+ return {
97
+ ariaPosInSetMap: ariaPosInSetMap,
98
+ ariaSetSize: latestAriaPosIndex
99
+ };
96
100
  });
97
101
  _defineProperty(_assertThisInitialized(_this), "ListRow", /*#__PURE__*/memo(function (_ref) {
102
+ var _option$textWrap;
98
103
  var data = _ref.data,
99
104
  index = _ref.index,
100
105
  style = _ref.style;
@@ -111,19 +116,20 @@ export var EuiSelectableList = /*#__PURE__*/function (_Component) {
111
116
  key = option.key,
112
117
  searchableLabel = option.searchableLabel,
113
118
  _data = option.data,
119
+ _truncationProps = option.truncationProps,
114
120
  optionRest = _objectWithoutProperties(option, _excluded2);
115
121
  var _this$props2 = _this.props,
116
122
  activeOptionIndex = _this$props2.activeOptionIndex,
117
123
  allowExclusions = _this$props2.allowExclusions,
118
124
  onFocusBadge = _this$props2.onFocusBadge,
119
125
  paddingSize = _this$props2.paddingSize,
120
- searchValue = _this$props2.searchValue,
121
126
  showIcons = _this$props2.showIcons,
122
127
  makeOptionId = _this$props2.makeOptionId,
123
128
  renderOption = _this$props2.renderOption,
124
129
  setActiveOptionIndex = _this$props2.setActiveOptionIndex,
125
130
  searchable = _this$props2.searchable,
126
- textWrap = _this$props2.textWrap;
131
+ searchValue = _this$props2.searchValue,
132
+ isVirtualized = _this$props2.isVirtualized;
127
133
  if (isGroupLabel) {
128
134
  return ___EmotionJSX("li", _extends({
129
135
  role: "presentation",
@@ -133,6 +139,15 @@ export var EuiSelectableList = /*#__PURE__*/function (_Component) {
133
139
  }, optionRest), prepend, label, append);
134
140
  }
135
141
  var id = makeOptionId(index);
142
+ var isFocused = activeOptionIndex === index;
143
+
144
+ // Text wrapping
145
+ var canWrap = !isVirtualized;
146
+ var _textWrap = (_option$textWrap = option.textWrap) !== null && _option$textWrap !== void 0 ? _option$textWrap : _this.props.textWrap;
147
+ var textWrap = canWrap ? _textWrap : 'truncate';
148
+
149
+ // Truncation config (if any). If none, CSS truncation is used
150
+ var truncationProps = textWrap === 'truncate' ? _this.getTruncationProps(option, isFocused) : undefined;
136
151
  return ___EmotionJSX(EuiSelectableListItem, _extends({
137
152
  key: id,
138
153
  id: id,
@@ -145,14 +160,14 @@ export var EuiSelectableList = /*#__PURE__*/function (_Component) {
145
160
  _this.onAddOrRemoveOption(option, event);
146
161
  },
147
162
  ref: ref ? ref.bind(null, index) : undefined,
148
- isFocused: activeOptionIndex === index,
163
+ isFocused: isFocused,
149
164
  title: searchableLabel || label,
150
165
  checked: checked,
151
166
  disabled: disabled,
152
167
  prepend: prepend,
153
168
  append: append,
154
- "aria-posinset": _this.ariaPosInSetMap[index],
155
- "aria-setsize": _this.ariaSetSize,
169
+ "aria-posinset": _this.state.ariaPosInSetMap[index],
170
+ "aria-setsize": _this.state.ariaSetSize,
156
171
  onFocusBadge: onFocusBadge,
157
172
  allowExclusions: allowExclusions,
158
173
  showIcons: showIcons,
@@ -160,16 +175,18 @@ export var EuiSelectableList = /*#__PURE__*/function (_Component) {
160
175
  searchable: searchable,
161
176
  textWrap: textWrap
162
177
  }, optionRest), renderOption ? renderOption( // @ts-ignore complex
163
- _objectSpread(_objectSpread({}, _option), optionData), _this.props.searchValue) : ___EmotionJSX(EuiHighlight, {
164
- search: searchValue
165
- }, label));
178
+ _objectSpread(_objectSpread({}, _option), optionData), searchValue) : searchValue ? _this.renderSearchedText(label, truncationProps) : truncationProps ? _this.renderTruncatedText(label, truncationProps) : label);
166
179
  }, areEqual));
167
- _defineProperty(_assertThisInitialized(_this), "renderVirtualizedList", function (heightIsFull, optionArray) {
180
+ _defineProperty(_assertThisInitialized(_this), "renderVirtualizedList", function () {
168
181
  if (!_this.props.isVirtualized) return null;
182
+ var _this$state = _this.state,
183
+ optionArray = _this$state.optionArray,
184
+ itemData = _this$state.itemData;
169
185
  var _this$props3 = _this.props,
170
186
  windowProps = _this$props3.windowProps,
171
187
  forcedHeight = _this$props3.height,
172
188
  rowHeight = _this$props3.rowHeight;
189
+ var heightIsFull = forcedHeight === 'full';
173
190
  var virtualizationProps = _objectSpread({
174
191
  className: 'euiSelectableList__list',
175
192
  ref: _this.setListRef,
@@ -177,7 +194,7 @@ export var EuiSelectableList = /*#__PURE__*/function (_Component) {
177
194
  innerRef: _this.setListBoxRef,
178
195
  innerElementType: 'ul',
179
196
  itemCount: optionArray.length,
180
- itemData: optionArray,
197
+ itemData: itemData,
181
198
  itemSize: rowHeight,
182
199
  'data-skip-axe': 'scrollable-region-focusable'
183
200
  }, windowProps);
@@ -197,7 +214,9 @@ export var EuiSelectableList = /*#__PURE__*/function (_Component) {
197
214
  calculatedHeight = numVisibleOptions * rowHeight;
198
215
  }
199
216
  }
200
- return heightIsFull ? ___EmotionJSX(EuiAutoSizer, null, function (_ref2) {
217
+ return heightIsFull ? ___EmotionJSX(EuiAutoSizer, {
218
+ onResize: _this.calculateDefaultOptionWidth
219
+ }, function (_ref2) {
201
220
  var width = _ref2.width,
202
221
  height = _ref2.height;
203
222
  return ___EmotionJSX(FixedSizeList, _extends({
@@ -205,7 +224,8 @@ export var EuiSelectableList = /*#__PURE__*/function (_Component) {
205
224
  height: height
206
225
  }, virtualizationProps), _this.ListRow);
207
226
  }) : ___EmotionJSX(EuiAutoSizer, {
208
- disableHeight: true
227
+ disableHeight: true,
228
+ onResize: _this.calculateDefaultOptionWidth
209
229
  }, function (_ref3) {
210
230
  var width = _ref3.width;
211
231
  return ___EmotionJSX(FixedSizeList, _extends({
@@ -214,17 +234,106 @@ export var EuiSelectableList = /*#__PURE__*/function (_Component) {
214
234
  }, virtualizationProps), _this.ListRow);
215
235
  });
216
236
  });
237
+ _defineProperty(_assertThisInitialized(_this), "forceVirtualizedListRowRerender", function () {
238
+ _this.setState({
239
+ itemData: _objectSpread({}, _this.state.optionArray)
240
+ });
241
+ });
242
+ // EuiTextTruncate is expensive perf-wise - we use several utilities here to
243
+ // offset its performance cost
244
+ // and creates a resize observer for
245
+ // each individual item. This logic tries to offset this performance hit by
246
+ // guesstimating a default width for each option
247
+ _defineProperty(_assertThisInitialized(_this), "focusBadgeOffset", 0);
248
+ _defineProperty(_assertThisInitialized(_this), "calculateDefaultOptionWidth", function (_ref4) {
249
+ var containerWidth = _ref4.width;
250
+ var _this$props4 = _this.props,
251
+ truncationProps = _this$props4.truncationProps,
252
+ searchable = _this$props4.searchable,
253
+ searchValue = _this$props4.searchValue;
254
+
255
+ // If it's not likely we'll need to use EuiTextTruncate, don't set state/rerender on every panel resize
256
+ var mayTruncate = searchable || truncationProps;
257
+ if (!mayTruncate) return;
258
+ var paddingOffset = _this.props.paddingSize === 'none' ? 0 : 24; // Defaults to 's'
259
+ var checkedIconOffset = _this.props.showIcons === false ? 0 : 28; // Defaults to true
260
+ _this.focusBadgeOffset = _this.props.onFocusBadge === false ? 0 : 46;
261
+ _this.setState({
262
+ defaultOptionWidth: containerWidth - paddingOffset - checkedIconOffset
263
+ });
264
+
265
+ // Potentially force list rows to rerender on dynamic resize as well,
266
+ // but try to do it as lightly as possible
267
+ if (truncationProps || searchable && searchValue) {
268
+ _this.forceVirtualizedListRowRerender();
269
+ }
270
+ });
271
+ _defineProperty(_assertThisInitialized(_this), "getTruncationProps", function (option, isFocused) {
272
+ // Individual truncation settings should override component-wide settings
273
+ var truncationProps = _objectSpread(_objectSpread({}, _this.props.truncationProps), option.truncationProps);
274
+
275
+ // If we're not actually using EuiTextTruncate, no need to continue
276
+ var hasComplexTruncation = _this.props.searchValue || Object.keys(truncationProps).length > 0;
277
+ if (!hasComplexTruncation) return undefined;
278
+
279
+ // Determine whether we can use the optimized default option width
280
+ var defaultOptionWidth = _this.state.defaultOptionWidth;
281
+ var useDefaultWidth = !option.append && !option.prepend;
282
+ var defaultWidth = useDefaultWidth && defaultOptionWidth ? isFocused ? defaultOptionWidth - _this.focusBadgeOffset : defaultOptionWidth : undefined;
283
+ return _objectSpread({
284
+ width: defaultWidth
285
+ }, truncationProps);
286
+ });
287
+ _defineProperty(_assertThisInitialized(_this), "renderSearchedText", function (text, truncationProps) {
288
+ var searchValue = _this.props.searchValue;
289
+
290
+ // If truncationProps is undefined, we're using non-virtualized text wrapping
291
+ if (!truncationProps) {
292
+ return ___EmotionJSX(EuiHighlight, {
293
+ search: searchValue
294
+ }, text);
295
+ }
296
+ var searchPositionStart = text.toLowerCase().indexOf(searchValue.toLowerCase());
297
+ var searchPositionCenter = searchPositionStart + Math.floor(searchValue.length / 2);
298
+ return ___EmotionJSX(EuiTextTruncate, _extends({}, truncationProps, {
299
+ // When searching, don't allow overriding the truncation settings
300
+ truncation: "startEnd",
301
+ truncationPosition: searchPositionCenter,
302
+ text: text
303
+ }), function (text) {
304
+ return ___EmotionJSX(React.Fragment, null, text.length >= searchValue.length ? ___EmotionJSX(EuiHighlight, {
305
+ search: searchValue
306
+ }, text) :
307
+ // If the available truncated text is shorter than the full search string,
308
+ // just highlight the entire truncated text
309
+ ___EmotionJSX(EuiMark, null, text));
310
+ });
311
+ });
312
+ _defineProperty(_assertThisInitialized(_this), "renderTruncatedText", function (text, truncationProps) {
313
+ return (
314
+ // For some bizarre reason, truncation in EuiSelectable is off on initial mount
315
+ // (but not on rerender) for Safari and _some_ truncation types in Firefox :|
316
+ // Waiting a tick before calculating truncation seems to smooth over the issue
317
+ ___EmotionJSX(EuiTextTruncate, _extends({
318
+ calculationDelayMs: 2
319
+ }, truncationProps, {
320
+ text: text
321
+ }), function (text) {
322
+ return text;
323
+ })
324
+ );
325
+ });
217
326
  _defineProperty(_assertThisInitialized(_this), "onAddOrRemoveOption", function (option, event) {
218
327
  if (option.disabled) {
219
328
  return;
220
329
  }
221
- var _this$props4 = _this.props,
222
- allowExclusions = _this$props4.allowExclusions,
223
- options = _this$props4.options,
224
- _this$props4$visibleO = _this$props4.visibleOptions,
225
- visibleOptions = _this$props4$visibleO === void 0 ? options : _this$props4$visibleO;
226
- _this.props.setActiveOptionIndex(visibleOptions.findIndex(function (_ref4) {
227
- var label = _ref4.label;
330
+ var _this$props5 = _this.props,
331
+ allowExclusions = _this$props5.allowExclusions,
332
+ options = _this$props5.options,
333
+ _this$props5$visibleO = _this$props5.visibleOptions,
334
+ visibleOptions = _this$props5$visibleO === void 0 ? options : _this$props5$visibleO;
335
+ _this.props.setActiveOptionIndex(visibleOptions.findIndex(function (_ref5) {
336
+ var label = _ref5.label;
228
337
  return label === option.label;
229
338
  }), function () {
230
339
  if (option.checked === 'on' && allowExclusions) {
@@ -237,10 +346,10 @@ export var EuiSelectableList = /*#__PURE__*/function (_Component) {
237
346
  });
238
347
  });
239
348
  _defineProperty(_assertThisInitialized(_this), "onAddOption", function (addedOption, event) {
240
- var _this$props5 = _this.props,
241
- onOptionClick = _this$props5.onOptionClick,
242
- options = _this$props5.options,
243
- singleSelection = _this$props5.singleSelection;
349
+ var _this$props6 = _this.props,
350
+ onOptionClick = _this$props6.onOptionClick,
351
+ options = _this$props6.options,
352
+ singleSelection = _this$props6.singleSelection;
244
353
  var changedOption = _objectSpread({}, addedOption);
245
354
  var updatedOptions = options.map(function (option) {
246
355
  // if singleSelection is enabled, uncheck any selected option(s)
@@ -259,10 +368,10 @@ export var EuiSelectableList = /*#__PURE__*/function (_Component) {
259
368
  onOptionClick(updatedOptions, event, changedOption);
260
369
  });
261
370
  _defineProperty(_assertThisInitialized(_this), "onRemoveOption", function (removedOption, event) {
262
- var _this$props6 = _this.props,
263
- onOptionClick = _this$props6.onOptionClick,
264
- singleSelection = _this$props6.singleSelection,
265
- options = _this$props6.options;
371
+ var _this$props7 = _this.props,
372
+ onOptionClick = _this$props7.onOptionClick,
373
+ singleSelection = _this$props7.singleSelection,
374
+ options = _this$props7.options;
266
375
  var changedOption = _objectSpread({}, removedOption);
267
376
  var updatedOptions = options.map(function (option) {
268
377
  var updatedOption = _objectSpread({}, option);
@@ -275,9 +384,9 @@ export var EuiSelectableList = /*#__PURE__*/function (_Component) {
275
384
  onOptionClick(updatedOptions, event, changedOption);
276
385
  });
277
386
  _defineProperty(_assertThisInitialized(_this), "onExcludeOption", function (excludedOption, event) {
278
- var _this$props7 = _this.props,
279
- onOptionClick = _this$props7.onOptionClick,
280
- options = _this$props7.options;
387
+ var _this$props8 = _this.props,
388
+ onOptionClick = _this$props8.onOptionClick,
389
+ options = _this$props8.options;
281
390
  var changedOption = _objectSpread({}, excludedOption);
282
391
  var updatedOptions = options.map(function (option) {
283
392
  var updatedOption = _objectSpread({}, option);
@@ -289,69 +398,83 @@ export var EuiSelectableList = /*#__PURE__*/function (_Component) {
289
398
  });
290
399
  onOptionClick(updatedOptions, event, changedOption);
291
400
  });
401
+ var _optionArray = props.visibleOptions || props.options;
402
+ _this.state = _objectSpread({
403
+ defaultOptionWidth: 0,
404
+ optionArray: _optionArray,
405
+ itemData: _objectSpread({}, _optionArray)
406
+ }, _this.calculateAriaSetAttrs(_optionArray));
292
407
  return _this;
293
408
  }
294
409
  _createClass(EuiSelectableList, [{
295
410
  key: "componentDidUpdate",
296
- value: function componentDidUpdate() {
297
- var activeOptionIndex = this.props.activeOptionIndex;
411
+ value: function componentDidUpdate(prevProps) {
412
+ var _this$props9 = this.props,
413
+ activeOptionIndex = _this$props9.activeOptionIndex,
414
+ visibleOptions = _this$props9.visibleOptions,
415
+ options = _this$props9.options;
298
416
  if (this.listBoxRef && this.props.searchable !== true) {
299
417
  this.listBoxRef.setAttribute('aria-activedescendant', "".concat(this.props.makeOptionId(activeOptionIndex)));
300
418
  }
301
- if (this.listRef && typeof this.props.activeOptionIndex !== 'undefined') {
302
- this.listRef.scrollToItem(this.props.activeOptionIndex, 'auto');
419
+ if (this.listRef && typeof activeOptionIndex !== 'undefined') {
420
+ this.listRef.scrollToItem(activeOptionIndex, 'auto');
421
+ }
422
+ if (prevProps.visibleOptions !== visibleOptions || prevProps.options !== options) {
423
+ var optionArray = visibleOptions || options;
424
+ this.setState(_objectSpread({
425
+ optionArray: optionArray,
426
+ itemData: _objectSpread({}, optionArray)
427
+ }, this.calculateAriaSetAttrs(optionArray)));
303
428
  }
304
429
  }
305
430
  }, {
306
431
  key: "render",
307
432
  value: function render() {
308
433
  var _this2 = this;
309
- var _this$props8 = this.props,
310
- className = _this$props8.className,
311
- options = _this$props8.options,
312
- searchValue = _this$props8.searchValue,
313
- onOptionClick = _this$props8.onOptionClick,
314
- renderOption = _this$props8.renderOption,
315
- forcedHeight = _this$props8.height,
316
- windowProps = _this$props8.windowProps,
317
- rowHeight = _this$props8.rowHeight,
318
- activeOptionIndex = _this$props8.activeOptionIndex,
319
- makeOptionId = _this$props8.makeOptionId,
320
- showIcons = _this$props8.showIcons,
321
- singleSelection = _this$props8.singleSelection,
322
- visibleOptions = _this$props8.visibleOptions,
323
- allowExclusions = _this$props8.allowExclusions,
324
- bordered = _this$props8.bordered,
325
- paddingSize = _this$props8.paddingSize,
326
- searchable = _this$props8.searchable,
327
- onFocusBadge = _this$props8.onFocusBadge,
328
- listId = _this$props8.listId,
329
- setActiveOptionIndex = _this$props8.setActiveOptionIndex,
330
- ariaLabel = _this$props8['aria-label'],
331
- ariaLabelledby = _this$props8['aria-labelledby'],
332
- ariaDescribedby = _this$props8['aria-describedby'],
333
- role = _this$props8.role,
334
- isVirtualized = _this$props8.isVirtualized,
335
- textWrap = _this$props8.textWrap,
336
- rest = _objectWithoutProperties(_this$props8, _excluded3);
337
- var optionArray = visibleOptions || options;
338
- this.calculateAriaSetAttrs(optionArray);
339
- var heightIsFull = forcedHeight === 'full';
434
+ var _this$props10 = this.props,
435
+ className = _this$props10.className,
436
+ options = _this$props10.options,
437
+ searchValue = _this$props10.searchValue,
438
+ onOptionClick = _this$props10.onOptionClick,
439
+ renderOption = _this$props10.renderOption,
440
+ forcedHeight = _this$props10.height,
441
+ windowProps = _this$props10.windowProps,
442
+ rowHeight = _this$props10.rowHeight,
443
+ activeOptionIndex = _this$props10.activeOptionIndex,
444
+ makeOptionId = _this$props10.makeOptionId,
445
+ showIcons = _this$props10.showIcons,
446
+ singleSelection = _this$props10.singleSelection,
447
+ visibleOptions = _this$props10.visibleOptions,
448
+ allowExclusions = _this$props10.allowExclusions,
449
+ bordered = _this$props10.bordered,
450
+ paddingSize = _this$props10.paddingSize,
451
+ searchable = _this$props10.searchable,
452
+ onFocusBadge = _this$props10.onFocusBadge,
453
+ listId = _this$props10.listId,
454
+ setActiveOptionIndex = _this$props10.setActiveOptionIndex,
455
+ ariaLabel = _this$props10['aria-label'],
456
+ ariaLabelledby = _this$props10['aria-labelledby'],
457
+ ariaDescribedby = _this$props10['aria-describedby'],
458
+ role = _this$props10.role,
459
+ isVirtualized = _this$props10.isVirtualized,
460
+ textWrap = _this$props10.textWrap,
461
+ truncationProps = _this$props10.truncationProps,
462
+ rest = _objectWithoutProperties(_this$props10, _excluded3);
340
463
  var classes = classNames('euiSelectableList', {
341
- 'euiSelectableList-fullHeight': heightIsFull,
464
+ 'euiSelectableList-fullHeight': forcedHeight === 'full',
342
465
  'euiSelectableList-bordered': bordered
343
466
  }, className);
344
467
  return ___EmotionJSX("div", _extends({
345
468
  className: classes
346
- }, rest), isVirtualized ? this.renderVirtualizedList(heightIsFull, optionArray) : ___EmotionJSX("div", {
469
+ }, rest), isVirtualized ? this.renderVirtualizedList() : ___EmotionJSX("div", {
347
470
  className: "euiSelectableList__list",
348
471
  ref: this.removeScrollableTabStop
349
472
  }, ___EmotionJSX("ul", {
350
473
  ref: this.setListBoxRef
351
- }, optionArray.map(function (_, index) {
474
+ }, this.state.optionArray.map(function (_, index) {
352
475
  return /*#__PURE__*/React.createElement(_this2.ListRow, {
353
476
  key: index,
354
- data: optionArray,
477
+ data: _this2.state.optionArray,
355
478
  index: index
356
479
  }, null);
357
480
  }))));
@@ -54,7 +54,7 @@ var euiScaleText = function euiScaleText(euiThemeContext, options) {
54
54
  var blockQuoteBorderWidth = mathWithUnits(fontSize, function (x) {
55
55
  return x / 4;
56
56
  });
57
- return "\n font-size: ".concat(fontSize, ";\n line-height: ").concat(lineHeight, ";\n\n h1 {\n font-size: ").concat(headings.h1.fontSize, ";\n line-height: ").concat(headings.h1.lineHeight, ";\n }\n h1:not(:last-child) {\n ").concat(logicalCSS('margin-bottom', headingMarginBottom), "\n }\n\n h2 {\n font-size: ").concat(headings.h2.fontSize, ";\n line-height: ").concat(headings.h2.lineHeight, ";\n\n &:not(:first-child) {\n ").concat(logicalCSS('margin-top', headingMarginTop), "\n }\n\n &:not(:last-child) {\n ").concat(logicalCSS('margin-bottom', headingMarginBottom), "\n }\n }\n\n h3 {\n font-size: ").concat(headings.h3.fontSize, ";\n line-height: ").concat(headings.h3.lineHeight, ";\n\n &:not(:first-child) {\n ").concat(logicalCSS('margin-top', headingMarginTop), "\n }\n\n &:not(:last-child) {\n ").concat(logicalCSS('margin-bottom', headingMarginBottom), "\n }\n }\n\n h4 {\n font-size: ").concat(headings.h4.fontSize, ";\n line-height: ").concat(headings.h4.lineHeight, ";\n\n &:not(:first-child) {\n ").concat(logicalCSS('margin-top', headingMarginTop), "\n }\n\n &:not(:last-child) {\n ").concat(logicalCSS('margin-bottom', headingMarginBottom), "\n }\n }\n\n h5 {\n font-size: ").concat(headings.h5.fontSize, ";\n line-height: ").concat(headings.h5.lineHeight, ";\n\n &:not(:first-child) {\n ").concat(logicalCSS('margin-top', headingMarginTop), "\n }\n\n &:not(:last-child) {\n ").concat(logicalCSS('margin-bottom', headingMarginBottom), "\n }\n }\n\n h6 {\n font-size: ").concat(headings.h6.fontSize, ";\n line-height: ").concat(headings.h6.lineHeight, ";\n\n &:not(:first-child) {\n ").concat(logicalCSS('margin-top', headingMarginTop), "\n }\n\n &:not(:last-child) {\n ").concat(logicalCSS('margin-bottom', headingMarginBottom), "\n }\n }\n\n p,\n dl,\n blockquote,\n img,\n pre,\n > ul,\n > ol {\n ").concat(logicalCSS('margin-bottom', lineHeightSize), "\n }\n\n ul,\n ol {\n ").concat(logicalCSS('margin-left', lineHeightSize), "\n }\n\n /* The styles of the nested ordered lists follow the style of GitHub\n which is commonly used in Markdown or MDX formatting. */\n ol ol,\n ul ol {\n list-style-type: lower-roman;\n }\n\n ul ul ol,\n ul ol ol,\n ol ul ol,\n ol ol ol {\n list-style-type: lower-alpha;\n }\n \n blockquote {\n font-size: ").concat(fontSize, ";\n ").concat(logicalShorthandCSS('padding', "0 ".concat(fontSize)), "\n ").concat(logicalCSS('border-left-width', blockQuoteBorderWidth), "\n ").concat(logicalCSS('margin-bottom', fontSize), "\n }\n\n dd + dt {\n ").concat(logicalCSS('margin-top', fontSize), "\n }\n\n dt,\n .eui-definitionListReverse dd {\n font-size: ").concat(fontSize, ";\n line-height: ").concat(lineHeight, ";\n }\n\n .eui-definitionListReverse dt {\n font-size: ").concat(euiFontSize(euiThemeContext, 'xs', options).fontSize, ";\n color: ").concat(euiTheme.colors.text, ";\n }\n\n small {\n font-size: ").concat(euiFontSize(euiThemeContext, 's', options).fontSize, ";\n }\n\n pre:not(.euiCodeBlock__pre) {\n padding: ").concat(lineHeightSize, ";\n }\n\n code:not(.euiCode):not(.euiCodeBlock__code) {\n font-size: .9em; /* 90% of parent font size */\n }\n ").concat(
57
+ return "\n font-size: ".concat(fontSize, ";\n line-height: ").concat(lineHeight, ";\n\n h1 {\n font-size: ").concat(headings.h1.fontSize, ";\n line-height: ").concat(headings.h1.lineHeight, ";\n }\n h1:not(:last-child) {\n ").concat(logicalCSS('margin-bottom', headingMarginBottom), "\n }\n\n h2 {\n font-size: ").concat(headings.h2.fontSize, ";\n line-height: ").concat(headings.h2.lineHeight, ";\n\n &:not(:first-child) {\n ").concat(logicalCSS('margin-top', headingMarginTop), "\n }\n\n &:not(:last-child) {\n ").concat(logicalCSS('margin-bottom', headingMarginBottom), "\n }\n }\n\n h3 {\n font-size: ").concat(headings.h3.fontSize, ";\n line-height: ").concat(headings.h3.lineHeight, ";\n\n &:not(:first-child) {\n ").concat(logicalCSS('margin-top', headingMarginTop), "\n }\n\n &:not(:last-child) {\n ").concat(logicalCSS('margin-bottom', headingMarginBottom), "\n }\n }\n\n h4 {\n font-size: ").concat(headings.h4.fontSize, ";\n line-height: ").concat(headings.h4.lineHeight, ";\n\n &:not(:first-child) {\n ").concat(logicalCSS('margin-top', headingMarginTop), "\n }\n\n &:not(:last-child) {\n ").concat(logicalCSS('margin-bottom', headingMarginBottom), "\n }\n }\n\n h5 {\n font-size: ").concat(headings.h5.fontSize, ";\n line-height: ").concat(headings.h5.lineHeight, ";\n\n &:not(:first-child) {\n ").concat(logicalCSS('margin-top', headingMarginTop), "\n }\n\n &:not(:last-child) {\n ").concat(logicalCSS('margin-bottom', headingMarginBottom), "\n }\n }\n\n h6 {\n font-size: ").concat(headings.h6.fontSize, ";\n line-height: ").concat(headings.h6.lineHeight, ";\n\n &:not(:first-child) {\n ").concat(logicalCSS('margin-top', headingMarginTop), "\n }\n\n &:not(:last-child) {\n ").concat(logicalCSS('margin-bottom', headingMarginBottom), "\n }\n }\n\n p,\n dl,\n blockquote,\n pre,\n > ul,\n > ol {\n ").concat(logicalCSS('margin-bottom', lineHeightSize), "\n }\n\n ul,\n ol {\n ").concat(logicalCSS('margin-left', lineHeightSize), "\n }\n\n /* The styles of the nested ordered lists follow the style of GitHub\n which is commonly used in Markdown or MDX formatting. */\n ol ol,\n ul ol {\n list-style-type: lower-roman;\n }\n\n ul ul ol,\n ul ol ol,\n ol ul ol,\n ol ol ol {\n list-style-type: lower-alpha;\n }\n \n blockquote {\n font-size: ").concat(fontSize, ";\n ").concat(logicalShorthandCSS('padding', "0 ".concat(fontSize)), "\n ").concat(logicalCSS('border-left-width', blockQuoteBorderWidth), "\n ").concat(logicalCSS('margin-bottom', fontSize), "\n }\n\n dd + dt {\n ").concat(logicalCSS('margin-top', fontSize), "\n }\n\n dt,\n .eui-definitionListReverse dd {\n font-size: ").concat(fontSize, ";\n line-height: ").concat(lineHeight, ";\n }\n\n .eui-definitionListReverse dt {\n font-size: ").concat(euiFontSize(euiThemeContext, 'xs', options).fontSize, ";\n color: ").concat(euiTheme.colors.text, ";\n }\n\n small {\n font-size: ").concat(euiFontSize(euiThemeContext, 's', options).fontSize, ";\n }\n\n pre:not(.euiCodeBlock__pre) {\n padding: ").concat(lineHeightSize, ";\n }\n\n code:not(.euiCode):not(.euiCodeBlock__code) {\n font-size: .9em; /* 90% of parent font size */\n }\n ").concat(
58
58
  // when textSize is 'm', the 'kbd' element gets a line between the text and the border-bottom
59
59
  _customScale === 'm' ? "\n kbd {\n ".concat(logicalCSS('padding-bottom', euiTheme.size.xs), "\n /* Ensures the shape still looks like a square when only one character */\n ").concat(logicalCSS('min-width', euiTheme.size.l), "\n ").concat(logicalTextAlignCSS('center'), "\n }\n \n kbd::after {\n content: '';\n ").concat(logicalCSS('border-bottom', "".concat(euiTheme.border.width.thin, " solid ").concat(euiTheme.colors.text)), "\n position: absolute;\n ").concat(logicalCSS('bottom', euiTheme.size.xxs), "\n ").concat(logicalCSS('left', 0), "\n ").concat(logicalCSS('width', '100%'), "\n }") : '', "\n ");
60
60
  };
@@ -65,7 +65,7 @@ var euiScaleText = function euiScaleText(euiThemeContext, options) {
65
65
  export var euiTextStyles = function euiTextStyles(euiThemeContext) {
66
66
  var euiTheme = euiThemeContext.euiTheme;
67
67
  return {
68
- euiText: /*#__PURE__*/css(euiText(euiTheme, true), "clear:both;a:not([class]){", euiLinkCSS(euiThemeContext), ";}img{display:block;", logicalCSS('max-width', '100%'), ";}ul{list-style:disc;}ol{list-style:decimal;}blockquote{border-inline-start-color:", euiTheme.border.color, ";border-inline-start-style:solid;}blockquote:not(.euiMarkdownFormat__blockquote){color:", euiTheme.colors.subduedText, ";}h1{", euiTitle(euiThemeContext, 'l'), ";}h2{", euiTitle(euiThemeContext, 'm'), ";}h3{", euiTitle(euiThemeContext, 's'), ";}h4,dt{", euiTitle(euiThemeContext, 'xs'), ";}h5{", euiTitle(euiThemeContext, 'xxs'), ";}h6{", euiTitle(euiThemeContext, 'xxxs'), " text-transform:uppercase;}h1,h2,h3,h4,h5,h6,dt{color:inherit;}pre:not(.euiCodeBlock__pre){white-space:pre-wrap;background:", euiBackgroundColor(euiThemeContext, 'subdued'), ";color:", euiTheme.colors.text, ";}pre:not(.euiCodeBlock__pre),pre:not(.euiCodeBlock__pre) code{display:block;}>:last-child{", logicalCSS('margin-bottom', '0 !important'), ";}kbd{position:relative;display:inline-block;", logicalCSS('padding-vertical', euiTheme.size.xxs), " ", logicalCSS('padding-horizontal', euiTheme.size.xs), " line-height:1;border:", euiTheme.border.width.thin, " solid ", euiTheme.colors.text, ";border-radius:", mathWithUnits(euiTheme.border.radius.small, function (x) {
68
+ euiText: /*#__PURE__*/css(euiText(euiTheme, true), "clear:both;a:not([class]){", euiLinkCSS(euiThemeContext), ";}ul{list-style:disc;}ol{list-style:decimal;}blockquote{border-inline-start-color:", euiTheme.border.color, ";border-inline-start-style:solid;}blockquote:not(.euiMarkdownFormat__blockquote){color:", euiTheme.colors.subduedText, ";}h1{", euiTitle(euiThemeContext, 'l'), ";}h2{", euiTitle(euiThemeContext, 'm'), ";}h3{", euiTitle(euiThemeContext, 's'), ";}h4,dt{", euiTitle(euiThemeContext, 'xs'), ";}h5{", euiTitle(euiThemeContext, 'xxs'), ";}h6{", euiTitle(euiThemeContext, 'xxxs'), " text-transform:uppercase;}h1,h2,h3,h4,h5,h6,dt{color:inherit;}pre:not(.euiCodeBlock__pre){white-space:pre-wrap;background:", euiBackgroundColor(euiThemeContext, 'subdued'), ";color:", euiTheme.colors.text, ";}pre:not(.euiCodeBlock__pre),pre:not(.euiCodeBlock__pre) code{display:block;}>:last-child{", logicalCSS('margin-bottom', '0 !important'), ";}kbd{position:relative;display:inline-block;", logicalCSS('padding-vertical', euiTheme.size.xxs), " ", logicalCSS('padding-horizontal', euiTheme.size.xs), " line-height:1;border:", euiTheme.border.width.thin, " solid ", euiTheme.colors.text, ";border-radius:", mathWithUnits(euiTheme.border.radius.small, function (x) {
69
69
  return x / 2;
70
70
  }), ";};label:euiText;"),
71
71
  constrainedWidth: /*#__PURE__*/css(logicalCSS('max-width', euiTextConstrainedMaxWidth), ";;label:constrainedWidth;"),