@elastic/eui 112.3.0 → 113.0.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 (294) hide show
  1. package/es/components/badge/beta_badge/beta_badge.styles.js +1 -1
  2. package/es/components/badge/color_utils.js +1 -1
  3. package/es/components/badge/notification_badge/badge_notification.styles.js +1 -1
  4. package/es/components/button/button_display/_button_display.js +1 -0
  5. package/es/components/button/button_display/_button_display.styles.js +3 -3
  6. package/es/components/button/button_display/_button_display_content.js +6 -1
  7. package/es/components/button/button_display/_button_display_content.styles.js +6 -1
  8. package/es/components/button/button_empty/button_empty.js +1 -0
  9. package/es/components/button/button_empty/button_empty.styles.js +3 -3
  10. package/es/components/button/button_group/button_group.js +4 -27
  11. package/es/components/button/button_group/button_group_button.js +4 -27
  12. package/es/components/code/code_block_annotations.js +1 -1
  13. package/es/components/collapsible_nav/collapsible_nav_group/collapsible_nav_group.styles.js +1 -1
  14. package/es/components/color_picker/color_picker.js +2 -1
  15. package/es/components/color_picker/color_picker.styles.js +1 -1
  16. package/es/components/color_picker/hue.styles.js +2 -2
  17. package/es/components/color_picker/saturation.styles.js +2 -2
  18. package/es/components/date_picker/auto_refresh/auto_refresh.js +8 -8
  19. package/es/components/date_picker/date_picker_range.js +12 -2
  20. package/es/components/date_picker/date_picker_range.styles.js +1 -1
  21. package/es/components/date_picker/super_date_picker/date_popover/date_popover_button.styles.js +6 -1
  22. package/es/components/date_picker/super_date_picker/quick_select_popover/quick_select_popover.js +9 -24
  23. package/es/components/date_picker/super_date_picker/super_date_picker.js +3 -1
  24. package/es/components/date_picker/super_date_picker/super_date_picker.styles.js +7 -13
  25. package/es/components/filter_group/filter_button.styles.js +1 -1
  26. package/es/components/flyout/flyout_body.js +10 -3
  27. package/es/components/flyout/manager/actions.js +11 -0
  28. package/es/components/flyout/manager/flyout_managed.js +4 -3
  29. package/es/components/flyout/manager/index.js +1 -1
  30. package/es/components/flyout/manager/reducer.js +19 -1
  31. package/es/components/flyout/manager/store.js +4 -1
  32. package/es/components/form/field_password/field_password.js +6 -3
  33. package/es/components/form/form.styles.js +18 -11
  34. package/es/components/form/form_control_button/form_control_button.js +30 -7
  35. package/es/components/form/form_control_button/form_control_button.styles.js +5 -2
  36. package/es/components/form/form_control_layout/append_prepend/form_append_prepend.js +149 -0
  37. package/es/components/form/form_control_layout/append_prepend/form_append_prepend.styles.js +28 -0
  38. package/es/components/form/form_control_layout/append_prepend/index.js +9 -0
  39. package/es/components/form/form_control_layout/form_control_layout.js +55 -24
  40. package/es/components/form/form_control_layout/form_control_layout.styles.js +46 -27
  41. package/es/components/form/form_control_layout/form_control_layout_context.js +21 -0
  42. package/es/components/form/form_control_layout/form_control_layout_delimited.styles.js +5 -12
  43. package/es/components/form/form_control_layout/index.js +2 -1
  44. package/es/components/form/form_label/form_label.js +17 -3
  45. package/es/components/form/range/range_levels.styles.js +1 -1
  46. package/es/components/form/range/range_tooltip.styles.js +1 -1
  47. package/es/components/header/header.styles.js +1 -1
  48. package/es/components/header/header_links/header_link.js +7 -0
  49. package/es/components/header/header_section/header_section_item_button.js +7 -0
  50. package/es/components/icon/icon.styles.js +1 -1
  51. package/es/components/image/image_caption.styles.js +1 -1
  52. package/es/components/link/link.styles.js +1 -1
  53. package/es/components/list_group/list_group_item.styles.js +1 -1
  54. package/es/components/markdown_editor/markdown_format.styles.js +1 -1
  55. package/es/components/pagination/pagination_button.js +7 -0
  56. package/es/components/pagination/pagination_button.styles.js +1 -1
  57. package/es/components/text/text_color.styles.js +1 -1
  58. package/es/components/token/token.styles.js +1 -1
  59. package/es/components/tool_tip/tool_tip.styles.js +1 -1
  60. package/es/global_styling/mixins/_button.js +7 -2
  61. package/eui.d.ts +180 -48
  62. package/lib/components/badge/beta_badge/beta_badge.styles.js +1 -1
  63. package/lib/components/badge/color_utils.js +1 -1
  64. package/lib/components/badge/notification_badge/badge_notification.styles.js +1 -1
  65. package/lib/components/button/button_display/_button_display.js +1 -0
  66. package/lib/components/button/button_display/_button_display.styles.js +2 -2
  67. package/lib/components/button/button_display/_button_display_content.js +6 -1
  68. package/lib/components/button/button_display/_button_display_content.styles.js +6 -1
  69. package/lib/components/button/button_empty/button_empty.js +2 -1
  70. package/lib/components/button/button_empty/button_empty.styles.js +2 -2
  71. package/lib/components/button/button_group/button_group.js +5 -28
  72. package/lib/components/button/button_group/button_group_button.js +4 -27
  73. package/lib/components/code/code_block_annotations.js +1 -1
  74. package/lib/components/collapsible_nav/collapsible_nav_group/collapsible_nav_group.styles.js +1 -1
  75. package/lib/components/color_picker/color_picker.js +2 -1
  76. package/lib/components/color_picker/color_picker.styles.js +1 -1
  77. package/lib/components/color_picker/hue.styles.js +2 -2
  78. package/lib/components/color_picker/saturation.styles.js +2 -2
  79. package/lib/components/date_picker/auto_refresh/auto_refresh.js +8 -8
  80. package/lib/components/date_picker/date_picker_range.js +12 -2
  81. package/lib/components/date_picker/date_picker_range.styles.js +1 -1
  82. package/lib/components/date_picker/super_date_picker/date_popover/date_popover_button.styles.js +8 -3
  83. package/lib/components/date_picker/super_date_picker/quick_select_popover/quick_select_popover.js +9 -23
  84. package/lib/components/date_picker/super_date_picker/super_date_picker.js +3 -1
  85. package/lib/components/date_picker/super_date_picker/super_date_picker.styles.js +7 -13
  86. package/lib/components/filter_group/filter_button.styles.js +1 -1
  87. package/lib/components/flyout/flyout_body.js +10 -3
  88. package/lib/components/flyout/manager/actions.js +12 -1
  89. package/lib/components/flyout/manager/flyout_managed.js +4 -3
  90. package/lib/components/flyout/manager/index.js +6 -0
  91. package/lib/components/flyout/manager/reducer.js +18 -0
  92. package/lib/components/flyout/manager/store.js +3 -0
  93. package/lib/components/form/field_password/field_password.js +6 -3
  94. package/lib/components/form/form.styles.js +19 -12
  95. package/lib/components/form/form_control_button/form_control_button.js +29 -6
  96. package/lib/components/form/form_control_button/form_control_button.styles.js +3 -0
  97. package/lib/components/form/form_control_layout/append_prepend/form_append_prepend.js +158 -0
  98. package/lib/components/form/form_control_layout/append_prepend/form_append_prepend.styles.js +34 -0
  99. package/lib/components/form/form_control_layout/append_prepend/index.js +18 -0
  100. package/lib/components/form/form_control_layout/form_control_layout.js +55 -24
  101. package/lib/components/form/form_control_layout/form_control_layout.styles.js +45 -26
  102. package/lib/components/form/form_control_layout/form_control_layout_context.js +27 -0
  103. package/lib/components/form/form_control_layout/form_control_layout_delimited.styles.js +4 -11
  104. package/lib/components/form/form_control_layout/index.js +18 -1
  105. package/lib/components/form/form_label/form_label.js +17 -3
  106. package/lib/components/form/range/range_levels.styles.js +1 -1
  107. package/lib/components/form/range/range_tooltip.styles.js +1 -1
  108. package/lib/components/header/header.styles.js +1 -1
  109. package/lib/components/header/header_links/header_link.js +7 -0
  110. package/lib/components/header/header_section/header_section_item_button.js +7 -0
  111. package/lib/components/icon/icon.styles.js +1 -1
  112. package/lib/components/image/image_caption.styles.js +1 -1
  113. package/lib/components/inline_edit/inline_edit_form.js +1 -1
  114. package/lib/components/link/link.styles.js +1 -1
  115. package/lib/components/list_group/list_group_item.styles.js +1 -1
  116. package/lib/components/markdown_editor/markdown_format.styles.js +1 -1
  117. package/lib/components/pagination/pagination_button.js +7 -0
  118. package/lib/components/pagination/pagination_button.styles.js +1 -1
  119. package/lib/components/text/text_color.styles.js +1 -1
  120. package/lib/components/token/token.styles.js +1 -1
  121. package/lib/components/tool_tip/tool_tip.styles.js +1 -1
  122. package/lib/global_styling/mixins/_button.js +8 -3
  123. package/optimize/es/components/badge/beta_badge/beta_badge.styles.js +1 -1
  124. package/optimize/es/components/badge/color_utils.js +1 -1
  125. package/optimize/es/components/badge/notification_badge/badge_notification.styles.js +1 -1
  126. package/optimize/es/components/button/button_display/_button_display.js +1 -0
  127. package/optimize/es/components/button/button_display/_button_display.styles.js +3 -3
  128. package/optimize/es/components/button/button_display/_button_display_content.js +5 -1
  129. package/optimize/es/components/button/button_display/_button_display_content.styles.js +6 -1
  130. package/optimize/es/components/button/button_empty/button_empty.js +1 -0
  131. package/optimize/es/components/button/button_empty/button_empty.styles.js +3 -3
  132. package/optimize/es/components/code/code_block_annotations.js +1 -1
  133. package/optimize/es/components/collapsible_nav/collapsible_nav_group/collapsible_nav_group.styles.js +1 -1
  134. package/optimize/es/components/color_picker/color_picker.js +2 -1
  135. package/optimize/es/components/color_picker/color_picker.styles.js +1 -1
  136. package/optimize/es/components/color_picker/hue.styles.js +2 -2
  137. package/optimize/es/components/color_picker/saturation.styles.js +2 -2
  138. package/optimize/es/components/date_picker/auto_refresh/auto_refresh.js +8 -8
  139. package/optimize/es/components/date_picker/date_picker_range.js +8 -2
  140. package/optimize/es/components/date_picker/date_picker_range.styles.js +1 -1
  141. package/optimize/es/components/date_picker/super_date_picker/date_popover/date_popover_button.styles.js +6 -1
  142. package/optimize/es/components/date_picker/super_date_picker/quick_select_popover/quick_select_popover.js +9 -21
  143. package/optimize/es/components/date_picker/super_date_picker/super_date_picker.js +3 -1
  144. package/optimize/es/components/date_picker/super_date_picker/super_date_picker.styles.js +7 -13
  145. package/optimize/es/components/filter_group/filter_button.styles.js +1 -1
  146. package/optimize/es/components/flyout/flyout_body.js +5 -2
  147. package/optimize/es/components/flyout/manager/actions.js +11 -0
  148. package/optimize/es/components/flyout/manager/flyout_managed.js +4 -3
  149. package/optimize/es/components/flyout/manager/index.js +1 -1
  150. package/optimize/es/components/flyout/manager/reducer.js +19 -1
  151. package/optimize/es/components/flyout/manager/store.js +4 -1
  152. package/optimize/es/components/form/field_password/field_password.js +6 -3
  153. package/optimize/es/components/form/form.styles.js +18 -11
  154. package/optimize/es/components/form/form_control_button/form_control_button.js +23 -7
  155. package/optimize/es/components/form/form_control_button/form_control_button.styles.js +5 -2
  156. package/optimize/es/components/form/form_control_layout/append_prepend/form_append_prepend.js +102 -0
  157. package/optimize/es/components/form/form_control_layout/append_prepend/form_append_prepend.styles.js +28 -0
  158. package/optimize/es/components/form/form_control_layout/append_prepend/index.js +9 -0
  159. package/optimize/es/components/form/form_control_layout/form_control_layout.js +52 -23
  160. package/optimize/es/components/form/form_control_layout/form_control_layout.styles.js +46 -27
  161. package/optimize/es/components/form/form_control_layout/form_control_layout_context.js +21 -0
  162. package/optimize/es/components/form/form_control_layout/form_control_layout_delimited.styles.js +5 -12
  163. package/optimize/es/components/form/form_control_layout/index.js +2 -1
  164. package/optimize/es/components/form/form_label/form_label.js +9 -2
  165. package/optimize/es/components/form/range/range_levels.styles.js +1 -1
  166. package/optimize/es/components/form/range/range_tooltip.styles.js +1 -1
  167. package/optimize/es/components/header/header.styles.js +1 -1
  168. package/optimize/es/components/icon/icon.styles.js +1 -1
  169. package/optimize/es/components/image/image_caption.styles.js +1 -1
  170. package/optimize/es/components/link/link.styles.js +1 -1
  171. package/optimize/es/components/list_group/list_group_item.styles.js +1 -1
  172. package/optimize/es/components/markdown_editor/markdown_format.styles.js +1 -1
  173. package/optimize/es/components/pagination/pagination_button.styles.js +1 -1
  174. package/optimize/es/components/text/text_color.styles.js +1 -1
  175. package/optimize/es/components/token/token.styles.js +1 -1
  176. package/optimize/es/components/tool_tip/tool_tip.styles.js +1 -1
  177. package/optimize/es/global_styling/mixins/_button.js +7 -2
  178. package/optimize/lib/components/badge/beta_badge/beta_badge.styles.js +1 -1
  179. package/optimize/lib/components/badge/color_utils.js +1 -1
  180. package/optimize/lib/components/badge/notification_badge/badge_notification.styles.js +1 -1
  181. package/optimize/lib/components/button/button_display/_button_display.js +1 -0
  182. package/optimize/lib/components/button/button_display/_button_display.styles.js +2 -2
  183. package/optimize/lib/components/button/button_display/_button_display_content.js +5 -1
  184. package/optimize/lib/components/button/button_display/_button_display_content.styles.js +6 -1
  185. package/optimize/lib/components/button/button_empty/button_empty.js +1 -0
  186. package/optimize/lib/components/button/button_empty/button_empty.styles.js +2 -2
  187. package/optimize/lib/components/code/code_block_annotations.js +1 -1
  188. package/optimize/lib/components/collapsible_nav/collapsible_nav_group/collapsible_nav_group.styles.js +1 -1
  189. package/optimize/lib/components/color_picker/color_picker.js +2 -1
  190. package/optimize/lib/components/color_picker/color_picker.styles.js +1 -1
  191. package/optimize/lib/components/color_picker/hue.styles.js +2 -2
  192. package/optimize/lib/components/color_picker/saturation.styles.js +2 -2
  193. package/optimize/lib/components/date_picker/auto_refresh/auto_refresh.js +7 -7
  194. package/optimize/lib/components/date_picker/date_picker_range.js +8 -2
  195. package/optimize/lib/components/date_picker/date_picker_range.styles.js +1 -1
  196. package/optimize/lib/components/date_picker/super_date_picker/date_popover/date_popover_button.styles.js +8 -3
  197. package/optimize/lib/components/date_picker/super_date_picker/quick_select_popover/quick_select_popover.js +9 -21
  198. package/optimize/lib/components/date_picker/super_date_picker/super_date_picker.js +3 -1
  199. package/optimize/lib/components/date_picker/super_date_picker/super_date_picker.styles.js +7 -13
  200. package/optimize/lib/components/filter_group/filter_button.styles.js +1 -1
  201. package/optimize/lib/components/flyout/flyout_body.js +5 -2
  202. package/optimize/lib/components/flyout/manager/actions.js +12 -1
  203. package/optimize/lib/components/flyout/manager/flyout_managed.js +4 -3
  204. package/optimize/lib/components/flyout/manager/index.js +6 -0
  205. package/optimize/lib/components/flyout/manager/reducer.js +18 -0
  206. package/optimize/lib/components/flyout/manager/store.js +3 -0
  207. package/optimize/lib/components/form/field_password/field_password.js +6 -3
  208. package/optimize/lib/components/form/form.styles.js +19 -12
  209. package/optimize/lib/components/form/form_control_button/form_control_button.js +22 -6
  210. package/optimize/lib/components/form/form_control_button/form_control_button.styles.js +3 -0
  211. package/optimize/lib/components/form/form_control_layout/append_prepend/form_append_prepend.js +111 -0
  212. package/optimize/lib/components/form/form_control_layout/append_prepend/form_append_prepend.styles.js +34 -0
  213. package/optimize/lib/components/form/form_control_layout/append_prepend/index.js +18 -0
  214. package/optimize/lib/components/form/form_control_layout/form_control_layout.js +52 -23
  215. package/optimize/lib/components/form/form_control_layout/form_control_layout.styles.js +45 -26
  216. package/optimize/lib/components/form/form_control_layout/form_control_layout_context.js +27 -0
  217. package/optimize/lib/components/form/form_control_layout/form_control_layout_delimited.styles.js +4 -11
  218. package/optimize/lib/components/form/form_control_layout/index.js +18 -1
  219. package/optimize/lib/components/form/form_label/form_label.js +9 -2
  220. package/optimize/lib/components/form/range/range_levels.styles.js +1 -1
  221. package/optimize/lib/components/form/range/range_tooltip.styles.js +1 -1
  222. package/optimize/lib/components/header/header.styles.js +1 -1
  223. package/optimize/lib/components/icon/icon.styles.js +1 -1
  224. package/optimize/lib/components/image/image_caption.styles.js +1 -1
  225. package/optimize/lib/components/link/link.styles.js +1 -1
  226. package/optimize/lib/components/list_group/list_group_item.styles.js +1 -1
  227. package/optimize/lib/components/markdown_editor/markdown_format.styles.js +1 -1
  228. package/optimize/lib/components/pagination/pagination_button.styles.js +1 -1
  229. package/optimize/lib/components/text/text_color.styles.js +1 -1
  230. package/optimize/lib/components/token/token.styles.js +1 -1
  231. package/optimize/lib/components/tool_tip/tool_tip.styles.js +1 -1
  232. package/optimize/lib/global_styling/mixins/_button.js +8 -3
  233. package/package.json +4 -4
  234. package/test-env/components/badge/beta_badge/beta_badge.styles.js +1 -1
  235. package/test-env/components/badge/color_utils.js +1 -1
  236. package/test-env/components/badge/notification_badge/badge_notification.styles.js +1 -1
  237. package/test-env/components/button/button_display/_button_display.js +1 -0
  238. package/test-env/components/button/button_display/_button_display.styles.js +2 -2
  239. package/test-env/components/button/button_display/_button_display_content.js +6 -1
  240. package/test-env/components/button/button_display/_button_display_content.styles.js +6 -1
  241. package/test-env/components/button/button_empty/button_empty.js +2 -1
  242. package/test-env/components/button/button_empty/button_empty.styles.js +2 -2
  243. package/test-env/components/button/button_group/button_group.js +5 -28
  244. package/test-env/components/button/button_group/button_group_button.js +4 -27
  245. package/test-env/components/code/code_block_annotations.js +1 -1
  246. package/test-env/components/collapsible_nav/collapsible_nav_group/collapsible_nav_group.styles.js +1 -1
  247. package/test-env/components/color_picker/color_picker.js +2 -1
  248. package/test-env/components/color_picker/color_picker.styles.js +1 -1
  249. package/test-env/components/color_picker/hue.styles.js +2 -2
  250. package/test-env/components/color_picker/saturation.styles.js +2 -2
  251. package/test-env/components/date_picker/auto_refresh/auto_refresh.js +8 -8
  252. package/test-env/components/date_picker/date_picker_range.js +12 -2
  253. package/test-env/components/date_picker/date_picker_range.styles.js +1 -1
  254. package/test-env/components/date_picker/super_date_picker/date_popover/date_popover_button.styles.js +8 -3
  255. package/test-env/components/date_picker/super_date_picker/quick_select_popover/quick_select_popover.js +9 -21
  256. package/test-env/components/date_picker/super_date_picker/super_date_picker.js +3 -1
  257. package/test-env/components/date_picker/super_date_picker/super_date_picker.styles.js +7 -13
  258. package/test-env/components/filter_group/filter_button.styles.js +1 -1
  259. package/test-env/components/flyout/flyout_body.js +10 -3
  260. package/test-env/components/flyout/manager/actions.js +12 -1
  261. package/test-env/components/flyout/manager/flyout_managed.js +4 -3
  262. package/test-env/components/flyout/manager/index.js +6 -0
  263. package/test-env/components/flyout/manager/reducer.js +18 -0
  264. package/test-env/components/flyout/manager/store.js +3 -0
  265. package/test-env/components/form/field_password/field_password.js +6 -3
  266. package/test-env/components/form/form.styles.js +19 -12
  267. package/test-env/components/form/form_control_button/form_control_button.js +29 -6
  268. package/test-env/components/form/form_control_button/form_control_button.styles.js +3 -0
  269. package/test-env/components/form/form_control_layout/append_prepend/form_append_prepend.js +157 -0
  270. package/test-env/components/form/form_control_layout/append_prepend/form_append_prepend.styles.js +34 -0
  271. package/test-env/components/form/form_control_layout/append_prepend/index.js +18 -0
  272. package/test-env/components/form/form_control_layout/form_control_layout.js +55 -24
  273. package/test-env/components/form/form_control_layout/form_control_layout.styles.js +45 -26
  274. package/test-env/components/form/form_control_layout/form_control_layout_context.js +27 -0
  275. package/test-env/components/form/form_control_layout/form_control_layout_delimited.styles.js +4 -11
  276. package/test-env/components/form/form_control_layout/index.js +18 -1
  277. package/test-env/components/form/form_label/form_label.js +17 -3
  278. package/test-env/components/form/range/range_levels.styles.js +1 -1
  279. package/test-env/components/form/range/range_tooltip.styles.js +1 -1
  280. package/test-env/components/header/header.styles.js +1 -1
  281. package/test-env/components/header/header_links/header_link.js +7 -0
  282. package/test-env/components/header/header_section/header_section_item_button.js +7 -0
  283. package/test-env/components/icon/icon.styles.js +1 -1
  284. package/test-env/components/image/image_caption.styles.js +1 -1
  285. package/test-env/components/inline_edit/inline_edit_form.js +1 -1
  286. package/test-env/components/link/link.styles.js +1 -1
  287. package/test-env/components/list_group/list_group_item.styles.js +1 -1
  288. package/test-env/components/markdown_editor/markdown_format.styles.js +1 -1
  289. package/test-env/components/pagination/pagination_button.js +7 -0
  290. package/test-env/components/pagination/pagination_button.styles.js +1 -1
  291. package/test-env/components/text/text_color.styles.js +1 -1
  292. package/test-env/components/token/token.styles.js +1 -1
  293. package/test-env/components/tool_tip/tool_tip.styles.js +1 -1
  294. package/test-env/global_styling/mixins/_button.js +8 -3
