@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.
- package/dist/eui_theme_dark.css +22 -51
- package/dist/eui_theme_dark.min.css +1 -1
- package/dist/eui_theme_light.css +22 -51
- package/dist/eui_theme_light.min.css +1 -1
- package/es/components/accordion/accordion.a11y.js +3 -1
- package/es/components/accordion/accordion.js +4 -2
- package/es/components/basic_table/table.a11y.js +3 -1
- package/es/components/breadcrumbs/breadcrumbs.a11y.js +3 -1
- package/es/components/card/card.a11y.js +3 -1
- package/es/components/color_picker/color_picker.a11y.js +3 -1
- package/es/components/combo_box/combo_box.a11y.js +3 -1
- package/es/components/combo_box/combo_box.js +2 -21
- package/es/components/combo_box/combo_box_input/combo_box_input.js +66 -36
- package/es/components/combo_box/combo_box_options_list/combo_box_options_list.js +1 -1
- package/es/components/context_menu/context_menu_panel.a11y.js +3 -1
- package/es/components/control_bar/control_bar.a11y.js +3 -1
- package/es/components/copy/copy.a11y.js +6 -5
- package/es/components/datagrid/data_grid.a11y.js +3 -1
- package/es/components/date_picker/date_picker.a11y.js +3 -1
- package/es/components/date_picker/date_picker.js +148 -155
- package/es/components/date_picker/date_picker_range.js +2 -2
- package/es/components/date_picker/super_date_picker/super_date_picker.a11y.js +3 -1
- package/es/components/delay_hide/delay_hide.a11y.js +9 -9
- package/es/components/delay_render/delay_render.a11y.js +9 -9
- package/es/components/drag_and_drop/drag_and_drop.a11y.js +3 -2
- package/es/components/empty_prompt/empty_prompt.a11y.js +8 -14
- package/es/components/error_boundary/error_boundary.a11y.js +3 -1
- package/es/components/expression/expression.a11y.js +3 -1
- package/es/components/filter_group/filter_group.a11y.js +4 -3
- package/es/components/flyout/flyout.a11y.js +3 -1
- package/es/components/focus_trap/focus_trap.a11y.js +3 -1
- package/es/components/form/checkbox/checkbox_group.a11y.js +3 -1
- package/es/components/form/file_picker/file_picker.js +4 -2
- package/es/components/form/radio/radio_group.a11y.js +4 -5
- package/es/components/form/range/range.a11y.js +3 -1
- package/es/components/form/switch/switch.a11y.js +4 -5
- package/es/components/form/text_area/text_area.js +11 -3
- package/es/components/form/validatable_control/index.js +1 -1
- package/es/components/form/validatable_control/validatable_control.js +49 -13
- package/es/components/header/header.a11y.js +3 -1
- package/es/components/icon/icon_ML.a11y.js +3 -1
- package/es/components/icon/icon_apps.a11y.js +3 -1
- package/es/components/icon/icon_editor.a11y.js +3 -1
- package/es/components/icon/icon_elastic.a11y.js +3 -1
- package/es/components/icon/icon_glyphs.a11y.js +3 -1
- package/es/components/icon/icon_tokens.a11y.js +3 -1
- package/es/components/image/image.a11y.js +3 -1
- package/es/components/index.js +1 -0
- package/es/components/inline_edit/index.js +10 -0
- package/es/components/inline_edit/inline_edit.styles.js +15 -0
- package/es/components/inline_edit/inline_edit_form.js +190 -0
- package/es/components/inline_edit/inline_edit_text.js +97 -0
- package/es/components/inline_edit/inline_edit_title.js +105 -0
- package/es/components/key_pad_menu/key_pad_menu.a11y.js +3 -1
- package/es/components/modal/modal.a11y.js +3 -1
- package/es/components/notification/notification_event.a11y.js +3 -1
- package/es/components/page/page_header/page_header.a11y.js +3 -1
- package/es/components/pagination/pagination.a11y.js +3 -1
- package/es/components/popover/popover.a11y.js +3 -1
- package/es/components/popover/popover_footer.js +4 -4
- package/es/components/popover/popover_footer.styles.js +16 -5
- package/es/components/popover/popover_panel/_popover_panel.js +8 -5
- package/es/components/portal/portal.a11y.js +3 -1
- package/es/components/progress/progress.a11y.js +3 -1
- package/es/components/resizable_container/resizable_container.a11y.js +3 -1
- package/es/components/search_bar/search_bar.a11y.js +8 -7
- package/es/components/selectable/selectable.a11y.js +3 -1
- package/es/components/side_nav/side_nav.a11y.js +3 -1
- package/es/components/tabs/tabs.a11y.js +3 -1
- package/es/components/tree_view/tree_view.a11y.js +3 -1
- package/eui.d.ts +161 -37
- package/i18ntokens.json +40 -4
- package/lib/components/accordion/accordion.a11y.js +3 -1
- package/lib/components/accordion/accordion.js +4 -2
- package/lib/components/basic_table/table.a11y.js +3 -1
- package/lib/components/breadcrumbs/breadcrumbs.a11y.js +3 -1
- package/lib/components/combo_box/combo_box.js +2 -21
- package/lib/components/combo_box/combo_box_input/combo_box_input.js +66 -36
- package/lib/components/combo_box/combo_box_options_list/combo_box_options_list.js +1 -1
- package/lib/components/context_menu/context_menu_panel.a11y.js +3 -1
- package/lib/components/copy/copy.a11y.js +3 -4
- package/lib/components/date_picker/date_picker.js +147 -153
- package/lib/components/date_picker/date_picker_range.js +2 -2
- package/lib/components/delay_hide/delay_hide.a11y.js +6 -8
- package/lib/components/delay_render/delay_render.a11y.js +6 -8
- package/lib/components/drag_and_drop/drag_and_drop.a11y.js +0 -1
- package/lib/components/empty_prompt/empty_prompt.a11y.js +8 -14
- package/lib/components/error_boundary/error_boundary.a11y.js +3 -1
- package/lib/components/filter_group/filter_group.a11y.js +7 -8
- package/lib/components/form/file_picker/file_picker.js +4 -2
- package/lib/components/form/radio/radio_group.a11y.js +1 -4
- package/lib/components/form/switch/switch.a11y.js +1 -4
- package/lib/components/form/text_area/text_area.js +11 -3
- package/lib/components/form/validatable_control/index.js +6 -0
- package/lib/components/form/validatable_control/validatable_control.js +51 -14
- package/lib/components/icon/icon_ML.a11y.js +3 -1
- package/lib/components/icon/icon_apps.a11y.js +3 -1
- package/lib/components/icon/icon_editor.a11y.js +3 -1
- package/lib/components/icon/icon_elastic.a11y.js +3 -1
- package/lib/components/icon/icon_glyphs.a11y.js +3 -1
- package/lib/components/icon/icon_tokens.a11y.js +3 -1
- package/lib/components/image/image.a11y.js +3 -1
- package/lib/components/index.js +11 -0
- package/lib/components/inline_edit/index.js +19 -0
- package/lib/components/inline_edit/inline_edit.styles.js +22 -0
- package/lib/components/inline_edit/inline_edit_form.js +193 -0
- package/lib/components/inline_edit/inline_edit_text.js +97 -0
- package/lib/components/inline_edit/inline_edit_title.js +106 -0
- package/lib/components/page/page_header/page_header.a11y.js +3 -1
- package/lib/components/popover/popover_footer.js +4 -4
- package/lib/components/popover/popover_footer.styles.js +19 -7
- package/lib/components/popover/popover_panel/_popover_panel.js +7 -4
- package/lib/components/resizable_container/resizable_container.a11y.js +3 -1
- package/lib/components/search_bar/search_bar.a11y.js +5 -6
- package/lib/components/tree_view/tree_view.a11y.js +3 -1
- package/optimize/es/components/accordion/accordion.a11y.js +3 -1
- package/optimize/es/components/accordion/accordion.js +4 -2
- package/optimize/es/components/basic_table/table.a11y.js +3 -1
- package/optimize/es/components/breadcrumbs/breadcrumbs.a11y.js +3 -1
- package/optimize/es/components/card/card.a11y.js +3 -1
- package/optimize/es/components/color_picker/color_picker.a11y.js +3 -1
- package/optimize/es/components/combo_box/combo_box.a11y.js +3 -1
- package/optimize/es/components/combo_box/combo_box.js +2 -21
- package/optimize/es/components/combo_box/combo_box_input/combo_box_input.js +63 -34
- package/optimize/es/components/combo_box/combo_box_options_list/combo_box_options_list.js +1 -1
- package/optimize/es/components/context_menu/context_menu_panel.a11y.js +3 -1
- package/optimize/es/components/control_bar/control_bar.a11y.js +3 -1
- package/optimize/es/components/copy/copy.a11y.js +6 -5
- package/optimize/es/components/datagrid/data_grid.a11y.js +3 -1
- package/optimize/es/components/date_picker/date_picker.a11y.js +3 -1
- package/optimize/es/components/date_picker/date_picker.js +142 -148
- package/optimize/es/components/date_picker/date_picker_range.js +1 -1
- package/optimize/es/components/date_picker/super_date_picker/super_date_picker.a11y.js +3 -1
- package/optimize/es/components/delay_hide/delay_hide.a11y.js +9 -9
- package/optimize/es/components/delay_render/delay_render.a11y.js +9 -9
- package/optimize/es/components/drag_and_drop/drag_and_drop.a11y.js +3 -2
- package/optimize/es/components/empty_prompt/empty_prompt.a11y.js +8 -14
- package/optimize/es/components/error_boundary/error_boundary.a11y.js +3 -1
- package/optimize/es/components/expression/expression.a11y.js +3 -1
- package/optimize/es/components/filter_group/filter_group.a11y.js +4 -3
- package/optimize/es/components/flyout/flyout.a11y.js +3 -1
- package/optimize/es/components/focus_trap/focus_trap.a11y.js +3 -1
- package/optimize/es/components/form/checkbox/checkbox_group.a11y.js +3 -1
- package/optimize/es/components/form/file_picker/file_picker.js +4 -2
- package/optimize/es/components/form/radio/radio_group.a11y.js +4 -5
- package/optimize/es/components/form/range/range.a11y.js +3 -1
- package/optimize/es/components/form/switch/switch.a11y.js +4 -5
- package/optimize/es/components/form/text_area/text_area.js +10 -3
- package/optimize/es/components/form/validatable_control/index.js +1 -1
- package/optimize/es/components/form/validatable_control/validatable_control.js +49 -9
- package/optimize/es/components/header/header.a11y.js +3 -1
- package/optimize/es/components/icon/icon_ML.a11y.js +3 -1
- package/optimize/es/components/icon/icon_apps.a11y.js +3 -1
- package/optimize/es/components/icon/icon_editor.a11y.js +3 -1
- package/optimize/es/components/icon/icon_elastic.a11y.js +3 -1
- package/optimize/es/components/icon/icon_glyphs.a11y.js +3 -1
- package/optimize/es/components/icon/icon_tokens.a11y.js +3 -1
- package/optimize/es/components/image/image.a11y.js +3 -1
- package/optimize/es/components/index.js +1 -0
- package/optimize/es/components/inline_edit/index.js +10 -0
- package/optimize/es/components/inline_edit/inline_edit.styles.js +15 -0
- package/optimize/es/components/inline_edit/inline_edit_form.js +133 -0
- package/optimize/es/components/inline_edit/inline_edit_text.js +52 -0
- package/optimize/es/components/inline_edit/inline_edit_title.js +56 -0
- package/optimize/es/components/key_pad_menu/key_pad_menu.a11y.js +3 -1
- package/optimize/es/components/modal/modal.a11y.js +3 -1
- package/optimize/es/components/notification/notification_event.a11y.js +3 -1
- package/optimize/es/components/page/page_header/page_header.a11y.js +3 -1
- package/optimize/es/components/pagination/pagination.a11y.js +3 -1
- package/optimize/es/components/popover/popover.a11y.js +3 -1
- package/optimize/es/components/popover/popover_footer.js +4 -4
- package/optimize/es/components/popover/popover_footer.styles.js +16 -5
- package/optimize/es/components/popover/popover_panel/_popover_panel.js +8 -5
- package/optimize/es/components/portal/portal.a11y.js +3 -1
- package/optimize/es/components/progress/progress.a11y.js +3 -1
- package/optimize/es/components/resizable_container/resizable_container.a11y.js +3 -1
- package/optimize/es/components/search_bar/search_bar.a11y.js +8 -7
- package/optimize/es/components/selectable/selectable.a11y.js +3 -1
- package/optimize/es/components/side_nav/side_nav.a11y.js +3 -1
- package/optimize/es/components/tabs/tabs.a11y.js +3 -1
- package/optimize/es/components/tree_view/tree_view.a11y.js +3 -1
- package/optimize/lib/components/accordion/accordion.a11y.js +3 -1
- package/optimize/lib/components/accordion/accordion.js +4 -2
- package/optimize/lib/components/basic_table/table.a11y.js +3 -1
- package/optimize/lib/components/breadcrumbs/breadcrumbs.a11y.js +3 -1
- package/optimize/lib/components/card/card.a11y.js +3 -1
- package/optimize/lib/components/color_picker/color_picker.a11y.js +3 -1
- package/optimize/lib/components/combo_box/combo_box.a11y.js +3 -1
- package/optimize/lib/components/combo_box/combo_box.js +2 -21
- package/optimize/lib/components/combo_box/combo_box_input/combo_box_input.js +63 -34
- package/optimize/lib/components/combo_box/combo_box_options_list/combo_box_options_list.js +1 -1
- package/optimize/lib/components/context_menu/context_menu_panel.a11y.js +3 -1
- package/optimize/lib/components/control_bar/control_bar.a11y.js +3 -1
- package/optimize/lib/components/copy/copy.a11y.js +6 -5
- package/optimize/lib/components/datagrid/data_grid.a11y.js +3 -1
- package/optimize/lib/components/date_picker/date_picker.a11y.js +3 -1
- package/optimize/lib/components/date_picker/date_picker.js +141 -147
- package/optimize/lib/components/date_picker/date_picker_range.js +1 -1
- package/optimize/lib/components/date_picker/super_date_picker/super_date_picker.a11y.js +3 -1
- package/optimize/lib/components/delay_hide/delay_hide.a11y.js +9 -9
- package/optimize/lib/components/delay_render/delay_render.a11y.js +9 -9
- package/optimize/lib/components/drag_and_drop/drag_and_drop.a11y.js +3 -2
- package/optimize/lib/components/empty_prompt/empty_prompt.a11y.js +8 -14
- package/optimize/lib/components/error_boundary/error_boundary.a11y.js +3 -1
- package/optimize/lib/components/filter_group/filter_group.a11y.js +10 -9
- package/optimize/lib/components/focus_trap/focus_trap.a11y.js +3 -1
- package/optimize/lib/components/form/file_picker/file_picker.js +4 -2
- package/optimize/lib/components/form/radio/radio_group.a11y.js +4 -5
- package/optimize/lib/components/form/range/range.a11y.js +3 -1
- package/optimize/lib/components/form/switch/switch.a11y.js +4 -5
- package/optimize/lib/components/form/text_area/text_area.js +10 -3
- package/optimize/lib/components/form/validatable_control/index.js +6 -0
- package/optimize/lib/components/form/validatable_control/validatable_control.js +52 -12
- package/optimize/lib/components/header/header.a11y.js +3 -1
- package/optimize/lib/components/icon/icon_ML.a11y.js +3 -1
- package/optimize/lib/components/icon/icon_apps.a11y.js +3 -1
- package/optimize/lib/components/icon/icon_editor.a11y.js +3 -1
- package/optimize/lib/components/icon/icon_elastic.a11y.js +3 -1
- package/optimize/lib/components/icon/icon_glyphs.a11y.js +3 -1
- package/optimize/lib/components/icon/icon_tokens.a11y.js +3 -1
- package/optimize/lib/components/image/image.a11y.js +3 -1
- package/optimize/lib/components/index.js +11 -0
- package/optimize/lib/components/inline_edit/index.js +19 -0
- package/optimize/lib/components/inline_edit/inline_edit.styles.js +22 -0
- package/optimize/lib/components/inline_edit/inline_edit_form.js +144 -0
- package/optimize/lib/components/inline_edit/inline_edit_text.js +52 -0
- package/optimize/lib/components/inline_edit/inline_edit_title.js +57 -0
- package/optimize/lib/components/key_pad_menu/key_pad_menu.a11y.js +3 -1
- package/optimize/lib/components/modal/modal.a11y.js +3 -1
- package/optimize/lib/components/notification/notification_event.a11y.js +3 -1
- package/optimize/lib/components/page/page_header/page_header.a11y.js +3 -1
- package/optimize/lib/components/pagination/pagination.a11y.js +3 -1
- package/optimize/lib/components/popover/popover.a11y.js +3 -1
- package/optimize/lib/components/popover/popover_footer.js +4 -4
- package/optimize/lib/components/popover/popover_footer.styles.js +19 -7
- package/optimize/lib/components/popover/popover_panel/_popover_panel.js +7 -4
- package/optimize/lib/components/portal/portal.a11y.js +3 -1
- package/optimize/lib/components/progress/progress.a11y.js +3 -1
- package/optimize/lib/components/resizable_container/resizable_container.a11y.js +3 -1
- package/optimize/lib/components/search_bar/search_bar.a11y.js +8 -7
- package/optimize/lib/components/selectable/selectable.a11y.js +3 -1
- package/optimize/lib/components/side_nav/side_nav.a11y.js +3 -1
- package/optimize/lib/components/tree_view/tree_view.a11y.js +3 -1
- package/package.json +1 -1
- package/src/components/combo_box/_combo_box.scss +2 -38
- package/src/components/date_picker/_date_picker_range.scss +1 -1
- package/src/components/form/field_text/_field_text.scss +0 -7
- package/src/components/form/file_picker/_file_picker.scss +3 -2
- package/src/components/form/form_control_layout/_form_control_layout.scss +7 -2
- package/src/components/form/text_area/_text_area.scss +9 -0
- package/test-env/components/accordion/accordion.a11y.js +3 -1
- package/test-env/components/accordion/accordion.js +4 -2
- package/test-env/components/basic_table/table.a11y.js +3 -1
- package/test-env/components/breadcrumbs/breadcrumbs.a11y.js +3 -1
- package/test-env/components/card/card.a11y.js +3 -1
- package/test-env/components/color_picker/color_picker.a11y.js +3 -1
- package/test-env/components/combo_box/combo_box.a11y.js +3 -1
- package/test-env/components/combo_box/combo_box.js +2 -21
- package/test-env/components/combo_box/combo_box_input/combo_box_input.js +66 -36
- package/test-env/components/combo_box/combo_box_options_list/combo_box_options_list.js +1 -1
- package/test-env/components/context_menu/context_menu_panel.a11y.js +3 -1
- package/test-env/components/control_bar/control_bar.a11y.js +3 -1
- package/test-env/components/copy/copy.a11y.js +6 -5
- package/test-env/components/datagrid/data_grid.a11y.js +3 -1
- package/test-env/components/date_picker/date_picker.a11y.js +3 -1
- package/test-env/components/date_picker/date_picker.js +141 -147
- package/test-env/components/date_picker/date_picker_range.js +2 -2
- package/test-env/components/date_picker/super_date_picker/super_date_picker.a11y.js +3 -1
- package/test-env/components/delay_hide/delay_hide.a11y.js +9 -9
- package/test-env/components/delay_render/delay_render.a11y.js +9 -9
- package/test-env/components/drag_and_drop/drag_and_drop.a11y.js +3 -2
- package/test-env/components/empty_prompt/empty_prompt.a11y.js +8 -14
- package/test-env/components/error_boundary/error_boundary.a11y.js +3 -1
- package/test-env/components/filter_group/filter_group.a11y.js +10 -9
- package/test-env/components/focus_trap/focus_trap.a11y.js +3 -1
- package/test-env/components/form/file_picker/file_picker.js +4 -2
- package/test-env/components/form/radio/radio_group.a11y.js +4 -5
- package/test-env/components/form/range/range.a11y.js +3 -1
- package/test-env/components/form/switch/switch.a11y.js +4 -5
- package/test-env/components/form/text_area/text_area.js +11 -3
- package/test-env/components/form/validatable_control/index.js +6 -0
- package/test-env/components/form/validatable_control/validatable_control.js +51 -14
- package/test-env/components/header/header.a11y.js +3 -1
- package/test-env/components/icon/icon_ML.a11y.js +3 -1
- package/test-env/components/icon/icon_apps.a11y.js +3 -1
- package/test-env/components/icon/icon_editor.a11y.js +3 -1
- package/test-env/components/icon/icon_elastic.a11y.js +3 -1
- package/test-env/components/icon/icon_glyphs.a11y.js +3 -1
- package/test-env/components/icon/icon_tokens.a11y.js +3 -1
- package/test-env/components/image/image.a11y.js +3 -1
- package/test-env/components/index.js +11 -0
- package/test-env/components/inline_edit/index.js +19 -0
- package/test-env/components/inline_edit/inline_edit.styles.js +22 -0
- package/test-env/components/inline_edit/inline_edit_form.js +196 -0
- package/test-env/components/inline_edit/inline_edit_text.js +96 -0
- package/test-env/components/inline_edit/inline_edit_title.js +105 -0
- package/test-env/components/key_pad_menu/key_pad_menu.a11y.js +3 -1
- package/test-env/components/modal/modal.a11y.js +3 -1
- package/test-env/components/notification/notification_event.a11y.js +3 -1
- package/test-env/components/page/page_header/page_header.a11y.js +3 -1
- package/test-env/components/pagination/pagination.a11y.js +3 -1
- package/test-env/components/popover/popover.a11y.js +3 -1
- package/test-env/components/popover/popover_footer.js +4 -4
- package/test-env/components/popover/popover_footer.styles.js +19 -7
- package/test-env/components/popover/popover_panel/_popover_panel.js +7 -4
- package/test-env/components/portal/portal.a11y.js +3 -1
- package/test-env/components/progress/progress.a11y.js +3 -1
- package/test-env/components/resizable_container/resizable_container.a11y.js +3 -1
- package/test-env/components/search_bar/search_bar.a11y.js +8 -7
- package/test-env/components/selectable/selectable.a11y.js +3 -1
- package/test-env/components/side_nav/side_nav.a11y.js +3 -1
- package/test-env/components/tree_view/tree_view.a11y.js +3 -1
|
@@ -0,0 +1,133 @@
|
|
|
1
|
+
import _extends from "@babel/runtime/helpers/extends";
|
|
2
|
+
import _slicedToArray from "@babel/runtime/helpers/slicedToArray";
|
|
3
|
+
/*
|
|
4
|
+
* Copyright Elasticsearch B.V. and/or licensed to Elasticsearch B.V. under one
|
|
5
|
+
* or more contributor license agreements. Licensed under the Elastic License
|
|
6
|
+
* 2.0 and the Server Side Public License, v 1; you may not use this file except
|
|
7
|
+
* in compliance with, at your election, the Elastic License 2.0 or the Server
|
|
8
|
+
* Side Public License, v 1.
|
|
9
|
+
*/
|
|
10
|
+
|
|
11
|
+
import React, { useState } from 'react';
|
|
12
|
+
import classNames from 'classnames';
|
|
13
|
+
import { EuiFormRow, EuiFieldText, EuiForm } from '../form';
|
|
14
|
+
import { EuiButtonIcon, EuiButtonEmpty } from '../button';
|
|
15
|
+
import { EuiFlexGroup, EuiFlexItem } from '../flex';
|
|
16
|
+
import { useEuiI18n } from '../i18n';
|
|
17
|
+
import { useGeneratedHtmlId } from '../../services/accessibility';
|
|
18
|
+
|
|
19
|
+
// Props shared between the internal form component as well as consumer-facing components
|
|
20
|
+
import { jsx as ___EmotionJSX } from "@emotion/react";
|
|
21
|
+
export var SMALL_SIZE_FORM = {
|
|
22
|
+
iconSize: 's',
|
|
23
|
+
compressed: true,
|
|
24
|
+
buttonSize: 's'
|
|
25
|
+
};
|
|
26
|
+
export var MEDIUM_SIZE_FORM = {
|
|
27
|
+
iconSize: 'm',
|
|
28
|
+
compressed: false,
|
|
29
|
+
buttonSize: 'm'
|
|
30
|
+
};
|
|
31
|
+
export var EuiInlineEditForm = function EuiInlineEditForm(_ref) {
|
|
32
|
+
var className = _ref.className,
|
|
33
|
+
children = _ref.children,
|
|
34
|
+
sizes = _ref.sizes,
|
|
35
|
+
defaultValue = _ref.defaultValue,
|
|
36
|
+
onConfirm = _ref.onConfirm,
|
|
37
|
+
inputAriaLabel = _ref.inputAriaLabel,
|
|
38
|
+
saveButtonAriaLabel = _ref.saveButtonAriaLabel,
|
|
39
|
+
cancelButtonAriaLabel = _ref.cancelButtonAriaLabel,
|
|
40
|
+
startWithEditOpen = _ref.startWithEditOpen,
|
|
41
|
+
readModeProps = _ref.readModeProps,
|
|
42
|
+
editModeProps = _ref.editModeProps;
|
|
43
|
+
var classes = classNames('euiInlineEdit', className);
|
|
44
|
+
|
|
45
|
+
// Styles to come later! (Styling editMode text to match the size of its readMode counterpart)
|
|
46
|
+
/*const theme = useEuiTheme();
|
|
47
|
+
const styles = euiInlineEditStyles(theme);
|
|
48
|
+
const cssStyles = [styles.euiInlineEdit];*/
|
|
49
|
+
|
|
50
|
+
var defaultSaveButtonAriaLabel = useEuiI18n('euiInlineEditForm.saveButtonAriaLabel', 'Save edit');
|
|
51
|
+
var defaultCancelButtonAriaLabel = useEuiI18n('euiInlineEditForm.cancelButtonAriaLabel', 'Cancel edit');
|
|
52
|
+
var _useState = useState(false || startWithEditOpen),
|
|
53
|
+
_useState2 = _slicedToArray(_useState, 2),
|
|
54
|
+
isEditing = _useState2[0],
|
|
55
|
+
setIsEditing = _useState2[1];
|
|
56
|
+
var inlineEditInputId = useGeneratedHtmlId({
|
|
57
|
+
prefix: '__inlineEditInput'
|
|
58
|
+
});
|
|
59
|
+
var _useState3 = useState(defaultValue),
|
|
60
|
+
_useState4 = _slicedToArray(_useState3, 2),
|
|
61
|
+
editModeValue = _useState4[0],
|
|
62
|
+
setEditModeValue = _useState4[1];
|
|
63
|
+
var _useState5 = useState(defaultValue),
|
|
64
|
+
_useState6 = _slicedToArray(_useState5, 2),
|
|
65
|
+
readModeValue = _useState6[0],
|
|
66
|
+
setReadModeValue = _useState6[1];
|
|
67
|
+
var cancelInlineEdit = function cancelInlineEdit() {
|
|
68
|
+
setEditModeValue(readModeValue);
|
|
69
|
+
setIsEditing(!isEditing);
|
|
70
|
+
};
|
|
71
|
+
var saveInlineEditValue = function saveInlineEditValue() {
|
|
72
|
+
if (editModeValue && onConfirm && !onConfirm()) {
|
|
73
|
+
// If there is text, an onConfirm method is present, and it has returned false, cancel the action
|
|
74
|
+
return;
|
|
75
|
+
} else if (editModeValue) {
|
|
76
|
+
setReadModeValue(editModeValue);
|
|
77
|
+
setIsEditing(!isEditing);
|
|
78
|
+
} else {
|
|
79
|
+
// If there's no text, cancel the action, reset the input text, and return to readMode
|
|
80
|
+
cancelInlineEdit();
|
|
81
|
+
}
|
|
82
|
+
};
|
|
83
|
+
var editModeForm = ___EmotionJSX(EuiForm, {
|
|
84
|
+
fullWidth: true
|
|
85
|
+
}, ___EmotionJSX(EuiFlexGroup, {
|
|
86
|
+
gutterSize: "s"
|
|
87
|
+
}, ___EmotionJSX(EuiFlexItem, null, ___EmotionJSX(EuiFieldText, _extends({
|
|
88
|
+
id: inlineEditInputId,
|
|
89
|
+
value: editModeValue,
|
|
90
|
+
onChange: function onChange(e) {
|
|
91
|
+
setEditModeValue(e.target.value);
|
|
92
|
+
},
|
|
93
|
+
"aria-label": inputAriaLabel,
|
|
94
|
+
autoFocus: true,
|
|
95
|
+
compressed: sizes.compressed
|
|
96
|
+
}, editModeProps))), ___EmotionJSX(EuiFlexItem, {
|
|
97
|
+
grow: false,
|
|
98
|
+
className: classes
|
|
99
|
+
}, ___EmotionJSX(EuiFormRow, null, ___EmotionJSX(EuiButtonIcon, {
|
|
100
|
+
iconType: "check",
|
|
101
|
+
"aria-label": saveButtonAriaLabel || defaultSaveButtonAriaLabel,
|
|
102
|
+
onClick: saveInlineEditValue,
|
|
103
|
+
color: "success",
|
|
104
|
+
display: "base",
|
|
105
|
+
size: sizes.buttonSize,
|
|
106
|
+
iconSize: sizes.iconSize
|
|
107
|
+
}))), ___EmotionJSX(EuiFlexItem, {
|
|
108
|
+
grow: false
|
|
109
|
+
}, ___EmotionJSX(EuiFormRow, null, ___EmotionJSX(EuiButtonIcon, {
|
|
110
|
+
iconType: "cross",
|
|
111
|
+
"aria-label": cancelButtonAriaLabel || defaultCancelButtonAriaLabel,
|
|
112
|
+
onClick: cancelInlineEdit,
|
|
113
|
+
color: "danger",
|
|
114
|
+
display: "base",
|
|
115
|
+
size: sizes.buttonSize,
|
|
116
|
+
iconSize: sizes.iconSize
|
|
117
|
+
})))));
|
|
118
|
+
var readModeElement = ___EmotionJSX(EuiButtonEmpty, _extends({
|
|
119
|
+
color: "text",
|
|
120
|
+
iconType: "pencil",
|
|
121
|
+
iconSide: "right",
|
|
122
|
+
autoFocus: true,
|
|
123
|
+
flush: "both",
|
|
124
|
+
iconSize: sizes.iconSize,
|
|
125
|
+
size: sizes.buttonSize,
|
|
126
|
+
onClick: function onClick() {
|
|
127
|
+
setIsEditing(!isEditing);
|
|
128
|
+
}
|
|
129
|
+
}, readModeProps), children(readModeValue));
|
|
130
|
+
return ___EmotionJSX("div", {
|
|
131
|
+
className: classes
|
|
132
|
+
}, isEditing ? editModeForm : readModeElement);
|
|
133
|
+
};
|
|
@@ -0,0 +1,52 @@
|
|
|
1
|
+
import _extends from "@babel/runtime/helpers/extends";
|
|
2
|
+
import _objectWithoutProperties from "@babel/runtime/helpers/objectWithoutProperties";
|
|
3
|
+
var _excluded = ["children", "className", "size", "defaultValue", "onConfirm", "inputAriaLabel", "saveButtonAriaLabel", "cancelButtonAriaLabel", "startWithEditOpen", "readModeProps", "editModeProps"];
|
|
4
|
+
/*
|
|
5
|
+
* Copyright Elasticsearch B.V. and/or licensed to Elasticsearch B.V. under one
|
|
6
|
+
* or more contributor license agreements. Licensed under the Elastic License
|
|
7
|
+
* 2.0 and the Server Side Public License, v 1; you may not use this file except
|
|
8
|
+
* in compliance with, at your election, the Elastic License 2.0 or the Server
|
|
9
|
+
* Side Public License, v 1.
|
|
10
|
+
*/
|
|
11
|
+
|
|
12
|
+
import React from 'react';
|
|
13
|
+
import classNames from 'classnames';
|
|
14
|
+
import { EuiText } from '../text';
|
|
15
|
+
import { EuiInlineEditForm, SMALL_SIZE_FORM, MEDIUM_SIZE_FORM } from './inline_edit_form';
|
|
16
|
+
import { jsx as ___EmotionJSX } from "@emotion/react";
|
|
17
|
+
export var EuiInlineEditText = function EuiInlineEditText(_ref) {
|
|
18
|
+
var children = _ref.children,
|
|
19
|
+
className = _ref.className,
|
|
20
|
+
_ref$size = _ref.size,
|
|
21
|
+
size = _ref$size === void 0 ? 'm' : _ref$size,
|
|
22
|
+
defaultValue = _ref.defaultValue,
|
|
23
|
+
onConfirm = _ref.onConfirm,
|
|
24
|
+
inputAriaLabel = _ref.inputAriaLabel,
|
|
25
|
+
saveButtonAriaLabel = _ref.saveButtonAriaLabel,
|
|
26
|
+
cancelButtonAriaLabel = _ref.cancelButtonAriaLabel,
|
|
27
|
+
startWithEditOpen = _ref.startWithEditOpen,
|
|
28
|
+
readModeProps = _ref.readModeProps,
|
|
29
|
+
editModeProps = _ref.editModeProps,
|
|
30
|
+
rest = _objectWithoutProperties(_ref, _excluded);
|
|
31
|
+
var classes = classNames('euiInlineEditText', className);
|
|
32
|
+
var isSmallSize = ['xs', 's'].includes(size);
|
|
33
|
+
var sizes = isSmallSize ? SMALL_SIZE_FORM : MEDIUM_SIZE_FORM;
|
|
34
|
+
var formProps = {
|
|
35
|
+
sizes: sizes,
|
|
36
|
+
defaultValue: defaultValue,
|
|
37
|
+
onConfirm: onConfirm,
|
|
38
|
+
inputAriaLabel: inputAriaLabel,
|
|
39
|
+
saveButtonAriaLabel: saveButtonAriaLabel,
|
|
40
|
+
cancelButtonAriaLabel: cancelButtonAriaLabel,
|
|
41
|
+
startWithEditOpen: startWithEditOpen,
|
|
42
|
+
readModeProps: readModeProps,
|
|
43
|
+
editModeProps: editModeProps
|
|
44
|
+
};
|
|
45
|
+
return ___EmotionJSX(EuiInlineEditForm, _extends({
|
|
46
|
+
className: classes
|
|
47
|
+
}, rest, formProps), function (textReadModeValue) {
|
|
48
|
+
return ___EmotionJSX(EuiText, {
|
|
49
|
+
size: size
|
|
50
|
+
}, textReadModeValue);
|
|
51
|
+
});
|
|
52
|
+
};
|
|
@@ -0,0 +1,56 @@
|
|
|
1
|
+
import _extends from "@babel/runtime/helpers/extends";
|
|
2
|
+
import _objectWithoutProperties from "@babel/runtime/helpers/objectWithoutProperties";
|
|
3
|
+
var _excluded = ["children", "className", "size", "heading", "defaultValue", "onConfirm", "inputAriaLabel", "saveButtonAriaLabel", "cancelButtonAriaLabel", "startWithEditOpen", "readModeProps", "editModeProps"];
|
|
4
|
+
/*
|
|
5
|
+
* Copyright Elasticsearch B.V. and/or licensed to Elasticsearch B.V. under one
|
|
6
|
+
* or more contributor license agreements. Licensed under the Elastic License
|
|
7
|
+
* 2.0 and the Server Side Public License, v 1; you may not use this file except
|
|
8
|
+
* in compliance with, at your election, the Elastic License 2.0 or the Server
|
|
9
|
+
* Side Public License, v 1.
|
|
10
|
+
*/
|
|
11
|
+
|
|
12
|
+
import React from 'react';
|
|
13
|
+
import classNames from 'classnames';
|
|
14
|
+
import { EuiTitle } from '../title';
|
|
15
|
+
import { EuiInlineEditForm, SMALL_SIZE_FORM, MEDIUM_SIZE_FORM } from './inline_edit_form';
|
|
16
|
+
import { jsx as ___EmotionJSX } from "@emotion/react";
|
|
17
|
+
export var HEADINGS = ['h1', 'h2', 'h3', 'h4', 'h5', 'h6'];
|
|
18
|
+
export var EuiInlineEditTitle = function EuiInlineEditTitle(_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
|
+
heading = _ref.heading,
|
|
24
|
+
defaultValue = _ref.defaultValue,
|
|
25
|
+
onConfirm = _ref.onConfirm,
|
|
26
|
+
inputAriaLabel = _ref.inputAriaLabel,
|
|
27
|
+
saveButtonAriaLabel = _ref.saveButtonAriaLabel,
|
|
28
|
+
cancelButtonAriaLabel = _ref.cancelButtonAriaLabel,
|
|
29
|
+
_ref$startWithEditOpe = _ref.startWithEditOpen,
|
|
30
|
+
startWithEditOpen = _ref$startWithEditOpe === void 0 ? false : _ref$startWithEditOpe,
|
|
31
|
+
readModeProps = _ref.readModeProps,
|
|
32
|
+
editModeProps = _ref.editModeProps,
|
|
33
|
+
rest = _objectWithoutProperties(_ref, _excluded);
|
|
34
|
+
var classes = classNames('euiInlineEditTitle', className);
|
|
35
|
+
var H = heading;
|
|
36
|
+
var isSmallSize = ['xxxs', 'xxs', 'xs', 's'].includes(size);
|
|
37
|
+
var sizes = isSmallSize ? SMALL_SIZE_FORM : MEDIUM_SIZE_FORM;
|
|
38
|
+
var formProps = {
|
|
39
|
+
sizes: sizes,
|
|
40
|
+
defaultValue: defaultValue,
|
|
41
|
+
onConfirm: onConfirm,
|
|
42
|
+
inputAriaLabel: inputAriaLabel,
|
|
43
|
+
saveButtonAriaLabel: saveButtonAriaLabel,
|
|
44
|
+
cancelButtonAriaLabel: cancelButtonAriaLabel,
|
|
45
|
+
startWithEditOpen: startWithEditOpen,
|
|
46
|
+
readModeProps: readModeProps,
|
|
47
|
+
editModeProps: editModeProps
|
|
48
|
+
};
|
|
49
|
+
return ___EmotionJSX(EuiInlineEditForm, _extends({
|
|
50
|
+
className: classes
|
|
51
|
+
}, rest, formProps), function (titleReadModeValue) {
|
|
52
|
+
return ___EmotionJSX(EuiTitle, {
|
|
53
|
+
size: size
|
|
54
|
+
}, ___EmotionJSX(H, null, titleReadModeValue));
|
|
55
|
+
});
|
|
56
|
+
};
|
|
@@ -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="
|
|
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 { EuiKeyPadMenu } from './key_pad_menu';
|
|
@@ -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="
|
|
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 { EuiModal, EuiModalHeader, EuiModalHeaderTitle, EuiModalBody, EuiModalFooter } from './index';
|
|
@@ -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="
|
|
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 { EuiContextMenuItem } from '../context_menu';
|
|
@@ -6,7 +6,9 @@
|
|
|
6
6
|
* Side Public License, v 1.
|
|
7
7
|
*/
|
|
8
8
|
|
|
9
|
-
/// <reference types="
|
|
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';
|
|
@@ -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="
|
|
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 { EuiPagination } from './pagination';
|
|
@@ -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="
|
|
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 { EuiPopover } from './popover';
|
|
@@ -24,11 +24,11 @@ export var EuiPopoverFooter = function EuiPopoverFooter(_ref) {
|
|
|
24
24
|
var _useContext = useContext(EuiPopoverPanelContext),
|
|
25
25
|
panelPadding = _useContext.paddingSize;
|
|
26
26
|
var euiTheme = useEuiTheme();
|
|
27
|
-
var styles = euiPopoverFooterStyles(euiTheme
|
|
27
|
+
var styles = euiPopoverFooterStyles(euiTheme);
|
|
28
28
|
var paddingStyles = useEuiPaddingCSS();
|
|
29
|
-
var cssStyles = [styles.euiPopoverFooter,
|
|
30
|
-
|
|
31
|
-
|
|
29
|
+
var cssStyles = [styles.euiPopoverFooter, styles.panelPaddingSizes[panelPadding], paddingStyles[paddingSize || panelPadding] // If a paddingSize is not directly provided, inherit from the EuiPopoverPanel
|
|
30
|
+
];
|
|
31
|
+
|
|
32
32
|
var classes = classNames('euiPopoverFooter', className);
|
|
33
33
|
return ___EmotionJSX("div", _extends({
|
|
34
34
|
css: cssStyles,
|
|
@@ -8,13 +8,24 @@
|
|
|
8
8
|
|
|
9
9
|
import { css } from '@emotion/react';
|
|
10
10
|
import { euiFontSize, euiPaddingSize, logicalCSS, logicalShorthandCSS } from '../../global_styling';
|
|
11
|
-
export var euiPopoverFooterStyles = function euiPopoverFooterStyles(euiThemeContext
|
|
11
|
+
export var euiPopoverFooterStyles = function euiPopoverFooterStyles(euiThemeContext) {
|
|
12
12
|
var euiTheme = euiThemeContext.euiTheme;
|
|
13
|
-
// If the popover's containing panel has padding applied,
|
|
14
|
-
// ensure the title expands to cover that padding and
|
|
15
|
-
var panelPaddingSize = euiPaddingSize(euiThemeContext, panelPadding);
|
|
16
13
|
return {
|
|
17
14
|
// Base
|
|
18
|
-
euiPopoverFooter: /*#__PURE__*/css(euiFontSize(euiThemeContext, 's'), ";", logicalCSS('border-top', euiTheme.border.thin), "
|
|
15
|
+
euiPopoverFooter: /*#__PURE__*/css(euiFontSize(euiThemeContext, 's'), ";", logicalCSS('border-top', euiTheme.border.thin), ";;label:euiPopoverFooter;"),
|
|
16
|
+
// If the popover's containing panel has padding applied,
|
|
17
|
+
// ensure the title expands to cover that padding via negative margins
|
|
18
|
+
panelPaddingSizes: {
|
|
19
|
+
none: /*#__PURE__*/css(";label:none;"),
|
|
20
|
+
xs: /*#__PURE__*/css(panelPaddingOffset(euiThemeContext, 'xs'), ";;label:xs;"),
|
|
21
|
+
s: /*#__PURE__*/css(panelPaddingOffset(euiThemeContext, 's'), ";;label:s;"),
|
|
22
|
+
m: /*#__PURE__*/css(panelPaddingOffset(euiThemeContext, 'm'), ";;label:m;"),
|
|
23
|
+
l: /*#__PURE__*/css(panelPaddingOffset(euiThemeContext, 'l'), ";;label:l;"),
|
|
24
|
+
xl: /*#__PURE__*/css(panelPaddingOffset(euiThemeContext, 'xl'), ";;label:xl;")
|
|
25
|
+
}
|
|
19
26
|
};
|
|
27
|
+
};
|
|
28
|
+
export var panelPaddingOffset = function panelPaddingOffset(euiThemeContext, size) {
|
|
29
|
+
var panelPaddingSize = euiPaddingSize(euiThemeContext, size);
|
|
30
|
+
return logicalShorthandCSS('margin', "".concat(panelPaddingSize, " -").concat(panelPaddingSize, " -").concat(panelPaddingSize));
|
|
20
31
|
};
|
|
@@ -10,14 +10,15 @@ var _excluded = ["children", "className", "isOpen", "isAttached", "hasDragDrop",
|
|
|
10
10
|
* Side Public License, v 1.
|
|
11
11
|
*/
|
|
12
12
|
|
|
13
|
-
import React, { createContext
|
|
13
|
+
import React, { createContext } from 'react';
|
|
14
14
|
import classNames from 'classnames';
|
|
15
15
|
import { useEuiTheme } from '../../../services';
|
|
16
16
|
import { EuiPanel } from '../../panel/panel';
|
|
17
17
|
import { euiPopoverPanelStyles } from './_popover_panel.styles';
|
|
18
18
|
import { jsx as ___EmotionJSX } from "@emotion/react";
|
|
19
|
+
var DEFAULT_PANEL_PADDING_SIZE = 'l';
|
|
19
20
|
export var EuiPopoverPanelContext = /*#__PURE__*/createContext({
|
|
20
|
-
paddingSize:
|
|
21
|
+
paddingSize: DEFAULT_PANEL_PADDING_SIZE
|
|
21
22
|
});
|
|
22
23
|
/**
|
|
23
24
|
* *INTERNAL ONLY*
|
|
@@ -31,8 +32,8 @@ export var EuiPopoverPanel = function EuiPopoverPanel(_ref) {
|
|
|
31
32
|
hasDragDrop = _ref.hasDragDrop,
|
|
32
33
|
position = _ref.position,
|
|
33
34
|
rest = _objectWithoutProperties(_ref, _excluded);
|
|
34
|
-
var
|
|
35
|
-
|
|
35
|
+
var _rest$paddingSize = rest.paddingSize,
|
|
36
|
+
paddingSize = _rest$paddingSize === void 0 ? DEFAULT_PANEL_PADDING_SIZE : _rest$paddingSize;
|
|
36
37
|
var euiThemeContext = useEuiTheme();
|
|
37
38
|
// Using BEM child class for BWC
|
|
38
39
|
var classes = classNames('euiPopover__panel', className);
|
|
@@ -45,7 +46,9 @@ export var EuiPopoverPanel = function EuiPopoverPanel(_ref) {
|
|
|
45
46
|
panelCSS = [].concat(_toConsumableArray(panelCSS), [styles.hasDragDrop.hasDragDrop, position && styles.hasDragDrop[position]]);
|
|
46
47
|
}
|
|
47
48
|
return ___EmotionJSX(EuiPopoverPanelContext.Provider, {
|
|
48
|
-
value:
|
|
49
|
+
value: {
|
|
50
|
+
paddingSize: paddingSize
|
|
51
|
+
}
|
|
49
52
|
}, ___EmotionJSX(EuiPanel, _extends({
|
|
50
53
|
className: classes,
|
|
51
54
|
css: panelCSS,
|
|
@@ -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="
|
|
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 { EuiButton } from '../button';
|
|
@@ -7,7 +7,9 @@ import _extends from "@babel/runtime/helpers/extends";
|
|
|
7
7
|
* Side Public License, v 1.
|
|
8
8
|
*/
|
|
9
9
|
|
|
10
|
-
/// <reference types="
|
|
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 { EuiProgress } from './progress';
|
|
@@ -6,7 +6,9 @@
|
|
|
6
6
|
* Side Public License, v 1.
|
|
7
7
|
*/
|
|
8
8
|
|
|
9
|
-
/// <reference types="
|
|
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 { EuiResizableContainer } from './resizable_container';
|
|
@@ -7,14 +7,16 @@ import _slicedToArray from "@babel/runtime/helpers/slicedToArray";
|
|
|
7
7
|
* Side Public License, v 1.
|
|
8
8
|
*/
|
|
9
9
|
|
|
10
|
-
/// <reference types="
|
|
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 { EuiBasicTable } from '../basic_table';
|
|
14
16
|
import { EuiFlexGroup, EuiFlexItem } from '../flex';
|
|
15
17
|
import { EuiHealth } from '../health';
|
|
16
|
-
import { EuiSearchBar } from './search_bar';
|
|
17
18
|
import { EuiSpacer } from '../spacer';
|
|
19
|
+
import { EuiSearchBar } from './search_bar';
|
|
18
20
|
import { jsx as ___EmotionJSX } from "@emotion/react";
|
|
19
21
|
var tags = [{
|
|
20
22
|
name: 'marketing',
|
|
@@ -76,10 +78,6 @@ export var SearchBar = function SearchBar() {
|
|
|
76
78
|
_useState2 = _slicedToArray(_useState, 2),
|
|
77
79
|
query = _useState2[0],
|
|
78
80
|
setQuery = _useState2[1];
|
|
79
|
-
var onChange = function onChange(_ref) {
|
|
80
|
-
var query = _ref.query;
|
|
81
|
-
return setQuery(query);
|
|
82
|
-
};
|
|
83
81
|
var renderSearch = function renderSearch() {
|
|
84
82
|
var filters = [{
|
|
85
83
|
type: 'field_value_toggle_group',
|
|
@@ -125,7 +123,10 @@ export var SearchBar = function SearchBar() {
|
|
|
125
123
|
schema: schema
|
|
126
124
|
},
|
|
127
125
|
filters: filters,
|
|
128
|
-
onChange: onChange
|
|
126
|
+
onChange: function onChange(_ref) {
|
|
127
|
+
var query = _ref.query;
|
|
128
|
+
if (query) setQuery(query);
|
|
129
|
+
}
|
|
129
130
|
});
|
|
130
131
|
};
|
|
131
132
|
var renderTable = function renderTable() {
|
|
@@ -8,7 +8,9 @@ import _extends from "@babel/runtime/helpers/extends";
|
|
|
8
8
|
* Side Public License, v 1.
|
|
9
9
|
*/
|
|
10
10
|
|
|
11
|
-
/// <reference types="
|
|
11
|
+
/// <reference types="cypress" />
|
|
12
|
+
/// <reference types="cypress-real-events" />
|
|
13
|
+
/// <reference types="../../../cypress/support" />
|
|
12
14
|
|
|
13
15
|
import React, { useState } from 'react';
|
|
14
16
|
import { EuiButton } 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="
|
|
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 { EuiSideNav } from './side_nav';
|
|
@@ -9,7 +9,9 @@ function _objectSpread(target) { for (var i = 1; i < arguments.length; i++) { va
|
|
|
9
9
|
* Side Public License, v 1.
|
|
10
10
|
*/
|
|
11
11
|
|
|
12
|
-
/// <reference types="
|
|
12
|
+
/// <reference types="cypress" />
|
|
13
|
+
/// <reference types="cypress-real-events" />
|
|
14
|
+
/// <reference types="../../../cypress/support" />
|
|
13
15
|
|
|
14
16
|
import React from 'react';
|
|
15
17
|
import { EuiTabbedContent } from './tabbed_content';
|
|
@@ -6,7 +6,9 @@
|
|
|
6
6
|
* Side Public License, v 1.
|
|
7
7
|
*/
|
|
8
8
|
|
|
9
|
-
/// <reference types="
|
|
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 { EuiTreeView } from './tree_view';
|
|
@@ -14,7 +14,9 @@ var _react2 = require("@emotion/react");
|
|
|
14
14
|
* Side Public License, v 1.
|
|
15
15
|
*/
|
|
16
16
|
|
|
17
|
-
/// <reference types="
|
|
17
|
+
/// <reference types="cypress" />
|
|
18
|
+
/// <reference types="cypress-real-events" />
|
|
19
|
+
/// <reference types="../../../cypress/support" />
|
|
18
20
|
|
|
19
21
|
var baseProps = {
|
|
20
22
|
buttonContent: 'Click me to toggle',
|
|
@@ -212,8 +212,10 @@ var EuiAccordionClass = /*#__PURE__*/function (_Component) {
|
|
|
212
212
|
}, buttonProps, {
|
|
213
213
|
id: buttonId,
|
|
214
214
|
className: buttonClasses,
|
|
215
|
-
"aria-controls": id
|
|
216
|
-
|
|
215
|
+
"aria-controls": id
|
|
216
|
+
// `aria-expanded` is only a valid attribute on interactive controls - axe-core throws a violation otherwise
|
|
217
|
+
,
|
|
218
|
+
"aria-expanded": ButtonElement === 'button' ? isOpen : undefined,
|
|
217
219
|
onClick: isDisabled ? undefined : this.onToggle,
|
|
218
220
|
type: ButtonElement === 'button' ? 'button' : undefined,
|
|
219
221
|
disabled: ButtonElement === 'button' ? isDisabled : undefined
|
|
@@ -16,7 +16,9 @@ var _react2 = require("@emotion/react");
|
|
|
16
16
|
* Side Public License, v 1.
|
|
17
17
|
*/
|
|
18
18
|
|
|
19
|
-
/// <reference types="
|
|
19
|
+
/// <reference types="cypress" />
|
|
20
|
+
/// <reference types="cypress-real-events" />
|
|
21
|
+
/// <reference types="../../../cypress/support" />
|
|
20
22
|
|
|
21
23
|
var users = [];
|
|
22
24
|
for (var i = 0; i < 20; i++) {
|
|
@@ -12,7 +12,9 @@ var _react2 = require("@emotion/react");
|
|
|
12
12
|
* Side Public License, v 1.
|
|
13
13
|
*/
|
|
14
14
|
|
|
15
|
-
/// <reference types="
|
|
15
|
+
/// <reference types="cypress" />
|
|
16
|
+
/// <reference types="cypress-real-events" />
|
|
17
|
+
/// <reference types="../../../cypress/support" />
|
|
16
18
|
|
|
17
19
|
var breadcrumbs = [{
|
|
18
20
|
text: 'Animals',
|
|
@@ -19,7 +19,9 @@ function _interopRequireWildcard(obj, nodeInterop) { if (!nodeInterop && obj &&
|
|
|
19
19
|
* Side Public License, v 1.
|
|
20
20
|
*/
|
|
21
21
|
|
|
22
|
-
/// <reference types="
|
|
22
|
+
/// <reference types="cypress" />
|
|
23
|
+
/// <reference types="cypress-real-events" />
|
|
24
|
+
/// <reference types="../../../cypress/support" />
|
|
23
25
|
|
|
24
26
|
var Card = function Card() {
|
|
25
27
|
var _useState = (0, _react.useState)(false),
|
|
@@ -15,7 +15,9 @@ var _react2 = require("@emotion/react");
|
|
|
15
15
|
* Side Public License, v 1.
|
|
16
16
|
*/
|
|
17
17
|
|
|
18
|
-
/// <reference types="
|
|
18
|
+
/// <reference types="cypress" />
|
|
19
|
+
/// <reference types="cypress-real-events" />
|
|
20
|
+
/// <reference types="../../../cypress/support" />
|
|
19
21
|
|
|
20
22
|
var ColorPicker = function ColorPicker() {
|
|
21
23
|
var _useColorPickerState = (0, _services.useColorPickerState)('#D36086'),
|
|
@@ -16,7 +16,9 @@ function _interopRequireWildcard(obj, nodeInterop) { if (!nodeInterop && obj &&
|
|
|
16
16
|
* Side Public License, v 1.
|
|
17
17
|
*/
|
|
18
18
|
|
|
19
|
-
/// <reference types="
|
|
19
|
+
/// <reference types="cypress" />
|
|
20
|
+
/// <reference types="cypress-real-events" />
|
|
21
|
+
/// <reference types="../../../cypress/support" />
|
|
20
22
|
|
|
21
23
|
var ComboBox = function ComboBox() {
|
|
22
24
|
var _useState = (0, _react.useState)([{
|