@elastic/eui 95.10.1 → 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 -924
  2. package/dist/eui_theme_dark.min.css +1 -1
  3. package/dist/eui_theme_light.css +0 -924
  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 -221
  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,111 @@
1
+ "use strict";
2
+
3
+ Object.defineProperty(exports, "__esModule", {
4
+ value: true
5
+ });
6
+ exports.euiDataGridRowCellStyles = exports.euiDataGridCellOutlineStyles = exports.euiDataGridCellOutlineSelectors = void 0;
7
+ var _react = require("@emotion/react");
8
+ var _global_styling = require("../../../../global_styling");
9
+ 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)."; } /*
10
+ * Copyright Elasticsearch B.V. and/or licensed to Elasticsearch B.V. under one
11
+ * or more contributor license agreements. Licensed under the Elastic License
12
+ * 2.0 and the Server Side Public License, v 1; you may not use this file except
13
+ * in compliance with, at your election, the Elastic License 2.0 or the Server
14
+ * Side Public License, v 1.
15
+ */
16
+ var euiDataGridCellOutlineStyles = exports.euiDataGridCellOutlineStyles = function euiDataGridCellOutlineStyles(_ref2) {
17
+ var euiTheme = _ref2.euiTheme;
18
+ var focusColor = euiTheme.colors.primary;
19
+ var hoverColor = euiTheme.colors.darkShade;
20
+ var outlineWidth = euiTheme.border.width.thick;
21
+ var borderRadius = (0, _global_styling.mathWithUnits)(euiTheme.border.radius.medium, function (x) {
22
+ return x / 2;
23
+ });
24
+
25
+ // Note: We use a pseudo element for the 'outline' over any other CSS approaches
26
+ // (outline, border, box-shadow) because it gives us the most control and reduces
27
+ // overlap with other cells or inner elements
28
+ return {
29
+ borderRadius: borderRadius,
30
+ focusColor: focusColor,
31
+ focusStyles: "\n /* Remove outline as we're handling it manually. Needed to override global styles */\n &:focus-visible {\n outline: none;\n }\n\n &::after {\n content: '';\n /* We want this to be visually on top of cell content but not interactive */\n z-index: 2;\n pointer-events: none;\n position: absolute;\n inset: 0;\n border: ".concat(outlineWidth, " solid ").concat(focusColor, ";\n border-radius: ").concat(borderRadius, ";\n }\n "),
32
+ hoverColor: hoverColor,
33
+ hoverStyles: "\n &::after {\n border-color: ".concat(hoverColor, ";\n }\n ")
34
+ };
35
+ };
36
+ var euiDataGridCellOutlineSelectors = exports.euiDataGridCellOutlineSelectors = function euiDataGridCellOutlineSelectors() {
37
+ var parentSelector = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : '&';
38
+ // Focus selectors
39
+ var focus = ':focus'; // cell has been clicked or keyboard navigated to
40
+ var isOpen = '.euiDataGridRowCell--open'; // always show when the cell expansion popover is open
41
+ var isClosing = '[data-keyboard-closing]'; // prevents the animation from replaying when keyboard focus is moved from the popover back to the cell
42
+ var isEntered = ':has([data-focus-lock-disabled="false"])'; // cell focus trap has been entered - ideally show the outline still, but grayed out
43
+
44
+ // Hover selectors
45
+ var hover = ':hover'; // hover styles should not supercede focus styles
46
+ var focusWithin = ':focus-within'; // used by :hover:not() to prevent flash of gray when mouse users are opening/closing the expansion popover via cell action click
47
+
48
+ // Cell header specific selectors
49
+ var headerActionsOpen = '.euiDataGridHeaderCell--isActionsPopoverOpen';
50
+
51
+ // Utils
52
+ var selectors = function selectors() {
53
+ for (var _len = arguments.length, args = new Array(_len), _key = 0; _key < _len; _key++) {
54
+ args[_key] = arguments[_key];
55
+ }
56
+ return [].concat(args).join(', ');
57
+ };
58
+ var is = function is(selectors) {
59
+ return "".concat(parentSelector, ":is(").concat(selectors, ")");
60
+ };
61
+ var not = function not(selectors) {
62
+ return "".concat(parentSelector, ":not(").concat(selectors, ")");
63
+ };
64
+ var hoverNot = function hoverNot(selectors) {
65
+ return "".concat(parentSelector, ":hover:not(").concat(selectors, ")");
66
+ };
67
+ var _ = function _(selectors) {
68
+ return "".concat(parentSelector).concat(selectors);
69
+ };
70
+ return {
71
+ outline: {
72
+ show: is(selectors(hover, focus, isOpen, isEntered)),
73
+ hover: hoverNot(selectors(focus, focusWithin, isOpen)),
74
+ focusTrapped: _(isEntered)
75
+ },
76
+ actions: {
77
+ hoverZone: hoverNot(selectors(focus, isOpen)),
78
+ hoverColor: hoverNot(selectors(focus, focusWithin, isOpen)),
79
+ showAnimation: is(selectors(hover, focus, isOpen, isClosing)),
80
+ hoverAnimation: hoverNot(selectors(focus, isOpen, isClosing))
81
+ },
82
+ header: {
83
+ focus: is(selectors(focus, focusWithin, headerActionsOpen)),
84
+ // :focus-within here is primarily intended for when the column actions button has been clicked twice
85
+ focusTrapped: _(isEntered),
86
+ hideActions: not(selectors(hover, focusWithin, headerActionsOpen))
87
+ }
88
+ };
89
+ };
90
+ var _ref = process.env.NODE_ENV === "production" ? {
91
+ name: "12y9ria-euiDataGridRowCell__content",
92
+ styles: "overflow:hidden;label:euiDataGridRowCell__content;"
93
+ } : {
94
+ name: "12y9ria-euiDataGridRowCell__content",
95
+ styles: "overflow:hidden;label:euiDataGridRowCell__content;",
96
+ toString: _EMOTION_STRINGIFIED_CSS_ERROR__
97
+ };
98
+ var euiDataGridRowCellStyles = exports.euiDataGridRowCellStyles = function euiDataGridRowCellStyles(euiThemeContext) {
99
+ var cellOutline = euiDataGridCellOutlineStyles(euiThemeContext);
100
+ var _euiDataGridCellOutli = euiDataGridCellOutlineSelectors(),
101
+ outlineSelectors = _euiDataGridCellOutli.outline;
102
+ return {
103
+ euiDataGridRowCell: /*#__PURE__*/(0, _react.css)("position:relative;", outlineSelectors.show, "{", cellOutline.focusStyles, ";}", outlineSelectors.hover, "{", cellOutline.hoverStyles, ";}", outlineSelectors.focusTrapped, "{", cellOutline.hoverStyles, ";}&>[data-focus-lock-disabled]{", (0, _global_styling.logicalCSS)('height', '100%'), ";}&:where(.euiDataGridRowCell--numeric, .euiDataGridRowCell--currency){", (0, _global_styling.logicalTextAlignCSS)('right'), ";}&:where(.euiDataGridRowCell--uppercase){text-transform:uppercase;}&:where(.euiDataGridRowCell--lowercase){text-transform:lowercase;}&:where(.euiDataGridRowCell--capitalize){text-transform:capitalize;};label:euiDataGridRowCell;"),
104
+ content: {
105
+ euiDataGridRowCell__content: _ref,
106
+ controlColumn: /*#__PURE__*/(0, _react.css)((0, _global_styling.logicalCSS)('max-height', '100%'), " display:flex;align-items:center;;label:controlColumn;"),
107
+ autoHeight: /*#__PURE__*/(0, _react.css)((0, _global_styling.logicalCSS)('height', 'auto'), ";;label:autoHeight;"),
108
+ defaultHeight: /*#__PURE__*/(0, _react.css)((0, _global_styling.logicalCSS)('height', '100%'), ";;label:defaultHeight;")
109
+ }
110
+ };
111
+ };
@@ -10,11 +10,13 @@ var _toConsumableArray2 = _interopRequireDefault(require("@babel/runtime/helpers
10
10
  var _slicedToArray2 = _interopRequireDefault(require("@babel/runtime/helpers/slicedToArray"));
11
11
  var _extends2 = _interopRequireDefault(require("@babel/runtime/helpers/extends"));
12
12
  var _react = _interopRequireWildcard(require("react"));
13
+ var _services = require("../../../../services");
13
14
  var _i18n = require("../../../i18n");
14
15
  var _button_icon = require("../../../button/button_icon");
15
16
  var _button_empty = require("../../../button/button_empty");
16
17
  var _flex = require("../../../flex");
17
18
  var _popover = require("../../../popover");
19
+ var _data_grid_cell_actions = require("./data_grid_cell_actions.styles");
18
20
  var _react2 = require("@emotion/react");
19
21
  function _getRequireWildcardCache(e) { if ("function" != typeof WeakMap) return null; var r = new WeakMap(), t = new WeakMap(); return (_getRequireWildcardCache = function _getRequireWildcardCache(e) { return e ? t : r; })(e); }
20
22
  function _interopRequireWildcard(e, r) { if (!r && e && e.__esModule) return e; if (null === e || "object" != _typeof(e) && "function" != typeof e) return { default: e }; var t = _getRequireWildcardCache(r); if (t && t.has(e)) return t.get(e); var n = { __proto__: null }, a = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var u in e) if ("default" !== u && {}.hasOwnProperty.call(e, u)) { var i = a ? Object.getOwnPropertyDescriptor(e, u) : null; i && (i.get || i.set) ? Object.defineProperty(n, u, i) : n[u] = e[u]; } return n.default = e, t && t.set(e, n), n; }
@@ -32,6 +34,8 @@ var EuiDataGridCellActions = exports.EuiDataGridCellActions = function EuiDataGr
32
34
  column = _ref.column,
33
35
  rowIndex = _ref.rowIndex,
34
36
  colIndex = _ref.colIndex;
37
+ var styles = (0, _services.useEuiMemoizedStyles)(_data_grid_cell_actions.euiDataGridCellActionsStyles);
38
+
35
39
  // Note: The cell expand button/expansion popover is *always* rendered if
36
40
  // column.cellActions is present (regardless of column.isExpandable).
37
41
  // This is because cell actions are not otherwise accessible to keyboard
@@ -43,6 +47,7 @@ var EuiDataGridCellActions = exports.EuiDataGridCellActions = function EuiDataGr
43
47
  default: "Click or hit enter to interact with cell content"
44
48
  }, function (expandButtonTitle) {
45
49
  return (0, _react2.jsx)(_button_icon.EuiButtonIcon, {
50
+ css: styles.euiDataGridRowCell__actionButtonIcon,
46
51
  className: "euiDataGridRowCell__actionButtonIcon euiDataGridRowCell__expandCell",
47
52
  "data-test-subj": "euiDataGridCellExpandButton",
48
53
  display: "fill",
@@ -54,12 +59,13 @@ var EuiDataGridCellActions = exports.EuiDataGridCellActions = function EuiDataGr
54
59
  title: expandButtonTitle
55
60
  });
56
61
  });