@@ -1,12 +1,6 @@
1
- function _typeof(o) { "@babel/helpers - typeof"; return _typeof = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function (o) { return typeof o; } : function (o) { return o && "function" == typeof Symbol && o.constructor === Symbol && o !== Symbol.prototype ? "symbol" : typeof o; }, _typeof(o); }
2
1
  var _excluded = ["applyTime", "buttonProps"],
3
- _excluded2 = ["contentProps", "onClick"];
2
+ _excluded2 = ["onClick"];
4
3
  function _extends() { return _extends = Object.assign ? Object.assign.bind() : function (n) { for (var e = 1; e < arguments.length; e++) { var t = arguments[e]; for (var r in t) ({}).hasOwnProperty.call(t, r) && (n[r] = t[r]); } return n; }, _extends.apply(null, arguments); }
5
- 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; }
6
- 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; }
7
- 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; }
8
- function _toPropertyKey(t) { var i = _toPrimitive(t, "string"); return "symbol" == _typeof(i) ? i : i + ""; }
9
- function _toPrimitive(t, r) { if ("object" != _typeof(t) || !t) return t; var e = t[Symbol.toPrimitive]; if (void 0 !== e) { var i = e.call(t, r || "default"); if ("object" != _typeof(i)) return i; throw new TypeError("@@toPrimitive must return a primitive value."); } return ("string" === r ? String : Number)(t); }
10
4
  function _slicedToArray(r, e) { return _arrayWithHoles(r) || _iterableToArrayLimit(r, e) || _unsupportedIterableToArray(r, e) || _nonIterableRest(); }
