@elastic/eui 95.10.1 → 95.12.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 (371) hide show
  1. package/README.md +1 -69
  2. package/dist/eui_theme_dark.css +0 -924
  3. package/dist/eui_theme_dark.min.css +1 -1
  4. package/dist/eui_theme_light.css +0 -924
  5. package/dist/eui_theme_light.min.css +1 -1
  6. package/es/components/basic_table/basic_table.js +43 -35
  7. package/es/components/basic_table/collapsed_item_actions.js +24 -31
  8. package/es/components/datagrid/body/cell/data_grid_cell.js +212 -94
  9. package/es/components/datagrid/body/cell/data_grid_cell.styles.js +110 -0
  10. package/es/components/datagrid/body/cell/data_grid_cell_actions.js +13 -3
  11. package/es/components/datagrid/body/cell/data_grid_cell_actions.styles.js +33 -0
  12. package/es/components/datagrid/body/cell/data_grid_cell_popover.js +21 -12
  13. package/es/components/datagrid/body/cell/data_grid_cell_popover.styles.js +19 -0
  14. package/es/components/datagrid/body/cell/focus_utils.js +18 -20
  15. package/es/components/datagrid/body/data_grid_body.js +20 -4
  16. package/es/components/datagrid/body/data_grid_body.styles.js +26 -0
  17. package/es/components/datagrid/body/data_grid_body_custom.js +23 -8
  18. package/es/components/datagrid/body/data_grid_body_virtualized.js +23 -8
  19. package/es/components/datagrid/body/footer/data_grid_footer.styles.js +24 -0
  20. package/es/components/datagrid/body/footer/data_grid_footer_row.js +24 -11
  21. package/es/components/datagrid/body/header/column_actions.js +16 -4
  22. package/es/components/datagrid/body/header/data_grid_column_resizer.js +14 -7
  23. package/es/components/datagrid/body/header/data_grid_column_resizer.styles.js +36 -0
  24. package/es/components/datagrid/body/header/data_grid_control_header_cell.js +6 -5
  25. package/es/components/datagrid/body/header/data_grid_header_cell.js +42 -66
  26. package/es/components/datagrid/body/header/data_grid_header_cell.styles.js +27 -0
  27. package/es/components/datagrid/body/header/data_grid_header_cell_wrapper.js +9 -3
  28. package/es/components/datagrid/body/header/data_grid_header_cell_wrapper.styles.js +27 -0
  29. package/es/components/datagrid/body/header/data_grid_header_row.js +12 -2
  30. package/es/components/datagrid/body/header/data_grid_header_row.styles.js +21 -0
  31. package/es/components/datagrid/controls/column_selector.js +17 -8
  32. package/es/components/datagrid/controls/column_selector.styles.js +22 -0
  33. package/es/components/datagrid/controls/column_sorting.js +7 -2
  34. package/es/components/datagrid/controls/column_sorting.styles.js +35 -0
  35. package/es/components/datagrid/controls/column_sorting_draggable.js +19 -14
  36. package/es/components/datagrid/controls/data_grid_toolbar.js +8 -1
  37. package/es/components/datagrid/controls/data_grid_toolbar.styles.js +18 -0
  38. package/es/components/datagrid/controls/data_grid_toolbar_control.js +27 -27
  39. package/es/components/datagrid/controls/display_selector.js +14 -3
  40. package/es/components/datagrid/controls/fullscreen_selector.js +8 -5
  41. package/es/components/datagrid/controls/fullscreen_selector.styles.js +20 -0
  42. package/es/components/datagrid/controls/keyboard_shortcuts.js +7 -3
  43. package/es/components/datagrid/controls/keyboard_shortcuts.styles.js +18 -0
  44. package/es/components/datagrid/data_grid.a11y.js +1 -0
  45. package/es/components/datagrid/data_grid.js +17 -9
  46. package/es/components/datagrid/data_grid.stories.utils.js +1422 -0
  47. package/es/components/datagrid/data_grid.styles.js +88 -0
  48. package/es/components/datagrid/{utils → pagination}/data_grid_pagination.js +30 -30
  49. package/es/components/datagrid/pagination/data_grid_pagination.styles.js +16 -0
  50. package/es/components/datagrid/pagination/index.js +9 -0
  51. package/es/components/datagrid/utils/row_heights.js +10 -36
  52. package/es/components/datagrid/utils/scrolling.js +14 -7
  53. package/es/components/datagrid/utils/scrolling.styles.js +30 -0
  54. package/es/components/date_picker/date_picker.js +1 -1
  55. package/es/components/flyout/flyout_resizable.js +6 -2
  56. package/es/components/flyout/flyout_resizable.styles.js +34 -5
  57. package/es/components/popover/popover.js +1 -1
  58. package/es/components/provider/provider.js +16 -13
  59. package/es/components/provider/system_color_mode/index.js +9 -0
  60. package/es/components/provider/system_color_mode/system_color_mode_provider.js +49 -0
  61. package/es/components/resizable_container/resizable_button.js +9 -2
  62. package/es/components/resizable_container/resizable_button.styles.js +19 -6
  63. package/es/components/table/table_header_cell.js +10 -3
  64. package/es/components/table/table_header_cell_checkbox.js +5 -3
  65. package/es/components/table/table_row_cell.js +10 -3
  66. package/es/components/table/table_row_cell_checkbox.js +5 -3
  67. package/es/components/text/text.js +25 -9
  68. package/es/components/text/text_align.js +19 -6
  69. package/es/components/text/text_color.js +14 -11
  70. package/es/components/text/types.js +1 -0
  71. package/es/services/copy/index.js +10 -0
  72. package/es/services/copy/tabular_copy.js +103 -0
  73. package/es/services/index.js +1 -1
  74. package/eui.d.ts +692 -124
  75. package/i18ntokens.json +432 -396
  76. package/lib/components/basic_table/basic_table.js +42 -34
  77. package/lib/components/basic_table/collapsed_item_actions.js +23 -30
  78. package/lib/components/datagrid/body/cell/data_grid_cell.js +209 -91
  79. package/lib/components/datagrid/body/cell/data_grid_cell.styles.js +114 -0
  80. package/lib/components/datagrid/body/cell/data_grid_cell_actions.js +13 -3
  81. package/lib/components/datagrid/body/cell/data_grid_cell_actions.styles.js +38 -0
  82. package/lib/components/datagrid/body/cell/data_grid_cell_popover.js +20 -11
  83. package/lib/components/datagrid/body/cell/data_grid_cell_popover.styles.js +24 -0
  84. package/lib/components/datagrid/body/cell/focus_utils.js +17 -19
  85. package/lib/components/datagrid/body/data_grid_body.js +20 -4
  86. package/lib/components/datagrid/body/data_grid_body.styles.js +30 -0
  87. package/lib/components/datagrid/body/data_grid_body_custom.js +23 -8
  88. package/lib/components/datagrid/body/data_grid_body_virtualized.js +23 -8
  89. package/lib/components/datagrid/body/footer/data_grid_footer.styles.js +30 -0
  90. package/lib/components/datagrid/body/footer/data_grid_footer_row.js +23 -10
  91. package/lib/components/datagrid/body/header/column_actions.js +16 -4
  92. package/lib/components/datagrid/body/header/data_grid_column_resizer.js +14 -7
  93. package/lib/components/datagrid/body/header/data_grid_column_resizer.styles.js +39 -0
  94. package/lib/components/datagrid/body/header/data_grid_control_header_cell.js +6 -5
  95. package/lib/components/datagrid/body/header/data_grid_header_cell.js +49 -74
  96. package/lib/components/datagrid/body/header/data_grid_header_cell.styles.js +32 -0
  97. package/lib/components/datagrid/body/header/data_grid_header_cell_wrapper.js +8 -2
  98. package/lib/components/datagrid/body/header/data_grid_header_cell_wrapper.styles.js +32 -0
  99. package/lib/components/datagrid/body/header/data_grid_header_row.js +12 -2
  100. package/lib/components/datagrid/body/header/data_grid_header_row.styles.js +27 -0
  101. package/lib/components/datagrid/controls/column_selector.js +17 -8
  102. package/lib/components/datagrid/controls/column_selector.styles.js +28 -0
  103. package/lib/components/datagrid/controls/column_sorting.js +7 -2
  104. package/lib/components/datagrid/controls/column_sorting.styles.js +41 -0
  105. package/lib/components/datagrid/controls/column_sorting_draggable.js +19 -14
  106. package/lib/components/datagrid/controls/data_grid_toolbar.js +8 -1
  107. package/lib/components/datagrid/controls/data_grid_toolbar.styles.js +24 -0
  108. package/lib/components/datagrid/controls/data_grid_toolbar_control.js +27 -27
  109. package/lib/components/datagrid/controls/display_selector.js +13 -2
  110. package/lib/components/datagrid/controls/fullscreen_selector.js +7 -4
  111. package/lib/components/datagrid/controls/fullscreen_selector.styles.js +26 -0
  112. package/lib/components/datagrid/controls/keyboard_shortcuts.js +6 -2
  113. package/lib/components/datagrid/controls/keyboard_shortcuts.styles.js +24 -0
  114. package/lib/components/datagrid/data_grid.a11y.js +1 -0
  115. package/lib/components/datagrid/data_grid.js +16 -8
  116. package/lib/components/datagrid/data_grid.stories.utils.js +1426 -0
  117. package/lib/components/datagrid/data_grid.styles.js +94 -0
  118. package/lib/components/datagrid/{utils → pagination}/data_grid_pagination.js +30 -30
  119. package/lib/components/datagrid/pagination/data_grid_pagination.styles.js +22 -0
  120. package/lib/components/datagrid/pagination/index.js +18 -0
  121. package/lib/components/datagrid/utils/row_heights.js +11 -36
  122. package/lib/components/datagrid/utils/scrolling.js +14 -7
  123. package/lib/components/datagrid/utils/scrolling.styles.js +36 -0
  124. package/lib/components/date_picker/date_picker.js +1 -1
  125. package/lib/components/flyout/flyout_resizable.js +6 -2
  126. package/lib/components/flyout/flyout_resizable.styles.js +34 -5
  127. package/lib/components/popover/popover.js +1 -1
  128. package/lib/components/provider/provider.js +16 -13
  129. package/lib/components/provider/system_color_mode/index.js +12 -0
  130. package/lib/components/provider/system_color_mode/system_color_mode_provider.js +54 -0
  131. package/lib/components/resizable_container/resizable_button.js +9 -2
  132. package/lib/components/resizable_container/resizable_button.styles.js +19 -6
  133. package/lib/components/table/table_header_cell.js +10 -3
  134. package/lib/components/table/table_header_cell_checkbox.js +5 -3
  135. package/lib/components/table/table_row_cell.js +10 -3
  136. package/lib/components/table/table_row_cell_checkbox.js +5 -3
  137. package/lib/components/text/text.js +25 -9
  138. package/lib/components/text/text_align.js +19 -6
  139. package/lib/components/text/text_color.js +14 -11
  140. package/lib/components/text/types.js +5 -0
  141. package/lib/services/copy/index.js +25 -0
  142. package/lib/services/copy/tabular_copy.js +111 -0
  143. package/lib/services/index.js +12 -8
  144. package/optimize/es/components/basic_table/basic_table.js +43 -35
  145. package/optimize/es/components/basic_table/collapsed_item_actions.js +24 -31
  146. package/optimize/es/components/datagrid/body/cell/data_grid_cell.js +98 -88
  147. package/optimize/es/components/datagrid/body/cell/data_grid_cell.styles.js +110 -0
  148. package/optimize/es/components/datagrid/body/cell/data_grid_cell_actions.js +13 -3
  149. package/optimize/es/components/datagrid/body/cell/data_grid_cell_actions.styles.js +33 -0
  150. package/optimize/es/components/datagrid/body/cell/data_grid_cell_popover.js +21 -12
  151. package/optimize/es/components/datagrid/body/cell/data_grid_cell_popover.styles.js +19 -0
  152. package/optimize/es/components/datagrid/body/cell/focus_utils.js +18 -20
  153. package/optimize/es/components/datagrid/body/data_grid_body.js +9 -2
  154. package/optimize/es/components/datagrid/body/data_grid_body.styles.js +26 -0
  155. package/optimize/es/components/datagrid/body/data_grid_body_custom.js +12 -6
  156. package/optimize/es/components/datagrid/body/data_grid_body_virtualized.js +12 -6
  157. package/optimize/es/components/datagrid/body/footer/data_grid_footer.styles.js +24 -0
  158. package/optimize/es/components/datagrid/body/footer/data_grid_footer_row.js +24 -11
  159. package/optimize/es/components/datagrid/body/header/column_actions.js +16 -4
  160. package/optimize/es/components/datagrid/body/header/data_grid_column_resizer.js +14 -7
  161. package/optimize/es/components/datagrid/body/header/data_grid_column_resizer.styles.js +36 -0
  162. package/optimize/es/components/datagrid/body/header/data_grid_control_header_cell.js +5 -5
  163. package/optimize/es/components/datagrid/body/header/data_grid_header_cell.js +42 -61
  164. package/optimize/es/components/datagrid/body/header/data_grid_header_cell.styles.js +27 -0
  165. package/optimize/es/components/datagrid/body/header/data_grid_header_cell_wrapper.js +8 -3
  166. package/optimize/es/components/datagrid/body/header/data_grid_header_cell_wrapper.styles.js +27 -0
  167. package/optimize/es/components/datagrid/body/header/data_grid_header_row.js +12 -2
  168. package/optimize/es/components/datagrid/body/header/data_grid_header_row.styles.js +21 -0
  169. package/optimize/es/components/datagrid/controls/column_selector.js +17 -8
  170. package/optimize/es/components/datagrid/controls/column_selector.styles.js +22 -0
  171. package/optimize/es/components/datagrid/controls/column_sorting.js +7 -2
  172. package/optimize/es/components/datagrid/controls/column_sorting.styles.js +35 -0
  173. package/optimize/es/components/datagrid/controls/column_sorting_draggable.js +19 -14
  174. package/optimize/es/components/datagrid/controls/data_grid_toolbar.js +8 -1
  175. package/optimize/es/components/datagrid/controls/data_grid_toolbar.styles.js +18 -0
  176. package/optimize/es/components/datagrid/controls/data_grid_toolbar_control.js +27 -27
  177. package/optimize/es/components/datagrid/controls/display_selector.js +14 -3
  178. package/optimize/es/components/datagrid/controls/fullscreen_selector.js +8 -5
  179. package/optimize/es/components/datagrid/controls/fullscreen_selector.styles.js +20 -0
  180. package/optimize/es/components/datagrid/controls/keyboard_shortcuts.js +7 -3
  181. package/optimize/es/components/datagrid/controls/keyboard_shortcuts.styles.js +18 -0
  182. package/optimize/es/components/datagrid/data_grid.a11y.js +1 -0
  183. package/optimize/es/components/datagrid/data_grid.js +17 -9
  184. package/optimize/es/components/datagrid/data_grid.stories.utils.js +369 -0
  185. package/optimize/es/components/datagrid/data_grid.styles.js +88 -0
  186. package/optimize/es/components/datagrid/{utils → pagination}/data_grid_pagination.js +30 -30
  187. package/optimize/es/components/datagrid/pagination/data_grid_pagination.styles.js +16 -0
  188. package/optimize/es/components/datagrid/pagination/index.js +9 -0
  189. package/optimize/es/components/datagrid/utils/row_heights.js +10 -36
  190. package/optimize/es/components/datagrid/utils/scrolling.js +14 -7
  191. package/optimize/es/components/datagrid/utils/scrolling.styles.js +30 -0
  192. package/optimize/es/components/date_picker/date_picker.js +1 -1
  193. package/optimize/es/components/flyout/flyout_resizable.js +6 -2
  194. package/optimize/es/components/flyout/flyout_resizable.styles.js +34 -5
  195. package/optimize/es/components/popover/popover.js +1 -1
  196. package/optimize/es/components/provider/provider.js +16 -13
  197. package/optimize/es/components/provider/system_color_mode/index.js +9 -0
  198. package/optimize/es/components/provider/system_color_mode/system_color_mode_provider.js +40 -0
  199. package/optimize/es/components/resizable_container/resizable_button.js +3 -2
  200. package/optimize/es/components/resizable_container/resizable_button.styles.js +19 -6
  201. package/optimize/es/components/table/table_header_cell.js +3 -2
  202. package/optimize/es/components/table/table_header_cell_checkbox.js +3 -2
  203. package/optimize/es/components/table/table_row_cell.js +4 -3
  204. package/optimize/es/components/table/table_row_cell_checkbox.js +3 -2
  205. package/optimize/es/components/text/text.js +9 -4
  206. package/optimize/es/components/text/text_align.js +4 -2
  207. package/optimize/es/components/text/text_color.js +1 -2
  208. package/optimize/es/components/text/types.js +1 -0
  209. package/optimize/es/services/copy/index.js +10 -0
  210. package/optimize/es/services/copy/tabular_copy.js +103 -0
  211. package/optimize/es/services/index.js +1 -1
  212. package/optimize/lib/components/basic_table/basic_table.js +42 -34
  213. package/optimize/lib/components/basic_table/collapsed_item_actions.js +23 -30
  214. package/optimize/lib/components/datagrid/body/cell/data_grid_cell.js +95 -85
  215. package/optimize/lib/components/datagrid/body/cell/data_grid_cell.styles.js +114 -0
  216. package/optimize/lib/components/datagrid/body/cell/data_grid_cell_actions.js +13 -3
  217. package/optimize/lib/components/datagrid/body/cell/data_grid_cell_actions.styles.js +39 -0
  218. package/optimize/lib/components/datagrid/body/cell/data_grid_cell_popover.js +20 -11
  219. package/optimize/lib/components/datagrid/body/cell/data_grid_cell_popover.styles.js +25 -0
  220. package/optimize/lib/components/datagrid/body/cell/focus_utils.js +17 -19
  221. package/optimize/lib/components/datagrid/body/data_grid_body.js +9 -2
  222. package/optimize/lib/components/datagrid/body/data_grid_body.styles.js +30 -0
  223. package/optimize/lib/components/datagrid/body/data_grid_body_custom.js +12 -6
  224. package/optimize/lib/components/datagrid/body/data_grid_body_virtualized.js +12 -6
  225. package/optimize/lib/components/datagrid/body/footer/data_grid_footer.styles.js +30 -0
  226. package/optimize/lib/components/datagrid/body/footer/data_grid_footer_row.js +22 -9
  227. package/optimize/lib/components/datagrid/body/header/column_actions.js +16 -4
  228. package/optimize/lib/components/datagrid/body/header/data_grid_column_resizer.js +14 -7
  229. package/optimize/lib/components/datagrid/body/header/data_grid_column_resizer.styles.js +39 -0
  230. package/optimize/lib/components/datagrid/body/header/data_grid_control_header_cell.js +5 -5
  231. package/optimize/lib/components/datagrid/body/header/data_grid_header_cell.js +45 -63
  232. package/optimize/lib/components/datagrid/body/header/data_grid_header_cell.styles.js +32 -0
  233. package/optimize/lib/components/datagrid/body/header/data_grid_header_cell_wrapper.js +7 -2
  234. package/optimize/lib/components/datagrid/body/header/data_grid_header_cell_wrapper.styles.js +32 -0
  235. package/optimize/lib/components/datagrid/body/header/data_grid_header_row.js +12 -2
  236. package/optimize/lib/components/datagrid/body/header/data_grid_header_row.styles.js +27 -0
  237. package/optimize/lib/components/datagrid/controls/column_selector.js +17 -8
  238. package/optimize/lib/components/datagrid/controls/column_selector.styles.js +28 -0
  239. package/optimize/lib/components/datagrid/controls/column_sorting.js +7 -2
  240. package/optimize/lib/components/datagrid/controls/column_sorting.styles.js +41 -0
  241. package/optimize/lib/components/datagrid/controls/column_sorting_draggable.js +19 -14
  242. package/optimize/lib/components/datagrid/controls/data_grid_toolbar.js +8 -1
  243. package/optimize/lib/components/datagrid/controls/data_grid_toolbar.styles.js +24 -0
  244. package/optimize/lib/components/datagrid/controls/data_grid_toolbar_control.js +27 -27
  245. package/optimize/lib/components/datagrid/controls/display_selector.js +13 -2
  246. package/optimize/lib/components/datagrid/controls/fullscreen_selector.js +7 -4
  247. package/optimize/lib/components/datagrid/controls/fullscreen_selector.styles.js +26 -0
  248. package/optimize/lib/components/datagrid/controls/keyboard_shortcuts.js +6 -2
  249. package/optimize/lib/components/datagrid/controls/keyboard_shortcuts.styles.js +24 -0
  250. package/optimize/lib/components/datagrid/data_grid.a11y.js +1 -0
  251. package/optimize/lib/components/datagrid/data_grid.js +16 -8
  252. package/optimize/lib/components/datagrid/data_grid.stories.utils.js +374 -0
  253. package/optimize/lib/components/datagrid/data_grid.styles.js +94 -0
  254. package/{test-env/components/datagrid/utils → optimize/lib/components/datagrid/pagination}/data_grid_pagination.js +29 -31
  255. package/optimize/lib/components/datagrid/pagination/data_grid_pagination.styles.js +22 -0
  256. package/optimize/lib/components/datagrid/pagination/index.js +18 -0
  257. package/optimize/lib/components/datagrid/utils/row_heights.js +11 -36
  258. package/optimize/lib/components/datagrid/utils/scrolling.js +14 -7
  259. package/optimize/lib/components/datagrid/utils/scrolling.styles.js +36 -0
  260. package/optimize/lib/components/date_picker/date_picker.js +1 -1
  261. package/optimize/lib/components/flyout/flyout_resizable.js +6 -2
  262. package/optimize/lib/components/flyout/flyout_resizable.styles.js +34 -5
  263. package/optimize/lib/components/popover/popover.js +1 -1
  264. package/optimize/lib/components/provider/provider.js +16 -13
  265. package/optimize/lib/components/provider/system_color_mode/index.js +12 -0
  266. package/optimize/lib/components/provider/system_color_mode/system_color_mode_provider.js +47 -0
  267. package/optimize/lib/components/resizable_container/resizable_button.js +3 -2
  268. package/optimize/lib/components/resizable_container/resizable_button.styles.js +19 -6
  269. package/optimize/lib/components/table/table_header_cell.js +3 -2
  270. package/optimize/lib/components/table/table_header_cell_checkbox.js +3 -2
  271. package/optimize/lib/components/table/table_row_cell.js +4 -3
  272. package/optimize/lib/components/table/table_row_cell_checkbox.js +3 -2
  273. package/optimize/lib/components/text/text.js +9 -4
  274. package/optimize/lib/components/text/text_align.js +4 -2
  275. package/optimize/lib/components/text/text_color.js +1 -2
  276. package/optimize/lib/components/text/types.js +5 -0
  277. package/optimize/lib/services/copy/index.js +25 -0
  278. package/optimize/lib/services/copy/tabular_copy.js +111 -0
  279. package/optimize/lib/services/index.js +12 -8
  280. package/package.json +3 -3
  281. package/src/themes/amsterdam/theme_dark.scss +0 -7
  282. package/src/themes/amsterdam/theme_light.scss +0 -7
  283. package/test-env/components/basic_table/basic_table.js +42 -34
  284. package/test-env/components/basic_table/collapsed_item_actions.js +23 -30
  285. package/test-env/components/datagrid/body/cell/data_grid_cell.js +204 -91
  286. package/test-env/components/datagrid/body/cell/data_grid_cell.styles.js +114 -0
  287. package/test-env/components/datagrid/body/cell/data_grid_cell_actions.js +13 -3
  288. package/test-env/components/datagrid/body/cell/data_grid_cell_actions.styles.js +39 -0
  289. package/test-env/components/datagrid/body/cell/data_grid_cell_popover.js +20 -11
  290. package/test-env/components/datagrid/body/cell/data_grid_cell_popover.styles.js +25 -0
  291. package/test-env/components/datagrid/body/cell/focus_utils.js +17 -19
  292. package/test-env/components/datagrid/body/data_grid_body.js +20 -4
  293. package/test-env/components/datagrid/body/data_grid_body.styles.js +30 -0
  294. package/test-env/components/datagrid/body/data_grid_body_custom.js +23 -8
  295. package/test-env/components/datagrid/body/data_grid_body_virtualized.js +23 -8
  296. package/test-env/components/datagrid/body/footer/data_grid_footer.styles.js +30 -0
  297. package/test-env/components/datagrid/body/footer/data_grid_footer_row.js +22 -9
  298. package/test-env/components/datagrid/body/header/column_actions.js +16 -4
  299. package/test-env/components/datagrid/body/header/data_grid_column_resizer.js +14 -7
  300. package/test-env/components/datagrid/body/header/data_grid_column_resizer.styles.js +39 -0
  301. package/test-env/components/datagrid/body/header/data_grid_control_header_cell.js +6 -5
  302. package/test-env/components/datagrid/body/header/data_grid_header_cell.js +45 -67
  303. package/test-env/components/datagrid/body/header/data_grid_header_cell.styles.js +32 -0
  304. package/test-env/components/datagrid/body/header/data_grid_header_cell_wrapper.js +8 -2
  305. package/test-env/components/datagrid/body/header/data_grid_header_cell_wrapper.styles.js +32 -0
  306. package/test-env/components/datagrid/body/header/data_grid_header_row.js +12 -2
  307. package/test-env/components/datagrid/body/header/data_grid_header_row.styles.js +27 -0
  308. package/test-env/components/datagrid/controls/column_selector.js +17 -8
  309. package/test-env/components/datagrid/controls/column_selector.styles.js +28 -0
  310. package/test-env/components/datagrid/controls/column_sorting.js +7 -2
  311. package/test-env/components/datagrid/controls/column_sorting.styles.js +41 -0
  312. package/test-env/components/datagrid/controls/column_sorting_draggable.js +19 -14
  313. package/test-env/components/datagrid/controls/data_grid_toolbar.js +8 -1
  314. package/test-env/components/datagrid/controls/data_grid_toolbar.styles.js +24 -0
  315. package/test-env/components/datagrid/controls/data_grid_toolbar_control.js +27 -27
  316. package/test-env/components/datagrid/controls/display_selector.js +13 -2
  317. package/test-env/components/datagrid/controls/fullscreen_selector.js +7 -4
  318. package/test-env/components/datagrid/controls/fullscreen_selector.styles.js +26 -0
  319. package/test-env/components/datagrid/controls/keyboard_shortcuts.js +6 -2
  320. package/test-env/components/datagrid/controls/keyboard_shortcuts.styles.js +24 -0
  321. package/test-env/components/datagrid/data_grid.a11y.js +1 -0
  322. package/test-env/components/datagrid/data_grid.js +16 -8
  323. package/test-env/components/datagrid/data_grid.stories.utils.js +1419 -0
  324. package/test-env/components/datagrid/data_grid.styles.js +94 -0
  325. package/{optimize/lib/components/datagrid/utils → test-env/components/datagrid/pagination}/data_grid_pagination.js +29 -31
  326. package/test-env/components/datagrid/pagination/data_grid_pagination.styles.js +22 -0
  327. package/test-env/components/datagrid/pagination/index.js +18 -0
  328. package/test-env/components/datagrid/utils/row_heights.js +11 -36
  329. package/test-env/components/datagrid/utils/scrolling.js +14 -7
  330. package/test-env/components/datagrid/utils/scrolling.styles.js +36 -0
  331. package/test-env/components/date_picker/date_picker.js +1 -1
  332. package/test-env/components/flyout/flyout_resizable.js +6 -2
  333. package/test-env/components/flyout/flyout_resizable.styles.js +34 -5
  334. package/test-env/components/popover/popover.js +1 -1
  335. package/test-env/components/provider/provider.js +16 -13
  336. package/test-env/components/provider/system_color_mode/index.js +12 -0
  337. package/test-env/components/provider/system_color_mode/system_color_mode_provider.js +51 -0
  338. package/test-env/components/resizable_container/resizable_button.js +9 -2
  339. package/test-env/components/resizable_container/resizable_button.styles.js +19 -6
  340. package/test-env/components/table/table_header_cell.js +10 -3
  341. package/test-env/components/table/table_header_cell_checkbox.js +5 -3
  342. package/test-env/components/table/table_row_cell.js +10 -3
  343. package/test-env/components/table/table_row_cell_checkbox.js +5 -3
  344. package/test-env/components/text/text.js +25 -9
  345. package/test-env/components/text/text_align.js +19 -6
  346. package/test-env/components/text/text_color.js +14 -11
  347. package/test-env/components/text/types.js +5 -0
  348. package/test-env/services/copy/index.js +25 -0
  349. package/test-env/services/copy/tabular_copy.js +30 -0
  350. package/test-env/services/index.js +12 -8
  351. package/src/components/datagrid/_data_grid.scss +0 -121
  352. package/src/components/datagrid/_data_grid_data_row.scss +0 -303
  353. package/src/components/datagrid/_index.scss +0 -12
  354. package/src/components/datagrid/_mixins.scss +0 -84
  355. package/src/components/datagrid/_variables.scss +0 -11
  356. package/src/components/datagrid/body/footer/_data_grid_footer_row.scss +0 -47
  357. package/src/components/datagrid/body/header/_data_grid_column_resizer.scss +0 -48
  358. package/src/components/datagrid/body/header/_data_grid_header_row.scss +0 -221
  359. package/src/components/datagrid/controls/_data_grid_column_selector.scss +0 -19
  360. package/src/components/datagrid/controls/_data_grid_column_sorting.scss +0 -43
  361. package/src/components/datagrid/controls/_data_grid_display.scss +0 -3
  362. package/src/components/datagrid/controls/_data_grid_keyboard_shortcuts.scss +0 -11
  363. package/src/components/datagrid/controls/_data_grid_toolbar.scss +0 -55
  364. package/src/components/index.scss +0 -3
  365. package/src/themes/amsterdam/overrides/_data_grid.scss +0 -5
  366. package/src/themes/amsterdam/overrides/_index.scss +0 -1
  367. /package/es/services/{copy_to_clipboard.js → copy/copy_to_clipboard.js} +0 -0
  368. /package/lib/services/{copy_to_clipboard.js → copy/copy_to_clipboard.js} +0 -0
  369. /package/optimize/es/services/{copy_to_clipboard.js → copy/copy_to_clipboard.js} +0 -0
  370. /package/optimize/lib/services/{copy_to_clipboard.js → copy/copy_to_clipboard.js} +0 -0
  371. /package/test-env/services/{copy_to_clipboard.js → copy/copy_to_clipboard.js} +0 -0
