@elastic/eui 98.0.0-borealis.1 → 98.1.0-borealis.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 +16 -15
- package/src/global_styling/index.scss +1 -1
- package/src/global_styling/mixins/_helpers.scss +0 -9
- package/src/global_styling/mixins/_shadow.scss +0 -8
- 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
|
@@ -3,7 +3,7 @@
|
|
|
3
3
|
Object.defineProperty(exports, "__esModule", {
|
|
4
4
|
value: true
|
|
5
5
|
});
|
|
6
|
-
exports.useEuiYScrollWithShadows = exports.useEuiYScroll = exports.useEuiXScrollWithShadows = exports.useEuiXScroll = exports.useEuiScrollBar = exports.useEuiOverflowScroll = exports.euiYScrollWithShadows = exports.euiYScroll = exports.euiXScrollWithShadows = exports.euiXScroll = exports.
|
|
6
|
+
exports.useEuiYScrollWithShadows = exports.useEuiYScroll = exports.useEuiXScrollWithShadows = exports.useEuiXScroll = exports.useEuiScrollBar = exports.useEuiOverflowScroll = exports.euiYScrollWithShadows = exports.euiYScroll = exports.euiXScrollWithShadows = exports.euiXScroll = exports.euiScrollBarStyles = exports.euiOverflowScroll = exports.euiFullHeight = void 0;
|
|
7
7
|
var _theme = require("../../services/theme");
|
|
8
8
|
var _color = require("../../services/color");
|
|
9
9
|
var _functions = require("../functions");
|
|
@@ -171,10 +171,4 @@ var useEuiOverflowScroll = exports.useEuiOverflowScroll = function useEuiOverflo
|
|
|
171
171
|
*/
|
|
172
172
|
var euiFullHeight = exports.euiFullHeight = function euiFullHeight() {
|
|
173
173
|
return "\n ".concat((0, _functions.logicalCSS)('height', '100%'), "\n flex: 1 1 auto;\n overflow: hidden;\n");
|
|
174
|
-
};
|
|
175
|
-
|
|
176
|
-
/**
|
|
177
|
-
* A constant storing the support for the `:has()` selector through a
|
|
178
|
-
* media query that will only apply the content it is supported.
|
|
179
|
-
*/
|
|
180
|
-
var euiSupportsHas = exports.euiSupportsHas = '@supports(selector(:has(p)))';
|
|
174
|
+
};
|
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@elastic/eui",
|
|
3
3
|
"description": "Elastic UI Component Library",
|
|
4
|
-
"version": "98.
|
|
4
|
+
"version": "98.1.0-borealis.0",
|
|
5
5
|
"license": "SEE LICENSE IN LICENSE.txt",
|
|
6
6
|
"main": "lib",
|
|
7
7
|
"module": "es",
|
|
@@ -52,7 +52,7 @@
|
|
|
52
52
|
"url": "https://github.com/elastic/eui.git"
|
|
53
53
|
},
|
|
54
54
|
"dependencies": {
|
|
55
|
-
"@elastic/eui-theme-common": "0.0.
|
|
55
|
+
"@elastic/eui-theme-common": "0.0.4",
|
|
56
56
|
"@hello-pangea/dnd": "^16.6.0",
|
|
57
57
|
"@types/lodash": "^4.14.202",
|
|
58
58
|
"@types/numeral": "^2.0.5",
|
|
@@ -105,7 +105,7 @@
|
|
|
105
105
|
"@cypress/webpack-dev-server": "^1.7.0",
|
|
106
106
|
"@elastic/charts": "^64.1.0",
|
|
107
107
|
"@elastic/datemath": "^5.0.3",
|
|
108
|
-
"@elastic/eui-theme-borealis": "0.0.
|
|
108
|
+
"@elastic/eui-theme-borealis": "0.0.4",
|
|
109
109
|
"@emotion/babel-preset-css-prop": "^11.11.0",
|
|
110
110
|
"@emotion/cache": "^11.11.0",
|
|
111
111
|
"@emotion/css": "^11.11.0",
|
|
@@ -116,16 +116,17 @@
|
|
|
116
116
|
"@loki/create-async-callback": "^0.35.0",
|
|
117
117
|
"@loki/is-loki-running": "^0.35.0",
|
|
118
118
|
"@pmmmwh/react-refresh-webpack-plugin": "^0.5.3",
|
|
119
|
-
"@storybook/addon-essentials": "^8.
|
|
120
|
-
"@storybook/addon-interactions": "^8.
|
|
121
|
-
"@storybook/addon-links": "^8.
|
|
119
|
+
"@storybook/addon-essentials": "^8.4.5",
|
|
120
|
+
"@storybook/addon-interactions": "^8.4.5",
|
|
121
|
+
"@storybook/addon-links": "^8.4.5",
|
|
122
122
|
"@storybook/addon-webpack5-compiler-babel": "^3.0.3",
|
|
123
|
-
"@storybook/blocks": "^8.
|
|
124
|
-
"@storybook/
|
|
125
|
-
"@storybook/
|
|
126
|
-
"@storybook/
|
|
127
|
-
"@storybook/react
|
|
128
|
-
"@storybook/
|
|
123
|
+
"@storybook/blocks": "^8.4.5",
|
|
124
|
+
"@storybook/docs-tools": "^8.4.5",
|
|
125
|
+
"@storybook/manager-api": "^8.4.5",
|
|
126
|
+
"@storybook/preview-api": "^8.4.5",
|
|
127
|
+
"@storybook/react": "^8.4.5",
|
|
128
|
+
"@storybook/react-webpack5": "^8.4.5",
|
|
129
|
+
"@storybook/test": "^8.4.5",
|
|
129
130
|
"@svgr/core": "8.0.0",
|
|
130
131
|
"@svgr/plugin-jsx": "^8.0.1",
|
|
131
132
|
"@svgr/plugin-svgo": "^8.0.1",
|
|
@@ -192,7 +193,7 @@
|
|
|
192
193
|
"eslint-plugin-prettier": "^4.2.1",
|
|
193
194
|
"eslint-plugin-react": "^7.32.2",
|
|
194
195
|
"eslint-plugin-react-hooks": "^4.6.0",
|
|
195
|
-
"eslint-plugin-storybook": "^0.
|
|
196
|
+
"eslint-plugin-storybook": "^0.9.0",
|
|
196
197
|
"expose-gc": "^1.0.0",
|
|
197
198
|
"file-loader": "^6.1.0",
|
|
198
199
|
"findup": "^0.1.5",
|
|
@@ -238,7 +239,7 @@
|
|
|
238
239
|
"sass-loader": "^13.2.0",
|
|
239
240
|
"shelljs": "^0.8.4",
|
|
240
241
|
"start-server-and-test": "^1.11.3",
|
|
241
|
-
"storybook": "^8.
|
|
242
|
+
"storybook": "^8.4.5",
|
|
242
243
|
"style-loader": "^3.3.1",
|
|
243
244
|
"stylelint": "^15.7.0",
|
|
244
245
|
"stylelint-config-prettier-scss": "^1.0.0",
|
|
@@ -256,7 +257,7 @@
|
|
|
256
257
|
},
|
|
257
258
|
"peerDependencies": {
|
|
258
259
|
"@elastic/datemath": "^5.0.2",
|
|
259
|
-
"@elastic/eui-theme-borealis": "0.0.
|
|
260
|
+
"@elastic/eui-theme-borealis": "0.0.4",
|
|
260
261
|
"@emotion/css": "11.x",
|
|
261
262
|
"@emotion/react": "11.x",
|
|
262
263
|
"@types/react": "^16.9 || ^17.0 || ^18.0",
|
|
@@ -81,15 +81,6 @@
|
|
|
81
81
|
@include euiOverflowShadow('x');
|
|
82
82
|
}
|
|
83
83
|
|
|
84
|
-
/**
|
|
85
|
-
* For quickly applying a full-height element whether using flex or not
|
|
86
|
-
*/
|
|
87
|
-
@mixin euiFullHeight {
|
|
88
|
-
height: 100%;
|
|
89
|
-
flex: 1 1 auto;
|
|
90
|
-
overflow: hidden;
|
|
91
|
-
}
|
|
92
|
-
|
|
93
84
|
// Hiding elements offscreen to only be read by screen reader
|
|
94
85
|
// See https://github.com/elastic/eui/pull/5130 and https://github.com/elastic/eui/pull/5152 for more info
|
|
95
86
|
@mixin euiScreenReaderOnly {
|
|
@@ -63,14 +63,6 @@
|
|
|
63
63
|
}
|
|
64
64
|
}
|
|
65
65
|
|
|
66
|
-
@mixin euiSlightShadowHover($color: $euiShadowColor) {
|
|
67
|
-
box-shadow:
|
|
68
|
-
0 1px 5px rgba($color, shadowOpacity(.1)),
|
|
69
|
-
0 3.6px 13px rgba($color, shadowOpacity(.07)),
|
|
70
|
-
0 8.4px 23px rgba($color, shadowOpacity(.06)),
|
|
71
|
-
0 23px 35px rgba($color, shadowOpacity(.05));
|
|
72
|
-
}
|
|
73
|
-
|
|
74
66
|
// stylelint-disable color-named
|
|
75
67
|
@mixin euiOverflowShadow($direction: 'y', $side: 'both') {
|
|
76
68
|
$hideHeight: $euiScrollBarCornerThin * 1.25;
|
|
@@ -9,7 +9,4 @@
|
|
|
9
9
|
// Mixins provide generic code expansion through helpers
|
|
10
10
|
@import 'mixins/index';
|
|
11
11
|
|
|
12
|
-
// Utility classes provide one-off selectors for common css problems
|
|
13
|
-
@import '../../../global_styling/utility/index';
|
|
14
|
-
|
|
15
12
|
// The reset file has moved to global_styles.tsx
|
|
@@ -24,7 +24,7 @@ var _excluded = ["className", "label", "color", "tooltipContent", "tooltipPositi
|
|
|
24
24
|
* in compliance with, at your election, the Elastic License 2.0 or the Server
|
|
25
25
|
* Side Public License, v 1.
|
|
26
26
|
*/
|
|
27
|
-
var COLORS = exports.COLORS = ['accent', 'accentSecondary', 'subdued', 'hollow'];
|
|
27
|
+
var COLORS = exports.COLORS = ['accent', 'accentSecondary', 'subdued', 'hollow', 'warning'];
|
|
28
28
|
var SIZES = exports.SIZES = ['s', 'm'];
|
|
29
29
|
var ALIGNMENTS = exports.ALIGNMENTS = ['baseline', 'middle'];
|
|
30
30
|
|
|
@@ -177,7 +177,7 @@ EuiBetaBadge.propTypes = {
|
|
|
177
177
|
*/
|
|
178
178
|
title: _propTypes.default.oneOfType([_propTypes.default.string, _propTypes.default.oneOfType([_propTypes.default.string.isRequired, _propTypes.default.string])]),
|
|
179
179
|
/**
|
|
180
|
-
* Accepts accent, subdued and
|
|
180
|
+
* Accepts accent, subdued, hollow and warning.
|
|
181
181
|
*/
|
|
182
182
|
color: _propTypes.default.any,
|
|
183
183
|
size: _propTypes.default.any,
|
|
@@ -51,6 +51,7 @@ var euiBetaBadgeStyles = exports.euiBetaBadgeStyles = function euiBetaBadgeStyle
|
|
|
51
51
|
accentSecondary: /*#__PURE__*/(0, _react.css)(badgeColors.accentSecondaryText, ";label:accentSecondary;"),
|
|
52
52
|
subdued: /*#__PURE__*/(0, _react.css)(badgeColors.subdued, ";label:subdued;"),
|
|
53
53
|
hollow: /*#__PURE__*/(0, _react.css)("color:", badgeColors.hollow.color, ";background-color:", badgeColors.hollow.backgroundColor, ";box-shadow:inset 0 0 0 ", euiTheme.border.width.thin, " ", badgeColors.hollow.borderColor, ";;label:hollow;"),
|
|
54
|
+
warning: /*#__PURE__*/(0, _react.css)(badgeColors.warning, ";label:warning;"),
|
|
54
55
|
// Font sizes
|
|
55
56
|
m: /*#__PURE__*/(0, _react.css)("font-size:", (0, _global_styling.euiFontSizeFromScale)('xs', euiTheme), ";line-height:", euiTheme.size.l, ";;label:m;"),
|
|
56
57
|
s: /*#__PURE__*/(0, _react.css)("font-size:0.625rem;line-height:", (0, _global_styling.mathWithUnits)(euiTheme.size.xs, function (x) {
|
|
@@ -386,7 +386,7 @@ EuiCard.propTypes = {
|
|
|
386
386
|
*/
|
|
387
387
|
title: _propTypes.default.oneOfType([_propTypes.default.string, _propTypes.default.oneOfType([_propTypes.default.string.isRequired, _propTypes.default.string])]),
|
|
388
388
|
/**
|
|
389
|
-
* Accepts accent, subdued and
|
|
389
|
+
* Accepts accent, subdued, hollow and warning.
|
|
390
390
|
*/
|
|
391
391
|
color: _propTypes.default.any,
|
|
392
392
|
size: _propTypes.default.any,
|
|
@@ -131,7 +131,7 @@ var euiCardTextStyles = exports.euiCardTextStyles = function euiCardTextStyles(e
|
|
|
131
131
|
var euiTheme = euiThemeContext.euiTheme;
|
|
132
132
|
return {
|
|
133
133
|
euiCard__text: _ref,
|
|
134
|
-
interactive: /*#__PURE__*/(0, _react.css)("outline-offset:", euiTheme.size.xxs, ";.euiCard:hover &,.euiCard:focus &,&:hover,&:focus{text-decoration:underline;}
|
|
134
|
+
interactive: /*#__PURE__*/(0, _react.css)("outline-offset:", euiTheme.size.xxs, ";.euiCard:hover &,.euiCard:focus &,&:hover,&:focus{text-decoration:underline;};label:interactive;"),
|
|
135
135
|
aligned: {
|
|
136
136
|
center: /*#__PURE__*/(0, _react.css)((0, _global_styling.logicalTextAlignCSS)('center'), ";;label:center;"),
|
|
137
137
|
left: /*#__PURE__*/(0, _react.css)((0, _global_styling.logicalTextAlignCSS)('left'), ";;label:left;"),
|
|
@@ -145,7 +145,7 @@ var euiCardBetaBadgeStyles = exports.euiCardBetaBadgeStyles = function euiCardBe
|
|
|
145
145
|
var padding = (0, _global_styling.euiPaddingSize)(euiThemeContext, paddingSize);
|
|
146
146
|
return {
|
|
147
147
|
hasBetaBadge: /*#__PURE__*/(0, _react.css)("position:relative;overflow:visible;", (0, _global_styling.logicalCSS)('padding-top', "calc(".concat(padding, " + ").concat(euiTheme.size.s, ")")), ";;label:hasBetaBadge;"),
|
|
148
|
-
euiCard__betaBadgeAnchor: /*#__PURE__*/(0, _react.css)("line-height:0;position:absolute;", (0, _global_styling.logicalCSS)('top', '0'), " ", (0, _global_styling.logicalCSS)('left', '50%'), " transform:translateX(-50%) translateY(-50%);z-index:3;", (0, _global_styling.logicalCSS)('min-width',
|
|
148
|
+
euiCard__betaBadgeAnchor: /*#__PURE__*/(0, _react.css)("line-height:0;position:absolute;", (0, _global_styling.logicalCSS)('top', '0'), " ", (0, _global_styling.logicalCSS)('left', '50%'), " transform:translateX(-50%) translateY(-50%);z-index:3;", (0, _global_styling.logicalCSS)('min-width', "min(30%, ".concat(euiTheme.base * 7, "px)")), " ", (0, _global_styling.logicalCSS)('max-width', "calc(100% - (".concat(padding, " * 2))")), ";;label:euiCard__betaBadgeAnchor;"),
|
|
149
149
|
euiCard__betaBadge: /*#__PURE__*/(0, _react.css)((0, _global_styling.logicalCSS)('width', '100%'), ";;label:euiCard__betaBadge;")
|
|
150
150
|
};
|
|
151
151
|
};
|
|
@@ -28,7 +28,8 @@ function _interopRequireWildcard(e, r) { if (!r && e && e.__esModule) return e;
|
|
|
28
28
|
* Hook that returns copy-related state/logic/utils
|
|
29
29
|
*/
|
|
30
30
|
var useCopy = exports.useCopy = function useCopy(_ref) {
|
|
31
|
-
var
|
|
31
|
+
var copyAriaLabel = _ref.copyAriaLabel,
|
|
32
|
+
isCopyable = _ref.isCopyable,
|
|
32
33
|
isVirtualized = _ref.isVirtualized,
|
|
33
34
|
children = _ref.children;
|
|
34
35
|
var _useInnerText = (0, _inner_text.useInnerText)(''),
|
|
@@ -51,7 +52,7 @@ var useCopy = exports.useCopy = function useCopy(_ref) {
|
|
|
51
52
|
var textToCopy = isVirtualized ? "".concat(children) : innerText; // Virtualized code blocks do not have inner text
|
|
52
53
|
|
|
53
54
|
var showCopyButton = isCopyable && textToCopy;
|
|
54
|
-
var
|
|
55
|
+
var copyDefaultAriaLabel = (0, _i18n.useEuiI18n)('euiCodeBlockCopy.copy', 'Copy');
|
|
55
56
|
var copyButton = (0, _react.useMemo)(function () {
|
|
56
57
|
return showCopyButton ? (0, _react2.jsx)("div", {
|
|
57
58
|
className: "euiCodeBlock__copyButton"
|
|
@@ -62,11 +63,11 @@ var useCopy = exports.useCopy = function useCopy(_ref) {
|
|
|
62
63
|
onClick: copy,
|
|
63
64
|
iconType: "copyClipboard",
|
|
64
65
|
color: "text",
|
|
65
|
-
"aria-label": copyAriaLabel,
|
|
66
|
+
"aria-label": copyAriaLabel || copyDefaultAriaLabel,
|
|
66
67
|
"data-test-subj": "euiCodeBlockCopy"
|
|
67
68
|
});
|
|
68
69
|
})) : null;
|
|
69
|
-
}, [showCopyButton, textToCopy
|
|
70
|
+
}, [copyAriaLabel, copyDefaultAriaLabel, showCopyButton, textToCopy]);
|
|
70
71
|
return {
|
|
71
72
|
innerTextRef: innerTextRef,
|
|
72
73
|
copyButton: copyButton
|
|
@@ -53,8 +53,7 @@ var EuiDraggable = exports.EuiDraggable = function EuiDraggable(_ref) {
|
|
|
53
53
|
rest = (0, _objectWithoutProperties2.default)(_ref, _excluded);
|
|
54
54
|
var _useContext = (0, _react.useContext)(_droppable.EuiDroppableContext),
|
|
55
55
|
cloneItems = _useContext.cloneItems;
|
|
56
|
-
var
|
|
57
|
-
var styles = (0, _draggable.euiDraggableStyles)(euiTheme);
|
|
56
|
+
var styles = (0, _services.useEuiMemoizedStyles)(_draggable.euiDraggableStyles);
|
|
58
57
|
var hasCustomDragHandle = customDragHandle !== false;
|
|
59
58
|
return (0, _react2.jsx)(_dnd.Draggable, (0, _extends2.default)({
|
|
60
59
|
draggableId: draggableId,
|
|
@@ -55,8 +55,7 @@ var EuiDroppable = exports.EuiDroppable = function EuiDroppable(_ref) {
|
|
|
55
55
|
var _useContext = (0, _react.useContext)(_drag_drop_context.EuiDragDropContextContext),
|
|
56
56
|
isDraggingType = _useContext.isDraggingType;
|
|
57
57
|
var dropIsDisabled = cloneDraggables ? true : isDropDisabled;
|
|
58
|
-
var
|
|
59
|
-
var styles = (0, _droppable.euiDroppableStyles)(euiTheme);
|
|
58
|
+
var styles = (0, _services.useEuiMemoizedStyles)(_droppable.euiDroppableStyles);
|
|
60
59
|
return (0, _react2.jsx)(_dnd.Droppable, (0, _extends2.default)({
|
|
61
60
|
isDropDisabled: dropIsDisabled,
|
|
62
61
|
droppableId: droppableId,
|
|
@@ -16,10 +16,10 @@ var _inherits2 = _interopRequireDefault(require("@babel/runtime/helpers/inherits
|
|
|
16
16
|
var _react = _interopRequireWildcard(require("react"));
|
|
17
17
|
var _propTypes = _interopRequireDefault(require("prop-types"));
|
|
18
18
|
var _classnames = _interopRequireDefault(require("classnames"));
|
|
19
|
+
var _services = require("../../services");
|
|
19
20
|
var _title = require("../title");
|
|
20
21
|
var _code = require("../code");
|
|
21
22
|
var _i18n = require("../i18n");
|
|
22
|
-
var _services = require("../../services");
|
|
23
23
|
var _error_boundary = require("./error_boundary.styles");
|
|
24
24
|
var _react2 = require("@emotion/react");
|
|
25
25
|
var _excluded = ["children"],
|
|
@@ -109,8 +109,7 @@ var EuiErrorMessage = exports.EuiErrorMessage = function EuiErrorMessage(_ref) {
|
|
|
109
109
|
className = _ref.className,
|
|
110
110
|
dataTestSubj = _ref['data-test-subj'],
|
|
111
111
|
rest = (0, _objectWithoutProperties2.default)(_ref, _excluded2);
|
|
112
|
-
var
|
|
113
|
-
var styles = (0, _error_boundary.euiErrorBoundaryStyles)(euiTheme);
|
|
112
|
+
var styles = (0, _services.useEuiMemoizedStyles)(_error_boundary.euiErrorBoundaryStyles);
|
|
114
113
|
return (0, _react2.jsx)("div", (0, _extends2.default)({
|
|
115
114
|
css: styles.euiErrorBoundary,
|
|
116
115
|
className: (0, _classnames.default)('euiErrorBoundary', className),
|
|
@@ -54,9 +54,9 @@ var EuiRangeDraggable = exports.EuiRangeDraggable = function EuiRangeDraggable(_
|
|
|
54
54
|
handleMouseDown = _useMouseMove2[0],
|
|
55
55
|
handleInteraction = _useMouseMove2[1];
|
|
56
56
|
var classes = (0, _classnames.default)('euiRangeDraggable', className);
|
|
57
|
-
var styles = (0, _range_draggable.euiRangeDraggableStyles)
|
|
57
|
+
var styles = (0, _services.useEuiMemoizedStyles)(_range_draggable.euiRangeDraggableStyles);
|
|
58
58
|
var cssStyles = [styles.euiRangeDraggable, showTicks && styles.hasTicks, disabled && styles.disabled];
|
|
59
|
-
var innerStyles = (0, _range_draggable.euiRangeDraggableInnerStyles)
|
|
59
|
+
var innerStyles = (0, _services.useEuiMemoizedStyles)(_range_draggable.euiRangeDraggableInnerStyles);
|
|
60
60
|
var cssInnerStyles = [innerStyles.euiRangeDraggable__inner, disabled ? styles.disabled : innerStyles.enabled];
|
|
61
61
|
var commonProps = {
|
|
62
62
|
className: classes,
|
|
@@ -11,9 +11,9 @@ var _react = _interopRequireDefault(require("react"));
|
|
|
11
11
|
var _propTypes = _interopRequireDefault(require("prop-types"));
|
|
12
12
|
var _classnames = _interopRequireDefault(require("classnames"));
|
|
13
13
|
var _services = require("../../services");
|
|
14
|
-
var _health = require("./health.styles");
|
|
15
14
|
var _icon = require("../icon");
|
|
16
15
|
var _flex = require("../flex");
|
|
16
|
+
var _health = require("./health.styles");
|
|
17
17
|
var _react2 = require("@emotion/react");
|
|
18
18
|
var _excluded = ["children", "className", "color", "textSize"];
|
|
19
19
|
/*
|
|
@@ -31,8 +31,7 @@ var EuiHealth = exports.EuiHealth = function EuiHealth(_ref) {
|
|
|
31
31
|
_ref$textSize = _ref.textSize,
|
|
32
32
|
textSize = _ref$textSize === void 0 ? 's' : _ref$textSize,
|
|
33
33
|
rest = (0, _objectWithoutProperties2.default)(_ref, _excluded);
|
|
34
|
-
var
|
|
35
|
-
var styles = (0, _health.euiHealthStyles)(euiTheme);
|
|
34
|
+
var styles = (0, _services.useEuiMemoizedStyles)(_health.euiHealthStyles);
|
|
36
35
|
var cssStyles = [styles.euiHealth, styles[textSize]];
|
|
37
36
|
var classes = (0, _classnames.default)('euiHealth', className);
|
|
38
37
|
return (0, _react2.jsx)("div", (0, _extends2.default)({
|
|
@@ -70,10 +70,9 @@ var EuiInlineEditForm = exports.EuiInlineEditForm = function EuiInlineEditForm(_
|
|
|
70
70
|
isReadOnly = _ref.isReadOnly,
|
|
71
71
|
rest = (0, _objectWithoutProperties2.default)(_ref, _excluded);
|
|
72
72
|
var classes = (0, _classnames.default)('euiInlineEdit', className);
|
|
73
|
-
var
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
controlCompressedHeight = _euiFormVariables.controlCompressedHeight;
|
|
73
|
+
var _useEuiMemoizedStyles = (0, _services.useEuiMemoizedStyles)(_form2.euiFormVariables),
|
|
74
|
+
controlHeight = _useEuiMemoizedStyles.controlHeight,
|
|
75
|
+
controlCompressedHeight = _useEuiMemoizedStyles.controlCompressedHeight;
|
|
77
76
|
var loadingSkeletonSize = sizes.compressed ? controlCompressedHeight : controlHeight;
|
|
78
77
|
var defaultSaveButtonAriaLabel = (0, _i18n.useEuiI18n)('euiInlineEditForm.saveButtonAriaLabel', 'Save edit');
|
|
79
78
|
var defaultCancelButtonAriaLabel = (0, _i18n.useEuiI18n)('euiInlineEditForm.cancelButtonAriaLabel', 'Cancel edit');
|
|
@@ -108,7 +107,7 @@ var EuiInlineEditForm = exports.EuiInlineEditForm = function EuiInlineEditForm(_
|
|
|
108
107
|
return isEditing ? editModeValue : readModeValue || placeholder;
|
|
109
108
|
}
|
|
110
109
|
}, [controlledValue, editModeValue, readModeValue, isEditing, placeholder]);
|
|
111
|
-
var readModeStyles = (0, _inline_edit_form.euiInlineEditReadModeStyles)
|
|
110
|
+
var readModeStyles = (0, _services.useEuiMemoizedStyles)(_inline_edit_form.euiInlineEditReadModeStyles);
|
|
112
111
|
var readModeCssStyles = [readModeStyles.euiInlineEditReadMode, isReadOnly && readModeStyles.isReadOnly, placeholder && !readModeValue && readModeStyles.hasPlaceholder];
|
|
113
112
|
var activateEditMode = function activateEditMode() {
|
|
114
113
|
setIsEditing(true);
|
|
@@ -12,9 +12,9 @@ var _objectWithoutProperties2 = _interopRequireDefault(require("@babel/runtime/h
|
|
|
12
12
|
var _react = _interopRequireWildcard(require("react"));
|
|
13
13
|
var _propTypes = _interopRequireDefault(require("prop-types"));
|
|
14
14
|
var _classnames = _interopRequireDefault(require("classnames"));
|
|
15
|
+
var _services = require("../../services");
|
|
15
16
|
var _text = require("../text");
|
|
16
17
|
var _inline_edit_form = require("./inline_edit_form");
|
|
17
|
-
var _services = require("../../services");
|
|
18
18
|
var _inline_edit_text = require("./inline_edit_text.styles");
|
|
19
19
|
var _react2 = require("@emotion/react");
|
|
20
20
|
var _excluded = ["className", "size", "readModeProps", "isReadOnly"];
|
|
@@ -37,8 +37,7 @@ var EuiInlineEditText = exports.EuiInlineEditText = function EuiInlineEditText(_
|
|
|
37
37
|
isReadOnly = _ref.isReadOnly,
|
|
38
38
|
rest = (0, _objectWithoutProperties2.default)(_ref, _excluded);
|
|
39
39
|
var classes = (0, _classnames.default)('euiInlineEditText', className);
|
|
40
|
-
var
|
|
41
|
-
var styles = (0, _inline_edit_text.euiInlineEditTextStyles)(theme);
|
|
40
|
+
var styles = (0, _services.useEuiMemoizedStyles)(_inline_edit_text.euiInlineEditTextStyles);
|
|
42
41
|
var cssStyles = [styles.euiInlineEditText, styles.fontSize[size]];
|
|
43
42
|
var isSmallSize = ['xs', 's'].includes(size);
|
|
44
43
|
var sizes = isSmallSize ? _inline_edit_form.SMALL_SIZE_FORM : _inline_edit_form.MEDIUM_SIZE_FORM;
|
|
@@ -12,9 +12,9 @@ var _objectWithoutProperties2 = _interopRequireDefault(require("@babel/runtime/h
|
|
|
12
12
|
var _react = _interopRequireWildcard(require("react"));
|
|
13
13
|
var _propTypes = _interopRequireDefault(require("prop-types"));
|
|
14
14
|
var _classnames = _interopRequireDefault(require("classnames"));
|
|
15
|
+
var _services = require("../../services");
|
|
15
16
|
var _title = require("../title");
|
|
16
17
|
var _inline_edit_form = require("./inline_edit_form");
|
|
17
|
-
var _services = require("../../services");
|
|
18
18
|
var _inline_edit_title = require("./inline_edit_title.styles");
|
|
19
19
|
var _react2 = require("@emotion/react");
|
|
20
20
|
var _excluded = ["className", "size", "heading", "readModeProps", "isReadOnly"];
|
|
@@ -39,8 +39,7 @@ var EuiInlineEditTitle = exports.EuiInlineEditTitle = function EuiInlineEditTitl
|
|
|
39
39
|
isReadOnly = _ref.isReadOnly,
|
|
40
40
|
rest = (0, _objectWithoutProperties2.default)(_ref, _excluded);
|
|
41
41
|
var classes = (0, _classnames.default)('euiInlineEditTitle', className);
|
|
42
|
-
var
|
|
43
|
-
var styles = (0, _inline_edit_title.euiInlineEditTitleStyles)(theme);
|
|
42
|
+
var styles = (0, _services.useEuiMemoizedStyles)(_inline_edit_title.euiInlineEditTitleStyles);
|
|
44
43
|
var cssStyles = [styles.euiInlineEditTitle, styles.fontSize[size]];
|
|
45
44
|
var H = heading;
|
|
46
45
|
var isSmallSize = ['xxxs', 'xxs', 'xs', 's'].includes(size);
|
|
@@ -11,8 +11,8 @@ var _objectWithoutProperties2 = _interopRequireDefault(require("@babel/runtime/h
|
|
|
11
11
|
var _react = _interopRequireDefault(require("react"));
|
|
12
12
|
var _propTypes = _interopRequireDefault(require("prop-types"));
|
|
13
13
|
var _classnames = _interopRequireDefault(require("classnames"));
|
|
14
|
-
var _form_label = require("../form/form_label/form_label");
|
|
15
14
|
var _services = require("../../services");
|
|
15
|
+
var _form_label = require("../form/form_label/form_label");
|
|
16
16
|
var _key_pad_menu = require("./key_pad_menu.styles");
|
|
17
17
|
var _react2 = require("@emotion/react");
|
|
18
18
|
var _excluded = ["children", "className", "checkable"];
|
|
@@ -31,8 +31,7 @@ var EuiKeyPadMenu = exports.EuiKeyPadMenu = function EuiKeyPadMenu(_ref) {
|
|
|
31
31
|
rest = (0, _objectWithoutProperties2.default)(_ref, _excluded);
|
|
32
32
|
var hasCheckableConfig = (0, _typeof2.default)(checkable) === 'object';
|
|
33
33
|
var classes = (0, _classnames.default)('euiKeyPadMenu', className);
|
|
34
|
-
var
|
|
35
|
-
var styles = (0, _key_pad_menu.euiKeyPadMenuStyles)(theme);
|
|
34
|
+
var styles = (0, _services.useEuiMemoizedStyles)(_key_pad_menu.euiKeyPadMenuStyles);
|
|
36
35
|
var cssStyles = [styles.euiKeyPadMenu];
|
|
37
36
|
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)];
|
|
38
37
|
var legend = hasCheckableConfig && checkable.legend ? (0, _react2.jsx)(_form_label.EuiFormLabel, (0, _extends2.default)({}, checkable.legendProps, {
|
|
@@ -51,8 +51,7 @@ var EuiKeyPadMenuItem = exports.EuiKeyPadMenuItem = function EuiKeyPadMenuItem(_
|
|
|
51
51
|
rest = (0, _objectWithoutProperties2.default)(_ref, _excluded);
|
|
52
52
|
var isHrefValid = !href || (0, _href_validator.validateHref)(href);
|
|
53
53
|
var isDisabled = disabled || _isDisabled || !isHrefValid;
|
|
54
|
-
var
|
|
55
|
-
var styles = (0, _key_pad_menu_item.euiKeyPadMenuItemStyles)(euiTheme);
|
|
54
|
+
var styles = (0, _services.useEuiMemoizedStyles)(_key_pad_menu_item.euiKeyPadMenuItemStyles);
|
|
56
55
|
var cssStyles = [styles.euiKeyPadMenuItem, !isDisabled ? styles.enabled : styles.disabled.disabled, isSelected && (!isDisabled ? styles.selected : styles.disabled.selected)];
|
|
57
56
|
var classes = (0, _classnames.default)('euiKeyPadMenuItem', className);
|
|
58
57
|
var Element = href && !isDisabled ? 'a' : 'button';
|
|
@@ -60,9 +59,7 @@ var EuiKeyPadMenuItem = exports.EuiKeyPadMenuItem = function EuiKeyPadMenuItem(_
|
|
|
60
59
|
var itemId = (0, _services.useGeneratedHtmlId)({
|
|
61
60
|
conditionalId: id
|
|
62
61
|
});
|
|
63
|
-
var childStyles = (0,
|
|
64
|
-
return (0, _key_pad_menu_item.euiKeyPadMenuItemChildStyles)(euiTheme);
|
|
65
|
-
}, [euiTheme]);
|
|
62
|
+
var childStyles = (0, _services.useEuiMemoizedStyles)(_key_pad_menu_item.euiKeyPadMenuItemChildStyles);
|
|
66
63
|
var checkableElement = (0, _react.useMemo)(function () {
|
|
67
64
|
if (!checkable) return;
|
|
68
65
|
var cssStyles = [childStyles.euiKeyPadMenuItem__checkableInput, !isSelected && isDisabled && childStyles.hideCheckableInput, !isSelected && !isDisabled && childStyles.showCheckableInputOnInteraction];
|
|
@@ -11,8 +11,8 @@ var _objectWithoutProperties2 = _interopRequireDefault(require("@babel/runtime/h
|
|
|
11
11
|
var _react = _interopRequireWildcard(require("react"));
|
|
12
12
|
var _propTypes = _interopRequireDefault(require("prop-types"));
|
|
13
13
|
var _classnames = _interopRequireDefault(require("classnames"));
|
|
14
|
-
var _i18n = require("../i18n");
|
|
15
14
|
var _services = require("../../services");
|
|
15
|
+
var _i18n = require("../i18n");
|
|
16
16
|
var _mark = require("./mark.styles");
|
|
17
17
|
var _react2 = require("@emotion/react");
|
|
18
18
|
var _excluded = ["children", "className", "hasScreenReaderHelpText"];
|
|
@@ -32,8 +32,7 @@ var EuiMark = exports.EuiMark = function EuiMark(_ref) {
|
|
|
32
32
|
hasScreenReaderHelpText = _ref$hasScreenReaderH === void 0 ? true : _ref$hasScreenReaderH,
|
|
33
33
|
rest = (0, _objectWithoutProperties2.default)(_ref, _excluded);
|
|
34
34
|
var classes = (0, _classnames.default)('euiMark', className);
|
|
35
|
-
var
|
|
36
|
-
var styles = (0, _mark.euiMarkStyles)(euiTheme);
|
|
35
|
+
var styles = (0, _services.useEuiMemoizedStyles)(_mark.euiMarkStyles);
|
|
37
36
|
var highlightStart = (0, _i18n.useEuiI18n)('euiMark.highlightStart', 'highlight start');
|
|
38
37
|
var highlightEnd = (0, _i18n.useEuiI18n)('euiMark.highlightEnd', 'highlight end');
|
|
39
38
|
var screenReaderStyles = (0, _react.useMemo)(function () {
|
|
@@ -40,8 +40,7 @@ var EuiOverlayMask = exports.EuiOverlayMask = function EuiOverlayMask(_ref) {
|
|
|
40
40
|
overlayMaskNode = _useState2[0],
|
|
41
41
|
setOverlayMaskNode = _useState2[1];
|
|
42
42
|
var combinedMaskRef = (0, _services.useCombinedRefs)([setOverlayMaskNode, maskRef]);
|
|
43
|
-
var
|
|
44
|
-
var styles = (0, _overlay_mask.euiOverlayMaskStyles)(euiTheme);
|
|
43
|
+
var styles = (0, _services.useEuiMemoizedStyles)(_overlay_mask.euiOverlayMaskStyles);
|
|
45
44
|
var cssStyles = (0, _css.cx)([styles.euiOverlayMask, styles["".concat(headerZindexLocation, "Header")]]);
|
|
46
45
|
(0, _react.useEffect)(function () {
|
|
47
46
|
if (!overlayMaskNode) return;
|
|
@@ -120,11 +120,13 @@ var EuiPopover = exports.EuiPopover = /*#__PURE__*/function (_Component) {
|
|
|
120
120
|
});
|
|
121
121
|
(0, _defineProperty2.default)(_this, "handleStrandedFocus", function () {
|
|
122
122
|
_this.strandedFocusTimeout = window.setTimeout(function () {
|
|
123
|
+
var _this$panel;
|
|
123
124
|
// If `returnFocus` failed and focus was stranded,
|
|
124
125
|
// attempt to manually restore focus to the toggle button.
|
|
125
126
|
// The stranded focus is either in most cases on body but
|
|
126
127
|
// it will be on the panel instead on mount when isOpen=true
|
|
127
|
-
if (document.activeElement === document.body || document.activeElement
|
|
128
|
+
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
|
|
129
|
+
) {
|
|
128
130
|
if (!_this.button) return;
|
|
129
131
|
var focusableItems = (0, _tabbable.focusable)(_this.button);
|
|
130
132
|
if (!focusableItems.length) return;
|
|
@@ -24,6 +24,7 @@ var _popover = require("../../popover");
|
|
|
24
24
|
var _filter_group = require("../../filter_group");
|
|
25
25
|
var _filter_group2 = require("../../filter_group/filter_group.styles");
|
|
26
26
|
var _selectable = require("../../selectable");
|
|
27
|
+
var _i18n = require("../../i18n");
|
|
27
28
|
var _query4 = require("../query");
|
|
28
29
|
var _ast = require("../query/ast");
|
|
29
30
|
var _react2 = require("@emotion/react");
|
|
@@ -284,14 +285,21 @@ var FieldValueSelectionFilter = exports.FieldValueSelectionFilter = /*#__PURE__*
|
|
|
284
285
|
}) : false;
|
|
285
286
|
var activeItemsCount = this.state.activeItemsCount;
|
|
286
287
|
var active = (activeTop || activeItem) && activeItemsCount > 0;
|
|
287
|
-
var button = (0, _react2.jsx)(
|
|
288
|
-
|
|
289
|
-
|
|
290
|
-
|
|
291
|
-
|
|
292
|
-
|
|
293
|
-
|
|
294
|
-
|
|
288
|
+
var button = (0, _react2.jsx)(_i18n.EuiI18n, {
|
|
289
|
+
token: "euiFieldValueSelectionFilter.buttonLabelHint",
|
|
290
|
+
default: "Selection"
|
|
291
|
+
}, function (buttonLabelHint) {
|
|
292
|
+
var ariaLabel = "".concat(config.name, " ").concat(buttonLabelHint);
|
|
293
|
+
return (0, _react2.jsx)(_filter_group.EuiFilterButton, {
|
|
294
|
+
iconType: "arrowDown",
|
|
295
|
+
iconSide: "right",
|
|
296
|
+
hasActiveFilters: active,
|
|
297
|
+
numActiveFilters: active ? activeItemsCount : undefined,
|
|
298
|
+
grow: true,
|
|
299
|
+
"aria-label": ariaLabel,
|
|
300
|
+
onClick: _this3.onButtonClick.bind(_this3)
|
|
301
|
+
}, config.name);
|
|
302
|
+
});
|
|
295
303
|
var items = options ? options.map(function (option) {
|
|
296
304
|
var _option$view;
|
|
297
305
|
var optionField = option.field || config.field;
|
|
@@ -349,7 +357,8 @@ var FieldValueSelectionFilter = exports.FieldValueSelectionFilter = /*#__PURE__*
|
|
|
349
357
|
errorMessage: _this3.state.error,
|
|
350
358
|
noMatchesMessage: config.noOptionsMessage,
|
|
351
359
|
listProps: {
|
|
352
|
-
isVirtualized: isOverSearchThreshold || false
|
|
360
|
+
isVirtualized: isOverSearchThreshold || false,
|
|
361
|
+
autoFocus: true
|
|
353
362
|
},
|
|
354
363
|
onChange: function onChange(options, event, changedOption) {
|
|
355
364
|
if (changedOption.data) {
|
|
@@ -207,7 +207,6 @@ describe('EuiSearchBar', function () {
|
|
|
207
207
|
it('has zero violations after filtering by Tags', function () {
|
|
208
208
|
cy.get('button.euiButtonEmpty').last().focus();
|
|
209
209
|
cy.realPress('Enter');
|
|
210
|
-
cy.realPress('Tab');
|
|
211
210
|
cy.realPress('ArrowDown');
|
|
212
211
|
cy.realPress('Enter');
|
|
213
212
|
cy.realPress('Escape');
|
|
@@ -29,7 +29,7 @@ var _selectable_list = require("./selectable_list.styles");
|
|
|
29
29
|
var _react2 = require("@emotion/react");
|
|
30
30
|
var _excluded = ["data"],
|
|
31
31
|
_excluded2 = ["label", "isGroupLabel", "checked", "disabled", "prepend", "append", "ref", "key", "searchableLabel", "data", "truncationProps"],
|
|
32
|
-
_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"];
|
|
32
|
+
_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"];
|
|
33
33
|
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); }
|
|
34
34
|
function _interopRequireWildcard(e, r) { if (!r && e && e.__esModule) return e; if (null === e || "object" != _typeof3(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; }
|
|
35
35
|
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; }
|
|
@@ -71,6 +71,7 @@ var EuiSelectableList = exports.EuiSelectableList = /*#__PURE__*/function (_Comp
|
|
|
71
71
|
listId = _this$props.listId,
|
|
72
72
|
searchable = _this$props.searchable,
|
|
73
73
|
singleSelection = _this$props.singleSelection,
|
|
74
|
+
autoFocus = _this$props.autoFocus,
|
|
74
75
|
ariaLabel = _this$props['aria-label'],
|
|
75
76
|
ariaLabelledby = _this$props['aria-labelledby'],
|
|
76
77
|
ariaDescribedby = _this$props['aria-describedby'];
|
|
@@ -91,6 +92,13 @@ var EuiSelectableList = exports.EuiSelectableList = /*#__PURE__*/function (_Comp
|
|
|
91
92
|
if (typeof ariaDescribedby === 'string') {
|
|
92
93
|
ref.setAttribute('aria-describedby', ariaDescribedby);
|
|
93
94
|
}
|
|
95
|
+
if (autoFocus === true) {
|
|
96
|
+
// manually focus listbox once available
|
|
97
|
+
// use last stack execution to prevent potential focus order issues
|
|
98
|
+
setTimeout(function () {
|
|
99
|
+
return ref.focus();
|
|
100
|
+
});
|
|
101
|
+
}
|
|
94
102
|
}
|
|
95
103
|
});
|
|
96
104
|
// This utility is necessary to exclude group labels from the aria set count
|
|
@@ -544,6 +552,7 @@ var EuiSelectableList = exports.EuiSelectableList = /*#__PURE__*/function (_Comp
|
|
|
544
552
|
isVirtualized = _this$props11.isVirtualized,
|
|
545
553
|
textWrap = _this$props11.textWrap,
|
|
546
554
|
truncationProps = _this$props11.truncationProps,
|
|
555
|
+
autoFocus = _this$props11.autoFocus,
|
|
547
556
|
rest = (0, _objectWithoutProperties2.default)(_this$props11, _excluded3);
|
|
548
557
|
var heightIsFull = forcedHeight === 'full';
|
|
549
558
|
var classes = (0, _classnames.default)('euiSelectableList', className);
|
|
@@ -92,7 +92,6 @@ var EuiSideNavItem = exports.EuiSideNavItem = function EuiSideNavItem(_ref2) {
|
|
|
92
92
|
buttonClassName = _ref2.buttonClassName,
|
|
93
93
|
childrenOnly = _ref2.childrenOnly,
|
|
94
94
|
rest = (0, _objectWithoutProperties2.default)(_ref2, _excluded2);
|
|
95
|
-
var euiTheme = (0, _services.useEuiTheme)();
|
|
96
95
|
var isHrefValid = !_href || (0, _href_validator.validateHref)(_href);
|
|
97
96
|
var href = isHrefValid ? _href : '';
|
|
98
97
|
|
|
@@ -121,14 +120,14 @@ var EuiSideNavItem = exports.EuiSideNavItem = function EuiSideNavItem(_ref2) {
|
|
|
121
120
|
'euiSideNavItem--emphasized': emphasize,
|
|
122
121
|
'euiSideNavItem-hasChildItems': hasChildItems
|
|
123
122
|
}, className);
|
|
124
|
-
var styles = (0, _side_nav_item.euiSideNavItemStyles)
|
|
123
|
+
var styles = (0, _services.useEuiMemoizedStyles)(_side_nav_item.euiSideNavItemStyles);
|
|
125
124
|
var cssStyles = [styles.euiSideNavItem, isRoot && styles.root, isTrunk && styles.trunk, isBranch && styles.branch, emphasize && styles.emphasized, css];
|
|
126
125
|
var itemsStyles = hasChildItems && [styles.items.euiSideNavItem__items, isRoot && icon && styles.items.rootWithIcon, isTrunk && styles.items.trunk, isBranch && styles.items.branch];
|
|
127
126
|
var buttonClasses = (0, _classnames.default)('euiSideNavItemButton', {
|
|
128
127
|
'euiSideNavItemButton-isOpen': depth > 0 && itemIsOpen && !isSelected,
|
|
129
128
|
'euiSideNavItemButton-isSelected': isSelected
|
|
130
129
|
}, buttonClassName);
|
|
131
|
-
var buttonStyles = (0, _side_nav_item.euiSideNavItemButtonStyles)
|
|
130
|
+
var buttonStyles = (0, _services.useEuiMemoizedStyles)(_side_nav_item.euiSideNavItemButtonStyles);
|
|
132
131
|
var buttonCssStyles = [buttonStyles.euiSideNavItemButton, isSelected && buttonStyles.selected, emphasize && buttonStyles.emphasized, isRoot && buttonStyles.root, isTrunk && buttonStyles.trunk, isBranch && buttonStyles.branch];
|
|
133
132
|
var labelCssStyles = [buttonStyles.label.euiSideNavItemButton__label, isRoot && buttonStyles.label.root];
|
|
134
133
|
return (0, _react2.jsx)("div", {
|