@elastic/eui 77.0.0 → 77.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 (312) hide show
  1. package/dist/eui_theme_dark.css +22 -51
  2. package/dist/eui_theme_dark.min.css +1 -1
  3. package/dist/eui_theme_light.css +22 -51
  4. package/dist/eui_theme_light.min.css +1 -1
  5. package/es/components/accordion/accordion.a11y.js +3 -1
  6. package/es/components/accordion/accordion.js +4 -2
  7. package/es/components/basic_table/table.a11y.js +3 -1
  8. package/es/components/breadcrumbs/breadcrumbs.a11y.js +3 -1
  9. package/es/components/card/card.a11y.js +3 -1
  10. package/es/components/color_picker/color_picker.a11y.js +3 -1
  11. package/es/components/combo_box/combo_box.a11y.js +3 -1
  12. package/es/components/combo_box/combo_box.js +2 -21
  13. package/es/components/combo_box/combo_box_input/combo_box_input.js +66 -36
  14. package/es/components/combo_box/combo_box_options_list/combo_box_options_list.js +1 -1
  15. package/es/components/context_menu/context_menu_panel.a11y.js +3 -1
  16. package/es/components/control_bar/control_bar.a11y.js +3 -1
  17. package/es/components/copy/copy.a11y.js +6 -5
  18. package/es/components/datagrid/data_grid.a11y.js +3 -1
  19. package/es/components/date_picker/date_picker.a11y.js +3 -1
  20. package/es/components/date_picker/date_picker.js +148 -155
  21. package/es/components/date_picker/date_picker_range.js +2 -2
  22. package/es/components/date_picker/super_date_picker/super_date_picker.a11y.js +3 -1
  23. package/es/components/delay_hide/delay_hide.a11y.js +9 -9
  24. package/es/components/delay_render/delay_render.a11y.js +9 -9
  25. package/es/components/drag_and_drop/drag_and_drop.a11y.js +3 -2
  26. package/es/components/empty_prompt/empty_prompt.a11y.js +8 -14
  27. package/es/components/error_boundary/error_boundary.a11y.js +3 -1
  28. package/es/components/expression/expression.a11y.js +3 -1
  29. package/es/components/filter_group/filter_group.a11y.js +4 -3
  30. package/es/components/flyout/flyout.a11y.js +3 -1
  31. package/es/components/focus_trap/focus_trap.a11y.js +3 -1
  32. package/es/components/form/checkbox/checkbox_group.a11y.js +3 -1
  33. package/es/components/form/file_picker/file_picker.js +4 -2
  34. package/es/components/form/radio/radio_group.a11y.js +4 -5
  35. package/es/components/form/range/range.a11y.js +3 -1
  36. package/es/components/form/switch/switch.a11y.js +4 -5
  37. package/es/components/form/text_area/text_area.js +11 -3
  38. package/es/components/form/validatable_control/index.js +1 -1
  39. package/es/components/form/validatable_control/validatable_control.js +49 -13
  40. package/es/components/header/header.a11y.js +3 -1
  41. package/es/components/icon/icon_ML.a11y.js +3 -1
  42. package/es/components/icon/icon_apps.a11y.js +3 -1
  43. package/es/components/icon/icon_editor.a11y.js +3 -1
  44. package/es/components/icon/icon_elastic.a11y.js +3 -1
  45. package/es/components/icon/icon_glyphs.a11y.js +3 -1
  46. package/es/components/icon/icon_tokens.a11y.js +3 -1
  47. package/es/components/image/image.a11y.js +3 -1
  48. package/es/components/index.js +1 -0
  49. package/es/components/inline_edit/index.js +10 -0
  50. package/es/components/inline_edit/inline_edit.styles.js +15 -0
  51. package/es/components/inline_edit/inline_edit_form.js +190 -0
  52. package/es/components/inline_edit/inline_edit_text.js +97 -0
  53. package/es/components/inline_edit/inline_edit_title.js +105 -0
  54. package/es/components/key_pad_menu/key_pad_menu.a11y.js +3 -1
  55. package/es/components/modal/modal.a11y.js +3 -1
  56. package/es/components/notification/notification_event.a11y.js +3 -1
  57. package/es/components/page/page_header/page_header.a11y.js +3 -1
  58. package/es/components/pagination/pagination.a11y.js +3 -1
  59. package/es/components/popover/popover.a11y.js +3 -1
  60. package/es/components/popover/popover_footer.js +4 -4
  61. package/es/components/popover/popover_footer.styles.js +16 -5
  62. package/es/components/popover/popover_panel/_popover_panel.js +8 -5
  63. package/es/components/portal/portal.a11y.js +3 -1
  64. package/es/components/progress/progress.a11y.js +3 -1
  65. package/es/components/resizable_container/resizable_container.a11y.js +3 -1
  66. package/es/components/search_bar/search_bar.a11y.js +8 -7
  67. package/es/components/selectable/selectable.a11y.js +3 -1
  68. package/es/components/side_nav/side_nav.a11y.js +3 -1
  69. package/es/components/tabs/tabs.a11y.js +3 -1
  70. package/es/components/tree_view/tree_view.a11y.js +3 -1
  71. package/eui.d.ts +161 -37
  72. package/i18ntokens.json +40 -4
  73. package/lib/components/accordion/accordion.a11y.js +3 -1
  74. package/lib/components/accordion/accordion.js +4 -2
  75. package/lib/components/basic_table/table.a11y.js +3 -1
  76. package/lib/components/breadcrumbs/breadcrumbs.a11y.js +3 -1
  77. package/lib/components/combo_box/combo_box.js +2 -21
  78. package/lib/components/combo_box/combo_box_input/combo_box_input.js +66 -36
  79. package/lib/components/combo_box/combo_box_options_list/combo_box_options_list.js +1 -1
  80. package/lib/components/context_menu/context_menu_panel.a11y.js +3 -1
  81. package/lib/components/copy/copy.a11y.js +3 -4
  82. package/lib/components/date_picker/date_picker.js +147 -153
  83. package/lib/components/date_picker/date_picker_range.js +2 -2
  84. package/lib/components/delay_hide/delay_hide.a11y.js +6 -8
  85. package/lib/components/delay_render/delay_render.a11y.js +6 -8
  86. package/lib/components/drag_and_drop/drag_and_drop.a11y.js +0 -1
  87. package/lib/components/empty_prompt/empty_prompt.a11y.js +8 -14
  88. package/lib/components/error_boundary/error_boundary.a11y.js +3 -1
  89. package/lib/components/filter_group/filter_group.a11y.js +7 -8
  90. package/lib/components/form/file_picker/file_picker.js +4 -2
  91. package/lib/components/form/radio/radio_group.a11y.js +1 -4
  92. package/lib/components/form/switch/switch.a11y.js +1 -4
  93. package/lib/components/form/text_area/text_area.js +11 -3
  94. package/lib/components/form/validatable_control/index.js +6 -0
  95. package/lib/components/form/validatable_control/validatable_control.js +51 -14
  96. package/lib/components/icon/icon_ML.a11y.js +3 -1
  97. package/lib/components/icon/icon_apps.a11y.js +3 -1
  98. package/lib/components/icon/icon_editor.a11y.js +3 -1
  99. package/lib/components/icon/icon_elastic.a11y.js +3 -1
  100. package/lib/components/icon/icon_glyphs.a11y.js +3 -1
  101. package/lib/components/icon/icon_tokens.a11y.js +3 -1
  102. package/lib/components/image/image.a11y.js +3 -1
  103. package/lib/components/index.js +11 -0
  104. package/lib/components/inline_edit/index.js +19 -0
  105. package/lib/components/inline_edit/inline_edit.styles.js +22 -0
  106. package/lib/components/inline_edit/inline_edit_form.js +193 -0
  107. package/lib/components/inline_edit/inline_edit_text.js +97 -0
  108. package/lib/components/inline_edit/inline_edit_title.js +106 -0
  109. package/lib/components/page/page_header/page_header.a11y.js +3 -1
  110. package/lib/components/popover/popover_footer.js +4 -4
  111. package/lib/components/popover/popover_footer.styles.js +19 -7
  112. package/lib/components/popover/popover_panel/_popover_panel.js +7 -4
  113. package/lib/components/resizable_container/resizable_container.a11y.js +3 -1
  114. package/lib/components/search_bar/search_bar.a11y.js +5 -6
  115. package/lib/components/tree_view/tree_view.a11y.js +3 -1
  116. package/optimize/es/components/accordion/accordion.a11y.js +3 -1
  117. package/optimize/es/components/accordion/accordion.js +4 -2
  118. package/optimize/es/components/basic_table/table.a11y.js +3 -1
  119. package/optimize/es/components/breadcrumbs/breadcrumbs.a11y.js +3 -1
  120. package/optimize/es/components/card/card.a11y.js +3 -1
  121. package/optimize/es/components/color_picker/color_picker.a11y.js +3 -1
  122. package/optimize/es/components/combo_box/combo_box.a11y.js +3 -1
  123. package/optimize/es/components/combo_box/combo_box.js +2 -21
  124. package/optimize/es/components/combo_box/combo_box_input/combo_box_input.js +63 -34
  125. package/optimize/es/components/combo_box/combo_box_options_list/combo_box_options_list.js +1 -1
  126. package/optimize/es/components/context_menu/context_menu_panel.a11y.js +3 -1
  127. package/optimize/es/components/control_bar/control_bar.a11y.js +3 -1
  128. package/optimize/es/components/copy/copy.a11y.js +6 -5
  129. package/optimize/es/components/datagrid/data_grid.a11y.js +3 -1
  130. package/optimize/es/components/date_picker/date_picker.a11y.js +3 -1
  131. package/optimize/es/components/date_picker/date_picker.js +142 -148
  132. package/optimize/es/components/date_picker/date_picker_range.js +1 -1
  133. package/optimize/es/components/date_picker/super_date_picker/super_date_picker.a11y.js +3 -1
  134. package/optimize/es/components/delay_hide/delay_hide.a11y.js +9 -9
  135. package/optimize/es/components/delay_render/delay_render.a11y.js +9 -9
  136. package/optimize/es/components/drag_and_drop/drag_and_drop.a11y.js +3 -2
  137. package/optimize/es/components/empty_prompt/empty_prompt.a11y.js +8 -14
  138. package/optimize/es/components/error_boundary/error_boundary.a11y.js +3 -1
  139. package/optimize/es/components/expression/expression.a11y.js +3 -1
  140. package/optimize/es/components/filter_group/filter_group.a11y.js +4 -3
  141. package/optimize/es/components/flyout/flyout.a11y.js +3 -1
  142. package/optimize/es/components/focus_trap/focus_trap.a11y.js +3 -1
  143. package/optimize/es/components/form/checkbox/checkbox_group.a11y.js +3 -1
  144. package/optimize/es/components/form/file_picker/file_picker.js +4 -2
  145. package/optimize/es/components/form/radio/radio_group.a11y.js +4 -5
  146. package/optimize/es/components/form/range/range.a11y.js +3 -1
  147. package/optimize/es/components/form/switch/switch.a11y.js +4 -5
  148. package/optimize/es/components/form/text_area/text_area.js +10 -3
  149. package/optimize/es/components/form/validatable_control/index.js +1 -1
  150. package/optimize/es/components/form/validatable_control/validatable_control.js +49 -9
  151. package/optimize/es/components/header/header.a11y.js +3 -1
  152. package/optimize/es/components/icon/icon_ML.a11y.js +3 -1
  153. package/optimize/es/components/icon/icon_apps.a11y.js +3 -1
  154. package/optimize/es/components/icon/icon_editor.a11y.js +3 -1
  155. package/optimize/es/components/icon/icon_elastic.a11y.js +3 -1
  156. package/optimize/es/components/icon/icon_glyphs.a11y.js +3 -1
  157. package/optimize/es/components/icon/icon_tokens.a11y.js +3 -1
  158. package/optimize/es/components/image/image.a11y.js +3 -1
  159. package/optimize/es/components/index.js +1 -0
  160. package/optimize/es/components/inline_edit/index.js +10 -0
  161. package/optimize/es/components/inline_edit/inline_edit.styles.js +15 -0
  162. package/optimize/es/components/inline_edit/inline_edit_form.js +133 -0
  163. package/optimize/es/components/inline_edit/inline_edit_text.js +52 -0
  164. package/optimize/es/components/inline_edit/inline_edit_title.js +56 -0
  165. package/optimize/es/components/key_pad_menu/key_pad_menu.a11y.js +3 -1
  166. package/optimize/es/components/modal/modal.a11y.js +3 -1
  167. package/optimize/es/components/notification/notification_event.a11y.js +3 -1
  168. package/optimize/es/components/page/page_header/page_header.a11y.js +3 -1
  169. package/optimize/es/components/pagination/pagination.a11y.js +3 -1
  170. package/optimize/es/components/popover/popover.a11y.js +3 -1
  171. package/optimize/es/components/popover/popover_footer.js +4 -4
  172. package/optimize/es/components/popover/popover_footer.styles.js +16 -5
  173. package/optimize/es/components/popover/popover_panel/_popover_panel.js +8 -5
  174. package/optimize/es/components/portal/portal.a11y.js +3 -1
  175. package/optimize/es/components/progress/progress.a11y.js +3 -1
  176. package/optimize/es/components/resizable_container/resizable_container.a11y.js +3 -1
  177. package/optimize/es/components/search_bar/search_bar.a11y.js +8 -7
  178. package/optimize/es/components/selectable/selectable.a11y.js +3 -1
  179. package/optimize/es/components/side_nav/side_nav.a11y.js +3 -1
  180. package/optimize/es/components/tabs/tabs.a11y.js +3 -1
  181. package/optimize/es/components/tree_view/tree_view.a11y.js +3 -1
  182. package/optimize/lib/components/accordion/accordion.a11y.js +3 -1
  183. package/optimize/lib/components/accordion/accordion.js +4 -2
  184. package/optimize/lib/components/basic_table/table.a11y.js +3 -1
  185. package/optimize/lib/components/breadcrumbs/breadcrumbs.a11y.js +3 -1
  186. package/optimize/lib/components/card/card.a11y.js +3 -1
  187. package/optimize/lib/components/color_picker/color_picker.a11y.js +3 -1
  188. package/optimize/lib/components/combo_box/combo_box.a11y.js +3 -1
  189. package/optimize/lib/components/combo_box/combo_box.js +2 -21
  190. package/optimize/lib/components/combo_box/combo_box_input/combo_box_input.js +63 -34
  191. package/optimize/lib/components/combo_box/combo_box_options_list/combo_box_options_list.js +1 -1
  192. package/optimize/lib/components/context_menu/context_menu_panel.a11y.js +3 -1
  193. package/optimize/lib/components/control_bar/control_bar.a11y.js +3 -1
  194. package/optimize/lib/components/copy/copy.a11y.js +6 -5
  195. package/optimize/lib/components/datagrid/data_grid.a11y.js +3 -1
  196. package/optimize/lib/components/date_picker/date_picker.a11y.js +3 -1
  197. package/optimize/lib/components/date_picker/date_picker.js +141 -147
  198. package/optimize/lib/components/date_picker/date_picker_range.js +1 -1
  199. package/optimize/lib/components/date_picker/super_date_picker/super_date_picker.a11y.js +3 -1
  200. package/optimize/lib/components/delay_hide/delay_hide.a11y.js +9 -9
  201. package/optimize/lib/components/delay_render/delay_render.a11y.js +9 -9
  202. package/optimize/lib/components/drag_and_drop/drag_and_drop.a11y.js +3 -2
  203. package/optimize/lib/components/empty_prompt/empty_prompt.a11y.js +8 -14
  204. package/optimize/lib/components/error_boundary/error_boundary.a11y.js +3 -1
  205. package/optimize/lib/components/filter_group/filter_group.a11y.js +10 -9
  206. package/optimize/lib/components/focus_trap/focus_trap.a11y.js +3 -1
  207. package/optimize/lib/components/form/file_picker/file_picker.js +4 -2
  208. package/optimize/lib/components/form/radio/radio_group.a11y.js +4 -5
  209. package/optimize/lib/components/form/range/range.a11y.js +3 -1
  210. package/optimize/lib/components/form/switch/switch.a11y.js +4 -5
  211. package/optimize/lib/components/form/text_area/text_area.js +10 -3
  212. package/optimize/lib/components/form/validatable_control/index.js +6 -0
  213. package/optimize/lib/components/form/validatable_control/validatable_control.js +52 -12
  214. package/optimize/lib/components/header/header.a11y.js +3 -1
  215. package/optimize/lib/components/icon/icon_ML.a11y.js +3 -1
  216. package/optimize/lib/components/icon/icon_apps.a11y.js +3 -1
  217. package/optimize/lib/components/icon/icon_editor.a11y.js +3 -1
  218. package/optimize/lib/components/icon/icon_elastic.a11y.js +3 -1
  219. package/optimize/lib/components/icon/icon_glyphs.a11y.js +3 -1
  220. package/optimize/lib/components/icon/icon_tokens.a11y.js +3 -1
  221. package/optimize/lib/components/image/image.a11y.js +3 -1
  222. package/optimize/lib/components/index.js +11 -0
  223. package/optimize/lib/components/inline_edit/index.js +19 -0
  224. package/optimize/lib/components/inline_edit/inline_edit.styles.js +22 -0
  225. package/optimize/lib/components/inline_edit/inline_edit_form.js +144 -0
  226. package/optimize/lib/components/inline_edit/inline_edit_text.js +52 -0
  227. package/optimize/lib/components/inline_edit/inline_edit_title.js +57 -0
  228. package/optimize/lib/components/key_pad_menu/key_pad_menu.a11y.js +3 -1
  229. package/optimize/lib/components/modal/modal.a11y.js +3 -1
  230. package/optimize/lib/components/notification/notification_event.a11y.js +3 -1
  231. package/optimize/lib/components/page/page_header/page_header.a11y.js +3 -1
  232. package/optimize/lib/components/pagination/pagination.a11y.js +3 -1
  233. package/optimize/lib/components/popover/popover.a11y.js +3 -1
  234. package/optimize/lib/components/popover/popover_footer.js +4 -4
  235. package/optimize/lib/components/popover/popover_footer.styles.js +19 -7
  236. package/optimize/lib/components/popover/popover_panel/_popover_panel.js +7 -4
  237. package/optimize/lib/components/portal/portal.a11y.js +3 -1
  238. package/optimize/lib/components/progress/progress.a11y.js +3 -1
  239. package/optimize/lib/components/resizable_container/resizable_container.a11y.js +3 -1
  240. package/optimize/lib/components/search_bar/search_bar.a11y.js +8 -7
  241. package/optimize/lib/components/selectable/selectable.a11y.js +3 -1
  242. package/optimize/lib/components/side_nav/side_nav.a11y.js +3 -1
  243. package/optimize/lib/components/tree_view/tree_view.a11y.js +3 -1
  244. package/package.json +1 -1
  245. package/src/components/combo_box/_combo_box.scss +2 -38
  246. package/src/components/date_picker/_date_picker_range.scss +1 -1
  247. package/src/components/form/field_text/_field_text.scss +0 -7
  248. package/src/components/form/file_picker/_file_picker.scss +3 -2
  249. package/src/components/form/form_control_layout/_form_control_layout.scss +7 -2
  250. package/src/components/form/text_area/_text_area.scss +9 -0
  251. package/test-env/components/accordion/accordion.a11y.js +3 -1
  252. package/test-env/components/accordion/accordion.js +4 -2
  253. package/test-env/components/basic_table/table.a11y.js +3 -1
  254. package/test-env/components/breadcrumbs/breadcrumbs.a11y.js +3 -1
  255. package/test-env/components/card/card.a11y.js +3 -1
  256. package/test-env/components/color_picker/color_picker.a11y.js +3 -1
  257. package/test-env/components/combo_box/combo_box.a11y.js +3 -1
  258. package/test-env/components/combo_box/combo_box.js +2 -21
  259. package/test-env/components/combo_box/combo_box_input/combo_box_input.js +66 -36
  260. package/test-env/components/combo_box/combo_box_options_list/combo_box_options_list.js +1 -1
  261. package/test-env/components/context_menu/context_menu_panel.a11y.js +3 -1
  262. package/test-env/components/control_bar/control_bar.a11y.js +3 -1
  263. package/test-env/components/copy/copy.a11y.js +6 -5
  264. package/test-env/components/datagrid/data_grid.a11y.js +3 -1
  265. package/test-env/components/date_picker/date_picker.a11y.js +3 -1
  266. package/test-env/components/date_picker/date_picker.js +141 -147
  267. package/test-env/components/date_picker/date_picker_range.js +2 -2
  268. package/test-env/components/date_picker/super_date_picker/super_date_picker.a11y.js +3 -1
  269. package/test-env/components/delay_hide/delay_hide.a11y.js +9 -9
  270. package/test-env/components/delay_render/delay_render.a11y.js +9 -9
  271. package/test-env/components/drag_and_drop/drag_and_drop.a11y.js +3 -2
  272. package/test-env/components/empty_prompt/empty_prompt.a11y.js +8 -14
  273. package/test-env/components/error_boundary/error_boundary.a11y.js +3 -1
  274. package/test-env/components/filter_group/filter_group.a11y.js +10 -9
  275. package/test-env/components/focus_trap/focus_trap.a11y.js +3 -1
  276. package/test-env/components/form/file_picker/file_picker.js +4 -2
  277. package/test-env/components/form/radio/radio_group.a11y.js +4 -5
  278. package/test-env/components/form/range/range.a11y.js +3 -1
  279. package/test-env/components/form/switch/switch.a11y.js +4 -5
  280. package/test-env/components/form/text_area/text_area.js +11 -3
  281. package/test-env/components/form/validatable_control/index.js +6 -0
  282. package/test-env/components/form/validatable_control/validatable_control.js +51 -14
  283. package/test-env/components/header/header.a11y.js +3 -1
  284. package/test-env/components/icon/icon_ML.a11y.js +3 -1
  285. package/test-env/components/icon/icon_apps.a11y.js +3 -1
  286. package/test-env/components/icon/icon_editor.a11y.js +3 -1
  287. package/test-env/components/icon/icon_elastic.a11y.js +3 -1
  288. package/test-env/components/icon/icon_glyphs.a11y.js +3 -1
  289. package/test-env/components/icon/icon_tokens.a11y.js +3 -1
  290. package/test-env/components/image/image.a11y.js +3 -1
  291. package/test-env/components/index.js +11 -0
  292. package/test-env/components/inline_edit/index.js +19 -0
  293. package/test-env/components/inline_edit/inline_edit.styles.js +22 -0
  294. package/test-env/components/inline_edit/inline_edit_form.js +196 -0
  295. package/test-env/components/inline_edit/inline_edit_text.js +96 -0
  296. package/test-env/components/inline_edit/inline_edit_title.js +105 -0
  297. package/test-env/components/key_pad_menu/key_pad_menu.a11y.js +3 -1
  298. package/test-env/components/modal/modal.a11y.js +3 -1
  299. package/test-env/components/notification/notification_event.a11y.js +3 -1
  300. package/test-env/components/page/page_header/page_header.a11y.js +3 -1
  301. package/test-env/components/pagination/pagination.a11y.js +3 -1
  302. package/test-env/components/popover/popover.a11y.js +3 -1
  303. package/test-env/components/popover/popover_footer.js +4 -4
  304. package/test-env/components/popover/popover_footer.styles.js +19 -7
  305. package/test-env/components/popover/popover_panel/_popover_panel.js +7 -4
  306. package/test-env/components/portal/portal.a11y.js +3 -1
  307. package/test-env/components/progress/progress.a11y.js +3 -1
  308. package/test-env/components/resizable_container/resizable_container.a11y.js +3 -1
  309. package/test-env/components/search_bar/search_bar.a11y.js +8 -7
  310. package/test-env/components/selectable/selectable.a11y.js +3 -1
  311. package/test-env/components/side_nav/side_nav.a11y.js +3 -1
  312. package/test-env/components/tree_view/tree_view.a11y.js +3 -1
