@elastic/eui 93.2.0 → 93.4.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 (418) hide show
  1. package/dist/eui_charts_theme.d.ts +9 -0
  2. package/dist/eui_charts_theme.js +56 -14
  3. package/dist/eui_charts_theme.js.map +1 -1
  4. package/dist/eui_theme_dark.css +3 -0
  5. package/dist/eui_theme_dark.min.css +1 -1
  6. package/dist/eui_theme_light.css +3 -0
  7. package/dist/eui_theme_light.min.css +1 -1
  8. package/es/components/breadcrumbs/_breadcrumb_content.js +362 -0
  9. package/es/components/breadcrumbs/_breadcrumb_content.styles.js +48 -0
  10. package/es/components/breadcrumbs/breadcrumb.js +10 -324
  11. package/es/components/breadcrumbs/breadcrumb.styles.js +5 -27
  12. package/es/components/breadcrumbs/breadcrumbs.js +8 -6
  13. package/es/components/breadcrumbs/types.js +1 -0
  14. package/es/components/button/button_display/_button_display.js +2 -3
  15. package/es/components/button/button_empty/button_empty.js +2 -3
  16. package/es/components/button/button_group/button_group.js +19 -7
  17. package/es/components/button/button_group/button_group.styles.js +11 -14
  18. package/es/components/button/button_group/button_group_button.js +59 -5
  19. package/es/components/button/button_group/button_group_button.styles.js +39 -3
  20. package/es/components/button/button_icon/button_icon.js +4 -5
  21. package/es/components/button/button_icon/button_icon.styles.js +11 -3
  22. package/es/components/datagrid/body/cell/data_grid_cell.js +102 -59
  23. package/es/components/datagrid/body/cell/data_grid_cell_actions.js +24 -18
  24. package/es/components/datagrid/body/cell/data_grid_cell_popover.js +64 -56
  25. package/es/components/datagrid/body/cell/data_grid_cell_wrapper.js +34 -31
  26. package/es/components/datagrid/body/cell/index.js +1 -1
  27. package/es/components/datagrid/body/data_grid_body.js +14 -0
  28. package/es/components/datagrid/body/data_grid_body_custom.js +54 -35
  29. package/es/components/datagrid/body/data_grid_body_virtualized.js +87 -56
  30. package/es/components/datagrid/body/data_grid_row_manager.js +7 -5
  31. package/es/components/datagrid/body/footer/use_data_grid_footer.js +1 -2
  32. package/es/components/datagrid/body/header/data_grid_control_header_cell.js +5 -4
  33. package/es/components/datagrid/body/header/data_grid_header_cell.js +73 -53
  34. package/es/components/datagrid/body/header/data_grid_header_row.js +15 -551
  35. package/es/components/datagrid/body/header/use_data_grid_header.js +7 -6
  36. package/es/components/datagrid/controls/column_selector.js +126 -123
  37. package/es/components/datagrid/controls/column_sorting.js +605 -103
  38. package/es/components/datagrid/controls/column_sorting_draggable.js +24 -22
  39. package/es/components/datagrid/controls/display_selector.js +109 -107
  40. package/es/components/datagrid/data_grid.a11y.js +13 -12
  41. package/es/components/datagrid/data_grid.js +47 -22
  42. package/es/components/datagrid/utils/col_widths.js +12 -8
  43. package/es/components/datagrid/utils/focus.js +10 -8
  44. package/es/components/datagrid/utils/grid_height_width.js +31 -30
  45. package/es/components/datagrid/utils/ref.js +1 -1
  46. package/es/components/datagrid/utils/row_heights.js +2 -2
  47. package/es/components/datagrid/utils/sorting.js +29 -27
  48. package/es/components/date_picker/super_date_picker/super_date_picker.js +9 -0
  49. package/es/components/date_picker/super_date_picker/super_update_button.js +57 -29
  50. package/es/components/facet/facet_button.styles.js +1 -2
  51. package/es/components/flex/flex_grid.js +22 -8
  52. package/es/components/flex/flex_grid.styles.js +13 -6
  53. package/es/components/flex/flex_group.js +10 -11
  54. package/es/components/flex/flex_item.js +9 -11
  55. package/es/components/flex/flex_item.styles.js +107 -122
  56. package/es/components/flyout/flyout.js +16 -18
  57. package/es/components/header/header_breadcrumbs/header_breadcrumbs.js +7 -7
  58. package/es/components/icon/icon.js +13 -16
  59. package/es/components/icon/icon.styles.js +6 -9
  60. package/es/components/link/external_link_icon.js +11 -8
  61. package/es/components/link/link.js +2 -3
  62. package/es/components/link/link.styles.js +4 -10
  63. package/es/components/modal/confirm_modal.js +2 -1
  64. package/es/components/modal/modal.js +12 -3
  65. package/es/components/observer/resize_observer/resize_observer.js +15 -24
  66. package/es/components/page/page_header/page_header_content.js +4 -2
  67. package/es/components/progress/progress.styles.js +2 -2
  68. package/es/components/skeleton/skeleton_circle.js +2 -3
  69. package/es/components/skeleton/skeleton_rectangle.js +2 -3
  70. package/es/components/skeleton/skeleton_text.js +16 -12
  71. package/es/components/skeleton/skeleton_title.js +2 -3
  72. package/es/components/spacer/spacer.js +2 -3
  73. package/es/components/text/text.js +2 -3
  74. package/es/components/text/text_align.js +1 -2
  75. package/es/components/text/text_align.styles.js +5 -7
  76. package/es/components/text/text_color.js +2 -3
  77. package/es/components/title/title.js +2 -3
  78. package/es/components/title/title.styles.js +0 -7
  79. package/es/components/toast/global_toast_list.js +70 -73
  80. package/es/components/toast/toast.js +27 -42
  81. package/es/components/toast/toast.styles.js +2 -17
  82. package/es/global_styling/mixins/_typography.js +17 -6
  83. package/es/services/color/eui_palettes.js +21 -13
  84. package/es/services/color/index.js +1 -1
  85. package/es/services/hooks/index.js +1 -0
  86. package/es/services/hooks/useDeepEqual.js +23 -0
  87. package/es/services/index.js +1 -1
  88. package/es/services/theme/index.js +1 -1
  89. package/es/services/theme/style_memoization.js +47 -14
  90. package/es/themes/amsterdam/global_styling/mixins/button.js +47 -24
  91. package/eui.d.ts +2862 -2748
  92. package/i18ntokens.json +267 -267
  93. package/lib/components/breadcrumbs/_breadcrumb_content.js +372 -0
  94. package/lib/components/breadcrumbs/_breadcrumb_content.styles.js +55 -0
  95. package/lib/components/breadcrumbs/breadcrumb.js +11 -328
  96. package/lib/components/breadcrumbs/breadcrumb.styles.js +5 -29
  97. package/lib/components/breadcrumbs/breadcrumbs.js +7 -5
  98. package/lib/components/breadcrumbs/types.js +5 -0
  99. package/lib/components/button/button_display/_button_display.js +1 -2
  100. package/lib/components/button/button_empty/button_empty.js +1 -2
  101. package/lib/components/button/button_group/button_group.js +18 -6
  102. package/lib/components/button/button_group/button_group.styles.js +11 -14
  103. package/lib/components/button/button_group/button_group_button.js +59 -5
  104. package/lib/components/button/button_group/button_group_button.styles.js +45 -11
  105. package/lib/components/button/button_icon/button_icon.js +3 -4
  106. package/lib/components/button/button_icon/button_icon.styles.js +10 -2
  107. package/lib/components/datagrid/body/cell/data_grid_cell.js +100 -58
  108. package/lib/components/datagrid/body/cell/data_grid_cell_actions.js +24 -18
  109. package/lib/components/datagrid/body/cell/data_grid_cell_popover.js +63 -55
  110. package/lib/components/datagrid/body/cell/data_grid_cell_wrapper.js +34 -31
  111. package/lib/components/datagrid/body/cell/index.js +2 -2
  112. package/lib/components/datagrid/body/data_grid_body.js +14 -0
  113. package/lib/components/datagrid/body/data_grid_body_custom.js +53 -34
  114. package/lib/components/datagrid/body/data_grid_body_virtualized.js +86 -55
  115. package/lib/components/datagrid/body/data_grid_row_manager.js +6 -4
  116. package/lib/components/datagrid/body/footer/use_data_grid_footer.js +1 -2
  117. package/lib/components/datagrid/body/header/data_grid_control_header_cell.js +8 -4
  118. package/lib/components/datagrid/body/header/data_grid_header_cell.js +72 -52
  119. package/lib/components/datagrid/body/header/data_grid_header_row.js +14 -550
  120. package/lib/components/datagrid/body/header/use_data_grid_header.js +7 -6
  121. package/lib/components/datagrid/controls/column_selector.js +126 -123
  122. package/lib/components/datagrid/controls/column_sorting.js +615 -110
  123. package/lib/components/datagrid/controls/column_sorting_draggable.js +27 -22
  124. package/lib/components/datagrid/controls/display_selector.js +109 -107
  125. package/lib/components/datagrid/data_grid.a11y.js +13 -12
  126. package/lib/components/datagrid/data_grid.js +45 -20
  127. package/lib/components/datagrid/utils/col_widths.js +12 -8
  128. package/lib/components/datagrid/utils/focus.js +10 -8
  129. package/lib/components/datagrid/utils/grid_height_width.js +29 -28
  130. package/lib/components/datagrid/utils/ref.js +1 -1
  131. package/lib/components/datagrid/utils/row_heights.js +1 -1
  132. package/lib/components/datagrid/utils/sorting.js +31 -29
  133. package/lib/components/date_picker/super_date_picker/super_date_picker.js +9 -0
  134. package/lib/components/date_picker/super_date_picker/super_update_button.js +57 -29
  135. package/lib/components/facet/facet_button.styles.js +1 -2
  136. package/lib/components/flex/flex_grid.js +23 -7
  137. package/lib/components/flex/flex_grid.styles.js +13 -6
  138. package/lib/components/flex/flex_group.js +10 -10
  139. package/lib/components/flex/flex_item.js +13 -13
  140. package/lib/components/flex/flex_item.styles.js +107 -122
  141. package/lib/components/flyout/flyout.js +16 -18
  142. package/lib/components/header/header_breadcrumbs/header_breadcrumbs.js +7 -7
  143. package/lib/components/icon/icon.js +12 -15
  144. package/lib/components/icon/icon.styles.js +5 -8
  145. package/lib/components/link/external_link_icon.js +10 -7
  146. package/lib/components/link/link.js +1 -2
  147. package/lib/components/link/link.styles.js +6 -14
  148. package/lib/components/modal/confirm_modal.js +2 -1
  149. package/lib/components/modal/modal.js +12 -3
  150. package/lib/components/observer/resize_observer/resize_observer.js +15 -24
  151. package/lib/components/page/page_header/page_header_content.js +4 -2
  152. package/lib/components/progress/progress.styles.js +1 -1
  153. package/lib/components/skeleton/skeleton_circle.js +1 -2
  154. package/lib/components/skeleton/skeleton_rectangle.js +1 -2
  155. package/lib/components/skeleton/skeleton_text.js +18 -11
  156. package/lib/components/skeleton/skeleton_title.js +1 -2
  157. package/lib/components/spacer/spacer.js +1 -2
  158. package/lib/components/text/text.js +1 -2
  159. package/lib/components/text/text_align.js +1 -2
  160. package/lib/components/text/text_align.styles.js +5 -7
  161. package/lib/components/text/text_color.js +1 -2
  162. package/lib/components/title/title.js +1 -2
  163. package/lib/components/title/title.styles.js +2 -10
  164. package/lib/components/toast/global_toast_list.js +68 -71
  165. package/lib/components/toast/toast.js +25 -40
  166. package/lib/components/toast/toast.styles.js +11 -25
  167. package/lib/global_styling/mixins/_typography.js +27 -19
  168. package/lib/services/color/eui_palettes.js +24 -14
  169. package/lib/services/color/index.js +14 -0
  170. package/lib/services/hooks/index.js +11 -0
  171. package/lib/services/hooks/useDeepEqual.js +30 -0
  172. package/lib/services/index.js +15 -1
  173. package/lib/services/theme/index.js +6 -0
  174. package/lib/services/theme/style_memoization.js +49 -16
  175. package/lib/themes/amsterdam/global_styling/mixins/button.js +49 -25
  176. package/optimize/es/components/breadcrumbs/_breadcrumb_content.js +153 -0
  177. package/optimize/es/components/breadcrumbs/_breadcrumb_content.styles.js +48 -0
  178. package/optimize/es/components/breadcrumbs/breadcrumb.js +10 -109
  179. package/optimize/es/components/breadcrumbs/breadcrumb.styles.js +5 -27
  180. package/optimize/es/components/breadcrumbs/breadcrumbs.js +4 -4
  181. package/optimize/es/components/breadcrumbs/types.js +1 -0
  182. package/optimize/es/components/button/button_display/_button_display.js +2 -3
  183. package/optimize/es/components/button/button_empty/button_empty.js +2 -3
  184. package/optimize/es/components/button/button_group/button_group.js +5 -7
  185. package/optimize/es/components/button/button_group/button_group.styles.js +11 -14
  186. package/optimize/es/components/button/button_group/button_group_button.js +36 -4
  187. package/optimize/es/components/button/button_group/button_group_button.styles.js +39 -3
  188. package/optimize/es/components/button/button_icon/button_icon.js +4 -5
  189. package/optimize/es/components/button/button_icon/button_icon.styles.js +8 -3
  190. package/optimize/es/components/datagrid/body/cell/data_grid_cell.js +83 -56
  191. package/optimize/es/components/datagrid/body/cell/data_grid_cell_actions.js +24 -18
  192. package/optimize/es/components/datagrid/body/cell/data_grid_cell_popover.js +64 -56
  193. package/optimize/es/components/datagrid/body/cell/data_grid_cell_wrapper.js +34 -31
  194. package/optimize/es/components/datagrid/body/cell/index.js +1 -1
  195. package/optimize/es/components/datagrid/body/data_grid_body_custom.js +40 -35
  196. package/optimize/es/components/datagrid/body/data_grid_body_virtualized.js +71 -49
  197. package/optimize/es/components/datagrid/body/data_grid_row_manager.js +7 -5
  198. package/optimize/es/components/datagrid/body/footer/use_data_grid_footer.js +1 -2
  199. package/optimize/es/components/datagrid/body/header/data_grid_control_header_cell.js +4 -3
  200. package/optimize/es/components/datagrid/body/header/data_grid_header_cell.js +65 -49
  201. package/optimize/es/components/datagrid/body/header/data_grid_header_row.js +15 -13
  202. package/optimize/es/components/datagrid/body/header/use_data_grid_header.js +7 -6
  203. package/optimize/es/components/datagrid/controls/column_selector.js +126 -123
  204. package/optimize/es/components/datagrid/controls/column_sorting.js +121 -103
  205. package/optimize/es/components/datagrid/controls/column_sorting_draggable.js +24 -22
  206. package/optimize/es/components/datagrid/controls/display_selector.js +109 -107
  207. package/optimize/es/components/datagrid/data_grid.a11y.js +13 -12
  208. package/optimize/es/components/datagrid/data_grid.js +47 -22
  209. package/optimize/es/components/datagrid/utils/col_widths.js +9 -5
  210. package/optimize/es/components/datagrid/utils/focus.js +10 -8
  211. package/optimize/es/components/datagrid/utils/grid_height_width.js +31 -30
  212. package/optimize/es/components/datagrid/utils/ref.js +1 -1
  213. package/optimize/es/components/datagrid/utils/row_heights.js +2 -2
  214. package/optimize/es/components/datagrid/utils/sorting.js +29 -27
  215. package/optimize/es/components/date_picker/super_date_picker/super_update_button.js +49 -29
  216. package/optimize/es/components/facet/facet_button.styles.js +1 -2
  217. package/optimize/es/components/flex/flex_grid.js +19 -8
  218. package/optimize/es/components/flex/flex_grid.styles.js +13 -6
  219. package/optimize/es/components/flex/flex_group.js +9 -10
  220. package/optimize/es/components/flex/flex_item.js +9 -11
  221. package/optimize/es/components/flex/flex_item.styles.js +107 -122
  222. package/optimize/es/components/flyout/flyout.js +16 -18
  223. package/optimize/es/components/header/header_breadcrumbs/header_breadcrumbs.js +3 -5
  224. package/optimize/es/components/icon/icon.js +13 -16
  225. package/optimize/es/components/icon/icon.styles.js +6 -9
  226. package/optimize/es/components/link/external_link_icon.js +11 -8
  227. package/optimize/es/components/link/link.js +2 -3
  228. package/optimize/es/components/link/link.styles.js +4 -10
  229. package/optimize/es/components/modal/confirm_modal.js +2 -1
  230. package/optimize/es/components/modal/modal.js +6 -2
  231. package/optimize/es/components/observer/resize_observer/resize_observer.js +15 -24
  232. package/optimize/es/components/progress/progress.styles.js +2 -2
  233. package/optimize/es/components/skeleton/skeleton_circle.js +2 -3
  234. package/optimize/es/components/skeleton/skeleton_rectangle.js +2 -3
  235. package/optimize/es/components/skeleton/skeleton_text.js +16 -12
  236. package/optimize/es/components/skeleton/skeleton_title.js +2 -3
  237. package/optimize/es/components/spacer/spacer.js +2 -3
  238. package/optimize/es/components/text/text.js +2 -3
  239. package/optimize/es/components/text/text_align.js +1 -2
  240. package/optimize/es/components/text/text_align.styles.js +5 -7
  241. package/optimize/es/components/text/text_color.js +2 -3
  242. package/optimize/es/components/title/title.js +2 -3
  243. package/optimize/es/components/title/title.styles.js +0 -7
  244. package/optimize/es/components/toast/global_toast_list.js +70 -73
  245. package/optimize/es/components/toast/toast.js +27 -42
  246. package/optimize/es/components/toast/toast.styles.js +2 -17
  247. package/optimize/es/global_styling/mixins/_typography.js +14 -6
  248. package/optimize/es/services/color/eui_palettes.js +21 -13
  249. package/optimize/es/services/color/index.js +1 -1
  250. package/optimize/es/services/hooks/index.js +1 -0
  251. package/optimize/es/services/hooks/useDeepEqual.js +23 -0
  252. package/optimize/es/services/index.js +1 -1
  253. package/optimize/es/services/theme/index.js +1 -1
  254. package/optimize/es/services/theme/style_memoization.js +47 -14
  255. package/optimize/es/themes/amsterdam/global_styling/mixins/button.js +47 -24
  256. package/optimize/lib/components/breadcrumbs/_breadcrumb_content.js +163 -0
  257. package/optimize/lib/components/breadcrumbs/_breadcrumb_content.styles.js +55 -0
  258. package/optimize/lib/components/breadcrumbs/breadcrumb.js +10 -112
  259. package/optimize/lib/components/breadcrumbs/breadcrumb.styles.js +5 -29
  260. package/optimize/lib/components/breadcrumbs/breadcrumbs.js +3 -3
  261. package/optimize/lib/components/breadcrumbs/types.js +5 -0
  262. package/optimize/lib/components/button/button_display/_button_display.js +1 -2
  263. package/optimize/lib/components/button/button_empty/button_empty.js +1 -2
  264. package/optimize/lib/components/button/button_group/button_group.js +4 -6
  265. package/optimize/lib/components/button/button_group/button_group.styles.js +11 -14
  266. package/optimize/lib/components/button/button_group/button_group_button.js +37 -5
  267. package/optimize/lib/components/button/button_group/button_group_button.styles.js +45 -11
  268. package/optimize/lib/components/button/button_icon/button_icon.js +3 -4
  269. package/optimize/lib/components/button/button_icon/button_icon.styles.js +8 -2
  270. package/optimize/lib/components/datagrid/body/cell/data_grid_cell.js +81 -55
  271. package/optimize/lib/components/datagrid/body/cell/data_grid_cell_actions.js +24 -18
  272. package/optimize/lib/components/datagrid/body/cell/data_grid_cell_popover.js +63 -55
  273. package/optimize/lib/components/datagrid/body/cell/data_grid_cell_wrapper.js +34 -31
  274. package/optimize/lib/components/datagrid/body/cell/index.js +2 -2
  275. package/optimize/lib/components/datagrid/body/data_grid_body_custom.js +39 -34
  276. package/optimize/lib/components/datagrid/body/data_grid_body_virtualized.js +72 -50
  277. package/optimize/lib/components/datagrid/body/data_grid_row_manager.js +6 -4
  278. package/optimize/lib/components/datagrid/body/footer/use_data_grid_footer.js +1 -2
  279. package/optimize/lib/components/datagrid/body/header/data_grid_control_header_cell.js +8 -4
  280. package/optimize/lib/components/datagrid/body/header/data_grid_header_cell.js +65 -49
  281. package/optimize/lib/components/datagrid/body/header/data_grid_header_row.js +14 -12
  282. package/optimize/lib/components/datagrid/body/header/use_data_grid_header.js +7 -6
  283. package/optimize/lib/components/datagrid/controls/column_selector.js +126 -123
  284. package/optimize/lib/components/datagrid/controls/column_sorting.js +125 -107
  285. package/optimize/lib/components/datagrid/controls/column_sorting_draggable.js +27 -22
  286. package/optimize/lib/components/datagrid/controls/display_selector.js +109 -107
  287. package/optimize/lib/components/datagrid/data_grid.a11y.js +13 -12
  288. package/optimize/lib/components/datagrid/data_grid.js +45 -20
  289. package/optimize/lib/components/datagrid/utils/col_widths.js +9 -5
  290. package/optimize/lib/components/datagrid/utils/focus.js +10 -8
  291. package/optimize/lib/components/datagrid/utils/grid_height_width.js +29 -28
  292. package/optimize/lib/components/datagrid/utils/ref.js +1 -1
  293. package/optimize/lib/components/datagrid/utils/row_heights.js +1 -1
  294. package/optimize/lib/components/datagrid/utils/sorting.js +31 -29
  295. package/optimize/lib/components/date_picker/super_date_picker/super_update_button.js +49 -29
  296. package/optimize/lib/components/facet/facet_button.styles.js +1 -2
  297. package/optimize/lib/components/flex/flex_grid.js +21 -7
  298. package/optimize/lib/components/flex/flex_grid.styles.js +13 -6
  299. package/optimize/lib/components/flex/flex_group.js +9 -9
  300. package/optimize/lib/components/flex/flex_item.js +13 -13
  301. package/optimize/lib/components/flex/flex_item.styles.js +107 -122
  302. package/optimize/lib/components/flyout/flyout.js +16 -18
  303. package/optimize/lib/components/header/header_breadcrumbs/header_breadcrumbs.js +3 -5
  304. package/optimize/lib/components/icon/icon.js +12 -15
  305. package/optimize/lib/components/icon/icon.styles.js +5 -8
  306. package/optimize/lib/components/link/external_link_icon.js +10 -7
  307. package/optimize/lib/components/link/link.js +1 -2
  308. package/optimize/lib/components/link/link.styles.js +6 -14
  309. package/optimize/lib/components/modal/confirm_modal.js +2 -1
  310. package/optimize/lib/components/modal/modal.js +6 -2
  311. package/optimize/lib/components/observer/resize_observer/resize_observer.js +15 -24
  312. package/optimize/lib/components/progress/progress.styles.js +1 -1
  313. package/optimize/lib/components/skeleton/skeleton_circle.js +1 -2
  314. package/optimize/lib/components/skeleton/skeleton_rectangle.js +1 -2
  315. package/optimize/lib/components/skeleton/skeleton_text.js +18 -11
  316. package/optimize/lib/components/skeleton/skeleton_title.js +1 -2
  317. package/optimize/lib/components/spacer/spacer.js +1 -2
  318. package/optimize/lib/components/text/text.js +1 -2
  319. package/optimize/lib/components/text/text_align.js +1 -2
  320. package/optimize/lib/components/text/text_align.styles.js +5 -7
  321. package/optimize/lib/components/text/text_color.js +1 -2
  322. package/optimize/lib/components/title/title.js +1 -2
  323. package/optimize/lib/components/title/title.styles.js +2 -10
  324. package/optimize/lib/components/toast/global_toast_list.js +68 -71
  325. package/optimize/lib/components/toast/toast.js +25 -40
  326. package/optimize/lib/components/toast/toast.styles.js +11 -25
  327. package/optimize/lib/global_styling/mixins/_typography.js +25 -19
  328. package/optimize/lib/services/color/eui_palettes.js +24 -14
  329. package/optimize/lib/services/color/index.js +14 -0
  330. package/optimize/lib/services/hooks/index.js +11 -0
  331. package/optimize/lib/services/hooks/useDeepEqual.js +30 -0
  332. package/optimize/lib/services/index.js +15 -1
  333. package/optimize/lib/services/theme/index.js +6 -0
  334. package/optimize/lib/services/theme/style_memoization.js +49 -16
  335. package/optimize/lib/themes/amsterdam/global_styling/mixins/button.js +49 -26
  336. package/package.json +3 -3
  337. package/src/components/datagrid/_data_grid_data_row.scss +4 -0
  338. package/test-env/components/breadcrumbs/_breadcrumb_content.js +363 -0
  339. package/test-env/components/breadcrumbs/_breadcrumb_content.styles.js +55 -0
  340. package/test-env/components/breadcrumbs/breadcrumb.js +11 -323
  341. package/test-env/components/breadcrumbs/breadcrumb.styles.js +5 -29
  342. package/test-env/components/breadcrumbs/breadcrumbs.js +7 -5
  343. package/test-env/components/breadcrumbs/types.js +5 -0
  344. package/test-env/components/button/button_display/_button_display.js +1 -2
  345. package/test-env/components/button/button_empty/button_empty.js +1 -2
  346. package/test-env/components/button/button_group/button_group.js +18 -6
  347. package/test-env/components/button/button_group/button_group.styles.js +11 -14
  348. package/test-env/components/button/button_group/button_group_button.js +56 -5
  349. package/test-env/components/button/button_group/button_group_button.styles.js +45 -11
  350. package/test-env/components/button/button_icon/button_icon.js +3 -4
  351. package/test-env/components/button/button_icon/button_icon.styles.js +8 -2
  352. package/test-env/components/datagrid/body/cell/data_grid_cell.js +100 -58
  353. package/test-env/components/datagrid/body/cell/data_grid_cell_actions.js +24 -18
  354. package/test-env/components/datagrid/body/cell/data_grid_cell_popover.js +63 -55
  355. package/test-env/components/datagrid/body/cell/data_grid_cell_wrapper.js +34 -31
  356. package/test-env/components/datagrid/body/cell/index.js +2 -2
  357. package/test-env/components/datagrid/body/data_grid_body.js +14 -0
  358. package/test-env/components/datagrid/body/data_grid_body_custom.js +53 -34
  359. package/test-env/components/datagrid/body/data_grid_body_virtualized.js +86 -55
  360. package/test-env/components/datagrid/body/data_grid_row_manager.js +6 -4
  361. package/test-env/components/datagrid/body/footer/use_data_grid_footer.js +1 -2
  362. package/test-env/components/datagrid/body/header/data_grid_control_header_cell.js +8 -4
  363. package/test-env/components/datagrid/body/header/data_grid_header_cell.js +72 -52
  364. package/test-env/components/datagrid/body/header/data_grid_header_row.js +14 -550
  365. package/test-env/components/datagrid/body/header/use_data_grid_header.js +7 -6
  366. package/test-env/components/datagrid/controls/column_selector.js +126 -123
  367. package/test-env/components/datagrid/controls/column_sorting.js +607 -106
  368. package/test-env/components/datagrid/controls/column_sorting_draggable.js +27 -22
  369. package/test-env/components/datagrid/controls/display_selector.js +109 -107
  370. package/test-env/components/datagrid/data_grid.a11y.js +13 -12
  371. package/test-env/components/datagrid/data_grid.js +45 -20
  372. package/test-env/components/datagrid/utils/col_widths.js +9 -5
  373. package/test-env/components/datagrid/utils/focus.js +10 -8
  374. package/test-env/components/datagrid/utils/grid_height_width.js +29 -28
  375. package/test-env/components/datagrid/utils/ref.js +1 -1
  376. package/test-env/components/datagrid/utils/row_heights.js +1 -1
  377. package/test-env/components/datagrid/utils/sorting.js +31 -29
  378. package/test-env/components/date_picker/super_date_picker/super_date_picker.js +9 -0
  379. package/test-env/components/date_picker/super_date_picker/super_update_button.js +57 -29
  380. package/test-env/components/facet/facet_button.styles.js +1 -2
  381. package/test-env/components/flex/flex_grid.js +21 -7
  382. package/test-env/components/flex/flex_grid.styles.js +13 -6
  383. package/test-env/components/flex/flex_group.js +10 -10
  384. package/test-env/components/flex/flex_item.js +13 -13
  385. package/test-env/components/flex/flex_item.styles.js +107 -122
  386. package/test-env/components/header/header_breadcrumbs/header_breadcrumbs.js +7 -7
  387. package/test-env/components/icon/icon.styles.js +5 -8
  388. package/test-env/components/link/external_link_icon.js +10 -7
  389. package/test-env/components/link/link.js +1 -2
  390. package/test-env/components/link/link.styles.js +6 -14
  391. package/test-env/components/modal/confirm_modal.js +2 -1
  392. package/test-env/components/modal/modal.js +12 -3
  393. package/test-env/components/page/page_header/page_header_content.js +4 -2
  394. package/test-env/components/progress/progress.styles.js +1 -1
  395. package/test-env/components/skeleton/skeleton_circle.js +1 -2
  396. package/test-env/components/skeleton/skeleton_rectangle.js +1 -2
  397. package/test-env/components/skeleton/skeleton_text.js +18 -11
  398. package/test-env/components/skeleton/skeleton_title.js +1 -2
  399. package/test-env/components/spacer/spacer.js +1 -2
  400. package/test-env/components/text/text.js +1 -2
  401. package/test-env/components/text/text_align.js +1 -2
  402. package/test-env/components/text/text_align.styles.js +5 -7
  403. package/test-env/components/text/text_color.js +1 -2
  404. package/test-env/components/title/title.js +1 -2
  405. package/test-env/components/title/title.styles.js +2 -10
  406. package/test-env/components/toast/global_toast_list.js +68 -71
  407. package/test-env/components/toast/toast.js +25 -40
  408. package/test-env/components/toast/toast.styles.js +11 -25
  409. package/test-env/global_styling/mixins/_typography.js +25 -19
  410. package/test-env/services/color/eui_palettes.js +24 -14
  411. package/test-env/services/color/index.js +14 -0
  412. package/test-env/services/hooks/index.js +11 -0
  413. package/test-env/services/hooks/useDeepEqual.js +30 -0
  414. package/test-env/services/index.js +15 -1
  415. package/test-env/services/theme/index.js +6 -0
  416. package/test-env/services/theme/style_memoization.js +49 -16
  417. package/test-env/themes/amsterdam/global_styling/mixins/button.js +49 -26
  418. package/src/themes/charts/theme.scss +0 -5
