@elastic/eui 97.2.0 → 97.3.0-borealis.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 (502) hide show
  1. package/es/components/badge/badge.js +1 -1
  2. package/es/components/badge/badge.styles.js +2 -2
  3. package/es/components/badge/beta_badge/beta_badge.js +1 -1
  4. package/es/components/badge/beta_badge/beta_badge.styles.js +1 -0
  5. package/es/components/badge/color_utils.js +8 -7
  6. package/es/components/badge/notification_badge/badge_notification.js +1 -1
  7. package/es/components/badge/notification_badge/badge_notification.styles.js +1 -0
  8. package/es/components/bottom_bar/bottom_bar.styles.js +1 -2
  9. package/es/components/breadcrumbs/_breadcrumb_content.styles.js +4 -6
  10. package/es/components/button/button.js +1 -1
  11. package/es/components/button/button_display/_button_display.styles.js +1 -1
  12. package/es/components/button/button_empty/button_empty.js +1 -1
  13. package/es/components/button/button_group/button_group_button.js +1 -1
  14. package/es/components/button/button_group/button_group_button.styles.js +4 -4
  15. package/es/components/button/button_icon/button_icon.js +1 -1
  16. package/es/components/card/card.styles.js +1 -1
  17. package/es/components/code/code_block_annotations.js +1 -1
  18. package/es/components/code/code_block_line.styles.js +1 -2
  19. package/es/components/collapsible_nav/collapsible_nav_group/collapsible_nav_group.styles.js +3 -5
  20. package/es/components/collapsible_nav_beta/collapsible_nav_item/collapsible_nav_item.styles.js +1 -1
  21. package/es/components/color_picker/color_palette_display/color_palette_display.styles.js +1 -2
  22. package/es/components/color_picker/color_picker.styles.js +1 -2
  23. package/es/components/color_picker/color_picker_swatch.styles.js +1 -1
  24. package/es/components/combo_box/combo_box.js +9 -6
  25. package/es/components/common.js +0 -28
  26. package/es/components/context_menu/context_menu_panel.js +17 -1
  27. package/es/components/datagrid/body/cell/data_grid_cell.js +31 -8
  28. package/es/components/datagrid/body/data_grid_body.js +8 -0
  29. package/es/components/datagrid/body/data_grid_body_custom.js +8 -1
  30. package/es/components/datagrid/body/data_grid_body_virtualized.js +8 -1
  31. package/es/components/datagrid/controls/data_grid_toolbar.styles.js +2 -2
  32. package/es/components/datagrid/controls/display_selector.js +277 -207
  33. package/es/components/datagrid/data_grid.stories.utils.js +28 -2
  34. package/es/components/datagrid/data_grid.styles.js +4 -6
  35. package/es/components/datagrid/utils/grid_height_width.js +1 -1
  36. package/es/components/datagrid/utils/row_heights.js +29 -13
  37. package/es/components/date_picker/react_date_picker.styles.js +2 -1
  38. package/es/components/date_picker/super_date_picker/super_date_picker.styles.js +3 -4
  39. package/es/components/drag_and_drop/droppable.styles.js +2 -4
  40. package/es/components/empty_prompt/empty_prompt.styles.js +5 -2
  41. package/es/components/filter_group/filter_select_item.styles.js +1 -2
  42. package/es/components/flyout/_flyout_close_button.styles.js +1 -2
  43. package/es/components/form/form.styles.js +21 -28
  44. package/es/components/form/range/range_tooltip.styles.js +3 -7
  45. package/es/components/form/switch/switch.js +3 -7
  46. package/es/components/form/switch/switch.styles.js +16 -19
  47. package/es/components/header/header.styles.js +12 -6
  48. package/es/components/icon/icon.styles.js +9 -8
  49. package/es/components/icon/named_colors.js +1 -1
  50. package/es/components/inline_edit/inline_edit_form.styles.js +1 -2
  51. package/es/components/key_pad_menu/key_pad_menu_item.styles.js +1 -2
  52. package/es/components/list_group/list_group_item.styles.js +9 -11
  53. package/es/components/mark/mark.styles.js +2 -9
  54. package/es/components/markdown_editor/markdown_editor_drop_zone.styles.js +2 -3
  55. package/es/components/markdown_editor/markdown_format.styles.js +2 -2
  56. package/es/components/overlay_mask/overlay_mask.styles.js +1 -2
  57. package/es/components/page_template/inner/page_inner.styles.js +2 -2
  58. package/es/components/popover/popover_footer.styles.js +1 -1
  59. package/es/components/popover/popover_panel/_popover_panel.styles.js +3 -4
  60. package/es/components/progress/progress.js +1 -1
  61. package/es/components/progress/progress.styles.js +8 -6
  62. package/es/components/selectable/selectable_list/selectable_list_item.styles.js +1 -2
  63. package/es/components/side_nav/side_nav_item.styles.js +1 -2
  64. package/es/components/skeleton/utils.js +3 -5
  65. package/es/components/steps/step_number.styles.js +1 -1
  66. package/es/components/table/table_cells_shared.styles.js +2 -7
  67. package/es/components/table/table_row.styles.js +8 -10
  68. package/es/components/text/text.styles.js +2 -2
  69. package/es/components/text/text_color.js +1 -1
  70. package/es/components/text/text_color.styles.js +6 -5
  71. package/es/components/tool_tip/tool_tip.styles.js +8 -10
  72. package/es/components/tour/_tour_footer.styles.js +2 -4
  73. package/es/components/tree_view/tree_view_item.styles.js +1 -2
  74. package/es/global_styling/functions/size.js +1 -17
  75. package/es/global_styling/mixins/_button.js +159 -0
  76. package/es/global_styling/mixins/_color.js +40 -31
  77. package/es/global_styling/mixins/index.js +2 -1
  78. package/es/global_styling/reset/global_styles.js +2 -2
  79. package/es/global_styling/variables/_colors_vis.js +1 -53
  80. package/es/global_styling/variables/animations.js +1 -22
  81. package/es/global_styling/variables/breakpoint.js +1 -7
  82. package/es/global_styling/variables/levels.js +1 -17
  83. package/es/global_styling/variables/shadow.js +1 -11
  84. package/es/global_styling/variables/size.js +1 -1
  85. package/es/global_styling/variables/typography.js +1 -32
  86. package/es/services/hooks/useDeepEqual.js +18 -6
  87. package/es/services/theme/provider.js +11 -0
  88. package/es/services/theme/types.js +1 -6
  89. package/es/services/theme/utils.js +1 -303
  90. package/es/themes/amsterdam/global_styling/mixins/button.js +1 -203
  91. package/es/themes/amsterdam/global_styling/variables/_buttons.js +281 -0
  92. package/es/themes/amsterdam/global_styling/variables/_colors.js +587 -18
  93. package/es/themes/amsterdam/global_styling/variables/_components.js +442 -0
  94. package/es/themes/amsterdam/global_styling/variables/_forms.js +149 -0
  95. package/es/themes/amsterdam/theme.js +3 -1
  96. package/es/themes/index.js +1 -1
  97. package/es/themes/themes.js +7 -0
  98. package/eui.d.ts +2120 -2627
  99. package/i18ntokens.json +88 -106
  100. package/lib/components/badge/badge.js +1 -1
  101. package/lib/components/badge/badge.styles.js +2 -2
  102. package/lib/components/badge/beta_badge/beta_badge.js +1 -1
  103. package/lib/components/badge/beta_badge/beta_badge.styles.js +1 -0
  104. package/lib/components/badge/color_utils.js +13 -12
  105. package/lib/components/badge/notification_badge/badge_notification.js +1 -1
  106. package/lib/components/badge/notification_badge/badge_notification.styles.js +1 -0
  107. package/lib/components/bottom_bar/bottom_bar.styles.js +1 -2
  108. package/lib/components/breadcrumbs/_breadcrumb_content.styles.js +4 -6
  109. package/lib/components/button/button.js +1 -1
  110. package/lib/components/button/button_display/_button_display.styles.js +1 -1
  111. package/lib/components/button/button_empty/button_empty.js +1 -1
  112. package/lib/components/button/button_group/button_group_button.js +1 -1
  113. package/lib/components/button/button_group/button_group_button.styles.js +3 -3
  114. package/lib/components/button/button_icon/button_icon.js +1 -1
  115. package/lib/components/card/card.styles.js +1 -1
  116. package/lib/components/code/code_block_annotations.js +1 -1
  117. package/lib/components/code/code_block_line.styles.js +1 -2
  118. package/lib/components/collapsible_nav/collapsible_nav_group/collapsible_nav_group.styles.js +3 -5
  119. package/lib/components/collapsible_nav_beta/collapsible_nav_item/collapsible_nav_item.styles.js +1 -1
  120. package/lib/components/color_picker/color_palette_display/color_palette_display.styles.js +1 -2
  121. package/lib/components/color_picker/color_picker.styles.js +1 -2
  122. package/lib/components/color_picker/color_picker_swatch.styles.js +1 -1
  123. package/lib/components/combo_box/combo_box.js +9 -6
  124. package/lib/components/common.js +0 -28
  125. package/lib/components/context_menu/context_menu_panel.js +17 -1
  126. package/lib/components/datagrid/body/cell/data_grid_cell.js +31 -8
  127. package/lib/components/datagrid/body/data_grid_body.js +8 -0
  128. package/lib/components/datagrid/body/data_grid_body_custom.js +8 -1
  129. package/lib/components/datagrid/body/data_grid_body_virtualized.js +8 -1
  130. package/lib/components/datagrid/controls/data_grid_toolbar.styles.js +2 -2
  131. package/lib/components/datagrid/controls/display_selector.js +275 -204
  132. package/lib/components/datagrid/data_grid.stories.utils.js +28 -2
  133. package/lib/components/datagrid/data_grid.styles.js +4 -6
  134. package/lib/components/datagrid/utils/grid_height_width.js +1 -1
  135. package/lib/components/datagrid/utils/row_heights.js +29 -13
  136. package/lib/components/date_picker/react_date_picker.styles.js +3 -2
  137. package/lib/components/date_picker/super_date_picker/super_date_picker.styles.js +2 -3
  138. package/lib/components/drag_and_drop/droppable.styles.js +2 -4
  139. package/lib/components/empty_prompt/empty_prompt.styles.js +4 -1
  140. package/lib/components/filter_group/filter_select_item.styles.js +1 -2
  141. package/lib/components/flyout/_flyout_close_button.styles.js +1 -2
  142. package/lib/components/form/form.styles.js +20 -27
  143. package/lib/components/form/range/range_tooltip.styles.js +3 -7
  144. package/lib/components/form/switch/switch.js +3 -7
  145. package/lib/components/form/switch/switch.styles.js +16 -19
  146. package/lib/components/header/header.styles.js +11 -5
  147. package/lib/components/icon/icon.styles.js +9 -8
  148. package/lib/components/icon/named_colors.js +1 -1
  149. package/lib/components/inline_edit/inline_edit_form.styles.js +1 -2
  150. package/lib/components/key_pad_menu/key_pad_menu_item.styles.js +1 -2
  151. package/lib/components/list_group/list_group_item.styles.js +8 -10
  152. package/lib/components/mark/mark.styles.js +2 -9
  153. package/lib/components/markdown_editor/markdown_editor_drop_zone.styles.js +2 -3
  154. package/lib/components/markdown_editor/markdown_format.styles.js +2 -2
  155. package/lib/components/overlay_mask/overlay_mask.styles.js +1 -2
  156. package/lib/components/page_template/inner/page_inner.styles.js +1 -1
  157. package/lib/components/popover/popover_footer.styles.js +1 -1
  158. package/lib/components/popover/popover_panel/_popover_panel.styles.js +3 -4
  159. package/lib/components/progress/progress.js +1 -1
  160. package/lib/components/progress/progress.styles.js +8 -6
  161. package/lib/components/selectable/selectable_list/selectable_list_item.styles.js +1 -2
  162. package/lib/components/side_nav/side_nav_item.styles.js +1 -2
  163. package/lib/components/skeleton/utils.js +3 -5
  164. package/lib/components/steps/step_number.styles.js +1 -1
  165. package/lib/components/table/table_cells_shared.styles.js +2 -7
  166. package/lib/components/table/table_row.styles.js +7 -9
  167. package/lib/components/text/text.styles.js +1 -1
  168. package/lib/components/text/text_color.js +1 -1
  169. package/lib/components/text/text_color.styles.js +6 -5
  170. package/lib/components/tool_tip/tool_tip.styles.js +8 -10
  171. package/lib/components/tour/_tour_footer.styles.js +2 -4
  172. package/lib/components/tree_view/tree_view_item.styles.js +1 -2
  173. package/lib/global_styling/functions/size.js +7 -26
  174. package/lib/global_styling/mixins/_button.js +164 -0
  175. package/lib/global_styling/mixins/_color.js +39 -30
  176. package/lib/global_styling/mixins/index.js +11 -0
  177. package/lib/global_styling/reset/global_styles.js +1 -1
  178. package/lib/global_styling/variables/_colors_vis.js +6 -61
  179. package/lib/global_styling/variables/animations.js +25 -31
  180. package/lib/global_styling/variables/breakpoint.js +7 -16
  181. package/lib/global_styling/variables/levels.js +7 -26
  182. package/lib/global_styling/variables/shadow.js +13 -20
  183. package/lib/global_styling/variables/size.js +7 -10
  184. package/lib/global_styling/variables/typography.js +19 -41
  185. package/lib/services/hooks/useDeepEqual.js +17 -7
  186. package/lib/services/theme/provider.js +11 -0
  187. package/lib/services/theme/types.js +13 -14
  188. package/lib/services/theme/utils.js +54 -303
  189. package/lib/themes/amsterdam/global_styling/mixins/button.js +45 -206
  190. package/lib/themes/amsterdam/global_styling/variables/_buttons.js +285 -0
  191. package/lib/themes/amsterdam/global_styling/variables/_colors.js +586 -18
  192. package/lib/themes/amsterdam/global_styling/variables/_components.js +446 -0
  193. package/lib/themes/amsterdam/global_styling/variables/_forms.js +153 -0
  194. package/lib/themes/amsterdam/theme.js +3 -1
  195. package/lib/themes/index.js +7 -0
  196. package/lib/themes/themes.js +8 -1
  197. package/optimize/es/components/badge/badge.js +1 -1
  198. package/optimize/es/components/badge/badge.styles.js +2 -2
  199. package/optimize/es/components/badge/beta_badge/beta_badge.js +1 -1
  200. package/optimize/es/components/badge/beta_badge/beta_badge.styles.js +1 -0
  201. package/optimize/es/components/badge/color_utils.js +8 -7
  202. package/optimize/es/components/badge/notification_badge/badge_notification.js +1 -1
  203. package/optimize/es/components/badge/notification_badge/badge_notification.styles.js +1 -0
  204. package/optimize/es/components/bottom_bar/bottom_bar.styles.js +1 -2
  205. package/optimize/es/components/breadcrumbs/_breadcrumb_content.styles.js +4 -6
  206. package/optimize/es/components/button/button.js +1 -1
  207. package/optimize/es/components/button/button_display/_button_display.styles.js +1 -1
  208. package/optimize/es/components/button/button_empty/button_empty.js +1 -1
  209. package/optimize/es/components/button/button_group/button_group_button.js +1 -1
  210. package/optimize/es/components/button/button_group/button_group_button.styles.js +4 -4
  211. package/optimize/es/components/button/button_icon/button_icon.js +1 -1
  212. package/optimize/es/components/card/card.styles.js +1 -1
  213. package/optimize/es/components/code/code_block_annotations.js +1 -1
  214. package/optimize/es/components/code/code_block_line.styles.js +1 -2
  215. package/optimize/es/components/collapsible_nav/collapsible_nav_group/collapsible_nav_group.styles.js +3 -5
  216. package/optimize/es/components/collapsible_nav_beta/collapsible_nav_item/collapsible_nav_item.styles.js +1 -1
  217. package/optimize/es/components/color_picker/color_palette_display/color_palette_display.styles.js +1 -2
  218. package/optimize/es/components/color_picker/color_picker.styles.js +1 -2
  219. package/optimize/es/components/color_picker/color_picker_swatch.styles.js +1 -1
  220. package/optimize/es/components/combo_box/combo_box.js +9 -6
  221. package/optimize/es/components/common.js +0 -28
  222. package/optimize/es/components/context_menu/context_menu_panel.js +11 -1
  223. package/optimize/es/components/datagrid/body/cell/data_grid_cell.js +15 -8
  224. package/optimize/es/components/datagrid/body/data_grid_body_custom.js +0 -1
  225. package/optimize/es/components/datagrid/body/data_grid_body_virtualized.js +0 -1
  226. package/optimize/es/components/datagrid/controls/data_grid_toolbar.styles.js +2 -2
  227. package/optimize/es/components/datagrid/controls/display_selector.js +277 -207
  228. package/optimize/es/components/datagrid/data_grid.styles.js +4 -6
  229. package/optimize/es/components/datagrid/utils/grid_height_width.js +1 -1
  230. package/optimize/es/components/datagrid/utils/row_heights.js +29 -13
  231. package/optimize/es/components/date_picker/react_date_picker.styles.js +2 -1
  232. package/optimize/es/components/date_picker/super_date_picker/super_date_picker.styles.js +3 -4
  233. package/optimize/es/components/drag_and_drop/droppable.styles.js +2 -4
  234. package/optimize/es/components/empty_prompt/empty_prompt.styles.js +5 -2
  235. package/optimize/es/components/filter_group/filter_select_item.styles.js +1 -2
  236. package/optimize/es/components/flyout/_flyout_close_button.styles.js +1 -2
  237. package/optimize/es/components/form/form.styles.js +21 -28
  238. package/optimize/es/components/form/range/range_tooltip.styles.js +3 -7
  239. package/optimize/es/components/form/switch/switch.js +3 -2
  240. package/optimize/es/components/form/switch/switch.styles.js +16 -19
  241. package/optimize/es/components/header/header.styles.js +12 -6
  242. package/optimize/es/components/icon/icon.styles.js +9 -8
  243. package/optimize/es/components/icon/named_colors.js +1 -1
  244. package/optimize/es/components/inline_edit/inline_edit_form.styles.js +1 -2
  245. package/optimize/es/components/key_pad_menu/key_pad_menu_item.styles.js +1 -2
  246. package/optimize/es/components/list_group/list_group_item.styles.js +9 -11
  247. package/optimize/es/components/mark/mark.styles.js +2 -9
  248. package/optimize/es/components/markdown_editor/markdown_editor_drop_zone.styles.js +2 -3
  249. package/optimize/es/components/markdown_editor/markdown_format.styles.js +2 -2
  250. package/optimize/es/components/overlay_mask/overlay_mask.styles.js +1 -2
  251. package/optimize/es/components/page_template/inner/page_inner.styles.js +2 -2
  252. package/optimize/es/components/popover/popover_footer.styles.js +1 -1
  253. package/optimize/es/components/popover/popover_panel/_popover_panel.styles.js +3 -4
  254. package/optimize/es/components/progress/progress.js +1 -1
  255. package/optimize/es/components/progress/progress.styles.js +8 -6
  256. package/optimize/es/components/selectable/selectable_list/selectable_list_item.styles.js +1 -2
  257. package/optimize/es/components/side_nav/side_nav_item.styles.js +1 -2
  258. package/optimize/es/components/skeleton/utils.js +3 -5
  259. package/optimize/es/components/steps/step_number.styles.js +1 -1
  260. package/optimize/es/components/table/table_cells_shared.styles.js +2 -7
  261. package/optimize/es/components/table/table_row.styles.js +8 -10
  262. package/optimize/es/components/text/text.styles.js +2 -2
  263. package/optimize/es/components/text/text_color.js +1 -1
  264. package/optimize/es/components/text/text_color.styles.js +6 -5
  265. package/optimize/es/components/tool_tip/tool_tip.styles.js +8 -10
  266. package/optimize/es/components/tour/_tour_footer.styles.js +2 -4
  267. package/optimize/es/components/tree_view/tree_view_item.styles.js +1 -2
  268. package/optimize/es/global_styling/functions/size.js +1 -17
  269. package/optimize/es/global_styling/mixins/_button.js +159 -0
  270. package/optimize/es/global_styling/mixins/_color.js +40 -31
  271. package/optimize/es/global_styling/mixins/index.js +2 -1
  272. package/optimize/es/global_styling/reset/global_styles.js +2 -2
  273. package/optimize/es/global_styling/variables/_colors_vis.js +1 -53
  274. package/optimize/es/global_styling/variables/animations.js +1 -22
  275. package/optimize/es/global_styling/variables/breakpoint.js +1 -7
  276. package/optimize/es/global_styling/variables/levels.js +1 -17
  277. package/optimize/es/global_styling/variables/shadow.js +1 -11
  278. package/optimize/es/global_styling/variables/size.js +1 -1
  279. package/optimize/es/global_styling/variables/typography.js +1 -32
  280. package/optimize/es/services/hooks/useDeepEqual.js +13 -6
  281. package/optimize/es/services/theme/provider.js +11 -0
  282. package/optimize/es/services/theme/types.js +1 -6
  283. package/optimize/es/services/theme/utils.js +1 -295
  284. package/optimize/es/themes/amsterdam/global_styling/mixins/button.js +1 -198
  285. package/optimize/es/themes/amsterdam/global_styling/variables/_buttons.js +270 -0
  286. package/optimize/es/themes/amsterdam/global_styling/variables/_colors.js +587 -18
  287. package/optimize/es/themes/amsterdam/global_styling/variables/_components.js +434 -0
  288. package/optimize/es/themes/amsterdam/global_styling/variables/_forms.js +141 -0
  289. package/optimize/es/themes/amsterdam/theme.js +3 -1
  290. package/optimize/es/themes/index.js +1 -1
  291. package/optimize/es/themes/themes.js +7 -0
  292. package/optimize/lib/components/badge/badge.js +1 -1
  293. package/optimize/lib/components/badge/badge.styles.js +2 -2
  294. package/optimize/lib/components/badge/beta_badge/beta_badge.js +1 -1
  295. package/optimize/lib/components/badge/beta_badge/beta_badge.styles.js +1 -0
  296. package/optimize/lib/components/badge/color_utils.js +13 -12
  297. package/optimize/lib/components/badge/notification_badge/badge_notification.js +1 -1
  298. package/optimize/lib/components/badge/notification_badge/badge_notification.styles.js +1 -0
  299. package/optimize/lib/components/bottom_bar/bottom_bar.styles.js +1 -2
  300. package/optimize/lib/components/breadcrumbs/_breadcrumb_content.styles.js +4 -6
  301. package/optimize/lib/components/button/button.js +1 -1
  302. package/optimize/lib/components/button/button_display/_button_display.styles.js +1 -1
  303. package/optimize/lib/components/button/button_empty/button_empty.js +1 -1
  304. package/optimize/lib/components/button/button_group/button_group_button.js +1 -1
  305. package/optimize/lib/components/button/button_group/button_group_button.styles.js +3 -3
  306. package/optimize/lib/components/button/button_icon/button_icon.js +1 -1
  307. package/optimize/lib/components/card/card.styles.js +1 -1
  308. package/optimize/lib/components/code/code_block_annotations.js +1 -1
  309. package/optimize/lib/components/code/code_block_line.styles.js +1 -2
  310. package/optimize/lib/components/collapsible_nav/collapsible_nav_group/collapsible_nav_group.styles.js +3 -5
  311. package/optimize/lib/components/collapsible_nav_beta/collapsible_nav_item/collapsible_nav_item.styles.js +1 -1
  312. package/optimize/lib/components/color_picker/color_palette_display/color_palette_display.styles.js +1 -2
  313. package/optimize/lib/components/color_picker/color_picker.styles.js +1 -2
  314. package/optimize/lib/components/color_picker/color_picker_swatch.styles.js +1 -1
  315. package/optimize/lib/components/combo_box/combo_box.js +9 -6
  316. package/optimize/lib/components/common.js +0 -28
  317. package/optimize/lib/components/context_menu/context_menu_panel.js +11 -1
  318. package/optimize/lib/components/datagrid/body/cell/data_grid_cell.js +15 -8
  319. package/optimize/lib/components/datagrid/body/data_grid_body_custom.js +0 -1
  320. package/optimize/lib/components/datagrid/body/data_grid_body_virtualized.js +0 -1
  321. package/optimize/lib/components/datagrid/controls/data_grid_toolbar.styles.js +2 -2
  322. package/optimize/lib/components/datagrid/controls/display_selector.js +274 -204
  323. package/optimize/lib/components/datagrid/data_grid.styles.js +4 -6
  324. package/optimize/lib/components/datagrid/utils/grid_height_width.js +1 -1
  325. package/optimize/lib/components/datagrid/utils/row_heights.js +29 -13
  326. package/optimize/lib/components/date_picker/react_date_picker.styles.js +3 -2
  327. package/optimize/lib/components/date_picker/super_date_picker/super_date_picker.styles.js +2 -3
  328. package/optimize/lib/components/drag_and_drop/droppable.styles.js +2 -4
  329. package/optimize/lib/components/empty_prompt/empty_prompt.styles.js +4 -1
  330. package/optimize/lib/components/filter_group/filter_select_item.styles.js +1 -2
  331. package/optimize/lib/components/flyout/_flyout_close_button.styles.js +1 -2
  332. package/optimize/lib/components/form/form.styles.js +20 -27
  333. package/optimize/lib/components/form/range/range_tooltip.styles.js +3 -7
  334. package/optimize/lib/components/form/switch/switch.js +3 -2
  335. package/optimize/lib/components/form/switch/switch.styles.js +16 -19
  336. package/optimize/lib/components/header/header.styles.js +11 -5
  337. package/optimize/lib/components/icon/icon.styles.js +9 -8
  338. package/optimize/lib/components/icon/named_colors.js +1 -1
  339. package/optimize/lib/components/inline_edit/inline_edit_form.styles.js +1 -2
  340. package/optimize/lib/components/key_pad_menu/key_pad_menu_item.styles.js +1 -2
  341. package/optimize/lib/components/list_group/list_group_item.styles.js +8 -10
  342. package/optimize/lib/components/mark/mark.styles.js +2 -9
  343. package/optimize/lib/components/markdown_editor/markdown_editor_drop_zone.styles.js +2 -3
  344. package/optimize/lib/components/markdown_editor/markdown_format.styles.js +2 -2
  345. package/optimize/lib/components/overlay_mask/overlay_mask.styles.js +1 -2
  346. package/optimize/lib/components/page_template/inner/page_inner.styles.js +1 -1
  347. package/optimize/lib/components/popover/popover_footer.styles.js +1 -1
  348. package/optimize/lib/components/popover/popover_panel/_popover_panel.styles.js +3 -4
  349. package/optimize/lib/components/progress/progress.js +1 -1
  350. package/optimize/lib/components/progress/progress.styles.js +8 -6
  351. package/optimize/lib/components/selectable/selectable_list/selectable_list_item.styles.js +1 -2
  352. package/optimize/lib/components/side_nav/side_nav_item.styles.js +1 -2
  353. package/optimize/lib/components/skeleton/utils.js +3 -5
  354. package/optimize/lib/components/steps/step_number.styles.js +1 -1
  355. package/optimize/lib/components/table/table_cells_shared.styles.js +2 -7
  356. package/optimize/lib/components/table/table_row.styles.js +7 -9
  357. package/optimize/lib/components/text/text.styles.js +1 -1
  358. package/optimize/lib/components/text/text_color.js +1 -1
  359. package/optimize/lib/components/text/text_color.styles.js +6 -5
  360. package/optimize/lib/components/tool_tip/tool_tip.styles.js +8 -10
  361. package/optimize/lib/components/tour/_tour_footer.styles.js +2 -4
  362. package/optimize/lib/components/tree_view/tree_view_item.styles.js +1 -2
  363. package/optimize/lib/global_styling/functions/size.js +7 -27
  364. package/optimize/lib/global_styling/mixins/_button.js +165 -0
  365. package/optimize/lib/global_styling/mixins/_color.js +39 -30
  366. package/optimize/lib/global_styling/mixins/index.js +11 -0
  367. package/optimize/lib/global_styling/reset/global_styles.js +1 -1
  368. package/optimize/lib/global_styling/variables/_colors_vis.js +6 -61
  369. package/optimize/lib/global_styling/variables/animations.js +25 -31
  370. package/optimize/lib/global_styling/variables/breakpoint.js +7 -16
  371. package/optimize/lib/global_styling/variables/levels.js +7 -26
  372. package/optimize/lib/global_styling/variables/shadow.js +13 -20
  373. package/optimize/lib/global_styling/variables/size.js +7 -10
  374. package/optimize/lib/global_styling/variables/typography.js +19 -41
  375. package/optimize/lib/services/hooks/useDeepEqual.js +12 -5
  376. package/optimize/lib/services/theme/provider.js +11 -0
  377. package/optimize/lib/services/theme/types.js +13 -14
  378. package/optimize/lib/services/theme/utils.js +54 -296
  379. package/optimize/lib/themes/amsterdam/global_styling/mixins/button.js +45 -203
  380. package/optimize/lib/themes/amsterdam/global_styling/variables/_buttons.js +275 -0
  381. package/optimize/lib/themes/amsterdam/global_styling/variables/_colors.js +586 -18
  382. package/optimize/lib/themes/amsterdam/global_styling/variables/_components.js +439 -0
  383. package/optimize/lib/themes/amsterdam/global_styling/variables/_forms.js +146 -0
  384. package/optimize/lib/themes/amsterdam/theme.js +3 -1
  385. package/optimize/lib/themes/index.js +7 -0
  386. package/optimize/lib/themes/themes.js +8 -1
  387. package/package.json +8 -3
  388. package/src/global_styling/functions/_index.scss +1 -5
  389. package/src/global_styling/index.scss +1 -16
  390. package/src/global_styling/variables/_animations.scss +1 -8
  391. package/src/global_styling/variables/_borders.scss +1 -9
  392. package/src/global_styling/variables/_buttons.scss +1 -18
  393. package/src/global_styling/variables/_colors_vis.scss +1 -70
  394. package/src/global_styling/variables/_font_weight.scss +1 -7
  395. package/src/global_styling/variables/_form.scss +2 -21
  396. package/src/global_styling/variables/_responsive.scss +1 -9
  397. package/src/global_styling/variables/_shadows.scss +1 -1
  398. package/src/global_styling/variables/_size.scss +1 -15
  399. package/src/global_styling/variables/_states.scss +1 -14
  400. package/src/global_styling/variables/_typography.scss +1 -75
  401. package/src/global_styling/variables/_z_index.scss +1 -33
  402. package/src/themes/amsterdam/_colors_dark.scss +80 -8
  403. package/src/themes/amsterdam/_colors_light.scss +80 -8
  404. package/src/themes/amsterdam/global_styling/variables/_forms.scss +12 -0
  405. package/src/themes/amsterdam/global_styling/variables/_index.scss +1 -0
  406. package/test-env/components/badge/badge.js +1 -1
  407. package/test-env/components/badge/badge.styles.js +2 -2
  408. package/test-env/components/badge/beta_badge/beta_badge.js +1 -1
  409. package/test-env/components/badge/beta_badge/beta_badge.styles.js +1 -0
  410. package/test-env/components/badge/color_utils.js +13 -12
  411. package/test-env/components/badge/notification_badge/badge_notification.js +1 -1
  412. package/test-env/components/badge/notification_badge/badge_notification.styles.js +1 -0
  413. package/test-env/components/bottom_bar/bottom_bar.styles.js +1 -2
  414. package/test-env/components/breadcrumbs/_breadcrumb_content.styles.js +4 -6
  415. package/test-env/components/button/button.js +1 -1
  416. package/test-env/components/button/button_display/_button_display.styles.js +1 -1
  417. package/test-env/components/button/button_empty/button_empty.js +1 -1
  418. package/test-env/components/button/button_group/button_group_button.js +1 -1
  419. package/test-env/components/button/button_group/button_group_button.styles.js +3 -3
  420. package/test-env/components/button/button_icon/button_icon.js +1 -1
  421. package/test-env/components/card/card.styles.js +1 -1
  422. package/test-env/components/code/code_block_annotations.js +1 -1
  423. package/test-env/components/code/code_block_line.styles.js +1 -2
  424. package/test-env/components/collapsible_nav/collapsible_nav_group/collapsible_nav_group.styles.js +3 -5
  425. package/test-env/components/collapsible_nav_beta/collapsible_nav_item/collapsible_nav_item.styles.js +1 -1
  426. package/test-env/components/color_picker/color_palette_display/color_palette_display.styles.js +1 -2
  427. package/test-env/components/color_picker/color_picker.styles.js +1 -2
  428. package/test-env/components/color_picker/color_picker_swatch.styles.js +1 -1
  429. package/test-env/components/combo_box/combo_box.js +9 -6
  430. package/test-env/components/common.js +0 -28
  431. package/test-env/components/context_menu/context_menu_panel.js +17 -1
  432. package/test-env/components/datagrid/body/cell/data_grid_cell.js +31 -8
  433. package/test-env/components/datagrid/body/data_grid_body.js +8 -0
  434. package/test-env/components/datagrid/body/data_grid_body_custom.js +8 -1
  435. package/test-env/components/datagrid/body/data_grid_body_virtualized.js +8 -1
  436. package/test-env/components/datagrid/controls/data_grid_toolbar.styles.js +2 -2
  437. package/test-env/components/datagrid/controls/display_selector.js +274 -204
  438. package/test-env/components/datagrid/data_grid.stories.utils.js +28 -2
  439. package/test-env/components/datagrid/data_grid.styles.js +4 -6
  440. package/test-env/components/datagrid/utils/grid_height_width.js +1 -1
  441. package/test-env/components/datagrid/utils/row_heights.js +29 -13
  442. package/test-env/components/date_picker/react_date_picker.styles.js +3 -2
  443. package/test-env/components/date_picker/super_date_picker/super_date_picker.styles.js +2 -3
  444. package/test-env/components/drag_and_drop/droppable.styles.js +2 -4
  445. package/test-env/components/empty_prompt/empty_prompt.styles.js +4 -1
  446. package/test-env/components/filter_group/filter_select_item.styles.js +1 -2
  447. package/test-env/components/flyout/_flyout_close_button.styles.js +1 -2
  448. package/test-env/components/form/form.styles.js +20 -27
  449. package/test-env/components/form/range/range_tooltip.styles.js +3 -7
  450. package/test-env/components/form/switch/switch.js +3 -2
  451. package/test-env/components/form/switch/switch.styles.js +16 -19
  452. package/test-env/components/header/header.styles.js +11 -5
  453. package/test-env/components/icon/icon.styles.js +9 -8
  454. package/test-env/components/icon/named_colors.js +1 -1
  455. package/test-env/components/inline_edit/inline_edit_form.styles.js +1 -2
  456. package/test-env/components/key_pad_menu/key_pad_menu_item.styles.js +1 -2
  457. package/test-env/components/list_group/list_group_item.styles.js +8 -10
  458. package/test-env/components/mark/mark.styles.js +2 -9
  459. package/test-env/components/markdown_editor/markdown_editor_drop_zone.styles.js +2 -3
  460. package/test-env/components/markdown_editor/markdown_format.styles.js +2 -2
  461. package/test-env/components/overlay_mask/overlay_mask.styles.js +1 -2
  462. package/test-env/components/page_template/inner/page_inner.styles.js +1 -1
  463. package/test-env/components/popover/popover_footer.styles.js +1 -1
  464. package/test-env/components/popover/popover_panel/_popover_panel.styles.js +3 -4
  465. package/test-env/components/progress/progress.js +1 -1
  466. package/test-env/components/progress/progress.styles.js +8 -6
  467. package/test-env/components/selectable/selectable_list/selectable_list_item.styles.js +1 -2
  468. package/test-env/components/side_nav/side_nav_item.styles.js +1 -2
  469. package/test-env/components/skeleton/utils.js +3 -5
  470. package/test-env/components/steps/step_number.styles.js +1 -1
  471. package/test-env/components/table/table_cells_shared.styles.js +2 -7
  472. package/test-env/components/table/table_row.styles.js +7 -9
  473. package/test-env/components/text/text.styles.js +1 -1
  474. package/test-env/components/text/text_color.js +1 -1
  475. package/test-env/components/text/text_color.styles.js +6 -5
  476. package/test-env/components/tool_tip/tool_tip.styles.js +8 -10
  477. package/test-env/components/tour/_tour_footer.styles.js +2 -4
  478. package/test-env/components/tree_view/tree_view_item.styles.js +1 -2
  479. package/test-env/global_styling/functions/size.js +7 -27
  480. package/test-env/global_styling/mixins/_button.js +165 -0
  481. package/test-env/global_styling/mixins/_color.js +39 -30
  482. package/test-env/global_styling/mixins/index.js +11 -0
  483. package/test-env/global_styling/reset/global_styles.js +1 -1
  484. package/test-env/global_styling/variables/_colors_vis.js +6 -61
  485. package/test-env/global_styling/variables/animations.js +25 -31
  486. package/test-env/global_styling/variables/breakpoint.js +7 -16
  487. package/test-env/global_styling/variables/levels.js +7 -26
  488. package/test-env/global_styling/variables/shadow.js +13 -20
  489. package/test-env/global_styling/variables/size.js +7 -10
  490. package/test-env/global_styling/variables/typography.js +19 -41
  491. package/test-env/services/hooks/useDeepEqual.js +12 -5
  492. package/test-env/services/theme/provider.js +11 -0
  493. package/test-env/services/theme/types.js +13 -14
  494. package/test-env/services/theme/utils.js +54 -296
  495. package/test-env/themes/amsterdam/global_styling/mixins/button.js +45 -203
  496. package/test-env/themes/amsterdam/global_styling/variables/_buttons.js +275 -0
  497. package/test-env/themes/amsterdam/global_styling/variables/_colors.js +586 -18
  498. package/test-env/themes/amsterdam/global_styling/variables/_components.js +439 -0
  499. package/test-env/themes/amsterdam/global_styling/variables/_forms.js +146 -0
  500. package/test-env/themes/amsterdam/theme.js +3 -1
  501. package/test-env/themes/index.js +7 -0
  502. package/test-env/themes/themes.js +8 -1