57
- }, [onExpandClick]);
62
+ }, [onExpandClick, styles]);
58
63
  var additionalButtons = (0, _react.useMemo)(function () {
59
64
  if (!column || !Array.isArray(column === null || column === void 0 ? void 0 : column.cellActions)) return [];
60
65
  var ButtonComponent = function ButtonComponent(props) {
61
66
  return (0, _react2.jsx)(_button_icon.EuiButtonIcon, (0, _extends2.default)({}, props, {
62
67
  "aria-hidden": true,
68
+ css: styles.euiDataGridRowCell__actionButtonIcon,
63
69
  className: "euiDataGridRowCell__actionButtonIcon"
64
70
  // Don't allow consumers to override sizes or colors for cell actions on hover/focus
65
71
  ,
@@ -84,8 +90,12 @@ var EuiDataGridCellActions = exports.EuiDataGridCellActions = function EuiDataGr
84
90
  isExpanded: false
85
91
  });
86
92
  });
87
- }, [column, colIndex, rowIndex]);
88
- return (0, _react2.jsx)(_react.default.Fragment, null, (0, _react2.jsx)("div", {
93
+ }, [column, colIndex, rowIndex, styles]);
94
+ return (0, _react2.jsx)("div", {
95
+ css: styles.euiDataGridRowCell__actionsWrapper,
96
+ className: "euiDataGridRowCell__actionsWrapper"
97
+ }, (0, _react2.jsx)("div", {
98
+ css: styles.euiDataGridRowCell__actions,
89
99
  className: "euiDataGridRowCell__actions"
90
100
  }, [].concat((0, _toConsumableArray2.default)(additionalButtons), [expandButton])), (0, _react2.jsx)("div", {
91
101
  ref: popoverAnchorRef,
@@ -0,0 +1,39 @@
1
+ "use strict";
2
+
3
+ var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefault");
4
+ Object.defineProperty(exports, "__esModule", {
5
+ value: true
6
+ });
7
+ exports.euiDataGridCellActionsStyles = void 0;
8
+ var _taggedTemplateLiteral2 = _interopRequireDefault(require("@babel/runtime/helpers/taggedTemplateLiteral"));
9
+ var _react = require("@emotion/react");
10
+ var _global_styling = require("../../../../global_styling");
11
+ var _data_grid = require("../../data_grid.styles");
12
+ var _data_grid_cell = require("./data_grid_cell.styles");
13
+ var _templateObject;
14
+ /*
15
+ * Copyright Elasticsearch B.V. and/or licensed to Elasticsearch B.V. under one
16
+ * or more contributor license agreements. Licensed under the Elastic License
17
+ * 2.0 and the Server Side Public License, v 1; you may not use this file except
18
+ * in compliance with, at your election, the Elastic License 2.0 or the Server
19
+ * Side Public License, v 1.
20
+ */
21
+ var euiDataGridCellActionsStyles = exports.euiDataGridCellActionsStyles = function euiDataGridCellActionsStyles(euiThemeContext) {
22
+ var euiTheme = euiThemeContext.euiTheme;
23
+ var _euiDataGridVariables = (0, _data_grid.euiDataGridVariables)(euiThemeContext),
24
+ levels = _euiDataGridVariables.levels;
25
+ var borderWidth = euiTheme.border.width.thin;
26
+ var cellOutline = (0, _data_grid_cell.euiDataGridCellOutlineStyles)(euiThemeContext);
27
+ var _euiDataGridCellOutli = (0, _data_grid_cell.euiDataGridCellOutlineSelectors)('.euiDataGridRowCell'),
28
+ cellSelectors = _euiDataGridCellOutli.actions;
29
+ return {
30
+ euiDataGridRowCell__actionsWrapper: /*#__PURE__*/(0, _react.css)("position:absolute;", (0, _global_styling.logicalCSS)('left', 0), " ", (0, _global_styling.logicalCSS)('bottom', '100%'), "z-index:", levels.stickyHeader - 1, ";.euiDataGridRowCell[data-gridcell-visible-row-index='0']>&{z-index:", levels.stickyHeader + 1, ";}", cellSelectors.hoverZone, " &{", (0, _global_styling.logicalCSS)('min-width', '50%'), " ", (0, _global_styling.logicalCSS)('padding-right', euiTheme.size.base), ";};label:euiDataGridRowCell__actionsWrapper;"),
31
+ euiDataGridRowCell__actions: /*#__PURE__*/(0, _react.css)("position:relative;display:flex;gap:", euiTheme.size.xxs, ";", (0, _global_styling.logicalCSS)('width', 'fit-content'), " padding-inline:", euiTheme.size.xxs, ";", (0, _global_styling.logicalCSS)('margin-bottom', "-".concat(borderWidth)), " background-color:", cellOutline.focusColor, ";color:", euiTheme.colors.emptyShade, ";border:", borderWidth, " solid ", cellOutline.focusColor, ";border-radius:", cellOutline.borderRadius, ";", (0, _global_styling.logicalCSS)('border-bottom-left-radius', 0), "&::after{content:'';position:absolute;", (0, _global_styling.logicalCSS)('top', '100%'), " ", (0, _global_styling.logicalCSS)('left', "-".concat(borderWidth)), " ", (0, _global_styling.logicalSizeCSS)((0, _global_styling.mathWithUnits)(borderWidth, function (x) {
32
+ return x * 2;
33
+ })), " background-color:inherit;}", cellSelectors.hoverColor, " &{background-color:", cellOutline.hoverColor, ";border-color:", cellOutline.hoverColor, ";}", _global_styling.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;"),
34
+ euiDataGridRowCell__actionButtonIcon: /*#__PURE__*/(0, _react.css)((0, _global_styling.logicalCSS)('width', euiTheme.size.base), " ", (0, _global_styling.logicalCSS)('height', (0, _global_styling.mathWithUnits)([euiTheme.size.base, euiTheme.size.xs], function (x, y) {
35
+ return x + y;
36
+ })), " border-radius:0;&,svg{background-color:transparent!important;color:currentColor!important;fill:currentColor!important;}&.euiDataGridRowCell__expandCell .euiIcon{", (0, _global_styling.logicalCSS)('width', '120%'), " ", (0, _global_styling.logicalCSS)('height', '100%'), ";};label:euiDataGridRowCell__actionButtonIcon;")
37
+ };
38
+ };
39
+ var slideUp = (0, _react.keyframes)(_templateObject || (_templateObject = (0, _taggedTemplateLiteral2.default)(["\n from { transform: scaleY(0); }\n to { transform: scaleY(1); }\n"])));
@@ -13,6 +13,8 @@ var _react = _interopRequireWildcard(require("react"));
13
13
  var _classnames = _interopRequireDefault(require("classnames"));
14
14
  var _services = require("../../../../services");
15
15
  var _popover = require("../../../popover");
16
+ var _data_grid = require("../../data_grid.styles");
17
+ var _data_grid_cell_popover = require("./data_grid_cell_popover.styles");
16
18
  var _text = require("../../../text");
17
19
  var _code = require("../../../code");
18
20
  var _react2 = require("@emotion/react");
@@ -95,25 +97,23 @@ var useCellPopover = exports.useCellPopover = function useCellPopover() {
95
97
  // popover button isn't actually the DOM node we pass to `button`. Otherwise,
96
98
  // clicking the expansion cell action triggers an outside click
97
99
  var onClickOutside = (0, _react.useCallback)(function (event) {
98
- var _popoverAnchor$parent;
99
- 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;
100
+ var cellActions = popoverAnchor === null || popoverAnchor === void 0 ? void 0 : popoverAnchor.closest('.euiDataGridRowCell__actionsWrapper');
100
101
  if (!(cellActions !== null && cellActions !== void 0 && cellActions.contains(event.target))) {
101
102
  closeCellPopover();
102
103
  }
103
104
  }, [popoverAnchor, closeCellPopover]);
104
105
  var onKeyDown = (0, _react.useCallback)(function (event) {
105
106
  if (event.key === _services.keys.F2 || event.key === _services.keys.ESCAPE) {
106
- var _popoverAnchor$parent2;
107
107
  event.preventDefault();
108
108
  event.stopPropagation();
109
109
  closeCellPopover();
110
- 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;
110
+ var cell = popoverAnchor === null || popoverAnchor === void 0 ? void 0 : popoverAnchor.closest('.euiDataGridRowCell');
111
111
 
112
112
  // Prevent cell animation flash while focus is being shifted between popover and cell
113
113
  cell === null || cell === void 0 || cell.setAttribute('data-keyboard-closing', 'true');
114
114
  // Ensure focus is returned to the parent cell, and remove animation stopgap
115
115
  requestAnimationFrame(function () {
116
- popoverAnchor === null || popoverAnchor === void 0 || popoverAnchor.parentElement.focus();
116
+ cell === null || cell === void 0 || cell.focus();
117
117
  cell === null || cell === void 0 || cell.removeAttribute('data-keyboard-closing');
118
118
  });
119
119
  }
@@ -130,36 +130,45 @@ var useCellPopover = exports.useCellPopover = function useCellPopover() {
130
130
  setCellPopoverProps: setCellPopoverProps
131
131
  };
132
132
  }, [popoverIsOpen, closeCellPopover, openCellPopover, cellLocation]);
133
+ var styles = (0, _services.useEuiMemoizedStyles)(_data_grid_cell_popover.euiDataGridCellPopoverStyles);
134
+ var _useEuiMemoizedStyles = (0, _services.useEuiMemoizedStyles)(_data_grid.euiDataGridVariables),
135
+ levels = _useEuiMemoizedStyles.levels;
133
136
  var cellPopover = (0, _react.useMemo)(function () {
134
- var _cellPopoverProps$pan;
137
+ var _cellPopoverProps$pan, _cell$offsetWidth;
135
138
  if (!popoverIsOpen || !popoverAnchor) return null;
139
+ var cell = popoverAnchor.closest('.euiDataGridRowCell');
136
140
 
137
141
  // Note that this popover is rendered once at the top grid level, rather than one popover per cell
138
142
  return (0, _react2.jsx)(_popover.EuiWrappingPopover, (0, _extends2.default)({
139
143
  isOpen: popoverIsOpen,
140
144
  display: "block",
141
145
  hasArrow: false,
146
+ attachToAnchor: true // required for https://github.com/elastic/eui/issues/6151
147
+ ,
142
148
  panelPaddingSize: "s",
143
149
  anchorPosition: popoverAnchorPosition,
144
- repositionToCrossAxis: false
150
+ repositionToCrossAxis: false,
151
+ zIndex: levels.cellPopover
145
152
  }, cellPopoverProps, {
146
153
  focusTrapProps: {
147
154
  onClickOutside: onClickOutside,
148
155
  clickOutsideDisables: false
149
156
  },
150
- panelProps: _objectSpread({
157
+ panelProps: _objectSpread(_objectSpread({
151
158
  'data-test-subj': 'euiDataGridExpansionPopover'
152
- }, cellPopoverProps.panelProps || {}),
159
+ }, cellPopoverProps.panelProps || {}), {}, {
160
+ css: [styles.euiDataGridRowCell__popover, cellPopoverProps.css]
161
+ }),
153
162
  panelClassName: (0, _classnames.default)('euiDataGridRowCell__popover', cellPopoverProps.panelClassName, (_cellPopoverProps$pan = cellPopoverProps.panelProps) === null || _cellPopoverProps$pan === void 0 ? void 0 : _cellPopoverProps$pan.className),
154
163
  panelStyle: {
155
- maxInlineSize: "min(75vw, max(".concat(popoverAnchor.parentElement.offsetWidth, "px, 400px))"),
164
+ 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))"),
156
165
  maxBlockSize: '50vh'
157
166
  },
158
167
  onKeyDown: onKeyDown,
159
168
  button: popoverAnchor,
160
169
  closePopover: closeCellPopover
161
170
  }), popoverContent);
162
- }, [popoverIsOpen, popoverAnchor, popoverContent, cellPopoverProps, closeCellPopover, onClickOutside, onKeyDown, popoverAnchorPosition]);
171
+ }, [styles, levels.cellPopover, popoverIsOpen, popoverAnchor, popoverContent, cellPopoverProps, closeCellPopover, onClickOutside, onKeyDown, popoverAnchorPosition]);
163
172
  return (0, _react.useMemo)(function () {
164
173
  return {
165
174
  cellPopoverContext: cellPopoverContext,
@@ -0,0 +1,25 @@
1
+ "use strict";
2
+
3
+ var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefault");
4
+ Object.defineProperty(exports, "__esModule", {
5
+ value: true
6
+ });
7
+ exports.euiDataGridCellPopoverStyles = void 0;
8
+ var _taggedTemplateLiteral2 = _interopRequireDefault(require("@babel/runtime/helpers/taggedTemplateLiteral"));
9
+ var _react = require("@emotion/react");
10
+ var _global_styling = require("../../../../global_styling");
11
+ var _templateObject;
12
+ /*
13
+ * Copyright Elasticsearch B.V. and/or licensed to Elasticsearch B.V. under one
14
+ * or more contributor license agreements. Licensed under the Elastic License
15
+ * 2.0 and the Server Side Public License, v 1; you may not use this file except
16
+ * in compliance with, at your election, the Elastic License 2.0 or the Server
17
+ * Side Public License, v 1.
18
+ */
19
+ var euiDataGridCellPopoverStyles = exports.euiDataGridCellPopoverStyles = function euiDataGridCellPopoverStyles(euiThemeContext) {
20
+ var euiTheme = euiThemeContext.euiTheme;
21
+ return {
22
+ euiDataGridRowCell__popover: /*#__PURE__*/(0, _react.css)((0, _global_styling.euiScrollBarStyles)(euiThemeContext), " overflow:auto;", _global_styling.euiCanAnimate, "{animation-duration:", euiTheme.animation.normal, ";animation-name:", fadeIn, ";};label:euiDataGridRowCell__popover;")
23
+ };
24
+ };
25
+ var fadeIn = (0, _react.keyframes)(_templateObject || (_templateObject = (0, _taggedTemplateLiteral2.default)(["\n from { opacity: 0; }\n to { opacity: 1; }\n"])));
@@ -9,11 +9,10 @@ exports.HandleInteractiveChildren = exports.FocusTrappedChildren = void 0;
9
9
  var _slicedToArray2 = _interopRequireDefault(require("@babel/runtime/helpers/slicedToArray"));
10
10
  var _react = _interopRequireWildcard(require("react"));
11
11
  var _tabbable = require("tabbable");
12
+ var _classnames = _interopRequireDefault(require("classnames"));
12
13
  var _services = require("../../../../services");
13
- var _accessibility = require("../../../../services/accessibility");
14
14
  var _utils = require("../../../../utils");
15
15
  var _focus_trap = require("../../../focus_trap");
16
- var _accessibility2 = require("../../../accessibility");
17
16
  var _i18n = require("../../../i18n");
18
17
  var _react2 = require("@emotion/react");
19
18
  function _getRequireWildcardCache(e) { if ("function" != typeof WeakMap) return null; var r = new WeakMap(), t = new WeakMap(); return (_getRequireWildcardCache = function _getRequireWildcardCache(e) { return e ? t : r; })(e); }
@@ -96,20 +95,22 @@ var FocusTrappedChildren = exports.FocusTrappedChildren = function FocusTrappedC
96
95
  _useState6 = (0, _slicedToArray2.default)(_useState5, 2),
97
96
  isExited = _useState6[0],
98
97
  setExited = _useState6[1];
99
- var keyboardHintAriaId = (0, _accessibility.useGeneratedHtmlId)({
100
- prefix: 'euiDataGridCellHeader',
101
- suffix: 'keyboardHint'
102
- });
103
- var exitedHintAriaId = (0, _accessibility.useGeneratedHtmlId)({
104
- prefix: 'euiDataGridCellHeader',
105
- suffix: 'exited'
98
+ var ariaDescribedById = (0, _services.useGeneratedHtmlId)({
99
+ suffix: 'focusTrapHint'
106
100
  });
107
101
 
108
102
  // direct DOM manipulation as workaround to attach required hints
109
103
  (0, _react.useEffect)(function () {
110
104
  var currentAriaDescribedbyId = cellEl.getAttribute('aria-describedby');
111
- cellEl.setAttribute('aria-describedby', "".concat(currentAriaDescribedbyId, " ").concat(exitedHintAriaId, " ").concat(keyboardHintAriaId, " "));
112
- }, [cellEl, keyboardHintAriaId, exitedHintAriaId]);
105
+ cellEl.setAttribute('aria-describedby', (0, _classnames.default)(currentAriaDescribedbyId, ariaDescribedById));
106
+ return function () {
107
+ if (currentAriaDescribedbyId) {
108
+ cellEl.setAttribute('aria-descibedby', currentAriaDescribedbyId);
109
+ } else {
110
+ cellEl.removeAttribute('aria-describedby');
111
+ }
112
+ };
113
+ }, [cellEl, ariaDescribedById]);
113
114
  (0, _react.useEffect)(function () {
114
115
  if (isCellEntered) {
115
116
  enableAndFocusInteractives(cellEl);
@@ -163,23 +164,20 @@ var FocusTrappedChildren = exports.FocusTrappedChildren = function FocusTrappedC
163
164
  onDeactivation: function onDeactivation() {
164
165
  return setIsCellEntered(false);
165
166
  }
166
- }, children, (0, _react2.jsx)(_accessibility2.EuiScreenReaderOnly, null, (0, _react2.jsx)("p", {
167
- id: exitedHintAriaId,
168
- "aria-hidden": "true"
167
+ }, children, (0, _react2.jsx)("p", {
168
+ id: ariaDescribedById,
169
+ hidden: true
169
170
  }, isExited && (0, _react2.jsx)(_i18n.EuiI18n
170
171
  // eslint-disable-next-line local/i18n
171
172
  , {
172
173
  token: "euiDataGridCell.focusTrapExitPrompt",
173
174
  default: "Exited cell content."
174
- }))), (0, _react2.jsx)(_accessibility2.EuiScreenReaderOnly, null, (0, _react2.jsx)("p", {
175
- id: keyboardHintAriaId,
176
- "aria-hidden": "true"
177
- }, !isCellEntered && (0, _react2.jsx)(_i18n.EuiI18n
175
+ }), !isCellEntered && (0, _react2.jsx)(_i18n.EuiI18n
178
176
  // eslint-disable-next-line local/i18n
179
177
  , {
180
178
  token: "euiDataGridCell.focusTrapEnterPrompt",
181
179
  default: "Press the Enter key to interact with this cell's contents."
182
- }))));
180
+ })));
183
181
  };
184
182
 
185
183
  /**
@@ -8,8 +8,10 @@ exports.EuiDataGridBody = void 0;
8
8
  var _extends2 = _interopRequireDefault(require("@babel/runtime/helpers/extends"));
9
9
  var _objectWithoutProperties2 = _interopRequireDefault(require("@babel/runtime/helpers/objectWithoutProperties"));
10
10
  var _react = _interopRequireDefault(require("react"));
11
+ var _services = require("../../../services");
11
12
  var _data_grid_body_virtualized = require("./data_grid_body_virtualized");
12
13
  var _data_grid_body_custom = require("./data_grid_body_custom");
14
+ var _data_grid_body = require("./data_grid_body.styles");
13
15
  var _react2 = require("@emotion/react");
14
16
  var _excluded = ["renderCustomGridBody"];
15
17
  /*
@@ -27,7 +29,12 @@ var EuiDataGridBody = exports.EuiDataGridBody = function EuiDataGridBody(_ref) {
27
29
  * + virtualization library for rendering content, or if consumers have
28
30
  * passed their own custom renderer
29
31
  */
32
+ var styles = (0, _services.useEuiMemoizedStyles)(_data_grid_body.euiDataGridBodyStyles);
33
+ var cssStyles = [styles.euiDataGridBody, renderCustomGridBody ? styles.customRender : styles.virtualized];
30
34
  return renderCustomGridBody ? (0, _react2.jsx)(_data_grid_body_custom.EuiDataGridBodyCustomRender, (0, _extends2.default)({
31
- renderCustomGridBody: renderCustomGridBody
32
- }, props)) : (0, _react2.jsx)(_data_grid_body_virtualized.EuiDataGridBodyVirtualized, props);
35
+ renderCustomGridBody: renderCustomGridBody,
36
+ css: cssStyles
37
+ }, props)) : (0, _react2.jsx)(_data_grid_body_virtualized.EuiDataGridBodyVirtualized, (0, _extends2.default)({
38
+ css: cssStyles
39
+ }, props));
33
40
  };