@@ -1,5 +1,6 @@
1
1
  "use strict";
2
2
 
3
+ function _typeof(obj) { "@babel/helpers - typeof"; return _typeof = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function (obj) { return typeof obj; } : function (obj) { return obj && "function" == typeof Symbol && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj; }, _typeof(obj); }
3
4
  Object.defineProperty(exports, "__esModule", {
4
5
  value: true
5
6
  });
@@ -12,8 +13,9 @@ var _button = require("../../../themes/amsterdam/global_styling/mixins/button");
12
13
  var _inner_text = require("../../inner_text");
13
14
  var _button_display = require("../button_display/_button_display");
14
15
  var _button_group_button = require("./button_group_button.styles");
16
+ var _tool_tip = require("../../../components/tool_tip");
15
17
  var _react2 = require("@emotion/react");
16
- var _excluded = ["className", "id", "isDisabled", "isIconOnly", "isSelected", "label", "value", "size", "color"];
18
+ var _excluded = ["className", "id", "isDisabled", "isIconOnly", "isSelected", "label", "value", "size", "color", "toolTipContent", "toolTipProps"];
17
19
  /*
18
20
  * Copyright Elasticsearch B.V. and/or licensed to Elasticsearch B.V. under one
19
21
  * or more contributor license agreements. Licensed under the Elastic License
@@ -22,6 +24,11 @@ var _excluded = ["className", "id", "isDisabled", "isIconOnly", "isSelected", "l
22
24
  * Side Public License, v 1.
23
25
  */