@@ -5,7 +5,6 @@ Object.defineProperty(exports, "__esModule", {
5
5
  });
6
6
  exports.euiCollapsibleNavGroupStyles = void 0;
7
7
  var _react = require("@emotion/react");
8
- var _services = require("../../../services");
9
8
  var _global_styling = require("../../../global_styling");
10
9
  /*
11
10
  * Copyright Elasticsearch B.V. and/or licensed to Elasticsearch B.V. under one
@@ -16,14 +15,13 @@ var _global_styling = require("../../../global_styling");
16
15
  */
17
16
 
18
17
  var euiCollapsibleNavGroupStyles = exports.euiCollapsibleNavGroupStyles = function euiCollapsibleNavGroupStyles(_ref) {
19
- var euiTheme = _ref.euiTheme,
20
- colorMode = _ref.colorMode;
18
+ var euiTheme = _ref.euiTheme;
21
19
  return {
22
20
  euiCollapsibleNavGroup: /*#__PURE__*/(0, _react.css)("&:not(:first-child){", (0, _global_styling.logicalCSS)('border-top', euiTheme.border.thin), ";};label:euiCollapsibleNavGroup;"),
23
21
  // Background colors
24
22
  none: /*#__PURE__*/(0, _react.css)(";label:none;"),
25
- light: /*#__PURE__*/(0, _react.css)("background-color:", euiTheme.colors.body, ";;label:light;"),
26
- dark: /*#__PURE__*/(0, _react.css)("background-color:", colorMode === 'DARK' ? (0, _services.shade)(euiTheme.colors.lightestShade, 0.5) : (0, _services.shade)(euiTheme.colors.darkestShade, 0.2), ";.euiCollapsibleNavGroup__title,.euiCollapsibleNavGroup__heading,.euiAccordion__arrow{color:", euiTheme.colors.ghost, ";};label:dark;"),
23
+ light: /*#__PURE__*/(0, _react.css)("background-color:", euiTheme.components.collapsibleNavGroupBackground, ";;label:light;"),
24
+ dark: /*#__PURE__*/(0, _react.css)("background-color:", euiTheme.components.collapsibleNavGroupBackgroundDark, ";.euiCollapsibleNavGroup__title,.euiCollapsibleNavGroup__heading,.euiAccordion__arrow{color:", euiTheme.colors.ghost, ";};label:dark;"),
27
25
  // Header padding
28
26
  isCollapsible: /*#__PURE__*/(0, _react.css)(".euiAccordion__triggerWrapper{padding:", euiTheme.size.base, ";};label:isCollapsible;"),
29
27
  notCollapsible: /*#__PURE__*/(0, _react.css)(".euiCollapsibleNavGroup__heading{padding:", euiTheme.size.base, ";};label:notCollapsible;"),
@@ -7,7 +7,7 @@ Object.defineProperty(exports, "__esModule", {
7
7
  exports.euiCollapsibleNavTopItemStyles = exports.euiCollapsibleNavSubItemsStyles = exports.euiCollapsibleNavItemVariables = exports.euiCollapsibleNavItemTitleStyles = void 0;
8
8
  var _react = require("@emotion/react");
9
9
  var _global_styling = require("../../../global_styling");
10
- var _button = require("../../../themes/amsterdam/global_styling/mixins/button");
10
+ var _button = require("../../../global_styling/mixins/_button");
11
11
  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; }
12
12
  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; }
13
13
  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; }
@@ -5,7 +5,6 @@ Object.defineProperty(exports, "__esModule", {
5
5
  });
6
6
  exports.euiColorPaletteDisplayStyles = void 0;
7
7
  var _react = require("@emotion/react");
8
- var _services = require("../../../services");
9
8
  var _global_styling = require("../../../global_styling");
10
9
  /*
11
10
  * Copyright Elasticsearch B.V. and/or licensed to Elasticsearch B.V. under one
@@ -19,7 +18,7 @@ var euiColorPaletteDisplayStyles = exports.euiColorPaletteDisplayStyles = functi
19
18
  var euiTheme = euiThemeContext.euiTheme;
20
19
 
21
20
  // Border is a pseudo element with transparency
22
- var border = "".concat(euiTheme.border.width.thin, " solid ").concat((0, _services.transparentize)(euiTheme.colors.darkestShade, 0.2));
21
+ var border = "".concat(euiTheme.border.width.thin, " solid ").concat(euiTheme.colors.borderBaseFormsColorSwatch);
23
22
  return {
24
23
  euiColorPaletteDisplay: /*#__PURE__*/(0, _react.css)("position:relative;display:flex;flex-direction:row;overflow:hidden;&::after{content:'';position:absolute;inset:0;pointer-events:none;border:", border, ";border-radius:inherit;};label:euiColorPaletteDisplay;"),
25
24
  // Sizes
@@ -5,7 +5,6 @@ Object.defineProperty(exports, "__esModule", {
5
5
  });
6
6
  exports.euiColorPickerStyles = void 0;
7
7
  var _react = require("@emotion/react");
8
- var _services = require("../../services");
9
8
  var _global_styling = require("../../global_styling");
10
9
  /*
11
10
  * Copyright Elasticsearch B.V. and/or licensed to Elasticsearch B.V. under one
@@ -28,6 +27,6 @@ var euiColorPickerStyles = exports.euiColorPickerStyles = function euiColorPicke
28
27
  euiColorPicker__alphaRange: /*#__PURE__*/(0, _react.css)(".euiRangeInput{", (0, _global_styling.logicalCSS)('min-width', 0), ";};label:euiColorPicker__alphaRange;"),
29
28
  // Adds a stroke color for the swatchInput icon. Unlike most EuiIcons it has a stroke in the SVG
30
29
  // Targets a custom className applied directly to the <svg> icon
31
- euiColorPicker__swatchInputIcon: /*#__PURE__*/(0, _react.css)(".euiSwatchInput__stroke{fill:none;stroke:", (0, _services.transparentize)(euiTheme.colors.fullShade, 0.2), ";};label:euiColorPicker__swatchInputIcon;")
30
+ euiColorPicker__swatchInputIcon: /*#__PURE__*/(0, _react.css)(".euiSwatchInput__stroke{fill:none;stroke:", euiTheme.colors.borderBaseFormsColorSwatch, ";};label:euiColorPicker__swatchInputIcon;")
32
31
  };
