@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
|
@@ -0,0 +1,114 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefault");
|
|
4
|
+
|
|
5
|
+
var _typeof = require("@babel/runtime/helpers/typeof");
|
|
6
|
+
|
|
7
|
+
var _slicedToArray2 = _interopRequireDefault(require("@babel/runtime/helpers/slicedToArray"));
|
|
8
|
+
|
|
9
|
+
var _react = _interopRequireWildcard(require("react"));
|
|
10
|
+
|
|
11
|
+
var _index = require("./index");
|
|
12
|
+
|
|
13
|
+
var _react2 = require("@emotion/react");
|
|
14
|
+
|
|
15
|
+
function _getRequireWildcardCache(nodeInterop) { if (typeof WeakMap !== "function") return null; var cacheBabelInterop = new WeakMap(); var cacheNodeInterop = new WeakMap(); return (_getRequireWildcardCache = function _getRequireWildcardCache(nodeInterop) { return nodeInterop ? cacheNodeInterop : cacheBabelInterop; })(nodeInterop); }
|
|
16
|
+
|
|
17
|
+
function _interopRequireWildcard(obj, nodeInterop) { if (!nodeInterop && obj && obj.__esModule) { return obj; } if (obj === null || _typeof(obj) !== "object" && typeof obj !== "function") { return { default: obj }; } var cache = _getRequireWildcardCache(nodeInterop); if (cache && cache.has(obj)) { return cache.get(obj); } var newObj = {}; var hasPropertyDescriptor = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var key in obj) { if (key !== "default" && Object.prototype.hasOwnProperty.call(obj, key)) { var desc = hasPropertyDescriptor ? Object.getOwnPropertyDescriptor(obj, key) : null; if (desc && (desc.get || desc.set)) { Object.defineProperty(newObj, key, desc); } else { newObj[key] = obj[key]; } } } newObj.default = obj; if (cache) { cache.set(obj, newObj); } return newObj; }
|
|
18
|
+
|
|
19
|
+
/*
|
|
20
|
+
* Copyright Elasticsearch B.V. and/or licensed to Elasticsearch B.V. under one
|
|
21
|
+
* or more contributor license agreements. Licensed under the Elastic License
|
|
22
|
+
* 2.0 and the Server Side Public License, v 1; you may not use this file except
|
|
23
|
+
* in compliance with, at your election, the Elastic License 2.0 or the Server
|
|
24
|
+
* Side Public License, v 1.
|
|
25
|
+
*/
|
|
26
|
+
/// <reference types="../../../cypress/support"/>
|
|
27
|
+
var ComboBox = function ComboBox() {
|
|
28
|
+
var _useState = (0, _react.useState)([{
|
|
29
|
+
label: 'Titan',
|
|
30
|
+
'data-test-subj': 'titanOption'
|
|
31
|
+
}, {
|
|
32
|
+
label: 'Enceladus',
|
|
33
|
+
'data-test-subj': 'enceladusOption'
|
|
34
|
+
}, {
|
|
35
|
+
label: 'Mimas',
|
|
36
|
+
'data-test-subj': 'mimasOption'
|
|
37
|
+
}, {
|
|
38
|
+
label: 'Dione',
|
|
39
|
+
'data-test-subj': 'dioneOption'
|
|
40
|
+
}, {
|
|
41
|
+
label: 'Iapetus',
|
|
42
|
+
'data-test-subj': 'iapetusOption'
|
|
43
|
+
}, {
|
|
44
|
+
label: 'Phoebe',
|
|
45
|
+
'data-test-subj': 'phoebeOption'
|
|
46
|
+
}, {
|
|
47
|
+
label: 'Rhea',
|
|
48
|
+
'data-test-subj': 'rheaOption'
|
|
49
|
+
}, {
|
|
50
|
+
label: 'Tethys',
|
|
51
|
+
'data-test-subj': 'tethysOption'
|
|
52
|
+
}, {
|
|
53
|
+
label: 'Hyperion',
|
|
54
|
+
'data-test-subj': 'hyperionOption'
|
|
55
|
+
}]),
|
|
56
|
+
_useState2 = (0, _slicedToArray2.default)(_useState, 1),
|
|
57
|
+
options = _useState2[0];
|
|
58
|
+
|
|
59
|
+
var _useState3 = (0, _react.useState)([]),
|
|
60
|
+
_useState4 = (0, _slicedToArray2.default)(_useState3, 2),
|
|
61
|
+
selectedOptions = _useState4[0],
|
|
62
|
+
setSelected = _useState4[1];
|
|
63
|
+
|
|
64
|
+
var onChange = function onChange(selectedOptions) {
|
|
65
|
+
setSelected(selectedOptions);
|
|
66
|
+
};
|
|
67
|
+
|
|
68
|
+
return (0, _react2.jsx)(_index.EuiComboBox, {
|
|
69
|
+
"aria-label": "Accessible screen reader label",
|
|
70
|
+
placeholder: "Select options",
|
|
71
|
+
options: options,
|
|
72
|
+
selectedOptions: selectedOptions,
|
|
73
|
+
onChange: onChange,
|
|
74
|
+
isClearable: true,
|
|
75
|
+
isCaseSensitive: true
|
|
76
|
+
});
|
|
77
|
+
};
|
|
78
|
+
|
|
79
|
+
beforeEach(function () {
|
|
80
|
+
cy.realMount((0, _react2.jsx)(ComboBox, null));
|
|
81
|
+
cy.get('input[data-test-subj="comboBoxSearchInput"]').should('exist');
|
|
82
|
+
});
|
|
83
|
+
describe('EuiComboBox', function () {
|
|
84
|
+
describe('Automated accessibility check', function () {
|
|
85
|
+
it('has zero violations on render', function () {
|
|
86
|
+
cy.checkAxe();
|
|
87
|
+
});
|
|
88
|
+
it('has zero violations when the combobox is expanded', function () {
|
|
89
|
+
cy.get('input[data-test-subj="comboBoxSearchInput"]').realClick();
|
|
90
|
+
cy.get('button[data-test-subj="titanOption"]').should('exist');
|
|
91
|
+
cy.checkAxe();
|
|
92
|
+
});
|
|
93
|
+
it('has zero violations after keyboard interaction', function () {
|
|
94
|
+
cy.realPress('Tab');
|
|
95
|
+
cy.get('input[data-test-subj="comboBoxSearchInput"]').should('have.focus');
|
|
96
|
+
cy.get('button[data-test-subj="titanOption"]').should('exist');
|
|
97
|
+
cy.repeatRealPress('ArrowDown');
|
|
98
|
+
cy.realPress('Enter');
|
|
99
|
+
cy.repeatRealPress('ArrowDown');
|
|
100
|
+
cy.realPress('Enter');
|
|
101
|
+
cy.repeatRealPress('ArrowDown');
|
|
102
|
+
cy.realPress('Enter');
|
|
103
|
+
cy.get('div[data-test-subj="comboBoxInput"]').find('span.euiBadge').should('have.length', 3);
|
|
104
|
+
cy.checkAxe(); // Close the listbox and interact with the Clear button
|
|
105
|
+
|
|
106
|
+
cy.realPress('Escape');
|
|
107
|
+
cy.realPress('Tab');
|
|
108
|
+
cy.get('button[data-test-subj="comboBoxClearButton"]').should('have.focus');
|
|
109
|
+
cy.realPress('Space');
|
|
110
|
+
cy.get('div[data-test-subj="comboBoxInput"]').find('span.euiBadge').should('have.length', 0);
|
|
111
|
+
cy.checkAxe();
|
|
112
|
+
});
|
|
113
|
+
});
|
|
114
|
+
});
|
|
@@ -47,7 +47,7 @@ var _i18n = require("../../i18n");
|
|
|
47
47
|
|
|
48
48
|
var _filter_select_item = require("../../filter_group/filter_select_item");
|
|
49
49
|
|
|
50
|
-
var _badge = require("../../badge
|
|
50
|
+
var _badge = require("../../badge");
|
|
51
51
|
|
|
52
52
|
var _popover_panel = require("../../popover/popover_panel");
|
|
53
53
|
|
|
@@ -0,0 +1,148 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefault");
|
|
4
|
+
|
|
5
|
+
var _typeof = require("@babel/runtime/helpers/typeof");
|
|
6
|
+
|
|
7
|
+
var _slicedToArray2 = _interopRequireDefault(require("@babel/runtime/helpers/slicedToArray"));
|
|
8
|
+
|
|
9
|
+
var _react = _interopRequireWildcard(require("react"));
|
|
10
|
+
|
|
11
|
+
var _button = require("../button");
|
|
12
|
+
|
|
13
|
+
var _control_bar = require("./control_bar");
|
|
14
|
+
|
|
15
|
+
var _panel = require("../panel");
|
|
16
|
+
|
|
17
|
+
var _text = require("../text");
|
|
18
|
+
|
|
19
|
+
var _react2 = require("@emotion/react");
|
|
20
|
+
|
|
21
|
+
function _getRequireWildcardCache(nodeInterop) { if (typeof WeakMap !== "function") return null; var cacheBabelInterop = new WeakMap(); var cacheNodeInterop = new WeakMap(); return (_getRequireWildcardCache = function _getRequireWildcardCache(nodeInterop) { return nodeInterop ? cacheNodeInterop : cacheBabelInterop; })(nodeInterop); }
|
|
22
|
+
|
|
23
|
+
function _interopRequireWildcard(obj, nodeInterop) { if (!nodeInterop && obj && obj.__esModule) { return obj; } if (obj === null || _typeof(obj) !== "object" && typeof obj !== "function") { return { default: obj }; } var cache = _getRequireWildcardCache(nodeInterop); if (cache && cache.has(obj)) { return cache.get(obj); } var newObj = {}; var hasPropertyDescriptor = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var key in obj) { if (key !== "default" && Object.prototype.hasOwnProperty.call(obj, key)) { var desc = hasPropertyDescriptor ? Object.getOwnPropertyDescriptor(obj, key) : null; if (desc && (desc.get || desc.set)) { Object.defineProperty(newObj, key, desc); } else { newObj[key] = obj[key]; } } } newObj.default = obj; if (cache) { cache.set(obj, newObj); } return newObj; }
|
|
24
|
+
|
|
25
|
+
/*
|
|
26
|
+
* Copyright Elasticsearch B.V. and/or licensed to Elasticsearch B.V. under one
|
|
27
|
+
* or more contributor license agreements. Licensed under the Elastic License
|
|
28
|
+
* 2.0 and the Server Side Public License, v 1; you may not use this file except
|
|
29
|
+
* in compliance with, at your election, the Elastic License 2.0 or the Server
|
|
30
|
+
* Side Public License, v 1.
|
|
31
|
+
*/
|
|
32
|
+
/// <reference types="../../../cypress/support"/>
|
|
33
|
+
var ControlBar = function ControlBar() {
|
|
34
|
+
var _useState = (0, _react.useState)(false),
|
|
35
|
+
_useState2 = (0, _slicedToArray2.default)(_useState, 2),
|
|
36
|
+
contentIsVisible = _useState2[0],
|
|
37
|
+
setVisibility = _useState2[1];
|
|
38
|
+
|
|
39
|
+
var _useState3 = (0, _react.useState)(false),
|
|
40
|
+
_useState4 = (0, _slicedToArray2.default)(_useState3, 2),
|
|
41
|
+
isDisplaying = _useState4[0],
|
|
42
|
+
setDisplay = _useState4[1];
|
|
43
|
+
|
|
44
|
+
var toggleContent = function toggleContent() {
|
|
45
|
+
setVisibility(!contentIsVisible);
|
|
46
|
+
};
|
|
47
|
+
|
|
48
|
+
var toggleDisplay = function toggleDisplay() {
|
|
49
|
+
setDisplay(!isDisplaying);
|
|
50
|
+
setVisibility(false);
|
|
51
|
+
};
|
|
52
|
+
|
|
53
|
+
var codeControls = [{
|
|
54
|
+
controlType: 'icon',
|
|
55
|
+
id: 'root_icon',
|
|
56
|
+
iconType: 'submodule',
|
|
57
|
+
'aria-label': 'Project Root'
|
|
58
|
+
}, {
|
|
59
|
+
controlType: 'breadcrumbs',
|
|
60
|
+
id: 'current_file_path',
|
|
61
|
+
breadcrumbs: [{
|
|
62
|
+
text: 'src'
|
|
63
|
+
}, {
|
|
64
|
+
text: 'components'
|
|
65
|
+
}]
|
|
66
|
+
}, {
|
|
67
|
+
controlType: 'spacer'
|
|
68
|
+
}, {
|
|
69
|
+
controlType: 'icon',
|
|
70
|
+
id: 'status_icon',
|
|
71
|
+
iconType: 'alert',
|
|
72
|
+
color: 'warning',
|
|
73
|
+
'aria-label': 'Repo Status'
|
|
74
|
+
}, {
|
|
75
|
+
controlType: 'divider'
|
|
76
|
+
}, {
|
|
77
|
+
controlType: 'icon',
|
|
78
|
+
id: 'branch_icon',
|
|
79
|
+
iconType: 'branch',
|
|
80
|
+
'aria-label': 'Branch Icon'
|
|
81
|
+
}, {
|
|
82
|
+
controlType: 'text',
|
|
83
|
+
id: 'branch_name',
|
|
84
|
+
text: 'some_long_branch'
|
|
85
|
+
}, {
|
|
86
|
+
controlType: 'divider'
|
|
87
|
+
}, {
|
|
88
|
+
controlType: 'icon',
|
|
89
|
+
id: 'github_icon',
|
|
90
|
+
iconType: 'logoGithub',
|
|
91
|
+
onClick: function onClick() {},
|
|
92
|
+
title: 'Open in Github',
|
|
93
|
+
'aria-label': 'Open in Github'
|
|
94
|
+
}, {
|
|
95
|
+
controlType: 'divider'
|
|
96
|
+
}, {
|
|
97
|
+
controlType: 'button',
|
|
98
|
+
id: 'open_history_view',
|
|
99
|
+
label: contentIsVisible ? 'Hide history' : 'Show history',
|
|
100
|
+
color: 'primary',
|
|
101
|
+
onClick: toggleContent
|
|
102
|
+
}];
|
|
103
|
+
var display;
|
|
104
|
+
|
|
105
|
+
if (isDisplaying) {
|
|
106
|
+
display = (0, _react2.jsx)(_control_bar.EuiControlBar, {
|
|
107
|
+
controls: codeControls,
|
|
108
|
+
showContent: contentIsVisible
|
|
109
|
+
}, (0, _react2.jsx)("div", {
|
|
110
|
+
style: {
|
|
111
|
+
padding: '2rem',
|
|
112
|
+
maxWidth: '60rem',
|
|
113
|
+
margin: '0 auto'
|
|
114
|
+
}
|
|
115
|
+
}, (0, _react2.jsx)(_panel.EuiPanel, null, (0, _react2.jsx)(_text.EuiText, null, (0, _react2.jsx)("h1", null, "1984"), (0, _react2.jsx)("h3", null, "By: George Orwell"), (0, _react2.jsx)("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."), (0, _react2.jsx)("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."), (0, _react2.jsx)("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.")))));
|
|
116
|
+
}
|
|
117
|
+
|
|
118
|
+
return (0, _react2.jsx)("div", null, (0, _react2.jsx)(_button.EuiButton, {
|
|
119
|
+
onClick: toggleDisplay
|
|
120
|
+
}, "Toggle example"), display);
|
|
121
|
+
};
|
|
122
|
+
|
|
123
|
+
beforeEach(function () {
|
|
124
|
+
cy.viewport(1024, 768);
|
|
125
|
+
cy.mount((0, _react2.jsx)(ControlBar, null));
|
|
126
|
+
cy.get('section[aria-label="Page level controls"]').should('not.exist');
|
|
127
|
+
});
|
|
128
|
+
describe('EuiControlBar', function () {
|
|
129
|
+
describe('Automated accessibility check', function () {
|
|
130
|
+
it('has zero violations on render', function () {
|
|
131
|
+
cy.checkAxe();
|
|
132
|
+
});
|
|
133
|
+
it('has zero violations when control bar is shown', function () {
|
|
134
|
+
cy.get('button.euiButton').contains('Toggle example').realClick();
|
|
135
|
+
cy.get('section[aria-label="Page level controls"]').should('exist');
|
|
136
|
+
cy.checkAxe({
|
|
137
|
+
context: 'section[aria-label="Page level controls"]'
|
|
138
|
+
});
|
|
139
|
+
});
|
|
140
|
+
it('has zero violations when control bar is hidden', function () {
|
|
141
|
+
cy.get('button.euiButton').contains('Toggle example').realClick();
|
|
142
|
+
cy.get('section[aria-label="Page level controls"]').should('exist');
|
|
143
|
+
cy.get('button.euiButton').contains('Toggle example').realClick();
|
|
144
|
+
cy.get('section[aria-label="Page level controls"]').should('not.exist');
|
|
145
|
+
cy.checkAxe();
|
|
146
|
+
});
|
|
147
|
+
});
|
|
148
|
+
});
|
|
@@ -0,0 +1,78 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefault");
|
|
4
|
+
|
|
5
|
+
var _typeof = require("@babel/runtime/helpers/typeof");
|
|
6
|
+
|
|
7
|
+
var _slicedToArray2 = _interopRequireDefault(require("@babel/runtime/helpers/slicedToArray"));
|
|
8
|
+
|
|
9
|
+
var _react = _interopRequireWildcard(require("react"));
|
|
10
|
+
|
|
11
|
+
var _button = require("../button");
|
|
12
|
+
|
|
13
|
+
var _copy = require("./copy");
|
|
14
|
+
|
|
15
|
+
var _form = require("../form");
|
|
16
|
+
|
|
17
|
+
var _spacer = require("../spacer");
|
|
18
|
+
|
|
19
|
+
var _react2 = require("@emotion/react");
|
|
20
|
+
|
|
21
|
+
function _getRequireWildcardCache(nodeInterop) { if (typeof WeakMap !== "function") return null; var cacheBabelInterop = new WeakMap(); var cacheNodeInterop = new WeakMap(); return (_getRequireWildcardCache = function _getRequireWildcardCache(nodeInterop) { return nodeInterop ? cacheNodeInterop : cacheBabelInterop; })(nodeInterop); }
|
|
22
|
+
|
|
23
|
+
function _interopRequireWildcard(obj, nodeInterop) { if (!nodeInterop && obj && obj.__esModule) { return obj; } if (obj === null || _typeof(obj) !== "object" && typeof obj !== "function") { return { default: obj }; } var cache = _getRequireWildcardCache(nodeInterop); if (cache && cache.has(obj)) { return cache.get(obj); } var newObj = {}; var hasPropertyDescriptor = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var key in obj) { if (key !== "default" && Object.prototype.hasOwnProperty.call(obj, key)) { var desc = hasPropertyDescriptor ? Object.getOwnPropertyDescriptor(obj, key) : null; if (desc && (desc.get || desc.set)) { Object.defineProperty(newObj, key, desc); } else { newObj[key] = obj[key]; } } } newObj.default = obj; if (cache) { cache.set(obj, newObj); } return newObj; }
|
|
24
|
+
|
|
25
|
+
/*
|
|
26
|
+
* Copyright Elasticsearch B.V. and/or licensed to Elasticsearch B.V. under one
|
|
27
|
+
* or more contributor license agreements. Licensed under the Elastic License
|
|
28
|
+
* 2.0 and the Server Side Public License, v 1; you may not use this file except
|
|
29
|
+
* in compliance with, at your election, the Elastic License 2.0 or the Server
|
|
30
|
+
* Side Public License, v 1.
|
|
31
|
+
*/
|
|
32
|
+
/// <reference types="../../../cypress/support"/>
|
|
33
|
+
var Copy = function Copy() {
|
|
34
|
+
var _useState = (0, _react.useState)('I am the text that will be copied'),
|
|
35
|
+
_useState2 = (0, _slicedToArray2.default)(_useState, 2),
|
|
36
|
+
copyText = _useState2[0],
|
|
37
|
+
setCopyText = _useState2[1];
|
|
38
|
+
|
|
39
|
+
var onChange = function onChange(e) {
|
|
40
|
+
setCopyText(e.target.value);
|
|
41
|
+
};
|
|
42
|
+
|
|
43
|
+
return (0, _react2.jsx)("div", null, (0, _react2.jsx)(_form.EuiFormRow, {
|
|
44
|
+
label: "Enter text that will be copied to clipboard"
|
|
45
|
+
}, (0, _react2.jsx)(_form.EuiFieldText, {
|
|
46
|
+
value: copyText,
|
|
47
|
+
onChange: onChange
|
|
48
|
+
})), (0, _react2.jsx)(_spacer.EuiSpacer, {
|
|
49
|
+
size: "m"
|
|
50
|
+
}), (0, _react2.jsx)(_copy.EuiCopy, {
|
|
51
|
+
textToCopy: copyText
|
|
52
|
+
}, function (copy) {
|
|
53
|
+
return (0, _react2.jsx)(_button.EuiButton, {
|
|
54
|
+
onClick: copy,
|
|
55
|
+
"data-test-subj": "cy-copy-button"
|
|
56
|
+
}, "Click to copy input text");
|
|
57
|
+
}));
|
|
58
|
+
};
|
|
59
|
+
|
|
60
|
+
beforeEach(function () {
|
|
61
|
+
cy.realMount((0, _react2.jsx)(Copy, null));
|
|
62
|
+
});
|
|
63
|
+
describe('EuiCopy', function () {
|
|
64
|
+
describe('Automated accessibility check', function () {
|
|
65
|
+
it('has zero violations on render', function () {
|
|
66
|
+
cy.checkAxe();
|
|
67
|
+
});
|
|
68
|
+
it('has zero violations after the copy button is clicked', function () {
|
|
69
|
+
cy.get('button[data-test-subj="cy-copy-button"]').realClick();
|
|
70
|
+
cy.checkAxe();
|
|
71
|
+
});
|
|
72
|
+
it('has zero violations after keyboard interaction', function () {
|
|
73
|
+
cy.repeatRealPress('Tab');
|
|
74
|
+
cy.realPress('Enter');
|
|
75
|
+
cy.checkAxe();
|
|
76
|
+
});
|
|
77
|
+
});
|
|
78
|
+
});
|
|
@@ -0,0 +1,248 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefault");
|
|
4
|
+
|
|
5
|
+
var _typeof = require("@babel/runtime/helpers/typeof");
|
|
6
|
+
|
|
7
|
+
var _toConsumableArray2 = _interopRequireDefault(require("@babel/runtime/helpers/toConsumableArray"));
|
|
8
|
+
|
|
9
|
+
var _slicedToArray2 = _interopRequireDefault(require("@babel/runtime/helpers/slicedToArray"));
|
|
10
|
+
|
|
11
|
+
var _react = _interopRequireWildcard(require("react"));
|
|
12
|
+
|
|
13
|
+
var _index = require("./index");
|
|
14
|
+
|
|
15
|
+
var _faker = require("@faker-js/faker");
|
|
16
|
+
|
|
17
|
+
var _react2 = require("@emotion/react");
|
|
18
|
+
|
|
19
|
+
function _getRequireWildcardCache(nodeInterop) { if (typeof WeakMap !== "function") return null; var cacheBabelInterop = new WeakMap(); var cacheNodeInterop = new WeakMap(); return (_getRequireWildcardCache = function _getRequireWildcardCache(nodeInterop) { return nodeInterop ? cacheNodeInterop : cacheBabelInterop; })(nodeInterop); }
|
|
20
|
+
|
|
21
|
+
function _interopRequireWildcard(obj, nodeInterop) { if (!nodeInterop && obj && obj.__esModule) { return obj; } if (obj === null || _typeof(obj) !== "object" && typeof obj !== "function") { return { default: obj }; } var cache = _getRequireWildcardCache(nodeInterop); if (cache && cache.has(obj)) { return cache.get(obj); } var newObj = {}; var hasPropertyDescriptor = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var key in obj) { if (key !== "default" && Object.prototype.hasOwnProperty.call(obj, key)) { var desc = hasPropertyDescriptor ? Object.getOwnPropertyDescriptor(obj, key) : null; if (desc && (desc.get || desc.set)) { Object.defineProperty(newObj, key, desc); } else { newObj[key] = obj[key]; } } } newObj.default = obj; if (cache) { cache.set(obj, newObj); } return newObj; }
|
|
22
|
+
|
|
23
|
+
/*
|
|
24
|
+
* Copyright Elasticsearch B.V. and/or licensed to Elasticsearch B.V. under one
|
|
25
|
+
* or more contributor license agreements. Licensed under the Elastic License
|
|
26
|
+
* 2.0 and the Server Side Public License, v 1; you may not use this file except
|
|
27
|
+
* in compliance with, at your election, the Elastic License 2.0 or the Server
|
|
28
|
+
* Side Public License, v 1.
|
|
29
|
+
*/
|
|
30
|
+
/// <reference types="../../../cypress/support"/>
|
|
31
|
+
var columns = [{
|
|
32
|
+
id: 'Name'
|
|
33
|
+
}, {
|
|
34
|
+
id: 'Email',
|
|
35
|
+
cellActions: [function (_ref) {
|
|
36
|
+
var rowIndex = _ref.rowIndex,
|
|
37
|
+
columnId = _ref.columnId,
|
|
38
|
+
Component = _ref.Component;
|
|
39
|
+
var row = ++rowIndex;
|
|
40
|
+
return (0, _react2.jsx)(Component, {
|
|
41
|
+
onClick: function onClick() {},
|
|
42
|
+
iconType: "heart",
|
|
43
|
+
"aria-label": "Send love to ".concat(row, ", column \"").concat(columnId, "\" ")
|
|
44
|
+
}, "Send love");
|
|
45
|
+
}]
|
|
46
|
+
}, {
|
|
47
|
+
id: 'User ID',
|
|
48
|
+
schema: 'string'
|
|
49
|
+
}, {
|
|
50
|
+
id: 'Account balance'
|
|
51
|
+
}, {
|
|
52
|
+
id: 'Last purchase',
|
|
53
|
+
schema: 'datetime'
|
|
54
|
+
}, {
|
|
55
|
+
id: 'Favorite distro',
|
|
56
|
+
schema: 'favoriteDistro'
|
|
57
|
+
}];
|
|
58
|
+
var storeData = [];
|
|
59
|
+
|
|
60
|
+
for (var i = 1; i < 11; i++) {
|
|
61
|
+
storeData.push({
|
|
62
|
+
Name: "".concat(_faker.faker.name.lastName(), ", ").concat(_faker.faker.name.firstName(), " ").concat(_faker.faker.name.suffix()),
|
|
63
|
+
Email: "".concat(_faker.faker.internet.email()),
|
|
64
|
+
'User ID': "".concat(_faker.faker.datatype.number({
|
|
65
|
+
min: 1000000,
|
|
66
|
+
max: 9999999
|
|
67
|
+
})),
|
|
68
|
+
'Account balance': _faker.faker.finance.amount(),
|
|
69
|
+
'Last purchase': "".concat(_faker.faker.date.past()),
|
|
70
|
+
'Favorite distro': i % 2 === 0 ? 'Alma' : 'Debian'
|
|
71
|
+
});
|
|
72
|
+
}
|
|
73
|
+
|
|
74
|
+
var commaSeparateNumbers = function commaSeparateNumbers(numberString) {
|
|
75
|
+
// extract the groups-of-three digits that are right-aligned
|
|
76
|
+
return numberString.replace(/((\d{3})+)$/, function (match) {
|
|
77
|
+
return (// then replace each group of xyz digits with ,xyz
|
|
78
|
+
match.replace(/(\d{3})/g, ',$1')
|
|
79
|
+
);
|
|
80
|
+
});
|
|
81
|
+
};
|
|
82
|
+
|
|
83
|
+
var DataGrid = function DataGrid() {
|
|
84
|
+
var _useState = (0, _react.useState)(columns.map(function (_ref2) {
|
|
85
|
+
var id = _ref2.id;
|
|
86
|
+
return id;
|
|
87
|
+
})),
|
|
88
|
+
_useState2 = (0, _slicedToArray2.default)(_useState, 2),
|
|
89
|
+
visibleColumns = _useState2[0],
|
|
90
|
+
setVisibleColumns = _useState2[1];
|
|
91
|
+
|
|
92
|
+
var _useState3 = (0, _react.useState)(storeData),
|
|
93
|
+
_useState4 = (0, _slicedToArray2.default)(_useState3, 2),
|
|
94
|
+
data = _useState4[0],
|
|
95
|
+
setData = _useState4[1];
|
|
96
|
+
|
|
97
|
+
var _useState5 = (0, _react.useState)([{
|
|
98
|
+
id: 'custom',
|
|
99
|
+
direction: 'asc'
|
|
100
|
+
}]),
|
|
101
|
+
_useState6 = (0, _slicedToArray2.default)(_useState5, 2),
|
|
102
|
+
sortingColumns = _useState6[0],
|
|
103
|
+
setSortingColumns = _useState6[1];
|
|
104
|
+
|
|
105
|
+
var setSorting = function setSorting(sortingColumns) {
|
|
106
|
+
var sortedData = (0, _toConsumableArray2.default)(data).sort(function (a, b) {
|
|
107
|
+
for (var _i = 0; _i < sortingColumns.length; _i++) {
|
|
108
|
+
var column = sortingColumns[_i];
|
|
109
|
+
var aValue = a[column.id];
|
|
110
|
+
var bValue = b[column.id];
|
|
111
|
+
if (aValue < bValue) return column.direction === 'asc' ? -1 : 1;
|
|
112
|
+
if (aValue > bValue) return column.direction === 'asc' ? 1 : -1;
|
|
113
|
+
}
|
|
114
|
+
|
|
115
|
+
return 0;
|
|
116
|
+
});
|
|
117
|
+
setData(sortedData);
|
|
118
|
+
setSortingColumns(sortingColumns);
|
|
119
|
+
};
|
|
120
|
+
|
|
121
|
+
return (0, _react2.jsx)(_index.EuiDataGrid, {
|
|
122
|
+
"aria-label": "Data grid schema example",
|
|
123
|
+
columns: columns,
|
|
124
|
+
columnVisibility: {
|
|
125
|
+
visibleColumns: visibleColumns,
|
|
126
|
+
setVisibleColumns: setVisibleColumns
|
|
127
|
+
},
|
|
128
|
+
rowCount: data.length,
|
|
129
|
+
inMemory: {
|
|
130
|
+
level: 'sorting'
|
|
131
|
+
},
|
|
132
|
+
renderCellValue: function renderCellValue(_ref3) {
|
|
133
|
+
var rowIndex = _ref3.rowIndex,
|
|
134
|
+
columnId = _ref3.columnId,
|
|
135
|
+
schema = _ref3.schema;
|
|
136
|
+
var value = data[rowIndex][columnId];
|
|
137
|
+
|
|
138
|
+
if (schema === 'numeric') {
|
|
139
|
+
value = commaSeparateNumbers(value);
|
|
140
|
+
}
|
|
141
|
+
|
|
142
|
+
return value;
|
|
143
|
+
},
|
|
144
|
+
sorting: {
|
|
145
|
+
columns: sortingColumns,
|
|
146
|
+
onSort: setSorting
|
|
147
|
+
},
|
|
148
|
+
schemaDetectors: [{
|
|
149
|
+
type: 'favoriteDistro',
|
|
150
|
+
textTransform: 'capitalize',
|
|
151
|
+
detector: function detector(value) {
|
|
152
|
+
return value.toLowerCase() === 'alma' || value.toLowerCase() === 'debian' ? 1 : 0;
|
|
153
|
+
},
|
|
154
|
+
comparator: function comparator(a, b, direction) {
|
|
155
|
+
var aValue = a.toLowerCase() === 'alma';
|
|
156
|
+
var bValue = b.toLowerCase() === 'alma';
|
|
157
|
+
if (aValue < bValue) return direction === 'asc' ? 1 : -1;
|
|
158
|
+
if (aValue > bValue) return direction === 'asc' ? -1 : 1;
|
|
159
|
+
return 0;
|
|
160
|
+
},
|
|
161
|
+
sortTextAsc: 'Alma to Debian',
|
|
162
|
+
sortTextDesc: 'Debian to Alma',
|
|
163
|
+
icon: 'starFilled',
|
|
164
|
+
color: '#800080'
|
|
165
|
+
}]
|
|
166
|
+
});
|
|
167
|
+
};
|
|
168
|
+
|
|
169
|
+
beforeEach(function () {
|
|
170
|
+
cy.viewport(1280, 800); // large breakpoint
|
|
171
|
+
|
|
172
|
+
cy.mount((0, _react2.jsx)("div", {
|
|
173
|
+
style: {
|
|
174
|
+
width: '80%',
|
|
175
|
+
margin: '0 auto'
|
|
176
|
+
}
|
|
177
|
+
}, (0, _react2.jsx)(DataGrid, null)));
|
|
178
|
+
});
|
|
179
|
+
describe('EuiDataGrid', function () {
|
|
180
|
+
describe('Automated accessibility check', function () {
|
|
181
|
+
it('has zero violations on first render', function () {
|
|
182
|
+
cy.checkAxe();
|
|
183
|
+
});
|
|
184
|
+
it('has zero violations when the columns reorder menu is open', function () {
|
|
185
|
+
cy.get('button[data-test-subj="dataGridColumnSelectorButton"]').realClick();
|
|
186
|
+
cy.checkAxe();
|
|
187
|
+
});
|
|
188
|
+
it('has zero violations when the hide all columns button is clicked', function () {
|
|
189
|
+
cy.get('button[data-test-subj="dataGridColumnSelectorButton"]').realClick();
|
|
190
|
+
cy.get('button[data-test-subj="dataGridColumnSelectorHideAllButton"]').realClick(); // TODO: Log this issue and remove the skipFailures boolean when fixed
|
|
191
|
+
|
|
192
|
+
cy.checkAxe({
|
|
193
|
+
skipFailures: true
|
|
194
|
+
});
|
|
195
|
+
});
|
|
196
|
+
it('has zero violations when the columns reorder searchbox returns multiple results', function () {
|
|
197
|
+
cy.get('button[data-test-subj="dataGridColumnSelectorButton"]').realClick();
|
|
198
|
+
cy.get('input[data-test-subj="dataGridColumnSelectorSearch"]').type('a');
|
|
199
|
+
cy.get('div.euiSwitch--compressed').should(function ($s) {
|
|
200
|
+
expect($s).to.have.length(5);
|
|
201
|
+
});
|
|
202
|
+
cy.checkAxe();
|
|
203
|
+
});
|
|
204
|
+
it('has zero violations when the columns reorder searchbox returns 1 result', function () {
|
|
205
|
+
cy.get('button[data-test-subj="dataGridColumnSelectorButton"]').realClick();
|
|
206
|
+
cy.get('input[data-test-subj="dataGridColumnSelectorSearch"]').type('favorite');
|
|
207
|
+
cy.get('div.euiSwitch--compressed').should(function ($s) {
|
|
208
|
+
expect($s).to.have.length(1);
|
|
209
|
+
});
|
|
210
|
+
cy.checkAxe();
|
|
211
|
+
});
|
|
212
|
+
it('has zero violations when the columns reorder searchbox returns 0 results', function () {
|
|
213
|
+
cy.get('button[data-test-subj="dataGridColumnSelectorButton"]').realClick();
|
|
214
|
+
cy.get('input[data-test-subj="dataGridColumnSelectorSearch"]').type('x');
|
|
215
|
+
cy.get('div.euiSwitch--compressed').should(function ($s) {
|
|
216
|
+
expect($s).to.have.length(0);
|
|
217
|
+
});
|
|
218
|
+
cy.checkAxe();
|
|
219
|
+
});
|
|
220
|
+
it('has zero violations when the keyboard shortcut menu is open', function () {
|
|
221
|
+
cy.get('button[data-test-subj="dataGridKeyboardShortcutsButton"]').realClick();
|
|
222
|
+
cy.checkAxe();
|
|
223
|
+
});
|
|
224
|
+
it('has zero violations when the grid display menu is open', function () {
|
|
225
|
+
cy.get('button[data-test-subj="dataGridDisplaySelectorButton"]').realClick();
|
|
226
|
+
cy.checkAxe();
|
|
227
|
+
});
|
|
228
|
+
it('has zero violations when the column actions menu is open', function () {
|
|
229
|
+
cy.get('button.euiDataGridHeaderCell__button').first().realClick();
|
|
230
|
+
cy.checkAxe();
|
|
231
|
+
});
|
|
232
|
+
it('has zero violations when a cell expansion popover is open', function () {
|
|
233
|
+
cy.get('div[data-gridcell-visible-row-index="0"][data-gridcell-column-index="1"]').realClick();
|
|
234
|
+
cy.get('div[data-gridcell-visible-row-index="0"][data-gridcell-column-index="1"]').find('button.euiButtonIcon').last().realClick();
|
|
235
|
+
cy.checkAxe();
|
|
236
|
+
});
|
|
237
|
+
it('has zero violations when the Favorite Distro column has been sorted', function () {
|
|
238
|
+
cy.get('button.euiDataGridHeaderCell__button').last().realClick();
|
|
239
|
+
cy.get('button.euiListGroupItem__button').contains('Sort Alma to Debian').should('exist').realClick();
|
|
240
|
+
cy.checkAxe();
|
|
241
|
+
});
|
|
242
|
+
it('has zero violations when fullscreen is open', function () {
|
|
243
|
+
cy.get('button[data-test-subj="dataGridFullScreenButton"]').realClick();
|
|
244
|
+
cy.get('div.euiDataGrid--fullScreen').should('exist');
|
|
245
|
+
cy.checkAxe();
|
|
246
|
+
});
|
|
247
|
+
});
|
|
248
|
+
});
|