@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
|
@@ -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 { EuiAccordion } from './index';
|
|
@@ -216,8 +216,10 @@ export var EuiAccordionClass = /*#__PURE__*/function (_Component) {
|
|
|
216
216
|
}, buttonProps, {
|
|
217
217
|
id: buttonId,
|
|
218
218
|
className: buttonClasses,
|
|
219
|
-
"aria-controls": id
|
|
220
|
-
|
|
219
|
+
"aria-controls": id
|
|
220
|
+
// `aria-expanded` is only a valid attribute on interactive controls - axe-core throws a violation otherwise
|
|
221
|
+
,
|
|
222
|
+
"aria-expanded": ButtonElement === 'button' ? isOpen : undefined,
|
|
221
223
|
onClick: isDisabled ? undefined : this.onToggle,
|
|
222
224
|
type: ButtonElement === 'button' ? 'button' : undefined,
|
|
223
225
|
disabled: ButtonElement === 'button' ? isDisabled : undefined
|
|
@@ -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 { faker } from '@faker-js/faker';
|
|
@@ -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 { EuiBreadcrumbs } from './breadcrumbs';
|
|
@@ -12,7 +12,9 @@ function _arrayWithHoles(arr) { if (Array.isArray(arr)) return arr; }
|
|
|
12
12
|
* Side Public License, v 1.
|
|
13
13
|
*/
|
|
14
14
|
|
|
15
|
-
/// <reference types="
|
|
15
|
+
/// <reference types="cypress" />
|
|
16
|
+
/// <reference types="cypress-real-events" />
|
|
17
|
+
/// <reference types="../../../cypress/support" />
|
|
16
18
|
|
|
17
19
|
import React, { useState } from 'react';
|
|
18
20
|
import { EuiButtonEmpty } from '../button';
|
|
@@ -12,7 +12,9 @@ function _arrayWithHoles(arr) { if (Array.isArray(arr)) return arr; }
|
|
|
12
12
|
* Side Public License, v 1.
|
|
13
13
|
*/
|
|
14
14
|
|
|
15
|
-
/// <reference types="
|
|
15
|
+
/// <reference types="cypress" />
|
|
16
|
+
/// <reference types="cypress-real-events" />
|
|
17
|
+
/// <reference types="../../../cypress/support" />
|
|
16
18
|
|
|
17
19
|
import React from 'react';
|
|
18
20
|
import { EuiColorPicker } from './color_picker';
|
|
@@ -12,7 +12,9 @@ function _arrayWithHoles(arr) { if (Array.isArray(arr)) return arr; }
|
|
|
12
12
|
* Side Public License, v 1.
|
|
13
13
|
*/
|
|
14
14
|
|
|
15
|
-
/// <reference types="
|
|
15
|
+
/// <reference types="cypress" />
|
|
16
|
+
/// <reference types="cypress-real-events" />
|
|
17
|
+
/// <reference types="../../../cypress/support" />
|
|
16
18
|
|
|
17
19
|
import React, { useState } from 'react';
|
|
18
20
|
import { EuiComboBox } from './index';
|
|
@@ -225,22 +225,6 @@ export var EuiComboBox = /*#__PURE__*/function (_Component) {
|
|
|
225
225
|
_defineProperty(_assertThisInitialized(_this), "clearSearchValue", function () {
|
|
226
226
|
_this.onSearchChange('');
|
|
227
227
|
});
|
|
228
|
-
_defineProperty(_assertThisInitialized(_this), "removeLastOption", function () {
|
|
229
|
-
if (!_this.props.selectedOptions.length) {
|
|
230
|
-
return;
|
|
231
|
-
}
|
|
232
|
-
|
|
233
|
-
// Backspace will be used to delete the input, not a pill.
|
|
234
|
-
if (_this.state.searchValue.length) {
|
|
235
|
-
return;
|
|
236
|
-
}
|
|
237
|
-
|
|
238
|
-
// Delete last pill.
|
|
239
|
-
_this.onRemoveOption(_this.props.selectedOptions[_this.props.selectedOptions.length - 1]);
|
|
240
|
-
if (Boolean(_this.props.singleSelection) && !_this.state.isListOpen) {
|
|
241
|
-
_this.openList();
|
|
242
|
-
}
|
|
243
|
-
});
|
|
244
228
|
_defineProperty(_assertThisInitialized(_this), "addCustomOption", function (isContainerBlur, searchValue) {
|
|
245
229
|
var _this$props = _this.props,
|
|
246
230
|
isCaseSensitive = _this$props.isCaseSensitive,
|
|
@@ -390,10 +374,6 @@ export var EuiComboBox = /*#__PURE__*/function (_Component) {
|
|
|
390
374
|
_this.openList();
|
|
391
375
|
}
|
|
392
376
|
break;
|
|
393
|
-
case keys.BACKSPACE:
|
|
394
|
-
event.stopPropagation();
|
|
395
|
-
_this.removeLastOption();
|
|
396
|
-
break;
|
|
397
377
|
case keys.ESCAPE:
|
|
398
378
|
if (_this.state.isListOpen) {
|
|
399
379
|
event.preventDefault();
|
|
@@ -670,7 +650,7 @@ export var EuiComboBox = /*#__PURE__*/function (_Component) {
|
|
|
670
650
|
// Visually indicate the combobox is in an invalid state if it has lost focus but there is text entered in the input.
|
|
671
651
|
// When custom options are disabled and the user leaves the combo box after entering text that does not match any
|
|
672
652
|
// options, this tells the user that they've entered invalid input.
|
|
673
|
-
var markAsInvalid = isInvalid || (hasFocus === false || isListOpen === false) && searchValue;
|
|
653
|
+
var markAsInvalid = !!(isInvalid || (hasFocus === false || isListOpen === false) && searchValue);
|
|
674
654
|
var classes = classNames('euiComboBox', className, {
|
|
675
655
|
'euiComboBox--compressed': compressed,
|
|
676
656
|
'euiComboBox--fullWidth': fullWidth,
|
|
@@ -767,6 +747,7 @@ export var EuiComboBox = /*#__PURE__*/function (_Component) {
|
|
|
767
747
|
append: singleSelection ? append : undefined,
|
|
768
748
|
prepend: singleSelection ? prepend : undefined,
|
|
769
749
|
isLoading: isLoading,
|
|
750
|
+
isInvalid: markAsInvalid,
|
|
770
751
|
autoFocus: autoFocus,
|
|
771
752
|
"aria-label": ariaLabel,
|
|
772
753
|
"aria-labelledby": ariaLabelledby
|
|
@@ -28,8 +28,10 @@ import React, { Component } from 'react';
|
|
|
28
28
|
import PropTypes from "prop-types";
|
|
29
29
|
import classNames from 'classnames';
|
|
30
30
|
import AutosizeInput from 'react-input-autosize';
|
|
31
|
+
import { keys } from '../../../services';
|
|
31
32
|
import { EuiScreenReaderOnly } from '../../accessibility';
|
|
32
33
|
import { EuiFormControlLayout } from '../../form/form_control_layout';
|
|
34
|
+
import { getFormControlClassNameForIconCount } from '../../form/form_control_layout/_num_icons';
|
|
33
35
|
import { EuiComboBoxPill } from './combo_box_pill';
|
|
34
36
|
import { jsx as ___EmotionJSX } from "@emotion/react";
|
|
35
37
|
export var EuiComboBoxInput = /*#__PURE__*/function (_Component) {
|
|
@@ -65,10 +67,29 @@ export var EuiComboBoxInput = /*#__PURE__*/function (_Component) {
|
|
|
65
67
|
hasFocus: false
|
|
66
68
|
});
|
|
67
69
|
});
|
|
68
|
-
_defineProperty(_assertThisInitialized(_this), "
|
|
70
|
+
_defineProperty(_assertThisInitialized(_this), "onKeyDown", function (event) {
|
|
69
71
|
var _this$props = _this.props,
|
|
70
|
-
|
|
71
|
-
|
|
72
|
+
searchValue = _this$props.searchValue,
|
|
73
|
+
selectedOptions = _this$props.selectedOptions,
|
|
74
|
+
onRemoveOption = _this$props.onRemoveOption,
|
|
75
|
+
singleSelection = _this$props.singleSelection,
|
|
76
|
+
isListOpen = _this$props.isListOpen,
|
|
77
|
+
onOpenListClick = _this$props.onOpenListClick;
|
|
78
|
+
|
|
79
|
+
// When backspacing from an empty input, delete the last pill option in the list
|
|
80
|
+
var searchIsEmpty = !searchValue.length;
|
|
81
|
+
var hasPills = selectedOptions.length;
|
|
82
|
+
if (event.key === keys.BACKSPACE && searchIsEmpty && hasPills) {
|
|
83
|
+
onRemoveOption(selectedOptions[selectedOptions.length - 1]);
|
|
84
|
+
if (!!singleSelection && !isListOpen) {
|
|
85
|
+
onOpenListClick();
|
|
86
|
+
}
|
|
87
|
+
}
|
|
88
|
+
});
|
|
89
|
+
_defineProperty(_assertThisInitialized(_this), "inputOnChange", function (event) {
|
|
90
|
+
var _this$props2 = _this.props,
|
|
91
|
+
onChange = _this$props2.onChange,
|
|
92
|
+
searchValue = _this$props2.searchValue;
|
|
72
93
|
if (onChange) {
|
|
73
94
|
onChange(event.target.value);
|
|
74
95
|
}
|
|
@@ -95,34 +116,35 @@ export var EuiComboBoxInput = /*#__PURE__*/function (_Component) {
|
|
|
95
116
|
}, {
|
|
96
117
|
key: "render",
|
|
97
118
|
value: function render() {
|
|
98
|
-
var _this$
|
|
99
|
-
compressed = _this$
|
|
100
|
-
focusedOptionId = _this$
|
|
101
|
-
fullWidth = _this$
|
|
102
|
-
hasSelectedOptions = _this$
|
|
103
|
-
id = _this$
|
|
104
|
-
inputRef = _this$
|
|
105
|
-
isDisabled = _this$
|
|
106
|
-
isListOpen = _this$
|
|
107
|
-
noIcon = _this$
|
|
108
|
-
onClear = _this$
|
|
109
|
-
onClick = _this$
|
|
110
|
-
onCloseListClick = _this$
|
|
111
|
-
onOpenListClick = _this$
|
|
112
|
-
onRemoveOption = _this$
|
|
113
|
-
placeholder = _this$
|
|
114
|
-
rootId = _this$
|
|
115
|
-
searchValue = _this$
|
|
116
|
-
selectedOptions = _this$
|
|
117
|
-
singleSelectionProp = _this$
|
|
118
|
-
toggleButtonRef = _this$
|
|
119
|
-
value = _this$
|
|
120
|
-
prepend = _this$
|
|
121
|
-
append = _this$
|
|
122
|
-
isLoading = _this$
|
|
123
|
-
|
|
124
|
-
|
|
125
|
-
|
|
119
|
+
var _this$props3 = this.props,
|
|
120
|
+
compressed = _this$props3.compressed,
|
|
121
|
+
focusedOptionId = _this$props3.focusedOptionId,
|
|
122
|
+
fullWidth = _this$props3.fullWidth,
|
|
123
|
+
hasSelectedOptions = _this$props3.hasSelectedOptions,
|
|
124
|
+
id = _this$props3.id,
|
|
125
|
+
inputRef = _this$props3.inputRef,
|
|
126
|
+
isDisabled = _this$props3.isDisabled,
|
|
127
|
+
isListOpen = _this$props3.isListOpen,
|
|
128
|
+
noIcon = _this$props3.noIcon,
|
|
129
|
+
onClear = _this$props3.onClear,
|
|
130
|
+
onClick = _this$props3.onClick,
|
|
131
|
+
onCloseListClick = _this$props3.onCloseListClick,
|
|
132
|
+
onOpenListClick = _this$props3.onOpenListClick,
|
|
133
|
+
onRemoveOption = _this$props3.onRemoveOption,
|
|
134
|
+
placeholder = _this$props3.placeholder,
|
|
135
|
+
rootId = _this$props3.rootId,
|
|
136
|
+
searchValue = _this$props3.searchValue,
|
|
137
|
+
selectedOptions = _this$props3.selectedOptions,
|
|
138
|
+
singleSelectionProp = _this$props3.singleSelection,
|
|
139
|
+
toggleButtonRef = _this$props3.toggleButtonRef,
|
|
140
|
+
value = _this$props3.value,
|
|
141
|
+
prepend = _this$props3.prepend,
|
|
142
|
+
append = _this$props3.append,
|
|
143
|
+
isLoading = _this$props3.isLoading,
|
|
144
|
+
isInvalid = _this$props3.isInvalid,
|
|
145
|
+
autoFocus = _this$props3.autoFocus,
|
|
146
|
+
ariaLabel = _this$props3['aria-label'],
|
|
147
|
+
ariaLabelledby = _this$props3['aria-labelledby'];
|
|
126
148
|
var singleSelection = Boolean(singleSelectionProp);
|
|
127
149
|
var asPlainText = singleSelectionProp && _typeof(singleSelectionProp) === 'object' && singleSelectionProp.asPlainText || false;
|
|
128
150
|
var pills = selectedOptions ? selectedOptions.map(function (option) {
|
|
@@ -184,12 +206,16 @@ export var EuiComboBoxInput = /*#__PURE__*/function (_Component) {
|
|
|
184
206
|
type: 'arrowDown'
|
|
185
207
|
};
|
|
186
208
|
}
|
|
187
|
-
var
|
|
209
|
+
var numIconsClass = getFormControlClassNameForIconCount({
|
|
210
|
+
isDropdown: !noIcon,
|
|
211
|
+
clear: !!clickProps.clear,
|
|
212
|
+
isInvalid: isInvalid,
|
|
213
|
+
isLoading: isLoading
|
|
214
|
+
});
|
|
215
|
+
var wrapClasses = classNames('euiComboBox__inputWrap', numIconsClass, {
|
|
188
216
|
'euiComboBox__inputWrap--compressed': compressed,
|
|
189
217
|
'euiComboBox__inputWrap--fullWidth': fullWidth,
|
|
190
218
|
'euiComboBox__inputWrap--noWrap': singleSelection,
|
|
191
|
-
'euiComboBox__inputWrap-isLoading': isLoading,
|
|
192
|
-
'euiComboBox__inputWrap-isClearable': onClear,
|
|
193
219
|
'euiComboBox__inputWrap--inGroup': prepend || append
|
|
194
220
|
});
|
|
195
221
|
return ___EmotionJSX(EuiFormControlLayout, _extends({
|
|
@@ -197,6 +223,7 @@ export var EuiComboBoxInput = /*#__PURE__*/function (_Component) {
|
|
|
197
223
|
}, clickProps, {
|
|
198
224
|
inputId: id,
|
|
199
225
|
isLoading: isLoading,
|
|
226
|
+
isInvalid: isInvalid,
|
|
200
227
|
compressed: compressed,
|
|
201
228
|
fullWidth: fullWidth,
|
|
202
229
|
prepend: prepend,
|
|
@@ -213,6 +240,7 @@ export var EuiComboBoxInput = /*#__PURE__*/function (_Component) {
|
|
|
213
240
|
"aria-expanded": isListOpen,
|
|
214
241
|
"aria-label": ariaLabel,
|
|
215
242
|
"aria-labelledby": ariaLabelledby,
|
|
243
|
+
"aria-invalid": isInvalid,
|
|
216
244
|
className: "euiComboBox__input",
|
|
217
245
|
"data-test-subj": "comboBoxSearchInput",
|
|
218
246
|
disabled: isDisabled,
|
|
@@ -221,6 +249,7 @@ export var EuiComboBoxInput = /*#__PURE__*/function (_Component) {
|
|
|
221
249
|
onBlur: this.onBlur,
|
|
222
250
|
onChange: this.inputOnChange,
|
|
223
251
|
onFocus: this.onFocus,
|
|
252
|
+
onKeyDown: this.onKeyDown,
|
|
224
253
|
ref: this.inputRefCallback,
|
|
225
254
|
role: "combobox",
|
|
226
255
|
style: {
|
|
@@ -251,7 +280,7 @@ EuiComboBoxInput.propTypes = {
|
|
|
251
280
|
onCloseListClick: PropTypes.func.isRequired,
|
|
252
281
|
onFocus: PropTypes.any.isRequired,
|
|
253
282
|
onOpenListClick: PropTypes.func.isRequired,
|
|
254
|
-
onRemoveOption: PropTypes.func,
|
|
283
|
+
onRemoveOption: PropTypes.func.isRequired,
|
|
255
284
|
placeholder: PropTypes.string,
|
|
256
285
|
rootId: PropTypes.any.isRequired,
|
|
257
286
|
searchValue: PropTypes.string.isRequired,
|
|
@@ -275,7 +304,7 @@ EuiComboBoxInput.propTypes = {
|
|
|
275
304
|
"aria-label": PropTypes.string,
|
|
276
305
|
"data-test-subj": PropTypes.string,
|
|
277
306
|
css: PropTypes.any
|
|
278
|
-
}).isRequired),
|
|
307
|
+
}).isRequired).isRequired,
|
|
279
308
|
singleSelection: PropTypes.oneOfType([PropTypes.bool.isRequired, PropTypes.shape({
|
|
280
309
|
asPlainText: PropTypes.bool
|
|
281
310
|
}).isRequired]),
|
|
@@ -285,6 +314,7 @@ EuiComboBoxInput.propTypes = {
|
|
|
285
314
|
prepend: PropTypes.oneOfType([PropTypes.oneOfType([PropTypes.string.isRequired, PropTypes.element.isRequired]).isRequired, PropTypes.arrayOf(PropTypes.oneOfType([PropTypes.string.isRequired, PropTypes.element.isRequired]).isRequired).isRequired]),
|
|
286
315
|
append: PropTypes.oneOfType([PropTypes.oneOfType([PropTypes.string.isRequired, PropTypes.element.isRequired]).isRequired, PropTypes.arrayOf(PropTypes.oneOfType([PropTypes.string.isRequired, PropTypes.element.isRequired]).isRequired).isRequired]),
|
|
287
316
|
isLoading: PropTypes.bool,
|
|
317
|
+
isInvalid: PropTypes.bool,
|
|
288
318
|
autoFocus: PropTypes.bool,
|
|
289
319
|
"aria-label": PropTypes.string,
|
|
290
320
|
"aria-labelledby": PropTypes.string,
|
|
@@ -350,7 +350,7 @@ export var EuiComboBoxOptionsList = /*#__PURE__*/function (_Component) {
|
|
|
350
350
|
hasShadow: false,
|
|
351
351
|
className: classes,
|
|
352
352
|
panelRef: this.listRefCallback,
|
|
353
|
-
"data-test-subj":
|
|
353
|
+
"data-test-subj": classNames('comboBoxOptionsList', dataTestSubj),
|
|
354
354
|
style: _objectSpread(_objectSpread({}, style), {}, {
|
|
355
355
|
zIndex: zIndex
|
|
356
356
|
}),
|
|
@@ -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 { EuiContextMenuItem } from './context_menu_item';
|
|
@@ -12,7 +12,9 @@ function _arrayWithHoles(arr) { if (Array.isArray(arr)) return arr; }
|
|
|
12
12
|
* Side Public License, v 1.
|
|
13
13
|
*/
|
|
14
14
|
|
|
15
|
-
/// <reference types="
|
|
15
|
+
/// <reference types="cypress" />
|
|
16
|
+
/// <reference types="cypress-real-events" />
|
|
17
|
+
/// <reference types="../../../cypress/support" />
|
|
16
18
|
|
|
17
19
|
import React, { useState } from 'react';
|
|
18
20
|
import { EuiButton } from '../button';
|
|
@@ -12,7 +12,9 @@ function _arrayWithHoles(arr) { if (Array.isArray(arr)) return arr; }
|
|
|
12
12
|
* Side Public License, v 1.
|
|
13
13
|
*/
|
|
14
14
|
|
|
15
|
-
/// <reference types="
|
|
15
|
+
/// <reference types="cypress" />
|
|
16
|
+
/// <reference types="cypress-real-events" />
|
|
17
|
+
/// <reference types="../../../cypress/support" />
|
|
16
18
|
|
|
17
19
|
import React, { useState } from 'react';
|
|
18
20
|
import { EuiButton } from '../button';
|
|
@@ -25,14 +27,13 @@ var Copy = function Copy() {
|
|
|
25
27
|
_useState2 = _slicedToArray(_useState, 2),
|
|
26
28
|
copyText = _useState2[0],
|
|
27
29
|
setCopyText = _useState2[1];
|
|
28
|
-
var onChange = function onChange(e) {
|
|
29
|
-
setCopyText(e.target.value);
|
|
30
|
-
};
|
|
31
30
|
return ___EmotionJSX("div", null, ___EmotionJSX(EuiFormRow, {
|
|
32
31
|
label: "Enter text that will be copied to clipboard"
|
|
33
32
|
}, ___EmotionJSX(EuiFieldText, {
|
|
34
33
|
value: copyText,
|
|
35
|
-
onChange: onChange
|
|
34
|
+
onChange: function onChange(e) {
|
|
35
|
+
return setCopyText(e.target.value);
|
|
36
|
+
}
|
|
36
37
|
})), ___EmotionJSX(EuiSpacer, {
|
|
37
38
|
size: "m"
|
|
38
39
|
}), ___EmotionJSX(EuiCopy, {
|
|
@@ -16,7 +16,9 @@ function _arrayWithHoles(arr) { if (Array.isArray(arr)) return arr; }
|
|
|
16
16
|
* Side Public License, v 1.
|
|
17
17
|
*/
|
|
18
18
|
|
|
19
|
-
/// <reference types="
|
|
19
|
+
/// <reference types="cypress" />
|
|
20
|
+
/// <reference types="cypress-real-events" />
|
|
21
|
+
/// <reference types="../../../cypress/support" />
|
|
20
22
|
|
|
21
23
|
import React, { useState } from 'react';
|
|
22
24
|
import { EuiDataGrid } from './index';
|
|
@@ -12,7 +12,9 @@ function _arrayWithHoles(arr) { if (Array.isArray(arr)) return arr; }
|
|
|
12
12
|
* Side Public License, v 1.
|
|
13
13
|
*/
|
|
14
14
|
|
|
15
|
-
/// <reference types="
|
|
15
|
+
/// <reference types="cypress" />
|
|
16
|
+
/// <reference types="cypress-real-events" />
|
|
17
|
+
/// <reference types="../../../cypress/support" />
|
|
16
18
|
|
|
17
19
|
import React, { useState } from 'react';
|
|
18
20
|
import moment from 'moment';
|