@elastic/eui 88.2.0 → 88.4.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 +0 -167
- package/dist/eui_theme_dark.min.css +1 -1
- package/dist/eui_theme_light.css +0 -167
- package/dist/eui_theme_light.min.css +1 -1
- package/es/components/accordion/accordion.js +35 -208
- package/es/components/accordion/accordion.styles.js +3 -95
- package/es/components/accordion/accordion_children/accordion_children.js +101 -0
- package/es/components/accordion/accordion_children/accordion_children.styles.js +39 -0
- package/es/components/accordion/accordion_children/accordion_children_loading.js +31 -0
- package/es/components/accordion/accordion_children/index.js +9 -0
- package/es/components/accordion/accordion_trigger/accordion_arrow.js +41 -0
- package/es/components/accordion/accordion_trigger/accordion_arrow.styles.js +46 -0
- package/es/components/accordion/accordion_trigger/accordion_button.js +51 -0
- package/es/components/accordion/accordion_trigger/accordion_button.styles.js +26 -0
- package/es/components/accordion/accordion_trigger/accordion_trigger.js +87 -0
- package/es/components/accordion/accordion_trigger/index.js +9 -0
- package/es/components/avatar/avatar.js +1 -1
- package/es/components/badge/badge.js +1 -1
- package/es/components/badge/beta_badge/beta_badge.js +1 -1
- package/es/components/basic_table/basic_table.js +1 -1
- package/es/components/basic_table/collapsed_item_actions.js +1 -1
- package/es/components/basic_table/in_memory_table.js +86 -35
- package/es/components/button/button_display/_button_display.js +1 -1
- package/es/components/button/button_display/_button_display_content.js +1 -1
- package/es/components/button/button_empty/button_empty.js +1 -1
- package/es/components/button/button_group/button_group.js +1 -1
- package/es/components/button/button_group/button_group_button.js +1 -1
- package/es/components/button/button_icon/button_icon.js +1 -1
- package/es/components/call_out/call_out.js +1 -1
- package/es/components/card/card.js +4 -4
- package/es/components/collapsible_nav/collapsible_nav_group/collapsible_nav_group.js +1 -1
- package/es/components/collapsible_nav/collapsible_nav_group/collapsible_nav_group.styles.js +1 -1
- package/es/components/collapsible_nav_beta/collapsible_nav_item/collapsed/collapsed_nav_button.js +2 -2
- package/es/components/collapsible_nav_beta/collapsible_nav_item/collapsed/collapsed_nav_item.js +2 -2
- package/es/components/collapsible_nav_beta/collapsible_nav_item/collapsed/collapsed_nav_popover.js +3 -3
- package/es/components/collapsible_nav_beta/collapsible_nav_item/collapsible_nav_accordion.js +2 -2
- package/es/components/collapsible_nav_beta/collapsible_nav_item/collapsible_nav_accordion.styles.js +1 -1
- package/es/components/collapsible_nav_beta/collapsible_nav_item/collapsible_nav_item.js +3 -3
- package/es/components/combo_box/combo_box.js +16 -4
- package/es/components/combo_box/combo_box_input/combo_box_input.js +4 -1
- package/es/components/combo_box/combo_box_input/combo_box_pill.js +5 -1
- package/es/components/combo_box/combo_box_options_list/combo_box_option.js +2 -0
- package/es/components/combo_box/combo_box_options_list/combo_box_options_list.js +59 -15
- package/es/components/comment_list/comment.js +2 -2
- package/es/components/comment_list/comment_event.js +1 -1
- package/es/components/comment_list/comment_list.js +2 -2
- package/es/components/comment_list/comment_timeline.js +1 -1
- package/es/components/datagrid/body/data_grid_body.js +13 -13
- package/es/components/datagrid/body/data_grid_body_custom.js +13 -13
- package/es/components/datagrid/body/data_grid_body_virtualized.js +13 -13
- package/es/components/datagrid/body/data_grid_cell.js +24 -24
- package/es/components/datagrid/body/header/data_grid_header_cell.js +12 -12
- package/es/components/datagrid/body/header/data_grid_header_row.js +13 -13
- package/es/components/datagrid/controls/column_selector.js +5 -3
- package/es/components/datagrid/controls/column_sorting_draggable.js +5 -2
- package/es/components/datagrid/data_grid.js +13 -13
- package/es/components/datagrid/utils/in_memory.js +12 -12
- package/es/components/date_picker/date_picker.js +2 -2
- package/es/components/date_picker/date_picker_range.js +1 -1
- package/es/components/description_list/description_list_title.js +0 -1
- package/es/components/description_list/description_list_title.styles.js +1 -1
- package/es/components/drag_and_drop/draggable.js +18 -23
- package/es/components/drag_and_drop/draggable.styles.js +56 -0
- package/es/components/drag_and_drop/droppable.js +24 -21
- package/es/components/drag_and_drop/droppable.styles.js +51 -0
- package/es/components/empty_prompt/empty_prompt.js +1 -1
- package/es/components/facet/facet_button.js +1 -1
- package/es/components/form/field_number/field_number.js +1 -1
- package/es/components/form/field_text/field_text.js +2 -2
- package/es/components/form/form_control_layout/form_control_layout.js +2 -2
- package/es/components/form/form_control_layout/form_control_layout_custom_icon.js +1 -1
- package/es/components/form/form_control_layout/form_control_layout_icons.js +2 -2
- package/es/components/header/header_links/header_link.js +1 -1
- package/es/components/header/header_links/header_links.js +1 -1
- package/es/components/header/header_logo/header_logo.js +1 -1
- package/es/components/header/header_section/header_section_item_button.js +1 -1
- package/es/components/icon/assets/grabOmnidirectional.js +33 -0
- package/es/components/icon/assets/transitionLeftIn.js +36 -0
- package/es/components/icon/assets/transitionLeftOut.js +36 -0
- package/es/components/icon/assets/transitionTopIn.js +36 -0
- package/es/components/icon/assets/transitionTopOut.js +36 -0
- package/es/components/icon/icon.js +1 -1
- package/es/components/icon/icon_map.js +5 -0
- package/es/components/inline_edit/inline_edit_form.js +49 -13
- package/es/components/inline_edit/inline_edit_text.js +22 -23
- package/es/components/inline_edit/inline_edit_title.js +22 -23
- package/es/components/key_pad_menu/key_pad_menu_item.js +1 -1
- package/es/components/list_group/list_group.js +2 -2
- package/es/components/list_group/list_group_item.js +3 -3
- package/es/components/list_group/list_group_item_extra_action.js +1 -1
- package/es/components/list_group/pinnable_list_group/pinnable_list_group.js +4 -4
- package/es/components/loading/loading_logo.js +1 -1
- package/es/components/markdown_editor/markdown_editor.js +1 -1
- package/es/components/markdown_editor/markdown_editor_drop_zone.js +1 -1
- package/es/components/markdown_editor/markdown_editor_footer.js +1 -1
- package/es/components/markdown_editor/markdown_editor_toolbar.js +1 -1
- package/es/components/notification/notification_event.js +2 -2
- package/es/components/notification/notification_event_meta.js +1 -1
- package/es/components/page/page_header/page_header_content.js +1 -1
- package/es/components/pagination/pagination_button.js +1 -1
- package/es/components/panel/split_panel/split_panel.js +9 -7
- package/es/components/panel/split_panel/split_panel.styles.js +40 -0
- package/es/components/search_bar/search_box.js +54 -88
- package/es/components/selectable/selectable_list/selectable_list.js +1 -1
- package/es/components/selectable/selectable_list/selectable_list_item.js +1 -1
- package/es/components/selectable/selectable_templates/selectable_template_sitewide.js +1 -1
- package/es/components/suggest/suggest.js +1 -1
- package/es/components/suggest/suggest_item.js +1 -1
- package/es/components/table/table_header_button.js +1 -1
- package/es/components/table/table_pagination/table_pagination.js +1 -0
- package/es/components/text_truncate/utils.js +1 -1
- package/es/components/timeline/timeline_item_icon.js +1 -1
- package/es/components/toast/global_toast_list.js +51 -3
- package/es/components/toast/global_toast_list.styles.js +3 -2
- package/es/components/toast/toast.js +1 -1
- package/es/components/tool_tip/icon_tip.js +1 -1
- package/es/test/rtl/custom_render.js +1 -1
- package/eui.d.ts +669 -459
- package/i18ntokens.json +202 -112
- package/lib/components/accordion/accordion.js +34 -207
- package/lib/components/accordion/accordion.styles.js +12 -109
- package/lib/components/accordion/accordion_children/accordion_children.js +111 -0
- package/lib/components/accordion/accordion_children/accordion_children.styles.js +45 -0
- package/lib/components/accordion/accordion_children/accordion_children_loading.js +38 -0
- package/lib/components/accordion/accordion_children/index.js +12 -0
- package/lib/components/accordion/accordion_trigger/accordion_arrow.js +48 -0
- package/lib/components/accordion/accordion_trigger/accordion_arrow.styles.js +51 -0
- package/lib/components/accordion/accordion_trigger/accordion_button.js +58 -0
- package/lib/components/accordion/accordion_trigger/accordion_button.styles.js +33 -0
- package/lib/components/accordion/accordion_trigger/accordion_trigger.js +93 -0
- package/lib/components/accordion/accordion_trigger/index.js +12 -0
- package/lib/components/avatar/avatar.js +1 -1
- package/lib/components/badge/badge.js +1 -1
- package/lib/components/badge/beta_badge/beta_badge.js +1 -1
- package/lib/components/basic_table/basic_table.js +1 -1
- package/lib/components/basic_table/collapsed_item_actions.js +1 -1
- package/lib/components/basic_table/in_memory_table.js +86 -35
- package/lib/components/button/button_display/_button_display.js +1 -1
- package/lib/components/button/button_display/_button_display_content.js +1 -1
- package/lib/components/button/button_empty/button_empty.js +1 -1
- package/lib/components/button/button_group/button_group.js +1 -1
- package/lib/components/button/button_group/button_group_button.js +1 -1
- package/lib/components/button/button_icon/button_icon.js +1 -1
- package/lib/components/call_out/call_out.js +1 -1
- package/lib/components/card/card.js +4 -4
- package/lib/components/collapsible_nav/collapsible_nav_group/collapsible_nav_group.js +1 -1
- package/lib/components/collapsible_nav/collapsible_nav_group/collapsible_nav_group.styles.js +1 -1
- package/lib/components/collapsible_nav_beta/collapsible_nav_item/collapsed/collapsed_nav_button.js +2 -2
- package/lib/components/collapsible_nav_beta/collapsible_nav_item/collapsed/collapsed_nav_item.js +2 -2
- package/lib/components/collapsible_nav_beta/collapsible_nav_item/collapsed/collapsed_nav_popover.js +3 -3
- package/lib/components/collapsible_nav_beta/collapsible_nav_item/collapsible_nav_accordion.js +2 -2
- package/lib/components/collapsible_nav_beta/collapsible_nav_item/collapsible_nav_accordion.styles.js +1 -1
- package/lib/components/collapsible_nav_beta/collapsible_nav_item/collapsible_nav_item.js +3 -3
- package/lib/components/combo_box/combo_box.js +16 -4
- package/lib/components/combo_box/combo_box_input/combo_box_input.js +4 -1
- package/lib/components/combo_box/combo_box_input/combo_box_pill.js +5 -1
- package/lib/components/combo_box/combo_box_options_list/combo_box_option.js +2 -0
- package/lib/components/combo_box/combo_box_options_list/combo_box_options_list.js +59 -15
- package/lib/components/comment_list/comment.js +2 -2
- package/lib/components/comment_list/comment_event.js +1 -1
- package/lib/components/comment_list/comment_list.js +2 -2
- package/lib/components/comment_list/comment_timeline.js +1 -1
- package/lib/components/datagrid/body/data_grid_body.js +13 -13
- package/lib/components/datagrid/body/data_grid_body_custom.js +13 -13
- package/lib/components/datagrid/body/data_grid_body_virtualized.js +13 -13
- package/lib/components/datagrid/body/data_grid_cell.js +24 -24
- package/lib/components/datagrid/body/header/data_grid_header_cell.js +12 -12
- package/lib/components/datagrid/body/header/data_grid_header_row.js +13 -13
- package/lib/components/datagrid/controls/column_selector.js +4 -2
- package/lib/components/datagrid/controls/column_sorting_draggable.js +5 -2
- package/lib/components/datagrid/data_grid.js +13 -13
- package/lib/components/datagrid/utils/in_memory.js +12 -12
- package/lib/components/date_picker/date_picker.js +2 -2
- package/lib/components/date_picker/date_picker_range.js +1 -1
- package/lib/components/description_list/description_list_title.js +0 -1
- package/lib/components/description_list/description_list_title.styles.js +1 -1
- package/lib/components/drag_and_drop/draggable.js +17 -22
- package/lib/components/drag_and_drop/draggable.styles.js +62 -0
- package/lib/components/drag_and_drop/droppable.js +26 -22
- package/lib/components/drag_and_drop/droppable.styles.js +57 -0
- package/lib/components/empty_prompt/empty_prompt.js +1 -1
- package/lib/components/facet/facet_button.js +1 -1
- package/lib/components/form/field_number/field_number.js +1 -1
- package/lib/components/form/field_text/field_text.js +2 -2
- package/lib/components/form/form_control_layout/form_control_layout.js +2 -2
- package/lib/components/form/form_control_layout/form_control_layout_custom_icon.js +1 -1
- package/lib/components/form/form_control_layout/form_control_layout_icons.js +2 -2
- package/lib/components/header/header_links/header_link.js +1 -1
- package/lib/components/header/header_links/header_links.js +1 -1
- package/lib/components/header/header_logo/header_logo.js +1 -1
- package/lib/components/header/header_section/header_section_item_button.js +1 -1
- package/lib/components/icon/assets/grabOmnidirectional.js +41 -0
- package/lib/components/icon/assets/transitionLeftIn.js +44 -0
- package/lib/components/icon/assets/transitionLeftOut.js +44 -0
- package/lib/components/icon/assets/transitionTopIn.js +44 -0
- package/lib/components/icon/assets/transitionTopOut.js +44 -0
- package/lib/components/icon/icon.js +1 -1
- package/lib/components/icon/icon_map.js +5 -0
- package/lib/components/icon/svgs/grabOmnidirectional.svg +3 -0
- package/lib/components/icon/svgs/transitionLeftIn.svg +4 -0
- package/lib/components/icon/svgs/transitionLeftOut.svg +4 -0
- package/lib/components/icon/svgs/transitionTopIn.svg +4 -0
- package/lib/components/icon/svgs/transitionTopOut.svg +4 -0
- package/lib/components/inline_edit/inline_edit_form.js +58 -20
- package/lib/components/inline_edit/inline_edit_text.js +22 -23
- package/lib/components/inline_edit/inline_edit_title.js +22 -23
- package/lib/components/key_pad_menu/key_pad_menu_item.js +1 -1
- package/lib/components/list_group/list_group.js +2 -2
- package/lib/components/list_group/list_group_item.js +3 -3
- package/lib/components/list_group/list_group_item_extra_action.js +1 -1
- package/lib/components/list_group/pinnable_list_group/pinnable_list_group.js +4 -4
- package/lib/components/loading/loading_logo.js +1 -1
- package/lib/components/markdown_editor/markdown_editor.js +1 -1
- package/lib/components/markdown_editor/markdown_editor_drop_zone.js +1 -1
- package/lib/components/markdown_editor/markdown_editor_footer.js +1 -1
- package/lib/components/markdown_editor/markdown_editor_toolbar.js +1 -1
- package/lib/components/notification/notification_event.js +2 -2
- package/lib/components/notification/notification_event_meta.js +1 -1
- package/lib/components/page/page_header/page_header_content.js +1 -1
- package/lib/components/panel/split_panel/split_panel.js +9 -7
- package/lib/components/panel/split_panel/split_panel.styles.js +46 -0
- package/lib/components/search_bar/search_box.js +61 -93
- package/lib/components/selectable/selectable_list/selectable_list.js +1 -1
- package/lib/components/selectable/selectable_list/selectable_list_item.js +1 -1
- package/lib/components/selectable/selectable_templates/selectable_template_sitewide.js +1 -1
- package/lib/components/suggest/suggest.js +1 -1
- package/lib/components/suggest/suggest_item.js +1 -1
- package/lib/components/table/table_header_button.js +1 -1
- package/lib/components/table/table_pagination/table_pagination.js +1 -0
- package/lib/components/text_truncate/utils.js +1 -1
- package/lib/components/timeline/timeline_item_icon.js +1 -1
- package/lib/components/toast/global_toast_list.js +53 -4
- package/lib/components/toast/global_toast_list.styles.js +3 -2
- package/lib/components/toast/toast.js +1 -1
- package/lib/components/tool_tip/icon_tip.js +1 -1
- package/lib/test/rtl/custom_render.js +2 -2
- package/optimize/es/components/accordion/accordion.js +35 -203
- package/optimize/es/components/accordion/accordion.styles.js +3 -95
- package/optimize/es/components/accordion/accordion_children/accordion_children.js +91 -0
- package/optimize/es/components/accordion/accordion_children/accordion_children.styles.js +39 -0
- package/optimize/es/components/accordion/accordion_children/accordion_children_loading.js +31 -0
- package/optimize/es/components/accordion/accordion_children/index.js +9 -0
- package/optimize/es/components/accordion/accordion_trigger/accordion_arrow.js +36 -0
- package/optimize/es/components/accordion/accordion_trigger/accordion_arrow.styles.js +46 -0
- package/optimize/es/components/accordion/accordion_trigger/accordion_button.js +45 -0
- package/optimize/es/components/accordion/accordion_trigger/accordion_button.styles.js +26 -0
- package/optimize/es/components/accordion/accordion_trigger/accordion_trigger.js +80 -0
- package/optimize/es/components/accordion/accordion_trigger/index.js +9 -0
- package/optimize/es/components/basic_table/in_memory_table.js +62 -34
- package/optimize/es/components/card/card.js +3 -3
- package/optimize/es/components/collapsible_nav/collapsible_nav_group/collapsible_nav_group.styles.js +1 -1
- package/optimize/es/components/collapsible_nav_beta/collapsible_nav_item/collapsible_nav_accordion.styles.js +1 -1
- package/optimize/es/components/combo_box/combo_box.js +6 -4
- package/optimize/es/components/combo_box/combo_box_input/combo_box_input.js +2 -1
- package/optimize/es/components/combo_box/combo_box_input/combo_box_pill.js +3 -1
- package/optimize/es/components/combo_box/combo_box_options_list/combo_box_options_list.js +49 -12
- package/optimize/es/components/datagrid/controls/column_selector.js +5 -3
- package/optimize/es/components/datagrid/controls/column_sorting_draggable.js +4 -1
- package/optimize/es/components/description_list/description_list_title.js +0 -1
- package/optimize/es/components/description_list/description_list_title.styles.js +1 -1
- package/optimize/es/components/drag_and_drop/draggable.js +17 -22
- package/optimize/es/components/drag_and_drop/draggable.styles.js +56 -0
- package/optimize/es/components/drag_and_drop/droppable.js +23 -20
- package/optimize/es/components/drag_and_drop/droppable.styles.js +51 -0
- package/optimize/es/components/icon/assets/grabOmnidirectional.js +32 -0
- package/optimize/es/components/icon/assets/transitionLeftIn.js +35 -0
- package/optimize/es/components/icon/assets/transitionLeftOut.js +35 -0
- package/optimize/es/components/icon/assets/transitionTopIn.js +35 -0
- package/optimize/es/components/icon/assets/transitionTopOut.js +35 -0
- package/optimize/es/components/icon/icon_map.js +5 -0
- package/optimize/es/components/inline_edit/inline_edit_form.js +32 -12
- package/optimize/es/components/inline_edit/inline_edit_text.js +6 -22
- package/optimize/es/components/inline_edit/inline_edit_title.js +6 -22
- package/optimize/es/components/list_group/list_group_item.js +1 -1
- package/optimize/es/components/panel/split_panel/split_panel.js +9 -7
- package/optimize/es/components/panel/split_panel/split_panel.styles.js +40 -0
- package/optimize/es/components/search_bar/search_box.js +50 -83
- package/optimize/es/components/table/table_pagination/table_pagination.js +1 -0
- package/optimize/es/components/text_truncate/utils.js +1 -1
- package/optimize/es/components/toast/global_toast_list.js +39 -2
- package/optimize/es/components/toast/global_toast_list.styles.js +3 -2
- package/optimize/es/test/rtl/custom_render.js +1 -1
- package/optimize/lib/components/accordion/accordion.js +34 -202
- package/optimize/lib/components/accordion/accordion.styles.js +12 -109
- package/optimize/lib/components/accordion/accordion_children/accordion_children.js +101 -0
- package/optimize/lib/components/accordion/accordion_children/accordion_children.styles.js +45 -0
- package/optimize/lib/components/accordion/accordion_children/accordion_children_loading.js +38 -0
- package/optimize/lib/components/accordion/accordion_children/index.js +12 -0
- package/optimize/lib/components/accordion/accordion_trigger/accordion_arrow.js +43 -0
- package/optimize/lib/components/accordion/accordion_trigger/accordion_arrow.styles.js +51 -0
- package/optimize/lib/components/accordion/accordion_trigger/accordion_button.js +52 -0
- package/optimize/lib/components/accordion/accordion_trigger/accordion_button.styles.js +33 -0
- package/optimize/lib/components/accordion/accordion_trigger/accordion_trigger.js +86 -0
- package/optimize/lib/components/accordion/accordion_trigger/index.js +12 -0
- package/optimize/lib/components/basic_table/in_memory_table.js +62 -34
- package/optimize/lib/components/card/card.js +3 -3
- package/optimize/lib/components/collapsible_nav/collapsible_nav_group/collapsible_nav_group.styles.js +1 -1
- package/optimize/lib/components/collapsible_nav_beta/collapsible_nav_item/collapsible_nav_accordion.styles.js +1 -1
- package/optimize/lib/components/combo_box/combo_box.js +6 -4
- package/optimize/lib/components/combo_box/combo_box_input/combo_box_input.js +2 -1
- package/optimize/lib/components/combo_box/combo_box_input/combo_box_pill.js +3 -1
- package/optimize/lib/components/combo_box/combo_box_options_list/combo_box_options_list.js +49 -12
- package/optimize/lib/components/datagrid/controls/column_selector.js +4 -2
- package/optimize/lib/components/datagrid/controls/column_sorting_draggable.js +4 -1
- package/optimize/lib/components/description_list/description_list_title.js +0 -1
- package/optimize/lib/components/description_list/description_list_title.styles.js +1 -1
- package/optimize/lib/components/drag_and_drop/draggable.js +16 -21
- package/optimize/lib/components/drag_and_drop/draggable.styles.js +62 -0
- package/optimize/lib/components/drag_and_drop/droppable.js +25 -21
- package/optimize/lib/components/drag_and_drop/droppable.styles.js +57 -0
- package/optimize/lib/components/icon/assets/grabOmnidirectional.js +41 -0
- package/optimize/lib/components/icon/assets/transitionLeftIn.js +44 -0
- package/optimize/lib/components/icon/assets/transitionLeftOut.js +44 -0
- package/optimize/lib/components/icon/assets/transitionTopIn.js +44 -0
- package/optimize/lib/components/icon/assets/transitionTopOut.js +44 -0
- package/optimize/lib/components/icon/icon_map.js +5 -0
- package/optimize/lib/components/icon/svgs/grabOmnidirectional.svg +3 -0
- package/optimize/lib/components/icon/svgs/transitionLeftIn.svg +4 -0
- package/optimize/lib/components/icon/svgs/transitionLeftOut.svg +4 -0
- package/optimize/lib/components/icon/svgs/transitionTopIn.svg +4 -0
- package/optimize/lib/components/icon/svgs/transitionTopOut.svg +4 -0
- package/optimize/lib/components/inline_edit/inline_edit_form.js +33 -16
- package/optimize/lib/components/inline_edit/inline_edit_text.js +6 -22
- package/optimize/lib/components/inline_edit/inline_edit_title.js +6 -22
- package/optimize/lib/components/list_group/list_group_item.js +1 -1
- package/optimize/lib/components/panel/split_panel/split_panel.js +9 -7
- package/optimize/lib/components/panel/split_panel/split_panel.styles.js +46 -0
- package/optimize/lib/components/search_bar/search_box.js +57 -89
- package/optimize/lib/components/table/table_pagination/table_pagination.js +1 -0
- package/optimize/lib/components/text_truncate/utils.js +1 -1
- package/optimize/lib/components/toast/global_toast_list.js +41 -3
- package/optimize/lib/components/toast/global_toast_list.styles.js +3 -2
- package/optimize/lib/test/rtl/custom_render.js +2 -2
- package/package.json +6 -6
- package/src/components/combo_box/combo_box_input/_combo_box_pill.scss +0 -1
- package/src/components/index.scss +0 -2
- package/src/themes/amsterdam/overrides/_index.scss +0 -1
- package/test-env/components/accordion/accordion.js +34 -202
- package/test-env/components/accordion/accordion.styles.js +12 -109
- package/test-env/components/accordion/accordion_children/accordion_children.js +105 -0
- package/test-env/components/accordion/accordion_children/accordion_children.styles.js +45 -0
- package/test-env/components/accordion/accordion_children/accordion_children_loading.js +38 -0
- package/test-env/components/accordion/accordion_children/index.js +12 -0
- package/test-env/components/accordion/accordion_trigger/accordion_arrow.js +47 -0
- package/test-env/components/accordion/accordion_trigger/accordion_arrow.styles.js +51 -0
- package/test-env/components/accordion/accordion_trigger/accordion_button.js +52 -0
- package/test-env/components/accordion/accordion_trigger/accordion_button.styles.js +33 -0
- package/test-env/components/accordion/accordion_trigger/accordion_trigger.js +93 -0
- package/test-env/components/accordion/accordion_trigger/index.js +12 -0
- package/test-env/components/avatar/avatar.js +1 -1
- package/test-env/components/badge/badge.js +1 -1
- package/test-env/components/badge/beta_badge/beta_badge.js +1 -1
- package/test-env/components/basic_table/basic_table.js +1 -1
- package/test-env/components/basic_table/collapsed_item_actions.js +1 -1
- package/test-env/components/basic_table/in_memory_table.js +86 -35
- package/test-env/components/button/button_display/_button_display.js +1 -1
- package/test-env/components/button/button_display/_button_display_content.js +1 -1
- package/test-env/components/button/button_empty/button_empty.js +1 -1
- package/test-env/components/button/button_group/button_group.js +1 -1
- package/test-env/components/button/button_group/button_group_button.js +1 -1
- package/test-env/components/button/button_icon/button_icon.js +1 -1
- package/test-env/components/call_out/call_out.js +1 -1
- package/test-env/components/card/card.js +4 -4
- package/test-env/components/collapsible_nav/collapsible_nav_group/collapsible_nav_group.js +1 -1
- package/test-env/components/collapsible_nav/collapsible_nav_group/collapsible_nav_group.styles.js +1 -1
- package/test-env/components/collapsible_nav_beta/collapsible_nav_item/collapsed/collapsed_nav_button.js +2 -2
- package/test-env/components/collapsible_nav_beta/collapsible_nav_item/collapsed/collapsed_nav_item.js +2 -2
- package/test-env/components/collapsible_nav_beta/collapsible_nav_item/collapsed/collapsed_nav_popover.js +3 -3
- package/test-env/components/collapsible_nav_beta/collapsible_nav_item/collapsible_nav_accordion.js +2 -2
- package/test-env/components/collapsible_nav_beta/collapsible_nav_item/collapsible_nav_accordion.styles.js +1 -1
- package/test-env/components/collapsible_nav_beta/collapsible_nav_item/collapsible_nav_item.js +3 -3
- package/test-env/components/combo_box/combo_box.js +16 -4
- package/test-env/components/combo_box/combo_box_input/combo_box_input.js +4 -1
- package/test-env/components/combo_box/combo_box_input/combo_box_pill.js +5 -1
- package/test-env/components/combo_box/combo_box_options_list/combo_box_option.js +2 -0
- package/test-env/components/combo_box/combo_box_options_list/combo_box_options_list.js +58 -14
- package/test-env/components/comment_list/comment.js +2 -2
- package/test-env/components/comment_list/comment_event.js +1 -1
- package/test-env/components/comment_list/comment_list.js +2 -2
- package/test-env/components/comment_list/comment_timeline.js +1 -1
- package/test-env/components/datagrid/body/data_grid_body.js +13 -13
- package/test-env/components/datagrid/body/data_grid_body_custom.js +13 -13
- package/test-env/components/datagrid/body/data_grid_body_virtualized.js +13 -13
- package/test-env/components/datagrid/body/data_grid_cell.js +24 -24
- package/test-env/components/datagrid/body/header/data_grid_header_cell.js +12 -12
- package/test-env/components/datagrid/body/header/data_grid_header_row.js +13 -13
- package/test-env/components/datagrid/controls/column_selector.js +4 -2
- package/test-env/components/datagrid/controls/column_sorting_draggable.js +5 -2
- package/test-env/components/datagrid/data_grid.js +13 -13
- package/test-env/components/datagrid/utils/in_memory.js +12 -12
- package/test-env/components/date_picker/date_picker.js +2 -2
- package/test-env/components/date_picker/date_picker_range.js +1 -1
- package/test-env/components/description_list/description_list_title.js +0 -1
- package/test-env/components/description_list/description_list_title.styles.js +1 -1
- package/test-env/components/drag_and_drop/draggable.js +17 -22
- package/test-env/components/drag_and_drop/draggable.styles.js +62 -0
- package/test-env/components/drag_and_drop/droppable.js +26 -22
- package/test-env/components/drag_and_drop/droppable.styles.js +57 -0
- package/test-env/components/empty_prompt/empty_prompt.js +1 -1
- package/test-env/components/facet/facet_button.js +1 -1
- package/test-env/components/form/field_number/field_number.js +1 -1
- package/test-env/components/form/field_text/field_text.js +2 -2
- package/test-env/components/form/form_control_layout/form_control_layout.js +2 -2
- package/test-env/components/form/form_control_layout/form_control_layout_custom_icon.js +1 -1
- package/test-env/components/form/form_control_layout/form_control_layout_icons.js +2 -2
- package/test-env/components/header/header_links/header_link.js +1 -1
- package/test-env/components/header/header_links/header_links.js +1 -1
- package/test-env/components/header/header_logo/header_logo.js +1 -1
- package/test-env/components/header/header_section/header_section_item_button.js +1 -1
- package/test-env/components/icon/assets/grabOmnidirectional.js +41 -0
- package/test-env/components/icon/assets/transitionLeftIn.js +44 -0
- package/test-env/components/icon/assets/transitionLeftOut.js +44 -0
- package/test-env/components/icon/assets/transitionTopIn.js +44 -0
- package/test-env/components/icon/assets/transitionTopOut.js +44 -0
- package/test-env/components/icon/icon_map.js +5 -0
- package/test-env/components/inline_edit/inline_edit_form.js +49 -17
- package/test-env/components/inline_edit/inline_edit_text.js +22 -23
- package/test-env/components/inline_edit/inline_edit_title.js +22 -23
- package/test-env/components/key_pad_menu/key_pad_menu_item.js +1 -1
- package/test-env/components/list_group/list_group.js +2 -2
- package/test-env/components/list_group/list_group_item.js +3 -3
- package/test-env/components/list_group/list_group_item_extra_action.js +1 -1
- package/test-env/components/list_group/pinnable_list_group/pinnable_list_group.js +4 -4
- package/test-env/components/loading/loading_logo.js +1 -1
- package/test-env/components/markdown_editor/markdown_editor.js +1 -1
- package/test-env/components/markdown_editor/markdown_editor_drop_zone.js +1 -1
- package/test-env/components/markdown_editor/markdown_editor_footer.js +1 -1
- package/test-env/components/markdown_editor/markdown_editor_toolbar.js +1 -1
- package/test-env/components/notification/notification_event.js +2 -2
- package/test-env/components/notification/notification_event_meta.js +1 -1
- package/test-env/components/page/page_header/page_header_content.js +1 -1
- package/test-env/components/panel/split_panel/split_panel.js +9 -7
- package/test-env/components/panel/split_panel/split_panel.styles.js +46 -0
- package/test-env/components/search_bar/search_box.js +60 -88
- package/test-env/components/selectable/selectable_list/selectable_list.js +1 -1
- package/test-env/components/selectable/selectable_list/selectable_list_item.js +1 -1
- package/test-env/components/selectable/selectable_templates/selectable_template_sitewide.js +1 -1
- package/test-env/components/suggest/suggest.js +1 -1
- package/test-env/components/suggest/suggest_item.js +1 -1
- package/test-env/components/table/table_header_button.js +1 -1
- package/test-env/components/table/table_pagination/table_pagination.js +1 -0
- package/test-env/components/text_truncate/utils.js +1 -1
- package/test-env/components/timeline/timeline_item_icon.js +1 -1
- package/test-env/components/toast/global_toast_list.js +53 -4
- package/test-env/components/toast/global_toast_list.styles.js +3 -2
- package/test-env/components/toast/toast.js +1 -1
- package/test-env/components/tool_tip/icon_tip.js +1 -1
- package/test-env/test/rtl/custom_render.js +2 -2
- package/src/components/drag_and_drop/_draggable.scss +0 -41
- package/src/components/drag_and_drop/_droppable.scss +0 -40
- package/src/components/drag_and_drop/_index.scss +0 -3
- package/src/components/drag_and_drop/_variables.scss +0 -5
- package/src/components/panel/_index.scss +0 -1
- package/src/components/panel/_panel.scss +0 -9
- package/src/components/panel/split_panel/_index.scss +0 -1
- package/src/components/panel/split_panel/_split_panel.scss +0 -21
- package/src/themes/amsterdam/overrides/_description_list.scss +0 -7
|
@@ -0,0 +1,46 @@
|
|
|
1
|
+
function _EMOTION_STRINGIFIED_CSS_ERROR__() { return "You have tried to stringify object returned from `css` function. It isn't supposed to be used directly (e.g. as value of the `className` prop), but rather handed to emotion so it can handle it (e.g. as value of `css` prop)."; }
|
|
2
|
+
/*
|
|
3
|
+
* Copyright Elasticsearch B.V. and/or licensed to Elasticsearch B.V. under one
|
|
4
|
+
* or more contributor license agreements. Licensed under the Elastic License
|
|
5
|
+
* 2.0 and the Server Side Public License, v 1; you may not use this file except
|
|
6
|
+
* in compliance with, at your election, the Elastic License 2.0 or the Server
|
|
7
|
+
* Side Public License, v 1.
|
|
8
|
+
*/
|
|
9
|
+
|
|
10
|
+
import { css } from '@emotion/react';
|
|
11
|
+
import { logicalCSS } from '../../../global_styling';
|
|
12
|
+
var _ref = process.env.NODE_ENV === "production" ? {
|
|
13
|
+
name: "pbbcf-isOpen",
|
|
14
|
+
styles: "transform:rotate(90deg)!important;label:isOpen;"
|
|
15
|
+
} : {
|
|
16
|
+
name: "pbbcf-isOpen",
|
|
17
|
+
styles: "transform:rotate(90deg)!important;label:isOpen;",
|
|
18
|
+
toString: _EMOTION_STRINGIFIED_CSS_ERROR__
|
|
19
|
+
};
|
|
20
|
+
var _ref2 = process.env.NODE_ENV === "production" ? {
|
|
21
|
+
name: "67rr15-isClosed",
|
|
22
|
+
styles: "transform:rotate(0deg)!important;label:isClosed;"
|
|
23
|
+
} : {
|
|
24
|
+
name: "67rr15-isClosed",
|
|
25
|
+
styles: "transform:rotate(0deg)!important;label:isClosed;",
|
|
26
|
+
toString: _EMOTION_STRINGIFIED_CSS_ERROR__
|
|
27
|
+
};
|
|
28
|
+
var _ref3 = process.env.NODE_ENV === "production" ? {
|
|
29
|
+
name: "ixe809-euiAccordion__arrow",
|
|
30
|
+
styles: "flex-shrink:0;label:euiAccordion__arrow;"
|
|
31
|
+
} : {
|
|
32
|
+
name: "ixe809-euiAccordion__arrow",
|
|
33
|
+
styles: "flex-shrink:0;label:euiAccordion__arrow;",
|
|
34
|
+
toString: _EMOTION_STRINGIFIED_CSS_ERROR__
|
|
35
|
+
};
|
|
36
|
+
export var euiAccordionArrowStyles = function euiAccordionArrowStyles(_ref4) {
|
|
37
|
+
var euiTheme = _ref4.euiTheme;
|
|
38
|
+
return {
|
|
39
|
+
euiAccordion__arrow: _ref3,
|
|
40
|
+
left: /*#__PURE__*/css(logicalCSS('margin-right', euiTheme.size.xs), ";;label:left;"),
|
|
41
|
+
right: /*#__PURE__*/css(logicalCSS('margin-left', euiTheme.size.xs), ";;label:right;"),
|
|
42
|
+
// !important overrides EuiButtonIcon's default transforms
|
|
43
|
+
isClosed: _ref2,
|
|
44
|
+
isOpen: _ref
|
|
45
|
+
};
|
|
46
|
+
};
|
|
@@ -0,0 +1,45 @@
|
|
|
1
|
+
import _extends from "@babel/runtime/helpers/extends";
|
|
2
|
+
import _toConsumableArray from "@babel/runtime/helpers/toConsumableArray";
|
|
3
|
+
import _objectWithoutProperties from "@babel/runtime/helpers/objectWithoutProperties";
|
|
4
|
+
var _excluded = ["buttonElement", "buttonProps", "buttonClassName", "buttonContentClassName", "isDisabled", "arrowDisplay", "children"],
|
|
5
|
+
_excluded2 = ["paddingSize"];
|
|
6
|
+
/*
|
|
7
|
+
* Copyright Elasticsearch B.V. and/or licensed to Elasticsearch B.V. under one
|
|
8
|
+
* or more contributor license agreements. Licensed under the Elastic License
|
|
9
|
+
* 2.0 and the Server Side Public License, v 1; you may not use this file except
|
|
10
|
+
* in compliance with, at your election, the Elastic License 2.0 or the Server
|
|
11
|
+
* Side Public License, v 1.
|
|
12
|
+
*/
|
|
13
|
+
|
|
14
|
+
import React from 'react';
|
|
15
|
+
import classNames from 'classnames';
|
|
16
|
+
import { useEuiTheme } from '../../../services';
|
|
17
|
+
import { euiAccordionButtonStyles } from './accordion_button.styles';
|
|
18
|
+
import { jsx as ___EmotionJSX } from "@emotion/react";
|
|
19
|
+
export var EuiAccordionButton = function EuiAccordionButton(_ref) {
|
|
20
|
+
var ButtonElement = _ref.buttonElement,
|
|
21
|
+
_buttonProps = _ref.buttonProps,
|
|
22
|
+
buttonClassName = _ref.buttonClassName,
|
|
23
|
+
buttonContentClassName = _ref.buttonContentClassName,
|
|
24
|
+
isDisabled = _ref.isDisabled,
|
|
25
|
+
arrowDisplay = _ref.arrowDisplay,
|
|
26
|
+
children = _ref.children,
|
|
27
|
+
rest = _objectWithoutProperties(_ref, _excluded);
|
|
28
|
+
var _ref2 = _buttonProps || {},
|
|
29
|
+
paddingSize = _ref2.paddingSize,
|
|
30
|
+
buttonProps = _objectWithoutProperties(_ref2, _excluded2);
|
|
31
|
+
var classes = classNames('euiAccordion__button', buttonClassName, buttonProps.className);
|
|
32
|
+
var buttonContentClasses = classNames('euiAccordion__buttonContent', buttonContentClassName);
|
|
33
|
+
var euiTheme = useEuiTheme();
|
|
34
|
+
var styles = euiAccordionButtonStyles(euiTheme);
|
|
35
|
+
var cssStyles = [styles.euiAccordion__button, isDisabled && styles.disabled].concat(_toConsumableArray(paddingSize ? [styles[paddingSize], arrowDisplay === 'left' && styles.arrowLeft, arrowDisplay === 'right' && styles.arrowRight] : []), [buttonProps.css]);
|
|
36
|
+
var elementIsButton = ButtonElement === 'button';
|
|
37
|
+
return ___EmotionJSX(ButtonElement, _extends({}, buttonProps, rest, {
|
|
38
|
+
className: classes,
|
|
39
|
+
css: cssStyles,
|
|
40
|
+
type: elementIsButton ? 'button' : undefined,
|
|
41
|
+
disabled: elementIsButton ? isDisabled : undefined
|
|
42
|
+
}), ___EmotionJSX("span", {
|
|
43
|
+
className: buttonContentClasses
|
|
44
|
+
}, children));
|
|
45
|
+
};
|
|
@@ -0,0 +1,26 @@
|
|
|
1
|
+
/*
|
|
2
|
+
* Copyright Elasticsearch B.V. and/or licensed to Elasticsearch B.V. under one
|
|
3
|
+
* or more contributor license agreements. Licensed under the Elastic License
|
|
4
|
+
* 2.0 and the Server Side Public License, v 1; you may not use this file except
|
|
5
|
+
* in compliance with, at your election, the Elastic License 2.0 or the Server
|
|
6
|
+
* Side Public License, v 1.
|
|
7
|
+
*/
|
|
8
|
+
|
|
9
|
+
import { css } from '@emotion/react';
|
|
10
|
+
import { euiFontSize, logicalCSS, logicalTextAlignCSS } from '../../../global_styling';
|
|
11
|
+
export var euiAccordionButtonStyles = function euiAccordionButtonStyles(euiThemeContext) {
|
|
12
|
+
var euiTheme = euiThemeContext.euiTheme;
|
|
13
|
+
return {
|
|
14
|
+
euiAccordion__button: /*#__PURE__*/css(euiFontSize(euiThemeContext, 's'), " align-items:center;display:flex;flex-grow:1;line-height:", euiTheme.size.l, ";", logicalTextAlignCSS('left'), " ", logicalCSS('width', '100%'), " &:hover,&:focus{cursor:pointer;text-decoration:underline;};label:euiAccordion__button;"),
|
|
15
|
+
// Triggering button needs separate `disabled` key because the element that renders may not support `:disabled`;
|
|
16
|
+
// Hover pseudo selector for specificity
|
|
17
|
+
disabled: /*#__PURE__*/css("&,&:hover{cursor:not-allowed;color:", euiTheme.colors.disabledText, ";text-decoration:none;};label:disabled;"),
|
|
18
|
+
// Optional padding sizes
|
|
19
|
+
s: /*#__PURE__*/css("padding:", euiTheme.size.s, ";;label:s;"),
|
|
20
|
+
m: /*#__PURE__*/css("padding:", euiTheme.size.base, ";;label:m;"),
|
|
21
|
+
l: /*#__PURE__*/css("padding:", euiTheme.size.l, ";;label:l;"),
|
|
22
|
+
// Remove padding from the accordion button on the side that the arrow is on
|
|
23
|
+
arrowLeft: /*#__PURE__*/css(logicalCSS('padding-left', 0), ";;label:arrowLeft;"),
|
|
24
|
+
arrowRight: /*#__PURE__*/css(logicalCSS('padding-right', 0), ";;label:arrowRight;")
|
|
25
|
+
};
|
|
26
|
+
};
|
|
@@ -0,0 +1,80 @@
|
|
|
1
|
+
function _EMOTION_STRINGIFIED_CSS_ERROR__() { return "You have tried to stringify object returned from `css` function. It isn't supposed to be used directly (e.g. as value of the `className` prop), but rather handed to emotion so it can handle it (e.g. as value of `css` prop)."; }
|
|
2
|
+
/*
|
|
3
|
+
* Copyright Elasticsearch B.V. and/or licensed to Elasticsearch B.V. under one
|
|
4
|
+
* or more contributor license agreements. Licensed under the Elastic License
|
|
5
|
+
* 2.0 and the Server Side Public License, v 1; you may not use this file except
|
|
6
|
+
* in compliance with, at your election, the Elastic License 2.0 or the Server
|
|
7
|
+
* Side Public License, v 1.
|
|
8
|
+
*/
|
|
9
|
+
|
|
10
|
+
import React from 'react';
|
|
11
|
+
import { EuiAccordionButton } from './accordion_button';
|
|
12
|
+
import { EuiAccordionArrow } from './accordion_arrow';
|
|
13
|
+
import { jsx as ___EmotionJSX } from "@emotion/react";
|
|
14
|
+
var _ref2 = process.env.NODE_ENV === "production" ? {
|
|
15
|
+
name: "7vgam2-euiAccordion-optionalAction",
|
|
16
|
+
styles: "flex-shrink:0;label:euiAccordion;label:optionalAction;"
|
|
17
|
+
} : {
|
|
18
|
+
name: "7vgam2-euiAccordion-optionalAction",
|
|
19
|
+
styles: "flex-shrink:0;label:euiAccordion;label:optionalAction;",
|
|
20
|
+
toString: _EMOTION_STRINGIFIED_CSS_ERROR__
|
|
21
|
+
};
|
|
22
|
+
var _ref3 = process.env.NODE_ENV === "production" ? {
|
|
23
|
+
name: "osepuu-EuiAccordionTrigger",
|
|
24
|
+
styles: "display:flex;align-items:center;label:EuiAccordionTrigger;"
|
|
25
|
+
} : {
|
|
26
|
+
name: "osepuu-EuiAccordionTrigger",
|
|
27
|
+
styles: "display:flex;align-items:center;label:EuiAccordionTrigger;",
|
|
28
|
+
toString: _EMOTION_STRINGIFIED_CSS_ERROR__
|
|
29
|
+
};
|
|
30
|
+
export var EuiAccordionTrigger = function EuiAccordionTrigger(_ref) {
|
|
31
|
+
var _arrowDisplay = _ref.arrowDisplay,
|
|
32
|
+
arrowProps = _ref.arrowProps,
|
|
33
|
+
_ref$buttonElement = _ref.buttonElement,
|
|
34
|
+
buttonElement = _ref$buttonElement === void 0 ? 'button' : _ref$buttonElement,
|
|
35
|
+
buttonProps = _ref.buttonProps,
|
|
36
|
+
buttonClassName = _ref.buttonClassName,
|
|
37
|
+
buttonContent = _ref.buttonContent,
|
|
38
|
+
buttonContentClassName = _ref.buttonContentClassName,
|
|
39
|
+
buttonId = _ref.buttonId,
|
|
40
|
+
ariaControlsId = _ref.ariaControlsId,
|
|
41
|
+
isDisabled = _ref.isDisabled,
|
|
42
|
+
isOpen = _ref.isOpen,
|
|
43
|
+
onToggle = _ref.onToggle,
|
|
44
|
+
extraAction = _ref.extraAction;
|
|
45
|
+
// Force visibility of arrow button icon if button element is not interactive
|
|
46
|
+
var buttonIsInteractive = buttonElement === 'button';
|
|
47
|
+
var arrowDisplay = _arrowDisplay === 'none' && !buttonIsInteractive ? 'left' : _arrowDisplay;
|
|
48
|
+
var arrow = ___EmotionJSX(EuiAccordionArrow, {
|
|
49
|
+
arrowDisplay: arrowDisplay,
|
|
50
|
+
arrowProps: arrowProps,
|
|
51
|
+
isOpen: isOpen,
|
|
52
|
+
onClick: onToggle,
|
|
53
|
+
isDisabled: isDisabled,
|
|
54
|
+
"aria-controls": ariaControlsId,
|
|
55
|
+
"aria-expanded": isOpen,
|
|
56
|
+
"aria-labelledby": buttonId,
|
|
57
|
+
tabIndex: buttonIsInteractive ? -1 : 0
|
|
58
|
+
});
|
|
59
|
+
var button = ___EmotionJSX(EuiAccordionButton, {
|
|
60
|
+
buttonElement: buttonElement,
|
|
61
|
+
buttonProps: buttonProps,
|
|
62
|
+
buttonClassName: buttonClassName,
|
|
63
|
+
buttonContentClassName: buttonContentClassName,
|
|
64
|
+
arrowDisplay: arrowDisplay,
|
|
65
|
+
isDisabled: isDisabled,
|
|
66
|
+
id: buttonId,
|
|
67
|
+
"aria-controls": ariaControlsId,
|
|
68
|
+
"aria-expanded": buttonIsInteractive ? isOpen : undefined // `aria-expanded` is only a valid attribute on interactive controls - axe-core throws a violation otherwise
|
|
69
|
+
,
|
|
70
|
+
onClick: isDisabled ? undefined : onToggle
|
|
71
|
+
}, buttonContent);
|
|
72
|
+
var optionalAction = extraAction && ___EmotionJSX("div", {
|
|
73
|
+
className: "euiAccordion__optionalAction",
|
|
74
|
+
css: _ref2
|
|
75
|
+
}, extraAction);
|
|
76
|
+
return ___EmotionJSX("div", {
|
|
77
|
+
className: "euiAccordion__triggerWrapper",
|
|
78
|
+
css: _ref3
|
|
79
|
+
}, arrowDisplay === 'left' && arrow, button, optionalAction, arrowDisplay === 'right' && arrow);
|
|
80
|
+
};
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
/*
|
|
2
|
+
* Copyright Elasticsearch B.V. and/or licensed to Elasticsearch B.V. under one
|
|
3
|
+
* or more contributor license agreements. Licensed under the Elastic License
|
|
4
|
+
* 2.0 and the Server Side Public License, v 1; you may not use this file except
|
|
5
|
+
* in compliance with, at your election, the Elastic License 2.0 or the Server
|
|
6
|
+
* Side Public License, v 1.
|
|
7
|
+
*/
|
|
8
|
+
|
|
9
|
+
export { EuiAccordionTrigger } from './accordion_trigger';
|
|
@@ -7,8 +7,9 @@ import _inherits from "@babel/runtime/helpers/inherits";
|
|
|
7
7
|
import _possibleConstructorReturn from "@babel/runtime/helpers/possibleConstructorReturn";
|
|
8
8
|
import _getPrototypeOf from "@babel/runtime/helpers/getPrototypeOf";
|
|
9
9
|
import _defineProperty from "@babel/runtime/helpers/defineProperty";
|
|
10
|
-
var _excluded = ["
|
|
11
|
-
_excluded2 = ["
|
|
10
|
+
var _excluded = ["schema"],
|
|
11
|
+
_excluded2 = ["onChange"],
|
|
12
|
+
_excluded3 = ["columns", "loading", "message", "error", "selection", "isSelectable", "hasActions", "compressed", "pagination", "sorting", "itemIdToExpandedRowMap", "itemId", "rowProps", "cellProps", "tableLayout", "items", "search", "searchFormat", "onTableChange", "executeQueryOptions", "allowNeutralSort", "childrenBetween"];
|
|
12
13
|
function _createSuper(Derived) { var hasNativeReflectConstruct = _isNativeReflectConstruct(); return function _createSuperInternal() { var Super = _getPrototypeOf(Derived), result; if (hasNativeReflectConstruct) { var NewTarget = _getPrototypeOf(this).constructor; result = Reflect.construct(Super, arguments, NewTarget); } else { result = Super.apply(this, arguments); } return _possibleConstructorReturn(this, result); }; }
|
|
13
14
|
function _isNativeReflectConstruct() { if (typeof Reflect === "undefined" || !Reflect.construct) return false; if (Reflect.construct.sham) return false; if (typeof Proxy === "function") return true; try { Boolean.prototype.valueOf.call(Reflect.construct(Boolean, [], function () {})); return true; } catch (e) { return false; } }
|
|
14
15
|
function ownKeys(object, enumerableOnly) { var keys = Object.keys(object); if (Object.getOwnPropertySymbols) { var symbols = Object.getOwnPropertySymbols(object); enumerableOnly && (symbols = symbols.filter(function (sym) { return Object.getOwnPropertyDescriptor(object, sym).enumerable; })), keys.push.apply(keys, symbols); } return keys; }
|
|
@@ -25,7 +26,8 @@ import React, { Component } from 'react';
|
|
|
25
26
|
import { EuiBasicTable } from './basic_table';
|
|
26
27
|
import { isString } from '../../services/predicate';
|
|
27
28
|
import { Comparators } from '../../services/sort';
|
|
28
|
-
import { EuiSearchBar } from '../search_bar';
|
|
29
|
+
import { EuiSearchBar } from '../search_bar/search_bar';
|
|
30
|
+
import { EuiSearchBox } from '../search_bar/search_box';
|
|
29
31
|
import { EuiSpacer } from '../spacer';
|
|
30
32
|
import { euiTablePaginationDefaults } from '../table/table_pagination';
|
|
31
33
|
import { EuiComponentDefaultsContext } from '../provider/component_defaults';
|
|
@@ -210,6 +212,15 @@ export var EuiInMemoryTable = /*#__PURE__*/function (_Component) {
|
|
|
210
212
|
};
|
|
211
213
|
});
|
|
212
214
|
});
|
|
215
|
+
// Alternative to onQueryChange - allows consumers to specify they want the
|
|
216
|
+
// search bar to ignore EQL syntax and only use the searchbar for plain text
|
|
217
|
+
_defineProperty(_assertThisInitialized(_this), "onPlainTextSearch", function (searchValue) {
|
|
218
|
+
var escapedQueryText = searchValue.replace(/["\\]/g, '\\$&');
|
|
219
|
+
var finalQuery = "\"".concat(escapedQueryText, "\"");
|
|
220
|
+
_this.setState({
|
|
221
|
+
query: EuiSearchBar.Query.parse(finalQuery)
|
|
222
|
+
});
|
|
223
|
+
});
|
|
213
224
|
var columns = props.columns,
|
|
214
225
|
_search = props.search,
|
|
215
226
|
_pagination = props.pagination,
|
|
@@ -253,12 +264,26 @@ export var EuiInMemoryTable = /*#__PURE__*/function (_Component) {
|
|
|
253
264
|
}, {
|
|
254
265
|
key: "renderSearchBar",
|
|
255
266
|
value: function renderSearchBar() {
|
|
256
|
-
var
|
|
257
|
-
|
|
267
|
+
var _this$props = this.props,
|
|
268
|
+
search = _this$props.search,
|
|
269
|
+
searchFormat = _this$props.searchFormat;
|
|
270
|
+
if (!search) return;
|
|
271
|
+
var searchBar;
|
|
272
|
+
if (searchFormat === 'text') {
|
|
273
|
+
var _searchBoxProps = (search === null || search === void 0 ? void 0 : search.box) || {}; // Work around | boolean type
|
|
274
|
+
var schema = _searchBoxProps.schema,
|
|
275
|
+
searchBoxProps = _objectWithoutProperties(_searchBoxProps, _excluded); // Destructure `schema` so it doesn't get rendered to DOM
|
|
276
|
+
|
|
277
|
+
searchBar = ___EmotionJSX(EuiSearchBox, _extends({
|
|
278
|
+
query: "" // Unused, passed to satisfy Typescript
|
|
279
|
+
}, searchBoxProps, {
|
|
280
|
+
onSearch: this.onPlainTextSearch
|
|
281
|
+
}));
|
|
282
|
+
} else {
|
|
258
283
|
var searchBarProps = {};
|
|
259
284
|
if (isEuiSearchBarProps(search)) {
|
|
260
285
|
var onChange = search.onChange,
|
|
261
|
-
_searchBarProps = _objectWithoutProperties(search,
|
|
286
|
+
_searchBarProps = _objectWithoutProperties(search, _excluded2);
|
|
262
287
|
searchBarProps = _searchBarProps;
|
|
263
288
|
if (searchBarProps.box && searchBarProps.box.schema === true) {
|
|
264
289
|
searchBarProps.box = _objectSpread(_objectSpread({}, searchBarProps.box), {}, {
|
|
@@ -266,12 +291,13 @@ export var EuiInMemoryTable = /*#__PURE__*/function (_Component) {
|
|
|
266
291
|
});
|
|
267
292
|
}
|
|
268
293
|
}
|
|
269
|
-
|
|
294
|
+
searchBar = ___EmotionJSX(EuiSearchBar, _extends({
|
|
270
295
|
onChange: this.onQueryChange
|
|
271
|
-
}, searchBarProps))
|
|
272
|
-
size: "l"
|
|
273
|
-
}));
|
|
296
|
+
}, searchBarProps));
|
|
274
297
|
}
|
|
298
|
+
return ___EmotionJSX(React.Fragment, null, searchBar, ___EmotionJSX(EuiSpacer, {
|
|
299
|
+
size: "l"
|
|
300
|
+
}));
|
|
275
301
|
}
|
|
276
302
|
}, {
|
|
277
303
|
key: "resolveSearchSchema",
|
|
@@ -348,29 +374,30 @@ export var EuiInMemoryTable = /*#__PURE__*/function (_Component) {
|
|
|
348
374
|
}, {
|
|
349
375
|
key: "render",
|
|
350
376
|
value: function render() {
|
|
351
|
-
var _this$
|
|
352
|
-
columns = _this$
|
|
353
|
-
loading = _this$
|
|
354
|
-
message = _this$
|
|
355
|
-
error = _this$
|
|
356
|
-
selection = _this$
|
|
357
|
-
isSelectable = _this$
|
|
358
|
-
hasActions = _this$
|
|
359
|
-
compressed = _this$
|
|
360
|
-
hasPagination = _this$
|
|
361
|
-
hasSorting = _this$
|
|
362
|
-
itemIdToExpandedRowMap = _this$
|
|
363
|
-
itemId = _this$
|
|
364
|
-
rowProps = _this$
|
|
365
|
-
cellProps = _this$
|
|
366
|
-
tableLayout = _this$
|
|
367
|
-
_unuseditems = _this$
|
|
368
|
-
search = _this$
|
|
369
|
-
|
|
370
|
-
|
|
371
|
-
|
|
372
|
-
|
|
373
|
-
|
|
377
|
+
var _this$props2 = this.props,
|
|
378
|
+
columns = _this$props2.columns,
|
|
379
|
+
loading = _this$props2.loading,
|
|
380
|
+
message = _this$props2.message,
|
|
381
|
+
error = _this$props2.error,
|
|
382
|
+
selection = _this$props2.selection,
|
|
383
|
+
isSelectable = _this$props2.isSelectable,
|
|
384
|
+
hasActions = _this$props2.hasActions,
|
|
385
|
+
compressed = _this$props2.compressed,
|
|
386
|
+
hasPagination = _this$props2.pagination,
|
|
387
|
+
hasSorting = _this$props2.sorting,
|
|
388
|
+
itemIdToExpandedRowMap = _this$props2.itemIdToExpandedRowMap,
|
|
389
|
+
itemId = _this$props2.itemId,
|
|
390
|
+
rowProps = _this$props2.rowProps,
|
|
391
|
+
cellProps = _this$props2.cellProps,
|
|
392
|
+
tableLayout = _this$props2.tableLayout,
|
|
393
|
+
_unuseditems = _this$props2.items,
|
|
394
|
+
search = _this$props2.search,
|
|
395
|
+
searchFormat = _this$props2.searchFormat,
|
|
396
|
+
onTableChange = _this$props2.onTableChange,
|
|
397
|
+
executeQueryOptions = _this$props2.executeQueryOptions,
|
|
398
|
+
allowNeutralSort = _this$props2.allowNeutralSort,
|
|
399
|
+
childrenBetween = _this$props2.childrenBetween,
|
|
400
|
+
rest = _objectWithoutProperties(_this$props2, _excluded3);
|
|
374
401
|
var _this$state3 = this.state,
|
|
375
402
|
pageIndex = _this$state3.pageIndex,
|
|
376
403
|
pageSize = _this$state3.pageSize,
|
|
@@ -493,5 +520,6 @@ export var EuiInMemoryTable = /*#__PURE__*/function (_Component) {
|
|
|
493
520
|
_defineProperty(EuiInMemoryTable, "contextType", EuiComponentDefaultsContext);
|
|
494
521
|
_defineProperty(EuiInMemoryTable, "defaultProps", {
|
|
495
522
|
responsive: true,
|
|
496
|
-
tableLayout: 'fixed'
|
|
523
|
+
tableLayout: 'fixed',
|
|
524
|
+
searchFormat: 'eql'
|
|
497
525
|
});
|
|
@@ -16,14 +16,14 @@ function _objectSpread(target) { for (var i = 1; i < arguments.length; i++) { va
|
|
|
16
16
|
import React, { isValidElement } from 'react';
|
|
17
17
|
import classNames from 'classnames';
|
|
18
18
|
import { getSecureRelForTarget, useEuiTheme, cloneElementWithCss } from '../../services';
|
|
19
|
+
import { useGeneratedHtmlId } from '../../services/accessibility';
|
|
20
|
+
import { validateHref } from '../../services/security/href_validator';
|
|
19
21
|
import { EuiText } from '../text';
|
|
20
22
|
import { EuiTitle } from '../title';
|
|
21
23
|
import { EuiBetaBadge } from '../badge/beta_badge';
|
|
22
|
-
import { EuiCardSelect } from './card_select';
|
|
23
|
-
import { useGeneratedHtmlId } from '../../services/accessibility';
|
|
24
|
-
import { validateHref } from '../../services/security/href_validator';
|
|
25
24
|
import { EuiPanel } from '../panel';
|
|
26
25
|
import { EuiSpacer } from '../spacer';
|
|
26
|
+
import { EuiCardSelect } from './card_select';
|
|
27
27
|
import { euiCardBetaBadgeStyles, euiCardStyles, euiCardTextStyles } from './card.styles';
|
|
28
28
|
import { jsx as ___EmotionJSX } from "@emotion/react";
|
|
29
29
|
export var ALIGNMENTS = ['left', 'center', 'right'];
|
package/optimize/es/components/collapsible_nav/collapsible_nav_group/collapsible_nav_group.styles.js
CHANGED
|
@@ -17,7 +17,7 @@ export var euiCollapsibleNavGroupStyles = function euiCollapsibleNavGroupStyles(
|
|
|
17
17
|
// Background colors
|
|
18
18
|
none: /*#__PURE__*/css(";label:none;"),
|
|
19
19
|
light: /*#__PURE__*/css("background-color:", euiTheme.colors.body, ";;label:light;"),
|
|
20
|
-
dark: /*#__PURE__*/css("background-color:", colorMode === 'DARK' ? shade(euiTheme.colors.lightestShade, 0.5) : shade(euiTheme.colors.darkestShade, 0.2), ";.euiCollapsibleNavGroup__title,.euiCollapsibleNavGroup__heading,.
|
|
20
|
+
dark: /*#__PURE__*/css("background-color:", colorMode === 'DARK' ? shade(euiTheme.colors.lightestShade, 0.5) : shade(euiTheme.colors.darkestShade, 0.2), ";.euiCollapsibleNavGroup__title,.euiCollapsibleNavGroup__heading,.euiAccordion__arrow{color:", euiTheme.colors.ghost, ";};label:dark;"),
|
|
21
21
|
// Header padding
|
|
22
22
|
isCollapsible: /*#__PURE__*/css(".euiAccordion__triggerWrapper{padding:", euiTheme.size.base, ";};label:isCollapsible;"),
|
|
23
23
|
notCollapsible: /*#__PURE__*/css(".euiCollapsibleNavGroup__heading{padding:", euiTheme.size.base, ";};label:notCollapsible;"),
|
|
@@ -20,7 +20,7 @@ export var euiCollapsibleNavAccordionStyles = function euiCollapsibleNavAccordio
|
|
|
20
20
|
isSelected: /*#__PURE__*/css("&>.euiAccordion__triggerWrapper{background-color:", sharedStyles.backgroundSelectedColor, ";&:hover{background-color:", sharedStyles.backgroundSelectedColor, ";}};label:isSelected;"),
|
|
21
21
|
isSubItem: /*#__PURE__*/css("&.euiAccordion-isOpen{", logicalCSS('margin-bottom', euiTheme.size.m), ";};label:isSubItem;"),
|
|
22
22
|
// Arrow element
|
|
23
|
-
euiCollapsibleNavAccordion__arrow: /*#__PURE__*/css(logicalCSS('margin-right', euiTheme.size.xs), euiCanAnimate, "{transition:background-color ", sharedStyles.animation, ";}&:hover,&:focus-visible{background-color:", euiTheme.colors.lightShade, ";&>.euiIcon{color:", sharedStyles.color, ";}}transform:none!important;&>.euiIcon{color:", sharedStyles.rightIconColor, ";transform:rotate(90deg);", euiCanAnimate, "{transition:transform ", sharedStyles.animation, ",color ", sharedStyles.animation, ";}}&.
|
|
23
|
+
euiCollapsibleNavAccordion__arrow: /*#__PURE__*/css(logicalCSS('margin-right', euiTheme.size.xs), euiCanAnimate, "{transition:background-color ", sharedStyles.animation, ";}&:hover,&:focus-visible{background-color:", euiTheme.colors.lightShade, ";&>.euiIcon{color:", sharedStyles.color, ";}}transform:none!important;&>.euiIcon{color:", sharedStyles.rightIconColor, ";transform:rotate(90deg);", euiCanAnimate, "{transition:transform ", sharedStyles.animation, ",color ", sharedStyles.animation, ";}}&.euiAccordion__arrow[aria-expanded='true']>.euiIcon{color:", sharedStyles.color, ";transform:rotate(-90deg);};label:euiCollapsibleNavAccordion__arrow;"),
|
|
24
24
|
// Children wrapper
|
|
25
25
|
children: {
|
|
26
26
|
euiCollapsibleNavAccordion__children: /*#__PURE__*/css(";label:euiCollapsibleNavAccordion__children;"),
|
|
@@ -7,7 +7,7 @@ import _inherits from "@babel/runtime/helpers/inherits";
|
|
|
7
7
|
import _possibleConstructorReturn from "@babel/runtime/helpers/possibleConstructorReturn";
|
|
8
8
|
import _getPrototypeOf from "@babel/runtime/helpers/getPrototypeOf";
|
|
9
9
|
import _defineProperty from "@babel/runtime/helpers/defineProperty";
|
|
10
|
-
var _excluded = ["data-test-subj", "async", "className", "compressed", "customOptionText", "fullWidth", "id", "inputRef", "isCaseSensitive", "isClearable", "isDisabled", "isInvalid", "isLoading", "noSuggestions", "onBlur", "onChange", "onCreateOption", "onSearchChange", "options", "placeholder", "renderOption", "rowHeight", "selectedOptions", "singleSelection", "prepend", "sortMatchesBy", "delimiter", "append", "autoFocus", "aria-label", "aria-labelledby"];
|
|
10
|
+
var _excluded = ["data-test-subj", "async", "className", "compressed", "customOptionText", "fullWidth", "id", "inputRef", "isCaseSensitive", "isClearable", "isDisabled", "isInvalid", "isLoading", "noSuggestions", "onBlur", "onChange", "onCreateOption", "onSearchChange", "options", "placeholder", "renderOption", "rowHeight", "selectedOptions", "singleSelection", "prepend", "sortMatchesBy", "delimiter", "append", "autoFocus", "truncationProps", "aria-label", "aria-labelledby"];
|
|
11
11
|
function ownKeys(object, enumerableOnly) { var keys = Object.keys(object); if (Object.getOwnPropertySymbols) { var symbols = Object.getOwnPropertySymbols(object); enumerableOnly && (symbols = symbols.filter(function (sym) { return Object.getOwnPropertyDescriptor(object, sym).enumerable; })), keys.push.apply(keys, symbols); } return keys; }
|
|
12
12
|
function _objectSpread(target) { for (var i = 1; i < arguments.length; i++) { var source = null != arguments[i] ? arguments[i] : {}; i % 2 ? ownKeys(Object(source), !0).forEach(function (key) { _defineProperty(target, key, source[key]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(target, Object.getOwnPropertyDescriptors(source)) : ownKeys(Object(source)).forEach(function (key) { Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key)); }); } return target; }
|
|
13
13
|
function _createSuper(Derived) { var hasNativeReflectConstruct = _isNativeReflectConstruct(); return function _createSuperInternal() { var Super = _getPrototypeOf(Derived), result; if (hasNativeReflectConstruct) { var NewTarget = _getPrototypeOf(this).constructor; result = Reflect.construct(Super, arguments, NewTarget); } else { result = Super.apply(this, arguments); } return _possibleConstructorReturn(this, result); }; }
|
|
@@ -27,12 +27,12 @@ function _isNativeReflectConstruct() { if (typeof Reflect === "undefined" || !Re
|
|
|
27
27
|
import React, { Component } from 'react';
|
|
28
28
|
import classNames from 'classnames';
|
|
29
29
|
import { findPopoverPosition, htmlIdGenerator, keys } from '../../services';
|
|
30
|
+
import { getElementZIndex } from '../../services/popover';
|
|
30
31
|
import { EuiPortal } from '../portal';
|
|
31
32
|
import { EuiI18n } from '../i18n';
|
|
32
|
-
import { EuiComboBoxOptionsList } from './combo_box_options_list';
|
|
33
33
|
import { getMatchingOptions, flattenOptionGroups, getSelectedOptionForSearchValue, transformForCaseSensitivity } from './matching_options';
|
|
34
34
|
import { EuiComboBoxInput } from './combo_box_input/combo_box_input';
|
|
35
|
-
import {
|
|
35
|
+
import { EuiComboBoxOptionsList } from './combo_box_options_list';
|
|
36
36
|
|
|
37
37
|
/**
|
|
38
38
|
* Because of how TypeScript's LibraryManagedAttributes is designed to handle defaultProps (https://www.typescriptlang.org/docs/handbook/release-notes/typescript-3-0.html#support-for-defaultprops-in-jsx)
|
|
@@ -634,6 +634,7 @@ export var EuiComboBox = /*#__PURE__*/function (_Component) {
|
|
|
634
634
|
delimiter = _this$props8.delimiter,
|
|
635
635
|
append = _this$props8.append,
|
|
636
636
|
autoFocus = _this$props8.autoFocus,
|
|
637
|
+
truncationProps = _this$props8.truncationProps,
|
|
637
638
|
ariaLabel = _this$props8['aria-label'],
|
|
638
639
|
ariaLabelledby = _this$props8['aria-labelledby'],
|
|
639
640
|
rest = _objectWithoutProperties(_this$props8, _excluded);
|
|
@@ -702,7 +703,8 @@ export var EuiComboBox = /*#__PURE__*/function (_Component) {
|
|
|
702
703
|
width: width,
|
|
703
704
|
delimiter: delimiter,
|
|
704
705
|
getSelectedOptionForSearchValue: getSelectedOptionForSearchValue,
|
|
705
|
-
listboxAriaLabel: listboxAriaLabel
|
|
706
|
+
listboxAriaLabel: listboxAriaLabel,
|
|
707
|
+
truncationProps: truncationProps
|
|
706
708
|
});
|
|
707
709
|
}));
|
|
708
710
|
}
|
|
@@ -8,7 +8,7 @@ import _inherits from "@babel/runtime/helpers/inherits";
|
|
|
8
8
|
import _possibleConstructorReturn from "@babel/runtime/helpers/possibleConstructorReturn";
|
|
9
9
|
import _getPrototypeOf from "@babel/runtime/helpers/getPrototypeOf";
|
|
10
10
|
import _defineProperty from "@babel/runtime/helpers/defineProperty";
|
|
11
|
-
var _excluded = ["key", "label", "color", "onClick", "append", "prepend"];
|
|
11
|
+
var _excluded = ["key", "label", "color", "onClick", "append", "prepend", "truncationProps"];
|
|
12
12
|
function _createSuper(Derived) { var hasNativeReflectConstruct = _isNativeReflectConstruct(); return function _createSuperInternal() { var Super = _getPrototypeOf(Derived), result; if (hasNativeReflectConstruct) { var NewTarget = _getPrototypeOf(this).constructor; result = Reflect.construct(Super, arguments, NewTarget); } else { result = Super.apply(this, arguments); } return _possibleConstructorReturn(this, result); }; }
|
|
13
13
|
function _isNativeReflectConstruct() { if (typeof Reflect === "undefined" || !Reflect.construct) return false; if (Reflect.construct.sham) return false; if (typeof Proxy === "function") return true; try { Boolean.prototype.valueOf.call(Reflect.construct(Boolean, [], function () {})); return true; } catch (e) { return false; } }
|
|
14
14
|
/*
|
|
@@ -148,6 +148,7 @@ export var EuiComboBoxInput = /*#__PURE__*/function (_Component) {
|
|
|
148
148
|
onClick = option.onClick,
|
|
149
149
|
append = option.append,
|
|
150
150
|
prepend = option.prepend,
|
|
151
|
+
truncationProps = option.truncationProps,
|
|
151
152
|
rest = _objectWithoutProperties(option, _excluded);
|
|
152
153
|
var pillOnClose = isDisabled || singleSelection || onClick ? undefined : onRemoveOption;
|
|
153
154
|
return ___EmotionJSX(EuiComboBoxPill, _extends({
|
|
@@ -66,7 +66,9 @@ export var EuiComboBoxPill = /*#__PURE__*/function (_Component) {
|
|
|
66
66
|
} : {};
|
|
67
67
|
var content = ___EmotionJSX(React.Fragment, null, option.prepend && ___EmotionJSX("span", {
|
|
68
68
|
className: "euiComboBoxPill__prepend"
|
|
69
|
-
}, option.prepend),
|
|
69
|
+
}, option.prepend), ___EmotionJSX("span", {
|
|
70
|
+
className: "eui-textTruncate"
|
|
71
|
+
}, children), option.append && ___EmotionJSX("span", {
|
|
70
72
|
className: "euiComboBoxPill__append"
|
|
71
73
|
}, option.append));
|
|
72
74
|
if (onClose) {
|
|
@@ -7,8 +7,8 @@ import _inherits from "@babel/runtime/helpers/inherits";
|
|
|
7
7
|
import _possibleConstructorReturn from "@babel/runtime/helpers/possibleConstructorReturn";
|
|
8
8
|
import _getPrototypeOf from "@babel/runtime/helpers/getPrototypeOf";
|
|
9
9
|
import _defineProperty from "@babel/runtime/helpers/defineProperty";
|
|
10
|
-
var _excluded = ["key", "isGroupLabelOption", "label", "value", "prepend", "append"],
|
|
11
|
-
_excluded2 = ["data-test-subj", "activeOptionIndex", "areAllOptionsSelected", "customOptionText", "fullWidth", "getSelectedOptionForSearchValue", "isCaseSensitive", "isLoading", "listRef", "matchingOptions", "onCloseList", "onCreateOption", "onOptionClick", "onOptionEnterKey", "onScroll", "optionRef", "options", "position", "renderOption", "rootId", "rowHeight", "scrollToIndex", "searchValue", "selectedOptions", "singleSelection", "updatePosition", "width", "delimiter", "zIndex", "style", "listboxAriaLabel"];
|
|
10
|
+
var _excluded = ["key", "isGroupLabelOption", "label", "value", "prepend", "append", "truncationProps"],
|
|
11
|
+
_excluded2 = ["data-test-subj", "activeOptionIndex", "areAllOptionsSelected", "customOptionText", "fullWidth", "getSelectedOptionForSearchValue", "isCaseSensitive", "isLoading", "listRef", "matchingOptions", "onCloseList", "onCreateOption", "onOptionClick", "onOptionEnterKey", "onScroll", "optionRef", "options", "position", "renderOption", "rootId", "rowHeight", "scrollToIndex", "searchValue", "selectedOptions", "singleSelection", "updatePosition", "width", "delimiter", "zIndex", "style", "truncationProps", "listboxAriaLabel"];
|
|
12
12
|
function ownKeys(object, enumerableOnly) { var keys = Object.keys(object); if (Object.getOwnPropertySymbols) { var symbols = Object.getOwnPropertySymbols(object); enumerableOnly && (symbols = symbols.filter(function (sym) { return Object.getOwnPropertyDescriptor(object, sym).enumerable; })), keys.push.apply(keys, symbols); } return keys; }
|
|
13
13
|
function _objectSpread(target) { for (var i = 1; i < arguments.length; i++) { var source = null != arguments[i] ? arguments[i] : {}; i % 2 ? ownKeys(Object(source), !0).forEach(function (key) { _defineProperty(target, key, source[key]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(target, Object.getOwnPropertyDescriptors(source)) : ownKeys(Object(source)).forEach(function (key) { Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key)); }); } return target; }
|
|
14
14
|
function _createSuper(Derived) { var hasNativeReflectConstruct = _isNativeReflectConstruct(); return function _createSuperInternal() { var Super = _getPrototypeOf(Derived), result; if (hasNativeReflectConstruct) { var NewTarget = _getPrototypeOf(this).constructor; result = Reflect.construct(Super, arguments, NewTarget); } else { result = Super.apply(this, arguments); } return _possibleConstructorReturn(this, result); }; }
|
|
@@ -26,6 +26,7 @@ import classNames from 'classnames';
|
|
|
26
26
|
import { FixedSizeList } from 'react-window';
|
|
27
27
|
import { EuiFlexGroup, EuiFlexItem } from '../../flex';
|
|
28
28
|
import { EuiHighlight } from '../../highlight';
|
|
29
|
+
import { EuiMark } from '../../mark';
|
|
29
30
|
import { EuiText } from '../../text';
|
|
30
31
|
import { EuiLoadingSpinner } from '../../loading';
|
|
31
32
|
import { EuiComboBoxTitle } from './combo_box_title';
|
|
@@ -33,8 +34,8 @@ import { EuiI18n } from '../../i18n';
|
|
|
33
34
|
import { EuiFilterSelectItem } from '../../filter_group/filter_select_item';
|
|
34
35
|
import { EuiBadge } from '../../badge';
|
|
35
36
|
import { EuiPopoverPanel } from '../../popover/popover_panel';
|
|
37
|
+
import { EuiTextTruncate } from '../../text_truncate';
|
|
36
38
|
import { jsx as ___EmotionJSX } from "@emotion/react";
|
|
37
|
-
var OPTION_CONTENT_CLASSNAME = 'euiComboBoxOption__content';
|
|
38
39
|
var hitEnterBadge = ___EmotionJSX(EuiBadge, {
|
|
39
40
|
className: "euiComboBoxOption__enterBadge",
|
|
40
41
|
color: "hollow",
|
|
@@ -95,6 +96,7 @@ export var EuiComboBoxOptionsList = /*#__PURE__*/function (_Component) {
|
|
|
95
96
|
value = option.value,
|
|
96
97
|
prepend = option.prepend,
|
|
97
98
|
append = option.append,
|
|
99
|
+
_truncationProps = option.truncationProps,
|
|
98
100
|
rest = _objectWithoutProperties(option, _excluded);
|
|
99
101
|
var _this$props = _this.props,
|
|
100
102
|
singleSelection = _this$props.singleSelection,
|
|
@@ -105,6 +107,8 @@ export var EuiComboBoxOptionsList = /*#__PURE__*/function (_Component) {
|
|
|
105
107
|
renderOption = _this$props.renderOption,
|
|
106
108
|
searchValue = _this$props.searchValue,
|
|
107
109
|
rootId = _this$props.rootId;
|
|
110
|
+
// Individual truncation settings should override component prop
|
|
111
|
+
var truncationProps = _objectSpread(_objectSpread({}, _this.props.truncationProps), _truncationProps);
|
|
108
112
|
if (isGroupLabelOption) {
|
|
109
113
|
return ___EmotionJSX("div", {
|
|
110
114
|
key: key !== null && key !== void 0 ? key : label,
|
|
@@ -129,22 +133,54 @@ export var EuiComboBoxOptionsList = /*#__PURE__*/function (_Component) {
|
|
|
129
133
|
isFocused: optionIsFocused,
|
|
130
134
|
checked: checked,
|
|
131
135
|
showIcons: singleSelection ? true : false,
|
|
132
|
-
id: rootId("_option-".concat(index))
|
|
133
|
-
title: label
|
|
136
|
+
id: rootId("_option-".concat(index))
|
|
134
137
|
}, rest), ___EmotionJSX("span", {
|
|
135
138
|
className: "euiComboBoxOption__contentWrapper"
|
|
136
139
|
}, prepend && ___EmotionJSX("span", {
|
|
137
140
|
className: "euiComboBoxOption__prepend"
|
|
138
|
-
}, prepend),
|
|
139
|
-
className:
|
|
140
|
-
}, renderOption(option, searchValue, 'euiComboBoxOption__renderOption')
|
|
141
|
-
search: searchValue,
|
|
142
|
-
strict: _this.props.isCaseSensitive,
|
|
143
|
-
className: OPTION_CONTENT_CLASSNAME
|
|
144
|
-
}, label), append && ___EmotionJSX("span", {
|
|
141
|
+
}, prepend), ___EmotionJSX("span", {
|
|
142
|
+
className: "euiComboBoxOption__content"
|
|
143
|
+
}, renderOption ? renderOption(option, searchValue, 'euiComboBoxOption__renderOption') : _this.renderTruncatedOption(label, truncationProps)), append && ___EmotionJSX("span", {
|
|
145
144
|
className: "euiComboBoxOption__append"
|
|
146
145
|
}, append), optionIsFocused && !optionIsDisabled ? hitEnterBadge : null));
|
|
147
146
|
});
|
|
147
|
+
_defineProperty(_assertThisInitialized(_this), "optionWidth", void 0);
|
|
148
|
+
_defineProperty(_assertThisInitialized(_this), "setOptionWidth", function (width) {
|
|
149
|
+
_this.optionWidth = width;
|
|
150
|
+
});
|
|
151
|
+
_defineProperty(_assertThisInitialized(_this), "renderTruncatedOption", function (text, truncationProps) {
|
|
152
|
+
if (!_this.props.searchValue) {
|
|
153
|
+
return ___EmotionJSX(EuiTextTruncate, _extends({
|
|
154
|
+
truncation: "end",
|
|
155
|
+
width: _this.optionWidth,
|
|
156
|
+
onResize: _this.setOptionWidth
|
|
157
|
+
}, truncationProps, {
|
|
158
|
+
text: text
|
|
159
|
+
}), function (text) {
|
|
160
|
+
return text;
|
|
161
|
+
});
|
|
162
|
+
}
|
|
163
|
+
var searchValue = _this.props.searchValue.trim();
|
|
164
|
+
var searchPositionStart = _this.props.isCaseSensitive ? text.indexOf(searchValue) : text.toLowerCase().indexOf(searchValue.toLowerCase());
|
|
165
|
+
var searchPositionCenter = searchPositionStart + Math.floor(searchValue.length / 2);
|
|
166
|
+
return ___EmotionJSX(EuiTextTruncate, _extends({
|
|
167
|
+
width: _this.optionWidth,
|
|
168
|
+
onResize: _this.setOptionWidth
|
|
169
|
+
}, truncationProps, {
|
|
170
|
+
// When searching, don't allow overriding the truncation settings
|
|
171
|
+
truncation: "startEnd",
|
|
172
|
+
truncationPosition: searchPositionCenter,
|
|
173
|
+
text: text
|
|
174
|
+
}), function (text) {
|
|
175
|
+
return ___EmotionJSX(React.Fragment, null, text.length >= searchValue.length ? ___EmotionJSX(EuiHighlight, {
|
|
176
|
+
search: searchValue,
|
|
177
|
+
strict: _this.props.isCaseSensitive
|
|
178
|
+
}, text) :
|
|
179
|
+
// If the available truncated text is shorter than the full search string,
|
|
180
|
+
// just highlight the entire truncated text
|
|
181
|
+
___EmotionJSX(EuiMark, null, text));
|
|
182
|
+
});
|
|
183
|
+
});
|
|
148
184
|
return _this;
|
|
149
185
|
}
|
|
150
186
|
_createClass(EuiComboBoxOptionsList, [{
|
|
@@ -228,6 +264,7 @@ export var EuiComboBoxOptionsList = /*#__PURE__*/function (_Component) {
|
|
|
228
264
|
delimiter = _this$props2.delimiter,
|
|
229
265
|
zIndex = _this$props2.zIndex,
|
|
230
266
|
style = _this$props2.style,
|
|
267
|
+
truncationProps = _this$props2.truncationProps,
|
|
231
268
|
listboxAriaLabel = _this$props2.listboxAriaLabel,
|
|
232
269
|
rest = _objectWithoutProperties(_this$props2, _excluded2);
|
|
233
270
|
var emptyStateContent;
|
|
@@ -9,7 +9,7 @@ import _slicedToArray from "@babel/runtime/helpers/slicedToArray";
|
|
|
9
9
|
* Side Public License, v 1.
|
|
10
10
|
*/
|
|
11
11
|
|
|
12
|
-
import React, {
|
|
12
|
+
import React, { useState, useMemo, useCallback } from 'react';
|
|
13
13
|
import classNames from 'classnames';
|
|
14
14
|
import { EuiPopover, EuiPopoverFooter, EuiPopoverTitle } from '../../popover';
|
|
15
15
|
import { EuiI18n, useEuiI18n } from '../../i18n';
|
|
@@ -137,7 +137,7 @@ export var useDataGridColumnSelector = function useDataGridColumnSelector(availa
|
|
|
137
137
|
}, ___EmotionJSX(EuiDroppable, {
|
|
138
138
|
droppableId: "columnOrder",
|
|
139
139
|
isDropDisabled: !isDragEnabled
|
|
140
|
-
}, ___EmotionJSX(Fragment, null, filteredColumns.map(function (id, index) {
|
|
140
|
+
}, ___EmotionJSX(React.Fragment, null, filteredColumns.map(function (id, index) {
|
|
141
141
|
return ___EmotionJSX(EuiDraggable, {
|
|
142
142
|
key: id,
|
|
143
143
|
draggableId: id,
|
|
@@ -147,7 +147,9 @@ export var useDataGridColumnSelector = function useDataGridColumnSelector(availa
|
|
|
147
147
|
customDragHandle: true
|
|
148
148
|
}, function (provided, state) {
|
|
149
149
|
return ___EmotionJSX("div", {
|
|
150
|
-
className:
|
|
150
|
+
className: classNames('euiDataGridColumnSelector__item', {
|
|
151
|
+
'euiDataGridColumnSelector__item-isDragging': state.isDragging
|
|
152
|
+
}),
|
|
151
153
|
"data-test-subj": "dataGridColumnSelectorColumnItem-".concat(id)
|
|
152
154
|
}, ___EmotionJSX(EuiFlexGroup, {
|
|
153
155
|
responsive: false,
|