@elastic/eui 71.0.0 → 72.0.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +0 -7
- package/dist/eui_theme_dark.css +7747 -5854
- package/dist/eui_theme_dark.min.css +1 -1
- package/dist/eui_theme_light.css +7737 -5844
- package/dist/eui_theme_light.min.css +1 -1
- package/es/components/datagrid/data_grid.a11y.js +251 -0
- package/es/components/date_picker/auto_refresh/refresh_interval.js +3 -1
- package/es/components/date_picker/date_picker.a11y.js +83 -0
- package/es/components/date_picker/super_date_picker/quick_select_popover/commonly_used_time_ranges.js +5 -2
- package/es/components/date_picker/super_date_picker/quick_select_popover/quick_select.js +3 -1
- package/es/components/date_picker/super_date_picker/quick_select_popover/quick_select_popover.js +160 -173
- package/es/components/date_picker/super_date_picker/quick_select_popover/recently_used.js +5 -2
- package/es/components/date_picker/super_date_picker/super_date_picker.js +16 -0
- 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/empty_prompt/empty_prompt.a11y.js +63 -0
- package/es/components/error_boundary/error_boundary.a11y.js +67 -0
- package/es/components/error_boundary/error_boundary.js +45 -27
- package/es/components/expression/expression.a11y.js +254 -0
- package/es/components/filter_group/filter_group.a11y.js +281 -0
- package/es/components/focus_trap/focus_trap.a11y.js +131 -0
- package/es/components/form/file_picker/file_picker.js +1 -0
- package/es/components/header/header.a11y.js +374 -0
- package/es/components/icon/icon_ML.a11y.js +33 -0
- package/es/components/icon/icon_apps.a11y.js +33 -0
- package/es/components/icon/icon_editor.a11y.js +33 -0
- package/es/components/icon/icon_elastic.a11y.js +33 -0
- package/es/components/icon/icon_glyphs.a11y.js +33 -0
- package/es/components/icon/icon_tokens.a11y.js +33 -0
- package/es/components/markdown_editor/plugins/markdown_default_plugins/parsing_plugins.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/selectable/selectable.js +4 -3
- package/es/components/selectable/selectable_list/selectable_list.js +17 -5
- package/es/components/tabs/tab.js +7 -17
- package/es/components/tabs/tabbed_content/tabbed_content.js +0 -16
- package/es/components/tabs/tabs.js +7 -11
- package/es/components/tabs/tabs_context.js +13 -0
- package/eui.d.ts +60 -43
- package/i18ntokens.json +34 -18
- package/lib/components/datagrid/data_grid.a11y.js +255 -0
- package/lib/components/date_picker/auto_refresh/refresh_interval.js +3 -1
- package/lib/components/date_picker/date_picker.a11y.js +89 -0
- package/lib/components/date_picker/super_date_picker/quick_select_popover/commonly_used_time_ranges.js +5 -2
- package/lib/components/date_picker/super_date_picker/quick_select_popover/quick_select.js +3 -1
- package/lib/components/date_picker/super_date_picker/quick_select_popover/quick_select_popover.js +155 -168
- package/lib/components/date_picker/super_date_picker/quick_select_popover/recently_used.js +5 -2
- package/lib/components/date_picker/super_date_picker/super_date_picker.js +16 -0
- 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/empty_prompt/empty_prompt.a11y.js +72 -0
- package/lib/components/error_boundary/error_boundary.a11y.js +75 -0
- package/lib/components/error_boundary/error_boundary.js +49 -29
- package/lib/components/expression/expression.a11y.js +262 -0
- package/lib/components/filter_group/filter_group.a11y.js +287 -0
- package/lib/components/focus_trap/focus_trap.a11y.js +140 -0
- package/lib/components/form/file_picker/file_picker.js +1 -0
- package/lib/components/header/header.a11y.js +385 -0
- package/lib/components/icon/icon_ML.a11y.js +40 -0
- package/lib/components/icon/icon_apps.a11y.js +40 -0
- package/lib/components/icon/icon_editor.a11y.js +40 -0
- package/lib/components/icon/icon_elastic.a11y.js +40 -0
- package/lib/components/icon/icon_glyphs.a11y.js +40 -0
- package/lib/components/icon/icon_tokens.a11y.js +40 -0
- package/lib/components/markdown_editor/plugins/markdown_default_plugins/parsing_plugins.js +2 -2
- 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/selectable/selectable.js +4 -3
- package/lib/components/selectable/selectable_list/selectable_list.js +17 -5
- package/lib/components/tabs/tab.js +14 -17
- package/lib/components/tabs/tabbed_content/tabbed_content.js +0 -16
- package/lib/components/tabs/tabs.js +8 -14
- package/lib/components/tabs/tabs_context.js +23 -0
- package/optimize/es/components/datagrid/data_grid.a11y.js +234 -0
- package/optimize/es/components/date_picker/auto_refresh/refresh_interval.js +3 -1
- package/optimize/es/components/date_picker/date_picker.a11y.js +73 -0
- package/optimize/es/components/date_picker/super_date_picker/quick_select_popover/commonly_used_time_ranges.js +5 -2
- package/optimize/es/components/date_picker/super_date_picker/quick_select_popover/quick_select.js +3 -1
- package/optimize/es/components/date_picker/super_date_picker/quick_select_popover/quick_select_popover.js +145 -169
- package/optimize/es/components/date_picker/super_date_picker/quick_select_popover/recently_used.js +5 -2
- package/optimize/es/components/date_picker/super_date_picker/super_date_picker.js +2 -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/empty_prompt/empty_prompt.a11y.js +63 -0
- package/optimize/es/components/error_boundary/error_boundary.a11y.js +67 -0
- package/optimize/es/components/error_boundary/error_boundary.js +37 -26
- package/optimize/es/components/expression/expression.a11y.js +243 -0
- package/optimize/es/components/filter_group/filter_group.a11y.js +271 -0
- package/optimize/es/components/focus_trap/focus_trap.a11y.js +120 -0
- package/optimize/es/components/form/file_picker/file_picker.js +1 -0
- package/optimize/es/components/header/header.a11y.js +364 -0
- package/optimize/es/components/icon/icon_ML.a11y.js +33 -0
- package/optimize/es/components/icon/icon_apps.a11y.js +33 -0
- package/optimize/es/components/icon/icon_editor.a11y.js +33 -0
- package/optimize/es/components/icon/icon_elastic.a11y.js +33 -0
- package/optimize/es/components/icon/icon_glyphs.a11y.js +33 -0
- package/optimize/es/components/icon/icon_tokens.a11y.js +33 -0
- package/optimize/es/components/markdown_editor/plugins/markdown_default_plugins/parsing_plugins.js +1 -1
- package/optimize/es/components/page/page_side_bar/page_side_bar.js +3 -0
- package/optimize/es/components/selectable/selectable.js +2 -2
- package/optimize/es/components/selectable/selectable_list/selectable_list.js +15 -4
- package/optimize/es/components/tabs/tab.js +7 -5
- package/optimize/es/components/tabs/tabs.js +7 -11
- package/optimize/es/components/tabs/tabs_context.js +13 -0
- package/optimize/lib/components/datagrid/data_grid.a11y.js +248 -0
- package/optimize/lib/components/date_picker/auto_refresh/refresh_interval.js +3 -1
- package/optimize/lib/components/date_picker/date_picker.a11y.js +87 -0
- package/optimize/lib/components/date_picker/super_date_picker/quick_select_popover/commonly_used_time_ranges.js +5 -2
- package/optimize/lib/components/date_picker/super_date_picker/quick_select_popover/quick_select.js +3 -1
- package/optimize/lib/components/date_picker/super_date_picker/quick_select_popover/quick_select_popover.js +146 -167
- package/optimize/lib/components/date_picker/super_date_picker/quick_select_popover/recently_used.js +5 -2
- package/optimize/lib/components/date_picker/super_date_picker/super_date_picker.js +2 -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/empty_prompt/empty_prompt.a11y.js +72 -0
- package/optimize/lib/components/error_boundary/error_boundary.a11y.js +75 -0
- package/optimize/lib/components/error_boundary/error_boundary.js +41 -28
- package/optimize/lib/components/expression/expression.a11y.js +254 -0
- package/optimize/lib/components/filter_group/filter_group.a11y.js +287 -0
- package/optimize/lib/components/focus_trap/focus_trap.a11y.js +140 -0
- package/optimize/lib/components/form/file_picker/file_picker.js +1 -0
- package/optimize/lib/components/header/header.a11y.js +385 -0
- package/optimize/lib/components/icon/icon_ML.a11y.js +40 -0
- package/optimize/lib/components/icon/icon_apps.a11y.js +40 -0
- package/optimize/lib/components/icon/icon_editor.a11y.js +40 -0
- package/optimize/lib/components/icon/icon_elastic.a11y.js +40 -0
- package/optimize/lib/components/icon/icon_glyphs.a11y.js +40 -0
- package/optimize/lib/components/icon/icon_tokens.a11y.js +40 -0
- package/optimize/lib/components/markdown_editor/plugins/markdown_default_plugins/parsing_plugins.js +2 -2
- package/optimize/lib/components/page/page_side_bar/page_side_bar.js +4 -0
- package/optimize/lib/components/selectable/selectable.js +2 -2
- package/optimize/lib/components/selectable/selectable_list/selectable_list.js +15 -4
- package/optimize/lib/components/tabs/tab.js +15 -5
- package/optimize/lib/components/tabs/tabs.js +8 -14
- package/optimize/lib/components/tabs/tabs_context.js +23 -0
- package/package.json +14 -19
- 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 +2 -3
- 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 +15 -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/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 +15 -16
- 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 +4 -8
- 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/_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/_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 +4 -5
- 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/_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/datagrid/data_grid.a11y.js +248 -0
- package/test-env/components/date_picker/auto_refresh/refresh_interval.js +3 -1
- package/test-env/components/date_picker/date_picker.a11y.js +87 -0
- package/test-env/components/date_picker/super_date_picker/quick_select_popover/commonly_used_time_ranges.js +5 -2
- package/test-env/components/date_picker/super_date_picker/quick_select_popover/quick_select.js +3 -1
- package/test-env/components/date_picker/super_date_picker/quick_select_popover/quick_select_popover.js +153 -166
- package/test-env/components/date_picker/super_date_picker/quick_select_popover/recently_used.js +5 -2
- package/test-env/components/date_picker/super_date_picker/super_date_picker.js +16 -0
- 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/empty_prompt/empty_prompt.a11y.js +72 -0
- package/test-env/components/error_boundary/error_boundary.a11y.js +75 -0
- package/test-env/components/error_boundary/error_boundary.js +48 -28
- package/test-env/components/expression/expression.a11y.js +254 -0
- package/test-env/components/filter_group/filter_group.a11y.js +287 -0
- package/test-env/components/focus_trap/focus_trap.a11y.js +140 -0
- package/test-env/components/form/file_picker/file_picker.js +1 -0
- package/test-env/components/header/header.a11y.js +385 -0
- package/test-env/components/icon/icon_ML.a11y.js +40 -0
- package/test-env/components/icon/icon_apps.a11y.js +40 -0
- package/test-env/components/icon/icon_editor.a11y.js +40 -0
- package/test-env/components/icon/icon_elastic.a11y.js +40 -0
- package/test-env/components/icon/icon_glyphs.a11y.js +40 -0
- package/test-env/components/icon/icon_tokens.a11y.js +40 -0
- package/test-env/components/markdown_editor/plugins/markdown_default_plugins/parsing_plugins.js +2 -2
- 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/selectable/selectable.js +4 -3
- package/test-env/components/selectable/selectable_list/selectable_list.js +17 -5
- package/test-env/components/tabs/tab.js +15 -17
- package/test-env/components/tabs/tabbed_content/tabbed_content.js +0 -16
- package/test-env/components/tabs/tabs.js +8 -14
- package/test-env/components/tabs/tabs_context.js +23 -0
- package/scripts/postinstall.js +0 -9
|
@@ -0,0 +1,385 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
function _typeof(obj) { "@babel/helpers - typeof"; if (typeof Symbol === "function" && typeof Symbol.iterator === "symbol") { _typeof = function _typeof(obj) { return typeof obj; }; } else { _typeof = function _typeof(obj) { return obj && typeof Symbol === "function" && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj; }; } return _typeof(obj); }
|
|
4
|
+
|
|
5
|
+
var _react = _interopRequireWildcard(require("react"));
|
|
6
|
+
|
|
7
|
+
var _avatar = require("../avatar");
|
|
8
|
+
|
|
9
|
+
var _flex = require("../flex");
|
|
10
|
+
|
|
11
|
+
var _header_breadcrumbs = require("./header_breadcrumbs");
|
|
12
|
+
|
|
13
|
+
var _header = require("./header");
|
|
14
|
+
|
|
15
|
+
var _header_logo = require("./header_logo");
|
|
16
|
+
|
|
17
|
+
var _header_section = require("./header_section");
|
|
18
|
+
|
|
19
|
+
var _icon = require("../icon");
|
|
20
|
+
|
|
21
|
+
var _key_pad_menu = require("../key_pad_menu");
|
|
22
|
+
|
|
23
|
+
var _link = require("../link");
|
|
24
|
+
|
|
25
|
+
var _popover = require("../popover");
|
|
26
|
+
|
|
27
|
+
var _selectable = require("../selectable");
|
|
28
|
+
|
|
29
|
+
var _spacer = require("../spacer");
|
|
30
|
+
|
|
31
|
+
var _text = require("../text");
|
|
32
|
+
|
|
33
|
+
var _services = require("../../services");
|
|
34
|
+
|
|
35
|
+
var _react2 = require("@emotion/react");
|
|
36
|
+
|
|
37
|
+
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); }
|
|
38
|
+
|
|
39
|
+
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; }
|
|
40
|
+
|
|
41
|
+
function _slicedToArray(arr, i) { return _arrayWithHoles(arr) || _iterableToArrayLimit(arr, i) || _unsupportedIterableToArray(arr, i) || _nonIterableRest(); }
|
|
42
|
+
|
|
43
|
+
function _nonIterableRest() { throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method."); }
|
|
44
|
+
|
|
45
|
+
function _unsupportedIterableToArray(o, minLen) { if (!o) return; if (typeof o === "string") return _arrayLikeToArray(o, minLen); var n = Object.prototype.toString.call(o).slice(8, -1); if (n === "Object" && o.constructor) n = o.constructor.name; if (n === "Map" || n === "Set") return Array.from(o); if (n === "Arguments" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)) return _arrayLikeToArray(o, minLen); }
|
|
46
|
+
|
|
47
|
+
function _arrayLikeToArray(arr, len) { if (len == null || len > arr.length) len = arr.length; for (var i = 0, arr2 = new Array(len); i < len; i++) { arr2[i] = arr[i]; } return arr2; }
|
|
48
|
+
|
|
49
|
+
function _iterableToArrayLimit(arr, i) { var _i = arr == null ? null : typeof Symbol !== "undefined" && arr[Symbol.iterator] || arr["@@iterator"]; if (_i == null) return; var _arr = []; var _n = true; var _d = false; var _s, _e; try { for (_i = _i.call(arr); !(_n = (_s = _i.next()).done); _n = true) { _arr.push(_s.value); if (i && _arr.length === i) break; } } catch (err) { _d = true; _e = err; } finally { try { if (!_n && _i["return"] != null) _i["return"](); } finally { if (_d) throw _e; } } return _arr; }
|
|
50
|
+
|
|
51
|
+
function _arrayWithHoles(arr) { if (Array.isArray(arr)) return arr; }
|
|
52
|
+
|
|
53
|
+
var Header = function Header() {
|
|
54
|
+
var renderLogo = function renderLogo() {
|
|
55
|
+
return (0, _react2.jsx)(_header_logo.EuiHeaderLogo, {
|
|
56
|
+
iconType: "logoElastic",
|
|
57
|
+
href: "#",
|
|
58
|
+
onClick: function onClick(e) {
|
|
59
|
+
return e.preventDefault();
|
|
60
|
+
},
|
|
61
|
+
"aria-label": "Go to home page"
|
|
62
|
+
});
|
|
63
|
+
};
|
|
64
|
+
|
|
65
|
+
var renderBreadcrumbs = function renderBreadcrumbs() {
|
|
66
|
+
var breadcrumbs = [{
|
|
67
|
+
text: 'Management',
|
|
68
|
+
href: '#',
|
|
69
|
+
onClick: function onClick(e) {
|
|
70
|
+
e.preventDefault();
|
|
71
|
+
},
|
|
72
|
+
'data-test-subj': 'breadcrumbsAnimals',
|
|
73
|
+
className: 'customClass'
|
|
74
|
+
}, {
|
|
75
|
+
text: 'Truncation test is here for a really long item',
|
|
76
|
+
href: '#',
|
|
77
|
+
onClick: function onClick(e) {
|
|
78
|
+
e.preventDefault();
|
|
79
|
+
}
|
|
80
|
+
}, {
|
|
81
|
+
text: 'Hidden',
|
|
82
|
+
'data-test-subj': 'cy-breadcrumb-hidden',
|
|
83
|
+
href: '#',
|
|
84
|
+
onClick: function onClick(e) {
|
|
85
|
+
e.preventDefault();
|
|
86
|
+
}
|
|
87
|
+
}, {
|
|
88
|
+
text: 'Users',
|
|
89
|
+
href: '#',
|
|
90
|
+
onClick: function onClick(e) {
|
|
91
|
+
e.preventDefault();
|
|
92
|
+
}
|
|
93
|
+
}, {
|
|
94
|
+
text: 'Create'
|
|
95
|
+
}];
|
|
96
|
+
return (0, _react2.jsx)(_header_breadcrumbs.EuiHeaderBreadcrumbs, {
|
|
97
|
+
"aria-label": "Header breadcrumbs example",
|
|
98
|
+
breadcrumbs: breadcrumbs
|
|
99
|
+
});
|
|
100
|
+
};
|
|
101
|
+
|
|
102
|
+
var search = (0, _react2.jsx)(_selectable.EuiSelectableTemplateSitewide, {
|
|
103
|
+
options: [],
|
|
104
|
+
searchProps: {
|
|
105
|
+
compressed: true
|
|
106
|
+
},
|
|
107
|
+
popoverButton: (0, _react2.jsx)(_header_section.EuiHeaderSectionItemButton, {
|
|
108
|
+
"aria-label": "Sitewide search"
|
|
109
|
+
}, (0, _react2.jsx)(_icon.EuiIcon, {
|
|
110
|
+
type: "search",
|
|
111
|
+
size: "m"
|
|
112
|
+
})),
|
|
113
|
+
emptyMessage: (0, _react2.jsx)(_selectable.EuiSelectableMessage, {
|
|
114
|
+
style: {
|
|
115
|
+
minHeight: 300
|
|
116
|
+
},
|
|
117
|
+
"data-test-subj": "cy-search-menu"
|
|
118
|
+
}, (0, _react2.jsx)("p", null, "Please see the component page for", ' ', (0, _react2.jsx)("strong", null, "EuiSelectableTemplateSitewide"), "on how to configure your sitewide search."))
|
|
119
|
+
});
|
|
120
|
+
return (0, _react2.jsx)(_header.EuiHeader, null, (0, _react2.jsx)(_header_section.EuiHeaderSection, {
|
|
121
|
+
grow: false
|
|
122
|
+
}, (0, _react2.jsx)(_header_section.EuiHeaderSectionItem, {
|
|
123
|
+
border: "right"
|
|
124
|
+
}, renderLogo()), (0, _react2.jsx)(_header_section.EuiHeaderSectionItem, {
|
|
125
|
+
border: "right"
|
|
126
|
+
}, (0, _react2.jsx)(HeaderSpacesMenu, null))), renderBreadcrumbs(), (0, _react2.jsx)(_header_section.EuiHeaderSection, {
|
|
127
|
+
side: "right"
|
|
128
|
+
}, (0, _react2.jsx)(_header_section.EuiHeaderSectionItem, null, search), (0, _react2.jsx)(_header_section.EuiHeaderSectionItem, null, (0, _react2.jsx)(HeaderUserMenu, null)), (0, _react2.jsx)(_header_section.EuiHeaderSectionItem, null, (0, _react2.jsx)(HeaderAppMenu, null))));
|
|
129
|
+
};
|
|
130
|
+
|
|
131
|
+
var HeaderUserMenu = function HeaderUserMenu() {
|
|
132
|
+
var headerUserPopoverId = (0, _services.useGeneratedHtmlId)({
|
|
133
|
+
prefix: 'headerUserPopover'
|
|
134
|
+
});
|
|
135
|
+
|
|
136
|
+
var _useState = (0, _react.useState)(false),
|
|
137
|
+
_useState2 = _slicedToArray(_useState, 2),
|
|
138
|
+
isOpen = _useState2[0],
|
|
139
|
+
setIsOpen = _useState2[1];
|
|
140
|
+
|
|
141
|
+
var onMenuButtonClick = function onMenuButtonClick() {
|
|
142
|
+
setIsOpen(!isOpen);
|
|
143
|
+
};
|
|
144
|
+
|
|
145
|
+
var closeMenu = function closeMenu() {
|
|
146
|
+
setIsOpen(false);
|
|
147
|
+
};
|
|
148
|
+
|
|
149
|
+
var button = (0, _react2.jsx)(_header_section.EuiHeaderSectionItemButton, {
|
|
150
|
+
"aria-controls": headerUserPopoverId,
|
|
151
|
+
"aria-expanded": isOpen,
|
|
152
|
+
"aria-haspopup": "true",
|
|
153
|
+
"aria-label": "Account menu",
|
|
154
|
+
onClick: onMenuButtonClick
|
|
155
|
+
}, (0, _react2.jsx)(_avatar.EuiAvatar, {
|
|
156
|
+
name: "John Username",
|
|
157
|
+
size: "s"
|
|
158
|
+
}));
|
|
159
|
+
return (0, _react2.jsx)(_popover.EuiPopover, {
|
|
160
|
+
id: headerUserPopoverId,
|
|
161
|
+
button: button,
|
|
162
|
+
isOpen: isOpen,
|
|
163
|
+
anchorPosition: "downRight",
|
|
164
|
+
closePopover: closeMenu,
|
|
165
|
+
panelPaddingSize: "none",
|
|
166
|
+
"data-test-subj": "cy-account-menu"
|
|
167
|
+
}, (0, _react2.jsx)("div", {
|
|
168
|
+
style: {
|
|
169
|
+
width: 320
|
|
170
|
+
}
|
|
171
|
+
}, (0, _react2.jsx)(_flex.EuiFlexGroup, {
|
|
172
|
+
gutterSize: "m",
|
|
173
|
+
className: "euiHeaderProfile",
|
|
174
|
+
responsive: false
|
|
175
|
+
}, (0, _react2.jsx)(_flex.EuiFlexItem, {
|
|
176
|
+
grow: false
|
|
177
|
+
}, (0, _react2.jsx)(_avatar.EuiAvatar, {
|
|
178
|
+
name: "John Username",
|
|
179
|
+
size: "xl"
|
|
180
|
+
})), (0, _react2.jsx)(_flex.EuiFlexItem, null, (0, _react2.jsx)(_text.EuiText, null, (0, _react2.jsx)("p", null, "John Username")), (0, _react2.jsx)(_spacer.EuiSpacer, {
|
|
181
|
+
size: "m"
|
|
182
|
+
}), (0, _react2.jsx)(_flex.EuiFlexGroup, null, (0, _react2.jsx)(_flex.EuiFlexItem, null, (0, _react2.jsx)(_flex.EuiFlexGroup, {
|
|
183
|
+
justifyContent: "spaceBetween"
|
|
184
|
+
}, (0, _react2.jsx)(_flex.EuiFlexItem, {
|
|
185
|
+
grow: false
|
|
186
|
+
}, (0, _react2.jsx)(_link.EuiLink, null, "Edit profile")), (0, _react2.jsx)(_flex.EuiFlexItem, {
|
|
187
|
+
grow: false
|
|
188
|
+
}, (0, _react2.jsx)(_link.EuiLink, null, "Log out")))))))));
|
|
189
|
+
};
|
|
190
|
+
|
|
191
|
+
var HeaderSpacesMenu = function HeaderSpacesMenu() {
|
|
192
|
+
var headerSpacesPopoverId = (0, _services.useGeneratedHtmlId)({
|
|
193
|
+
prefix: 'headerSpacesPopover'
|
|
194
|
+
});
|
|
195
|
+
var spacesValues = [{
|
|
196
|
+
label: 'Sales team',
|
|
197
|
+
prepend: (0, _react2.jsx)(_avatar.EuiAvatar, {
|
|
198
|
+
type: "space",
|
|
199
|
+
name: "Sales Team",
|
|
200
|
+
size: "s"
|
|
201
|
+
}),
|
|
202
|
+
checked: 'on'
|
|
203
|
+
}, {
|
|
204
|
+
label: 'Engineering',
|
|
205
|
+
prepend: (0, _react2.jsx)(_avatar.EuiAvatar, {
|
|
206
|
+
type: "space",
|
|
207
|
+
name: "Engineering",
|
|
208
|
+
size: "s"
|
|
209
|
+
})
|
|
210
|
+
}];
|
|
211
|
+
|
|
212
|
+
var _useState3 = (0, _react.useState)(spacesValues),
|
|
213
|
+
_useState4 = _slicedToArray(_useState3, 2),
|
|
214
|
+
spaces = _useState4[0],
|
|
215
|
+
setSpaces = _useState4[1];
|
|
216
|
+
|
|
217
|
+
var _useState5 = (0, _react.useState)(spaces.filter(function (option) {
|
|
218
|
+
return option.checked;
|
|
219
|
+
})[0]),
|
|
220
|
+
_useState6 = _slicedToArray(_useState5, 2),
|
|
221
|
+
selectedSpace = _useState6[0],
|
|
222
|
+
setSelectedSpace = _useState6[1];
|
|
223
|
+
|
|
224
|
+
var _useState7 = (0, _react.useState)(false),
|
|
225
|
+
_useState8 = _slicedToArray(_useState7, 2),
|
|
226
|
+
isOpen = _useState8[0],
|
|
227
|
+
setIsOpen = _useState8[1];
|
|
228
|
+
|
|
229
|
+
var isListExtended = function isListExtended() {
|
|
230
|
+
return spaces.length > 4 ? true : false;
|
|
231
|
+
};
|
|
232
|
+
|
|
233
|
+
var onMenuButtonClick = function onMenuButtonClick() {
|
|
234
|
+
setIsOpen(!isOpen);
|
|
235
|
+
};
|
|
236
|
+
|
|
237
|
+
var closePopover = function closePopover() {
|
|
238
|
+
setIsOpen(false);
|
|
239
|
+
};
|
|
240
|
+
|
|
241
|
+
var onChange = function onChange(options) {
|
|
242
|
+
setSpaces(options);
|
|
243
|
+
setSelectedSpace(options.filter(function (option) {
|
|
244
|
+
return option.checked;
|
|
245
|
+
})[0]);
|
|
246
|
+
setIsOpen(false);
|
|
247
|
+
};
|
|
248
|
+
|
|
249
|
+
var button = (0, _react2.jsx)(_header_section.EuiHeaderSectionItemButton, {
|
|
250
|
+
"aria-controls": headerSpacesPopoverId,
|
|
251
|
+
"aria-expanded": isOpen,
|
|
252
|
+
"aria-haspopup": "true",
|
|
253
|
+
"aria-label": "Spaces menu",
|
|
254
|
+
onClick: onMenuButtonClick
|
|
255
|
+
}, selectedSpace.prepend);
|
|
256
|
+
return (0, _react2.jsx)(_popover.EuiPopover, {
|
|
257
|
+
id: headerSpacesPopoverId,
|
|
258
|
+
button: button,
|
|
259
|
+
isOpen: isOpen,
|
|
260
|
+
anchorPosition: "downLeft",
|
|
261
|
+
closePopover: closePopover,
|
|
262
|
+
panelPaddingSize: "none"
|
|
263
|
+
}, (0, _react2.jsx)(_selectable.EuiSelectable, {
|
|
264
|
+
searchable: isListExtended(),
|
|
265
|
+
searchProps: {
|
|
266
|
+
placeholder: 'Find a space',
|
|
267
|
+
compressed: true
|
|
268
|
+
},
|
|
269
|
+
options: spaces,
|
|
270
|
+
singleSelection: "always",
|
|
271
|
+
style: {
|
|
272
|
+
width: 300
|
|
273
|
+
},
|
|
274
|
+
onChange: onChange,
|
|
275
|
+
listProps: {
|
|
276
|
+
rowHeight: 40,
|
|
277
|
+
showIcons: false
|
|
278
|
+
},
|
|
279
|
+
"data-test-subj": "cy-spaces-menu"
|
|
280
|
+
}, function (list, search) {
|
|
281
|
+
return (0, _react2.jsx)(_react.default.Fragment, null, (0, _react2.jsx)(_popover.EuiPopoverTitle, {
|
|
282
|
+
paddingSize: "s"
|
|
283
|
+
}, search || 'Your spaces'), list);
|
|
284
|
+
}));
|
|
285
|
+
};
|
|
286
|
+
|
|
287
|
+
var HeaderAppMenu = function HeaderAppMenu() {
|
|
288
|
+
var headerAppPopoverId = (0, _services.useGeneratedHtmlId)({
|
|
289
|
+
prefix: 'headerAppPopover'
|
|
290
|
+
});
|
|
291
|
+
var headerAppKeyPadMenuId = (0, _services.useGeneratedHtmlId)({
|
|
292
|
+
prefix: 'headerAppKeyPadMenu'
|
|
293
|
+
});
|
|
294
|
+
|
|
295
|
+
var _useState9 = (0, _react.useState)(false),
|
|
296
|
+
_useState10 = _slicedToArray(_useState9, 2),
|
|
297
|
+
isOpen = _useState10[0],
|
|
298
|
+
setIsOpen = _useState10[1];
|
|
299
|
+
|
|
300
|
+
var onMenuButtonClick = function onMenuButtonClick() {
|
|
301
|
+
setIsOpen(!isOpen);
|
|
302
|
+
};
|
|
303
|
+
|
|
304
|
+
var closeMenu = function closeMenu() {
|
|
305
|
+
setIsOpen(false);
|
|
306
|
+
};
|
|
307
|
+
|
|
308
|
+
var button = (0, _react2.jsx)(_header_section.EuiHeaderSectionItemButton, {
|
|
309
|
+
"aria-controls": headerAppKeyPadMenuId,
|
|
310
|
+
"aria-expanded": isOpen,
|
|
311
|
+
"aria-haspopup": "true",
|
|
312
|
+
"aria-label": "Apps menu with 1 new app",
|
|
313
|
+
notification: "1",
|
|
314
|
+
onClick: onMenuButtonClick
|
|
315
|
+
}, (0, _react2.jsx)(_icon.EuiIcon, {
|
|
316
|
+
type: "apps",
|
|
317
|
+
size: "m"
|
|
318
|
+
}));
|
|
319
|
+
return (0, _react2.jsx)(_popover.EuiPopover, {
|
|
320
|
+
id: headerAppPopoverId,
|
|
321
|
+
button: button,
|
|
322
|
+
isOpen: isOpen,
|
|
323
|
+
anchorPosition: "downRight",
|
|
324
|
+
closePopover: closeMenu
|
|
325
|
+
}, (0, _react2.jsx)(_key_pad_menu.EuiKeyPadMenu, {
|
|
326
|
+
id: headerAppKeyPadMenuId,
|
|
327
|
+
style: {
|
|
328
|
+
width: 288
|
|
329
|
+
},
|
|
330
|
+
"data-test-subj": "cy-apps-menu"
|
|
331
|
+
}, (0, _react2.jsx)(_key_pad_menu.EuiKeyPadMenuItem, {
|
|
332
|
+
label: "Discover"
|
|
333
|
+
}, (0, _react2.jsx)(_icon.EuiIcon, {
|
|
334
|
+
type: "discoverApp",
|
|
335
|
+
size: "l"
|
|
336
|
+
})), (0, _react2.jsx)(_key_pad_menu.EuiKeyPadMenuItem, {
|
|
337
|
+
label: "Dashboard"
|
|
338
|
+
}, (0, _react2.jsx)(_icon.EuiIcon, {
|
|
339
|
+
type: "dashboardApp",
|
|
340
|
+
size: "l"
|
|
341
|
+
})), (0, _react2.jsx)(_key_pad_menu.EuiKeyPadMenuItem, {
|
|
342
|
+
label: "Dev Tools"
|
|
343
|
+
}, (0, _react2.jsx)(_icon.EuiIcon, {
|
|
344
|
+
type: "devToolsApp",
|
|
345
|
+
size: "l"
|
|
346
|
+
}))));
|
|
347
|
+
};
|
|
348
|
+
|
|
349
|
+
beforeEach(function () {
|
|
350
|
+
cy.viewport(1024, 768); // medium breakpoint
|
|
351
|
+
|
|
352
|
+
cy.realMount((0, _react2.jsx)(Header, null));
|
|
353
|
+
});
|
|
354
|
+
describe('EuiHeader', function () {
|
|
355
|
+
describe('Automated accessibility check', function () {
|
|
356
|
+
it('has zero violations on first render', function () {
|
|
357
|
+
cy.checkAxe();
|
|
358
|
+
});
|
|
359
|
+
it('has zero violations when Spaces menu is expanded', function () {
|
|
360
|
+
cy.get('button[aria-label="Spaces menu"]').realClick();
|
|
361
|
+
cy.get('div[data-test-subj="cy-spaces-menu"]').should('exist');
|
|
362
|
+
cy.checkAxe();
|
|
363
|
+
});
|
|
364
|
+
it('has zero violations when Account menu is expanded', function () {
|
|
365
|
+
cy.get('button[aria-label="Account menu"]').realClick();
|
|
366
|
+
cy.get('div[data-test-subj="cy-account-menu"]').should('exist');
|
|
367
|
+
cy.checkAxe();
|
|
368
|
+
});
|
|
369
|
+
it('has zero violations when Sitewide search is expanded', function () {
|
|
370
|
+
cy.get('button[aria-label="Sitewide search"]').realClick();
|
|
371
|
+
cy.get('div[data-test-subj="cy-search-menu"]').should('exist');
|
|
372
|
+
cy.checkAxe();
|
|
373
|
+
});
|
|
374
|
+
it('has zero violations when Apps menu is expanded', function () {
|
|
375
|
+
cy.get('button[aria-label="Apps menu with 1 new app"]').realClick();
|
|
376
|
+
cy.get('ul[data-test-subj="cy-apps-menu"]').should('exist');
|
|
377
|
+
cy.checkAxe();
|
|
378
|
+
});
|
|
379
|
+
it('has zero violations when a hidden breadcrumb is expanded', function () {
|
|
380
|
+
cy.get('button[aria-label="See collapsed breadcrumbs"]').realClick();
|
|
381
|
+
cy.get('a[data-test-subj="cy-breadcrumb-hidden"]').should('exist');
|
|
382
|
+
cy.checkAxe();
|
|
383
|
+
});
|
|
384
|
+
});
|
|
385
|
+
});
|
|
@@ -0,0 +1,40 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
var _react = _interopRequireDefault(require("react"));
|
|
4
|
+
|
|
5
|
+
var _icon = require("./icon");
|
|
6
|
+
|
|
7
|
+
var _react2 = require("@emotion/react");
|
|
8
|
+
|
|
9
|
+
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
|
|
10
|
+
|
|
11
|
+
/*
|
|
12
|
+
* Copyright Elasticsearch B.V. and/or licensed to Elasticsearch B.V. under one
|
|
13
|
+
* or more contributor license agreements. Licensed under the Elastic License
|
|
14
|
+
* 2.0 and the Server Side Public License, v 1; you may not use this file except
|
|
15
|
+
* in compliance with, at your election, the Elastic License 2.0 or the Server
|
|
16
|
+
* Side Public License, v 1.
|
|
17
|
+
*/
|
|
18
|
+
/// <reference types="../../../cypress/support"/>
|
|
19
|
+
describe('EuiIcons', function () {
|
|
20
|
+
describe('Automated accessibility check for ML icons', function () {
|
|
21
|
+
var MLIcons = ['dataVisualizer', 'createAdvancedJob', 'classificationJob', 'createMultiMetricJob', 'outlierDetectionJob', 'createPopulationJob', 'regressionJob', 'createSingleMetricJob'];
|
|
22
|
+
|
|
23
|
+
var MLGrid = function MLGrid() {
|
|
24
|
+
return (0, _react2.jsx)("div", null, MLIcons.map(function (glyph) {
|
|
25
|
+
return (0, _react2.jsx)(_icon.EuiIcon, {
|
|
26
|
+
className: "eui-alignMiddle",
|
|
27
|
+
type: glyph
|
|
28
|
+
});
|
|
29
|
+
}));
|
|
30
|
+
};
|
|
31
|
+
|
|
32
|
+
it('has zero violations on first render', function () {
|
|
33
|
+
cy.mount((0, _react2.jsx)(MLGrid, null));
|
|
34
|
+
cy.get('div[data-cy-root]').find('svg', {
|
|
35
|
+
timeout: 5000
|
|
36
|
+
}).should('have.length', 8);
|
|
37
|
+
cy.checkAxe();
|
|
38
|
+
});
|
|
39
|
+
});
|
|
40
|
+
});
|
|
@@ -0,0 +1,40 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
var _react = _interopRequireDefault(require("react"));
|
|
4
|
+
|
|
5
|
+
var _icon = require("./icon");
|
|
6
|
+
|
|
7
|
+
var _react2 = require("@emotion/react");
|
|
8
|
+
|
|
9
|
+
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
|
|
10
|
+
|
|
11
|
+
/*
|
|
12
|
+
* Copyright Elasticsearch B.V. and/or licensed to Elasticsearch B.V. under one
|
|
13
|
+
* or more contributor license agreements. Licensed under the Elastic License
|
|
14
|
+
* 2.0 and the Server Side Public License, v 1; you may not use this file except
|
|
15
|
+
* in compliance with, at your election, the Elastic License 2.0 or the Server
|
|
16
|
+
* Side Public License, v 1.
|
|
17
|
+
*/
|
|
18
|
+
/// <reference types="../../../cypress/support"/>
|
|
19
|
+
describe('EuiIcons', function () {
|
|
20
|
+
describe('Automated accessibility check for app icons', function () {
|
|
21
|
+
var AppIcons = ['addDataApp', 'advancedSettingsApp', 'agentApp', 'apmApp', 'appSearchApp', 'auditbeatApp', 'canvasApp', 'casesApp', 'codeApp', 'consoleApp', 'crossClusterReplicationApp', 'dashboardApp', 'devToolsApp', 'discoverApp', 'emsApp', 'filebeatApp', 'fleetApp', 'gisApp', 'graphApp', 'grokApp', 'heartbeatApp', 'indexManagementApp', 'indexPatternApp', 'indexRollupApp', 'lensApp', 'logsApp', 'machineLearningApp', 'managementApp', 'metricbeatApp', 'metricsApp', 'monitoringApp', 'notebookApp', 'packetbeatApp', 'pipelineApp', 'recentlyViewedApp', 'reportingApp', 'savedObjectsApp', 'searchProfilerApp', 'securityAnalyticsApp', 'securityApp', 'spacesApp', 'sqlApp', 'timelionApp', 'upgradeAssistantApp', 'uptimeApp', 'usersRolesApp', 'visualizeApp', 'watchesApp', 'workplaceSearchApp'];
|
|
22
|
+
|
|
23
|
+
var AppGrid = function AppGrid() {
|
|
24
|
+
return (0, _react2.jsx)("div", null, AppIcons.map(function (glyph) {
|
|
25
|
+
return (0, _react2.jsx)(_icon.EuiIcon, {
|
|
26
|
+
className: "eui-alignMiddle",
|
|
27
|
+
type: glyph
|
|
28
|
+
});
|
|
29
|
+
}));
|
|
30
|
+
};
|
|
31
|
+
|
|
32
|
+
it('has zero violations on first render', function () {
|
|
33
|
+
cy.mount((0, _react2.jsx)(AppGrid, null));
|
|
34
|
+
cy.get('div[data-cy-root]').find('svg', {
|
|
35
|
+
timeout: 5000
|
|
36
|
+
}).should('have.length', 49);
|
|
37
|
+
cy.checkAxe();
|
|
38
|
+
});
|
|
39
|
+
});
|
|
40
|
+
});
|
|
@@ -0,0 +1,40 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
var _react = _interopRequireDefault(require("react"));
|
|
4
|
+
|
|
5
|
+
var _icon = require("./icon");
|
|
6
|
+
|
|
7
|
+
var _react2 = require("@emotion/react");
|
|
8
|
+
|
|
9
|
+
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
|
|
10
|
+
|
|
11
|
+
/*
|
|
12
|
+
* Copyright Elasticsearch B.V. and/or licensed to Elasticsearch B.V. under one
|
|
13
|
+
* or more contributor license agreements. Licensed under the Elastic License
|
|
14
|
+
* 2.0 and the Server Side Public License, v 1; you may not use this file except
|
|
15
|
+
* in compliance with, at your election, the Elastic License 2.0 or the Server
|
|
16
|
+
* Side Public License, v 1.
|
|
17
|
+
*/
|
|
18
|
+
/// <reference types="../../../cypress/support"/>
|
|
19
|
+
describe('EuiIcons', function () {
|
|
20
|
+
describe('Automated accessibility check for editor icons', function () {
|
|
21
|
+
var EditorIcons = ['editorAlignCenter', 'editorAlignLeft', 'editorAlignRight', 'editorBold', 'editorChecklist', 'editorCodeBlock', 'editorComment', 'editorDistributeHorizontal', 'editorDistributeVertical', 'editorHeading', 'editorItalic', 'editorItemAlignBottom', 'editorItemAlignCenter', 'editorItemAlignLeft', 'editorItemAlignMiddle', 'editorItemAlignRight', 'editorItemAlignTop', 'editorLink', 'editorOrderedList', 'editorPositionBottomLeft', 'editorPositionBottomRight', 'editorPositionTopLeft', 'editorPositionTopRight', 'editorRedo', 'editorStrike', 'editorTable', 'editorUnderline', 'editorUndo', 'editorUnorderedList'];
|
|
22
|
+
|
|
23
|
+
var EditorGrid = function EditorGrid() {
|
|
24
|
+
return (0, _react2.jsx)("div", null, EditorIcons.map(function (glyph) {
|
|
25
|
+
return (0, _react2.jsx)(_icon.EuiIcon, {
|
|
26
|
+
className: "eui-alignMiddle",
|
|
27
|
+
type: glyph
|
|
28
|
+
});
|
|
29
|
+
}));
|
|
30
|
+
};
|
|
31
|
+
|
|
32
|
+
it('has zero violations on first render', function () {
|
|
33
|
+
cy.mount((0, _react2.jsx)(EditorGrid, null));
|
|
34
|
+
cy.get('div[data-cy-root]').find('svg', {
|
|
35
|
+
timeout: 5000
|
|
36
|
+
}).should('have.length', 29);
|
|
37
|
+
cy.checkAxe();
|
|
38
|
+
});
|
|
39
|
+
});
|
|
40
|
+
});
|
|
@@ -0,0 +1,40 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
var _react = _interopRequireDefault(require("react"));
|
|
4
|
+
|
|
5
|
+
var _icon = require("./icon");
|
|
6
|
+
|
|
7
|
+
var _react2 = require("@emotion/react");
|
|
8
|
+
|
|
9
|
+
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
|
|
10
|
+
|
|
11
|
+
/*
|
|
12
|
+
* Copyright Elasticsearch B.V. and/or licensed to Elasticsearch B.V. under one
|
|
13
|
+
* or more contributor license agreements. Licensed under the Elastic License
|
|
14
|
+
* 2.0 and the Server Side Public License, v 1; you may not use this file except
|
|
15
|
+
* in compliance with, at your election, the Elastic License 2.0 or the Server
|
|
16
|
+
* Side Public License, v 1.
|
|
17
|
+
*/
|
|
18
|
+
/// <reference types="../../../cypress/support"/>
|
|
19
|
+
describe('EuiIcons', function () {
|
|
20
|
+
describe('Automated accessibility check for Elastic logos', function () {
|
|
21
|
+
var ElasticLogos = ['logoElastic', 'logoElasticStack', 'logoElasticsearch', 'logoAppSearch', 'logoBeats', 'logoBusinessAnalytics', 'logoCloud', 'logoCloudEnterprise', 'logoEnterpriseSearch', 'logoKibana', 'logoLogging', 'logoLogstash', 'logoMaps', 'logoMetrics', 'logoObservability', 'logoSecurity', 'logoSiteSearch', 'logoUptime', 'logoWorkplaceSearch'];
|
|
22
|
+
|
|
23
|
+
var ElasticGrid = function ElasticGrid() {
|
|
24
|
+
return (0, _react2.jsx)("div", null, ElasticLogos.map(function (glyph) {
|
|
25
|
+
return (0, _react2.jsx)(_icon.EuiIcon, {
|
|
26
|
+
className: "eui-alignMiddle",
|
|
27
|
+
type: glyph
|
|
28
|
+
});
|
|
29
|
+
}));
|
|
30
|
+
};
|
|
31
|
+
|
|
32
|
+
it('has zero violations on first render', function () {
|
|
33
|
+
cy.mount((0, _react2.jsx)(ElasticGrid, null));
|
|
34
|
+
cy.get('div[data-cy-root]').find('svg', {
|
|
35
|
+
timeout: 5000
|
|
36
|
+
}).should('have.length', 19);
|
|
37
|
+
cy.checkAxe();
|
|
38
|
+
});
|
|
39
|
+
});
|
|
40
|
+
});
|
|
@@ -0,0 +1,40 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
var _react = _interopRequireDefault(require("react"));
|
|
4
|
+
|
|
5
|
+
var _icon = require("./icon");
|
|
6
|
+
|
|
7
|
+
var _react2 = require("@emotion/react");
|
|
8
|
+
|
|
9
|
+
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
|
|
10
|
+
|
|
11
|
+
/*
|
|
12
|
+
* Copyright Elasticsearch B.V. and/or licensed to Elasticsearch B.V. under one
|
|
13
|
+
* or more contributor license agreements. Licensed under the Elastic License
|
|
14
|
+
* 2.0 and the Server Side Public License, v 1; you may not use this file except
|
|
15
|
+
* in compliance with, at your election, the Elastic License 2.0 or the Server
|
|
16
|
+
* Side Public License, v 1.
|
|
17
|
+
*/
|
|
18
|
+
/// <reference types="../../../cypress/support"/>
|
|
19
|
+
describe('EuiIcons', function () {
|
|
20
|
+
describe('Automated accessibility check for glyph icons', function () {
|
|
21
|
+
var GlyphIcons = ['accessibility', 'aggregate', 'alert', 'analyzeEvent', 'annotation', 'apmTrace', 'apps', 'arrowDown', 'arrowLeft', 'arrowRight', 'arrowUp', 'arrowStart', 'arrowEnd', 'article', 'asterisk', 'beaker', 'bell', 'bellSlash', 'beta', 'bolt', 'boxesHorizontal', 'boxesVertical', 'branch', 'branchUser', 'broom', 'brush', 'bug', 'bullseye', 'calendar', 'check', 'checkInCircleFilled', 'cheer', 'clock', 'cloudDrizzle', 'cloudStormy', 'cloudSunny', 'cluster', 'color', 'compute', 'console', 'container', 'continuityAbove', 'continuityAboveBelow', 'continuityBelow', 'continuityWithin', 'controlsHorizontal', 'controlsVertical', 'copy', 'copyClipboard', 'cross', 'crosshairs', 'crossInACircleFilled', 'currency', 'cut', 'database', 'desktop', 'discuss', 'document', 'documents', 'documentEdit', 'documentation', 'dot', 'dotInCircle', 'doubleArrowLeft', 'doubleArrowRight', 'download', 'email', 'empty', 'eql', 'eraser', 'exit', 'expand', 'expandMini', 'exportAction', 'eye', 'eyeClosed', 'faceHappy', 'faceNeutral', 'faceSad', 'filter', 'filterExclude', 'filterIgnore', 'filterInclude', 'filterInCircle', 'flag', 'fold', 'folderCheck', 'folderClosed', 'folderExclamation', 'folderOpen', 'frameNext', 'framePrevious', 'fullScreen', 'fullScreenExit', 'function', 'gear', 'glasses', 'globe', 'grab', 'grabHorizontal', 'grid', 'heart', 'heatmap', 'help', 'home', 'iInCircle', 'image', 'importAction', 'indexClose', 'indexEdit', 'indexFlush', 'indexMapping', 'indexOpen', 'indexRuntime', 'indexSettings', 'indexTemporary', 'infinity', 'inputOutput', 'inspect', 'invert', 'ip', 'keyboard', 'kqlField', 'kqlFunction', 'kqlOperand', 'kqlSelector', 'kqlValue', 'kubernetesNode', 'kubernetesPod', 'launch', 'layers', 'lettering', 'lineDashed', 'lineDotted', 'lineSolid', 'link', 'list', 'listAdd', 'lock', 'lockOpen', 'logstashFilter', 'logstashIf', 'logstashInput', 'logstashOutput', 'logstashQueue', 'magnifyWithExclamation', 'magnifyWithMinus', 'magnifyWithPlus', 'magnet', 'mapMarker', 'memory', 'merge', 'menu', 'menuDown', 'menuLeft', 'menuRight', 'menuUp', 'minimize', 'minus', 'minusInCircle', 'minusInCircleFilled', 'mobile', 'moon', 'namespace', 'nested', 'node', 'number', 'offline', 'online', 'package', 'pageSelect', 'pagesSelect', 'paperClip', 'partial', 'pause', 'payment', 'pencil', 'percent', 'pin', 'pinFilled', 'play', 'playFilled', 'plus', 'plusInCircle', 'plusInCircleFilled', 'popout', 'push', 'questionInCircle', 'quote', 'refresh', 'reporter', 'returnKey', 'save', 'scale', 'search', 'securitySignal', 'securitySignalDetected', 'securitySignalResolved', 'sessionViewer', 'shard', 'share', 'snowflake', 'sortable', 'sortAscending', 'sortDescending', 'sortDown', 'sortLeft', 'sortRight', 'sortUp', 'spaces', 'starEmpty', 'starEmptySpace', 'starFilled', 'starFilledSpace', 'starMinusEmpty', 'starMinusFilled', 'starPlusEmpty', 'starPlusFilled', 'stats', 'stop', 'stopFilled', 'stopSlash', 'storage', 'string', 'submodule', 'sun', 'symlink', 'tableOfContents', 'tableDensityExpanded', 'tableDensityCompact', 'tableDensityNormal', 'tag', 'tear', 'temperature', 'timeline', 'timeRefresh', 'timeslider', 'training', 'trash', 'unfold', 'unlink', 'user', 'userAvatar', 'users', 'vector', 'videoPlayer', 'visArea', 'visAreaStacked', 'visBarHorizontal', 'visBarHorizontalStacked', 'visBarVertical', 'visBarVerticalStacked', 'visGauge', 'visGoal', 'visLine', 'visMapCoordinate', 'visMapRegion', 'visMetric', 'visPie', 'visTable', 'visTagCloud', 'visText', 'visTimelion', 'visVega', 'visVisualBuilder', 'wordWrap', 'wordWrapDisabled', 'wrench'];
|
|
22
|
+
|
|
23
|
+
var GlyphGrid = function GlyphGrid() {
|
|
24
|
+
return (0, _react2.jsx)("div", null, GlyphIcons.map(function (glyph) {
|
|
25
|
+
return (0, _react2.jsx)(_icon.EuiIcon, {
|
|
26
|
+
className: "eui-alignMiddle",
|
|
27
|
+
type: glyph
|
|
28
|
+
});
|
|
29
|
+
}));
|
|
30
|
+
};
|
|
31
|
+
|
|
32
|
+
it('has zero violations on first render', function () {
|
|
33
|
+
cy.mount((0, _react2.jsx)(GlyphGrid, null));
|
|
34
|
+
cy.get('svg[data-icon-type="wrench"]', {
|
|
35
|
+
timeout: 5000
|
|
36
|
+
}).should('exist');
|
|
37
|
+
cy.checkAxe();
|
|
38
|
+
});
|
|
39
|
+
});
|
|
40
|
+
});
|
|
@@ -0,0 +1,40 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
var _react = _interopRequireDefault(require("react"));
|
|
4
|
+
|
|
5
|
+
var _icon = require("./icon");
|
|
6
|
+
|
|
7
|
+
var _react2 = require("@emotion/react");
|
|
8
|
+
|
|
9
|
+
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
|
|
10
|
+
|
|
11
|
+
/*
|
|
12
|
+
* Copyright Elasticsearch B.V. and/or licensed to Elasticsearch B.V. under one
|
|
13
|
+
* or more contributor license agreements. Licensed under the Elastic License
|
|
14
|
+
* 2.0 and the Server Side Public License, v 1; you may not use this file except
|
|
15
|
+
* in compliance with, at your election, the Elastic License 2.0 or the Server
|
|
16
|
+
* Side Public License, v 1.
|
|
17
|
+
*/
|
|
18
|
+
/// <reference types="../../../cypress/support"/>
|
|
19
|
+
describe('EuiIcons', function () {
|
|
20
|
+
describe('Automated accessibility check for token icons', function () {
|
|
21
|
+
var TokenIcons = ['tokenAlias', 'tokenAnnotation', 'tokenArray', 'tokenBinary', 'tokenBoolean', 'tokenClass', 'tokenCompletionSuggester', 'tokenConstant', 'tokenDate', 'tokenDenseVector', 'tokenElement', 'tokenEnum', 'tokenEnumMember', 'tokenEvent', 'tokenException', 'tokenField', 'tokenFile', 'tokenFlattened', 'tokenFunction', 'tokenGeo', 'tokenHistogram', 'tokenInterface', 'tokenIP', 'tokenJoin', 'tokenKey', 'tokenKeyword', 'tokenMethod', 'tokenMetricCounter', 'tokenMetricGauge', 'tokenModule', 'tokenNamespace', 'tokenNested', 'tokenNull', 'tokenNumber', 'tokenObject', 'tokenOperator', 'tokenPackage', 'tokenParameter', 'tokenPercolator', 'tokenProperty', 'tokenRange', 'tokenRankFeature', 'tokenRankFeatures', 'tokenRepo', 'tokenSearchType', 'tokenShape', 'tokenString', 'tokenStruct', 'tokenSymbol', 'tokenTag', 'tokenText', 'tokenTokenCount', 'tokenVariable'];
|
|
22
|
+
|
|
23
|
+
var TokenGrid = function TokenGrid() {
|
|
24
|
+
return (0, _react2.jsx)("div", null, TokenIcons.map(function (glyph) {
|
|
25
|
+
return (0, _react2.jsx)(_icon.EuiIcon, {
|
|
26
|
+
className: "eui-alignMiddle",
|
|
27
|
+
type: glyph
|
|
28
|
+
});
|
|
29
|
+
}));
|
|
30
|
+
};
|
|
31
|
+
|
|
32
|
+
it('has zero violations on first render', function () {
|
|
33
|
+
cy.mount((0, _react2.jsx)(TokenGrid, null));
|
|
34
|
+
cy.get('div[data-cy-root]').find('svg', {
|
|
35
|
+
timeout: 5000
|
|
36
|
+
}).should('have.length', 53);
|
|
37
|
+
cy.checkAxe();
|
|
38
|
+
});
|
|
39
|
+
});
|
|
40
|
+
});
|
|
@@ -7,7 +7,7 @@ Object.defineProperty(exports, "__esModule", {
|
|
|
7
7
|
});
|
|
8
8
|
exports.getDefaultEuiMarkdownParsingPlugins = exports.defaultParsingPlugins = void 0;
|
|
9
9
|
|
|
10
|
-
var
|
|
10
|
+
var _remarkParseNoTrim = _interopRequireDefault(require("remark-parse-no-trim"));
|
|
11
11
|
|
|
12
12
|
var _remarkEmoji = _interopRequireDefault(require("remark-emoji"));
|
|
13
13
|
|
|
@@ -43,7 +43,7 @@ var getDefaultEuiMarkdownParsingPlugins = function getDefaultEuiMarkdownParsingP
|
|
|
43
43
|
exclude = _ref.exclude;
|
|
44
44
|
|
|
45
45
|
var excludeSet = new Set(exclude);
|
|
46
|
-
var parsingPlugins = [[
|
|
46
|
+
var parsingPlugins = [[_remarkParseNoTrim.default, {}], [_remark_prismjs.default, {}], [_remarkEmoji.default, {
|
|
47
47
|
emoticon: false
|
|
48
48
|
}], [_remarkBreaks.default, {}], [_markdown_link_validator.euiMarkdownLinkValidator, {
|
|
49
49
|
allowRelative: true,
|
|
@@ -32,6 +32,10 @@ var paddingSizeToClassNameMap = {
|
|
|
32
32
|
l: 'euiPageSideBar--paddingLarge'
|
|
33
33
|
};
|
|
34
34
|
var PADDING_SIZES = (0, _common.keysOf)(paddingSizeToClassNameMap);
|
|
35
|
+
/**
|
|
36
|
+
* @deprecated Use the new EuiPageSidebarProps in page/page_sidebar instead
|
|
37
|
+
*/
|
|
38
|
+
|
|
35
39
|
exports.PADDING_SIZES = PADDING_SIZES;
|
|
36
40
|
|
|
37
41
|
/**
|