33
32
  };
@@ -20,6 +20,6 @@ var euiColorPickerSwatchStyles = exports.euiColorPickerSwatchStyles = function e
20
20
  return {
21
21
  euiColorPickerSwatch: /*#__PURE__*/(0, _react.css)("display:inline-block;", (0, _global_styling.logicalSizeCSS)(euiTheme.size.l), " border-radius:", (0, _global_styling.mathWithUnits)(euiTheme.border.radius.medium, function (x) {
22
22
  return x / 2;
23
- }), ";border:", euiTheme.border.width.thin, " solid ", (0, _services.transparentize)(euiTheme.colors.fullShade, 0.1), ";box-shadow:inset 0 0 0 ", euiTheme.border.width.thin, " ", (0, _services.transparentize)(euiTheme.colors.emptyShade, 0.05), ";cursor:pointer;&:disabled{cursor:default;}&:focus{", (0, _global_styling.euiOutline)(euiThemeContext, 'center'), ";};label:euiColorPickerSwatch;")
23
+ }), ";border:", euiTheme.border.width.thin, " solid ", euiTheme.colors.borderBaseFormsColorSwatch, ";box-shadow:inset 0 0 0 ", euiTheme.border.width.thin, " ", (0, _services.transparentize)(euiTheme.colors.emptyShade, 0.05), ";cursor:pointer;&:disabled{cursor:default;}&:focus{", (0, _global_styling.euiOutline)(euiThemeContext, 'center'), ";};label:euiColorPickerSwatch;")
24
24
  };