@@ -0,0 +1,30 @@
1
+ "use strict";
2
+
3
+ Object.defineProperty(exports, "__esModule", {
4
+ value: true
5
+ });
6
+ exports.euiDataGridBodyStyles = void 0;
7
+ var _react = require("@emotion/react");
8
+ var _global_styling = require("../../../global_styling");
9
+ 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)."; } /*
10
+ * Copyright Elasticsearch B.V. and/or licensed to Elasticsearch B.V. under one
11
+ * or more contributor license agreements. Licensed under the Elastic License
12
+ * 2.0 and the Server Side Public License, v 1; you may not use this file except
13
+ * in compliance with, at your election, the Elastic License 2.0 or the Server
14
+ * Side Public License, v 1.
15
+ */
16
+ var _ref = process.env.NODE_ENV === "production" ? {
17
+ name: "jawla0-virtualized",
18
+ styles: "scroll-padding:0;label:virtualized;"
19
+ } : {
20
+ name: "jawla0-virtualized",
21
+ styles: "scroll-padding:0;label:virtualized;",
22
+ toString: _EMOTION_STRINGIFIED_CSS_ERROR__
23
+ };
24
+ var euiDataGridBodyStyles = exports.euiDataGridBodyStyles = function euiDataGridBodyStyles(euiThemeContext) {
25
+ return {
26
+ euiDataGridBody: /*#__PURE__*/(0, _react.css)((0, _global_styling.euiScrollBarStyles)(euiThemeContext), ";;label:euiDataGridBody;"),
27
+ virtualized: _ref,
28
+ customRender: /*#__PURE__*/(0, _react.css)((0, _global_styling.logicalSizeCSS)('100%'), " overflow:auto;;label:customRender;")
29
+ };
30
+ };
@@ -52,7 +52,8 @@ var EuiDataGridBodyCustomRender = exports.EuiDataGridBodyCustomRender = function
52
52
  pagination = _ref.pagination,
