@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,88 @@
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 { tintOrShade } from '../../services';
11
+ import { euiFontSize, logicalCSS, logicalSizeCSS, mathWithUnits } from '../../global_styling';
12
+ export var euiDataGridVariables = function euiDataGridVariables(euiThemeContext) {
13
+ var euiTheme = euiThemeContext.euiTheme;
14
+ return {
15
+ cellPadding: {
16
+ s: euiTheme.size.xs,
17
+ m: mathWithUnits(euiTheme.size.m, function (x) {
18
+ return x / 2;
19
+ }),
20
+ l: euiTheme.size.s
21
+ },
22
+ lineHeight: {
23
+ s: euiFontSize(euiThemeContext, 'xs').lineHeight,
24
+ m: euiFontSize(euiThemeContext, 'm').lineHeight
25
+ },
26
+ fontSize: {
27
+ s: euiFontSize(euiThemeContext, 'xs').fontSize,
28
+ m: euiFontSize(euiThemeContext, 's').fontSize
29
+ },
30
+ levels: {
31
+ cellPopover: Number(euiTheme.levels.header),
32
+ // Same z-index as EuiFlyout mask overlays - cell popovers should be under both modal and flyout overlays
33
+ get stickyHeader() {
34
+ return this.cellPopover - 1; // Needs to sit above the content + cell focus outlines/actions, but below actual popovers
35
+ }
36
+ }
37
+ };
38
+ };
39
+ export var euiDataGridStyles = function euiDataGridStyles(euiThemeContext) {
40
+ var euiTheme = euiThemeContext.euiTheme,
41
+ colorMode = euiThemeContext.colorMode;
42
+ var _euiDataGridVariables = euiDataGridVariables(euiThemeContext),
43
+ _cellPadding = _euiDataGridVariables.cellPadding,
44
+ lineHeight = _euiDataGridVariables.lineHeight,
45
+ _fontSize = _euiDataGridVariables.fontSize;
46
+ return {
47
+ euiDataGrid: /*#__PURE__*/css("display:flex;flex-direction:column;align-items:stretch;", logicalCSS('height', '100%'), " overflow:hidden;*:where(& .euiDataGridRow){background-color:", euiTheme.colors.emptyShade, ";}*:where(&.euiDataGrid--stripes .euiDataGridRow--striped){background-color:", euiTheme.colors.lightestShade, ";}*:where(&.euiDataGrid--rowHoverHighlight .euiDataGridRow:hover){background-color:", euiTheme.colors.highlight, ";};label:euiDataGrid;"),
48
+ cellPadding: {
49
+ cellPadding: function cellPadding(size) {
50
+ return /*#__PURE__*/css(".euiDataGridHeaderCell,.euiDataGridRowCell__content{padding:", _cellPadding[size], ";}/* Workaround to trim line-clamp and padding - @see https://github.com/elastic/eui/issues/7780 */.euiDataGridRowCell__content--lineCountHeight{", logicalCSS('padding-bottom', 0), " ", logicalCSS('border-bottom', "".concat(_cellPadding[size], " solid transparent")), ";}.euiDataGridHeaderCell__button{margin-block:-", _cellPadding[size], ";};label:cellPadding;");
51
+ },
52
+ get s() {
53
+ return /*#__PURE__*/css(this.cellPadding('s'), ";label:s;");
54
+ },
55
+ get m() {
56
+ return /*#__PURE__*/css(this.cellPadding('m'), ";label:m;");
57
+ },
58
+ get l() {
59
+ return /*#__PURE__*/css(this.cellPadding('l'), ";label:l;");
60
+ }
61
+ },
62
+ fontSize: {
63
+ fontSize: function fontSize(size) {
64
+ return /*#__PURE__*/css(".euiDataGridHeaderCell,.euiDataGridRowCell{font-size:", _fontSize[size], ";line-height:", lineHeight[size], ";};label:fontSize;");
65
+ },
66
+ get s() {
67
+ return /*#__PURE__*/css(this.fontSize('s'), ";label:s;");
68
+ },
69
+ get m() {
70
+ return /*#__PURE__*/css(this.fontSize('m'), ";label:m;");
71
+ },
72
+ get l() {
73
+ // On the Amsterdam theme, the l fontSize is the same as m
74
+ return /*#__PURE__*/css(this.fontSize('m'), ";label:l;");
75
+ }
76
+ },
77
+ borders: {
78
+ none: null,
79
+ horizontal: /*#__PURE__*/css("label:borders;.euiDataGridRowCell:not(.euiDataGridFooterCell),.euiDataGridFooter,&:not(.euiDataGrid--headerUnderline) .euiDataGridHeader{", logicalCSS('border-bottom', euiTheme.border.thin), ";}&:not(.euiDataGrid--footerOverline) .euiDataGridFooter{", logicalCSS('border-top', euiTheme.border.thin), " ", logicalCSS('margin-top', "-".concat(euiTheme.border.width.thin)), ";}.euiDataGridHeader{", logicalCSS('border-top', euiTheme.border.thin), ";};label:horizontal;"),
80
+ all: /*#__PURE__*/css("label:borders;.euiDataGridRowCell{&:not(.euiDataGridFooterCell){", logicalCSS('border-bottom', euiTheme.border.thin), " ", logicalCSS('border-right', // Visually lighten vertical borders
81
+ "".concat(euiTheme.border.width.thin, " solid ").concat(tintOrShade(euiTheme.border.color, 0.3, colorMode))), ";}&--firstColumn{", logicalCSS('border-left', euiTheme.border.thin), ";}&--lastColumn{", logicalCSS('border-right-color', euiTheme.border.color), ";}}.euiDataGridFooterCell,.euiDataGridHeaderCell{", logicalCSS('border-right', euiTheme.border.thin), " &:first-of-type{", logicalCSS('border-left', euiTheme.border.thin), ";}}.euiDataGridFooter{", logicalCSS('border-bottom', euiTheme.border.thin), ";}&:not(.euiDataGrid--footerOverline) .euiDataGridFooter{", logicalCSS('border-top', euiTheme.border.thin), " ", logicalCSS('margin-top', "-".concat(euiTheme.border.width.thin)), ";}&:not(.euiDataGrid--headerUnderline) .euiDataGridHeader{", logicalCSS('border-bottom', euiTheme.border.thin), ";}&:is(.euiDataGrid--noControls) .euiDataGridHeader{", logicalCSS('border-top', euiTheme.border.thin), ";}.euiDataGrid__controls{border:", euiTheme.border.thin, ";background-color:", euiTheme.colors.body, ";};label:all;")
82
+ },
83
+ // Sits below the controls above it and pagination below it
84
+ euiDataGrid__content: /*#__PURE__*/css("z-index:1;position:relative;flex-grow:1;", logicalSizeCSS('100%'), " ", logicalCSS('max-width', '100%'), " overflow:hidden;background-color:", euiTheme.colors.body, ";font-feature-settings:'tnum' 1;;label:euiDataGrid__content;"),
85
+ // Wrapper around EuiDataGrid
86
+ euiDataGrid__focusWrap: /*#__PURE__*/css(logicalCSS('height', '100%'), ";;label:euiDataGrid__focusWrap;")
87
+ };
88
+ };
@@ -13,22 +13,35 @@ function _arrayLikeToArray(r, a) { (null == a || a > r.length) && (a = r.length)
13
13
  */
14
14
 
15
15
  import React, { useCallback, useContext } from 'react';
16
- import { useEuiI18n } from '../../i18n'; // Note: this file must be named data_grid_pagination to match i18n tokens
17
- import { EuiTablePagination, useEuiTablePaginationDefaults } from '../../table/table_pagination';
18
- import { DataGridFocusContext } from './focus';
16
+ import { useEuiMemoizedStyles } from '../../../services';
17
+ import { useEuiI18n } from '../../i18n';
18
+ import { EuiTablePagination } from '../../table/table_pagination';
19
+ import { DataGridFocusContext } from '../utils/focus';
20
+ import { euiDataGridPaginationStyles } from './data_grid_pagination.styles';
19
21
  import { jsx as ___EmotionJSX } from "@emotion/react";
20
- export var EuiDataGridPaginationRenderer = function EuiDataGridPaginationRenderer(_ref) {
21
- var pageIndex = _ref.pageIndex,
22
- _pageSize = _ref.pageSize,
23
- _pageSizeOptions = _ref.pageSizeOptions,
24
- _onChangePage = _ref.onChangePage,
25
- onChangeItemsPerPage = _ref.onChangeItemsPerPage,
26
- rowCount = _ref.rowCount,
27
- controls = _ref.controls,
28
- ariaLabel = _ref['aria-label'];
29
- var defaults = useEuiTablePaginationDefaults();
30
- var pageSize = _pageSize !== null && _pageSize !== void 0 ? _pageSize : defaults.itemsPerPage;
31
- var pageSizeOptions = _pageSizeOptions !== null && _pageSizeOptions !== void 0 ? _pageSizeOptions : defaults.itemsPerPageOptions;
22
+ /**
23
+ * Do not render the pagination when:
24
+ * 1. Rows count is less than min pagination option (rows per page)
25
+ * 2. Rows count is less than pageSize (the case when there are no pageSizeOptions provided)
26
+ */
27
+ export var shouldRenderPagination = function shouldRenderPagination(rowCount, _ref) {
28
+ var pageSize = _ref.pageSize,
29
+ pageSizeOptions = _ref.pageSizeOptions;
30
+ var minSizeOption = _toConsumableArray(pageSizeOptions).sort(function (a, b) {
31
+ return a - b;
32
+ })[0];
33
+ return !(rowCount < (minSizeOption || pageSize));
34
+ };
35
+ export var EuiDataGridPagination = function EuiDataGridPagination(_ref2) {
36
+ var pageIndex = _ref2.pageIndex,
37
+ pageSize = _ref2.pageSize,
38
+ pageSizeOptions = _ref2.pageSizeOptions,
39
+ _onChangePage = _ref2.onChangePage,
40
+ onChangeItemsPerPage = _ref2.onChangeItemsPerPage,
41
+ rowCount = _ref2.rowCount,
42
+ controls = _ref2.controls,
43
+ ariaLabel = _ref2['aria-label'];
44
+ var styles = useEuiMemoizedStyles(euiDataGridPaginationStyles);
32
45
  var detailedPaginationLabel = useEuiI18n('euiDataGridPagination.detailedPaginationLabel', 'Pagination for preceding grid: {label}', {
33
46
  label: ariaLabel !== null && ariaLabel !== void 0 ? ariaLabel : ''
34
47
  });
@@ -42,28 +55,15 @@ export var EuiDataGridPaginationRenderer = function EuiDataGridPaginationRendere
42
55
  setFocusedCell([0, 0]);
43
56
  }, [setFocusedCell, _onChangePage]);
44
57
  var pageCount = pageSize ? Math.ceil(rowCount / pageSize) : 1;
45
- var minSizeOption = _toConsumableArray(pageSizeOptions).sort(function (a, b) {
46
- return a - b;
47
- })[0];
48
- if (rowCount < (minSizeOption || pageSize)) {
49
- /**
50
- * Do not render the pagination when:
51
- * 1. Rows count is less than min pagination option (rows per page)
52
- * 2. Rows count is less than pageSize (the case when there are no pageSizeOptions provided)
53
- */
54
- return null;
55
- }
56
-
57
- // Hide select rows per page if pageSizeOptions is an empty array
58
- var hidePerPageOptions = pageSizeOptions.length === 0;
59
58
  return ___EmotionJSX("div", {
59
+ css: styles.euiDataGrid__pagination,
60
60
  className: "euiDataGrid__pagination"
61
61
  }, ___EmotionJSX(EuiTablePagination, {
62
62
  "aria-controls": controls,
63
63
  activePage: pageIndex,
64
- showPerPageOptions: !hidePerPageOptions,
65
64
  itemsPerPage: pageSize,
66
65
  itemsPerPageOptions: pageSizeOptions,
66
+ showPerPageOptions: pageSizeOptions.length > 0,
67
67
  pageCount: pageCount,
68
68
  onChangePage: onChangePage,
69
69
  onChangeItemsPerPage: onChangeItemsPerPage,
@@ -0,0 +1,16 @@
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
+ export var euiDataGridPaginationStyles = function euiDataGridPaginationStyles(_ref) {
12
+ var euiTheme = _ref.euiTheme;
13
+ return {
14
+ euiDataGrid__pagination: /*#__PURE__*/css("z-index:2;flex-grow:0;", logicalCSS('padding-top', euiTheme.size.xs), " .euiDataGrid--fullScreen &{", logicalCSS('padding-bottom', euiTheme.size.xs), " background-color:", euiTheme.colors.lightestShade, ";box-shadow:", euiTheme.border.width.thin, " 0 0 ", euiTheme.border.width.thin, " ", euiTheme.border.color, ";};label:euiDataGrid__pagination;")
15
+ };
16
+ };
@@ -0,0 +1,9 @@
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
+ export { shouldRenderPagination, EuiDataGridPagination } from './data_grid_pagination';
@@ -29,18 +29,12 @@ function _toPrimitive(t, r) { if ("object" != _typeof(t) || !t) return t; var e
29
29
  */
30
30
 
31
31
  import { useCallback, useContext, useEffect, useMemo, useState } from 'react';
32
- import { useForceRender, useLatest } from '../../../services';
32
+ import { useForceRender, useLatest, useEuiMemoizedStyles } from '../../../services';
33
33
  import { isNumber, isObject } from '../../../services/predicate';
34
+ import { euiDataGridVariables } from '../data_grid.styles';
34
35
  import { DataGridSortedContext } from './sorting';
35
-
36
- // TODO: Once JS variables are available, use them here instead of hard-coded maps
37
- export var cellPaddingsMap = {
38
- s: 4,
39
- m: 6,
40
- l: 8
41
- };
42
- export var AUTO_HEIGHT = 'auto';
43
- export var DEFAULT_ROW_HEIGHT = 34;
36
+ var AUTO_HEIGHT = 'auto';
37
+ var DEFAULT_ROW_HEIGHT = 34;
44
38
  export var RowHeightUtils = /*#__PURE__*/function () {
45
39
  function RowHeightUtils() {
46
40
  var _this = this;
@@ -108,10 +102,13 @@ export var RowHeightUtils = /*#__PURE__*/function () {
108
102
  }
109
103
  }, {
110
104
  key: "cacheStyles",
111
- value: function cacheStyles(gridStyles) {
105
+ value: function cacheStyles(gridStyles, cellPaddingsMap) {
106
+ var _gridStyles$cellPaddi;
107
+ var paddingSize = (_gridStyles$cellPaddi = gridStyles.cellPadding) !== null && _gridStyles$cellPaddi !== void 0 ? _gridStyles$cellPaddi : 'm';
108
+ var padding = parseFloat(cellPaddingsMap[paddingSize]);
112
109
  this.styles = {
113
- paddingTop: cellPaddingsMap[gridStyles.cellPadding || 'm'],
114
- paddingBottom: cellPaddingsMap[gridStyles.cellPadding || 'm']
110
+ paddingTop: padding,
111
+ paddingBottom: padding
115
112
  };
116
113
  }
117
114
  }, {
@@ -317,11 +314,12 @@ export var useRowHeightUtils = function useRowHeightUtils(_ref2) {
317
314
  rowHeightUtils, forceRenderRef]);
318
315
 
319
316
  // Re-cache styles whenever grid density changes
317
+ var styleVars = useEuiMemoizedStyles(euiDataGridVariables);
320
318
  useEffect(function () {
321
319
  rowHeightUtils.cacheStyles({
322
320
  cellPadding: gridStyles.cellPadding
323
- });
324
- }, [gridStyles.cellPadding, rowHeightUtils]);
321
+ }, styleVars.cellPadding);
322
+ }, [gridStyles.cellPadding, rowHeightUtils, styleVars.cellPadding]);
325
323
 
326
324
  // Update row heights map to remove hidden columns whenever orderedVisibleColumns change
327
325
  useEffect(function () {
@@ -11,8 +11,11 @@ function _asyncToGenerator(n) { return function () { var t = this, e = arguments
11
11
  */
12
12
 
13
13
  import React, { useContext, useEffect, useCallback, useMemo } from 'react';
14
+ import { useEuiMemoizedStyles } from '../../../services';
15
+ import { logicalStyles } from '../../../global_styling';
14
16
  import { DataGridCellPopoverContext } from '../body/cell';
15
17
  import { DataGridFocusContext } from './focus';
18
+ import { euiDataGridScrollBarStyles } from './scrolling.styles';
16
19
  import { jsx as ___EmotionJSX } from "@emotion/react";
17
20
  /**
18
21
  * The primary goal of this scroll logic is to ensure keyboard navigation works accessibly,
@@ -208,6 +211,7 @@ export var useScrollBars = function useScrollBars(outerGridRef) {
208
211
  // If the grid scrolls or has scrollbars, we add custom border overlays
209
212
  // (since borders are normally set by cells) to ensure our grid body has
210
213
  // ending borders regardless of scroll position
214
+ var styles = useEuiMemoizedStyles(euiDataGridScrollBarStyles);
211
215
  var scrollBorderOverlay = useMemo(function () {
212
216
  if (!hasHorizontalScroll && !hasVerticalScroll) {
213
217
  return null; // Nothing to render if the grid doesn't scroll
@@ -216,22 +220,25 @@ export var useScrollBars = function useScrollBars(outerGridRef) {
216
220
  return null; // Nothing to render if the grid doesn't use borders
217
221
  }
218
222
  return ___EmotionJSX("div", {
223
+ css: styles.euiDataGrid__scrollOverlay,
219
224
  className: "euiDataGrid__scrollOverlay",
220
225
  role: "presentation"
221
226
  }, scrollBarHeight > 0 && ___EmotionJSX("div", {
227
+ css: styles.euiDataGrid__scrollBarOverlayBottom,
222
228
  className: "euiDataGrid__scrollBarOverlayBottom",
223
- style: {
224
- bottom: scrollBarHeight,
225
- right: 0
226
- }
229
+ style: logicalStyles({
230
+ bottom: scrollBarHeight
231
+ })
227
232
  }), scrollBarWidth > 0 && ___EmotionJSX("div", {
233
+ css: styles.euiDataGrid__scrollBarOverlayRight,
228
234
  className: "euiDataGrid__scrollBarOverlayRight",
229
- style: {
235
+ style: logicalStyles({
236
+ top: 0,
230
237
  bottom: scrollBarHeight,
231
238
  right: scrollBarWidth
232
- }
239
+ })
233
240
  }));
234
- }, [hasHorizontalScroll, hasVerticalScroll, scrollBarHeight, scrollBarWidth, borderStyle]);
241
+ }, [hasHorizontalScroll, hasVerticalScroll, scrollBarHeight, scrollBarWidth, borderStyle, styles]);
235
242
  return {
236
243
  scrollBarHeight: scrollBarHeight,
237
244
  scrollBarWidth: scrollBarWidth,
@@ -0,0 +1,30 @@
1
+ /*
2
+ * Copyright Elasticsearch B.V. and/or licensed to Elasticsearch B.V. under one
3
+ * or more contributor license agreements. Licensed under the Elastic License
4
+ * 2.0 and the Server Side Public License, v 1; you may not use this file except
5
+ * in compliance with, at your election, the Elastic License 2.0 or the Server
6
+ * Side Public License, v 1.
7
+ */
8
+
9
+ import { css } from '@emotion/react';
10
+ import { logicalCSS, mathWithUnits } from '../../../global_styling';
11
+ export var euiDataGridScrollBarStyles = function euiDataGridScrollBarStyles(euiThemeContext) {
12
+ var euiTheme = euiThemeContext.euiTheme;
13
+
14
+ // Note that 'borders' *must* be rendered with inset box-shadow, because actual
15
+ // `border` CSS will affect the relative position of the child scroll bar overlays
16
+ // and cause them to be off by the width of the border
17
+ var borderWidth = euiTheme.border.width.thin;
18
+ var borderColor = euiTheme.border.color;
19
+ return {
20
+ euiDataGrid__scrollOverlay: /*#__PURE__*/css("position:absolute;inset:0;", logicalCSS('top', "-".concat(borderWidth)), "pointer-events:none;box-shadow:inset 0 0 0 ", borderWidth, " ", borderColor, ";.euiDataGrid--bordersHorizontal &{box-shadow:inset 0 -", mathWithUnits(borderWidth, function (x) {
21
+ return x * 2;
22
+ }), " 0 -", borderWidth, " ", borderColor, ";};label:euiDataGrid__scrollOverlay;"),
23
+ // Ensure the horizontal scrollbar has a top border
24
+ euiDataGrid__scrollBarOverlayBottom: /*#__PURE__*/css("position:absolute;inset-inline:0;", logicalCSS('height', borderWidth), " background-color:", borderColor, ";;label:euiDataGrid__scrollBarOverlayBottom;"),
25
+ // Ensure the vertical scrollbar has a left border
26
+ euiDataGrid__scrollBarOverlayRight: /*#__PURE__*/css("position:absolute;", logicalCSS('width', borderWidth), " background-color:", borderColor, ";;label:euiDataGrid__scrollBarOverlayRight;")
27
+ // Note: Scroll bar border positions are set via JS inline style, since
28
+ // JS has access to the exact OS scrollbar width/height and CSS doesn't
29
+ };
30
+ };
@@ -1,4 +1,4 @@
1
- var _excluded = ["size", "maxWidth", "minWidth", "onResize", "side", "type", "children"];
1
+ var _excluded = ["size", "maxWidth", "minWidth", "onResize", "side", "type", "ownFocus", "children"];
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 _slicedToArray(r, e) { return _arrayWithHoles(r) || _iterableToArrayLimit(r, e) || _unsupportedIterableToArray(r, e) || _nonIterableRest(); }
4
4
  function _nonIterableRest() { throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method."); }
@@ -35,10 +35,13 @@ export var EuiFlyoutResizable = /*#__PURE__*/forwardRef(function (_ref, ref) {
35
35
  side = _ref$side === void 0 ? 'right' : _ref$side,
36
36
  _ref$type = _ref.type,
37
37
  type = _ref$type === void 0 ? 'overlay' : _ref$type,
38
+ _ref$ownFocus = _ref.ownFocus,
39
+ ownFocus = _ref$ownFocus === void 0 ? true : _ref$ownFocus,
38
40
  children = _ref.children,
39
41
  rest = _objectWithoutProperties(_ref, _excluded);
42
+ var hasOverlay = type === 'overlay' && ownFocus;
40
43
  var styles = useEuiMemoizedStyles(euiFlyoutResizableButtonStyles);
41
- var cssStyles = [styles.euiFlyoutResizableButton, styles[type][side]];
44
+ var cssStyles = [styles.euiFlyoutResizableButton, styles[type][side], !hasOverlay && styles.noOverlay.noOverlay, !hasOverlay && styles.noOverlay[side]];
42
45
  var getFlyoutMinMaxWidth = useCallback(function (width) {
43
46
  return Math.min(Math.max(width, minWidth), maxWidth || Infinity, window.innerWidth - 20 // Leave some offset
44
47
  );
@@ -142,6 +145,7 @@ export var EuiFlyoutResizable = /*#__PURE__*/forwardRef(function (_ref, ref) {
142
145
  maxWidth: maxWidth,
143
146
  side: side,
144
147
  type: type,
148
+ ownFocus: ownFocus,
145
149
  ref: setRefs
146
150
  }), ___EmotionJSX(EuiResizableButton, {
147
151
  isHorizontal: true,
@@ -10,6 +10,30 @@ function _EMOTION_STRINGIFIED_CSS_ERROR__() { return "You have tried to stringif
10
10
  import { css } from '@emotion/react';
11
11
  import { logicalCSS } from '../../global_styling';
12
12
  var _ref = process.env.NODE_ENV === "production" ? {
13
+ name: "1vfos8p-right",
14
+ styles: "justify-content:flex-start;label:right;"
15
+ } : {
16
+ name: "1vfos8p-right",
17
+ styles: "justify-content:flex-start;label:right;",
18
+ toString: _EMOTION_STRINGIFIED_CSS_ERROR__
19
+ };
20
+ var _ref2 = process.env.NODE_ENV === "production" ? {
21
+ name: "1ydooaf-left",
22
+ styles: "justify-content:flex-end;label:left;"
23
+ } : {
24
+ name: "1ydooaf-left",
25
+ styles: "justify-content:flex-end;label:left;",
26
+ toString: _EMOTION_STRINGIFIED_CSS_ERROR__
27
+ };
28
+ var _ref3 = process.env.NODE_ENV === "production" ? {
29
+ name: "1cw850z-noOverlay",
30
+ styles: "margin-inline:0;label:noOverlay;"
31
+ } : {
32
+ name: "1cw850z-noOverlay",
33
+ styles: "margin-inline:0;label:noOverlay;",
34
+ toString: _EMOTION_STRINGIFIED_CSS_ERROR__
35
+ };
36
+ var _ref4 = process.env.NODE_ENV === "production" ? {
13
37
  name: "1gfwqnd-euiFlyoutResizableButton",
14
38
  styles: "position:absolute;label:euiFlyoutResizableButton;"
15
39
  } : {
@@ -17,17 +41,22 @@ var _ref = process.env.NODE_ENV === "production" ? {
17
41
  styles: "position:absolute;label:euiFlyoutResizableButton;",
18
42
  toString: _EMOTION_STRINGIFIED_CSS_ERROR__
19
43
  };
20
- export var euiFlyoutResizableButtonStyles = function euiFlyoutResizableButtonStyles(_ref2) {
21
- var euiTheme = _ref2.euiTheme;
44
+ export var euiFlyoutResizableButtonStyles = function euiFlyoutResizableButtonStyles(_ref5) {
45
+ var euiTheme = _ref5.euiTheme;
22
46
  return {
23
- euiFlyoutResizableButton: _ref,
47
+ euiFlyoutResizableButton: _ref4,
24
48
  overlay: {
25
49
  left: /*#__PURE__*/css(logicalCSS('right', 0), ";;label:left;"),
26
50
  right: /*#__PURE__*/css(logicalCSS('left', 0), ";;label:right;")
27
51
  },
28
52
  push: {
29
- left: /*#__PURE__*/css(logicalCSS('right', "-".concat(euiTheme.border.width.thin)), ";;label:left;"),
30
- right: /*#__PURE__*/css(logicalCSS('left', "-".concat(euiTheme.border.width.thin)), ";;label:right;")
53
+ left: /*#__PURE__*/css(logicalCSS('right', "-".concat(euiTheme.border.width.thick)), ";;label:left;"),
54
+ right: /*#__PURE__*/css(logicalCSS('left', "-".concat(euiTheme.border.width.thick)), ";;label:right;")
55
+ },
56
+ noOverlay: {
57
+ noOverlay: _ref3,
58
+ left: _ref2,
59
+ right: _ref
31
60
  }
32
61
  };
33
62
  };
@@ -437,7 +437,7 @@ export var EuiPopover = /*#__PURE__*/function (_Component) {
437
437
  }), popoverScreenReaderText));
438
438
  }
439
439
  var returnFocus = this.state.isOpenStable ? returnFocusConfig : false;
440
- panel = ___EmotionJSX(EuiPortal, {
440
+ panel = ___EmotionJSX(EuiPortal, insert && {
441
441
  insert: insert
442
442
  }, ___EmotionJSX(EuiFocusTrap, _extends({
443
443
  clickOutsideDisables: true,
@@ -1,4 +1,4 @@
1
- var _excluded = ["size", "color", "grow", "textAlign", "children", "className"];
1
+ var _excluded = ["component", "size", "color", "grow", "textAlign", "children", "className"];
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; }
@@ -14,13 +14,15 @@ import React from 'react';
14
14
  import PropTypes from "prop-types";
15
15
  import classNames from 'classnames';
16
16
  import { useEuiMemoizedStyles } from '../../services';
17
- import { euiTextStyles } from './text.styles';
18
17
  import { EuiTextColor } from './text_color';
19
18
  import { EuiTextAlign } from './text_align';
19
+ import { euiTextStyles } from './text.styles';
20
20
  import { jsx as ___EmotionJSX } from "@emotion/react";
21
21
  export var TEXT_SIZES = ['xs', 's', 'm', 'relative'];
22
22
  export var EuiText = function EuiText(_ref) {
23
- var _ref$size = _ref.size,
23
+ var _ref$component = _ref.component,
24
+ component = _ref$component === void 0 ? 'div' : _ref$component,
25
+ _ref$size = _ref.size,
24
26
  size = _ref$size === void 0 ? 'm' : _ref$size,
25
27
  color = _ref.color,
26
28
  _ref$grow = _ref.grow,
@@ -32,12 +34,14 @@ export var EuiText = function EuiText(_ref) {
32
34
  var styles = useEuiMemoizedStyles(euiTextStyles);
33
35
  var cssStyles = [styles.euiText, !grow ? styles.constrainedWidth : undefined, styles[size]];
34
36
  var classes = classNames('euiText', className);
35
- var text = ___EmotionJSX("div", _extends({
37
+ var Component = component;
38
+ var text = ___EmotionJSX(Component, _extends({
36
39
  css: cssStyles,
37
40
  className: classes
38
41
  }, rest), children);
39
42
  if (color) {
40
43
  text = ___EmotionJSX(EuiTextColor, {
44
+ component: component,
41
45
  color: color,
42
46
  className: classes,
43
47
  cloneElement: true
@@ -45,6 +49,7 @@ export var EuiText = function EuiText(_ref) {
45
49
  }
46
50
  if (textAlign) {
47
51
  text = ___EmotionJSX(EuiTextAlign, {
52
+ component: component,
48
53
  textAlign: textAlign,
49
54
  className: classes,
50
55
  cloneElement: true
@@ -57,15 +62,26 @@ EuiText.propTypes = {
57
62
  "aria-label": PropTypes.string,
58
63
  "data-test-subj": PropTypes.string,
59
64
  css: PropTypes.any,
65
+ /**
66
+ * The HTML element/tag to render.
67
+ * Use with care when nesting multiple components to ensure valid XHTML:
68
+ * - `<div>` and other block tags are not valid to use inside `<p>`. If using the `<p>` tag, we recommend passing strings/text only.
69
+ * - `<span>` is valid to be nested in any tag, and can have any tag nested within it.
70
+ */
71
+ component: PropTypes.oneOf(["div", "span", "p"]),
72
+ /**
73
+ * Any of our named colors or a `hex`, `rgb` or `rgba` value.
74
+ * @default inherit
75
+ */
76
+ color: PropTypes.oneOfType([PropTypes.any.isRequired, PropTypes.any.isRequired]),
77
+ /**
78
+ * Applies horizontal text alignment
79
+ * @default left
80
+ */
60
81
  textAlign: PropTypes.any,
61
82
  /**
62
83
  * Determines the text size. Choose `relative` to control the `font-size` based on the value of a parent container.
63
84
  */
64
85
  size: PropTypes.any,
65
- /**
66
- * Any of our named colors or a `hex`, `rgb` or `rgba` value.
67
- * @default inherit
68
- */
69
- color: PropTypes.oneOfType([PropTypes.any.isRequired, PropTypes.any.isRequired]),
70
86
  grow: PropTypes.bool
71
87
  };
@@ -1,5 +1,5 @@
1
1
  function _typeof(o) { "@babel/helpers - typeof"; return _typeof = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function (o) { return typeof o; } : function (o) { return o && "function" == typeof Symbol && o.constructor === Symbol && o !== Symbol.prototype ? "symbol" : typeof o; }, _typeof(o); }
2
- var _excluded = ["children", "textAlign", "cloneElement"];
2
+ var _excluded = ["children", "component", "textAlign", "cloneElement"];
3
3
  function ownKeys(e, r) { var t = Object.keys(e); if (Object.getOwnPropertySymbols) { var o = Object.getOwnPropertySymbols(e); r && (o = o.filter(function (r) { return Object.getOwnPropertyDescriptor(e, r).enumerable; })), t.push.apply(t, o); } return t; }
4
4
  function _objectSpread(e) { for (var r = 1; r < arguments.length; r++) { var t = null != arguments[r] ? arguments[r] : {}; r % 2 ? ownKeys(Object(t), !0).forEach(function (r) { _defineProperty(e, r, t[r]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e, Object.getOwnPropertyDescriptors(t)) : ownKeys(Object(t)).forEach(function (r) { Object.defineProperty(e, r, Object.getOwnPropertyDescriptor(t, r)); }); } return e; }
5
5
  function _defineProperty(e, r, t) { return (r = _toPropertyKey(r)) in e ? Object.defineProperty(e, r, { value: t, enumerable: !0, configurable: !0, writable: !0 }) : e[r] = t, e; }
@@ -23,6 +23,8 @@ import { jsx as ___EmotionJSX } from "@emotion/react";
23
23
  export var ALIGNMENTS = ['left', 'right', 'center'];
24
24
  export var EuiTextAlign = function EuiTextAlign(_ref) {
25
25
  var children = _ref.children,
26
+ _ref$component = _ref.component,
27
+ Component = _ref$component === void 0 ? 'div' : _ref$component,
26
28
  _ref$textAlign = _ref.textAlign,
27
29
  textAlign = _ref$textAlign === void 0 ? 'left' : _ref$textAlign,
28
30
  _ref$cloneElement = _ref.cloneElement,
@@ -35,7 +37,7 @@ export var EuiTextAlign = function EuiTextAlign(_ref) {
35
37
  if ( /*#__PURE__*/isValidElement(children) && cloneElement) {
36
38
  return cloneElementWithCss(children, props);
37
39
  } else {
38
- return ___EmotionJSX("div", props, children);
40
+ return ___EmotionJSX(Component, props, children);
39
41
  }
40
42
  };
41
43
  EuiTextAlign.propTypes = {
@@ -43,10 +45,21 @@ EuiTextAlign.propTypes = {
43
45
  "aria-label": PropTypes.string,
44
46
  "data-test-subj": PropTypes.string,
45
47
  css: PropTypes.any,
46
- textAlign: PropTypes.any,
47
48
  /**
48
- * Applies text styling to the child element instead of rendering a parent wrapper `div`.
49
- * Can only be used when wrapping a *single* child element/tag, and not raw text.
49
+ * The HTML element/tag to render.
50
+ * Use with care when nesting multiple components to ensure valid XHTML:
51
+ * - `<div>` and other block tags are not valid to use inside `<p>`. If using the `<p>` tag, we recommend passing strings/text only.
52
+ * - `<span>` is valid to be nested in any tag, and can have any tag nested within it.
50
53
  */
51
- cloneElement: PropTypes.bool
54
+ component: PropTypes.oneOf(["div", "span", "p"]),
55
+ /**
56
+ * Applies text styling to the child element instead of rendering a parent wrapper.
57
+ * Can only be used when wrapping a *single* child element/tag, and not raw text.
58
+ */
59
+ cloneElement: PropTypes.bool,
60
+ /**
61
+ * Applies horizontal text alignment
62
+ * @default left
63
+ */
64
+ textAlign: PropTypes.any
52
65
  };
@@ -29,7 +29,7 @@ export var EuiTextColor = function EuiTextColor(_ref) {
29
29
  _ref$color = _ref.color,
30
30
  color = _ref$color === void 0 ? 'default' : _ref$color,
31
31
  _ref$component = _ref.component,
32
- component = _ref$component === void 0 ? 'span' : _ref$component,
32
+ Component = _ref$component === void 0 ? 'span' : _ref$component,
33
33
  _ref$cloneElement = _ref.cloneElement,
34
34
  cloneElement = _ref$cloneElement === void 0 ? false : _ref$cloneElement,
35
35
  style = _ref.style,
@@ -54,7 +54,6 @@ export var EuiTextColor = function EuiTextColor(_ref) {
54
54
  style: childrenStyle
55
55
  }));
56
56
  } else {
57
- var Component = component;
58
57
  return ___EmotionJSX(Component, props, children);
59
58
  }
60
59
  };
@@ -64,16 +63,20 @@ EuiTextColor.propTypes = {
64
63
  "data-test-subj": PropTypes.string,
65
64
  css: PropTypes.any,
66
65
  /**
67
- * Any of our named colors or a `hex`, `rgb` or `rgba` value.
66
+ * The HTML element/tag to render.
67
+ * Use with care when nesting multiple components to ensure valid XHTML:
68
+ * - `<div>` and other block tags are not valid to use inside `<p>`. If using the `<p>` tag, we recommend passing strings/text only.
69
+ * - `<span>` is valid to be nested in any tag, and can have any tag nested within it.
68
70
  */
69
- color: PropTypes.oneOfType([PropTypes.any.isRequired, PropTypes.any.isRequired]),
71
+ component: PropTypes.oneOf(["div", "span", "p"]),
70
72
  /**
71
- * Determines the root element
72
- */
73
- component: PropTypes.oneOf(["div", "span"]),
73
+ * Applies text styling to the child element instead of rendering a parent wrapper.
74
+ * Can only be used when wrapping a *single* child element/tag, and not raw text.
75
+ */
76
+ cloneElement: PropTypes.bool,
74
77
  /**
75
- * Applies text styling to the child element instead of rendering a parent wrapper `span`/`div`.
76
- * Can only be used when wrapping a *single* child element/tag, and not raw text.
77
- */
78
- cloneElement: PropTypes.bool
78
+ * Any of our named colors or a `hex`, `rgb` or `rgba` value.
79
+ * @default inherit
80
+ */
81
+ color: PropTypes.oneOfType([PropTypes.any.isRequired, PropTypes.any.isRequired])
79
82
  };
@@ -0,0 +1 @@
1
+ export {};