25
25
  };
@@ -320,12 +320,15 @@ var EuiComboBox = exports.EuiComboBox = /*#__PURE__*/function (_Component) {
320
320
  }
321
321
  break;
322
322
  case _services.keys.ENTER:
323
- event.preventDefault();
324
- event.stopPropagation();
325
- if (_this.hasActiveOption()) {
326
- _this.onAddOption(_this.state.matchingOptions[_this.state.activeOptionIndex]);
327
- } else {
328
- _this.setCustomOptions(false);
323
+ // Do not block enter keypresses for the clear button or delete selection buttons
324
+ if (event.target === _this.searchInputRefInstance) {
325
+ event.preventDefault();
326
+ event.stopPropagation();
327
+ if (_this.hasActiveOption()) {
328
+ _this.onAddOption(_this.state.matchingOptions[_this.state.activeOptionIndex]);
329
+ } else {
330
+ _this.setCustomOptions(false);
331
+ }
329
332
  }
330
333
  break;
331
334
  case _services.keys.TAB:
@@ -35,12 +35,6 @@ function keysOf(obj) {
35
35
  return Object.keys(obj);
36
36
  }
37
37
 
38
- /**
39
- * Like `keyof typeof`, but for getting values instead of keys
40
- * ValueOf<typeof {key1: 'value1', key2: 'value2'}>
41
- * Results in `'value1' | 'value2'`
42
- */
43
-
44
38
  // Returns the props of a given HTML element
45
39
 
46
40
  // Utility methods for ApplyClassComponentDefaults
@@ -133,26 +127,4 @@ React.FunctionComponent<ExclusiveUnion<Spanlike, Buttonlike>>
133
127
  * type ButtonLike = PropsForButton<BaseProps>
134
128
  * type ComponentProps = ExclusiveUnion<AnchorLike, ButtonLike>
135
129
  * const Component: FunctionComponent<ComponentProps> ...
136
- */
137
-
138
- /**
139
- * Replaces all properties on any type as optional, includes nested types
140
- *
141
- * @example
142
- * ```ts
143
- * interface Person {
144
- * name: string;
145
- * age?: number;
146
- * spouse: Person;
147
- * children: Person[];
148
- * }
149
- * type PartialPerson = RecursivePartial<Person>;
150
- * // results in
151
- * interface PartialPerson {
152
- * name?: string;
153
- * age?: number;
154
- * spouse?: RecursivePartial<Person>;
155
- * children?: RecursivePartial<Person>[]
156
- * }
157
- * ```
158
130
  */
@@ -171,7 +171,7 @@ var EuiContextMenuPanelClass = exports.EuiContextMenuPanelClass = /*#__PURE__*/f
171
171
  items: _this.props.items
172
172
  },