53
53
  rowHeightsOptions = _ref.rowHeightsOptions,
54
54
  gridWidth = _ref.gridWidth,
55
- gridStyles = _ref.gridStyles;
55
+ gridStyles = _ref.gridStyles,
56
+ className = _ref.className;
56
57
  /**
57
58
  * Columns & widths
58
59
  */
@@ -101,7 +102,8 @@ var EuiDataGridBodyCustomRender = exports.EuiDataGridBodyCustomRender = function
101
102
  switchColumnPos: switchColumnPos,
102
103
  sorting: sorting,
103
104
  schema: schema,
104
- schemaDetectors: schemaDetectors
105
+ schemaDetectors: schemaDetectors,
106
+ gridStyles: gridStyles
105
107
  }),
106
108
  headerRow = _useDataGridHeader.headerRow;
107
109
  var _useDataGridFooter = (0, _footer.useDataGridFooter)({
@@ -115,7 +117,8 @@ var EuiDataGridBodyCustomRender = exports.EuiDataGridBodyCustomRender = function
115
117
  columns: columns,
116
118
  columnWidths: columnWidths,
117
119
  defaultColumnWidth: defaultColumnWidth,
118
- schema: schema
120
+ schema: schema,
121
+ gridStyles: gridStyles
119
122
  }),