@@ -1,7 +1,8 @@
1
1
  function _typeof(o) { "@babel/helpers - typeof"; return _typeof = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function (o) { return typeof o; } : function (o) { return o && "function" == typeof Symbol && o.constructor === Symbol && o !== Symbol.prototype ? "symbol" : typeof o; }, _typeof(o); }
2
- var _excluded = ["renderCellValue", "cellContext", "column", "setCellContentsRef", "rowIndex", "colIndex", "ariaRowIndex", "rowHeight", "rowHeightUtils", "isControlColumn", "isFocused", "showCellActions", "onExpandClick", "popoverAnchorRef"],
2
+ var _excluded = ["renderCellValue", "cellContext", "column", "setCellContentsRef", "rowIndex", "colIndex", "rowHeight", "rowHeightUtils", "isControlColumn"],
3
3
  _excluded2 = ["width", "popoverContext", "interactiveCellId", "columnType", "className", "column", "style", "rowHeightUtils", "rowHeightsOptions", "rowManager", "pagination"],
4
- _excluded3 = ["isExpandable", "style", "className", "data-test-subj"];
4
+ _excluded3 = ["isExpandable", "style", "className", "data-test-subj"],
5
+ _excluded4 = ["columnId", "columnIndex", "rowIndex", "visibleRowIndex"];
5
6
  function ownKeys(e, r) { var t = Object.keys(e); if (Object.getOwnPropertySymbols) { var o = Object.getOwnPropertySymbols(e); r && (o = o.filter(function (r) { return Object.getOwnPropertyDescriptor(e, r).enumerable; })), t.push.apply(t, o); } return t; }
