@elastic/eui 95.10.0 → 95.11.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 (300) hide show
  1. package/dist/eui_theme_dark.css +0 -923
  2. package/dist/eui_theme_dark.min.css +1 -1
  3. package/dist/eui_theme_light.css +0 -923
  4. package/dist/eui_theme_light.min.css +1 -1
  5. package/es/components/basic_table/basic_table.js +4 -3
  6. package/es/components/basic_table/collapsed_item_actions.js +24 -31
  7. package/es/components/datagrid/body/cell/data_grid_cell.js +98 -86
  8. package/es/components/datagrid/body/cell/data_grid_cell.styles.js +107 -0
  9. package/es/components/datagrid/body/cell/data_grid_cell_actions.js +13 -3
  10. package/es/components/datagrid/body/cell/data_grid_cell_actions.styles.js +33 -0
  11. package/es/components/datagrid/body/cell/data_grid_cell_popover.js +21 -12
  12. package/es/components/datagrid/body/cell/data_grid_cell_popover.styles.js +19 -0
  13. package/es/components/datagrid/body/cell/focus_utils.js +18 -20
  14. package/es/components/datagrid/body/data_grid_body.js +20 -4
  15. package/es/components/datagrid/body/data_grid_body.styles.js +26 -0
  16. package/es/components/datagrid/body/data_grid_body_custom.js +18 -6
  17. package/es/components/datagrid/body/data_grid_body_virtualized.js +18 -6
  18. package/es/components/datagrid/body/footer/data_grid_footer.styles.js +24 -0
  19. package/es/components/datagrid/body/footer/data_grid_footer_row.js +10 -5
  20. package/es/components/datagrid/body/header/column_actions.js +16 -4
  21. package/es/components/datagrid/body/header/data_grid_column_resizer.js +14 -7
  22. package/es/components/datagrid/body/header/data_grid_column_resizer.styles.js +36 -0
  23. package/es/components/datagrid/body/header/data_grid_control_header_cell.js +1 -3
  24. package/es/components/datagrid/body/header/data_grid_header_cell.js +40 -66
  25. package/es/components/datagrid/body/header/data_grid_header_cell.styles.js +29 -0
  26. package/es/components/datagrid/body/header/data_grid_header_cell_wrapper.js +4 -1
  27. package/es/components/datagrid/body/header/data_grid_header_cell_wrapper.styles.js +27 -0
  28. package/es/components/datagrid/body/header/data_grid_header_row.js +8 -2
  29. package/es/components/datagrid/body/header/data_grid_header_row.styles.js +21 -0
  30. package/es/components/datagrid/controls/column_selector.js +17 -8
  31. package/es/components/datagrid/controls/column_selector.styles.js +22 -0
  32. package/es/components/datagrid/controls/column_sorting.js +7 -2
  33. package/es/components/datagrid/controls/column_sorting.styles.js +35 -0
  34. package/es/components/datagrid/controls/column_sorting_draggable.js +19 -14
  35. package/es/components/datagrid/controls/data_grid_toolbar.js +8 -1
  36. package/es/components/datagrid/controls/data_grid_toolbar.styles.js +18 -0
  37. package/es/components/datagrid/controls/data_grid_toolbar_control.js +27 -27
  38. package/es/components/datagrid/controls/display_selector.js +14 -3
  39. package/es/components/datagrid/controls/fullscreen_selector.js +8 -5
  40. package/es/components/datagrid/controls/fullscreen_selector.styles.js +20 -0
  41. package/es/components/datagrid/controls/keyboard_shortcuts.js +7 -3
  42. package/es/components/datagrid/controls/keyboard_shortcuts.styles.js +18 -0
  43. package/es/components/datagrid/data_grid.a11y.js +1 -0
  44. package/es/components/datagrid/data_grid.js +16 -8
  45. package/es/components/datagrid/data_grid.stories.utils.js +1386 -0
  46. package/es/components/datagrid/data_grid.styles.js +88 -0
  47. package/es/components/datagrid/{utils → pagination}/data_grid_pagination.js +30 -30
  48. package/es/components/datagrid/pagination/data_grid_pagination.styles.js +16 -0
  49. package/es/components/datagrid/pagination/index.js +9 -0
  50. package/es/components/datagrid/utils/row_heights.js +13 -15
  51. package/es/components/datagrid/utils/scrolling.js +14 -7
  52. package/es/components/datagrid/utils/scrolling.styles.js +30 -0
  53. package/es/components/flyout/flyout_resizable.js +6 -2
  54. package/es/components/flyout/flyout_resizable.styles.js +34 -5
  55. package/es/components/popover/popover.js +1 -1
  56. package/es/components/text/text.js +25 -9
  57. package/es/components/text/text_align.js +19 -6
  58. package/es/components/text/text_color.js +14 -11
  59. package/es/components/text/types.js +1 -0
  60. package/eui.d.ts +581 -108
  61. package/i18ntokens.json +392 -356
  62. package/lib/components/basic_table/basic_table.js +4 -3
  63. package/lib/components/basic_table/collapsed_item_actions.js +23 -30
  64. package/lib/components/datagrid/body/cell/data_grid_cell.js +95 -83
  65. package/lib/components/datagrid/body/cell/data_grid_cell.styles.js +111 -0
  66. package/lib/components/datagrid/body/cell/data_grid_cell_actions.js +13 -3
  67. package/lib/components/datagrid/body/cell/data_grid_cell_actions.styles.js +38 -0
  68. package/lib/components/datagrid/body/cell/data_grid_cell_popover.js +20 -11
  69. package/lib/components/datagrid/body/cell/data_grid_cell_popover.styles.js +24 -0
  70. package/lib/components/datagrid/body/cell/focus_utils.js +17 -19
  71. package/lib/components/datagrid/body/data_grid_body.js +20 -4
  72. package/lib/components/datagrid/body/data_grid_body.styles.js +30 -0
  73. package/lib/components/datagrid/body/data_grid_body_custom.js +18 -6
  74. package/lib/components/datagrid/body/data_grid_body_virtualized.js +18 -6
  75. package/lib/components/datagrid/body/footer/data_grid_footer.styles.js +30 -0
  76. package/lib/components/datagrid/body/footer/data_grid_footer_row.js +11 -6
  77. package/lib/components/datagrid/body/header/column_actions.js +16 -4
  78. package/lib/components/datagrid/body/header/data_grid_column_resizer.js +14 -7
  79. package/lib/components/datagrid/body/header/data_grid_column_resizer.styles.js +39 -0
  80. package/lib/components/datagrid/body/header/data_grid_control_header_cell.js +1 -3
  81. package/lib/components/datagrid/body/header/data_grid_header_cell.js +47 -74
  82. package/lib/components/datagrid/body/header/data_grid_header_cell.styles.js +34 -0
  83. package/lib/components/datagrid/body/header/data_grid_header_cell_wrapper.js +3 -0
  84. package/lib/components/datagrid/body/header/data_grid_header_cell_wrapper.styles.js +32 -0
  85. package/lib/components/datagrid/body/header/data_grid_header_row.js +8 -2
  86. package/lib/components/datagrid/body/header/data_grid_header_row.styles.js +27 -0
  87. package/lib/components/datagrid/controls/column_selector.js +17 -8
  88. package/lib/components/datagrid/controls/column_selector.styles.js +28 -0
  89. package/lib/components/datagrid/controls/column_sorting.js +7 -2
  90. package/lib/components/datagrid/controls/column_sorting.styles.js +41 -0
  91. package/lib/components/datagrid/controls/column_sorting_draggable.js +19 -14
  92. package/lib/components/datagrid/controls/data_grid_toolbar.js +8 -1
  93. package/lib/components/datagrid/controls/data_grid_toolbar.styles.js +24 -0
  94. package/lib/components/datagrid/controls/data_grid_toolbar_control.js +27 -27
  95. package/lib/components/datagrid/controls/display_selector.js +13 -2
  96. package/lib/components/datagrid/controls/fullscreen_selector.js +7 -4
  97. package/lib/components/datagrid/controls/fullscreen_selector.styles.js +26 -0
  98. package/lib/components/datagrid/controls/keyboard_shortcuts.js +6 -2
  99. package/lib/components/datagrid/controls/keyboard_shortcuts.styles.js +24 -0
  100. package/lib/components/datagrid/data_grid.a11y.js +1 -0
  101. package/lib/components/datagrid/data_grid.js +15 -7
  102. package/lib/components/datagrid/data_grid.stories.utils.js +1391 -0
  103. package/lib/components/datagrid/data_grid.styles.js +94 -0
  104. package/lib/components/datagrid/{utils → pagination}/data_grid_pagination.js +30 -30
  105. package/lib/components/datagrid/pagination/data_grid_pagination.styles.js +22 -0
  106. package/lib/components/datagrid/pagination/index.js +18 -0
  107. package/lib/components/datagrid/utils/row_heights.js +13 -14
  108. package/lib/components/datagrid/utils/scrolling.js +14 -7
  109. package/lib/components/datagrid/utils/scrolling.styles.js +36 -0
  110. package/lib/components/flyout/flyout_resizable.js +6 -2
  111. package/lib/components/flyout/flyout_resizable.styles.js +34 -5
  112. package/lib/components/popover/popover.js +1 -1
  113. package/lib/components/text/text.js +25 -9
  114. package/lib/components/text/text_align.js +19 -6
  115. package/lib/components/text/text_color.js +14 -11
  116. package/lib/components/text/types.js +5 -0
  117. package/optimize/es/components/basic_table/basic_table.js +4 -3
  118. package/optimize/es/components/basic_table/collapsed_item_actions.js +24 -31
  119. package/optimize/es/components/datagrid/body/cell/data_grid_cell.js +87 -81
  120. package/optimize/es/components/datagrid/body/cell/data_grid_cell.styles.js +107 -0
  121. package/optimize/es/components/datagrid/body/cell/data_grid_cell_actions.js +13 -3
  122. package/optimize/es/components/datagrid/body/cell/data_grid_cell_actions.styles.js +33 -0
  123. package/optimize/es/components/datagrid/body/cell/data_grid_cell_popover.js +21 -12
  124. package/optimize/es/components/datagrid/body/cell/data_grid_cell_popover.styles.js +19 -0
  125. package/optimize/es/components/datagrid/body/cell/focus_utils.js +18 -20
  126. package/optimize/es/components/datagrid/body/data_grid_body.js +9 -2
  127. package/optimize/es/components/datagrid/body/data_grid_body.styles.js +26 -0
  128. package/optimize/es/components/datagrid/body/data_grid_body_custom.js +7 -4
  129. package/optimize/es/components/datagrid/body/data_grid_body_virtualized.js +7 -4
  130. package/optimize/es/components/datagrid/body/footer/data_grid_footer.styles.js +24 -0
  131. package/optimize/es/components/datagrid/body/footer/data_grid_footer_row.js +10 -5
  132. package/optimize/es/components/datagrid/body/header/column_actions.js +16 -4
  133. package/optimize/es/components/datagrid/body/header/data_grid_column_resizer.js +14 -7
  134. package/optimize/es/components/datagrid/body/header/data_grid_column_resizer.styles.js +36 -0
  135. package/optimize/es/components/datagrid/body/header/data_grid_control_header_cell.js +1 -3
  136. package/optimize/es/components/datagrid/body/header/data_grid_header_cell.js +40 -61
  137. package/optimize/es/components/datagrid/body/header/data_grid_header_cell.styles.js +29 -0
  138. package/optimize/es/components/datagrid/body/header/data_grid_header_cell_wrapper.js +4 -1
  139. package/optimize/es/components/datagrid/body/header/data_grid_header_cell_wrapper.styles.js +27 -0
  140. package/optimize/es/components/datagrid/body/header/data_grid_header_row.js +8 -2
  141. package/optimize/es/components/datagrid/body/header/data_grid_header_row.styles.js +21 -0
  142. package/optimize/es/components/datagrid/controls/column_selector.js +17 -8
  143. package/optimize/es/components/datagrid/controls/column_selector.styles.js +22 -0
  144. package/optimize/es/components/datagrid/controls/column_sorting.js +7 -2
  145. package/optimize/es/components/datagrid/controls/column_sorting.styles.js +35 -0
  146. package/optimize/es/components/datagrid/controls/column_sorting_draggable.js +19 -14
  147. package/optimize/es/components/datagrid/controls/data_grid_toolbar.js +8 -1
  148. package/optimize/es/components/datagrid/controls/data_grid_toolbar.styles.js +18 -0
  149. package/optimize/es/components/datagrid/controls/data_grid_toolbar_control.js +27 -27
  150. package/optimize/es/components/datagrid/controls/display_selector.js +14 -3
  151. package/optimize/es/components/datagrid/controls/fullscreen_selector.js +8 -5
  152. package/optimize/es/components/datagrid/controls/fullscreen_selector.styles.js +20 -0
  153. package/optimize/es/components/datagrid/controls/keyboard_shortcuts.js +7 -3
  154. package/optimize/es/components/datagrid/controls/keyboard_shortcuts.styles.js +18 -0
  155. package/optimize/es/components/datagrid/data_grid.a11y.js +1 -0
  156. package/optimize/es/components/datagrid/data_grid.js +16 -8
  157. package/optimize/es/components/datagrid/data_grid.stories.utils.js +333 -0
  158. package/optimize/es/components/datagrid/data_grid.styles.js +88 -0
  159. package/optimize/es/components/datagrid/{utils → pagination}/data_grid_pagination.js +30 -30
  160. package/optimize/es/components/datagrid/pagination/data_grid_pagination.styles.js +16 -0
  161. package/optimize/es/components/datagrid/pagination/index.js +9 -0
  162. package/optimize/es/components/datagrid/utils/row_heights.js +13 -15
  163. package/optimize/es/components/datagrid/utils/scrolling.js +14 -7
  164. package/optimize/es/components/datagrid/utils/scrolling.styles.js +30 -0
  165. package/optimize/es/components/flyout/flyout_resizable.js +6 -2
  166. package/optimize/es/components/flyout/flyout_resizable.styles.js +34 -5
  167. package/optimize/es/components/popover/popover.js +1 -1
  168. package/optimize/es/components/text/text.js +9 -4
  169. package/optimize/es/components/text/text_align.js +4 -2
  170. package/optimize/es/components/text/text_color.js +1 -2
  171. package/optimize/es/components/text/types.js +1 -0
  172. package/optimize/lib/components/basic_table/basic_table.js +4 -3
  173. package/optimize/lib/components/basic_table/collapsed_item_actions.js +23 -30
  174. package/optimize/lib/components/datagrid/body/cell/data_grid_cell.js +84 -78
  175. package/optimize/lib/components/datagrid/body/cell/data_grid_cell.styles.js +111 -0
  176. package/optimize/lib/components/datagrid/body/cell/data_grid_cell_actions.js +13 -3
  177. package/optimize/lib/components/datagrid/body/cell/data_grid_cell_actions.styles.js +39 -0
  178. package/optimize/lib/components/datagrid/body/cell/data_grid_cell_popover.js +20 -11
  179. package/optimize/lib/components/datagrid/body/cell/data_grid_cell_popover.styles.js +25 -0
  180. package/optimize/lib/components/datagrid/body/cell/focus_utils.js +17 -19
  181. package/optimize/lib/components/datagrid/body/data_grid_body.js +9 -2
  182. package/optimize/lib/components/datagrid/body/data_grid_body.styles.js +30 -0
  183. package/optimize/lib/components/datagrid/body/data_grid_body_custom.js +7 -4
  184. package/optimize/lib/components/datagrid/body/data_grid_body_virtualized.js +7 -4
  185. package/optimize/lib/components/datagrid/body/footer/data_grid_footer.styles.js +30 -0
  186. package/optimize/lib/components/datagrid/body/footer/data_grid_footer_row.js +10 -5
  187. package/optimize/lib/components/datagrid/body/header/column_actions.js +16 -4
  188. package/optimize/lib/components/datagrid/body/header/data_grid_column_resizer.js +14 -7
  189. package/optimize/lib/components/datagrid/body/header/data_grid_column_resizer.styles.js +39 -0
  190. package/optimize/lib/components/datagrid/body/header/data_grid_control_header_cell.js +1 -3
  191. package/optimize/lib/components/datagrid/body/header/data_grid_header_cell.js +43 -63
  192. package/optimize/lib/components/datagrid/body/header/data_grid_header_cell.styles.js +34 -0
  193. package/optimize/lib/components/datagrid/body/header/data_grid_header_cell_wrapper.js +3 -0
  194. package/optimize/lib/components/datagrid/body/header/data_grid_header_cell_wrapper.styles.js +32 -0
  195. package/optimize/lib/components/datagrid/body/header/data_grid_header_row.js +8 -2
  196. package/optimize/lib/components/datagrid/body/header/data_grid_header_row.styles.js +27 -0
  197. package/optimize/lib/components/datagrid/controls/column_selector.js +17 -8
  198. package/optimize/lib/components/datagrid/controls/column_selector.styles.js +28 -0
  199. package/optimize/lib/components/datagrid/controls/column_sorting.js +7 -2
  200. package/optimize/lib/components/datagrid/controls/column_sorting.styles.js +41 -0
  201. package/optimize/lib/components/datagrid/controls/column_sorting_draggable.js +19 -14
  202. package/optimize/lib/components/datagrid/controls/data_grid_toolbar.js +8 -1
  203. package/optimize/lib/components/datagrid/controls/data_grid_toolbar.styles.js +24 -0
  204. package/optimize/lib/components/datagrid/controls/data_grid_toolbar_control.js +27 -27
  205. package/optimize/lib/components/datagrid/controls/display_selector.js +13 -2
  206. package/optimize/lib/components/datagrid/controls/fullscreen_selector.js +7 -4
  207. package/optimize/lib/components/datagrid/controls/fullscreen_selector.styles.js +26 -0
  208. package/optimize/lib/components/datagrid/controls/keyboard_shortcuts.js +6 -2
  209. package/optimize/lib/components/datagrid/controls/keyboard_shortcuts.styles.js +24 -0
  210. package/optimize/lib/components/datagrid/data_grid.a11y.js +1 -0
  211. package/optimize/lib/components/datagrid/data_grid.js +15 -7
  212. package/optimize/lib/components/datagrid/data_grid.stories.utils.js +341 -0
  213. package/optimize/lib/components/datagrid/data_grid.styles.js +94 -0
  214. package/{test-env/components/datagrid/utils → optimize/lib/components/datagrid/pagination}/data_grid_pagination.js +29 -31
  215. package/optimize/lib/components/datagrid/pagination/data_grid_pagination.styles.js +22 -0
  216. package/optimize/lib/components/datagrid/pagination/index.js +18 -0
  217. package/optimize/lib/components/datagrid/utils/row_heights.js +13 -14
  218. package/optimize/lib/components/datagrid/utils/scrolling.js +14 -7
  219. package/optimize/lib/components/datagrid/utils/scrolling.styles.js +36 -0
  220. package/optimize/lib/components/flyout/flyout_resizable.js +6 -2
  221. package/optimize/lib/components/flyout/flyout_resizable.styles.js +34 -5
  222. package/optimize/lib/components/popover/popover.js +1 -1
  223. package/optimize/lib/components/text/text.js +9 -4
  224. package/optimize/lib/components/text/text_align.js +4 -2
  225. package/optimize/lib/components/text/text_color.js +1 -2
  226. package/optimize/lib/components/text/types.js +5 -0
  227. package/package.json +3 -3
  228. package/src/themes/amsterdam/theme_dark.scss +0 -7
  229. package/src/themes/amsterdam/theme_light.scss +0 -7
  230. package/test-env/components/basic_table/basic_table.js +4 -3
  231. package/test-env/components/basic_table/collapsed_item_actions.js +23 -30
  232. package/test-env/components/datagrid/body/cell/data_grid_cell.js +90 -83
  233. package/test-env/components/datagrid/body/cell/data_grid_cell.styles.js +111 -0
  234. package/test-env/components/datagrid/body/cell/data_grid_cell_actions.js +13 -3
  235. package/test-env/components/datagrid/body/cell/data_grid_cell_actions.styles.js +39 -0
  236. package/test-env/components/datagrid/body/cell/data_grid_cell_popover.js +20 -11
  237. package/test-env/components/datagrid/body/cell/data_grid_cell_popover.styles.js +25 -0
  238. package/test-env/components/datagrid/body/cell/focus_utils.js +17 -19
  239. package/test-env/components/datagrid/body/data_grid_body.js +20 -4
  240. package/test-env/components/datagrid/body/data_grid_body.styles.js +30 -0
  241. package/test-env/components/datagrid/body/data_grid_body_custom.js +18 -6
  242. package/test-env/components/datagrid/body/data_grid_body_virtualized.js +18 -6
  243. package/test-env/components/datagrid/body/footer/data_grid_footer.styles.js +30 -0
  244. package/test-env/components/datagrid/body/footer/data_grid_footer_row.js +10 -5
  245. package/test-env/components/datagrid/body/header/column_actions.js +16 -4
  246. package/test-env/components/datagrid/body/header/data_grid_column_resizer.js +14 -7
  247. package/test-env/components/datagrid/body/header/data_grid_column_resizer.styles.js +39 -0
  248. package/test-env/components/datagrid/body/header/data_grid_control_header_cell.js +1 -3
  249. package/test-env/components/datagrid/body/header/data_grid_header_cell.js +43 -67
  250. package/test-env/components/datagrid/body/header/data_grid_header_cell.styles.js +34 -0
  251. package/test-env/components/datagrid/body/header/data_grid_header_cell_wrapper.js +3 -0
  252. package/test-env/components/datagrid/body/header/data_grid_header_cell_wrapper.styles.js +32 -0
  253. package/test-env/components/datagrid/body/header/data_grid_header_row.js +8 -2
  254. package/test-env/components/datagrid/body/header/data_grid_header_row.styles.js +27 -0
  255. package/test-env/components/datagrid/controls/column_selector.js +17 -8
  256. package/test-env/components/datagrid/controls/column_selector.styles.js +28 -0
  257. package/test-env/components/datagrid/controls/column_sorting.js +7 -2
  258. package/test-env/components/datagrid/controls/column_sorting.styles.js +41 -0
  259. package/test-env/components/datagrid/controls/column_sorting_draggable.js +19 -14
  260. package/test-env/components/datagrid/controls/data_grid_toolbar.js +8 -1
  261. package/test-env/components/datagrid/controls/data_grid_toolbar.styles.js +24 -0
  262. package/test-env/components/datagrid/controls/data_grid_toolbar_control.js +27 -27
  263. package/test-env/components/datagrid/controls/display_selector.js +13 -2
  264. package/test-env/components/datagrid/controls/fullscreen_selector.js +7 -4
  265. package/test-env/components/datagrid/controls/fullscreen_selector.styles.js +26 -0
  266. package/test-env/components/datagrid/controls/keyboard_shortcuts.js +6 -2
  267. package/test-env/components/datagrid/controls/keyboard_shortcuts.styles.js +24 -0
  268. package/test-env/components/datagrid/data_grid.a11y.js +1 -0
  269. package/test-env/components/datagrid/data_grid.js +15 -7
  270. package/test-env/components/datagrid/data_grid.stories.utils.js +1386 -0
  271. package/test-env/components/datagrid/data_grid.styles.js +94 -0
  272. package/{optimize/lib/components/datagrid/utils → test-env/components/datagrid/pagination}/data_grid_pagination.js +29 -31
  273. package/test-env/components/datagrid/pagination/data_grid_pagination.styles.js +22 -0
  274. package/test-env/components/datagrid/pagination/index.js +18 -0
  275. package/test-env/components/datagrid/utils/row_heights.js +13 -14
  276. package/test-env/components/datagrid/utils/scrolling.js +14 -7
  277. package/test-env/components/datagrid/utils/scrolling.styles.js +36 -0
  278. package/test-env/components/flyout/flyout_resizable.js +6 -2
  279. package/test-env/components/flyout/flyout_resizable.styles.js +34 -5
  280. package/test-env/components/popover/popover.js +1 -1
  281. package/test-env/components/text/text.js +25 -9
  282. package/test-env/components/text/text_align.js +19 -6
  283. package/test-env/components/text/text_color.js +14 -11
  284. package/test-env/components/text/types.js +5 -0
  285. package/src/components/datagrid/_data_grid.scss +0 -121
  286. package/src/components/datagrid/_data_grid_data_row.scss +0 -303
  287. package/src/components/datagrid/_index.scss +0 -12
  288. package/src/components/datagrid/_mixins.scss +0 -84
  289. package/src/components/datagrid/_variables.scss +0 -11
  290. package/src/components/datagrid/body/footer/_data_grid_footer_row.scss +0 -47
  291. package/src/components/datagrid/body/header/_data_grid_column_resizer.scss +0 -48
  292. package/src/components/datagrid/body/header/_data_grid_header_row.scss +0 -219
  293. package/src/components/datagrid/controls/_data_grid_column_selector.scss +0 -19
  294. package/src/components/datagrid/controls/_data_grid_column_sorting.scss +0 -43
  295. package/src/components/datagrid/controls/_data_grid_display.scss +0 -3
  296. package/src/components/datagrid/controls/_data_grid_keyboard_shortcuts.scss +0 -11
  297. package/src/components/datagrid/controls/_data_grid_toolbar.scss +0 -55
  298. package/src/components/index.scss +0 -3
  299. package/src/themes/amsterdam/overrides/_data_grid.scss +0 -5
  300. package/src/themes/amsterdam/overrides/_index.scss +0 -1
