@elastic/eui 111.0.0 → 111.1.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 (345) hide show
  1. package/es/components/avatar/avatar.js +1 -1
  2. package/es/components/badge/badge.js +1 -1
  3. package/es/components/badge/beta_badge/beta_badge.js +1 -1
  4. package/es/components/basic_table/basic_table.js +36 -55
  5. package/es/components/basic_table/in_memory_table.js +6 -6
  6. package/es/components/beacon/beacon.styles.js +1 -1
  7. package/es/components/button/button_display/_button_display_content.js +1 -1
  8. package/es/components/button/button_empty/button_empty.js +1 -1
  9. package/es/components/button/button_group/button_group.js +1 -1
  10. package/es/components/button/button_group/button_group_button.js +1 -1
  11. package/es/components/button/button_icon/button_icon.js +1 -1
  12. package/es/components/button/index.js +2 -1
  13. package/es/components/button/split_button/index.js +10 -0
  14. package/es/components/button/split_button/split_button.js +120 -0
  15. package/es/components/button/split_button/split_button.styles.js +51 -0
  16. package/es/components/button/split_button/split_button_actions.js +115 -0
  17. package/es/components/button/split_button/split_button_context.js +14 -0
  18. package/es/components/call_out/call_out.js +1 -1
  19. package/es/components/card/card.js +1 -1
  20. package/es/components/collapsible_nav/collapsible_nav_group/collapsible_nav_group.js +1 -1
  21. package/es/components/collapsible_nav_beta/_kibana_solution/collapsible_nav_kibana_solution.js +1 -1
  22. package/es/components/collapsible_nav_beta/collapsible_nav_item/collapsed/collapsed_nav_button.js +1 -1
  23. package/es/components/collapsible_nav_beta/collapsible_nav_item/collapsed/collapsed_nav_item.js +2 -2
  24. package/es/components/collapsible_nav_beta/collapsible_nav_item/collapsed/collapsed_nav_popover.js +2 -2
  25. package/es/components/collapsible_nav_beta/collapsible_nav_item/collapsible_nav_item.js +4 -4
  26. package/es/components/comment_list/comment.js +2 -2
  27. package/es/components/comment_list/comment_event.js +1 -1
  28. package/es/components/comment_list/comment_list.js +2 -2
  29. package/es/components/comment_list/comment_timeline.js +1 -1
  30. package/es/components/context_menu/context_menu_item.js +1 -1
  31. package/es/components/datagrid/body/cell/data_grid_cell.js +12 -12
  32. package/es/components/datagrid/body/data_grid_body.js +7 -7
  33. package/es/components/datagrid/body/data_grid_body_custom.js +7 -7
  34. package/es/components/datagrid/body/data_grid_body_virtualized.js +7 -7
  35. package/es/components/datagrid/body/header/data_grid_header_cell.js +6 -6
  36. package/es/components/datagrid/controls/column_sorting.js +7 -7
  37. package/es/components/datagrid/controls/column_sorting_draggable.js +1 -1
  38. package/es/components/datagrid/controls/data_grid_toolbar_control.js +1 -1
  39. package/es/components/datagrid/controls/fullscreen_selector.styles.js +1 -1
  40. package/es/components/datagrid/utils/in_memory.js +6 -6
  41. package/es/components/date_picker/date_picker.js +2 -2
  42. package/es/components/date_picker/date_picker_range.js +1 -1
  43. package/es/components/empty_prompt/empty_prompt.js +2 -2
  44. package/es/components/flex/flex_group.js +1 -1
  45. package/es/components/flyout/flyout.styles.js +1 -0
  46. package/es/components/form/field_number/field_number.js +2 -2
  47. package/es/components/form/field_text/field_text.js +2 -2
  48. package/es/components/form/form_control_button/form_control_button.js +1 -1
  49. package/es/components/form/form_control_layout/form_control_layout.js +2 -2
  50. package/es/components/form/form_control_layout/form_control_layout_custom_icon.js +1 -1
  51. package/es/components/form/form_control_layout/form_control_layout_icons.js +2 -2
  52. package/es/components/form/text_area/text_area.js +2 -2
  53. package/es/components/header/header_links/header_link.js +1 -1
  54. package/es/components/header/header_links/header_links.js +1 -1
  55. package/es/components/header/header_logo/header_logo.js +1 -1
  56. package/es/components/header/header_section/header_section_item_button.js +1 -1
  57. package/es/components/horizontal_rule/horizontal_rule.js +1 -1
  58. package/es/components/icon/assets/agentBuilderRobot.js +37 -0
  59. package/es/components/icon/assets/cross_project_search.js +35 -0
  60. package/es/components/icon/assets/dashed_circle.js +35 -0
  61. package/es/components/icon/assets/product_robot.js +37 -0
  62. package/es/components/icon/icon.js +1 -1
  63. package/es/components/icon/icon_map.js +3 -0
  64. package/es/components/key_pad_menu/key_pad_menu_item.js +1 -1
  65. package/es/components/link/external_link_icon.js +6 -3
  66. package/es/components/list_group/list_group.js +2 -2
  67. package/es/components/list_group/list_group_item.js +2 -2
  68. package/es/components/list_group/list_group_item_extra_action.js +1 -1
  69. package/es/components/list_group/pinnable_list_group/pinnable_list_group.js +4 -4
  70. package/es/components/loading/loading_logo.js +1 -1
  71. package/es/components/markdown_editor/markdown_editor.js +1 -1
  72. package/es/components/markdown_editor/markdown_editor_drop_zone.js +1 -1
  73. package/es/components/markdown_editor/markdown_editor_footer.js +1 -1
  74. package/es/components/markdown_editor/markdown_editor_toolbar.js +1 -1
  75. package/es/components/page/page_header/page_header_content.js +2 -2
  76. package/es/components/pagination/pagination_button.js +1 -1
  77. package/es/components/search_bar/search_bar.js +1 -1
  78. package/es/components/selectable/selectable_list/selectable_list.js +1 -1
  79. package/es/components/selectable/selectable_list/selectable_list_item.js +1 -1
  80. package/es/components/selectable/selectable_templates/selectable_template_sitewide.js +1 -1
  81. package/es/components/spacer/spacer.js +1 -1
  82. package/es/components/table/table_header_cell.js +1 -1
  83. package/es/components/timeline/timeline_item_icon.js +1 -1
  84. package/es/components/toast/global_toast_list.js +1 -1
  85. package/es/components/toast/toast.js +1 -1
  86. package/es/components/tool_tip/icon_tip.js +1 -1
  87. package/es/components/tour/tour_step_indicator.js +8 -3
  88. package/es/global_styling/mixins/_button.js +28 -9
  89. package/es/global_styling/mixins/_container_query.js +106 -0
  90. package/es/global_styling/mixins/index.js +1 -0
  91. package/es/services/container_query/container_query_hook.js +64 -0
  92. package/es/services/container_query/index.js +9 -0
  93. package/es/services/container_query/match_container.js +242 -0
  94. package/eui.d.ts +414 -61
  95. package/i18ntokens.json +1053 -1053
  96. package/lib/components/avatar/avatar.js +1 -1
  97. package/lib/components/badge/badge.js +1 -1
  98. package/lib/components/badge/beta_badge/beta_badge.js +1 -1
  99. package/lib/components/basic_table/basic_table.js +36 -55
  100. package/lib/components/basic_table/in_memory_table.js +6 -6
  101. package/lib/components/beacon/beacon.styles.js +1 -1
  102. package/lib/components/button/button_display/_button_display_content.js +1 -1
  103. package/lib/components/button/button_empty/button_empty.js +1 -1
  104. package/lib/components/button/button_group/button_group.js +1 -1
  105. package/lib/components/button/button_group/button_group_button.js +1 -1
  106. package/lib/components/button/button_icon/button_icon.js +1 -1
  107. package/lib/components/button/index.js +8 -1
  108. package/lib/components/button/split_button/index.js +25 -0
  109. package/lib/components/button/split_button/split_button.js +129 -0
  110. package/lib/components/button/split_button/split_button.styles.js +55 -0
  111. package/lib/components/button/split_button/split_button_actions.js +123 -0
  112. package/lib/components/button/split_button/split_button_context.js +20 -0
  113. package/lib/components/call_out/call_out.js +1 -1
  114. package/lib/components/card/card.js +1 -1
  115. package/lib/components/collapsible_nav/collapsible_nav_group/collapsible_nav_group.js +1 -1
  116. package/lib/components/collapsible_nav_beta/_kibana_solution/collapsible_nav_kibana_solution.js +1 -1
  117. package/lib/components/collapsible_nav_beta/collapsible_nav_item/collapsed/collapsed_nav_button.js +1 -1
  118. package/lib/components/collapsible_nav_beta/collapsible_nav_item/collapsed/collapsed_nav_item.js +2 -2
  119. package/lib/components/collapsible_nav_beta/collapsible_nav_item/collapsed/collapsed_nav_popover.js +2 -2
  120. package/lib/components/collapsible_nav_beta/collapsible_nav_item/collapsible_nav_item.js +4 -4
  121. package/lib/components/comment_list/comment.js +2 -2
  122. package/lib/components/comment_list/comment_event.js +1 -1
  123. package/lib/components/comment_list/comment_list.js +2 -2
  124. package/lib/components/comment_list/comment_timeline.js +1 -1
  125. package/lib/components/context_menu/context_menu_item.js +1 -1
  126. package/lib/components/datagrid/body/cell/data_grid_cell.js +12 -12
  127. package/lib/components/datagrid/body/data_grid_body.js +7 -7
  128. package/lib/components/datagrid/body/data_grid_body_custom.js +7 -7
  129. package/lib/components/datagrid/body/data_grid_body_virtualized.js +7 -7
  130. package/lib/components/datagrid/body/header/data_grid_header_cell.js +6 -6
  131. package/lib/components/datagrid/controls/column_sorting.js +7 -7
  132. package/lib/components/datagrid/controls/column_sorting_draggable.js +1 -1
  133. package/lib/components/datagrid/controls/data_grid_toolbar_control.js +1 -1
  134. package/lib/components/datagrid/controls/fullscreen_selector.styles.js +1 -1
  135. package/lib/components/datagrid/utils/in_memory.js +6 -6
  136. package/lib/components/date_picker/date_picker.js +2 -2
  137. package/lib/components/date_picker/date_picker_range.js +1 -1
  138. package/lib/components/empty_prompt/empty_prompt.js +2 -2
  139. package/lib/components/flex/flex_group.js +1 -1
  140. package/lib/components/flyout/flyout.styles.js +2 -1
  141. package/lib/components/form/field_number/field_number.js +2 -2
  142. package/lib/components/form/field_text/field_text.js +2 -2
  143. package/lib/components/form/form_control_button/form_control_button.js +1 -1
  144. package/lib/components/form/form_control_layout/form_control_layout.js +2 -2
  145. package/lib/components/form/form_control_layout/form_control_layout_custom_icon.js +1 -1
  146. package/lib/components/form/form_control_layout/form_control_layout_icons.js +2 -2
  147. package/lib/components/form/text_area/text_area.js +2 -2
  148. package/lib/components/header/header_links/header_link.js +1 -1
  149. package/lib/components/header/header_links/header_links.js +1 -1
  150. package/lib/components/header/header_logo/header_logo.js +1 -1
  151. package/lib/components/header/header_section/header_section_item_button.js +1 -1
  152. package/lib/components/horizontal_rule/horizontal_rule.js +1 -1
  153. package/lib/components/icon/assets/agentBuilderRobot.js +44 -0
  154. package/lib/components/icon/assets/cross_project_search.js +42 -0
  155. package/lib/components/icon/assets/dashed_circle.js +42 -0
  156. package/lib/components/icon/assets/product_robot.js +44 -0
  157. package/lib/components/icon/icon.js +1 -1
  158. package/lib/components/icon/icon_map.js +3 -0
  159. package/lib/components/icon/svgs/cross_project_search.svg +3 -0
  160. package/lib/components/icon/svgs/dashed_circle.svg +5 -0
  161. package/lib/components/icon/svgs/product_robot.svg +4 -0
  162. package/lib/components/key_pad_menu/key_pad_menu_item.js +1 -1
  163. package/lib/components/link/external_link_icon.js +6 -3
  164. package/lib/components/list_group/list_group.js +2 -2
  165. package/lib/components/list_group/list_group_item.js +2 -2
  166. package/lib/components/list_group/list_group_item_extra_action.js +1 -1
  167. package/lib/components/list_group/pinnable_list_group/pinnable_list_group.js +4 -4
  168. package/lib/components/loading/loading_logo.js +1 -1
  169. package/lib/components/markdown_editor/markdown_editor.js +1 -1
  170. package/lib/components/markdown_editor/markdown_editor_drop_zone.js +1 -1
  171. package/lib/components/markdown_editor/markdown_editor_footer.js +1 -1
  172. package/lib/components/markdown_editor/markdown_editor_toolbar.js +1 -1
  173. package/lib/components/page/page_header/page_header_content.js +2 -2
  174. package/lib/components/pagination/pagination_button.js +1 -1
  175. package/lib/components/search_bar/search_bar.js +1 -1
  176. package/lib/components/selectable/selectable_list/selectable_list.js +1 -1
  177. package/lib/components/selectable/selectable_list/selectable_list_item.js +1 -1
  178. package/lib/components/selectable/selectable_templates/selectable_template_sitewide.js +1 -1
  179. package/lib/components/spacer/spacer.js +1 -1
  180. package/lib/components/table/table_header_cell.js +1 -1
  181. package/lib/components/timeline/timeline_item_icon.js +1 -1
  182. package/lib/components/toast/global_toast_list.js +1 -1
  183. package/lib/components/toast/toast.js +1 -1
  184. package/lib/components/tool_tip/icon_tip.js +1 -1
  185. package/lib/components/tour/tour_step_indicator.js +8 -3
  186. package/lib/global_styling/mixins/_button.js +29 -10
  187. package/lib/global_styling/mixins/_container_query.js +112 -0
  188. package/lib/global_styling/mixins/index.js +11 -0
  189. package/lib/services/container_query/container_query_hook.js +67 -0
  190. package/lib/services/container_query/index.js +16 -0
  191. package/lib/services/container_query/match_container.js +243 -0
  192. package/optimize/es/components/basic_table/basic_table.js +30 -49
  193. package/optimize/es/components/beacon/beacon.styles.js +1 -1
  194. package/optimize/es/components/button/index.js +2 -1
  195. package/optimize/es/components/button/split_button/index.js +10 -0
  196. package/optimize/es/components/button/split_button/split_button.js +98 -0
  197. package/optimize/es/components/button/split_button/split_button.styles.js +51 -0
  198. package/optimize/es/components/button/split_button/split_button_actions.js +89 -0
  199. package/optimize/es/components/button/split_button/split_button_context.js +14 -0
  200. package/optimize/es/components/datagrid/controls/fullscreen_selector.styles.js +1 -1
  201. package/optimize/es/components/empty_prompt/empty_prompt.js +1 -1
  202. package/optimize/es/components/flex/flex_group.js +1 -1
  203. package/optimize/es/components/flyout/flyout.styles.js +1 -0
  204. package/optimize/es/components/horizontal_rule/horizontal_rule.js +1 -1
  205. package/optimize/es/components/icon/assets/agentBuilderRobot.js +36 -0
  206. package/optimize/es/components/icon/assets/cross_project_search.js +34 -0
  207. package/optimize/es/components/icon/assets/dashed_circle.js +34 -0
  208. package/optimize/es/components/icon/assets/product_robot.js +36 -0
  209. package/optimize/es/components/icon/icon_map.js +3 -0
  210. package/optimize/es/components/link/external_link_icon.js +6 -3
  211. package/optimize/es/components/page/page_header/page_header_content.js +1 -1
  212. package/optimize/es/components/search_bar/search_bar.js +1 -1
  213. package/optimize/es/components/spacer/spacer.js +1 -1
  214. package/optimize/es/components/tour/tour_step_indicator.js +8 -3
  215. package/optimize/es/global_styling/mixins/_button.js +28 -9
  216. package/optimize/es/global_styling/mixins/_container_query.js +106 -0
  217. package/optimize/es/global_styling/mixins/index.js +1 -0
  218. package/optimize/es/services/container_query/container_query_hook.js +59 -0
  219. package/optimize/es/services/container_query/index.js +9 -0
  220. package/optimize/es/services/container_query/match_container.js +229 -0
  221. package/optimize/lib/components/basic_table/basic_table.js +30 -49
  222. package/optimize/lib/components/beacon/beacon.styles.js +1 -1
  223. package/optimize/lib/components/button/index.js +8 -1
  224. package/optimize/lib/components/button/split_button/index.js +25 -0
  225. package/optimize/lib/components/button/split_button/split_button.js +107 -0
  226. package/optimize/lib/components/button/split_button/split_button.styles.js +55 -0
  227. package/optimize/lib/components/button/split_button/split_button_actions.js +98 -0
  228. package/optimize/lib/components/button/split_button/split_button_context.js +20 -0
  229. package/optimize/lib/components/datagrid/controls/fullscreen_selector.styles.js +1 -1
  230. package/optimize/lib/components/empty_prompt/empty_prompt.js +1 -1
  231. package/optimize/lib/components/flex/flex_group.js +1 -1
  232. package/optimize/lib/components/flyout/flyout.styles.js +2 -1
  233. package/optimize/lib/components/horizontal_rule/horizontal_rule.js +1 -1
  234. package/optimize/lib/components/icon/assets/agentBuilderRobot.js +44 -0
  235. package/optimize/lib/components/icon/assets/cross_project_search.js +42 -0
  236. package/optimize/lib/components/icon/assets/dashed_circle.js +42 -0
  237. package/optimize/lib/components/icon/assets/product_robot.js +44 -0
  238. package/optimize/lib/components/icon/icon_map.js +3 -0
  239. package/optimize/lib/components/icon/svgs/cross_project_search.svg +3 -0
  240. package/optimize/lib/components/icon/svgs/dashed_circle.svg +5 -0
  241. package/optimize/lib/components/icon/svgs/product_robot.svg +4 -0
  242. package/optimize/lib/components/link/external_link_icon.js +6 -3
  243. package/optimize/lib/components/page/page_header/page_header_content.js +1 -1
  244. package/optimize/lib/components/search_bar/search_bar.js +1 -1
  245. package/optimize/lib/components/spacer/spacer.js +1 -1
  246. package/optimize/lib/components/tour/tour_step_indicator.js +8 -3
  247. package/optimize/lib/global_styling/mixins/_button.js +29 -10
  248. package/optimize/lib/global_styling/mixins/_container_query.js +112 -0
  249. package/optimize/lib/global_styling/mixins/index.js +11 -0
  250. package/optimize/lib/services/container_query/container_query_hook.js +65 -0
  251. package/optimize/lib/services/container_query/index.js +16 -0
  252. package/optimize/lib/services/container_query/match_container.js +231 -0
  253. package/package.json +4 -4
  254. package/test-env/components/avatar/avatar.js +1 -1
  255. package/test-env/components/badge/badge.js +1 -1
  256. package/test-env/components/badge/beta_badge/beta_badge.js +1 -1
  257. package/test-env/components/basic_table/basic_table.js +36 -55
  258. package/test-env/components/basic_table/in_memory_table.js +6 -6
  259. package/test-env/components/beacon/beacon.styles.js +1 -1
  260. package/test-env/components/button/button_display/_button_display_content.js +1 -1
  261. package/test-env/components/button/button_empty/button_empty.js +1 -1
  262. package/test-env/components/button/button_group/button_group.js +1 -1
  263. package/test-env/components/button/button_group/button_group_button.js +1 -1
  264. package/test-env/components/button/button_icon/button_icon.js +1 -1
  265. package/test-env/components/button/index.js +8 -1
  266. package/test-env/components/button/split_button/index.js +25 -0
  267. package/test-env/components/button/split_button/split_button.js +123 -0
  268. package/test-env/components/button/split_button/split_button.styles.js +55 -0
  269. package/test-env/components/button/split_button/split_button_actions.js +120 -0
  270. package/test-env/components/button/split_button/split_button_context.js +20 -0
  271. package/test-env/components/call_out/call_out.js +1 -1
  272. package/test-env/components/card/card.js +1 -1
  273. package/test-env/components/collapsible_nav/collapsible_nav_group/collapsible_nav_group.js +1 -1
  274. package/test-env/components/collapsible_nav_beta/_kibana_solution/collapsible_nav_kibana_solution.js +1 -1
  275. package/test-env/components/collapsible_nav_beta/collapsible_nav_item/collapsed/collapsed_nav_button.js +1 -1
  276. package/test-env/components/collapsible_nav_beta/collapsible_nav_item/collapsed/collapsed_nav_item.js +2 -2
  277. package/test-env/components/collapsible_nav_beta/collapsible_nav_item/collapsed/collapsed_nav_popover.js +2 -2
  278. package/test-env/components/collapsible_nav_beta/collapsible_nav_item/collapsible_nav_item.js +4 -4
  279. package/test-env/components/comment_list/comment.js +2 -2
  280. package/test-env/components/comment_list/comment_event.js +1 -1
  281. package/test-env/components/comment_list/comment_list.js +2 -2
  282. package/test-env/components/comment_list/comment_timeline.js +1 -1
  283. package/test-env/components/context_menu/context_menu_item.js +1 -1
  284. package/test-env/components/datagrid/body/cell/data_grid_cell.js +12 -12
  285. package/test-env/components/datagrid/body/data_grid_body.js +7 -7
  286. package/test-env/components/datagrid/body/data_grid_body_custom.js +7 -7
  287. package/test-env/components/datagrid/body/data_grid_body_virtualized.js +7 -7
  288. package/test-env/components/datagrid/body/header/data_grid_header_cell.js +6 -6
  289. package/test-env/components/datagrid/controls/column_sorting.js +7 -7
  290. package/test-env/components/datagrid/controls/column_sorting_draggable.js +1 -1
  291. package/test-env/components/datagrid/controls/data_grid_toolbar_control.js +1 -1
  292. package/test-env/components/datagrid/controls/fullscreen_selector.styles.js +1 -1
  293. package/test-env/components/datagrid/utils/in_memory.js +6 -6
  294. package/test-env/components/date_picker/date_picker.js +2 -2
  295. package/test-env/components/date_picker/date_picker_range.js +1 -1
  296. package/test-env/components/empty_prompt/empty_prompt.js +2 -2
  297. package/test-env/components/flex/flex_group.js +1 -1
  298. package/test-env/components/flyout/flyout.styles.js +2 -1
  299. package/test-env/components/form/field_number/field_number.js +2 -2
  300. package/test-env/components/form/field_text/field_text.js +2 -2
  301. package/test-env/components/form/form_control_button/form_control_button.js +1 -1
  302. package/test-env/components/form/form_control_layout/form_control_layout.js +2 -2
  303. package/test-env/components/form/form_control_layout/form_control_layout_custom_icon.js +1 -1
  304. package/test-env/components/form/form_control_layout/form_control_layout_icons.js +2 -2
  305. package/test-env/components/form/text_area/text_area.js +2 -2
  306. package/test-env/components/header/header_links/header_link.js +1 -1
  307. package/test-env/components/header/header_links/header_links.js +1 -1
  308. package/test-env/components/header/header_logo/header_logo.js +1 -1
  309. package/test-env/components/header/header_section/header_section_item_button.js +1 -1
  310. package/test-env/components/horizontal_rule/horizontal_rule.js +1 -1
  311. package/test-env/components/icon/assets/agentBuilderRobot.js +44 -0
  312. package/test-env/components/icon/assets/cross_project_search.js +42 -0
  313. package/test-env/components/icon/assets/dashed_circle.js +42 -0
  314. package/test-env/components/icon/assets/product_robot.js +44 -0
  315. package/test-env/components/icon/icon_map.js +3 -0
  316. package/test-env/components/key_pad_menu/key_pad_menu_item.js +1 -1
  317. package/test-env/components/link/external_link_icon.js +6 -3
  318. package/test-env/components/list_group/list_group.js +2 -2
  319. package/test-env/components/list_group/list_group_item.js +2 -2
  320. package/test-env/components/list_group/list_group_item_extra_action.js +1 -1
  321. package/test-env/components/list_group/pinnable_list_group/pinnable_list_group.js +4 -4
  322. package/test-env/components/loading/loading_logo.js +1 -1
  323. package/test-env/components/markdown_editor/markdown_editor.js +1 -1
  324. package/test-env/components/markdown_editor/markdown_editor_drop_zone.js +1 -1
  325. package/test-env/components/markdown_editor/markdown_editor_footer.js +1 -1
  326. package/test-env/components/markdown_editor/markdown_editor_toolbar.js +1 -1
  327. package/test-env/components/page/page_header/page_header_content.js +2 -2
  328. package/test-env/components/pagination/pagination_button.js +1 -1
  329. package/test-env/components/search_bar/search_bar.js +1 -1
  330. package/test-env/components/selectable/selectable_list/selectable_list.js +1 -1
  331. package/test-env/components/selectable/selectable_list/selectable_list_item.js +1 -1
  332. package/test-env/components/selectable/selectable_templates/selectable_template_sitewide.js +1 -1
  333. package/test-env/components/spacer/spacer.js +1 -1
  334. package/test-env/components/table/table_header_cell.js +1 -1
  335. package/test-env/components/timeline/timeline_item_icon.js +1 -1
  336. package/test-env/components/toast/global_toast_list.js +1 -1
  337. package/test-env/components/toast/toast.js +1 -1
  338. package/test-env/components/tool_tip/icon_tip.js +1 -1
  339. package/test-env/components/tour/tour_step_indicator.js +8 -3
  340. package/test-env/global_styling/mixins/_button.js +29 -10
  341. package/test-env/global_styling/mixins/_container_query.js +112 -0
  342. package/test-env/global_styling/mixins/index.js +11 -0
  343. package/test-env/services/container_query/container_query_hook.js +65 -0
  344. package/test-env/services/container_query/index.js +16 -0
  345. package/test-env/services/container_query/match_container.js +231 -0
