@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,33 @@
1
+ var _templateObject;
2
+ function _taggedTemplateLiteral(e, t) { return t || (t = e.slice(0)), Object.freeze(Object.defineProperties(e, { raw: { value: Object.freeze(t) } })); }
3
+ /*
4
+ * Copyright Elasticsearch B.V. and/or licensed to Elasticsearch B.V. under one
5
+ * or more contributor license agreements. Licensed under the Elastic License
6
+ * 2.0 and the Server Side Public License, v 1; you may not use this file except
7
+ * in compliance with, at your election, the Elastic License 2.0 or the Server
8
+ * Side Public License, v 1.
9
+ */
10
+
11
+ import { css, keyframes } from '@emotion/react';
12
+ import { euiCanAnimate, logicalCSS, logicalSizeCSS, mathWithUnits } from '../../../../global_styling';
13
+ import { euiDataGridVariables } from '../../data_grid.styles';
14
+ import { euiDataGridCellOutlineStyles, euiDataGridCellOutlineSelectors } from './data_grid_cell.styles';
15
+ export var euiDataGridCellActionsStyles = function euiDataGridCellActionsStyles(euiThemeContext) {
16
+ var euiTheme = euiThemeContext.euiTheme;
17
+ var _euiDataGridVariables = euiDataGridVariables(euiThemeContext),
18
+ levels = _euiDataGridVariables.levels;
19
+ var borderWidth = euiTheme.border.width.thin;
20
+ var cellOutline = euiDataGridCellOutlineStyles(euiThemeContext);
21
+ var _euiDataGridCellOutli = euiDataGridCellOutlineSelectors('.euiDataGridRowCell'),
22
+ cellSelectors = _euiDataGridCellOutli.actions;
23
+ return {
24
+ euiDataGridRowCell__actionsWrapper: /*#__PURE__*/css("position:absolute;", logicalCSS('left', 0), " ", logicalCSS('bottom', '100%'), "z-index:", levels.stickyHeader - 1, ";.euiDataGridRowCell[data-gridcell-visible-row-index='0']>&{z-index:", levels.stickyHeader + 1, ";}", cellSelectors.hoverZone, " &{", logicalCSS('min-width', '50%'), " ", logicalCSS('padding-right', euiTheme.size.base), ";};label:euiDataGridRowCell__actionsWrapper;"),
25
+ euiDataGridRowCell__actions: /*#__PURE__*/css("position:relative;display:flex;gap:", euiTheme.size.xxs, ";", logicalCSS('width', 'fit-content'), " padding-inline:", euiTheme.size.xxs, ";", logicalCSS('margin-bottom', "-".concat(borderWidth)), " background-color:", cellOutline.focusColor, ";color:", euiTheme.colors.emptyShade, ";border:", borderWidth, " solid ", cellOutline.focusColor, ";border-radius:", cellOutline.borderRadius, ";", logicalCSS('border-bottom-left-radius', 0), "&::after{content:'';position:absolute;", logicalCSS('top', '100%'), " ", logicalCSS('left', "-".concat(borderWidth)), " ", logicalSizeCSS(mathWithUnits(borderWidth, function (x) {
26
+ return x * 2;
27
+ })), " background-color:inherit;}", cellSelectors.hoverColor, " &{background-color:", cellOutline.hoverColor, ";border-color:", cellOutline.hoverColor, ";}", euiCanAnimate, "{transform:scaleY(0);transform-origin:bottom;", cellSelectors.showAnimation, " &{animation-duration:", euiTheme.animation.fast, ";animation-name:", slideUp, ";animation-iteration-count:1;animation-fill-mode:forwards;}", cellSelectors.hoverAnimation, " &{animation-delay:", euiTheme.animation.slow, ";}};label:euiDataGridRowCell__actions;"),
28
+ euiDataGridRowCell__actionButtonIcon: /*#__PURE__*/css(logicalCSS('width', euiTheme.size.base), " ", logicalCSS('height', mathWithUnits([euiTheme.size.base, euiTheme.size.xs], function (x, y) {
29
+ return x + y;
30
+ })), " border-radius:0;&,svg{background-color:transparent!important;color:currentColor!important;fill:currentColor!important;}&.euiDataGridRowCell__expandCell .euiIcon{", logicalCSS('width', '120%'), " ", logicalCSS('height', '100%'), ";};label:euiDataGridRowCell__actionButtonIcon;")
31
+ };
32
+ };
33
+ var slideUp = keyframes(_templateObject || (_templateObject = _taggedTemplateLiteral(["\n from { transform: scaleY(0); }\n to { transform: scaleY(1); }\n"])));
@@ -21,8 +21,10 @@ function _arrayWithHoles(r) { if (Array.isArray(r)) return r; }
21
21
 
22
22
  import React, { createContext, useState, useCallback, useMemo } from 'react';
23
23
  import classNames from 'classnames';
24
- import { keys } from '../../../../services';
24
+ import { keys, useEuiMemoizedStyles } from '../../../../services';
25
25
  import { EuiWrappingPopover } from '../../../popover';
