@elastic/eui 93.3.0 → 93.5.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 (361) hide show
  1. package/dist/eui_charts_theme.d.ts +9 -0
  2. package/dist/eui_charts_theme.js +56 -14
  3. package/dist/eui_charts_theme.js.map +1 -1
  4. package/dist/eui_theme_dark.css +3 -0
  5. package/dist/eui_theme_dark.min.css +1 -1
  6. package/dist/eui_theme_light.css +3 -0
  7. package/dist/eui_theme_light.min.css +1 -1
  8. package/es/components/breadcrumbs/_breadcrumb_content.js +362 -0
  9. package/es/components/breadcrumbs/_breadcrumb_content.styles.js +48 -0
  10. package/es/components/breadcrumbs/breadcrumb.js +10 -327
  11. package/es/components/breadcrumbs/breadcrumb.styles.js +5 -27
  12. package/es/components/breadcrumbs/breadcrumbs.js +4 -4
  13. package/es/components/breadcrumbs/types.js +1 -0
  14. package/es/components/button/button_group/button_group.js +16 -2
  15. package/es/components/button/button_group/button_group.styles.js +1 -1
  16. package/es/components/button/button_group/button_group_button.js +59 -5
  17. package/es/components/button/button_group/button_group_button.styles.js +39 -3
  18. package/es/components/datagrid/body/cell/data_grid_cell.js +97 -58
  19. package/es/components/datagrid/body/cell/data_grid_cell_actions.js +24 -18
  20. package/es/components/datagrid/body/cell/data_grid_cell_popover.js +64 -56
  21. package/es/components/datagrid/body/cell/data_grid_cell_wrapper.js +32 -31
  22. package/es/components/datagrid/body/cell/index.js +1 -1
  23. package/es/components/datagrid/body/data_grid_body.js +13 -0
  24. package/es/components/datagrid/body/data_grid_body_custom.js +52 -36
  25. package/es/components/datagrid/body/data_grid_body_virtualized.js +84 -56
  26. package/es/components/datagrid/body/data_grid_row_manager.js +6 -4
  27. package/es/components/datagrid/body/footer/use_data_grid_footer.js +1 -2
  28. package/es/components/datagrid/body/header/data_grid_control_header_cell.js +5 -4
  29. package/es/components/datagrid/body/header/data_grid_header_cell.js +73 -53
  30. package/es/components/datagrid/body/header/data_grid_header_row.js +15 -551
  31. package/es/components/datagrid/body/header/use_data_grid_header.js +7 -6
  32. package/es/components/datagrid/controls/column_selector.js +126 -123
  33. package/es/components/datagrid/controls/column_sorting.js +605 -103
  34. package/es/components/datagrid/controls/column_sorting_draggable.js +24 -22
  35. package/es/components/datagrid/controls/display_selector.js +109 -107
  36. package/es/components/datagrid/data_grid.a11y.js +13 -12
  37. package/es/components/datagrid/data_grid.js +45 -22
  38. package/es/components/datagrid/utils/col_widths.js +12 -8
  39. package/es/components/datagrid/utils/focus.js +10 -8
  40. package/es/components/datagrid/utils/grid_height_width.js +31 -30
  41. package/es/components/datagrid/utils/ref.js +1 -1
  42. package/es/components/datagrid/utils/row_heights.js +2 -2
  43. package/es/components/datagrid/utils/sorting.js +29 -27
  44. package/es/components/date_picker/super_date_picker/super_date_picker.js +9 -0
  45. package/es/components/date_picker/super_date_picker/super_update_button.js +57 -29
  46. package/es/components/flex/flex_grid.js +22 -8
  47. package/es/components/flex/flex_grid.styles.js +13 -6
  48. package/es/components/flex/flex_group.js +10 -11
  49. package/es/components/flex/flex_item.js +9 -11
  50. package/es/components/flex/flex_item.styles.js +107 -122
  51. package/es/components/flyout/flyout.js +16 -18
  52. package/es/components/header/header_breadcrumbs/header_breadcrumbs.js +3 -5
  53. package/es/components/header/header_links/header_links.js +10 -2
  54. package/es/components/icon/icon.js +3 -3
  55. package/es/components/modal/confirm_modal.js +2 -1
  56. package/es/components/modal/modal.js +12 -3
  57. package/es/components/observer/resize_observer/resize_observer.js +15 -24
  58. package/es/components/panel/panel.js +2 -3
  59. package/es/components/resizable_container/resizable_button.js +2 -3
  60. package/es/components/resizable_container/resizable_collapse_button.js +2 -3
  61. package/es/components/resizable_container/resizable_container.js +1 -2
  62. package/es/components/resizable_container/resizable_container.styles.js +11 -14
  63. package/es/components/resizable_container/resizable_panel.js +6 -8
  64. package/es/components/resizable_container/resizable_panel.styles.js +18 -29
  65. package/es/components/selectable/selectable_list/selectable_list.js +26 -6
  66. package/es/components/spacer/spacer.js +2 -3
  67. package/es/components/toast/global_toast_list.js +70 -73
  68. package/es/components/toast/toast.js +27 -42
  69. package/es/components/toast/toast.styles.js +2 -17
  70. package/es/components/tool_tip/icon_tip.js +4 -3
  71. package/es/global_styling/mixins/_color.js +60 -32
  72. package/es/global_styling/mixins/_padding.js +60 -16
  73. package/es/services/color/eui_palettes.js +21 -13
  74. package/es/services/color/index.js +1 -1
  75. package/es/services/hooks/index.js +1 -0
  76. package/es/services/hooks/useDeepEqual.js +23 -0
  77. package/es/services/index.js +1 -1
  78. package/es/services/theme/style_memoization.js +1 -3
  79. package/eui.d.ts +2558 -2470
  80. package/i18ntokens.json +297 -279
  81. package/lib/components/breadcrumbs/_breadcrumb_content.js +372 -0
  82. package/lib/components/breadcrumbs/_breadcrumb_content.styles.js +55 -0
  83. package/lib/components/breadcrumbs/breadcrumb.js +11 -331
  84. package/lib/components/breadcrumbs/breadcrumb.styles.js +5 -29
  85. package/lib/components/breadcrumbs/breadcrumbs.js +3 -3
  86. package/lib/components/breadcrumbs/types.js +5 -0
  87. package/lib/components/button/button_group/button_group.js +16 -2
  88. package/lib/components/button/button_group/button_group.styles.js +1 -1
  89. package/lib/components/button/button_group/button_group_button.js +59 -5
  90. package/lib/components/button/button_group/button_group_button.styles.js +45 -11
  91. package/lib/components/datagrid/body/cell/data_grid_cell.js +95 -57
  92. package/lib/components/datagrid/body/cell/data_grid_cell_actions.js +24 -18
  93. package/lib/components/datagrid/body/cell/data_grid_cell_popover.js +63 -55
  94. package/lib/components/datagrid/body/cell/data_grid_cell_wrapper.js +32 -31
  95. package/lib/components/datagrid/body/cell/index.js +2 -2
  96. package/lib/components/datagrid/body/data_grid_body.js +13 -0
  97. package/lib/components/datagrid/body/data_grid_body_custom.js +51 -35
  98. package/lib/components/datagrid/body/data_grid_body_virtualized.js +83 -55
  99. package/lib/components/datagrid/body/data_grid_row_manager.js +5 -3
  100. package/lib/components/datagrid/body/footer/use_data_grid_footer.js +1 -2
  101. package/lib/components/datagrid/body/header/data_grid_control_header_cell.js +8 -4
  102. package/lib/components/datagrid/body/header/data_grid_header_cell.js +72 -52
  103. package/lib/components/datagrid/body/header/data_grid_header_row.js +14 -550
  104. package/lib/components/datagrid/body/header/use_data_grid_header.js +7 -6
  105. package/lib/components/datagrid/controls/column_selector.js +126 -123
  106. package/lib/components/datagrid/controls/column_sorting.js +615 -110
  107. package/lib/components/datagrid/controls/column_sorting_draggable.js +27 -22
  108. package/lib/components/datagrid/controls/display_selector.js +109 -107
  109. package/lib/components/datagrid/data_grid.a11y.js +13 -12
  110. package/lib/components/datagrid/data_grid.js +43 -20
  111. package/lib/components/datagrid/utils/col_widths.js +12 -8
  112. package/lib/components/datagrid/utils/focus.js +10 -8
  113. package/lib/components/datagrid/utils/grid_height_width.js +29 -28
  114. package/lib/components/datagrid/utils/ref.js +1 -1
  115. package/lib/components/datagrid/utils/row_heights.js +1 -1
  116. package/lib/components/datagrid/utils/sorting.js +31 -29
  117. package/lib/components/date_picker/super_date_picker/super_date_picker.js +9 -0
  118. package/lib/components/date_picker/super_date_picker/super_update_button.js +57 -29
  119. package/lib/components/flex/flex_grid.js +23 -7
  120. package/lib/components/flex/flex_grid.styles.js +13 -6
  121. package/lib/components/flex/flex_group.js +10 -10
  122. package/lib/components/flex/flex_item.js +13 -13
  123. package/lib/components/flex/flex_item.styles.js +107 -122
  124. package/lib/components/flyout/flyout.js +16 -18
  125. package/lib/components/header/header_breadcrumbs/header_breadcrumbs.js +3 -5
  126. package/lib/components/header/header_links/header_links.js +10 -2
  127. package/lib/components/icon/icon.js +3 -3
  128. package/lib/components/modal/confirm_modal.js +2 -1
  129. package/lib/components/modal/modal.js +12 -3
  130. package/lib/components/observer/resize_observer/resize_observer.js +15 -24
  131. package/lib/components/panel/panel.js +1 -2
  132. package/lib/components/resizable_container/resizable_button.js +1 -2
  133. package/lib/components/resizable_container/resizable_collapse_button.js +1 -2
  134. package/lib/components/resizable_container/resizable_container.js +1 -2
  135. package/lib/components/resizable_container/resizable_container.styles.js +11 -14
  136. package/lib/components/resizable_container/resizable_panel.js +3 -5
  137. package/lib/components/resizable_container/resizable_panel.styles.js +17 -28
  138. package/lib/components/selectable/selectable_list/selectable_list.js +26 -6
  139. package/lib/components/spacer/spacer.js +1 -2
  140. package/lib/components/toast/global_toast_list.js +68 -71
  141. package/lib/components/toast/toast.js +25 -40
  142. package/lib/components/toast/toast.styles.js +11 -25
  143. package/lib/components/tool_tip/icon_tip.js +4 -3
  144. package/lib/global_styling/mixins/_color.js +65 -40
  145. package/lib/global_styling/mixins/_padding.js +66 -25
  146. package/lib/services/color/eui_palettes.js +24 -14
  147. package/lib/services/color/index.js +14 -0
  148. package/lib/services/hooks/index.js +11 -0
  149. package/lib/services/hooks/useDeepEqual.js +30 -0
  150. package/lib/services/index.js +15 -1
  151. package/lib/services/theme/style_memoization.js +1 -3
  152. package/optimize/es/components/breadcrumbs/_breadcrumb_content.js +153 -0
  153. package/optimize/es/components/breadcrumbs/_breadcrumb_content.styles.js +48 -0
  154. package/optimize/es/components/breadcrumbs/breadcrumb.js +10 -110
  155. package/optimize/es/components/breadcrumbs/breadcrumb.styles.js +5 -27
  156. package/optimize/es/components/breadcrumbs/breadcrumbs.js +4 -4
  157. package/optimize/es/components/breadcrumbs/types.js +1 -0
  158. package/optimize/es/components/button/button_group/button_group.js +2 -2
  159. package/optimize/es/components/button/button_group/button_group.styles.js +1 -1
  160. package/optimize/es/components/button/button_group/button_group_button.js +36 -4
  161. package/optimize/es/components/button/button_group/button_group_button.styles.js +39 -3
  162. package/optimize/es/components/datagrid/body/cell/data_grid_cell.js +80 -55
  163. package/optimize/es/components/datagrid/body/cell/data_grid_cell_actions.js +24 -18
  164. package/optimize/es/components/datagrid/body/cell/data_grid_cell_popover.js +64 -56
  165. package/optimize/es/components/datagrid/body/cell/data_grid_cell_wrapper.js +32 -31
  166. package/optimize/es/components/datagrid/body/cell/index.js +1 -1
  167. package/optimize/es/components/datagrid/body/data_grid_body_custom.js +39 -36
  168. package/optimize/es/components/datagrid/body/data_grid_body_virtualized.js +69 -49
  169. package/optimize/es/components/datagrid/body/data_grid_row_manager.js +6 -4
  170. package/optimize/es/components/datagrid/body/footer/use_data_grid_footer.js +1 -2
  171. package/optimize/es/components/datagrid/body/header/data_grid_control_header_cell.js +4 -3
  172. package/optimize/es/components/datagrid/body/header/data_grid_header_cell.js +65 -49
  173. package/optimize/es/components/datagrid/body/header/data_grid_header_row.js +15 -13
  174. package/optimize/es/components/datagrid/body/header/use_data_grid_header.js +7 -6
  175. package/optimize/es/components/datagrid/controls/column_selector.js +126 -123
  176. package/optimize/es/components/datagrid/controls/column_sorting.js +121 -103
  177. package/optimize/es/components/datagrid/controls/column_sorting_draggable.js +24 -22
  178. package/optimize/es/components/datagrid/controls/display_selector.js +109 -107
  179. package/optimize/es/components/datagrid/data_grid.a11y.js +13 -12
  180. package/optimize/es/components/datagrid/data_grid.js +45 -22
  181. package/optimize/es/components/datagrid/utils/col_widths.js +9 -5
  182. package/optimize/es/components/datagrid/utils/focus.js +10 -8
  183. package/optimize/es/components/datagrid/utils/grid_height_width.js +31 -30
  184. package/optimize/es/components/datagrid/utils/ref.js +1 -1
  185. package/optimize/es/components/datagrid/utils/row_heights.js +2 -2
  186. package/optimize/es/components/datagrid/utils/sorting.js +29 -27
  187. package/optimize/es/components/date_picker/super_date_picker/super_update_button.js +49 -29
  188. package/optimize/es/components/flex/flex_grid.js +19 -8
  189. package/optimize/es/components/flex/flex_grid.styles.js +13 -6
  190. package/optimize/es/components/flex/flex_group.js +9 -10
  191. package/optimize/es/components/flex/flex_item.js +9 -11
  192. package/optimize/es/components/flex/flex_item.styles.js +107 -122
  193. package/optimize/es/components/flyout/flyout.js +16 -18
  194. package/optimize/es/components/header/header_breadcrumbs/header_breadcrumbs.js +3 -5
  195. package/optimize/es/components/header/header_links/header_links.js +3 -2
  196. package/optimize/es/components/icon/icon.js +3 -3
  197. package/optimize/es/components/modal/confirm_modal.js +2 -1
  198. package/optimize/es/components/modal/modal.js +6 -2
  199. package/optimize/es/components/observer/resize_observer/resize_observer.js +15 -24
  200. package/optimize/es/components/panel/panel.js +2 -3
  201. package/optimize/es/components/resizable_container/resizable_button.js +2 -3
  202. package/optimize/es/components/resizable_container/resizable_collapse_button.js +2 -3
  203. package/optimize/es/components/resizable_container/resizable_container.js +1 -2
  204. package/optimize/es/components/resizable_container/resizable_container.styles.js +11 -14
  205. package/optimize/es/components/resizable_container/resizable_panel.js +6 -8
  206. package/optimize/es/components/resizable_container/resizable_panel.styles.js +18 -26
  207. package/optimize/es/components/selectable/selectable_list/selectable_list.js +26 -6
  208. package/optimize/es/components/spacer/spacer.js +2 -3
  209. package/optimize/es/components/toast/global_toast_list.js +70 -73
  210. package/optimize/es/components/toast/toast.js +27 -42
  211. package/optimize/es/components/toast/toast.styles.js +2 -17
  212. package/optimize/es/components/tool_tip/icon_tip.js +4 -3
  213. package/optimize/es/global_styling/mixins/_color.js +57 -32
  214. package/optimize/es/global_styling/mixins/_padding.js +52 -16
  215. package/optimize/es/services/color/eui_palettes.js +21 -13
  216. package/optimize/es/services/color/index.js +1 -1
  217. package/optimize/es/services/hooks/index.js +1 -0
  218. package/optimize/es/services/hooks/useDeepEqual.js +23 -0
  219. package/optimize/es/services/index.js +1 -1
  220. package/optimize/es/services/theme/style_memoization.js +1 -3
  221. package/optimize/lib/components/breadcrumbs/_breadcrumb_content.js +163 -0
  222. package/optimize/lib/components/breadcrumbs/_breadcrumb_content.styles.js +55 -0
  223. package/optimize/lib/components/breadcrumbs/breadcrumb.js +10 -113
  224. package/optimize/lib/components/breadcrumbs/breadcrumb.styles.js +5 -29
  225. package/optimize/lib/components/breadcrumbs/breadcrumbs.js +3 -3
  226. package/optimize/lib/components/breadcrumbs/types.js +5 -0
  227. package/optimize/lib/components/button/button_group/button_group.js +2 -2
  228. package/optimize/lib/components/button/button_group/button_group.styles.js +1 -1
  229. package/optimize/lib/components/button/button_group/button_group_button.js +37 -5
  230. package/optimize/lib/components/button/button_group/button_group_button.styles.js +45 -11
  231. package/optimize/lib/components/datagrid/body/cell/data_grid_cell.js +78 -54
  232. package/optimize/lib/components/datagrid/body/cell/data_grid_cell_actions.js +24 -18
  233. package/optimize/lib/components/datagrid/body/cell/data_grid_cell_popover.js +63 -55
  234. package/optimize/lib/components/datagrid/body/cell/data_grid_cell_wrapper.js +32 -31
  235. package/optimize/lib/components/datagrid/body/cell/index.js +2 -2
  236. package/optimize/lib/components/datagrid/body/data_grid_body_custom.js +38 -35
  237. package/optimize/lib/components/datagrid/body/data_grid_body_virtualized.js +70 -50
  238. package/optimize/lib/components/datagrid/body/data_grid_row_manager.js +5 -3
  239. package/optimize/lib/components/datagrid/body/footer/use_data_grid_footer.js +1 -2
  240. package/optimize/lib/components/datagrid/body/header/data_grid_control_header_cell.js +8 -4
  241. package/optimize/lib/components/datagrid/body/header/data_grid_header_cell.js +65 -49
  242. package/optimize/lib/components/datagrid/body/header/data_grid_header_row.js +14 -12
  243. package/optimize/lib/components/datagrid/body/header/use_data_grid_header.js +7 -6
  244. package/optimize/lib/components/datagrid/controls/column_selector.js +126 -123
  245. package/optimize/lib/components/datagrid/controls/column_sorting.js +125 -107
  246. package/optimize/lib/components/datagrid/controls/column_sorting_draggable.js +27 -22
  247. package/optimize/lib/components/datagrid/controls/display_selector.js +109 -107
  248. package/optimize/lib/components/datagrid/data_grid.a11y.js +13 -12
  249. package/optimize/lib/components/datagrid/data_grid.js +43 -20
  250. package/optimize/lib/components/datagrid/utils/col_widths.js +9 -5
  251. package/optimize/lib/components/datagrid/utils/focus.js +10 -8
  252. package/optimize/lib/components/datagrid/utils/grid_height_width.js +29 -28
  253. package/optimize/lib/components/datagrid/utils/ref.js +1 -1
  254. package/optimize/lib/components/datagrid/utils/row_heights.js +1 -1
  255. package/optimize/lib/components/datagrid/utils/sorting.js +31 -29
  256. package/optimize/lib/components/date_picker/super_date_picker/super_update_button.js +49 -29
  257. package/optimize/lib/components/flex/flex_grid.js +21 -7
  258. package/optimize/lib/components/flex/flex_grid.styles.js +13 -6
  259. package/optimize/lib/components/flex/flex_group.js +9 -9
  260. package/optimize/lib/components/flex/flex_item.js +13 -13
  261. package/optimize/lib/components/flex/flex_item.styles.js +107 -122
  262. package/optimize/lib/components/flyout/flyout.js +16 -18
  263. package/optimize/lib/components/header/header_breadcrumbs/header_breadcrumbs.js +3 -5
  264. package/optimize/lib/components/header/header_links/header_links.js +3 -2
  265. package/optimize/lib/components/icon/icon.js +3 -3
  266. package/optimize/lib/components/modal/confirm_modal.js +2 -1
  267. package/optimize/lib/components/modal/modal.js +6 -2
  268. package/optimize/lib/components/observer/resize_observer/resize_observer.js +15 -24
  269. package/optimize/lib/components/panel/panel.js +1 -2
  270. package/optimize/lib/components/resizable_container/resizable_button.js +1 -2
  271. package/optimize/lib/components/resizable_container/resizable_collapse_button.js +1 -2
  272. package/optimize/lib/components/resizable_container/resizable_container.js +1 -2
  273. package/optimize/lib/components/resizable_container/resizable_container.styles.js +11 -14
  274. package/optimize/lib/components/resizable_container/resizable_panel.js +3 -5
  275. package/optimize/lib/components/resizable_container/resizable_panel.styles.js +17 -26
  276. package/optimize/lib/components/selectable/selectable_list/selectable_list.js +26 -6
  277. package/optimize/lib/components/spacer/spacer.js +1 -2
  278. package/optimize/lib/components/toast/global_toast_list.js +68 -71
  279. package/optimize/lib/components/toast/toast.js +25 -40
  280. package/optimize/lib/components/toast/toast.styles.js +11 -25
  281. package/optimize/lib/components/tool_tip/icon_tip.js +4 -3
  282. package/optimize/lib/global_styling/mixins/_color.js +63 -40
  283. package/optimize/lib/global_styling/mixins/_padding.js +59 -25
  284. package/optimize/lib/services/color/eui_palettes.js +24 -14
  285. package/optimize/lib/services/color/index.js +14 -0
  286. package/optimize/lib/services/hooks/index.js +11 -0
  287. package/optimize/lib/services/hooks/useDeepEqual.js +30 -0
  288. package/optimize/lib/services/index.js +15 -1
  289. package/optimize/lib/services/theme/style_memoization.js +1 -3
  290. package/package.json +8 -11
  291. package/src/components/form/text_area/_text_area.scss +5 -0
  292. package/src/components/selectable/selectable_list/_selectable_list.scss +2 -0
  293. package/test-env/components/breadcrumbs/_breadcrumb_content.js +363 -0
  294. package/test-env/components/breadcrumbs/_breadcrumb_content.styles.js +55 -0
  295. package/test-env/components/breadcrumbs/breadcrumb.js +11 -326
  296. package/test-env/components/breadcrumbs/breadcrumb.styles.js +5 -29
  297. package/test-env/components/breadcrumbs/breadcrumbs.js +3 -3
  298. package/test-env/components/breadcrumbs/types.js +5 -0
  299. package/test-env/components/button/button_group/button_group.js +16 -2
  300. package/test-env/components/button/button_group/button_group.styles.js +1 -1
  301. package/test-env/components/button/button_group/button_group_button.js +56 -5
  302. package/test-env/components/button/button_group/button_group_button.styles.js +45 -11
  303. package/test-env/components/datagrid/body/cell/data_grid_cell.js +95 -57
  304. package/test-env/components/datagrid/body/cell/data_grid_cell_actions.js +24 -18
  305. package/test-env/components/datagrid/body/cell/data_grid_cell_popover.js +63 -55
  306. package/test-env/components/datagrid/body/cell/data_grid_cell_wrapper.js +32 -31
  307. package/test-env/components/datagrid/body/cell/index.js +2 -2
  308. package/test-env/components/datagrid/body/data_grid_body.js +13 -0
  309. package/test-env/components/datagrid/body/data_grid_body_custom.js +51 -35
  310. package/test-env/components/datagrid/body/data_grid_body_virtualized.js +83 -55
  311. package/test-env/components/datagrid/body/data_grid_row_manager.js +5 -3
  312. package/test-env/components/datagrid/body/footer/use_data_grid_footer.js +1 -2
  313. package/test-env/components/datagrid/body/header/data_grid_control_header_cell.js +8 -4
  314. package/test-env/components/datagrid/body/header/data_grid_header_cell.js +72 -52
  315. package/test-env/components/datagrid/body/header/data_grid_header_row.js +14 -550
  316. package/test-env/components/datagrid/body/header/use_data_grid_header.js +7 -6
  317. package/test-env/components/datagrid/controls/column_selector.js +126 -123
  318. package/test-env/components/datagrid/controls/column_sorting.js +607 -106
  319. package/test-env/components/datagrid/controls/column_sorting_draggable.js +27 -22
  320. package/test-env/components/datagrid/controls/display_selector.js +109 -107
  321. package/test-env/components/datagrid/data_grid.a11y.js +13 -12
  322. package/test-env/components/datagrid/data_grid.js +43 -20
  323. package/test-env/components/datagrid/utils/col_widths.js +9 -5
  324. package/test-env/components/datagrid/utils/focus.js +10 -8
  325. package/test-env/components/datagrid/utils/grid_height_width.js +29 -28
  326. package/test-env/components/datagrid/utils/ref.js +1 -1
  327. package/test-env/components/datagrid/utils/row_heights.js +1 -1
  328. package/test-env/components/datagrid/utils/sorting.js +31 -29
  329. package/test-env/components/date_picker/super_date_picker/super_date_picker.js +9 -0
  330. package/test-env/components/date_picker/super_date_picker/super_update_button.js +57 -29
  331. package/test-env/components/flex/flex_grid.js +21 -7
  332. package/test-env/components/flex/flex_grid.styles.js +13 -6
  333. package/test-env/components/flex/flex_group.js +10 -10
  334. package/test-env/components/flex/flex_item.js +13 -13
  335. package/test-env/components/flex/flex_item.styles.js +107 -122
  336. package/test-env/components/header/header_breadcrumbs/header_breadcrumbs.js +3 -5
  337. package/test-env/components/header/header_links/header_links.js +10 -2
  338. package/test-env/components/modal/confirm_modal.js +2 -1
  339. package/test-env/components/modal/modal.js +12 -3
  340. package/test-env/components/panel/panel.js +1 -2
  341. package/test-env/components/resizable_container/resizable_button.js +1 -2
  342. package/test-env/components/resizable_container/resizable_collapse_button.js +1 -2
  343. package/test-env/components/resizable_container/resizable_container.js +1 -2
  344. package/test-env/components/resizable_container/resizable_container.styles.js +11 -14
  345. package/test-env/components/resizable_container/resizable_panel.js +3 -5
  346. package/test-env/components/resizable_container/resizable_panel.styles.js +17 -26
  347. package/test-env/components/selectable/selectable_list/selectable_list.js +26 -6
  348. package/test-env/components/spacer/spacer.js +1 -2
  349. package/test-env/components/toast/global_toast_list.js +68 -71
  350. package/test-env/components/toast/toast.js +25 -40
  351. package/test-env/components/toast/toast.styles.js +11 -25
  352. package/test-env/components/tool_tip/icon_tip.js +4 -3
  353. package/test-env/global_styling/mixins/_color.js +63 -40
  354. package/test-env/global_styling/mixins/_padding.js +59 -25
  355. package/test-env/services/color/eui_palettes.js +24 -14
  356. package/test-env/services/color/index.js +14 -0
  357. package/test-env/services/hooks/index.js +11 -0
  358. package/test-env/services/hooks/useDeepEqual.js +30 -0
  359. package/test-env/services/index.js +15 -1
  360. package/test-env/services/theme/style_memoization.js +1 -3
  361. package/src/themes/charts/theme.scss +0 -5
