@elastic/eui 116.1.0 → 116.2.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/es/components/avatar/avatar.js +1 -1
- package/es/components/badge/badge.js +1 -1
- package/es/components/badge/beta_badge/beta_badge.js +1 -1
- package/es/components/basic_table/basic_table.js +9 -6
- package/es/components/basic_table/in_memory_table.js +4 -4
- package/es/components/button/button_display/_button_display_content.js +1 -1
- package/es/components/button/button_empty/button_empty.js +1 -1
- package/es/components/button/button_icon/button_icon.js +1 -1
- package/es/components/call_out/call_out.js +1 -1
- package/es/components/card/card.js +1 -1
- package/es/components/collapsible_nav/collapsible_nav_group/collapsible_nav_group.js +1 -1
- package/es/components/collapsible_nav_beta/_kibana_solution/collapsible_nav_kibana_solution.js +1 -1
- package/es/components/collapsible_nav_beta/collapsible_nav_item/collapsed/collapsed_nav_button.js +1 -1
- package/es/components/collapsible_nav_beta/collapsible_nav_item/collapsed/collapsed_nav_item.js +2 -2
- package/es/components/collapsible_nav_beta/collapsible_nav_item/collapsed/collapsed_nav_popover.js +2 -2
- package/es/components/collapsible_nav_beta/collapsible_nav_item/collapsible_nav_item.js +4 -4
- package/es/components/comment_list/comment.js +2 -2
- package/es/components/comment_list/comment_event.js +1 -1
- package/es/components/comment_list/comment_list.js +2 -2
- package/es/components/comment_list/comment_timeline.js +1 -1
- package/es/components/context_menu/context_menu_item.js +1 -1
- package/es/components/context_menu/context_menu_panel_title.js +1 -1
- package/es/components/datagrid/body/cell/data_grid_cell.js +12 -12
- package/es/components/datagrid/body/cell/data_grid_cell_actions.styles.js +2 -2
- package/es/components/datagrid/body/data_grid_body.js +7 -7
- package/es/components/datagrid/body/data_grid_body_custom.js +7 -7
- package/es/components/datagrid/body/data_grid_body_virtualized.js +7 -7
- package/es/components/datagrid/body/header/data_grid_header_cell.js +6 -6
- package/es/components/datagrid/controls/column_sorting.js +7 -7
- package/es/components/datagrid/controls/column_sorting_draggable.js +1 -1
- package/es/components/datagrid/controls/data_grid_toolbar_control.js +1 -1
- package/es/components/datagrid/utils/in_memory.js +6 -6
- package/es/components/date_picker/date_picker.js +2 -2
- package/es/components/date_picker/date_picker_range.js +1 -1
- package/es/components/empty_prompt/empty_prompt.js +1 -1
- package/es/components/flyout/flyout_menu.js +2 -2
- package/es/components/flyout/manager/flyout_child.js +1 -1
- package/es/components/flyout/manager/flyout_managed.js +1 -1
- package/es/components/form/field_number/field_number.js +2 -2
- package/es/components/form/field_text/field_text.js +2 -2
- package/es/components/form/form_control_button/form_control_button.js +1 -1
- package/es/components/form/form_control_layout/append_prepend/form_append_prepend.js +2 -2
- package/es/components/form/form_control_layout/form_control_layout.js +2 -2
- package/es/components/form/form_control_layout/form_control_layout_custom_icon.js +1 -1
- package/es/components/form/form_control_layout/form_control_layout_icons.js +2 -2
- package/es/components/form/text_area/text_area.js +2 -2
- package/es/components/header/header_links/header_link.js +1 -1
- package/es/components/header/header_links/header_links.js +1 -1
- package/es/components/header/header_logo/header_logo.js +1 -1
- package/es/components/header/header_section/header_section_item_button.js +1 -1
- package/es/components/icon/assets/significant_events.js +39 -0
- package/es/components/icon/icon.js +1 -1
- package/es/components/icon/icon_glyphs.a11y.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_extra_action.js +1 -1
- package/es/components/list_group/pinnable_list_group/pinnable_list_group.js +4 -4
- package/es/components/list_item_layout/_list_item_layout.styles.js +1 -1
- package/es/components/loading/loading_logo.js +1 -1
- package/es/components/markdown_editor/markdown_editor.js +1 -1
- package/es/components/markdown_editor/markdown_editor_drop_zone.js +1 -1
- package/es/components/markdown_editor/markdown_editor_footer.js +1 -1
- package/es/components/markdown_editor/markdown_editor_toolbar.js +1 -1
- package/es/components/outside_click_detector/outside_click_detector.js +71 -108
- package/es/components/page/page_header/page_header_content.js +1 -1
- package/es/components/pagination/pagination_button.js +1 -1
- package/es/components/selectable/selectable_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/table/sticky_scrollbar/index.js +9 -0
- package/es/components/table/sticky_scrollbar/sticky_scrollbar.js +141 -0
- package/es/components/table/sticky_scrollbar/sticky_scrollbar.styles.js +27 -0
- package/es/components/table/table.js +22 -5
- package/es/components/table/table_header_cell.js +1 -1
- package/es/components/timeline/timeline_item_icon.js +1 -1
- package/es/components/toast/global_toast_list.js +1 -1
- package/es/components/toast/toast.js +1 -1
- package/es/components/tool_tip/icon_tip.js +1 -1
- package/eui.d.ts +47 -15
- package/lib/components/avatar/avatar.js +1 -1
- package/lib/components/badge/badge.js +1 -1
- package/lib/components/badge/beta_badge/beta_badge.js +1 -1
- package/lib/components/basic_table/basic_table.js +9 -6
- package/lib/components/basic_table/in_memory_table.js +4 -4
- package/lib/components/button/button_display/_button_display_content.js +1 -1
- package/lib/components/button/button_empty/button_empty.js +1 -1
- package/lib/components/button/button_icon/button_icon.js +1 -1
- package/lib/components/call_out/call_out.js +1 -1
- package/lib/components/card/card.js +1 -1
- package/lib/components/collapsible_nav/collapsible_nav_group/collapsible_nav_group.js +1 -1
- package/lib/components/collapsible_nav_beta/_kibana_solution/collapsible_nav_kibana_solution.js +1 -1
- package/lib/components/collapsible_nav_beta/collapsible_nav_item/collapsed/collapsed_nav_button.js +1 -1
- package/lib/components/collapsible_nav_beta/collapsible_nav_item/collapsed/collapsed_nav_item.js +2 -2
- package/lib/components/collapsible_nav_beta/collapsible_nav_item/collapsed/collapsed_nav_popover.js +2 -2
- package/lib/components/collapsible_nav_beta/collapsible_nav_item/collapsible_nav_item.js +4 -4
- package/lib/components/comment_list/comment.js +2 -2
- package/lib/components/comment_list/comment_event.js +1 -1
- package/lib/components/comment_list/comment_list.js +2 -2
- package/lib/components/comment_list/comment_timeline.js +1 -1
- package/lib/components/context_menu/context_menu_item.js +1 -1
- package/lib/components/context_menu/context_menu_panel_title.js +1 -1
- package/lib/components/datagrid/body/cell/data_grid_cell.js +12 -12
- package/lib/components/datagrid/body/cell/data_grid_cell_actions.styles.js +1 -1
- package/lib/components/datagrid/body/data_grid_body.js +7 -7
- package/lib/components/datagrid/body/data_grid_body_custom.js +7 -7
- package/lib/components/datagrid/body/data_grid_body_virtualized.js +7 -7
- package/lib/components/datagrid/body/header/data_grid_header_cell.js +6 -6
- package/lib/components/datagrid/controls/column_sorting.js +7 -7
- package/lib/components/datagrid/controls/column_sorting_draggable.js +1 -1
- package/lib/components/datagrid/controls/data_grid_toolbar_control.js +1 -1
- package/lib/components/datagrid/utils/in_memory.js +6 -6
- package/lib/components/date_picker/date_picker.js +2 -2
- package/lib/components/date_picker/date_picker_range.js +1 -1
- package/lib/components/empty_prompt/empty_prompt.js +1 -1
- package/lib/components/flyout/flyout_menu.js +2 -2
- package/lib/components/flyout/manager/flyout_child.js +1 -1
- package/lib/components/form/field_number/field_number.js +2 -2
- package/lib/components/form/field_text/field_text.js +2 -2
- package/lib/components/form/form_control_button/form_control_button.js +1 -1
- package/lib/components/form/form_control_layout/append_prepend/form_append_prepend.js +2 -2
- package/lib/components/form/form_control_layout/form_control_layout.js +2 -2
- package/lib/components/form/form_control_layout/form_control_layout_custom_icon.js +1 -1
- package/lib/components/form/form_control_layout/form_control_layout_icons.js +2 -2
- package/lib/components/form/text_area/text_area.js +2 -2
- package/lib/components/header/header_links/header_link.js +1 -1
- package/lib/components/header/header_links/header_links.js +1 -1
- package/lib/components/header/header_logo/header_logo.js +1 -1
- package/lib/components/header/header_section/header_section_item_button.js +1 -1
- package/lib/components/icon/assets/significant_events.js +46 -0
- package/lib/components/icon/icon.js +1 -1
- package/lib/components/icon/icon_glyphs.a11y.js +1 -1
- package/lib/components/icon/icon_map.js +5 -0
- package/lib/components/icon/svgs/significant_events.svg +11 -0
- package/lib/components/key_pad_menu/key_pad_menu_item.js +1 -1
- package/lib/components/list_group/list_group.js +2 -2
- package/lib/components/list_group/list_group_item.js +2 -2
- package/lib/components/list_group/list_group_item_extra_action.js +1 -1
- package/lib/components/list_group/pinnable_list_group/pinnable_list_group.js +4 -4
- package/lib/components/list_item_layout/_list_item_layout.styles.js +1 -1
- package/lib/components/loading/loading_logo.js +1 -1
- package/lib/components/markdown_editor/markdown_editor.js +1 -1
- package/lib/components/markdown_editor/markdown_editor_drop_zone.js +1 -1
- package/lib/components/markdown_editor/markdown_editor_footer.js +1 -1
- package/lib/components/markdown_editor/markdown_editor_toolbar.js +1 -1
- package/lib/components/outside_click_detector/outside_click_detector.js +69 -106
- package/lib/components/page/page_header/page_header_content.js +1 -1
- package/lib/components/pagination/pagination_button.js +1 -1
- package/lib/components/selectable/selectable_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/table/sticky_scrollbar/index.js +12 -0
- package/lib/components/table/sticky_scrollbar/sticky_scrollbar.js +148 -0
- package/lib/components/table/sticky_scrollbar/sticky_scrollbar.styles.js +31 -0
- package/lib/components/table/table.js +25 -5
- package/lib/components/table/table_header_cell.js +1 -1
- package/lib/components/timeline/timeline_item_icon.js +1 -1
- package/lib/components/toast/global_toast_list.js +1 -1
- package/lib/components/toast/toast.js +1 -1
- package/lib/components/tool_tip/icon_tip.js +1 -1
- package/optimize/es/components/basic_table/basic_table.js +5 -2
- package/optimize/es/components/datagrid/body/cell/data_grid_cell_actions.styles.js +2 -2
- package/optimize/es/components/icon/assets/significant_events.js +38 -0
- package/optimize/es/components/icon/icon_glyphs.a11y.js +1 -1
- package/optimize/es/components/icon/icon_map.js +3 -0
- package/optimize/es/components/list_item_layout/_list_item_layout.styles.js +1 -1
- package/optimize/es/components/outside_click_detector/outside_click_detector.js +70 -104
- package/optimize/es/components/table/sticky_scrollbar/index.js +9 -0
- package/optimize/es/components/table/sticky_scrollbar/sticky_scrollbar.js +136 -0
- package/optimize/es/components/table/sticky_scrollbar/sticky_scrollbar.styles.js +27 -0
- package/optimize/es/components/table/table.js +12 -5
- package/optimize/lib/components/basic_table/basic_table.js +5 -2
- package/optimize/lib/components/datagrid/body/cell/data_grid_cell_actions.styles.js +1 -1
- package/optimize/lib/components/icon/assets/significant_events.js +46 -0
- package/optimize/lib/components/icon/icon_glyphs.a11y.js +1 -1
- package/optimize/lib/components/icon/icon_map.js +5 -0
- package/optimize/lib/components/icon/svgs/significant_events.svg +11 -0
- package/optimize/lib/components/list_item_layout/_list_item_layout.styles.js +1 -1
- package/optimize/lib/components/outside_click_detector/outside_click_detector.js +69 -103
- package/optimize/lib/components/table/sticky_scrollbar/index.js +12 -0
- package/optimize/lib/components/table/sticky_scrollbar/sticky_scrollbar.js +146 -0
- package/optimize/lib/components/table/sticky_scrollbar/sticky_scrollbar.styles.js +31 -0
- package/optimize/lib/components/table/table.js +15 -5
- package/package.json +2 -3
- package/test-env/components/avatar/avatar.js +1 -1
- package/test-env/components/badge/badge.js +1 -1
- package/test-env/components/badge/beta_badge/beta_badge.js +1 -1
- package/test-env/components/basic_table/basic_table.js +9 -6
- package/test-env/components/basic_table/in_memory_table.js +4 -4
- package/test-env/components/button/button_display/_button_display_content.js +1 -1
- package/test-env/components/button/button_empty/button_empty.js +1 -1
- package/test-env/components/button/button_icon/button_icon.js +1 -1
- package/test-env/components/call_out/call_out.js +1 -1
- package/test-env/components/card/card.js +1 -1
- package/test-env/components/collapsible_nav/collapsible_nav_group/collapsible_nav_group.js +1 -1
- package/test-env/components/collapsible_nav_beta/_kibana_solution/collapsible_nav_kibana_solution.js +1 -1
- package/test-env/components/collapsible_nav_beta/collapsible_nav_item/collapsed/collapsed_nav_button.js +1 -1
- package/test-env/components/collapsible_nav_beta/collapsible_nav_item/collapsed/collapsed_nav_item.js +2 -2
- package/test-env/components/collapsible_nav_beta/collapsible_nav_item/collapsed/collapsed_nav_popover.js +2 -2
- package/test-env/components/collapsible_nav_beta/collapsible_nav_item/collapsible_nav_item.js +4 -4
- package/test-env/components/comment_list/comment.js +2 -2
- package/test-env/components/comment_list/comment_event.js +1 -1
- package/test-env/components/comment_list/comment_list.js +2 -2
- package/test-env/components/comment_list/comment_timeline.js +1 -1
- package/test-env/components/context_menu/context_menu_item.js +1 -1
- package/test-env/components/context_menu/context_menu_panel_title.js +1 -1
- package/test-env/components/datagrid/body/cell/data_grid_cell.js +12 -12
- package/test-env/components/datagrid/body/cell/data_grid_cell_actions.styles.js +1 -1
- package/test-env/components/datagrid/body/data_grid_body.js +7 -7
- package/test-env/components/datagrid/body/data_grid_body_custom.js +7 -7
- package/test-env/components/datagrid/body/data_grid_body_virtualized.js +7 -7
- package/test-env/components/datagrid/body/header/data_grid_header_cell.js +6 -6
- package/test-env/components/datagrid/controls/column_sorting.js +7 -7
- package/test-env/components/datagrid/controls/column_sorting_draggable.js +1 -1
- package/test-env/components/datagrid/controls/data_grid_toolbar_control.js +1 -1
- package/test-env/components/datagrid/utils/in_memory.js +6 -6
- package/test-env/components/date_picker/date_picker.js +2 -2
- package/test-env/components/date_picker/date_picker_range.js +1 -1
- package/test-env/components/empty_prompt/empty_prompt.js +1 -1
- package/test-env/components/flyout/flyout_menu.js +2 -2
- package/test-env/components/flyout/manager/flyout_child.js +1 -1
- package/test-env/components/form/field_number/field_number.js +2 -2
- package/test-env/components/form/field_text/field_text.js +2 -2
- package/test-env/components/form/form_control_button/form_control_button.js +1 -1
- package/test-env/components/form/form_control_layout/append_prepend/form_append_prepend.js +2 -2
- package/test-env/components/form/form_control_layout/form_control_layout.js +2 -2
- package/test-env/components/form/form_control_layout/form_control_layout_custom_icon.js +1 -1
- package/test-env/components/form/form_control_layout/form_control_layout_icons.js +2 -2
- package/test-env/components/form/text_area/text_area.js +2 -2
- package/test-env/components/header/header_links/header_link.js +1 -1
- package/test-env/components/header/header_links/header_links.js +1 -1
- package/test-env/components/header/header_logo/header_logo.js +1 -1
- package/test-env/components/header/header_section/header_section_item_button.js +1 -1
- package/test-env/components/icon/assets/significant_events.js +46 -0
- package/test-env/components/icon/icon_glyphs.a11y.js +1 -1
- package/test-env/components/icon/icon_map.js +5 -0
- package/test-env/components/key_pad_menu/key_pad_menu_item.js +1 -1
- package/test-env/components/list_group/list_group.js +2 -2
- package/test-env/components/list_group/list_group_item.js +2 -2
- package/test-env/components/list_group/list_group_item_extra_action.js +1 -1
- package/test-env/components/list_group/pinnable_list_group/pinnable_list_group.js +4 -4
- package/test-env/components/list_item_layout/_list_item_layout.styles.js +1 -1
- package/test-env/components/loading/loading_logo.js +1 -1
- package/test-env/components/markdown_editor/markdown_editor.js +1 -1
- package/test-env/components/markdown_editor/markdown_editor_drop_zone.js +1 -1
- package/test-env/components/markdown_editor/markdown_editor_footer.js +1 -1
- package/test-env/components/markdown_editor/markdown_editor_toolbar.js +1 -1
- package/test-env/components/outside_click_detector/outside_click_detector.js +70 -104
- package/test-env/components/page/page_header/page_header_content.js +1 -1
- package/test-env/components/pagination/pagination_button.js +1 -1
- package/test-env/components/selectable/selectable_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/table/sticky_scrollbar/index.js +12 -0
- package/test-env/components/table/sticky_scrollbar/sticky_scrollbar.js +146 -0
- package/test-env/components/table/sticky_scrollbar/sticky_scrollbar.styles.js +31 -0
- package/test-env/components/table/table.js +25 -5
- package/test-env/components/table/table_header_cell.js +1 -1
- package/test-env/components/timeline/timeline_item_icon.js +1 -1
- package/test-env/components/toast/global_toast_list.js +1 -1
- package/test-env/components/toast/toast.js +1 -1
- package/test-env/components/tool_tip/icon_tip.js +1 -1
|
@@ -9,7 +9,7 @@ var _templateObject;
|
|
|
9
9
|
*/
|
|
10
10
|
|
|
11
11
|
import { css, keyframes } from '@emotion/react';
|
|
12
|
-
import { euiCanAnimate, logicalCSS, logicalSizeCSS, mathWithUnits } from '../../../../global_styling';
|
|
12
|
+
import { euiCanAnimate, euiDisabledSelector, logicalCSS, logicalSizeCSS, mathWithUnits } from '../../../../global_styling';
|
|
13
13
|
import { highContrastModeStyles } from '../../../../global_styling/functions/high_contrast';
|
|
14
14
|
import { euiDataGridVariables } from '../../data_grid.styles';
|
|
15
15
|
import { euiDataGridCellOutlineStyles, euiDataGridCellOutlineSelectors } from './data_grid_cell.styles';
|
|
@@ -28,7 +28,7 @@ export var euiDataGridCellActionsStyles = function euiDataGridCellActionsStyles(
|
|
|
28
28
|
})), " background-color:inherit;}", cellSelectors.hoverColor, " &{background-color:", cellOutline.hoverColor, ";border-color:", cellOutline.hoverColor, ";}", euiCanAnimate, "{transform:scaleY(0);transform-origin:bottom;", cellSelectors.showAnimation, " &{animation-duration:", euiTheme.animation.fast, ";animation-name:", slideUp, ";animation-iteration-count:1;animation-fill-mode:forwards;}", cellSelectors.hoverAnimation, " &{animation-delay:", euiTheme.animation.slow, ";}};label:euiDataGridRowCell__actions;"),
|
|
29
29
|
euiDataGridRowCell__actionButtonIcon: /*#__PURE__*/css(logicalCSS('width', euiTheme.size.base), " ", logicalCSS('height', mathWithUnits([euiTheme.size.base, euiTheme.size.xs], function (x, y) {
|
|
30
30
|
return x + y;
|
|
31
|
-
})), " border-radius:0
|
|
31
|
+
})), " border-radius:0;&,& svg{background-color:transparent!important;}&:not(", euiDisabledSelector, "),&:not(", euiDisabledSelector, ") svg{color:currentColor!important;fill:currentColor!important;}", highContrastModeStyles(euiThemeContext, {
|
|
32
32
|
preferred: 'border: none;'
|
|
33
33
|
}), ";;label:euiDataGridRowCell__actionButtonIcon;")
|
|
34
34
|
};
|
|
@@ -0,0 +1,38 @@
|
|
|
1
|
+
import _extends from "@babel/runtime/helpers/extends";
|
|
2
|
+
import _objectWithoutProperties from "@babel/runtime/helpers/objectWithoutProperties";
|
|
3
|
+
var _excluded = ["title", "titleId"];
|
|
4
|
+
/*
|
|
5
|
+
* Copyright Elasticsearch B.V. and/or licensed to Elasticsearch B.V. under one
|
|
6
|
+
* or more contributor license agreements. Licensed under the Elastic License
|
|
7
|
+
* 2.0 and the Server Side Public License, v 1; you may not use this file except
|
|
8
|
+
* in compliance with, at your election, the Elastic License 2.0 or the Server
|
|
9
|
+
* Side Public License, v 1.
|
|
10
|
+
*/
|
|
11
|
+
|
|
12
|
+
// THIS IS A GENERATED FILE. DO NOT MODIFY MANUALLY. @see scripts/compile-icons.js
|
|
13
|
+
|
|
14
|
+
import * as React from 'react';
|
|
15
|
+
import { jsx as ___EmotionJSX } from "@emotion/react";
|
|
16
|
+
var EuiIconSignificantEvents = function EuiIconSignificantEvents(_ref) {
|
|
17
|
+
var title = _ref.title,
|
|
18
|
+
titleId = _ref.titleId,
|
|
19
|
+
props = _objectWithoutProperties(_ref, _excluded);
|
|
20
|
+
return ___EmotionJSX("svg", _extends({
|
|
21
|
+
xmlns: "http://www.w3.org/2000/svg",
|
|
22
|
+
width: 16,
|
|
23
|
+
height: 16,
|
|
24
|
+
viewBox: "0 0 16 16",
|
|
25
|
+
"aria-labelledby": titleId
|
|
26
|
+
}, props), title ? ___EmotionJSX("title", {
|
|
27
|
+
id: titleId
|
|
28
|
+
}, title) : null, ___EmotionJSX("path", {
|
|
29
|
+
d: "M8.5 15h-1v-3h1v3ZM4.354 12.354l-1.5 1.5-.708-.707 1.5-1.5.708.707ZM13.854 13.146l-.707.707-1.5-1.5.707-.707 1.5 1.5Z"
|
|
30
|
+
}), ___EmotionJSX("path", {
|
|
31
|
+
fillRule: "evenodd",
|
|
32
|
+
d: "M10 5a1 1 0 0 1 1 1v4a1 1 0 0 1-1 1H6a1 1 0 0 1-1-1V6a1 1 0 0 1 1-1h4Zm-4 5h4V6H6v4Z",
|
|
33
|
+
clipRule: "evenodd"
|
|
34
|
+
}), ___EmotionJSX("path", {
|
|
35
|
+
d: "M4.005 8.495h-3v-1h3v1ZM15.005 8.495h-3v-1h3v1ZM4.354 3.646l-.708.708-1.5-1.5.708-.708 1.5 1.5ZM13.854 2.854l-1.5 1.5-.707-.708 1.5-1.5.707.708ZM8.5 4h-1V1h1v3Z"
|
|
36
|
+
}));
|
|
37
|
+
};
|
|
38
|
+
export var icon = EuiIconSignificantEvents;
|
|
@@ -15,7 +15,7 @@ import { EuiIcon } from './icon';
|
|
|
15
15
|
import { jsx as ___EmotionJSX } from "@emotion/react";
|
|
16
16
|
describe('EuiIcons', function () {
|
|
17
17
|
describe('Automated accessibility check for glyph icons', function () {
|
|
18
|
-
var GlyphIcons = ['accessibility', 'aggregate', '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', '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', 'info', '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', 'question', 'quote', 'refresh', 'reporter', 'returnKey', 'save', 'scale', 'search', 'securitySignal', 'securitySignalDetected', 'securitySignalResolved', 'sessionViewer', 'shard', 'share', 'snowflake', 'sortable', 'sortAscending', 'sortDescending', 'sortDown', 'sortLeft', 'sortRight', 'sortUp', 'spaces', 'sparkles', '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', 'timelineWithArrow', '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', 'warning', 'wordWrap', 'wordWrapDisabled', 'wrench'];
|
|
18
|
+
var GlyphIcons = ['accessibility', 'aggregate', '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', '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', 'info', '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', 'question', 'quote', 'refresh', 'reporter', 'returnKey', 'save', 'scale', 'search', 'securitySignal', 'securitySignalDetected', 'securitySignalResolved', 'sessionViewer', 'shard', 'share', 'significantEvents', 'snowflake', 'sortable', 'sortAscending', 'sortDescending', 'sortDown', 'sortLeft', 'sortRight', 'sortUp', 'spaces', 'sparkles', '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', 'timelineWithArrow', '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', 'warning', 'wordWrap', 'wordWrapDisabled', 'wrench'];
|
|
19
19
|
var GlyphGrid = function GlyphGrid() {
|
|
20
20
|
return ___EmotionJSX("div", null, GlyphIcons.map(function (glyph) {
|
|
21
21
|
return ___EmotionJSX(EuiIcon, {
|
|
@@ -1655,6 +1655,9 @@ export var typeToPathMap = {
|
|
|
1655
1655
|
share: function share() {
|
|
1656
1656
|
return import('./assets/share');
|
|
1657
1657
|
},
|
|
1658
|
+
significantEvents: function significantEvents() {
|
|
1659
|
+
return import('./assets/significant_events');
|
|
1660
|
+
},
|
|
1658
1661
|
singleMetricViewer: function singleMetricViewer() {
|
|
1659
1662
|
return import('./assets/single_metric_viewer');
|
|
1660
1663
|
},
|
|
@@ -63,7 +63,7 @@ export var euiListItemLayoutStyles = function euiListItemLayoutStyles(euiThemeCo
|
|
|
63
63
|
euiListItemLayout: /*#__PURE__*/css(listItemCommonStyles(euiThemeContext), " ", logicalCSS('padding-horizontal', spacing.horizontal), ";;label:euiListItemLayout;"),
|
|
64
64
|
euiListItemLayout__action: /*#__PURE__*/css("display:flex;flex-grow:1;", logicalCSS('width', '100%'), " color:inherit;overflow:hidden;;label:euiListItemLayout__action;"),
|
|
65
65
|
euiListItemLayout__content: /*#__PURE__*/css(logicalCSS('width', '100%'), " display:flex;align-items:center;gap:", spacing.horizontal, ";;label:euiListItemLayout__content;"),
|
|
66
|
-
euiListItemLayout__text: /*#__PURE__*/css("flex-grow:1;", logicalCSS('padding-vertical', textPadding.vertical), " ", euiFontSize(euiThemeContext, 's'), " text-align:start
|
|
66
|
+
euiListItemLayout__text: /*#__PURE__*/css("flex-grow:1;", logicalCSS('padding-vertical', textPadding.vertical), " ", euiFontSize(euiThemeContext, 's'), " text-align:start;.euiHealth{vertical-align:middle;}>*+*{", logicalCSS('margin-top', euiTheme.size.xxs), ";};label:euiListItemLayout__text;"),
|
|
67
67
|
textWrap: {
|
|
68
68
|
truncate: /*#__PURE__*/css(euiTextTruncate(), ";label:truncate;"),
|
|
69
69
|
wrap: /*#__PURE__*/css(";label:wrap;")
|
|
@@ -1,13 +1,6 @@
|
|
|
1
|
-
import _classCallCheck from "@babel/runtime/helpers/classCallCheck";
|
|
2
|
-
import _createClass from "@babel/runtime/helpers/createClass";
|
|
3
|
-
import _possibleConstructorReturn from "@babel/runtime/helpers/possibleConstructorReturn";
|
|
4
|
-
import _getPrototypeOf from "@babel/runtime/helpers/getPrototypeOf";
|
|
5
|
-
import _inherits from "@babel/runtime/helpers/inherits";
|
|
6
1
|
import _defineProperty from "@babel/runtime/helpers/defineProperty";
|
|
7
2
|
function ownKeys(e, r) { var t = Object.keys(e); if (Object.getOwnPropertySymbols) { var o = Object.getOwnPropertySymbols(e); r && (o = o.filter(function (r) { return Object.getOwnPropertyDescriptor(e, r).enumerable; })), t.push.apply(t, o); } return t; }
|
|
8
3
|
function _objectSpread(e) { for (var r = 1; r < arguments.length; r++) { var t = null != arguments[r] ? arguments[r] : {}; r % 2 ? ownKeys(Object(t), !0).forEach(function (r) { _defineProperty(e, r, t[r]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e, Object.getOwnPropertyDescriptors(t)) : ownKeys(Object(t)).forEach(function (r) { Object.defineProperty(e, r, Object.getOwnPropertyDescriptor(t, r)); }); } return e; }
|
|
9
|
-
function _callSuper(t, o, e) { return o = _getPrototypeOf(o), _possibleConstructorReturn(t, _isNativeReflectConstruct() ? Reflect.construct(o, e || [], _getPrototypeOf(t).constructor) : o.apply(t, e)); }
|
|
10
|
-
function _isNativeReflectConstruct() { try { var t = !Boolean.prototype.valueOf.call(Reflect.construct(Boolean, [], function () {})); } catch (t) {} return (_isNativeReflectConstruct = function _isNativeReflectConstruct() { return !!t; })(); }
|
|
11
4
|
/*
|
|
12
5
|
* Copyright Elasticsearch B.V. and/or licensed to Elasticsearch B.V. under one
|
|
13
6
|
* or more contributor license agreements. Licensed under the Elastic License
|
|
@@ -16,110 +9,83 @@ function _isNativeReflectConstruct() { try { var t = !Boolean.prototype.valueOf.
|
|
|
16
9
|
* Side Public License, v 1.
|
|
17
10
|
*/
|
|
18
11
|
|
|
19
|
-
import { Children, cloneElement,
|
|
20
|
-
import {
|
|
21
|
-
export var EuiOutsideClickDetector = /*#__PURE__*/function (
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
// equivalent to a sequential, compound press and release of
|
|
45
|
-
// the pointing device (mouse, finger, stylus, etc.).
|
|
46
|
-
// A click event's target can be imprecise, as the value will be
|
|
47
|
-
// the closest common ancestor of the press (mousedown, touchstart)
|
|
48
|
-
// and release (mouseup, touchend) events (often <body />) if
|
|
49
|
-
// the the target of each event differs.
|
|
50
|
-
// We need the actual event targets to make the correct decisions
|
|
51
|
-
// about user intention. So, consider the down/start and up/end
|
|
52
|
-
// items below as the deconstruction of a click event.
|
|
53
|
-
_defineProperty(_this, "id", void 0);
|
|
54
|
-
_defineProperty(_this, "capturedDownIds", void 0);
|
|
55
|
-
_defineProperty(_this, "onClickOutside", function (e) {
|
|
56
|
-
var _this$props = _this.props,
|
|
57
|
-
isDisabled = _this$props.isDisabled,
|
|
58
|
-
onOutsideClick = _this$props.onOutsideClick;
|
|
12
|
+
import { Children, cloneElement, useRef, useEffect, forwardRef } from 'react';
|
|
13
|
+
import { useGeneratedHtmlId } from '../../services/accessibility';
|
|
14
|
+
export var EuiOutsideClickDetector = /*#__PURE__*/forwardRef(function (props, ref) {
|
|
15
|
+
// the id is used to identify which EuiOutsideClickDetector
|
|
16
|
+
// is the source of a click event; as the click event bubbles
|
|
17
|
+
// up and reaches the click detector's child component the
|
|
18
|
+
// id value is stamped on the event. This id is inspected
|
|
19
|
+
// in the document's click handler, and if the id doesn't
|
|
20
|
+
// exist or doesn't match this detector's id, then trigger
|
|
21
|
+
// the outsideClick callback.
|
|
22
|
+
//
|
|
23
|
+
// Taking this approach instead of checking if the event's
|
|
24
|
+
// target element exists in this component's DOM sub-tree is
|
|
25
|
+
// necessary for handling clicks originating from children
|
|
26
|
+
// rendered through React's portals (EuiPortal). The id tracking
|
|
27
|
+
// works because React guarantees the event bubbles through the
|
|
28
|
+
// virtual DOM and executes EuiClickDetector's onClick handler,
|
|
29
|
+
// stamping the id even though the event originates outside
|
|
30
|
+
// this component's reified DOM tree.
|
|
31
|
+
var id = useGeneratedHtmlId();
|
|
32
|
+
var capturedDownIds = useRef([]);
|
|
33
|
+
useEffect(function () {
|
|
34
|
+
function onClickOutside(e) {
|
|
35
|
+
var isDisabled = props.isDisabled,
|
|
36
|
+
onOutsideClick = props.onOutsideClick;
|
|
59
37
|
if (isDisabled) {
|
|
60
|
-
|
|
38
|
+
capturedDownIds.current = [];
|
|
61
39
|
return;
|
|
62
40
|
}
|
|
63
41
|
var event = e;
|
|
64
|
-
if (event.euiGeneratedBy && event.euiGeneratedBy.includes(
|
|
65
|
-
|
|
42
|
+
if (event.euiGeneratedBy && event.euiGeneratedBy.includes(id) || capturedDownIds.current.includes(id)) {
|
|
43
|
+
capturedDownIds.current = [];
|
|
66
44
|
return;
|
|
67
45
|
}
|
|
68
|
-
|
|
46
|
+
capturedDownIds.current = [];
|
|
69
47
|
return onOutsideClick(event);
|
|
48
|
+
}
|
|
49
|
+
document.addEventListener('mouseup', onClickOutside);
|
|
50
|
+
document.addEventListener('touchend', onClickOutside);
|
|
51
|
+
return function () {
|
|
52
|
+
document.removeEventListener('mouseup', onClickOutside);
|
|
53
|
+
document.removeEventListener('touchend', onClickOutside);
|
|
54
|
+
};
|
|
55
|
+
}, [props.isDisabled, props.onOutsideClick]);
|
|
56
|
+
function onChildClick(event, cb) {
|
|
57
|
+
// to support nested click detectors, build an array
|
|
58
|
+
// of detector ids that have been encountered;
|
|
59
|
+
if (event.nativeEvent.hasOwnProperty('euiGeneratedBy')) {
|
|
60
|
+
event.nativeEvent.euiGeneratedBy.push(id);
|
|
61
|
+
} else {
|
|
62
|
+
event.nativeEvent.euiGeneratedBy = [id];
|
|
63
|
+
}
|
|
64
|
+
if (cb) cb(event);
|
|
65
|
+
}
|
|
66
|
+
function onChildMouseDown(event) {
|
|
67
|
+
onChildClick(event, function (e) {
|
|
68
|
+
var nativeEvent = e.nativeEvent;
|
|
69
|
+
capturedDownIds.current = nativeEvent.euiGeneratedBy;
|
|
70
|
+
if (props.onMouseDown) props.onMouseDown(e);
|
|
71
|
+
if (props.onTouchStart) props.onTouchStart(e);
|
|
70
72
|
});
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
if (
|
|
75
|
-
|
|
76
|
-
} else {
|
|
77
|
-
event.nativeEvent.euiGeneratedBy = [_this.id];
|
|
78
|
-
}
|
|
79
|
-
if (cb) cb(event);
|
|
80
|
-
});
|
|
81
|
-
_defineProperty(_this, "onChildMouseDown", function (event) {
|
|
82
|
-
_this.onChildClick(event, function (e) {
|
|
83
|
-
var nativeEvent = e.nativeEvent;
|
|
84
|
-
_this.capturedDownIds = nativeEvent.euiGeneratedBy;
|
|
85
|
-
if (_this.props.onMouseDown) _this.props.onMouseDown(e);
|
|
86
|
-
if (_this.props.onTouchStart) _this.props.onTouchStart(e);
|
|
87
|
-
});
|
|
88
|
-
});
|
|
89
|
-
_defineProperty(_this, "onChildMouseUp", function (event) {
|
|
90
|
-
_this.onChildClick(event, function (e) {
|
|
91
|
-
if (_this.props.onMouseUp) _this.props.onMouseUp(e);
|
|
92
|
-
if (_this.props.onTouchEnd) _this.props.onTouchEnd(e);
|
|
93
|
-
});
|
|
73
|
+
}
|
|
74
|
+
function onChildMouseUp(event) {
|
|
75
|
+
onChildClick(event, function (e) {
|
|
76
|
+
if (props.onMouseUp) props.onMouseUp(e);
|
|
77
|
+
if (props.onTouchEnd) props.onTouchEnd(e);
|
|
94
78
|
});
|
|
95
|
-
_this.id = htmlIdGenerator()();
|
|
96
|
-
_this.capturedDownIds = [];
|
|
97
|
-
return _this;
|
|
98
79
|
}
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
|
|
109
|
-
|
|
110
|
-
|
|
111
|
-
}
|
|
112
|
-
}, {
|
|
113
|
-
key: "render",
|
|
114
|
-
value: function render() {
|
|
115
|
-
var props = _objectSpread(_objectSpread({}, this.props.children.props), {
|
|
116
|
-
onMouseDown: this.onChildMouseDown,
|
|
117
|
-
onTouchStart: this.onChildMouseDown,
|
|
118
|
-
onMouseUp: this.onChildMouseUp,
|
|
119
|
-
onTouchEnd: this.onChildMouseUp
|
|
120
|
-
});
|
|
121
|
-
var child = Children.only(this.props.children);
|
|
122
|
-
return /*#__PURE__*/cloneElement(child, props);
|
|
123
|
-
}
|
|
124
|
-
}]);
|
|
125
|
-
}(Component);
|
|
80
|
+
var child = Children.only(props.children);
|
|
81
|
+
var childProps = _objectSpread(_objectSpread({}, props.children.props), {}, {
|
|
82
|
+
onMouseDown: onChildMouseDown,
|
|
83
|
+
onTouchStart: onChildMouseDown,
|
|
84
|
+
onMouseUp: onChildMouseUp,
|
|
85
|
+
onTouchEnd: onChildMouseUp
|
|
86
|
+
}, ref ? {
|
|
87
|
+
ref: ref
|
|
88
|
+
} : {});
|
|
89
|
+
return /*#__PURE__*/cloneElement(child, childProps);
|
|
90
|
+
});
|
|
91
|
+
EuiOutsideClickDetector.displayName = 'EuiOutsideClickDetector';
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
/*
|
|
2
|
+
* Copyright Elasticsearch B.V. and/or licensed to Elasticsearch B.V. under one
|
|
3
|
+
* or more contributor license agreements. Licensed under the Elastic License
|
|
4
|
+
* 2.0 and the Server Side Public License, v 1; you may not use this file except
|
|
5
|
+
* in compliance with, at your election, the Elastic License 2.0 or the Server
|
|
6
|
+
* Side Public License, v 1.
|
|
7
|
+
*/
|
|
8
|
+
|
|
9
|
+
export { EuiTableStickyScrollbar } from './sticky_scrollbar';
|
|
@@ -0,0 +1,136 @@
|
|
|
1
|
+
import _slicedToArray from "@babel/runtime/helpers/slicedToArray";
|
|
2
|
+
/*
|
|
3
|
+
* Copyright Elasticsearch B.V. and/or licensed to Elasticsearch B.V. under one
|
|
4
|
+
* or more contributor license agreements. Licensed under the Elastic License
|
|
5
|
+
* 2.0 and the Server Side Public License, v 1; you may not use this file except
|
|
6
|
+
* in compliance with, at your election, the Elastic License 2.0 or the Server
|
|
7
|
+
* Side Public License, v 1.
|
|
8
|
+
*/
|
|
9
|
+
|
|
10
|
+
import React, { useCallback, useEffect, useRef, useState } from 'react';
|
|
11
|
+
import { useEuiMemoizedStyles } from '../../../services';
|
|
12
|
+
import { euiTableStickyScrollbarStyles } from './sticky_scrollbar.styles';
|
|
13
|
+
import { jsx as ___EmotionJSX } from "@emotion/react";
|
|
14
|
+
export var EuiTableStickyScrollbar = function EuiTableStickyScrollbar(_ref) {
|
|
15
|
+
var tableWrapperRef = _ref.tableWrapperRef;
|
|
16
|
+
var styles = useEuiMemoizedStyles(euiTableStickyScrollbarStyles);
|
|
17
|
+
var trackElementRef = useRef(null);
|
|
18
|
+
var dragStartRef = useRef(null);
|
|
19
|
+
var requestAnimationFramePendingRef = useRef(false);
|
|
20
|
+
var _useState = useState(false),
|
|
21
|
+
_useState2 = _slicedToArray(_useState, 2),
|
|
22
|
+
isActive = _useState2[0],
|
|
23
|
+
setIsActive = _useState2[1];
|
|
24
|
+
var _useState3 = useState(false),
|
|
25
|
+
_useState4 = _slicedToArray(_useState3, 2),
|
|
26
|
+
isHidden = _useState4[0],
|
|
27
|
+
setIsHidden = _useState4[1];
|
|
28
|
+
var updateTrack = useCallback(function (element) {
|
|
29
|
+
var clientWidth = element.clientWidth,
|
|
30
|
+
scrollWidth = element.scrollWidth,
|
|
31
|
+
scrollLeft = element.scrollLeft;
|
|
32
|
+
if (!requestAnimationFramePendingRef.current) {
|
|
33
|
+
requestAnimationFramePendingRef.current = true;
|
|
34
|
+
requestAnimationFrame(function () {
|
|
35
|
+
var el = trackElementRef.current;
|
|
36
|
+
if (el) {
|
|
37
|
+
el.style.inlineSize = "".concat(clientWidth / scrollWidth * 100, "%");
|
|
38
|
+
el.style.marginInlineStart = "".concat(scrollLeft / scrollWidth * 100, "%");
|
|
39
|
+
}
|
|
40
|
+
requestAnimationFramePendingRef.current = false;
|
|
41
|
+
});
|
|
42
|
+
}
|
|
43
|
+
}, []);
|
|
44
|
+
var handleScroll = useCallback(function (event) {
|
|
45
|
+
if (event.target) {
|
|
46
|
+
updateTrack(event.target);
|
|
47
|
+
}
|
|
48
|
+
}, [updateTrack]);
|
|
49
|
+
var handleResize = useCallback(function (entries) {
|
|
50
|
+
var element = entries[0].target;
|
|
51
|
+
if (!element) {
|
|
52
|
+
return;
|
|
53
|
+
}
|
|
54
|
+
updateTrack(element);
|
|
55
|
+
setIsActive(element.clientWidth < element.scrollWidth);
|
|
56
|
+
}, [updateTrack]);
|
|
57
|
+
var handleBottomCornerIntersection = useCallback(function (entries) {
|
|
58
|
+
var entry = entries[0];
|
|
59
|
+
var element = entry.target;
|
|
60
|
+
if (!element) {
|
|
61
|
+
return;
|
|
62
|
+
}
|
|
63
|
+
setIsHidden(!entry.isIntersecting);
|
|
64
|
+
}, []);
|
|
65
|
+
var handlePointerDown = useCallback(function (event) {
|
|
66
|
+
var _el$scrollLeft;
|
|
67
|
+
var el = tableWrapperRef.current;
|
|
68
|
+
dragStartRef.current = {
|
|
69
|
+
x: event.clientX,
|
|
70
|
+
scrollLeft: (_el$scrollLeft = el === null || el === void 0 ? void 0 : el.scrollLeft) !== null && _el$scrollLeft !== void 0 ? _el$scrollLeft : 0
|
|
71
|
+
};
|
|
72
|
+
event.currentTarget.setPointerCapture(event.pointerId);
|
|
73
|
+
}, [tableWrapperRef]);
|
|
74
|
+
var handlePointerUp = useCallback(function () {
|
|
75
|
+
dragStartRef.current = null;
|
|
76
|
+
}, [dragStartRef]);
|
|
77
|
+
var handlePointerMove = useCallback(function (event) {
|
|
78
|
+
var el = tableWrapperRef.current;
|
|
79
|
+
if (!dragStartRef.current || !el) {
|
|
80
|
+
return;
|
|
81
|
+
}
|
|
82
|
+
var diff = event.clientX - dragStartRef.current.x;
|
|
83
|
+
var ratio = el.scrollWidth / el.clientWidth;
|
|
84
|
+
el.scrollLeft = dragStartRef.current.scrollLeft + diff * ratio;
|
|
85
|
+
}, [tableWrapperRef]);
|
|
86
|
+
useEffect(function () {
|
|
87
|
+
var element = tableWrapperRef.current;
|
|
88
|
+
if (!element) {
|
|
89
|
+
return;
|
|
90
|
+
}
|
|
91
|
+
updateTrack(element);
|
|
92
|
+
element.addEventListener('scroll', handleScroll, {
|
|
93
|
+
passive: true
|
|
94
|
+
});
|
|
95
|
+
|
|
96
|
+
// ResizeObserver is available in all supported browsers,
|
|
97
|
+
// but jsdom and jest don't provide a polyfill for it.
|
|
98
|
+
var resizeObserver;
|
|
99
|
+
if (typeof window.ResizeObserver !== 'undefined') {
|
|
100
|
+
resizeObserver = new ResizeObserver(handleResize);
|
|
101
|
+
resizeObserver.observe(element);
|
|
102
|
+
}
|
|
103
|
+
|
|
104
|
+
// IntersectionOserver is available in all supported browsers,
|
|
105
|
+
// but jsdom and jest don't provide a polyfill for it.
|
|
106
|
+
var intersectionObserver;
|
|
107
|
+
if (typeof window.IntersectionObserver !== 'undefined') {
|
|
108
|
+
intersectionObserver = new IntersectionObserver(handleBottomCornerIntersection, {
|
|
109
|
+
threshold: 0,
|
|
110
|
+
rootMargin: '-100% 0px 0px 0px'
|
|
111
|
+
});
|
|
112
|
+
intersectionObserver.observe(element);
|
|
113
|
+
}
|
|
114
|
+
return function () {
|
|
115
|
+
var _resizeObserver, _intersectionObserver;
|
|
116
|
+
element.removeEventListener('scroll', handleScroll);
|
|
117
|
+
(_resizeObserver = resizeObserver) === null || _resizeObserver === void 0 || _resizeObserver.disconnect();
|
|
118
|
+
(_intersectionObserver = intersectionObserver) === null || _intersectionObserver === void 0 || _intersectionObserver.disconnect();
|
|
119
|
+
};
|
|
120
|
+
}, [tableWrapperRef, updateTrack, handleResize, handleScroll, handleBottomCornerIntersection]);
|
|
121
|
+
if (!isActive) {
|
|
122
|
+
return null;
|
|
123
|
+
}
|
|
124
|
+
return ___EmotionJSX("div", {
|
|
125
|
+
css: [styles.wrapper, isHidden && styles.wrapperHidden, ";label:EuiTableStickyScrollbar;"],
|
|
126
|
+
"data-test-subj": "euiTableStickyScrollbar",
|
|
127
|
+
"aria-hidden": true
|
|
128
|
+
}, ___EmotionJSX("div", {
|
|
129
|
+
css: styles.track,
|
|
130
|
+
ref: trackElementRef,
|
|
131
|
+
onPointerDown: handlePointerDown,
|
|
132
|
+
onPointerMove: handlePointerMove,
|
|
133
|
+
onPointerUp: handlePointerUp,
|
|
134
|
+
"data-test-subj": "euiTableStickyScrollbarTrack"
|
|
135
|
+
}));
|
|
136
|
+
};
|
|
@@ -0,0 +1,27 @@
|
|
|
1
|
+
function _EMOTION_STRINGIFIED_CSS_ERROR__() { return "You have tried to stringify object returned from `css` function. It isn't supposed to be used directly (e.g. as value of the `className` prop), but rather handed to emotion so it can handle it (e.g. as value of `css` prop)."; }
|
|
2
|
+
/*
|
|
3
|
+
* Copyright Elasticsearch B.V. and/or licensed to Elasticsearch B.V. under one
|
|
4
|
+
* or more contributor license agreements. Licensed under the Elastic License
|
|
5
|
+
* 2.0 and the Server Side Public License, v 1; you may not use this file except
|
|
6
|
+
* in compliance with, at your election, the Elastic License 2.0 or the Server
|
|
7
|
+
* Side Public License, v 1.
|
|
8
|
+
*/
|
|
9
|
+
|
|
10
|
+
import { css } from '@emotion/react';
|
|
11
|
+
import { transparentize } from '../../../services';
|
|
12
|
+
var _ref = process.env.NODE_ENV === "production" ? {
|
|
13
|
+
name: "j6fg69-wrapperHidden",
|
|
14
|
+
styles: "display:none;label:wrapperHidden;"
|
|
15
|
+
} : {
|
|
16
|
+
name: "j6fg69-wrapperHidden",
|
|
17
|
+
styles: "display:none;label:wrapperHidden;",
|
|
18
|
+
toString: _EMOTION_STRINGIFIED_CSS_ERROR__
|
|
19
|
+
};
|
|
20
|
+
export var euiTableStickyScrollbarStyles = function euiTableStickyScrollbarStyles(_ref2) {
|
|
21
|
+
var euiTheme = _ref2.euiTheme;
|
|
22
|
+
return {
|
|
23
|
+
wrapper: /*#__PURE__*/css("block-size:", euiTheme.size.base, ";padding:", euiTheme.size.xs, ";position:sticky;background:", euiTheme.components.scrollbarTrackColor, ";inset-block-end:var(--euiTableStickyScrollbarOffsetBottom, 0);z-index:var(--euiTableStickyScrollbarZIndex, 0);;label:wrapper;"),
|
|
24
|
+
wrapperHidden: _ref,
|
|
25
|
+
track: /*#__PURE__*/css("block-size:100%;background:", transparentize(euiTheme.colors.darkShade, 0.5), ";border-radius:", euiTheme.border.radius.small, ";;label:track;")
|
|
26
|
+
};
|
|
27
|
+
};
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import _extends from "@babel/runtime/helpers/extends";
|
|
2
2
|
import _objectWithoutProperties from "@babel/runtime/helpers/objectWithoutProperties";
|
|
3
|
-
var _excluded = ["children", "className", "compressed", "tableLayout", "hasBackground", "responsiveBreakpoint", "scrollableInline"];
|
|
3
|
+
var _excluded = ["children", "className", "compressed", "tableLayout", "hasBackground", "responsiveBreakpoint", "scrollableInline", "stickyScrollbar"];
|
|
4
4
|
/*
|
|
5
5
|
* Copyright Elasticsearch B.V. and/or licensed to Elasticsearch B.V. under one
|
|
6
6
|
* or more contributor license agreements. Licensed under the Elastic License
|
|
@@ -9,7 +9,7 @@ var _excluded = ["children", "className", "compressed", "tableLayout", "hasBackg
|
|
|
9
9
|
* Side Public License, v 1.
|
|
10
10
|
*/
|
|
11
11
|
|
|
12
|
-
import React from 'react';
|
|
12
|
+
import React, { useRef } from 'react';
|
|
13
13
|
import classNames from 'classnames';
|
|
14
14
|
import { useEuiMemoizedStyles } from '../../services';
|
|
15
15
|
import { useIsEuiTableResponsive, EuiTableIsResponsiveContext } from './mobile/responsive_context';
|
|
@@ -18,6 +18,7 @@ import { euiTableStyles } from './table.styles';
|
|
|
18
18
|
import { usePropsWithComponentDefaults } from '../provider/component_defaults';
|
|
19
19
|
import { euiContainerCSS } from '../../global_styling';
|
|
20
20
|
import { EUI_TABLE_CSS_CONTAINER_NAME } from './const';
|
|
21
|
+
import { EuiTableStickyScrollbar } from './sticky_scrollbar';
|
|
21
22
|
import { jsx as ___EmotionJSX } from "@emotion/react";
|
|
22
23
|
/**
|
|
23
24
|
* EuiTable is a low-level building block component used to render tabular data
|
|
@@ -41,14 +42,18 @@ export var EuiTable = function EuiTable(originalProps) {
|
|
|
41
42
|
responsiveBreakpoint = _usePropsWithComponen.responsiveBreakpoint,
|
|
42
43
|
_usePropsWithComponen4 = _usePropsWithComponen.scrollableInline,
|
|
43
44
|
scrollableInline = _usePropsWithComponen4 === void 0 ? false : _usePropsWithComponen4,
|
|
45
|
+
_usePropsWithComponen5 = _usePropsWithComponen.stickyScrollbar,
|
|
46
|
+
stickyScrollbar = _usePropsWithComponen5 === void 0 ? false : _usePropsWithComponen5,
|
|
44
47
|
rest = _objectWithoutProperties(_usePropsWithComponen, _excluded);
|
|
48
|
+
var tableWrapperRef = useRef(null);
|
|
45
49
|
var isResponsive = useIsEuiTableResponsive(responsiveBreakpoint);
|
|
46
50
|
var classes = classNames('euiTable', className);
|
|
47
51
|
var styles = useEuiMemoizedStyles(euiTableStyles);
|
|
48
52
|
var tableStyles = [styles.euiTable, scrollableInline && styles.euiTableScrollableInline, styles.layout[tableLayout], (!compressed || isResponsive) && styles.uncompressed, compressed && !isResponsive && styles.compressed, hasBackground && styles.hasBackground, isResponsive ? styles.mobile : styles.desktop];
|
|
49
53
|
var cssStyles = [euiContainerCSS('normal', EUI_TABLE_CSS_CONTAINER_NAME, true), scrollableInline && styles.scrollableWrapper];
|
|
50
|
-
return ___EmotionJSX("div", {
|
|
51
|
-
css: cssStyles
|
|
54
|
+
return ___EmotionJSX(React.Fragment, null, ___EmotionJSX("div", {
|
|
55
|
+
css: cssStyles,
|
|
56
|
+
ref: tableWrapperRef
|
|
52
57
|
}, ___EmotionJSX("table", _extends({
|
|
53
58
|
tabIndex: -1,
|
|
54
59
|
css: tableStyles,
|
|
@@ -59,5 +64,7 @@ export var EuiTable = function EuiTable(originalProps) {
|
|
|
59
64
|
value: {
|
|
60
65
|
hasBackground: hasBackground
|
|
61
66
|
}
|
|
62
|
-
}, children))))
|
|
67
|
+
}, children)))), scrollableInline && stickyScrollbar && ___EmotionJSX(EuiTableStickyScrollbar, {
|
|
68
|
+
tableWrapperRef: tableWrapperRef
|
|
69
|
+
}));
|
|
63
70
|
};
|
|
@@ -37,7 +37,7 @@ var _delay_render = require("../delay_render");
|
|
|
37
37
|
var _accessibility2 = require("../../services/accessibility");
|
|
38
38
|
var _basic_table = require("./basic_table.styles");
|
|
39
39
|
var _react2 = require("@emotion/react");
|
|
40
|
-
var _excluded = ["className", "loading", "items", "itemId", "columns", "pagination", "sorting", "selection", "onChange", "error", "noItemsMessage", "compressed", "itemIdToExpandedRowMap", "responsiveBreakpoint", "rowProps", "cellProps", "tableCaption", "rowHeader", "tableLayout", "hasBackground", "scrollableInline"],
|
|
40
|
+
var _excluded = ["className", "loading", "items", "itemId", "columns", "pagination", "sorting", "selection", "onChange", "error", "noItemsMessage", "compressed", "itemIdToExpandedRowMap", "responsiveBreakpoint", "rowProps", "cellProps", "tableCaption", "rowHeader", "tableLayout", "hasBackground", "scrollableInline", "stickyScrollbar"],
|
|
41
41
|
_excluded2 = ["align", "render", "dataType", "isExpander", "textOnly", "name", "field", "description", "sortable", "footer", "mobileOptions", "nameTooltip"];
|
|
42
42
|
function _getRequireWildcardCache(e) { if ("function" != typeof WeakMap) return null; var r = new WeakMap(), t = new WeakMap(); return (_getRequireWildcardCache = function _getRequireWildcardCache(e) { return e ? t : r; })(e); }
|
|
43
43
|
function _interopRequireWildcard(e, r) { if (!r && e && e.__esModule) return e; if (null === e || "object" != _typeof(e) && "function" != typeof e) return { default: e }; var t = _getRequireWildcardCache(r); if (t && t.has(e)) return t.get(e); var n = { __proto__: null }, a = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var u in e) if ("default" !== u && {}.hasOwnProperty.call(e, u)) { var i = a ? Object.getOwnPropertyDescriptor(e, u) : null; i && (i.get || i.set) ? Object.defineProperty(n, u, i) : n[u] = e[u]; } return n.default = e, t && t.set(e, n), n; }
|
|
@@ -363,6 +363,7 @@ var EuiBasicTable = exports.EuiBasicTable = /*#__PURE__*/function (_Component) {
|
|
|
363
363
|
tableLayout = _this$props2.tableLayout,
|
|
364
364
|
hasBackground = _this$props2.hasBackground,
|
|
365
365
|
scrollableInline = _this$props2.scrollableInline,
|
|
366
|
+
stickyScrollbar = _this$props2.stickyScrollbar,
|
|
366
367
|
rest = (0, _objectWithoutProperties2.default)(_this$props2, _excluded);
|
|
367
368
|
var classes = (0, _classnames.default)('euiBasicTable', {
|
|
368
369
|
'euiBasicTable-loading': loading
|
|
@@ -382,7 +383,8 @@ var EuiBasicTable = exports.EuiBasicTable = /*#__PURE__*/function (_Component) {
|
|
|
382
383
|
tableLayout = _this$props3.tableLayout,
|
|
383
384
|
hasBackground = _this$props3.hasBackground,
|
|
384
385
|
loading = _this$props3.loading,
|
|
385
|
-
scrollableInline = _this$props3.scrollableInline
|
|
386
|
+
scrollableInline = _this$props3.scrollableInline,
|
|
387
|
+
stickyScrollbar = _this$props3.stickyScrollbar;
|
|
386
388
|
return (0, _react2.jsx)(_react.default.Fragment, null, (0, _react2.jsx)(_table.EuiTableHeaderMobile, {
|
|
387
389
|
responsiveBreakpoint: responsiveBreakpoint
|
|
388
390
|
}, this.renderSelectAll(true), this.renderTableMobileSort()), (0, _react2.jsx)(_services.OverrideCopiedTabularContent, null, (0, _react2.jsx)(_table.EuiTable, {
|
|
@@ -392,6 +394,7 @@ var EuiBasicTable = exports.EuiBasicTable = /*#__PURE__*/function (_Component) {
|
|
|
392
394
|
compressed: compressed,
|
|
393
395
|
hasBackground: hasBackground,
|
|
394
396
|
scrollableInline: scrollableInline,
|
|
397
|
+
stickyScrollbar: stickyScrollbar,
|
|
395
398
|
css: loading && _basic_table.safariLoadingWorkaround
|
|
396
399
|
}, this.renderTableCaption(), this.renderTableHead(), this.renderTableBody(), this.renderTableFooter())));
|
|
397
400
|
}
|
|
@@ -34,7 +34,7 @@ var euiDataGridCellActionsStyles = exports.euiDataGridCellActionsStyles = functi
|
|
|
34
34
|
})), " background-color:inherit;}", cellSelectors.hoverColor, " &{background-color:", cellOutline.hoverColor, ";border-color:", cellOutline.hoverColor, ";}", _global_styling.euiCanAnimate, "{transform:scaleY(0);transform-origin:bottom;", cellSelectors.showAnimation, " &{animation-duration:", euiTheme.animation.fast, ";animation-name:", slideUp, ";animation-iteration-count:1;animation-fill-mode:forwards;}", cellSelectors.hoverAnimation, " &{animation-delay:", euiTheme.animation.slow, ";}};label:euiDataGridRowCell__actions;"),
|
|
35
35
|
euiDataGridRowCell__actionButtonIcon: /*#__PURE__*/(0, _react.css)((0, _global_styling.logicalCSS)('width', euiTheme.size.base), " ", (0, _global_styling.logicalCSS)('height', (0, _global_styling.mathWithUnits)([euiTheme.size.base, euiTheme.size.xs], function (x, y) {
|
|
36
36
|
return x + y;
|
|
37
|
-
})), " border-radius:0
|
|
37
|
+
})), " border-radius:0;&,& svg{background-color:transparent!important;}&:not(", _global_styling.euiDisabledSelector, "),&:not(", _global_styling.euiDisabledSelector, ") svg{color:currentColor!important;fill:currentColor!important;}", (0, _high_contrast.highContrastModeStyles)(euiThemeContext, {
|
|
38
38
|
preferred: 'border: none;'
|
|
39
39
|
}), ";;label:euiDataGridRowCell__actionButtonIcon;")
|
|
40
40
|
};
|