@@ -0,0 +1,30 @@
1
+ /*
2
+ * Copyright Elasticsearch B.V. and/or licensed to Elasticsearch B.V. under one
3
+ * or more contributor license agreements. Licensed under the Elastic License
4
+ * 2.0 and the Server Side Public License, v 1; you may not use this file except
5
+ * in compliance with, at your election, the Elastic License 2.0 or the Server
6
+ * Side Public License, v 1.
7
+ */
8
+
9
+ import { css } from '@emotion/react';
10
+ import { logicalCSS, mathWithUnits } from '../../../global_styling';
11
+ export var euiDataGridScrollBarStyles = function euiDataGridScrollBarStyles(euiThemeContext) {
12
+ var euiTheme = euiThemeContext.euiTheme;
13
+
14
+ // Note that 'borders' *must* be rendered with inset box-shadow, because actual
15
+ // `border` CSS will affect the relative position of the child scroll bar overlays
16
+ // and cause them to be off by the width of the border
17
+ var borderWidth = euiTheme.border.width.thin;
18
+ var borderColor = euiTheme.border.color;
19
+ return {
20
+ euiDataGrid__scrollOverlay: /*#__PURE__*/css("position:absolute;inset:0;", logicalCSS('top', "-".concat(borderWidth)), "pointer-events:none;box-shadow:inset 0 0 0 ", borderWidth, " ", borderColor, ";.euiDataGrid--bordersHorizontal &{box-shadow:inset 0 -", mathWithUnits(borderWidth, function (x) {
21
+ return x * 2;
22
+ }), " 0 -", borderWidth, " ", borderColor, ";};label:euiDataGrid__scrollOverlay;"),
23
+ // Ensure the horizontal scrollbar has a top border
24
+ euiDataGrid__scrollBarOverlayBottom: /*#__PURE__*/css("position:absolute;inset-inline:0;", logicalCSS('height', borderWidth), " background-color:", borderColor, ";;label:euiDataGrid__scrollBarOverlayBottom;"),
25
+ // Ensure the vertical scrollbar has a left border
26
+ euiDataGrid__scrollBarOverlayRight: /*#__PURE__*/css("position:absolute;", logicalCSS('width', borderWidth), " background-color:", borderColor, ";;label:euiDataGrid__scrollBarOverlayRight;")
27
+ // Note: Scroll bar border positions are set via JS inline style, since
28
+ // JS has access to the exact OS scrollbar width/height and CSS doesn't
29
+ };
30
+ };
@@ -1,7 +1,7 @@
1
1
  import _extends from "@babel/runtime/helpers/extends";