6
7
  function _objectSpread(e) { for (var r = 1; r < arguments.length; r++) { var t = null != arguments[r] ? arguments[r] : {}; r % 2 ? ownKeys(Object(t), !0).forEach(function (r) { _defineProperty(e, r, t[r]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e, Object.getOwnPropertyDescriptors(t)) : ownKeys(Object(t)).forEach(function (r) { Object.defineProperty(e, r, Object.getOwnPropertyDescriptor(t, r)); }); } return e; }
7
8
  function _classCallCheck(a, n) { if (!(a instanceof n)) throw new TypeError("Cannot call a class as a function"); }
@@ -18,6 +19,12 @@ function _defineProperty(e, r, t) { return (r = _toPropertyKey(r)) in e ? Object
18
19
  function _toPropertyKey(t) { var i = _toPrimitive(t, "string"); return "symbol" == _typeof(i) ? i : i + ""; }
19
20
  function _toPrimitive(t, r) { if ("object" != _typeof(t) || !t) return t; var e = t[Symbol.toPrimitive]; if (void 0 !== e) { var i = e.call(t, r || "default"); if ("object" != _typeof(i)) return i; throw new TypeError("@@toPrimitive must return a primitive value."); } return ("string" === r ? String : Number)(t); }
20
21
  function _extends() { return _extends = Object.assign ? Object.assign.bind() : function (n) { for (var e = 1; e < arguments.length; e++) { var t = arguments[e]; for (var r in t) ({}).hasOwnProperty.call(t, r) && (n[r] = t[r]); } return n; }, _extends.apply(null, arguments); }
22
+ function _toConsumableArray(r) { return _arrayWithoutHoles(r) || _iterableToArray(r) || _unsupportedIterableToArray(r) || _nonIterableSpread(); }
23
+ function _nonIterableSpread() { throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method."); }
24
+ function _unsupportedIterableToArray(r, a) { if (r) { if ("string" == typeof r) return _arrayLikeToArray(r, a); var t = {}.toString.call(r).slice(8, -1); return "Object" === t && r.constructor && (t = r.constructor.name), "Map" === t || "Set" === t ? Array.from(r) : "Arguments" === t || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(t) ? _arrayLikeToArray(r, a) : void 0; } }
25
+ function _iterableToArray(r) { if ("undefined" != typeof Symbol && null != r[Symbol.iterator] || null != r["@@iterator"]) return Array.from(r); }
26
+ function _arrayWithoutHoles(r) { if (Array.isArray(r)) return _arrayLikeToArray(r); }
27
+ function _arrayLikeToArray(r, a) { (null == a || a > r.length) && (a = r.length); for (var e = 0, n = Array(a); e < a; e++) n[e] = r[e]; return n; }
21
28
  function _objectWithoutProperties(e, t) { if (null == e) return {}; var o, r, i = _objectWithoutPropertiesLoose(e, t); if (Object.getOwnPropertySymbols) { var n = Object.getOwnPropertySymbols(e); for (r = 0; r < n.length; r++) o = n[r], t.indexOf(o) >= 0 || {}.propertyIsEnumerable.call(e, o) && (i[o] = e[o]); } return i; }
22
29
  function _objectWithoutPropertiesLoose(r, e) { if (null == r) return {}; var t = {}; for (var n in r) if ({}.hasOwnProperty.call(r, n)) { if (e.indexOf(n) >= 0) continue; t[n] = r[n]; } return t; }
23
30
  /*
@@ -30,18 +37,19 @@ function _objectWithoutPropertiesLoose(r, e) { if (null == r) return {}; var t =
30
37
 
31
38
  import classNames from 'classnames';
32
39
  import PropTypes from "prop-types";
33
- import React, { Component, createRef, memo, useMemo } from 'react';
40
+ import React, { Component, createRef, memo, useMemo, forwardRef } from 'react';
34
41
  import { createPortal } from 'react-dom';
35
42
  import { IS_JEST_ENVIRONMENT } from '../../../../utils';
36
- import { keys } from '../../../../services';
43
+ import { keys, tabularCopyMarkers, useEuiMemoizedStyles } from '../../../../services';
37
44
  import { EuiScreenReaderOnly } from '../../../accessibility';
38
- import { EuiI18n } from '../../../i18n';
45
+ import { useEuiI18n } from '../../../i18n';
39
46
  import { EuiTextBlockTruncate } from '../../../text_truncate';
40
47
  import { hasResizeObserver } from '../../../observer/resize_observer/resize_observer';
41
48
  import { DataGridFocusContext } from '../../utils/focus';
42
49
  import { EuiDataGridCellActions, EuiDataGridCellPopoverActions } from './data_grid_cell_actions';
43
50
  import { DefaultCellPopover } from './data_grid_cell_popover';
44
51
  import { HandleInteractiveChildren } from './focus_utils';
52
+ import { euiDataGridRowCellStyles } from './data_grid_cell.styles';
45
53
  import { jsx as ___EmotionJSX } from "@emotion/react";
46
54
  var EuiDataGridCellContent = /*#__PURE__*/memo(function (_ref) {
47
55
  var renderCellValue = _ref.renderCellValue,
@@ -50,14 +58,9 @@ var EuiDataGridCellContent = /*#__PURE__*/memo(function (_ref) {
50
58
  setCellContentsRef = _ref.setCellContentsRef,
51
59
  rowIndex = _ref.rowIndex,
52
60
  colIndex = _ref.colIndex,
53
- ariaRowIndex = _ref.ariaRowIndex,
54
61
  rowHeight = _ref.rowHeight,
55
62
  rowHeightUtils = _ref.rowHeightUtils,
56
63
  isControlColumn = _ref.isControlColumn,
57
- isFocused = _ref.isFocused,
58
- showCellActions = _ref.showCellActions,
59
- onExpandClick = _ref.onExpandClick,
60
- popoverAnchorRef = _ref.popoverAnchorRef,
61
64
  rest = _objectWithoutProperties(_ref, _excluded);
62
65
  // React is more permissive than the TS types indicate
63
66
  var CellElement = renderCellValue;
@@ -70,39 +73,26 @@ var EuiDataGridCellContent = /*#__PURE__*/memo(function (_ref) {
70
73
  'eui-textTruncate': cellHeightType === 'default'
71
74
  });
72
75
  }, [cellHeightType, isControlColumn]);
73
- return ___EmotionJSX(React.Fragment, null, ___EmotionJSX(RenderTruncatedCellContent, {
76
+ var styles = useEuiMemoizedStyles(euiDataGridRowCellStyles);
77
+ var cssStyles = [styles.content.euiDataGridRowCell__content].concat(_toConsumableArray(isControlColumn ? [styles.content.controlColumn, styles.content.autoHeight] : [
78
+ // Regular data cells should always inherit height from the row wrapper,
79
+ // except for auto height
80
+ cellHeightType === 'auto' ? styles.content.autoHeight : styles.content.defaultHeight]));
81
+ return ___EmotionJSX(RenderTruncatedCellContent, {
74
82
  hasLineCountTruncation: cellHeightType === 'lineCount' && !isControlColumn,
75
83
  rowHeight: rowHeight
76
84
  }, ___EmotionJSX("div", {
77
85
  ref: setCellContentsRef,
78
86
  "data-datagrid-cellcontent": true,
79
- className: classes
87
+ className: classes,
88
+ css: cssStyles
80
89
  }, ___EmotionJSX(CellElement, _extends({
81
90
  isDetails: false,
82
91
  "data-test-subj": "cell-content",
83
92
  rowIndex: rowIndex,
84
93
  colIndex: colIndex,
85
94
  schema: (column === null || column === void 0 ? void 0 : column.schema) || rest.columnType
86
- }, cellContext, rest)))), ___EmotionJSX(EuiScreenReaderOnly, null, ___EmotionJSX("p", {
87
- hidden: !isFocused
88
- }, '- ', ___EmotionJSX(EuiI18n, {
89
- token: "euiDataGridCell.position",
90
- default: "{columnId}, column {col}, row {row}",
91
- values: {
92
- columnId: (column === null || column === void 0 ? void 0 : column.displayAsText) || rest.columnId,
93
- col: colIndex + 1,
94
- row: ariaRowIndex
95
- }
96
- }), showCellActions && ___EmotionJSX(React.Fragment, null, '. ', ___EmotionJSX(EuiI18n, {
97
- token: "euiDataGridCell.expansionEnterPrompt",
98
- default: "Press the Enter key to expand this cell."
99
- })))), showCellActions && ___EmotionJSX(EuiDataGridCellActions, {
100
- rowIndex: rowIndex,
101
- colIndex: colIndex,
102
- column: column,
103
- onExpandClick: onExpandClick,
104
- popoverAnchorRef: popoverAnchorRef
105
- }));
95
+ }, cellContext, rest))));
106
96
  });
107
97
  EuiDataGridCellContent.propTypes = {
108
98
  rowIndex: PropTypes.number.isRequired,
@@ -548,15 +538,61 @@ EuiDataGridCellContent.propTypes = {
548
538
  }),
549
539
  rowHeightUtils: PropTypes.oneOfType([PropTypes.any.isRequired, PropTypes.any.isRequired]),
550
540
  pagination: PropTypes.any,
541
+ gridStyles: PropTypes.shape({
542
+ /**
543
+ * Size of fonts used within the row and column cells
544
+ * @default m
545
+ */
546
+ fontSize: PropTypes.oneOf(["s", "m", "l"]),
547
+ /**
548
+ * Defines the padding with the row and column cells
549
+ * @default m
550
+ */
551
+ cellPadding: PropTypes.oneOf(["s", "m", "l"]),
552
+ /**
553
+ * Border used for the row and column cells
554
+ * @default all
555
+ */
556
+ border: PropTypes.oneOf(["all", "horizontal", "none"]),
557
+ /**
558
+ * If set to true, rows will alternate zebra striping for clarity
559
+ * @default false
560
+ */
561
+ stripes: PropTypes.bool,
562
+ /**
563
+ * Visual style for the column headers. Recommendation is to use the `underline` style in times when #EuiDataGrid `toolbarVisibility` is set to `false`.
564
+ * @default shade
565
+ */
566
+ header: PropTypes.oneOf(["shade", "underline"]),
567
+ /**
568
+ * Visual style for the column footers.
569
+ * @default overline
570
+ */
571
+ footer: PropTypes.oneOf(["shade", "overline", "striped"]),
572
+ /**
573
+ * If set to true, the footer row will be sticky
574
+ * @default true
575
+ */
576
+ stickyFooter: PropTypes.bool,
577
+ /**
578
+ * Will define what visual style to show on row hover
579
+ * @default hover
580
+ */
581
+ rowHover: PropTypes.oneOf(["highlight", "none"]),
582
+ /**
583
+ * Optionally pass custom classes to highlight or customize certain rows
584
+ */
585
+ rowClasses: PropTypes.shape({}),
586
+ /**
587
+ * Optional callback returning the current `gridStyle` config when changes occur from user input (e.g. toolbar display controls).
588
+ * Can be used for, e.g. storing user `gridStyle` in a local storage object.
589
+ */
590
+ onChange: PropTypes.func
591
+ }).isRequired,
551
592
  setCellProps: PropTypes.func.isRequired,
552
593
  setCellContentsRef: PropTypes.func.isRequired,
553
- showCellActions: PropTypes.bool.isRequired,
554
594
  isExpanded: PropTypes.bool.isRequired,
555
- onExpandClick: PropTypes.func.isRequired,
556
- popoverAnchorRef: PropTypes.any.isRequired,
557
595
  isControlColumn: PropTypes.bool.isRequired,
558
- isFocused: PropTypes.bool.isRequired,
559
- ariaRowIndex: PropTypes.number.isRequired,
560
596
  rowHeight: PropTypes.oneOfType([PropTypes.number.isRequired, PropTypes.oneOf(["auto"]), PropTypes.shape({
561
597
  lineCount: PropTypes.number,
562
598
  height: PropTypes.number
@@ -579,8 +615,7 @@ export var EuiDataGridCell = /*#__PURE__*/function (_Component) {
579
615
  _defineProperty(_this, "state", {
580
616
  cellProps: {},
581
617
  isFocused: false,
582
- isHovered: false,
583
- cellTextAlign: 'Left'
618
+ isHovered: false
584
619
  });
585
620
  _defineProperty(_this, "unsubscribeCell", void 0);
586
621
  _defineProperty(_this, "style", null);
@@ -621,7 +656,7 @@ export var EuiDataGridCell = /*#__PURE__*/function (_Component) {
621
656
  var lineCount = isSingleLine ? 1 : rowHeightUtils === null || rowHeightUtils === void 0 ? void 0 : rowHeightUtils.getLineCount(rowHeightOption);
622
657
  if (lineCount) {
623
658
  var shouldUseHeightsCache = rowHeightUtils === null || rowHeightUtils === void 0 ? void 0 : rowHeightUtils.isRowHeightOverride(rowIndex, rowHeightsOptions);
624
- var height = rowHeightUtils.calculateHeightForLineCount(_this.cellContentsRef, lineCount, shouldUseHeightsCache);
659
+ var height = rowHeightUtils.calculateHeightForLineCount(_this.cellContentsRef, lineCount);
625
660
  if (shouldUseHeightsCache) {
626
661
  var _this$props4 = _this.props,
627
662
  columnId = _this$props4.columnId,
@@ -662,29 +697,6 @@ export var EuiDataGridCell = /*#__PURE__*/function (_Component) {
662
697
  } else if (_this.contentObserver) {
663
698
  _this.contentObserver.disconnect();
664
699
  }
665
- _this.setCellTextAlign();
666
- });
667
- _defineProperty(_this, "setCellTextAlign", function () {
668
- if (_this.cellContentsRef) {
669
- var columnType = _this.props.columnType;
670
- if (!columnType) {
671
- // If no schema was set, this is likely a left aligned column
672
- _this.setState({
673
- cellTextAlign: 'Left'
674
- });
675
- } else if (columnType === 'numeric' || columnType === 'currency') {
676
- // Default EUI schemas that we know set right text align
677
- _this.setState({
678
- cellTextAlign: 'Right'
679
- });
680
- } else {
681
- // If the consumer is using a custom schema, it may have custom text alignment
682
- var textAlign = window.getComputedStyle(_this.cellContentsRef).getPropertyValue('text-align');
683
- _this.setState({
684
- cellTextAlign: textAlign === 'right' || textAlign === 'end' ? 'Right' : 'Left'
685
- });
686
- }
687
- }
688
700
  });
689
701
  _defineProperty(_this, "isExpandable", function () {
690
702
  var _this$props$column, _this$state$cellProps;
@@ -713,7 +725,9 @@ export var EuiDataGridCell = /*#__PURE__*/function (_Component) {
713
725
  // Set popover anchor
714
726
  var cellAnchorEl = _this.popoverAnchorRef.current;
715
727
  setPopoverAnchor(cellAnchorEl);
716
- setPopoverAnchorPosition("down".concat(_this.state.cellTextAlign));
728
+ // TODO: Potentially switch to `topLeft` based on occlusion with sticky header
729
+ // @see https://github.com/elastic/eui/issues/7828
730
+ setPopoverAnchorPosition('downLeft');
717
731
 
718
732
  // Set popover contents with cell content
719
733
  var _this$props5 = _this.props,
@@ -834,12 +848,12 @@ export var EuiDataGridCell = /*#__PURE__*/function (_Component) {
834
848
  }, {
835
849
  key: "componentDidUpdate",
836
850
  value: function componentDidUpdate(prevProps) {
837
- var _this$props$rowHeight, _prevProps$rowHeights, _this$props$rowHeight2, _this$props$rowHeight3, _this$props$style, _prevProps$style;
851
+ var _this$props$rowHeight, _prevProps$rowHeights, _this$props$rowHeight2, _prevProps$rowHeights2, _this$props$rowHeight3, _prevProps$rowHeights3, _this$props$gridStyle, _prevProps$gridStyles, _this$props$gridStyle2, _prevProps$gridStyles2, _this$props$rowHeight4, _this$props$rowHeight5, _this$props$style, _prevProps$style;
838
852
  this.recalculateAutoHeight();
839
- if (((_this$props$rowHeight = this.props.rowHeightsOptions) === null || _this$props$rowHeight === void 0 ? void 0 : _this$props$rowHeight.defaultHeight) !== ((_prevProps$rowHeights = prevProps.rowHeightsOptions) === null || _prevProps$rowHeights === void 0 ? void 0 : _prevProps$rowHeights.defaultHeight)) {
853
+ if (((_this$props$rowHeight = this.props.rowHeightsOptions) === null || _this$props$rowHeight === void 0 ? void 0 : _this$props$rowHeight.defaultHeight) !== ((_prevProps$rowHeights = prevProps.rowHeightsOptions) === null || _prevProps$rowHeights === void 0 ? void 0 : _prevProps$rowHeights.defaultHeight) || ((_this$props$rowHeight2 = this.props.rowHeightsOptions) === null || _this$props$rowHeight2 === void 0 || (_this$props$rowHeight2 = _this$props$rowHeight2.rowHeights) === null || _this$props$rowHeight2 === void 0 ? void 0 : _this$props$rowHeight2[this.props.rowIndex]) !== ((_prevProps$rowHeights2 = prevProps.rowHeightsOptions) === null || _prevProps$rowHeights2 === void 0 || (_prevProps$rowHeights2 = _prevProps$rowHeights2.rowHeights) === null || _prevProps$rowHeights2 === void 0 ? void 0 : _prevProps$rowHeights2[prevProps.rowIndex]) || ((_this$props$rowHeight3 = this.props.rowHeightsOptions) === null || _this$props$rowHeight3 === void 0 ? void 0 : _this$props$rowHeight3.lineHeight) !== ((_prevProps$rowHeights3 = prevProps.rowHeightsOptions) === null || _prevProps$rowHeights3 === void 0 ? void 0 : _prevProps$rowHeights3.lineHeight) || ((_this$props$gridStyle = this.props.gridStyles) === null || _this$props$gridStyle === void 0 ? void 0 : _this$props$gridStyle.fontSize) !== ((_prevProps$gridStyles = prevProps.gridStyles) === null || _prevProps$gridStyles === void 0 ? void 0 : _prevProps$gridStyles.fontSize) || ((_this$props$gridStyle2 = this.props.gridStyles) === null || _this$props$gridStyle2 === void 0 ? void 0 : _this$props$gridStyle2.cellPadding) !== ((_prevProps$gridStyles2 = prevProps.gridStyles) === null || _prevProps$gridStyles2 === void 0 ? void 0 : _prevProps$gridStyles2.cellPadding)) {
840
854
  this.recalculateLineHeight();
841
855
  }
842
- if ((_this$props$rowHeight2 = this.props.rowHeightUtils) !== null && _this$props$rowHeight2 !== void 0 && _this$props$rowHeight2.compensateForLayoutShift && (_this$props$rowHeight3 = this.props.rowHeightsOptions) !== null && _this$props$rowHeight3 !== void 0 && _this$props$rowHeight3.scrollAnchorRow && this.props.colIndex === 0 &&
856
+ if ((_this$props$rowHeight4 = this.props.rowHeightUtils) !== null && _this$props$rowHeight4 !== void 0 && _this$props$rowHeight4.compensateForLayoutShift && (_this$props$rowHeight5 = this.props.rowHeightsOptions) !== null && _this$props$rowHeight5 !== void 0 && _this$props$rowHeight5.scrollAnchorRow && this.props.colIndex === 0 &&
843
857
  // once per row
844
858
  this.props.columnId === prevProps.columnId &&
845
859
  // if this is still the same column
@@ -847,12 +861,12 @@ export var EuiDataGridCell = /*#__PURE__*/function (_Component) {
847
861
  // if this is still the same row
848
862
  ((_this$props$style = this.props.style) === null || _this$props$style === void 0 ? void 0 : _this$props$style.top) !== ((_prevProps$style = prevProps.style) === null || _prevProps$style === void 0 ? void 0 : _prevProps$style.top) // if the top position has changed
849
863
  ) {
850
- var _prevProps$style2, _this$props$style2, _this$props$rowHeight4;
864
+ var _prevProps$style2, _this$props$style2, _this$props$rowHeight6;
851
865
  var previousTop = parseFloat((_prevProps$style2 = prevProps.style) === null || _prevProps$style2 === void 0 ? void 0 : _prevProps$style2.top);
852
866
  var currentTop = parseFloat((_this$props$style2 = this.props.style) === null || _this$props$style2 === void 0 ? void 0 : _this$props$style2.top);
853
867
 
854
868
  // @ts-ignore We've already checked that this virtualization util is available above
855
- this.props.rowHeightUtils.compensateForLayoutShift(this.props.rowIndex, currentTop - previousTop, (_this$props$rowHeight4 = this.props.rowHeightsOptions) === null || _this$props$rowHeight4 === void 0 ? void 0 : _this$props$rowHeight4.scrollAnchorRow);
869
+ this.props.rowHeightUtils.compensateForLayoutShift(this.props.rowIndex, currentTop - previousTop, (_this$props$rowHeight6 = this.props.rowHeightsOptions) === null || _this$props$rowHeight6 === void 0 ? void 0 : _this$props$rowHeight6.scrollAnchorRow);
856
870
  }
857
871
  if (this.props.popoverContext.popoverIsOpen !== prevProps.popoverContext.popoverIsOpen || this.props.popoverContext.cellLocation !== prevProps.popoverContext.cellLocation || this.props.renderCellPopover !== prevProps.renderCellPopover) {
858
872
  this.handleCellPopover();
@@ -864,6 +878,7 @@ export var EuiDataGridCell = /*#__PURE__*/function (_Component) {
864
878
  }, {
865
879
  key: "shouldComponentUpdate",
866
880
  value: function shouldComponentUpdate(nextProps, nextState) {
881
+ var _nextProps$gridStyles, _this$props$gridStyle3, _nextProps$gridStyles2, _this$props$gridStyle4;
867
882
  if (nextProps.rowIndex !== this.props.rowIndex) return true;
868
883
  if (nextProps.visibleRowIndex !== this.props.visibleRowIndex) return true;
869
884
  if (nextProps.colIndex !== this.props.colIndex) return true;
@@ -871,6 +886,8 @@ export var EuiDataGridCell = /*#__PURE__*/function (_Component) {
871
886
  if (nextProps.columnType !== this.props.columnType) return true;
872
887
  if (nextProps.width !== this.props.width) return true;
873
888
  if (nextProps.rowHeightsOptions !== this.props.rowHeightsOptions) return true;
889
+ if (((_nextProps$gridStyles = nextProps.gridStyles) === null || _nextProps$gridStyles === void 0 ? void 0 : _nextProps$gridStyles.fontSize) !== ((_this$props$gridStyle3 = this.props.gridStyles) === null || _this$props$gridStyle3 === void 0 ? void 0 : _this$props$gridStyle3.fontSize)) return true;
890
+ if (((_nextProps$gridStyles2 = nextProps.gridStyles) === null || _nextProps$gridStyles2 === void 0 ? void 0 : _nextProps$gridStyles2.cellPadding) !== ((_this$props$gridStyle4 = this.props.gridStyles) === null || _this$props$gridStyle4 === void 0 ? void 0 : _this$props$gridStyle4.cellPadding)) return true;
874
891
  if (nextProps.renderCellValue !== this.props.renderCellValue) return true;
875
892
  if (nextProps.renderCellPopover !== this.props.renderCellPopover) return true;
876
893
  if (nextProps.interactiveCellId !== this.props.interactiveCellId) return true;
@@ -915,7 +932,11 @@ export var EuiDataGridCell = /*#__PURE__*/function (_Component) {
915
932
  var isExpandable = this.isExpandable();
916
933
  var popoverIsOpen = this.isPopoverOpen();
917
934
  var showCellActions = isExpandable && (popoverIsOpen || this.state.isFocused || this.state.isHovered);
918
- var cellClasses = classNames('euiDataGridRowCell', "euiDataGridRowCell--align".concat(this.state.cellTextAlign), _defineProperty(_defineProperty({}, "euiDataGridRowCell--".concat(columnType), columnType), 'euiDataGridRowCell--open', popoverIsOpen), className);
935
+ var cellClasses = classNames('euiDataGridRowCell', _defineProperty(_defineProperty({}, "euiDataGridRowCell--".concat(columnType), columnType), 'euiDataGridRowCell--open', popoverIsOpen), className);
936
+
937
+ // classNames set by EuiDataGridCellWrapper
938
+ var isControlColumn = cellClasses.includes('euiDataGridRowCell--controlColumn');
939
+ var isLastColumn = cellClasses.includes('euiDataGridRowCell--lastColumn');
919
940
  var ariaRowIndex = pagination ? visibleRowIndex + 1 + pagination.pageSize * pagination.pageIndex : visibleRowIndex + 1;
920
941
  var _this$state$cellProps2 = this.state.cellProps,
921
942
  _ = _this$state$cellProps2.isExpandable,
@@ -945,23 +966,14 @@ export var EuiDataGridCell = /*#__PURE__*/function (_Component) {
945
966
  }) : undefined;
946
967
  return ___EmotionJSX(RenderCellInRow, {
947
968
  row: row
948
- }, ___EmotionJSX("div", _extends({
949
- role: "gridcell",
969
+ }, ___EmotionJSX(GridCellDiv, _extends({}, cellProps, {
970
+ ref: this.cellRef,
971
+ columnId: this.props.columnId,
972
+ columnIndex: this.props.colIndex,
973
+ rowIndex: rowIndex,
974
+ visibleRowIndex: this.props.visibleRowIndex,
950
975
  "aria-rowindex": ariaRowIndex,
951
976
  tabIndex: this.state.isFocused ? 0 : -1,
952
- ref: this.cellRef
953
- }, cellProps, {
954
- "data-test-subj": "dataGridRowCell"
955
- // Data attributes to help target specific cells by either data or current cell location
956
- ,
957
- "data-gridcell-column-id": this.props.columnId // Static column ID name, not affected by column order
958
- ,
959
- "data-gridcell-column-index": this.props.colIndex // Affected by column reordering
960
- ,
961
- "data-gridcell-row-index": this.props.rowIndex // Index from data, not affected by sorting or pagination
962
- ,
963
- "data-gridcell-visible-row-index": this.props.visibleRowIndex // Affected by sorting & pagination
964
- ,
965
977
  onKeyDown: this.handleCellKeyDown,
966
978
  onMouseEnter: this.onMouseEnter,
967
979
  onMouseLeave: this.onMouseLeave
@@ -975,18 +987,24 @@ export var EuiDataGridCell = /*#__PURE__*/function (_Component) {
975
987
  columnType: columnType,
976
988
  isExpandable: isExpandable,
977
989
  isExpanded: popoverIsOpen,
978
- onExpandClick: this.handleCellExpansionClick,
979
- popoverAnchorRef: this.popoverAnchorRef,
980
- showCellActions: showCellActions,
981
- isFocused: this.state.isFocused,
982
990
  setCellContentsRef: this.setCellContentsRef,
983
991
  rowHeight: rowHeight,
984
992
  rowHeightUtils: rowHeightUtils,
985
- isControlColumn: cellClasses.includes('euiDataGridRowCell--controlColumn'),
986
- ariaRowIndex: ariaRowIndex,
993
+ isControlColumn: isControlColumn,
987
994
  rowIndex: rowIndex,
988
995
  colIndex: colIndex
989
- })))));
996
+ }))), isLastColumn ? tabularCopyMarkers.hiddenNewline : tabularCopyMarkers.hiddenTab, this.state.isFocused && ___EmotionJSX(CellScreenReaderDescription, {
997
+ columnName: (column === null || column === void 0 ? void 0 : column.displayAsText) || this.props.columnId,
998
+ columnIndex: colIndex + 1,
999
+ rowIndex: ariaRowIndex,
1000
+ canExpandCell: showCellActions
1001
+ }), showCellActions && ___EmotionJSX(EuiDataGridCellActions, {
1002
+ rowIndex: rowIndex,
1003
+ colIndex: colIndex,
1004
+ column: column,
1005
+ onExpandClick: this.handleCellExpansionClick,
1006
+ popoverAnchorRef: this.popoverAnchorRef
1007
+ })));
990
1008
  }
991
1009
  }]);
992
1010
  }(Component);
@@ -1383,7 +1401,58 @@ EuiDataGridCell.propTypes = {
1383
1401
  rowManager: PropTypes.shape({
1384
1402
  getRow: PropTypes.func.isRequired
1385
1403
  }),
1386
- pagination: PropTypes.any
1404
+ pagination: PropTypes.any,
1405
+ gridStyles: PropTypes.shape({
1406
+ /**
1407
+ * Size of fonts used within the row and column cells
1408
+ * @default m
1409
+ */
1410
+ fontSize: PropTypes.oneOf(["s", "m", "l"]),
1411
+ /**
1412
+ * Defines the padding with the row and column cells
1413
+ * @default m
1414
+ */
1415
+ cellPadding: PropTypes.oneOf(["s", "m", "l"]),
1416
+ /**
1417
+ * Border used for the row and column cells
1418
+ * @default all
1419
+ */
1420
+ border: PropTypes.oneOf(["all", "horizontal", "none"]),
1421
+ /**
1422
+ * If set to true, rows will alternate zebra striping for clarity
1423
+ * @default false
1424
+ */
1425
+ stripes: PropTypes.bool,
1426
+ /**
1427
+ * Visual style for the column headers. Recommendation is to use the `underline` style in times when #EuiDataGrid `toolbarVisibility` is set to `false`.
1428
+ * @default shade
1429
+ */
1430
+ header: PropTypes.oneOf(["shade", "underline"]),
1431
+ /**
1432
+ * Visual style for the column footers.
1433
+ * @default overline
1434
+ */
1435
+ footer: PropTypes.oneOf(["shade", "overline", "striped"]),
1436
+ /**
1437
+ * If set to true, the footer row will be sticky
1438
+ * @default true
1439
+ */
1440
+ stickyFooter: PropTypes.bool,
1441
+ /**
1442
+ * Will define what visual style to show on row hover
1443
+ * @default hover
1444
+ */
1445
+ rowHover: PropTypes.oneOf(["highlight", "none"]),
1446
+ /**
1447
+ * Optionally pass custom classes to highlight or customize certain rows
1448
+ */
1449
+ rowClasses: PropTypes.shape({}),
1450
+ /**
1451
+ * Optional callback returning the current `gridStyle` config when changes occur from user input (e.g. toolbar display controls).
1452
+ * Can be used for, e.g. storing user `gridStyle` in a local storage object.
1453
+ */
1454
+ onChange: PropTypes.func
1455
+ }).isRequired
1387
1456
  };
1388
1457
  var RenderCellInRow = /*#__PURE__*/memo(function (_ref2) {
1389
1458
  var row = _ref2.row,
@@ -1414,4 +1483,53 @@ RenderTruncatedCellContent.propTypes = {
1414
1483
  height: PropTypes.number
1415
1484
  }).isRequired])
1416
1485
  };
1417
- RenderTruncatedCellContent.displayName = 'RenderTruncatedCellContent';
1486
+ RenderTruncatedCellContent.displayName = 'RenderTruncatedCellContent';
1487
+
1488
+ /**
1489
+ * Function component utilities for easier hook usage
1490
+ */
1491
+
1492
+ var GridCellDiv = /*#__PURE__*/memo( /*#__PURE__*/forwardRef(function (_ref4, ref) {
1493
+ var columnId = _ref4.columnId,
1494
+ columnIndex = _ref4.columnIndex,
1495
+ rowIndex = _ref4.rowIndex,
1496
+ visibleRowIndex = _ref4.visibleRowIndex,
1497
+ props = _objectWithoutProperties(_ref4, _excluded4);
1498
+ var styles = useEuiMemoizedStyles(euiDataGridRowCellStyles);
1499
+ return ___EmotionJSX("div", _extends({
1500
+ ref: ref,
1501
+ css: styles.euiDataGridRowCell
1502
+ }, props, {
1503
+ role: "gridcell"
1504
+ // Data attributes to help target specific cells by either data or current cell location
1505
+ ,
1506
+ "data-gridcell-column-id": columnId // Static column ID name, not affected by column order
1507
+ ,
1508
+ "data-gridcell-column-index": columnIndex // Affected by column reordering
1509
+ ,
1510
+ "data-gridcell-row-index": rowIndex // Index from data, not affected by sorting or pagination
1511
+ ,
1512
+ "data-gridcell-visible-row-index": visibleRowIndex // Affected by sorting & pagination
1513
+ }));
1514
+ }));
1515
+ GridCellDiv.displayName = 'GridCellDiv';
1516
+ var CellScreenReaderDescription = /*#__PURE__*/memo(function (_ref5) {
1517
+ var columnName = _ref5.columnName,
1518
+ columnIndex = _ref5.columnIndex,
1519
+ rowIndex = _ref5.rowIndex,
1520
+ canExpandCell = _ref5.canExpandCell;
1521
+ var cellPosition = useEuiI18n('euiDataGridCell.position', '{columnName}, column {columnIndex}, row {rowIndex}', {
1522
+ columnName: columnName,
1523
+ columnIndex: columnIndex,
1524
+ rowIndex: rowIndex
1525
+ });
1526
+ var enterKeyPrompt = useEuiI18n('euiDataGridCell.expansionEnterPrompt', 'Press the Enter key to expand this cell.');
1527
+ return ___EmotionJSX(EuiScreenReaderOnly, null, ___EmotionJSX("p", null, tabularCopyMarkers.hiddenNoCopyBoundary, " - ".concat(cellPosition).concat(canExpandCell ? ". ".concat(enterKeyPrompt) : ''), tabularCopyMarkers.hiddenNoCopyBoundary));
1528
+ });
1529
+ CellScreenReaderDescription.propTypes = {
1530
+ columnName: PropTypes.string.isRequired,
1531
+ columnIndex: PropTypes.number.isRequired,
1532
+ rowIndex: PropTypes.number.isRequired,
1533
+ canExpandCell: PropTypes.bool.isRequired
1534
+ };
1535
+ CellScreenReaderDescription.displayName = 'CellScreenReaderDescription';
@@ -0,0 +1,110 @@
1
+ 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)."; }
2
+ /*
3
+ * Copyright Elasticsearch B.V. and/or licensed to Elasticsearch B.V. under one
4
+ * or more contributor license agreements. Licensed under the Elastic License
5
+ * 2.0 and the Server Side Public License, v 1; you may not use this file except
6
+ * in compliance with, at your election, the Elastic License 2.0 or the Server
7
+ * Side Public License, v 1.
8
+ */
9
+
10
+ import { css } from '@emotion/react';
11
+ import { logicalCSS, logicalTextAlignCSS, mathWithUnits } from '../../../../global_styling';
12
+ export var euiDataGridCellOutlineStyles = function euiDataGridCellOutlineStyles(_ref2) {
13
+ var euiTheme = _ref2.euiTheme;
14
+ var focusColor = euiTheme.colors.primary;
15
+ var hoverColor = euiTheme.colors.darkShade;
16
+ var outlineWidth = euiTheme.border.width.thick;
17
+ var borderRadius = mathWithUnits(euiTheme.border.radius.medium, function (x) {
18
+ return x / 2;
19
+ });
20
+
21
+ // Note: We use a pseudo element for the 'outline' over any other CSS approaches
22
+ // (outline, border, box-shadow) because it gives us the most control and reduces
23
+ // overlap with other cells or inner elements
24
+ return {
25
+ borderRadius: borderRadius,
26
+ focusColor: focusColor,
27
+ focusStyles: "\n /* Remove outline as we're handling it manually. Needed to override global styles */\n &:focus-visible {\n outline: none;\n }\n\n &::after {\n content: '';\n /* We want this to be visually on top of cell content but not interactive */\n z-index: 2;\n pointer-events: none;\n position: absolute;\n inset: 0;\n border: ".concat(outlineWidth, " solid ").concat(focusColor, ";\n border-radius: ").concat(borderRadius, ";\n }\n "),
28
+ hoverColor: hoverColor,
29
+ hoverStyles: "\n &::after {\n border-color: ".concat(hoverColor, ";\n }\n ")
30
+ };
31
+ };
32
+ export var euiDataGridCellOutlineSelectors = function euiDataGridCellOutlineSelectors() {
33
+ var parentSelector = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : '&';
34
+ // Focus selectors
35
+ var focus = ':focus'; // cell has been clicked or keyboard navigated to
36
+ var isOpen = '.euiDataGridRowCell--open'; // always show when the cell expansion popover is open
37
+ var isClosing = '[data-keyboard-closing]'; // prevents the animation from replaying when keyboard focus is moved from the popover back to the cell
38
+ var isEntered = ':has([data-focus-lock-disabled="false"])'; // cell focus trap has been entered - ideally show the outline still, but grayed out
39
+
40
+ // Hover selectors
41
+ var hover = ':hover'; // hover styles should not supercede focus styles
42
+ var focusWithin = ':focus-within'; // used by :hover:not() to prevent flash of gray when mouse users are opening/closing the expansion popover via cell action click
43
+
44
+ // Cell header specific selectors
45
+ var headerActionsOpen = '.euiDataGridHeaderCell--isActionsPopoverOpen';
46
+
47
+ // Utils
48
+ var selectors = function selectors() {
49
+ for (var _len = arguments.length, args = new Array(_len), _key = 0; _key < _len; _key++) {
50
+ args[_key] = arguments[_key];
51
+ }
52
+ return [].concat(args).join(', ');
53
+ };
54
+ var is = function is(selectors) {
55
+ return "".concat(parentSelector, ":is(").concat(selectors, ")");
56
+ };
57
+ var not = function not(selectors) {
58
+ return "".concat(parentSelector, ":not(").concat(selectors, ")");
59
+ };
60
+ var hoverNot = function hoverNot(selectors) {
61
+ return "".concat(parentSelector, ":hover:not(").concat(selectors, ")");
62
+ };
63
+ var _ = function _(selectors) {
64
+ return "".concat(parentSelector).concat(selectors);
65
+ };
66
+ return {
67
+ outline: {
68
+ show: is(selectors(hover, focus, isOpen, isEntered)),
69
+ hover: hoverNot(selectors(focus, focusWithin, isOpen)),
70
+ focusTrapped: _(isEntered)
71
+ },
72
+ actions: {
73
+ hoverZone: hoverNot(selectors(focus, isOpen)),
74
+ hoverColor: hoverNot(selectors(focus, focusWithin, isOpen)),
75
+ showAnimation: is(selectors(hover, focus, isOpen, isClosing)),
76
+ hoverAnimation: hoverNot(selectors(focus, isOpen, isClosing))
77
+ },
78
+ header: {
79
+ focus: is(selectors(focus, focusWithin, headerActionsOpen)),
80
+ // :focus-within here is primarily intended for when the column actions button has been clicked twice
81
+ focusTrapped: _(isEntered),
82
+ hideActions: not(selectors(hover, focusWithin, headerActionsOpen))
83
+ }
84
+ };
85
+ };
86
+ var _ref = process.env.NODE_ENV === "production" ? {
87
+ name: "12y9ria-euiDataGridRowCell__content",
88
+ styles: "overflow:hidden;label:euiDataGridRowCell__content;"
89
+ } : {
90
+ name: "12y9ria-euiDataGridRowCell__content",
91
+ styles: "overflow:hidden;label:euiDataGridRowCell__content;",
92
+ toString: _EMOTION_STRINGIFIED_CSS_ERROR__
93
+ };
94
+ export var euiDataGridRowCellStyles = function euiDataGridRowCellStyles(euiThemeContext) {
95
+ var euiTheme = euiThemeContext.euiTheme;
96
+ var cellOutline = euiDataGridCellOutlineStyles(euiThemeContext);
97
+ var _euiDataGridCellOutli = euiDataGridCellOutlineSelectors(),
98
+ outlineSelectors = _euiDataGridCellOutli.outline;
99
+ return {
100
+ euiDataGridRowCell: /*#__PURE__*/css("position:relative;", outlineSelectors.show, "{", cellOutline.focusStyles, ";}", outlineSelectors.hover, "{", cellOutline.hoverStyles, ";}", outlineSelectors.focusTrapped, "{", cellOutline.hoverStyles, ";}&>[data-focus-lock-disabled]{", logicalCSS('height', '100%'), ";}&:where(.euiDataGridRowCell--numeric, .euiDataGridRowCell--currency){", logicalTextAlignCSS('right'), ";}&:where(.euiDataGridRowCell--uppercase){text-transform:uppercase;}&:where(.euiDataGridRowCell--lowercase){text-transform:lowercase;}&:where(.euiDataGridRowCell--capitalize){text-transform:capitalize;};label:euiDataGridRowCell;"),
101
+ content: {
102
+ euiDataGridRowCell__content: _ref,
103
+ autoHeight: /*#__PURE__*/css(logicalCSS('height', 'auto'), ";;label:autoHeight;"),
104
+ defaultHeight: /*#__PURE__*/css(logicalCSS('height', '100%'), ";;label:defaultHeight;"),
105
+ // Control columns should be vertically centered with the *first line* of text
106
+ // for both single and multi-line heights (see https://github.com/elastic/eui/issues/7897)
107
+ controlColumn: /*#__PURE__*/css("display:inline-flex;align-items:start;gap:", euiTheme.size.xxs, ";vertical-align:-webkit-baseline-middle;vertical-align:-moz-middle-with-baseline;.euiDataGrid--fontSizeSmall &:where(.euiDataGridRowCell__content--defaultHeight){", logicalCSS('height', '100%'), " align-items:center;}.euiCheckbox:not(:has(label)){display:inline;.euiCheckbox__square{display:inline-flex;vertical-align:text-bottom;@supports (vertical-align: -moz-middle-with-baseline){vertical-align:sub;}}};label:controlColumn;")
108
+ }
109
+ };
110
+ };
@@ -18,11 +18,13 @@ function _extends() { return _extends = Object.assign ? Object.assign.bind() : f
18
18
  */
19
19
 
20
20
  import React, { useMemo, useCallback } from 'react';
21
+ import { useEuiMemoizedStyles } from '../../../../services';
21
22
  import { EuiI18n } from '../../../i18n';
22
23
  import { EuiButtonIcon } from '../../../button/button_icon';
23
24
  import { EuiButtonEmpty } from '../../../button/button_empty';
24
25
  import { EuiFlexGroup, EuiFlexItem } from '../../../flex';
25
26
  import { EuiPopoverFooter } from '../../../popover';
27
+ import { euiDataGridCellActionsStyles } from './data_grid_cell_actions.styles';
26
28
  import { jsx as ___EmotionJSX } from "@emotion/react";
27
29
  export var EuiDataGridCellActions = function EuiDataGridCellActions(_ref) {
28
30
  var onExpandClick = _ref.onExpandClick,
@@ -30,6 +32,8 @@ export var EuiDataGridCellActions = function EuiDataGridCellActions(_ref) {
30
32
  column = _ref.column,
31
33
  rowIndex = _ref.rowIndex,
32
34
  colIndex = _ref.colIndex;
35
+ var styles = useEuiMemoizedStyles(euiDataGridCellActionsStyles);
36
+
33
37
  // Note: The cell expand button/expansion popover is *always* rendered if
34
38
  // column.cellActions is present (regardless of column.isExpandable).
35
39
  // This is because cell actions are not otherwise accessible to keyboard
@@ -41,6 +45,7 @@ export var EuiDataGridCellActions = function EuiDataGridCellActions(_ref) {
41
45
  default: "Click or hit enter to interact with cell content"
42
46
  }, function (expandButtonTitle) {
43
47
  return ___EmotionJSX(EuiButtonIcon, {
48
+ css: styles.euiDataGridRowCell__actionButtonIcon,
44
49
  className: "euiDataGridRowCell__actionButtonIcon euiDataGridRowCell__expandCell",
45
50
  "data-test-subj": "euiDataGridCellExpandButton",
46
51
  display: "fill",
@@ -52,12 +57,13 @@ export var EuiDataGridCellActions = function EuiDataGridCellActions(_ref) {
52
57
  title: expandButtonTitle
53
58
  });
54
59
  });
55
- }, [onExpandClick]);
60
+ }, [onExpandClick, styles]);
56
61
  var additionalButtons = useMemo(function () {
57
62
  if (!column || !Array.isArray(column === null || column === void 0 ? void 0 : column.cellActions)) return [];
58
63
  var ButtonComponent = function ButtonComponent(props) {
59
64
  return ___EmotionJSX(EuiButtonIcon, _extends({}, props, {
60
65
  "aria-hidden": true,
66
+ css: styles.euiDataGridRowCell__actionButtonIcon,
61
67
  className: "euiDataGridRowCell__actionButtonIcon"
62
68
  // Don't allow consumers to override sizes or colors for cell actions on hover/focus
63
69
  ,
@@ -82,8 +88,12 @@ export var EuiDataGridCellActions = function EuiDataGridCellActions(_ref) {
82
88
  isExpanded: false
83
89
  });
84
90
  });
85
- }, [column, colIndex, rowIndex]);
86
- return ___EmotionJSX(React.Fragment, null, ___EmotionJSX("div", {
91
+ }, [column, colIndex, rowIndex, styles]);
92
+ return ___EmotionJSX("div", {
93
+ css: styles.euiDataGridRowCell__actionsWrapper,
94
+ className: "euiDataGridRowCell__actionsWrapper"
95
+ }, ___EmotionJSX("div", {
96
+ css: styles.euiDataGridRowCell__actions,
87
97
  className: "euiDataGridRowCell__actions"
88
98
  }, [].concat(_toConsumableArray(additionalButtons), [expandButton])), ___EmotionJSX("div", {
89
99
  ref: popoverAnchorRef,