@elastic/eui 70.4.0 → 71.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/README.md +0 -7
- package/dist/eui_charts_theme.js +10673 -5106
- package/dist/eui_charts_theme.js.map +1 -1
- package/dist/eui_theme_dark.css +7760 -6564
- package/dist/eui_theme_dark.json +2 -161
- package/dist/eui_theme_dark.json.d.ts +0 -159
- package/dist/eui_theme_dark.min.css +1 -1
- package/dist/eui_theme_light.css +7784 -6588
- package/dist/eui_theme_light.json +2 -161
- package/dist/eui_theme_light.json.d.ts +0 -159
- package/dist/eui_theme_light.min.css +1 -1
- package/es/components/avatar/avatar.js +1 -1
- package/es/components/badge/badge.js +1 -1
- package/es/components/badge/badge.styles.js +2 -2
- 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 +14 -6
- package/es/components/breadcrumbs/breadcrumb.js +2 -1
- package/es/components/breadcrumbs/breadcrumb.styles.js +3 -3
- package/es/components/breadcrumbs/breadcrumbs.a11y.js +58 -0
- 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.styles.js +2 -2
- 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.a11y.js +154 -0
- package/es/components/card/card.js +1 -1
- package/es/components/code/code.styles.js +2 -1
- package/es/components/code/code_block_virtualized.js +30 -12
- package/es/components/collapsible_nav/collapsible_nav_group/collapsible_nav_group.js +1 -1
- package/es/components/color_picker/color_picker.a11y.js +73 -0
- package/es/components/color_picker/color_stops/color_stops.js +23 -21
- package/es/components/combo_box/combo_box.a11y.js +112 -0
- package/es/components/combo_box/combo_box_options_list/combo_box_options_list.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/control_bar/control_bar.a11y.js +143 -0
- package/es/components/copy/copy.a11y.js +73 -0
- 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 +251 -0
- 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.a11y.js +83 -0
- package/es/components/date_picker/date_picker.js +2 -2
- package/es/components/date_picker/date_picker_range.js +1 -1
- package/es/components/delay_hide/delay_hide.a11y.js +106 -0
- package/es/components/delay_render/delay_render.a11y.js +106 -0
- package/es/components/drag_and_drop/drag_and_drop.a11y.js +114 -0
- package/es/components/empty_prompt/empty_prompt.a11y.js +63 -0
- package/es/components/empty_prompt/empty_prompt.js +1 -1
- package/es/components/error_boundary/error_boundary.js +45 -27
- package/es/components/expression/expression.styles.js +3 -3
- 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/dual_range.js +237 -189
- package/es/components/form/range/dual_range.styles.js +15 -0
- package/es/components/form/range/range.js +137 -92
- package/es/components/form/range/range.styles.js +98 -0
- package/es/components/form/range/range_draggable.js +23 -24
- package/es/components/form/range/range_draggable.styles.js +52 -0
- package/es/components/form/range/range_highlight.js +62 -29
- package/es/components/form/range/range_highlight.styles.js +34 -0
- package/es/components/form/range/range_input.js +18 -8
- package/es/components/form/range/range_input.styles.js +14 -0
- package/es/components/form/range/range_label.js +11 -6
- package/es/components/form/range/range_label.styles.js +20 -0
- package/es/components/form/range/range_levels.js +101 -93
- package/es/components/form/range/range_levels.styles.js +36 -0
- package/es/components/form/range/range_levels_colors.js +43 -0
- package/es/components/form/range/range_slider.js +28 -25
- package/es/components/form/range/range_slider.styles.js +28 -0
- package/es/components/form/range/range_thumb.js +7 -9
- package/es/components/form/range/range_thumb.styles.js +35 -0
- package/es/components/form/range/range_ticks.js +80 -76
- package/es/components/form/range/range_ticks.styles.js +83 -0
- package/es/components/form/range/range_tooltip.js +41 -45
- package/es/components/form/range/range_tooltip.styles.js +46 -0
- package/es/components/form/range/range_track.js +151 -155
- package/es/components/form/range/range_track.styles.js +19 -0
- package/es/components/form/range/range_wrapper.js +7 -11
- package/es/components/form/range/range_wrapper.styles.js +40 -0
- package/es/components/form/range/types.js +1 -0
- 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/article.js +43 -0
- package/es/components/icon/assets/discuss.js +41 -0
- package/es/components/icon/assets/dotInCircle.js +43 -0
- package/es/components/icon/assets/issue.js +51 -0
- package/es/components/icon/icon.js +1 -1
- package/es/components/icon/icon_map.js +3 -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.styles.js +2 -2
- package/es/components/list_group/list_group_item_extra_action.js +1 -1
- package/es/components/list_group/pinnable_list_group/pinnable_list_group.js +4 -4
- package/es/components/loading/loading_logo.js +1 -1
- package/es/components/loading/loading_spinner.styles.js +8 -4
- package/es/components/markdown_editor/markdown_editor.js +2 -2
- 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/markdown_editor/markdown_format.styles.js +2 -2
- package/es/components/modal/modal.a11y.js +1 -1
- package/es/components/modal/modal_header.styles.js +2 -1
- package/es/components/notification/notification_event.js +2 -2
- package/es/components/notification/notification_event_meta.js +1 -1
- package/es/components/page/page_header/page_header_content.js +1 -1
- package/es/components/page/page_side_bar/page_side_bar.js +3 -0
- package/es/components/page/page_template.js +1 -15
- package/es/components/pagination/pagination.a11y.js +58 -0
- package/es/components/pagination/pagination_button.js +1 -1
- package/es/components/popover/popover_footer.styles.js +2 -2
- package/es/components/popover/popover_title.styles.js +2 -2
- 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/side_nav/side_nav.a11y.js +323 -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/text/text.styles.js +3 -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/token/token.styles.js +4 -2
- package/es/components/tool_tip/icon_tip.js +1 -1
- package/es/components/tool_tip/tool_tip.styles.js +3 -1
- package/es/global_styling/functions/index.js +1 -0
- package/es/global_styling/functions/logical_shorthands.js +179 -0
- package/es/global_styling/functions/logicals.js +61 -5
- package/es/global_styling/functions/logicals.json +12 -1
- package/es/services/theme/hooks.js +14 -17
- package/eui.d.ts +574 -330
- package/i18ntokens.json +20 -20
- package/lib/components/avatar/avatar.js +1 -1
- package/lib/components/badge/badge.js +1 -1
- package/lib/components/badge/badge.styles.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 +14 -6
- package/lib/components/breadcrumbs/breadcrumb.js +2 -1
- package/lib/components/breadcrumbs/breadcrumb.styles.js +2 -2
- package/lib/components/breadcrumbs/breadcrumbs.a11y.js +65 -0
- 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.styles.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.a11y.js +159 -0
- package/lib/components/card/card.js +1 -1
- package/lib/components/code/code.styles.js +3 -1
- package/lib/components/code/code_block_virtualized.js +31 -12
- package/lib/components/collapsible_nav/collapsible_nav_group/collapsible_nav_group.js +1 -1
- package/lib/components/color_picker/color_picker.a11y.js +73 -0
- package/lib/components/color_picker/color_stops/color_stops.js +23 -21
- package/lib/components/combo_box/combo_box.a11y.js +114 -0
- package/lib/components/combo_box/combo_box_options_list/combo_box_options_list.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/control_bar/control_bar.a11y.js +148 -0
- package/lib/components/copy/copy.a11y.js +78 -0
- 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 +255 -0
- 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.a11y.js +89 -0
- package/lib/components/date_picker/date_picker.js +2 -2
- package/lib/components/date_picker/date_picker_range.js +1 -1
- package/lib/components/delay_hide/delay_hide.a11y.js +111 -0
- package/lib/components/delay_render/delay_render.a11y.js +111 -0
- package/lib/components/drag_and_drop/drag_and_drop.a11y.js +122 -0
- package/lib/components/empty_prompt/empty_prompt.a11y.js +72 -0
- package/lib/components/empty_prompt/empty_prompt.js +1 -1
- package/lib/components/error_boundary/error_boundary.js +49 -29
- package/lib/components/expression/expression.styles.js +2 -2
- 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/dual_range.js +245 -192
- package/lib/components/form/range/dual_range.styles.js +26 -0
- package/lib/components/form/range/range.js +143 -95
- package/lib/components/form/range/range.styles.js +135 -0
- package/lib/components/form/range/range_draggable.js +30 -23
- package/lib/components/form/range/range_draggable.styles.js +58 -0
- package/lib/components/form/range/range_highlight.js +72 -29
- package/lib/components/form/range/range_highlight.styles.js +54 -0
- package/lib/components/form/range/range_input.js +27 -8
- package/lib/components/form/range/range_input.styles.js +24 -0
- package/lib/components/form/range/range_label.js +12 -6
- package/lib/components/form/range/range_label.styles.js +32 -0
- package/lib/components/form/range/range_levels.js +106 -95
- package/lib/components/form/range/range_levels.styles.js +52 -0
- package/lib/components/form/range/range_levels_colors.js +60 -0
- package/lib/components/form/range/range_slider.js +31 -24
- package/lib/components/form/range/range_slider.styles.js +44 -0
- package/lib/components/form/range/range_thumb.js +9 -9
- package/lib/components/form/range/range_thumb.styles.js +40 -0
- package/lib/components/form/range/range_ticks.js +88 -78
- package/lib/components/form/range/range_ticks.styles.js +89 -0
- package/lib/components/form/range/range_tooltip.js +53 -49
- package/lib/components/form/range/range_tooltip.styles.js +61 -0
- package/lib/components/form/range/range_track.js +149 -156
- package/lib/components/form/range/range_track.styles.js +30 -0
- package/lib/components/form/range/range_wrapper.js +9 -11
- package/lib/components/form/range/range_wrapper.styles.js +43 -0
- package/lib/components/form/range/types.js +5 -0
- 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/article.js +50 -0
- package/lib/components/icon/assets/discuss.js +48 -0
- package/lib/components/icon/assets/dotInCircle.js +50 -0
- package/lib/components/icon/assets/issue.js +59 -0
- package/lib/components/icon/icon.js +1 -1
- package/lib/components/icon/icon_map.js +3 -0
- package/lib/components/icon/svgs/article.svg +10 -0
- package/lib/components/icon/svgs/discuss.svg +4 -0
- package/lib/components/icon/svgs/dotInCircle.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.styles.js +1 -1
- package/lib/components/list_group/list_group_item_extra_action.js +1 -1
- package/lib/components/list_group/pinnable_list_group/pinnable_list_group.js +4 -4
- package/lib/components/loading/loading_logo.js +1 -1
- package/lib/components/loading/loading_spinner.styles.js +7 -3
- package/lib/components/markdown_editor/markdown_editor.js +2 -2
- 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/markdown_editor/markdown_format.styles.js +1 -1
- package/lib/components/modal/modal.a11y.js +1 -1
- package/lib/components/modal/modal_header.styles.js +3 -1
- package/lib/components/notification/notification_event.js +2 -2
- package/lib/components/notification/notification_event_meta.js +1 -1
- package/lib/components/page/page_header/page_header_content.js +1 -1
- package/lib/components/page/page_side_bar/page_side_bar.js +4 -0
- package/lib/components/page/page_template.js +1 -15
- package/lib/components/pagination/pagination.a11y.js +60 -0
- package/lib/components/popover/popover_footer.styles.js +1 -1
- package/lib/components/popover/popover_title.styles.js +1 -1
- 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/side_nav/side_nav.a11y.js +328 -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/text/text.styles.js +3 -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/token/token.styles.js +3 -1
- package/lib/components/tool_tip/icon_tip.js +1 -1
- package/lib/components/tool_tip/tool_tip.styles.js +3 -1
- package/lib/global_styling/functions/index.js +13 -0
- package/lib/global_styling/functions/logical_shorthands.js +187 -0
- package/lib/global_styling/functions/logicals.js +70 -11
- package/lib/global_styling/functions/logicals.json +12 -1
- package/lib/services/theme/hooks.js +14 -17
- package/optimize/es/components/badge/badge.styles.js +2 -2
- package/optimize/es/components/breadcrumbs/breadcrumb.js +2 -1
- package/optimize/es/components/breadcrumbs/breadcrumb.styles.js +3 -3
- package/optimize/es/components/breadcrumbs/breadcrumbs.a11y.js +58 -0
- package/optimize/es/components/button/button_display/_button_display.styles.js +2 -2
- package/optimize/es/components/card/card.a11y.js +144 -0
- package/optimize/es/components/code/code.styles.js +2 -1
- package/optimize/es/components/code/code_block_virtualized.js +26 -12
- package/optimize/es/components/color_picker/color_picker.a11y.js +63 -0
- package/optimize/es/components/color_picker/color_stops/color_stops.js +23 -21
- package/optimize/es/components/combo_box/combo_box.a11y.js +102 -0
- package/optimize/es/components/combo_box/combo_box_options_list/combo_box_options_list.js +1 -1
- package/optimize/es/components/control_bar/control_bar.a11y.js +133 -0
- package/optimize/es/components/copy/copy.a11y.js +63 -0
- package/optimize/es/components/datagrid/data_grid.a11y.js +234 -0
- package/optimize/es/components/date_picker/date_picker.a11y.js +73 -0
- package/optimize/es/components/delay_hide/delay_hide.a11y.js +96 -0
- package/optimize/es/components/delay_render/delay_render.a11y.js +96 -0
- package/optimize/es/components/drag_and_drop/drag_and_drop.a11y.js +104 -0
- package/optimize/es/components/empty_prompt/empty_prompt.a11y.js +63 -0
- package/optimize/es/components/error_boundary/error_boundary.js +37 -26
- package/optimize/es/components/expression/expression.styles.js +3 -3
- package/optimize/es/components/form/range/dual_range.js +159 -151
- package/optimize/es/components/form/range/dual_range.styles.js +15 -0
- package/optimize/es/components/form/range/range.js +66 -57
- package/optimize/es/components/form/range/range.styles.js +98 -0
- package/optimize/es/components/form/range/range_draggable.js +23 -18
- package/optimize/es/components/form/range/range_draggable.styles.js +52 -0
- package/optimize/es/components/form/range/range_highlight.js +61 -24
- package/optimize/es/components/form/range/range_highlight.styles.js +34 -0
- package/optimize/es/components/form/range/range_input.js +13 -4
- package/optimize/es/components/form/range/range_input.styles.js +14 -0
- package/optimize/es/components/form/range/range_label.js +7 -5
- package/optimize/es/components/form/range/range_label.styles.js +20 -0
- package/optimize/es/components/form/range/range_levels.js +87 -66
- package/optimize/es/components/form/range/range_levels.styles.js +36 -0
- package/optimize/es/components/form/range/range_levels_colors.js +43 -0
- package/optimize/es/components/form/range/range_slider.js +24 -11
- package/optimize/es/components/form/range/range_slider.styles.js +28 -0
- package/optimize/es/components/form/range/range_thumb.js +7 -3
- package/optimize/es/components/form/range/range_thumb.styles.js +35 -0
- package/optimize/es/components/form/range/range_ticks.js +61 -52
- package/optimize/es/components/form/range/range_ticks.styles.js +83 -0
- package/optimize/es/components/form/range/range_tooltip.js +40 -37
- package/optimize/es/components/form/range/range_tooltip.styles.js +46 -0
- package/optimize/es/components/form/range/range_track.js +116 -131
- package/optimize/es/components/form/range/range_track.styles.js +19 -0
- package/optimize/es/components/form/range/range_wrapper.js +7 -4
- package/optimize/es/components/form/range/range_wrapper.styles.js +40 -0
- package/optimize/es/components/form/range/types.js +1 -0
- package/optimize/es/components/icon/assets/article.js +39 -0
- package/optimize/es/components/icon/assets/discuss.js +37 -0
- package/optimize/es/components/icon/assets/dotInCircle.js +39 -0
- package/optimize/es/components/icon/assets/issue.js +47 -0
- package/optimize/es/components/icon/icon_map.js +3 -0
- package/optimize/es/components/list_group/list_group_item.styles.js +2 -2
- package/optimize/es/components/loading/loading_spinner.styles.js +8 -4
- package/optimize/es/components/markdown_editor/markdown_editor.js +1 -1
- package/optimize/es/components/markdown_editor/markdown_format.styles.js +2 -2
- package/optimize/es/components/modal/modal.a11y.js +1 -1
- package/optimize/es/components/modal/modal_header.styles.js +2 -1
- package/optimize/es/components/page/page_side_bar/page_side_bar.js +3 -0
- package/optimize/es/components/pagination/pagination.a11y.js +48 -0
- package/optimize/es/components/popover/popover_footer.styles.js +2 -2
- package/optimize/es/components/popover/popover_title.styles.js +2 -2
- package/optimize/es/components/side_nav/side_nav.a11y.js +313 -0
- package/optimize/es/components/text/text.styles.js +3 -1
- package/optimize/es/components/token/token.styles.js +4 -2
- package/optimize/es/components/tool_tip/tool_tip.styles.js +3 -1
- package/optimize/es/global_styling/functions/index.js +1 -0
- package/optimize/es/global_styling/functions/logical_shorthands.js +169 -0
- package/optimize/es/global_styling/functions/logicals.js +47 -5
- package/optimize/es/global_styling/functions/logicals.json +12 -1
- package/optimize/es/services/theme/hooks.js +14 -17
- package/optimize/lib/components/badge/badge.styles.js +1 -1
- package/optimize/lib/components/breadcrumbs/breadcrumb.js +2 -1
- package/optimize/lib/components/breadcrumbs/breadcrumb.styles.js +2 -2
- package/optimize/lib/components/breadcrumbs/breadcrumbs.a11y.js +65 -0
- package/optimize/lib/components/button/button_display/_button_display.styles.js +1 -1
- package/optimize/lib/components/card/card.a11y.js +159 -0
- package/optimize/lib/components/code/code.styles.js +3 -1
- package/optimize/lib/components/code/code_block_virtualized.js +27 -19
- package/optimize/lib/components/color_picker/color_picker.a11y.js +71 -0
- package/optimize/lib/components/color_picker/color_stops/color_stops.js +23 -21
- package/optimize/lib/components/combo_box/combo_box.a11y.js +114 -0
- package/optimize/lib/components/combo_box/combo_box_options_list/combo_box_options_list.js +1 -1
- package/optimize/lib/components/control_bar/control_bar.a11y.js +148 -0
- package/optimize/lib/components/copy/copy.a11y.js +78 -0
- package/optimize/lib/components/datagrid/data_grid.a11y.js +248 -0
- package/optimize/lib/components/date_picker/date_picker.a11y.js +87 -0
- package/optimize/lib/components/delay_hide/delay_hide.a11y.js +111 -0
- package/optimize/lib/components/delay_render/delay_render.a11y.js +111 -0
- package/optimize/lib/components/drag_and_drop/drag_and_drop.a11y.js +122 -0
- package/optimize/lib/components/empty_prompt/empty_prompt.a11y.js +72 -0
- package/optimize/lib/components/error_boundary/error_boundary.js +41 -28
- package/optimize/lib/components/expression/expression.styles.js +2 -2
- package/optimize/lib/components/form/range/dual_range.js +165 -152
- package/optimize/lib/components/form/range/dual_range.styles.js +26 -0
- package/optimize/lib/components/form/range/range.js +71 -60
- package/optimize/lib/components/form/range/range.styles.js +135 -0
- package/optimize/lib/components/form/range/range_draggable.js +30 -17
- package/optimize/lib/components/form/range/range_draggable.styles.js +58 -0
- package/optimize/lib/components/form/range/range_highlight.js +71 -24
- package/optimize/lib/components/form/range/range_highlight.styles.js +54 -0
- package/optimize/lib/components/form/range/range_input.js +22 -4
- package/optimize/lib/components/form/range/range_input.styles.js +24 -0
- package/optimize/lib/components/form/range/range_label.js +8 -5
- package/optimize/lib/components/form/range/range_label.styles.js +32 -0
- package/optimize/lib/components/form/range/range_levels.js +94 -72
- package/optimize/lib/components/form/range/range_levels.styles.js +52 -0
- package/optimize/lib/components/form/range/range_levels_colors.js +60 -0
- package/optimize/lib/components/form/range/range_slider.js +28 -10
- package/optimize/lib/components/form/range/range_slider.styles.js +44 -0
- package/optimize/lib/components/form/range/range_thumb.js +9 -3
- package/optimize/lib/components/form/range/range_thumb.styles.js +40 -0
- package/optimize/lib/components/form/range/range_ticks.js +73 -57
- package/optimize/lib/components/form/range/range_ticks.styles.js +89 -0
- package/optimize/lib/components/form/range/range_tooltip.js +47 -38
- package/optimize/lib/components/form/range/range_tooltip.styles.js +61 -0
- package/optimize/lib/components/form/range/range_track.js +118 -139
- package/optimize/lib/components/form/range/range_track.styles.js +30 -0
- package/optimize/lib/components/form/range/range_wrapper.js +9 -4
- package/optimize/lib/components/form/range/range_wrapper.styles.js +43 -0
- package/optimize/lib/components/form/range/types.js +5 -0
- package/optimize/lib/components/icon/assets/article.js +49 -0
- package/optimize/lib/components/icon/assets/discuss.js +47 -0
- package/optimize/lib/components/icon/assets/dotInCircle.js +49 -0
- package/optimize/lib/components/icon/assets/issue.js +58 -0
- package/optimize/lib/components/icon/icon_map.js +3 -0
- package/optimize/lib/components/icon/svgs/article.svg +10 -0
- package/optimize/lib/components/icon/svgs/discuss.svg +4 -0
- package/optimize/lib/components/icon/svgs/dotInCircle.svg +4 -0
- package/optimize/lib/components/list_group/list_group_item.styles.js +1 -1
- package/optimize/lib/components/loading/loading_spinner.styles.js +7 -3
- package/optimize/lib/components/markdown_editor/markdown_editor.js +1 -1
- package/optimize/lib/components/markdown_editor/markdown_format.styles.js +1 -1
- package/optimize/lib/components/modal/modal.a11y.js +1 -1
- package/optimize/lib/components/modal/modal_header.styles.js +3 -1
- package/optimize/lib/components/page/page_side_bar/page_side_bar.js +4 -0
- package/optimize/lib/components/pagination/pagination.a11y.js +60 -0
- package/optimize/lib/components/popover/popover_footer.styles.js +1 -1
- package/optimize/lib/components/popover/popover_title.styles.js +1 -1
- package/optimize/lib/components/side_nav/side_nav.a11y.js +328 -0
- package/optimize/lib/components/text/text.styles.js +3 -1
- package/optimize/lib/components/token/token.styles.js +3 -1
- package/optimize/lib/components/tool_tip/tool_tip.styles.js +3 -1
- package/optimize/lib/global_styling/functions/index.js +13 -0
- package/optimize/lib/global_styling/functions/logical_shorthands.js +184 -0
- package/optimize/lib/global_styling/functions/logicals.js +58 -11
- package/optimize/lib/global_styling/functions/logicals.json +12 -1
- package/optimize/lib/services/theme/hooks.js +14 -17
- package/package.json +13 -18
- package/src/components/basic_table/_basic_table.scss +1 -4
- package/src/components/button/button_empty/_button_empty.scss +2 -4
- package/src/components/button/button_group/_button_group.scss +1 -1
- package/src/components/button/button_group/_button_group_button.scss +3 -4
- package/src/components/button/button_icon/_button_icon.scss +0 -3
- package/src/components/collapsible_nav/_collapsible_nav.scss +1 -1
- package/src/components/collapsible_nav/collapsible_nav_group/_collapsible_nav_group.scss +1 -1
- package/src/components/color_picker/_color_picker.scss +3 -2
- package/src/components/color_picker/_hue.scss +7 -7
- package/src/components/color_picker/_saturation.scss +1 -1
- package/src/components/color_picker/color_palette_display/_mixins.scss +1 -1
- package/src/components/color_picker/color_stops/_color_stops.scss +3 -4
- package/src/components/combo_box/_combo_box.scss +7 -6
- package/src/components/combo_box/combo_box_input/_combo_box_input.scss +2 -1
- package/src/components/combo_box/combo_box_input/_combo_box_placeholder.scss +1 -1
- package/src/components/combo_box/combo_box_options_list/_combo_box_options_list.scss +2 -3
- package/src/components/control_bar/_variables.scss +0 -1
- package/src/components/datagrid/_data_grid_data_row.scss +4 -5
- package/src/components/datagrid/_mixins.scss +1 -1
- package/src/components/datagrid/body/_data_grid_footer_row.scss +2 -1
- package/src/components/datagrid/body/header/_data_grid_column_resizer.scss +3 -4
- package/src/components/datagrid/body/header/_data_grid_header_row.scss +1 -1
- package/src/components/datagrid/controls/_data_grid_column_sorting.scss +1 -2
- package/src/components/date_picker/_date_picker_range.scss +1 -1
- package/src/components/date_picker/super_date_picker/_super_date_picker.scss +1 -4
- package/src/components/date_picker/super_date_picker/quick_select_popover/_quick_select_popover.scss +1 -1
- package/src/components/drag_and_drop/_draggable.scss +3 -5
- package/src/components/drag_and_drop/_droppable.scss +1 -1
- package/src/components/empty_prompt/_empty_prompt.scss +1 -1
- package/src/components/filter_group/_filter_group.scss +2 -2
- package/src/components/filter_group/_filter_select_item.scss +0 -1
- package/src/components/form/_index.scss +0 -1
- package/src/components/form/checkbox/_checkbox.scss +5 -3
- package/src/components/form/described_form_group/_described_form_group.scss +0 -1
- package/src/components/form/field_password/_field_password.scss +1 -1
- package/src/components/form/field_search/_field_search.scss +1 -1
- package/src/components/form/file_picker/_file_picker.scss +1 -2
- package/src/components/form/form_control_layout/_form_control_layout.scss +6 -7
- package/src/components/form/form_control_layout/_form_control_layout_delimited.scss +4 -6
- package/src/components/form/form_row/_form_row.scss +3 -0
- package/src/components/form/radio/_radio.scss +5 -3
- package/src/components/form/select/_select.scss +1 -1
- package/src/components/form/switch/_switch.scss +3 -1
- package/src/components/header/_mixins.scss +1 -1
- package/src/components/header/header_section/_header_section_item.scss +4 -4
- package/src/components/header/header_section/_header_section_item_button.scss +0 -1
- package/src/components/key_pad_menu/_key_pad_menu_item.scss +2 -7
- package/src/components/markdown_editor/_markdown_editor_drop_zone.scss +4 -4
- package/src/components/markdown_editor/_markdown_editor_footer.scss +1 -1
- package/src/components/markdown_editor/_markdown_editor_text_area.scss +2 -3
- package/src/components/markdown_editor/_markdown_format.scss +4 -2
- package/src/components/notification/_notification_event.scss +2 -2
- package/src/components/page/page_content/_page_content_body.scss +0 -1
- package/src/components/page/page_content/_page_content_header_section.scss +0 -1
- package/src/components/page/page_side_bar/_page_side_bar.scss +0 -1
- package/src/components/panel/split_panel/_split_panel.scss +2 -2
- package/src/components/resizable_container/_resizable_button.scss +31 -31
- package/src/components/resizable_container/_resizable_collapse_button.scss +9 -9
- package/src/components/selectable/selectable_templates/_selectable_template_sitewide_option.scss +1 -1
- package/src/components/side_nav/_mixins.scss +1 -1
- package/src/components/side_nav/_side_nav.scss +2 -1
- package/src/components/side_nav/_side_nav_item.scss +2 -3
- package/src/components/steps/_steps.scss +2 -1
- package/src/components/suggest/_suggest_input.scss +1 -1
- package/src/components/suggest/_suggest_item.scss +4 -3
- package/src/components/table/_responsive.scss +5 -3
- package/src/components/table/_table.scss +2 -4
- package/src/components/table/mobile/_mobile.scss +0 -2
- package/src/components/tree_view/tree_view.scss +2 -2
- package/src/global_styling/mixins/_form.scss +7 -18
- package/src/global_styling/mixins/_header.scss +2 -2
- package/src/global_styling/mixins/_helpers.scss +1 -2
- package/src/global_styling/mixins/_icons.scss +1 -1
- package/src/global_styling/mixins/_range.scss +39 -6
- package/src/global_styling/mixins/_responsive.scss +3 -8
- package/src/global_styling/mixins/_shadow.scss +5 -9
- package/src/global_styling/mixins/_states.scss +2 -2
- package/src/global_styling/mixins/_typography.scss +16 -19
- package/src/global_styling/variables/_colors_vis.scss +1 -1
- package/src/global_styling/variables/_form.scss +2 -4
- package/src/global_styling/variables/_typography.scss +1 -3
- package/src/themes/amsterdam/_colors_dark.scss +2 -1
- package/src/themes/amsterdam/_colors_light.scss +2 -0
- package/src/themes/amsterdam/global_styling/mixins/_index.scss +1 -1
- package/src/themes/amsterdam/global_styling/mixins/_link.scss +1 -1
- package/src/themes/amsterdam/global_styling/mixins/_states.scss +0 -1
- package/src/themes/amsterdam/global_styling/mixins/_typography.scss +1 -2
- package/src/themes/amsterdam/global_styling/react_date_picker/_date_picker_days.scss +0 -1
- package/src/themes/amsterdam/global_styling/react_date_picker/_date_picker_month_year.scss +0 -1
- package/src/themes/amsterdam/global_styling/react_date_picker/_date_picker_times.scss +3 -4
- package/src/themes/amsterdam/global_styling/react_date_picker/_mixins.scss +0 -1
- package/src/themes/amsterdam/global_styling/variables/_typography.scss +1 -2
- package/src/themes/amsterdam/overrides/_color_stops.scss +5 -6
- package/src/themes/amsterdam/overrides/_combo_box.scss +3 -0
- package/src/themes/amsterdam/overrides/_form_control_layout.scss +3 -0
- package/src/themes/amsterdam/overrides/_form_control_layout_delimited.scss +5 -4
- package/src/themes/amsterdam/overrides/_header.scss +2 -2
- package/src/themes/amsterdam/overrides/_hue.scss +6 -6
- package/src/themes/amsterdam/overrides/_index.scss +0 -9
- package/src/themes/amsterdam/overrides/_key_pad_menu.scss +2 -2
- package/src/themes/amsterdam/overrides/_steps.scss +1 -2
- package/src/themes/legacy/_colors_dark.scss +2 -1
- package/src/themes/legacy/_colors_light.scss +2 -0
- package/src/themes/legacy/reset/_reset.scss +8 -7
- package/test-env/components/avatar/avatar.js +1 -1
- package/test-env/components/badge/badge.js +1 -1
- package/test-env/components/badge/badge.styles.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 +14 -6
- package/test-env/components/breadcrumbs/breadcrumb.js +2 -1
- package/test-env/components/breadcrumbs/breadcrumb.styles.js +2 -2
- package/test-env/components/breadcrumbs/breadcrumbs.a11y.js +65 -0
- 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.styles.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.a11y.js +159 -0
- package/test-env/components/card/card.js +1 -1
- package/test-env/components/code/code.styles.js +3 -1
- package/test-env/components/code/code_block_virtualized.js +27 -19
- package/test-env/components/collapsible_nav/collapsible_nav_group/collapsible_nav_group.js +1 -1
- package/test-env/components/color_picker/color_picker.a11y.js +71 -0
- package/test-env/components/color_picker/color_stops/color_stops.js +23 -21
- package/test-env/components/combo_box/combo_box.a11y.js +114 -0
- package/test-env/components/combo_box/combo_box_options_list/combo_box_options_list.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/control_bar/control_bar.a11y.js +148 -0
- package/test-env/components/copy/copy.a11y.js +78 -0
- 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 +248 -0
- 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.a11y.js +87 -0
- 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/delay_hide/delay_hide.a11y.js +111 -0
- package/test-env/components/delay_render/delay_render.a11y.js +111 -0
- package/test-env/components/drag_and_drop/drag_and_drop.a11y.js +122 -0
- package/test-env/components/empty_prompt/empty_prompt.a11y.js +72 -0
- package/test-env/components/empty_prompt/empty_prompt.js +1 -1
- package/test-env/components/error_boundary/error_boundary.js +48 -28
- package/test-env/components/expression/expression.styles.js +2 -2
- 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/dual_range.js +244 -190
- package/test-env/components/form/range/dual_range.styles.js +26 -0
- package/test-env/components/form/range/range.js +143 -95
- package/test-env/components/form/range/range.styles.js +135 -0
- package/test-env/components/form/range/range_draggable.js +30 -23
- package/test-env/components/form/range/range_draggable.styles.js +58 -0
- package/test-env/components/form/range/range_highlight.js +72 -29
- package/test-env/components/form/range/range_highlight.styles.js +54 -0
- package/test-env/components/form/range/range_input.js +27 -8
- package/test-env/components/form/range/range_input.styles.js +24 -0
- package/test-env/components/form/range/range_label.js +12 -6
- package/test-env/components/form/range/range_label.styles.js +32 -0
- package/test-env/components/form/range/range_levels.js +103 -83
- package/test-env/components/form/range/range_levels.styles.js +52 -0
- package/test-env/components/form/range/range_levels_colors.js +60 -0
- package/test-env/components/form/range/range_slider.js +31 -24
- package/test-env/components/form/range/range_slider.styles.js +44 -0
- package/test-env/components/form/range/range_thumb.js +9 -9
- package/test-env/components/form/range/range_thumb.styles.js +40 -0
- package/test-env/components/form/range/range_ticks.js +88 -78
- package/test-env/components/form/range/range_ticks.styles.js +89 -0
- package/test-env/components/form/range/range_tooltip.js +53 -49
- package/test-env/components/form/range/range_tooltip.styles.js +61 -0
- package/test-env/components/form/range/range_track.js +143 -151
- package/test-env/components/form/range/range_track.styles.js +30 -0
- package/test-env/components/form/range/range_wrapper.js +9 -11
- package/test-env/components/form/range/range_wrapper.styles.js +43 -0
- package/test-env/components/form/range/types.js +5 -0
- 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/article.js +49 -0
- package/test-env/components/icon/assets/discuss.js +47 -0
- package/test-env/components/icon/assets/dotInCircle.js +49 -0
- package/test-env/components/icon/assets/issue.js +58 -0
- package/test-env/components/icon/icon_map.js +3 -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.styles.js +1 -1
- package/test-env/components/list_group/list_group_item_extra_action.js +1 -1
- package/test-env/components/list_group/pinnable_list_group/pinnable_list_group.js +4 -4
- package/test-env/components/loading/loading_logo.js +1 -1
- package/test-env/components/loading/loading_spinner.styles.js +7 -3
- package/test-env/components/markdown_editor/markdown_editor.js +2 -2
- 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/markdown_editor/markdown_format.styles.js +1 -1
- package/test-env/components/modal/modal.a11y.js +1 -1
- package/test-env/components/modal/modal_header.styles.js +3 -1
- package/test-env/components/notification/notification_event.js +2 -2
- package/test-env/components/notification/notification_event_meta.js +1 -1
- package/test-env/components/page/page_header/page_header_content.js +1 -1
- package/test-env/components/page/page_side_bar/page_side_bar.js +4 -0
- package/test-env/components/page/page_template.js +1 -15
- package/test-env/components/pagination/pagination.a11y.js +60 -0
- package/test-env/components/popover/popover_footer.styles.js +1 -1
- package/test-env/components/popover/popover_title.styles.js +1 -1
- 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/side_nav/side_nav.a11y.js +328 -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/text/text.styles.js +3 -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/token/token.styles.js +3 -1
- package/test-env/components/tool_tip/icon_tip.js +1 -1
- package/test-env/components/tool_tip/tool_tip.styles.js +3 -1
- package/test-env/global_styling/functions/index.js +13 -0
- package/test-env/global_styling/functions/logical_shorthands.js +184 -0
- package/test-env/global_styling/functions/logicals.js +58 -11
- package/test-env/global_styling/functions/logicals.json +12 -1
- package/test-env/services/theme/hooks.js +14 -17
- package/scripts/postinstall.js +0 -9
- package/src/components/form/range/_dual_range.scss +0 -7
- package/src/components/form/range/_index.scss +0 -13
- package/src/components/form/range/_range.scss +0 -7
- package/src/components/form/range/_range_draggable.scss +0 -35
- package/src/components/form/range/_range_highlight.scss +0 -25
- package/src/components/form/range/_range_input.scss +0 -10
- package/src/components/form/range/_range_label.scss +0 -18
- package/src/components/form/range/_range_levels.scss +0 -43
- package/src/components/form/range/_range_slider.scss +0 -133
- package/src/components/form/range/_range_thumb.scss +0 -19
- package/src/components/form/range/_range_ticks.scss +0 -88
- package/src/components/form/range/_range_tooltip.scss +0 -97
- package/src/components/form/range/_range_track.scss +0 -15
- package/src/components/form/range/_range_wrapper.scss +0 -20
- package/src/themes/amsterdam/global_styling/mixins/_range.scss +0 -57
- package/src/themes/amsterdam/overrides/_breadcrumbs.scss +0 -0
- package/src/themes/amsterdam/overrides/_range.scss +0 -3
- package/src/themes/amsterdam/overrides/_range_draggable.scss +0 -25
- package/src/themes/amsterdam/overrides/_range_highlight.scss +0 -31
- package/src/themes/amsterdam/overrides/_range_levels.scss +0 -32
- package/src/themes/amsterdam/overrides/_range_slider.scss +0 -54
- package/src/themes/amsterdam/overrides/_range_thumb.scss +0 -22
- package/src/themes/amsterdam/overrides/_range_ticks.scss +0 -42
- package/src/themes/amsterdam/overrides/_range_tooltip.scss +0 -3
- package/src/themes/amsterdam/overrides/_range_track.scss +0 -110
|
@@ -453,25 +453,27 @@ export var EuiColorStops = function EuiColorStops(_ref) {
|
|
|
453
453
|
compressed: compressed,
|
|
454
454
|
disabled: disabled,
|
|
455
455
|
step: 1
|
|
456
|
-
},
|
|
457
|
-
|
|
458
|
-
|
|
459
|
-
|
|
460
|
-
|
|
461
|
-
|
|
462
|
-
|
|
463
|
-
|
|
464
|
-
|
|
465
|
-
|
|
466
|
-
|
|
467
|
-
'euiColorStops__addContainer
|
|
468
|
-
|
|
469
|
-
|
|
470
|
-
|
|
471
|
-
|
|
472
|
-
|
|
473
|
-
|
|
474
|
-
|
|
475
|
-
|
|
476
|
-
|
|
456
|
+
}, function (trackWidth) {
|
|
457
|
+
return ___EmotionJSX(React.Fragment, null, ___EmotionJSX(EuiRangeHighlight, {
|
|
458
|
+
className: "euiColorStops__highlight",
|
|
459
|
+
min: min || rangeMin,
|
|
460
|
+
max: max || rangeMax,
|
|
461
|
+
lowerValue: min || rangeMin,
|
|
462
|
+
upperValue: max || rangeMax,
|
|
463
|
+
background: gradient,
|
|
464
|
+
trackWidth: trackWidth
|
|
465
|
+
}), ___EmotionJSX("div", {
|
|
466
|
+
"data-test-subj": "euiColorStopsAdd",
|
|
467
|
+
className: classNames('euiColorStops__addContainer', {
|
|
468
|
+
'euiColorStops__addContainer-isDisabled': isHoverDisabled || disabled || readOnly
|
|
469
|
+
}),
|
|
470
|
+
onClick: handleAddClick,
|
|
471
|
+
onMouseMove: handleAddHover
|
|
472
|
+
}, ___EmotionJSX("div", {
|
|
473
|
+
className: "euiColorStops__addTarget",
|
|
474
|
+
style: {
|
|
475
|
+
left: "".concat(addTargetPosition, "%")
|
|
476
|
+
}
|
|
477
|
+
})), thumbs);
|
|
478
|
+
}));
|
|
477
479
|
};
|
|
@@ -0,0 +1,102 @@
|
|
|
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 { EuiComboBox } from './index';
|
|
13
|
+
import { jsx as ___EmotionJSX } from "@emotion/react";
|
|
14
|
+
|
|
15
|
+
var ComboBox = function ComboBox() {
|
|
16
|
+
var _useState = useState([{
|
|
17
|
+
label: 'Titan',
|
|
18
|
+
'data-test-subj': 'titanOption'
|
|
19
|
+
}, {
|
|
20
|
+
label: 'Enceladus',
|
|
21
|
+
'data-test-subj': 'enceladusOption'
|
|
22
|
+
}, {
|
|
23
|
+
label: 'Mimas',
|
|
24
|
+
'data-test-subj': 'mimasOption'
|
|
25
|
+
}, {
|
|
26
|
+
label: 'Dione',
|
|
27
|
+
'data-test-subj': 'dioneOption'
|
|
28
|
+
}, {
|
|
29
|
+
label: 'Iapetus',
|
|
30
|
+
'data-test-subj': 'iapetusOption'
|
|
31
|
+
}, {
|
|
32
|
+
label: 'Phoebe',
|
|
33
|
+
'data-test-subj': 'phoebeOption'
|
|
34
|
+
}, {
|
|
35
|
+
label: 'Rhea',
|
|
36
|
+
'data-test-subj': 'rheaOption'
|
|
37
|
+
}, {
|
|
38
|
+
label: 'Tethys',
|
|
39
|
+
'data-test-subj': 'tethysOption'
|
|
40
|
+
}, {
|
|
41
|
+
label: 'Hyperion',
|
|
42
|
+
'data-test-subj': 'hyperionOption'
|
|
43
|
+
}]),
|
|
44
|
+
_useState2 = _slicedToArray(_useState, 1),
|
|
45
|
+
options = _useState2[0];
|
|
46
|
+
|
|
47
|
+
var _useState3 = useState([]),
|
|
48
|
+
_useState4 = _slicedToArray(_useState3, 2),
|
|
49
|
+
selectedOptions = _useState4[0],
|
|
50
|
+
setSelected = _useState4[1];
|
|
51
|
+
|
|
52
|
+
var onChange = function onChange(selectedOptions) {
|
|
53
|
+
setSelected(selectedOptions);
|
|
54
|
+
};
|
|
55
|
+
|
|
56
|
+
return ___EmotionJSX(EuiComboBox, {
|
|
57
|
+
"aria-label": "Accessible screen reader label",
|
|
58
|
+
placeholder: "Select options",
|
|
59
|
+
options: options,
|
|
60
|
+
selectedOptions: selectedOptions,
|
|
61
|
+
onChange: onChange,
|
|
62
|
+
isClearable: true,
|
|
63
|
+
isCaseSensitive: true
|
|
64
|
+
});
|
|
65
|
+
};
|
|
66
|
+
|
|
67
|
+
beforeEach(function () {
|
|
68
|
+
cy.realMount(___EmotionJSX(ComboBox, null));
|
|
69
|
+
cy.get('input[data-test-subj="comboBoxSearchInput"]').should('exist');
|
|
70
|
+
});
|
|
71
|
+
describe('EuiComboBox', function () {
|
|
72
|
+
describe('Automated accessibility check', function () {
|
|
73
|
+
it('has zero violations on render', function () {
|
|
74
|
+
cy.checkAxe();
|
|
75
|
+
});
|
|
76
|
+
it('has zero violations when the combobox is expanded', function () {
|
|
77
|
+
cy.get('input[data-test-subj="comboBoxSearchInput"]').realClick();
|
|
78
|
+
cy.get('button[data-test-subj="titanOption"]').should('exist');
|
|
79
|
+
cy.checkAxe();
|
|
80
|
+
});
|
|
81
|
+
it('has zero violations after keyboard interaction', function () {
|
|
82
|
+
cy.realPress('Tab');
|
|
83
|
+
cy.get('input[data-test-subj="comboBoxSearchInput"]').should('have.focus');
|
|
84
|
+
cy.get('button[data-test-subj="titanOption"]').should('exist');
|
|
85
|
+
cy.repeatRealPress('ArrowDown');
|
|
86
|
+
cy.realPress('Enter');
|
|
87
|
+
cy.repeatRealPress('ArrowDown');
|
|
88
|
+
cy.realPress('Enter');
|
|
89
|
+
cy.repeatRealPress('ArrowDown');
|
|
90
|
+
cy.realPress('Enter');
|
|
91
|
+
cy.get('div[data-test-subj="comboBoxInput"]').find('span.euiBadge').should('have.length', 3);
|
|
92
|
+
cy.checkAxe(); // Close the listbox and interact with the Clear button
|
|
93
|
+
|
|
94
|
+
cy.realPress('Escape');
|
|
95
|
+
cy.realPress('Tab');
|
|
96
|
+
cy.get('button[data-test-subj="comboBoxClearButton"]').should('have.focus');
|
|
97
|
+
cy.realPress('Space');
|
|
98
|
+
cy.get('div[data-test-subj="comboBoxInput"]').find('span.euiBadge').should('have.length', 0);
|
|
99
|
+
cy.checkAxe();
|
|
100
|
+
});
|
|
101
|
+
});
|
|
102
|
+
});
|
|
@@ -35,7 +35,7 @@ import { EuiLoadingSpinner } from '../../loading';
|
|
|
35
35
|
import { EuiComboBoxTitle } from './combo_box_title';
|
|
36
36
|
import { EuiI18n } from '../../i18n';
|
|
37
37
|
import { EuiFilterSelectItem } from '../../filter_group/filter_select_item';
|
|
38
|
-
import { EuiBadge } from '../../badge
|
|
38
|
+
import { EuiBadge } from '../../badge';
|
|
39
39
|
import { EuiPopoverPanel } from '../../popover/popover_panel';
|
|
40
40
|
import { jsx as ___EmotionJSX } from "@emotion/react";
|
|
41
41
|
var OPTION_CONTENT_CLASSNAME = 'euiComboBoxOption__content';
|
|
@@ -0,0 +1,133 @@
|
|
|
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 { EuiButton } from '../button';
|
|
13
|
+
import { EuiControlBar } from './control_bar';
|
|
14
|
+
import { EuiPanel } from '../panel';
|
|
15
|
+
import { EuiText } from '../text';
|
|
16
|
+
import { jsx as ___EmotionJSX } from "@emotion/react";
|
|
17
|
+
|
|
18
|
+
var ControlBar = function ControlBar() {
|
|
19
|
+
var _useState = useState(false),
|
|
20
|
+
_useState2 = _slicedToArray(_useState, 2),
|
|
21
|
+
contentIsVisible = _useState2[0],
|
|
22
|
+
setVisibility = _useState2[1];
|
|
23
|
+
|
|
24
|
+
var _useState3 = useState(false),
|
|
25
|
+
_useState4 = _slicedToArray(_useState3, 2),
|
|
26
|
+
isDisplaying = _useState4[0],
|
|
27
|
+
setDisplay = _useState4[1];
|
|
28
|
+
|
|
29
|
+
var toggleContent = function toggleContent() {
|
|
30
|
+
setVisibility(!contentIsVisible);
|
|
31
|
+
};
|
|
32
|
+
|
|
33
|
+
var toggleDisplay = function toggleDisplay() {
|
|
34
|
+
setDisplay(!isDisplaying);
|
|
35
|
+
setVisibility(false);
|
|
36
|
+
};
|
|
37
|
+
|
|
38
|
+
var codeControls = [{
|
|
39
|
+
controlType: 'icon',
|
|
40
|
+
id: 'root_icon',
|
|
41
|
+
iconType: 'submodule',
|
|
42
|
+
'aria-label': 'Project Root'
|
|
43
|
+
}, {
|
|
44
|
+
controlType: 'breadcrumbs',
|
|
45
|
+
id: 'current_file_path',
|
|
46
|
+
breadcrumbs: [{
|
|
47
|
+
text: 'src'
|
|
48
|
+
}, {
|
|
49
|
+
text: 'components'
|
|
50
|
+
}]
|
|
51
|
+
}, {
|
|
52
|
+
controlType: 'spacer'
|
|
53
|
+
}, {
|
|
54
|
+
controlType: 'icon',
|
|
55
|
+
id: 'status_icon',
|
|
56
|
+
iconType: 'alert',
|
|
57
|
+
color: 'warning',
|
|
58
|
+
'aria-label': 'Repo Status'
|
|
59
|
+
}, {
|
|
60
|
+
controlType: 'divider'
|
|
61
|
+
}, {
|
|
62
|
+
controlType: 'icon',
|
|
63
|
+
id: 'branch_icon',
|
|
64
|
+
iconType: 'branch',
|
|
65
|
+
'aria-label': 'Branch Icon'
|
|
66
|
+
}, {
|
|
67
|
+
controlType: 'text',
|
|
68
|
+
id: 'branch_name',
|
|
69
|
+
text: 'some_long_branch'
|
|
70
|
+
}, {
|
|
71
|
+
controlType: 'divider'
|
|
72
|
+
}, {
|
|
73
|
+
controlType: 'icon',
|
|
74
|
+
id: 'github_icon',
|
|
75
|
+
iconType: 'logoGithub',
|
|
76
|
+
onClick: function onClick() {},
|
|
77
|
+
title: 'Open in Github',
|
|
78
|
+
'aria-label': 'Open in Github'
|
|
79
|
+
}, {
|
|
80
|
+
controlType: 'divider'
|
|
81
|
+
}, {
|
|
82
|
+
controlType: 'button',
|
|
83
|
+
id: 'open_history_view',
|
|
84
|
+
label: contentIsVisible ? 'Hide history' : 'Show history',
|
|
85
|
+
color: 'primary',
|
|
86
|
+
onClick: toggleContent
|
|
87
|
+
}];
|
|
88
|
+
var display;
|
|
89
|
+
|
|
90
|
+
if (isDisplaying) {
|
|
91
|
+
display = ___EmotionJSX(EuiControlBar, {
|
|
92
|
+
controls: codeControls,
|
|
93
|
+
showContent: contentIsVisible
|
|
94
|
+
}, ___EmotionJSX("div", {
|
|
95
|
+
style: {
|
|
96
|
+
padding: '2rem',
|
|
97
|
+
maxWidth: '60rem',
|
|
98
|
+
margin: '0 auto'
|
|
99
|
+
}
|
|
100
|
+
}, ___EmotionJSX(EuiPanel, null, ___EmotionJSX(EuiText, null, ___EmotionJSX("h1", null, "1984"), ___EmotionJSX("h3", null, "By: George Orwell"), ___EmotionJSX("p", null, "It was a bright cold day in April, and the clocks were striking thirteen. Winston Smith, his chin nuzzled into his breast in an effort to escape the vile wind, slipped quickly through the glass doors of Victory Mansions, though not quickly enough to prevent a swirl of gritty dust from entering along with him."), ___EmotionJSX("p", null, "The hallway smelt of boiled cabbage and old rag mats. At one end of it a coloured poster, too large for indoor display, had been tacked to the wall. It depicted simply an enormous face, more than a metre wide: the face of a man of about forty-five, with a heavy black moustache and ruggedly handsome features. Winston made for the stairs. It was no use trying the lift. Even at the best of times it was seldom working, and at present the electric current was cut off during daylight hours. It was part of the economy drive in preparation for Hate Week. The flat was seven flights up, and Winston, who was thirty-nine and had a varicose ulcer above his right ankle, went slowly, resting several times on the way. On each landing, opposite the lift-shaft, the poster with the enormous face gazed from the wall. It was one of those pictures which are so contrived that the eyes follow you about when you move. BIG BROTHER IS WATCHING YOU, the caption beneath it ran."), ___EmotionJSX("p", null, "Inside the flat a fruity voice was reading out a list of figures which had something to do with the production of pig-iron. The voice came from an oblong metal plaque like a dulled mirror which formed part of the surface of the right-hand wall. Winston turned a switch and the voice sank somewhat, though the words were still distinguishable. The instrument (the telescreen, it was called) could be dimmed, but there was no way of shutting it off completely. He moved over to the window: a smallish, frail figure, the meagreness of his body merely emphasized by the blue overalls which were the uniform of the party. His hair was very fair, his face naturally sanguine, his skin roughened by coarse soap and blunt razor blades and the cold of the winter that had just ended.")))));
|
|
101
|
+
}
|
|
102
|
+
|
|
103
|
+
return ___EmotionJSX("div", null, ___EmotionJSX(EuiButton, {
|
|
104
|
+
onClick: toggleDisplay
|
|
105
|
+
}, "Toggle example"), display);
|
|
106
|
+
};
|
|
107
|
+
|
|
108
|
+
beforeEach(function () {
|
|
109
|
+
cy.viewport(1024, 768);
|
|
110
|
+
cy.mount(___EmotionJSX(ControlBar, null));
|
|
111
|
+
cy.get('section[aria-label="Page level controls"]').should('not.exist');
|
|
112
|
+
});
|
|
113
|
+
describe('EuiControlBar', function () {
|
|
114
|
+
describe('Automated accessibility check', function () {
|
|
115
|
+
it('has zero violations on render', function () {
|
|
116
|
+
cy.checkAxe();
|
|
117
|
+
});
|
|
118
|
+
it('has zero violations when control bar is shown', function () {
|
|
119
|
+
cy.get('button.euiButton').contains('Toggle example').realClick();
|
|
120
|
+
cy.get('section[aria-label="Page level controls"]').should('exist');
|
|
121
|
+
cy.checkAxe({
|
|
122
|
+
context: 'section[aria-label="Page level controls"]'
|
|
123
|
+
});
|
|
124
|
+
});
|
|
125
|
+
it('has zero violations when control bar is hidden', function () {
|
|
126
|
+
cy.get('button.euiButton').contains('Toggle example').realClick();
|
|
127
|
+
cy.get('section[aria-label="Page level controls"]').should('exist');
|
|
128
|
+
cy.get('button.euiButton').contains('Toggle example').realClick();
|
|
129
|
+
cy.get('section[aria-label="Page level controls"]').should('not.exist');
|
|
130
|
+
cy.checkAxe();
|
|
131
|
+
});
|
|
132
|
+
});
|
|
133
|
+
});
|
|
@@ -0,0 +1,63 @@
|
|
|
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 { EuiButton } from '../button';
|
|
13
|
+
import { EuiCopy } from './copy';
|
|
14
|
+
import { EuiFormRow, EuiFieldText } from '../form';
|
|
15
|
+
import { EuiSpacer } from '../spacer';
|
|
16
|
+
import { jsx as ___EmotionJSX } from "@emotion/react";
|
|
17
|
+
|
|
18
|
+
var Copy = function Copy() {
|
|
19
|
+
var _useState = useState('I am the text that will be copied'),
|
|
20
|
+
_useState2 = _slicedToArray(_useState, 2),
|
|
21
|
+
copyText = _useState2[0],
|
|
22
|
+
setCopyText = _useState2[1];
|
|
23
|
+
|
|
24
|
+
var onChange = function onChange(e) {
|
|
25
|
+
setCopyText(e.target.value);
|
|
26
|
+
};
|
|
27
|
+
|
|
28
|
+
return ___EmotionJSX("div", null, ___EmotionJSX(EuiFormRow, {
|
|
29
|
+
label: "Enter text that will be copied to clipboard"
|
|
30
|
+
}, ___EmotionJSX(EuiFieldText, {
|
|
31
|
+
value: copyText,
|
|
32
|
+
onChange: onChange
|
|
33
|
+
})), ___EmotionJSX(EuiSpacer, {
|
|
34
|
+
size: "m"
|
|
35
|
+
}), ___EmotionJSX(EuiCopy, {
|
|
36
|
+
textToCopy: copyText
|
|
37
|
+
}, function (copy) {
|
|
38
|
+
return ___EmotionJSX(EuiButton, {
|
|
39
|
+
onClick: copy,
|
|
40
|
+
"data-test-subj": "cy-copy-button"
|
|
41
|
+
}, "Click to copy input text");
|
|
42
|
+
}));
|
|
43
|
+
};
|
|
44
|
+
|
|
45
|
+
beforeEach(function () {
|
|
46
|
+
cy.realMount(___EmotionJSX(Copy, null));
|
|
47
|
+
});
|
|
48
|
+
describe('EuiCopy', function () {
|
|
49
|
+
describe('Automated accessibility check', function () {
|
|
50
|
+
it('has zero violations on render', function () {
|
|
51
|
+
cy.checkAxe();
|
|
52
|
+
});
|
|
53
|
+
it('has zero violations after the copy button is clicked', function () {
|
|
54
|
+
cy.get('button[data-test-subj="cy-copy-button"]').realClick();
|
|
55
|
+
cy.checkAxe();
|
|
56
|
+
});
|
|
57
|
+
it('has zero violations after keyboard interaction', function () {
|
|
58
|
+
cy.repeatRealPress('Tab');
|
|
59
|
+
cy.realPress('Enter');
|
|
60
|
+
cy.checkAxe();
|
|
61
|
+
});
|
|
62
|
+
});
|
|
63
|
+
});
|
|
@@ -0,0 +1,234 @@
|
|
|
1
|
+
import _toConsumableArray from "@babel/runtime/helpers/toConsumableArray";
|
|
2
|
+
import _slicedToArray from "@babel/runtime/helpers/slicedToArray";
|
|
3
|
+
|
|
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
|
+
/// <reference types="../../../cypress/support"/>
|
|
12
|
+
import React, { useState } from 'react';
|
|
13
|
+
import { EuiDataGrid } from './index';
|
|
14
|
+
import { faker } from '@faker-js/faker';
|
|
15
|
+
import { jsx as ___EmotionJSX } from "@emotion/react";
|
|
16
|
+
var columns = [{
|
|
17
|
+
id: 'Name'
|
|
18
|
+
}, {
|
|
19
|
+
id: 'Email',
|
|
20
|
+
cellActions: [function (_ref) {
|
|
21
|
+
var rowIndex = _ref.rowIndex,
|
|
22
|
+
columnId = _ref.columnId,
|
|
23
|
+
Component = _ref.Component;
|
|
24
|
+
var row = ++rowIndex;
|
|
25
|
+
return ___EmotionJSX(Component, {
|
|
26
|
+
onClick: function onClick() {},
|
|
27
|
+
iconType: "heart",
|
|
28
|
+
"aria-label": "Send love to ".concat(row, ", column \"").concat(columnId, "\" ")
|
|
29
|
+
}, "Send love");
|
|
30
|
+
}]
|
|
31
|
+
}, {
|
|
32
|
+
id: 'User ID',
|
|
33
|
+
schema: 'string'
|
|
34
|
+
}, {
|
|
35
|
+
id: 'Account balance'
|
|
36
|
+
}, {
|
|
37
|
+
id: 'Last purchase',
|
|
38
|
+
schema: 'datetime'
|
|
39
|
+
}, {
|
|
40
|
+
id: 'Favorite distro',
|
|
41
|
+
schema: 'favoriteDistro'
|
|
42
|
+
}];
|
|
43
|
+
var storeData = [];
|
|
44
|
+
|
|
45
|
+
for (var i = 1; i < 11; i++) {
|
|
46
|
+
storeData.push({
|
|
47
|
+
Name: "".concat(faker.name.lastName(), ", ").concat(faker.name.firstName(), " ").concat(faker.name.suffix()),
|
|
48
|
+
Email: "".concat(faker.internet.email()),
|
|
49
|
+
'User ID': "".concat(faker.datatype.number({
|
|
50
|
+
min: 1000000,
|
|
51
|
+
max: 9999999
|
|
52
|
+
})),
|
|
53
|
+
'Account balance': faker.finance.amount(),
|
|
54
|
+
'Last purchase': "".concat(faker.date.past()),
|
|
55
|
+
'Favorite distro': i % 2 === 0 ? 'Alma' : 'Debian'
|
|
56
|
+
});
|
|
57
|
+
}
|
|
58
|
+
|
|
59
|
+
var commaSeparateNumbers = function commaSeparateNumbers(numberString) {
|
|
60
|
+
// extract the groups-of-three digits that are right-aligned
|
|
61
|
+
return numberString.replace(/((\d{3})+)$/, function (match) {
|
|
62
|
+
return (// then replace each group of xyz digits with ,xyz
|
|
63
|
+
match.replace(/(\d{3})/g, ',$1')
|
|
64
|
+
);
|
|
65
|
+
});
|
|
66
|
+
};
|
|
67
|
+
|
|
68
|
+
var DataGrid = function DataGrid() {
|
|
69
|
+
var _useState = useState(columns.map(function (_ref2) {
|
|
70
|
+
var id = _ref2.id;
|
|
71
|
+
return id;
|
|
72
|
+
})),
|
|
73
|
+
_useState2 = _slicedToArray(_useState, 2),
|
|
74
|
+
visibleColumns = _useState2[0],
|
|
75
|
+
setVisibleColumns = _useState2[1];
|
|
76
|
+
|
|
77
|
+
var _useState3 = useState(storeData),
|
|
78
|
+
_useState4 = _slicedToArray(_useState3, 2),
|
|
79
|
+
data = _useState4[0],
|
|
80
|
+
setData = _useState4[1];
|
|
81
|
+
|
|
82
|
+
var _useState5 = useState([{
|
|
83
|
+
id: 'custom',
|
|
84
|
+
direction: 'asc'
|
|
85
|
+
}]),
|
|
86
|
+
_useState6 = _slicedToArray(_useState5, 2),
|
|
87
|
+
sortingColumns = _useState6[0],
|
|
88
|
+
setSortingColumns = _useState6[1];
|
|
89
|
+
|
|
90
|
+
var setSorting = function setSorting(sortingColumns) {
|
|
91
|
+
var sortedData = _toConsumableArray(data).sort(function (a, b) {
|
|
92
|
+
for (var _i = 0; _i < sortingColumns.length; _i++) {
|
|
93
|
+
var column = sortingColumns[_i];
|
|
94
|
+
var aValue = a[column.id];
|
|
95
|
+
var bValue = b[column.id];
|
|
96
|
+
if (aValue < bValue) return column.direction === 'asc' ? -1 : 1;
|
|
97
|
+
if (aValue > bValue) return column.direction === 'asc' ? 1 : -1;
|
|
98
|
+
}
|
|
99
|
+
|
|
100
|
+
return 0;
|
|
101
|
+
});
|
|
102
|
+
|
|
103
|
+
setData(sortedData);
|
|
104
|
+
setSortingColumns(sortingColumns);
|
|
105
|
+
};
|
|
106
|
+
|
|
107
|
+
return ___EmotionJSX(EuiDataGrid, {
|
|
108
|
+
"aria-label": "Data grid schema example",
|
|
109
|
+
columns: columns,
|
|
110
|
+
columnVisibility: {
|
|
111
|
+
visibleColumns: visibleColumns,
|
|
112
|
+
setVisibleColumns: setVisibleColumns
|
|
113
|
+
},
|
|
114
|
+
rowCount: data.length,
|
|
115
|
+
inMemory: {
|
|
116
|
+
level: 'sorting'
|
|
117
|
+
},
|
|
118
|
+
renderCellValue: function renderCellValue(_ref3) {
|
|
119
|
+
var rowIndex = _ref3.rowIndex,
|
|
120
|
+
columnId = _ref3.columnId,
|
|
121
|
+
schema = _ref3.schema;
|
|
122
|
+
var value = data[rowIndex][columnId];
|
|
123
|
+
|
|
124
|
+
if (schema === 'numeric') {
|
|
125
|
+
value = commaSeparateNumbers(value);
|
|
126
|
+
}
|
|
127
|
+
|
|
128
|
+
return value;
|
|
129
|
+
},
|
|
130
|
+
sorting: {
|
|
131
|
+
columns: sortingColumns,
|
|
132
|
+
onSort: setSorting
|
|
133
|
+
},
|
|
134
|
+
schemaDetectors: [{
|
|
135
|
+
type: 'favoriteDistro',
|
|
136
|
+
textTransform: 'capitalize',
|
|
137
|
+
detector: function detector(value) {
|
|
138
|
+
return value.toLowerCase() === 'alma' || value.toLowerCase() === 'debian' ? 1 : 0;
|
|
139
|
+
},
|
|
140
|
+
comparator: function comparator(a, b, direction) {
|
|
141
|
+
var aValue = a.toLowerCase() === 'alma';
|
|
142
|
+
var bValue = b.toLowerCase() === 'alma';
|
|
143
|
+
if (aValue < bValue) return direction === 'asc' ? 1 : -1;
|
|
144
|
+
if (aValue > bValue) return direction === 'asc' ? -1 : 1;
|
|
145
|
+
return 0;
|
|
146
|
+
},
|
|
147
|
+
sortTextAsc: 'Alma to Debian',
|
|
148
|
+
sortTextDesc: 'Debian to Alma',
|
|
149
|
+
icon: 'starFilled',
|
|
150
|
+
color: '#800080'
|
|
151
|
+
}]
|
|
152
|
+
});
|
|
153
|
+
};
|
|
154
|
+
|
|
155
|
+
beforeEach(function () {
|
|
156
|
+
cy.viewport(1280, 800); // large breakpoint
|
|
157
|
+
|
|
158
|
+
cy.mount(___EmotionJSX("div", {
|
|
159
|
+
style: {
|
|
160
|
+
width: '80%',
|
|
161
|
+
margin: '0 auto'
|
|
162
|
+
}
|
|
163
|
+
}, ___EmotionJSX(DataGrid, null)));
|
|
164
|
+
});
|
|
165
|
+
describe('EuiDataGrid', function () {
|
|
166
|
+
describe('Automated accessibility check', function () {
|
|
167
|
+
it('has zero violations on first render', function () {
|
|
168
|
+
cy.checkAxe();
|
|
169
|
+
});
|
|
170
|
+
it('has zero violations when the columns reorder menu is open', function () {
|
|
171
|
+
cy.get('button[data-test-subj="dataGridColumnSelectorButton"]').realClick();
|
|
172
|
+
cy.checkAxe();
|
|
173
|
+
});
|
|
174
|
+
it('has zero violations when the hide all columns button is clicked', function () {
|
|
175
|
+
cy.get('button[data-test-subj="dataGridColumnSelectorButton"]').realClick();
|
|
176
|
+
cy.get('button[data-test-subj="dataGridColumnSelectorHideAllButton"]').realClick(); // TODO: Log this issue and remove the skipFailures boolean when fixed
|
|
177
|
+
|
|
178
|
+
cy.checkAxe({
|
|
179
|
+
skipFailures: true
|
|
180
|
+
});
|
|
181
|
+
});
|
|
182
|
+
it('has zero violations when the columns reorder searchbox returns multiple results', function () {
|
|
183
|
+
cy.get('button[data-test-subj="dataGridColumnSelectorButton"]').realClick();
|
|
184
|
+
cy.get('input[data-test-subj="dataGridColumnSelectorSearch"]').type('a');
|
|
185
|
+
cy.get('div.euiSwitch--compressed').should(function ($s) {
|
|
186
|
+
expect($s).to.have.length(5);
|
|
187
|
+
});
|
|
188
|
+
cy.checkAxe();
|
|
189
|
+
});
|
|
190
|
+
it('has zero violations when the columns reorder searchbox returns 1 result', function () {
|
|
191
|
+
cy.get('button[data-test-subj="dataGridColumnSelectorButton"]').realClick();
|
|
192
|
+
cy.get('input[data-test-subj="dataGridColumnSelectorSearch"]').type('favorite');
|
|
193
|
+
cy.get('div.euiSwitch--compressed').should(function ($s) {
|
|
194
|
+
expect($s).to.have.length(1);
|
|
195
|
+
});
|
|
196
|
+
cy.checkAxe();
|
|
197
|
+
});
|
|
198
|
+
it('has zero violations when the columns reorder searchbox returns 0 results', function () {
|
|
199
|
+
cy.get('button[data-test-subj="dataGridColumnSelectorButton"]').realClick();
|
|
200
|
+
cy.get('input[data-test-subj="dataGridColumnSelectorSearch"]').type('x');
|
|
201
|
+
cy.get('div.euiSwitch--compressed').should(function ($s) {
|
|
202
|
+
expect($s).to.have.length(0);
|
|
203
|
+
});
|
|
204
|
+
cy.checkAxe();
|
|
205
|
+
});
|
|
206
|
+
it('has zero violations when the keyboard shortcut menu is open', function () {
|
|
207
|
+
cy.get('button[data-test-subj="dataGridKeyboardShortcutsButton"]').realClick();
|
|
208
|
+
cy.checkAxe();
|
|
209
|
+
});
|
|
210
|
+
it('has zero violations when the grid display menu is open', function () {
|
|
211
|
+
cy.get('button[data-test-subj="dataGridDisplaySelectorButton"]').realClick();
|
|
212
|
+
cy.checkAxe();
|
|
213
|
+
});
|
|
214
|
+
it('has zero violations when the column actions menu is open', function () {
|
|
215
|
+
cy.get('button.euiDataGridHeaderCell__button').first().realClick();
|
|
216
|
+
cy.checkAxe();
|
|
217
|
+
});
|
|
218
|
+
it('has zero violations when a cell expansion popover is open', function () {
|
|
219
|
+
cy.get('div[data-gridcell-visible-row-index="0"][data-gridcell-column-index="1"]').realClick();
|
|
220
|
+
cy.get('div[data-gridcell-visible-row-index="0"][data-gridcell-column-index="1"]').find('button.euiButtonIcon').last().realClick();
|
|
221
|
+
cy.checkAxe();
|
|
222
|
+
});
|
|
223
|
+
it('has zero violations when the Favorite Distro column has been sorted', function () {
|
|
224
|
+
cy.get('button.euiDataGridHeaderCell__button').last().realClick();
|
|
225
|
+
cy.get('button.euiListGroupItem__button').contains('Sort Alma to Debian').should('exist').realClick();
|
|
226
|
+
cy.checkAxe();
|
|
227
|
+
});
|
|
228
|
+
it('has zero violations when fullscreen is open', function () {
|
|
229
|
+
cy.get('button[data-test-subj="dataGridFullScreenButton"]').realClick();
|
|
230
|
+
cy.get('div.euiDataGrid--fullScreen').should('exist');
|
|
231
|
+
cy.checkAxe();
|
|
232
|
+
});
|
|
233
|
+
});
|
|
234
|
+
});
|
|
@@ -0,0 +1,73 @@
|
|
|
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 moment from 'moment';
|
|
13
|
+
import { EuiDatePicker } from './date_picker';
|
|
14
|
+
import { EuiFormRow } from '../form';
|
|
15
|
+
import { jsx as ___EmotionJSX } from "@emotion/react";
|
|
16
|
+
|
|
17
|
+
var DatePicker = function DatePicker() {
|
|
18
|
+
var _useState = useState(moment()),
|
|
19
|
+
_useState2 = _slicedToArray(_useState, 2),
|
|
20
|
+
startDate = _useState2[0],
|
|
21
|
+
setStartDate = _useState2[1];
|
|
22
|
+
|
|
23
|
+
var handleChange = function handleChange(date) {
|
|
24
|
+
setStartDate(date);
|
|
25
|
+
};
|
|
26
|
+
|
|
27
|
+
return ___EmotionJSX(EuiFormRow, {
|
|
28
|
+
label: "Select a date"
|
|
29
|
+
}, ___EmotionJSX(EuiDatePicker, {
|
|
30
|
+
selected: startDate,
|
|
31
|
+
onChange: handleChange
|
|
32
|
+
}));
|
|
33
|
+
};
|
|
34
|
+
|
|
35
|
+
beforeEach(function () {
|
|
36
|
+
cy.realMount(___EmotionJSX(DatePicker, null));
|
|
37
|
+
cy.get('input.euiDatePicker').should('exist');
|
|
38
|
+
});
|
|
39
|
+
describe('EuiDatePicker', function () {
|
|
40
|
+
describe('Automated accessibility check', function () {
|
|
41
|
+
it('has zero violations on first render', function () {
|
|
42
|
+
cy.checkAxe();
|
|
43
|
+
});
|
|
44
|
+
it('has zero violations when the calendar widget is expanded', function () {
|
|
45
|
+
cy.get('input.euiDatePicker').realClick();
|
|
46
|
+
cy.get('div.react-datepicker').should('exist');
|
|
47
|
+
cy.checkAxe();
|
|
48
|
+
});
|
|
49
|
+
it('has zero violations after picking a date with arrow keys', function () {
|
|
50
|
+
cy.realPress('Tab');
|
|
51
|
+
cy.get('div.react-datepicker').should('exist');
|
|
52
|
+
cy.repeatRealPress('ArrowDown');
|
|
53
|
+
cy.realPress('ArrowRight');
|
|
54
|
+
cy.realPress('Enter');
|
|
55
|
+
cy.get('div.react-datepicker').should('not.exist');
|
|
56
|
+
cy.checkAxe();
|
|
57
|
+
});
|
|
58
|
+
it('has zero violations after picking a date with dropdown menus', function () {
|
|
59
|
+
cy.realPress('Tab');
|
|
60
|
+
cy.get('div.react-datepicker').should('exist');
|
|
61
|
+
cy.repeatRealPress('Tab', 4);
|
|
62
|
+
cy.get('div.react-datepicker__month-read-view').should('have.focus');
|
|
63
|
+
cy.realPress('Space');
|
|
64
|
+
cy.repeatRealPress('ArrowDown');
|
|
65
|
+
cy.realPress('Enter');
|
|
66
|
+
cy.realPress('Tab');
|
|
67
|
+
cy.realPress('Space');
|
|
68
|
+
cy.repeatRealPress('ArrowDown');
|
|
69
|
+
cy.realPress('Enter');
|
|
70
|
+
cy.checkAxe();
|
|
71
|
+
});
|
|
72
|
+
});
|
|
73
|
+
});
|