120
123
  footerRow = _useDataGridFooter.footerRow;
121
124
 
@@ -163,7 +166,7 @@ var EuiDataGridBodyCustomRender = exports.EuiDataGridBodyCustomRender = function
163
166
  customGridBodyProps = _useState2[0],
164
167
  setCustomGridBodyProps = _useState2[1];
165
168
  return (0, _react2.jsx)("div", (0, _extends2.default)({}, customGridBodyProps, {
166
- className: (0, _classnames.default)('euiDataGrid__customRenderBody', customGridBodyProps === null || customGridBodyProps === void 0 ? void 0 : customGridBodyProps.className)
169
+ className: (0, _classnames.default)('euiDataGrid__customRenderBody', className, customGridBodyProps === null || customGridBodyProps === void 0 ? void 0 : customGridBodyProps.className)
167
170
  }), headerRow, renderCustomGridBody({
168
171
  visibleColumns: visibleColumns,
169
172
  visibleRowData: visibleRows,
@@ -111,7 +111,8 @@ var EuiDataGridBodyVirtualized = exports.EuiDataGridBodyVirtualized = /*#__PURE_
111
111
  gridWidth = _ref3.gridWidth,
112
112
  gridRef = _ref3.gridRef,
113
113
  gridItemsRendered = _ref3.gridItemsRendered,
114
- wrapperRef = _ref3.wrapperRef;
114
+ wrapperRef = _ref3.wrapperRef,
115
+ className = _ref3.className;
115
116
  /**
116
117
  * Grid refs & observers
117
118
  */
@@ -160,7 +161,8 @@ var EuiDataGridBodyVirtualized = exports.EuiDataGridBodyVirtualized = /*#__PURE_
160
161
  switchColumnPos: switchColumnPos,
161
162
  sorting: sorting,
162
163
  schema: schema,
163
- schemaDetectors: schemaDetectors
164
+ schemaDetectors: schemaDetectors,
165
+ gridStyles: gridStyles
164
166
  }),
165
167
  headerRow = _useDataGridHeader.headerRow,
166
168
  headerRowHeight = _useDataGridHeader.headerRowHeight;
@@ -175,7 +177,8 @@ var EuiDataGridBodyVirtualized = exports.EuiDataGridBodyVirtualized = /*#__PURE_
175
177
  columns: columns,
176
178
  columnWidths: columnWidths,
177
179
  defaultColumnWidth: defaultColumnWidth,
178
- schema: schema
180
+ schema: schema,
181
+ gridStyles: gridStyles
179
182
  }),
180
183
  footerRow = _useDataGridFooter.footerRow,
181
184
  footerRowHeight = _useDataGridFooter.footerRowHeight;
@@ -304,7 +307,7 @@ var EuiDataGridBodyVirtualized = exports.EuiDataGridBodyVirtualized = /*#__PURE_
304
307
  value: rowWrapperContextValue
305
308
  }, (0, _react2.jsx)(_reactWindow.VariableSizeGrid, (0, _extends2.default)({}, virtualizationOptions, {
306
309
  ref: gridRef,
307
- className: (0, _classnames.default)('euiDataGrid__virtualized', virtualizationOptions === null || virtualizationOptions === void 0 ? void 0 : virtualizationOptions.className),
310
+ className: (0, _classnames.default)('euiDataGrid__virtualized', className, virtualizationOptions === null || virtualizationOptions === void 0 ? void 0 : virtualizationOptions.className),
308
311
  onItemsRendered: onItemsRendered,
309
312
  innerElementType: InnerElement,
310
313
  outerRef: outerGridRef,
@@ -0,0 +1,30 @@
1
+ "use strict";
2
+
3
+ Object.defineProperty(exports, "__esModule", {
4
+ value: true
5
+ });
6
+ exports.euiDataGridFooterStyles = void 0;
7
+ var _react = require("@emotion/react");
8
+ var _global_styling = require("../../../../global_styling");
9
+ var _data_grid = require("../../data_grid.styles");
10
+ /*
11
+ * Copyright Elasticsearch B.V. and/or licensed to Elasticsearch B.V. under one
12
+ * or more contributor license agreements. Licensed under the Elastic License
13
+ * 2.0 and the Server Side Public License, v 1; you may not use this file except
14
+ * in compliance with, at your election, the Elastic License 2.0 or the Server
15
+ * Side Public License, v 1.
16
+ */
17
+
18
+ var euiDataGridFooterStyles = exports.euiDataGridFooterStyles = function euiDataGridFooterStyles(euiThemeContext) {
19
+ var euiTheme = euiThemeContext.euiTheme;
20
+ var _euiDataGridVariables = (0, _data_grid.euiDataGridVariables)(euiThemeContext),
21
+ levels = _euiDataGridVariables.levels;
22
+ return {
23
+ euiDataGridFooter: /*#__PURE__*/(0, _react.css)("display:flex;", (0, _global_styling.logicalCSS)('width', 'fit-content'), " background-color:", euiTheme.colors.emptyShade, ";;label:euiDataGridFooter;"),
24
+ sticky: /*#__PURE__*/(0, _react.css)("z-index:", levels.stickyHeader, ";position:sticky;", (0, _global_styling.logicalCSS)('bottom', 0), ";;label:sticky;"),
25
+ overline: /*#__PURE__*/(0, _react.css)((0, _global_styling.logicalCSS)('border-top', "".concat(euiTheme.border.width.thick, " solid ").concat(euiTheme.colors.text)), ";;label:overline;"),
26
+ shade: /*#__PURE__*/(0, _react.css)("background-color:", euiTheme.colors.lightestShade, ";;label:shade;"),
27
+ striped: /*#__PURE__*/(0, _react.css)(".euiDataGrid--stripes &{background-color:", euiTheme.colors.lightestShade, ";};label:striped;"),
28
+ euiDataGridFooterCell: /*#__PURE__*/(0, _react.css)("flex:0 0 auto;font-weight:", euiTheme.font.weight.bold, ";;label:euiDataGridFooterCell;")
29
+ };
30
+ };
@@ -8,11 +8,13 @@ Object.defineProperty(exports, "__esModule", {
8
8
  exports.EuiDataGridFooterRow = void 0;
9
9
  var _extends2 = _interopRequireDefault(require("@babel/runtime/helpers/extends"));
10
10
  var _objectWithoutProperties2 = _interopRequireDefault(require("@babel/runtime/helpers/objectWithoutProperties"));
11
- var _classnames = _interopRequireDefault(require("classnames"));
12
11
  var _react = _interopRequireWildcard(require("react"));
12
+ var _classnames = _interopRequireDefault(require("classnames"));
13
+ var _services = require("../../../../services");
13
14
  var _cell = require("../cell");
15
+ var _data_grid_footer = require("./data_grid_footer.styles");
14
16
  var _react2 = require("@emotion/react");
15
- var _excluded = ["leadingControlColumns", "trailingControlColumns", "columns", "schema", "columnWidths", "defaultColumnWidth", "className", "renderCellValue", "renderCellPopover", "rowIndex", "interactiveCellId", "data-test-subj", "visibleRowIndex"];
17
+ var _excluded = ["leadingControlColumns", "trailingControlColumns", "columns", "schema", "columnWidths", "defaultColumnWidth", "className", "renderCellValue", "renderCellPopover", "rowIndex", "interactiveCellId", "data-test-subj", "visibleRowIndex", "gridStyles"];
16
18
  /*
17
19
  * Copyright Elasticsearch B.V. and/or licensed to Elasticsearch B.V. under one
18
20
  * or more contributor license agreements. Licensed under the Elastic License
@@ -40,13 +42,15 @@ var EuiDataGridFooterRow = exports.EuiDataGridFooterRow = /*#__PURE__*/(0, _reac
40
42
  _dataTestSubj = _ref['data-test-subj'],
41
43
  _ref$visibleRowIndex = _ref.visibleRowIndex,
42
44
  visibleRowIndex = _ref$visibleRowIndex === void 0 ? rowIndex : _ref$visibleRowIndex,
45
+ gridStyles = _ref.gridStyles,
43
46
  rest = (0, _objectWithoutProperties2.default)(_ref, _excluded);
44
- var classes = (0, _classnames.default)('euiDataGridRow', {
45
- 'euiDataGridRow--striped': visibleRowIndex % 2 !== 0
46
- }, 'euiDataGridFooter', className);
47
+ var styles = (0, _services.useEuiMemoizedStyles)(_data_grid_footer.euiDataGridFooterStyles);
48
+ var cssStyles = [styles.euiDataGridFooter, gridStyles.stickyFooter && styles.sticky, gridStyles.footer === 'striped' ? visibleRowIndex % 2 !== 0 && styles.striped : styles[gridStyles.footer]];
49
+ var classes = (0, _classnames.default)('euiDataGridFooter', className);
47
50
  var dataTestSubj = (0, _classnames.default)('dataGridRow', 'dataGridFooterRow', _dataTestSubj);
48
51
  var popoverContext = (0, _react.useContext)(_cell.DataGridCellPopoverContext);
49
52
  var sharedCellProps = {
53
+ css: styles.euiDataGridFooterCell,
50
54
  rowIndex: rowIndex,
51
55
  visibleRowIndex: visibleRowIndex,
52
56
  interactiveCellId: interactiveCellId,
@@ -55,6 +59,7 @@ var EuiDataGridFooterRow = exports.EuiDataGridFooterRow = /*#__PURE__*/(0, _reac
55
59
  return (0, _react2.jsx)("div", (0, _extends2.default)({
56
60
  ref: ref,
57
61
  role: "row",
62
+ css: cssStyles,
58
63
  className: classes,
59
64
  "data-test-subj": dataTestSubj
60
65
  }, rest), leadingControlColumns.map(function (_ref2, i) {