24
26
  function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
27
+ 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; }
28
+ 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; }
29
+ function _defineProperty(obj, key, value) { key = _toPropertyKey(key); if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; }
30
+ function _toPropertyKey(arg) { var key = _toPrimitive(arg, "string"); return _typeof(key) === "symbol" ? key : String(key); }
31
+ function _toPrimitive(input, hint) { if (_typeof(input) !== "object" || input === null) return input; var prim = input[Symbol.toPrimitive]; if (prim !== undefined) { var res = prim.call(input, hint || "default"); if (_typeof(res) !== "object") return res; throw new TypeError("@@toPrimitive must return a primitive value."); } return (hint === "string" ? String : Number)(input); }
25
32
  function _extends() { _extends = Object.assign ? Object.assign.bind() : function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; return _extends.apply(this, arguments); }
26
33
  function _slicedToArray(arr, i) { return _arrayWithHoles(arr) || _iterableToArrayLimit(arr, i) || _unsupportedIterableToArray(arr, i) || _nonIterableRest(); }
27
34
  function _nonIterableRest() { throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method."); }
@@ -43,17 +50,21 @@ var EuiButtonGroupButton = function EuiButtonGroupButton(_ref) {
43
50
  size = _ref.size,
44
51
  _ref$color = _ref.color,
45
52
  _color = _ref$color === void 0 ? 'primary' : _ref$color,
53
+ toolTipContent = _ref.toolTipContent,
54
+ toolTipProps = _ref.toolTipProps,
46
55
  rest = _objectWithoutProperties(_ref, _excluded);
47
56
  var isCompressed = size === 'compressed';
48
57
  var color = isDisabled ? 'disabled' : _color;
49
58
  var display = isSelected ? 'fill' : isCompressed ? 'empty' : 'base';
59
+ var hasToolTip = !!toolTipContent;
50
60
  var euiTheme = (0, _services.useEuiTheme)();
51
61
  var buttonColorStyles = (0, _button.useEuiButtonColorCSS)({
52
62
  display: display
53
63
  })[color];
54
64
  var focusColorStyles = isCompressed ? (0, _button_group_button._compressedButtonFocusColor)(euiTheme, color) : (0, _button_group_button._uncompressedButtonFocus)(euiTheme);
55
65
  var styles = (0, _button_group_button.euiButtonGroupButtonStyles)(euiTheme);
56
- var cssStyles = [styles.euiButtonGroupButton, isIconOnly && styles.iconOnly, styles[size], !isCompressed && styles.uncompressed, isDisabled && isSelected ? styles.disabledAndSelected : buttonColorStyles, !isDisabled && focusColorStyles];
66
+ var cssStyles = [styles.euiButtonGroupButton, isIconOnly && styles.iconOnly, !isCompressed && (hasToolTip ? styles.uncompressed.hasToolTip : styles.uncompressed[size]), isCompressed ? styles.compressed : styles.uncompressed.uncompressed, isDisabled && isSelected ? styles.disabledAndSelected : buttonColorStyles, !isDisabled && focusColorStyles];
67
+ var tooltipWrapperStyles = [styles.tooltipWrapper, !isCompressed && styles.uncompressed[size]];
57
68
  var contentStyles = [styles.content.euiButtonGroupButton__content, isCompressed && styles.content.compressed];
58
69
  var textStyles = [isIconOnly ? styles.text.euiButtonGroupButton__iconOnly : styles.text.euiButtonGroupButton__text];
59
70
  var buttonClasses = (0, _classnames.default)('euiButtonGroupButton', {
@@ -70,7 +81,12 @@ var EuiButtonGroupButton = function EuiButtonGroupButton(_ref) {
70
81
  _useInnerText2 = _slicedToArray(_useInnerText, 2),
71
82
  buttonTextRef = _useInnerText2[0],
72
83
  innerText = _useInnerText2[1];
73
- return (0, _react2.jsx)(_button_display.EuiButtonDisplay, _extends({
84
+ return (0, _react2.jsx)(EuiButtonGroupButtonWithToolTip, {
85
+ toolTipContent: toolTipContent,
86
+ toolTipProps: toolTipProps,
87
+ wrapperCss: tooltipWrapperStyles,
88
+ isSelected: isSelected
89
+ }, (0, _react2.jsx)(_button_display.EuiButtonDisplay, _extends({
74
90
  css: cssStyles,
75
91
  className: buttonClasses,
76
92
  isDisabled: isDisabled,
@@ -86,7 +102,7 @@ var EuiButtonGroupButton = function EuiButtonGroupButton(_ref) {
86
102
  title: innerText,
87
103
  "data-test-subj": id,
88
104
  isSelected: isSelected
89
- }, rest), label);
105
+ }, rest), label));
90
106
  };
91
107
  exports.EuiButtonGroupButton = EuiButtonGroupButton;
92
108
  EuiButtonGroupButton.propTypes = {
@@ -107,6 +123,20 @@ EuiButtonGroupButton.propTypes = {
107
123
  * The type of the underlying HTML button
108
124
  */
109
125
  type: _propTypes.default.any,
126
+ /**
127
+ * By default, will use the button text for the native browser title.
128
+ *
129
+ * This can be either customized or unset via `title: ''` if necessary.
130
+ */
131
+ title: _propTypes.default.any,
132
+ /**
133
+ * Optional custom tooltip content for the button
134
+ */
135
+ toolTipContent: _propTypes.default.node,
136
+ /**
137
+ * Optional props to pass to the underlying **[EuiToolTip](/#/display/tooltip)**
138
+ */
139
+ toolTipProps: _propTypes.default.any,
110
140
  /**
111
141
  * Any `type` accepted by EuiIcon
112
142
  */
@@ -145,7 +175,7 @@ EuiButtonGroupButton.propTypes = {
145
175
  /**
146
176
  * Inherit from EuiButtonGroup
147
177
  */
148
- size: _propTypes.default.oneOf(["s", "m", "compressed"]).isRequired,
178
+ size: _propTypes.default.any.isRequired,
149
179
  /**
150
180
  * Inherit from EuiButtonGroup
151
181
  */
@@ -154,4 +184,28 @@ EuiButtonGroupButton.propTypes = {
154
184
  * Inherit from EuiButtonGroup
155
185
  */
156
186
  onClick: _propTypes.default.func.isRequired
187
+ };
188
+ var EuiButtonGroupButtonWithToolTip = function EuiButtonGroupButtonWithToolTip(_ref2) {
189
+ var _toolTipProps$anchorP, _toolTipProps$anchorP2;
190
+ var toolTipContent = _ref2.toolTipContent,
191
+ toolTipProps = _ref2.toolTipProps,
192
+ wrapperCss = _ref2.wrapperCss,
193
+ isSelected = _ref2.isSelected,
194
+ children = _ref2.children;
195
+ return toolTipContent ? (0, _react2.jsx)(_tool_tip.EuiToolTip, _extends({
196
+ content: toolTipContent,
197
+ position: "top"
198
+ }, toolTipProps, {
199
+ anchorProps: _objectSpread(_objectSpread({}, toolTipProps === null || toolTipProps === void 0 ? void 0 : toolTipProps.anchorProps), {}, {
200
+ className: (0, _classnames.default)('euiButtonGroup__tooltipWrapper', {
201
+ 'euiButtonGroup__tooltipWrapper-isSelected': isSelected
202
+ }, toolTipProps === null || toolTipProps === void 0 ? void 0 : (_toolTipProps$anchorP = toolTipProps.anchorProps) === null || _toolTipProps$anchorP === void 0 ? void 0 : _toolTipProps$anchorP.className),
203
+ css: [wrapperCss, toolTipProps === null || toolTipProps === void 0 ? void 0 : (_toolTipProps$anchorP2 = toolTipProps.anchorProps) === null || _toolTipProps$anchorP2 === void 0 ? void 0 : _toolTipProps$anchorP2.css]
204
+ })
205
+ }), children) : children;
206
+ };
207
+ EuiButtonGroupButtonWithToolTip.propTypes = {
208
+ children: _propTypes.default.element.isRequired,
209
+ wrapperCss: _propTypes.default.any.isRequired,
210
+ isSelected: _propTypes.default.bool.isRequired
157
211
  };
@@ -10,14 +10,29 @@ var _global_styling = require("../../../global_styling");
10
10
  var _button = require("../../../themes/amsterdam/global_styling/mixins/button");
11
11
  var _accessibility = require("../../accessibility");
12
12
  var _form = require("../../form/form.styles");
13
- /*
14
- * Copyright Elasticsearch B.V. and/or licensed to Elasticsearch B.V. under one
15
- * or more contributor license agreements. Licensed under the Elastic License
16
- * 2.0 and the Server Side Public License, v 1; you may not use this file except
17
- * in compliance with, at your election, the Elastic License 2.0 or the Server
18
- * Side Public License, v 1.
19
- */
20
-
13
+ function _EMOTION_STRINGIFIED_CSS_ERROR__() { return "You have tried to stringify object returned from `css` function. It isn't supposed to be used directly (e.g. as value of the `className` prop), but rather handed to emotion so it can handle it (e.g. as value of `css` prop)."; } /*
14
+ * Copyright Elasticsearch B.V. and/or licensed to Elasticsearch B.V. under one
15
+ * or more contributor license agreements. Licensed under the Elastic License
16
+ * 2.0 and the Server Side Public License, v 1; you may not use this file except
17
+ * in compliance with, at your election, the Elastic License 2.0 or the Server
18
+ * Side Public License, v 1.
19
+ */
20
+ var _ref = process.env.NODE_ENV === "production" ? {
21
+ name: "nwv4a2-tooltipWrapper",
22
+ styles: "overflow:hidden;label:tooltipWrapper;"
23
+ } : {
24
+ name: "nwv4a2-tooltipWrapper",
25
+ styles: "overflow:hidden;label:tooltipWrapper;",
26
+ toString: _EMOTION_STRINGIFIED_CSS_ERROR__
27
+ };
28
+ var _ref2 = process.env.NODE_ENV === "production" ? {
29
+ name: "1u3o7zy-hasToolTip",
30
+ styles: "border-radius:inherit;label:hasToolTip;"
31
+ } : {
32
+ name: "1u3o7zy-hasToolTip",
33
+ styles: "border-radius:inherit;label:hasToolTip;",
34
+ toString: _EMOTION_STRINGIFIED_CSS_ERROR__
35
+ };
21
36
  var euiButtonGroupButtonStyles = function euiButtonGroupButtonStyles(euiThemeContext) {
22
37
  var euiTheme = euiThemeContext.euiTheme;
23
38
  var _euiFormVariables = (0, _form.euiFormVariables)(euiThemeContext),
@@ -34,9 +49,26 @@ var euiButtonGroupButtonStyles = function euiButtonGroupButtonStyles(euiThemeCon
34
49
  euiButtonGroupButton: /*#__PURE__*/(0, _react.css)((0, _global_styling.logicalCSS)('min-width', 0), " flex-shrink:1;flex-grow:0;", _global_styling.euiCanAnimate, "{transition:background-color ", euiTheme.animation.normal, " ease-in-out,color ", euiTheme.animation.normal, " ease-in-out;};label:euiButtonGroupButton;"),
35
50
  iconOnly: /*#__PURE__*/(0, _react.css)("padding-inline:", euiTheme.size.s, ";;label:iconOnly;"),
36
51
  // Sizes
37
- s: /*#__PURE__*/(0, _react.css)(uncompressedBorderRadii(euiTheme.border.radius.small), ";;label:s;"),
38
- m: /*#__PURE__*/(0, _react.css)(uncompressedBorderRadii(euiTheme.border.radius.medium), ";;label:m;"),
39
- uncompressed: /*#__PURE__*/(0, _react.css)("&:is(.euiButtonGroupButton-isSelected){font-weight:", euiTheme.font.weight.bold, ";}&:not(.euiButtonGroupButton-isSelected)+.euiButtonGroupButton:not(.euiButtonGroupButton-isSelected){box-shadow:-", euiTheme.border.width.thin, " 0 0 0 ", (0, _services.transparentize)(euiTheme.colors.fullShade, 0.1), ";}&:is(.euiButtonGroupButton-isSelected)+.euiButtonGroupButton-isSelected{box-shadow:-", euiTheme.border.width.thin, " 0 0 0 ", (0, _services.transparentize)(euiTheme.colors.emptyShade, 0.2), ";};label:uncompressed;"),
52
+ uncompressed: {
53
+ uncompressed: /*#__PURE__*/(0, _react.css)("&:is(.euiButtonGroupButton-isSelected){font-weight:", euiTheme.font.weight.bold, ";};label:uncompressed;"),
54
+ get borders() {
55
+ var selectors = '.euiButtonGroupButton-isSelected, .euiButtonGroup__tooltipWrapper-isSelected';
56
+ var selectedColor = (0, _services.transparentize)(euiTheme.colors.emptyShade, 0.2);
57
+ var unselectedColor = (0, _services.transparentize)(euiTheme.colors.fullShade, 0.1);
58
+ var borderWidth = euiTheme.border.width.thin;
59
+
60
+ // "Borders" between buttons should be present between two of the same colored buttons,
61
+ // and absent between selected vs non-selected buttons (different colors)
62
+ return "\n &:not(".concat(selectors, ") + *:not(").concat(selectors, ") {\n box-shadow: -").concat(borderWidth, " 0 0 0 ").concat(unselectedColor, ";\n }\n &:is(").concat(selectors, ") + *:is(").concat(selectors, ") {\n box-shadow: -").concat(borderWidth, " 0 0 0 ").concat(selectedColor, ";\n }\n ");
63
+ },
64
+ get s() {
65
+ return /*#__PURE__*/(0, _react.css)(this.borders, " ", uncompressedBorderRadii(euiTheme.border.radius.small), ";;label:s;");
66
+ },
67
+ get m() {
68
+ return /*#__PURE__*/(0, _react.css)(this.borders, " ", uncompressedBorderRadii(euiTheme.border.radius.medium), ";;label:m;");
69
+ },
70
+ hasToolTip: _ref2
71
+ },
40
72
  compressed: /*#__PURE__*/(0, _react.css)((0, _global_styling.logicalCSS)('height', compressedButtonHeight), " line-height:", compressedButtonHeight, ";padding:", (0, _global_styling.mathWithUnits)(euiTheme.border.width.thin, function (x) {
41
73
  return x * 2;
42
74
  }), ";background-clip:content-box;border-radius:", (0, _global_styling.mathWithUnits)([controlCompressedBorderRadius, euiTheme.border.width.thin], function (x, y) {
@@ -44,6 +76,8 @@ var euiButtonGroupButtonStyles = function euiButtonGroupButtonStyles(euiThemeCon
44
76
  }), ";font-weight:", euiTheme.font.weight.regular, ";&:is(.euiButtonGroupButton-isSelected){font-weight:", euiTheme.font.weight.semiBold, ";};label:compressed;"),
45
77
  // States
46
78
  disabledAndSelected: /*#__PURE__*/(0, _react.css)("color:", (0, _services.makeDisabledContrastColor)(euiTheme.colors.disabledText)(euiTheme.colors.disabled), ";background-color:", euiTheme.colors.disabled, ";;label:disabledAndSelected;"),
79
+ // Tooltip anchor wrapper
80
+ tooltipWrapper: _ref,
47
81
  // Content wrapper
48
82
  content: {
49
83
  euiButtonGroupButton__content: /*#__PURE__*/(0, _react.css)(";label:euiButtonGroupButton__content;"),
@@ -52,7 +52,6 @@ var EuiButtonIcon = function EuiButtonIcon(_ref) {
52
52
  isSelected = _ref.isSelected,
53
53
  isLoading = _ref.isLoading,
54
54
  rest = _objectWithoutProperties(_ref, _excluded);
55
- var euiThemeContext = (0, _services.useEuiTheme)();
56
55
  var isDisabled = (0, _button_display.isButtonDisabled)({
57
56
  isDisabled: _isDisabled || disabled,
58
57
  href: href,
@@ -67,9 +66,9 @@ var EuiButtonIcon = function EuiButtonIcon(_ref) {
67
66
  display: display
68
67
  });
69
68
  var buttonFocusStyle = (0, _button.useEuiButtonFocusCSS)();
70
- var emptyHoverStyles = display === 'empty' && !isDisabled && (0, _button_icon._emptyHoverStyles)(euiThemeContext, color);
71
- var styles = (0, _button_icon.euiButtonIconStyles)(euiThemeContext);
72
- var cssStyles = [styles.euiButtonIcon, styles[size], buttonColorStyles[isDisabled ? 'disabled' : color], buttonFocusStyle, emptyHoverStyles, isDisabled && styles.isDisabled];
69
+ var emptyHoverStyles = (0, _services.useEuiMemoizedStyles)(_button_icon._emptyHoverStyles);
70
+ var styles = (0, _services.useEuiMemoizedStyles)(_button_icon.euiButtonIconStyles);
71
+ var cssStyles = [styles.euiButtonIcon, styles[size], buttonColorStyles[isDisabled ? 'disabled' : color], buttonFocusStyle, display === 'empty' && !isDisabled && emptyHoverStyles[color], isDisabled && styles.isDisabled];
73
72
  var classes = (0, _classnames.default)('euiButtonIcon', className);
74
73
 
75
74
  // Add an icon to the button if one exists.
@@ -1,5 +1,6 @@
1
1
  "use strict";
2
2
 
3
+ function _typeof(obj) { "@babel/helpers - typeof"; return _typeof = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function (obj) { return typeof obj; } : function (obj) { return obj && "function" == typeof Symbol && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj; }, _typeof(obj); }
3
4
  Object.defineProperty(exports, "__esModule", {
4
5
  value: true
5
6
  });
@@ -8,6 +9,11 @@ var _react = require("@emotion/react");
8
9
  var _global_styling = require("../../../global_styling");
9
10
  var _button = require("../../../themes/amsterdam/global_styling/mixins/button");
10
11
  var _button_display = require("../button_display/_button_display.styles");
12
+ 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; }
13
+ 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; }
14
+ function _defineProperty(obj, key, value) { key = _toPropertyKey(key); if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; }
15
+ function _toPropertyKey(arg) { var key = _toPrimitive(arg, "string"); return _typeof(key) === "symbol" ? key : String(key); }
16
+ function _toPrimitive(input, hint) { if (_typeof(input) !== "object" || input === null) return input; var prim = input[Symbol.toPrimitive]; if (prim !== undefined) { var res = prim.call(input, hint || "default"); if (_typeof(res) !== "object") return res; throw new TypeError("@@toPrimitive must return a primitive value."); } return (hint === "string" ? String : Number)(input); }
11
17
  function _EMOTION_STRINGIFIED_CSS_ERROR__() { return "You have tried to stringify object returned from `css` function. It isn't supposed to be used directly (e.g. as value of the `className` prop), but rather handed to emotion so it can handle it (e.g. as value of `css` prop)."; } /*
12
18
  * Copyright Elasticsearch B.V. and/or licensed to Elasticsearch B.V. under one
13
19
  * or more contributor license agreements. Licensed under the Elastic License
@@ -35,7 +41,9 @@ var euiButtonIconStyles = function euiButtonIconStyles(euiThemeContext) {
35
41
  };
36
42
  };
37
43
  exports.euiButtonIconStyles = euiButtonIconStyles;
38
- var _emptyHoverStyles = function _emptyHoverStyles(euiThemeContext, color) {
39
- return /*#__PURE__*/(0, _react.css)("&:hover{background-color:", (0, _button.euiButtonEmptyColor)(euiThemeContext, color).backgroundColor, ";}");
44
+ var _emptyHoverStyles = function _emptyHoverStyles(euiThemeContext) {
45
+ return _button.BUTTON_COLORS.reduce(function (styles, color) {
46
+ return _objectSpread(_objectSpread({}, styles), {}, _defineProperty({}, color, /*#__PURE__*/(0, _react.css)("&:hover{background-color:", (0, _button.euiButtonEmptyColor)(euiThemeContext, color).backgroundColor, ";}")));
47
+ }, {});
40
48
  };
41
49
  exports._emptyHoverStyles = _emptyHoverStyles;
@@ -20,7 +20,7 @@ var _data_grid_cell_actions = require("./data_grid_cell_actions");
20
20
  var _data_grid_cell_popover = require("./data_grid_cell_popover");
21
21
  var _focus_utils = require("./focus_utils");
22
22
  var _react2 = require("@emotion/react");
23
- var _excluded = ["renderCellValue", "column", "setCellContentsRef", "rowIndex", "colIndex", "ariaRowIndex", "rowHeight", "rowHeightUtils", "isControlColumn", "isFocused", "cellActions"],
23
+ var _excluded = ["renderCellValue", "cellContext", "column", "setCellContentsRef", "rowIndex", "colIndex", "ariaRowIndex", "rowHeight", "rowHeightUtils", "isControlColumn", "isFocused", "showCellActions", "onExpandClick", "popoverAnchorRef"],
24
24
  _excluded2 = ["width", "popoverContext", "interactiveCellId", "columnType", "className", "column", "style", "rowHeightUtils", "rowHeightsOptions", "rowManager", "pagination"],
25
25
  _excluded3 = ["isExpandable", "style", "className", "data-test-subj"];
26
26
  /*
@@ -53,6 +53,7 @@ function _objectWithoutProperties(source, excluded) { if (source == null) return
53
53
  function _objectWithoutPropertiesLoose(source, excluded) { if (source == null) return {}; var target = {}; var sourceKeys = Object.keys(source); var key, i; for (i = 0; i < sourceKeys.length; i++) { key = sourceKeys[i]; if (excluded.indexOf(key) >= 0) continue; target[key] = source[key]; } return target; }
54
54
  var EuiDataGridCellContent = /*#__PURE__*/(0, _react.memo)(function (_ref) {
55
55
  var renderCellValue = _ref.renderCellValue,
56
+ cellContext = _ref.cellContext,
56
57
  column = _ref.column,
57
58
  setCellContentsRef = _ref.setCellContentsRef,
58
59
  rowIndex = _ref.rowIndex,
@@ -62,16 +63,25 @@ var EuiDataGridCellContent = /*#__PURE__*/(0, _react.memo)(function (_ref) {
62
63
  rowHeightUtils = _ref.rowHeightUtils,
63
64
  isControlColumn = _ref.isControlColumn,
64
65
  isFocused = _ref.isFocused,
65
- cellActions = _ref.cellActions,
66
+ showCellActions = _ref.showCellActions,
67
+ onExpandClick = _ref.onExpandClick,
68
+ popoverAnchorRef = _ref.popoverAnchorRef,
66
69
  rest = _objectWithoutProperties(_ref, _excluded);
67
- // React is more permissible than the TS types indicate
70
+ // React is more permissive than the TS types indicate
68
71
  var CellElement = renderCellValue;
69
- var cellHeightType = (rowHeightUtils === null || rowHeightUtils === void 0 ? void 0 : rowHeightUtils.getHeightType(rowHeight)) || 'default';
70
- var classes = (0, _classnames.default)('euiDataGridRowCell__content', "euiDataGridRowCell__content--".concat(cellHeightType, "Height"), !isControlColumn && {
71
- 'eui-textBreakWord': cellHeightType !== 'default',
72
- 'eui-textTruncate': cellHeightType === 'default'
73
- });
74
- var cellContent = (0, _react2.jsx)("div", {
72
+ var cellHeightType = (0, _react.useMemo)(function () {
73
+ return (rowHeightUtils === null || rowHeightUtils === void 0 ? void 0 : rowHeightUtils.getHeightType(rowHeight)) || 'default';
74
+ }, [rowHeightUtils, rowHeight]);
75
+ var classes = (0, _react.useMemo)(function () {
76
+ return (0, _classnames.default)('euiDataGridRowCell__content', "euiDataGridRowCell__content--".concat(cellHeightType, "Height"), !isControlColumn && {
77
+ 'eui-textBreakWord': cellHeightType !== 'default',
78
+ 'eui-textTruncate': cellHeightType === 'default'
79
+ });
80
+ }, [cellHeightType, isControlColumn]);
81
+ return (0, _react2.jsx)(_react.default.Fragment, null, (0, _react2.jsx)(RenderTruncatedCellContent, {
82
+ hasLineCountTruncation: cellHeightType === 'lineCount' && !isControlColumn,
83
+ rowHeight: rowHeight
84
+ }, (0, _react2.jsx)("div", {
75
85
  ref: setCellContentsRef,
76
86
  "data-datagrid-cellcontent": true,
77
87
  className: classes
@@ -81,15 +91,7 @@ var EuiDataGridCellContent = /*#__PURE__*/(0, _react.memo)(function (_ref) {
81
91
  rowIndex: rowIndex,
82
92
  colIndex: colIndex,
83
93
  schema: (column === null || column === void 0 ? void 0 : column.schema) || rest.columnType
84
- }, rest)));
85
- if (cellHeightType === 'lineCount' && !isControlColumn) {
86
- var lines = rowHeightUtils.getLineCount(rowHeight);
87
- cellContent = (0, _react2.jsx)(_text_truncate.EuiTextBlockTruncate, {
88
- lines: lines,
89
- cloneElement: true
90
- }, cellContent);
91
- }
92
- var screenReaderText = (0, _react2.jsx)(_accessibility.EuiScreenReaderOnly, null, (0, _react2.jsx)("p", {
94
+ }, cellContext, rest)))), (0, _react2.jsx)(_accessibility.EuiScreenReaderOnly, null, (0, _react2.jsx)("p", {
93
95
  hidden: !isFocused
94
96
  }, '- ', (0, _react2.jsx)(_i18n.EuiI18n, {
95
97
  token: "euiDataGridCell.position",
@@ -99,11 +101,16 @@ var EuiDataGridCellContent = /*#__PURE__*/(0, _react.memo)(function (_ref) {
99
101
  col: colIndex + 1,
100
102
  row: ariaRowIndex
101
103
  }
102
- }), cellActions && (0, _react2.jsx)(_react.default.Fragment, null, '. ', (0, _react2.jsx)(_i18n.EuiI18n, {
104
+ }), showCellActions && (0, _react2.jsx)(_react.default.Fragment, null, '. ', (0, _react2.jsx)(_i18n.EuiI18n, {
103
105
  token: "euiDataGridCell.expansionEnterPrompt",
104
106
  default: "Press the Enter key to expand this cell."
105
- }))));
106
- return (0, _react2.jsx)(_react.default.Fragment, null, cellContent, screenReaderText, cellActions);
107
+ })))), showCellActions && (0, _react2.jsx)(_data_grid_cell_actions.EuiDataGridCellActions, {
108
+ rowIndex: rowIndex,
109
+ colIndex: colIndex,
110
+ column: column,
111
+ onExpandClick: onExpandClick,
112
+ popoverAnchorRef: popoverAnchorRef
113
+ }));
107
114
  });
108
115
  EuiDataGridCellContent.propTypes = {
109
116
  rowIndex: _propTypes.default.number.isRequired,
@@ -537,6 +544,7 @@ EuiDataGridCellContent.propTypes = {
537
544
  isExpandable: _propTypes.default.bool.isRequired,
538
545
  className: _propTypes.default.string,
539
546
  renderCellValue: _propTypes.default.oneOfType([_propTypes.default.func.isRequired, _propTypes.default.element.isRequired]).isRequired,
547
+ cellContext: _propTypes.default.any,
540
548
  renderCellPopover: _propTypes.default.oneOfType([_propTypes.default.func.isRequired, _propTypes.default.func.isRequired]),
541
549
  setRowHeight: _propTypes.default.func,
542
550
  getRowHeight: _propTypes.default.func,
@@ -576,16 +584,18 @@ EuiDataGridCellContent.propTypes = {
576
584
  rowHeightUtils: _propTypes.default.oneOfType([_propTypes.default.any.isRequired, _propTypes.default.any.isRequired]),
577
585
  pagination: _propTypes.default.any,
578
586
  setCellProps: _propTypes.default.func.isRequired,
579
- setCellContentsRef: _propTypes.default.any.isRequired,
587
+ setCellContentsRef: _propTypes.default.func.isRequired,
588
+ showCellActions: _propTypes.default.bool.isRequired,
580
589
  isExpanded: _propTypes.default.bool.isRequired,
590
+ onExpandClick: _propTypes.default.func.isRequired,
591
+ popoverAnchorRef: _propTypes.default.any.isRequired,
581
592
  isControlColumn: _propTypes.default.bool.isRequired,
582
593
  isFocused: _propTypes.default.bool.isRequired,
583
594
  ariaRowIndex: _propTypes.default.number.isRequired,
584
595
  rowHeight: _propTypes.default.oneOfType([_propTypes.default.number.isRequired, _propTypes.default.oneOf(["auto"]), _propTypes.default.shape({
585
596
  lineCount: _propTypes.default.number,
586
597
  height: _propTypes.default.number
587
- }).isRequired]),
588
- cellActions: _propTypes.default.node
598
+ }).isRequired])
589
599
  };
590
600
  EuiDataGridCellContent.displayName = 'EuiDataGridCellContent';
591
601
  var EuiDataGridCell = /*#__PURE__*/function (_Component) {
@@ -746,6 +756,7 @@ var EuiDataGridCell = /*#__PURE__*/function (_Component) {
746
756
  var _this$props5 = _this.props,
747
757
  renderCellPopover = _this$props5.renderCellPopover,
748
758
  renderCellValue = _this$props5.renderCellValue,
759
+ cellContext = _this$props5.cellContext,
749
760
  rowIndex = _this$props5.rowIndex,
750
761
  colIndex = _this$props5.colIndex,
751
762
  column = _this$props5.column,
@@ -766,7 +777,7 @@ var EuiDataGridCell = /*#__PURE__*/function (_Component) {
766
777
  })),
767
778
  DefaultCellPopover: _data_grid_cell_popover.DefaultCellPopover,
768
779
  setCellPopoverProps: setCellPopoverProps
769
- }), (0, _react2.jsx)(CellElement, _extends({}, sharedProps, {
780
+ }), (0, _react2.jsx)(CellElement, _extends({}, cellContext, sharedProps, {
770
781
  setCellProps: _this.setCellProps,
771
782
  isExpandable: true,
772
783
  isExpanded: true,
@@ -911,6 +922,7 @@ var EuiDataGridCell = /*#__PURE__*/function (_Component) {
911
922
  if (nextProps.style.height !== this.props.style.height) return true;
912
923
  if (nextProps.style.width !== this.props.style.width) return true;
913
924
  }
925
+ if (nextProps.cellContext !== this.props.cellContext) return true;
914
926
  if (nextState.cellProps !== this.state.cellProps) return true;
915
927
  if (nextState.isFocused !== this.state.isFocused) return true;
916
928
  if (nextState.isHovered !== this.state.isHovered) return true;
@@ -960,21 +972,16 @@ var EuiDataGridCell = /*#__PURE__*/function (_Component) {
960
972
  lineHeight: (_rowHeightsOptions$li = rowHeightsOptions === null || rowHeightsOptions === void 0 ? void 0 : rowHeightsOptions.lineHeight) !== null && _rowHeightsOptions$li !== void 0 ? _rowHeightsOptions$li : undefined
961
973
  }, cellPropsStyle);
962
974
  var rowHeight = rowHeightUtils === null || rowHeightUtils === void 0 ? void 0 : rowHeightUtils.getRowHeightOption(rowIndex, rowHeightsOptions);
963
- var cellContentProps = _objectSpread(_objectSpread({}, rest), {}, {
964
- setCellProps: this.setCellProps,
965
- column: column,
966
- columnType: columnType,
967
- isExpandable: isExpandable,
968
- isExpanded: popoverIsOpen,
969
- isDetails: false,
970
- isFocused: this.state.isFocused,
971
- setCellContentsRef: this.setCellContentsRef,
972
- rowHeight: rowHeight,
973
- rowHeightUtils: rowHeightUtils,
974
- isControlColumn: cellClasses.includes('euiDataGridRowCell--controlColumn'),
975
- ariaRowIndex: ariaRowIndex
976
- });
977
- var cell = (0, _react2.jsx)("div", _extends({
975
+ var row = rowManager && !_utils.IS_JEST_ENVIRONMENT ? rowManager.getRow({
976
+ rowIndex: rowIndex,
977
+ visibleRowIndex: visibleRowIndex,
978
+ top: style.top,
979
+ // comes in as a `{float}px` string from react-window
980
+ height: style.height // comes in as an integer from react-window
981
+ }) : undefined;
982
+ return (0, _react2.jsx)(RenderCellInRow, {
983
+ row: row
984
+ }, (0, _react2.jsx)("div", _extends({
978
985
  role: "gridcell",
979
986
  "aria-rowindex": ariaRowIndex,
980
987
  tabIndex: this.state.isFocused ? 0 : -1,
@@ -998,28 +1005,32 @@ var EuiDataGridCell = /*#__PURE__*/function (_Component) {
998
1005
  cellEl: this.cellRef.current,
999
1006
  updateCellFocusContext: this.updateCellFocusContext,
1000
1007
  renderFocusTrap: !isExpandable
1001
- }, (0, _react2.jsx)(EuiDataGridCellContent, _extends({}, cellContentProps, {
1002
- cellActions: showCellActions && (0, _react2.jsx)(_react.default.Fragment, null, (0, _react2.jsx)(_data_grid_cell_actions.EuiDataGridCellActions, {
1003
- rowIndex: rowIndex,
1004
- colIndex: colIndex,
1005
- column: column,
1006
- onExpandClick: this.handleCellExpansionClick
1007
- }), (0, _react2.jsx)("div", {
1008
- ref: this.popoverAnchorRef,
1009
- "data-test-subject": "cellPopoverAnchor"
1010
- }))
1011
- }))));
1012
- return rowManager && !_utils.IS_JEST_ENVIRONMENT ? /*#__PURE__*/(0, _reactDom.createPortal)(cell, rowManager.getRow({
1008
+ }, (0, _react2.jsx)(EuiDataGridCellContent, _extends({}, rest, {
1009
+ setCellProps: this.setCellProps,
1010
+ column: column,
1011
+ columnType: columnType,
1012
+ isExpandable: isExpandable,
1013
+ isExpanded: popoverIsOpen,
1014
+ onExpandClick: this.handleCellExpansionClick,
1015
+ popoverAnchorRef: this.popoverAnchorRef,
1016
+ showCellActions: showCellActions,
1017
+ isFocused: this.state.isFocused,
1018
+ setCellContentsRef: this.setCellContentsRef,
1019
+ rowHeight: rowHeight,
1020
+ rowHeightUtils: rowHeightUtils,
1021
+ isControlColumn: cellClasses.includes('euiDataGridRowCell--controlColumn'),
1022
+ ariaRowIndex: ariaRowIndex,
1013
1023
  rowIndex: rowIndex,
1014
- visibleRowIndex: visibleRowIndex,
1015
- top: style.top,
1016
- // comes in as a `{float}px` string from react-window
1017
- height: style.height // comes in as an integer from react-window
1018
- })) : cell;
1024
+ colIndex: colIndex
1025
+ })))));
1019
1026
  }
1020
1027
  }]);
1021
1028
  return EuiDataGridCell;
1022
1029
  }(_react.Component);
1030
+ /**
1031
+ * Function component utilities for conditional rendering.
1032
+ * Used for DRYness and performance
1033
+ */
1023
1034
  exports.EuiDataGridCell = EuiDataGridCell;
1024
1035
  _defineProperty(EuiDataGridCell, "contextType", _focus.DataGridFocusContext);
1025
1036
  EuiDataGridCell.propTypes = {
@@ -1385,6 +1396,7 @@ EuiDataGridCell.propTypes = {
1385
1396
  setCellPopoverProps: _propTypes.default.func.isRequired
1386
1397
  }).isRequired,
1387
1398
  renderCellValue: _propTypes.default.oneOfType([_propTypes.default.func.isRequired, _propTypes.default.element.isRequired]).isRequired,
1399
+ cellContext: _propTypes.default.any,
1388
1400
  renderCellPopover: _propTypes.default.oneOfType([_propTypes.default.func.isRequired, _propTypes.default.func.isRequired]),
1389
1401
  setRowHeight: _propTypes.default.func,
1390
1402
  getRowHeight: _propTypes.default.func,
@@ -1426,4 +1438,34 @@ EuiDataGridCell.propTypes = {
1426
1438
  getRow: _propTypes.default.func.isRequired
1427
1439
  }),
1428
1440
  pagination: _propTypes.default.any
1429
- };
1441
+ };
1442
+ var RenderCellInRow = /*#__PURE__*/(0, _react.memo)(function (_ref2) {
1443
+ var row = _ref2.row,
1444
+ children = _ref2.children;
1445
+ return row ? /*#__PURE__*/(0, _reactDom.createPortal)(children, row) : children;
1446
+ });
1447
+ RenderCellInRow.propTypes = {
1448
+ children: _propTypes.default.element.isRequired,
1449
+ row: _propTypes.default.any
1450
+ };
1451
+ RenderCellInRow.displayName = 'RenderCellInRow';
1452
+ var RenderTruncatedCellContent = /*#__PURE__*/(0, _react.memo)(function (_ref3) {
1453
+ var children = _ref3.children,
1454
+ hasLineCountTruncation = _ref3.hasLineCountTruncation,
1455
+ rowHeight = _ref3.rowHeight;
1456
+ // If `hasLineCountTruncation` is true, we can rely on rowHeight being the correct type
1457
+ var lines = hasLineCountTruncation ? rowHeight.lineCount : undefined;
1458
+ return lines ? (0, _react2.jsx)(_text_truncate.EuiTextBlockTruncate, {
1459
+ lines: lines,
1460
+ cloneElement: true
1461
+ }, children) : children;
1462
+ });
1463
+ RenderTruncatedCellContent.propTypes = {
1464
+ children: _propTypes.default.element.isRequired,
1465
+ hasLineCountTruncation: _propTypes.default.bool.isRequired,
1466
+ rowHeight: _propTypes.default.oneOfType([_propTypes.default.number.isRequired, _propTypes.default.oneOf(["auto"]), _propTypes.default.shape({
1467
+ lineCount: _propTypes.default.number,
1468
+ height: _propTypes.default.number
1469
+ }).isRequired])
1470
+ };
1471
+ RenderTruncatedCellContent.displayName = 'RenderTruncatedCellContent';
@@ -33,6 +33,7 @@ function _extends() { _extends = Object.assign ? Object.assign.bind() : function
33
33
  */
34
34
  var EuiDataGridCellActions = function EuiDataGridCellActions(_ref) {
35
35
  var onExpandClick = _ref.onExpandClick,
36
+ popoverAnchorRef = _ref.popoverAnchorRef,
36
37
  column = _ref.column,
37
38
  rowIndex = _ref.rowIndex,
38
39
  colIndex = _ref.colIndex;
@@ -40,23 +41,25 @@ var EuiDataGridCellActions = function EuiDataGridCellActions(_ref) {
40
41
  // column.cellActions is present (regardless of column.isExpandable).
41
42
  // This is because cell actions are not otherwise accessible to keyboard
42
43
  // or screen reader users
43
- var expandButton = (0, _react2.jsx)(_i18n.EuiI18n, {
44
- key: 'expand',
45
- token: "euiDataGridCellActions.expandButtonTitle",
46
- default: "Click or hit enter to interact with cell content"
47
- }, function (expandButtonTitle) {
48
- return (0, _react2.jsx)(_button_icon.EuiButtonIcon, {
49
- className: "euiDataGridRowCell__actionButtonIcon euiDataGridRowCell__expandCell",
50
- "data-test-subj": "euiDataGridCellExpandButton",
51
- display: "fill",
52
- color: "primary",
53
- iconSize: "m",
54
- iconType: "expandMini",
55
- "aria-hidden": true,
56
- onClick: onExpandClick,
57
- title: expandButtonTitle
44
+ var expandButton = (0, _react.useMemo)(function () {
45
+ return (0, _react2.jsx)(_i18n.EuiI18n, {
46
+ key: 'expand',
47
+ token: "euiDataGridCellActions.expandButtonTitle",
48
+ default: "Click or hit enter to interact with cell content"
49
+ }, function (expandButtonTitle) {
50
+ return (0, _react2.jsx)(_button_icon.EuiButtonIcon, {
51
+ className: "euiDataGridRowCell__actionButtonIcon euiDataGridRowCell__expandCell",
52
+ "data-test-subj": "euiDataGridCellExpandButton",
53
+ display: "fill",
54
+ color: "primary",
55
+ iconSize: "m",
56
+ iconType: "expandMini",
57
+ "aria-hidden": true,
58
+ onClick: onExpandClick,
59
+ title: expandButtonTitle
60
+ });
58
61
  });
59
- });
62
+ }, [onExpandClick]);
60
63
  var additionalButtons = (0, _react.useMemo)(function () {
61
64
  if (!column || !Array.isArray(column === null || column === void 0 ? void 0 : column.cellActions)) return [];
62
65
  var ButtonComponent = function ButtonComponent(props) {
@@ -87,9 +90,12 @@ var EuiDataGridCellActions = function EuiDataGridCellActions(_ref) {
87
90
  });
88
91
  });
89
92
  }, [column, colIndex, rowIndex]);
90
- return (0, _react2.jsx)("div", {
93
+ return (0, _react2.jsx)(_react.default.Fragment, null, (0, _react2.jsx)("div", {
91
94
  className: "euiDataGridRowCell__actions"
92
- }, [].concat(_toConsumableArray(additionalButtons), [expandButton]));
95
+ }, [].concat(_toConsumableArray(additionalButtons), [expandButton])), (0, _react2.jsx)("div", {
96
+ ref: popoverAnchorRef,
97
+ "data-test-subject": "cellPopoverAnchor"
98
+ }));
93
99
  };
94
100
  exports.EuiDataGridCellActions = EuiDataGridCellActions;
95
101
  var EuiDataGridCellPopoverActions = function EuiDataGridCellPopoverActions(_ref2) {