@@ -1,21 +1,13 @@
1
1
  var _excluded = ["adjustDateOnChange", "calendarClassName", "className", "customInput", "dateFormat", "dayClassName", "disabled", "excludeDates", "filterDate", "fullWidth", "iconType", "injectTimes", "inline", "inputRef", "isInvalid", "isLoading", "locale", "maxDate", "maxTime", "minDate", "minTime", "onChange", "onClear", "openToDate", "placeholder", "popperClassName", "popoverPlacement", "selected", "shadow", "shouldCloseOnSelect", "showIcon", "showTimeSelect", "showTimeSelectOnly", "timeFormat", "utcOffset"];
2
- function _typeof(obj) { "@babel/helpers - typeof"; return _typeof = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function (obj) { return typeof obj; } : function (obj) { return obj && "function" == typeof Symbol && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj; }, _typeof(obj); }
3
2
  function _extends() { _extends = Object.assign ? Object.assign.bind() : function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; return _extends.apply(this, arguments); }
3
+ function _slicedToArray(arr, i) { return _arrayWithHoles(arr) || _iterableToArrayLimit(arr, i) || _unsupportedIterableToArray(arr, i) || _nonIterableRest(); }
4
+ function _nonIterableRest() { throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method."); }
5
+ function _unsupportedIterableToArray(o, minLen) { if (!o) return; if (typeof o === "string") return _arrayLikeToArray(o, minLen); var n = Object.prototype.toString.call(o).slice(8, -1); if (n === "Object" && o.constructor) n = o.constructor.name; if (n === "Map" || n === "Set") return Array.from(o); if (n === "Arguments" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)) return _arrayLikeToArray(o, minLen); }
6
+ function _arrayLikeToArray(arr, len) { if (len == null || len > arr.length) len = arr.length; for (var i = 0, arr2 = new Array(len); i < len; i++) arr2[i] = arr[i]; return arr2; }
7
+ function _iterableToArrayLimit(arr, i) { var _i = null == arr ? null : "undefined" != typeof Symbol && arr[Symbol.iterator] || arr["@@iterator"]; if (null != _i) { var _s, _e, _x, _r, _arr = [], _n = !0, _d = !1; try { if (_x = (_i = _i.call(arr)).next, 0 === i) { if (Object(_i) !== _i) return; _n = !1; } else for (; !(_n = (_s = _x.call(_i)).done) && (_arr.push(_s.value), _arr.length !== i); _n = !0); } catch (err) { _d = !0, _e = err; } finally { try { if (!_n && null != _i.return && (_r = _i.return(), Object(_r) !== _r)) return; } finally { if (_d) throw _e; } } return _arr; } }
8
+ function _arrayWithHoles(arr) { if (Array.isArray(arr)) return arr; }
4
9
  function _objectWithoutProperties(source, excluded) { if (source == null) return {}; var target = _objectWithoutPropertiesLoose(source, excluded); var key, i; if (Object.getOwnPropertySymbols) { var sourceSymbolKeys = Object.getOwnPropertySymbols(source); for (i = 0; i < sourceSymbolKeys.length; i++) { key = sourceSymbolKeys[i]; if (excluded.indexOf(key) >= 0) continue; if (!Object.prototype.propertyIsEnumerable.call(source, key)) continue; target[key] = source[key]; } } return target; }