11
5
  function _nonIterableRest() { throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method."); }
12
6
  function _unsupportedIterableToArray(r, a) { if (r) { if ("string" == typeof r) return _arrayLikeToArray(r, a); var t = {}.toString.call(r).slice(8, -1); return "Object" === t && r.constructor && (t = r.constructor.name), "Map" === t || "Set" === t ? Array.from(r) : "Arguments" === t || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(t) ? _arrayLikeToArray(r, a) : void 0; } }
@@ -27,9 +21,8 @@ import React, { useState, useCallback, useMemo } from 'react';
27
21
  import PropTypes from "prop-types";
28
22
  import { useEuiMemoizedStyles } from '../../../../services';
29
23
  import { useEuiI18n } from '../../../i18n';
30
- import { EuiButtonEmpty } from '../../../button';
31
- import { EuiIcon } from '../../../icon';
32
24
  import { EuiPopover } from '../../../popover';
25
+ import { EuiFormPrepend } from '../../../form';
33
26
  import { euiQuickSelectPopoverStyles } from './quick_select_popover.styles';
34
27
  import { EuiQuickSelectPanel } from './quick_select_panel';
35
28
  import { EuiQuickSelect } from './quick_select';
@@ -42,8 +35,7 @@ export var EuiQuickSelectPopover = function EuiQuickSelectPopover(_ref) {
42
35
  _ref$buttonProps = _ref.buttonProps,
43
36
  buttonProps = _ref$buttonProps === void 0 ? {} : _ref$buttonProps,
44
37
  props = _objectWithoutProperties(_ref, _excluded);
45
- var buttonContentProps = buttonProps.contentProps,
46
- buttonOnClick = buttonProps.onClick,
38
+ var buttonOnClick = buttonProps.onClick,
47
39
  quickSelectButtonProps = _objectWithoutProperties(buttonProps, _excluded2);
48
40
  var _useState = useState(),
49
41
  _useState2 = _slicedToArray(_useState, 2),
@@ -79,27 +71,20 @@ export var EuiQuickSelectPopover = function EuiQuickSelectPopover(_ref) {
79
71
  }
80
72
  }, [_applyTime, closePopover]);
