@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
@@ -20,11 +20,13 @@ var _classnames = _interopRequireDefault(require("classnames"));
20
20
  var _reactWindow = require("react-window");
21
21
  var _auto_sizer = require("../../auto_sizer");
22
22
  var _highlight = require("../../highlight");
23
+ var _mark = require("../../mark");
24
+ var _text_truncate = require("../../text_truncate");
23
25
  var _selectable_list_item = require("./selectable_list_item");
24
26
  var _react2 = require("@emotion/react");
25
27
  var _excluded = ["data"],
26
- _excluded2 = ["label", "isGroupLabel", "checked", "disabled", "prepend", "append", "ref", "key", "searchableLabel", "data"],
27
- _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"];
28
+ _excluded2 = ["label", "isGroupLabel", "checked", "disabled", "prepend", "append", "ref", "key", "searchableLabel", "data", "truncationProps"],
29
+ _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"];
28
30
  function _getRequireWildcardCache(nodeInterop) { if (typeof WeakMap !== "function") return null; var cacheBabelInterop = new WeakMap(); var cacheNodeInterop = new WeakMap(); return (_getRequireWildcardCache = function _getRequireWildcardCache(nodeInterop) { return nodeInterop ? cacheNodeInterop : cacheBabelInterop; })(nodeInterop); }
29
31
  function _interopRequireWildcard(obj, nodeInterop) { if (!nodeInterop && obj && obj.__esModule) { return obj; } if (obj === null || _typeof(obj) !== "object" && typeof obj !== "function") { return { default: obj }; } var cache = _getRequireWildcardCache(nodeInterop); if (cache && cache.has(obj)) { return cache.get(obj); } var newObj = {}; var hasPropertyDescriptor = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var key in obj) { if (key !== "default" && Object.prototype.hasOwnProperty.call(obj, key)) { var desc = hasPropertyDescriptor ? Object.getOwnPropertyDescriptor(obj, key) : null; if (desc && (desc.get || desc.set)) { Object.defineProperty(newObj, key, desc); } else { newObj[key] = obj[key]; } } } newObj.default = obj; if (cache) { cache.set(obj, newObj); } return newObj; }
30
32
  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; }
@@ -87,20 +89,23 @@ var EuiSelectableList = /*#__PURE__*/function (_Component) {
87
89
  }
88
90
  }
89
91
  });
90
- (0, _defineProperty2.default)((0, _assertThisInitialized2.default)(_this), "ariaSetSize", 0);
91
- (0, _defineProperty2.default)((0, _assertThisInitialized2.default)(_this), "ariaPosInSetMap", {});
92
+ // This utility is necessary to exclude group labels from the aria set count
92
93
  (0, _defineProperty2.default)((0, _assertThisInitialized2.default)(_this), "calculateAriaSetAttrs", function (optionArray) {
93
- _this.ariaPosInSetMap = {};
94
+ var ariaPosInSetMap = {};
94
95
  var latestAriaPosIndex = 0;
95
96
  optionArray.forEach(function (option, index) {
96
97
  if (!option.isGroupLabel) {
97
98
  latestAriaPosIndex++;
98
- _this.ariaPosInSetMap[index] = latestAriaPosIndex;
99
+ ariaPosInSetMap[index] = latestAriaPosIndex;
99
100
  }
100
101
  });
101
- _this.ariaSetSize = latestAriaPosIndex;
102
+ return {
103
+ ariaPosInSetMap: ariaPosInSetMap,
104
+ ariaSetSize: latestAriaPosIndex
105
+ };
102
106
  });
