@elastic/eui 77.0.0 → 77.1.1
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/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 +42 -36
- package/i18ntokens.json +4 -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/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/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/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/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
package/eui.d.ts
CHANGED
|
@@ -3393,19 +3393,30 @@ declare module '@elastic/eui/src/components/form/validatable_control/validatable
|
|
|
3393
3393
|
export interface ReactElementWithRef extends ReactElement {
|
|
3394
3394
|
ref?: Ref<HTMLConstraintValidityElement>;
|
|
3395
3395
|
}
|
|
3396
|
+
/**
|
|
3397
|
+
* The `EuiValidatableControl` component should be used in scenarios where
|
|
3398
|
+
* we can render the validated `<input>` as its direct child.
|
|
3399
|
+
*/
|
|
3396
3400
|
export interface EuiValidatableControlProps {
|
|
3397
3401
|
isInvalid?: boolean;
|
|
3398
|
-
/**
|
|
3399
|
-
* ReactNode to render as this component's content
|
|
3400
|
-
*/
|
|
3401
3402
|
children: ReactElementWithRef;
|
|
3402
3403
|
}
|
|
3403
3404
|
export const EuiValidatableControl: FunctionComponent<CommonProps & EuiValidatableControlProps>;
|
|
3405
|
+
/**
|
|
3406
|
+
* The `UseEuiValidatableControl` hook should be used in scenarios where
|
|
3407
|
+
* we *cannot* control where the validated `<input>` is rendered (e.g., ReactDatePicker)
|
|
3408
|
+
* and instead need to access the input via a ref and pass the element in directly
|
|
3409
|
+
*/
|
|
3410
|
+
export interface UseEuiValidatableControlProps {
|
|
3411
|
+
isInvalid?: boolean;
|
|
3412
|
+
controlEl: HTMLInputElement | HTMLConstraintValidityElement | null;
|
|
3413
|
+
}
|
|
3414
|
+
export const useEuiValidatableControl: ({ isInvalid, controlEl, }: UseEuiValidatableControlProps) => void;
|
|
3404
3415
|
|
|
3405
3416
|
}
|
|
3406
3417
|
declare module '@elastic/eui/src/components/form/validatable_control' {
|
|
3407
|
-
export type { EuiValidatableControlProps } from '@elastic/eui/src/components/form/validatable_control/validatable_control';
|
|
3408
|
-
export { EuiValidatableControl } from '@elastic/eui/src/components/form/validatable_control/validatable_control';
|
|
3418
|
+
export type { EuiValidatableControlProps, UseEuiValidatableControlProps, } from '@elastic/eui/src/components/form/validatable_control/validatable_control';
|
|
3419
|
+
export { EuiValidatableControl, useEuiValidatableControl, } from '@elastic/eui/src/components/form/validatable_control/validatable_control';
|
|
3409
3420
|
|
|
3410
3421
|
}
|
|
3411
3422
|
declare module '@elastic/eui/src/components/form/form_control_layout/_num_icons' {
|
|
@@ -4683,10 +4694,9 @@ declare module '@elastic/eui/src/components/popover/popover_panel/_popover_panel
|
|
|
4683
4694
|
import { EuiPaddingSize } from '@elastic/eui/src/global_styling';
|
|
4684
4695
|
import { _EuiPanelDivlike } from '@elastic/eui/src/components/panel/panel';
|
|
4685
4696
|
import { EuiPopoverArrowPositions } from '@elastic/eui/src/components/popover/popover_arrow';
|
|
4686
|
-
|
|
4697
|
+
export const EuiPopoverPanelContext: React.Context<{
|
|
4687
4698
|
paddingSize: EuiPaddingSize;
|
|
4688
|
-
}
|
|
4689
|
-
export const EuiPopoverPanelContext: React.Context<ContextShape>;
|
|
4699
|
+
}>;
|
|
4690
4700
|
export type EuiPopoverPanelProps = _EuiPanelDivlike; type EuiPopoverPanelInternalProps = {
|
|
4691
4701
|
isOpen?: boolean;
|
|
4692
4702
|
isAttached?: boolean;
|
|
@@ -5034,9 +5044,18 @@ declare module '@elastic/eui/src/components/popover/popover_title' {
|
|
|
5034
5044
|
declare module '@elastic/eui/src/components/popover/popover_footer.styles' {
|
|
5035
5045
|
import { EuiPaddingSize } from '@elastic/eui/src/global_styling';
|
|
5036
5046
|
import { UseEuiTheme } from '@elastic/eui/src/services';
|
|
5037
|
-
export const euiPopoverFooterStyles: (euiThemeContext: UseEuiTheme
|
|
5047
|
+
export const euiPopoverFooterStyles: (euiThemeContext: UseEuiTheme) => {
|
|
5038
5048
|
euiPopoverFooter: import("@emotion/utils").SerializedStyles;
|
|
5049
|
+
panelPaddingSizes: {
|
|
5050
|
+
none: import("@emotion/utils").SerializedStyles;
|
|
5051
|
+
xs: import("@emotion/utils").SerializedStyles;
|
|
5052
|
+
s: import("@emotion/utils").SerializedStyles;
|
|
5053
|
+
m: import("@emotion/utils").SerializedStyles;
|
|
5054
|
+
l: import("@emotion/utils").SerializedStyles;
|
|
5055
|
+
xl: import("@emotion/utils").SerializedStyles;
|
|
5056
|
+
};
|
|
5039
5057
|
};
|
|
5058
|
+
export const panelPaddingOffset: (euiThemeContext: UseEuiTheme, size: EuiPaddingSize) => string;
|
|
5040
5059
|
|
|
5041
5060
|
}
|
|
5042
5061
|
declare module '@elastic/eui/src/components/popover/popover_footer' {
|
|
@@ -6395,6 +6414,7 @@ declare module '@elastic/eui/src/components/form/text_area/text_area' {
|
|
|
6395
6414
|
import { TextareaHTMLAttributes, Ref, FunctionComponent } from 'react';
|
|
6396
6415
|
import { CommonProps } from '@elastic/eui/src/components/common';
|
|
6397
6416
|
export type EuiTextAreaProps = TextareaHTMLAttributes<HTMLTextAreaElement> & CommonProps & {
|
|
6417
|
+
isLoading?: boolean;
|
|
6398
6418
|
isInvalid?: boolean;
|
|
6399
6419
|
/**
|
|
6400
6420
|
* Expand to fill 100% of the parent.
|
|
@@ -10381,12 +10401,12 @@ declare module '@elastic/eui/src/components/combo_box/combo_box_input/combo_box_
|
|
|
10381
10401
|
|
|
10382
10402
|
}
|
|
10383
10403
|
declare module '@elastic/eui/src/components/combo_box/combo_box_input/combo_box_input' {
|
|
10384
|
-
import {
|
|
10404
|
+
import { Component, ChangeEventHandler, FocusEventHandler, KeyboardEventHandler, RefCallback } from 'react';
|
|
10385
10405
|
import AutosizeInput from 'react-input-autosize';
|
|
10386
|
-
import {
|
|
10406
|
+
import { CommonProps } from '@elastic/eui/src/components/common';
|
|
10387
10407
|
import { htmlIdGenerator } from '@elastic/eui/src/services';
|
|
10408
|
+
import { EuiFormControlLayoutProps } from '@elastic/eui/src/components/form/form_control_layout';
|
|
10388
10409
|
import { EuiComboBoxOptionOption, EuiComboBoxSingleSelectionShape, OptionHandler, UpdatePositionHandler } from '@elastic/eui/src/components/combo_box/types';
|
|
10389
|
-
import { CommonProps } from '@elastic/eui/src/components/common';
|
|
10390
10410
|
export interface EuiComboBoxInputProps<T> extends CommonProps {
|
|
10391
10411
|
autoSizeInputRef?: RefCallback<AutosizeInput & HTMLInputElement>;
|
|
10392
10412
|
compressed: boolean;
|
|
@@ -10405,11 +10425,11 @@ declare module '@elastic/eui/src/components/combo_box/combo_box_input/combo_box_
|
|
|
10405
10425
|
onCloseListClick: () => void;
|
|
10406
10426
|
onFocus: FocusEventHandler<HTMLInputElement>;
|
|
10407
10427
|
onOpenListClick: () => void;
|
|
10408
|
-
onRemoveOption
|
|
10428
|
+
onRemoveOption: OptionHandler<T>;
|
|
10409
10429
|
placeholder?: string;
|
|
10410
10430
|
rootId: ReturnType<typeof htmlIdGenerator>;
|
|
10411
10431
|
searchValue: string;
|
|
10412
|
-
selectedOptions
|
|
10432
|
+
selectedOptions: Array<EuiComboBoxOptionOption<T>>;
|
|
10413
10433
|
singleSelection?: boolean | EuiComboBoxSingleSelectionShape;
|
|
10414
10434
|
toggleButtonRef?: RefCallback<HTMLButtonElement | HTMLSpanElement>;
|
|
10415
10435
|
updatePosition: UpdatePositionHandler;
|
|
@@ -10417,6 +10437,7 @@ declare module '@elastic/eui/src/components/combo_box/combo_box_input/combo_box_
|
|
|
10417
10437
|
prepend?: EuiFormControlLayoutProps['prepend'];
|
|
10418
10438
|
append?: EuiFormControlLayoutProps['append'];
|
|
10419
10439
|
isLoading?: boolean;
|
|
10440
|
+
isInvalid?: boolean;
|
|
10420
10441
|
autoFocus?: boolean;
|
|
10421
10442
|
'aria-label'?: string;
|
|
10422
10443
|
'aria-labelledby'?: string;
|
|
@@ -10429,6 +10450,7 @@ declare module '@elastic/eui/src/components/combo_box/combo_box_input/combo_box_
|
|
|
10429
10450
|
updatePosition: () => void;
|
|
10430
10451
|
onFocus: FocusEventHandler<HTMLInputElement>;
|
|
10431
10452
|
onBlur: FocusEventHandler<HTMLInputElement>;
|
|
10453
|
+
onKeyDown: KeyboardEventHandler<HTMLInputElement>;
|
|
10432
10454
|
componentDidUpdate(prevProps: EuiComboBoxInputProps<T>): void;
|
|
10433
10455
|
inputOnChange: ChangeEventHandler<HTMLInputElement>;
|
|
10434
10456
|
inputRefCallback: (ref: HTMLInputElement & AutosizeInput) => void;
|
|
@@ -10657,7 +10679,6 @@ declare module '@elastic/eui/src/components/combo_box/combo_box' {
|
|
|
10657
10679
|
hasActiveOption: () => boolean;
|
|
10658
10680
|
clearActiveOption: () => void;
|
|
10659
10681
|
clearSearchValue: () => void;
|
|
10660
|
-
removeLastOption: () => void;
|
|
10661
10682
|
addCustomOption: (isContainerBlur: boolean, searchValue: string) => void;
|
|
10662
10683
|
doesSearchMatchOnlyOption: () => boolean;
|
|
10663
10684
|
areAllOptionsSelected: () => boolean;
|
|
@@ -13727,10 +13748,10 @@ declare module '@elastic/eui/src/components/date_picker/react-datepicker' {
|
|
|
13727
13748
|
|
|
13728
13749
|
}
|
|
13729
13750
|
declare module '@elastic/eui/src/components/date_picker/date_picker' {
|
|
13730
|
-
import { Component, MouseEventHandler, Ref } from 'react';
|
|
13751
|
+
import { FunctionComponent, Component, MouseEventHandler, Ref } from 'react';
|
|
13731
13752
|
import { Moment } from 'moment';
|
|
13732
13753
|
import { EuiFormControlLayoutIconsProps } from '@elastic/eui/src/components/form/form_control_layout/form_control_layout_icons';
|
|
13733
|
-
import {
|
|
13754
|
+
import { CommonProps } from '@elastic/eui/src/components/common';
|
|
13734
13755
|
import { PopoverAnchorPosition } from '@elastic/eui/src/components/popover';
|
|
13735
13756
|
import { ReactDatePickerProps } from '@elastic/eui/src/components/date_picker/react-datepicker';
|
|
13736
13757
|
export const euiDatePickerDefaultDateFormat = "MM/DD/YYYY";
|
|
@@ -13747,7 +13768,7 @@ declare module '@elastic/eui/src/components/date_picker/date_picker' {
|
|
|
13747
13768
|
/**
|
|
13748
13769
|
* ref for the ReactDatePicker instance
|
|
13749
13770
|
*/
|
|
13750
|
-
inputRef
|
|
13771
|
+
inputRef?: Ref<Component<ReactDatePickerProps, any, any>>;
|
|
13751
13772
|
/**
|
|
13752
13773
|
* Provides styling to the input when invalid
|
|
13753
13774
|
*/
|
|
@@ -13786,24 +13807,9 @@ declare module '@elastic/eui/src/components/date_picker/date_picker' {
|
|
|
13786
13807
|
* **Use [EuiPopover](/#/layout/popover) values**: 'upCenter', 'upLeft', 'upRight', downCenter', 'downLeft', 'downRight', 'leftCenter', 'leftUp', 'leftDown', 'rightCenter', 'rightUp', 'rightDown'.
|
|
13787
13808
|
*/
|
|
13788
13809
|
popoverPlacement?: PopoverAnchorPosition;
|
|
13789
|
-
} type _EuiDatePickerProps = CommonProps & EuiExtendedDatePickerProps;
|
|
13790
|
-
export type EuiDatePickerProps = ApplyClassComponentDefaults<typeof EuiDatePicker>;
|
|
13791
|
-
export class EuiDatePicker extends Component<_EuiDatePickerProps> {
|
|
13792
|
-
static defaultProps: {
|
|
13793
|
-
adjustDateOnChange: boolean;
|
|
13794
|
-
dateFormat: string;
|
|
13795
|
-
fullWidth: boolean;
|
|
13796
|
-
inputRef: () => void;
|
|
13797
|
-
isLoading: boolean;
|
|
13798
|
-
shadow: boolean;
|
|
13799
|
-
shouldCloseOnSelect: boolean;
|
|
13800
|
-
showIcon: boolean;
|
|
13801
|
-
showTimeSelect: boolean;
|
|
13802
|
-
timeFormat: string;
|
|
13803
|
-
popoverPlacement: string;
|
|
13804
|
-
};
|
|
13805
|
-
render(): JSX.Element;
|
|
13806
13810
|
}
|
|
13811
|
+
export type EuiDatePickerProps = CommonProps & EuiExtendedDatePickerProps;
|
|
13812
|
+
export const EuiDatePicker: FunctionComponent<EuiDatePickerProps>;
|
|
13807
13813
|
export {};
|
|
13808
13814
|
|
|
13809
13815
|
}
|
|
@@ -14441,7 +14447,7 @@ declare module '@elastic/eui/src/components/date_picker/date_picker_range' {
|
|
|
14441
14447
|
*/
|
|
14442
14448
|
isCustom?: boolean;
|
|
14443
14449
|
/**
|
|
14444
|
-
* Will
|
|
14450
|
+
* Will color the range delimiter the `danger` color and pass through to each control
|
|
14445
14451
|
*/
|
|
14446
14452
|
isInvalid?: boolean;
|
|
14447
14453
|
/**
|
package/i18ntokens.json
CHANGED
|
@@ -887,14 +887,14 @@
|
|
|
887
887
|
"highlighting": "string",
|
|
888
888
|
"loc": {
|
|
889
889
|
"start": {
|
|
890
|
-
"line":
|
|
890
|
+
"line": 977,
|
|
891
891
|
"column": 10,
|
|
892
|
-
"index":
|
|
892
|
+
"index": 27944
|
|
893
893
|
},
|
|
894
894
|
"end": {
|
|
895
|
-
"line":
|
|
895
|
+
"line": 980,
|
|
896
896
|
"column": 11,
|
|
897
|
-
"index":
|
|
897
|
+
"index": 28069
|
|
898
898
|
}
|
|
899
899
|
},
|
|
900
900
|
"filepath": "src/components/combo_box/combo_box.tsx"
|
|
@@ -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="
|
|
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',
|
|
@@ -218,8 +218,10 @@ var EuiAccordionClass = /*#__PURE__*/function (_Component) {
|
|
|
218
218
|
}, buttonProps, {
|
|
219
219
|
id: buttonId,
|
|
220
220
|
className: buttonClasses,
|
|
221
|
-
"aria-controls": id
|
|
222
|
-
|
|
221
|
+
"aria-controls": id
|
|
222
|
+
// `aria-expanded` is only a valid attribute on interactive controls - axe-core throws a violation otherwise
|
|
223
|
+
,
|
|
224
|
+
"aria-expanded": ButtonElement === 'button' ? isOpen : undefined,
|
|
223
225
|
onClick: isDisabled ? undefined : this.onToggle,
|
|
224
226
|
type: ButtonElement === 'button' ? 'button' : undefined,
|
|
225
227
|
disabled: ButtonElement === 'button' ? isDisabled : undefined
|
|
@@ -16,7 +16,9 @@ function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { de
|
|
|
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 @@ function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { de
|
|
|
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',
|
|
@@ -222,22 +222,6 @@ var EuiComboBox = /*#__PURE__*/function (_Component) {
|
|
|
222
222
|
_defineProperty(_assertThisInitialized(_this), "clearSearchValue", function () {
|
|
223
223
|
_this.onSearchChange('');
|
|
224
224
|
});
|
|
225
|
-
_defineProperty(_assertThisInitialized(_this), "removeLastOption", function () {
|
|
226
|
-
if (!_this.props.selectedOptions.length) {
|
|
227
|
-
return;
|
|
228
|
-
}
|
|
229
|
-
|
|
230
|
-
// Backspace will be used to delete the input, not a pill.
|
|
231
|
-
if (_this.state.searchValue.length) {
|
|
232
|
-
return;
|
|
233
|
-
}
|
|
234
|
-
|
|
235
|
-
// Delete last pill.
|
|
236
|
-
_this.onRemoveOption(_this.props.selectedOptions[_this.props.selectedOptions.length - 1]);
|
|
237
|
-
if (Boolean(_this.props.singleSelection) && !_this.state.isListOpen) {
|
|
238
|
-
_this.openList();
|
|
239
|
-
}
|
|
240
|
-
});
|
|
241
225
|
_defineProperty(_assertThisInitialized(_this), "addCustomOption", function (isContainerBlur, searchValue) {
|
|
242
226
|
var _this$props = _this.props,
|
|
243
227
|
isCaseSensitive = _this$props.isCaseSensitive,
|
|
@@ -387,10 +371,6 @@ var EuiComboBox = /*#__PURE__*/function (_Component) {
|
|
|
387
371
|
_this.openList();
|
|
388
372
|
}
|
|
389
373
|
break;
|
|
390
|
-
case _services.keys.BACKSPACE:
|
|
391
|
-
event.stopPropagation();
|
|
392
|
-
_this.removeLastOption();
|
|
393
|
-
break;
|
|
394
374
|
case _services.keys.ESCAPE:
|
|
395
375
|
if (_this.state.isListOpen) {
|
|
396
376
|
event.preventDefault();
|
|
@@ -667,7 +647,7 @@ var EuiComboBox = /*#__PURE__*/function (_Component) {
|
|
|
667
647
|
// Visually indicate the combobox is in an invalid state if it has lost focus but there is text entered in the input.
|
|
668
648
|
// When custom options are disabled and the user leaves the combo box after entering text that does not match any
|
|
669
649
|
// options, this tells the user that they've entered invalid input.
|
|
670
|
-
var markAsInvalid = isInvalid || (hasFocus === false || isListOpen === false) && searchValue;
|
|
650
|
+
var markAsInvalid = !!(isInvalid || (hasFocus === false || isListOpen === false) && searchValue);
|
|
671
651
|
var classes = (0, _classnames.default)('euiComboBox', className, {
|
|
672
652
|
'euiComboBox--compressed': compressed,
|
|
673
653
|
'euiComboBox--fullWidth': fullWidth,
|
|
@@ -764,6 +744,7 @@ var EuiComboBox = /*#__PURE__*/function (_Component) {
|
|
|
764
744
|
append: singleSelection ? append : undefined,
|
|
765
745
|
prepend: singleSelection ? prepend : undefined,
|
|
766
746
|
isLoading: isLoading,
|
|
747
|
+
isInvalid: markAsInvalid,
|
|
767
748
|
autoFocus: autoFocus,
|
|
768
749
|
"aria-label": ariaLabel,
|
|
769
750
|
"aria-labelledby": ariaLabelledby
|
|
@@ -8,8 +8,10 @@ var _react = _interopRequireWildcard(require("react"));
|
|
|
8
8
|
var _propTypes = _interopRequireDefault(require("prop-types"));
|
|
9
9
|
var _classnames = _interopRequireDefault(require("classnames"));
|
|
10
10
|
var _reactInputAutosize = _interopRequireDefault(require("react-input-autosize"));
|
|
11
|
+
var _services = require("../../../services");
|
|
11
12
|
var _accessibility = require("../../accessibility");
|
|
12
13
|
var _form_control_layout = require("../../form/form_control_layout");
|
|
14
|
+
var _num_icons = require("../../form/form_control_layout/_num_icons");
|
|
13
15
|
var _combo_box_pill = require("./combo_box_pill");
|
|
14
16
|
var _react2 = require("@emotion/react");
|
|
15
17
|
var _excluded = ["key", "label", "color", "onClick"];
|
|
@@ -66,10 +68,29 @@ var EuiComboBoxInput = /*#__PURE__*/function (_Component) {
|
|
|
66
68
|
hasFocus: false
|
|
67
69
|
});
|
|
68
70
|
});
|
|
69
|
-
_defineProperty(_assertThisInitialized(_this), "
|
|
71
|
+
_defineProperty(_assertThisInitialized(_this), "onKeyDown", function (event) {
|
|
70
72
|
var _this$props = _this.props,
|
|
71
|
-
|
|
72
|
-
|
|
73
|
+
searchValue = _this$props.searchValue,
|
|
74
|
+
selectedOptions = _this$props.selectedOptions,
|
|
75
|
+
onRemoveOption = _this$props.onRemoveOption,
|
|
76
|
+
singleSelection = _this$props.singleSelection,
|
|
77
|
+
isListOpen = _this$props.isListOpen,
|
|
78
|
+
onOpenListClick = _this$props.onOpenListClick;
|
|
79
|
+
|
|
80
|
+
// When backspacing from an empty input, delete the last pill option in the list
|
|
81
|
+
var searchIsEmpty = !searchValue.length;
|
|
82
|
+
var hasPills = selectedOptions.length;
|
|
83
|
+
if (event.key === _services.keys.BACKSPACE && searchIsEmpty && hasPills) {
|
|
84
|
+
onRemoveOption(selectedOptions[selectedOptions.length - 1]);
|
|
85
|
+
if (!!singleSelection && !isListOpen) {
|
|
86
|
+
onOpenListClick();
|
|
87
|
+
}
|
|
88
|
+
}
|
|
89
|
+
});
|
|
90
|
+
_defineProperty(_assertThisInitialized(_this), "inputOnChange", function (event) {
|
|
91
|
+
var _this$props2 = _this.props,
|
|
92
|
+
onChange = _this$props2.onChange,
|
|
93
|
+
searchValue = _this$props2.searchValue;
|
|
73
94
|
if (onChange) {
|
|
74
95
|
onChange(event.target.value);
|
|
75
96
|
}
|
|
@@ -96,34 +117,35 @@ var EuiComboBoxInput = /*#__PURE__*/function (_Component) {
|
|
|
96
117
|
}, {
|
|
97
118
|
key: "render",
|
|
98
119
|
value: function render() {
|
|
99
|
-
var _this$
|
|
100
|
-
compressed = _this$
|
|
101
|
-
focusedOptionId = _this$
|
|
102
|
-
fullWidth = _this$
|
|
103
|
-
hasSelectedOptions = _this$
|
|
104
|
-
id = _this$
|
|
105
|
-
inputRef = _this$
|
|
106
|
-
isDisabled = _this$
|
|
107
|
-
isListOpen = _this$
|
|
108
|
-
noIcon = _this$
|
|
109
|
-
onClear = _this$
|
|
110
|
-
onClick = _this$
|
|
111
|
-
onCloseListClick = _this$
|
|
112
|
-
onOpenListClick = _this$
|
|
113
|
-
onRemoveOption = _this$
|
|
114
|
-
placeholder = _this$
|
|
115
|
-
rootId = _this$
|
|
116
|
-
searchValue = _this$
|
|
117
|
-
selectedOptions = _this$
|
|
118
|
-
singleSelectionProp = _this$
|
|
119
|
-
toggleButtonRef = _this$
|
|
120
|
-
value = _this$
|
|
121
|
-
prepend = _this$
|
|
122
|
-
append = _this$
|
|
123
|
-
isLoading = _this$
|
|
124
|
-
|
|
125
|
-
|
|
126
|
-
|
|
120
|
+
var _this$props3 = this.props,
|
|
121
|
+
compressed = _this$props3.compressed,
|
|
122
|
+
focusedOptionId = _this$props3.focusedOptionId,
|
|
123
|
+
fullWidth = _this$props3.fullWidth,
|
|
124
|
+
hasSelectedOptions = _this$props3.hasSelectedOptions,
|
|
125
|
+
id = _this$props3.id,
|
|
126
|
+
inputRef = _this$props3.inputRef,
|
|
127
|
+
isDisabled = _this$props3.isDisabled,
|
|
128
|
+
isListOpen = _this$props3.isListOpen,
|
|
129
|
+
noIcon = _this$props3.noIcon,
|
|
130
|
+
onClear = _this$props3.onClear,
|
|
131
|
+
onClick = _this$props3.onClick,
|
|
132
|
+
onCloseListClick = _this$props3.onCloseListClick,
|
|
133
|
+
onOpenListClick = _this$props3.onOpenListClick,
|
|
134
|
+
onRemoveOption = _this$props3.onRemoveOption,
|
|
135
|
+
placeholder = _this$props3.placeholder,
|
|
136
|
+
rootId = _this$props3.rootId,
|
|
137
|
+
searchValue = _this$props3.searchValue,
|
|
138
|
+
selectedOptions = _this$props3.selectedOptions,
|
|
139
|
+
singleSelectionProp = _this$props3.singleSelection,
|
|
140
|
+
toggleButtonRef = _this$props3.toggleButtonRef,
|
|
141
|
+
value = _this$props3.value,
|
|
142
|
+
prepend = _this$props3.prepend,
|
|
143
|
+
append = _this$props3.append,
|
|
144
|
+
isLoading = _this$props3.isLoading,
|
|
145
|
+
isInvalid = _this$props3.isInvalid,
|
|
146
|
+
autoFocus = _this$props3.autoFocus,
|
|
147
|
+
ariaLabel = _this$props3['aria-label'],
|
|
148
|
+
ariaLabelledby = _this$props3['aria-labelledby'];
|
|
127
149
|
var singleSelection = Boolean(singleSelectionProp);
|
|
128
150
|
var asPlainText = singleSelectionProp && _typeof(singleSelectionProp) === 'object' && singleSelectionProp.asPlainText || false;
|
|
129
151
|
var pills = selectedOptions ? selectedOptions.map(function (option) {
|
|
@@ -185,12 +207,16 @@ var EuiComboBoxInput = /*#__PURE__*/function (_Component) {
|
|
|
185
207
|
type: 'arrowDown'
|
|
186
208
|
};
|
|
187
209
|
}
|
|
188
|
-
var
|
|
210
|
+
var numIconsClass = (0, _num_icons.getFormControlClassNameForIconCount)({
|
|
211
|
+
isDropdown: !noIcon,
|
|
212
|
+
clear: !!clickProps.clear,
|
|
213
|
+
isInvalid: isInvalid,
|
|
214
|
+
isLoading: isLoading
|
|
215
|
+
});
|
|
216
|
+
var wrapClasses = (0, _classnames.default)('euiComboBox__inputWrap', numIconsClass, {
|
|
189
217
|
'euiComboBox__inputWrap--compressed': compressed,
|
|
190
218
|
'euiComboBox__inputWrap--fullWidth': fullWidth,
|
|
191
219
|
'euiComboBox__inputWrap--noWrap': singleSelection,
|
|
192
|
-
'euiComboBox__inputWrap-isLoading': isLoading,
|
|
193
|
-
'euiComboBox__inputWrap-isClearable': onClear,
|
|
194
220
|
'euiComboBox__inputWrap--inGroup': prepend || append
|
|
195
221
|
});
|
|
196
222
|
return (0, _react2.jsx)(_form_control_layout.EuiFormControlLayout, _extends({
|
|
@@ -198,6 +224,7 @@ var EuiComboBoxInput = /*#__PURE__*/function (_Component) {
|
|
|
198
224
|
}, clickProps, {
|
|
199
225
|
inputId: id,
|
|
200
226
|
isLoading: isLoading,
|
|
227
|
+
isInvalid: isInvalid,
|
|
201
228
|
compressed: compressed,
|
|
202
229
|
fullWidth: fullWidth,
|
|
203
230
|
prepend: prepend,
|
|
@@ -214,6 +241,7 @@ var EuiComboBoxInput = /*#__PURE__*/function (_Component) {
|
|
|
214
241
|
"aria-expanded": isListOpen,
|
|
215
242
|
"aria-label": ariaLabel,
|
|
216
243
|
"aria-labelledby": ariaLabelledby,
|
|
244
|
+
"aria-invalid": isInvalid,
|
|
217
245
|
className: "euiComboBox__input",
|
|
218
246
|
"data-test-subj": "comboBoxSearchInput",
|
|
219
247
|
disabled: isDisabled,
|
|
@@ -222,6 +250,7 @@ var EuiComboBoxInput = /*#__PURE__*/function (_Component) {
|
|
|
222
250
|
onBlur: this.onBlur,
|
|
223
251
|
onChange: this.inputOnChange,
|
|
224
252
|
onFocus: this.onFocus,
|
|
253
|
+
onKeyDown: this.onKeyDown,
|
|
225
254
|
ref: this.inputRefCallback,
|
|
226
255
|
role: "combobox",
|
|
227
256
|
style: {
|
|
@@ -253,7 +282,7 @@ EuiComboBoxInput.propTypes = {
|
|
|
253
282
|
onCloseListClick: _propTypes.default.func.isRequired,
|
|
254
283
|
onFocus: _propTypes.default.any.isRequired,
|
|
255
284
|
onOpenListClick: _propTypes.default.func.isRequired,
|
|
256
|
-
onRemoveOption: _propTypes.default.func,
|
|
285
|
+
onRemoveOption: _propTypes.default.func.isRequired,
|
|
257
286
|
placeholder: _propTypes.default.string,
|
|
258
287
|
rootId: _propTypes.default.any.isRequired,
|
|
259
288
|
searchValue: _propTypes.default.string.isRequired,
|
|
@@ -277,7 +306,7 @@ EuiComboBoxInput.propTypes = {
|
|
|
277
306
|
"aria-label": _propTypes.default.string,
|
|
278
307
|
"data-test-subj": _propTypes.default.string,
|
|
279
308
|
css: _propTypes.default.any
|
|
280
|
-
}).isRequired),
|
|
309
|
+
}).isRequired).isRequired,
|
|
281
310
|
singleSelection: _propTypes.default.oneOfType([_propTypes.default.bool.isRequired, _propTypes.default.shape({
|
|
282
311
|
asPlainText: _propTypes.default.bool
|
|
283
312
|
}).isRequired]),
|
|
@@ -287,6 +316,7 @@ EuiComboBoxInput.propTypes = {
|
|
|
287
316
|
prepend: _propTypes.default.oneOfType([_propTypes.default.oneOfType([_propTypes.default.string.isRequired, _propTypes.default.element.isRequired]).isRequired, _propTypes.default.arrayOf(_propTypes.default.oneOfType([_propTypes.default.string.isRequired, _propTypes.default.element.isRequired]).isRequired).isRequired]),
|
|
288
317
|
append: _propTypes.default.oneOfType([_propTypes.default.oneOfType([_propTypes.default.string.isRequired, _propTypes.default.element.isRequired]).isRequired, _propTypes.default.arrayOf(_propTypes.default.oneOfType([_propTypes.default.string.isRequired, _propTypes.default.element.isRequired]).isRequired).isRequired]),
|
|
289
318
|
isLoading: _propTypes.default.bool,
|
|
319
|
+
isInvalid: _propTypes.default.bool,
|
|
290
320
|
autoFocus: _propTypes.default.bool,
|
|
291
321
|
"aria-label": _propTypes.default.string,
|
|
292
322
|
"aria-labelledby": _propTypes.default.string,
|
|
@@ -351,7 +351,7 @@ var EuiComboBoxOptionsList = /*#__PURE__*/function (_Component) {
|
|
|
351
351
|
hasShadow: false,
|
|
352
352
|
className: classes,
|
|
353
353
|
panelRef: this.listRefCallback,
|
|
354
|
-
"data-test-subj":
|
|
354
|
+
"data-test-subj": (0, _classnames.default)('comboBoxOptionsList', dataTestSubj),
|
|
355
355
|
style: _objectSpread(_objectSpread({}, style), {}, {
|
|
356
356
|
zIndex: zIndex
|
|
357
357
|
}),
|
|
@@ -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="
|
|
16
|
+
/// <reference types="cypress" />
|
|
17
|
+
/// <reference types="cypress-real-events" />
|
|
18
|
+
/// <reference types="../../../cypress/support" />
|
|
17
19
|
|
|
18
20
|
var items = [(0, _react2.jsx)(_context_menu_item.EuiContextMenuItem, {
|
|
19
21
|
key: "A",
|
|
@@ -20,14 +20,13 @@ var Copy = function Copy() {
|
|
|
20
20
|
_useState2 = _slicedToArray(_useState, 2),
|
|
21
21
|
copyText = _useState2[0],
|
|
22
22
|
setCopyText = _useState2[1];
|
|
23
|
-
var onChange = function onChange(e) {
|
|
24
|
-
setCopyText(e.target.value);
|
|
25
|
-
};
|
|
26
23
|
return (0, _react2.jsx)("div", null, (0, _react2.jsx)(_form.EuiFormRow, {
|
|
27
24
|
label: "Enter text that will be copied to clipboard"
|
|
28
25
|
}, (0, _react2.jsx)(_form.EuiFieldText, {
|
|
29
26
|
value: copyText,
|
|
30
|
-
onChange: onChange
|
|
27
|
+
onChange: function onChange(e) {
|
|
28
|
+
return setCopyText(e.target.value);
|
|
29
|
+
}
|
|
31
30
|
})), (0, _react2.jsx)(_spacer.EuiSpacer, {
|
|
32
31
|
size: "m"
|
|
33
32
|
}), (0, _react2.jsx)(_copy.EuiCopy, {
|