@@ -0,0 +1,229 @@
1
+ import _toConsumableArray from "@babel/runtime/helpers/toConsumableArray";
2
+ import _createClass from "@babel/runtime/helpers/createClass";
3
+ import _classCallCheck from "@babel/runtime/helpers/classCallCheck";
4
+ import _possibleConstructorReturn from "@babel/runtime/helpers/possibleConstructorReturn";
5
+ import _getPrototypeOf from "@babel/runtime/helpers/getPrototypeOf";
6
+ import _inherits from "@babel/runtime/helpers/inherits";
7
+ import _wrapNativeSuper from "@babel/runtime/helpers/wrapNativeSuper";
8
+ import _defineProperty from "@babel/runtime/helpers/defineProperty";
9
+ function _classPrivateFieldInitSpec(e, t, a) { _checkPrivateRedeclaration(e, t), t.set(e, a); }
10
+ function _checkPrivateRedeclaration(e, t) { if (t.has(e)) throw new TypeError("Cannot initialize the same private elements twice on an object"); }
11
+ function _classPrivateFieldSet(s, a, r) { return s.set(_assertClassBrand(s, a), r), r; }
12
+ function _classPrivateFieldGet(s, a) { return s.get(_assertClassBrand(s, a)); }
13
+ function _assertClassBrand(e, t, n) { if ("function" == typeof e ? e === t : e.has(t)) return arguments.length < 3 ? t : n; throw new TypeError("Private element is not present on this object"); }
14
+ function _callSuper(t, o, e) { return o = _getPrototypeOf(o), _possibleConstructorReturn(t, _isNativeReflectConstruct() ? Reflect.construct(o, e || [], _getPrototypeOf(t).constructor) : o.apply(t, e)); }
15
+ function _isNativeReflectConstruct() { try { var t = !Boolean.prototype.valueOf.call(Reflect.construct(Boolean, [], function () {})); } catch (t) {} return (_isNativeReflectConstruct = function _isNativeReflectConstruct() { return !!t; })(); }
16
+ /*
17
+ * Copyright Elasticsearch B.V. and/or licensed to Elasticsearch B.V. under one
18
+ * or more contributor license agreements. Licensed under the Elastic License
19
+ * 2.0 and the Server Side Public License, v 1; you may not use this file except
20
+ * in compliance with, at your election, the Elastic License 2.0 or the Server
21
+ * Side Public License, v 1.
22
+ */
23
+
24
+ /**
25
+ * @license MIT License
26
+ *
27
+ * Copyright (c) 2025 Martin Winkler
28
+ *
29
+ * Permission is hereby granted, free of charge, to any person obtaining a copy
30
+ * of this software and associated documentation files (the "Software"), to deal
31
+ * in the Software without restriction, including without limitation the rights
32
+ * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
33
+ * copies of the Software, and to permit persons to whom the Software is
34
+ * furnished to do so, subject to the following conditions:
35
+ *
36
+ * The above copyright notice and this permission notice shall be included in all
37
+ * copies or substantial portions of the Software.
38
+ *
39
+ * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
40
+ * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
41
+ * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
42
+ * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
43
+ * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
44
+ * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
45
+ * SOFTWARE.
46
+ *
47
+ * @see {@link https://github.com/teetotum/match-container/blob/main/matchContainer.js}
48
+ */
49
+
50
+ import { v1 as uuid } from 'uuid';
51
+
52
+ /**
53
+ * Listen for changes on a container query.
54
+ * Just like `window.matchMedia`.
55
+ *
56
+ * @example
57
+ * ```js
58
+ * const cql = matchContainer(element, '(width > 42rem)');
59
+ * cql.addEventListener('change', ({ matches }) {
60
+ * // ..
61
+ * })
62
+ * ```
63
+ *
64
+ * @param element
65
+ * @param containerQueryString e.g. (width > 42rem)
66
+ * @returns ContainerQueryList
67
+ */
68
+ export function matchContainer(element, containerQueryString) {
69
+ return new ContainerQueryList(element, containerQueryString);
70
+ }
71
+
72
+ /**
73
+ * `change` event dispatched by instances of {@link ContainerQueryList}
74
+ * whenever the value of `matches` changes
75
+ */
76
+ export var ContainerQueryListChangeEvent = /*#__PURE__*/function (_Event) {
77
+ function ContainerQueryListChangeEvent(matches, container) {
78
+ var _this;
79
+ _classCallCheck(this, ContainerQueryListChangeEvent);
80
+ _this = _callSuper(this, ContainerQueryListChangeEvent, ['change']);
81
+ /** Whether the container query matches */
82
+ _defineProperty(_this, "matches", void 0);
83
+ /** A string representation of the container query list e.g. "(width > 1000px)" */
84
+ _defineProperty(_this, "container", void 0);
85
+ _this.matches = matches;
86
+ _this.container = container;
87
+ return _this;
88
+ }
89
+ _inherits(ContainerQueryListChangeEvent, _Event);
90
+ return _createClass(ContainerQueryListChangeEvent);
91
+ }( /*#__PURE__*/_wrapNativeSuper(Event));
92
+
93
+ /**
94
+ * A hacky implementation of a possible native `ContainerQueryList`
95
+ * based on the teetotum/match-container polyfill:
96
+ * - based on a API proposal in W3C CSS WG {@link https://github.com/w3c/csswg-drafts/issues/6205})
97
+ * - mimicking MediaQueryList {@link https://developer.mozilla.org/en-US/docs/Web/API/MediaQueryList}
98
+ *
99
+ * Not meant to be used directly, but rather call `matchContainer`.
100
+ *
101
+ * It works by listening on a `transitionrun` event on the element,
102
+ * that gets triggered by a container query changing a custom property.
103
+ * Setting `transition-behavior: allow-discrete` is what makes it possible
104
+ * to have a CSS `transition` for a custom property.
105
+ * @see {@link https://developer.mozilla.org/en-US/docs/Web/CSS/Reference/Properties/transition-behavior}
106
+ */
107
+ var _matches = /*#__PURE__*/new WeakMap();
108
+ export var ContainerQueryList = /*#__PURE__*/function (_EventTarget) {
109
+ function ContainerQueryList(element, containerQueryString) {
110
+ var _this2;
111
+ _classCallCheck(this, ContainerQueryList);
112
+ _this2 = _callSuper(this, ContainerQueryList);
113
+ _defineProperty(_this2, "element", null);
114
+ _defineProperty(_this2, "styleSheet", null);
115
+ _defineProperty(_this2, "markerAttributeName", '');
116
+ _defineProperty(_this2, "sentinelPropertyName", '');
117
+ _defineProperty(_this2, "computedStyle", null);
118
+ _defineProperty(_this2, "transitionRunListener", null);
119
+ _classPrivateFieldInitSpec(_this2, _matches, false);
120
+ /**
121
+ * A string representation of the container query list e.g. "(width > 1000px)"
122
+ * (the name is weird but it is so for consistency with mediaQueryList.media)
123
+ * @see {@link https://developer.mozilla.org/en-US/docs/Web/API/MediaQueryList/media}
124
+ * */
125
+ _defineProperty(_this2, "container", void 0);
126
+ _this2.container = containerQueryString;
127
+ _this2.element = element;
128
+ // we call this only once to try to avoid any impact on performance
129
+ _this2.computedStyle = getComputedStyle(_this2.element);
130
+ var uniqueName = "container-query-observer-".concat(uuid());
131
+ _this2.markerAttributeName = "data-".concat(uniqueName);
132
+ _this2.sentinelPropertyName = "--".concat(uniqueName);
133
+
134
+ // order is important (as in life)
135
+ _this2.applyMarkerAttribute();
136
+ _this2.createStyleSheet();
137
+ _classPrivateFieldSet(_matches, _this2, _this2.computedStyle.getPropertyValue(_this2.sentinelPropertyName) === '--true');
138
+ _this2.setupTransitionListener();
139
+ return _this2;
140
+ }
141
+
142
+ /**
143
+ * The marker attribute is `data-container-query-observer-{UUID}`,
144
+ * it will be used as a selector in the container query,
145
+ * in the global CSS that's being added below.
146
+ */
147
+ _inherits(ContainerQueryList, _EventTarget);
148
+ return _createClass(ContainerQueryList, [{
149
+ key: "matches",
150
+ get: /** Whether the container query matches */
151
+ function get() {
152
+ return _classPrivateFieldGet(_matches, this);
153
+ }
154
+ }, {
155
+ key: "applyMarkerAttribute",
156
+ value: function applyMarkerAttribute() {
157
+ this.element.setAttribute(this.markerAttributeName, '');
158
+ }
159
+
160
+ /**
161
+ * Create a CSS custom property with values either `--true` or `--false`,
162
+ * and add container query targetting the element.
163
+ * Whenever the container query matches, the custom property will be `--true`.
164
+ * This styles are added globaly via `document.adoptedStyleSheets`.
165
+ */
166
+ }, {
167
+ key: "createStyleSheet",
168
+ value: function createStyleSheet() {
169
+ var css = "\n @property ".concat(this.sentinelPropertyName, " {\n syntax: '<custom-ident>';\n inherits: false;\n initial-value: --false;\n }\n @container ").concat(this.container, " {\n [").concat(this.markerAttributeName, "] {\n ").concat(this.sentinelPropertyName, ": --true;\n }\n }\n ");
170
+ var styleSheet = new CSSStyleSheet();
171
+ styleSheet.replaceSync(css);
172
+ document.adoptedStyleSheets = [].concat(_toConsumableArray(document.adoptedStyleSheets), [styleSheet]);
173
+ this.styleSheet = styleSheet;
174
+ }
175
+
176
+ /**
177
+ * This is the key to the hack:
178
+ * - a `transition` style is added for the custom property
179
+ * - the `transitionrun` event will fire whenever the custom property value changes
180
+ * because of the container query
181
+ * - we get the value from computed styles
182
+ * - the `matches` value is updated and
183
+ * - a ContainerQueryListChangeEvent event is dispatched
184
+ */
185
+ }, {
186
+ key: "setupTransitionListener",
187
+ value: function setupTransitionListener() {
188
+ var _this3 = this;
189
+ var element = this.element,
190
+ computedStyle = this.computedStyle,
191
+ sentinelPropertyName = this.sentinelPropertyName;
192
+ if (!element) return;
193
+ var currentValue = computedStyle.getPropertyValue(sentinelPropertyName);
194
+ element.style.setProperty('transition', "".concat(sentinelPropertyName, " 0.001ms step-start"));
195
+ element.style.setProperty('transition-behavior', 'allow-discrete');
196
+ this.transitionRunListener = function (event) {
197
+ if (event.target !== element) return;
198
+ var nextValue = computedStyle.getPropertyValue(sentinelPropertyName);
199
+ if (nextValue === currentValue) return;
200
+ currentValue = nextValue;
201
+ _classPrivateFieldSet(_matches, _this3, nextValue === '--true');
202
+ _this3.dispatchEvent(new ContainerQueryListChangeEvent(_classPrivateFieldGet(_matches, _this3), _this3.container));
203
+ };
204
+ element.addEventListener('transitionrun', this.transitionRunListener);
205
+ }
206
+ }, {
207
+ key: "dispose",
208
+ value: function dispose() {
209
+ var _this4 = this;
210
+ // remove the stylesheet from adoptedStyleSheets
211
+ if (this.styleSheet) {
212
+ document.adoptedStyleSheets = document.adoptedStyleSheets.filter(function (sheet) {
213
+ return sheet !== _this4.styleSheet;
214
+ });
215
+ }
216
+ if (!this.element) return;
217
+ if (this.transitionRunListener) {
218
+ this.element.removeEventListener('transitionrun', this.transitionRunListener);
219
+ }
220
+ this.element.removeAttribute(this.markerAttributeName);
221
+ this.element.style.removeProperty('transition');
222
+ this.element.style.removeProperty('transition-behavior');
223
+ this.element = null;
224
+ this.styleSheet = null;
225
+ this.computedStyle = null;
226
+ this.transitionRunListener = null;
227
+ }
228
+ }]);
229
+ }( /*#__PURE__*/_wrapNativeSuper(EventTarget));
@@ -437,59 +437,40 @@ var EuiBasicTable = exports.EuiBasicTable = /*#__PURE__*/function (_Component) {
437
437
  var totalItemCount = pagination ? pagination.totalItemCount : itemCount;
438
438
  var page = pagination ? pagination.pageIndex + 1 : 1;
439
439
  var pageCount = pagination ? Math.ceil(pagination.totalItemCount / this.pageSize) : 1;
440
- var captionElement;
441
- if (tableCaption) {
442
- if (pagination) {
443
- captionElement = (0, _react2.jsx)(_i18n.EuiI18n, {
444
- token: "euiBasicTable.tableCaptionWithPagination",
445
- default: "{tableCaption}; Page {page} of {pageCount}.",
446
- values: {
447
- tableCaption: tableCaption,
448
- page: page,
449
- pageCount: pageCount
450
- }
451
- });
452
- } else {
453
- captionElement = tableCaption;
454
- }
455
- } else {
456
- if (pagination) {
457
- if (pagination.totalItemCount > 0) {
458
- captionElement = (0, _react2.jsx)(_i18n.EuiI18n, {
459
- token: "euiBasicTable.tableAutoCaptionWithPagination",
460
- default: "This table contains {itemCount} rows out of {totalItemCount} rows; Page {page} of {pageCount}.",
461
- values: {
462
- totalItemCount: totalItemCount,
463
- itemCount: itemCount,
464
- page: page,
465
- pageCount: pageCount
466
- }
467
- });
468
- } else {
469
- captionElement = (0, _react2.jsx)(_i18n.EuiI18n, {
470
- token: "euiBasicTable.tableSimpleAutoCaptionWithPagination",
471
- default: "This table contains {itemCount} rows; Page {page} of {pageCount}.",
472
- values: {
473
- itemCount: itemCount,
474
- page: page,
475
- pageCount: pageCount
476
- }
477
- });
440
+ var itemCountPart = null;
441
+ if (!itemCount) {
442
+ itemCountPart = "".concat(this.props.noItemsMessage, ",");
443
+ } else if (pagination && totalItemCount > 0) {
444
+ itemCountPart = (0, _react2.jsx)("p", null, (0, _react2.jsx)(_i18n.EuiI18n, {
445
+ token: "euiBasicTable.caption.itemCountPart.withTotalItemCount",
446
+ default: "Showing {itemCount} of {totalItemCount} data rows.",
447
+ values: {
448
+ itemCount: itemCount,
449
+ totalItemCount: totalItemCount
478
450
  }
479
- } else {
480
- captionElement = (0, _react2.jsx)(_i18n.EuiI18n, {
481
- token: "euiBasicTable.tableAutoCaptionWithoutPagination",
482
- default: "This table contains {itemCount} rows.",
483
- values: {
484
- itemCount: itemCount
485
- }
486
- });
487
- }
451
+ }));
452
+ }
453
+ var paginationPart = null;
454
+ if (pagination && pageCount > 1) {
455
+ paginationPart = (0, _react2.jsx)("p", null, (0, _react2.jsx)(_i18n.EuiI18n, {
456
+ token: "euiBasicTable.caption.paginationPart.withPageCount",
457
+ default: "Page {page} of {pageCount}.",
458
+ values: {
459
+ page: page,
460
+ pageCount: pageCount
461
+ }
462
+ }));
488
463
  }
489
464
  return (0, _react2.jsx)(_accessibility.EuiScreenReaderOnly, null, (0, _react2.jsx)("caption", {
490
465
  css: _table2.euiTableCaptionStyles,
491
466
  className: "euiTableCaption"
492
- }, _services.tabularCopyMarkers.hiddenNoCopyBoundary, (0, _react2.jsx)(_delay_render.EuiDelayRender, null, captionElement), _services.tabularCopyMarkers.hiddenNoCopyBoundary));
467
+ }, _services.tabularCopyMarkers.hiddenNoCopyBoundary, (0, _react2.jsx)(_delay_render.EuiDelayRender, null, (0, _react2.jsx)("p", null, tableCaption || (0, _react2.jsx)(_i18n.EuiI18n, {
468
+ token: "euiBasicTable.caption.tableName",
469
+ default: "Data table"
470
+ }), itemCount === 0 && (0, _react2.jsx)(_react.default.Fragment, null, ' ', (0, _react2.jsx)(_i18n.EuiI18n, {
471
+ token: "euiBasicTable.caption.emptyState",
472
+ default: "(empty)"
473
+ })), ','), itemCountPart, paginationPart), _services.tabularCopyMarkers.hiddenNoCopyBoundary));
493
474
  }