@@ -12,128 +12,113 @@ function _EMOTION_STRINGIFIED_CSS_ERROR__() { return "You have tried to stringif
12
12
  * in compliance with, at your election, the Elastic License 2.0 or the Server
13
13
  * Side Public License, v 1.
14
14
  */
15
- var _ref = process.env.NODE_ENV === "production" ? {
16
- name: "n7polf-10",
17
- styles: "flex-grow:10;label:10;"
18
- } : {
19
- name: "n7polf-10",
20
- styles: "flex-grow:10;label:10;",
21
- toString: _EMOTION_STRINGIFIED_CSS_ERROR__
22
- };
23
- var _ref2 = process.env.NODE_ENV === "production" ? {
24
- name: "1tyr8p6-9",
25
- styles: "flex-grow:9;label:9;"
26
- } : {
27
- name: "1tyr8p6-9",
28
- styles: "flex-grow:9;label:9;",
29
- toString: _EMOTION_STRINGIFIED_CSS_ERROR__
30
- };
31
- var _ref3 = process.env.NODE_ENV === "production" ? {
32
- name: "fjdgzc-8",
33
- styles: "flex-grow:8;label:8;"
34
- } : {
35
- name: "fjdgzc-8",
36
- styles: "flex-grow:8;label:8;",
37
- toString: _EMOTION_STRINGIFIED_CSS_ERROR__
38
- };
39
- var _ref4 = process.env.NODE_ENV === "production" ? {
40
- name: "fvh3nz-7",
41
- styles: "flex-grow:7;label:7;"
42
- } : {
43
- name: "fvh3nz-7",
44
- styles: "flex-grow:7;label:7;",
45
- toString: _EMOTION_STRINGIFIED_CSS_ERROR__
46
- };
47
- var _ref5 = process.env.NODE_ENV === "production" ? {
48
- name: "1in9iiy-6",
49
- styles: "flex-grow:6;label:6;"
50
- } : {
51
- name: "1in9iiy-6",
52
- styles: "flex-grow:6;label:6;",
53
- toString: _EMOTION_STRINGIFIED_CSS_ERROR__
54
- };
55
- var _ref6 = process.env.NODE_ENV === "production" ? {
56
- name: "1cx5fxs-5",
57
- styles: "flex-grow:5;label:5;"
58
- } : {
59
- name: "1cx5fxs-5",
60
- styles: "flex-grow:5;label:5;",
61
- toString: _EMOTION_STRINGIFIED_CSS_ERROR__
62
- };
63
- var _ref7 = process.env.NODE_ENV === "production" ? {
64
- name: "k4pnsg-4",
65
- styles: "flex-grow:4;label:4;"
66
- } : {
67
- name: "k4pnsg-4",
68
- styles: "flex-grow:4;label:4;",
69
- toString: _EMOTION_STRINGIFIED_CSS_ERROR__
70
- };
71
- var _ref8 = process.env.NODE_ENV === "production" ? {
72
- name: "1sl79ay-3",
73
- styles: "flex-grow:3;label:3;"
74
- } : {
75
- name: "1sl79ay-3",
76
- styles: "flex-grow:3;label:3;",
77
- toString: _EMOTION_STRINGIFIED_CSS_ERROR__
78
- };
79
- var _ref9 = process.env.NODE_ENV === "production" ? {
80
- name: "1l86xxh-2",
81
- styles: "flex-grow:2;label:2;"
82
- } : {
83
- name: "1l86xxh-2",
84
- styles: "flex-grow:2;label:2;",
85
- toString: _EMOTION_STRINGIFIED_CSS_ERROR__
86
- };
87
- var _ref10 = process.env.NODE_ENV === "production" ? {
88
- name: "1v6uyoj-1",
89
- styles: "flex-grow:1;label:1;"
90
- } : {
91
- name: "1v6uyoj-1",
92
- styles: "flex-grow:1;label:1;",
93
- toString: _EMOTION_STRINGIFIED_CSS_ERROR__
94
- };
95
- var _ref11 = process.env.NODE_ENV === "production" ? {
96
- name: "tr4wer-grow",
97
- styles: "flex-basis:0%;label:grow;"
98
- } : {
99
- name: "tr4wer-grow",
100
- styles: "flex-basis:0%;label:grow;",
101
- toString: _EMOTION_STRINGIFIED_CSS_ERROR__
102
- };
103
- var _ref12 = process.env.NODE_ENV === "production" ? {
104
- name: "1pat7n0-growZero",
105
- styles: "flex-grow:0;flex-basis:auto;label:growZero;"
106
- } : {
107
- name: "1pat7n0-growZero",
108
- styles: "flex-grow:0;flex-basis:auto;label:growZero;",
109
- toString: _EMOTION_STRINGIFIED_CSS_ERROR__
110
- };
111
- var _ref13 = process.env.NODE_ENV === "production" ? {
112
- name: "19hf44n-euiFlexItem",
113
- styles: "display:flex;flex-direction:column;label:euiFlexItem;"
114
- } : {
115
- name: "19hf44n-euiFlexItem",
116
- styles: "display:flex;flex-direction:column;label:euiFlexItem;",
117
- toString: _EMOTION_STRINGIFIED_CSS_ERROR__
118
- };
119
- var euiFlexItemStyles = function euiFlexItemStyles() {
120
- return {
121
- // 1. Allow EuiPanels to expand to fill the item.
122
- euiFlexItem: _ref13,
123
- growZero: _ref12,
124
- grow: _ref11,
125
- growSizes: {
126
- '1': _ref10,
127
- '2': _ref9,
128
- '3': _ref8,
129
- '4': _ref7,
130
- '5': _ref6,
131
- '6': _ref5,
132
- '7': _ref4,
133
- '8': _ref3,
134
- '9': _ref2,
135
- '10': _ref
15
+ var euiFlexItemStyles = {
16
+ // 1. Allow EuiPanels to expand to fill the item.
17
+ euiFlexItem: process.env.NODE_ENV === "production" ? {
18
+ name: "19hf44n-euiFlexItem",
19
+ styles: "display:flex;flex-direction:column;label:euiFlexItem;"
20
+ } : {
21
+ name: "19hf44n-euiFlexItem",
22
+ styles: "display:flex;flex-direction:column;label:euiFlexItem;",
23
+ toString: _EMOTION_STRINGIFIED_CSS_ERROR__
24
+ },
25
+ growZero: process.env.NODE_ENV === "production" ? {
26
+ name: "1pat7n0-growZero",
27
+ styles: "flex-grow:0;flex-basis:auto;label:growZero;"
28
+ } : {
29
+ name: "1pat7n0-growZero",
30
+ styles: "flex-grow:0;flex-basis:auto;label:growZero;",
31
+ toString: _EMOTION_STRINGIFIED_CSS_ERROR__
32
+ },
33
+ grow: process.env.NODE_ENV === "production" ? {
34
+ name: "tr4wer-grow",
35
+ styles: "flex-basis:0%;label:grow;"
36
+ } : {
37
+ name: "tr4wer-grow",
38
+ styles: "flex-basis:0%;label:grow;",
39
+ toString: _EMOTION_STRINGIFIED_CSS_ERROR__
40
+ },
41
+ growSizes: {
42
+ '1': process.env.NODE_ENV === "production" ? {
43
+ name: "1v6uyoj-1",
44
+ styles: "flex-grow:1;label:1;"
45
+ } : {
46
+ name: "1v6uyoj-1",
47
+ styles: "flex-grow:1;label:1;",
48
+ toString: _EMOTION_STRINGIFIED_CSS_ERROR__
49
+ },
50
+ '2': process.env.NODE_ENV === "production" ? {
51
+ name: "1l86xxh-2",
52
+ styles: "flex-grow:2;label:2;"
53
+ } : {
54
+ name: "1l86xxh-2",
55
+ styles: "flex-grow:2;label:2;",
56
+ toString: _EMOTION_STRINGIFIED_CSS_ERROR__
57
+ },
58
+ '3': process.env.NODE_ENV === "production" ? {
59
+ name: "1sl79ay-3",
60
+ styles: "flex-grow:3;label:3;"
61
+ } : {
62
+ name: "1sl79ay-3",
63
+ styles: "flex-grow:3;label:3;",
64
+ toString: _EMOTION_STRINGIFIED_CSS_ERROR__
65
+ },
66
+ '4': process.env.NODE_ENV === "production" ? {
67
+ name: "k4pnsg-4",
68
+ styles: "flex-grow:4;label:4;"
69
+ } : {
70
+ name: "k4pnsg-4",
71
+ styles: "flex-grow:4;label:4;",
72
+ toString: _EMOTION_STRINGIFIED_CSS_ERROR__
73
+ },
74
+ '5': process.env.NODE_ENV === "production" ? {
75
+ name: "1cx5fxs-5",
76
+ styles: "flex-grow:5;label:5;"
77
+ } : {
78
+ name: "1cx5fxs-5",
79
+ styles: "flex-grow:5;label:5;",
80
+ toString: _EMOTION_STRINGIFIED_CSS_ERROR__
81
+ },
82
+ '6': process.env.NODE_ENV === "production" ? {
83
+ name: "1in9iiy-6",
84
+ styles: "flex-grow:6;label:6;"
85
+ } : {
86
+ name: "1in9iiy-6",
87
+ styles: "flex-grow:6;label:6;",
88
+ toString: _EMOTION_STRINGIFIED_CSS_ERROR__
89
+ },
90
+ '7': process.env.NODE_ENV === "production" ? {
91
+ name: "fvh3nz-7",
92
+ styles: "flex-grow:7;label:7;"
93
+ } : {
94
+ name: "fvh3nz-7",
95
+ styles: "flex-grow:7;label:7;",
96
+ toString: _EMOTION_STRINGIFIED_CSS_ERROR__
97
+ },
98
+ '8': process.env.NODE_ENV === "production" ? {
99
+ name: "fjdgzc-8",
100
+ styles: "flex-grow:8;label:8;"
101
+ } : {
102
+ name: "fjdgzc-8",
103
+ styles: "flex-grow:8;label:8;",
104
+ toString: _EMOTION_STRINGIFIED_CSS_ERROR__
105
+ },
106
+ '9': process.env.NODE_ENV === "production" ? {
107
+ name: "1tyr8p6-9",
108
+ styles: "flex-grow:9;label:9;"
109
+ } : {
110
+ name: "1tyr8p6-9",
111
+ styles: "flex-grow:9;label:9;",
112
+ toString: _EMOTION_STRINGIFIED_CSS_ERROR__
113
+ },
114
+ '10': process.env.NODE_ENV === "production" ? {
115
+ name: "n7polf-10",
116
+ styles: "flex-grow:10;label:10;"
117
+ } : {
118
+ name: "n7polf-10",
119
+ styles: "flex-grow:10;label:10;",
120
+ toString: _EMOTION_STRINGIFIED_CSS_ERROR__
136
121
  }
137
- };
122
+ }
138
123
  };
139
124
  exports.euiFlexItemStyles = euiFlexItemStyles;
@@ -111,33 +111,31 @@ var EuiFlyout = /*#__PURE__*/(0, _react.forwardRef)(function (_ref, ref) {
111
111
  resizeRef = _useState2[0],
112
112
  setResizeRef = _useState2[1];
113
113
  var setRef = (0, _services.useCombinedRefs)([setResizeRef, ref]);
114
- // TODO: Allow this hook to be conditional
115
- var dimensions = (0, _resize_observer.useResizeObserver)(resizeRef);
114
+ var _useResizeObserver = (0, _resize_observer.useResizeObserver)(isPushed ? resizeRef : null, 'width'),
115
+ width = _useResizeObserver.width;
116
116
  (0, _react.useEffect)(function () {
117
- // This class doesn't actually do anything by EUI, but is nice to add for consumers (JIC)
118
- document.body.classList.add('euiBody--hasFlyout');
119
-
120
117
  /**
121
118
  * Accomodate for the `isPushed` state by adding padding to the body equal to the width of the element
122
119
  */
123
120
  if (isPushed) {
124
- if (side === 'right') {
125
- document.body.style.paddingInlineEnd = "".concat(dimensions.width, "px");
126
- } else if (side === 'left') {
127
- document.body.style.paddingInlineStart = "".concat(dimensions.width, "px");
128
- }
121
+ var paddingSide = side === 'left' ? 'paddingInlineStart' : 'paddingInlineEnd';
122
+ document.body.style[paddingSide] = "".concat(width, "px");
123
+ return function () {
124
+ document.body.style[paddingSide] = '';
125
+ };
129
126
  }
127
+ }, [isPushed, side, width]);
128
+
129
+ /**
130
+ * This class doesn't actually do anything by EUI, but is nice to add for consumers (JIC)
131
+ */
132
+ (0, _react.useEffect)(function () {
133
+ document.body.classList.add('euiBody--hasFlyout');
130
134
  return function () {
135
+ // Remove the hasFlyout class when the flyout is unmounted
131
136
  document.body.classList.remove('euiBody--hasFlyout');
132
- if (isPushed) {
133
- if (side === 'right') {
134
- document.body.style.paddingInlineEnd = '';
135
- } else if (side === 'left') {
136
- document.body.style.paddingInlineStart = '';
137
- }
138
- }
139
137
  };
140
- }, [side, dimensions, isPushed]);
138
+ }, []);
141
139
 
142
140
  /**
143
141
  * ESC key closes flyout (always?)
@@ -7,9 +7,9 @@ exports.EuiHeaderBreadcrumbs = void 0;
7
7
  var _react = _interopRequireDefault(require("react"));
8
8
  var _propTypes = _interopRequireDefault(require("prop-types"));
9
9
  var _classnames = _interopRequireDefault(require("classnames"));
10
+ var _services = require("../../../services");
10
11
  var _breadcrumbs = require("../../breadcrumbs");
11
12
  var _header_breadcrumbs = require("./header_breadcrumbs.styles");
12
- var _services = require("../../../services");
13
13
  var _react2 = require("@emotion/react");
14
14
  var _excluded = ["className", "breadcrumbs"];
15
15
  /*
@@ -28,15 +28,13 @@ var EuiHeaderBreadcrumbs = function EuiHeaderBreadcrumbs(_ref) {
28
28
  breadcrumbs = _ref.breadcrumbs,
29
29
  rest = _objectWithoutProperties(_ref, _excluded);
30
30
  var classes = (0, _classnames.default)('euiHeaderBreadcrumbs', className);
31
- var euiTheme = (0, _services.useEuiTheme)();
32
- var styles = (0, _header_breadcrumbs.euiHeaderBreadcrumbsStyles)(euiTheme);
33
- var cssHeaderBreadcrumbStyles = [styles.euiHeaderBreadcrumbs];
31
+ var styles = (0, _services.useEuiMemoizedStyles)(_header_breadcrumbs.euiHeaderBreadcrumbsStyles);
34
32
  return (0, _react2.jsx)(_breadcrumbs.EuiBreadcrumbs, _extends({
35
33
  max: 4,
36
34
  truncate: true,
37
35
  breadcrumbs: breadcrumbs,
38
36
  className: classes,
39
- css: cssHeaderBreadcrumbStyles,
37
+ css: styles.euiHeaderBreadcrumbs,
40
38
  type: "application"
41
39
  }, rest));
42
40
  };
@@ -88,6 +88,7 @@ var EuiHeaderLinks = function EuiHeaderLinks(_ref) {
88
88
  size: "m"
89
89
  }));
90
90
  });
91
+ var renderedChildren = typeof children === 'function' ? children(closeMenu) : children;
91
92
  return (0, _react2.jsx)(_i18n.EuiI18n, {
92
93
  token: "euiHeaderLinks.appNavigation",
93
94
  default: "App menu"
@@ -101,7 +102,7 @@ var EuiHeaderLinks = function EuiHeaderLinks(_ref) {
101
102
  }, (0, _react2.jsx)("div", {
102
103
  className: "euiHeaderLinks__list",
103
104
  css: [styles.euiHeaderLinks__list, styles.gutterSizes[gutterSize], ";label:EuiHeaderLinks;"]
104
- }, children)), (0, _react2.jsx)(_responsive.EuiShowFor, {
105
+ }, renderedChildren)), (0, _react2.jsx)(_responsive.EuiShowFor, {
105
106
  sizes: popoverBreakpoints
106
107
  }, (0, _react2.jsx)(_popover.EuiPopover, _extends({
107
108
  button: button,
@@ -113,7 +114,7 @@ var EuiHeaderLinks = function EuiHeaderLinks(_ref) {
113
114
  }, popoverProps), (0, _react2.jsx)("div", {
114
115
  className: "euiHeaderLinks__mobileList",
115
116
  css: styles.euiHeaderLinks__mobileList
116
- }, children))));
117
+ }, renderedChildren))));
117
118
  });
118
119
  };
119
120
  exports.EuiHeaderLinks = EuiHeaderLinks;
@@ -122,6 +123,13 @@ EuiHeaderLinks.propTypes = {
122
123
  "aria-label": _propTypes.default.string,
123
124
  "data-test-subj": _propTypes.default.string,
124
125
  css: _propTypes.default.any,
126
+ /**
127
+ * Takes any rendered node(s), typically of `EuiHeaderLink`s.
128
+ *
129
+ * Optionally takes a render function that will pass a callback allowing you
130
+ * to close the mobile popover from within your popover content.
131
+ */
132
+ children: _propTypes.default.oneOfType([_propTypes.default.node.isRequired, _propTypes.default.func.isRequired]),
125
133
  /**
126
134
  * Spacing between direct children
127
135
  */
@@ -244,8 +244,8 @@ var EuiIconClass = /*#__PURE__*/function (_PureComponent) {
244
244
  } else {
245
245
  var Svg = icon;
246
246
 
247
- // If it's an empty icon, or if there is no aria-label, aria-labelledby, or title it gets aria-hidden true
248
- var isAriaHidden = icon === _empty.icon || !(this.props['aria-label'] || this.props['aria-labelledby'] || this.props.title);
247
+ // If there is no aria-label, aria-labelledby, or title it gets aria-hidden true
248
+ var isAriaHidden = !(this.props['aria-label'] || this.props['aria-labelledby'] || this.props.title);
249
249
 
250
250
  // If no aria-label or aria-labelledby is provided but there's a title, a titleId is generated
251
251
  // The svg aria-labelledby attribute gets this titleId
@@ -265,7 +265,7 @@ var EuiIconClass = /*#__PURE__*/function (_PureComponent) {
265
265
  "data-is-loaded": isLoaded || undefined,
266
266
  "data-is-loading": isLoading || undefined
267
267
  }, rest, {
268
- "aria-hidden": isAriaHidden || undefined
268
+ "aria-hidden": isAriaHidden || rest['aria-hidden']
269
269
  }));
270
270
  }
271
271
  }