5
10
  function _objectWithoutPropertiesLoose(source, excluded) { if (source == null) return {}; var target = {}; var sourceKeys = Object.keys(source); var key, i; for (i = 0; i < sourceKeys.length; i++) { key = sourceKeys[i]; if (excluded.indexOf(key) >= 0) continue; target[key] = source[key]; } return target; }
6
- function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } }
7
- function _defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if ("value" in descriptor) descriptor.writable = true; Object.defineProperty(target, _toPropertyKey(descriptor.key), descriptor); } }
8
- function _createClass(Constructor, protoProps, staticProps) { if (protoProps) _defineProperties(Constructor.prototype, protoProps); if (staticProps) _defineProperties(Constructor, staticProps); Object.defineProperty(Constructor, "prototype", { writable: false }); return Constructor; }
9
- function _inherits(subClass, superClass) { if (typeof superClass !== "function" && superClass !== null) { throw new TypeError("Super expression must either be null or a function"); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, writable: true, configurable: true } }); Object.defineProperty(subClass, "prototype", { writable: false }); if (superClass) _setPrototypeOf(subClass, superClass); }
10
- function _setPrototypeOf(o, p) { _setPrototypeOf = Object.setPrototypeOf ? Object.setPrototypeOf.bind() : function _setPrototypeOf(o, p) { o.__proto__ = p; return o; }; return _setPrototypeOf(o, p); }
11
- function _createSuper(Derived) { var hasNativeReflectConstruct = _isNativeReflectConstruct(); return function _createSuperInternal() { var Super = _getPrototypeOf(Derived), result; if (hasNativeReflectConstruct) { var NewTarget = _getPrototypeOf(this).constructor; result = Reflect.construct(Super, arguments, NewTarget); } else { result = Super.apply(this, arguments); } return _possibleConstructorReturn(this, result); }; }
12
- function _possibleConstructorReturn(self, call) { if (call && (_typeof(call) === "object" || typeof call === "function")) { return call; } else if (call !== void 0) { throw new TypeError("Derived constructors may only return object or undefined"); } return _assertThisInitialized(self); }
13
- function _assertThisInitialized(self) { if (self === void 0) { throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); } return self; }
14
- function _isNativeReflectConstruct() { if (typeof Reflect === "undefined" || !Reflect.construct) return false; if (Reflect.construct.sham) return false; if (typeof Proxy === "function") return true; try { Boolean.prototype.valueOf.call(Reflect.construct(Boolean, [], function () {})); return true; } catch (e) { return false; } }
15
- function _getPrototypeOf(o) { _getPrototypeOf = Object.setPrototypeOf ? Object.getPrototypeOf.bind() : function _getPrototypeOf(o) { return o.__proto__ || Object.getPrototypeOf(o); }; return _getPrototypeOf(o); }
16
- function _defineProperty(obj, key, value) { key = _toPropertyKey(key); if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; }
17
- function _toPropertyKey(arg) { var key = _toPrimitive(arg, "string"); return _typeof(key) === "symbol" ? key : String(key); }
18
- function _toPrimitive(input, hint) { if (_typeof(input) !== "object" || input === null) return input; var prim = input[Symbol.toPrimitive]; if (prim !== undefined) { var res = prim.call(input, hint || "default"); if (_typeof(res) !== "object") return res; throw new TypeError("@@toPrimitive must return a primitive value."); } return (hint === "string" ? String : Number)(input); }
19
11
  /*
20
12
  * Copyright Elasticsearch B.V. and/or licensed to Elasticsearch B.V. under one
21
13
  * or more contributor license agreements. Licensed under the Elastic License
@@ -24,12 +16,14 @@ function _toPrimitive(input, hint) { if (_typeof(input) !== "object" || input ==
24
16
  * Side Public License, v 1.
25
17
  */