494
475
  }, {
495
476
  key: "renderTableHead",
@@ -969,7 +950,7 @@ var EuiBasicTable = exports.EuiBasicTable = /*#__PURE__*/function (_Component) {
969
950
  key: "getDerivedStateFromProps",
970
951
  value: function getDerivedStateFromProps(nextProps, prevState) {
971
952
  if (!nextProps.selection) {
972
- // next props doesn't have a selection, reset our state
953
+ // next props don't have a selection, reset our state
973
954
  return {
974
955
  selection: []
975
956
  };
@@ -29,7 +29,7 @@ var euiBeaconStyles = exports.euiBeaconStyles = function euiBeaconStyles(euiThem
29
29
  euiBeacon: /*#__PURE__*/(0, _react.css)("position:relative;display:flex;justify-content:center;border-radius:50%;", (0, _high_contrast.preventForcedColors)(euiThemeContext), " svg{", (0, _global_styling.logicalSizeCSS)('100%'), ";}&::before,&::after{position:absolute;content:'';", (0, _global_styling.logicalSizeCSS)('100%'), " ", (0, _global_styling.logicalCSS)('left', 0), " ", (0, _global_styling.logicalCSS)('top', 0), " background-color:transparent;border-radius:50%;}&::before{transform:scale(1.6);opacity:0.4;}&::after{opacity:0;}", _global_styling.euiCanAnimate, "{&::before{animation:", euiBeaconPulseLarge, " 2.5s infinite ease-out;}&::after{animation:", euiBeaconPulseSmall, " 2.5s infinite ease-out 0.25s;}};label:euiBeacon;"),
30
30
  subdued: /*#__PURE__*/(0, _react.css)(_colorCSS(euiTheme.colors.textSubdued), ";label:subdued;"),
31
31
  primary: /*#__PURE__*/(0, _react.css)(_colorCSS(euiTheme.colors.primary), ";label:primary;"),
32
- success: /*#__PURE__*/(0, _react.css)(_colorCSS(euiTheme.colors.accentSecondary), ";label:success;"),
32
+ success: /*#__PURE__*/(0, _react.css)(_colorCSS(euiTheme.colors.success), ";label:success;"),
33
33
  warning: /*#__PURE__*/(0, _react.css)(_colorCSS(euiTheme.colors.warning), ";label:warning;"),
34
34
  danger: /*#__PURE__*/(0, _react.css)(_colorCSS(euiTheme.colors.danger), ";label:danger;"),
35
35
  accent: /*#__PURE__*/(0, _react.css)(_colorCSS(euiTheme.colors.accent), ";label:accent;")
@@ -33,7 +33,14 @@ Object.defineProperty(exports, "EuiButtonIcon", {
33
33
  return _button_icon.EuiButtonIcon;
34
34
  }
35
35
  });
36
+ Object.defineProperty(exports, "EuiSplitButton", {
37
+ enumerable: true,
38
+ get: function get() {
39
+ return _split_button.EuiSplitButton;
40
+ }
41
+ });
36
42
  var _button = require("./button");
37
43
  var _button_empty = require("./button_empty");
38
44
  var _button_icon = require("./button_icon");
39
- var _button_group = require("./button_group");
45
+ var _button_group = require("./button_group");
46
+ var _split_button = require("./split_button");
@@ -0,0 +1,25 @@
1
+ "use strict";
2
+
3
+ Object.defineProperty(exports, "__esModule", {
4
+ value: true
5
+ });
6
+ Object.defineProperty(exports, "EuiSplitButton", {
7
+ enumerable: true,
8
+ get: function get() {
9
+ return _split_button.EuiSplitButton;
10
+ }
11
+ });
12
+ Object.defineProperty(exports, "EuiSplitButtonActionPrimary", {
13
+ enumerable: true,
14
+ get: function get() {
15
+ return _split_button_actions.EuiSplitButtonActionPrimary;
16
+ }
17
+ });
18
+ Object.defineProperty(exports, "EuiSplitButtonActionSecondary", {
19
+ enumerable: true,
20
+ get: function get() {
21
+ return _split_button_actions.EuiSplitButtonActionSecondary;
22
+ }
23
+ });
24
+ var _split_button = require("./split_button");
25
+ var _split_button_actions = require("./split_button_actions");
@@ -0,0 +1,107 @@
1
+ "use strict";
2
+
3
+ var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefault");
4
+ var _typeof = require("@babel/runtime/helpers/typeof");
5
+ Object.defineProperty(exports, "__esModule", {
6
+ value: true
7
+ });
8
+ exports._EuiSplitButton = exports.EuiSplitButton = void 0;
9
+ var _extends2 = _interopRequireDefault(require("@babel/runtime/helpers/extends"));
10
+ var _slicedToArray2 = _interopRequireDefault(require("@babel/runtime/helpers/slicedToArray"));
11
+ var _objectWithoutProperties2 = _interopRequireDefault(require("@babel/runtime/helpers/objectWithoutProperties"));
12
+ var _classnames = _interopRequireDefault(require("classnames"));
13
+ var _react = _interopRequireWildcard(require("react"));
14
+ var _services = require("../../../services");
15
+ var _global_styling = require("../../../global_styling");
16
+ var _split_button_context = require("./split_button_context");
17
+ var _split_button_actions = require("./split_button_actions");
18
+ var _split_button = require("./split_button.styles");
19
+ var _react2 = require("@emotion/react");
20
+ var _excluded = ["className", "children", "size", "color", "fill", "isDisabled", "hasAriaDisabled", "isLoading"];
21
+ /*
22
+ * Copyright Elasticsearch B.V. and/or licensed to Elasticsearch B.V. under one
23
+ * or more contributor license agreements. Licensed under the Elastic License
24
+ * 2.0 and the Server Side Public License, v 1; you may not use this file except
25
+ * in compliance with, at your election, the Elastic License 2.0 or the Server
26
+ * Side Public License, v 1.
27
+ */
28
+ function _getRequireWildcardCache(e) { if ("function" != typeof WeakMap) return null; var r = new WeakMap(), t = new WeakMap(); return (_getRequireWildcardCache = function _getRequireWildcardCache(e) { return e ? t : r; })(e); }
29
+ function _interopRequireWildcard(e, r) { if (!r && e && e.__esModule) return e; if (null === e || "object" != _typeof(e) && "function" != typeof e) return { default: e }; var t = _getRequireWildcardCache(r); if (t && t.has(e)) return t.get(e); var n = { __proto__: null }, a = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var u in e) if ("default" !== u && {}.hasOwnProperty.call(e, u)) { var i = a ? Object.getOwnPropertyDescriptor(e, u) : null; i && (i.get || i.set) ? Object.defineProperty(n, u, i) : n[u] = e[u]; } return n.default = e, t && t.set(e, n), n; }
30
+ var _EuiSplitButton = exports._EuiSplitButton = function _EuiSplitButton(_ref) {
31
+ var className = _ref.className,
32
+ children = _ref.children,
33
+ _ref$size = _ref.size,
34
+ size = _ref$size === void 0 ? 'm' : _ref$size,
35
+ _ref$color = _ref.color,
36
+ color = _ref$color === void 0 ? 'primary' : _ref$color,
37
+ _ref$fill = _ref.fill,
38
+ fill = _ref$fill === void 0 ? false : _ref$fill,
39
+ isDisabled = _ref.isDisabled,
40
+ hasAriaDisabled = _ref.hasAriaDisabled,
41
+ isLoading = _ref.isLoading,
42
+ rest = (0, _objectWithoutProperties2.default)(_ref, _excluded);
43
+ var euiThemeContext = (0, _services.useEuiTheme)();
44
+ var highContrastMode = euiThemeContext.highContrastMode;
45
+ var _children = (0, _slicedToArray2.default)(children, 2),
46
+ primaryAction = _children[0],
47
+ secondaryAction = _children[1];
48
+ var key = (0, _services.useGeneratedHtmlId)({
49
+ suffix: 'EuiSplitButton'
50
+ });
51
+ var commonProps = {
52
+ size: size,
53
+ color: color,
54
+ fill: fill,
55
+ isDisabled: isDisabled,
56
+ hasAriaDisabled: hasAriaDisabled,
57
+ isLoading: isLoading
58
+ };
59
+ var buttonFilledColors = (0, _global_styling.getEuiFilledButtonColors)(euiThemeContext, isDisabled ? 'disabled' : color);
60
+ var buttonColors = (0, _global_styling.getEuiButtonColors)(euiThemeContext, isDisabled ? 'disabled' : color);
61
+ var classes = (0, _classnames.default)('euiSplitButton', className);
62
+ var styles = (0, _services.useEuiMemoizedStyles)(_split_button.euiSplitButtonStyles);
63
+ var cssStyles = [styles.euiSplitButton, fill && styles.fill];
64
+ var dividerStyles = (0, _react.useMemo)(function () {
65
+ return (0, _split_button.euiSplitButtonDividerStyles)(euiThemeContext, !fill ? buttonColors.borderColor : highContrastMode && fill ? buttonFilledColors.backgroundColor : 'transparent');
66
+ }, [euiThemeContext, highContrastMode, fill, buttonFilledColors.backgroundColor, buttonColors.borderColor]);
67
+
68
+ // NOTE: dev-mode-only runtime check to evaluate if correct child components are passed
69
+ if (process.env.NODE_ENV !== 'production') {
70
+ var childArray = _react.Children.toArray(children);
71
+ var expectedTypes = [['EuiSplitButton.ActionPrimary', 'EuiSplitButtonActionPrimary'], ['EuiSplitButton.ActionSecondary', 'EuiSplitButtonActionSecondary']];
72
+ childArray.forEach(function (child, index) {
73
+ if (! /*#__PURE__*/(0, _react.isValidElement)(child)) return;
74
+ var componentName = getComponentName(child.type);
75
+ var expectedComponents = expectedTypes[index];
76
+ if (!expectedComponents.includes(componentName)) {
77
+ console.warn("\u26A0\uFE0F EuiSplitButton: Expected <".concat(expectedComponents[0], "> at position ").concat(index + 1, ", got <").concat(componentName, ">. You might be using a wrapper. Using e.g. React.memo() or React.lazy() is valid, other component wrappers are not and will break styling.\n To verify expected usage, please check the documentation: https://eui.elastic.co/docs/components/navigation/buttons/split-button/"));
78
+ }
79
+ });
80
+ }
81
+ return (0, _react2.jsx)("div", (0, _extends2.default)({
82
+ role: "group",
83
+ className: classes,
84
+ css: cssStyles
85
+ }, rest), (0, _react2.jsx)(_split_button_context.EuiSplitButtonContext.Provider, {
86
+ value: commonProps
87
+ }, (0, _react2.jsx)(_react.Fragment, {
88
+ key: "".concat(key, "-primaryAction")
89
+ }, primaryAction), (0, _react2.jsx)("div", {
90
+ className: "euiSplitButton__divider",
91
+ css: dividerStyles.divider,
92
+ "aria-hidden": "true"
93
+ }), (0, _react2.jsx)(_react.Fragment, {
94
+ key: "".concat(key, "-secondaryAction")
95
+ }, secondaryAction)));
96
+ };
97
+ var EuiSplitButton = exports.EuiSplitButton = Object.assign(_EuiSplitButton, {
98
+ ActionPrimary: _split_button_actions.EuiSplitButtonActionPrimary,
99
+ ActionSecondary: _split_button_actions.EuiSplitButtonActionSecondary
100
+ });
101
+
102
+ /* internal utils */
103
+
104
+ var getComponentName = function getComponentName(type) {
105
+ if (typeof type === 'string') return type;
106
+ return type.displayName || type.name || 'Unknown';
107
+ };
@@ -0,0 +1,55 @@
1
+ "use strict";
2
+
3
+ Object.defineProperty(exports, "__esModule", {
4
+ value: true
5
+ });
6
+ exports.euiSplitButtonStyles = exports.euiSplitButtonDividerStyles = exports.euiSplitButtonActionStyles = void 0;
7
+ var _react = require("@emotion/react");
8
+ var _global_styling = require("../../../global_styling");
9
+ function _EMOTION_STRINGIFIED_CSS_ERROR__() { return "You have tried to stringify object returned from `css` function. It isn't supposed to be used directly (e.g. as value of the `className` prop), but rather handed to emotion so it can handle it (e.g. as value of `css` prop)."; } /*
10
+ * Copyright Elasticsearch B.V. and/or licensed to Elasticsearch B.V. under one
11
+ * or more contributor license agreements. Licensed under the Elastic License
12
+ * 2.0 and the Server Side Public License, v 1; you may not use this file except
13
+ * in compliance with, at your election, the Elastic License 2.0 or the Server
14
+ * Side Public License, v 1.
15
+ */
16
+ var euiSplitButtonStyles = exports.euiSplitButtonStyles = function euiSplitButtonStyles(euiThemeContext) {
17
+ var euiTheme = euiThemeContext.euiTheme;
18
+ var primaryDisabledSelector = ".euiSplitButtonActionPrimary:is(".concat(_global_styling.euiDisabledSelector, ")");
19
+ var secondaryDisabledSelector = ".euiSplitButtonActionSecondary:is(".concat(_global_styling.euiDisabledSelector, ")");
20
+ var dividerSelector = ".euiSplitButton__divider";
21
+ return {
22
+ euiSplitButton: /*#__PURE__*/(0, _react.css)("display:inline-flex;flex-wrap:nowrap;&:has(", primaryDisabledSelector, "):has(", secondaryDisabledSelector, "){", dividerSelector, "{", (0, _global_styling.highContrastModeStyles)(euiThemeContext, {
23
+ // When both buttons are disabled set as visual gap
24
+ none: "\n border-color: transparent;\n ",
25
+ // When both buttons are disabled set a disabled divider color
26
+ preferred: "\n border-color: ".concat(euiTheme.colors.borderBaseDisabled, ";\n ")
27
+ }), ";}};label:euiSplitButton;"),
28
+ // When both buttons are enabled set as visual gap
29
+ fill: /*#__PURE__*/(0, _react.css)("&:not(:has(", primaryDisabledSelector, ")):not(\n :has(", secondaryDisabledSelector, ")\n ){", dividerSelector, "{border-color:transparent;}};label:fill;")
30
+ };
31
+ };
32
+ var euiSplitButtonActionStyles = exports.euiSplitButtonActionStyles = {
33
+ euiSplitButtonActionPrimary: process.env.NODE_ENV === "production" ? {
34
+ name: "12txneb-euiSplitButtonActionPrimary",
35
+ styles: "z-index:0;border-inline-end:none;border-start-end-radius:0;border-end-end-radius:0;label:euiSplitButtonActionPrimary;"
36
+ } : {
37
+ name: "12txneb-euiSplitButtonActionPrimary",
38
+ styles: "z-index:0;border-inline-end:none;border-start-end-radius:0;border-end-end-radius:0;label:euiSplitButtonActionPrimary;",
39
+ toString: _EMOTION_STRINGIFIED_CSS_ERROR__
40
+ },
41
+ euiSplitButtonActionSecondary: process.env.NODE_ENV === "production" ? {
42
+ name: "5uh4vx-euiSplitButtonActionSecondary",
43
+ styles: "border-inline-start:none;border-start-start-radius:0;border-end-start-radius:0;label:euiSplitButtonActionSecondary;"
44
+ } : {
45
+ name: "5uh4vx-euiSplitButtonActionSecondary",
46
+ styles: "border-inline-start:none;border-start-start-radius:0;border-end-start-radius:0;label:euiSplitButtonActionSecondary;",
47
+ toString: _EMOTION_STRINGIFIED_CSS_ERROR__
48
+ }
49
+ };
50
+ var euiSplitButtonDividerStyles = exports.euiSplitButtonDividerStyles = function euiSplitButtonDividerStyles(euiThemeContext, color) {
51
+ var euiTheme = euiThemeContext.euiTheme;
52
+ return {
53
+ divider: /*#__PURE__*/(0, _react.css)("border-inline-start:", euiTheme.border.width.thin, " solid ", color, ";;label:divider;")
54
+ };
55
+ };
@@ -0,0 +1,98 @@
1
+ "use strict";
2
+
3
+ var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefault");
4
+ var _typeof = require("@babel/runtime/helpers/typeof");
5
+ Object.defineProperty(exports, "__esModule", {
6
+ value: true
7
+ });
8
+ exports.EuiSplitButtonActionSecondary = exports.EuiSplitButtonActionPrimary = void 0;
9
+ var _extends2 = _interopRequireDefault(require("@babel/runtime/helpers/extends"));
10
+ var _defineProperty2 = _interopRequireDefault(require("@babel/runtime/helpers/defineProperty"));
11
+ var _objectWithoutProperties2 = _interopRequireDefault(require("@babel/runtime/helpers/objectWithoutProperties"));
12
+ var _react = _interopRequireWildcard(require("react"));
13
+ var _classnames = _interopRequireDefault(require("classnames"));
14
+ var _popover = require("../../popover");
15
+ var _tool_tip = require("../../tool_tip");
16
+ var _button = require("../button");
17
+ var _button_display = require("../button_display/_button_display");
18
+ var _button_icon = require("../button_icon");
19
+ var _split_button = require("./split_button.styles");
20
+ var _split_button_context = require("./split_button_context");
21
+ var _react2 = require("@emotion/react");
22
+ var _excluded = ["className", "isIconOnly", "tooltipProps"],
23
+ _excluded2 = ["fill", "isDisabled", "isLoading"],
24
+ _excluded3 = ["className", "popoverProps", "tooltipProps"],
25
+ _excluded4 = ["fill", "isDisabled", "isLoading"];
26
+ /*
27
+ * Copyright Elasticsearch B.V. and/or licensed to Elasticsearch B.V. under one
28
+ * or more contributor license agreements. Licensed under the Elastic License
29
+ * 2.0 and the Server Side Public License, v 1; you may not use this file except
30
+ * in compliance with, at your election, the Elastic License 2.0 or the Server
31
+ * Side Public License, v 1.
32
+ */
33
+ function _getRequireWildcardCache(e) { if ("function" != typeof WeakMap) return null; var r = new WeakMap(), t = new WeakMap(); return (_getRequireWildcardCache = function _getRequireWildcardCache(e) { return e ? t : r; })(e); }
34
+ function _interopRequireWildcard(e, r) { if (!r && e && e.__esModule) return e; if (null === e || "object" != _typeof(e) && "function" != typeof e) return { default: e }; var t = _getRequireWildcardCache(r); if (t && t.has(e)) return t.get(e); var n = { __proto__: null }, a = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var u in e) if ("default" !== u && {}.hasOwnProperty.call(e, u)) { var i = a ? Object.getOwnPropertyDescriptor(e, u) : null; i && (i.get || i.set) ? Object.defineProperty(n, u, i) : n[u] = e[u]; } return n.default = e, t && t.set(e, n), n; }
35
+ 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; }
36
+ 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) { (0, _defineProperty2.default)(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; }
37
+ var EuiSplitButtonActionPrimary = exports.EuiSplitButtonActionPrimary = function EuiSplitButtonActionPrimary(_ref) {
38
+ var className = _ref.className,
39
+ isIconOnly = _ref.isIconOnly,
40
+ tooltipProps = _ref.tooltipProps,
41
+ rest = (0, _objectWithoutProperties2.default)(_ref, _excluded);
42
+ var _useContext = (0, _react.useContext)(_split_button_context.EuiSplitButtonContext),
43
+ fill = _useContext.fill,
44
+ isDisabled = _useContext.isDisabled,
45
+ isLoading = _useContext.isLoading,
46
+ sharedRest = (0, _objectWithoutProperties2.default)(_useContext, _excluded2);
47
+ var _isDisabled = !!isDisabled || (0, _button_display.isButtonDisabled)(rest);
48
+ var _isLoading = !!isLoading || !!rest.isLoading;
49
+ var display = fill ? 'fill' : 'base';
50
+ var classes = (0, _classnames.default)('euiSplitButtonActionPrimary', className);
51
+ var styles = _split_button.euiSplitButtonActionStyles;
52
+ var actionProps = _objectSpread(_objectSpread(_objectSpread({}, rest), sharedRest), {}, {
53
+ isDisabled: _isDisabled,
54
+ isLoading: _isLoading,
55
+ css: [styles.euiSplitButtonActionPrimary],
56
+ className: classes
57
+ });
58
+ var actionButtonProps = _objectSpread(_objectSpread({}, actionProps), {}, {
59
+ fill: fill
60
+ });
61
+ var actionIconProps = _objectSpread(_objectSpread({}, actionProps), {}, {
62
+ display: display
63
+ });
64
+ var button = isIconOnly ? (0, _react2.jsx)(_button_icon.EuiButtonIcon, actionIconProps) : (0, _react2.jsx)(_button.EuiButton, actionButtonProps);
65
+ return tooltipProps ? (0, _react2.jsx)(_tool_tip.EuiToolTip, tooltipProps, button) : button;
66
+ };
67
+ var EuiSplitButtonActionSecondary = exports.EuiSplitButtonActionSecondary = function EuiSplitButtonActionSecondary(_ref2) {
68
+ var className = _ref2.className,
69
+ popoverProps = _ref2.popoverProps,
70
+ tooltipProps = _ref2.tooltipProps,
71
+ rest = (0, _objectWithoutProperties2.default)(_ref2, _excluded3);
72
+ var _useContext2 = (0, _react.useContext)(_split_button_context.EuiSplitButtonContext),
73
+ fill = _useContext2.fill,
74
+ isDisabled = _useContext2.isDisabled,
75
+ isLoading = _useContext2.isLoading,
76
+ sharedRest = (0, _objectWithoutProperties2.default)(_useContext2, _excluded4);
77
+ var _isDisabled = !!isDisabled || (0, _button_display.isButtonDisabled)(rest);
78
+ var _isLoading = !!isLoading || !!rest.isLoading;
79
+ var display = fill ? 'fill' : 'base';
80
+ var classes = (0, _classnames.default)('euiSplitButtonActionSecondary', className);
81
+ var styles = _split_button.euiSplitButtonActionStyles;
82
+ var actionProps = _objectSpread(_objectSpread(_objectSpread({}, rest), sharedRest), {}, {
83
+ display: display,
84
+ // enforce arrowDown icon when a popover is rendered
85
+ iconType: popoverProps != null ? 'arrowDown' : rest.iconType,
86
+ isDisabled: _isDisabled,
87
+ isLoading: _isLoading,
88
+ css: [styles.euiSplitButtonActionSecondary],
89
+ className: classes
90
+ });
91
+ var button = (0, _react2.jsx)(_button_icon.EuiButtonIcon, actionProps);
92
+ var action = tooltipProps ? (0, _react2.jsx)(_tool_tip.EuiToolTip, tooltipProps, button) : button;
93
+ return popoverProps ? (0, _react2.jsx)(_popover.EuiPopover, (0, _extends2.default)({
94
+ anchorPosition: "downCenter"
95
+ }, popoverProps, {
96
+ button: action
97
+ })) : action;
98
+ };