2
2
  import _slicedToArray from "@babel/runtime/helpers/slicedToArray";
3
3
  import _objectWithoutProperties from "@babel/runtime/helpers/objectWithoutProperties";
4
- var _excluded = ["size", "maxWidth", "minWidth", "onResize", "side", "type", "children"];
4
+ var _excluded = ["size", "maxWidth", "minWidth", "onResize", "side", "type", "ownFocus", "children"];
5
5
  /*
6
6
  * Copyright Elasticsearch B.V. and/or licensed to Elasticsearch B.V. under one
7
7
  * or more contributor license agreements. Licensed under the Elastic License
@@ -29,10 +29,13 @@ export var EuiFlyoutResizable = /*#__PURE__*/forwardRef(function (_ref, ref) {
29
29
  side = _ref$side === void 0 ? 'right' : _ref$side,
30
30
  _ref$type = _ref.type,
31
31
  type = _ref$type === void 0 ? 'overlay' : _ref$type,
32
+ _ref$ownFocus = _ref.ownFocus,
33
+ ownFocus = _ref$ownFocus === void 0 ? true : _ref$ownFocus,
32
34
  children = _ref.children,
33
35
  rest = _objectWithoutProperties(_ref, _excluded);
36
+ var hasOverlay = type === 'overlay' && ownFocus;
34
37
  var styles = useEuiMemoizedStyles(euiFlyoutResizableButtonStyles);
35
- var cssStyles = [styles.euiFlyoutResizableButton, styles[type][side]];
38
+ var cssStyles = [styles.euiFlyoutResizableButton, styles[type][side], !hasOverlay && styles.noOverlay.noOverlay, !hasOverlay && styles.noOverlay[side]];
36
39
  var getFlyoutMinMaxWidth = useCallback(function (width) {
37
40
  return Math.min(Math.max(width, minWidth), maxWidth || Infinity, window.innerWidth - 20 // Leave some offset
38
41
  );
@@ -136,6 +139,7 @@ export var EuiFlyoutResizable = /*#__PURE__*/forwardRef(function (_ref, ref) {
136
139
  maxWidth: maxWidth,
137
140
  side: side,
138
141
  type: type,
142
+ ownFocus: ownFocus,
139
143
  ref: setRefs
140
144
  }), ___EmotionJSX(EuiResizableButton, {
141
145
  isHorizontal: true,
@@ -10,6 +10,30 @@ function _EMOTION_STRINGIFIED_CSS_ERROR__() { return "You have tried to stringif
10
10
  import { css } from '@emotion/react';
11
11
  import { logicalCSS } from '../../global_styling';
12
12
  var _ref = process.env.NODE_ENV === "production" ? {
13
+ name: "1vfos8p-right",
14
+ styles: "justify-content:flex-start;label:right;"
15
+ } : {
16
+ name: "1vfos8p-right",
17
+ styles: "justify-content:flex-start;label:right;",
18
+ toString: _EMOTION_STRINGIFIED_CSS_ERROR__
19
+ };
20
+ var _ref2 = process.env.NODE_ENV === "production" ? {
21
+ name: "1ydooaf-left",
22
+ styles: "justify-content:flex-end;label:left;"
23
+ } : {
24
+ name: "1ydooaf-left",
25
+ styles: "justify-content:flex-end;label:left;",
26
+ toString: _EMOTION_STRINGIFIED_CSS_ERROR__
27
+ };
28
+ var _ref3 = process.env.NODE_ENV === "production" ? {
29
+ name: "1cw850z-noOverlay",
30
+ styles: "margin-inline:0;label:noOverlay;"
31
+ } : {
32
+ name: "1cw850z-noOverlay",
33
+ styles: "margin-inline:0;label:noOverlay;",
34
+ toString: _EMOTION_STRINGIFIED_CSS_ERROR__
35
+ };
36
+ var _ref4 = process.env.NODE_ENV === "production" ? {
13
37
  name: "1gfwqnd-euiFlyoutResizableButton",
14
38
  styles: "position:absolute;label:euiFlyoutResizableButton;"
15
39
  } : {
@@ -17,17 +41,22 @@ var _ref = process.env.NODE_ENV === "production" ? {
17
41
  styles: "position:absolute;label:euiFlyoutResizableButton;",
18
42
  toString: _EMOTION_STRINGIFIED_CSS_ERROR__
19
43
  };
20
- export var euiFlyoutResizableButtonStyles = function euiFlyoutResizableButtonStyles(_ref2) {
21
- var euiTheme = _ref2.euiTheme;
44
+ export var euiFlyoutResizableButtonStyles = function euiFlyoutResizableButtonStyles(_ref5) {
45
+ var euiTheme = _ref5.euiTheme;
22
46
  return {
23
- euiFlyoutResizableButton: _ref,
47
+ euiFlyoutResizableButton: _ref4,
24
48
  overlay: {
25
49
  left: /*#__PURE__*/css(logicalCSS('right', 0), ";;label:left;"),
26
50
  right: /*#__PURE__*/css(logicalCSS('left', 0), ";;label:right;")
27
51
  },
28
52
  push: {
29
- left: /*#__PURE__*/css(logicalCSS('right', "-".concat(euiTheme.border.width.thin)), ";;label:left;"),
30
- right: /*#__PURE__*/css(logicalCSS('left', "-".concat(euiTheme.border.width.thin)), ";;label:right;")
53
+ left: /*#__PURE__*/css(logicalCSS('right', "-".concat(euiTheme.border.width.thick)), ";;label:left;"),
54
+ right: /*#__PURE__*/css(logicalCSS('left', "-".concat(euiTheme.border.width.thick)), ";;label:right;")
55
+ },
56
+ noOverlay: {
57
+ noOverlay: _ref3,
58
+ left: _ref2,
59
+ right: _ref
31
60
  }
32
61
  };
33
62
  };
@@ -421,7 +421,7 @@ export var EuiPopover = /*#__PURE__*/function (_Component) {
421
421
  }), popoverScreenReaderText));
422
422
  }
423
423
  var returnFocus = this.state.isOpenStable ? returnFocusConfig : false;
424
- panel = ___EmotionJSX(EuiPortal, {
424
+ panel = ___EmotionJSX(EuiPortal, insert && {
425
425
  insert: insert
426
426
  }, ___EmotionJSX(EuiFocusTrap, _extends({
427
427
  clickOutsideDisables: true,
@@ -1,6 +1,6 @@
1
1
  import _extends from "@babel/runtime/helpers/extends";
2
2
  import _objectWithoutProperties from "@babel/runtime/helpers/objectWithoutProperties";
3
- var _excluded = ["size", "color", "grow", "textAlign", "children", "className"];
3
+ var _excluded = ["component", "size", "color", "grow", "textAlign", "children", "className"];
4
4
  /*
5
5
  * Copyright Elasticsearch B.V. and/or licensed to Elasticsearch B.V. under one
6
6
  * or more contributor license agreements. Licensed under the Elastic License
@@ -12,13 +12,15 @@ var _excluded = ["size", "color", "grow", "textAlign", "children", "className"];
12
12
  import React from 'react';
13
13
  import classNames from 'classnames';
14
14
  import { useEuiMemoizedStyles } from '../../services';
15
- import { euiTextStyles } from './text.styles';
16
15
  import { EuiTextColor } from './text_color';
17
16
  import { EuiTextAlign } from './text_align';
17
+ import { euiTextStyles } from './text.styles';
18
18
  import { jsx as ___EmotionJSX } from "@emotion/react";
19
19
  export var TEXT_SIZES = ['xs', 's', 'm', 'relative'];
20
20
  export var EuiText = function EuiText(_ref) {
21
- var _ref$size = _ref.size,
21
+ var _ref$component = _ref.component,
22
+ component = _ref$component === void 0 ? 'div' : _ref$component,
23
+ _ref$size = _ref.size,
22
24
  size = _ref$size === void 0 ? 'm' : _ref$size,
23
25
  color = _ref.color,
24
26
  _ref$grow = _ref.grow,
@@ -30,12 +32,14 @@ export var EuiText = function EuiText(_ref) {
30
32
  var styles = useEuiMemoizedStyles(euiTextStyles);
31
33
  var cssStyles = [styles.euiText, !grow ? styles.constrainedWidth : undefined, styles[size]];
32
34
  var classes = classNames('euiText', className);
33
- var text = ___EmotionJSX("div", _extends({
35
+ var Component = component;
36
+ var text = ___EmotionJSX(Component, _extends({
34
37
  css: cssStyles,
35
38
  className: classes
36
39
  }, rest), children);
37
40
  if (color) {
38
41
  text = ___EmotionJSX(EuiTextColor, {
42
+ component: component,
39
43
  color: color,
40
44
  className: classes,
41
45
  cloneElement: true
@@ -43,6 +47,7 @@ export var EuiText = function EuiText(_ref) {
43
47
  }
44
48
  if (textAlign) {
45
49
  text = ___EmotionJSX(EuiTextAlign, {
50
+ component: component,
46
51
  textAlign: textAlign,
47
52
  className: classes,
48
53
  cloneElement: true
@@ -1,6 +1,6 @@
1
1
  import _defineProperty from "@babel/runtime/helpers/defineProperty";
2
2
  import _objectWithoutProperties from "@babel/runtime/helpers/objectWithoutProperties";
3
- var _excluded = ["children", "textAlign", "cloneElement"];
3
+ var _excluded = ["children", "component", "textAlign", "cloneElement"];
4
4
  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; }
5
5
  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; }
6
6
  /*
@@ -18,6 +18,8 @@ import { jsx as ___EmotionJSX } from "@emotion/react";
18
18
  export var ALIGNMENTS = ['left', 'right', 'center'];
19
19
  export var EuiTextAlign = function EuiTextAlign(_ref) {
20
20
  var children = _ref.children,
21
+ _ref$component = _ref.component,
22
+ Component = _ref$component === void 0 ? 'div' : _ref$component,
21
23
  _ref$textAlign = _ref.textAlign,
22
24
  textAlign = _ref$textAlign === void 0 ? 'left' : _ref$textAlign,
23
25
  _ref$cloneElement = _ref.cloneElement,
@@ -30,6 +32,6 @@ export var EuiTextAlign = function EuiTextAlign(_ref) {
30
32
  if ( /*#__PURE__*/isValidElement(children) && cloneElement) {
31
33
  return cloneElementWithCss(children, props);
32
34
  } else {
33
- return ___EmotionJSX("div", props, children);
35
+ return ___EmotionJSX(Component, props, children);
34
36
  }
35
37
  };
@@ -24,7 +24,7 @@ export var EuiTextColor = function EuiTextColor(_ref) {
24
24
  _ref$color = _ref.color,
25
25
  color = _ref$color === void 0 ? 'default' : _ref$color,
26
26
  _ref$component = _ref.component,
27
- component = _ref$component === void 0 ? 'span' : _ref$component,
27
+ Component = _ref$component === void 0 ? 'span' : _ref$component,
28
28
  _ref$cloneElement = _ref.cloneElement,
29
29
  cloneElement = _ref$cloneElement === void 0 ? false : _ref$cloneElement,
30
30
  style = _ref.style,
@@ -49,7 +49,6 @@ export var EuiTextColor = function EuiTextColor(_ref) {
49
49
  style: childrenStyle
50
50
  }));
51
51
  } else {
52
- var Component = component;
53
52
  return ___EmotionJSX(Component, props, children);
54
53
  }
55
54
  };
@@ -0,0 +1 @@
1
+ export {};
@@ -705,7 +705,7 @@ var EuiBasicTable = exports.EuiBasicTable = /*#__PURE__*/function (_Component) {
705
705
  var hasCustomActions = columnActions.some(function (action) {
706
706
  return !!action.render;
707
707
  });
708
- cells.push(_this5.renderItemActionsCell(itemId, item, column, columnIndex, hasCustomActions));
708
+ cells.push(_this5.renderItemActionsCell(itemId, item, column, columnIndex, rowIndex, hasCustomActions));
709
709
  // A table theoretically could have both custom and default action items
710
710
  // If it has both, default action mobile row styles take precedence over custom
711
711
  hasActions = !hasActions && hasCustomActions ? 'custom' : true;
@@ -794,7 +794,7 @@ var EuiBasicTable = exports.EuiBasicTable = /*#__PURE__*/function (_Component) {
794
794
  }
795
795
  }, {
796
796
  key: "renderItemActionsCell",
797
- value: function renderItemActionsCell(itemId, item, column, columnIndex, hasCustomActions) {
797
+ value: function renderItemActionsCell(itemId, item, column, columnIndex, rowIndex, hasCustomActions) {
798
798
  // Disable all actions if any row(s) are selected
799
799
  var allDisabled = this.state.selection.length > 0;
800
800
  var actualActions = column.actions.filter(function (action) {
@@ -831,7 +831,8 @@ var EuiBasicTable = exports.EuiBasicTable = /*#__PURE__*/function (_Component) {
831
831
  actions: column.actions,
832
832
  actionsDisabled: allDisabled,
833
833
  itemId: itemId,
834
- item: item
834
+ item: item,
835
+ displayedRowIndex: rowIndex
835
836
  });
836
837
  }
837
838
  });
@@ -30,6 +30,7 @@ var CollapsedItemActions = exports.CollapsedItemActions = function CollapsedItem
30
30
  itemId = _ref.itemId,
31
31
  item = _ref.item,
32
32
  actionsDisabled = _ref.actionsDisabled,
33
+ displayedRowIndex = _ref.displayedRowIndex,
33
34
  className = _ref.className;
34
35
  var _useState = (0, _react.useState)(false),
35
36
  _useState2 = (0, _slicedToArray2.default)(_useState, 2),
@@ -38,6 +39,11 @@ var CollapsedItemActions = exports.CollapsedItemActions = function CollapsedItem
38
39
  var closePopover = (0, _react.useCallback)(function () {
39
40
  return setPopoverOpen(false);
40
41
  }, []);
42
+ var allActionsTooltip = (0, _i18n.useEuiI18n)('euiCollapsedItemActions.allActionsTooltip', 'All actions');
43
+ var allActionsButtonAriaLabel = (0, _i18n.useEuiI18n)('euiCollapsedItemActions.allActions', 'All actions, row {index}', {
44
+ index: displayedRowIndex + 1
45
+ });
46
+ var allActionsButtonDisabledAriaLabel = (0, _i18n.useEuiI18n)('euiCollapsedItemActions.allActionsDisabled', 'Individual item actions are disabled when rows are being selected.');
41
47
  var controls = (0, _react.useMemo)(function () {
42
48
  return actions.reduce(function (controls, action, index) {
43
49
  var _action$available, _action$available2;
@@ -88,37 +94,24 @@ var CollapsedItemActions = exports.CollapsedItemActions = function CollapsedItem
88
94
  return controls;
89
95
  }, []);
90
96
  }, [actions, actionsDisabled, item, closePopover]);
91
- var popoverButton = (0, _react2.jsx)(_i18n.EuiI18n, {
92
- tokens: ['euiCollapsedItemActions.allActions', 'euiCollapsedItemActions.allActionsDisabled'],
93
- defaults: ['All actions', 'Individual item actions are disabled when rows are being selected.']
94
- }, function (_ref2) {
95
- var _ref3 = (0, _slicedToArray2.default)(_ref2, 2),
96
- allActions = _ref3[0],
97
- allActionsDisabled = _ref3[1];
98
- return (0, _react2.jsx)(_button.EuiButtonIcon, {
99
- className: className,
100
- "aria-label": actionsDisabled ? allActionsDisabled : allActions,
101
- title: actionsDisabled ? allActionsDisabled : undefined,
102
- iconType: "boxesHorizontal",
103
- color: "text",
104
- isDisabled: actionsDisabled,
105
- onClick: function onClick() {
106
- return setPopoverOpen(function (isOpen) {
107
- return !isOpen;
108
- });
109
- },
110
- "data-test-subj": "euiCollapsedItemActionsButton"
111
- });
112
- });
113
- var withTooltip = !actionsDisabled && (0, _react2.jsx)(_i18n.EuiI18n, {
114
- token: "euiCollapsedItemActions.allActions",
115
- default: "All actions"
116
- }, function (allActions) {
117
- return (0, _react2.jsx)(_tool_tip.EuiToolTip, {
118
- content: allActions,
119
- delay: "long"
120
- }, popoverButton);
97
+ var popoverButton = (0, _react2.jsx)(_button.EuiButtonIcon, {
98
+ className: className,
99
+ "aria-label": actionsDisabled ? allActionsButtonDisabledAriaLabel : allActionsButtonAriaLabel,
100
+ title: actionsDisabled ? allActionsButtonDisabledAriaLabel : undefined,
101
+ iconType: "boxesHorizontal",
102
+ color: "text",
103
+ isDisabled: actionsDisabled,
104
+ onClick: function onClick() {
105
+ return setPopoverOpen(function (isOpen) {
106
+ return !isOpen;
107
+ });
108
+ },
109
+ "data-test-subj": "euiCollapsedItemActionsButton"
121
110
  });
111
+ var withTooltip = !actionsDisabled && (0, _react2.jsx)(_tool_tip.EuiToolTip, {
112
+ content: allActionsTooltip,
113
+ delay: "long"
114
+ }, popoverButton);
122
115
  return (0, _react2.jsx)(_popover.EuiPopover, {
123
116
  className: className,
124
117
  id: "".concat(itemId, "-actions"),
@@ -13,6 +13,7 @@ var _getPrototypeOf2 = _interopRequireDefault(require("@babel/runtime/helpers/ge
13
13
  var _inherits2 = _interopRequireDefault(require("@babel/runtime/helpers/inherits"));
14
14
  var _defineProperty2 = _interopRequireDefault(require("@babel/runtime/helpers/defineProperty"));
15
15
  var _extends2 = _interopRequireDefault(require("@babel/runtime/helpers/extends"));
16
+ var _toConsumableArray2 = _interopRequireDefault(require("@babel/runtime/helpers/toConsumableArray"));
16
17
  var _objectWithoutProperties2 = _interopRequireDefault(require("@babel/runtime/helpers/objectWithoutProperties"));
17
18
  var _classnames = _interopRequireDefault(require("classnames"));
18
19
  var _react = _interopRequireWildcard(require("react"));
@@ -27,10 +28,12 @@ var _focus = require("../../utils/focus");
27
28
  var _data_grid_cell_actions = require("./data_grid_cell_actions");
28
29
  var _data_grid_cell_popover = require("./data_grid_cell_popover");
29
30
  var _focus_utils = require("./focus_utils");
31
+ var _data_grid_cell = require("./data_grid_cell.styles");
30
32
  var _react2 = require("@emotion/react");
31
- var _excluded = ["renderCellValue", "cellContext", "column", "setCellContentsRef", "rowIndex", "colIndex", "ariaRowIndex", "rowHeight", "rowHeightUtils", "isControlColumn", "isFocused", "showCellActions", "onExpandClick", "popoverAnchorRef"],
33
+ var _excluded = ["renderCellValue", "cellContext", "column", "setCellContentsRef", "rowIndex", "colIndex", "rowHeight", "rowHeightUtils", "isControlColumn"],
32
34
  _excluded2 = ["width", "popoverContext", "interactiveCellId", "columnType", "className", "column", "style", "rowHeightUtils", "rowHeightsOptions", "rowManager", "pagination"],
33
- _excluded3 = ["isExpandable", "style", "className", "data-test-subj"];
35
+ _excluded3 = ["isExpandable", "style", "className", "data-test-subj"],
36
+ _excluded4 = ["columnId", "columnIndex", "rowIndex", "visibleRowIndex"];
34
37
  /*
35
38
  * Copyright Elasticsearch B.V. and/or licensed to Elasticsearch B.V. under one
36
39
  * or more contributor license agreements. Licensed under the Elastic License
@@ -51,14 +54,9 @@ var EuiDataGridCellContent = /*#__PURE__*/(0, _react.memo)(function (_ref) {
51
54
  setCellContentsRef = _ref.setCellContentsRef,
52
55
  rowIndex = _ref.rowIndex,
53
56
  colIndex = _ref.colIndex,
54
- ariaRowIndex = _ref.ariaRowIndex,
55
57
  rowHeight = _ref.rowHeight,
56
58
  rowHeightUtils = _ref.rowHeightUtils,
57
59
  isControlColumn = _ref.isControlColumn,
58
- isFocused = _ref.isFocused,
59
- showCellActions = _ref.showCellActions,
60
- onExpandClick = _ref.onExpandClick,
61
- popoverAnchorRef = _ref.popoverAnchorRef,
62
60
  rest = (0, _objectWithoutProperties2.default)(_ref, _excluded);
63
61
  // React is more permissive than the TS types indicate
64
62
  var CellElement = renderCellValue;
@@ -71,39 +69,29 @@ var EuiDataGridCellContent = /*#__PURE__*/(0, _react.memo)(function (_ref) {
71
69
  'eui-textTruncate': cellHeightType === 'default'
72
70
  });
73
71
  }, [cellHeightType, isControlColumn]);
74
- return (0, _react2.jsx)(_react.default.Fragment, null, (0, _react2.jsx)(RenderTruncatedCellContent, {
72
+ var styles = (0, _services.useEuiMemoizedStyles)(_data_grid_cell.euiDataGridRowCellStyles);
73
+ var cssStyles = [styles.content.euiDataGridRowCell__content].concat((0, _toConsumableArray2.default)(isControlColumn ? [
74
+ // Control column cells should not be vertically centered (defaultHeight) except
75
+ // on single rows. They should be top-aligned for auto and lineCount heights
76
+ styles.content.controlColumn, cellHeightType === 'default' ? styles.content.defaultHeight : styles.content.autoHeight] : [
77
+ // Regular data cells should always inherit height from the row wrapper,
78
+ // except for auto height
79
+ cellHeightType === 'auto' ? styles.content.autoHeight : styles.content.defaultHeight]));
80
+ return (0, _react2.jsx)(RenderTruncatedCellContent, {
75
81
  hasLineCountTruncation: cellHeightType === 'lineCount' && !isControlColumn,
76
82
  rowHeight: rowHeight
77
83
  }, (0, _react2.jsx)("div", {
78
84
  ref: setCellContentsRef,
79
85
  "data-datagrid-cellcontent": true,
80
- className: classes
86
+ className: classes,
87
+ css: cssStyles
81
88
  }, (0, _react2.jsx)(CellElement, (0, _extends2.default)({
82
89
  isDetails: false,
83
90
  "data-test-subj": "cell-content",
84
91
  rowIndex: rowIndex,
85
92
  colIndex: colIndex,
86
93
  schema: (column === null || column === void 0 ? void 0 : column.schema) || rest.columnType
87
- }, cellContext, rest)))), (0, _react2.jsx)(_accessibility.EuiScreenReaderOnly, null, (0, _react2.jsx)("p", {
88
- hidden: !isFocused
89
- }, '- ', (0, _react2.jsx)(_i18n.EuiI18n, {
90
- token: "euiDataGridCell.position",
91
- default: "{columnId}, column {col}, row {row}",
92
- values: {
93
- columnId: (column === null || column === void 0 ? void 0 : column.displayAsText) || rest.columnId,
94
- col: colIndex + 1,
95
- row: ariaRowIndex
96
- }
97
- }), showCellActions && (0, _react2.jsx)(_react.default.Fragment, null, '. ', (0, _react2.jsx)(_i18n.EuiI18n, {
98
- token: "euiDataGridCell.expansionEnterPrompt",
99
- default: "Press the Enter key to expand this cell."
100
- })))), showCellActions && (0, _react2.jsx)(_data_grid_cell_actions.EuiDataGridCellActions, {
101
- rowIndex: rowIndex,
102
- colIndex: colIndex,
103
- column: column,
104
- onExpandClick: onExpandClick,
105
- popoverAnchorRef: popoverAnchorRef
106
- }));
94
+ }, cellContext, rest))));
107
95
  });
108
96
  EuiDataGridCellContent.displayName = 'EuiDataGridCellContent';
109
97
  var EuiDataGridCell = exports.EuiDataGridCell = /*#__PURE__*/function (_Component) {
@@ -122,8 +110,7 @@ var EuiDataGridCell = exports.EuiDataGridCell = /*#__PURE__*/function (_Componen
122
110
  (0, _defineProperty2.default)(_this, "state", {
123
111
  cellProps: {},
124
112
  isFocused: false,
125
- isHovered: false,
126
- cellTextAlign: 'Left'
113
+ isHovered: false
127
114
  });
128
115
  (0, _defineProperty2.default)(_this, "unsubscribeCell", void 0);
129
116
  (0, _defineProperty2.default)(_this, "style", null);
@@ -205,29 +192,6 @@ var EuiDataGridCell = exports.EuiDataGridCell = /*#__PURE__*/function (_Componen
205
192
  } else if (_this.contentObserver) {
206
193
  _this.contentObserver.disconnect();
207
194
  }
208
- _this.setCellTextAlign();
209
- });
210
- (0, _defineProperty2.default)(_this, "setCellTextAlign", function () {
211
- if (_this.cellContentsRef) {
212
- var columnType = _this.props.columnType;
213
- if (!columnType) {
214
- // If no schema was set, this is likely a left aligned column
215
- _this.setState({
216
- cellTextAlign: 'Left'
217
- });
218
- } else if (columnType === 'numeric' || columnType === 'currency') {
219
- // Default EUI schemas that we know set right text align
220
- _this.setState({
221
- cellTextAlign: 'Right'
222
- });
223
- } else {
224
- // If the consumer is using a custom schema, it may have custom text alignment
225
- var textAlign = window.getComputedStyle(_this.cellContentsRef).getPropertyValue('text-align');
226
- _this.setState({
227
- cellTextAlign: textAlign === 'right' || textAlign === 'end' ? 'Right' : 'Left'
228
- });
229
- }
230
- }
231
195
  });
232
196
  (0, _defineProperty2.default)(_this, "isExpandable", function () {
233
197
  var _this$props$column, _this$state$cellProps;
@@ -256,7 +220,9 @@ var EuiDataGridCell = exports.EuiDataGridCell = /*#__PURE__*/function (_Componen
256
220
  // Set popover anchor
257
221
  var cellAnchorEl = _this.popoverAnchorRef.current;
258
222
  setPopoverAnchor(cellAnchorEl);
259
- setPopoverAnchorPosition("down".concat(_this.state.cellTextAlign));
223
+ // TODO: Potentially switch to `topLeft` based on occlusion with sticky header
224
+ // @see https://github.com/elastic/eui/issues/7828
225
+ setPopoverAnchorPosition('downLeft');
260
226
 
261
227
  // Set popover contents with cell content
262
228
  var _this$props5 = _this.props,
@@ -458,7 +424,7 @@ var EuiDataGridCell = exports.EuiDataGridCell = /*#__PURE__*/function (_Componen
458
424
  var isExpandable = this.isExpandable();
459
425
  var popoverIsOpen = this.isPopoverOpen();
460
426
  var showCellActions = isExpandable && (popoverIsOpen || this.state.isFocused || this.state.isHovered);
461
- var cellClasses = (0, _classnames.default)('euiDataGridRowCell', "euiDataGridRowCell--align".concat(this.state.cellTextAlign), (0, _defineProperty2.default)((0, _defineProperty2.default)({}, "euiDataGridRowCell--".concat(columnType), columnType), 'euiDataGridRowCell--open', popoverIsOpen), className);
427
+ var cellClasses = (0, _classnames.default)('euiDataGridRowCell', (0, _defineProperty2.default)((0, _defineProperty2.default)({}, "euiDataGridRowCell--".concat(columnType), columnType), 'euiDataGridRowCell--open', popoverIsOpen), className);
462
428
  var ariaRowIndex = pagination ? visibleRowIndex + 1 + pagination.pageSize * pagination.pageIndex : visibleRowIndex + 1;
463
429
  var _this$state$cellProps2 = this.state.cellProps,
464
430
  _ = _this$state$cellProps2.isExpandable,
@@ -488,23 +454,14 @@ var EuiDataGridCell = exports.EuiDataGridCell = /*#__PURE__*/function (_Componen
488
454
  }) : undefined;
489
455
  return (0, _react2.jsx)(RenderCellInRow, {
490
456
  row: row
491
- }, (0, _react2.jsx)("div", (0, _extends2.default)({
492
- role: "gridcell",
457
+ }, (0, _react2.jsx)(GridCellDiv, (0, _extends2.default)({}, cellProps, {
458
+ ref: this.cellRef,
459
+ columnId: this.props.columnId,
460
+ columnIndex: this.props.colIndex,
461
+ rowIndex: rowIndex,
462
+ visibleRowIndex: this.props.visibleRowIndex,
493
463
  "aria-rowindex": ariaRowIndex,
494
464
  tabIndex: this.state.isFocused ? 0 : -1,
495
- ref: this.cellRef
496
- }, cellProps, {
497
- "data-test-subj": "dataGridRowCell"
498
- // Data attributes to help target specific cells by either data or current cell location
499
- ,
500
- "data-gridcell-column-id": this.props.columnId // Static column ID name, not affected by column order
501
- ,
502
- "data-gridcell-column-index": this.props.colIndex // Affected by column reordering
503
- ,
504
- "data-gridcell-row-index": this.props.rowIndex // Index from data, not affected by sorting or pagination
505
- ,
506
- "data-gridcell-visible-row-index": this.props.visibleRowIndex // Affected by sorting & pagination
507
- ,
508
465
  onKeyDown: this.handleCellKeyDown,
509
466
  onMouseEnter: this.onMouseEnter,
510
467
  onMouseLeave: this.onMouseLeave
@@ -518,18 +475,24 @@ var EuiDataGridCell = exports.EuiDataGridCell = /*#__PURE__*/function (_Componen
518
475
  columnType: columnType,
519
476
  isExpandable: isExpandable,
520
477
  isExpanded: popoverIsOpen,
521
- onExpandClick: this.handleCellExpansionClick,
522
- popoverAnchorRef: this.popoverAnchorRef,
523
- showCellActions: showCellActions,
524
- isFocused: this.state.isFocused,
525
478
  setCellContentsRef: this.setCellContentsRef,
526
479
  rowHeight: rowHeight,
527
480
  rowHeightUtils: rowHeightUtils,
528
481
  isControlColumn: cellClasses.includes('euiDataGridRowCell--controlColumn'),
529
- ariaRowIndex: ariaRowIndex,
530
482
  rowIndex: rowIndex,
531
483
  colIndex: colIndex
532
- })))));
484
+ }))), this.state.isFocused && (0, _react2.jsx)(CellScreenReaderDescription, {
485
+ columnName: (column === null || column === void 0 ? void 0 : column.displayAsText) || this.props.columnId,
486
+ columnIndex: colIndex + 1,
487
+ rowIndex: ariaRowIndex,
488
+ canExpandCell: showCellActions
489
+ }), showCellActions && (0, _react2.jsx)(_data_grid_cell_actions.EuiDataGridCellActions, {
490
+ rowIndex: rowIndex,
491
+ colIndex: colIndex,
492
+ column: column,
493
+ onExpandClick: this.handleCellExpansionClick,
494
+ popoverAnchorRef: this.popoverAnchorRef
495
+ })));
533
496
  }
534
497
  }]);
535
498
  }(_react.Component);
@@ -555,4 +518,47 @@ var RenderTruncatedCellContent = /*#__PURE__*/(0, _react.memo)(function (_ref3)
555
518
  cloneElement: true
556
519
  }, children) : children;