26
18
 
27
- import React, { Component } from 'react';
19
+ import React, { useState, useCallback } from 'react';
28
20
  import PropTypes from "prop-types";
29
21
  import classNames from 'classnames';
30
22
  // eslint-disable-line import/named
31
23
 
32
- import { EuiFormControlLayout, EuiValidatableControl } from '../form';
24
+ import { EuiFormControlLayout, useEuiValidatableControl } from '../form';
25
+ import { getFormControlClassNameForIconCount } from '../form/form_control_layout/_num_icons';
26
+ import { useCombinedRefs } from '../../services';
33
27
  import { EuiI18nConsumer } from '../context';
34
28
  import { ReactDatePicker } from './react-datepicker';
35
29
  import { jsx as ___EmotionJSX } from "@emotion/react";
@@ -62,146 +56,145 @@ var unsupportedProps = [
62
56
  'showMonthYearDropdown',
63
57
  // We overridde this with `popoverPlacement`
64
58
  'popperPlacement'];
65
- export var EuiDatePicker = /*#__PURE__*/function (_Component) {
66
- _inherits(EuiDatePicker, _Component);
67
- var _super = _createSuper(EuiDatePicker);
68
- function EuiDatePicker() {
69
- _classCallCheck(this, EuiDatePicker);
70
- return _super.apply(this, arguments);
59
+ export var EuiDatePicker = function EuiDatePicker(_ref) {
60
+ var _ref$adjustDateOnChan = _ref.adjustDateOnChange,
61
+ adjustDateOnChange = _ref$adjustDateOnChan === void 0 ? true : _ref$adjustDateOnChan,
62
+ calendarClassName = _ref.calendarClassName,
63
+ className = _ref.className,
64
+ customInput = _ref.customInput,
65
+ _ref$dateFormat = _ref.dateFormat,
66
+ dateFormat = _ref$dateFormat === void 0 ? euiDatePickerDefaultDateFormat : _ref$dateFormat,
67
+ dayClassName = _ref.dayClassName,
68
+ disabled = _ref.disabled,
69
+ excludeDates = _ref.excludeDates,
70
+ filterDate = _ref.filterDate,
71
+ _ref$fullWidth = _ref.fullWidth,
72
+ fullWidth = _ref$fullWidth === void 0 ? false : _ref$fullWidth,
73
+ iconType = _ref.iconType,
74
+ injectTimes = _ref.injectTimes,
75
+ inline = _ref.inline,
76
+ inputRef = _ref.inputRef,
77
+ isInvalid = _ref.isInvalid,
78
+ isLoading = _ref.isLoading,
79
+ locale = _ref.locale,
80
+ maxDate = _ref.maxDate,
81
+ maxTime = _ref.maxTime,
82
+ minDate = _ref.minDate,
83
+ minTime = _ref.minTime,
84
+ onChange = _ref.onChange,
85
+ onClear = _ref.onClear,
86
+ openToDate = _ref.openToDate,
87
+ placeholder = _ref.placeholder,
88
+ popperClassName = _ref.popperClassName,
89
+ _ref$popoverPlacement = _ref.popoverPlacement,
90
+ popoverPlacement = _ref$popoverPlacement === void 0 ? 'downLeft' : _ref$popoverPlacement,
91
+ selected = _ref.selected,
92
+ _ref$shadow = _ref.shadow,
93
+ shadow = _ref$shadow === void 0 ? true : _ref$shadow,
94
+ _ref$shouldCloseOnSel = _ref.shouldCloseOnSelect,
95
+ shouldCloseOnSelect = _ref$shouldCloseOnSel === void 0 ? true : _ref$shouldCloseOnSel,
96
+ _ref$showIcon = _ref.showIcon,
97
+ showIcon = _ref$showIcon === void 0 ? true : _ref$showIcon,
98
+ _ref$showTimeSelect = _ref.showTimeSelect,
99
+ showTimeSelect = _ref$showTimeSelect === void 0 ? false : _ref$showTimeSelect,
100
+ showTimeSelectOnly = _ref.showTimeSelectOnly,
101
+ _ref$timeFormat = _ref.timeFormat,
102
+ timeFormat = _ref$timeFormat === void 0 ? euiDatePickerDefaultTimeFormat : _ref$timeFormat,
103
+ utcOffset = _ref.utcOffset,
104
+ rest = _objectWithoutProperties(_ref, _excluded);
105
+ var classes = classNames('euiDatePicker', {
106
+ 'euiDatePicker--shadow': shadow,
107
+ 'euiDatePicker--inline': inline
108
+ });
109
+ var numIconsClass = getFormControlClassNameForIconCount({
110
+ isInvalid: isInvalid,
111
+ isLoading: isLoading
112
+ });
113
+ var datePickerClasses = classNames('euiDatePicker', 'euiFieldText', numIconsClass, {
114
+ 'euiFieldText--fullWidth': fullWidth,
115
+ 'euiFieldText-isLoading': isLoading,
116
+ 'euiFieldText--withIcon': !inline && showIcon,
117
+ 'euiFieldText--isClearable': !inline && selected && onClear
118
+ }, className);
119
+ var optionalIcon;
120
+ if (inline || customInput || !showIcon) {
121
+ optionalIcon = undefined;
122
+ } else if (iconType) {
123
+ optionalIcon = iconType;
124
+ } else if (showTimeSelectOnly) {
125
+ optionalIcon = 'clock';
126
+ } else {
127
+ optionalIcon = 'calendar';
71
128
  }
72
- _createClass(EuiDatePicker, [{
73
- key: "render",
74
- value: function render() {
75
- var _this$props = this.props,
76
- adjustDateOnChange = _this$props.adjustDateOnChange,
77
- calendarClassName = _this$props.calendarClassName,
78
- className = _this$props.className,
79
- customInput = _this$props.customInput,
80
- dateFormat = _this$props.dateFormat,
81
- dayClassName = _this$props.dayClassName,
82
- disabled = _this$props.disabled,
83
- excludeDates = _this$props.excludeDates,
84
- filterDate = _this$props.filterDate,
85
- fullWidth = _this$props.fullWidth,
86
- iconType = _this$props.iconType,
87
- injectTimes = _this$props.injectTimes,
88
- inline = _this$props.inline,
89
- inputRef = _this$props.inputRef,
90
- isInvalid = _this$props.isInvalid,
91
- isLoading = _this$props.isLoading,
92
- locale = _this$props.locale,
93
- maxDate = _this$props.maxDate,
94
- maxTime = _this$props.maxTime,
95
- minDate = _this$props.minDate,
96
- minTime = _this$props.minTime,
97
- onChange = _this$props.onChange,
98
- onClear = _this$props.onClear,
99
- openToDate = _this$props.openToDate,
100
- placeholder = _this$props.placeholder,
101
- popperClassName = _this$props.popperClassName,
102
- popoverPlacement = _this$props.popoverPlacement,
103
- selected = _this$props.selected,
104
- shadow = _this$props.shadow,
105
- shouldCloseOnSelect = _this$props.shouldCloseOnSelect,
106
- showIcon = _this$props.showIcon,
107
- showTimeSelect = _this$props.showTimeSelect,
108
- showTimeSelectOnly = _this$props.showTimeSelectOnly,
109
- timeFormat = _this$props.timeFormat,
110
- utcOffset = _this$props.utcOffset,
111
- rest = _objectWithoutProperties(_this$props, _excluded);
112
- var classes = classNames('euiDatePicker', {
113
- 'euiDatePicker--shadow': shadow,
114
- 'euiDatePicker--inline': inline
115
- });
116
- var datePickerClasses = classNames('euiDatePicker', 'euiFieldText', {
117
- 'euiFieldText--fullWidth': fullWidth,
118
- 'euiFieldText-isLoading': isLoading,
119
- 'euiFieldText--withIcon': !inline && showIcon,
120
- 'euiFieldText--isClearable': !inline && selected && onClear,
121
- 'euiFieldText-isInvalid': isInvalid
122
- }, className);
123
- var optionalIcon;
124
- if (inline || customInput || !showIcon) {
125
- optionalIcon = undefined;
126
- } else if (iconType) {
127
- optionalIcon = iconType;
128
- } else if (showTimeSelectOnly) {
129
- optionalIcon = 'clock';
130
- } else {
131
- optionalIcon = 'calendar';
132
- }
133
129
 
134
- // In case the consumer did not alter the default date format but wants
135
- // to add the time select, we append the default time format
136
- var fullDateFormat = dateFormat;
137
- if (showTimeSelect && dateFormat === euiDatePickerDefaultDateFormat) {
138
- fullDateFormat = "".concat(dateFormat, " ").concat(timeFormat);
139
- }
140
- return ___EmotionJSX("span", {
141
- className: classes
142
- }, ___EmotionJSX(EuiFormControlLayout, {
143
- icon: optionalIcon,
144
- fullWidth: fullWidth,
145
- clear: selected && onClear ? {
146
- onClick: onClear
147
- } : undefined,
148
- isLoading: isLoading
149
- }, ___EmotionJSX(EuiValidatableControl, {
150
- isInvalid: isInvalid
151
- }, ___EmotionJSX(EuiI18nConsumer, null, function (_ref) {
152
- var contextLocale = _ref.locale;
153
- return ___EmotionJSX(ReactDatePicker, _extends({
154
- adjustDateOnChange: adjustDateOnChange,
155
- calendarClassName: calendarClassName,
156
- className: datePickerClasses,
157
- customInput: customInput,
158
- dateFormat: fullDateFormat,
159
- dayClassName: dayClassName,
160
- disabled: disabled,
161
- excludeDates: excludeDates,
162
- filterDate: filterDate,
163
- injectTimes: injectTimes,
164
- inline: inline,
165
- locale: locale || contextLocale,
166
- maxDate: maxDate,
167
- maxTime: maxTime,
168
- minDate: minDate,
169
- minTime: minTime,
170
- onChange: onChange,
171
- openToDate: openToDate,
172
- placeholderText: placeholder,
173
- popperClassName: popperClassName,
174
- ref: inputRef,
175
- selected: selected,
176
- shouldCloseOnSelect: shouldCloseOnSelect,
177
- showMonthDropdown: true,
178
- showTimeSelect: showTimeSelectOnly ? true : showTimeSelect,
179
- showTimeSelectOnly: showTimeSelectOnly,
180
- showYearDropdown: true,
181
- timeFormat: timeFormat,
182
- utcOffset: utcOffset,
183
- yearDropdownItemNumber: 7,
184
- accessibleMode: true,
185
- popperPlacement: popoverPlacement
186
- }, rest));
187
- }))));
188
- }
189
- }]);
190
- return EuiDatePicker;
191
- }(Component);
192
- _defineProperty(EuiDatePicker, "defaultProps", {
193
- adjustDateOnChange: true,
194
- dateFormat: euiDatePickerDefaultDateFormat,
195
- fullWidth: false,
196
- inputRef: function inputRef() {},
197
- isLoading: false,
198
- shadow: true,
199
- shouldCloseOnSelect: true,
200
- showIcon: true,
201
- showTimeSelect: false,
202
- timeFormat: euiDatePickerDefaultTimeFormat,
203
- popoverPlacement: 'downLeft'
204
- });
130
+ // In case the consumer did not alter the default date format but wants
131
+ // to add the time select, we append the default time format
132
+ var fullDateFormat = dateFormat;
133
+ if (showTimeSelect && dateFormat === euiDatePickerDefaultDateFormat) {
134
+ fullDateFormat = "".concat(dateFormat, " ").concat(timeFormat);
135
+ }
136
+
137
+ // Set an internal ref on ReactDatePicker's `input` so we can set its :invalid state via useEuiValidatableControl
138
+ var _useState = useState(null),
139
+ _useState2 = _slicedToArray(_useState, 2),
140
+ inputValidityRef = _useState2[0],
141
+ _setInputValidityRef = _useState2[1];
142
+ var setInputValidityRef = useCallback(function (ref) {
143
+ _setInputValidityRef(ref === null || ref === void 0 ? void 0 : ref.input);
144
+ }, []);
145
+ useEuiValidatableControl({
146
+ isInvalid: isInvalid,
147
+ controlEl: inputValidityRef
148
+ });
149
+ var inputRefs = useCombinedRefs([inputRef, setInputValidityRef]);
150
+ return ___EmotionJSX("span", {
151
+ className: classes
152
+ }, ___EmotionJSX(EuiFormControlLayout, {
153
+ icon: optionalIcon,
154
+ fullWidth: fullWidth,
155
+ clear: selected && onClear ? {
156
+ onClick: onClear
157
+ } : undefined,
158
+ isLoading: isLoading,
159
+ isInvalid: isInvalid
160
+ }, ___EmotionJSX(EuiI18nConsumer, null, function (_ref2) {
161
+ var contextLocale = _ref2.locale;
162
+ return ___EmotionJSX(ReactDatePicker, _extends({
163
+ adjustDateOnChange: adjustDateOnChange,
164
+ calendarClassName: calendarClassName,
165
+ className: datePickerClasses,
166
+ customInput: customInput,
167
+ dateFormat: fullDateFormat,
168
+ dayClassName: dayClassName,
169
+ disabled: disabled,
170
+ excludeDates: excludeDates,
171
+ filterDate: filterDate,
172
+ injectTimes: injectTimes,
173
+ inline: inline,
174
+ locale: locale || contextLocale,
175
+ maxDate: maxDate,
176
+ maxTime: maxTime,
177
+ minDate: minDate,
178
+ minTime: minTime,
179
+ onChange: onChange,
180
+ openToDate: openToDate,
181
+ placeholderText: placeholder,
182
+ popperClassName: popperClassName,
183
+ ref: inputRefs,
184
+ selected: selected,
185
+ shouldCloseOnSelect: shouldCloseOnSelect,
186
+ showMonthDropdown: true,
187
+ showTimeSelect: showTimeSelectOnly ? true : showTimeSelect,
188
+ showTimeSelectOnly: showTimeSelectOnly,
189
+ showYearDropdown: true,
190
+ timeFormat: timeFormat,
191
+ utcOffset: utcOffset,
192
+ yearDropdownItemNumber: 7,
193
+ accessibleMode: true,
194
+ popperPlacement: popoverPlacement
195
+ }, rest));
196
+ })));
197
+ };
205
198
  EuiDatePicker.propTypes = {
206
199
  className: PropTypes.string,
207
200
  "aria-label": PropTypes.string,
@@ -218,7 +211,7 @@ EuiDatePicker.propTypes = {
218
211
  /**
219
212
  * ref for the ReactDatePicker instance
220
213
  */
221
- inputRef: PropTypes.any.isRequired,
214
+ inputRef: PropTypes.any,
222
215
  /**
223
216
  * Provides styling to the input when invalid
224
217
  */
@@ -82,7 +82,7 @@ export var EuiDatePickerRange = function EuiDatePickerRange(_ref) {
82
82
  className: "euiDatePickerRange__delimeter"
83
83
  }, ___EmotionJSX(EuiIcon, {
84
84
  color: isInvalid ? 'danger' : 'subdued',
85
- type: isInvalid ? 'warning' : 'sortRight'
85
+ type: "sortRight"
86
86
  }));
87
87
  return ___EmotionJSX("div", _extends({
88
88
  className: classes
@@ -114,7 +114,7 @@ EuiDatePickerRange.propTypes = {
114
114
  */
115
115
  isCustom: PropTypes.bool,
116
116
  /**
117
- * Will turn the range delimeter into an alert icon and pass through to each control
117
+ * Will color the range delimiter the `danger` color and pass through to each control
118
118
  */
119
119
  isInvalid: PropTypes.bool,
120
120
  /**
@@ -13,7 +13,9 @@ function _arrayWithHoles(arr) { if (Array.isArray(arr)) return arr; }
13
13
  * Side Public License, v 1.
14
14
  */
15
15
 
16
- /// <reference types="../../../../cypress/support"/>
16
+ /// <reference types="cypress" />
17
+ /// <reference types="cypress-real-events" />
18
+ /// <reference types="../../../../cypress/support" />
17
19
 
18
20
  import React, { useState } from 'react';
19
21
  import { EuiSuperDatePicker } from './super_date_picker';
@@ -12,7 +12,9 @@ function _arrayWithHoles(arr) { if (Array.isArray(arr)) return arr; }
12
12
  * Side Public License, v 1.
13
13
  */
14
14
 
15
- /// <reference types="../../../cypress/support"/>
15
+ /// <reference types="cypress" />
16
+ /// <reference types="cypress-real-events" />
17
+ /// <reference types="../../../cypress/support" />
16
18
 
17
19
  import React, { useState } from 'react';
18
20
  import { EuiDelayHide } from './delay_hide';
@@ -29,22 +31,20 @@ var DelayHide = function DelayHide() {
29
31
  _useState4 = _slicedToArray(_useState3, 2),
30
32
  hide = _useState4[0],
31
33
  setHide = _useState4[1];
32
- var onChangeMinimumDuration = function onChangeMinimumDuration(event) {
33
- setDuration(parseInt(event.target.value, 10));
34
- };
35
- var onChangeHide = function onChangeHide(event) {
36
- setHide(event.target.checked);
37
- };
38
34
  return ___EmotionJSX(React.Fragment, null, ___EmotionJSX(EuiFlexItem, null, ___EmotionJSX(EuiFormRow, null, ___EmotionJSX(EuiCheckbox, {
39
35
  id: "dummy-id",
40
36
  checked: hide,
41
- onChange: onChangeHide,
37
+ onChange: function onChange(event) {
38
+ return setHide(event.target.checked);
39
+ },
42
40
  label: "Hide child"
43
41
  })), ___EmotionJSX(EuiFormRow, {
44
42
  label: "Minimum duration"
45
43
  }, ___EmotionJSX(EuiFieldNumber, {
46
44
  value: minimumDuration,
47
- onChange: onChangeMinimumDuration
45
+ onChange: function onChange(event) {
46
+ return setDuration(parseInt(event.target.value, 10));
47
+ }
48
48
  })), ___EmotionJSX(EuiFormRow, {
49
49
  label: "Child to render"
50
50
  }, ___EmotionJSX(EuiDelayHide, {
@@ -12,7 +12,9 @@ function _arrayWithHoles(arr) { if (Array.isArray(arr)) return arr; }
12
12
  * Side Public License, v 1.
13
13
  */
14
14
 
15
- /// <reference types="../../../cypress/support"/>
15
+ /// <reference types="cypress" />
16
+ /// <reference types="cypress-real-events" />
17
+ /// <reference types="../../../cypress/support" />
16
18
 
17
19
  import React, { useState } from 'react';
18
20
  import { EuiDelayRender } from './delay_render';
@@ -29,24 +31,22 @@ var DelayRender = function DelayRender() {
29
31
  _useState4 = _slicedToArray(_useState3, 2),
30
32
  render = _useState4[0],
31
33
  setRender = _useState4[1];
32
- var onChangeMinimumDelay = function onChangeMinimumDelay(event) {
33
- setDelay(parseInt(event.target.value, 10));
34
- };
35
- var onChangeHide = function onChangeHide(event) {
36
- setRender(event.target.checked);
37
- };
38
34
  var status = render ? 'showing' : 'hidden';
39
35
  var label = "Child (".concat(status, ")");
40
36
  return ___EmotionJSX(React.Fragment, null, ___EmotionJSX(EuiFlexItem, null, ___EmotionJSX(EuiFormRow, null, ___EmotionJSX(EuiCheckbox, {
41
37
  id: "dummy-id",
42
38
  checked: render,
43
- onChange: onChangeHide,
39
+ onChange: function onChange(event) {
40
+ return setRender(event.target.checked);
41
+ },
44
42
  label: "Show child"
45
43
  })), ___EmotionJSX(EuiFormRow, {
46
44
  label: "Minimum delay"
47
45
  }, ___EmotionJSX(EuiFieldNumber, {
48
46
  value: minimumDelay,
49
- onChange: onChangeMinimumDelay
47
+ onChange: function onChange(event) {
48
+ return setDelay(parseInt(event.target.value, 10));
49
+ }
50
50
  })), ___EmotionJSX(EuiFormRow, {
51
51
  label: label
52
52
  }, render ? ___EmotionJSX(EuiDelayRender, {
@@ -12,7 +12,9 @@ function _arrayWithHoles(arr) { if (Array.isArray(arr)) return arr; }
12
12
  * Side Public License, v 1.
13
13
  */
14
14
 
15
- /// <reference types="../../../cypress/support"/>
15
+ /// <reference types="cypress" />
16
+ /// <reference types="cypress-real-events" />
17
+ /// <reference types="../../../cypress/support" />
16
18
 
17
19
  import React, { useState } from 'react';
18
20
  import { EuiDragDropContext } from './drag_drop_context';
@@ -41,7 +43,6 @@ var DragAndDrop = function DragAndDrop() {
41
43
  _useState2 = _slicedToArray(_useState, 2),
42
44
  list = _useState2[0],
43
45
  setList = _useState2[1];
44
- console.log(list);
45
46
  var onDragEnd = function onDragEnd(_ref) {
46
47
  var source = _ref.source,
47
48
  destination = _ref.destination;
@@ -6,7 +6,9 @@
6
6
  * Side Public License, v 1.
7
7
  */
8
8
 
9
- /// <reference types="../../../cypress/support"/>
9
+ /// <reference types="cypress" />
10
+ /// <reference types="cypress-real-events" />
11
+ /// <reference types="../../../cypress/support" />
10
12
 
11
13
  import React from 'react';
12
14
  import { EuiButton } from '../button';
@@ -14,10 +16,11 @@ import { EuiEmptyPrompt } from './empty_prompt';
14
16
  import { EuiLink } from '../link';
15
17
  import { EuiTitle } from '../title';
16
18
  import { jsx as ___EmotionJSX } from "@emotion/react";
17
- var EmptyPrompt = function EmptyPrompt(_ref) {
18
- var addCaseSpy = _ref.addCaseSpy,
19
- addLinkSpy = _ref.addLinkSpy;
20
- return ___EmotionJSX(EuiEmptyPrompt, {
19
+ beforeEach(function () {
20
+ var addCaseSpy = cy.spy().as('addCaseSpy');
21
+ var addLinkSpy = cy.spy().as('addLinkSpy');
22
+ cy.viewport(1024, 768); // medium breakpoint
23
+ cy.realMount(___EmotionJSX(EuiEmptyPrompt, {
21
24
  iconType: "logoSecurity",
22
25
  title: ___EmotionJSX("h2", null, "Start adding cases"),
23
26
  body: ___EmotionJSX("p", null, "Add a new case or change your filter settings."),
@@ -32,15 +35,6 @@ var EmptyPrompt = function EmptyPrompt(_ref) {
32
35
  href: "#",
33
36
  onClick: addLinkSpy
34
37
  }, "Read the docs"))
35
- });
36
- };
37
- beforeEach(function () {
38
- var addCaseSpy = cy.spy().as('addCaseSpy');
39
- var addLinkSpy = cy.spy().as('addLinkSpy');
40
- cy.viewport(1024, 768); // medium breakpoint
41
- cy.realMount(___EmotionJSX(EmptyPrompt, {
42
- addCaseSpy: addCaseSpy,
43
- addLinkSpy: addLinkSpy
44
38
  }));
45
39
  });
46
40
  describe('EuiEmptyPrompt', function () {
@@ -6,7 +6,9 @@
6
6
  * Side Public License, v 1.
7
7
  */
8
8
 
9
- /// <reference types="../../../cypress/support"/>
9
+ /// <reference types="cypress" />
10
+ /// <reference types="cypress-real-events" />
11
+ /// <reference types="../../../cypress/support" />
10
12
 
11
13
  import React from 'react';
12
14
  import { EuiButton } from '../button';
@@ -18,7 +18,9 @@ function _arrayWithHoles(arr) { if (Array.isArray(arr)) return arr; }
18
18
  * Side Public License, v 1.
19
19
  */
20
20
 
21
- /// <reference types="../../../cypress/support"/>
21
+ /// <reference types="cypress" />
22
+ /// <reference types="cypress-real-events" />
23
+ /// <reference types="../../../cypress/support" />
22
24
 
23
25
  import React, { useState } from 'react';
24
26
  import { EuiExpression } from './expression';
@@ -12,14 +12,15 @@ function _arrayWithHoles(arr) { if (Array.isArray(arr)) return arr; }
12
12
  * Side Public License, v 1.
13
13
  */
14
14
 
15
- /// <reference types="../../../cypress/support"/>
15
+ /// <reference types="cypress" />
16
+ /// <reference types="cypress-real-events" />
17
+ /// <reference types="../../../cypress/support" />
16
18
 
17
19
  import React, { useState } from 'react';
18
- import { EuiFilterButton } from './filter_button';
19
- import { EuiFilterGroup } from './filter_group';
20
20
  import { EuiPopover, EuiPopoverTitle } from '../popover';
21
21
  import { EuiSelectable } from '../selectable';
22
22
  import { useGeneratedHtmlId } from '../../services';
23
+ import { EuiFilterGroup, EuiFilterButton } from './index';
23
24
  import { jsx as ___EmotionJSX } from "@emotion/react";
24
25
  describe('EuiFilterGroup single filter example', function () {
25
26
  var SingleFilter = function SingleFilter() {
@@ -16,7 +16,9 @@ function _objectWithoutPropertiesLoose(source, excluded) { if (source == null) r
16
16
  * Side Public License, v 1.
17
17
  */
18
18
 
19
- /// <reference types="../../../cypress/support"/>
19
+ /// <reference types="cypress" />
20
+ /// <reference types="cypress-real-events" />
21
+ /// <reference types="../../../cypress/support" />
20
22
 
21
23
  import React, { useState } from 'react';
22
24
  import { EuiFlyout } from './flyout';
@@ -16,7 +16,9 @@ function _arrayWithHoles(arr) { if (Array.isArray(arr)) return arr; }
16
16
  * Side Public License, v 1.
17
17
  */
18
18
 
19
- /// <reference types="../../../cypress/support"/>
19
+ /// <reference types="cypress" />
20
+ /// <reference types="cypress-real-events" />
21
+ /// <reference types="../../../cypress/support" />
20
22
 
21
23
  import React, { useState } from 'react';
22
24
  import { EuiBadge } from '../badge';
@@ -18,7 +18,9 @@ function _arrayWithHoles(arr) { if (Array.isArray(arr)) return arr; }
18
18
  * Side Public License, v 1.
19
19
  */
20
20
 
21
- /// <reference types="../../../../cypress/support"/>
21
+ /// <reference types="cypress" />
22
+ /// <reference types="cypress-real-events" />
23
+ /// <reference types="../../../../cypress/support" />
22
24
 
23
25
  import React, { useState } from 'react';
24
26
  import { EuiCheckboxGroup } from './checkbox_group';
@@ -203,8 +203,10 @@ export var EuiFilePicker = /*#__PURE__*/function (_Component) {
203
203
  id: promptId
204
204
  }, ___EmotionJSX(EuiIcon, {
205
205
  className: "euiFilePicker__icon",
206
- color: disabled ? 'subdued' : 'primary',
207
- type: "importAction",
206
+ color: isInvalid ? 'danger' : disabled ? 'subdued' : 'primary' // eslint-disable-line no-nested-ternary
207
+ ,
208
+
209
+ type: isInvalid ? 'alert' : 'importAction',
208
210
  size: normalFormControl ? 'm' : 'l',
209
211
  "aria-hidden": "true"
210
212
  }), ___EmotionJSX("div", {
@@ -12,7 +12,9 @@ function _arrayWithHoles(arr) { if (Array.isArray(arr)) return arr; }
12
12
  * Side Public License, v 1.
13
13
  */
14
14
 
15
- /// <reference types="../../../../cypress/support"/>
15
+ /// <reference types="cypress" />
16
+ /// <reference types="cypress-real-events" />
17
+ /// <reference types="../../../../cypress/support" />
16
18
 
17
19
  import React, { useState } from 'react';
18
20
  import { EuiRadioGroup } from './radio_group';
@@ -40,14 +42,11 @@ var RadioGroup = function RadioGroup() {
40
42
  _useState2 = _slicedToArray(_useState, 2),
41
43
  radioIdSelected = _useState2[0],
42
44
  setRadioIdSelected = _useState2[1];
43
- var _onChange = function onChange(optionId) {
44
- setRadioIdSelected(optionId);
45
- };
46
45
  return ___EmotionJSX(EuiRadioGroup, {
47
46
  options: radios,
48
47
  idSelected: radioIdSelected,
49
48
  onChange: function onChange(id) {
50
- return _onChange(id);
49
+ return setRadioIdSelected(id);
51
50
  },
52
51
  name: "radio group",
53
52
  legend: {