@elastic/eui 68.0.0 → 69.0.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_charts_theme.js +5661 -5814
- package/dist/eui_charts_theme.js.map +1 -1
- package/dist/eui_theme_dark.css +0 -521
- package/dist/eui_theme_dark.json +0 -25
- package/dist/eui_theme_dark.json.d.ts +0 -25
- package/dist/eui_theme_dark.min.css +1 -1
- package/dist/eui_theme_light.css +0 -521
- package/dist/eui_theme_light.json +0 -25
- package/dist/eui_theme_light.json.d.ts +0 -25
- package/dist/eui_theme_light.min.css +1 -1
- 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 +7 -1
- package/es/components/breadcrumbs/breadcrumb.js +9 -5
- package/es/components/breadcrumbs/breadcrumbs.js +7 -4
- package/es/components/button/_button_content_deprecated.js +1 -1
- 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 +1 -1
- package/es/components/collapsible_nav/collapsible_nav_group/collapsible_nav_group.js +1 -1
- package/es/components/color_picker/color_palette_picker/color_palette_picker.js +18 -0
- package/es/components/combo_box/combo_box.js +52 -11
- package/es/components/combo_box/combo_box_options_list/combo_box_options_list.js +14 -6
- package/es/components/combo_box/matching_options.js +60 -11
- 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_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_sorting_draggable.js +1 -1
- 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/empty_prompt/empty_prompt.js +1 -1
- package/es/components/flex/flex_grid.js +30 -40
- package/es/components/flex/flex_grid.styles.js +137 -0
- package/es/components/flex/flex_group.js +16 -42
- package/es/components/flex/flex_group.styles.js +202 -0
- package/es/components/flex/flex_item.js +17 -16
- package/es/components/flex/flex_item.styles.js +148 -0
- package/es/components/flyout/flyout_body.js +2 -3
- package/es/components/flyout/flyout_footer.js +2 -3
- package/es/components/flyout/flyout_header.js +2 -3
- package/es/components/form/described_form_group/described_form_group.js +28 -23
- package/es/components/form/eui_form_context.js +14 -0
- package/es/components/form/field_number/field_number.js +38 -23
- package/es/components/form/field_password/field_password.js +31 -20
- package/es/components/form/field_search/field_search.js +14 -2
- package/es/components/form/field_text/field_text.js +30 -20
- package/es/components/form/file_picker/file_picker.js +13 -1
- package/es/components/form/form.js +21 -3
- package/es/components/form/form_control_layout/form_control_layout.js +19 -3
- 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/form/form_row/form_row.js +22 -4
- package/es/components/form/range/dual_range.js +14 -2
- package/es/components/form/range/range.js +14 -2
- package/es/components/form/range/range_wrapper.js +16 -6
- package/es/components/form/select/select.js +41 -25
- package/es/components/form/super_select/super_select.js +18 -0
- package/es/components/form/super_select/super_select_control.js +26 -22
- package/es/components/form/text_area/text_area.js +26 -15
- 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.js +1 -1
- package/es/components/icon/assets/filter.js +1 -2
- package/es/components/icon/assets/filterExclude.js +43 -0
- package/es/components/icon/assets/filterIgnore.js +38 -0
- package/es/components/icon/assets/filterInclude.js +38 -0
- package/es/components/icon/assets/indexTemporary.js +40 -0
- package/es/components/icon/assets/infinity.js +38 -0
- package/es/components/icon/assets/sortAscending.js +38 -0
- package/es/components/icon/assets/sortDescending.js +38 -0
- package/es/components/icon/icon.js +1 -1
- package/es/components/icon/icon_map.js +7 -0
- package/es/components/image/image_fullscreen_wrapper.js +3 -3
- 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 +2 -2
- 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/page/page_section/page_section.js +4 -3
- package/es/components/pagination/pagination.js +4 -4
- package/es/components/pagination/pagination_button.js +1 -1
- package/es/components/resizable_container/resizable_container.js +77 -16
- package/es/components/search_bar/search_bar.js +6 -0
- 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/text/text.js +1 -0
- package/es/components/timeline/timeline_item_icon.js +1 -1
- package/es/components/toast/global_toast_list.js +1 -1
- package/es/components/toast/toast.js +1 -1
- package/es/components/tool_tip/icon_tip.js +1 -1
- package/es/components/tool_tip/tool_tip_anchor.js +2 -2
- package/eui.d.ts +374 -86
- package/i18ntokens.json +38 -38
- 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 +7 -1
- package/lib/components/breadcrumbs/breadcrumb.js +9 -5
- package/lib/components/breadcrumbs/breadcrumbs.js +7 -4
- package/lib/components/button/_button_content_deprecated.js +1 -1
- 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 +1 -1
- package/lib/components/collapsible_nav/collapsible_nav_group/collapsible_nav_group.js +1 -1
- package/lib/components/color_picker/color_palette_picker/color_palette_picker.js +18 -0
- package/lib/components/combo_box/combo_box.js +51 -10
- package/lib/components/combo_box/combo_box_options_list/combo_box_options_list.js +14 -6
- package/lib/components/combo_box/matching_options.js +64 -12
- 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_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_sorting_draggable.js +1 -1
- 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/empty_prompt/empty_prompt.js +1 -1
- package/lib/components/flex/flex_grid.js +33 -42
- package/lib/components/flex/flex_grid.styles.js +140 -0
- package/lib/components/flex/flex_group.js +17 -42
- package/lib/components/flex/flex_group.styles.js +205 -0
- package/lib/components/flex/flex_item.js +20 -19
- package/lib/components/flex/flex_item.styles.js +150 -0
- package/lib/components/flyout/flyout_body.js +2 -3
- package/lib/components/flyout/flyout_footer.js +2 -3
- package/lib/components/flyout/flyout_header.js +2 -3
- package/lib/components/form/described_form_group/described_form_group.js +29 -23
- package/lib/components/form/eui_form_context.js +28 -0
- package/lib/components/form/field_number/field_number.js +39 -23
- package/lib/components/form/field_password/field_password.js +32 -20
- package/lib/components/form/field_search/field_search.js +15 -2
- package/lib/components/form/field_text/field_text.js +31 -20
- package/lib/components/form/file_picker/file_picker.js +14 -1
- package/lib/components/form/form.js +23 -3
- package/lib/components/form/form_control_layout/form_control_layout.js +20 -3
- 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/form/form_row/form_row.js +23 -4
- package/lib/components/form/range/dual_range.js +15 -2
- package/lib/components/form/range/range.js +15 -2
- package/lib/components/form/range/range_wrapper.js +17 -6
- package/lib/components/form/select/select.js +42 -25
- package/lib/components/form/super_select/super_select.js +18 -0
- package/lib/components/form/super_select/super_select_control.js +27 -22
- package/lib/components/form/text_area/text_area.js +27 -15
- 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.js +1 -1
- package/lib/components/icon/assets/filter.js +1 -2
- package/lib/components/icon/assets/filterExclude.js +50 -0
- package/lib/components/icon/assets/filterIgnore.js +45 -0
- package/lib/components/icon/assets/filterInclude.js +45 -0
- package/lib/components/icon/assets/indexTemporary.js +47 -0
- package/lib/components/icon/assets/infinity.js +45 -0
- package/lib/components/icon/assets/sortAscending.js +45 -0
- package/lib/components/icon/assets/sortDescending.js +45 -0
- package/lib/components/icon/icon.js +1 -1
- package/lib/components/icon/icon_map.js +7 -0
- package/lib/components/icon/svgs/filter.svg +1 -1
- package/lib/components/icon/svgs/filterExclude.svg +5 -0
- package/lib/components/icon/svgs/filterIgnore.svg +4 -0
- package/lib/components/icon/svgs/filterInclude.svg +5 -0
- package/lib/components/icon/svgs/indexTemporary.svg +4 -0
- package/lib/components/icon/svgs/infinity.svg +3 -0
- package/lib/components/icon/svgs/sortAscending.svg +3 -0
- package/lib/components/icon/svgs/sortDescending.svg +3 -0
- package/lib/components/image/image_fullscreen_wrapper.js +3 -3
- 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 +2 -2
- 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/page/page_section/page_section.js +4 -3
- package/lib/components/pagination/pagination.js +4 -4
- package/lib/components/resizable_container/resizable_container.js +77 -16
- package/lib/components/search_bar/search_bar.js +6 -0
- 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/text/text.js +1 -0
- package/lib/components/timeline/timeline_item_icon.js +1 -1
- package/lib/components/toast/global_toast_list.js +1 -1
- package/lib/components/toast/toast.js +1 -1
- package/lib/components/tool_tip/icon_tip.js +1 -1
- package/lib/components/tool_tip/tool_tip_anchor.js +2 -2
- package/optimize/es/components/breadcrumbs/breadcrumb.js +3 -2
- package/optimize/es/components/breadcrumbs/breadcrumbs.js +7 -4
- package/optimize/es/components/combo_box/combo_box.js +47 -11
- package/optimize/es/components/combo_box/combo_box_options_list/combo_box_options_list.js +13 -6
- package/optimize/es/components/combo_box/matching_options.js +60 -11
- package/optimize/es/components/flex/flex_grid.js +18 -34
- package/optimize/es/components/flex/flex_grid.styles.js +137 -0
- package/optimize/es/components/flex/flex_group.js +12 -38
- package/optimize/es/components/flex/flex_group.styles.js +202 -0
- package/optimize/es/components/flex/flex_item.js +11 -14
- package/optimize/es/components/flex/flex_item.styles.js +148 -0
- package/optimize/es/components/flyout/flyout_body.js +2 -3
- package/optimize/es/components/flyout/flyout_footer.js +2 -3
- package/optimize/es/components/flyout/flyout_header.js +2 -3
- package/optimize/es/components/form/described_form_group/described_form_group.js +22 -22
- package/optimize/es/components/form/eui_form_context.js +14 -0
- package/optimize/es/components/form/field_number/field_number.js +26 -22
- package/optimize/es/components/form/field_password/field_password.js +24 -20
- package/optimize/es/components/form/field_search/field_search.js +8 -2
- package/optimize/es/components/form/field_text/field_text.js +22 -18
- package/optimize/es/components/form/file_picker/file_picker.js +7 -1
- package/optimize/es/components/form/form.js +11 -2
- package/optimize/es/components/form/form_control_layout/form_control_layout.js +10 -2
- package/optimize/es/components/form/form_row/form_row.js +10 -4
- package/optimize/es/components/form/range/dual_range.js +8 -2
- package/optimize/es/components/form/range/range.js +8 -2
- package/optimize/es/components/form/range/range_wrapper.js +11 -6
- package/optimize/es/components/form/select/select.js +28 -24
- package/optimize/es/components/form/super_select/super_select_control.js +26 -22
- package/optimize/es/components/form/text_area/text_area.js +19 -15
- package/optimize/es/components/icon/assets/filter.js +1 -2
- package/optimize/es/components/icon/assets/filterExclude.js +39 -0
- package/optimize/es/components/icon/assets/filterIgnore.js +34 -0
- package/optimize/es/components/icon/assets/filterInclude.js +34 -0
- package/optimize/es/components/icon/assets/indexTemporary.js +36 -0
- package/optimize/es/components/icon/assets/infinity.js +34 -0
- package/optimize/es/components/icon/assets/sortAscending.js +34 -0
- package/optimize/es/components/icon/assets/sortDescending.js +34 -0
- package/optimize/es/components/icon/icon_map.js +7 -0
- package/optimize/es/components/image/image_fullscreen_wrapper.js +3 -3
- package/optimize/es/components/page/page_section/page_section.js +4 -3
- package/optimize/es/components/pagination/pagination.js +4 -4
- package/optimize/es/components/resizable_container/resizable_container.js +67 -16
- package/optimize/es/components/tool_tip/tool_tip_anchor.js +2 -2
- package/optimize/lib/components/breadcrumbs/breadcrumb.js +3 -2
- package/optimize/lib/components/breadcrumbs/breadcrumbs.js +7 -4
- package/optimize/lib/components/combo_box/combo_box.js +46 -10
- package/optimize/lib/components/combo_box/combo_box_options_list/combo_box_options_list.js +13 -6
- package/optimize/lib/components/combo_box/matching_options.js +64 -12
- package/optimize/lib/components/flex/flex_grid.js +21 -36
- package/optimize/lib/components/flex/flex_grid.styles.js +140 -0
- package/optimize/lib/components/flex/flex_group.js +13 -38
- package/optimize/lib/components/flex/flex_group.styles.js +205 -0
- package/optimize/lib/components/flex/flex_item.js +14 -17
- package/optimize/lib/components/flex/flex_item.styles.js +150 -0
- package/optimize/lib/components/flyout/flyout_body.js +2 -3
- package/optimize/lib/components/flyout/flyout_footer.js +2 -3
- package/optimize/lib/components/flyout/flyout_header.js +2 -3
- package/optimize/lib/components/form/described_form_group/described_form_group.js +23 -22
- package/optimize/lib/components/form/eui_form_context.js +28 -0
- package/optimize/lib/components/form/field_number/field_number.js +27 -22
- package/optimize/lib/components/form/field_password/field_password.js +24 -20
- package/optimize/lib/components/form/field_search/field_search.js +7 -2
- package/optimize/lib/components/form/field_text/field_text.js +23 -18
- package/optimize/lib/components/form/file_picker/file_picker.js +7 -1
- package/optimize/lib/components/form/form.js +14 -2
- package/optimize/lib/components/form/form_control_layout/form_control_layout.js +10 -2
- package/optimize/lib/components/form/form_row/form_row.js +9 -4
- package/optimize/lib/components/form/range/dual_range.js +7 -2
- package/optimize/lib/components/form/range/range.js +7 -2
- package/optimize/lib/components/form/range/range_wrapper.js +12 -6
- package/optimize/lib/components/form/select/select.js +29 -24
- package/optimize/lib/components/form/super_select/super_select_control.js +27 -22
- package/optimize/lib/components/form/text_area/text_area.js +20 -15
- package/optimize/lib/components/icon/assets/filter.js +1 -2
- package/optimize/lib/components/icon/assets/filterExclude.js +49 -0
- package/optimize/lib/components/icon/assets/filterIgnore.js +44 -0
- package/optimize/lib/components/icon/assets/filterInclude.js +44 -0
- package/optimize/lib/components/icon/assets/indexTemporary.js +46 -0
- package/optimize/lib/components/icon/assets/infinity.js +44 -0
- package/optimize/lib/components/icon/assets/sortAscending.js +44 -0
- package/optimize/lib/components/icon/assets/sortDescending.js +44 -0
- package/optimize/lib/components/icon/icon_map.js +7 -0
- package/optimize/lib/components/icon/svgs/filter.svg +1 -1
- package/optimize/lib/components/icon/svgs/filterExclude.svg +5 -0
- package/optimize/lib/components/icon/svgs/filterIgnore.svg +4 -0
- package/optimize/lib/components/icon/svgs/filterInclude.svg +5 -0
- package/optimize/lib/components/icon/svgs/indexTemporary.svg +4 -0
- package/optimize/lib/components/icon/svgs/infinity.svg +3 -0
- package/optimize/lib/components/icon/svgs/sortAscending.svg +3 -0
- package/optimize/lib/components/icon/svgs/sortDescending.svg +3 -0
- package/optimize/lib/components/image/image_fullscreen_wrapper.js +3 -3
- package/optimize/lib/components/page/page_section/page_section.js +4 -3
- package/optimize/lib/components/pagination/pagination.js +4 -4
- package/optimize/lib/components/resizable_container/resizable_container.js +67 -16
- package/optimize/lib/components/tool_tip/tool_tip_anchor.js +2 -2
- package/package.json +17 -15
- package/src/components/index.scss +0 -1
- 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 +7 -1
- package/test-env/components/breadcrumbs/breadcrumb.js +9 -5
- package/test-env/components/breadcrumbs/breadcrumbs.js +7 -4
- package/test-env/components/button/_button_content_deprecated.js +1 -1
- 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 +1 -1
- package/test-env/components/collapsible_nav/collapsible_nav_group/collapsible_nav_group.js +1 -1
- package/test-env/components/color_picker/color_palette_picker/color_palette_picker.js +18 -0
- package/test-env/components/combo_box/combo_box.js +51 -10
- package/test-env/components/combo_box/combo_box_options_list/combo_box_options_list.js +14 -6
- package/test-env/components/combo_box/matching_options.js +64 -12
- 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_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_sorting_draggable.js +1 -1
- 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/empty_prompt/empty_prompt.js +1 -1
- package/test-env/components/flex/flex_grid.js +33 -42
- package/test-env/components/flex/flex_grid.styles.js +140 -0
- package/test-env/components/flex/flex_group.js +17 -42
- package/test-env/components/flex/flex_group.styles.js +205 -0
- package/test-env/components/flex/flex_item.js +20 -18
- package/test-env/components/flex/flex_item.styles.js +150 -0
- package/test-env/components/flyout/flyout_body.js +2 -3
- package/test-env/components/flyout/flyout_footer.js +2 -3
- package/test-env/components/flyout/flyout_header.js +2 -3
- package/test-env/components/form/described_form_group/described_form_group.js +29 -23
- package/test-env/components/form/eui_form_context.js +28 -0
- package/test-env/components/form/field_number/field_number.js +39 -23
- package/test-env/components/form/field_password/field_password.js +31 -20
- package/test-env/components/form/field_search/field_search.js +13 -2
- package/test-env/components/form/field_text/field_text.js +31 -20
- package/test-env/components/form/file_picker/file_picker.js +13 -1
- package/test-env/components/form/form.js +24 -3
- package/test-env/components/form/form_control_layout/form_control_layout.js +17 -3
- 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/form/form_row/form_row.js +21 -4
- package/test-env/components/form/range/dual_range.js +13 -2
- package/test-env/components/form/range/range.js +13 -2
- package/test-env/components/form/range/range_wrapper.js +17 -6
- package/test-env/components/form/select/select.js +41 -24
- package/test-env/components/form/super_select/super_select.js +18 -0
- package/test-env/components/form/super_select/super_select_control.js +27 -22
- package/test-env/components/form/text_area/text_area.js +27 -15
- 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.js +1 -1
- package/test-env/components/icon/assets/filter.js +1 -2
- package/test-env/components/icon/assets/filterExclude.js +49 -0
- package/test-env/components/icon/assets/filterIgnore.js +44 -0
- package/test-env/components/icon/assets/filterInclude.js +44 -0
- package/test-env/components/icon/assets/indexTemporary.js +46 -0
- package/test-env/components/icon/assets/infinity.js +44 -0
- package/test-env/components/icon/assets/sortAscending.js +44 -0
- package/test-env/components/icon/assets/sortDescending.js +44 -0
- package/test-env/components/icon/icon_map.js +7 -0
- package/test-env/components/image/image_fullscreen_wrapper.js +3 -3
- 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 +2 -2
- 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/page/page_section/page_section.js +4 -3
- package/test-env/components/pagination/pagination.js +4 -4
- package/test-env/components/resizable_container/resizable_container.js +77 -16
- package/test-env/components/search_bar/search_bar.js +6 -0
- 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/text/text.js +1 -0
- package/test-env/components/timeline/timeline_item_icon.js +1 -1
- package/test-env/components/toast/global_toast_list.js +1 -1
- package/test-env/components/toast/toast.js +1 -1
- package/test-env/components/tool_tip/icon_tip.js +1 -1
- package/test-env/components/tool_tip/tool_tip_anchor.js +2 -2
- package/src/components/flex/_flex_grid.scss +0 -99
- package/src/components/flex/_flex_group.scss +0 -100
- package/src/components/flex/_flex_item.scss +0 -35
- package/src/components/flex/_index.scss +0 -3
|
@@ -2,7 +2,7 @@ import _extends from "@babel/runtime/helpers/extends";
|
|
|
2
2
|
import _defineProperty from "@babel/runtime/helpers/defineProperty";
|
|
3
3
|
import _slicedToArray from "@babel/runtime/helpers/slicedToArray";
|
|
4
4
|
import _objectWithoutProperties from "@babel/runtime/helpers/objectWithoutProperties";
|
|
5
|
-
var _excluded = ["direction", "children", "className", "onPanelWidthChange", "onToggleCollapsed"];
|
|
5
|
+
var _excluded = ["direction", "children", "className", "onPanelWidthChange", "onToggleCollapsed", "onResizeStart", "onResizeEnd"];
|
|
6
6
|
|
|
7
7
|
function ownKeys(object, enumerableOnly) { var keys = Object.keys(object); if (Object.getOwnPropertySymbols) { var symbols = Object.getOwnPropertySymbols(object); if (enumerableOnly) { symbols = symbols.filter(function (sym) { return Object.getOwnPropertyDescriptor(object, sym).enumerable; }); } keys.push.apply(keys, symbols); } return keys; }
|
|
8
8
|
|
|
@@ -44,6 +44,8 @@ export var EuiResizableContainer = function EuiResizableContainer(_ref) {
|
|
|
44
44
|
className = _ref.className,
|
|
45
45
|
onPanelWidthChange = _ref.onPanelWidthChange,
|
|
46
46
|
onToggleCollapsed = _ref.onToggleCollapsed,
|
|
47
|
+
onResizeStart = _ref.onResizeStart,
|
|
48
|
+
onResizeEnd = _ref.onResizeEnd,
|
|
47
49
|
rest = _objectWithoutProperties(_ref, _excluded);
|
|
48
50
|
|
|
49
51
|
var containerRef = useRef(null);
|
|
@@ -73,6 +75,26 @@ export var EuiResizableContainer = function EuiResizableContainer(_ref) {
|
|
|
73
75
|
initialize();
|
|
74
76
|
}
|
|
75
77
|
}, [initialize, containerSize]);
|
|
78
|
+
var resizeContext = useRef({});
|
|
79
|
+
var resizeEnd = useCallback(function () {
|
|
80
|
+
onResizeEnd === null || onResizeEnd === void 0 ? void 0 : onResizeEnd();
|
|
81
|
+
resizeContext.current = {};
|
|
82
|
+
}, [onResizeEnd]);
|
|
83
|
+
var resizeStart = useCallback(function (trigger, keyMoveDirection) {
|
|
84
|
+
// If another resize starts while the previous one is still in progress
|
|
85
|
+
// (e.g. user presses opposite arrow to change direction while the first
|
|
86
|
+
// is still held down, or user presses an arrow while dragging with the
|
|
87
|
+
// mouse), we want to signal the end of the previous resize first.
|
|
88
|
+
if (resizeContext.current.trigger) {
|
|
89
|
+
resizeEnd();
|
|
90
|
+
}
|
|
91
|
+
|
|
92
|
+
onResizeStart === null || onResizeStart === void 0 ? void 0 : onResizeStart(trigger);
|
|
93
|
+
resizeContext.current = {
|
|
94
|
+
trigger: trigger,
|
|
95
|
+
keyMoveDirection: keyMoveDirection
|
|
96
|
+
};
|
|
97
|
+
}, [onResizeStart, resizeEnd]);
|
|
76
98
|
var onMouseDown = useCallback(function (event) {
|
|
77
99
|
var currentTarget = event.currentTarget;
|
|
78
100
|
var prevPanel = currentTarget.previousElementSibling;
|
|
@@ -81,12 +103,13 @@ export var EuiResizableContainer = function EuiResizableContainer(_ref) {
|
|
|
81
103
|
var prevPanelId = prevPanel.id;
|
|
82
104
|
var nextPanelId = nextPanel.id;
|
|
83
105
|
var position = getPosition(event, isHorizontal);
|
|
106
|
+
resizeStart('pointer');
|
|
84
107
|
actions.dragStart({
|
|
85
108
|
position: position,
|
|
86
109
|
prevPanelId: prevPanelId,
|
|
87
110
|
nextPanelId: nextPanelId
|
|
88
111
|
});
|
|
89
|
-
}, [actions, isHorizontal]);
|
|
112
|
+
}, [actions, isHorizontal, resizeStart]);
|
|
90
113
|
var onMouseMove = useCallback(function (event) {
|
|
91
114
|
if (!reducerState.prevPanelId || !reducerState.nextPanelId || !reducerState.isDragging) return;
|
|
92
115
|
var position = getPosition(event, isHorizontal);
|
|
@@ -96,24 +119,29 @@ export var EuiResizableContainer = function EuiResizableContainer(_ref) {
|
|
|
96
119
|
nextPanelId: reducerState.nextPanelId
|
|
97
120
|
});
|
|
98
121
|
}, [actions, isHorizontal, reducerState.prevPanelId, reducerState.nextPanelId, reducerState.isDragging]);
|
|
122
|
+
var getKeyMoveDirection = useCallback(function (key) {
|
|
123
|
+
var direction = null;
|
|
124
|
+
|
|
125
|
+
if (isHorizontal && key === keys.ARROW_LEFT || !isHorizontal && key === keys.ARROW_UP) {
|
|
126
|
+
direction = 'backward';
|
|
127
|
+
} else if (isHorizontal && key === keys.ARROW_RIGHT || !isHorizontal && key === keys.ARROW_DOWN) {
|
|
128
|
+
direction = 'forward';
|
|
129
|
+
}
|
|
130
|
+
|
|
131
|
+
return direction;
|
|
132
|
+
}, [isHorizontal]);
|
|
99
133
|
var onKeyDown = useCallback(function (event) {
|
|
100
134
|
var key = event.key,
|
|
101
135
|
currentTarget = event.currentTarget;
|
|
102
|
-
var
|
|
103
|
-
var shouldResizeVerticalPanel = !isHorizontal && (key === keys.ARROW_UP || key === keys.ARROW_DOWN);
|
|
136
|
+
var direction = getKeyMoveDirection(key);
|
|
104
137
|
var prevPanelId = currentTarget.previousElementSibling.id;
|
|
105
138
|
var nextPanelId = currentTarget.nextElementSibling.id;
|
|
106
|
-
var direction;
|
|
107
|
-
|
|
108
|
-
if (key === keys.ARROW_DOWN || key === keys.ARROW_RIGHT) {
|
|
109
|
-
direction = 'forward';
|
|
110
|
-
}
|
|
111
139
|
|
|
112
|
-
if (
|
|
113
|
-
|
|
114
|
-
|
|
140
|
+
if (direction && prevPanelId && nextPanelId) {
|
|
141
|
+
if (!event.repeat) {
|
|
142
|
+
resizeStart('key', direction);
|
|
143
|
+
}
|
|
115
144
|
|
|
116
|
-
if (direction === 'forward' || direction === 'backward' && (shouldResizeHorizontalPanel || shouldResizeVerticalPanel) && prevPanelId && nextPanelId) {
|
|
117
145
|
event.preventDefault();
|
|
118
146
|
actions.keyMove({
|
|
119
147
|
direction: direction,
|
|
@@ -121,17 +149,40 @@ export var EuiResizableContainer = function EuiResizableContainer(_ref) {
|
|
|
121
149
|
nextPanelId: nextPanelId
|
|
122
150
|
});
|
|
123
151
|
}
|
|
124
|
-
}, [actions,
|
|
152
|
+
}, [actions, getKeyMoveDirection, resizeStart]);
|
|
153
|
+
var onKeyUp = useCallback(function (_ref2) {
|
|
154
|
+
var key = _ref2.key;
|
|
155
|
+
|
|
156
|
+
// We only want to signal the end of a resize if the key that was released
|
|
157
|
+
// is the same as the one that started the resize. This prevents the end
|
|
158
|
+
// of a resize if the user presses one arrow key, then presses the opposite
|
|
159
|
+
// arrow key to change direction, then releases the first arrow key.
|
|
160
|
+
if (resizeContext.current.trigger === 'key' && resizeContext.current.keyMoveDirection === getKeyMoveDirection(key)) {
|
|
161
|
+
resizeEnd();
|
|
162
|
+
}
|
|
163
|
+
}, [getKeyMoveDirection, resizeEnd]);
|
|
125
164
|
var onMouseUp = useCallback(function () {
|
|
165
|
+
if (resizeContext.current.trigger === 'pointer') {
|
|
166
|
+
resizeEnd();
|
|
167
|
+
}
|
|
168
|
+
|
|
126
169
|
actions.reset();
|
|
127
|
-
}, [actions]);
|
|
170
|
+
}, [actions, resizeEnd]);
|
|
171
|
+
var onBlur = useCallback(function () {
|
|
172
|
+
if (resizeContext.current.trigger === 'key') {
|
|
173
|
+
resizeEnd();
|
|
174
|
+
}
|
|
175
|
+
|
|
176
|
+
actions.resizerBlur();
|
|
177
|
+
}, [actions, resizeEnd]); // eslint-disable-next-line react-hooks/exhaustive-deps
|
|
128
178
|
|
|
129
179
|
var EuiResizableButton = useCallback(euiResizableButtonWithControls({
|
|
130
180
|
onKeyDown: onKeyDown,
|
|
181
|
+
onKeyUp: onKeyUp,
|
|
131
182
|
onMouseDown: onMouseDown,
|
|
132
183
|
onTouchStart: onMouseDown,
|
|
133
184
|
onFocus: actions.resizerFocus,
|
|
134
|
-
onBlur:
|
|
185
|
+
onBlur: onBlur,
|
|
135
186
|
isHorizontal: isHorizontal,
|
|
136
187
|
registration: {
|
|
137
188
|
register: actions.registerResizer,
|
|
@@ -35,9 +35,9 @@ export var EuiToolTipAnchor = /*#__PURE__*/forwardRef(function (_ref, ref) {
|
|
|
35
35
|
var classes = classNames('euiToolTipAnchor', className);
|
|
36
36
|
return (// eslint-disable-next-line jsx-a11y/mouse-events-have-key-events
|
|
37
37
|
___EmotionJSX("span", _extends({
|
|
38
|
-
ref: ref
|
|
38
|
+
ref: ref,
|
|
39
|
+
css: cssStyles
|
|
39
40
|
}, rest, {
|
|
40
|
-
css: cssStyles,
|
|
41
41
|
className: classes,
|
|
42
42
|
onMouseOver: onMouseOver,
|
|
43
43
|
onMouseOut: onMouseOut
|
|
@@ -38,7 +38,7 @@ var _breadcrumb = require("./breadcrumb.styles");
|
|
|
38
38
|
var _react2 = require("@emotion/react");
|
|
39
39
|
|
|
40
40
|
var _excluded = ["children", "className", "type", "truncate"],
|
|
41
|
-
_excluded2 = ["text", "truncate", "type", "href", "rel", "onClick", "className", "color", "isFirstBreadcrumb", "isLastBreadcrumb", "isOnlyBreadcrumb", "highlightLastBreadcrumb"];
|
|
41
|
+
_excluded2 = ["text", "truncate", "type", "href", "rel", "onClick", "className", "color", "isFirstBreadcrumb", "isLastBreadcrumb", "isOnlyBreadcrumb", "highlightLastBreadcrumb", "truncateLastBreadcrumb"];
|
|
42
42
|
|
|
43
43
|
function _getRequireWildcardCache(nodeInterop) { if (typeof WeakMap !== "function") return null; var cacheBabelInterop = new WeakMap(); var cacheNodeInterop = new WeakMap(); return (_getRequireWildcardCache = function _getRequireWildcardCache(nodeInterop) { return nodeInterop ? cacheNodeInterop : cacheBabelInterop; })(nodeInterop); }
|
|
44
44
|
|
|
@@ -75,11 +75,12 @@ var EuiBreadcrumbContent = function EuiBreadcrumbContent(_ref2) {
|
|
|
75
75
|
isLastBreadcrumb = _ref2.isLastBreadcrumb,
|
|
76
76
|
isOnlyBreadcrumb = _ref2.isOnlyBreadcrumb,
|
|
77
77
|
highlightLastBreadcrumb = _ref2.highlightLastBreadcrumb,
|
|
78
|
+
truncateLastBreadcrumb = _ref2.truncateLastBreadcrumb,
|
|
78
79
|
rest = (0, _objectWithoutProperties2.default)(_ref2, _excluded2);
|
|
79
80
|
var classes = (0, _classnames.default)('euiBreadcrumb__content', className);
|
|
80
81
|
var euiTheme = (0, _services.useEuiTheme)();
|
|
81
82
|
var styles = (0, _breadcrumb.euiBreadcrumbContentStyles)(euiTheme);
|
|
82
|
-
var cssStyles = [styles.euiBreadcrumb__content, styles[type], truncate &&
|
|
83
|
+
var cssStyles = [styles.euiBreadcrumb__content, styles[type], truncate && !truncateLastBreadcrumb && styles.isTruncated, truncateLastBreadcrumb && styles.isTruncatedLast];
|
|
83
84
|
|
|
84
85
|
if (type === 'application') {
|
|
85
86
|
if (isOnlyBreadcrumb) {
|
|
@@ -66,12 +66,14 @@ var EuiBreadcrumbs = function EuiBreadcrumbs(_ref) {
|
|
|
66
66
|
}, [breadcrumbs, responsiveMax]);
|
|
67
67
|
var breadcrumbChildren = (0, _react.useMemo)(function () {
|
|
68
68
|
return visibleBreadcrumbs.map(function (breadcrumb, index) {
|
|
69
|
+
var _breadcrumb$truncate;
|
|
70
|
+
|
|
69
71
|
var isFirstBreadcrumb = index === 0;
|
|
70
72
|
var isLastBreadcrumb = index === visibleBreadcrumbs.length - 1;
|
|
71
73
|
var isOnlyBreadcrumb = visibleBreadcrumbs.length === 1;
|
|
72
74
|
var sharedProps = {
|
|
73
75
|
type: type,
|
|
74
|
-
truncate: truncate
|
|
76
|
+
truncate: (_breadcrumb$truncate = breadcrumb.truncate) !== null && _breadcrumb$truncate !== void 0 ? _breadcrumb$truncate : truncate
|
|
75
77
|
};
|
|
76
78
|
return breadcrumb.isCollapsedButton ? (0, _react2.jsx)(_breadcrumb.EuiBreadcrumbCollapsed, (0, _extends2.default)({
|
|
77
79
|
key: "collapsed"
|
|
@@ -85,12 +87,13 @@ var EuiBreadcrumbs = function EuiBreadcrumbs(_ref) {
|
|
|
85
87
|
max: 0
|
|
86
88
|
})) : (0, _react2.jsx)(_breadcrumb.EuiBreadcrumb, (0, _extends2.default)({
|
|
87
89
|
key: index
|
|
88
|
-
}, sharedProps), (0, _react2.jsx)(_breadcrumb.EuiBreadcrumbContent, (0, _extends2.default)({
|
|
90
|
+
}, sharedProps), (0, _react2.jsx)(_breadcrumb.EuiBreadcrumbContent, (0, _extends2.default)({}, breadcrumb, sharedProps, {
|
|
89
91
|
isFirstBreadcrumb: isFirstBreadcrumb,
|
|
90
92
|
isLastBreadcrumb: isLastBreadcrumb,
|
|
91
93
|
isOnlyBreadcrumb: isOnlyBreadcrumb,
|
|
92
|
-
highlightLastBreadcrumb: isLastBreadcrumb && lastBreadcrumbIsCurrentPage
|
|
93
|
-
|
|
94
|
+
highlightLastBreadcrumb: isLastBreadcrumb && lastBreadcrumbIsCurrentPage,
|
|
95
|
+
truncateLastBreadcrumb: isLastBreadcrumb && truncate && breadcrumb.truncate == null
|
|
96
|
+
})));
|
|
94
97
|
});
|
|
95
98
|
}, [visibleBreadcrumbs, truncate, type, lastBreadcrumbIsCurrentPage]);
|
|
96
99
|
return (0, _react2.jsx)("nav", (0, _extends2.default)({
|
|
@@ -47,7 +47,7 @@ var _popover = require("../../services/popover");
|
|
|
47
47
|
|
|
48
48
|
var _react2 = require("@emotion/react");
|
|
49
49
|
|
|
50
|
-
var _excluded = ["data-test-subj", "async", "className", "compressed", "customOptionText", "fullWidth", "id", "inputRef", "isClearable", "isDisabled", "isInvalid", "isLoading", "noSuggestions", "onBlur", "onChange", "onCreateOption", "onSearchChange", "options", "placeholder", "renderOption", "rowHeight", "selectedOptions", "singleSelection", "prepend", "sortMatchesBy", "delimiter", "append", "autoFocus", "aria-label", "aria-labelledby"];
|
|
50
|
+
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"];
|
|
51
51
|
|
|
52
52
|
function _getRequireWildcardCache(nodeInterop) { if (typeof WeakMap !== "function") return null; var cacheBabelInterop = new WeakMap(); var cacheNodeInterop = new WeakMap(); return (_getRequireWildcardCache = function _getRequireWildcardCache(nodeInterop) { return nodeInterop ? cacheNodeInterop : cacheBabelInterop; })(nodeInterop); }
|
|
53
53
|
|
|
@@ -85,7 +85,15 @@ var EuiComboBox = /*#__PURE__*/function (_Component) {
|
|
|
85
85
|
listElement: null,
|
|
86
86
|
listPosition: 'bottom',
|
|
87
87
|
listZIndex: undefined,
|
|
88
|
-
matchingOptions: (0, _matching_options.getMatchingOptions)(
|
|
88
|
+
matchingOptions: (0, _matching_options.getMatchingOptions)({
|
|
89
|
+
options: _this.props.options,
|
|
90
|
+
selectedOptions: _this.props.selectedOptions,
|
|
91
|
+
searchValue: initialSearchValue,
|
|
92
|
+
isCaseSensitive: _this.props.isCaseSensitive,
|
|
93
|
+
isPreFiltered: _this.props.async,
|
|
94
|
+
showPrevSelected: Boolean(_this.props.singleSelection),
|
|
95
|
+
sortMatchesBy: _this.props.sortMatchesBy
|
|
96
|
+
}),
|
|
89
97
|
searchValue: initialSearchValue,
|
|
90
98
|
width: 0
|
|
91
99
|
});
|
|
@@ -281,6 +289,7 @@ var EuiComboBox = /*#__PURE__*/function (_Component) {
|
|
|
281
289
|
});
|
|
282
290
|
(0, _defineProperty2.default)((0, _assertThisInitialized2.default)(_this), "addCustomOption", function (isContainerBlur, searchValue) {
|
|
283
291
|
var _this$props = _this.props,
|
|
292
|
+
isCaseSensitive = _this$props.isCaseSensitive,
|
|
284
293
|
onCreateOption = _this$props.onCreateOption,
|
|
285
294
|
options = _this$props.options,
|
|
286
295
|
selectedOptions = _this$props.selectedOptions,
|
|
@@ -303,7 +312,11 @@ var EuiComboBox = /*#__PURE__*/function (_Component) {
|
|
|
303
312
|
} // Don't create the value if it's already been selected.
|
|
304
313
|
|
|
305
314
|
|
|
306
|
-
if ((0, _matching_options.getSelectedOptionForSearchValue)(
|
|
315
|
+
if ((0, _matching_options.getSelectedOptionForSearchValue)({
|
|
316
|
+
isCaseSensitive: isCaseSensitive,
|
|
317
|
+
searchValue: searchValue,
|
|
318
|
+
selectedOptions: selectedOptions
|
|
319
|
+
})) {
|
|
307
320
|
return;
|
|
308
321
|
} // Add new custom pill if this is custom input, even if it partially matches an option.
|
|
309
322
|
|
|
@@ -328,13 +341,16 @@ var EuiComboBox = /*#__PURE__*/function (_Component) {
|
|
|
328
341
|
return false;
|
|
329
342
|
}
|
|
330
343
|
|
|
331
|
-
|
|
344
|
+
var normalizedSearchSubject = (0, _matching_options.transformForCaseSensitivity)(_this.state.matchingOptions[0].label, _this.props.isCaseSensitive);
|
|
345
|
+
var normalizedSearchValue = (0, _matching_options.transformForCaseSensitivity)(searchValue, _this.props.isCaseSensitive);
|
|
346
|
+
return normalizedSearchSubject === normalizedSearchValue;
|
|
332
347
|
});
|
|
333
348
|
(0, _defineProperty2.default)((0, _assertThisInitialized2.default)(_this), "areAllOptionsSelected", function () {
|
|
334
349
|
var _this$props2 = _this.props,
|
|
335
350
|
options = _this$props2.options,
|
|
336
351
|
selectedOptions = _this$props2.selectedOptions,
|
|
337
|
-
async = _this$props2.async
|
|
352
|
+
async = _this$props2.async,
|
|
353
|
+
isCaseSensitive = _this$props2.isCaseSensitive; // Assume if this is async then there could be infinite options.
|
|
338
354
|
|
|
339
355
|
if (async) {
|
|
340
356
|
return false;
|
|
@@ -342,13 +358,13 @@ var EuiComboBox = /*#__PURE__*/function (_Component) {
|
|
|
342
358
|
|
|
343
359
|
var flattenOptions = (0, _matching_options.flattenOptionGroups)(options).map(function (option) {
|
|
344
360
|
return _objectSpread(_objectSpread({}, option), {}, {
|
|
345
|
-
label: option.label.trim()
|
|
361
|
+
label: (0, _matching_options.transformForCaseSensitivity)(option.label.trim(), isCaseSensitive)
|
|
346
362
|
});
|
|
347
363
|
});
|
|
348
364
|
var numberOfSelectedOptions = 0;
|
|
349
365
|
selectedOptions.forEach(function (_ref3) {
|
|
350
366
|
var label = _ref3.label;
|
|
351
|
-
var trimmedLabel = label.trim()
|
|
367
|
+
var trimmedLabel = (0, _matching_options.transformForCaseSensitivity)(label.trim(), isCaseSensitive);
|
|
352
368
|
if (flattenOptions.findIndex(function (option) {
|
|
353
369
|
return option.label === trimmedLabel;
|
|
354
370
|
}) !== -1) numberOfSelectedOptions += 1;
|
|
@@ -687,7 +703,15 @@ var EuiComboBox = /*#__PURE__*/function (_Component) {
|
|
|
687
703
|
// isn't called after a state change, and we track `searchValue` in state
|
|
688
704
|
// instead we need to react to a change in searchValue here
|
|
689
705
|
|
|
690
|
-
this.updateMatchingOptionsIfDifferent((0, _matching_options.getMatchingOptions)(
|
|
706
|
+
this.updateMatchingOptionsIfDifferent((0, _matching_options.getMatchingOptions)({
|
|
707
|
+
options: options,
|
|
708
|
+
selectedOptions: selectedOptions,
|
|
709
|
+
searchValue: searchValue,
|
|
710
|
+
isCaseSensitive: this.props.isCaseSensitive,
|
|
711
|
+
isPreFiltered: this.props.async,
|
|
712
|
+
showPrevSelected: Boolean(singleSelection),
|
|
713
|
+
sortMatchesBy: sortMatchesBy
|
|
714
|
+
}));
|
|
691
715
|
}
|
|
692
716
|
}, {
|
|
693
717
|
key: "componentWillUnmount",
|
|
@@ -708,6 +732,7 @@ var EuiComboBox = /*#__PURE__*/function (_Component) {
|
|
|
708
732
|
fullWidth = _this$props8.fullWidth,
|
|
709
733
|
id = _this$props8.id,
|
|
710
734
|
inputRef = _this$props8.inputRef,
|
|
735
|
+
isCaseSensitive = _this$props8.isCaseSensitive,
|
|
711
736
|
isClearable = _this$props8.isClearable,
|
|
712
737
|
isDisabled = _this$props8.isDisabled,
|
|
713
738
|
isInvalid = _this$props8.isInvalid,
|
|
@@ -772,6 +797,7 @@ var EuiComboBox = /*#__PURE__*/function (_Component) {
|
|
|
772
797
|
customOptionText: customOptionText,
|
|
773
798
|
"data-test-subj": optionsListDataTestSubj,
|
|
774
799
|
fullWidth: fullWidth,
|
|
800
|
+
isCaseSensitive: isCaseSensitive,
|
|
775
801
|
isLoading: isLoading,
|
|
776
802
|
listRef: _this3.listRefCallback,
|
|
777
803
|
matchingOptions: matchingOptions,
|
|
@@ -851,7 +877,9 @@ var EuiComboBox = /*#__PURE__*/function (_Component) {
|
|
|
851
877
|
}], [{
|
|
852
878
|
key: "getDerivedStateFromProps",
|
|
853
879
|
value: function getDerivedStateFromProps(nextProps, prevState) {
|
|
854
|
-
var
|
|
880
|
+
var async = nextProps.async,
|
|
881
|
+
isCaseSensitive = nextProps.isCaseSensitive,
|
|
882
|
+
options = nextProps.options,
|
|
855
883
|
selectedOptions = nextProps.selectedOptions,
|
|
856
884
|
singleSelection = nextProps.singleSelection,
|
|
857
885
|
sortMatchesBy = nextProps.sortMatchesBy;
|
|
@@ -859,7 +887,15 @@ var EuiComboBox = /*#__PURE__*/function (_Component) {
|
|
|
859
887
|
searchValue = prevState.searchValue; // Calculate and cache the options which match the searchValue, because we use this information
|
|
860
888
|
// in multiple places and it would be expensive to calculate repeatedly.
|
|
861
889
|
|
|
862
|
-
var matchingOptions = (0, _matching_options.getMatchingOptions)(
|
|
890
|
+
var matchingOptions = (0, _matching_options.getMatchingOptions)({
|
|
891
|
+
options: options,
|
|
892
|
+
selectedOptions: selectedOptions,
|
|
893
|
+
searchValue: searchValue,
|
|
894
|
+
isCaseSensitive: isCaseSensitive,
|
|
895
|
+
isPreFiltered: async,
|
|
896
|
+
showPrevSelected: Boolean(singleSelection),
|
|
897
|
+
sortMatchesBy: sortMatchesBy
|
|
898
|
+
});
|
|
863
899
|
var stateUpdate = {
|
|
864
900
|
matchingOptions: matchingOptions
|
|
865
901
|
};
|
|
@@ -54,7 +54,7 @@ var _popover_panel = require("../../popover/popover_panel");
|
|
|
54
54
|
var _react2 = require("@emotion/react");
|
|
55
55
|
|
|
56
56
|
var _excluded = ["key", "isGroupLabelOption", "label", "value"],
|
|
57
|
-
_excluded2 = ["data-test-subj", "activeOptionIndex", "areAllOptionsSelected", "customOptionText", "fullWidth", "getSelectedOptionForSearchValue", "isLoading", "listRef", "matchingOptions", "onCloseList", "onCreateOption", "onOptionClick", "onOptionEnterKey", "onScroll", "optionRef", "options", "position", "renderOption", "rootId", "rowHeight", "scrollToIndex", "searchValue", "selectedOptions", "singleSelection", "updatePosition", "width", "delimiter", "zIndex", "style", "listboxAriaLabel"];
|
|
57
|
+
_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"];
|
|
58
58
|
|
|
59
59
|
function _getRequireWildcardCache(nodeInterop) { if (typeof WeakMap !== "function") return null; var cacheBabelInterop = new WeakMap(); var cacheNodeInterop = new WeakMap(); return (_getRequireWildcardCache = function _getRequireWildcardCache(nodeInterop) { return nodeInterop ? cacheNodeInterop : cacheBabelInterop; })(nodeInterop); }
|
|
60
60
|
|
|
@@ -149,7 +149,7 @@ var EuiComboBoxOptionsList = /*#__PURE__*/function (_Component) {
|
|
|
149
149
|
|
|
150
150
|
if (isGroupLabelOption) {
|
|
151
151
|
return (0, _react2.jsx)("div", {
|
|
152
|
-
key: key !== null && key !== void 0 ? key : label
|
|
152
|
+
key: key !== null && key !== void 0 ? key : label,
|
|
153
153
|
style: style
|
|
154
154
|
}, (0, _react2.jsx)(_combo_box_title.EuiComboBoxTitle, null, label));
|
|
155
155
|
}
|
|
@@ -164,7 +164,7 @@ var EuiComboBoxOptionsList = /*#__PURE__*/function (_Component) {
|
|
|
164
164
|
var optionIsDisabled = option.hasOwnProperty('disabled') && option.disabled === true;
|
|
165
165
|
return (0, _react2.jsx)(_filter_select_item.EuiFilterSelectItem, (0, _extends2.default)({
|
|
166
166
|
style: style,
|
|
167
|
-
key: (_option$key = option.key) !== null && _option$key !== void 0 ? _option$key : option.label
|
|
167
|
+
key: (_option$key = option.key) !== null && _option$key !== void 0 ? _option$key : option.label,
|
|
168
168
|
onClick: function onClick() {
|
|
169
169
|
if (onOptionClick) {
|
|
170
170
|
onOptionClick(option);
|
|
@@ -182,6 +182,7 @@ var EuiComboBoxOptionsList = /*#__PURE__*/function (_Component) {
|
|
|
182
182
|
className: OPTION_CONTENT_CLASSNAME
|
|
183
183
|
}, renderOption(option, searchValue, 'euiComboBoxOption__renderOption')) : (0, _react2.jsx)(_highlight.EuiHighlight, {
|
|
184
184
|
search: searchValue,
|
|
185
|
+
strict: _this.props.isCaseSensitive,
|
|
185
186
|
className: OPTION_CONTENT_CLASSNAME
|
|
186
187
|
}, label), optionIsFocused && !optionIsDisabled ? hitEnterBadge : null));
|
|
187
188
|
});
|
|
@@ -245,6 +246,7 @@ var EuiComboBoxOptionsList = /*#__PURE__*/function (_Component) {
|
|
|
245
246
|
customOptionText = _this$props2.customOptionText,
|
|
246
247
|
fullWidth = _this$props2.fullWidth,
|
|
247
248
|
getSelectedOptionForSearchValue = _this$props2.getSelectedOptionForSearchValue,
|
|
249
|
+
isCaseSensitive = _this$props2.isCaseSensitive,
|
|
248
250
|
isLoading = _this$props2.isLoading,
|
|
249
251
|
listRef = _this$props2.listRef,
|
|
250
252
|
matchingOptions = _this$props2.matchingOptions,
|
|
@@ -302,7 +304,11 @@ var EuiComboBoxOptionsList = /*#__PURE__*/function (_Component) {
|
|
|
302
304
|
}
|
|
303
305
|
})), hitEnterBadge);
|
|
304
306
|
} else {
|
|
305
|
-
var selectedOptionForValue = getSelectedOptionForSearchValue(
|
|
307
|
+
var selectedOptionForValue = getSelectedOptionForSearchValue({
|
|
308
|
+
isCaseSensitive: isCaseSensitive,
|
|
309
|
+
searchValue: searchValue,
|
|
310
|
+
selectedOptions: selectedOptions
|
|
311
|
+
});
|
|
306
312
|
|
|
307
313
|
if (selectedOptionForValue) {
|
|
308
314
|
// Disallow duplicate custom options.
|
|
@@ -408,6 +414,7 @@ var EuiComboBoxOptionsList = /*#__PURE__*/function (_Component) {
|
|
|
408
414
|
exports.EuiComboBoxOptionsList = EuiComboBoxOptionsList;
|
|
409
415
|
(0, _defineProperty2.default)(EuiComboBoxOptionsList, "defaultProps", {
|
|
410
416
|
'data-test-subj': '',
|
|
411
|
-
rowHeight: 29
|
|
412
|
-
|
|
417
|
+
rowHeight: 29,
|
|
418
|
+
// row height of default option renderer
|
|
419
|
+
isCaseSensitive: false
|
|
413
420
|
});
|
|
@@ -5,7 +5,7 @@ var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefau
|
|
|
5
5
|
Object.defineProperty(exports, "__esModule", {
|
|
6
6
|
value: true
|
|
7
7
|
});
|
|
8
|
-
exports.getSelectedOptionForSearchValue = exports.getMatchingOptions = exports.flattenOptionGroups = void 0;
|
|
8
|
+
exports.transformForCaseSensitivity = exports.getSelectedOptionForSearchValue = exports.getMatchingOptions = exports.flattenOptionGroups = void 0;
|
|
9
9
|
|
|
10
10
|
var _toConsumableArray2 = _interopRequireDefault(require("@babel/runtime/helpers/toConsumableArray"));
|
|
11
11
|
|
|
@@ -16,6 +16,12 @@ var _toConsumableArray2 = _interopRequireDefault(require("@babel/runtime/helpers
|
|
|
16
16
|
* in compliance with, at your election, the Elastic License 2.0 or the Server
|
|
17
17
|
* Side Public License, v 1.
|
|
18
18
|
*/
|
|
19
|
+
var transformForCaseSensitivity = function transformForCaseSensitivity(string, isCaseSensitive) {
|
|
20
|
+
return isCaseSensitive ? string : string.toLowerCase();
|
|
21
|
+
};
|
|
22
|
+
|
|
23
|
+
exports.transformForCaseSensitivity = transformForCaseSensitivity;
|
|
24
|
+
|
|
19
25
|
var flattenOptionGroups = function flattenOptionGroups(optionsOrGroups) {
|
|
20
26
|
return optionsOrGroups.reduce(function (options, optionOrGroup) {
|
|
21
27
|
if (optionOrGroup.options) {
|
|
@@ -30,18 +36,35 @@ var flattenOptionGroups = function flattenOptionGroups(optionsOrGroups) {
|
|
|
30
36
|
|
|
31
37
|
exports.flattenOptionGroups = flattenOptionGroups;
|
|
32
38
|
|
|
33
|
-
var getSelectedOptionForSearchValue = function getSelectedOptionForSearchValue(
|
|
34
|
-
var
|
|
39
|
+
var getSelectedOptionForSearchValue = function getSelectedOptionForSearchValue(_ref) {
|
|
40
|
+
var isCaseSensitive = _ref.isCaseSensitive,
|
|
41
|
+
searchValue = _ref.searchValue,
|
|
42
|
+
selectedOptions = _ref.selectedOptions,
|
|
43
|
+
optionKey = _ref.optionKey;
|
|
44
|
+
var normalizedSearchValue = transformForCaseSensitivity(searchValue, isCaseSensitive);
|
|
35
45
|
return selectedOptions.find(function (option) {
|
|
36
|
-
|
|
46
|
+
var normalizedOption = transformForCaseSensitivity(option.label, isCaseSensitive);
|
|
47
|
+
return normalizedOption === normalizedSearchValue && (!optionKey || option.key === optionKey);
|
|
37
48
|
});
|
|
38
49
|
};
|
|
39
50
|
|
|
40
51
|
exports.getSelectedOptionForSearchValue = getSelectedOptionForSearchValue;
|
|
41
52
|
|
|
42
|
-
var collectMatchingOption = function collectMatchingOption(
|
|
53
|
+
var collectMatchingOption = function collectMatchingOption(_ref2) {
|
|
54
|
+
var accumulator = _ref2.accumulator,
|
|
55
|
+
option = _ref2.option,
|
|
56
|
+
selectedOptions = _ref2.selectedOptions,
|
|
57
|
+
normalizedSearchValue = _ref2.normalizedSearchValue,
|
|
58
|
+
isCaseSensitive = _ref2.isCaseSensitive,
|
|
59
|
+
isPreFiltered = _ref2.isPreFiltered,
|
|
60
|
+
showPrevSelected = _ref2.showPrevSelected;
|
|
43
61
|
// Only show options which haven't yet been selected unless requested.
|
|
44
|
-
var selectedOption = getSelectedOptionForSearchValue(
|
|
62
|
+
var selectedOption = getSelectedOptionForSearchValue({
|
|
63
|
+
isCaseSensitive: isCaseSensitive,
|
|
64
|
+
searchValue: option.label,
|
|
65
|
+
selectedOptions: selectedOptions,
|
|
66
|
+
optionKey: option.key
|
|
67
|
+
});
|
|
45
68
|
|
|
46
69
|
if (selectedOption && !showPrevSelected) {
|
|
47
70
|
return false;
|
|
@@ -58,21 +81,40 @@ var collectMatchingOption = function collectMatchingOption(accumulator, option,
|
|
|
58
81
|
return;
|
|
59
82
|
}
|
|
60
83
|
|
|
61
|
-
var normalizedOption = option.label.trim()
|
|
84
|
+
var normalizedOption = transformForCaseSensitivity(option.label.trim(), isCaseSensitive);
|
|
62
85
|
|
|
63
86
|
if (normalizedOption.includes(normalizedSearchValue)) {
|
|
64
87
|
accumulator.push(option);
|
|
65
88
|
}
|
|
66
89
|
};
|
|
67
90
|
|
|
68
|
-
var getMatchingOptions = function getMatchingOptions(
|
|
69
|
-
var
|
|
91
|
+
var getMatchingOptions = function getMatchingOptions(_ref3) {
|
|
92
|
+
var options = _ref3.options,
|
|
93
|
+
selectedOptions = _ref3.selectedOptions,
|
|
94
|
+
searchValue = _ref3.searchValue,
|
|
95
|
+
_ref3$isCaseSensitive = _ref3.isCaseSensitive,
|
|
96
|
+
isCaseSensitive = _ref3$isCaseSensitive === void 0 ? false : _ref3$isCaseSensitive,
|
|
97
|
+
_ref3$isPreFiltered = _ref3.isPreFiltered,
|
|
98
|
+
isPreFiltered = _ref3$isPreFiltered === void 0 ? false : _ref3$isPreFiltered,
|
|
99
|
+
_ref3$showPrevSelecte = _ref3.showPrevSelected,
|
|
100
|
+
showPrevSelected = _ref3$showPrevSelecte === void 0 ? false : _ref3$showPrevSelecte,
|
|
101
|
+
_ref3$sortMatchesBy = _ref3.sortMatchesBy,
|
|
102
|
+
sortMatchesBy = _ref3$sortMatchesBy === void 0 ? 'none' : _ref3$sortMatchesBy;
|
|
103
|
+
var normalizedSearchValue = transformForCaseSensitivity(searchValue.trim(), isCaseSensitive);
|
|
70
104
|
var matchingOptions = [];
|
|
71
105
|
options.forEach(function (option) {
|
|
72
106
|
if (option.options) {
|
|
73
107
|
var matchingOptionsForGroup = [];
|
|
74
108
|
option.options.forEach(function (groupOption) {
|
|
75
|
-
collectMatchingOption(
|
|
109
|
+
collectMatchingOption({
|
|
110
|
+
accumulator: matchingOptionsForGroup,
|
|
111
|
+
option: groupOption,
|
|
112
|
+
selectedOptions: selectedOptions,
|
|
113
|
+
normalizedSearchValue: normalizedSearchValue,
|
|
114
|
+
isCaseSensitive: isCaseSensitive,
|
|
115
|
+
isPreFiltered: isPreFiltered,
|
|
116
|
+
showPrevSelected: showPrevSelected
|
|
117
|
+
});
|
|
76
118
|
});
|
|
77
119
|
|
|
78
120
|
if (matchingOptionsForGroup.length > 0) {
|
|
@@ -87,7 +129,15 @@ var getMatchingOptions = function getMatchingOptions(options, selectedOptions, s
|
|
|
87
129
|
matchingOptions = matchingOptions.concat(matchingOptionsForGroup);
|
|
88
130
|
}
|
|
89
131
|
} else {
|
|
90
|
-
collectMatchingOption(
|
|
132
|
+
collectMatchingOption({
|
|
133
|
+
accumulator: matchingOptions,
|
|
134
|
+
option: option,
|
|
135
|
+
selectedOptions: selectedOptions,
|
|
136
|
+
normalizedSearchValue: normalizedSearchValue,
|
|
137
|
+
isCaseSensitive: isCaseSensitive,
|
|
138
|
+
isPreFiltered: isPreFiltered,
|
|
139
|
+
showPrevSelected: showPrevSelected
|
|
140
|
+
});
|
|
91
141
|
}
|
|
92
142
|
});
|
|
93
143
|
|
|
@@ -97,7 +147,9 @@ var getMatchingOptions = function getMatchingOptions(options, selectedOptions, s
|
|
|
97
147
|
others: []
|
|
98
148
|
};
|
|
99
149
|
matchingOptions.forEach(function (object) {
|
|
100
|
-
|
|
150
|
+
var normalizedLabel = transformForCaseSensitivity(object.label, isCaseSensitive);
|
|
151
|
+
|
|
152
|
+
if (normalizedLabel.startsWith(normalizedSearchValue)) {
|
|
101
153
|
refObj.startWith.push(object);
|
|
102
154
|
} else {
|
|
103
155
|
refObj.others.push(object);
|
|
@@ -5,7 +5,7 @@ var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefau
|
|
|
5
5
|
Object.defineProperty(exports, "__esModule", {
|
|
6
6
|
value: true
|
|
7
7
|
});
|
|
8
|
-
exports.GUTTER_SIZES = exports.EuiFlexGrid = exports.DIRECTIONS = exports.
|
|
8
|
+
exports.GUTTER_SIZES = exports.EuiFlexGrid = exports.DIRECTIONS = exports.ALIGN_ITEMS = void 0;
|
|
9
9
|
|
|
10
10
|
var _extends2 = _interopRequireDefault(require("@babel/runtime/helpers/extends"));
|
|
11
11
|
|
|
@@ -15,37 +15,19 @@ var _react = _interopRequireDefault(require("react"));
|
|
|
15
15
|
|
|
16
16
|
var _classnames = _interopRequireDefault(require("classnames"));
|
|
17
17
|
|
|
18
|
-
var
|
|
18
|
+
var _services = require("../../services");
|
|
19
|
+
|
|
20
|
+
var _flex_grid = require("./flex_grid.styles");
|
|
19
21
|
|
|
20
22
|
var _react2 = require("@emotion/react");
|
|
21
23
|
|
|
22
|
-
var _excluded = ["children", "className", "gutterSize", "direction", "responsive", "columns", "component"];
|
|
23
|
-
var
|
|
24
|
-
row: null,
|
|
25
|
-
column: 'euiFlexGrid--directionColumn'
|
|
26
|
-
};
|
|
27
|
-
var DIRECTIONS = (0, _common.keysOf)(directionToClassNameMap);
|
|
24
|
+
var _excluded = ["children", "className", "gutterSize", "direction", "alignItems", "responsive", "columns", "component"];
|
|
25
|
+
var DIRECTIONS = ['row', 'column'];
|
|
28
26
|
exports.DIRECTIONS = DIRECTIONS;
|
|
29
|
-
var
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
m: 'euiFlexGrid--gutterMedium',
|
|
33
|
-
l: 'euiFlexGrid--gutterLarge',
|
|
34
|
-
xl: 'euiFlexGrid--gutterXLarge'
|
|
35
|
-
};
|
|
36
|
-
var GUTTER_SIZES = (0, _common.keysOf)(gutterSizeToClassNameMap);
|
|
27
|
+
var ALIGN_ITEMS = ['stretch', 'start', 'end', 'center', 'baseline'];
|
|
28
|
+
exports.ALIGN_ITEMS = ALIGN_ITEMS;
|
|
29
|
+
var GUTTER_SIZES = ['none', 's', 'm', 'l', 'xl'];
|
|
37
30
|
exports.GUTTER_SIZES = GUTTER_SIZES;
|
|
38
|
-
var columnsToClassNameMap = {
|
|
39
|
-
0: 'euiFlexGrid--wrap',
|
|
40
|
-
1: 'euiFlexGrid--single',
|
|
41
|
-
2: 'euiFlexGrid--halves',
|
|
42
|
-
3: 'euiFlexGrid--thirds',
|
|
43
|
-
4: 'euiFlexGrid--fourths'
|
|
44
|
-
};
|
|
45
|
-
var COLUMNS = Object.keys(columnsToClassNameMap).map(function (columns) {
|
|
46
|
-
return parseInt(columns, 10);
|
|
47
|
-
});
|
|
48
|
-
exports.COLUMNS = COLUMNS;
|
|
49
31
|
|
|
50
32
|
var EuiFlexGrid = function EuiFlexGrid(_ref) {
|
|
51
33
|
var children = _ref.children,
|
|
@@ -54,21 +36,24 @@ var EuiFlexGrid = function EuiFlexGrid(_ref) {
|
|
|
54
36
|
gutterSize = _ref$gutterSize === void 0 ? 'l' : _ref$gutterSize,
|
|
55
37
|
_ref$direction = _ref.direction,
|
|
56
38
|
direction = _ref$direction === void 0 ? 'row' : _ref$direction,
|
|
39
|
+
_ref$alignItems = _ref.alignItems,
|
|
40
|
+
alignItems = _ref$alignItems === void 0 ? 'stretch' : _ref$alignItems,
|
|
57
41
|
_ref$responsive = _ref.responsive,
|
|
58
42
|
responsive = _ref$responsive === void 0 ? true : _ref$responsive,
|
|
59
43
|
_ref$columns = _ref.columns,
|
|
60
|
-
columns = _ref$columns === void 0 ?
|
|
44
|
+
columns = _ref$columns === void 0 ? 1 : _ref$columns,
|
|
61
45
|
_ref$component = _ref.component,
|
|
62
46
|
Component = _ref$component === void 0 ? 'div' : _ref$component,
|
|
63
47
|
rest = (0, _objectWithoutProperties2.default)(_ref, _excluded);
|
|
64
|
-
var
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
48
|
+
var gridTemplateRows = direction === 'column' ? Math.ceil(_react.default.Children.count(children) / columns) : 0;
|
|
49
|
+
var euiTheme = (0, _services.useEuiTheme)();
|
|
50
|
+
var styles = (0, _flex_grid.euiFlexGridStyles)(euiTheme, gridTemplateRows);
|
|
51
|
+
var cssStyles = [styles.euiFlexGrid, styles.gutterSizes[gutterSize], styles.direction[direction], styles.alignItems[alignItems], styles.columnCount[columns], responsive && styles.responsive];
|
|
52
|
+
var classes = (0, _classnames.default)('euiFlexGrid', className);
|
|
53
|
+
return (0, _react2.jsx)(Component, (0, _extends2.default)({
|
|
54
|
+
css: cssStyles,
|
|
55
|
+
className: classes
|
|
56
|
+
}, rest), children);
|
|
72
57
|
};
|
|
73
58
|
|
|
74
59
|
exports.EuiFlexGrid = EuiFlexGrid;
|