557
520
  });
558
- RenderTruncatedCellContent.displayName = 'RenderTruncatedCellContent';
521
+ RenderTruncatedCellContent.displayName = 'RenderTruncatedCellContent';
522
+
523
+ /**
524
+ * Function component utilities for easier hook usage
525
+ */
526
+
527
+ var GridCellDiv = /*#__PURE__*/(0, _react.memo)( /*#__PURE__*/(0, _react.forwardRef)(function (_ref4, ref) {
528
+ var columnId = _ref4.columnId,
529
+ columnIndex = _ref4.columnIndex,
530
+ rowIndex = _ref4.rowIndex,
531
+ visibleRowIndex = _ref4.visibleRowIndex,
532
+ props = (0, _objectWithoutProperties2.default)(_ref4, _excluded4);
533
+ var styles = (0, _services.useEuiMemoizedStyles)(_data_grid_cell.euiDataGridRowCellStyles);
534
+ return (0, _react2.jsx)("div", (0, _extends2.default)({
535
+ ref: ref,
536
+ css: styles.euiDataGridRowCell
537
+ }, props, {
538
+ role: "gridcell"
539
+ // Data attributes to help target specific cells by either data or current cell location
540
+ ,
541
+ "data-gridcell-column-id": columnId // Static column ID name, not affected by column order
542
+ ,
543
+ "data-gridcell-column-index": columnIndex // Affected by column reordering
544
+ ,
545
+ "data-gridcell-row-index": rowIndex // Index from data, not affected by sorting or pagination
546
+ ,
547
+ "data-gridcell-visible-row-index": visibleRowIndex // Affected by sorting & pagination
548
+ }));
549
+ }));
550
+ GridCellDiv.displayName = 'GridCellDiv';
551
+ var CellScreenReaderDescription = /*#__PURE__*/(0, _react.memo)(function (_ref5) {
552
+ var columnName = _ref5.columnName,
553
+ columnIndex = _ref5.columnIndex,
554
+ rowIndex = _ref5.rowIndex,
555
+ canExpandCell = _ref5.canExpandCell;
556
+ var cellPosition = (0, _i18n.useEuiI18n)('euiDataGridCell.position', '{columnName}, column {columnIndex}, row {rowIndex}', {
557
+ columnName: columnName,
558
+ columnIndex: columnIndex,
559
+ rowIndex: rowIndex
560
+ });
561
+ var enterKeyPrompt = (0, _i18n.useEuiI18n)('euiDataGridCell.expansionEnterPrompt', 'Press the Enter key to expand this cell.');
562
+ return (0, _react2.jsx)(_accessibility.EuiScreenReaderOnly, null, (0, _react2.jsx)("p", null, " - ".concat(cellPosition).concat(canExpandCell ? ". ".concat(enterKeyPrompt) : '')));
563
+ });
564
+ CellScreenReaderDescription.displayName = 'CellScreenReaderDescription';