@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
@@ -0,0 +1,193 @@
1
+ "use strict";
2
+
3
+ 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); }
4
+ Object.defineProperty(exports, "__esModule", {
5
+ value: true
6
+ });
7
+ exports.SMALL_SIZE_FORM = exports.MEDIUM_SIZE_FORM = exports.EuiInlineEditForm = void 0;
8
+ var _react = _interopRequireWildcard(require("react"));
9
+ var _propTypes = _interopRequireDefault(require("prop-types"));
10
+ var _classnames = _interopRequireDefault(require("classnames"));
11
+ var _form = require("../form");
12
+ var _button = require("../button");
13
+ var _flex = require("../flex");
14
+ var _i18n = require("../i18n");
15
+ var _accessibility = require("../../services/accessibility");
16
+ var _react2 = require("@emotion/react");
17
+ function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
18
+ function _getRequireWildcardCache(nodeInterop) { if (typeof WeakMap !== "function") return null; var cacheBabelInterop = new WeakMap(); var cacheNodeInterop = new WeakMap(); return (_getRequireWildcardCache = function _getRequireWildcardCache(nodeInterop) { return nodeInterop ? cacheNodeInterop : cacheBabelInterop; })(nodeInterop); }
19
+ function _interopRequireWildcard(obj, nodeInterop) { if (!nodeInterop && obj && obj.__esModule) { return obj; } if (obj === null || _typeof(obj) !== "object" && typeof obj !== "function") { return { default: obj }; } var cache = _getRequireWildcardCache(nodeInterop); if (cache && cache.has(obj)) { return cache.get(obj); } var newObj = {}; var hasPropertyDescriptor = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var key in obj) { if (key !== "default" && Object.prototype.hasOwnProperty.call(obj, key)) { var desc = hasPropertyDescriptor ? Object.getOwnPropertyDescriptor(obj, key) : null; if (desc && (desc.get || desc.set)) { Object.defineProperty(newObj, key, desc); } else { newObj[key] = obj[key]; } } } newObj.default = obj; if (cache) { cache.set(obj, newObj); } return newObj; }
20
+ 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); }
21
+ function _slicedToArray(arr, i) { return _arrayWithHoles(arr) || _iterableToArrayLimit(arr, i) || _unsupportedIterableToArray(arr, i) || _nonIterableRest(); }
22
+ 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."); }
23
+ 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); }
24
+ 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; }
25
+ 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; } }
26
+ function _arrayWithHoles(arr) { if (Array.isArray(arr)) return arr; }
27
+ var SMALL_SIZE_FORM = {
28
+ iconSize: 's',
29
+ compressed: true,
30
+ buttonSize: 's'
31
+ };
32
+ exports.SMALL_SIZE_FORM = SMALL_SIZE_FORM;
33
+ var MEDIUM_SIZE_FORM = {
34
+ iconSize: 'm',
35
+ compressed: false,
36
+ buttonSize: 'm'
37
+ };
38
+ exports.MEDIUM_SIZE_FORM = MEDIUM_SIZE_FORM;
39
+ var EuiInlineEditForm = function EuiInlineEditForm(_ref) {
40
+ var className = _ref.className,
41
+ children = _ref.children,
42
+ sizes = _ref.sizes,
43
+ defaultValue = _ref.defaultValue,
44
+ onConfirm = _ref.onConfirm,
45
+ inputAriaLabel = _ref.inputAriaLabel,
46
+ saveButtonAriaLabel = _ref.saveButtonAriaLabel,
47
+ cancelButtonAriaLabel = _ref.cancelButtonAriaLabel,
48
+ startWithEditOpen = _ref.startWithEditOpen,
49
+ readModeProps = _ref.readModeProps,
50
+ editModeProps = _ref.editModeProps;
51
+ var classes = (0, _classnames.default)('euiInlineEdit', className);
52
+
53
+ // Styles to come later! (Styling editMode text to match the size of its readMode counterpart)
54
+ /*const theme = useEuiTheme();
55
+ const styles = euiInlineEditStyles(theme);
56
+ const cssStyles = [styles.euiInlineEdit];*/
57
+
58
+ var defaultSaveButtonAriaLabel = (0, _i18n.useEuiI18n)('euiInlineEditForm.saveButtonAriaLabel', 'Save edit');
59
+ var defaultCancelButtonAriaLabel = (0, _i18n.useEuiI18n)('euiInlineEditForm.cancelButtonAriaLabel', 'Cancel edit');
60
+ var _useState = (0, _react.useState)(false || startWithEditOpen),
61
+ _useState2 = _slicedToArray(_useState, 2),
62
+ isEditing = _useState2[0],
63
+ setIsEditing = _useState2[1];
64
+ var inlineEditInputId = (0, _accessibility.useGeneratedHtmlId)({
65
+ prefix: '__inlineEditInput'
66
+ });
67
+ var _useState3 = (0, _react.useState)(defaultValue),
68
+ _useState4 = _slicedToArray(_useState3, 2),
69
+ editModeValue = _useState4[0],
70
+ setEditModeValue = _useState4[1];
71
+ var _useState5 = (0, _react.useState)(defaultValue),
72
+ _useState6 = _slicedToArray(_useState5, 2),
73
+ readModeValue = _useState6[0],
74
+ setReadModeValue = _useState6[1];
75
+ var cancelInlineEdit = function cancelInlineEdit() {
76
+ setEditModeValue(readModeValue);
77
+ setIsEditing(!isEditing);
78
+ };
79
+ var saveInlineEditValue = function saveInlineEditValue() {
80
+ if (editModeValue && onConfirm && !onConfirm()) {
81
+ // If there is text, an onConfirm method is present, and it has returned false, cancel the action
82
+ return;
83
+ } else if (editModeValue) {
84
+ setReadModeValue(editModeValue);
85
+ setIsEditing(!isEditing);
86
+ } else {
87
+ // If there's no text, cancel the action, reset the input text, and return to readMode
88
+ cancelInlineEdit();
89
+ }
90
+ };
91
+ var editModeForm = (0, _react2.jsx)(_form.EuiForm, {
92
+ fullWidth: true
93
+ }, (0, _react2.jsx)(_flex.EuiFlexGroup, {
94
+ gutterSize: "s"
95
+ }, (0, _react2.jsx)(_flex.EuiFlexItem, null, (0, _react2.jsx)(_form.EuiFieldText, _extends({
96
+ id: inlineEditInputId,
97
+ value: editModeValue,
98
+ onChange: function onChange(e) {
99
+ setEditModeValue(e.target.value);
100
+ },
101
+ "aria-label": inputAriaLabel,
102
+ autoFocus: true,
103
+ compressed: sizes.compressed
104
+ }, editModeProps))), (0, _react2.jsx)(_flex.EuiFlexItem, {
105
+ grow: false,
106
+ className: classes
107
+ }, (0, _react2.jsx)(_form.EuiFormRow, null, (0, _react2.jsx)(_button.EuiButtonIcon, {
108
+ iconType: "check",
109
+ "aria-label": saveButtonAriaLabel || defaultSaveButtonAriaLabel,
110
+ onClick: saveInlineEditValue,
111
+ color: "success",
112
+ display: "base",
113
+ size: sizes.buttonSize,
114
+ iconSize: sizes.iconSize
115
+ }))), (0, _react2.jsx)(_flex.EuiFlexItem, {
116
+ grow: false
117
+ }, (0, _react2.jsx)(_form.EuiFormRow, null, (0, _react2.jsx)(_button.EuiButtonIcon, {
118
+ iconType: "cross",
119
+ "aria-label": cancelButtonAriaLabel || defaultCancelButtonAriaLabel,
120
+ onClick: cancelInlineEdit,
121
+ color: "danger",
122
+ display: "base",
123
+ size: sizes.buttonSize,
124
+ iconSize: sizes.iconSize
125
+ })))));
126
+ var readModeElement = (0, _react2.jsx)(_button.EuiButtonEmpty, _extends({
127
+ color: "text",
128
+ iconType: "pencil",
129
+ iconSide: "right",
130
+ autoFocus: true,
131
+ flush: "both",
132
+ iconSize: sizes.iconSize,
133
+ size: sizes.buttonSize,
134
+ onClick: function onClick() {
135
+ setIsEditing(!isEditing);
136
+ }
137
+ }, readModeProps), children(readModeValue));
138
+ return (0, _react2.jsx)("div", {
139
+ className: classes
140
+ }, isEditing ? editModeForm : readModeElement);
141
+ };
142
+ exports.EuiInlineEditForm = EuiInlineEditForm;
143
+ EuiInlineEditForm.propTypes = {
144
+ className: _propTypes.default.string,
145
+ "aria-label": _propTypes.default.string,
146
+ "data-test-subj": _propTypes.default.string,
147
+ css: _propTypes.default.any,
148
+ defaultValue: _propTypes.default.string.isRequired,
149
+ /**
150
+ * Allow users to pass in a function that is called when the confirm button is clicked
151
+ * The function should return a boolean flag that will determine if the value will be saved.
152
+ * When the flag is true, the value will be saved. When the flag is false, the user will be
153
+ * returned to editMode.
154
+ */
155
+ onConfirm: _propTypes.default.func,
156
+ /**
157
+ * Form label that appears above the form control
158
+ * This is required for accessibility because there is no visual label on the input
159
+ */
160
+ inputAriaLabel: _propTypes.default.string.isRequired,
161
+ /**
162
+ * Aria-label for save button in editMode
163
+ */
164
+ saveButtonAriaLabel: _propTypes.default.string,
165
+ /**
166
+ * Aria-label for cancel button in editMode
167
+ */
168
+ cancelButtonAriaLabel: _propTypes.default.string,
169
+ /**
170
+ * Start in editMode
171
+ */
172
+ startWithEditOpen: _propTypes.default.bool,
173
+ /**
174
+ * Props that will be applied directly to the EuiEmptyButton displayed in readMode
175
+ */
176
+ readModeProps: _propTypes.default.any,
177
+ /**
178
+ * Props that will be applied directly to the EuiFieldText displayed in editMode
179
+ */
180
+ editModeProps: _propTypes.default.any,
181
+ /**
182
+ * Form sizes
183
+ */
184
+ sizes: _propTypes.default.shape({
185
+ compressed: _propTypes.default.bool.isRequired,
186
+ buttonSize: _propTypes.default.oneOf(["xs", "s", "m"]).isRequired,
187
+ iconSize: _propTypes.default.oneOf(["s", "m"]).isRequired
188
+ }).isRequired,
189
+ /**
190
+ * Render prop that returns the read mode value as an arg
191
+ */
192
+ children: _propTypes.default.func.isRequired
193
+ };
@@ -0,0 +1,97 @@
1
+ "use strict";
2
+
3
+ Object.defineProperty(exports, "__esModule", {
4
+ value: true
5
+ });
6
+ exports.EuiInlineEditText = void 0;
7
+ var _react = _interopRequireDefault(require("react"));
8
+ var _propTypes = _interopRequireDefault(require("prop-types"));
9
+ var _classnames = _interopRequireDefault(require("classnames"));
10
+ var _text = require("../text");
11
+ var _inline_edit_form = require("./inline_edit_form");
12
+ var _react2 = require("@emotion/react");
13
+ var _excluded = ["children", "className", "size", "defaultValue", "onConfirm", "inputAriaLabel", "saveButtonAriaLabel", "cancelButtonAriaLabel", "startWithEditOpen", "readModeProps", "editModeProps"];
14
+ function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
15
+ 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); }
16
+ 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; }
17
+ 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; }
18
+ var EuiInlineEditText = function EuiInlineEditText(_ref) {
19
+ var children = _ref.children,
20
+ className = _ref.className,
21
+ _ref$size = _ref.size,
22
+ size = _ref$size === void 0 ? 'm' : _ref$size,
23
+ defaultValue = _ref.defaultValue,
24
+ onConfirm = _ref.onConfirm,
25
+ inputAriaLabel = _ref.inputAriaLabel,
26
+ saveButtonAriaLabel = _ref.saveButtonAriaLabel,
27
+ cancelButtonAriaLabel = _ref.cancelButtonAriaLabel,
28
+ startWithEditOpen = _ref.startWithEditOpen,
29
+ readModeProps = _ref.readModeProps,
30
+ editModeProps = _ref.editModeProps,
31
+ rest = _objectWithoutProperties(_ref, _excluded);
32
+ var classes = (0, _classnames.default)('euiInlineEditText', className);
33
+ var isSmallSize = ['xs', 's'].includes(size);
34
+ var sizes = isSmallSize ? _inline_edit_form.SMALL_SIZE_FORM : _inline_edit_form.MEDIUM_SIZE_FORM;
35
+ var formProps = {
36
+ sizes: sizes,
37
+ defaultValue: defaultValue,
38
+ onConfirm: onConfirm,
39
+ inputAriaLabel: inputAriaLabel,
40
+ saveButtonAriaLabel: saveButtonAriaLabel,
41
+ cancelButtonAriaLabel: cancelButtonAriaLabel,
42
+ startWithEditOpen: startWithEditOpen,
43
+ readModeProps: readModeProps,
44
+ editModeProps: editModeProps
45
+ };
46
+ return (0, _react2.jsx)(_inline_edit_form.EuiInlineEditForm, _extends({
47
+ className: classes
48
+ }, rest, formProps), function (textReadModeValue) {
49
+ return (0, _react2.jsx)(_text.EuiText, {
50
+ size: size
51
+ }, textReadModeValue);
52
+ });
53
+ };
54
+ exports.EuiInlineEditText = EuiInlineEditText;
55
+ EuiInlineEditText.propTypes = {
56
+ className: _propTypes.default.string,
57
+ "aria-label": _propTypes.default.string,
58
+ "data-test-subj": _propTypes.default.string,
59
+ css: _propTypes.default.any,
60
+ defaultValue: _propTypes.default.string.isRequired,
61
+ /**
62
+ * Allow users to pass in a function that is called when the confirm button is clicked
63
+ * The function should return a boolean flag that will determine if the value will be saved.
64
+ * When the flag is true, the value will be saved. When the flag is false, the user will be
65
+ * returned to editMode.
66
+ */
67
+ onConfirm: _propTypes.default.func,
68
+ /**
69
+ * Form label that appears above the form control
70
+ * This is required for accessibility because there is no visual label on the input
71
+ */
72
+ inputAriaLabel: _propTypes.default.string.isRequired,
73
+ /**
74
+ * Aria-label for save button in editMode
75
+ */
76
+ saveButtonAriaLabel: _propTypes.default.string,
77
+ /**
78
+ * Aria-label for cancel button in editMode
79
+ */
80
+ cancelButtonAriaLabel: _propTypes.default.string,
81
+ /**
82
+ * Start in editMode
83
+ */
84
+ startWithEditOpen: _propTypes.default.bool,
85
+ /**
86
+ * Props that will be applied directly to the EuiEmptyButton displayed in readMode
87
+ */
88
+ readModeProps: _propTypes.default.any,
89
+ /**
90
+ * Props that will be applied directly to the EuiFieldText displayed in editMode
91
+ */
92
+ editModeProps: _propTypes.default.any,
93
+ /**
94
+ * Text size level
95
+ */
96
+ size: _propTypes.default.any
97
+ };
@@ -0,0 +1,106 @@
1
+ "use strict";
2
+
3
+ Object.defineProperty(exports, "__esModule", {
4
+ value: true
5
+ });
6
+ exports.HEADINGS = exports.EuiInlineEditTitle = void 0;
7
+ var _react = _interopRequireDefault(require("react"));
8
+ var _propTypes = _interopRequireDefault(require("prop-types"));
9
+ var _classnames = _interopRequireDefault(require("classnames"));
10
+ var _title = require("../title");
11
+ var _inline_edit_form = require("./inline_edit_form");
12
+ var _react2 = require("@emotion/react");
13
+ var _excluded = ["children", "className", "size", "heading", "defaultValue", "onConfirm", "inputAriaLabel", "saveButtonAriaLabel", "cancelButtonAriaLabel", "startWithEditOpen", "readModeProps", "editModeProps"];
14
+ function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
15
+ 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); }
16
+ 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; }
17
+ 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; }
18
+ var HEADINGS = ['h1', 'h2', 'h3', 'h4', 'h5', 'h6'];
19
+ exports.HEADINGS = HEADINGS;
20
+ var EuiInlineEditTitle = function EuiInlineEditTitle(_ref) {
21
+ var children = _ref.children,
22
+ className = _ref.className,
23
+ _ref$size = _ref.size,
24
+ size = _ref$size === void 0 ? 'm' : _ref$size,
25
+ heading = _ref.heading,
26
+ defaultValue = _ref.defaultValue,
27
+ onConfirm = _ref.onConfirm,
28
+ inputAriaLabel = _ref.inputAriaLabel,
29
+ saveButtonAriaLabel = _ref.saveButtonAriaLabel,
30
+ cancelButtonAriaLabel = _ref.cancelButtonAriaLabel,
31
+ _ref$startWithEditOpe = _ref.startWithEditOpen,
32
+ startWithEditOpen = _ref$startWithEditOpe === void 0 ? false : _ref$startWithEditOpe,
33
+ readModeProps = _ref.readModeProps,
34
+ editModeProps = _ref.editModeProps,
35
+ rest = _objectWithoutProperties(_ref, _excluded);
36
+ var classes = (0, _classnames.default)('euiInlineEditTitle', className);
37
+ var H = heading;
38
+ var isSmallSize = ['xxxs', 'xxs', 'xs', 's'].includes(size);
39
+ var sizes = isSmallSize ? _inline_edit_form.SMALL_SIZE_FORM : _inline_edit_form.MEDIUM_SIZE_FORM;
40
+ var formProps = {
41
+ sizes: sizes,
42
+ defaultValue: defaultValue,
43
+ onConfirm: onConfirm,
44
+ inputAriaLabel: inputAriaLabel,
45
+ saveButtonAriaLabel: saveButtonAriaLabel,
46
+ cancelButtonAriaLabel: cancelButtonAriaLabel,
47
+ startWithEditOpen: startWithEditOpen,
48
+ readModeProps: readModeProps,
49
+ editModeProps: editModeProps
50
+ };
51
+ return (0, _react2.jsx)(_inline_edit_form.EuiInlineEditForm, _extends({
52
+ className: classes
53
+ }, rest, formProps), function (titleReadModeValue) {
54
+ return (0, _react2.jsx)(_title.EuiTitle, {
55
+ size: size
56
+ }, (0, _react2.jsx)(H, null, titleReadModeValue));
57
+ });
58
+ };
59
+ exports.EuiInlineEditTitle = EuiInlineEditTitle;
60
+ EuiInlineEditTitle.propTypes = {
61
+ className: _propTypes.default.string,
62
+ "aria-label": _propTypes.default.string,
63
+ "data-test-subj": _propTypes.default.string,
64
+ css: _propTypes.default.any,
65
+ defaultValue: _propTypes.default.string.isRequired,
66
+ /**
67
+ * Allow users to pass in a function that is called when the confirm button is clicked
68
+ * The function should return a boolean flag that will determine if the value will be saved.
69
+ * When the flag is true, the value will be saved. When the flag is false, the user will be
70
+ * returned to editMode.
71
+ */
72
+ onConfirm: _propTypes.default.func,
73
+ /**
74
+ * Form label that appears above the form control
75
+ * This is required for accessibility because there is no visual label on the input
76
+ */
77
+ inputAriaLabel: _propTypes.default.string.isRequired,
78
+ /**
79
+ * Aria-label for save button in editMode
80
+ */
81
+ saveButtonAriaLabel: _propTypes.default.string,
82
+ /**
83
+ * Aria-label for cancel button in editMode
84
+ */
85
+ cancelButtonAriaLabel: _propTypes.default.string,
86
+ /**
87
+ * Start in editMode
88
+ */
89
+ startWithEditOpen: _propTypes.default.bool,
90
+ /**
91
+ * Props that will be applied directly to the EuiEmptyButton displayed in readMode
92
+ */
93
+ readModeProps: _propTypes.default.any,
94
+ /**
95
+ * Props that will be applied directly to the EuiFieldText displayed in editMode
96
+ */
97
+ editModeProps: _propTypes.default.any,
98
+ /**
99
+ * Title size level
100
+ */
101
+ size: _propTypes.default.any,
102
+ /**
103
+ * Level of heading to be used for the title
104
+ */
105
+ heading: _propTypes.default.any.isRequired
106
+ };
@@ -13,7 +13,9 @@ function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { de
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
  describe('EuiPageHeader', function () {
19
21
  beforeEach(function () {
@@ -28,11 +28,11 @@ var EuiPopoverFooter = function EuiPopoverFooter(_ref) {
28
28
  var _useContext = (0, _react.useContext)(_popover_panel.EuiPopoverPanelContext),
29
29
  panelPadding = _useContext.paddingSize;
30
30
  var euiTheme = (0, _services.useEuiTheme)();
31
- var styles = (0, _popover_footer.euiPopoverFooterStyles)(euiTheme, panelPadding);
31
+ var styles = (0, _popover_footer.euiPopoverFooterStyles)(euiTheme);
32
32
  var paddingStyles = (0, _global_styling.useEuiPaddingCSS)();
33
- var cssStyles = [styles.euiPopoverFooter,
34
- // If a paddingSize is not directly provided, inherit from the EuiPopoverPanel
35
- paddingStyles[paddingSize || panelPadding]];
33
+ var cssStyles = [styles.euiPopoverFooter, styles.panelPaddingSizes[panelPadding], paddingStyles[paddingSize || panelPadding] // If a paddingSize is not directly provided, inherit from the EuiPopoverPanel
34
+ ];
35
+
36
36
  var classes = (0, _classnames.default)('euiPopoverFooter', className);
37
37
  return (0, _react2.jsx)("div", _extends({
38
38
  css: cssStyles,
@@ -3,7 +3,7 @@
3
3
  Object.defineProperty(exports, "__esModule", {
4
4
  value: true
5
5
  });
6
- exports.euiPopoverFooterStyles = void 0;
6
+ exports.panelPaddingOffset = exports.euiPopoverFooterStyles = void 0;
7
7
  var _react = require("@emotion/react");
8
8
  var _global_styling = require("../../global_styling");
9
9
  /*
@@ -14,14 +14,26 @@ var _global_styling = require("../../global_styling");
14
14
  * Side Public License, v 1.
15
15
  */
16
16
 
17
- var euiPopoverFooterStyles = function euiPopoverFooterStyles(euiThemeContext, panelPadding) {
17
+ var euiPopoverFooterStyles = function euiPopoverFooterStyles(euiThemeContext) {
18
18
  var euiTheme = euiThemeContext.euiTheme;
19
- // If the popover's containing panel has padding applied,
20
- // ensure the title expands to cover that padding and
21
- var panelPaddingSize = (0, _global_styling.euiPaddingSize)(euiThemeContext, panelPadding);
22
19
  return {
23
20
  // Base
24
- euiPopoverFooter: /*#__PURE__*/(0, _react.css)((0, _global_styling.euiFontSize)(euiThemeContext, 's'), ";", (0, _global_styling.logicalCSS)('border-top', euiTheme.border.thin), ";", (0, _global_styling.logicalShorthandCSS)('margin', "".concat(panelPaddingSize, " -").concat(panelPaddingSize, " -").concat(panelPaddingSize)), ";;label:euiPopoverFooter;")
21
+ euiPopoverFooter: /*#__PURE__*/(0, _react.css)((0, _global_styling.euiFontSize)(euiThemeContext, 's'), ";", (0, _global_styling.logicalCSS)('border-top', euiTheme.border.thin), ";;label:euiPopoverFooter;"),
22
+ // If the popover's containing panel has padding applied,
23
+ // ensure the title expands to cover that padding via negative margins
24
+ panelPaddingSizes: {
25
+ none: /*#__PURE__*/(0, _react.css)(";label:none;"),
26
+ xs: /*#__PURE__*/(0, _react.css)(panelPaddingOffset(euiThemeContext, 'xs'), ";;label:xs;"),
27
+ s: /*#__PURE__*/(0, _react.css)(panelPaddingOffset(euiThemeContext, 's'), ";;label:s;"),
28
+ m: /*#__PURE__*/(0, _react.css)(panelPaddingOffset(euiThemeContext, 'm'), ";;label:m;"),
29
+ l: /*#__PURE__*/(0, _react.css)(panelPaddingOffset(euiThemeContext, 'l'), ";;label:l;"),
30
+ xl: /*#__PURE__*/(0, _react.css)(panelPaddingOffset(euiThemeContext, 'xl'), ";;label:xl;")
31
+ }
25
32
  };
26
33
  };
27
- exports.euiPopoverFooterStyles = euiPopoverFooterStyles;
34
+ exports.euiPopoverFooterStyles = euiPopoverFooterStyles;
35
+ var panelPaddingOffset = function panelPaddingOffset(euiThemeContext, size) {
36
+ var panelPaddingSize = (0, _global_styling.euiPaddingSize)(euiThemeContext, size);
37
+ return (0, _global_styling.logicalShorthandCSS)('margin', "".concat(panelPaddingSize, " -").concat(panelPaddingSize, " -").concat(panelPaddingSize));
38
+ };
39
+ exports.panelPaddingOffset = panelPaddingOffset;
@@ -25,8 +25,9 @@ function _arrayWithoutHoles(arr) { if (Array.isArray(arr)) return _arrayLikeToAr
25
25
  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; }
26
26
  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; }
27
27
  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; }
28
+ var DEFAULT_PANEL_PADDING_SIZE = 'l';
28
29
  var EuiPopoverPanelContext = /*#__PURE__*/(0, _react.createContext)({
29
- paddingSize: 'l'
30
+ paddingSize: DEFAULT_PANEL_PADDING_SIZE
30
31
  });
31
32
  exports.EuiPopoverPanelContext = EuiPopoverPanelContext;
32
33
  /**
@@ -41,8 +42,8 @@ var EuiPopoverPanel = function EuiPopoverPanel(_ref) {
41
42
  hasDragDrop = _ref.hasDragDrop,
42
43
  position = _ref.position,
43
44
  rest = _objectWithoutProperties(_ref, _excluded);
44
- var panelContext = (0, _react.useContext)(EuiPopoverPanelContext);
45
- if (rest.paddingSize) panelContext.paddingSize = rest.paddingSize;
45
+ var _rest$paddingSize = rest.paddingSize,
46
+ paddingSize = _rest$paddingSize === void 0 ? DEFAULT_PANEL_PADDING_SIZE : _rest$paddingSize;
46
47
  var euiThemeContext = (0, _services.useEuiTheme)();
47
48
  // Using BEM child class for BWC
48
49
  var classes = (0, _classnames.default)('euiPopover__panel', className);
@@ -55,7 +56,9 @@ var EuiPopoverPanel = function EuiPopoverPanel(_ref) {
55
56
  panelCSS = [].concat(_toConsumableArray(panelCSS), [styles.hasDragDrop.hasDragDrop, position && styles.hasDragDrop[position]]);
56
57
  }
57
58
  return (0, _react2.jsx)(EuiPopoverPanelContext.Provider, {
58
- value: panelContext
59
+ value: {
60
+ paddingSize: paddingSize
61
+ }
59
62
  }, (0, _react2.jsx)(_panel.EuiPanel, _extends({
60
63
  className: classes,
61
64
  css: panelCSS,
@@ -14,7 +14,9 @@ function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { de
14
14
  * Side Public License, v 1.
15
15
  */
16
16
 
17
- /// <reference types="../../../cypress/support"/>
17
+ /// <reference types="cypress" />
18
+ /// <reference types="cypress-real-events" />
19
+ /// <reference types="../../../cypress/support" />
18
20
 
19
21
  var text = (0, _react2.jsx)(_react.default.Fragment, null, (0, _react2.jsx)("p", null, _faker.faker.lorem.paragraphs()), (0, _react2.jsx)("p", null, _faker.faker.lorem.paragraphs()), (0, _react2.jsx)("p", null, _faker.faker.lorem.paragraphs()));
20
22
  describe('Horizontal EuiResizableContainer', function () {
@@ -9,8 +9,8 @@ var _react = _interopRequireWildcard(require("react"));
9
9
  var _basic_table = require("../basic_table");
10
10
  var _flex = require("../flex");
11
11
  var _health = require("../health");
12
- var _search_bar = require("./search_bar");
13
12
  var _spacer = require("../spacer");
13
+ var _search_bar = require("./search_bar");
14
14
  var _react2 = require("@emotion/react");
15
15
  function _getRequireWildcardCache(nodeInterop) { if (typeof WeakMap !== "function") return null; var cacheBabelInterop = new WeakMap(); var cacheNodeInterop = new WeakMap(); return (_getRequireWildcardCache = function _getRequireWildcardCache(nodeInterop) { return nodeInterop ? cacheNodeInterop : cacheBabelInterop; })(nodeInterop); }
16
16
  function _interopRequireWildcard(obj, nodeInterop) { if (!nodeInterop && obj && obj.__esModule) { return obj; } if (obj === null || _typeof(obj) !== "object" && typeof obj !== "function") { return { default: obj }; } var cache = _getRequireWildcardCache(nodeInterop); if (cache && cache.has(obj)) { return cache.get(obj); } var newObj = {}; var hasPropertyDescriptor = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var key in obj) { if (key !== "default" && Object.prototype.hasOwnProperty.call(obj, key)) { var desc = hasPropertyDescriptor ? Object.getOwnPropertyDescriptor(obj, key) : null; if (desc && (desc.get || desc.set)) { Object.defineProperty(newObj, key, desc); } else { newObj[key] = obj[key]; } } } newObj.default = obj; if (cache) { cache.set(obj, newObj); } return newObj; }
@@ -80,10 +80,6 @@ var SearchBar = function SearchBar() {
80
80
  _useState2 = _slicedToArray(_useState, 2),
81
81
  query = _useState2[0],
82
82
  setQuery = _useState2[1];
83
- var onChange = function onChange(_ref) {
84
- var query = _ref.query;
85
- return setQuery(query);
86
- };
87
83
  var renderSearch = function renderSearch() {
88
84
  var filters = [{
89
85
  type: 'field_value_toggle_group',
@@ -129,7 +125,10 @@ var SearchBar = function SearchBar() {
129
125
  schema: schema
130
126
  },
131
127
  filters: filters,
132
- onChange: onChange
128
+ onChange: function onChange(_ref) {
129
+ var query = _ref.query;
130
+ if (query) setQuery(query);
131
+ }
133
132
  });
134
133
  };
135
134
  var renderTable = function renderTable() {
@@ -12,7 +12,9 @@ function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { de
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
  var TreeView = function TreeView() {
18
20
  var items = [{
@@ -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 { EuiAccordion } from './index';
@@ -209,8 +209,10 @@ export var EuiAccordionClass = /*#__PURE__*/function (_Component) {
209
209
  }, buttonProps, {
210
210
  id: buttonId,
211
211
  className: buttonClasses,
212
- "aria-controls": id,
213
- "aria-expanded": isOpen,
212
+ "aria-controls": id
213
+ // `aria-expanded` is only a valid attribute on interactive controls - axe-core throws a violation otherwise
214
+ ,
215
+ "aria-expanded": ButtonElement === 'button' ? isOpen : undefined,
214
216
  onClick: isDisabled ? undefined : this.onToggle,
215
217
  type: ButtonElement === 'button' ? 'button' : undefined,
216
218
  disabled: ButtonElement === 'button' ? isDisabled : undefined
@@ -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 { faker } from '@faker-js/faker';
@@ -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 { EuiBreadcrumbs } from './breadcrumbs';
@@ -7,7 +7,9 @@ import _slicedToArray from "@babel/runtime/helpers/slicedToArray";
7
7
  * Side Public License, v 1.
8
8
  */
9
9
 
10
- /// <reference types="../../../cypress/support"/>
10
+ /// <reference types="cypress" />
11
+ /// <reference types="cypress-real-events" />
12
+ /// <reference types="../../../cypress/support" />
11
13
 
12
14
  import React, { useState } from 'react';
13
15
  import { EuiButtonEmpty } from '../button';
@@ -7,7 +7,9 @@ import _slicedToArray from "@babel/runtime/helpers/slicedToArray";
7
7
  * Side Public License, v 1.
8
8
  */
9
9
 
10
- /// <reference types="../../../cypress/support"/>
10
+ /// <reference types="cypress" />
11
+ /// <reference types="cypress-real-events" />
12
+ /// <reference types="../../../cypress/support" />
11
13
 
12
14
  import React from 'react';
13
15
  import { EuiColorPicker } from './color_picker';
@@ -7,7 +7,9 @@ import _slicedToArray from "@babel/runtime/helpers/slicedToArray";
7
7
  * Side Public License, v 1.
8
8
  */
9
9
 
10
- /// <reference types="../../../cypress/support"/>
10
+ /// <reference types="cypress" />
11
+ /// <reference types="cypress-real-events" />
12
+ /// <reference types="../../../cypress/support" />
11
13
 
12
14
  import React, { useState } from 'react';
13
15
  import { EuiComboBox } from './index';