@@ -85,7 +85,8 @@ var EuiConfirmModal = function EuiConfirmModal(_ref) {
85
85
  return (0, _react2.jsx)(_modal.EuiModal, _extends({
86
86
  className: classes,
87
87
  css: cssStyles,
88
- onClose: onCancel
88
+ onClose: onCancel,
89
+ role: "alertdialog"
89
90
  }, rest), modalTitle, message && (0, _react2.jsx)(_modal_body.EuiModalBody, null, (0, _react2.jsx)(_text.EuiText, {
90
91
  "data-test-subj": "confirmModalBodyText"
91
92
  }, message)), (0, _react2.jsx)(_modal_footer.EuiModalFooter, null, (0, _react2.jsx)(_button.EuiButtonEmpty, {
@@ -15,7 +15,7 @@ var _overlay_mask = require("../overlay_mask");
15
15
  var _i18n = require("../i18n");
16
16
  var _modal = require("./modal.styles");
17
17
  var _react2 = require("@emotion/react");
18
- var _excluded = ["className", "children", "initialFocus", "onClose", "maxWidth", "style"];
18
+ var _excluded = ["className", "children", "initialFocus", "onClose", "maxWidth", "role", "style"];
19
19
  /*
20
20
  * Copyright Elasticsearch B.V. and/or licensed to Elasticsearch B.V. under one
21
21
  * or more contributor license agreements. Licensed under the Elastic License
@@ -39,6 +39,8 @@ var EuiModal = function EuiModal(_ref) {
39
39
  onClose = _ref.onClose,
40
40
  _ref$maxWidth = _ref.maxWidth,
41
41
  maxWidth = _ref$maxWidth === void 0 ? true : _ref$maxWidth,
42
+ _ref$role = _ref.role,
43
+ role = _ref$role === void 0 ? 'dialog' : _ref$role,
42
44
  style = _ref.style,
43
45
  rest = _objectWithoutProperties(_ref, _excluded);
44
46
  var onKeyDown = function onKeyDown(event) {
@@ -68,7 +70,9 @@ var EuiModal = function EuiModal(_ref) {
68
70
  className: classes,
69
71
  onKeyDown: onKeyDown,
70
72
  tabIndex: 0,
71
- style: newStyle
73
+ style: newStyle,
74
+ role: role,
75
+ "aria-modal": true
72
76
  }, rest), (0, _react2.jsx)(_i18n.EuiI18n, {
73
77
  token: "euiModal.closeModal",
74
78
  default: "Closes this modal window"
@@ -103,5 +107,10 @@ EuiModal.propTypes = {
103
107
  * Specifies what element should initially have focus.
104
108
  * Can be a DOM node, or a selector string (which will be passed to document.querySelector() to find the DOM node), or a function that returns a DOM node.
105
109
  */
106
- initialFocus: _propTypes.default.oneOfType([_propTypes.default.any.isRequired, _propTypes.default.func.isRequired, _propTypes.default.string.isRequired])
110
+ initialFocus: _propTypes.default.oneOfType([_propTypes.default.any.isRequired, _propTypes.default.func.isRequired, _propTypes.default.string.isRequired]),
111
+ /**
112
+ * Identifies a modal dialog to screen readers. Modal dialogs that confirm destructive actions
113
+ * or need a user's attention should use "alertdialog".
114
+ */
115
+ role: _propTypes.default.oneOf(["dialog", "alertdialog"])
107
116
  };
@@ -49,14 +49,13 @@ var EuiResizeObserver = /*#__PURE__*/function (_EuiObserver) {
49
49
  height: 0,
50
50
  width: 0
51
51
  });
52
- _defineProperty(_assertThisInitialized(_this), "onResize", function () {
53
- // `entry.contentRect` provides incomplete `height` and `width` data.
54
- // Use `getBoundingClientRect` to account for padding and border.
55
- // https://developer.mozilla.org/en-US/docs/Web/API/DOMRectReadOnly
56
- if (!_this.childNode) return;
57
- var _this$childNode$getBo = _this.childNode.getBoundingClientRect(),
58
- height = _this$childNode$getBo.height,
59
- width = _this$childNode$getBo.width;
52
+ _defineProperty(_assertThisInitialized(_this), "onResize", function (_ref) {
53
+ var _ref2 = _slicedToArray(_ref, 1),
54
+ entry = _ref2[0];
55
+ var _entry$borderBoxSize$ = entry.borderBoxSize[0],
56
+ width = _entry$borderBoxSize$.inlineSize,
57
+ height = _entry$borderBoxSize$.blockSize;
58
+
60
59
  // Check for actual resize event
61
60
  if (_this.state.height === height && _this.state.width === width) {
62
61
  return;
@@ -111,23 +110,15 @@ var useResizeObserver = function useResizeObserver(container, dimension) {
111
110
  }, [dimension]);
112
111
  (0, _react.useEffect)(function () {
113
112
  if (container != null) {
114
- // ResizeObserver's first call to the observation callback is scheduled in the future
115
- // so find the container's initial dimensions now
116
- var boundingRect = container.getBoundingClientRect();
117
- setSize({
118
- width: boundingRect.width,
119
- height: boundingRect.height
120
- });
121
- var observer = makeResizeObserver(container, function () {
122
- // `entry.contentRect` provides incomplete `height` and `width` data.
123
- // Use `getBoundingClientRect` to account for padding and border.
124
- // https://developer.mozilla.org/en-US/docs/Web/API/DOMRectReadOnly
125
- var _container$getBoundin = container.getBoundingClientRect(),
126
- height = _container$getBoundin.height,
127
- width = _container$getBoundin.width;
113
+ var observer = makeResizeObserver(container, function (_ref3) {
114
+ var _ref4 = _slicedToArray(_ref3, 1),
115
+ entry = _ref4[0];
116
+ var _entry$borderBoxSize$2 = entry.borderBoxSize[0],
117
+ inlineSize = _entry$borderBoxSize$2.inlineSize,
118
+ blockSize = _entry$borderBoxSize$2.blockSize;
128
119
  setSize({
129
- width: width,
130
- height: height
120
+ width: inlineSize,
121
+ height: blockSize
131
122
  });
132
123
  });
133
124
  return function () {
@@ -62,11 +62,10 @@ var EuiPanel = function EuiPanel(_ref) {
62
62
  panelRef = _ref.panelRef,
63
63
  element = _ref.element,
64
64
  rest = _objectWithoutProperties(_ref, _excluded);
65
- var euiTheme = (0, _services.useEuiTheme)();
66
65
  // Shadows are only allowed when there's a white background (plain)
67
66
  var canHaveShadow = !hasBorder && color === 'plain';
68
67
  var canHaveBorder = color === 'plain' || color === 'transparent';
69
- var styles = (0, _panel.euiPanelStyles)(euiTheme);
68
+ var styles = (0, _services.useEuiMemoizedStyles)(_panel.euiPanelStyles);
70
69
  var cssStyles = [styles.euiPanel, grow && styles.grow, styles.radius[borderRadius], (0, _global_styling.useEuiPaddingCSS)()[paddingSize], (0, _global_styling.useEuiBackgroundColorCSS)()[color], canHaveShadow && hasShadow === true && styles.hasShadow, canHaveBorder && hasBorder === true && styles.hasBorder, rest.onClick && styles.isClickable];
71
70
  var classes = (0, _classnames.default)('euiPanel', "euiPanel--".concat(color), _defineProperty({}, "euiPanel--".concat(paddingSizeToClassNameMap[paddingSize]), paddingSizeToClassNameMap[paddingSize]), className);
72
71
  if (rest.onClick && element !== 'div') {
@@ -48,8 +48,7 @@ var EuiResizableButton = /*#__PURE__*/(0, _react.forwardRef)(function (_ref, ref
48
48
  rest = _objectWithoutProperties(_ref, _excluded);
49
49
  var classes = (0, _classnames.default)('euiResizableButton', className);
50
50
  var resizeDirection = isHorizontal ? 'horizontal' : 'vertical';
51
- var euiTheme = (0, _services.useEuiTheme)();
52
- var styles = (0, _resizable_button.euiResizableButtonStyles)(euiTheme);
51
+ var styles = (0, _services.useEuiMemoizedStyles)(_resizable_button.euiResizableButtonStyles);
53
52
  var cssStyles = [styles.euiResizableButton, styles[indicator], styles["".concat(indicator, "Direction")][resizeDirection], styles[resizeDirection], indicator === 'handle' && styles.alignIndicator[alignIndicator]];
54
53
  return (0, _react2.jsx)(_i18n.EuiI18n, {
55
54
  tokens: ['euiResizableButton.horizontalResizerAriaLabel', 'euiResizableButton.verticalResizerAriaLabel'],
@@ -44,8 +44,7 @@ var EuiResizableCollapseButton = function EuiResizableCollapseButton(_ref) {
44
44
  var isHorizontal = direction === 'horizontal';
45
45
  var showOnFocus = !isCollapsed && !isVisible;
46
46
  var screenReaderOnlyStyles = (0, _screen_reader_only.euiScreenReaderOnlyStyles)(showOnFocus).euiScreenReaderOnly;
47
- var euiTheme = (0, _services.useEuiTheme)();
48
- var styles = (0, _resizable_collapse_button.euiResizableCollapseButtonStyles)(euiTheme);
47
+ var styles = (0, _services.useEuiMemoizedStyles)(_resizable_collapse_button.euiResizableCollapseButtonStyles);
49
48
  var collapsedStyles = [styles.collapsed.collapsed, styles.collapsed[direction], styles.collapsed["".concat(direction, "Positions")][internalPosition]];
50
49
  var collapsibleStyles = [styles.collapsible.collapsible, styles.collapsible[direction][externalPosition], styles.collapsible[direction][internalPosition]];
51
50
  var cssStyles = [styles.euiResizableCollapseButton, showOnFocus && screenReaderOnlyStyles].concat(_toConsumableArray(isCollapsed ? collapsedStyles : collapsibleStyles));
@@ -67,8 +67,7 @@ var EuiResizableContainer = function EuiResizableContainer(_ref) {
67
67
  var containerRef = (0, _react.useRef)(null);
68
68
  var isHorizontal = direction === 'horizontal';
69
69
  var classes = (0, _classnames.default)('euiResizableContainer', className);
70
- var styles = (0, _resizable_container.euiResizableContainerStyles)();
71
- var cssStyles = [styles.euiResizableContainer, styles[direction]];
70
+ var cssStyles = [_resizable_container.euiResizableContainerStyles.euiResizableContainer, _resizable_container.euiResizableContainerStyles[direction]];
72
71
  var _useContainerCallback = (0, _helpers.useContainerCallbacks)({
73
72
  initialState: _objectSpread(_objectSpread({}, initialState), {}, {
74
73
  isHorizontal: isHorizontal
@@ -13,19 +13,16 @@ function _EMOTION_STRINGIFIED_CSS_ERROR__() { return "You have tried to stringif
13
13
  * in compliance with, at your election, the Elastic License 2.0 or the Server
14
14
  * Side Public License, v 1.
15
15
  */
16
- var _ref = process.env.NODE_ENV === "production" ? {
17
- name: "omnk2l-vertical",
18
- styles: "flex-direction:column;label:vertical;"
19
- } : {
20
- name: "omnk2l-vertical",
21
- styles: "flex-direction:column;label:vertical;",
22
- toString: _EMOTION_STRINGIFIED_CSS_ERROR__
23
- };
24
- var euiResizableContainerStyles = function euiResizableContainerStyles() {
25
- return {
26
- euiResizableContainer: /*#__PURE__*/(0, _react.css)("display:flex;", (0, _global_styling.logicalCSS)('width', '100%'), ";;label:euiResizableContainer;"),
27
- horizontal: /*#__PURE__*/(0, _react.css)(";label:horizontal;"),
28
- vertical: _ref
29
- };
16
+ var euiResizableContainerStyles = {
17
+ euiResizableContainer: /*#__PURE__*/(0, _react.css)("display:flex;", (0, _global_styling.logicalCSS)('width', '100%'), ";;label:euiResizableContainer;"),
18
+ horizontal: /*#__PURE__*/(0, _react.css)(";label:horizontal;"),
19
+ vertical: process.env.NODE_ENV === "production" ? {
20
+ name: "omnk2l-vertical",
21
+ styles: "flex-direction:column;label:vertical;"
22
+ } : {
23
+ name: "omnk2l-vertical",
24
+ styles: "flex-direction:column;label:vertical;",
25
+ toString: _EMOTION_STRINGIFIED_CSS_ERROR__
26
+ }
30
27
  };
31
28
  exports.euiResizableContainerStyles = euiResizableContainerStyles;
@@ -148,15 +148,13 @@ var EuiResizablePanel = function EuiResizablePanel(_ref) {
148
148
  return direction;
149
149
  }, [isCollapsed, isCollapsible, position, panels, panelId]);
150
150
  var axis = isHorizontal ? 'horizontal' : 'vertical';
151
- var euiTheme = (0, _services.useEuiTheme)();
152
- var styles = (0, _resizable_panel.euiResizablePanelStyles)(euiTheme);
153
- var cssStyles = [styles.euiResizablePanel, isCollapsed && styles.collapsed, styles.paddingSizes[wrapperPadding], wrapperProps === null || wrapperProps === void 0 ? void 0 : wrapperProps.css];
154
- var contentStyles = (0, _resizable_panel.euiResizablePanelContentStyles)(euiTheme);
151
+ var cssStyles = [_resizable_panel.euiResizablePanelStyles.euiResizablePanel, isCollapsed && _resizable_panel.euiResizablePanelStyles.collapsed, (0, _global_styling.useEuiPaddingCSS)()[wrapperPadding], wrapperProps === null || wrapperProps === void 0 ? void 0 : wrapperProps.css];
152
+ var contentStyles = (0, _services.useEuiMemoizedStyles)(_resizable_panel.euiResizablePanelContentStyles);
155
153
  var contentCssStyles = [contentStyles.euiResizablePanel__content, scrollable && contentStyles.scrollable, isCollapsed && contentStyles.collapsedChildren, isCollapsed && !isCollapsible && contentStyles[axis].collapsed, isCollapsible && contentStyles[axis].hasCollapsibleButton];
156
154
  var classes = (0, _classnames.default)('euiResizablePanel', wrapperProps === null || wrapperProps === void 0 ? void 0 : wrapperProps.className);
157
155
  var panelClasses = (0, _classnames.default)('euiResizablePanel__content', className);
158
156
  var inlineStyles = _objectSpread(_objectSpread({}, wrapperProps === null || wrapperProps === void 0 ? void 0 : wrapperProps.style), isHorizontal ? (0, _global_styling.logicalSizeStyle)("".concat(size || innerSize, "%"), 'auto') : (0, _global_styling.logicalSizeStyle)('100%', "".concat(size || innerSize, "%")));
159
- var padding = (0, _global_styling.euiPaddingSize)(euiTheme, paddingSize) || '0px';
157
+ var padding = (0, _global_styling.useEuiPaddingSize)(paddingSize) || '0px';
160
158
  (0, _react.useEffect)(function () {
161
159
  if (!registration) return;
162
160
  var initSize = size !== null && size !== void 0 ? size : initialSize || 0;