81
73
  var buttonlabel = useEuiI18n('euiQuickSelectPopover.buttonLabel', 'Date quick select');
82
- var styles = useEuiMemoizedStyles(euiQuickSelectPopoverStyles);
83
74
  var quickSelectButtonOnClick = function quickSelectButtonOnClick(e) {
84
75
  togglePopover();
85
76
  buttonOnClick === null || buttonOnClick === void 0 || buttonOnClick(e);
86
77
  };
87
- var quickSelectButton = ___EmotionJSX(EuiButtonEmpty, _extends({
88
- css: styles.euiQuickSelectPopoverButton,
89
- contentProps: _objectSpread({
90
- css: styles.euiQuickSelectPopoverButton__content
91
- }, buttonContentProps),
78
+ var quickSelectButton = ___EmotionJSX(EuiFormPrepend, _extends({
79
+ element: "button",
80
+ iconLeft: "calendar",
81
+ iconRight: "arrowDown",
82
+ isDisabled: props.isDisabled,
92
83
  onClick: quickSelectButtonOnClick,
93
84
  "aria-label": buttonlabel,
94
85
  title: buttonlabel,
95
- size: "xs",
96
- iconType: "arrowDown",
97
- iconSide: "right",
98
- isDisabled: props.isDisabled,
99
86
  "data-test-subj": "superDatePickerToggleQuickMenuButton"
100
- }, quickSelectButtonProps), ___EmotionJSX(EuiIcon, {
101
- type: "calendar"
102
- }));
87
+ }, quickSelectButtonProps));
103
88
  return ___EmotionJSX(EuiPopover, {
104
89
  button: quickSelectButton,
105
90
  isOpen: isOpen,
@@ -344,12 +344,14 @@ export var EuiSuperDatePickerInternal = /*#__PURE__*/function (_Component) {
344
344
  var rangeProps = _objectSpread(_objectSpread({}, _rangeProps), {}, {
345
345
  disabled: formControlLayoutProps.isDisabled
346
346
  });
347
+ var hasChangedIcon = hasChanged && !isInvalid;
347
348
  return ___EmotionJSX(EuiI18nConsumer, null, function (_ref4) {
348
349
  var contextLocale = _ref4.locale;
349
350
  return ___EmotionJSX(EuiDatePickerRange, _extends({}, rangeProps, {
350
351
  css: rangeCssStyles,
351
352
  isCustom: true,
352
- iconType: false,
353
+ iconType: hasChangedIcon ? 'checkCircle' : false,
354
+ iconSide: hasChangedIcon ? 'right' : undefined,
353
355
  delimiter: isQuickSelectOnly ? '' : undefined,
354
356
  startDateControl: isQuickSelectOnly ? undefined : ___EmotionJSX(EuiDatePopoverButton, {
355
357
  css: styles.euiSuperDatePicker__rangeInput,
@@ -8,8 +8,7 @@ function _EMOTION_STRINGIFIED_CSS_ERROR__() { return "You have tried to stringif
8
8
  */
9
9
 
10
10
  import { css } from '@emotion/react';
11
- import { makeHighContrastColor } from '../../../services';
12
- import { euiFontSize, euiMaxBreakpoint, logicalCSS, mathWithUnits } from '../../../global_styling';
11
+ import { euiMaxBreakpoint, logicalCSS, mathWithUnits } from '../../../global_styling';
13
12
  import { highContrastModeStyles } from '../../../global_styling/functions/high_contrast';
14
13
  import { euiFormVariables, euiFormControlDefaultShadow, euiFormControlInvalidStyles, euiFormControlDisabledStyles, euiFormControlFocusStyles, euiFormControlHighlightBorderStyles } from '../../form/form.styles';
15
14
  var _ref = process.env.NODE_ENV === "production" ? {
@@ -39,8 +38,7 @@ export var euiSuperDatePickerStyles = function euiSuperDatePickerStyles(euiTheme
39
38
  });
40
39
 
41
40
  // Needs updating colors
42
- var needsUpdatingBackgroundColor = euiTheme.components.superDatePickerBackgroundSuccees;
43
- var needsUpdatingTextColor = makeHighContrastColor(euiTheme.colors.success)(needsUpdatingBackgroundColor);
41
+ var needsUpdatingTextColor = euiTheme.colors.textSuccess;
44
42
  return {
45
43
  euiSuperDatePicker: /*#__PURE__*/css("display:flex;gap:", gap, ";", logicalCSS('max-width', '100%'), " ", euiMaxBreakpoint(euiThemeContext, 'm'), "{", logicalCSS('width', '100%'), ";};label:euiSuperDatePicker;"),
46
44
  widths: {
@@ -68,21 +66,17 @@ export var euiSuperDatePickerStyles = function euiSuperDatePickerStyles(euiTheme
68
66
  euiSuperDatePicker__prettyDurationTooltip: /*#__PURE__*/css(logicalCSS('max-width', 'min(58ch, 90vw)'), ";;label:euiSuperDatePicker__prettyDurationTooltip;"),
69
67
  // Form states
70
68
  states: {
71
- euiSuperDatePicker__formControlLayout: /*#__PURE__*/css(".euiFormControlLayout__childrenWrapper{--euiFormControlStateHoverColor:", forms.borderHovered, ";", highContrastModeStyles(euiThemeContext, {
72
- none: "\n ".concat(euiFormControlDefaultShadow(euiThemeContext), "\n box-shadow: none;\n "),
69
+ euiSuperDatePicker__formControlLayout: /*#__PURE__*/css(".euiFormControlLayout__childrenWrapper{", highContrastModeStyles(euiThemeContext, {
70
+ none: "\n box-shadow: none;\n ",
73
71
  preferred: 'border: none;'
74
- }), ".euiDatePopoverButton:not(.euiDatePopoverButton-isSelected):hover{outline:none;}.euiPopover{border-radius:", forms.controlBorderRadius, ";&:first-child{", logicalCSS('border-top-left-radius', 'inherit'), " ", logicalCSS('border-bottom-left-radius', 'inherit'), ";}&:last-child{", logicalCSS('border-top-right-radius', 'inherit'), " ", logicalCSS('border-bottom-right-radius', 'inherit'), ";}}.euiDatePopoverButton{background-color:transparent;border-radius:inherit;}};label:euiSuperDatePicker__formControlLayout;"),
72
+ }), ".euiDatePopoverButton:not(.euiDatePopoverButton-isSelected):hover{outline:none;}.euiPopover{border-radius:", forms.controlBorderRadius, ";}.euiDatePopoverButton{background-color:transparent;border-radius:inherit;}};label:euiSuperDatePicker__formControlLayout;"),
75
73
  default: /*#__PURE__*/css(".euiFormControlLayout__childrenWrapper{color:", forms.textColor, ";background-color:", forms.backgroundColor, ";}.euiDatePopoverButton{--euiFormControlStateHoverColor:", forms.borderHovered, ";box-shadow:none;}.euiDatePopoverButton:focus,.euiPopover-isOpen .euiDatePopoverButton{", euiFormControlFocusStyles(euiThemeContext), ";};label:default;"),
76
74
  disabled: /*#__PURE__*/css(".euiFormControlLayout__childrenWrapper{", euiFormControlDisabledStyles(euiThemeContext), ";};label:disabled;"),
77
- invalid: /*#__PURE__*/css(".euiFormControlLayout__childrenWrapper{color:", euiTheme.colors.textDanger, ";background-color:", forms.backgroundColor, ";&:has(.euiPopover-isOpen, .euiDatePopoverButton:focus){--euiFormControlStateColor:", forms.borderColor, ";--euiFormControlStateHoverColor:", forms.borderHovered, ";}&:not(:has(.euiPopover-isOpen, .euiDatePopoverButton:focus)){", euiFormControlInvalidStyles(euiThemeContext), ";}.euiDatePopoverButton:focus,.euiPopover-isOpen .euiDatePopoverButton{", euiFormControlFocusStyles(euiThemeContext), ";}};label:invalid;"),
78
- needsUpdating: /*#__PURE__*/css(".euiFormControlLayout__childrenWrapper{--euiFormControlStateColor:", euiTheme.colors.success, ";--euiFormControlStateHoverColor:", euiTheme.colors.success, ";--euiFormControlStateWidth:", euiTheme.border.width.thin, ";color:", needsUpdatingTextColor, ";background-color:", needsUpdatingBackgroundColor, ";", euiFormControlHighlightBorderStyles, " &:has(.euiPopover-isOpen),&:focus-within{--euiFormControlStateColor:", forms.borderColor, ";--euiFormControlStateHoverColor:", forms.borderHovered, ";}}.euiFormControlLayoutDelimited__delimiter{color:inherit;}.euiDatePopoverButton{", euiFormControlDefaultShadow(euiThemeContext, {
75
+ invalid: /*#__PURE__*/css(".euiFormControlLayout__childrenWrapper{color:", euiTheme.colors.textDanger, ";&:has(.euiPopover-isOpen, .euiDatePopoverButton:focus){--euiFormControlStateColor:transparent;--euiFormControlStateHoverColor:transparent;}&:not(:has(.euiPopover-isOpen, .euiDatePopoverButton:focus)){", euiFormControlInvalidStyles(euiThemeContext), ";}.euiDatePopoverButton:focus,.euiPopover-isOpen .euiDatePopoverButton{", euiFormControlFocusStyles(euiThemeContext), ";}};label:invalid;"),
76
+ needsUpdating: /*#__PURE__*/css(".euiFormControlLayout__childrenWrapper{--euiFormControlStateColor:", euiTheme.colors.success, ";--euiFormControlStateHoverColor:", euiTheme.colors.success, ";--euiFormControlStateWidth:", euiTheme.border.width.thin, ";color:", needsUpdatingTextColor, ";", euiFormControlHighlightBorderStyles, " &:has(.euiPopover-isOpen, .euiDatePopoverButton:focus){--euiFormControlStateColor:transparent;--euiFormControlStateHoverColor:transparent;}&:has(.euiPopover-isOpen),&:focus-within{--euiFormControlStateColor:", forms.borderColor, ";--euiFormControlStateHoverColor:", forms.borderHovered, ";}}.euiFormControlLayoutDelimited__delimiter{color:inherit;}.euiDatePopoverButton{", euiFormControlDefaultShadow(euiThemeContext, {
79
77
  withBorder: false,
80
78
  withBackgroundColor: false
81
79
  }), " background-color:inherit;box-shadow:none;}.euiDatePopoverButton:focus,.euiPopover-isOpen .euiDatePopoverButton{", euiFormControlFocusStyles(euiThemeContext), ";};label:needsUpdating;")
82
80
  }
83
81
  };
84
- };
85
- export var _buttonStyles = function _buttonStyles(euiThemeContext) {
86
- var euiTheme = euiThemeContext.euiTheme;
87
- return /*#__PURE__*/css(logicalCSS('height', '100%'), " ", logicalCSS('width', '100%'), " ", logicalCSS('padding-horizontal', euiTheme.size.s), " font-size:", euiFontSize(euiThemeContext, 's').fontSize, ";white-space:nowrap;text-overflow:ellipsis;overflow:hidden;color:inherit;background-color:inherit;&:disabled{cursor:not-allowed;}");
88
82
  };
@@ -98,7 +98,7 @@ export var euiFilterButtonChildStyles = function euiFilterButtonChildStyles(euiT
98
98
  hasIcon: /*#__PURE__*/css("&>.euiIcon:last-child{", logicalCSS('margin-left', 'auto'), ";};label:hasIcon;")
99
99
  },
100
100
  text: {
101
- euiFilterButton__text: /*#__PURE__*/css(euiTextShift('bold', 'data-text', euiTheme), " ", euiTextTruncate(), ";;label:euiFilterButton__text;"),
101
+ euiFilterButton__text: /*#__PURE__*/css(euiTextShift('bold', 'data-text', euiTheme), " ", euiTextTruncate(), " ", logicalCSS('padding-horizontal', euiTheme.size.xs), ";;label:euiFilterButton__text;"),
102
102
  hasNotification: /*#__PURE__*/css(logicalCSS('min-width', mathWithUnits(euiTheme.size.base, function (x) {
103
103
  return x * 2;
104
104
  })), ";;label:hasNotification;")
@@ -1,4 +1,4 @@
1
- var _excluded = ["children", "className", "banner", "scrollableTabIndex"];
1
+ var _excluded = ["children", "className", "banner", "scrollableTabIndex", "scrollContainerRef"];
2
2
  function _extends() { return _extends = Object.assign ? Object.assign.bind() : function (n) { for (var e = 1; e < arguments.length; e++) { var t = arguments[e]; for (var r in t) ({}).hasOwnProperty.call(t, r) && (n[r] = t[r]); } return n; }, _extends.apply(null, arguments); }
3
3
  function _objectWithoutProperties(e, t) { if (null == e) return {}; var o, r, i = _objectWithoutPropertiesLoose(e, t); if (Object.getOwnPropertySymbols) { var n = Object.getOwnPropertySymbols(e); for (r = 0; r < n.length; r++) o = n[r], t.indexOf(o) >= 0 || {}.propertyIsEnumerable.call(e, o) && (i[o] = e[o]); } return i; }
4
4
  function _objectWithoutPropertiesLoose(r, e) { if (null == r) return {}; var t = {}; for (var n in r) if ({}.hasOwnProperty.call(r, n)) { if (e.indexOf(n) >= 0) continue; t[n] = r[n]; } return t; }
@@ -22,6 +22,7 @@ export var EuiFlyoutBody = function EuiFlyoutBody(_ref) {
22
22
  banner = _ref.banner,
23
23
  _ref$scrollableTabInd = _ref.scrollableTabIndex,
24
24
  scrollableTabIndex = _ref$scrollableTabInd === void 0 ? 0 : _ref$scrollableTabInd,
25
+ scrollContainerRef = _ref.scrollContainerRef,
25
26
  rest = _objectWithoutProperties(_ref, _excluded);
26
27
  var classes = classNames('euiFlyoutBody', className);
27
28
  var styles = useEuiMemoizedStyles(euiFlyoutBodyStyles);
@@ -32,7 +33,9 @@ export var EuiFlyoutBody = function EuiFlyoutBody(_ref) {
32
33
  }, rest), ___EmotionJSX("div", {
33
34
  tabIndex: scrollableTabIndex,
34
35
  className: "euiFlyoutBody__overflow",
35
- css: overflowCssStyles
36
+ css: overflowCssStyles,
37
+ ref: scrollContainerRef,
38
+ "data-test-subj": "euiFlyoutBodyOverflow"
36
39
  }, banner && ___EmotionJSX("div", {
37
40
  className: "euiFlyoutBody__banner",
38
41
  css: styles.euiFlyoutBody__banner
@@ -58,5 +61,9 @@ EuiFlyoutBody.propTypes = {
58
61
  * that satisfy keyboard accessibility requirements, you can use this prop
59
62
  * to override this default.
60
63
  */
61
- scrollableTabIndex: PropTypes.number
64
+ scrollableTabIndex: PropTypes.number,
65
+ /**
66
+ * Use to access the flyout's internal scrollable container.
67
+ */
68
+ scrollContainerRef: PropTypes.any
62
69
  };
@@ -12,6 +12,8 @@ var PREFIX = 'eui/flyoutManager';
12
12
  export var ACTION_ADD = "".concat(PREFIX, "/add");
13
13
  /** Dispatched to remove a flyout from the manager (usually on close/unmount). */
14
14
  export var ACTION_CLOSE = "".concat(PREFIX, "/close");
15
+ /** Dispatched to remove all flyouts from the manager. */
16
+ export var ACTION_CLOSE_ALL = "".concat(PREFIX, "/closeAll");
15
17
  /** Dispatched to set which flyout is currently active within the session. */
16
18
  export var ACTION_SET_ACTIVE = "".concat(PREFIX, "/setActive");
17
19
  /** Dispatched when an active flyout's pixel width changes (for responsive layout). */
@@ -36,6 +38,8 @@ export var ACTION_CLOSE_UNMANAGED_FLYOUT = "".concat(PREFIX, "/closeUnmanagedFly
36
38
 
37
39
  /** Remove a flyout from manager state. Also updates the active session. */
38
40
 
41
+ /** Remove all flyouts from manager state. */
42
+
39
43
  /** Set the active flyout within the current session (or clear with `null`). */
40
44
 
41
45
  /** Update a flyout's measured width in pixels. */
@@ -78,6 +82,13 @@ export var closeFlyout = function closeFlyout(flyoutId) {
78
82
  };
79
83
  };
80
84
 
85
+ /** Unregister all flyouts. */
86
+ export var closeAllFlyouts = function closeAllFlyouts() {
87
+ return {
88
+ type: ACTION_CLOSE_ALL
89
+ };
90
+ };
91
+
81
92
  /** Set or clear the active flyout for the current session. */
82
93
  export var setActiveFlyout = function setActiveFlyout(flyoutId) {
83
94
  return {
@@ -80,6 +80,7 @@ export var EuiManagedFlyout = /*#__PURE__*/forwardRef(function (_ref, ref) {
80
80
  var _useFlyoutManager2 = useFlyoutManager(),
81
81
  addFlyout = _useFlyoutManager2.addFlyout,
82
82
  closeFlyout = _useFlyoutManager2.closeFlyout,
83
+ closeAllFlyouts = _useFlyoutManager2.closeAllFlyouts,
83
84
  setFlyoutWidth = _useFlyoutManager2.setFlyoutWidth,
84
85
  goBack = _useFlyoutManager2.goBack,
85
86
  _historyItems = _useFlyoutManager2.historyItems;
@@ -153,13 +154,13 @@ export var EuiManagedFlyout = /*#__PURE__*/forwardRef(function (_ref, ref) {
153
154
  // Only call closeFlyout if it wasn't already called via onClose
154
155
  // This prevents duplicate removal when using Escape/X button
155
156
  if (flyoutExistsInManagerRef.current) {
156
- closeFlyout(flyoutId);
157
+ level === LEVEL_MAIN ? closeAllFlyouts() : closeFlyout(flyoutId);
157
158
  }
158
159
 
159
160
  // Reset navigation tracking when explicitly closed via isOpen=false
160
161
  wasRegisteredRef.current = false;
161
162
  };
162
- }, [flyoutId, title, level, size, addFlyout, closeFlyout]);
163
+ }, [flyoutId, title, level, size, addFlyout, closeFlyout, closeAllFlyouts]);
163
164
 
164
165
  // Detect when flyout has been removed from manager state (e.g., via Back button)
165
166
  // and trigger onClose callback to notify the parent component
@@ -202,7 +203,7 @@ export var EuiManagedFlyout = /*#__PURE__*/forwardRef(function (_ref, ref) {
202
203
  // and ensures cascade close logic runs before DOM cleanup begins
203
204
  // Using flushSync to force synchronous state update completion
204
205
  flushSync(function () {
205
- closeFlyout(flyoutId);
206
+ level === LEVEL_MAIN ? closeAllFlyouts() : closeFlyout(flyoutId);
206
207
  });
207
208
 
208
209
  // trigger parent callback, unmounts the component
@@ -9,7 +9,7 @@
9
9
  /**
10
10
  * Convenience re-exports of bound action creators for external usage.
11
11
  */
12
- export { addFlyout as addFlyoutAction, closeFlyout as closeFlyoutAction, setActiveFlyout as setActiveFlyoutAction, setFlyoutWidth as setFlyoutWidthAction, setPushPadding as setPushPaddingAction, setActivityStage as setActivityStageAction } from './actions';
12
+ export { addFlyout as addFlyoutAction, closeFlyout as closeFlyoutAction, closeAllFlyouts as closeAllFlyoutsAction, setActiveFlyout as setActiveFlyoutAction, setFlyoutWidth as setFlyoutWidthAction, setPushPadding as setPushPaddingAction, setActivityStage as setActivityStageAction } from './actions';
13
13
 
14
14
  /** Reducer and default state for the flyout manager. */
15
15
  export { flyoutManagerReducer, initialState } from './reducer';
@@ -18,7 +18,7 @@ function _toPrimitive(t, r) { if ("object" != _typeof(t) || !t) return t; var e
18
18
  * Side Public License, v 1.
19
19
  */
20
20
 
21
- import { ACTION_ADD, ACTION_CLOSE, ACTION_SET_ACTIVE, ACTION_SET_LAYOUT_MODE, ACTION_SET_WIDTH, ACTION_SET_ACTIVITY_STAGE, ACTION_GO_BACK, ACTION_GO_TO_FLYOUT, ACTION_SET_PUSH_PADDING, ACTION_ADD_UNMANAGED_FLYOUT, ACTION_CLOSE_UNMANAGED_FLYOUT } from './actions';
21
+ import { ACTION_ADD, ACTION_CLOSE, ACTION_CLOSE_ALL, ACTION_SET_ACTIVE, ACTION_SET_LAYOUT_MODE, ACTION_SET_WIDTH, ACTION_SET_ACTIVITY_STAGE, ACTION_GO_BACK, ACTION_GO_TO_FLYOUT, ACTION_SET_PUSH_PADDING, ACTION_ADD_UNMANAGED_FLYOUT, ACTION_CLOSE_UNMANAGED_FLYOUT } from './actions';
22
22
  import { LAYOUT_MODE_SIDE_BY_SIDE, LEVEL_MAIN, STAGE_OPENING } from './const';
23
23
  /**
24
24
  * Default flyout manager state used to initialize the reducer.
@@ -190,6 +190,24 @@ export function flyoutManagerReducer() {
190
190
  });
191
191
  }
192
192
 
193
+ // Unregister all flyouts.
194
+ case ACTION_CLOSE_ALL:
195
+ {
196
+ if (state.sessions.length === 0) {
197
+ return state;
198
+ }
199
+
200
+ // Reset current z-index to 0 only if no unmanaged flyouts remain.
201
+ var _newCurrentZIndex2 = state.currentZIndex;
202
+ if (state.unmanagedFlyouts.length === 0) {
203
+ _newCurrentZIndex2 = 0;
204
+ }
205
+ return _objectSpread(_objectSpread({}, initialState), {}, {
206
+ currentZIndex: _newCurrentZIndex2,
207
+ unmanagedFlyouts: state.unmanagedFlyouts
208
+ });
209
+ }
210
+
193
211
  // Mark the provided flyout ID as the active child for the latest session.
194
212
  case ACTION_SET_ACTIVE:
195
213
  {
@@ -6,7 +6,7 @@
6
6
  * Side Public License, v 1.
7
7
  */
8
8
 
9
- import { addFlyout as addFlyoutAction, closeFlyout as closeFlyoutAction, setActiveFlyout as setActiveFlyoutAction, setFlyoutWidth as setFlyoutWidthAction, setPushPadding as setPushPaddingAction, goBack as goBackAction, goToFlyout as goToFlyoutAction, addUnmanagedFlyout as addUnmanagedFlyoutAction, closeUnmanagedFlyout as closeUnmanagedFlyoutAction } from './actions';
9
+ import { addFlyout as addFlyoutAction, closeFlyout as closeFlyoutAction, closeAllFlyouts as closeAllFlyoutsAction, setActiveFlyout as setActiveFlyoutAction, setFlyoutWidth as setFlyoutWidthAction, setPushPadding as setPushPaddingAction, goBack as goBackAction, goToFlyout as goToFlyoutAction, addUnmanagedFlyout as addUnmanagedFlyoutAction, closeUnmanagedFlyout as closeUnmanagedFlyoutAction } from './actions';
10
10
  import { flyoutManagerReducer, initialState } from './reducer';
11
11
 
12
12
  /**
@@ -96,6 +96,9 @@ function createStore() {
96
96
  closeFlyout: function closeFlyout(flyoutId) {
97
97
  return dispatch(closeFlyoutAction(flyoutId));
98
98
  },
99
+ closeAllFlyouts: function closeAllFlyouts() {
100
+ return dispatch(closeAllFlyoutsAction());
101
+ },
99
102
  setActiveFlyout: function setActiveFlyout(flyoutId) {
100
103
  return dispatch(setActiveFlyoutAction(flyoutId));
101
104
  },
@@ -1,4 +1,4 @@
1
- var _excluded = ["className", "id", "name", "placeholder", "value", "disabled", "isInvalid", "fullWidth", "isLoading", "compressed", "inputRef", "prepend", "append", "type", "dualToggleProps"];
1
+ var _excluded = ["className", "id", "name", "placeholder", "value", "disabled", "isInvalid", "fullWidth", "isLoading", "compressed", "inputRef", "prepend", "append", "type", "dualToggleProps", "readOnly"];
2
2
  function _toConsumableArray(r) { return _arrayWithoutHoles(r) || _iterableToArray(r) || _unsupportedIterableToArray(r) || _nonIterableSpread(); }
3
3
  function _nonIterableSpread() { throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method."); }
4
4
  function _iterableToArray(r) { if ("undefined" != typeof Symbol && null != r[Symbol.iterator] || null != r["@@iterator"]) return Array.from(r); }
@@ -53,6 +53,7 @@ export var EuiFieldPassword = function EuiFieldPassword(props) {
53
53
  _props$type = props.type,
54
54
  type = _props$type === void 0 ? 'password' : _props$type,
55
55
  dualToggleProps = props.dualToggleProps,
56
+ readOnly = props.readOnly,
56
57
  rest = _objectWithoutProperties(props, _excluded);
57
58
 
58
59
  // Set the initial input type to `password` if they want dual
@@ -119,7 +120,8 @@ export var EuiFieldPassword = function EuiFieldPassword(props) {
119
120
  isDisabled: disabled,
120
121
  compressed: compressed,
121
122
  prepend: prepend,
122
- append: finalAppend
123
+ append: finalAppend,
124
+ readOnly: readOnly
123
125
  }, ___EmotionJSX(EuiValidatableControl, {
124
126
  isInvalid: isInvalid
125
127
  }, ___EmotionJSX("input", _extends({
@@ -131,7 +133,8 @@ export var EuiFieldPassword = function EuiFieldPassword(props) {
131
133
  css: cssStyles,
132
134
  value: value,
133
135
  disabled: disabled,
134
- ref: setInputRef
136
+ ref: setInputRef,
137
+ readOnly: readOnly
135
138
  }, rest))));
136
139
  };
137
140
  EuiFieldPassword.propTypes = {
@@ -58,15 +58,19 @@ export var euiFormVariables = function euiFormVariables(euiThemeContext) {
58
58
  backgroundColor: backgroundColor,
59
59
  backgroundDisabledColor: euiTheme.components.forms.backgroundDisabled,
60
60
  backgroundReadOnlyColor: euiTheme.components.forms.backgroundReadOnly,
61
+ backgroundAutoFilled: euiTheme.components.forms.backgroundAutofilled,
61
62
  borderColor: highContrastMode ? euiTheme.border.color : euiTheme.components.forms.border,
62
63
  borderHovered: euiTheme.components.forms.borderHovered,
63
64
  borderFocused: euiTheme.components.forms.borderFocused,
64
65
  borderInvalid: euiTheme.components.forms.borderInvalid,
65
66
  borderInvalidHovered: euiTheme.components.forms.borderInvalidHovered,
67
+ borderAutofilled: euiTheme.components.forms.borderAutofilled,
68
+ borderAutofilledHovered: euiTheme.components.forms.borderAutofilledHovered,
66
69
  controlDisabledColor: euiTheme.components.forms.controlBackgroundDisabled,
67
70
  controlBoxShadow: '0 0 transparent',
68
71
  controlPlaceholderText: highContrastMode ? makeHighContrastColor(euiTheme.components.forms.colorDisabled)(backgroundColor) : euiTheme.components.forms.colorDisabled,
69
- appendPrependBackground: euiTheme.components.forms.prependBackground
72
+ appendPrependBackground: euiTheme.components.forms.prependBackground,
73
+ labelColor: euiTheme.colors.textHeading
70
74
  };
71
75
  var controlLayout = {
72
76
  controlLayoutGroupInputHeight: mathWithUnits(controlHeight, function (x) {
@@ -75,7 +79,11 @@ export var euiFormVariables = function euiFormVariables(euiThemeContext) {
75
79
  controlLayoutGroupInputCompressedHeight: mathWithUnits(controlCompressedHeight, function (x) {
76
80
  return x - 2;
77
81
  }),
78
- controlLayoutGroupInputCompressedBorderRadius: euiTheme.border.radius.small
82
+ controlLayoutGroupInputCompressedBorderRadius: euiTheme.border.radius.small,
83
+ controlLayoutBorderRadius: euiTheme.border.radius.small,
84
+ controlLayoutInnerBorderRadius: mathWithUnits(euiTheme.border.radius.small, function (x) {
85
+ return x / 2;
86
+ })
79
87
  };
80
88
  var iconSizes = {
81
89
  controlIconSize: {
@@ -102,7 +110,7 @@ export var euiFormControlStyles = function euiFormControlStyles(euiThemeContext)
102
110
  inGroup: "\n ".concat(logicalCSS('height', '100%'), "\n ").concat(highContrastModeStyles(euiThemeContext, {
103
111
  none: 'box-shadow: none;',
104
112
  preferred: 'border: none;'
105
- }), "\n border-radius: inherit;\n "),
113
+ }), "\n "),
106
114
  // Widths
107
115
  formWidth: "\n ".concat(logicalCSS('max-width', form.maxWidth), "\n ").concat(logicalCSS('width', '100%'), "\n "),
108
116
  fullWidth: "\n ".concat(logicalCSS('max-width', '100%'), "\n ").concat(logicalCSS('width', '100%'), "\n "),
@@ -152,7 +160,7 @@ export var euiFormControlHoverStyles = function euiFormControlHoverStyles(euiThe
152
160
  var euiTheme = euiThemeContext.euiTheme,
153
161
  highContrastMode = euiThemeContext.highContrastMode;
154
162
  var form = euiFormVariables(euiThemeContext);
155
- return "\n ".concat(hoverSelector, " {\n --borderWidthBase: var(--euiFormControlStateWidth, ").concat(euiTheme.border.width.thin, ");\n --borderWidth: ").concat(highContrastMode ? euiTheme.border.width.thick : 'var(--borderWidthBase)', ";\n --borderColor: var(--euiFormControlStateHoverColor, ").concat(highContrastMode ? euiTheme.border.color : form.borderHovered, ");\n position: relative;\n z-index: 1;\n outline: var(--borderWidth) solid var(--borderColor);\n outline-offset: calc(-1 * var(--borderWidth));\n }\n ");
163
+ return "\n ".concat(hoverSelector, " {\n --borderWidthBase: var(--euiFormControlStateWidth, ").concat(euiTheme.border.width.thin, ");\n --borderWidth: ").concat(highContrastMode ? euiTheme.border.width.thick : 'var(--borderWidthBase)', ";\n --borderColor: var(--euiFormControlStateHoverColor, ").concat(highContrastMode ? euiTheme.border.color : form.borderHovered, ");\n position: relative;\n outline: var(--borderWidth) solid var(--borderColor);\n outline-offset: calc(-1 * var(--borderWidth));\n }\n ");
156
164
  };
157
165
  export var euiFormControlHighlightBorderStyles = "\n position: relative;\n z-index: 1;\n box-shadow: none;\n outline: var(--euiFormControlStateWidth) solid var(--euiFormControlStateColor);\n outline-offset: calc(-1 * var(--euiFormControlStateWidth));\n";
158
166
  export var euiFormControlFocusStyles = function euiFormControlFocusStyles(euiThemeContext) {
@@ -186,24 +194,23 @@ export var euiFormControlAutoFillStyles = function euiFormControlAutoFillStyles(
186
194
  var form = euiFormVariables(euiThemeContext);
187
195
  // Make the text color slightly less prominent than the default colors.text
188
196
  var textColor = euiTheme.colors.darkestShade;
189
- var tintedBackgroundColor = euiTheme.components.forms.backgroundAutofilled;
197
+ var tintedBackgroundColor = form.backgroundAutoFilled;
190
198
  // Hacky workaround to background-color, since Chrome doesn't normally allow overriding its styles
191
199
  // @see https://developer.mozilla.org/en-US/docs/Web/CSS/:autofill#sect1
192
200
  var backgroundShadow = "inset 0 0 0 100vw ".concat(tintedBackgroundColor);
193
201
 
194
202
  // Re-create the border, since the above webkit box shadow overrides the default border box-shadow
195
203
  // + change the border color to match states, since the underline background gradient no longer works
196
- var borderColor = euiTheme.components.forms.borderAutofilled;
197
- var borderHovered = euiTheme.components.forms.borderAutofilledHovered;
204
+ var borderColor = form.borderAutofilled;
205
+ var borderHovered = form.borderAutofilledHovered;
198
206
  var borderInvalid = form.borderInvalid;
199
207
  var borderInvalidHovered = form.borderInvalidHovered;
200
- var borderShadow = function borderShadow(color) {
201
- return "inset 0 0 0 ".concat(euiTheme.border.width.thin, " ").concat(color);
202
- };
208
+ var borderShadow = "inset 0 0 0 var(--euiFormControlStateAutofillWidth) var(--euiFormControlStateAutofillColor), ".concat(backgroundShadow);
203
209
 
204
210
  // These styles only apply/override Chrome/webkit browsers - Firefox does not set autofill styles
205
- return "\n &:-webkit-autofill {\n -webkit-text-fill-color: ".concat(textColor, ";\n -webkit-box-shadow: ").concat(borderShadow(borderColor), ", ").concat(backgroundShadow, ";\n\n &:hover,\n &:focus {\n -webkit-box-shadow: ").concat(borderShadow(borderHovered), ", ").concat(backgroundShadow, ";\n }\n\n &:invalid {\n -webkit-box-shadow: ").concat(borderShadow(borderInvalid), ", ").concat(backgroundShadow, ";\n\n &:hover {\n -webkit-box-shadow: ").concat(borderShadow(borderInvalidHovered), ", ").concat(backgroundShadow, ";\n }\n }\n }\n ");
211
+ return "\n &:where(:-webkit-autofill) {\n --euiFormControlStateAutofillWidth: ".concat(euiTheme.border.width.thin, ";\n --euiFormControlStateAutofillColor: ").concat(borderColor, ";\n \n -webkit-text-fill-color: ").concat(textColor, ";\n -webkit-box-shadow: ").concat(borderShadow, ";\n \n\n &:hover {\n --euiFormControlStateAutofillColor: ").concat(borderHovered, ";\n }\n\n &:focus {\n --euiFormControlStateAutofillWidth: ").concat(euiTheme.border.width.thick, ";\n }\n\n &:invalid {\n --euiFormControlStateAutofillColor: ").concat(borderInvalid, ";\n\n &:hover {\n --euiFormControlStateAutofillColor: ").concat(borderInvalidHovered, ";\n }\n }\n }\n ");
206
212
  };
213
+ export var euiFormControlAutofillUnsetStyles = "\n\n";
207
214
  export var euiFormControlShowBackgroundLine = function euiFormControlShowBackgroundLine(euiThemeContext, color) {
208
215
  var euiTheme = euiThemeContext.euiTheme,
209
216
  highContrastMode = euiThemeContext.highContrastMode;
@@ -1,5 +1,5 @@
1
1
  function _typeof(o) { "@babel/helpers - typeof"; return _typeof = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function (o) { return typeof o; } : function (o) { return o && "function" == typeof Symbol && o.constructor === Symbol && o !== Symbol.prototype ? "symbol" : typeof o; }, _typeof(o); }
2
- var _excluded = ["children", "value", "placeholder", "className", "contentProps", "textProps", "compressed", "isInvalid", "fullWidth", "href", "rel"];
2
+ var _excluded = ["children", "value", "placeholder", "className", "contentProps", "textProps", "compressed", "isDisabled", "isInvalid", "fullWidth", "iconSide", "isLoading", "href", "rel"];
3
3
  function _extends() { return _extends = Object.assign ? Object.assign.bind() : function (n) { for (var e = 1; e < arguments.length; e++) { var t = arguments[e]; for (var r in t) ({}).hasOwnProperty.call(t, r) && (n[r] = t[r]); } return n; }, _extends.apply(null, arguments); }
4
4
  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; }
5
5
  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; }
@@ -22,13 +22,14 @@ function _objectWithoutPropertiesLoose(r, e) { if (null == r) return {}; var t =
22
22
  * Side Public License, v 1.
23
23
  */
24
24
 
25
- import React, { isValidElement } from 'react';
25
+ import React, { isValidElement, useContext } from 'react';
26
26
  import PropTypes from "prop-types";
27
27
  import classNames from 'classnames';
28
28
  import { useEuiMemoizedStyles } from '../../../services';
29
29
  import { EuiButtonEmpty } from '../../button';
30
30
  import { euiFormControlButtonStyles } from './form_control_button.styles';
31
31
  import { useInnerText } from '../../inner_text';
32
+ import { EuiFormControlLayoutContext } from '../form_control_layout/form_control_layout_context';
32
33
  import { jsx as ___EmotionJSX } from "@emotion/react";
33
34
  export var EuiFormControlButton = function EuiFormControlButton(_ref) {
34
35
  var children = _ref.children,
@@ -37,11 +38,13 @@ export var EuiFormControlButton = function EuiFormControlButton(_ref) {
37
38
  className = _ref.className,
38
39
  _contentProps = _ref.contentProps,
39
40
  _textProps = _ref.textProps,
40
- compressed = _ref.compressed,
41
- _ref$isInvalid = _ref.isInvalid,
42
- isInvalid = _ref$isInvalid === void 0 ? false : _ref$isInvalid,
41
+ _compressed = _ref.compressed,
42
+ _isDisabled = _ref.isDisabled,
43
+ _isInvalid = _ref.isInvalid,
43
44
  _ref$fullWidth = _ref.fullWidth,
44
45
  fullWidth = _ref$fullWidth === void 0 ? true : _ref$fullWidth,
46
+ iconSide = _ref.iconSide,
47
+ _isLoading = _ref.isLoading,
45
48
  href = _ref.href,
46
49
  rel = _ref.rel,
47
50
  rest = _objectWithoutProperties(_ref, _excluded);
@@ -49,9 +52,19 @@ export var EuiFormControlButton = function EuiFormControlButton(_ref) {
49
52
  _useInnerText2 = _slicedToArray(_useInnerText, 2),
50
53
  buttonTextRef = _useInnerText2[0],
51
54
  innerText = _useInnerText2[1];
55
+ var _useContext = useContext(EuiFormControlLayoutContext),
56
+ formLayoutIsDisabled = _useContext.isDisabled,
57
+ formLayoutIsInvalid = _useContext.isInvalid,
58
+ formLayoutIsLoading = _useContext.isLoading,
59
+ formLayoutReadOnly = _useContext.readOnly,
60
+ formLayoutCompressed = _useContext.compressed;
61
+ var isDisabled = _isDisabled !== null && _isDisabled !== void 0 ? _isDisabled : formLayoutIsDisabled;
62
+ var isInvalid = _isInvalid !== null && _isInvalid !== void 0 ? _isInvalid : formLayoutIsInvalid;
63
+ var isLoading = formLayoutIsLoading === true ? false : _isLoading;
64
+ var compressed = _compressed !== null && _compressed !== void 0 ? _compressed : formLayoutCompressed;
52
65
  var styles = useEuiMemoizedStyles(euiFormControlButtonStyles);
53
66
  var classes = classNames('euiFormControlButton', className);
54
- var cssStyles = [styles.euiFormControlButton, isInvalid && styles.isInvalid, compressed && styles.compressed, fullWidth ? styles.fullWidth : styles.formWidth];
67
+ var cssStyles = [styles.euiFormControlButton, isInvalid && styles.isInvalid, isLoading && styles.isLoading, formLayoutReadOnly && styles.readOnly, compressed && styles.compressed, fullWidth ? styles.fullWidth : styles.formWidth];
55
68
  var contentProps = _objectSpread(_objectSpread({}, _contentProps), {}, {
56
69
  css: [styles.euiFormControlButton__content, _contentProps === null || _contentProps === void 0 ? void 0 : _contentProps.css]
57
70
  });
@@ -74,7 +87,10 @@ export var EuiFormControlButton = function EuiFormControlButton(_ref) {
74
87
  className: classes,
75
88
  contentProps: contentProps,
76
89
  textProps: false,
77
- color: "text"
90
+ color: "text",
91
+ isDisabled: isDisabled,
92
+ isLoading: isLoading,
93
+ iconSide: isLoading ? 'right' : iconSide
78
94
  }, restProps), hasText && ___EmotionJSX("span", _extends({}, customTextProps, {
79
95
  ref: buttonTextRef
80
96
  }), value || placeholder), hasText && content && ' ', content);
@@ -100,6 +116,13 @@ EuiFormControlButton.propTypes = {
100
116
  fullWidth: PropTypes.bool,
101
117
  href: PropTypes.string,
102
118
  onClick: PropTypes.func,
119
+ /**
120
+ * Force disables the button and changes the icon to a loading spinner
121
+ */
122
+ /**
123
+ * Force disables the button and changes the icon to a loading spinner
124
+ */
125
+ isLoading: PropTypes.bool,
103
126
  target: PropTypes.string,
104
127
  rel: PropTypes.string,
105
128
  type: PropTypes.any,
@@ -8,8 +8,8 @@ function _EMOTION_STRINGIFIED_CSS_ERROR__() { return "You have tried to stringif
8
8
  */
9
9
 
10
10
  import { css } from '@emotion/react';
11
- import { logicalCSS } from '../../../global_styling';
12
- import { euiFormControlStyles, euiFormPlaceholderStyles } from '../form.styles';
11
+ import { euiDisabledSelector, logicalCSS } from '../../../global_styling';
12
+ import { euiFormControlStyles, euiFormPlaceholderStyles, euiFormVariables } from '../form.styles';
13
13
  var _ref = process.env.NODE_ENV === "production" ? {
14
14
  name: "isuld2-textContent",
15
15
  styles: "flex:1;text-align:start;label:textContent;"
@@ -20,11 +20,14 @@ var _ref = process.env.NODE_ENV === "production" ? {
20
20
  };
21
21
  export var euiFormControlButtonStyles = function euiFormControlButtonStyles(euiThemeContext) {
22
22
  var euiTheme = euiThemeContext.euiTheme;
23
+ var form = euiFormVariables(euiThemeContext);
23
24
  var formStyles = euiFormControlStyles(euiThemeContext);
24
25
  return {
25
26
  euiFormControlButton: /*#__PURE__*/css(formStyles.shared, " ", formStyles.uncompressed, " font-weight:", euiTheme.font.weight.regular, ";transition:none;&:hover{&::before{display:none;}}&:focus{", formStyles.focus, ";}&:disabled{", formStyles.disabled, ";};label:euiFormControlButton;"),
26
27
  isInvalid: /*#__PURE__*/css(formStyles.invalid, " &:disabled{", formStyles.invalid, ";};label:isInvalid;"),
28
+ readOnly: /*#__PURE__*/css(formStyles.readOnly, ";;label:readOnly;"),
27
29
  compressed: /*#__PURE__*/css(formStyles.compressed, ";;label:compressed;"),
30
+ isLoading: /*#__PURE__*/css("&:is(", euiDisabledSelector, "){background-color:", form.backgroundColor, ";}.euiLoadingSpinner{color:", euiTheme.colors.borderBasePlain, ";};label:isLoading;"),
28
31
  formWidth: formStyles.formWidth,
29
32
  fullWidth: /*#__PURE__*/css(formStyles.fullWidth, ";label:fullWidth;"),
30
33
  euiFormControlButton__content: /*#__PURE__*/css("justify-content:flex-start;", logicalCSS('width', '100%'), ";;label:euiFormControlButton__content;"),