103
107
  (0, _defineProperty2.default)((0, _assertThisInitialized2.default)(_this), "ListRow", /*#__PURE__*/(0, _react.memo)(function (_ref) {
108
+ var _option$textWrap;
104
109
  var data = _ref.data,
105
110
  index = _ref.index,
106
111
  style = _ref.style;
@@ -117,19 +122,20 @@ var EuiSelectableList = /*#__PURE__*/function (_Component) {
117
122
  key = option.key,
118
123
  searchableLabel = option.searchableLabel,
119
124
  _data = option.data,
125
+ _truncationProps = option.truncationProps,
120
126
  optionRest = (0, _objectWithoutProperties2.default)(option, _excluded2);
121
127
  var _this$props2 = _this.props,
122
128
  activeOptionIndex = _this$props2.activeOptionIndex,
123
129
  allowExclusions = _this$props2.allowExclusions,
124
130
  onFocusBadge = _this$props2.onFocusBadge,
125
131
  paddingSize = _this$props2.paddingSize,
126
- searchValue = _this$props2.searchValue,
127
132
  showIcons = _this$props2.showIcons,
128
133
  makeOptionId = _this$props2.makeOptionId,
129
134
  renderOption = _this$props2.renderOption,
130
135
  setActiveOptionIndex = _this$props2.setActiveOptionIndex,
131
136
  searchable = _this$props2.searchable,
132
- textWrap = _this$props2.textWrap;
137
+ searchValue = _this$props2.searchValue,
138
+ isVirtualized = _this$props2.isVirtualized;
133
139
  if (isGroupLabel) {
134
140
  return (0, _react2.jsx)("li", (0, _extends2.default)({
135
141
  role: "presentation",
@@ -139,6 +145,15 @@ var EuiSelectableList = /*#__PURE__*/function (_Component) {
139
145
  }, optionRest), prepend, label, append);
140
146
  }
141
147
  var id = makeOptionId(index);
148
+ var isFocused = activeOptionIndex === index;
149
+
150
+ // Text wrapping
151
+ var canWrap = !isVirtualized;
152
+ var _textWrap = (_option$textWrap = option.textWrap) !== null && _option$textWrap !== void 0 ? _option$textWrap : _this.props.textWrap;
153
+ var textWrap = canWrap ? _textWrap : 'truncate';
154
+
155
+ // Truncation config (if any). If none, CSS truncation is used
156
+ var truncationProps = textWrap === 'truncate' ? _this.getTruncationProps(option, isFocused) : undefined;
142
157
  return (0, _react2.jsx)(_selectable_list_item.EuiSelectableListItem, (0, _extends2.default)({
143
158
  key: id,
144
159
  id: id,
@@ -151,14 +166,14 @@ var EuiSelectableList = /*#__PURE__*/function (_Component) {
151
166
  _this.onAddOrRemoveOption(option, event);
152
167
  },
153
168
  ref: ref ? ref.bind(null, index) : undefined,
154
- isFocused: activeOptionIndex === index,
169
+ isFocused: isFocused,
155
170
  title: searchableLabel || label,
156
171
  checked: checked,
157
172
  disabled: disabled,
158
173
  prepend: prepend,
159
174
  append: append,
160
- "aria-posinset": _this.ariaPosInSetMap[index],
161
- "aria-setsize": _this.ariaSetSize,
175
+ "aria-posinset": _this.state.ariaPosInSetMap[index],
176
+ "aria-setsize": _this.state.ariaSetSize,
162
177
  onFocusBadge: onFocusBadge,
163
178
  allowExclusions: allowExclusions,
164
179
  showIcons: showIcons,
@@ -166,16 +181,18 @@ var EuiSelectableList = /*#__PURE__*/function (_Component) {
166
181
  searchable: searchable,
167
182
  textWrap: textWrap
168
183
  }, optionRest), renderOption ? renderOption( // @ts-ignore complex
169
- _objectSpread(_objectSpread({}, _option), optionData), _this.props.searchValue) : (0, _react2.jsx)(_highlight.EuiHighlight, {
170
- search: searchValue
171
- }, label));
184
+ _objectSpread(_objectSpread({}, _option), optionData), searchValue) : searchValue ? _this.renderSearchedText(label, truncationProps) : truncationProps ? _this.renderTruncatedText(label, truncationProps) : label);
172
185
  }, _reactWindow.areEqual));
173
- (0, _defineProperty2.default)((0, _assertThisInitialized2.default)(_this), "renderVirtualizedList", function (heightIsFull, optionArray) {
186
+ (0, _defineProperty2.default)((0, _assertThisInitialized2.default)(_this), "renderVirtualizedList", function () {
174
187
  if (!_this.props.isVirtualized) return null;
188
+ var _this$state = _this.state,
189
+ optionArray = _this$state.optionArray,
190
+ itemData = _this$state.itemData;
175
191
  var _this$props3 = _this.props,
176
192
  windowProps = _this$props3.windowProps,
177
193
  forcedHeight = _this$props3.height,
178
194
  rowHeight = _this$props3.rowHeight;
195
+ var heightIsFull = forcedHeight === 'full';
179
196
  var virtualizationProps = _objectSpread({
180
197
  className: 'euiSelectableList__list',
181
198
  ref: _this.setListRef,
@@ -183,7 +200,7 @@ var EuiSelectableList = /*#__PURE__*/function (_Component) {
183
200
  innerRef: _this.setListBoxRef,
184
201
  innerElementType: 'ul',
185
202
  itemCount: optionArray.length,
186
- itemData: optionArray,
203
+ itemData: itemData,
187
204
  itemSize: rowHeight,
188
205
  'data-skip-axe': 'scrollable-region-focusable'
189
206
  }, windowProps);
@@ -203,7 +220,9 @@ var EuiSelectableList = /*#__PURE__*/function (_Component) {
203
220
  calculatedHeight = numVisibleOptions * rowHeight;
204
221
  }
205
222
  }
206
- return heightIsFull ? (0, _react2.jsx)(_auto_sizer.EuiAutoSizer, null, function (_ref2) {
223
+ return heightIsFull ? (0, _react2.jsx)(_auto_sizer.EuiAutoSizer, {
224
+ onResize: _this.calculateDefaultOptionWidth
225
+ }, function (_ref2) {
207
226
  var width = _ref2.width,
208
227
  height = _ref2.height;
209
228
  return (0, _react2.jsx)(_reactWindow.FixedSizeList, (0, _extends2.default)({
@@ -211,7 +230,8 @@ var EuiSelectableList = /*#__PURE__*/function (_Component) {
211
230
  height: height
212
231
  }, virtualizationProps), _this.ListRow);
213
232
  }) : (0, _react2.jsx)(_auto_sizer.EuiAutoSizer, {
214
- disableHeight: true
233
+ disableHeight: true,
234
+ onResize: _this.calculateDefaultOptionWidth
215
235
  }, function (_ref3) {
216
236
  var width = _ref3.width;
217
237
  return (0, _react2.jsx)(_reactWindow.FixedSizeList, (0, _extends2.default)({
@@ -220,17 +240,106 @@ var EuiSelectableList = /*#__PURE__*/function (_Component) {
220
240
  }, virtualizationProps), _this.ListRow);
221
241
  });
222
242
  });
243
+ (0, _defineProperty2.default)((0, _assertThisInitialized2.default)(_this), "forceVirtualizedListRowRerender", function () {
244
+ _this.setState({
245
+ itemData: _objectSpread({}, _this.state.optionArray)
246
+ });
247
+ });
248
+ // EuiTextTruncate is expensive perf-wise - we use several utilities here to
249
+ // offset its performance cost
250
+ // and creates a resize observer for
251
+ // each individual item. This logic tries to offset this performance hit by
252
+ // guesstimating a default width for each option
253
+ (0, _defineProperty2.default)((0, _assertThisInitialized2.default)(_this), "focusBadgeOffset", 0);
254
+ (0, _defineProperty2.default)((0, _assertThisInitialized2.default)(_this), "calculateDefaultOptionWidth", function (_ref4) {
255
+ var containerWidth = _ref4.width;
256
+ var _this$props4 = _this.props,
257
+ truncationProps = _this$props4.truncationProps,
258
+ searchable = _this$props4.searchable,
259
+ searchValue = _this$props4.searchValue;
260
+
261
+ // If it's not likely we'll need to use EuiTextTruncate, don't set state/rerender on every panel resize
262
+ var mayTruncate = searchable || truncationProps;
263
+ if (!mayTruncate) return;
264
+ var paddingOffset = _this.props.paddingSize === 'none' ? 0 : 24; // Defaults to 's'
265
+ var checkedIconOffset = _this.props.showIcons === false ? 0 : 28; // Defaults to true
266
+ _this.focusBadgeOffset = _this.props.onFocusBadge === false ? 0 : 46;
267
+ _this.setState({
268
+ defaultOptionWidth: containerWidth - paddingOffset - checkedIconOffset
269
+ });
270
+
271
+ // Potentially force list rows to rerender on dynamic resize as well,
272
+ // but try to do it as lightly as possible
273
+ if (truncationProps || searchable && searchValue) {
274
+ _this.forceVirtualizedListRowRerender();
275
+ }
276
+ });
277
+ (0, _defineProperty2.default)((0, _assertThisInitialized2.default)(_this), "getTruncationProps", function (option, isFocused) {
278
+ // Individual truncation settings should override component-wide settings
279
+ var truncationProps = _objectSpread(_objectSpread({}, _this.props.truncationProps), option.truncationProps);
280
+
281
+ // If we're not actually using EuiTextTruncate, no need to continue
282
+ var hasComplexTruncation = _this.props.searchValue || Object.keys(truncationProps).length > 0;
283
+ if (!hasComplexTruncation) return undefined;
284
+
285
+ // Determine whether we can use the optimized default option width
286
+ var defaultOptionWidth = _this.state.defaultOptionWidth;
287
+ var useDefaultWidth = !option.append && !option.prepend;
288
+ var defaultWidth = useDefaultWidth && defaultOptionWidth ? isFocused ? defaultOptionWidth - _this.focusBadgeOffset : defaultOptionWidth : undefined;
289
+ return _objectSpread({
290
+ width: defaultWidth
291
+ }, truncationProps);
292
+ });
293
+ (0, _defineProperty2.default)((0, _assertThisInitialized2.default)(_this), "renderSearchedText", function (text, truncationProps) {
294
+ var searchValue = _this.props.searchValue;
295
+
296
+ // If truncationProps is undefined, we're using non-virtualized text wrapping
297
+ if (!truncationProps) {
298
+ return (0, _react2.jsx)(_highlight.EuiHighlight, {
299
+ search: searchValue
300
+ }, text);
301
+ }
302
+ var searchPositionStart = text.toLowerCase().indexOf(searchValue.toLowerCase());
303
+ var searchPositionCenter = searchPositionStart + Math.floor(searchValue.length / 2);
304
+ return (0, _react2.jsx)(_text_truncate.EuiTextTruncate, (0, _extends2.default)({}, truncationProps, {
305
+ // When searching, don't allow overriding the truncation settings
306
+ truncation: "startEnd",
307
+ truncationPosition: searchPositionCenter,
308
+ text: text
309
+ }), function (text) {
310
+ return (0, _react2.jsx)(_react.default.Fragment, null, text.length >= searchValue.length ? (0, _react2.jsx)(_highlight.EuiHighlight, {
311
+ search: searchValue
312
+ }, text) :
313
+ // If the available truncated text is shorter than the full search string,
314
+ // just highlight the entire truncated text
315
+ (0, _react2.jsx)(_mark.EuiMark, null, text));
316
+ });
317
+ });
318
+ (0, _defineProperty2.default)((0, _assertThisInitialized2.default)(_this), "renderTruncatedText", function (text, truncationProps) {
319
+ return (
320
+ // For some bizarre reason, truncation in EuiSelectable is off on initial mount
321
+ // (but not on rerender) for Safari and _some_ truncation types in Firefox :|
322
+ // Waiting a tick before calculating truncation seems to smooth over the issue
323
+ (0, _react2.jsx)(_text_truncate.EuiTextTruncate, (0, _extends2.default)({
324
+ calculationDelayMs: 2
325
+ }, truncationProps, {
326
+ text: text
327
+ }), function (text) {
328
+ return text;
329
+ })
330
+ );
331
+ });
223
332
  (0, _defineProperty2.default)((0, _assertThisInitialized2.default)(_this), "onAddOrRemoveOption", function (option, event) {
224
333
  if (option.disabled) {
225
334
  return;
226
335
  }
227
- var _this$props4 = _this.props,
228
- allowExclusions = _this$props4.allowExclusions,
229
- options = _this$props4.options,
230
- _this$props4$visibleO = _this$props4.visibleOptions,
231
- visibleOptions = _this$props4$visibleO === void 0 ? options : _this$props4$visibleO;
232
- _this.props.setActiveOptionIndex(visibleOptions.findIndex(function (_ref4) {
233
- var label = _ref4.label;
336
+ var _this$props5 = _this.props,
337
+ allowExclusions = _this$props5.allowExclusions,
338
+ options = _this$props5.options,
339
+ _this$props5$visibleO = _this$props5.visibleOptions,
340
+ visibleOptions = _this$props5$visibleO === void 0 ? options : _this$props5$visibleO;
341
+ _this.props.setActiveOptionIndex(visibleOptions.findIndex(function (_ref5) {
342
+ var label = _ref5.label;
234
343
  return label === option.label;
235
344
  }), function () {
236
345
  if (option.checked === 'on' && allowExclusions) {
@@ -243,10 +352,10 @@ var EuiSelectableList = /*#__PURE__*/function (_Component) {
243
352
  });
244
353
  });
245
354
  (0, _defineProperty2.default)((0, _assertThisInitialized2.default)(_this), "onAddOption", function (addedOption, event) {
246
- var _this$props5 = _this.props,
247
- onOptionClick = _this$props5.onOptionClick,
248
- options = _this$props5.options,
249
- singleSelection = _this$props5.singleSelection;
355
+ var _this$props6 = _this.props,
356
+ onOptionClick = _this$props6.onOptionClick,
357
+ options = _this$props6.options,
358
+ singleSelection = _this$props6.singleSelection;
250
359
  var changedOption = _objectSpread({}, addedOption);
251
360
  var updatedOptions = options.map(function (option) {
252
361
  // if singleSelection is enabled, uncheck any selected option(s)
@@ -265,10 +374,10 @@ var EuiSelectableList = /*#__PURE__*/function (_Component) {
265
374
  onOptionClick(updatedOptions, event, changedOption);
266
375
  });
267
376
  (0, _defineProperty2.default)((0, _assertThisInitialized2.default)(_this), "onRemoveOption", function (removedOption, event) {
268
- var _this$props6 = _this.props,
269
- onOptionClick = _this$props6.onOptionClick,
270
- singleSelection = _this$props6.singleSelection,
271
- options = _this$props6.options;
377
+ var _this$props7 = _this.props,
378
+ onOptionClick = _this$props7.onOptionClick,
379
+ singleSelection = _this$props7.singleSelection,
380
+ options = _this$props7.options;
272
381
  var changedOption = _objectSpread({}, removedOption);
273
382
  var updatedOptions = options.map(function (option) {
274
383
  var updatedOption = _objectSpread({}, option);
@@ -281,9 +390,9 @@ var EuiSelectableList = /*#__PURE__*/function (_Component) {
281
390
  onOptionClick(updatedOptions, event, changedOption);
282
391
  });
283
392
  (0, _defineProperty2.default)((0, _assertThisInitialized2.default)(_this), "onExcludeOption", function (excludedOption, event) {
284
- var _this$props7 = _this.props,
285
- onOptionClick = _this$props7.onOptionClick,
286
- options = _this$props7.options;
393
+ var _this$props8 = _this.props,
394
+ onOptionClick = _this$props8.onOptionClick,
395
+ options = _this$props8.options;
287
396
  var changedOption = _objectSpread({}, excludedOption);
288
397
  var updatedOptions = options.map(function (option) {
289
398
  var updatedOption = _objectSpread({}, option);
@@ -295,69 +404,83 @@ var EuiSelectableList = /*#__PURE__*/function (_Component) {
295
404
  });
296
405
  onOptionClick(updatedOptions, event, changedOption);
297
406
  });
407
+ var _optionArray = props.visibleOptions || props.options;
408
+ _this.state = _objectSpread({
409
+ defaultOptionWidth: 0,
410
+ optionArray: _optionArray,
411
+ itemData: _objectSpread({}, _optionArray)
412
+ }, _this.calculateAriaSetAttrs(_optionArray));
298
413
  return _this;
299
414
  }
300
415
  (0, _createClass2.default)(EuiSelectableList, [{
301
416
  key: "componentDidUpdate",
302
- value: function componentDidUpdate() {
303
- var activeOptionIndex = this.props.activeOptionIndex;
417
+ value: function componentDidUpdate(prevProps) {
418
+ var _this$props9 = this.props,
419
+ activeOptionIndex = _this$props9.activeOptionIndex,
420
+ visibleOptions = _this$props9.visibleOptions,
421
+ options = _this$props9.options;
304
422
  if (this.listBoxRef && this.props.searchable !== true) {
305
423
  this.listBoxRef.setAttribute('aria-activedescendant', "".concat(this.props.makeOptionId(activeOptionIndex)));
306
424
  }
307
- if (this.listRef && typeof this.props.activeOptionIndex !== 'undefined') {
308
- this.listRef.scrollToItem(this.props.activeOptionIndex, 'auto');
425
+ if (this.listRef && typeof activeOptionIndex !== 'undefined') {
426
+ this.listRef.scrollToItem(activeOptionIndex, 'auto');
427
+ }
428
+ if (prevProps.visibleOptions !== visibleOptions || prevProps.options !== options) {
429
+ var optionArray = visibleOptions || options;
430
+ this.setState(_objectSpread({
431
+ optionArray: optionArray,
432
+ itemData: _objectSpread({}, optionArray)
433
+ }, this.calculateAriaSetAttrs(optionArray)));
309
434
  }
310
435
  }
311
436
  }, {
312
437
  key: "render",
313
438
  value: function render() {
314
439
  var _this2 = this;
315
- var _this$props8 = this.props,
316
- className = _this$props8.className,
317
- options = _this$props8.options,
318
- searchValue = _this$props8.searchValue,
319
- onOptionClick = _this$props8.onOptionClick,
320
- renderOption = _this$props8.renderOption,
321
- forcedHeight = _this$props8.height,
322
- windowProps = _this$props8.windowProps,
323
- rowHeight = _this$props8.rowHeight,
324
- activeOptionIndex = _this$props8.activeOptionIndex,
325
- makeOptionId = _this$props8.makeOptionId,
326
- showIcons = _this$props8.showIcons,
327
- singleSelection = _this$props8.singleSelection,
328
- visibleOptions = _this$props8.visibleOptions,
329
- allowExclusions = _this$props8.allowExclusions,
330
- bordered = _this$props8.bordered,
331
- paddingSize = _this$props8.paddingSize,
332
- searchable = _this$props8.searchable,
333
- onFocusBadge = _this$props8.onFocusBadge,
334
- listId = _this$props8.listId,
335
- setActiveOptionIndex = _this$props8.setActiveOptionIndex,
336
- ariaLabel = _this$props8['aria-label'],
337
- ariaLabelledby = _this$props8['aria-labelledby'],
338
- ariaDescribedby = _this$props8['aria-describedby'],
339
- role = _this$props8.role,
340
- isVirtualized = _this$props8.isVirtualized,
341
- textWrap = _this$props8.textWrap,
342
- rest = (0, _objectWithoutProperties2.default)(_this$props8, _excluded3);
343
- var optionArray = visibleOptions || options;
344
- this.calculateAriaSetAttrs(optionArray);
345
- var heightIsFull = forcedHeight === 'full';
440
+ var _this$props10 = this.props,
441
+ className = _this$props10.className,
442
+ options = _this$props10.options,
443
+ searchValue = _this$props10.searchValue,
444
+ onOptionClick = _this$props10.onOptionClick,
445
+ renderOption = _this$props10.renderOption,
446
+ forcedHeight = _this$props10.height,
447
+ windowProps = _this$props10.windowProps,
448
+ rowHeight = _this$props10.rowHeight,
449
+ activeOptionIndex = _this$props10.activeOptionIndex,
450
+ makeOptionId = _this$props10.makeOptionId,
451
+ showIcons = _this$props10.showIcons,
452
+ singleSelection = _this$props10.singleSelection,
453
+ visibleOptions = _this$props10.visibleOptions,
454
+ allowExclusions = _this$props10.allowExclusions,
455
+ bordered = _this$props10.bordered,
456
+ paddingSize = _this$props10.paddingSize,
457
+ searchable = _this$props10.searchable,
458
+ onFocusBadge = _this$props10.onFocusBadge,
459
+ listId = _this$props10.listId,
460
+ setActiveOptionIndex = _this$props10.setActiveOptionIndex,
461
+ ariaLabel = _this$props10['aria-label'],
462
+ ariaLabelledby = _this$props10['aria-labelledby'],
463
+ ariaDescribedby = _this$props10['aria-describedby'],
464
+ role = _this$props10.role,
465
+ isVirtualized = _this$props10.isVirtualized,
466
+ textWrap = _this$props10.textWrap,
467
+ truncationProps = _this$props10.truncationProps,
468
+ rest = (0, _objectWithoutProperties2.default)(_this$props10, _excluded3);
346
469
  var classes = (0, _classnames.default)('euiSelectableList', {
347
- 'euiSelectableList-fullHeight': heightIsFull,
470
+ 'euiSelectableList-fullHeight': forcedHeight === 'full',
348
471
  'euiSelectableList-bordered': bordered
349
472
  }, className);
350
473
  return (0, _react2.jsx)("div", (0, _extends2.default)({
351
474
  className: classes
352
- }, rest), isVirtualized ? this.renderVirtualizedList(heightIsFull, optionArray) : (0, _react2.jsx)("div", {
475
+ }, rest), isVirtualized ? this.renderVirtualizedList() : (0, _react2.jsx)("div", {
353
476
  className: "euiSelectableList__list",
354
477
  ref: this.removeScrollableTabStop
355
478
  }, (0, _react2.jsx)("ul", {
356
479
  ref: this.setListBoxRef
357
- }, optionArray.map(function (_, index) {
480
+ }, this.state.optionArray.map(function (_, index) {
358
481
  return /*#__PURE__*/_react.default.createElement(_this2.ListRow, {
359
482
  key: index,
360
- data: optionArray,
483
+ data: _this2.state.optionArray,
361
484
  index: index
362
485
  }, null);
363
486
  }))));
@@ -61,7 +61,7 @@ var euiScaleText = function euiScaleText(euiThemeContext, options) {
61
61
  var blockQuoteBorderWidth = (0, _global_styling.mathWithUnits)(fontSize, function (x) {
62
62
  return x / 4;
63
63
  });
64
- 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((0, _global_styling.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((0, _global_styling.logicalCSS)('margin-top', headingMarginTop), "\n }\n\n &:not(:last-child) {\n ").concat((0, _global_styling.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((0, _global_styling.logicalCSS)('margin-top', headingMarginTop), "\n }\n\n &:not(:last-child) {\n ").concat((0, _global_styling.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((0, _global_styling.logicalCSS)('margin-top', headingMarginTop), "\n }\n\n &:not(:last-child) {\n ").concat((0, _global_styling.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((0, _global_styling.logicalCSS)('margin-top', headingMarginTop), "\n }\n\n &:not(:last-child) {\n ").concat((0, _global_styling.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((0, _global_styling.logicalCSS)('margin-top', headingMarginTop), "\n }\n\n &:not(:last-child) {\n ").concat((0, _global_styling.logicalCSS)('margin-bottom', headingMarginBottom), "\n }\n }\n\n p,\n dl,\n blockquote,\n img,\n pre,\n > ul,\n > ol {\n ").concat((0, _global_styling.logicalCSS)('margin-bottom', lineHeightSize), "\n }\n\n ul,\n ol {\n ").concat((0, _global_styling.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((0, _global_styling.logicalShorthandCSS)('padding', "0 ".concat(fontSize)), "\n ").concat((0, _global_styling.logicalCSS)('border-left-width', blockQuoteBorderWidth), "\n ").concat((0, _global_styling.logicalCSS)('margin-bottom', fontSize), "\n }\n\n dd + dt {\n ").concat((0, _global_styling.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((0, _global_styling.euiFontSize)(euiThemeContext, 'xs', options).fontSize, ";\n color: ").concat(euiTheme.colors.text, ";\n }\n\n small {\n font-size: ").concat((0, _global_styling.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(
64
+ 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((0, _global_styling.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((0, _global_styling.logicalCSS)('margin-top', headingMarginTop), "\n }\n\n &:not(:last-child) {\n ").concat((0, _global_styling.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((0, _global_styling.logicalCSS)('margin-top', headingMarginTop), "\n }\n\n &:not(:last-child) {\n ").concat((0, _global_styling.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((0, _global_styling.logicalCSS)('margin-top', headingMarginTop), "\n }\n\n &:not(:last-child) {\n ").concat((0, _global_styling.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((0, _global_styling.logicalCSS)('margin-top', headingMarginTop), "\n }\n\n &:not(:last-child) {\n ").concat((0, _global_styling.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((0, _global_styling.logicalCSS)('margin-top', headingMarginTop), "\n }\n\n &:not(:last-child) {\n ").concat((0, _global_styling.logicalCSS)('margin-bottom', headingMarginBottom), "\n }\n }\n\n p,\n dl,\n blockquote,\n pre,\n > ul,\n > ol {\n ").concat((0, _global_styling.logicalCSS)('margin-bottom', lineHeightSize), "\n }\n\n ul,\n ol {\n ").concat((0, _global_styling.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((0, _global_styling.logicalShorthandCSS)('padding', "0 ".concat(fontSize)), "\n ").concat((0, _global_styling.logicalCSS)('border-left-width', blockQuoteBorderWidth), "\n ").concat((0, _global_styling.logicalCSS)('margin-bottom', fontSize), "\n }\n\n dd + dt {\n ").concat((0, _global_styling.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((0, _global_styling.euiFontSize)(euiThemeContext, 'xs', options).fontSize, ";\n color: ").concat(euiTheme.colors.text, ";\n }\n\n small {\n font-size: ").concat((0, _global_styling.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(
65
65
  // when textSize is 'm', the 'kbd' element gets a line between the text and the border-bottom
66
66
  _customScale === 'm' ? "\n kbd {\n ".concat((0, _global_styling.logicalCSS)('padding-bottom', euiTheme.size.xs), "\n /* Ensures the shape still looks like a square when only one character */\n ").concat((0, _global_styling.logicalCSS)('min-width', euiTheme.size.l), "\n ").concat((0, _global_styling.logicalTextAlignCSS)('center'), "\n }\n \n kbd::after {\n content: '';\n ").concat((0, _global_styling.logicalCSS)('border-bottom', "".concat(euiTheme.border.width.thin, " solid ").concat(euiTheme.colors.text)), "\n position: absolute;\n ").concat((0, _global_styling.logicalCSS)('bottom', euiTheme.size.xxs), "\n ").concat((0, _global_styling.logicalCSS)('left', 0), "\n ").concat((0, _global_styling.logicalCSS)('width', '100%'), "\n }") : '', "\n ");
67
67
  };
@@ -72,7 +72,7 @@ var euiScaleText = function euiScaleText(euiThemeContext, options) {
72
72
  var euiTextStyles = function euiTextStyles(euiThemeContext) {
73
73
  var euiTheme = euiThemeContext.euiTheme;
74
74
  return {
75
- euiText: /*#__PURE__*/(0, _react.css)(euiText(euiTheme, true), "clear:both;a:not([class]){", (0, _link.euiLinkCSS)(euiThemeContext), ";}img{display:block;", (0, _global_styling.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{", (0, _title.euiTitle)(euiThemeContext, 'l'), ";}h2{", (0, _title.euiTitle)(euiThemeContext, 'm'), ";}h3{", (0, _title.euiTitle)(euiThemeContext, 's'), ";}h4,dt{", (0, _title.euiTitle)(euiThemeContext, 'xs'), ";}h5{", (0, _title.euiTitle)(euiThemeContext, 'xxs'), ";}h6{", (0, _title.euiTitle)(euiThemeContext, 'xxxs'), " text-transform:uppercase;}h1,h2,h3,h4,h5,h6,dt{color:inherit;}pre:not(.euiCodeBlock__pre){white-space:pre-wrap;background:", (0, _global_styling.euiBackgroundColor)(euiThemeContext, 'subdued'), ";color:", euiTheme.colors.text, ";}pre:not(.euiCodeBlock__pre),pre:not(.euiCodeBlock__pre) code{display:block;}>:last-child{", (0, _global_styling.logicalCSS)('margin-bottom', '0 !important'), ";}kbd{position:relative;display:inline-block;", (0, _global_styling.logicalCSS)('padding-vertical', euiTheme.size.xxs), " ", (0, _global_styling.logicalCSS)('padding-horizontal', euiTheme.size.xs), " line-height:1;border:", euiTheme.border.width.thin, " solid ", euiTheme.colors.text, ";border-radius:", (0, _global_styling.mathWithUnits)(euiTheme.border.radius.small, function (x) {
75
+ euiText: /*#__PURE__*/(0, _react.css)(euiText(euiTheme, true), "clear:both;a:not([class]){", (0, _link.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{", (0, _title.euiTitle)(euiThemeContext, 'l'), ";}h2{", (0, _title.euiTitle)(euiThemeContext, 'm'), ";}h3{", (0, _title.euiTitle)(euiThemeContext, 's'), ";}h4,dt{", (0, _title.euiTitle)(euiThemeContext, 'xs'), ";}h5{", (0, _title.euiTitle)(euiThemeContext, 'xxs'), ";}h6{", (0, _title.euiTitle)(euiThemeContext, 'xxxs'), " text-transform:uppercase;}h1,h2,h3,h4,h5,h6,dt{color:inherit;}pre:not(.euiCodeBlock__pre){white-space:pre-wrap;background:", (0, _global_styling.euiBackgroundColor)(euiThemeContext, 'subdued'), ";color:", euiTheme.colors.text, ";}pre:not(.euiCodeBlock__pre),pre:not(.euiCodeBlock__pre) code{display:block;}>:last-child{", (0, _global_styling.logicalCSS)('margin-bottom', '0 !important'), ";}kbd{position:relative;display:inline-block;", (0, _global_styling.logicalCSS)('padding-vertical', euiTheme.size.xxs), " ", (0, _global_styling.logicalCSS)('padding-horizontal', euiTheme.size.xs), " line-height:1;border:", euiTheme.border.width.thin, " solid ", euiTheme.colors.text, ";border-radius:", (0, _global_styling.mathWithUnits)(euiTheme.border.radius.small, function (x) {
76
76
  return x / 2;
77
77
  }), ";};label:euiText;"),
78
78
  constrainedWidth: /*#__PURE__*/(0, _react.css)((0, _global_styling.logicalCSS)('max-width', euiTextConstrainedMaxWidth), ";;label:constrainedWidth;"),
@@ -17,7 +17,7 @@ var _utils = require("./utils");
17
17
  var _text_truncate = require("./text_truncate.styles");
18
18
  var _react2 = require("@emotion/react");
19
19
  var _excluded = ["width", "onResize"],
20
- _excluded2 = ["width", "children", "text", "truncation", "truncationOffset", "truncationPosition", "ellipsis", "containerRef", "className"],
20
+ _excluded2 = ["width", "children", "text", "truncation", "truncationOffset", "truncationPosition", "ellipsis", "calculationDelayMs", "containerRef", "className"],
21
21
  _excluded3 = ["onResize"];
22
22
  /*
23
23
  * Copyright Elasticsearch B.V. and/or licensed to Elasticsearch B.V. under one
@@ -51,6 +51,7 @@ var EuiTextTruncateWithWidth = function EuiTextTruncateWithWidth(_ref2) {
51
51
  truncationPosition = _ref2.truncationPosition,
52
52
  _ref2$ellipsis = _ref2.ellipsis,
53
53
  ellipsis = _ref2$ellipsis === void 0 ? '…' : _ref2$ellipsis,
54
+ calculationDelayMs = _ref2.calculationDelayMs,
54
55
  containerRef = _ref2.containerRef,
55
56
  className = _ref2.className,
56
57
  rest = (0, _objectWithoutProperties2.default)(_ref2, _excluded2);
@@ -61,6 +62,19 @@ var EuiTextTruncateWithWidth = function EuiTextTruncateWithWidth(_ref2) {
61
62
  setContainerEl = _useState2[1];
62
63
  var refs = (0, _services.useCombinedRefs)([setContainerEl, containerRef]);
63
64
 
65
+ // If necessary, wait a tick on mount before truncating
66
+ var _useState3 = (0, _react.useState)(!calculationDelayMs),
67
+ _useState4 = (0, _slicedToArray2.default)(_useState3, 2),
68
+ ready = _useState4[0],
69
+ setReady = _useState4[1];
70
+ (0, _react.useEffect)(function () {
71
+ if (calculationDelayMs) {
72
+ setTimeout(function () {
73
+ return setReady(true);
74
+ }, calculationDelayMs);
75
+ }
76
+ }, [calculationDelayMs]);
77
+
64
78
  // Handle exceptions where we need to override the passed props
65
79
  var _useMemo = (0, _react.useMemo)(function () {
66
80
  var truncation = _truncation;
@@ -85,7 +99,8 @@ var EuiTextTruncateWithWidth = function EuiTextTruncateWithWidth(_ref2) {
85
99
  truncationOffset = _useMemo.truncationOffset;
86
100
  var truncatedText = (0, _react.useMemo)(function () {
87
101
  var truncatedText = '';
88
- if (!containerEl || !width) return truncatedText;
102
+ if (!ready || !containerEl) return text;
103
+ if (!width) return truncatedText;
89
104
  var utils = new _utils.TruncationUtils({
90
105
  fullText: text,
91
106
  ellipsis: ellipsis,
@@ -117,7 +132,7 @@ var EuiTextTruncateWithWidth = function EuiTextTruncateWithWidth(_ref2) {
117
132
  }
118
133
  }
119
134
  return truncatedText;
120
- }, [width, text, truncation, truncationOffset, truncationPosition, ellipsis, containerEl]);
135
+ }, [ready, width, text, truncation, truncationOffset, truncationPosition, ellipsis, containerEl]);
121
136
  var isTruncating = truncatedText !== text;
122
137
  return (0, _react2.jsx)("div", (0, _extends2.default)({
123
138
  className: (0, _classnames.default)('euiTextTruncate', className),
@@ -141,10 +156,10 @@ var EuiTextTruncateWithWidth = function EuiTextTruncateWithWidth(_ref2) {
141
156
  var EuiTextTruncateWithResizeObserver = function EuiTextTruncateWithResizeObserver(_ref3) {
142
157
  var _onResize = _ref3.onResize,
143
158
  props = (0, _objectWithoutProperties2.default)(_ref3, _excluded3);
144
- var _useState3 = (0, _react.useState)(0),
145
- _useState4 = (0, _slicedToArray2.default)(_useState3, 2),
146
- width = _useState4[0],
147
- setWidth = _useState4[1];
159
+ var _useState5 = (0, _react.useState)(0),
160
+ _useState6 = (0, _slicedToArray2.default)(_useState5, 2),
161
+ width = _useState6[0],
162
+ setWidth = _useState6[1];
148
163
  var onResize = (0, _react.useCallback)(function (_ref4) {
149
164
  var width = _ref4.width;
150
165
  setWidth(width);
@@ -156,6 +171,8 @@ var EuiTextTruncateWithResizeObserver = function EuiTextTruncateWithResizeObserv
156
171
  return (0, _react2.jsx)(EuiTextTruncateWithWidth, (0, _extends2.default)({
157
172
  width: width,
158
173
  containerRef: ref
159
- }, props));
174
+ }, props, {
175
+ "data-resize-observer": "true"
176
+ }));
160
177
  });
161
178
  };
package/package.json CHANGED
@@ -1,14 +1,14 @@
1
1
  {
2
2
  "name": "@elastic/eui",
3
3
  "description": "Elastic UI Component Library",
4
- "version": "91.0.0",
4
+ "version": "91.1.0",
5
5
  "license": "SEE LICENSE IN LICENSE.txt",
6
6
  "main": "lib",
7
7
  "module": "es",
8
8
  "types": "eui.d.ts",
9
- "docker_image": "18.18.2",
9
+ "docker_image": "20.9.0",
10
10
  "engines": {
11
- "node": "16.x || 18.x || >=20.0"
11
+ "node": "16.x || 18.x || >=20.x"
12
12
  },
13
13
  "sideEffects": [
14
14
  "*.css",
@@ -155,7 +155,7 @@
155
155
  "argparse": "^2.0.1",
156
156
  "assert": "^2.0.0",
157
157
  "autoprefixer": "^9.8.6",
158
- "axe-core": "^4.4.1",
158
+ "axe-core": "^4.8.2",
159
159
  "babel-jest": "^24.1.0",
160
160
  "babel-loader": "^9.1.2",
161
161
  "babel-plugin-add-module-exports": "^1.0.4",