26
+ import { euiDataGridVariables } from '../../data_grid.styles';
27
+ import { euiDataGridCellPopoverStyles } from './data_grid_cell_popover.styles';
26
28
  export var DataGridCellPopoverContext = /*#__PURE__*/createContext({
27
29
  popoverIsOpen: false,
28
30
  cellLocation: {
@@ -92,25 +94,23 @@ export var useCellPopover = function useCellPopover() {
92
94
  // popover button isn't actually the DOM node we pass to `button`. Otherwise,
93
95
  // clicking the expansion cell action triggers an outside click
94
96
  var onClickOutside = useCallback(function (event) {
95
- var _popoverAnchor$parent;
96
- var cellActions = popoverAnchor === null || popoverAnchor === void 0 || (_popoverAnchor$parent = popoverAnchor.parentElement) === null || _popoverAnchor$parent === void 0 || (_popoverAnchor$parent = _popoverAnchor$parent.parentElement) === null || _popoverAnchor$parent === void 0 ? void 0 : _popoverAnchor$parent.previousElementSibling;
97
+ var cellActions = popoverAnchor === null || popoverAnchor === void 0 ? void 0 : popoverAnchor.closest('.euiDataGridRowCell__actionsWrapper');
97
98
  if (!(cellActions !== null && cellActions !== void 0 && cellActions.contains(event.target))) {
98
99
  closeCellPopover();
99
100
  }
100
101
  }, [popoverAnchor, closeCellPopover]);
101
102
  var onKeyDown = useCallback(function (event) {
102
103
  if (event.key === keys.F2 || event.key === keys.ESCAPE) {
103
- var _popoverAnchor$parent2;
104
104
  event.preventDefault();
105
105
  event.stopPropagation();
106
106
  closeCellPopover();
107
- var cell = popoverAnchor === null || popoverAnchor === void 0 || (_popoverAnchor$parent2 = popoverAnchor.parentElement) === null || _popoverAnchor$parent2 === void 0 || (_popoverAnchor$parent2 = _popoverAnchor$parent2.parentElement) === null || _popoverAnchor$parent2 === void 0 ? void 0 : _popoverAnchor$parent2.parentElement;
107
+ var cell = popoverAnchor === null || popoverAnchor === void 0 ? void 0 : popoverAnchor.closest('.euiDataGridRowCell');
108
108
 
109
109
  // Prevent cell animation flash while focus is being shifted between popover and cell
110
110
  cell === null || cell === void 0 || cell.setAttribute('data-keyboard-closing', 'true');
111
111
  // Ensure focus is returned to the parent cell, and remove animation stopgap
112
112
  requestAnimationFrame(function () {
113
- popoverAnchor === null || popoverAnchor === void 0 || popoverAnchor.parentElement.focus();
113
+ cell === null || cell === void 0 || cell.focus();
114
114
  cell === null || cell === void 0 || cell.removeAttribute('data-keyboard-closing');
115
115
  });
116
116
  }
@@ -127,36 +127,45 @@ export var useCellPopover = function useCellPopover() {
127
127
  setCellPopoverProps: setCellPopoverProps
128
128
  };
129
129
  }, [popoverIsOpen, closeCellPopover, openCellPopover, cellLocation]);
130
+ var styles = useEuiMemoizedStyles(euiDataGridCellPopoverStyles);
131
+ var _useEuiMemoizedStyles = useEuiMemoizedStyles(euiDataGridVariables),
132
+ levels = _useEuiMemoizedStyles.levels;
130
133
  var cellPopover = useMemo(function () {
131
- var _cellPopoverProps$pan;
134
+ var _cellPopoverProps$pan, _cell$offsetWidth;
132
135
  if (!popoverIsOpen || !popoverAnchor) return null;
136
+ var cell = popoverAnchor.closest('.euiDataGridRowCell');
133
137
 
134
138
  // Note that this popover is rendered once at the top grid level, rather than one popover per cell
135
139
  return ___EmotionJSX(EuiWrappingPopover, _extends({
136
140
  isOpen: popoverIsOpen,
137
141
  display: "block",
138
142
  hasArrow: false,
143
+ attachToAnchor: true // required for https://github.com/elastic/eui/issues/6151
144
+ ,
139
145
  panelPaddingSize: "s",
140
146
  anchorPosition: popoverAnchorPosition,
141
- repositionToCrossAxis: false
147
+ repositionToCrossAxis: false,
148
+ zIndex: levels.cellPopover
142
149
  }, cellPopoverProps, {
143
150
  focusTrapProps: {
144
151
  onClickOutside: onClickOutside,
145
152
  clickOutsideDisables: false
146
153
  },
147
- panelProps: _objectSpread({
154
+ panelProps: _objectSpread(_objectSpread({
148
155
  'data-test-subj': 'euiDataGridExpansionPopover'
149
- }, cellPopoverProps.panelProps || {}),
156
+ }, cellPopoverProps.panelProps || {}), {}, {
157
+ css: [styles.euiDataGridRowCell__popover, cellPopoverProps.css]
158
+ }),
150
159
  panelClassName: classNames('euiDataGridRowCell__popover', cellPopoverProps.panelClassName, (_cellPopoverProps$pan = cellPopoverProps.panelProps) === null || _cellPopoverProps$pan === void 0 ? void 0 : _cellPopoverProps$pan.className),
151
160
  panelStyle: {
152
- maxInlineSize: "min(75vw, max(".concat(popoverAnchor.parentElement.offsetWidth, "px, 400px))"),
161
+ maxInlineSize: "min(75vw, max(".concat((_cell$offsetWidth = cell === null || cell === void 0 ? void 0 : cell.offsetWidth) !== null && _cell$offsetWidth !== void 0 ? _cell$offsetWidth : 0, "px, 400px))"),
153
162
  maxBlockSize: '50vh'
154
163
  },
155
164
  onKeyDown: onKeyDown,
156
165
  button: popoverAnchor,
157
166
  closePopover: closeCellPopover
158
167
  }), popoverContent);
159
- }, [popoverIsOpen, popoverAnchor, popoverContent, cellPopoverProps, closeCellPopover, onClickOutside, onKeyDown, popoverAnchorPosition]);
168
+ }, [styles, levels.cellPopover, popoverIsOpen, popoverAnchor, popoverContent, cellPopoverProps, closeCellPopover, onClickOutside, onKeyDown, popoverAnchorPosition]);
160
169
  return useMemo(function () {
161
170
  return {
162
171
  cellPopoverContext: cellPopoverContext,
@@ -0,0 +1,19 @@
1
+ var _templateObject;
2
+ function _taggedTemplateLiteral(e, t) { return t || (t = e.slice(0)), Object.freeze(Object.defineProperties(e, { raw: { value: Object.freeze(t) } })); }
3
+ /*
4
+ * Copyright Elasticsearch B.V. and/or licensed to Elasticsearch B.V. under one
5
+ * or more contributor license agreements. Licensed under the Elastic License
6
+ * 2.0 and the Server Side Public License, v 1; you may not use this file except
7
+ * in compliance with, at your election, the Elastic License 2.0 or the Server
8
+ * Side Public License, v 1.
9
+ */
10
+
11
+ import { css, keyframes } from '@emotion/react';
12
+ import { euiScrollBarStyles, euiCanAnimate } from '../../../../global_styling';
13
+ export var euiDataGridCellPopoverStyles = function euiDataGridCellPopoverStyles(euiThemeContext) {
14
+ var euiTheme = euiThemeContext.euiTheme;
15
+ return {
16
+ euiDataGridRowCell__popover: /*#__PURE__*/css(euiScrollBarStyles(euiThemeContext), " overflow:auto;", euiCanAnimate, "{animation-duration:", euiTheme.animation.normal, ";animation-name:", fadeIn, ";};label:euiDataGridRowCell__popover;")
17
+ };
18
+ };
19
+ var fadeIn = keyframes(_templateObject || (_templateObject = _taggedTemplateLiteral(["\n from { opacity: 0; }\n to { opacity: 1; }\n"])));
@@ -15,11 +15,10 @@ function _arrayWithHoles(r) { if (Array.isArray(r)) return r; }
15
15
  import React, { useEffect, useState, useMemo } from 'react';
16
16
  import PropTypes from "prop-types";
17
17
  import { tabbable } from 'tabbable';
18
- import { keys } from '../../../../services';
19
- import { useGeneratedHtmlId } from '../../../../services/accessibility';
18
+ import classNames from 'classnames';
19
+ import { keys, useGeneratedHtmlId } from '../../../../services';
20
20
  import { isDOMNode } from '../../../../utils';
21
21
  import { EuiFocusTrap } from '../../../focus_trap';
22
- import { EuiScreenReaderOnly } from '../../../accessibility';
23
22
  import { EuiI18n } from '../../../i18n';
24
23
 
25
24
  /**
@@ -99,20 +98,22 @@ export var FocusTrappedChildren = function FocusTrappedChildren(_ref2) {
99
98
  _useState6 = _slicedToArray(_useState5, 2),
100
99
  isExited = _useState6[0],
101
100
  setExited = _useState6[1];
102
- var keyboardHintAriaId = useGeneratedHtmlId({
103
- prefix: 'euiDataGridCellHeader',
104
- suffix: 'keyboardHint'
105
- });
106
- var exitedHintAriaId = useGeneratedHtmlId({
107
- prefix: 'euiDataGridCellHeader',
108
- suffix: 'exited'
101
+ var ariaDescribedById = useGeneratedHtmlId({
102
+ suffix: 'focusTrapHint'
109
103
  });
110
104
 
111
105
  // direct DOM manipulation as workaround to attach required hints
112
106
  useEffect(function () {
113
107
  var currentAriaDescribedbyId = cellEl.getAttribute('aria-describedby');
114
- cellEl.setAttribute('aria-describedby', "".concat(currentAriaDescribedbyId, " ").concat(exitedHintAriaId, " ").concat(keyboardHintAriaId, " "));
115
- }, [cellEl, keyboardHintAriaId, exitedHintAriaId]);
108
+ cellEl.setAttribute('aria-describedby', classNames(currentAriaDescribedbyId, ariaDescribedById));
109
+ return function () {
110
+ if (currentAriaDescribedbyId) {
111
+ cellEl.setAttribute('aria-descibedby', currentAriaDescribedbyId);
112
+ } else {
113
+ cellEl.removeAttribute('aria-describedby');
114
+ }
115
+ };
116
+ }, [cellEl, ariaDescribedById]);
116
117
  useEffect(function () {
117
118
  if (isCellEntered) {
118
119
  enableAndFocusInteractives(cellEl);
@@ -166,23 +167,20 @@ export var FocusTrappedChildren = function FocusTrappedChildren(_ref2) {
166
167
  onDeactivation: function onDeactivation() {
167
168
  return setIsCellEntered(false);
168
169
  }
169
- }, children, ___EmotionJSX(EuiScreenReaderOnly, null, ___EmotionJSX("p", {
170
- id: exitedHintAriaId,
171
- "aria-hidden": "true"
170
+ }, children, ___EmotionJSX("p", {
171
+ id: ariaDescribedById,
172
+ hidden: true
172
173
  }, isExited && ___EmotionJSX(EuiI18n
173
174
  // eslint-disable-next-line local/i18n
174
175
  , {
175
176
  token: "euiDataGridCell.focusTrapExitPrompt",
176
177
  default: "Exited cell content."
177
- }))), ___EmotionJSX(EuiScreenReaderOnly, null, ___EmotionJSX("p", {
178
- id: keyboardHintAriaId,
179
- "aria-hidden": "true"
180
- }, !isCellEntered && ___EmotionJSX(EuiI18n
178
+ }), !isCellEntered && ___EmotionJSX(EuiI18n
181
179
  // eslint-disable-next-line local/i18n
182
180
  , {
183
181
  token: "euiDataGridCell.focusTrapEnterPrompt",
184
182
  default: "Press the Enter key to interact with this cell's contents."
185
- }))));
183
+ })));
186
184
  };
187
185
 
188
186
  /**
@@ -12,8 +12,10 @@ function _objectWithoutPropertiesLoose(r, e) { if (null == r) return {}; var t =
12
12
 
13
13
  import React from 'react';
14
14
  import PropTypes from "prop-types";
15
+ import { useEuiMemoizedStyles } from '../../../services';
15
16
  import { EuiDataGridBodyVirtualized } from './data_grid_body_virtualized';
16
17
  import { EuiDataGridBodyCustomRender } from './data_grid_body_custom';
18
+ import { euiDataGridBodyStyles } from './data_grid_body.styles';
17
19
  import { jsx as ___EmotionJSX } from "@emotion/react";
18
20
  export var EuiDataGridBody = function EuiDataGridBody(_ref) {
19
21
  var renderCustomGridBody = _ref.renderCustomGridBody,
@@ -23,9 +25,14 @@ export var EuiDataGridBody = function EuiDataGridBody(_ref) {
23
25
  * + virtualization library for rendering content, or if consumers have
24
26
  * passed their own custom renderer
25
27
  */
28
+ var styles = useEuiMemoizedStyles(euiDataGridBodyStyles);
29
+ var cssStyles = [styles.euiDataGridBody, renderCustomGridBody ? styles.customRender : styles.virtualized];
26
30
  return renderCustomGridBody ? ___EmotionJSX(EuiDataGridBodyCustomRender, _extends({
27
- renderCustomGridBody: renderCustomGridBody
28
- }, props)) : ___EmotionJSX(EuiDataGridBodyVirtualized, props);
31
+ renderCustomGridBody: renderCustomGridBody,
32
+ css: cssStyles
33
+ }, props)) : ___EmotionJSX(EuiDataGridBodyVirtualized, _extends({
34
+ css: cssStyles
35
+ }, props));
29
36
  };
30
37
  EuiDataGridBody.propTypes = {
31
38
  leadingControlColumns: PropTypes.arrayOf(PropTypes.shape({
@@ -594,34 +601,42 @@ EuiDataGridBody.propTypes = {
594
601
  gridStyles: PropTypes.shape({
595
602
  /**
596
603
  * Size of fonts used within the row and column cells
604
+ * @default m
597
605
  */
598
606
  fontSize: PropTypes.oneOf(["s", "m", "l"]),
599
607
  /**
600
608
  * Defines the padding with the row and column cells
609
+ * @default m
601
610
  */
602
611
  cellPadding: PropTypes.oneOf(["s", "m", "l"]),
603
612
  /**
604
- * Border uses for the row and column cells
613
+ * Border used for the row and column cells
614
+ * @default all
605
615
  */
606
616
  border: PropTypes.oneOf(["all", "horizontal", "none"]),
607
617
  /**
608
618
  * If set to true, rows will alternate zebra striping for clarity
619
+ * @default false
609
620
  */
610
621
  stripes: PropTypes.bool,
611
622
  /**
612
623
  * Visual style for the column headers. Recommendation is to use the `underline` style in times when #EuiDataGrid `toolbarVisibility` is set to `false`.
624
+ * @default shade
613
625
  */
614
626
  header: PropTypes.oneOf(["shade", "underline"]),
615
627
  /**
616
628
  * Visual style for the column footers.
629
+ * @default overline
617
630
  */
618
631
  footer: PropTypes.oneOf(["shade", "overline", "striped"]),
619
632
  /**
620
633
  * If set to true, the footer row will be sticky
634
+ * @default true
621
635
  */
622
636
  stickyFooter: PropTypes.bool,
623
637
  /**
624
638
  * Will define what visual style to show on row hover
639
+ * @default hover
625
640
  */
626
641
  rowHover: PropTypes.oneOf(["highlight", "none"]),
627
642
  /**
@@ -637,5 +652,6 @@ EuiDataGridBody.propTypes = {
637
652
  gridWidth: PropTypes.number.isRequired,
638
653
  gridRef: PropTypes.any.isRequired,
639
654
  gridItemsRendered: PropTypes.any.isRequired,
640
- wrapperRef: PropTypes.any.isRequired
655
+ wrapperRef: PropTypes.any.isRequired,
656
+ className: PropTypes.string
641
657
  };
@@ -0,0 +1,26 @@
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 { euiScrollBarStyles, logicalSizeCSS } from '../../../global_styling';
12
+ var _ref = process.env.NODE_ENV === "production" ? {
13
+ name: "jawla0-virtualized",
14
+ styles: "scroll-padding:0;label:virtualized;"
15
+ } : {
16
+ name: "jawla0-virtualized",
17
+ styles: "scroll-padding:0;label:virtualized;",
18
+ toString: _EMOTION_STRINGIFIED_CSS_ERROR__
19
+ };
20
+ export var euiDataGridBodyStyles = function euiDataGridBodyStyles(euiThemeContext) {
21
+ return {
22
+ euiDataGridBody: /*#__PURE__*/css(euiScrollBarStyles(euiThemeContext), ";;label:euiDataGridBody;"),
23
+ virtualized: _ref,
24
+ customRender: /*#__PURE__*/css(logicalSizeCSS('100%'), " overflow:auto;;label:customRender;")
25
+ };
26
+ };
@@ -56,7 +56,8 @@ export var EuiDataGridBodyCustomRender = function EuiDataGridBodyCustomRender(_r
56
56
  pagination = _ref.pagination,
57
57
  rowHeightsOptions = _ref.rowHeightsOptions,
58
58
  gridWidth = _ref.gridWidth,
59
- gridStyles = _ref.gridStyles;
59
+ gridStyles = _ref.gridStyles,
60
+ className = _ref.className;
60
61
  /**
61
62
  * Columns & widths
62
63
  */
@@ -105,7 +106,8 @@ export var EuiDataGridBodyCustomRender = function EuiDataGridBodyCustomRender(_r
105
106
  switchColumnPos: switchColumnPos,
106
107
  sorting: sorting,
107
108
  schema: schema,
108
- schemaDetectors: schemaDetectors
109
+ schemaDetectors: schemaDetectors,
110
+ gridStyles: gridStyles
109
111
  }),
110
112
  headerRow = _useDataGridHeader.headerRow;
111
113
  var _useDataGridFooter = useDataGridFooter({
@@ -119,7 +121,8 @@ export var EuiDataGridBodyCustomRender = function EuiDataGridBodyCustomRender(_r
119
121
  columns: columns,
120
122
  columnWidths: columnWidths,
121
123
  defaultColumnWidth: defaultColumnWidth,
122
- schema: schema
124
+ schema: schema,
125
+ gridStyles: gridStyles
123
126
  }),
124
127
  footerRow = _useDataGridFooter.footerRow;
125
128
 
@@ -167,7 +170,7 @@ export var EuiDataGridBodyCustomRender = function EuiDataGridBodyCustomRender(_r
167
170
  customGridBodyProps = _useState2[0],
168
171
  setCustomGridBodyProps = _useState2[1];
169
172
  return ___EmotionJSX("div", _extends({}, customGridBodyProps, {
170
- className: classNames('euiDataGrid__customRenderBody', customGridBodyProps === null || customGridBodyProps === void 0 ? void 0 : customGridBodyProps.className)
173
+ className: classNames('euiDataGrid__customRenderBody', className, customGridBodyProps === null || customGridBodyProps === void 0 ? void 0 : customGridBodyProps.className)
171
174
  }), headerRow, renderCustomGridBody({
172
175
  visibleColumns: visibleColumns,
173
176
  visibleRowData: visibleRows,
@@ -742,34 +745,42 @@ EuiDataGridBodyCustomRender.propTypes = {
742
745
  gridStyles: PropTypes.shape({
743
746
  /**
744
747
  * Size of fonts used within the row and column cells
748
+ * @default m
745
749
  */
746
750
  fontSize: PropTypes.oneOf(["s", "m", "l"]),
747
751
  /**
748
752
  * Defines the padding with the row and column cells
753
+ * @default m
749
754
  */
750
755
  cellPadding: PropTypes.oneOf(["s", "m", "l"]),
751
756
  /**
752
- * Border uses for the row and column cells
757
+ * Border used for the row and column cells
758
+ * @default all
753
759
  */
754
760
  border: PropTypes.oneOf(["all", "horizontal", "none"]),
755
761
  /**
756
762
  * If set to true, rows will alternate zebra striping for clarity
763
+ * @default false
757
764
  */
758
765
  stripes: PropTypes.bool,
759
766
  /**
760
767
  * Visual style for the column headers. Recommendation is to use the `underline` style in times when #EuiDataGrid `toolbarVisibility` is set to `false`.
768
+ * @default shade
761
769
  */
762
770
  header: PropTypes.oneOf(["shade", "underline"]),
763
771
  /**
764
772
  * Visual style for the column footers.
773
+ * @default overline
765
774
  */
766
775
  footer: PropTypes.oneOf(["shade", "overline", "striped"]),
767
776
  /**
768
777
  * If set to true, the footer row will be sticky
778
+ * @default true
769
779
  */
770
780
  stickyFooter: PropTypes.bool,
771
781
  /**
772
782
  * Will define what visual style to show on row hover
783
+ * @default hover
773
784
  */
774
785
  rowHover: PropTypes.oneOf(["highlight", "none"]),
775
786
  /**
@@ -785,5 +796,6 @@ EuiDataGridBodyCustomRender.propTypes = {
785
796
  gridWidth: PropTypes.number.isRequired,
786
797
  gridRef: PropTypes.any.isRequired,
787
798
  gridItemsRendered: PropTypes.any.isRequired,
788
- wrapperRef: PropTypes.any.isRequired
799
+ wrapperRef: PropTypes.any.isRequired,
800
+ className: PropTypes.string
789
801
  };
@@ -108,7 +108,8 @@ export var EuiDataGridBodyVirtualized = /*#__PURE__*/memo(function (_ref3) {
108
108
  gridWidth = _ref3.gridWidth,
109
109
  gridRef = _ref3.gridRef,
110
110
  gridItemsRendered = _ref3.gridItemsRendered,
111
- wrapperRef = _ref3.wrapperRef;
111
+ wrapperRef = _ref3.wrapperRef,
112
+ className = _ref3.className;
112
113
  /**
113
114
  * Grid refs & observers
114
115
  */
@@ -157,7 +158,8 @@ export var EuiDataGridBodyVirtualized = /*#__PURE__*/memo(function (_ref3) {
157
158
  switchColumnPos: switchColumnPos,
158
159
  sorting: sorting,
159
160
  schema: schema,
160
- schemaDetectors: schemaDetectors
161
+ schemaDetectors: schemaDetectors,
162
+ gridStyles: gridStyles
161
163
  }),
162
164
  headerRow = _useDataGridHeader.headerRow,
163
165
  headerRowHeight = _useDataGridHeader.headerRowHeight;
@@ -172,7 +174,8 @@ export var EuiDataGridBodyVirtualized = /*#__PURE__*/memo(function (_ref3) {
172
174
  columns: columns,
173
175
  columnWidths: columnWidths,
174
176
  defaultColumnWidth: defaultColumnWidth,
175
- schema: schema
177
+ schema: schema,
178
+ gridStyles: gridStyles
176
179
  }),
177
180
  footerRow = _useDataGridFooter.footerRow,
178
181
  footerRowHeight = _useDataGridFooter.footerRowHeight;
@@ -301,7 +304,7 @@ export var EuiDataGridBodyVirtualized = /*#__PURE__*/memo(function (_ref3) {
301
304
  value: rowWrapperContextValue
302
305
  }, ___EmotionJSX(Grid, _extends({}, virtualizationOptions, {
303
306
  ref: gridRef,
304
- className: classNames('euiDataGrid__virtualized', virtualizationOptions === null || virtualizationOptions === void 0 ? void 0 : virtualizationOptions.className),
307
+ className: classNames('euiDataGrid__virtualized', className, virtualizationOptions === null || virtualizationOptions === void 0 ? void 0 : virtualizationOptions.className),
305
308
  onItemsRendered: onItemsRendered,
306
309
  innerElementType: InnerElement,
307
310
  outerRef: outerGridRef,
@@ -882,34 +885,42 @@ EuiDataGridBodyVirtualized.propTypes = {
882
885
  gridStyles: PropTypes.shape({
883
886
  /**
884
887
  * Size of fonts used within the row and column cells
888
+ * @default m
885
889
  */
886
890
  fontSize: PropTypes.oneOf(["s", "m", "l"]),
887
891
  /**
888
892
  * Defines the padding with the row and column cells
893
+ * @default m
889
894
  */
890
895
  cellPadding: PropTypes.oneOf(["s", "m", "l"]),
891
896
  /**
892
- * Border uses for the row and column cells
897
+ * Border used for the row and column cells
898
+ * @default all
893
899
  */
894
900
  border: PropTypes.oneOf(["all", "horizontal", "none"]),
895
901
  /**
896
902
  * If set to true, rows will alternate zebra striping for clarity
903
+ * @default false
897
904
  */
898
905
  stripes: PropTypes.bool,
899
906
  /**
900
907
  * Visual style for the column headers. Recommendation is to use the `underline` style in times when #EuiDataGrid `toolbarVisibility` is set to `false`.
908
+ * @default shade
901
909
  */
902
910
  header: PropTypes.oneOf(["shade", "underline"]),
903
911
  /**
904
912
  * Visual style for the column footers.
913
+ * @default overline
905
914
  */
906
915
  footer: PropTypes.oneOf(["shade", "overline", "striped"]),
907
916
  /**
908
917
  * If set to true, the footer row will be sticky
918
+ * @default true
909
919
  */
910
920
  stickyFooter: PropTypes.bool,
911
921
  /**
912
922
  * Will define what visual style to show on row hover
923
+ * @default hover
913
924
  */
914
925
  rowHover: PropTypes.oneOf(["highlight", "none"]),
915
926
  /**
@@ -925,6 +936,7 @@ EuiDataGridBodyVirtualized.propTypes = {
925
936
  gridWidth: PropTypes.number.isRequired,
926
937
  gridRef: PropTypes.any.isRequired,
927
938
  gridItemsRendered: PropTypes.any.isRequired,
928
- wrapperRef: PropTypes.any.isRequired
939
+ wrapperRef: PropTypes.any.isRequired,
940
+ className: PropTypes.string
929
941
  };
930
942
  EuiDataGridBodyVirtualized.displayName = 'EuiDataGridBodyVirtualized';
@@ -0,0 +1,24 @@
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 } from '../../../../global_styling';
11
+ import { euiDataGridVariables } from '../../data_grid.styles';
12
+ export var euiDataGridFooterStyles = function euiDataGridFooterStyles(euiThemeContext) {
13
+ var euiTheme = euiThemeContext.euiTheme;
14
+ var _euiDataGridVariables = euiDataGridVariables(euiThemeContext),
15
+ levels = _euiDataGridVariables.levels;
16
+ return {
17
+ euiDataGridFooter: /*#__PURE__*/css("display:flex;", logicalCSS('width', 'fit-content'), " background-color:", euiTheme.colors.emptyShade, ";;label:euiDataGridFooter;"),
18
+ sticky: /*#__PURE__*/css("z-index:", levels.stickyHeader, ";position:sticky;", logicalCSS('bottom', 0), ";;label:sticky;"),
19
+ overline: /*#__PURE__*/css(logicalCSS('border-top', "".concat(euiTheme.border.width.thick, " solid ").concat(euiTheme.colors.text)), ";;label:overline;"),
20
+ shade: /*#__PURE__*/css("background-color:", euiTheme.colors.lightestShade, ";;label:shade;"),
21
+ striped: /*#__PURE__*/css(".euiDataGrid--stripes &{background-color:", euiTheme.colors.lightestShade, ";};label:striped;"),
22
+ euiDataGridFooterCell: /*#__PURE__*/css("flex:0 0 auto;font-weight:", euiTheme.font.weight.bold, ";;label:euiDataGridFooterCell;")
23
+ };
24
+ };
@@ -1,4 +1,4 @@
1
- var _excluded = ["leadingControlColumns", "trailingControlColumns", "columns", "schema", "columnWidths", "defaultColumnWidth", "className", "renderCellValue", "renderCellPopover", "rowIndex", "interactiveCellId", "data-test-subj", "visibleRowIndex"];
1
+ var _excluded = ["leadingControlColumns", "trailingControlColumns", "columns", "schema", "columnWidths", "defaultColumnWidth", "className", "renderCellValue", "renderCellPopover", "rowIndex", "interactiveCellId", "data-test-subj", "visibleRowIndex", "gridStyles"];
2
2
  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); }
3
3
  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; }
4
4
  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; }
@@ -10,9 +10,11 @@ function _objectWithoutPropertiesLoose(r, e) { if (null == r) return {}; var t =
10
10
  * Side Public License, v 1.
11
11
  */
12
12
 
13
- import classnames from 'classnames';
14
13
  import React, { forwardRef, memo, useContext } from 'react';
14
+ import classnames from 'classnames';
15
+ import { useEuiMemoizedStyles } from '../../../../services';
15
16
  import { EuiDataGridCell, DataGridCellPopoverContext } from '../cell';
17
+ import { euiDataGridFooterStyles } from './data_grid_footer.styles';
16
18
  import { jsx as ___EmotionJSX } from "@emotion/react";
17
19
  var renderEmpty = function renderEmpty() {
18
20
  return null;
@@ -32,13 +34,15 @@ var EuiDataGridFooterRow = /*#__PURE__*/memo( /*#__PURE__*/forwardRef(function (
32
34
  _dataTestSubj = _ref['data-test-subj'],
33
35
  _ref$visibleRowIndex = _ref.visibleRowIndex,
34
36
  visibleRowIndex = _ref$visibleRowIndex === void 0 ? rowIndex : _ref$visibleRowIndex,
37
+ gridStyles = _ref.gridStyles,
35
38
  rest = _objectWithoutProperties(_ref, _excluded);
36
- var classes = classnames('euiDataGridRow', {
37
- 'euiDataGridRow--striped': visibleRowIndex % 2 !== 0
38
- }, 'euiDataGridFooter', className);
39
+ var styles = useEuiMemoizedStyles(euiDataGridFooterStyles);
40
+ var cssStyles = [styles.euiDataGridFooter, gridStyles.stickyFooter && styles.sticky, gridStyles.footer === 'striped' ? visibleRowIndex % 2 !== 0 && styles.striped : styles[gridStyles.footer]];
41
+ var classes = classnames('euiDataGridFooter', className);
39
42
  var dataTestSubj = classnames('dataGridRow', 'dataGridFooterRow', _dataTestSubj);
40
43
  var popoverContext = useContext(DataGridCellPopoverContext);
41
44
  var sharedCellProps = {
45
+ css: styles.euiDataGridFooterCell,
42
46
  rowIndex: rowIndex,
43
47
  visibleRowIndex: visibleRowIndex,
44
48
  interactiveCellId: interactiveCellId,
@@ -47,6 +51,7 @@ var EuiDataGridFooterRow = /*#__PURE__*/memo( /*#__PURE__*/forwardRef(function (
47
51
  return ___EmotionJSX("div", _extends({
48
52
  ref: ref,
49
53
  role: "row",
54
+ css: cssStyles,
50
55
  className: classes,
51
56
  "data-test-subj": dataTestSubj
52
57
  }, rest), leadingControlColumns.map(function (_ref2, i) {
@@ -216,8 +216,15 @@ export var getSortColumnActions = function getSortColumnActions(_ref4) {
216
216
  var onClickSortAsc = function onClickSortAsc() {
217
217
  sortBy('asc');
218
218
  };
219
+ var isSorted = sortingIdx >= 0 && sorting.columns[sortingIdx].direction === 'asc';
219
220
  var action = {
220
- label: ___EmotionJSX(EuiI18n, {
221
+ label: isSorted ? ___EmotionJSX(EuiI18n, {
222
+ token: "euiColumnActions.unsort",
223
+ default: "Unsort {schemaLabel}",
224
+ values: {
225
+ schemaLabel: label
226
+ }
227
+ }) : ___EmotionJSX(EuiI18n, {
221
228
  token: "euiColumnActions.sort",
222
229
  default: "Sort {schemaLabel}",
223
230
  values: {
@@ -226,7 +233,6 @@ export var getSortColumnActions = function getSortColumnActions(_ref4) {
226
233
  }),
227
234
  onClick: onClickSortAsc,
228
235
  isDisabled: column.isSortable === false,
229
- className: sortingIdx >= 0 && sorting.columns[sortingIdx].direction === 'asc' ? 'euiDataGridHeader__action--selected' : '',
230
236
  iconType: 'sortUp',
231
237
  size: 'xs',
232
238
  color: 'text'
@@ -238,8 +244,15 @@ export var getSortColumnActions = function getSortColumnActions(_ref4) {
238
244
  var onClickSortDesc = function onClickSortDesc() {
239
245
  sortBy('desc');
240
246
  };
247
+ var _isSorted = sortingIdx >= 0 && sorting.columns[sortingIdx].direction === 'desc';
241
248
  var _action2 = {
242
- label: ___EmotionJSX(EuiI18n, {
249
+ label: _isSorted ? ___EmotionJSX(EuiI18n, {
250
+ token: "euiColumnActions.unsort",
251
+ default: "Unsort {schemaLabel}",
252
+ values: {
253
+ schemaLabel: _label
254
+ }
255
+ }) : ___EmotionJSX(EuiI18n, {
243
256
  token: "euiColumnActions.sort",
244
257
  default: "Sort {schemaLabel}",
245
258
  values: {
@@ -248,7 +261,6 @@ export var getSortColumnActions = function getSortColumnActions(_ref4) {
248
261
  }),
249
262
  onClick: onClickSortDesc,
250
263
  isDisabled: column.isSortable === false,
251
- className: sortingIdx >= 0 && sorting.columns[sortingIdx].direction === 'desc' ? 'euiDataGridHeader__action--selected' : '',
252
264
  iconType: 'sortDown',
253
265
  size: 'xs',
254
266
  color: 'text'