@elastic/eui 98.0.0 → 98.1.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/es/components/badge/beta_badge/beta_badge.js +2 -2
- package/es/components/badge/beta_badge/beta_badge.styles.js +1 -0
- package/es/components/card/card.js +1 -1
- package/es/components/card/card.styles.js +3 -3
- package/es/components/code/code_block.js +9 -1
- package/es/components/code/code_block_copy.js +5 -4
- package/es/components/drag_and_drop/draggable.js +2 -3
- package/es/components/drag_and_drop/droppable.js +2 -3
- package/es/components/error_boundary/error_boundary.js +2 -3
- package/es/components/form/range/range_draggable.js +3 -3
- package/es/components/health/health.js +3 -4
- package/es/components/inline_edit/inline_edit_form.js +5 -6
- package/es/components/inline_edit/inline_edit_text.js +2 -3
- package/es/components/inline_edit/inline_edit_title.js +2 -3
- package/es/components/key_pad_menu/key_pad_menu.js +2 -3
- package/es/components/key_pad_menu/key_pad_menu_item.js +3 -6
- package/es/components/mark/mark.js +2 -3
- package/es/components/overlay_mask/overlay_mask.js +2 -3
- package/es/components/popover/popover.js +3 -1
- package/es/components/search_bar/filters/field_value_selection_filter.js +18 -9
- package/es/components/search_bar/search_bar.a11y.js +0 -1
- package/es/components/selectable/selectable_list/selectable_list.js +10 -1
- package/es/components/side_nav/side_nav_item.js +3 -4
- package/es/components/tabs/tab.js +2 -0
- package/es/components/tabs/tabs.js +18 -2
- package/es/components/text_diff/text_diff.js +2 -3
- package/es/components/toast/global_toast_list_item.js +3 -6
- package/es/components/tour/_tour_footer.js +2 -3
- package/es/components/tour/_tour_header.js +2 -3
- package/es/components/tour/tour_step.js +4 -5
- package/es/components/tree_view/tree_view_item.js +2 -3
- package/es/global_styling/mixins/_helpers.js +1 -7
- package/eui.d.ts +16 -22
- package/i18ntokens.json +66 -48
- package/lib/components/badge/beta_badge/beta_badge.js +2 -2
- package/lib/components/badge/beta_badge/beta_badge.styles.js +1 -0
- package/lib/components/card/card.js +1 -1
- package/lib/components/card/card.styles.js +2 -2
- package/lib/components/code/code_block.js +9 -1
- package/lib/components/code/code_block_copy.js +5 -4
- package/lib/components/drag_and_drop/draggable.js +1 -2
- package/lib/components/drag_and_drop/droppable.js +1 -2
- package/lib/components/error_boundary/error_boundary.js +2 -3
- package/lib/components/form/range/range_draggable.js +2 -2
- package/lib/components/health/health.js +2 -3
- package/lib/components/inline_edit/inline_edit_form.js +4 -5
- package/lib/components/inline_edit/inline_edit_text.js +2 -3
- package/lib/components/inline_edit/inline_edit_title.js +2 -3
- package/lib/components/key_pad_menu/key_pad_menu.js +2 -3
- package/lib/components/key_pad_menu/key_pad_menu_item.js +2 -5
- package/lib/components/mark/mark.js +2 -3
- package/lib/components/overlay_mask/overlay_mask.js +1 -2
- package/lib/components/popover/popover.js +3 -1
- package/lib/components/search_bar/filters/field_value_selection_filter.js +18 -9
- package/lib/components/search_bar/search_bar.a11y.js +0 -1
- package/lib/components/selectable/selectable_list/selectable_list.js +10 -1
- package/lib/components/side_nav/side_nav_item.js +2 -3
- package/lib/components/tabs/tab.js +2 -0
- package/lib/components/tabs/tabs.js +17 -1
- package/lib/components/text_diff/text_diff.js +1 -2
- package/lib/components/toast/global_toast_list_item.js +2 -5
- package/lib/components/tour/_tour_footer.js +1 -2
- package/lib/components/tour/_tour_header.js +1 -2
- package/lib/components/tour/tour_step.js +4 -5
- package/lib/components/tree_view/tree_view_item.js +1 -2
- package/lib/global_styling/mixins/_helpers.js +2 -8
- package/optimize/es/components/badge/beta_badge/beta_badge.js +1 -1
- package/optimize/es/components/badge/beta_badge/beta_badge.styles.js +1 -0
- package/optimize/es/components/card/card.styles.js +3 -3
- package/optimize/es/components/code/code_block.js +3 -1
- package/optimize/es/components/code/code_block_copy.js +5 -4
- package/optimize/es/components/drag_and_drop/draggable.js +2 -3
- package/optimize/es/components/drag_and_drop/droppable.js +2 -3
- package/optimize/es/components/error_boundary/error_boundary.js +2 -3
- package/optimize/es/components/form/range/range_draggable.js +3 -3
- package/optimize/es/components/health/health.js +3 -4
- package/optimize/es/components/inline_edit/inline_edit_form.js +5 -6
- package/optimize/es/components/inline_edit/inline_edit_text.js +2 -3
- package/optimize/es/components/inline_edit/inline_edit_title.js +2 -3
- package/optimize/es/components/key_pad_menu/key_pad_menu.js +2 -3
- package/optimize/es/components/key_pad_menu/key_pad_menu_item.js +3 -6
- package/optimize/es/components/mark/mark.js +2 -3
- package/optimize/es/components/overlay_mask/overlay_mask.js +2 -3
- package/optimize/es/components/popover/popover.js +3 -1
- package/optimize/es/components/search_bar/filters/field_value_selection_filter.js +18 -9
- package/optimize/es/components/search_bar/search_bar.a11y.js +0 -1
- package/optimize/es/components/selectable/selectable_list/selectable_list.js +10 -1
- package/optimize/es/components/side_nav/side_nav_item.js +3 -4
- package/optimize/es/components/tabs/tab.js +2 -0
- package/optimize/es/components/tabs/tabs.js +18 -2
- package/optimize/es/components/text_diff/text_diff.js +2 -3
- package/optimize/es/components/toast/global_toast_list_item.js +3 -6
- package/optimize/es/components/tour/_tour_footer.js +2 -3
- package/optimize/es/components/tour/_tour_header.js +2 -3
- package/optimize/es/components/tour/tour_step.js +4 -5
- package/optimize/es/components/tree_view/tree_view_item.js +2 -3
- package/optimize/es/global_styling/mixins/_helpers.js +1 -7
- package/optimize/lib/components/badge/beta_badge/beta_badge.js +1 -1
- package/optimize/lib/components/badge/beta_badge/beta_badge.styles.js +1 -0
- package/optimize/lib/components/card/card.styles.js +2 -2
- package/optimize/lib/components/code/code_block.js +3 -1
- package/optimize/lib/components/code/code_block_copy.js +5 -4
- package/optimize/lib/components/drag_and_drop/draggable.js +1 -2
- package/optimize/lib/components/drag_and_drop/droppable.js +1 -2
- package/optimize/lib/components/error_boundary/error_boundary.js +2 -3
- package/optimize/lib/components/form/range/range_draggable.js +2 -2
- package/optimize/lib/components/health/health.js +2 -3
- package/optimize/lib/components/inline_edit/inline_edit_form.js +4 -5
- package/optimize/lib/components/inline_edit/inline_edit_text.js +2 -3
- package/optimize/lib/components/inline_edit/inline_edit_title.js +2 -3
- package/optimize/lib/components/key_pad_menu/key_pad_menu.js +2 -3
- package/optimize/lib/components/key_pad_menu/key_pad_menu_item.js +2 -5
- package/optimize/lib/components/mark/mark.js +2 -3
- package/optimize/lib/components/overlay_mask/overlay_mask.js +1 -2
- package/optimize/lib/components/popover/popover.js +3 -1
- package/optimize/lib/components/search_bar/filters/field_value_selection_filter.js +18 -9
- package/optimize/lib/components/search_bar/search_bar.a11y.js +0 -1
- package/optimize/lib/components/selectable/selectable_list/selectable_list.js +10 -1
- package/optimize/lib/components/side_nav/side_nav_item.js +2 -3
- package/optimize/lib/components/tabs/tab.js +2 -0
- package/optimize/lib/components/tabs/tabs.js +17 -1
- package/optimize/lib/components/text_diff/text_diff.js +1 -2
- package/optimize/lib/components/toast/global_toast_list_item.js +2 -5
- package/optimize/lib/components/tour/_tour_footer.js +1 -2
- package/optimize/lib/components/tour/_tour_header.js +1 -2
- package/optimize/lib/components/tour/tour_step.js +4 -5
- package/optimize/lib/components/tree_view/tree_view_item.js +1 -2
- package/optimize/lib/global_styling/mixins/_helpers.js +2 -8
- package/package.json +13 -12
- package/src/global_styling/index.scss +0 -6
- package/src/global_styling/mixins/_helpers.scss +0 -9
- package/src/global_styling/mixins/_shadow.scss +0 -8
- package/src/global_styling/variables/_size.scss +0 -2
- package/src/themes/amsterdam/global_styling/index.scss +0 -3
- package/test-env/components/badge/beta_badge/beta_badge.js +2 -2
- package/test-env/components/badge/beta_badge/beta_badge.styles.js +1 -0
- package/test-env/components/card/card.js +1 -1
- package/test-env/components/card/card.styles.js +2 -2
- package/test-env/components/code/code_block_copy.js +5 -4
- package/test-env/components/drag_and_drop/draggable.js +1 -2
- package/test-env/components/drag_and_drop/droppable.js +1 -2
- package/test-env/components/error_boundary/error_boundary.js +2 -3
- package/test-env/components/form/range/range_draggable.js +2 -2
- package/test-env/components/health/health.js +2 -3
- package/test-env/components/inline_edit/inline_edit_form.js +4 -5
- package/test-env/components/inline_edit/inline_edit_text.js +2 -3
- package/test-env/components/inline_edit/inline_edit_title.js +2 -3
- package/test-env/components/key_pad_menu/key_pad_menu.js +2 -3
- package/test-env/components/key_pad_menu/key_pad_menu_item.js +2 -5
- package/test-env/components/mark/mark.js +2 -3
- package/test-env/components/overlay_mask/overlay_mask.js +1 -2
- package/test-env/components/popover/popover.js +3 -1
- package/test-env/components/search_bar/filters/field_value_selection_filter.js +18 -9
- package/test-env/components/search_bar/search_bar.a11y.js +0 -1
- package/test-env/components/selectable/selectable_list/selectable_list.js +10 -1
- package/test-env/components/side_nav/side_nav_item.js +2 -3
- package/test-env/components/tabs/tab.js +2 -0
- package/test-env/components/tabs/tabs.js +17 -1
- package/test-env/components/text_diff/text_diff.js +1 -2
- package/test-env/components/toast/global_toast_list_item.js +2 -5
- package/test-env/components/tour/_tour_footer.js +1 -2
- package/test-env/components/tour/_tour_header.js +1 -2
- package/test-env/components/tour/tour_step.js +4 -5
- package/test-env/components/tree_view/tree_view_item.js +1 -2
- package/test-env/global_styling/mixins/_helpers.js +2 -8
- package/src/global_styling/react_date_picker/_date_picker.scss +0 -772
- package/src/global_styling/react_date_picker/_index.scss +0 -2
- package/src/global_styling/react_date_picker/_variables.scss +0 -1
- package/src/global_styling/utility/_animations.scss +0 -55
- package/src/global_styling/utility/_index.scss +0 -1
|
@@ -15,7 +15,7 @@ function _objectSpread(e) { for (var r = 1; r < arguments.length; r++) { var t =
|
|
|
15
15
|
import React, { useContext } from 'react';
|
|
16
16
|
import { Draggable } from '@hello-pangea/dnd';
|
|
17
17
|
import classNames from 'classnames';
|
|
18
|
-
import {
|
|
18
|
+
import { useEuiMemoizedStyles, cloneElementWithCss } from '../../services';
|
|
19
19
|
import { EuiDroppableContext } from './droppable';
|
|
20
20
|
import { euiDraggableStyles, euiDraggableItemStyles } from './draggable.styles';
|
|
21
21
|
import { EuiPortal } from '../portal';
|
|
@@ -43,8 +43,7 @@ export var EuiDraggable = function EuiDraggable(_ref) {
|
|
|
43
43
|
rest = _objectWithoutProperties(_ref, _excluded);
|
|
44
44
|
var _useContext = useContext(EuiDroppableContext),
|
|
45
45
|
cloneItems = _useContext.cloneItems;
|
|
46
|
-
var
|
|
47
|
-
var styles = euiDraggableStyles(euiTheme);
|
|
46
|
+
var styles = useEuiMemoizedStyles(euiDraggableStyles);
|
|
48
47
|
var hasCustomDragHandle = customDragHandle !== false;
|
|
49
48
|
return ___EmotionJSX(Draggable, _extends({
|
|
50
49
|
draggableId: draggableId,
|
|
@@ -12,7 +12,7 @@ var _excluded = ["droppableId", "direction", "isDropDisabled", "children", "clas
|
|
|
12
12
|
import React, { useContext } from 'react';
|
|
13
13
|
import { Droppable } from '@hello-pangea/dnd';
|
|
14
14
|
import classNames from 'classnames';
|
|
15
|
-
import {
|
|
15
|
+
import { useEuiMemoizedStyles } from '../../services';
|
|
16
16
|
import { EuiPanel } from '../panel';
|
|
17
17
|
import { EuiDragDropContextContext } from './drag_drop_context';
|
|
18
18
|
import { euiDroppableStyles } from './droppable.styles';
|
|
@@ -45,8 +45,7 @@ export var EuiDroppable = function EuiDroppable(_ref) {
|
|
|
45
45
|
var _useContext = useContext(EuiDragDropContextContext),
|
|
46
46
|
isDraggingType = _useContext.isDraggingType;
|
|
47
47
|
var dropIsDisabled = cloneDraggables ? true : isDropDisabled;
|
|
48
|
-
var
|
|
49
|
-
var styles = euiDroppableStyles(euiTheme);
|
|
48
|
+
var styles = useEuiMemoizedStyles(euiDroppableStyles);
|
|
50
49
|
return ___EmotionJSX(Droppable, _extends({
|
|
51
50
|
isDropDisabled: dropIsDisabled,
|
|
52
51
|
droppableId: droppableId,
|
|
@@ -19,10 +19,10 @@ function _isNativeReflectConstruct() { try { var t = !Boolean.prototype.valueOf.
|
|
|
19
19
|
|
|
20
20
|
import React, { Component } from 'react';
|
|
21
21
|
import classNames from 'classnames';
|
|
22
|
+
import { useEuiMemoizedStyles } from '../../services';
|
|
22
23
|
import { EuiTitle } from '../title';
|
|
23
24
|
import { EuiCodeBlock } from '../code';
|
|
24
25
|
import { EuiI18n } from '../i18n';
|
|
25
|
-
import { useEuiTheme } from '../../services';
|
|
26
26
|
import { euiErrorBoundaryStyles } from './error_boundary.styles';
|
|
27
27
|
import { jsx as ___EmotionJSX } from "@emotion/react";
|
|
28
28
|
export var EuiErrorBoundary = /*#__PURE__*/function (_Component) {
|
|
@@ -87,8 +87,7 @@ export var EuiErrorMessage = function EuiErrorMessage(_ref) {
|
|
|
87
87
|
className = _ref.className,
|
|
88
88
|
dataTestSubj = _ref['data-test-subj'],
|
|
89
89
|
rest = _objectWithoutProperties(_ref, _excluded2);
|
|
90
|
-
var
|
|
91
|
-
var styles = euiErrorBoundaryStyles(euiTheme);
|
|
90
|
+
var styles = useEuiMemoizedStyles(euiErrorBoundaryStyles);
|
|
92
91
|
return ___EmotionJSX("div", _extends({
|
|
93
92
|
css: styles.euiErrorBoundary,
|
|
94
93
|
className: classNames('euiErrorBoundary', className),
|
|
@@ -12,7 +12,7 @@ var _excluded = ["className", "showTicks", "lowerPosition", "upperPosition", "on
|
|
|
12
12
|
|
|
13
13
|
import React, { useCallback, useMemo } from 'react';
|
|
14
14
|
import classNames from 'classnames';
|
|
15
|
-
import { useMouseMove, useEuiTheme } from '../../../services';
|
|
15
|
+
import { useMouseMove, useEuiTheme, useEuiMemoizedStyles } from '../../../services';
|
|
16
16
|
import { logicalStyles } from '../../../global_styling';
|
|
17
17
|
import { euiRangeDraggableStyles, euiRangeDraggableInnerStyles } from './range_draggable.styles';
|
|
18
18
|
import { jsx as ___EmotionJSX } from "@emotion/react";
|
|
@@ -44,9 +44,9 @@ export var EuiRangeDraggable = function EuiRangeDraggable(_ref) {
|
|
|
44
44
|
handleMouseDown = _useMouseMove2[0],
|
|
45
45
|
handleInteraction = _useMouseMove2[1];
|
|
46
46
|
var classes = classNames('euiRangeDraggable', className);
|
|
47
|
-
var styles = euiRangeDraggableStyles
|
|
47
|
+
var styles = useEuiMemoizedStyles(euiRangeDraggableStyles);
|
|
48
48
|
var cssStyles = [styles.euiRangeDraggable, showTicks && styles.hasTicks, disabled && styles.disabled];
|
|
49
|
-
var innerStyles = euiRangeDraggableInnerStyles
|
|
49
|
+
var innerStyles = useEuiMemoizedStyles(euiRangeDraggableInnerStyles);
|
|
50
50
|
var cssInnerStyles = [innerStyles.euiRangeDraggable__inner, disabled ? styles.disabled : innerStyles.enabled];
|
|
51
51
|
var commonProps = {
|
|
52
52
|
className: classes,
|
|
@@ -11,10 +11,10 @@ var _excluded = ["children", "className", "color", "textSize"];
|
|
|
11
11
|
|
|
12
12
|
import React from 'react';
|
|
13
13
|
import classNames from 'classnames';
|
|
14
|
-
import {
|
|
15
|
-
import { euiHealthStyles } from './health.styles';
|
|
14
|
+
import { useEuiMemoizedStyles } from '../../services';
|
|
16
15
|
import { EuiIcon } from '../icon';
|
|
17
16
|
import { EuiFlexGroup, EuiFlexItem } from '../flex';
|
|
17
|
+
import { euiHealthStyles } from './health.styles';
|
|
18
18
|
import { jsx as ___EmotionJSX } from "@emotion/react";
|
|
19
19
|
export var TEXT_SIZES = ['xs', 's', 'm', 'inherit'];
|
|
20
20
|
export var EuiHealth = function EuiHealth(_ref) {
|
|
@@ -24,8 +24,7 @@ export var EuiHealth = function EuiHealth(_ref) {
|
|
|
24
24
|
_ref$textSize = _ref.textSize,
|
|
25
25
|
textSize = _ref$textSize === void 0 ? 's' : _ref$textSize,
|
|
26
26
|
rest = _objectWithoutProperties(_ref, _excluded);
|
|
27
|
-
var
|
|
28
|
-
var styles = euiHealthStyles(euiTheme);
|
|
27
|
+
var styles = useEuiMemoizedStyles(euiHealthStyles);
|
|
29
28
|
var cssStyles = [styles.euiHealth, styles[textSize]];
|
|
30
29
|
var classes = classNames('euiHealth', className);
|
|
31
30
|
return ___EmotionJSX("div", _extends({
|
|
@@ -19,7 +19,7 @@ import { euiFormVariables } from '../form/form.styles';
|
|
|
19
19
|
import { EuiButtonIcon, EuiButtonEmpty } from '../button';
|
|
20
20
|
import { EuiFlexGroup, EuiFlexItem } from '../flex';
|
|
21
21
|
import { EuiSkeletonLoading, EuiSkeletonRectangle } from '../skeleton';
|
|
22
|
-
import {
|
|
22
|
+
import { useEuiMemoizedStyles, useCombinedRefs, keys } from '../../services';
|
|
23
23
|
import { EuiI18n, useEuiI18n } from '../i18n';
|
|
24
24
|
import { useGeneratedHtmlId } from '../../services/accessibility';
|
|
25
25
|
import { euiInlineEditReadModeStyles } from './inline_edit_form.styles';
|
|
@@ -62,10 +62,9 @@ export var EuiInlineEditForm = function EuiInlineEditForm(_ref) {
|
|
|
62
62
|
isReadOnly = _ref.isReadOnly,
|
|
63
63
|
rest = _objectWithoutProperties(_ref, _excluded);
|
|
64
64
|
var classes = classNames('euiInlineEdit', className);
|
|
65
|
-
var
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
controlCompressedHeight = _euiFormVariables.controlCompressedHeight;
|
|
65
|
+
var _useEuiMemoizedStyles = useEuiMemoizedStyles(euiFormVariables),
|
|
66
|
+
controlHeight = _useEuiMemoizedStyles.controlHeight,
|
|
67
|
+
controlCompressedHeight = _useEuiMemoizedStyles.controlCompressedHeight;
|
|
69
68
|
var loadingSkeletonSize = sizes.compressed ? controlCompressedHeight : controlHeight;
|
|
70
69
|
var defaultSaveButtonAriaLabel = useEuiI18n('euiInlineEditForm.saveButtonAriaLabel', 'Save edit');
|
|
71
70
|
var defaultCancelButtonAriaLabel = useEuiI18n('euiInlineEditForm.cancelButtonAriaLabel', 'Cancel edit');
|
|
@@ -100,7 +99,7 @@ export var EuiInlineEditForm = function EuiInlineEditForm(_ref) {
|
|
|
100
99
|
return isEditing ? editModeValue : readModeValue || placeholder;
|
|
101
100
|
}
|
|
102
101
|
}, [controlledValue, editModeValue, readModeValue, isEditing, placeholder]);
|
|
103
|
-
var readModeStyles = euiInlineEditReadModeStyles
|
|
102
|
+
var readModeStyles = useEuiMemoizedStyles(euiInlineEditReadModeStyles);
|
|
104
103
|
var readModeCssStyles = [readModeStyles.euiInlineEditReadMode, isReadOnly && readModeStyles.isReadOnly, placeholder && !readModeValue && readModeStyles.hasPlaceholder];
|
|
105
104
|
var activateEditMode = function activateEditMode() {
|
|
106
105
|
setIsEditing(true);
|
|
@@ -14,9 +14,9 @@ function _objectSpread(e) { for (var r = 1; r < arguments.length; r++) { var t =
|
|
|
14
14
|
|
|
15
15
|
import React, { useMemo } from 'react';
|
|
16
16
|
import classNames from 'classnames';
|
|
17
|
+
import { useEuiMemoizedStyles } from '../../services';
|
|
17
18
|
import { EuiText } from '../text';
|
|
18
19
|
import { EuiInlineEditForm, SMALL_SIZE_FORM, MEDIUM_SIZE_FORM } from './inline_edit_form';
|
|
19
|
-
import { useEuiTheme } from '../../services';
|
|
20
20
|
import { euiInlineEditTextStyles } from './inline_edit_text.styles';
|
|
21
21
|
import { jsx as ___EmotionJSX } from "@emotion/react";
|
|
22
22
|
export var EuiInlineEditText = function EuiInlineEditText(_ref) {
|
|
@@ -27,8 +27,7 @@ export var EuiInlineEditText = function EuiInlineEditText(_ref) {
|
|
|
27
27
|
isReadOnly = _ref.isReadOnly,
|
|
28
28
|
rest = _objectWithoutProperties(_ref, _excluded);
|
|
29
29
|
var classes = classNames('euiInlineEditText', className);
|
|
30
|
-
var
|
|
31
|
-
var styles = euiInlineEditTextStyles(theme);
|
|
30
|
+
var styles = useEuiMemoizedStyles(euiInlineEditTextStyles);
|
|
32
31
|
var cssStyles = [styles.euiInlineEditText, styles.fontSize[size]];
|
|
33
32
|
var isSmallSize = ['xs', 's'].includes(size);
|
|
34
33
|
var sizes = isSmallSize ? SMALL_SIZE_FORM : MEDIUM_SIZE_FORM;
|
|
@@ -14,9 +14,9 @@ function _objectSpread(e) { for (var r = 1; r < arguments.length; r++) { var t =
|
|
|
14
14
|
|
|
15
15
|
import React, { useMemo } from 'react';
|
|
16
16
|
import classNames from 'classnames';
|
|
17
|
+
import { useEuiMemoizedStyles } from '../../services';
|
|
17
18
|
import { EuiTitle } from '../title';
|
|
18
19
|
import { EuiInlineEditForm, SMALL_SIZE_FORM, MEDIUM_SIZE_FORM } from './inline_edit_form';
|
|
19
|
-
import { useEuiTheme } from '../../services';
|
|
20
20
|
import { euiInlineEditTitleStyles } from './inline_edit_title.styles';
|
|
21
21
|
import { jsx as ___EmotionJSX } from "@emotion/react";
|
|
22
22
|
export var HEADINGS = ['h1', 'h2', 'h3', 'h4', 'h5', 'h6', 'span'];
|
|
@@ -29,8 +29,7 @@ export var EuiInlineEditTitle = function EuiInlineEditTitle(_ref) {
|
|
|
29
29
|
isReadOnly = _ref.isReadOnly,
|
|
30
30
|
rest = _objectWithoutProperties(_ref, _excluded);
|
|
31
31
|
var classes = classNames('euiInlineEditTitle', className);
|
|
32
|
-
var
|
|
33
|
-
var styles = euiInlineEditTitleStyles(theme);
|
|
32
|
+
var styles = useEuiMemoizedStyles(euiInlineEditTitleStyles);
|
|
34
33
|
var cssStyles = [styles.euiInlineEditTitle, styles.fontSize[size]];
|
|
35
34
|
var H = heading;
|
|
36
35
|
var isSmallSize = ['xxxs', 'xxs', 'xs', 's'].includes(size);
|
|
@@ -12,8 +12,8 @@ var _excluded = ["children", "className", "checkable"];
|
|
|
12
12
|
|
|
13
13
|
import React from 'react';
|
|
14
14
|
import classNames from 'classnames';
|
|
15
|
+
import { useEuiMemoizedStyles } from '../../services';
|
|
15
16
|
import { EuiFormLabel } from '../form/form_label/form_label';
|
|
16
|
-
import { useEuiTheme } from '../../services';
|
|
17
17
|
import { euiKeyPadMenuStyles } from './key_pad_menu.styles';
|
|
18
18
|
import { jsx as ___EmotionJSX } from "@emotion/react";
|
|
19
19
|
export var EuiKeyPadMenu = function EuiKeyPadMenu(_ref) {
|
|
@@ -24,8 +24,7 @@ export var EuiKeyPadMenu = function EuiKeyPadMenu(_ref) {
|
|
|
24
24
|
rest = _objectWithoutProperties(_ref, _excluded);
|
|
25
25
|
var hasCheckableConfig = _typeof(checkable) === 'object';
|
|
26
26
|
var classes = classNames('euiKeyPadMenu', className);
|
|
27
|
-
var
|
|
28
|
-
var styles = euiKeyPadMenuStyles(theme);
|
|
27
|
+
var styles = useEuiMemoizedStyles(euiKeyPadMenuStyles);
|
|
29
28
|
var cssStyles = [styles.euiKeyPadMenu];
|
|
30
29
|
var legendCssStyles = [styles.euiKeyPadMenu__legend, hasCheckableConfig && (checkable === null || checkable === void 0 || (_checkable$legendProp = checkable.legendProps) === null || _checkable$legendProp === void 0 ? void 0 : _checkable$legendProp.css)];
|
|
31
30
|
var legend = hasCheckableConfig && checkable.legend ? ___EmotionJSX(EuiFormLabel, _extends({}, checkable.legendProps, {
|
|
@@ -11,7 +11,7 @@ var _excluded = ["id", "isSelected", "isDisabled", "label", "children", "classNa
|
|
|
11
11
|
|
|
12
12
|
import React, { useMemo } from 'react';
|
|
13
13
|
import classNames from 'classnames';
|
|
14
|
-
import {
|
|
14
|
+
import { useEuiMemoizedStyles, getSecureRelForTarget, useGeneratedHtmlId } from '../../services';
|
|
15
15
|
import { EuiBetaBadge } from '../badge/beta_badge';
|
|
16
16
|
import { EuiRadio, EuiCheckbox } from '../form';
|
|
17
17
|
import { validateHref } from '../../services/security/href_validator';
|
|
@@ -41,8 +41,7 @@ export var EuiKeyPadMenuItem = function EuiKeyPadMenuItem(_ref) {
|
|
|
41
41
|
rest = _objectWithoutProperties(_ref, _excluded);
|
|
42
42
|
var isHrefValid = !href || validateHref(href);
|
|
43
43
|
var isDisabled = disabled || _isDisabled || !isHrefValid;
|
|
44
|
-
var
|
|
45
|
-
var styles = euiKeyPadMenuItemStyles(euiTheme);
|
|
44
|
+
var styles = useEuiMemoizedStyles(euiKeyPadMenuItemStyles);
|
|
46
45
|
var cssStyles = [styles.euiKeyPadMenuItem, !isDisabled ? styles.enabled : styles.disabled.disabled, isSelected && (!isDisabled ? styles.selected : styles.disabled.selected)];
|
|
47
46
|
var classes = classNames('euiKeyPadMenuItem', className);
|
|
48
47
|
var Element = href && !isDisabled ? 'a' : 'button';
|
|
@@ -50,9 +49,7 @@ export var EuiKeyPadMenuItem = function EuiKeyPadMenuItem(_ref) {
|
|
|
50
49
|
var itemId = useGeneratedHtmlId({
|
|
51
50
|
conditionalId: id
|
|
52
51
|
});
|
|
53
|
-
var childStyles =
|
|
54
|
-
return euiKeyPadMenuItemChildStyles(euiTheme);
|
|
55
|
-
}, [euiTheme]);
|
|
52
|
+
var childStyles = useEuiMemoizedStyles(euiKeyPadMenuItemChildStyles);
|
|
56
53
|
var checkableElement = useMemo(function () {
|
|
57
54
|
if (!checkable) return;
|
|
58
55
|
var cssStyles = [childStyles.euiKeyPadMenuItem__checkableInput, !isSelected && isDisabled && childStyles.hideCheckableInput, !isSelected && !isDisabled && childStyles.showCheckableInputOnInteraction];
|
|
@@ -11,8 +11,8 @@ var _excluded = ["children", "className", "hasScreenReaderHelpText"];
|
|
|
11
11
|
|
|
12
12
|
import React, { useMemo } from 'react';
|
|
13
13
|
import classNames from 'classnames';
|
|
14
|
+
import { useEuiMemoizedStyles } from '../../services';
|
|
14
15
|
import { useEuiI18n } from '../i18n';
|
|
15
|
-
import { useEuiTheme } from '../../services';
|
|
16
16
|
import { euiMarkStyles, euiMarkScreenReaderStyles } from './mark.styles';
|
|
17
17
|
import { jsx as ___EmotionJSX } from "@emotion/react";
|
|
18
18
|
export var EuiMark = function EuiMark(_ref) {
|
|
@@ -22,8 +22,7 @@ export var EuiMark = function EuiMark(_ref) {
|
|
|
22
22
|
hasScreenReaderHelpText = _ref$hasScreenReaderH === void 0 ? true : _ref$hasScreenReaderH,
|
|
23
23
|
rest = _objectWithoutProperties(_ref, _excluded);
|
|
24
24
|
var classes = classNames('euiMark', className);
|
|
25
|
-
var
|
|
26
|
-
var styles = euiMarkStyles(euiTheme);
|
|
25
|
+
var styles = useEuiMemoizedStyles(euiMarkStyles);
|
|
27
26
|
var highlightStart = useEuiI18n('euiMark.highlightStart', 'highlight start');
|
|
28
27
|
var highlightEnd = useEuiI18n('euiMark.highlightEnd', 'highlight end');
|
|
29
28
|
var screenReaderStyles = useMemo(function () {
|
|
@@ -14,7 +14,7 @@ import React, { useEffect, useState } from 'react';
|
|
|
14
14
|
import { cx } from '@emotion/css';
|
|
15
15
|
import { Global } from '@emotion/react';
|
|
16
16
|
import { keysOf } from '../common';
|
|
17
|
-
import { useCombinedRefs,
|
|
17
|
+
import { useCombinedRefs, useEuiMemoizedStyles } from '../../services';
|
|
18
18
|
import { EuiPortal } from '../portal';
|
|
19
19
|
import { euiOverlayMaskStyles } from './overlay_mask.styles';
|
|
20
20
|
import { euiOverlayMaskBodyStyles } from './overlay_mask_body.styles';
|
|
@@ -31,8 +31,7 @@ export var EuiOverlayMask = function EuiOverlayMask(_ref) {
|
|
|
31
31
|
overlayMaskNode = _useState2[0],
|
|
32
32
|
setOverlayMaskNode = _useState2[1];
|
|
33
33
|
var combinedMaskRef = useCombinedRefs([setOverlayMaskNode, maskRef]);
|
|
34
|
-
var
|
|
35
|
-
var styles = euiOverlayMaskStyles(euiTheme);
|
|
34
|
+
var styles = useEuiMemoizedStyles(euiOverlayMaskStyles);
|
|
36
35
|
var cssStyles = cx([styles.euiOverlayMask, styles["".concat(headerZindexLocation, "Header")]]);
|
|
37
36
|
useEffect(function () {
|
|
38
37
|
if (!overlayMaskNode) return;
|
|
@@ -109,11 +109,13 @@ export var EuiPopover = /*#__PURE__*/function (_Component) {
|
|
|
109
109
|
});
|
|
110
110
|
_defineProperty(_this, "handleStrandedFocus", function () {
|
|
111
111
|
_this.strandedFocusTimeout = window.setTimeout(function () {
|
|
112
|
+
var _this$panel;
|
|
112
113
|
// If `returnFocus` failed and focus was stranded,
|
|
113
114
|
// attempt to manually restore focus to the toggle button.
|
|
114
115
|
// The stranded focus is either in most cases on body but
|
|
115
116
|
// it will be on the panel instead on mount when isOpen=true
|
|
116
|
-
if (document.activeElement === document.body || document.activeElement
|
|
117
|
+
if (document.activeElement === document.body || (_this$panel = _this.panel) !== null && _this$panel !== void 0 && _this$panel.contains(document.activeElement) // if focus is on OR within this.panel
|
|
118
|
+
) {
|
|
117
119
|
if (!_this.button) return;
|
|
118
120
|
var focusableItems = focusable(_this.button);
|
|
119
121
|
if (!focusableItems.length) return;
|
|
@@ -25,6 +25,7 @@ import { EuiPopover, EuiPopoverTitle } from '../../popover';
|
|
|
25
25
|
import { EuiFilterButton } from '../../filter_group';
|
|
26
26
|
import { euiFilterGroupStyles } from '../../filter_group/filter_group.styles';
|
|
27
27
|
import { EuiSelectable } from '../../selectable';
|
|
28
|
+
import { EuiI18n } from '../../i18n';
|
|
28
29
|
import { Query } from '../query';
|
|
29
30
|
import { Operator } from '../query/ast';
|
|
30
31
|
import { jsx as ___EmotionJSX } from "@emotion/react";
|
|
@@ -275,14 +276,21 @@ export var FieldValueSelectionFilter = /*#__PURE__*/function (_Component) {
|
|
|
275
276
|
}) : false;
|
|
276
277
|
var activeItemsCount = this.state.activeItemsCount;
|
|
277
278
|
var active = (activeTop || activeItem) && activeItemsCount > 0;
|
|
278
|
-
var button = ___EmotionJSX(
|
|
279
|
-
|
|
280
|
-
|
|
281
|
-
|
|
282
|
-
|
|
283
|
-
|
|
284
|
-
|
|
285
|
-
|
|
279
|
+
var button = ___EmotionJSX(EuiI18n, {
|
|
280
|
+
token: "euiFieldValueSelectionFilter.buttonLabelHint",
|
|
281
|
+
default: "Selection"
|
|
282
|
+
}, function (buttonLabelHint) {
|
|
283
|
+
var ariaLabel = "".concat(config.name, " ").concat(buttonLabelHint);
|
|
284
|
+
return ___EmotionJSX(EuiFilterButton, {
|
|
285
|
+
iconType: "arrowDown",
|
|
286
|
+
iconSide: "right",
|
|
287
|
+
hasActiveFilters: active,
|
|
288
|
+
numActiveFilters: active ? activeItemsCount : undefined,
|
|
289
|
+
grow: true,
|
|
290
|
+
"aria-label": ariaLabel,
|
|
291
|
+
onClick: _this3.onButtonClick.bind(_this3)
|
|
292
|
+
}, config.name);
|
|
293
|
+
});
|
|
286
294
|
var items = options ? options.map(function (option) {
|
|
287
295
|
var _option$view;
|
|
288
296
|
var optionField = option.field || config.field;
|
|
@@ -340,7 +348,8 @@ export var FieldValueSelectionFilter = /*#__PURE__*/function (_Component) {
|
|
|
340
348
|
errorMessage: _this3.state.error,
|
|
341
349
|
noMatchesMessage: config.noOptionsMessage,
|
|
342
350
|
listProps: {
|
|
343
|
-
isVirtualized: isOverSearchThreshold || false
|
|
351
|
+
isVirtualized: isOverSearchThreshold || false,
|
|
352
|
+
autoFocus: true
|
|
344
353
|
},
|
|
345
354
|
onChange: function onChange(options, event, changedOption) {
|
|
346
355
|
if (changedOption.data) {
|
|
@@ -197,7 +197,6 @@ describe('EuiSearchBar', function () {
|
|
|
197
197
|
it('has zero violations after filtering by Tags', function () {
|
|
198
198
|
cy.get('button.euiButtonEmpty').last().focus();
|
|
199
199
|
cy.realPress('Enter');
|
|
200
|
-
cy.realPress('Tab');
|
|
201
200
|
cy.realPress('ArrowDown');
|
|
202
201
|
cy.realPress('Enter');
|
|
203
202
|
cy.realPress('Escape');
|
|
@@ -9,7 +9,7 @@ import _inherits from "@babel/runtime/helpers/inherits";
|
|
|
9
9
|
import _defineProperty from "@babel/runtime/helpers/defineProperty";
|
|
10
10
|
var _excluded = ["data"],
|
|
11
11
|
_excluded2 = ["label", "isGroupLabel", "checked", "disabled", "prepend", "append", "ref", "key", "searchableLabel", "data", "truncationProps"],
|
|
12
|
-
_excluded3 = ["className", "options", "searchValue", "onOptionClick", "renderOption", "height", "windowProps", "rowHeight", "activeOptionIndex", "makeOptionId", "showIcons", "singleSelection", "visibleOptions", "allowExclusions", "bordered", "paddingSize", "searchable", "onFocusBadge", "listId", "setActiveOptionIndex", "aria-label", "aria-labelledby", "aria-describedby", "role", "isPreFiltered", "isVirtualized", "textWrap", "truncationProps"];
|
|
12
|
+
_excluded3 = ["className", "options", "searchValue", "onOptionClick", "renderOption", "height", "windowProps", "rowHeight", "activeOptionIndex", "makeOptionId", "showIcons", "singleSelection", "visibleOptions", "allowExclusions", "bordered", "paddingSize", "searchable", "onFocusBadge", "listId", "setActiveOptionIndex", "aria-label", "aria-labelledby", "aria-describedby", "role", "isPreFiltered", "isVirtualized", "textWrap", "truncationProps", "autoFocus"];
|
|
13
13
|
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; }
|
|
14
14
|
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; }
|
|
15
15
|
function _callSuper(t, o, e) { return o = _getPrototypeOf(o), _possibleConstructorReturn(t, _isNativeReflectConstruct() ? Reflect.construct(o, e || [], _getPrototypeOf(t).constructor) : o.apply(t, e)); }
|
|
@@ -64,6 +64,7 @@ export var EuiSelectableList = /*#__PURE__*/function (_Component) {
|
|
|
64
64
|
listId = _this$props.listId,
|
|
65
65
|
searchable = _this$props.searchable,
|
|
66
66
|
singleSelection = _this$props.singleSelection,
|
|
67
|
+
autoFocus = _this$props.autoFocus,
|
|
67
68
|
ariaLabel = _this$props['aria-label'],
|
|
68
69
|
ariaLabelledby = _this$props['aria-labelledby'],
|
|
69
70
|
ariaDescribedby = _this$props['aria-describedby'];
|
|
@@ -84,6 +85,13 @@ export var EuiSelectableList = /*#__PURE__*/function (_Component) {
|
|
|
84
85
|
if (typeof ariaDescribedby === 'string') {
|
|
85
86
|
ref.setAttribute('aria-describedby', ariaDescribedby);
|
|
86
87
|
}
|
|
88
|
+
if (autoFocus === true) {
|
|
89
|
+
// manually focus listbox once available
|
|
90
|
+
// use last stack execution to prevent potential focus order issues
|
|
91
|
+
setTimeout(function () {
|
|
92
|
+
return ref.focus();
|
|
93
|
+
});
|
|
94
|
+
}
|
|
87
95
|
}
|
|
88
96
|
});
|
|
89
97
|
// This utility is necessary to exclude group labels from the aria set count
|
|
@@ -537,6 +545,7 @@ export var EuiSelectableList = /*#__PURE__*/function (_Component) {
|
|
|
537
545
|
isVirtualized = _this$props11.isVirtualized,
|
|
538
546
|
textWrap = _this$props11.textWrap,
|
|
539
547
|
truncationProps = _this$props11.truncationProps,
|
|
548
|
+
autoFocus = _this$props11.autoFocus,
|
|
540
549
|
rest = _objectWithoutProperties(_this$props11, _excluded3);
|
|
541
550
|
var heightIsFull = forcedHeight === 'full';
|
|
542
551
|
var classes = classNames('euiSelectableList', className);
|
|
@@ -13,7 +13,7 @@ var _excluded = ["href", "target", "rel", "onClick", "className", "children", "d
|
|
|
13
13
|
|
|
14
14
|
import React, { useState, useEffect, useCallback } from 'react';
|
|
15
15
|
import classNames from 'classnames';
|
|
16
|
-
import {
|
|
16
|
+
import { useEuiMemoizedStyles, getSecureRelForTarget } from '../../services';
|
|
17
17
|
import { validateHref } from '../../services/security/href_validator';
|
|
18
18
|
import { EuiInnerText } from '../inner_text';
|
|
19
19
|
import { EuiIcon } from '../icon';
|
|
@@ -84,7 +84,6 @@ export var EuiSideNavItem = function EuiSideNavItem(_ref2) {
|
|
|
84
84
|
buttonClassName = _ref2.buttonClassName,
|
|
85
85
|
childrenOnly = _ref2.childrenOnly,
|
|
86
86
|
rest = _objectWithoutProperties(_ref2, _excluded2);
|
|
87
|
-
var euiTheme = useEuiTheme();
|
|
88
87
|
var isHrefValid = !_href || validateHref(_href);
|
|
89
88
|
var href = isHrefValid ? _href : '';
|
|
90
89
|
|
|
@@ -113,14 +112,14 @@ export var EuiSideNavItem = function EuiSideNavItem(_ref2) {
|
|
|
113
112
|
'euiSideNavItem--emphasized': emphasize,
|
|
114
113
|
'euiSideNavItem-hasChildItems': hasChildItems
|
|
115
114
|
}, className);
|
|
116
|
-
var styles = euiSideNavItemStyles
|
|
115
|
+
var styles = useEuiMemoizedStyles(euiSideNavItemStyles);
|
|
117
116
|
var cssStyles = [styles.euiSideNavItem, isRoot && styles.root, isTrunk && styles.trunk, isBranch && styles.branch, emphasize && styles.emphasized, css];
|
|
118
117
|
var itemsStyles = hasChildItems && [styles.items.euiSideNavItem__items, isRoot && icon && styles.items.rootWithIcon, isTrunk && styles.items.trunk, isBranch && styles.items.branch];
|
|
119
118
|
var buttonClasses = classNames('euiSideNavItemButton', {
|
|
120
119
|
'euiSideNavItemButton-isOpen': depth > 0 && itemIsOpen && !isSelected,
|
|
121
120
|
'euiSideNavItemButton-isSelected': isSelected
|
|
122
121
|
}, buttonClassName);
|
|
123
|
-
var buttonStyles = euiSideNavItemButtonStyles
|
|
122
|
+
var buttonStyles = useEuiMemoizedStyles(euiSideNavItemButtonStyles);
|
|
124
123
|
var buttonCssStyles = [buttonStyles.euiSideNavItemButton, isSelected && buttonStyles.selected, emphasize && buttonStyles.emphasized, isRoot && buttonStyles.root, isTrunk && buttonStyles.trunk, isBranch && buttonStyles.branch];
|
|
125
124
|
var labelCssStyles = [buttonStyles.label.euiSideNavItemButton__label, isRoot && buttonStyles.label.root];
|
|
126
125
|
return ___EmotionJSX("div", {
|
|
@@ -59,6 +59,7 @@ export var EuiTab = function EuiTab(_ref) {
|
|
|
59
59
|
return ___EmotionJSX("a", _extends({
|
|
60
60
|
role: "tab",
|
|
61
61
|
"aria-selected": !!isSelected,
|
|
62
|
+
tabIndex: isSelected ? 0 : -1,
|
|
62
63
|
className: classes,
|
|
63
64
|
css: cssTabStyles,
|
|
64
65
|
href: href,
|
|
@@ -72,6 +73,7 @@ export var EuiTab = function EuiTab(_ref) {
|
|
|
72
73
|
return ___EmotionJSX("button", _extends({
|
|
73
74
|
role: "tab",
|
|
74
75
|
"aria-selected": !!isSelected,
|
|
76
|
+
tabIndex: isSelected ? 0 : -1,
|
|
75
77
|
type: "button",
|
|
76
78
|
className: classes,
|
|
77
79
|
css: cssTabStyles,
|
|
@@ -11,7 +11,7 @@ var _excluded = ["children", "className", "bottomBorder", "expand", "size"];
|
|
|
11
11
|
|
|
12
12
|
import React, { forwardRef } from 'react';
|
|
13
13
|
import classNames from 'classnames';
|
|
14
|
-
import { useEuiMemoizedStyles } from '../../services';
|
|
14
|
+
import { keys, useEuiMemoizedStyles } from '../../services';
|
|
15
15
|
import { euiTabsStyles } from './tabs.styles';
|
|
16
16
|
import { EuiTabsContext } from './tabs_context';
|
|
17
17
|
import { jsx as ___EmotionJSX } from "@emotion/react";
|
|
@@ -29,10 +29,26 @@ export var EuiTabs = /*#__PURE__*/forwardRef(function (_ref, ref) {
|
|
|
29
29
|
var classes = classNames('euiTabs', className);
|
|
30
30
|
var styles = useEuiMemoizedStyles(euiTabsStyles);
|
|
31
31
|
var cssStyles = [styles.euiTabs, styles[size], bottomBorder && styles.bottomBorder];
|
|
32
|
+
var handleKeyDown = function handleKeyDown(event) {
|
|
33
|
+
var tablist = event.currentTarget;
|
|
34
|
+
var tabs = tablist === null || tablist === void 0 ? void 0 : tablist.querySelectorAll('[role="tab"]:not(:disabled, [inert])');
|
|
35
|
+
if (!(tabs !== null && tabs !== void 0 && tabs.length)) return;
|
|
36
|
+
var currentIndex = Array.from(tabs).findIndex(function (tab) {
|
|
37
|
+
return tab.matches(':focus');
|
|
38
|
+
});
|
|
39
|
+
if (event.key === keys.ARROW_LEFT) {
|
|
40
|
+
var previousIndex = (currentIndex === 0 ? tabs.length : currentIndex) - 1;
|
|
41
|
+
tabs[previousIndex].focus();
|
|
42
|
+
} else if (event.key === keys.ARROW_RIGHT) {
|
|
43
|
+
var nextIndex = currentIndex === tabs.length - 1 ? 0 : currentIndex + 1;
|
|
44
|
+
tabs[nextIndex].focus();
|
|
45
|
+
}
|
|
46
|
+
};
|
|
32
47
|
return ___EmotionJSX("div", _extends({
|
|
33
48
|
ref: ref,
|
|
34
49
|
className: classes,
|
|
35
|
-
css: cssStyles
|
|
50
|
+
css: cssStyles,
|
|
51
|
+
onKeyDown: handleKeyDown
|
|
36
52
|
}, children && {
|
|
37
53
|
role: 'tablist'
|
|
38
54
|
}, rest), ___EmotionJSX(EuiTabsContext.Provider, {
|
|
@@ -12,7 +12,7 @@ var _excluded = ["className", "insertComponent", "deleteComponent", "sameCompone
|
|
|
12
12
|
import React, { useMemo } from 'react';
|
|
13
13
|
import Diff from 'text-diff';
|
|
14
14
|
import classNames from 'classnames';
|
|
15
|
-
import {
|
|
15
|
+
import { useEuiMemoizedStyles } from '../../services';
|
|
16
16
|
import { euiTextDiffStyles } from './text_diff.styles';
|
|
17
17
|
import { jsx as ___EmotionJSX } from "@emotion/react";
|
|
18
18
|
export var useEuiTextDiff = function useEuiTextDiff(_ref) {
|
|
@@ -37,8 +37,7 @@ export var useEuiTextDiff = function useEuiTextDiff(_ref) {
|
|
|
37
37
|
return diff.main(beforeText, afterText);
|
|
38
38
|
}, [beforeText, afterText, timeout]); // produces diff array
|
|
39
39
|
|
|
40
|
-
var
|
|
41
|
-
var styles = euiTextDiffStyles(euiTheme);
|
|
40
|
+
var styles = useEuiMemoizedStyles(euiTextDiffStyles);
|
|
42
41
|
var classes = classNames('euiTextDiff', className);
|
|
43
42
|
var rendereredHtml = useMemo(function () {
|
|
44
43
|
var html = [];
|
|
@@ -10,17 +10,14 @@ function _objectSpread(e) { for (var r = 1; r < arguments.length; r++) { var t =
|
|
|
10
10
|
*/
|
|
11
11
|
|
|
12
12
|
import classNames from 'classnames';
|
|
13
|
-
import {
|
|
13
|
+
import { useEuiMemoizedStyles, cloneElementWithCss } from '../../services';
|
|
14
14
|
import { euiGlobalToastListItemStyles } from './global_toast_list.styles';
|
|
15
15
|
export var EuiGlobalToastListItem = function EuiGlobalToastListItem(_ref) {
|
|
16
16
|
var children = _ref.children,
|
|
17
17
|
className = _ref.className,
|
|
18
18
|
isDismissed = _ref.isDismissed;
|
|
19
|
-
var
|
|
20
|
-
if (!children)
|
|
21
|
-
return null;
|
|
22
|
-
}
|
|
23
|
-
var styles = euiGlobalToastListItemStyles(euiTheme);
|
|
19
|
+
var styles = useEuiMemoizedStyles(euiGlobalToastListItemStyles);
|
|
20
|
+
if (!children) return null;
|
|
24
21
|
var cssStyles = [styles.euiGlobalToastListItem, isDismissed && styles.dismissed];
|
|
25
22
|
var classes = classNames('euiGlobalToastListItem', children.props.className, className);
|
|
26
23
|
return cloneElementWithCss(children, _objectSpread(_objectSpread({}, children.props), {
|
|
@@ -9,7 +9,7 @@ import _toConsumableArray from "@babel/runtime/helpers/toConsumableArray";
|
|
|
9
9
|
*/
|
|
10
10
|
|
|
11
11
|
import React, { useMemo, memo } from 'react';
|
|
12
|
-
import {
|
|
12
|
+
import { useEuiMemoizedStyles } from '../../services';
|
|
13
13
|
import { EuiI18n } from '../i18n';
|
|
14
14
|
import { EuiPopoverFooter } from '../popover';
|
|
15
15
|
import { EuiButtonEmpty } from '../button';
|
|
@@ -22,8 +22,7 @@ export var EuiTourFooter = /*#__PURE__*/memo(function (_ref) {
|
|
|
22
22
|
step = _ref.step,
|
|
23
23
|
stepsTotal = _ref.stepsTotal,
|
|
24
24
|
onFinish = _ref.onFinish;
|
|
25
|
-
var
|
|
26
|
-
var footerStyles = euiTourFooterStyles(euiTheme);
|
|
25
|
+
var footerStyles = useEuiMemoizedStyles(euiTourFooterStyles);
|
|
27
26
|
var customFooterAction = useMemo(function () {
|
|
28
27
|
if (!footerAction) return null;
|
|
29
28
|
return Array.isArray(footerAction) ? ___EmotionJSX(EuiFlexGroup, {
|
|
@@ -7,7 +7,7 @@
|
|
|
7
7
|
*/
|
|
8
8
|
|
|
9
9
|
import React, { memo } from 'react';
|
|
10
|
-
import {
|
|
10
|
+
import { useEuiMemoizedStyles } from '../../services';
|
|
11
11
|
import { EuiPopoverTitle } from '../popover';
|
|
12
12
|
import { EuiTitle } from '../title';
|
|
13
13
|
import { euiTourHeaderStyles } from './_tour_header.styles';
|
|
@@ -16,8 +16,7 @@ export var EuiTourHeader = /*#__PURE__*/memo(function (_ref) {
|
|
|
16
16
|
var id = _ref.id,
|
|
17
17
|
title = _ref.title,
|
|
18
18
|
subtitle = _ref.subtitle;
|
|
19
|
-
var
|
|
20
|
-
var headerStyles = euiTourHeaderStyles(euiTheme);
|
|
19
|
+
var headerStyles = useEuiMemoizedStyles(euiTourHeaderStyles);
|
|
21
20
|
return ___EmotionJSX(EuiPopoverTitle, {
|
|
22
21
|
css: headerStyles.euiTourHeader,
|
|
23
22
|
className: "euiTourHeader",
|
|
@@ -15,10 +15,10 @@ function _objectSpread(e) { for (var r = 1; r < arguments.length; r++) { var t =
|
|
|
15
15
|
|
|
16
16
|
import React, { useEffect, useState, useMemo, useCallback } from 'react';
|
|
17
17
|
import classNames from 'classnames';
|
|
18
|
+
import { useGeneratedHtmlId, findElementBySelectorOrRef, useEuiMemoizedStyles } from '../../services';
|
|
18
19
|
import { logicalStyles } from '../../global_styling';
|
|
19
|
-
import { EuiBeacon } from '../beacon';
|
|
20
20
|
import { EuiPopover, EuiWrappingPopover } from '../popover';
|
|
21
|
-
import {
|
|
21
|
+
import { EuiBeacon } from '../beacon';
|
|
22
22
|
import { EuiTourHeader } from './_tour_header';
|
|
23
23
|
import { EuiTourFooter } from './_tour_footer';
|
|
24
24
|
import { euiTourStyles, euiTourBeaconStyles } from './tour.styles';
|
|
@@ -84,9 +84,8 @@ export var EuiTourStep = function EuiTourStep(_ref) {
|
|
|
84
84
|
}, [anchor]);
|
|
85
85
|
var anchorClasses = classNames('euiTourAnchor', className);
|
|
86
86
|
var popoverClasses = classNames('euiTour', panelClassName);
|
|
87
|
-
var
|
|
88
|
-
var
|
|
89
|
-
var beaconStyles = euiTourBeaconStyles(euiTheme);
|
|
87
|
+
var tourStyles = useEuiMemoizedStyles(euiTourStyles);
|
|
88
|
+
var beaconStyles = useEuiMemoizedStyles(euiTourBeaconStyles);
|
|
90
89
|
var beaconCss = [beaconStyles.euiTourBeacon, isStepOpen && beaconStyles.isOpen, popoverPosition && beaconStyles[popoverPosition]];
|
|
91
90
|
var hasBeacon = decoration === 'beacon';
|
|
92
91
|
var widthStyles = useMemo(function () {
|
|
@@ -11,7 +11,7 @@ var _excluded = ["id", "label", "className", "children", "display", "icon", "has
|
|
|
11
11
|
|
|
12
12
|
import React, { memo } from 'react';
|
|
13
13
|
import classNames from 'classnames';
|
|
14
|
-
import {
|
|
14
|
+
import { useEuiMemoizedStyles } from '../../services';
|
|
15
15
|
import { EuiIcon } from '../icon';
|
|
16
16
|
import { euiTreeViewItemStyles } from './tree_view_item.styles';
|
|
17
17
|
import { jsx as ___EmotionJSX } from "@emotion/react";
|
|
@@ -29,8 +29,7 @@ export var EuiTreeViewItem = /*#__PURE__*/memo(function (_ref) {
|
|
|
29
29
|
buttonRef = _ref.buttonRef,
|
|
30
30
|
wrapperProps = _ref.wrapperProps,
|
|
31
31
|
rest = _objectWithoutProperties(_ref, _excluded);
|
|
32
|
-
var
|
|
33
|
-
var styles = euiTreeViewItemStyles(euiTheme);
|
|
32
|
+
var styles = useEuiMemoizedStyles(euiTreeViewItemStyles);
|
|
34
33
|
var wrapperClasses = classNames('euiTreeView__node', {
|
|
35
34
|
'euiTreeView__node--expanded': isExpanded
|
|
36
35
|
}, wrapperProps === null || wrapperProps === void 0 ? void 0 : wrapperProps.className);
|
|
@@ -166,10 +166,4 @@ export var useEuiOverflowScroll = function useEuiOverflowScroll(direction) {
|
|
|
166
166
|
*/
|
|
167
167
|
export var euiFullHeight = function euiFullHeight() {
|
|
168
168
|
return "\n ".concat(logicalCSS('height', '100%'), "\n flex: 1 1 auto;\n overflow: hidden;\n");
|
|
169
|
-
};
|
|
170
|
-
|
|
171
|
-
/**
|
|
172
|
-
* A constant storing the support for the `:has()` selector through a
|
|
173
|
-
* media query that will only apply the content it is supported.
|
|
174
|
-
*/
|
|
175
|
-
export var euiSupportsHas = '@supports(selector(:has(p)))';
|
|
169
|
+
};
|