@elastic/eui 123.0.0 → 123.1.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/eui-icons.json +103 -92
- package/dist/svgs/chart_mix.svg +5 -0
- package/dist/svgs/chart_waffle.svg +4 -0
- package/dist/svgs/clipboard_warning.svg +6 -0
- package/dist/svgs/clock_up.svg +5 -0
- package/dist/svgs/emergency_light.svg +4 -0
- package/dist/svgs/product_canvas.svg +5 -0
- package/dist/svgs/product_elastic_agent.svg +5 -0
- package/dist/svgs/product_fleet.svg +3 -0
- package/dist/svgs/product_lens.svg +4 -0
- package/dist/svgs/puzzle_piece.svg +3 -0
- package/dist/svgs/shield.svg +4 -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 +4 -4
- package/es/components/basic_table/in_memory_table.js +4 -4
- 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_icon/button_icon.js +1 -1
- package/es/components/call_out/call_out.js +5 -10
- package/es/components/call_out/call_out.styles.js +3 -14
- 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/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/context_menu/context_menu_item.js +1 -1
- package/es/components/datagrid/body/cell/data_grid_cell.js +24 -24
- 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/header/data_grid_header_cell.js +12 -12
- package/es/components/datagrid/controls/column_sorting.js +13 -13
- package/es/components/datagrid/controls/column_sorting_draggable.js +1 -1
- package/es/components/datagrid/controls/data_grid_toolbar_control.js +1 -1
- 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/flyout/flyout.component.js +4 -2
- package/es/components/flyout/flyout_body.js +12 -12
- package/es/components/flyout/flyout_footer.js +8 -5
- package/es/components/flyout/flyout_header.js +8 -5
- package/es/components/flyout/flyout_menu/flyout_menu.js +2 -2
- package/es/components/flyout/flyout_menu/flyout_menu.styles.js +17 -5
- package/es/components/form/field_number/field_number.js +2 -2
- package/es/components/form/field_text/field_text.js +2 -2
- package/es/components/form/form_control_button/form_control_button.js +1 -1
- package/es/components/form/form_control_layout/append_prepend/form_append_prepend.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_label_append/form_label_append.js +43 -0
- package/es/components/form/form_label_append/form_label_append.styles.js +16 -0
- package/es/components/form/form_label_append/index.js +9 -0
- package/es/components/form/form_row/form_row.js +7 -4
- package/es/components/form/range/range.js +218 -258
- package/es/components/form/super_select/super_select_control.js +25 -9
- package/es/components/form/text_area/text_area.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_section/header_section_item_button.js +1 -1
- package/es/components/icon/assets/chart_mix.js +35 -0
- package/es/components/icon/assets/chart_waffle.js +33 -0
- package/es/components/icon/assets/clipboard_warning.js +39 -0
- package/es/components/icon/assets/clock_up.js +37 -0
- package/es/components/icon/assets/emergency_light.js +33 -0
- package/es/components/icon/assets/product_canvas.js +35 -0
- package/es/components/icon/assets/product_elastic_agent.js +35 -0
- package/es/components/icon/assets/product_fleet.js +33 -0
- package/es/components/icon/assets/product_lens.js +35 -0
- package/es/components/icon/assets/puzzle_piece.js +33 -0
- package/es/components/icon/assets/shield.js +35 -0
- package/es/components/icon/icon.js +1 -1
- package/es/components/icon/icon_map.js +58 -3
- package/es/components/icon/svgs/chart_mix.svg +5 -0
- package/es/components/icon/svgs/chart_waffle.svg +4 -0
- package/es/components/icon/svgs/clipboard_warning.svg +6 -0
- package/es/components/icon/svgs/clock_up.svg +5 -0
- package/es/components/icon/svgs/emergency_light.svg +4 -0
- package/es/components/icon/svgs/product_canvas.svg +5 -0
- package/es/components/icon/svgs/product_elastic_agent.svg +5 -0
- package/es/components/icon/svgs/product_fleet.svg +3 -0
- package/es/components/icon/svgs/product_lens.svg +4 -0
- package/es/components/icon/svgs/puzzle_piece.svg +3 -0
- package/es/components/icon/svgs/shield.svg +4 -0
- 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/list_item_layout/_list_item_layout.js +3 -2
- package/es/components/list_item_layout/_list_item_layout.styles.js +11 -10
- 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/page/page_header/page_header_content.js +1 -1
- package/es/components/pagination/pagination_button.js +1 -1
- package/es/components/selectable/selectable.js +16 -5
- package/es/components/selectable/selectable_list/selectable_list.js +6 -2
- package/es/components/selectable/selectable_list/selectable_list_item.js +11 -7
- package/es/components/selectable/selectable_templates/selectable_template_sitewide.js +2 -1
- package/es/components/table/table_header_cell.js +1 -1
- package/es/components/timeline/timeline_item_icon.js +1 -1
- package/es/components/toast/global_toast_list.js +2 -2
- package/es/components/toast/toast.js +2 -2
- package/es/components/tool_tip/icon_tip.js +1 -1
- package/eui.d.ts +192 -63
- 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 +4 -4
- package/lib/components/basic_table/in_memory_table.js +4 -4
- 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_icon/button_icon.js +1 -1
- package/lib/components/call_out/call_out.js +5 -10
- package/lib/components/call_out/call_out.styles.js +2 -13
- 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/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/context_menu/context_menu_item.js +1 -1
- package/lib/components/datagrid/body/cell/data_grid_cell.js +24 -24
- 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/header/data_grid_header_cell.js +12 -12
- package/lib/components/datagrid/controls/column_sorting.js +13 -13
- package/lib/components/datagrid/controls/column_sorting_draggable.js +1 -1
- package/lib/components/datagrid/controls/data_grid_toolbar_control.js +1 -1
- 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/flyout/flyout.component.js +4 -2
- package/lib/components/flyout/flyout_body.js +12 -12
- package/lib/components/flyout/flyout_footer.js +11 -5
- package/lib/components/flyout/flyout_header.js +11 -5
- package/lib/components/flyout/flyout_menu/flyout_menu.js +2 -2
- package/lib/components/flyout/flyout_menu/flyout_menu.styles.js +16 -4
- package/lib/components/form/field_number/field_number.js +2 -2
- package/lib/components/form/field_text/field_text.js +2 -2
- package/lib/components/form/form_control_button/form_control_button.js +1 -1
- package/lib/components/form/form_control_layout/append_prepend/form_append_prepend.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_label_append/form_label_append.js +49 -0
- package/lib/components/form/form_label_append/form_label_append.styles.js +22 -0
- package/lib/components/form/form_label_append/index.js +12 -0
- package/lib/components/form/form_row/form_row.js +7 -4
- package/lib/components/form/range/range.js +224 -262
- package/lib/components/form/super_select/super_select_control.js +24 -8
- package/lib/components/form/text_area/text_area.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_section/header_section_item_button.js +1 -1
- package/lib/components/icon/assets/chart_mix.js +42 -0
- package/lib/components/icon/assets/chart_waffle.js +40 -0
- package/lib/components/icon/assets/clipboard_warning.js +46 -0
- package/lib/components/icon/assets/clock_up.js +44 -0
- package/lib/components/icon/assets/emergency_light.js +40 -0
- package/lib/components/icon/assets/product_canvas.js +42 -0
- package/lib/components/icon/assets/product_elastic_agent.js +42 -0
- package/lib/components/icon/assets/product_fleet.js +40 -0
- package/lib/components/icon/assets/product_lens.js +42 -0
- package/lib/components/icon/assets/puzzle_piece.js +40 -0
- package/lib/components/icon/assets/shield.js +42 -0
- package/lib/components/icon/icon.js +1 -1
- package/lib/components/icon/icon_map.js +80 -3
- package/lib/components/icon/svgs/chart_mix.svg +5 -0
- package/lib/components/icon/svgs/chart_waffle.svg +4 -0
- package/lib/components/icon/svgs/clipboard_warning.svg +6 -0
- package/lib/components/icon/svgs/clock_up.svg +5 -0
- package/lib/components/icon/svgs/emergency_light.svg +4 -0
- package/lib/components/icon/svgs/product_canvas.svg +5 -0
- package/lib/components/icon/svgs/product_elastic_agent.svg +5 -0
- package/lib/components/icon/svgs/product_fleet.svg +3 -0
- package/lib/components/icon/svgs/product_lens.svg +4 -0
- package/lib/components/icon/svgs/puzzle_piece.svg +3 -0
- package/lib/components/icon/svgs/shield.svg +4 -0
- 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/list_item_layout/_list_item_layout.js +3 -2
- package/lib/components/list_item_layout/_list_item_layout.styles.js +10 -10
- 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/page/page_header/page_header_content.js +1 -1
- package/lib/components/pagination/pagination_button.js +1 -1
- package/lib/components/selectable/selectable.js +16 -5
- package/lib/components/selectable/selectable_list/selectable_list.js +6 -2
- package/lib/components/selectable/selectable_list/selectable_list_item.js +11 -7
- package/lib/components/selectable/selectable_templates/selectable_template_sitewide.js +2 -1
- package/lib/components/table/table_header_cell.js +1 -1
- package/lib/components/timeline/timeline_item_icon.js +1 -1
- package/lib/components/toast/global_toast_list.js +2 -2
- package/lib/components/toast/toast.js +2 -2
- package/lib/components/tool_tip/icon_tip.js +1 -1
- package/optimize/es/components/call_out/call_out.js +3 -8
- package/optimize/es/components/call_out/call_out.styles.js +3 -14
- package/optimize/es/components/flyout/flyout.component.js +4 -2
- package/optimize/es/components/flyout/flyout_footer.js +7 -4
- package/optimize/es/components/flyout/flyout_header.js +7 -4
- package/optimize/es/components/flyout/flyout_menu/flyout_menu.styles.js +17 -5
- package/optimize/es/components/form/form_label_append/form_label_append.js +34 -0
- package/optimize/es/components/form/form_label_append/form_label_append.styles.js +16 -0
- package/optimize/es/components/form/form_label_append/index.js +9 -0
- package/optimize/es/components/form/form_row/form_row.js +4 -1
- package/optimize/es/components/form/range/range.js +212 -251
- package/optimize/es/components/form/super_select/super_select_control.js +25 -9
- package/optimize/es/components/icon/assets/chart_mix.js +34 -0
- package/optimize/es/components/icon/assets/chart_waffle.js +32 -0
- package/optimize/es/components/icon/assets/clipboard_warning.js +38 -0
- package/optimize/es/components/icon/assets/clock_up.js +36 -0
- package/optimize/es/components/icon/assets/emergency_light.js +32 -0
- package/optimize/es/components/icon/assets/product_canvas.js +34 -0
- package/optimize/es/components/icon/assets/product_elastic_agent.js +34 -0
- package/optimize/es/components/icon/assets/product_fleet.js +32 -0
- package/optimize/es/components/icon/assets/product_lens.js +34 -0
- package/optimize/es/components/icon/assets/puzzle_piece.js +32 -0
- package/optimize/es/components/icon/assets/shield.js +34 -0
- package/optimize/es/components/icon/icon_map.js +58 -3
- package/optimize/es/components/icon/svgs/chart_mix.svg +5 -0
- package/optimize/es/components/icon/svgs/chart_waffle.svg +4 -0
- package/optimize/es/components/icon/svgs/clipboard_warning.svg +6 -0
- package/optimize/es/components/icon/svgs/clock_up.svg +5 -0
- package/optimize/es/components/icon/svgs/emergency_light.svg +4 -0
- package/optimize/es/components/icon/svgs/product_canvas.svg +5 -0
- package/optimize/es/components/icon/svgs/product_elastic_agent.svg +5 -0
- package/optimize/es/components/icon/svgs/product_fleet.svg +3 -0
- package/optimize/es/components/icon/svgs/product_lens.svg +4 -0
- package/optimize/es/components/icon/svgs/puzzle_piece.svg +3 -0
- package/optimize/es/components/icon/svgs/shield.svg +4 -0
- package/optimize/es/components/list_item_layout/_list_item_layout.js +3 -2
- package/optimize/es/components/list_item_layout/_list_item_layout.styles.js +11 -10
- package/optimize/es/components/selectable/selectable.js +15 -5
- package/optimize/es/components/selectable/selectable_list/selectable_list.js +3 -1
- package/optimize/es/components/selectable/selectable_list/selectable_list_item.js +9 -6
- package/optimize/lib/components/call_out/call_out.js +3 -8
- package/optimize/lib/components/call_out/call_out.styles.js +2 -13
- package/optimize/lib/components/flyout/flyout.component.js +4 -2
- package/optimize/lib/components/flyout/flyout_footer.js +10 -4
- package/optimize/lib/components/flyout/flyout_header.js +10 -4
- package/optimize/lib/components/flyout/flyout_menu/flyout_menu.styles.js +16 -4
- package/optimize/lib/components/form/form_label_append/form_label_append.js +40 -0
- package/optimize/lib/components/form/form_label_append/form_label_append.styles.js +22 -0
- package/optimize/lib/components/form/form_label_append/index.js +12 -0
- package/optimize/lib/components/form/form_row/form_row.js +4 -1
- package/optimize/lib/components/form/range/range.js +213 -251
- package/optimize/lib/components/form/super_select/super_select_control.js +24 -8
- package/optimize/lib/components/icon/assets/chart_mix.js +42 -0
- package/optimize/lib/components/icon/assets/chart_waffle.js +40 -0
- package/optimize/lib/components/icon/assets/clipboard_warning.js +46 -0
- package/optimize/lib/components/icon/assets/clock_up.js +44 -0
- package/optimize/lib/components/icon/assets/emergency_light.js +40 -0
- package/optimize/lib/components/icon/assets/product_canvas.js +42 -0
- package/optimize/lib/components/icon/assets/product_elastic_agent.js +42 -0
- package/optimize/lib/components/icon/assets/product_fleet.js +40 -0
- package/optimize/lib/components/icon/assets/product_lens.js +42 -0
- package/optimize/lib/components/icon/assets/puzzle_piece.js +40 -0
- package/optimize/lib/components/icon/assets/shield.js +42 -0
- package/optimize/lib/components/icon/icon_map.js +80 -3
- package/optimize/lib/components/icon/svgs/chart_mix.svg +5 -0
- package/optimize/lib/components/icon/svgs/chart_waffle.svg +4 -0
- package/optimize/lib/components/icon/svgs/clipboard_warning.svg +6 -0
- package/optimize/lib/components/icon/svgs/clock_up.svg +5 -0
- package/optimize/lib/components/icon/svgs/emergency_light.svg +4 -0
- package/optimize/lib/components/icon/svgs/product_canvas.svg +5 -0
- package/optimize/lib/components/icon/svgs/product_elastic_agent.svg +5 -0
- package/optimize/lib/components/icon/svgs/product_fleet.svg +3 -0
- package/optimize/lib/components/icon/svgs/product_lens.svg +4 -0
- package/optimize/lib/components/icon/svgs/puzzle_piece.svg +3 -0
- package/optimize/lib/components/icon/svgs/shield.svg +4 -0
- package/optimize/lib/components/list_item_layout/_list_item_layout.js +3 -2
- package/optimize/lib/components/list_item_layout/_list_item_layout.styles.js +10 -10
- package/optimize/lib/components/selectable/selectable.js +15 -5
- package/optimize/lib/components/selectable/selectable_list/selectable_list.js +3 -1
- package/optimize/lib/components/selectable/selectable_list/selectable_list_item.js +9 -6
- package/package.json +1 -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 +4 -4
- package/test-env/components/basic_table/in_memory_table.js +4 -4
- 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_icon/button_icon.js +1 -1
- package/test-env/components/call_out/call_out.js +5 -10
- package/test-env/components/call_out/call_out.styles.js +2 -13
- 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/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/context_menu/context_menu_item.js +1 -1
- package/test-env/components/datagrid/body/cell/data_grid_cell.js +24 -24
- 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/header/data_grid_header_cell.js +12 -12
- package/test-env/components/datagrid/controls/column_sorting.js +13 -13
- package/test-env/components/datagrid/controls/column_sorting_draggable.js +1 -1
- package/test-env/components/datagrid/controls/data_grid_toolbar_control.js +1 -1
- 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/flyout/flyout.component.js +4 -2
- package/test-env/components/flyout/flyout_body.js +12 -12
- package/test-env/components/flyout/flyout_footer.js +11 -5
- package/test-env/components/flyout/flyout_header.js +11 -5
- package/test-env/components/flyout/flyout_menu/flyout_menu.js +2 -2
- package/test-env/components/flyout/flyout_menu/flyout_menu.styles.js +16 -4
- package/test-env/components/form/field_number/field_number.js +2 -2
- package/test-env/components/form/field_text/field_text.js +2 -2
- package/test-env/components/form/form_control_button/form_control_button.js +1 -1
- package/test-env/components/form/form_control_layout/append_prepend/form_append_prepend.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_label_append/form_label_append.js +48 -0
- package/test-env/components/form/form_label_append/form_label_append.styles.js +22 -0
- package/test-env/components/form/form_label_append/index.js +12 -0
- package/test-env/components/form/form_row/form_row.js +7 -4
- package/test-env/components/form/range/range.js +214 -252
- package/test-env/components/form/super_select/super_select_control.js +24 -8
- package/test-env/components/form/text_area/text_area.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_section/header_section_item_button.js +1 -1
- package/test-env/components/icon/assets/chart_mix.js +42 -0
- package/test-env/components/icon/assets/chart_waffle.js +40 -0
- package/test-env/components/icon/assets/clipboard_warning.js +46 -0
- package/test-env/components/icon/assets/clock_up.js +44 -0
- package/test-env/components/icon/assets/emergency_light.js +40 -0
- package/test-env/components/icon/assets/product_canvas.js +42 -0
- package/test-env/components/icon/assets/product_elastic_agent.js +42 -0
- package/test-env/components/icon/assets/product_fleet.js +40 -0
- package/test-env/components/icon/assets/product_lens.js +42 -0
- package/test-env/components/icon/assets/puzzle_piece.js +40 -0
- package/test-env/components/icon/assets/shield.js +42 -0
- package/test-env/components/icon/icon_map.js +80 -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/list_item_layout/_list_item_layout.js +3 -2
- package/test-env/components/list_item_layout/_list_item_layout.styles.js +10 -10
- 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/page/page_header/page_header_content.js +1 -1
- package/test-env/components/pagination/pagination_button.js +1 -1
- package/test-env/components/selectable/selectable.js +16 -5
- package/test-env/components/selectable/selectable_list/selectable_list.js +6 -2
- package/test-env/components/selectable/selectable_list/selectable_list_item.js +11 -7
- package/test-env/components/selectable/selectable_templates/selectable_template_sitewide.js +2 -1
- package/test-env/components/table/table_header_cell.js +1 -1
- package/test-env/components/timeline/timeline_item_icon.js +1 -1
- package/test-env/components/toast/global_toast_list.js +2 -2
- package/test-env/components/toast/toast.js +2 -2
- package/test-env/components/tool_tip/icon_tip.js +1 -1
|
@@ -1,14 +1,7 @@
|
|
|
1
1
|
import _extends from "@babel/runtime/helpers/extends";
|
|
2
|
+
import _slicedToArray from "@babel/runtime/helpers/slicedToArray";
|
|
2
3
|
import _objectWithoutProperties from "@babel/runtime/helpers/objectWithoutProperties";
|
|
3
|
-
|
|
4
|
-
import _createClass from "@babel/runtime/helpers/createClass";
|
|
5
|
-
import _possibleConstructorReturn from "@babel/runtime/helpers/possibleConstructorReturn";
|
|
6
|
-
import _getPrototypeOf from "@babel/runtime/helpers/getPrototypeOf";
|
|
7
|
-
import _inherits from "@babel/runtime/helpers/inherits";
|
|
8
|
-
import _defineProperty from "@babel/runtime/helpers/defineProperty";
|
|
9
|
-
var _excluded = ["className", "compressed", "disabled", "fullWidth", "isLoading", "readOnly", "id", "max", "min", "name", "step", "showLabels", "showInput", "inputPopoverProps", "showTicks", "tickInterval", "ticks", "levels", "showRange", "showValue", "valueAppend", "valuePrepend", "onBlur", "onChange", "onFocus", "value", "tabIndex", "isInvalid", "theme"];
|
|
10
|
-
function _callSuper(t, o, e) { return o = _getPrototypeOf(o), _possibleConstructorReturn(t, _isNativeReflectConstruct() ? Reflect.construct(o, e || [], _getPrototypeOf(t).constructor) : o.apply(t, e)); }
|
|
11
|
-
function _isNativeReflectConstruct() { try { var t = !Boolean.prototype.valueOf.call(Reflect.construct(Boolean, [], function () {})); } catch (t) {} return (_isNativeReflectConstruct = function _isNativeReflectConstruct() { return !!t; })(); }
|
|
4
|
+
var _excluded = ["min", "max", "step", "compressed", "isLoading", "showLabels", "showInput", "showRange", "showTicks", "showValue", "levels", "className", "disabled", "fullWidth", "readOnly", "id", "name", "tickInterval", "ticks", "valueAppend", "valuePrepend", "onBlur", "onChange", "onFocus", "value", "tabIndex", "isInvalid", "inputPopoverProps"];
|
|
12
5
|
/*
|
|
13
6
|
* Copyright Elasticsearch B.V. and/or licensed to Elasticsearch B.V. under one
|
|
14
7
|
* or more contributor license agreements. Licensed under the Elastic License
|
|
@@ -17,12 +10,12 @@ function _isNativeReflectConstruct() { try { var t = !Boolean.prototype.valueOf.
|
|
|
17
10
|
* Side Public License, v 1.
|
|
18
11
|
*/
|
|
19
12
|
|
|
20
|
-
import React, {
|
|
13
|
+
import React, { useRef, useState } from 'react';
|
|
21
14
|
import classNames from 'classnames';
|
|
22
15
|
import { isWithinRange } from '../../../services/number';
|
|
23
16
|
import { EuiInputPopover } from '../../popover';
|
|
24
|
-
import {
|
|
25
|
-
import {
|
|
17
|
+
import { useEuiTheme, useGeneratedHtmlId, useLatest } from '../../../services';
|
|
18
|
+
import { useFormContext } from '../eui_form_context';
|
|
26
19
|
import { getLevelColor } from './range_levels_colors';
|
|
27
20
|
import { EuiRangeHighlight } from './range_highlight';
|
|
28
21
|
import { EuiRangeInput } from './range_input';
|
|
@@ -33,246 +26,214 @@ import { EuiRangeTrack } from './range_track';
|
|
|
33
26
|
import { EuiRangeWrapper } from './range_wrapper';
|
|
34
27
|
import { euiRangeStyles } from './range.styles';
|
|
35
28
|
import { EuiI18n } from '../../i18n';
|
|
36
|
-
import { jsx as ___EmotionJSX } from "@emotion/react";
|
|
37
|
-
export var EuiRangeClass = /*#__PURE__*/function (_Component) {
|
|
38
|
-
function EuiRangeClass() {
|
|
39
|
-
var _this;
|
|
40
|
-
_classCallCheck(this, EuiRangeClass);
|
|
41
|
-
for (var _len = arguments.length, args = new Array(_len), _key = 0; _key < _len; _key++) {
|
|
42
|
-
args[_key] = arguments[_key];
|
|
43
|
-
}
|
|
44
|
-
_this = _callSuper(this, EuiRangeClass, [].concat(args));
|
|
45
|
-
_defineProperty(_this, "preventPopoverClose", false);
|
|
46
|
-
_defineProperty(_this, "state", {
|
|
47
|
-
id: _this.props.id || htmlIdGenerator()(),
|
|
48
|
-
isPopoverOpen: false,
|
|
49
|
-
trackWidth: 0
|
|
50
|
-
});
|
|
51
|
-
_defineProperty(_this, "handleOnChange", function (e) {
|
|
52
|
-
var isValid = isWithinRange(_this.props.min, _this.props.max, e.currentTarget.value);
|
|
53
|
-
if (_this.props.onChange) {
|
|
54
|
-
_this.props.onChange(e, isValid);
|
|
55
|
-
}
|
|
56
|
-
});
|
|
57
|
-
_defineProperty(_this, "setTrackWidth", function (_ref) {
|
|
58
|
-
var width = _ref.width;
|
|
59
|
-
_this.setState({
|
|
60
|
-
trackWidth: width
|
|
61
|
-
});
|
|
62
|
-
});
|
|
63
|
-
_defineProperty(_this, "onInputFocus", function (e) {
|
|
64
|
-
if (_this.props.onFocus) {
|
|
65
|
-
_this.props.onFocus(e);
|
|
66
|
-
}
|
|
67
|
-
_this.setState({
|
|
68
|
-
isPopoverOpen: true
|
|
69
|
-
});
|
|
70
|
-
});
|
|
71
|
-
_defineProperty(_this, "onInputBlur", function (e) {
|
|
72
|
-
return setTimeout(function () {
|
|
73
|
-
// Safari does not recognize any focus-related eventing for input[type=range]
|
|
74
|
-
// making it impossible to capture its state using active/focus/relatedTarget
|
|
75
|
-
// Instead, a prevention flag is set on mousedown, with a waiting period here.
|
|
76
|
-
// Mousedown is viable because in the popover case, it is inaccessible via keyboard (intentionally)
|
|
77
|
-
if (_this.preventPopoverClose) {
|
|
78
|
-
_this.preventPopoverClose = false;
|
|
79
|
-
return;
|
|
80
|
-
}
|
|
81
|
-
if (_this.props.onBlur) {
|
|
82
|
-
_this.props.onBlur(e);
|
|
83
|
-
}
|
|
84
|
-
_this.closePopover();
|
|
85
|
-
}, 200);
|
|
86
|
-
});
|
|
87
|
-
_defineProperty(_this, "closePopover", function () {
|
|
88
|
-
_this.preventPopoverClose = false;
|
|
89
|
-
_this.setState({
|
|
90
|
-
isPopoverOpen: false
|
|
91
|
-
});
|
|
92
|
-
});
|
|
93
|
-
_defineProperty(_this, "handleAriaValueText", function (ticks, currentVal) {
|
|
94
|
-
var target = ticks.find(function (tick) {
|
|
95
|
-
return tick.value.toString() === currentVal.toString();
|
|
96
|
-
});
|
|
97
|
-
if (target) {
|
|
98
|
-
return target.accessibleLabel ? "".concat(target.value, ", (").concat(target.accessibleLabel, ")") : typeof target.label === 'string' // Fall back to the label if it's a usable string
|
|
99
|
-
? "".concat(target.value, ", (").concat(target.label, ")") : undefined;
|
|
100
|
-
}
|
|
101
|
-
});
|
|
102
|
-
return _this;
|
|
103
|
-
}
|
|
104
|
-
_inherits(EuiRangeClass, _Component);
|
|
105
|
-
return _createClass(EuiRangeClass, [{
|
|
106
|
-
key: "isValid",
|
|
107
|
-
get: function get() {
|
|
108
|
-
return isWithinRange(this.props.min, this.props.max, this.props.value || '');
|
|
109
|
-
}
|
|
110
|
-
}, {
|
|
111
|
-
key: "render",
|
|
112
|
-
value: function render() {
|
|
113
|
-
var _this2 = this;
|
|
114
|
-
var _ref2 = this.context,
|
|
115
|
-
defaultFullWidth = _ref2.defaultFullWidth;
|
|
116
|
-
var _this$props = this.props,
|
|
117
|
-
className = _this$props.className,
|
|
118
|
-
compressed = _this$props.compressed,
|
|
119
|
-
disabled = _this$props.disabled,
|
|
120
|
-
_this$props$fullWidth = _this$props.fullWidth,
|
|
121
|
-
fullWidth = _this$props$fullWidth === void 0 ? defaultFullWidth : _this$props$fullWidth,
|
|
122
|
-
isLoading = _this$props.isLoading,
|
|
123
|
-
readOnly = _this$props.readOnly,
|
|
124
|
-
propsId = _this$props.id,
|
|
125
|
-
max = _this$props.max,
|
|
126
|
-
min = _this$props.min,
|
|
127
|
-
name = _this$props.name,
|
|
128
|
-
step = _this$props.step,
|
|
129
|
-
showLabels = _this$props.showLabels,
|
|
130
|
-
showInput = _this$props.showInput,
|
|
131
|
-
inputPopoverProps = _this$props.inputPopoverProps,
|
|
132
|
-
showTicks = _this$props.showTicks,
|
|
133
|
-
tickInterval = _this$props.tickInterval,
|
|
134
|
-
ticks = _this$props.ticks,
|
|
135
|
-
levels = _this$props.levels,
|
|
136
|
-
showRange = _this$props.showRange,
|
|
137
|
-
showValue = _this$props.showValue,
|
|
138
|
-
valueAppend = _this$props.valueAppend,
|
|
139
|
-
valuePrepend = _this$props.valuePrepend,
|
|
140
|
-
onBlur = _this$props.onBlur,
|
|
141
|
-
onChange = _this$props.onChange,
|
|
142
|
-
onFocus = _this$props.onFocus,
|
|
143
|
-
value = _this$props.value,
|
|
144
|
-
tabIndex = _this$props.tabIndex,
|
|
145
|
-
isInvalid = _this$props.isInvalid,
|
|
146
|
-
theme = _this$props.theme,
|
|
147
|
-
rest = _objectWithoutProperties(_this$props, _excluded);
|
|
148
|
-
var id = this.state.id;
|
|
149
|
-
var showInputOnly = showInput === 'inputWithPopover';
|
|
150
|
-
var canShowDropdown = showInputOnly && !readOnly && !disabled;
|
|
151
|
-
var theInput = !!showInput ? ___EmotionJSX(EuiRangeInput, _extends({
|
|
152
|
-
id: id,
|
|
153
|
-
min: min,
|
|
154
|
-
max: max,
|
|
155
|
-
step: step,
|
|
156
|
-
value: value,
|
|
157
|
-
readOnly: readOnly,
|
|
158
|
-
disabled: disabled,
|
|
159
|
-
compressed: compressed,
|
|
160
|
-
onChange: this.handleOnChange,
|
|
161
|
-
name: name,
|
|
162
|
-
onFocus: canShowDropdown ? this.onInputFocus : onFocus,
|
|
163
|
-
onBlur: canShowDropdown ? this.onInputBlur : onBlur,
|
|
164
|
-
fullWidth: showInputOnly && fullWidth,
|
|
165
|
-
isLoading: showInputOnly && isLoading,
|
|
166
|
-
isInvalid: isInvalid,
|
|
167
|
-
autoSize: !showInputOnly
|
|
168
|
-
}, rest)) : null;
|
|
169
|
-
var classes = classNames('euiRange', className);
|
|
170
|
-
var styles = euiRangeStyles(theme);
|
|
171
|
-
var cssStyles = [styles.euiRange, showInput && styles.hasInput];
|
|
172
|
-
var thumbColor = levels && getLevelColor(levels, Number(value));
|
|
173
|
-
var sliderScreenReaderInstructions = ___EmotionJSX(EuiI18n, {
|
|
174
|
-
token: "euiRange.sliderScreenReaderInstructions",
|
|
175
|
-
default: "You are in a custom range slider. Use the Up and Down arrow keys to change the value."
|
|
176
|
-
});
|
|
177
|
-
var theRange = ___EmotionJSX(EuiRangeWrapper, {
|
|
178
|
-
className: classes,
|
|
179
|
-
css: cssStyles,
|
|
180
|
-
fullWidth: fullWidth,
|
|
181
|
-
compressed: compressed
|
|
182
|
-
}, showLabels && ___EmotionJSX(EuiRangeLabel, {
|
|
183
|
-
side: "min",
|
|
184
|
-
disabled: disabled
|
|
185
|
-
}, min), ___EmotionJSX(EuiRangeTrack, {
|
|
186
|
-
trackWidth: this.state.trackWidth,
|
|
187
|
-
disabled: disabled,
|
|
188
|
-
compressed: compressed,
|
|
189
|
-
max: max,
|
|
190
|
-
min: min,
|
|
191
|
-
step: step,
|
|
192
|
-
showTicks: showTicks,
|
|
193
|
-
tickInterval: tickInterval,
|
|
194
|
-
ticks: ticks,
|
|
195
|
-
levels: levels,
|
|
196
|
-
onChange: this.handleOnChange,
|
|
197
|
-
value: value,
|
|
198
|
-
"aria-hidden": !!showInput,
|
|
199
|
-
showRange: showRange
|
|
200
|
-
}, ___EmotionJSX(EuiRangeSlider, _extends({
|
|
201
|
-
ariaValueText: ticks ? this.handleAriaValueText(ticks, value) : undefined,
|
|
202
|
-
id: showInput ? undefined : id // Attach id only to the input if there is one
|
|
203
|
-
,
|
|
204
|
-
name: name,
|
|
205
|
-
min: min,
|
|
206
|
-
max: max,
|
|
207
|
-
step: step,
|
|
208
|
-
value: value,
|
|
209
|
-
disabled: disabled,
|
|
210
|
-
onChange: this.handleOnChange,
|
|
211
|
-
showTicks: showTicks,
|
|
212
|
-
showRange: showRange,
|
|
213
|
-
tabIndex: showInput ? -1 : tabIndex,
|
|
214
|
-
onMouseDown: showInputOnly ? function () {
|
|
215
|
-
return _this2.preventPopoverClose = true;
|
|
216
|
-
} : undefined,
|
|
217
|
-
onFocus: showInput === true ? undefined : onFocus,
|
|
218
|
-
onBlur: showInputOnly ? this.onInputBlur : onBlur,
|
|
219
|
-
"aria-hidden": !!showInput,
|
|
220
|
-
thumbColor: thumbColor
|
|
221
|
-
}, rest, {
|
|
222
|
-
onResize: this.setTrackWidth
|
|
223
|
-
})), showRange && this.isValid && ___EmotionJSX(EuiRangeHighlight, {
|
|
224
|
-
showTicks: showTicks,
|
|
225
|
-
min: Number(min),
|
|
226
|
-
max: Number(max),
|
|
227
|
-
lowerValue: Number(min),
|
|
228
|
-
upperValue: Number(value),
|
|
229
|
-
levels: levels,
|
|
230
|
-
trackWidth: this.state.trackWidth
|
|
231
|
-
}), showValue && !!String(value).length && ___EmotionJSX(EuiRangeTooltip, {
|
|
232
|
-
value: value,
|
|
233
|
-
max: max,
|
|
234
|
-
min: min,
|
|
235
|
-
name: name,
|
|
236
|
-
showTicks: showTicks,
|
|
237
|
-
valuePrepend: valuePrepend,
|
|
238
|
-
valueAppend: valueAppend
|
|
239
|
-
})), showLabels && ___EmotionJSX(EuiRangeLabel, {
|
|
240
|
-
side: "max",
|
|
241
|
-
disabled: disabled
|
|
242
|
-
}, max), showInput && !showInputOnly && ___EmotionJSX(React.Fragment, null, ___EmotionJSX("div", {
|
|
243
|
-
className: showTicks || ticks ? 'euiRange__slimHorizontalSpacer' : 'euiRange__horizontalSpacer',
|
|
244
|
-
css: showTicks || ticks ? styles.euiRange__slimHorizontalSpacer : styles.euiRange__horizontalSpacer
|
|
245
|
-
}), theInput));
|
|
246
|
-
var thePopover = showInputOnly ? ___EmotionJSX(EuiInputPopover, _extends({}, inputPopoverProps, {
|
|
247
|
-
className: classNames('euiRange__popover', inputPopoverProps === null || inputPopoverProps === void 0 ? void 0 : inputPopoverProps.className),
|
|
248
|
-
input: theInput // `showInputOnly` confirms existence
|
|
249
|
-
,
|
|
250
|
-
fullWidth: fullWidth,
|
|
251
|
-
isOpen: this.state.isPopoverOpen,
|
|
252
|
-
closePopover: this.closePopover,
|
|
253
|
-
disableFocusTrap: true,
|
|
254
|
-
popoverScreenReaderText: sliderScreenReaderInstructions
|
|
255
|
-
}), theRange) : undefined;
|
|
256
|
-
return thePopover ? thePopover : theRange;
|
|
257
|
-
}
|
|
258
|
-
}]);
|
|
259
|
-
}(Component);
|
|
260
29
|
|
|
261
30
|
/**
|
|
262
31
|
* @see {@link https://eui.elastic.co/docs/components/forms/numeric/range-sliders/|EuiRange documentation}
|
|
263
32
|
*/
|
|
264
|
-
|
|
265
|
-
|
|
266
|
-
min
|
|
267
|
-
|
|
268
|
-
|
|
269
|
-
|
|
270
|
-
|
|
271
|
-
|
|
272
|
-
|
|
273
|
-
|
|
274
|
-
|
|
275
|
-
|
|
276
|
-
|
|
277
|
-
|
|
278
|
-
|
|
33
|
+
import { jsx as ___EmotionJSX } from "@emotion/react";
|
|
34
|
+
export var EuiRange = function EuiRange(_ref) {
|
|
35
|
+
var _ref$min = _ref.min,
|
|
36
|
+
min = _ref$min === void 0 ? 0 : _ref$min,
|
|
37
|
+
_ref$max = _ref.max,
|
|
38
|
+
max = _ref$max === void 0 ? 100 : _ref$max,
|
|
39
|
+
_ref$step = _ref.step,
|
|
40
|
+
step = _ref$step === void 0 ? 1 : _ref$step,
|
|
41
|
+
_ref$compressed = _ref.compressed,
|
|
42
|
+
compressed = _ref$compressed === void 0 ? false : _ref$compressed,
|
|
43
|
+
_ref$isLoading = _ref.isLoading,
|
|
44
|
+
isLoading = _ref$isLoading === void 0 ? false : _ref$isLoading,
|
|
45
|
+
_ref$showLabels = _ref.showLabels,
|
|
46
|
+
showLabels = _ref$showLabels === void 0 ? false : _ref$showLabels,
|
|
47
|
+
_ref$showInput = _ref.showInput,
|
|
48
|
+
showInput = _ref$showInput === void 0 ? false : _ref$showInput,
|
|
49
|
+
_ref$showRange = _ref.showRange,
|
|
50
|
+
showRange = _ref$showRange === void 0 ? false : _ref$showRange,
|
|
51
|
+
_ref$showTicks = _ref.showTicks,
|
|
52
|
+
showTicks = _ref$showTicks === void 0 ? false : _ref$showTicks,
|
|
53
|
+
_ref$showValue = _ref.showValue,
|
|
54
|
+
showValue = _ref$showValue === void 0 ? false : _ref$showValue,
|
|
55
|
+
_ref$levels = _ref.levels,
|
|
56
|
+
levels = _ref$levels === void 0 ? [] : _ref$levels,
|
|
57
|
+
className = _ref.className,
|
|
58
|
+
disabled = _ref.disabled,
|
|
59
|
+
_fullWidth = _ref.fullWidth,
|
|
60
|
+
readOnly = _ref.readOnly,
|
|
61
|
+
propsId = _ref.id,
|
|
62
|
+
name = _ref.name,
|
|
63
|
+
tickInterval = _ref.tickInterval,
|
|
64
|
+
ticks = _ref.ticks,
|
|
65
|
+
valueAppend = _ref.valueAppend,
|
|
66
|
+
valuePrepend = _ref.valuePrepend,
|
|
67
|
+
onBlur = _ref.onBlur,
|
|
68
|
+
onChange = _ref.onChange,
|
|
69
|
+
onFocus = _ref.onFocus,
|
|
70
|
+
value = _ref.value,
|
|
71
|
+
tabIndex = _ref.tabIndex,
|
|
72
|
+
isInvalid = _ref.isInvalid,
|
|
73
|
+
inputPopoverProps = _ref.inputPopoverProps,
|
|
74
|
+
rest = _objectWithoutProperties(_ref, _excluded);
|
|
75
|
+
var theme = useEuiTheme();
|
|
76
|
+
var _useFormContext = useFormContext(),
|
|
77
|
+
defaultFullWidth = _useFormContext.defaultFullWidth;
|
|
78
|
+
var generatedId = useGeneratedHtmlId();
|
|
79
|
+
var onBlurRef = useLatest(onBlur);
|
|
80
|
+
var _useState = useState(false),
|
|
81
|
+
_useState2 = _slicedToArray(_useState, 2),
|
|
82
|
+
isPopoverOpen = _useState2[0],
|
|
83
|
+
setIsPopoverOpen = _useState2[1];
|
|
84
|
+
var _useState3 = useState(0),
|
|
85
|
+
_useState4 = _slicedToArray(_useState3, 2),
|
|
86
|
+
trackWidth = _useState4[0],
|
|
87
|
+
setTrackWidth = _useState4[1];
|
|
88
|
+
var preventPopoverClose = useRef(false);
|
|
89
|
+
var id = propsId || generatedId;
|
|
90
|
+
var isValid = isWithinRange(min, max, value || '');
|
|
91
|
+
var showInputOnly = showInput === 'inputWithPopover';
|
|
92
|
+
var canShowDropdown = showInputOnly && !readOnly && !disabled;
|
|
93
|
+
var classes = classNames('euiRange', className);
|
|
94
|
+
var styles = euiRangeStyles(theme);
|
|
95
|
+
var cssStyles = [styles.euiRange, showInput && styles.hasInput];
|
|
96
|
+
var thumbColor = levels && getLevelColor(levels, Number(value));
|
|
97
|
+
var fullWidth = _fullWidth !== null && _fullWidth !== void 0 ? _fullWidth : defaultFullWidth;
|
|
98
|
+
var handleOnChange = function handleOnChange(e) {
|
|
99
|
+
var isValid = isWithinRange(min, max, e.currentTarget.value);
|
|
100
|
+
onChange === null || onChange === void 0 || onChange(e, isValid);
|
|
101
|
+
};
|
|
102
|
+
var handleSetTrackWidth = function handleSetTrackWidth(_ref2) {
|
|
103
|
+
var width = _ref2.width;
|
|
104
|
+
setTrackWidth(width);
|
|
105
|
+
};
|
|
106
|
+
var onInputFocus = function onInputFocus(e) {
|
|
107
|
+
onFocus === null || onFocus === void 0 || onFocus(e);
|
|
108
|
+
setIsPopoverOpen(true);
|
|
109
|
+
};
|
|
110
|
+
var onInputBlur = function onInputBlur(e) {
|
|
111
|
+
return setTimeout(function () {
|
|
112
|
+
var _onBlurRef$current;
|
|
113
|
+
// Safari does not recognize any focus-related eventing for input[type=range]
|
|
114
|
+
// making it impossible to capture its state using active/focus/relatedTarget
|
|
115
|
+
// Instead, a prevention flag is set on mousedown, with a waiting period here.
|
|
116
|
+
// Mousedown is viable because in the popover case, it is inaccessible via keyboard (intentionally)
|
|
117
|
+
if (preventPopoverClose.current) {
|
|
118
|
+
preventPopoverClose.current = false;
|
|
119
|
+
return;
|
|
120
|
+
}
|
|
121
|
+
(_onBlurRef$current = onBlurRef.current) === null || _onBlurRef$current === void 0 || _onBlurRef$current.call(onBlurRef, e);
|
|
122
|
+
closePopover();
|
|
123
|
+
}, 200);
|
|
124
|
+
};
|
|
125
|
+
var closePopover = function closePopover() {
|
|
126
|
+
preventPopoverClose.current = false;
|
|
127
|
+
setIsPopoverOpen(false);
|
|
128
|
+
};
|
|
129
|
+
var handleAriaValueText = function handleAriaValueText(ticks, currentVal) {
|
|
130
|
+
var target = ticks.find(function (tick) {
|
|
131
|
+
return tick.value.toString() === currentVal.toString();
|
|
132
|
+
});
|
|
133
|
+
if (target) {
|
|
134
|
+
return target.accessibleLabel ? "".concat(target.value, ", (").concat(target.accessibleLabel, ")") : typeof target.label === 'string' // Fall back to the label if it's a usable string
|
|
135
|
+
? "".concat(target.value, ", (").concat(target.label, ")") : undefined;
|
|
136
|
+
}
|
|
137
|
+
};
|
|
138
|
+
var input = showInput ? ___EmotionJSX(EuiRangeInput, _extends({
|
|
139
|
+
id: id,
|
|
140
|
+
min: min,
|
|
141
|
+
max: max,
|
|
142
|
+
step: step,
|
|
143
|
+
value: value,
|
|
144
|
+
readOnly: readOnly,
|
|
145
|
+
disabled: disabled,
|
|
146
|
+
compressed: compressed,
|
|
147
|
+
onChange: handleOnChange,
|
|
148
|
+
name: name,
|
|
149
|
+
onFocus: canShowDropdown ? onInputFocus : onFocus,
|
|
150
|
+
onBlur: canShowDropdown ? onInputBlur : onBlur,
|
|
151
|
+
fullWidth: showInputOnly && fullWidth,
|
|
152
|
+
isLoading: showInputOnly && isLoading,
|
|
153
|
+
isInvalid: isInvalid,
|
|
154
|
+
autoSize: !showInputOnly
|
|
155
|
+
}, rest)) : null;
|
|
156
|
+
var sliderScreenReaderInstructions = ___EmotionJSX(EuiI18n, {
|
|
157
|
+
token: "euiRange.sliderScreenReaderInstructions",
|
|
158
|
+
default: "You are in a custom range slider. Use the Up and Down arrow keys to change the value."
|
|
159
|
+
});
|
|
160
|
+
var range = ___EmotionJSX(EuiRangeWrapper, {
|
|
161
|
+
className: classes,
|
|
162
|
+
css: cssStyles,
|
|
163
|
+
fullWidth: fullWidth,
|
|
164
|
+
compressed: compressed
|
|
165
|
+
}, showLabels && ___EmotionJSX(EuiRangeLabel, {
|
|
166
|
+
side: "min",
|
|
167
|
+
disabled: disabled
|
|
168
|
+
}, min), ___EmotionJSX(EuiRangeTrack, {
|
|
169
|
+
trackWidth: trackWidth,
|
|
170
|
+
disabled: disabled,
|
|
171
|
+
compressed: compressed,
|
|
172
|
+
max: max,
|
|
173
|
+
min: min,
|
|
174
|
+
step: step,
|
|
175
|
+
showTicks: showTicks,
|
|
176
|
+
tickInterval: tickInterval,
|
|
177
|
+
ticks: ticks,
|
|
178
|
+
levels: levels,
|
|
179
|
+
onChange: handleOnChange,
|
|
180
|
+
value: value,
|
|
181
|
+
"aria-hidden": !!showInput,
|
|
182
|
+
showRange: showRange
|
|
183
|
+
}, ___EmotionJSX(EuiRangeSlider, _extends({
|
|
184
|
+
ariaValueText: ticks ? handleAriaValueText(ticks, value) : undefined,
|
|
185
|
+
id: showInput ? undefined : id,
|
|
186
|
+
name: name,
|
|
187
|
+
min: min,
|
|
188
|
+
max: max,
|
|
189
|
+
step: step,
|
|
190
|
+
value: value,
|
|
191
|
+
disabled: disabled,
|
|
192
|
+
onChange: handleOnChange,
|
|
193
|
+
showTicks: showTicks,
|
|
194
|
+
showRange: showRange,
|
|
195
|
+
tabIndex: showInput ? -1 : tabIndex,
|
|
196
|
+
onMouseDown: showInputOnly ? function () {
|
|
197
|
+
return preventPopoverClose.current = true;
|
|
198
|
+
} : undefined,
|
|
199
|
+
onFocus: showInput === true ? undefined : onFocus,
|
|
200
|
+
onBlur: showInputOnly ? onInputBlur : onBlur,
|
|
201
|
+
"aria-hidden": !!showInput,
|
|
202
|
+
thumbColor: thumbColor
|
|
203
|
+
}, rest, {
|
|
204
|
+
onResize: handleSetTrackWidth
|
|
205
|
+
})), showRange && isValid && ___EmotionJSX(EuiRangeHighlight, {
|
|
206
|
+
showTicks: showTicks,
|
|
207
|
+
min: Number(min),
|
|
208
|
+
max: Number(max),
|
|
209
|
+
lowerValue: Number(min),
|
|
210
|
+
upperValue: Number(value),
|
|
211
|
+
levels: levels,
|
|
212
|
+
trackWidth: trackWidth
|
|
213
|
+
}), showValue && !!String(value).length && ___EmotionJSX(EuiRangeTooltip, {
|
|
214
|
+
value: value,
|
|
215
|
+
max: max,
|
|
216
|
+
min: min,
|
|
217
|
+
name: name,
|
|
218
|
+
showTicks: showTicks,
|
|
219
|
+
valuePrepend: valuePrepend,
|
|
220
|
+
valueAppend: valueAppend
|
|
221
|
+
})), showLabels && ___EmotionJSX(EuiRangeLabel, {
|
|
222
|
+
side: "max",
|
|
223
|
+
disabled: disabled
|
|
224
|
+
}, max), showInput && !showInputOnly && ___EmotionJSX(React.Fragment, null, ___EmotionJSX("div", {
|
|
225
|
+
className: showTicks || ticks ? 'euiRange__slimHorizontalSpacer' : 'euiRange__horizontalSpacer',
|
|
226
|
+
css: showTicks || ticks ? styles.euiRange__slimHorizontalSpacer : styles.euiRange__horizontalSpacer
|
|
227
|
+
}), input));
|
|
228
|
+
var popover = showInputOnly && input ? ___EmotionJSX(EuiInputPopover, _extends({}, inputPopoverProps, {
|
|
229
|
+
className: classNames('euiRange__popover', inputPopoverProps === null || inputPopoverProps === void 0 ? void 0 : inputPopoverProps.className),
|
|
230
|
+
input: input,
|
|
231
|
+
fullWidth: fullWidth,
|
|
232
|
+
isOpen: isPopoverOpen,
|
|
233
|
+
closePopover: closePopover,
|
|
234
|
+
disableFocusTrap: true,
|
|
235
|
+
popoverScreenReaderText: sliderScreenReaderInstructions
|
|
236
|
+
}), range) : undefined;
|
|
237
|
+
return popover !== null && popover !== void 0 ? popover : range;
|
|
238
|
+
};
|
|
239
|
+
EuiRange.displayName = 'EuiRange';
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import _extends from "@babel/runtime/helpers/extends";
|
|
2
2
|
import _slicedToArray from "@babel/runtime/helpers/slicedToArray";
|
|
3
3
|
import _objectWithoutProperties from "@babel/runtime/helpers/objectWithoutProperties";
|
|
4
|
-
var _excluded = ["buttonRef", "className", "options", "id", "name", "fullWidth", "isLoading", "isInvalid", "isDropdownOpen", "readOnly", "defaultValue", "compressed", "value", "placeholder", "prepend", "append", "disabled"];
|
|
4
|
+
var _excluded = ["buttonRef", "className", "options", "id", "name", "fullWidth", "isLoading", "isInvalid", "isDropdownOpen", "readOnly", "defaultValue", "compressed", "value", "placeholder", "prepend", "append", "disabled", "aria-label", "aria-labelledby"];
|
|
5
5
|
/*
|
|
6
6
|
* Copyright Elasticsearch B.V. and/or licensed to Elasticsearch B.V. under one
|
|
7
7
|
* or more contributor license agreements. Licensed under the Elastic License
|
|
@@ -12,7 +12,7 @@ var _excluded = ["buttonRef", "className", "options", "id", "name", "fullWidth",
|
|
|
12
12
|
|
|
13
13
|
import React, { useEffect, useState, useMemo } from 'react';
|
|
14
14
|
import classNames from 'classnames';
|
|
15
|
-
import { useEuiMemoizedStyles } from '../../../services';
|
|
15
|
+
import { useEuiMemoizedStyles, useGeneratedHtmlId } from '../../../services';
|
|
16
16
|
import { EuiScreenReaderOnly } from '../../accessibility';
|
|
17
17
|
import { EuiFormControlLayout } from '../form_control_layout';
|
|
18
18
|
import { useFormContext } from '../eui_form_context';
|
|
@@ -42,6 +42,8 @@ export var EuiSuperSelectControl = function EuiSuperSelectControl(props) {
|
|
|
42
42
|
prepend = props.prepend,
|
|
43
43
|
append = props.append,
|
|
44
44
|
disabled = props.disabled,
|
|
45
|
+
ariaLabel = props['aria-label'],
|
|
46
|
+
ariaLabelledByProp = props['aria-labelledby'],
|
|
45
47
|
rest = _objectWithoutProperties(props, _excluded);
|
|
46
48
|
var classes = classNames('euiSuperSelectControl', {
|
|
47
49
|
'euiSuperSelectControl-isLoading': isLoading,
|
|
@@ -76,15 +78,32 @@ export var EuiSuperSelectControl = function EuiSuperSelectControl(props) {
|
|
|
76
78
|
}
|
|
77
79
|
}
|
|
78
80
|
}, [id]);
|
|
79
|
-
|
|
80
|
-
|
|
81
|
+
|
|
82
|
+
// `aria-label`s are rendered as a separate screen reader only element instead
|
|
83
|
+
// of being set on the <button>, so that the label can be combined with (rather
|
|
84
|
+
// than override) the currently selected value, which is the button's content
|
|
85
|
+
var ariaLabelId = useGeneratedHtmlId({
|
|
86
|
+
suffix: 'label'
|
|
87
|
+
});
|
|
88
|
+
var generatedButtonId = useGeneratedHtmlId({
|
|
89
|
+
suffix: 'button'
|
|
90
|
+
});
|
|
91
|
+
|
|
92
|
+
// Consumer-passed labels take precedence over the label rendered by EuiFormRow
|
|
93
|
+
var externalLabelId = ariaLabelledByProp || (ariaLabel ? ariaLabelId : hasFormLabel ? formLabelId : undefined);
|
|
94
|
+
var buttonId = externalLabelId ? hasFormLabel ? "".concat(id, "-button") : generatedButtonId : undefined;
|
|
95
|
+
// Self-reference the button so that its content (the selected value) remains
|
|
96
|
+
// part of the accessible name alongside the external label
|
|
97
|
+
var ariaLabelledBy = externalLabelId ? "".concat(buttonId, " ").concat(externalLabelId) : undefined;
|
|
81
98
|
return ___EmotionJSX(React.Fragment, null, ___EmotionJSX("input", {
|
|
82
99
|
type: "hidden",
|
|
83
100
|
id: id,
|
|
84
101
|
name: name,
|
|
85
102
|
value: String(inputValue !== null && inputValue !== void 0 ? inputValue : ''),
|
|
86
103
|
readOnly: readOnly
|
|
87
|
-
}), ___EmotionJSX(
|
|
104
|
+
}), ariaLabel && !ariaLabelledByProp && ___EmotionJSX(EuiScreenReaderOnly, null, ___EmotionJSX("span", {
|
|
105
|
+
id: ariaLabelId
|
|
106
|
+
}, ariaLabel)), ___EmotionJSX(EuiFormControlLayout, {
|
|
88
107
|
isDropdown: true,
|
|
89
108
|
fullWidth: fullWidth,
|
|
90
109
|
isLoading: isLoading,
|
|
@@ -107,8 +126,5 @@ export var EuiSuperSelectControl = function EuiSuperSelectControl(props) {
|
|
|
107
126
|
}), showPlaceholder ? ___EmotionJSX("span", {
|
|
108
127
|
className: "euiSuperSelectControl__placeholder",
|
|
109
128
|
css: styles.euiSuperSelect__placeholder
|
|
110
|
-
}, placeholder) : selectedValue
|
|
111
|
-
// Add a slight pause between reading out the multiple aria-labelledby elements,
|
|
112
|
-
// mimicking how screen readers handle native <select> elements
|
|
113
|
-
___EmotionJSX(EuiScreenReaderOnly, null, ___EmotionJSX("span", null, ", ")))));
|
|
129
|
+
}, placeholder) : selectedValue)));
|
|
114
130
|
};
|
|
@@ -0,0 +1,34 @@
|
|
|
1
|
+
import _extends from "@babel/runtime/helpers/extends";
|
|
2
|
+
import _objectWithoutProperties from "@babel/runtime/helpers/objectWithoutProperties";
|
|
3
|
+
var _excluded = ["title", "titleId"];
|
|
4
|
+
/*
|
|
5
|
+
* Copyright Elasticsearch B.V. and/or licensed to Elasticsearch B.V. under one
|
|
6
|
+
* or more contributor license agreements. Licensed under the Elastic License
|
|
7
|
+
* 2.0 and the Server Side Public License, v 1; you may not use this file except
|
|
8
|
+
* in compliance with, at your election, the Elastic License 2.0 or the Server
|
|
9
|
+
* Side Public License, v 1.
|
|
10
|
+
*/
|
|
11
|
+
|
|
12
|
+
// THIS IS A GENERATED FILE. DO NOT MODIFY MANUALLY. @see scripts/compile-icons.js
|
|
13
|
+
|
|
14
|
+
import * as React from 'react';
|
|
15
|
+
import { jsx as ___EmotionJSX } from "@emotion/react";
|
|
16
|
+
var EuiIconChartMix = function EuiIconChartMix(_ref) {
|
|
17
|
+
var title = _ref.title,
|
|
18
|
+
titleId = _ref.titleId,
|
|
19
|
+
props = _objectWithoutProperties(_ref, _excluded);
|
|
20
|
+
return ___EmotionJSX("svg", _extends({
|
|
21
|
+
xmlns: "http://www.w3.org/2000/svg",
|
|
22
|
+
width: 16,
|
|
23
|
+
height: 16,
|
|
24
|
+
viewBox: "0 0 16 16",
|
|
25
|
+
"aria-labelledby": titleId
|
|
26
|
+
}, props), title ? ___EmotionJSX("title", {
|
|
27
|
+
id: titleId
|
|
28
|
+
}, title) : null, ___EmotionJSX("path", {
|
|
29
|
+
d: "M2 14h13v1H2a1 1 0 0 1-1-1V1h1z"
|
|
30
|
+
}), ___EmotionJSX("path", {
|
|
31
|
+
d: "M5 10a1 1 0 0 1 1 1v1a1 1 0 0 1-1 1H4a1 1 0 0 1-1-1v-1a1 1 0 0 1 1-1zm-1 2h1v-1H4zm5-4a1 1 0 0 1 1 1v3a1 1 0 0 1-1 1H8a1 1 0 0 1-1-1V9a1 1 0 0 1 1-1zm-1 4h1V9H8zm5-6a1 1 0 0 1 1 1v5a1 1 0 0 1-1 1h-1a1 1 0 0 1-1-1V7a1 1 0 0 1 1-1zm-1 6h1V7h-1zM14.354 1.354 9.5 6.207l-2-2-4.146 4.147-.708-.708L7.5 2.793l2 2L13.647.646z"
|
|
32
|
+
}));
|
|
33
|
+
};
|
|
34
|
+
export var icon = EuiIconChartMix;
|
|
@@ -0,0 +1,32 @@
|
|
|
1
|
+
import _extends from "@babel/runtime/helpers/extends";
|
|
2
|
+
import _objectWithoutProperties from "@babel/runtime/helpers/objectWithoutProperties";
|
|
3
|
+
var _excluded = ["title", "titleId"];
|
|
4
|
+
/*
|
|
5
|
+
* Copyright Elasticsearch B.V. and/or licensed to Elasticsearch B.V. under one
|
|
6
|
+
* or more contributor license agreements. Licensed under the Elastic License
|
|
7
|
+
* 2.0 and the Server Side Public License, v 1; you may not use this file except
|
|
8
|
+
* in compliance with, at your election, the Elastic License 2.0 or the Server
|
|
9
|
+
* Side Public License, v 1.
|
|
10
|
+
*/
|
|
11
|
+
|
|
12
|
+
// THIS IS A GENERATED FILE. DO NOT MODIFY MANUALLY. @see scripts/compile-icons.js
|
|
13
|
+
|
|
14
|
+
import * as React from 'react';
|
|
15
|
+
import { jsx as ___EmotionJSX } from "@emotion/react";
|
|
16
|
+
var EuiIconChartWaffle = function EuiIconChartWaffle(_ref) {
|
|
17
|
+
var title = _ref.title,
|
|
18
|
+
titleId = _ref.titleId,
|
|
19
|
+
props = _objectWithoutProperties(_ref, _excluded);
|
|
20
|
+
return ___EmotionJSX("svg", _extends({
|
|
21
|
+
xmlns: "http://www.w3.org/2000/svg",
|
|
22
|
+
width: 16,
|
|
23
|
+
height: 16,
|
|
24
|
+
viewBox: "0 0 16 16",
|
|
25
|
+
"aria-labelledby": titleId
|
|
26
|
+
}, props), title ? ___EmotionJSX("title", {
|
|
27
|
+
id: titleId
|
|
28
|
+
}, title) : null, ___EmotionJSX("path", {
|
|
29
|
+
d: "M4.103 11.005A1 1 0 0 1 5 12v2l-.005.102A1 1 0 0 1 4 15H2a1 1 0 0 1-1-1v-2a1 1 0 0 1 1-1h2zM2 14h2v-2H2zm7.103-2.995A1 1 0 0 1 10 12v2l-.005.102A1 1 0 0 1 9 15H7a1 1 0 0 1-1-1v-2a1 1 0 0 1 1-1h2zM7 14h2v-2H7zm7.103-2.995A1 1 0 0 1 15 12v2l-.005.102A1 1 0 0 1 14 15h-2a1 1 0 0 1-1-1v-2a1 1 0 0 1 1-1h2zM12 14h2v-2h-2zM4.103 6.005A1 1 0 0 1 5 7v2l-.005.103A1 1 0 0 1 4 10H2a1 1 0 0 1-1-1V7a1 1 0 0 1 1-1h2zM2 9h2V7H2zm7.103-2.995A1 1 0 0 1 10 7v2l-.005.103A1 1 0 0 1 9 10H7a1 1 0 0 1-1-1V7a1 1 0 0 1 1-1h2zM7 9h2V7H7zM14 9h-2V7h2zM4 4H2V2h2zm5 0H7V2h2zm5 0h-2V2h2z"
|
|
30
|
+
}));
|
|
31
|
+
};
|
|
32
|
+
export var icon = EuiIconChartWaffle;
|
|
@@ -0,0 +1,38 @@
|
|
|
1
|
+
import _extends from "@babel/runtime/helpers/extends";
|
|
2
|
+
import _objectWithoutProperties from "@babel/runtime/helpers/objectWithoutProperties";
|
|
3
|
+
var _excluded = ["title", "titleId"];
|
|
4
|
+
/*
|
|
5
|
+
* Copyright Elasticsearch B.V. and/or licensed to Elasticsearch B.V. under one
|
|
6
|
+
* or more contributor license agreements. Licensed under the Elastic License
|
|
7
|
+
* 2.0 and the Server Side Public License, v 1; you may not use this file except
|
|
8
|
+
* in compliance with, at your election, the Elastic License 2.0 or the Server
|
|
9
|
+
* Side Public License, v 1.
|
|
10
|
+
*/
|
|
11
|
+
|
|
12
|
+
// THIS IS A GENERATED FILE. DO NOT MODIFY MANUALLY. @see scripts/compile-icons.js
|
|
13
|
+
|
|
14
|
+
import * as React from 'react';
|
|
15
|
+
import { jsx as ___EmotionJSX } from "@emotion/react";
|
|
16
|
+
var EuiIconClipboardWarning = function EuiIconClipboardWarning(_ref) {
|
|
17
|
+
var title = _ref.title,
|
|
18
|
+
titleId = _ref.titleId,
|
|
19
|
+
props = _objectWithoutProperties(_ref, _excluded);
|
|
20
|
+
return ___EmotionJSX("svg", _extends({
|
|
21
|
+
xmlns: "http://www.w3.org/2000/svg",
|
|
22
|
+
width: 16,
|
|
23
|
+
height: 16,
|
|
24
|
+
viewBox: "0 0 16 16",
|
|
25
|
+
"aria-labelledby": titleId
|
|
26
|
+
}, props), title ? ___EmotionJSX("title", {
|
|
27
|
+
id: titleId
|
|
28
|
+
}, title) : null, ___EmotionJSX("path", {
|
|
29
|
+
d: "M10.5 13a.5.5 0 1 1 0 1 .5.5 0 0 1 0-1m.5-1h-1V9h1z"
|
|
30
|
+
}), ___EmotionJSX("path", {
|
|
31
|
+
d: "M10.5 6a1 1 0 0 1 .697.285l.025.025a1 1 0 0 1 .15.2l4.5 8A1 1 0 0 1 15 16H6a1 1 0 0 1-.871-1.49L8.79 8 9 7.627l.629-1.117.073-.113A1 1 0 0 1 10.5 6M6 15h9l-4.5-8z"
|
|
32
|
+
}), ___EmotionJSX("path", {
|
|
33
|
+
d: "M6 0c.74 0 1.385.403 1.73 1H9a1 1 0 0 1 1 1h1a1 1 0 0 1 1 1v2.68a2 2 0 0 0-1-.614V3h-1v1a1 1 0 0 1-1 1H3a1 1 0 0 1-1-1V3H1v11h3.268l-.011.02A2 2 0 0 0 4 15H1a1 1 0 0 1-1-1V3a1 1 0 0 1 1-1h1a1 1 0 0 1 1-1h1.27C4.615.403 5.26 0 6 0m0 1a1 1 0 0 0-1 1H3v2h6V2H7a1 1 0 0 0-1-1"
|
|
34
|
+
}), ___EmotionJSX("path", {
|
|
35
|
+
d: "M5.393 12H3v-1h2.955zm1.125-2H3V9h4.08zm1.125-2H3V7h5.205z"
|
|
36
|
+
}));
|
|
37
|
+
};
|
|
38
|
+
export var icon = EuiIconClipboardWarning;
|