173
173
  menuItems: [],
174
- focusedItemIndex: props.onClose && props.initialFocusedItemIndex != null ? props.initialFocusedItemIndex + 1 // Account for panel title back button
174
+ focusedItemIndex: props.onClose && props.initialFocusedItemIndex != null && props.initialFocusedItemIndex !== -1 ? props.initialFocusedItemIndex + 1 // Account for panel title back button
175
175
  : props.initialFocusedItemIndex,
176
176
  currentHeight: undefined,
177
177
  waitingForInitialPopover: false,
@@ -214,6 +214,16 @@ var EuiContextMenuPanelClass = exports.EuiContextMenuPanelClass = /*#__PURE__*/f
214
214
  return;
215
215
  }
216
216
 
217
+ // `initialFocusedItemIndex={-1}` should only be used when preventing initial item focus is desired
218
+ if (_this2.state.focusedItemIndex === -1) {
219
+ // Resetting the focusedItemIndex to 0 allows keyboard up/down behavior to
220
+ // still work correctly later if the panel is manually tabbed into
221
+ return _this2.setState({
222
+ tookInitialFocus: true,
223
+ focusedItemIndex: 0
224
+ });
225
+ }
226
+
217
227
  // If an item should be focused, focus it (if it exists)
218
228
  if (_this2.state.focusedItemIndex != null && _this2.state.menuItems.length) {
219
229
  var focusedItem = _this2.state.menuItems[_this2.state.focusedItemIndex];
@@ -406,6 +416,12 @@ EuiContextMenuPanelClass.propTypes = {
406
416
  "aria-label": _propTypes.default.string,
407
417
  "data-test-subj": _propTypes.default.string,
408
418
  css: _propTypes.default.any,
419
+ /**
420
+ * Determines the initially focused menu item for keyboard and screen reader users.
421
+ *
422
+ * Can be set to `-1` to prevent autofocus (an uncommon case that must have
423
+ * keyboard accessibility accounted for manually if used)
424
+ */
409
425
  initialFocusedItemIndex: _propTypes.default.number,
410
426
  items: _propTypes.default.arrayOf(_propTypes.default.element.isRequired),
411
427
  onClose: _propTypes.default.func,
@@ -21,7 +21,7 @@ var _data_grid_cell_popover = require("./data_grid_cell_popover");
21
21
  var _focus_utils = require("./focus_utils");
22
22
  var _data_grid_cell = require("./data_grid_cell.styles");
23
23
  var _react2 = require("@emotion/react");
24
- var _excluded = ["renderCellValue", "cellContext", "column", "setCellContentsRef", "rowIndex", "colIndex", "rowHeight", "rowHeightUtils", "isControlColumn"],
24
+ var _excluded = ["renderCellValue", "cellContext", "column", "setCellContentsRef", "rowIndex", "colIndex", "rowHeightsOptions", "rowHeightUtils", "isControlColumn"],
25
25
  _excluded2 = ["width", "popoverContext", "interactiveCellId", "columnType", "className", "column", "style", "rowHeightUtils", "rowHeightsOptions", "rowManager", "pagination"],
26
26
  _excluded3 = ["isExpandable", "style", "className", "data-test-subj"],
27
27
  _excluded4 = ["columnId", "columnIndex", "rowIndex", "visibleRowIndex"];
@@ -66,15 +66,20 @@ var EuiDataGridCellContent = /*#__PURE__*/(0, _react.memo)(function (_ref) {
66
66
  setCellContentsRef = _ref.setCellContentsRef,
67
67
  rowIndex = _ref.rowIndex,
68
68
  colIndex = _ref.colIndex,
69
- rowHeight = _ref.rowHeight,
69
+ rowHeightsOptions = _ref.rowHeightsOptions,
70
70
  rowHeightUtils = _ref.rowHeightUtils,
71
71
  isControlColumn = _ref.isControlColumn,
72
72
  rest = _objectWithoutProperties(_ref, _excluded);
73
73
  // React is more permissive than the TS types indicate
74
74
  var CellElement = renderCellValue;
75
+
76
+ // Cell height type
77
+ var rowHeight = rowHeightUtils === null || rowHeightUtils === void 0 ? void 0 : rowHeightUtils.getRowHeightOption(rowIndex, rowHeightsOptions);
75
78
  var cellHeightType = (0, _react.useMemo)(function () {
76
- return (rowHeightUtils === null || rowHeightUtils === void 0 ? void 0 : rowHeightUtils.getHeightType(rowHeight)) || 'default';
77
- }, [rowHeightUtils, rowHeight]);
79
+ return rowHeightUtils !== null && rowHeightUtils !== void 0 && rowHeightUtils.isAutoBelowLineCount(rowHeightsOptions, rowHeight) ? 'autoBelowLineCount' : (rowHeightUtils === null || rowHeightUtils === void 0 ? void 0 : rowHeightUtils.getHeightType(rowHeight)) || 'default';
80
+ }, [rowHeightUtils, rowHeight, rowHeightsOptions]);
81
+
82
+ // Classes and styles
78
83
  var classes = (0, _react.useMemo)(function () {
79
84
  return (0, _classnames.default)('euiDataGridRowCell__content', "euiDataGridRowCell__content--".concat(cellHeightType, "Height"), !isControlColumn && {
80
85
  'eui-textBreakWord': cellHeightType !== 'default',
@@ -85,9 +90,9 @@ var EuiDataGridCellContent = /*#__PURE__*/(0, _react.memo)(function (_ref) {
85
90
  var cssStyles = [styles.content.euiDataGridRowCell__content].concat(_toConsumableArray(isControlColumn ? [styles.content.controlColumn, styles.content.autoHeight] : [
86
91
  // Regular data cells should always inherit height from the row wrapper,
87
92
  // except for auto height
88
- cellHeightType === 'auto' ? styles.content.autoHeight : styles.content.defaultHeight]));
93
+ cellHeightType === 'auto' || cellHeightType === 'autoBelowLineCount' ? styles.content.autoHeight : styles.content.defaultHeight]));
89
94
  return (0, _react2.jsx)(RenderTruncatedCellContent, {
90
- hasLineCountTruncation: cellHeightType === 'lineCount' && !isControlColumn,
95
+ hasLineCountTruncation: (cellHeightType === 'lineCount' || cellHeightType === 'autoBelowLineCount') && !isControlColumn,
91
96
  rowHeight: rowHeight
92
97
  }, (0, _react2.jsx)("div", {
93
98
  ref: setCellContentsRef,
@@ -520,6 +525,14 @@ EuiDataGridCellContent.propTypes = {
520
525
  lineCount: _propTypes.default.number,
521
526
  height: _propTypes.default.number
522
527
  }).isRequired]),
528
+ /**
529
+ * Feature flag for custom `lineCount` behavior, where `lineCount` acts like a
530
+ * *max* number of lines (instead of a set number of lines for all rows).
531
+ *
532
+ * This functionality is in beta and has performance implications;
533
+ * we do not yet fully recommend/support it for heavy production usage.
534
+ */
535
+ autoBelowLineCount: _propTypes.default.bool,
523
536
  /**
524
537
  * Defines the height for a specific row. It can be line count or just height.
525
538
  *
@@ -660,6 +673,9 @@ var EuiDataGridCell = exports.EuiDataGridCell = /*#__PURE__*/function (_Componen
660
673
  rowHeightsOptions = _this$props3.rowHeightsOptions,
661
674
  rowIndex = _this$props3.rowIndex;
662
675
  var rowHeightOption = rowHeightUtils === null || rowHeightUtils === void 0 ? void 0 : rowHeightUtils.getRowHeightOption(rowIndex, rowHeightsOptions);
676
+ if (rowHeightUtils !== null && rowHeightUtils !== void 0 && rowHeightUtils.isAutoBelowLineCount(rowHeightsOptions, rowHeightOption)) {
677
+ return; // Using auto height instead
678
+ }
663
679
  var isSingleLine = rowHeightOption == null; // Undefined rowHeightsOptions default to a single line
664
680
  var lineCount = isSingleLine ? 1 : rowHeightUtils === null || rowHeightUtils === void 0 ? void 0 : rowHeightUtils.getLineCount(rowHeightOption);
665
681
  if (lineCount) {
@@ -964,7 +980,6 @@ var EuiDataGridCell = exports.EuiDataGridCell = /*#__PURE__*/function (_Componen
964
980
  // column width, can be undefined
965
981
  lineHeight: (_rowHeightsOptions$li = rowHeightsOptions === null || rowHeightsOptions === void 0 ? void 0 : rowHeightsOptions.lineHeight) !== null && _rowHeightsOptions$li !== void 0 ? _rowHeightsOptions$li : undefined
966
982
  }, cellPropsStyle);
967
- var rowHeight = rowHeightUtils === null || rowHeightUtils === void 0 ? void 0 : rowHeightUtils.getRowHeightOption(rowIndex, rowHeightsOptions);
968
983
  var row = rowManager && !_utils.IS_JEST_ENVIRONMENT ? rowManager.getRow({
969
984
  rowIndex: rowIndex,
970
985
  visibleRowIndex: visibleRowIndex,
@@ -996,7 +1011,7 @@ var EuiDataGridCell = exports.EuiDataGridCell = /*#__PURE__*/function (_Componen
996
1011
  isExpandable: isExpandable,
997
1012
  isExpanded: popoverIsOpen,
998
1013
  setCellContentsRef: this.setCellContentsRef,
999
- rowHeight: rowHeight,
1014
+ rowHeightsOptions: rowHeightsOptions,
1000
1015
  rowHeightUtils: rowHeightUtils,
1001
1016
  isControlColumn: isControlColumn,
1002
1017
  rowIndex: rowIndex,
@@ -1380,6 +1395,14 @@ EuiDataGridCell.propTypes = {
1380
1395
  lineCount: _propTypes.default.number,
1381
1396
  height: _propTypes.default.number
1382
1397
  }).isRequired]),
1398
+ /**
1399
+ * Feature flag for custom `lineCount` behavior, where `lineCount` acts like a
1400
+ * *max* number of lines (instead of a set number of lines for all rows).
1401
+ *
1402
+ * This functionality is in beta and has performance implications;
1403
+ * we do not yet fully recommend/support it for heavy production usage.
1404
+ */
1405
+ autoBelowLineCount: _propTypes.default.bool,
1383
1406
  /**
1384
1407
  * Defines the height for a specific row. It can be line count or just height.
1385
1408
  *
@@ -579,6 +579,14 @@ EuiDataGridBody.propTypes = {
579
579
  lineCount: _propTypes.default.number,
580
580
  height: _propTypes.default.number
581
581
  }).isRequired]),
582
+ /**
583
+ * Feature flag for custom `lineCount` behavior, where `lineCount` acts like a
584
+ * *max* number of lines (instead of a set number of lines for all rows).
585
+ *
586
+ * This functionality is in beta and has performance implications;
587
+ * we do not yet fully recommend/support it for heavy production usage.
588
+ */
589
+ autoBelowLineCount: _propTypes.default.bool,
582
590
  /**
583
591
  * Defines the height for a specific row. It can be line count or just height.
584
592
  *
@@ -90,7 +90,6 @@ var EuiDataGridBodyCustomRender = exports.EuiDataGridBodyCustomRender = /*#__PUR
90
90
  */
91
91
  var rowHeightUtils = (0, _row_heights.useRowHeightUtils)({
92
92
  rowHeightsOptions: rowHeightsOptions,
93
- gridStyles: gridStyles,
94
93
  columns: columns
95
94
  });
96
95
  var _useDefaultRowHeight = (0, _row_heights.useDefaultRowHeight)({
@@ -745,6 +744,14 @@ EuiDataGridBodyCustomRender.propTypes = {
745
744
  lineCount: _propTypes.default.number,
746
745
  height: _propTypes.default.number
747
746
  }).isRequired]),
747
+ /**
748
+ * Feature flag for custom `lineCount` behavior, where `lineCount` acts like a
749
+ * *max* number of lines (instead of a set number of lines for all rows).
750
+ *
751
+ * This functionality is in beta and has performance implications;
752
+ * we do not yet fully recommend/support it for heavy production usage.
753
+ */
754
+ autoBelowLineCount: _propTypes.default.bool,
748
755
  /**
749
756
  * Defines the height for a specific row. It can be line count or just height.
750
757
  *
@@ -223,7 +223,6 @@ var EuiDataGridBodyVirtualized = exports.EuiDataGridBodyVirtualized = /*#__PURE_
223
223
  gridItemsRenderedRef: gridItemsRendered
224
224
  },
225
225
  rowHeightsOptions: rowHeightsOptions,
226
- gridStyles: gridStyles,
227
226
  columns: columns
228
227
  });
229
228
  var _useDefaultRowHeight = (0, _row_heights.useDefaultRowHeight)({
@@ -870,6 +869,14 @@ EuiDataGridBodyVirtualized.propTypes = {
870
869
  lineCount: _propTypes.default.number,
871
870
  height: _propTypes.default.number
872
871
  }).isRequired]),
872
+ /**
873
+ * Feature flag for custom `lineCount` behavior, where `lineCount` acts like a
874
+ * *max* number of lines (instead of a set number of lines for all rows).
875
+ *
876
+ * This functionality is in beta and has performance implications;
877
+ * we do not yet fully recommend/support it for heavy production usage.
878
+ */
879
+ autoBelowLineCount: _propTypes.default.bool,
873
880
  /**
874
881
  * Defines the height for a specific row. It can be line count or just height.
875
882
  *
@@ -18,7 +18,7 @@ var euiDataGridToolbarStyles = exports.euiDataGridToolbarStyles = function euiDa
18
18
  var euiTheme = _ref.euiTheme;
19
19
  return {
20
20
  euiDataGrid__controls: /*#__PURE__*/(0, _react.css)("z-index:2;position:relative;display:flex;justify-content:space-between;align-items:center;gap:", euiTheme.size.base, ";", (0, _global_styling.logicalCSS)('padding-vertical', euiTheme.size.xs), " background-color:", euiTheme.colors.emptyShade, ";;label:euiDataGrid__controls;"),
21
- euiDataGrid__rightControls: /*#__PURE__*/(0, _react.css)("display:flex;justify-content:flex-end;flex-wrap:wrap;column-gap:", euiTheme.size.s, ";", (0, _global_styling.logicalCSS)('padding-right', euiTheme.size.xs), "&:only-child{", (0, _global_styling.logicalCSS)('margin-left', 'auto'), ";};label:euiDataGrid__rightControls;"),
22
- euiDataGrid__leftControls: /*#__PURE__*/(0, _react.css)("display:flex;flex-wrap:wrap;gap:", euiTheme.size.xxs, ";;label:euiDataGrid__leftControls;")
21
+ euiDataGrid__rightControls: /*#__PURE__*/(0, _react.css)("display:flex;justify-content:flex-end;align-items:center;flex-wrap:wrap;column-gap:", euiTheme.size.s, ";", (0, _global_styling.logicalCSS)('padding-right', euiTheme.size.xs), "&:only-child{", (0, _global_styling.logicalCSS)('margin-left', 'auto'), ";};label:euiDataGrid__rightControls;"),
22
+ euiDataGrid__leftControls: /*#__PURE__*/(0, _react.css)("display:flex;flex-wrap:wrap;align-items:center;gap:", euiTheme.size.xxs, ";;label:euiDataGrid__leftControls;")
23
23
  };
24
24
  };