@elastic/eui 74.0.0 → 74.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_charts_theme.js +2 -1
- package/dist/eui_charts_theme.js.map +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 +1 -1
- package/es/components/basic_table/table.a11y.js +146 -104
- 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 +2 -2
- 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/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.a11y.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/facet/facet_button.js +1 -1
- package/es/components/form/field_number/field_number.js +1 -1
- package/es/components/form/field_text/field_text.js +2 -2
- package/es/components/form/form_control_layout/form_control_layout.js +2 -2
- package/es/components/form/form_control_layout/form_control_layout_custom_icon.js +1 -1
- package/es/components/form/form_control_layout/form_control_layout_icons.js +2 -2
- package/es/components/form/range/range.a11y.js +216 -0
- package/es/components/form/super_select/super_select.js +1 -1
- 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/alert.js +3 -2
- package/es/components/icon/assets/error.js +39 -0
- package/es/components/icon/icon.js +1 -1
- package/es/components/icon/icon_map.js +1 -0
- package/es/components/index.js +1 -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/loading/loading_content.js +37 -38
- 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/modal/modal_header_title.js +0 -5
- package/es/components/notification/notification_event.js +2 -2
- package/es/components/notification/notification_event_meta.js +1 -1
- package/es/components/page/page_header/page_header_content.js +1 -1
- package/es/components/pagination/pagination_button.js +1 -1
- package/es/components/popover/popover.js +1 -1
- package/es/components/progress/progress.a11y.js +84 -0
- package/es/components/resizable_container/resizable_container.a11y.js +110 -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/skeleton/index.js +12 -0
- package/es/components/skeleton/skeleton_circle.js +71 -0
- package/es/components/skeleton/skeleton_circle.styles.js +26 -0
- package/es/components/skeleton/skeleton_loading.js +59 -0
- package/es/components/skeleton/skeleton_rectangle.js +89 -0
- package/es/components/skeleton/skeleton_rectangle.styles.js +34 -0
- package/es/components/skeleton/skeleton_text.js +90 -0
- package/es/components/skeleton/skeleton_text.styles.js +34 -0
- package/es/components/skeleton/skeleton_title.js +74 -0
- package/es/components/skeleton/skeleton_title.styles.js +24 -0
- package/es/components/skeleton/utils.js +25 -0
- 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/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/global_styling/functions/logicals.js +2 -1
- package/es/global_styling/utility/animations.js +4 -1
- package/eui.d.ts +373 -203
- package/i18ntokens.json +34 -2
- 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 +1 -1
- package/lib/components/basic_table/table.a11y.js +147 -105
- 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 +2 -2
- 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/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.a11y.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/facet/facet_button.js +1 -1
- package/lib/components/form/field_number/field_number.js +1 -1
- package/lib/components/form/field_text/field_text.js +2 -2
- package/lib/components/form/form_control_layout/form_control_layout.js +2 -2
- package/lib/components/form/form_control_layout/form_control_layout_custom_icon.js +1 -1
- package/lib/components/form/form_control_layout/form_control_layout_icons.js +2 -2
- package/lib/components/form/range/range.a11y.js +220 -0
- package/lib/components/form/super_select/super_select.js +1 -1
- 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/alert.js +3 -2
- package/lib/components/icon/assets/error.js +46 -0
- package/lib/components/icon/icon.js +1 -1
- package/lib/components/icon/icon_map.js +1 -0
- package/lib/components/icon/svgs/alert.svg +2 -1
- package/lib/components/icon/svgs/error.svg +3 -0
- package/lib/components/index.js +13 -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/loading/loading_content.js +41 -42
- 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/modal/modal_header_title.js +0 -5
- 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/popover/popover.js +1 -1
- package/lib/components/progress/progress.a11y.js +84 -0
- package/lib/components/resizable_container/resizable_container.a11y.js +117 -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/skeleton/index.js +45 -0
- package/lib/components/skeleton/skeleton_circle.js +84 -0
- package/lib/components/skeleton/skeleton_circle.styles.js +38 -0
- package/lib/components/skeleton/skeleton_loading.js +68 -0
- package/lib/components/skeleton/skeleton_rectangle.js +103 -0
- package/lib/components/skeleton/skeleton_rectangle.styles.js +37 -0
- package/lib/components/skeleton/skeleton_text.js +103 -0
- package/lib/components/skeleton/skeleton_text.styles.js +45 -0
- package/lib/components/skeleton/skeleton_title.js +85 -0
- package/lib/components/skeleton/skeleton_title.styles.js +37 -0
- package/lib/components/skeleton/utils.js +38 -0
- 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/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/global_styling/functions/logicals.js +2 -1
- package/lib/global_styling/utility/animations.js +9 -3
- package/optimize/es/components/basic_table/table.a11y.js +146 -104
- package/optimize/es/components/card/card.js +1 -1
- package/optimize/es/components/datagrid/data_grid.a11y.js +1 -1
- package/optimize/es/components/form/range/range.a11y.js +206 -0
- package/optimize/es/components/form/super_select/super_select.js +1 -1
- package/optimize/es/components/icon/assets/alert.js +3 -2
- package/optimize/es/components/icon/assets/error.js +35 -0
- package/optimize/es/components/icon/icon_map.js +1 -0
- package/optimize/es/components/index.js +1 -0
- package/optimize/es/components/loading/loading_content.js +10 -33
- package/optimize/es/components/popover/popover.js +1 -1
- package/optimize/es/components/progress/progress.a11y.js +84 -0
- package/optimize/es/components/resizable_container/resizable_container.a11y.js +110 -0
- package/optimize/es/components/skeleton/index.js +12 -0
- package/optimize/es/components/skeleton/skeleton_circle.js +42 -0
- package/optimize/es/components/skeleton/skeleton_circle.styles.js +26 -0
- package/optimize/es/components/skeleton/skeleton_loading.js +38 -0
- package/optimize/es/components/skeleton/skeleton_rectangle.js +57 -0
- package/optimize/es/components/skeleton/skeleton_rectangle.styles.js +34 -0
- package/optimize/es/components/skeleton/skeleton_text.js +52 -0
- package/optimize/es/components/skeleton/skeleton_text.styles.js +34 -0
- package/optimize/es/components/skeleton/skeleton_title.js +41 -0
- package/optimize/es/components/skeleton/skeleton_title.styles.js +24 -0
- package/optimize/es/components/skeleton/utils.js +25 -0
- package/optimize/es/global_styling/functions/logicals.js +2 -1
- package/optimize/es/global_styling/utility/animations.js +4 -1
- package/optimize/lib/components/basic_table/table.a11y.js +147 -105
- package/optimize/lib/components/card/card.js +1 -1
- package/optimize/lib/components/datagrid/data_grid.a11y.js +1 -1
- package/optimize/lib/components/form/range/range.a11y.js +220 -0
- package/optimize/lib/components/form/super_select/super_select.js +1 -1
- package/optimize/lib/components/icon/assets/alert.js +3 -2
- package/optimize/lib/components/icon/assets/error.js +45 -0
- package/optimize/lib/components/icon/icon_map.js +1 -0
- package/optimize/lib/components/icon/svgs/alert.svg +2 -1
- package/optimize/lib/components/icon/svgs/error.svg +3 -0
- package/optimize/lib/components/index.js +13 -0
- package/optimize/lib/components/loading/loading_content.js +14 -38
- package/optimize/lib/components/popover/popover.js +1 -1
- package/optimize/lib/components/progress/progress.a11y.js +92 -0
- package/optimize/lib/components/resizable_container/resizable_container.a11y.js +117 -0
- package/optimize/lib/components/skeleton/index.js +45 -0
- package/optimize/lib/components/skeleton/skeleton_circle.js +54 -0
- package/optimize/lib/components/skeleton/skeleton_circle.styles.js +38 -0
- package/optimize/lib/components/skeleton/skeleton_loading.js +47 -0
- package/optimize/lib/components/skeleton/skeleton_rectangle.js +72 -0
- package/optimize/lib/components/skeleton/skeleton_rectangle.styles.js +37 -0
- package/optimize/lib/components/skeleton/skeleton_text.js +64 -0
- package/optimize/lib/components/skeleton/skeleton_text.styles.js +45 -0
- package/optimize/lib/components/skeleton/skeleton_title.js +52 -0
- package/optimize/lib/components/skeleton/skeleton_title.styles.js +37 -0
- package/optimize/lib/components/skeleton/utils.js +38 -0
- package/optimize/lib/global_styling/functions/logicals.js +2 -1
- package/optimize/lib/global_styling/utility/animations.js +9 -3
- package/package.json +2 -2
- 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 +1 -1
- package/test-env/components/basic_table/table.a11y.js +147 -105
- 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 +2 -2
- 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/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.a11y.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/facet/facet_button.js +1 -1
- package/test-env/components/form/field_number/field_number.js +1 -1
- package/test-env/components/form/field_text/field_text.js +2 -2
- package/test-env/components/form/form_control_layout/form_control_layout.js +2 -2
- package/test-env/components/form/form_control_layout/form_control_layout_custom_icon.js +1 -1
- package/test-env/components/form/form_control_layout/form_control_layout_icons.js +2 -2
- package/test-env/components/form/range/range.a11y.js +220 -0
- package/test-env/components/form/super_select/super_select.js +1 -1
- 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/alert.js +3 -2
- package/test-env/components/icon/assets/error.js +45 -0
- package/test-env/components/icon/icon_map.js +1 -0
- package/test-env/components/index.js +13 -0
- 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_content.js +41 -39
- 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/modal/modal_header_title.js +0 -5
- 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/popover/popover.js +1 -1
- package/test-env/components/progress/progress.a11y.js +92 -0
- package/test-env/components/resizable_container/resizable_container.a11y.js +117 -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/skeleton/index.js +45 -0
- package/test-env/components/skeleton/skeleton_circle.js +80 -0
- package/test-env/components/skeleton/skeleton_circle.styles.js +38 -0
- package/test-env/components/skeleton/skeleton_loading.js +65 -0
- package/test-env/components/skeleton/skeleton_rectangle.js +100 -0
- package/test-env/components/skeleton/skeleton_rectangle.styles.js +37 -0
- package/test-env/components/skeleton/skeleton_text.js +99 -0
- package/test-env/components/skeleton/skeleton_text.styles.js +45 -0
- package/test-env/components/skeleton/skeleton_title.js +82 -0
- package/test-env/components/skeleton/skeleton_title.styles.js +37 -0
- package/test-env/components/skeleton/utils.js +38 -0
- 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/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/global_styling/functions/logicals.js +2 -1
- package/test-env/global_styling/utility/animations.js +9 -3
- package/es/components/loading/loading_content.styles.js +0 -24
- package/lib/components/loading/loading_content.styles.js +0 -30
- package/optimize/es/components/loading/loading_content.styles.js +0 -24
- package/optimize/lib/components/loading/loading_content.styles.js +0 -32
- package/test-env/components/loading/loading_content.styles.js +0 -32
|
@@ -0,0 +1,206 @@
|
|
|
1
|
+
import _slicedToArray from "@babel/runtime/helpers/slicedToArray";
|
|
2
|
+
|
|
3
|
+
/*
|
|
4
|
+
* Copyright Elasticsearch B.V. and/or licensed to Elasticsearch B.V. under one
|
|
5
|
+
* or more contributor license agreements. Licensed under the Elastic License
|
|
6
|
+
* 2.0 and the Server Side Public License, v 1; you may not use this file except
|
|
7
|
+
* in compliance with, at your election, the Elastic License 2.0 or the Server
|
|
8
|
+
* Side Public License, v 1.
|
|
9
|
+
*/
|
|
10
|
+
/// <reference types="../../../../cypress/support"/>
|
|
11
|
+
import React, { useState } from 'react';
|
|
12
|
+
import { EuiDualRange } from './dual_range';
|
|
13
|
+
import { EuiRange } from './range';
|
|
14
|
+
import { jsx as ___EmotionJSX } from "@emotion/react";
|
|
15
|
+
describe('Single EuiRange', function () {
|
|
16
|
+
var SingleRange = function SingleRange() {
|
|
17
|
+
var _useState = useState('100'),
|
|
18
|
+
_useState2 = _slicedToArray(_useState, 2),
|
|
19
|
+
value = _useState2[0],
|
|
20
|
+
setValue = _useState2[1];
|
|
21
|
+
|
|
22
|
+
var onChange = function onChange(e) {
|
|
23
|
+
setValue(e.currentTarget.value);
|
|
24
|
+
};
|
|
25
|
+
|
|
26
|
+
return ___EmotionJSX(EuiRange, {
|
|
27
|
+
id: "cy-range-single",
|
|
28
|
+
min: 100,
|
|
29
|
+
max: 200,
|
|
30
|
+
value: value,
|
|
31
|
+
onChange: onChange,
|
|
32
|
+
showLabels: true,
|
|
33
|
+
showRange: true,
|
|
34
|
+
showValue: true,
|
|
35
|
+
valuePrepend: "100 - ",
|
|
36
|
+
"aria-label": "An example of EuiRange with valuePrepend prop"
|
|
37
|
+
});
|
|
38
|
+
};
|
|
39
|
+
|
|
40
|
+
beforeEach(function () {
|
|
41
|
+
cy.viewport(1024, 768); // medium breakpoint
|
|
42
|
+
|
|
43
|
+
cy.realMount(___EmotionJSX(SingleRange, null));
|
|
44
|
+
cy.get('div.euiRangeWrapper').should('exist');
|
|
45
|
+
});
|
|
46
|
+
describe('Automated accessibility check', function () {
|
|
47
|
+
it('has zero violations on first render', function () {
|
|
48
|
+
cy.checkAxe();
|
|
49
|
+
});
|
|
50
|
+
});
|
|
51
|
+
describe('Keyboard accessibility check', function () {
|
|
52
|
+
it('has zero violations when the range slider is increased', function () {
|
|
53
|
+
cy.realPress('Tab');
|
|
54
|
+
cy.get('input#cy-range-single').should('have.focus');
|
|
55
|
+
cy.repeatRealPress('ArrowRight', 10);
|
|
56
|
+
cy.get('output.euiRangeTooltip__value').contains('100 - 110');
|
|
57
|
+
cy.checkAxe();
|
|
58
|
+
});
|
|
59
|
+
it('has zero violations when the range slider is decreased', function () {
|
|
60
|
+
cy.realPress('Tab');
|
|
61
|
+
cy.get('input#cy-range-single').should('have.focus');
|
|
62
|
+
cy.repeatRealPress('ArrowLeft', 10);
|
|
63
|
+
cy.get('output.euiRangeTooltip__value').contains('100 - 100');
|
|
64
|
+
cy.checkAxe();
|
|
65
|
+
});
|
|
66
|
+
});
|
|
67
|
+
});
|
|
68
|
+
describe('Dual EuiRange', function () {
|
|
69
|
+
var DualRange = function DualRange() {
|
|
70
|
+
var _useState3 = useState(['100', '150']),
|
|
71
|
+
_useState4 = _slicedToArray(_useState3, 2),
|
|
72
|
+
dualValue = _useState4[0],
|
|
73
|
+
setDualValue = _useState4[1];
|
|
74
|
+
|
|
75
|
+
var onDualChange = function onDualChange(value) {
|
|
76
|
+
setDualValue(value);
|
|
77
|
+
};
|
|
78
|
+
|
|
79
|
+
return ___EmotionJSX(EuiDualRange, {
|
|
80
|
+
id: "cy-range-dual",
|
|
81
|
+
min: 0,
|
|
82
|
+
max: 300,
|
|
83
|
+
step: 10,
|
|
84
|
+
value: dualValue,
|
|
85
|
+
onChange: onDualChange,
|
|
86
|
+
showLabels: true,
|
|
87
|
+
"aria-label": "An example of EuiDualRange"
|
|
88
|
+
});
|
|
89
|
+
};
|
|
90
|
+
|
|
91
|
+
beforeEach(function () {
|
|
92
|
+
cy.viewport(1024, 768); // medium breakpoint
|
|
93
|
+
|
|
94
|
+
cy.realMount(___EmotionJSX(DualRange, null));
|
|
95
|
+
cy.get('div.euiRangeWrapper').should('exist');
|
|
96
|
+
});
|
|
97
|
+
describe('Automated accessibility check', function () {
|
|
98
|
+
it('has zero violations on first render', function () {
|
|
99
|
+
cy.checkAxe();
|
|
100
|
+
});
|
|
101
|
+
});
|
|
102
|
+
describe('Keyboard accessibility check', function () {
|
|
103
|
+
it('has zero violations when the range sliders are adjusted', function () {
|
|
104
|
+
cy.realPress('Tab');
|
|
105
|
+
cy.get('div[role="slider"]').first().should('have.focus');
|
|
106
|
+
cy.repeatRealPress('ArrowLeft', 3);
|
|
107
|
+
cy.get('div[role="slider"]').first().invoke('attr', 'aria-valuenow').should('eq', '70');
|
|
108
|
+
cy.realPress('Tab');
|
|
109
|
+
cy.get('div[role="slider"]').last().should('have.focus');
|
|
110
|
+
cy.repeatRealPress('ArrowRight', 3);
|
|
111
|
+
cy.get('div[role="slider"]').last().invoke('attr', 'aria-valuenow').should('eq', '180');
|
|
112
|
+
cy.checkAxe();
|
|
113
|
+
});
|
|
114
|
+
});
|
|
115
|
+
});
|
|
116
|
+
describe('Highlight Area EuiRange', function () {
|
|
117
|
+
var DraggableRange = function DraggableRange() {
|
|
118
|
+
var _useState5 = useState(['40', '60']),
|
|
119
|
+
_useState6 = _slicedToArray(_useState5, 2),
|
|
120
|
+
dualValue = _useState6[0],
|
|
121
|
+
setDualValue = _useState6[1];
|
|
122
|
+
|
|
123
|
+
return ___EmotionJSX(EuiDualRange, {
|
|
124
|
+
id: "cy-range-draggable",
|
|
125
|
+
min: 0,
|
|
126
|
+
max: 100,
|
|
127
|
+
step: 1,
|
|
128
|
+
value: dualValue,
|
|
129
|
+
onChange: setDualValue,
|
|
130
|
+
showLabels: true,
|
|
131
|
+
"aria-label": "An example of EuiDualRange with isDraggable='true'",
|
|
132
|
+
isDraggable: true
|
|
133
|
+
});
|
|
134
|
+
};
|
|
135
|
+
|
|
136
|
+
beforeEach(function () {
|
|
137
|
+
cy.viewport(1024, 768); // medium breakpoint
|
|
138
|
+
|
|
139
|
+
cy.realMount(___EmotionJSX(DraggableRange, null));
|
|
140
|
+
cy.get('div.euiRangeWrapper').should('exist');
|
|
141
|
+
});
|
|
142
|
+
describe('Automated accessibility check', function () {
|
|
143
|
+
it('has zero violations on first render', function () {
|
|
144
|
+
cy.checkAxe();
|
|
145
|
+
});
|
|
146
|
+
});
|
|
147
|
+
describe('Keyboard accessibility check', function () {
|
|
148
|
+
it('has zero violations when the highlight area is adjusted using arrow keys', function () {
|
|
149
|
+
cy.realPress('Tab');
|
|
150
|
+
cy.get('div[role="slider"]').first().should('have.focus');
|
|
151
|
+
cy.repeatRealPress('ArrowLeft', 3);
|
|
152
|
+
cy.get('div[role="slider"]').first().invoke('attr', 'aria-valuetext').should('eq', '37, 57');
|
|
153
|
+
cy.checkAxe();
|
|
154
|
+
});
|
|
155
|
+
});
|
|
156
|
+
describe('Drag and drop accessibility check', function () {
|
|
157
|
+
it('has zero violations when the higlight area is dragged using a mouse', function () {
|
|
158
|
+
cy.get('.euiRangeDraggable__inner').realMouseDown({
|
|
159
|
+
position: 'center'
|
|
160
|
+
}).realMouseMove(100, 0, {}).realMouseUp();
|
|
161
|
+
cy.checkAxe();
|
|
162
|
+
});
|
|
163
|
+
});
|
|
164
|
+
describe('EuiRange in a dropdown', function () {
|
|
165
|
+
var InputWithRange = function InputWithRange() {
|
|
166
|
+
var _useState7 = useState('20'),
|
|
167
|
+
_useState8 = _slicedToArray(_useState7, 2),
|
|
168
|
+
value = _useState8[0],
|
|
169
|
+
setValue = _useState8[1];
|
|
170
|
+
|
|
171
|
+
return ___EmotionJSX(EuiRange, {
|
|
172
|
+
id: "cy-range-in-dropdown",
|
|
173
|
+
min: 0,
|
|
174
|
+
max: 100,
|
|
175
|
+
value: value,
|
|
176
|
+
onChange: function onChange(e) {
|
|
177
|
+
return setValue(e.currentTarget.value);
|
|
178
|
+
},
|
|
179
|
+
showInput: "inputWithPopover",
|
|
180
|
+
showLabels: true,
|
|
181
|
+
"aria-label": "An example of EuiRange with showInput prop"
|
|
182
|
+
});
|
|
183
|
+
};
|
|
184
|
+
|
|
185
|
+
beforeEach(function () {
|
|
186
|
+
cy.viewport(1024, 768); // medium breakpoint
|
|
187
|
+
|
|
188
|
+
cy.realMount(___EmotionJSX(InputWithRange, null));
|
|
189
|
+
cy.get('input#cy-range-in-dropdown').should('exist');
|
|
190
|
+
});
|
|
191
|
+
describe('Automated accessibility check', function () {
|
|
192
|
+
it('has zero violations on first render', function () {
|
|
193
|
+
cy.checkAxe();
|
|
194
|
+
});
|
|
195
|
+
});
|
|
196
|
+
describe('Keyboard accessibility check', function () {
|
|
197
|
+
it('updates the range value using arrow keys with input[type="number"]', function () {
|
|
198
|
+
cy.realPress('Tab');
|
|
199
|
+
cy.get('input#cy-range-in-dropdown').should('have.focus');
|
|
200
|
+
cy.repeatRealPress('ArrowUp', 10);
|
|
201
|
+
cy.get('input[type="range"]').first().invoke('attr', 'value').should('eq', '30');
|
|
202
|
+
cy.checkAxe();
|
|
203
|
+
});
|
|
204
|
+
});
|
|
205
|
+
});
|
|
206
|
+
});
|
|
@@ -292,7 +292,7 @@ export var EuiSuperSelect = /*#__PURE__*/function (_Component) {
|
|
|
292
292
|
id: this.describedById
|
|
293
293
|
}, ___EmotionJSX(EuiI18n, {
|
|
294
294
|
token: "euiSuperSelect.screenReaderAnnouncement",
|
|
295
|
-
default: "You are in a form selector and must select a single option. Use the
|
|
295
|
+
default: "You are in a form selector and must select a single option. Use the Up and Down arrow keys to navigate or Escape to close."
|
|
296
296
|
}))), ___EmotionJSX("div", {
|
|
297
297
|
"aria-labelledby": this.labelledById,
|
|
298
298
|
"aria-describedby": this.describedById,
|
|
@@ -27,8 +27,9 @@ var EuiIconAlert = function EuiIconAlert(_ref) {
|
|
|
27
27
|
}, props), title ? ___EmotionJSX("title", {
|
|
28
28
|
id: titleId
|
|
29
29
|
}, title) : null, ___EmotionJSX("path", {
|
|
30
|
-
|
|
31
|
-
|
|
30
|
+
d: "M8.55 9.502l.35-3.507a.905.905 0 10-1.8 0l.35 3.507a.552.552 0 001.1 0zM9 12a1 1 0 11-2 0 1 1 0 012 0z"
|
|
31
|
+
}), ___EmotionJSX("path", {
|
|
32
|
+
d: "M8.864 1.496a1 1 0 00-1.728 0l-7 12A1 1 0 001 15h14a1 1 0 00.864-1.504l-7-12zM1 14L8 2l7 12H1z"
|
|
32
33
|
}));
|
|
33
34
|
};
|
|
34
35
|
|
|
@@ -0,0 +1,35 @@
|
|
|
1
|
+
import _extends from "@babel/runtime/helpers/extends";
|
|
2
|
+
import _objectWithoutProperties from "@babel/runtime/helpers/objectWithoutProperties";
|
|
3
|
+
var _excluded = ["title", "titleId"];
|
|
4
|
+
|
|
5
|
+
/*
|
|
6
|
+
* Copyright Elasticsearch B.V. and/or licensed to Elasticsearch B.V. under one
|
|
7
|
+
* or more contributor license agreements. Licensed under the Elastic License
|
|
8
|
+
* 2.0 and the Server Side Public License, v 1; you may not use this file except
|
|
9
|
+
* in compliance with, at your election, the Elastic License 2.0 or the Server
|
|
10
|
+
* Side Public License, v 1.
|
|
11
|
+
*/
|
|
12
|
+
// THIS IS A GENERATED FILE. DO NOT MODIFY MANUALLY. @see scripts/compile-icons.js
|
|
13
|
+
import * as React from 'react';
|
|
14
|
+
import { jsx as ___EmotionJSX } from "@emotion/react";
|
|
15
|
+
|
|
16
|
+
var EuiIconError = function EuiIconError(_ref) {
|
|
17
|
+
var title = _ref.title,
|
|
18
|
+
titleId = _ref.titleId,
|
|
19
|
+
props = _objectWithoutProperties(_ref, _excluded);
|
|
20
|
+
|
|
21
|
+
return ___EmotionJSX("svg", _extends({
|
|
22
|
+
xmlns: "http://www.w3.org/2000/svg",
|
|
23
|
+
width: 16,
|
|
24
|
+
height: 16,
|
|
25
|
+
viewBox: "0 0 16 16",
|
|
26
|
+
"aria-labelledby": titleId
|
|
27
|
+
}, props), title ? ___EmotionJSX("title", {
|
|
28
|
+
id: titleId
|
|
29
|
+
}, title) : null, ___EmotionJSX("path", {
|
|
30
|
+
fillRule: "evenodd",
|
|
31
|
+
d: "M10 1a1 1 0 01.707.293l4 4A1 1 0 0115 6v5a1 1 0 01-.293.707l-4 4A1 1 0 0110 16H5a1 1 0 01-.707-.293l-4-4A1 1 0 010 11V6a1 1 0 01.293-.707l4-4A1 1 0 015 1h5zM4.146 5.146a.5.5 0 01.708 0L7.5 7.793l2.646-2.647a.5.5 0 01.708.708L8.207 8.5l2.647 2.646a.5.5 0 01-.708.708L7.5 9.207l-2.646 2.647a.5.5 0 01-.708-.708L6.793 8.5 4.146 5.854a.5.5 0 010-.708z"
|
|
32
|
+
}));
|
|
33
|
+
};
|
|
34
|
+
|
|
35
|
+
export var icon = EuiIconError;
|
|
@@ -1,7 +1,3 @@
|
|
|
1
|
-
import _extends from "@babel/runtime/helpers/extends";
|
|
2
|
-
import _objectWithoutProperties from "@babel/runtime/helpers/objectWithoutProperties";
|
|
3
|
-
var _excluded = ["lines", "className", "aria-label"];
|
|
4
|
-
|
|
5
1
|
/*
|
|
6
2
|
* Copyright Elasticsearch B.V. and/or licensed to Elasticsearch B.V. under one
|
|
7
3
|
* or more contributor license agreements. Licensed under the Elastic License
|
|
@@ -10,35 +6,16 @@ var _excluded = ["lines", "className", "aria-label"];
|
|
|
10
6
|
* Side Public License, v 1.
|
|
11
7
|
*/
|
|
12
8
|
import React from 'react';
|
|
13
|
-
import
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
import { jsx as ___EmotionJSX } from "@emotion/react";
|
|
18
|
-
export var EuiLoadingContent = function EuiLoadingContent(_ref) {
|
|
19
|
-
var _ref$lines = _ref.lines,
|
|
20
|
-
lines = _ref$lines === void 0 ? 3 : _ref$lines,
|
|
21
|
-
className = _ref.className,
|
|
22
|
-
ariaLabel = _ref['aria-label'],
|
|
23
|
-
rest = _objectWithoutProperties(_ref, _excluded);
|
|
24
|
-
|
|
25
|
-
var euiTheme = useEuiTheme();
|
|
26
|
-
var styles = euiLoadingContentStyles(euiTheme);
|
|
27
|
-
var lineCssStyles = [styles.euiLoadingContent__singleLine];
|
|
28
|
-
var defaultLabel = useLoadingAriaLabel();
|
|
29
|
-
var classes = classNames('euiLoadingContent', className);
|
|
30
|
-
var lineElements = [];
|
|
9
|
+
import { EuiSkeletonText } from '../skeleton';
|
|
10
|
+
/**
|
|
11
|
+
* @deprecated Use `EuiSkeletonTextProps` instead
|
|
12
|
+
*/
|
|
31
13
|
|
|
32
|
-
|
|
33
|
-
lineElements.push(___EmotionJSX("span", {
|
|
34
|
-
key: i,
|
|
35
|
-
css: lineCssStyles
|
|
36
|
-
}));
|
|
37
|
-
}
|
|
14
|
+
import { jsx as ___EmotionJSX } from "@emotion/react";
|
|
38
15
|
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
16
|
+
/**
|
|
17
|
+
* @deprecated Use `EuiSkeletonText` instead
|
|
18
|
+
*/
|
|
19
|
+
export var EuiLoadingContent = function EuiLoadingContent(props) {
|
|
20
|
+
return ___EmotionJSX(EuiSkeletonText, props);
|
|
44
21
|
};
|
|
@@ -463,7 +463,7 @@ export var EuiPopover = /*#__PURE__*/function (_Component) {
|
|
|
463
463
|
id: this.descriptionId
|
|
464
464
|
}, ownFocus && ___EmotionJSX(EuiI18n, {
|
|
465
465
|
token: "euiPopover.screenReaderAnnouncement",
|
|
466
|
-
default: "You are in a dialog.
|
|
466
|
+
default: "You are in a dialog. Press Escape, or tap/click outside the dialog to close."
|
|
467
467
|
}), popoverScreenReaderText));
|
|
468
468
|
}
|
|
469
469
|
|
|
@@ -0,0 +1,84 @@
|
|
|
1
|
+
import _extends from "@babel/runtime/helpers/extends";
|
|
2
|
+
|
|
3
|
+
/*
|
|
4
|
+
* Copyright Elasticsearch B.V. and/or licensed to Elasticsearch B.V. under one
|
|
5
|
+
* or more contributor license agreements. Licensed under the Elastic License
|
|
6
|
+
* 2.0 and the Server Side Public License, v 1; you may not use this file except
|
|
7
|
+
* in compliance with, at your election, the Elastic License 2.0 or the Server
|
|
8
|
+
* Side Public License, v 1.
|
|
9
|
+
*/
|
|
10
|
+
/// <reference types="../../../cypress/support"/>
|
|
11
|
+
import React from 'react';
|
|
12
|
+
import { EuiProgress } from './progress';
|
|
13
|
+
import { EuiSpacer } from '../spacer';
|
|
14
|
+
import { jsx as ___EmotionJSX } from "@emotion/react";
|
|
15
|
+
var ProgressCommonProps = {
|
|
16
|
+
color: 'success',
|
|
17
|
+
max: 100
|
|
18
|
+
};
|
|
19
|
+
|
|
20
|
+
var ProgressBars = function ProgressBars() {
|
|
21
|
+
return ___EmotionJSX(React.Fragment, null, ___EmotionJSX("div", {
|
|
22
|
+
"data-test-subj": "cy-progress-1"
|
|
23
|
+
}, ___EmotionJSX(EuiProgress, _extends({
|
|
24
|
+
valueText: true,
|
|
25
|
+
size: "xs",
|
|
26
|
+
value: 0
|
|
27
|
+
}, ProgressCommonProps))), ___EmotionJSX("div", {
|
|
28
|
+
"data-test-subj": "cy-progress-2"
|
|
29
|
+
}, ___EmotionJSX(EuiProgress, _extends({
|
|
30
|
+
valueText: true,
|
|
31
|
+
size: "s",
|
|
32
|
+
value: 33
|
|
33
|
+
}, ProgressCommonProps))), ___EmotionJSX("div", {
|
|
34
|
+
"data-test-subj": "cy-progress-3"
|
|
35
|
+
}, ___EmotionJSX(EuiProgress, _extends({
|
|
36
|
+
valueText: true,
|
|
37
|
+
size: "m",
|
|
38
|
+
value: 66
|
|
39
|
+
}, ProgressCommonProps))), ___EmotionJSX("div", {
|
|
40
|
+
"data-test-subj": "cy-progress-4"
|
|
41
|
+
}, ___EmotionJSX(EuiProgress, _extends({
|
|
42
|
+
valueText: true,
|
|
43
|
+
size: "l",
|
|
44
|
+
value: 100
|
|
45
|
+
}, ProgressCommonProps))), ___EmotionJSX("div", {
|
|
46
|
+
"data-test-subj": "cy-progress-5"
|
|
47
|
+
}, ___EmotionJSX(EuiProgress, _extends({
|
|
48
|
+
valueText: true,
|
|
49
|
+
label: "Basic percentage",
|
|
50
|
+
size: "l",
|
|
51
|
+
value: 100
|
|
52
|
+
}, ProgressCommonProps))), ___EmotionJSX(EuiSpacer, {
|
|
53
|
+
size: "m"
|
|
54
|
+
}), ___EmotionJSX("div", {
|
|
55
|
+
"data-test-subj": "cy-progress-infinite"
|
|
56
|
+
}, ___EmotionJSX(EuiProgress, {
|
|
57
|
+
valueText: true,
|
|
58
|
+
size: "l",
|
|
59
|
+
color: "success"
|
|
60
|
+
})));
|
|
61
|
+
};
|
|
62
|
+
|
|
63
|
+
beforeEach(function () {
|
|
64
|
+
cy.viewport(1024, 768); // medium breakpoint
|
|
65
|
+
|
|
66
|
+
cy.realMount(___EmotionJSX(ProgressBars, null));
|
|
67
|
+
cy.get('div[data-test-subj="cy-progress-1"]').should('exist');
|
|
68
|
+
});
|
|
69
|
+
describe('EuiProgress', function () {
|
|
70
|
+
describe('Automated accessibility check', function () {
|
|
71
|
+
it('has zero violations on first render', function () {
|
|
72
|
+
cy.checkAxe();
|
|
73
|
+
});
|
|
74
|
+
it('displays correct progress values and labels', function () {
|
|
75
|
+
cy.get('div[data-test-subj="cy-progress-1"] span.euiProgress__valueText').contains('0');
|
|
76
|
+
cy.get('div[data-test-subj="cy-progress-2"] span.euiProgress__valueText').contains('33');
|
|
77
|
+
cy.get('div[data-test-subj="cy-progress-3"] span.euiProgress__valueText').contains('66');
|
|
78
|
+
cy.get('div[data-test-subj="cy-progress-4"] span.euiProgress__valueText').contains('100');
|
|
79
|
+
cy.get('div[data-test-subj="cy-progress-5"] span.euiProgress__label').contains('Basic percentage');
|
|
80
|
+
cy.get('div[data-test-subj="cy-progress-5"] span.euiProgress__valueText').contains('100');
|
|
81
|
+
cy.get('div[data-test-subj="cy-progress-infinite"] span.euiProgress__valueText').should('not.exist');
|
|
82
|
+
});
|
|
83
|
+
});
|
|
84
|
+
});
|
|
@@ -0,0 +1,110 @@
|
|
|
1
|
+
/*
|
|
2
|
+
* Copyright Elasticsearch B.V. and/or licensed to Elasticsearch B.V. under one
|
|
3
|
+
* or more contributor license agreements. Licensed under the Elastic License
|
|
4
|
+
* 2.0 and the Server Side Public License, v 1; you may not use this file except
|
|
5
|
+
* in compliance with, at your election, the Elastic License 2.0 or the Server
|
|
6
|
+
* Side Public License, v 1.
|
|
7
|
+
*/
|
|
8
|
+
/// <reference types="../../../cypress/support"/>
|
|
9
|
+
import React from 'react';
|
|
10
|
+
import { EuiResizableContainer } from './resizable_container';
|
|
11
|
+
import { EuiText } from '../text';
|
|
12
|
+
import { faker } from '@faker-js/faker';
|
|
13
|
+
import { jsx as ___EmotionJSX } from "@emotion/react";
|
|
14
|
+
|
|
15
|
+
var text = ___EmotionJSX(React.Fragment, null, ___EmotionJSX("p", null, faker.lorem.paragraphs()), ___EmotionJSX("p", null, faker.lorem.paragraphs()), ___EmotionJSX("p", null, faker.lorem.paragraphs()));
|
|
16
|
+
|
|
17
|
+
describe('Horizontal EuiResizableContainer', function () {
|
|
18
|
+
var HorizontalContainer = function HorizontalContainer() {
|
|
19
|
+
return ___EmotionJSX(EuiResizableContainer, {
|
|
20
|
+
style: {
|
|
21
|
+
height: '200px'
|
|
22
|
+
}
|
|
23
|
+
}, function (EuiResizablePanel, EuiResizableButton) {
|
|
24
|
+
return ___EmotionJSX(React.Fragment, null, ___EmotionJSX(EuiResizablePanel, {
|
|
25
|
+
initialSize: 50,
|
|
26
|
+
minSize: "30%",
|
|
27
|
+
tabIndex: 0
|
|
28
|
+
}, ___EmotionJSX(EuiText, null, ___EmotionJSX("div", null, text), ___EmotionJSX("a", {
|
|
29
|
+
href: "#",
|
|
30
|
+
"data-test-subj": "hello-world-link"
|
|
31
|
+
}, "Hello world"))), ___EmotionJSX(EuiResizableButton, null), ___EmotionJSX(EuiResizablePanel, {
|
|
32
|
+
initialSize: 50,
|
|
33
|
+
minSize: "200px",
|
|
34
|
+
tabIndex: 0
|
|
35
|
+
}, ___EmotionJSX(EuiText, null, text)));
|
|
36
|
+
});
|
|
37
|
+
};
|
|
38
|
+
|
|
39
|
+
beforeEach(function () {
|
|
40
|
+
cy.viewport(1024, 768); // medium breakpoint
|
|
41
|
+
|
|
42
|
+
cy.realMount(___EmotionJSX(HorizontalContainer, null));
|
|
43
|
+
cy.get('div.euiResizablePanel').should('exist');
|
|
44
|
+
});
|
|
45
|
+
describe('Automated accessibility check', function () {
|
|
46
|
+
it('has zero violations on first render', function () {
|
|
47
|
+
cy.checkAxe();
|
|
48
|
+
});
|
|
49
|
+
});
|
|
50
|
+
describe('Keyboard accessibility check', function () {
|
|
51
|
+
it('has zero violations when first panel is scrolled vertically', function () {
|
|
52
|
+
cy.realPress('Tab');
|
|
53
|
+
cy.get('div.euiPanel').first().should('have.focus');
|
|
54
|
+
cy.realPress('End');
|
|
55
|
+
cy.get('a[data-test-subj="hello-world-link"]').should('be.visible');
|
|
56
|
+
cy.checkAxe();
|
|
57
|
+
});
|
|
58
|
+
it('has zero violations when second panel is scrolled vertically', function () {
|
|
59
|
+
cy.repeatRealPress('Tab', 4);
|
|
60
|
+
cy.get('div.euiPanel').last().should('have.focus');
|
|
61
|
+
cy.realPress('End');
|
|
62
|
+
cy.realPress('Home');
|
|
63
|
+
cy.checkAxe();
|
|
64
|
+
});
|
|
65
|
+
it('has zero violations when the horizontal panels are resized', function () {
|
|
66
|
+
cy.repeatRealPress('Tab', 3);
|
|
67
|
+
cy.get('button.euiResizableButton').should('have.focus');
|
|
68
|
+
cy.repeatRealPress('ArrowRight', 10);
|
|
69
|
+
cy.checkAxe();
|
|
70
|
+
});
|
|
71
|
+
});
|
|
72
|
+
});
|
|
73
|
+
describe('Vertical EuiResizableContainer', function () {
|
|
74
|
+
var VerticalContainer = function VerticalContainer() {
|
|
75
|
+
return ___EmotionJSX(EuiResizableContainer, {
|
|
76
|
+
style: {
|
|
77
|
+
height: '400px'
|
|
78
|
+
},
|
|
79
|
+
direction: "vertical"
|
|
80
|
+
}, function (EuiResizablePanel, EuiResizableButton) {
|
|
81
|
+
return ___EmotionJSX(React.Fragment, null, ___EmotionJSX(EuiResizablePanel, {
|
|
82
|
+
initialSize: 60,
|
|
83
|
+
minSize: "40%",
|
|
84
|
+
tabIndex: 0
|
|
85
|
+
}, ___EmotionJSX(EuiText, null, ___EmotionJSX("div", null, text))), ___EmotionJSX(EuiResizableButton, null), ___EmotionJSX(EuiResizablePanel, {
|
|
86
|
+
initialSize: 40,
|
|
87
|
+
minSize: "10%",
|
|
88
|
+
tabIndex: 0
|
|
89
|
+
}, ___EmotionJSX(EuiText, null, ___EmotionJSX("div", null, text))));
|
|
90
|
+
});
|
|
91
|
+
};
|
|
92
|
+
|
|
93
|
+
beforeEach(function () {
|
|
94
|
+
cy.viewport(1024, 768); // medium breakpoint
|
|
95
|
+
|
|
96
|
+
cy.realMount(___EmotionJSX(VerticalContainer, null));
|
|
97
|
+
cy.get('div.euiResizablePanel').should('exist');
|
|
98
|
+
});
|
|
99
|
+
describe('Automated accessibility check', function () {
|
|
100
|
+
it('has zero violations on first render', function () {
|
|
101
|
+
cy.checkAxe();
|
|
102
|
+
});
|
|
103
|
+
it('has zero violations when the vertical panels are resized', function () {
|
|
104
|
+
cy.repeatRealPress('Tab');
|
|
105
|
+
cy.get('button.euiResizableButton').should('have.focus');
|
|
106
|
+
cy.repeatRealPress('ArrowDown', 10);
|
|
107
|
+
cy.checkAxe();
|
|
108
|
+
});
|
|
109
|
+
});
|
|
110
|
+
});
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
/*
|
|
2
|
+
* Copyright Elasticsearch B.V. and/or licensed to Elasticsearch B.V. under one
|
|
3
|
+
* or more contributor license agreements. Licensed under the Elastic License
|
|
4
|
+
* 2.0 and the Server Side Public License, v 1; you may not use this file except
|
|
5
|
+
* in compliance with, at your election, the Elastic License 2.0 or the Server
|
|
6
|
+
* Side Public License, v 1.
|
|
7
|
+
*/
|
|
8
|
+
export { EuiSkeletonLoading } from './skeleton_loading';
|
|
9
|
+
export { EuiSkeletonCircle } from './skeleton_circle';
|
|
10
|
+
export { EuiSkeletonText } from './skeleton_text';
|
|
11
|
+
export { EuiSkeletonRectangle } from './skeleton_rectangle';
|
|
12
|
+
export { EuiSkeletonTitle } from './skeleton_title';
|
|
@@ -0,0 +1,42 @@
|
|
|
1
|
+
import _extends from "@babel/runtime/helpers/extends";
|
|
2
|
+
import _objectWithoutProperties from "@babel/runtime/helpers/objectWithoutProperties";
|
|
3
|
+
var _excluded = ["isLoading", "size", "className", "contentAriaLabel", "ariaWrapperProps", "children"];
|
|
4
|
+
|
|
5
|
+
/*
|
|
6
|
+
* Copyright Elasticsearch B.V. and/or licensed to Elasticsearch B.V. under one
|
|
7
|
+
* or more contributor license agreements. Licensed under the Elastic License
|
|
8
|
+
* 2.0 and the Server Side Public License, v 1; you may not use this file except
|
|
9
|
+
* in compliance with, at your election, the Elastic License 2.0 or the Server
|
|
10
|
+
* Side Public License, v 1.
|
|
11
|
+
*/
|
|
12
|
+
import React from 'react';
|
|
13
|
+
import classNames from 'classnames';
|
|
14
|
+
import { useEuiTheme } from '../../services';
|
|
15
|
+
import { EuiSkeletonLoading } from './skeleton_loading';
|
|
16
|
+
import { euiSkeletonCircleStyles } from './skeleton_circle.styles';
|
|
17
|
+
import { jsx as ___EmotionJSX } from "@emotion/react";
|
|
18
|
+
export var SIZES = ['s', 'm', 'l', 'xl'];
|
|
19
|
+
export var EuiSkeletonCircle = function EuiSkeletonCircle(_ref) {
|
|
20
|
+
var _ref$isLoading = _ref.isLoading,
|
|
21
|
+
isLoading = _ref$isLoading === void 0 ? true : _ref$isLoading,
|
|
22
|
+
_ref$size = _ref.size,
|
|
23
|
+
size = _ref$size === void 0 ? 'm' : _ref$size,
|
|
24
|
+
className = _ref.className,
|
|
25
|
+
contentAriaLabel = _ref.contentAriaLabel,
|
|
26
|
+
ariaWrapperProps = _ref.ariaWrapperProps,
|
|
27
|
+
children = _ref.children,
|
|
28
|
+
rest = _objectWithoutProperties(_ref, _excluded);
|
|
29
|
+
|
|
30
|
+
var euiTheme = useEuiTheme();
|
|
31
|
+
var styles = euiSkeletonCircleStyles(euiTheme);
|
|
32
|
+
var cssStyles = [styles.euiSkeletonCircle, styles[size]];
|
|
33
|
+
return ___EmotionJSX(EuiSkeletonLoading, _extends({
|
|
34
|
+
isLoading: isLoading,
|
|
35
|
+
loadingContent: ___EmotionJSX("div", _extends({
|
|
36
|
+
className: classNames('euiSkeletonCircle', className),
|
|
37
|
+
css: cssStyles
|
|
38
|
+
}, rest)),
|
|
39
|
+
loadedContent: children || '',
|
|
40
|
+
contentAriaLabel: contentAriaLabel
|
|
41
|
+
}, ariaWrapperProps));
|
|
42
|
+
};
|
|
@@ -0,0 +1,26 @@
|
|
|
1
|
+
/*
|
|
2
|
+
* Copyright Elasticsearch B.V. and/or licensed to Elasticsearch B.V. under one
|
|
3
|
+
* or more contributor license agreements. Licensed under the Elastic License
|
|
4
|
+
* 2.0 and the Server Side Public License, v 1; you may not use this file except
|
|
5
|
+
* in compliance with, at your election, the Elastic License 2.0 or the Server
|
|
6
|
+
* Side Public License, v 1.
|
|
7
|
+
*/
|
|
8
|
+
import { css } from '@emotion/react';
|
|
9
|
+
import { logicalSizeCSS, mathWithUnits } from '../../global_styling';
|
|
10
|
+
import { euiSkeletonGradientAnimation } from './utils';
|
|
11
|
+
export var euiSkeletonCircleStyles = function euiSkeletonCircleStyles(euiThemeContext) {
|
|
12
|
+
var euiTheme = euiThemeContext.euiTheme;
|
|
13
|
+
return {
|
|
14
|
+
euiSkeletonCircle: /*#__PURE__*/css("display:block;border-radius:50%;", euiSkeletonGradientAnimation(euiThemeContext, {
|
|
15
|
+
slideSize: '-70%',
|
|
16
|
+
gradientSize: '280%'
|
|
17
|
+
}), ";;label:euiSkeletonCircle;"),
|
|
18
|
+
// Sizes
|
|
19
|
+
s: /*#__PURE__*/css(logicalSizeCSS(euiTheme.size.l), ";;label:s;"),
|
|
20
|
+
m: /*#__PURE__*/css(logicalSizeCSS(euiTheme.size.xl), ";;label:m;"),
|
|
21
|
+
l: /*#__PURE__*/css(logicalSizeCSS(euiTheme.size.xxl), ";;label:l;"),
|
|
22
|
+
xl: /*#__PURE__*/css(logicalSizeCSS(mathWithUnits(euiTheme.size.base, function (x) {
|
|
23
|
+
return x * 4;
|
|
24
|
+
})), ";;label:xl;")
|
|
25
|
+
};
|
|
26
|
+
};
|
|
@@ -0,0 +1,38 @@
|
|
|
1
|
+
import _extends from "@babel/runtime/helpers/extends";
|
|
2
|
+
import _objectWithoutProperties from "@babel/runtime/helpers/objectWithoutProperties";
|
|
3
|
+
var _excluded = ["isLoading", "contentAriaLabel", "loadingContent", "loadedContent"];
|
|
4
|
+
|
|
5
|
+
/*
|
|
6
|
+
* Copyright Elasticsearch B.V. and/or licensed to Elasticsearch B.V. under one
|
|
7
|
+
* or more contributor license agreements. Licensed under the Elastic License
|
|
8
|
+
* 2.0 and the Server Side Public License, v 1; you may not use this file except
|
|
9
|
+
* in compliance with, at your election, the Elastic License 2.0 or the Server
|
|
10
|
+
* Side Public License, v 1.
|
|
11
|
+
*/
|
|
12
|
+
import React from 'react';
|
|
13
|
+
import { EuiScreenReaderLive } from '../accessibility/screen_reader_live';
|
|
14
|
+
import { useEuiI18n } from '../i18n';
|
|
15
|
+
import { jsx as ___EmotionJSX } from "@emotion/react";
|
|
16
|
+
export var EuiSkeletonLoading = function EuiSkeletonLoading(_ref) {
|
|
17
|
+
var _ref$isLoading = _ref.isLoading,
|
|
18
|
+
isLoading = _ref$isLoading === void 0 ? true : _ref$isLoading,
|
|
19
|
+
contentAriaLabel = _ref.contentAriaLabel,
|
|
20
|
+
loadingContent = _ref.loadingContent,
|
|
21
|
+
loadedContent = _ref.loadedContent,
|
|
22
|
+
rest = _objectWithoutProperties(_ref, _excluded);
|
|
23
|
+
|
|
24
|
+
var loadingAriaLabel = useEuiI18n('euiSkeletonLoading.loadingAriaText', 'Loading {contentAriaLabel}', {
|
|
25
|
+
contentAriaLabel: contentAriaLabel
|
|
26
|
+
});
|
|
27
|
+
var loadedAriaLive = useEuiI18n('euiSkeletonLoading.loadedAriaText', 'Loaded {contentAriaLabel}', {
|
|
28
|
+
contentAriaLabel: contentAriaLabel
|
|
29
|
+
});
|
|
30
|
+
var loadingProps = {
|
|
31
|
+
'aria-label': loadingAriaLabel,
|
|
32
|
+
role: 'progressbar'
|
|
33
|
+
};
|
|
34
|
+
return ___EmotionJSX("div", _extends({
|
|
35
|
+
"aria-busy": isLoading,
|
|
36
|
+
"data-test-subj": "euiSkeletonLoadingAriaWrapper"
|
|
37
|
+
}, rest), isLoading ? /*#__PURE__*/React.cloneElement(loadingContent, loadingProps) : ___EmotionJSX(React.Fragment, null, ___EmotionJSX(EuiScreenReaderLive, null, loadedAriaLive), loadedContent));
|
|
38
|
+
};
|