@elastic/eui 114.2.0-snapshot.1776987768440 → 114.3.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/datagrid/utils/scrolling.js +7 -1
- package/es/components/icon/assets/chart_pie.js +1 -2
- package/es/components/icon/assets/product_dashboard.js +5 -3
- package/es/components/steps/step_horizontal.js +8 -5
- package/lib/components/datagrid/utils/scrolling.js +7 -1
- package/lib/components/icon/assets/chart_pie.js +1 -2
- package/lib/components/icon/assets/product_dashboard.js +5 -3
- package/lib/components/icon/svgs/chart_pie.svg +1 -1
- package/lib/components/icon/svgs/product_dashboard.svg +4 -5
- package/lib/components/steps/step_horizontal.js +8 -5
- package/optimize/es/components/datagrid/utils/scrolling.js +7 -1
- package/optimize/es/components/icon/assets/chart_pie.js +1 -2
- package/optimize/es/components/icon/assets/product_dashboard.js +5 -3
- package/optimize/es/components/steps/step_horizontal.js +8 -5
- package/optimize/lib/components/datagrid/utils/scrolling.js +7 -1
- package/optimize/lib/components/icon/assets/chart_pie.js +1 -2
- package/optimize/lib/components/icon/assets/product_dashboard.js +5 -3
- package/optimize/lib/components/icon/svgs/chart_pie.svg +1 -1
- package/optimize/lib/components/icon/svgs/product_dashboard.svg +4 -5
- package/optimize/lib/components/steps/step_horizontal.js +8 -5
- package/package.json +5 -6
- package/test-env/components/datagrid/utils/scrolling.js +7 -1
- package/test-env/components/icon/assets/chart_pie.js +1 -2
- package/test-env/components/icon/assets/product_dashboard.js +5 -3
- package/test-env/components/steps/step_horizontal.js +8 -5
|
@@ -51,11 +51,17 @@ export var useScroll = function useScroll(args) {
|
|
|
51
51
|
});
|
|
52
52
|
}, [focusedCell, scrollCellIntoView, isPointerDownRef]);
|
|
53
53
|
useEffect(function () {
|
|
54
|
-
var handlePointerUp = function handlePointerUp() {
|
|
54
|
+
var handlePointerUp = function handlePointerUp(event) {
|
|
55
55
|
var _window;
|
|
56
56
|
if (!pendingScrollRef.current || !focusedCell) return;
|
|
57
57
|
pendingScrollRef.current = false;
|
|
58
58
|
|
|
59
|
+
// The pointerup event can come from any mouse button, not only the left
|
|
60
|
+
// click. We only care about the primary (usually left) mouse button
|
|
61
|
+
// clicks, and specifically have to ignore middle mouse button clicks,
|
|
62
|
+
// which indicate scrolling on Windows.
|
|
63
|
+
if (event.pointerType === 'mouse' && event.button !== 0) return;
|
|
64
|
+
|
|
59
65
|
// Skip if the interaction resulted in text being selected
|
|
60
66
|
if (((_window = window) === null || _window === void 0 || (_window = _window.getSelection()) === null || _window === void 0 ? void 0 : _window.type) === 'Range') return;
|
|
61
67
|
scrollCellIntoView({
|
|
@@ -27,8 +27,7 @@ var EuiIconChartPie = function EuiIconChartPie(_ref) {
|
|
|
27
27
|
}, props), title ? ___EmotionJSX("title", {
|
|
28
28
|
id: titleId
|
|
29
29
|
}, title) : null, ___EmotionJSX("path", {
|
|
30
|
-
|
|
31
|
-
d: "M7.5 8.5h6.979A6.498 6.498 0 0 1 1.5 8a6.5 6.5 0 0 1 6-6.48V8.5Zm2-6.824A6.506 6.506 0 0 1 14.323 6.5H9.5V1.676Z"
|
|
30
|
+
d: "M7 2.084A6 6 0 0 0 8 14v1A7 7 0 1 1 8 1v7h7a7 7 0 0 1-7 7v-1a6 6 0 0 0 5.915-5H7V2.084Zm2-1.012A7.002 7.002 0 0 1 14.928 7H9V1.072ZM10 6h3.657A6.015 6.015 0 0 0 10 2.343V6Z"
|
|
32
31
|
}));
|
|
33
32
|
};
|
|
34
33
|
export var icon = EuiIconChartPie;
|
|
@@ -27,9 +27,11 @@ var EuiIconProductDashboard = function EuiIconProductDashboard(_ref) {
|
|
|
27
27
|
}, props), title ? ___EmotionJSX("title", {
|
|
28
28
|
id: titleId
|
|
29
29
|
}, title) : null, ___EmotionJSX("path", {
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
30
|
+
d: "m8.528 10.265.972-.972 1.5 1.5 1.646-1.647.707.708L11 12.207l-1.5-1.5-1.028 1.028-3-3.5-2.118 2.119-.708-.708 2.882-2.881 3 3.5Z"
|
|
31
|
+
}), ___EmotionJSX("path", {
|
|
32
|
+
d: "M9 8H8V6h1v2Zm2 0h-1V5h1v3Zm2 0h-1V4h1v4ZM7 5H3V4h4v1Z"
|
|
33
|
+
}), ___EmotionJSX("path", {
|
|
34
|
+
d: "M14 2a1 1 0 0 1 1 1v10a1 1 0 0 1-1 1H2a1 1 0 0 1-1-1V3a1 1 0 0 1 1-1h12ZM2 13h12V3H2v10Z"
|
|
33
35
|
}));
|
|
34
36
|
};
|
|
35
37
|
export var icon = EuiIconProductDashboard;
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
var _excluded = ["className", "step", "title", "onClick", "disabled", "status", "size"];
|
|
1
|
+
var _excluded = ["className", "step", "title", "onClick", "disabled", "status", "size", "aria-label", "aria-labelledby"];
|
|
2
2
|
function _extends() { return _extends = Object.assign ? Object.assign.bind() : function (n) { for (var e = 1; e < arguments.length; e++) { var t = arguments[e]; for (var r in t) ({}).hasOwnProperty.call(t, r) && (n[r] = t[r]); } return n; }, _extends.apply(null, arguments); }
|
|
3
3
|
function _objectWithoutProperties(e, t) { if (null == e) return {}; var o, r, i = _objectWithoutPropertiesLoose(e, t); if (Object.getOwnPropertySymbols) { var n = Object.getOwnPropertySymbols(e); for (r = 0; r < n.length; r++) o = n[r], t.indexOf(o) >= 0 || {}.propertyIsEnumerable.call(e, o) && (i[o] = e[o]); } return i; }
|
|
4
4
|
function _objectWithoutPropertiesLoose(r, e) { if (null == r) return {}; var t = {}; for (var n in r) if ({}.hasOwnProperty.call(r, n)) { if (e.indexOf(n) >= 0) continue; t[n] = r[n]; } return t; }
|
|
@@ -35,6 +35,8 @@ export var EuiStepHorizontal = function EuiStepHorizontal(_ref) {
|
|
|
35
35
|
status = _ref$status === void 0 ? 'incomplete' : _ref$status,
|
|
36
36
|
_ref$size = _ref.size,
|
|
37
37
|
size = _ref$size === void 0 ? 'm' : _ref$size,
|
|
38
|
+
ariaLabel = _ref['aria-label'],
|
|
39
|
+
ariaLabelledby = _ref['aria-labelledby'],
|
|
38
40
|
rest = _objectWithoutProperties(_ref, _excluded);
|
|
39
41
|
if (disabled) status = 'disabled';
|
|
40
42
|
var classes = classNames('euiStepHorizontal', className);
|
|
@@ -44,7 +46,7 @@ export var EuiStepHorizontal = function EuiStepHorizontal(_ref) {
|
|
|
44
46
|
var cssNumberStyles = [numberStyles.euiStepHorizontal__number];
|
|
45
47
|
var titleStyles = useEuiMemoizedStyles(euiStepHorizontalTitleStyles);
|
|
46
48
|
var cssTitleStyles = [titleStyles.euiStepHorizontal__title, status === 'disabled' && titleStyles.disabled];
|
|
47
|
-
var
|
|
49
|
+
var labelMap = {
|
|
48
50
|
step: useI18nStep({
|
|
49
51
|
number: step,
|
|
50
52
|
title: title
|
|
@@ -78,14 +80,15 @@ export var EuiStepHorizontal = function EuiStepHorizontal(_ref) {
|
|
|
78
80
|
title: title
|
|
79
81
|
})
|
|
80
82
|
};
|
|
81
|
-
var
|
|
83
|
+
var ariaLabelAttr = labelMap[status || 'step'];
|
|
82
84
|
var onStepClick = function onStepClick(event) {
|
|
83
|
-
if (!disabled) onClick(event);
|
|
85
|
+
if (!disabled && status !== 'disabled') onClick(event);
|
|
84
86
|
};
|
|
85
87
|
return ___EmotionJSX("button", _extends({
|
|
86
88
|
"aria-disabled": status === 'disabled' ? true : undefined,
|
|
87
89
|
className: classes,
|
|
88
|
-
|
|
90
|
+
"aria-label": ariaLabel !== null && ariaLabel !== void 0 ? ariaLabel : ariaLabelledby ? undefined : ariaLabelAttr,
|
|
91
|
+
"aria-labelledby": ariaLabelledby,
|
|
89
92
|
onClick: onStepClick,
|
|
90
93
|
disabled: disabled,
|
|
91
94
|
css: cssStyles,
|
|
@@ -57,11 +57,17 @@ var useScroll = exports.useScroll = function useScroll(args) {
|
|
|
57
57
|
});
|
|
58
58
|
}, [focusedCell, scrollCellIntoView, isPointerDownRef]);
|
|
59
59
|
(0, _react.useEffect)(function () {
|
|
60
|
-
var handlePointerUp = function handlePointerUp() {
|
|
60
|
+
var handlePointerUp = function handlePointerUp(event) {
|
|
61
61
|
var _window;
|
|
62
62
|
if (!pendingScrollRef.current || !focusedCell) return;
|
|
63
63
|
pendingScrollRef.current = false;
|
|
64
64
|
|
|
65
|
+
// The pointerup event can come from any mouse button, not only the left
|
|
66
|
+
// click. We only care about the primary (usually left) mouse button
|
|
67
|
+
// clicks, and specifically have to ignore middle mouse button clicks,
|
|
68
|
+
// which indicate scrolling on Windows.
|
|
69
|
+
if (event.pointerType === 'mouse' && event.button !== 0) return;
|
|
70
|
+
|
|
65
71
|
// Skip if the interaction resulted in text being selected
|
|
66
72
|
if (((_window = window) === null || _window === void 0 || (_window = _window.getSelection()) === null || _window === void 0 ? void 0 : _window.type) === 'Range') return;
|
|
67
73
|
scrollCellIntoView({
|
|
@@ -34,8 +34,7 @@ var EuiIconChartPie = function EuiIconChartPie(_ref) {
|
|
|
34
34
|
}, props), title ? (0, _react2.jsx)("title", {
|
|
35
35
|
id: titleId
|
|
36
36
|
}, title) : null, (0, _react2.jsx)("path", {
|
|
37
|
-
|
|
38
|
-
d: "M7.5 8.5h6.979A6.498 6.498 0 0 1 1.5 8a6.5 6.5 0 0 1 6-6.48V8.5Zm2-6.824A6.506 6.506 0 0 1 14.323 6.5H9.5V1.676Z"
|
|
37
|
+
d: "M7 2.084A6 6 0 0 0 8 14v1A7 7 0 1 1 8 1v7h7a7 7 0 0 1-7 7v-1a6 6 0 0 0 5.915-5H7V2.084Zm2-1.012A7.002 7.002 0 0 1 14.928 7H9V1.072ZM10 6h3.657A6.015 6.015 0 0 0 10 2.343V6Z"
|
|
39
38
|
}));
|
|
40
39
|
};
|
|
41
40
|
var icon = exports.icon = EuiIconChartPie;
|
|
@@ -34,9 +34,11 @@ var EuiIconProductDashboard = function EuiIconProductDashboard(_ref) {
|
|
|
34
34
|
}, props), title ? (0, _react2.jsx)("title", {
|
|
35
35
|
id: titleId
|
|
36
36
|
}, title) : null, (0, _react2.jsx)("path", {
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
37
|
+
d: "m8.528 10.265.972-.972 1.5 1.5 1.646-1.647.707.708L11 12.207l-1.5-1.5-1.028 1.028-3-3.5-2.118 2.119-.708-.708 2.882-2.881 3 3.5Z"
|
|
38
|
+
}), (0, _react2.jsx)("path", {
|
|
39
|
+
d: "M9 8H8V6h1v2Zm2 0h-1V5h1v3Zm2 0h-1V4h1v4ZM7 5H3V4h4v1Z"
|
|
40
|
+
}), (0, _react2.jsx)("path", {
|
|
41
|
+
d: "M14 2a1 1 0 0 1 1 1v10a1 1 0 0 1-1 1H2a1 1 0 0 1-1-1V3a1 1 0 0 1 1-1h12ZM2 13h12V3H2v10Z"
|
|
40
42
|
}));
|
|
41
43
|
};
|
|
42
44
|
var icon = exports.icon = EuiIconProductDashboard;
|
|
@@ -1,3 +1,3 @@
|
|
|
1
1
|
<svg xmlns="http://www.w3.org/2000/svg" width="16" height="16" viewBox="0 0 16 16">
|
|
2
|
-
<path
|
|
2
|
+
<path d="M7 2.084A6 6 0 0 0 8 14v1A7 7 0 1 1 8 1v7h7a7 7 0 0 1-7 7v-1a6 6 0 0 0 5.915-5H7V2.084Zm2-1.012A7.002 7.002 0 0 1 14.928 7H9V1.072ZM10 6h3.657A6.015 6.015 0 0 0 10 2.343V6Z"/>
|
|
3
3
|
</svg>
|
|
@@ -1,6 +1,5 @@
|
|
|
1
|
-
<svg width="16" height="16" viewBox="0 0 16 16"
|
|
2
|
-
<path
|
|
3
|
-
<path
|
|
4
|
-
<path
|
|
5
|
-
<path fill-rule="evenodd" clip-rule="evenodd" d="M14 2C14.5177 2 14.9438 2.39333 14.9951 2.89746L15 3V5C15 5.55228 14.5523 6 14 6H2C1.44772 6 1 5.55228 1 5V3C1 2.44772 1.44772 2 2 2H14ZM2 5H14V3H2V5Z"/>
|
|
1
|
+
<svg xmlns="http://www.w3.org/2000/svg" width="16" height="16" viewBox="0 0 16 16">
|
|
2
|
+
<path d="m8.528 10.265.972-.972 1.5 1.5 1.646-1.647.707.708L11 12.207l-1.5-1.5-1.028 1.028-3-3.5-2.118 2.119-.708-.708 2.882-2.881 3 3.5Z"/>
|
|
3
|
+
<path d="M9 8H8V6h1v2Zm2 0h-1V5h1v3Zm2 0h-1V4h1v4ZM7 5H3V4h4v1Z"/>
|
|
4
|
+
<path d="M14 2a1 1 0 0 1 1 1v10a1 1 0 0 1-1 1H2a1 1 0 0 1-1-1V3a1 1 0 0 1 1-1h12ZM2 13h12V3H2v10Z"/>
|
|
6
5
|
</svg>
|
|
@@ -12,7 +12,7 @@ var _step_number = require("./step_number");
|
|
|
12
12
|
var _step_strings = require("./step_strings");
|
|
13
13
|
var _step_horizontal = require("./step_horizontal.styles");
|
|
14
14
|
var _react2 = require("@emotion/react");
|
|
15
|
-
var _excluded = ["className", "step", "title", "onClick", "disabled", "status", "size"];
|
|
15
|
+
var _excluded = ["className", "step", "title", "onClick", "disabled", "status", "size", "aria-label", "aria-labelledby"];
|
|
16
16
|
/*
|
|
17
17
|
* Copyright Elasticsearch B.V. and/or licensed to Elasticsearch B.V. under one
|
|
18
18
|
* or more contributor license agreements. Licensed under the Elastic License
|
|
@@ -41,6 +41,8 @@ var EuiStepHorizontal = exports.EuiStepHorizontal = function EuiStepHorizontal(_
|
|
|
41
41
|
status = _ref$status === void 0 ? 'incomplete' : _ref$status,
|
|
42
42
|
_ref$size = _ref.size,
|
|
43
43
|
size = _ref$size === void 0 ? 'm' : _ref$size,
|
|
44
|
+
ariaLabel = _ref['aria-label'],
|
|
45
|
+
ariaLabelledby = _ref['aria-labelledby'],
|
|
44
46
|
rest = _objectWithoutProperties(_ref, _excluded);
|
|
45
47
|
if (disabled) status = 'disabled';
|
|
46
48
|
var classes = (0, _classnames.default)('euiStepHorizontal', className);
|
|
@@ -50,7 +52,7 @@ var EuiStepHorizontal = exports.EuiStepHorizontal = function EuiStepHorizontal(_
|
|
|
50
52
|
var cssNumberStyles = [numberStyles.euiStepHorizontal__number];
|
|
51
53
|
var titleStyles = (0, _services.useEuiMemoizedStyles)(_step_horizontal.euiStepHorizontalTitleStyles);
|
|
52
54
|
var cssTitleStyles = [titleStyles.euiStepHorizontal__title, status === 'disabled' && titleStyles.disabled];
|
|
53
|
-
var
|
|
55
|
+
var labelMap = {
|
|
54
56
|
step: (0, _step_strings.useI18nStep)({
|
|
55
57
|
number: step,
|
|
56
58
|
title: title
|
|
@@ -84,14 +86,15 @@ var EuiStepHorizontal = exports.EuiStepHorizontal = function EuiStepHorizontal(_
|
|
|
84
86
|
title: title
|
|
85
87
|
})
|
|
86
88
|
};
|
|
87
|
-
var
|
|
89
|
+
var ariaLabelAttr = labelMap[status || 'step'];
|
|
88
90
|
var onStepClick = function onStepClick(event) {
|
|
89
|
-
if (!disabled) onClick(event);
|
|
91
|
+
if (!disabled && status !== 'disabled') onClick(event);
|
|
90
92
|
};
|
|
91
93
|
return (0, _react2.jsx)("button", _extends({
|
|
92
94
|
"aria-disabled": status === 'disabled' ? true : undefined,
|
|
93
95
|
className: classes,
|
|
94
|
-
|
|
96
|
+
"aria-label": ariaLabel !== null && ariaLabel !== void 0 ? ariaLabel : ariaLabelledby ? undefined : ariaLabelAttr,
|
|
97
|
+
"aria-labelledby": ariaLabelledby,
|
|
95
98
|
onClick: onStepClick,
|
|
96
99
|
disabled: disabled,
|
|
97
100
|
css: cssStyles,
|
|
@@ -49,11 +49,17 @@ export var useScroll = function useScroll(args) {
|
|
|
49
49
|
});
|
|
50
50
|
}, [focusedCell, scrollCellIntoView, isPointerDownRef]);
|
|
51
51
|
useEffect(function () {
|
|
52
|
-
var handlePointerUp = function handlePointerUp() {
|
|
52
|
+
var handlePointerUp = function handlePointerUp(event) {
|
|
53
53
|
var _window;
|
|
54
54
|
if (!pendingScrollRef.current || !focusedCell) return;
|
|
55
55
|
pendingScrollRef.current = false;
|
|
56
56
|
|
|
57
|
+
// The pointerup event can come from any mouse button, not only the left
|
|
58
|
+
// click. We only care about the primary (usually left) mouse button
|
|
59
|
+
// clicks, and specifically have to ignore middle mouse button clicks,
|
|
60
|
+
// which indicate scrolling on Windows.
|
|
61
|
+
if (event.pointerType === 'mouse' && event.button !== 0) return;
|
|
62
|
+
|
|
57
63
|
// Skip if the interaction resulted in text being selected
|
|
58
64
|
if (((_window = window) === null || _window === void 0 || (_window = _window.getSelection()) === null || _window === void 0 ? void 0 : _window.type) === 'Range') return;
|
|
59
65
|
scrollCellIntoView({
|
|
@@ -26,8 +26,7 @@ var EuiIconChartPie = function EuiIconChartPie(_ref) {
|
|
|
26
26
|
}, props), title ? ___EmotionJSX("title", {
|
|
27
27
|
id: titleId
|
|
28
28
|
}, title) : null, ___EmotionJSX("path", {
|
|
29
|
-
|
|
30
|
-
d: "M7.5 8.5h6.979A6.498 6.498 0 0 1 1.5 8a6.5 6.5 0 0 1 6-6.48V8.5Zm2-6.824A6.506 6.506 0 0 1 14.323 6.5H9.5V1.676Z"
|
|
29
|
+
d: "M7 2.084A6 6 0 0 0 8 14v1A7 7 0 1 1 8 1v7h7a7 7 0 0 1-7 7v-1a6 6 0 0 0 5.915-5H7V2.084Zm2-1.012A7.002 7.002 0 0 1 14.928 7H9V1.072ZM10 6h3.657A6.015 6.015 0 0 0 10 2.343V6Z"
|
|
31
30
|
}));
|
|
32
31
|
};
|
|
33
32
|
export var icon = EuiIconChartPie;
|
|
@@ -26,9 +26,11 @@ var EuiIconProductDashboard = function EuiIconProductDashboard(_ref) {
|
|
|
26
26
|
}, props), title ? ___EmotionJSX("title", {
|
|
27
27
|
id: titleId
|
|
28
28
|
}, title) : null, ___EmotionJSX("path", {
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
29
|
+
d: "m8.528 10.265.972-.972 1.5 1.5 1.646-1.647.707.708L11 12.207l-1.5-1.5-1.028 1.028-3-3.5-2.118 2.119-.708-.708 2.882-2.881 3 3.5Z"
|
|
30
|
+
}), ___EmotionJSX("path", {
|
|
31
|
+
d: "M9 8H8V6h1v2Zm2 0h-1V5h1v3Zm2 0h-1V4h1v4ZM7 5H3V4h4v1Z"
|
|
32
|
+
}), ___EmotionJSX("path", {
|
|
33
|
+
d: "M14 2a1 1 0 0 1 1 1v10a1 1 0 0 1-1 1H2a1 1 0 0 1-1-1V3a1 1 0 0 1 1-1h12ZM2 13h12V3H2v10Z"
|
|
32
34
|
}));
|
|
33
35
|
};
|
|
34
36
|
export var icon = EuiIconProductDashboard;
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import _extends from "@babel/runtime/helpers/extends";
|
|
2
2
|
import _objectWithoutProperties from "@babel/runtime/helpers/objectWithoutProperties";
|
|
3
|
-
var _excluded = ["className", "step", "title", "onClick", "disabled", "status", "size"];
|
|
3
|
+
var _excluded = ["className", "step", "title", "onClick", "disabled", "status", "size", "aria-label", "aria-labelledby"];
|
|
4
4
|
/*
|
|
5
5
|
* Copyright Elasticsearch B.V. and/or licensed to Elasticsearch B.V. under one
|
|
6
6
|
* or more contributor license agreements. Licensed under the Elastic License
|
|
@@ -33,6 +33,8 @@ export var EuiStepHorizontal = function EuiStepHorizontal(_ref) {
|
|
|
33
33
|
status = _ref$status === void 0 ? 'incomplete' : _ref$status,
|
|
34
34
|
_ref$size = _ref.size,
|
|
35
35
|
size = _ref$size === void 0 ? 'm' : _ref$size,
|
|
36
|
+
ariaLabel = _ref['aria-label'],
|
|
37
|
+
ariaLabelledby = _ref['aria-labelledby'],
|
|
36
38
|
rest = _objectWithoutProperties(_ref, _excluded);
|
|
37
39
|
if (disabled) status = 'disabled';
|
|
38
40
|
var classes = classNames('euiStepHorizontal', className);
|
|
@@ -42,7 +44,7 @@ export var EuiStepHorizontal = function EuiStepHorizontal(_ref) {
|
|
|
42
44
|
var cssNumberStyles = [numberStyles.euiStepHorizontal__number];
|
|
43
45
|
var titleStyles = useEuiMemoizedStyles(euiStepHorizontalTitleStyles);
|
|
44
46
|
var cssTitleStyles = [titleStyles.euiStepHorizontal__title, status === 'disabled' && titleStyles.disabled];
|
|
45
|
-
var
|
|
47
|
+
var labelMap = {
|
|
46
48
|
step: useI18nStep({
|
|
47
49
|
number: step,
|
|
48
50
|
title: title
|
|
@@ -76,14 +78,15 @@ export var EuiStepHorizontal = function EuiStepHorizontal(_ref) {
|
|
|
76
78
|
title: title
|
|
77
79
|
})
|
|
78
80
|
};
|
|
79
|
-
var
|
|
81
|
+
var ariaLabelAttr = labelMap[status || 'step'];
|
|
80
82
|
var onStepClick = function onStepClick(event) {
|
|
81
|
-
if (!disabled) onClick(event);
|
|
83
|
+
if (!disabled && status !== 'disabled') onClick(event);
|
|
82
84
|
};
|
|
83
85
|
return ___EmotionJSX("button", _extends({
|
|
84
86
|
"aria-disabled": status === 'disabled' ? true : undefined,
|
|
85
87
|
className: classes,
|
|
86
|
-
|
|
88
|
+
"aria-label": ariaLabel !== null && ariaLabel !== void 0 ? ariaLabel : ariaLabelledby ? undefined : ariaLabelAttr,
|
|
89
|
+
"aria-labelledby": ariaLabelledby,
|
|
87
90
|
onClick: onStepClick,
|
|
88
91
|
disabled: disabled,
|
|
89
92
|
css: cssStyles,
|
|
@@ -59,11 +59,17 @@ var useScroll = exports.useScroll = function useScroll(args) {
|
|
|
59
59
|
});
|
|
60
60
|
}, [focusedCell, scrollCellIntoView, isPointerDownRef]);
|
|
61
61
|
(0, _react.useEffect)(function () {
|
|
62
|
-
var handlePointerUp = function handlePointerUp() {
|
|
62
|
+
var handlePointerUp = function handlePointerUp(event) {
|
|
63
63
|
var _window;
|
|
64
64
|
if (!pendingScrollRef.current || !focusedCell) return;
|
|
65
65
|
pendingScrollRef.current = false;
|
|
66
66
|
|
|
67
|
+
// The pointerup event can come from any mouse button, not only the left
|
|
68
|
+
// click. We only care about the primary (usually left) mouse button
|
|
69
|
+
// clicks, and specifically have to ignore middle mouse button clicks,
|
|
70
|
+
// which indicate scrolling on Windows.
|
|
71
|
+
if (event.pointerType === 'mouse' && event.button !== 0) return;
|
|
72
|
+
|
|
67
73
|
// Skip if the interaction resulted in text being selected
|
|
68
74
|
if (((_window = window) === null || _window === void 0 || (_window = _window.getSelection()) === null || _window === void 0 ? void 0 : _window.type) === 'Range') return;
|
|
69
75
|
scrollCellIntoView({
|
|
@@ -34,8 +34,7 @@ var EuiIconChartPie = function EuiIconChartPie(_ref) {
|
|
|
34
34
|
}, props), title ? (0, _react2.jsx)("title", {
|
|
35
35
|
id: titleId
|
|
36
36
|
}, title) : null, (0, _react2.jsx)("path", {
|
|
37
|
-
|
|
38
|
-
d: "M7.5 8.5h6.979A6.498 6.498 0 0 1 1.5 8a6.5 6.5 0 0 1 6-6.48V8.5Zm2-6.824A6.506 6.506 0 0 1 14.323 6.5H9.5V1.676Z"
|
|
37
|
+
d: "M7 2.084A6 6 0 0 0 8 14v1A7 7 0 1 1 8 1v7h7a7 7 0 0 1-7 7v-1a6 6 0 0 0 5.915-5H7V2.084Zm2-1.012A7.002 7.002 0 0 1 14.928 7H9V1.072ZM10 6h3.657A6.015 6.015 0 0 0 10 2.343V6Z"
|
|
39
38
|
}));
|
|
40
39
|
};
|
|
41
40
|
var icon = exports.icon = EuiIconChartPie;
|
|
@@ -34,9 +34,11 @@ var EuiIconProductDashboard = function EuiIconProductDashboard(_ref) {
|
|
|
34
34
|
}, props), title ? (0, _react2.jsx)("title", {
|
|
35
35
|
id: titleId
|
|
36
36
|
}, title) : null, (0, _react2.jsx)("path", {
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
37
|
+
d: "m8.528 10.265.972-.972 1.5 1.5 1.646-1.647.707.708L11 12.207l-1.5-1.5-1.028 1.028-3-3.5-2.118 2.119-.708-.708 2.882-2.881 3 3.5Z"
|
|
38
|
+
}), (0, _react2.jsx)("path", {
|
|
39
|
+
d: "M9 8H8V6h1v2Zm2 0h-1V5h1v3Zm2 0h-1V4h1v4ZM7 5H3V4h4v1Z"
|
|
40
|
+
}), (0, _react2.jsx)("path", {
|
|
41
|
+
d: "M14 2a1 1 0 0 1 1 1v10a1 1 0 0 1-1 1H2a1 1 0 0 1-1-1V3a1 1 0 0 1 1-1h12ZM2 13h12V3H2v10Z"
|
|
40
42
|
}));
|
|
41
43
|
};
|
|
42
44
|
var icon = exports.icon = EuiIconProductDashboard;
|
|
@@ -1,3 +1,3 @@
|
|
|
1
1
|
<svg xmlns="http://www.w3.org/2000/svg" width="16" height="16" viewBox="0 0 16 16">
|
|
2
|
-
<path
|
|
2
|
+
<path d="M7 2.084A6 6 0 0 0 8 14v1A7 7 0 1 1 8 1v7h7a7 7 0 0 1-7 7v-1a6 6 0 0 0 5.915-5H7V2.084Zm2-1.012A7.002 7.002 0 0 1 14.928 7H9V1.072ZM10 6h3.657A6.015 6.015 0 0 0 10 2.343V6Z"/>
|
|
3
3
|
</svg>
|
|
@@ -1,6 +1,5 @@
|
|
|
1
|
-
<svg width="16" height="16" viewBox="0 0 16 16"
|
|
2
|
-
<path
|
|
3
|
-
<path
|
|
4
|
-
<path
|
|
5
|
-
<path fill-rule="evenodd" clip-rule="evenodd" d="M14 2C14.5177 2 14.9438 2.39333 14.9951 2.89746L15 3V5C15 5.55228 14.5523 6 14 6H2C1.44772 6 1 5.55228 1 5V3C1 2.44772 1.44772 2 2 2H14ZM2 5H14V3H2V5Z"/>
|
|
1
|
+
<svg xmlns="http://www.w3.org/2000/svg" width="16" height="16" viewBox="0 0 16 16">
|
|
2
|
+
<path d="m8.528 10.265.972-.972 1.5 1.5 1.646-1.647.707.708L11 12.207l-1.5-1.5-1.028 1.028-3-3.5-2.118 2.119-.708-.708 2.882-2.881 3 3.5Z"/>
|
|
3
|
+
<path d="M9 8H8V6h1v2Zm2 0h-1V5h1v3Zm2 0h-1V4h1v4ZM7 5H3V4h4v1Z"/>
|
|
4
|
+
<path d="M14 2a1 1 0 0 1 1 1v10a1 1 0 0 1-1 1H2a1 1 0 0 1-1-1V3a1 1 0 0 1 1-1h12ZM2 13h12V3H2v10Z"/>
|
|
6
5
|
</svg>
|
|
@@ -14,7 +14,7 @@ var _step_number = require("./step_number");
|
|
|
14
14
|
var _step_strings = require("./step_strings");
|
|
15
15
|
var _step_horizontal = require("./step_horizontal.styles");
|
|
16
16
|
var _react2 = require("@emotion/react");
|
|
17
|
-
var _excluded = ["className", "step", "title", "onClick", "disabled", "status", "size"];
|
|
17
|
+
var _excluded = ["className", "step", "title", "onClick", "disabled", "status", "size", "aria-label", "aria-labelledby"];
|
|
18
18
|
/*
|
|
19
19
|
* Copyright Elasticsearch B.V. and/or licensed to Elasticsearch B.V. under one
|
|
20
20
|
* or more contributor license agreements. Licensed under the Elastic License
|
|
@@ -39,6 +39,8 @@ var EuiStepHorizontal = exports.EuiStepHorizontal = function EuiStepHorizontal(_
|
|
|
39
39
|
status = _ref$status === void 0 ? 'incomplete' : _ref$status,
|
|
40
40
|
_ref$size = _ref.size,
|
|
41
41
|
size = _ref$size === void 0 ? 'm' : _ref$size,
|
|
42
|
+
ariaLabel = _ref['aria-label'],
|
|
43
|
+
ariaLabelledby = _ref['aria-labelledby'],
|
|
42
44
|
rest = (0, _objectWithoutProperties2.default)(_ref, _excluded);
|
|
43
45
|
if (disabled) status = 'disabled';
|
|
44
46
|
var classes = (0, _classnames.default)('euiStepHorizontal', className);
|
|
@@ -48,7 +50,7 @@ var EuiStepHorizontal = exports.EuiStepHorizontal = function EuiStepHorizontal(_
|
|
|
48
50
|
var cssNumberStyles = [numberStyles.euiStepHorizontal__number];
|
|
49
51
|
var titleStyles = (0, _services.useEuiMemoizedStyles)(_step_horizontal.euiStepHorizontalTitleStyles);
|
|
50
52
|
var cssTitleStyles = [titleStyles.euiStepHorizontal__title, status === 'disabled' && titleStyles.disabled];
|
|
51
|
-
var
|
|
53
|
+
var labelMap = {
|
|
52
54
|
step: (0, _step_strings.useI18nStep)({
|
|
53
55
|
number: step,
|
|
54
56
|
title: title
|
|
@@ -82,14 +84,15 @@ var EuiStepHorizontal = exports.EuiStepHorizontal = function EuiStepHorizontal(_
|
|
|
82
84
|
title: title
|
|
83
85
|
})
|
|
84
86
|
};
|
|
85
|
-
var
|
|
87
|
+
var ariaLabelAttr = labelMap[status || 'step'];
|
|
86
88
|
var onStepClick = function onStepClick(event) {
|
|
87
|
-
if (!disabled) onClick(event);
|
|
89
|
+
if (!disabled && status !== 'disabled') onClick(event);
|
|
88
90
|
};
|
|
89
91
|
return (0, _react2.jsx)("button", (0, _extends2.default)({
|
|
90
92
|
"aria-disabled": status === 'disabled' ? true : undefined,
|
|
91
93
|
className: classes,
|
|
92
|
-
|
|
94
|
+
"aria-label": ariaLabel !== null && ariaLabel !== void 0 ? ariaLabel : ariaLabelledby ? undefined : ariaLabelAttr,
|
|
95
|
+
"aria-labelledby": ariaLabelledby,
|
|
93
96
|
onClick: onStepClick,
|
|
94
97
|
disabled: disabled,
|
|
95
98
|
css: cssStyles,
|
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@elastic/eui",
|
|
3
3
|
"description": "Elastic UI Component Library",
|
|
4
|
-
"version": "114.
|
|
4
|
+
"version": "114.3.0",
|
|
5
5
|
"license": "SEE LICENSE IN LICENSE.txt",
|
|
6
6
|
"main": "lib",
|
|
7
7
|
"module": "es",
|
|
@@ -53,7 +53,7 @@
|
|
|
53
53
|
"directory": "packages/eui"
|
|
54
54
|
},
|
|
55
55
|
"dependencies": {
|
|
56
|
-
"@elastic/eui-theme-common": "9.0.0
|
|
56
|
+
"@elastic/eui-theme-common": "9.0.0",
|
|
57
57
|
"@elastic/prismjs-esql": "^1.1.2",
|
|
58
58
|
"@hello-pangea/dnd": "^16.6.0",
|
|
59
59
|
"@types/lodash": "^4.14.202",
|
|
@@ -109,7 +109,7 @@
|
|
|
109
109
|
"@elastic/charts": "^64.1.0",
|
|
110
110
|
"@elastic/datemath": "^5.0.3",
|
|
111
111
|
"@elastic/eslint-plugin-eui": "2.11.1",
|
|
112
|
-
"@elastic/eui-theme-borealis": "7.0.0
|
|
112
|
+
"@elastic/eui-theme-borealis": "7.0.0",
|
|
113
113
|
"@emotion/babel-preset-css-prop": "^11.11.0",
|
|
114
114
|
"@emotion/cache": "^11.11.0",
|
|
115
115
|
"@emotion/css": "^11.11.0",
|
|
@@ -257,7 +257,7 @@
|
|
|
257
257
|
},
|
|
258
258
|
"peerDependencies": {
|
|
259
259
|
"@elastic/datemath": "^5.0.2",
|
|
260
|
-
"@elastic/eui-theme-borealis": "7.0.0
|
|
260
|
+
"@elastic/eui-theme-borealis": "7.0.0",
|
|
261
261
|
"@emotion/css": "11.x",
|
|
262
262
|
"@emotion/react": "11.x",
|
|
263
263
|
"@types/react": "^17.0 || ^18.0",
|
|
@@ -281,6 +281,5 @@
|
|
|
281
281
|
],
|
|
282
282
|
"installConfig": {
|
|
283
283
|
"hoistingLimits": "workspaces"
|
|
284
|
-
}
|
|
285
|
-
"stableVersion": "114.2.0"
|
|
284
|
+
}
|
|
286
285
|
}
|
|
@@ -59,11 +59,17 @@ var useScroll = exports.useScroll = function useScroll(args) {
|
|
|
59
59
|
});
|
|
60
60
|
}, [focusedCell, scrollCellIntoView, isPointerDownRef]);
|
|
61
61
|
(0, _react.useEffect)(function () {
|
|
62
|
-
var handlePointerUp = function handlePointerUp() {
|
|
62
|
+
var handlePointerUp = function handlePointerUp(event) {
|
|
63
63
|
var _window;
|
|
64
64
|
if (!pendingScrollRef.current || !focusedCell) return;
|
|
65
65
|
pendingScrollRef.current = false;
|
|
66
66
|
|
|
67
|
+
// The pointerup event can come from any mouse button, not only the left
|
|
68
|
+
// click. We only care about the primary (usually left) mouse button
|
|
69
|
+
// clicks, and specifically have to ignore middle mouse button clicks,
|
|
70
|
+
// which indicate scrolling on Windows.
|
|
71
|
+
if (event.pointerType === 'mouse' && event.button !== 0) return;
|
|
72
|
+
|
|
67
73
|
// Skip if the interaction resulted in text being selected
|
|
68
74
|
if (((_window = window) === null || _window === void 0 || (_window = _window.getSelection()) === null || _window === void 0 ? void 0 : _window.type) === 'Range') return;
|
|
69
75
|
scrollCellIntoView({
|
|
@@ -34,8 +34,7 @@ var EuiIconChartPie = function EuiIconChartPie(_ref) {
|
|
|
34
34
|
}, props), title ? (0, _react2.jsx)("title", {
|
|
35
35
|
id: titleId
|
|
36
36
|
}, title) : null, (0, _react2.jsx)("path", {
|
|
37
|
-
|
|
38
|
-
d: "M7.5 8.5h6.979A6.498 6.498 0 0 1 1.5 8a6.5 6.5 0 0 1 6-6.48V8.5Zm2-6.824A6.506 6.506 0 0 1 14.323 6.5H9.5V1.676Z"
|
|
37
|
+
d: "M7 2.084A6 6 0 0 0 8 14v1A7 7 0 1 1 8 1v7h7a7 7 0 0 1-7 7v-1a6 6 0 0 0 5.915-5H7V2.084Zm2-1.012A7.002 7.002 0 0 1 14.928 7H9V1.072ZM10 6h3.657A6.015 6.015 0 0 0 10 2.343V6Z"
|
|
39
38
|
}));
|
|
40
39
|
};
|
|
41
40
|
var icon = exports.icon = EuiIconChartPie;
|
|
@@ -34,9 +34,11 @@ var EuiIconProductDashboard = function EuiIconProductDashboard(_ref) {
|
|
|
34
34
|
}, props), title ? (0, _react2.jsx)("title", {
|
|
35
35
|
id: titleId
|
|
36
36
|
}, title) : null, (0, _react2.jsx)("path", {
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
37
|
+
d: "m8.528 10.265.972-.972 1.5 1.5 1.646-1.647.707.708L11 12.207l-1.5-1.5-1.028 1.028-3-3.5-2.118 2.119-.708-.708 2.882-2.881 3 3.5Z"
|
|
38
|
+
}), (0, _react2.jsx)("path", {
|
|
39
|
+
d: "M9 8H8V6h1v2Zm2 0h-1V5h1v3Zm2 0h-1V4h1v4ZM7 5H3V4h4v1Z"
|
|
40
|
+
}), (0, _react2.jsx)("path", {
|
|
41
|
+
d: "M14 2a1 1 0 0 1 1 1v10a1 1 0 0 1-1 1H2a1 1 0 0 1-1-1V3a1 1 0 0 1 1-1h12ZM2 13h12V3H2v10Z"
|
|
40
42
|
}));
|
|
41
43
|
};
|
|
42
44
|
var icon = exports.icon = EuiIconProductDashboard;
|
|
@@ -15,7 +15,7 @@ var _step_number = require("./step_number");
|
|
|
15
15
|
var _step_strings = require("./step_strings");
|
|
16
16
|
var _step_horizontal = require("./step_horizontal.styles");
|
|
17
17
|
var _react2 = require("@emotion/react");
|
|
18
|
-
var _excluded = ["className", "step", "title", "onClick", "disabled", "status", "size"];
|
|
18
|
+
var _excluded = ["className", "step", "title", "onClick", "disabled", "status", "size", "aria-label", "aria-labelledby"];
|
|
19
19
|
/*
|
|
20
20
|
* Copyright Elasticsearch B.V. and/or licensed to Elasticsearch B.V. under one
|
|
21
21
|
* or more contributor license agreements. Licensed under the Elastic License
|
|
@@ -40,6 +40,8 @@ var EuiStepHorizontal = exports.EuiStepHorizontal = function EuiStepHorizontal(_
|
|
|
40
40
|
status = _ref$status === void 0 ? 'incomplete' : _ref$status,
|
|
41
41
|
_ref$size = _ref.size,
|
|
42
42
|
size = _ref$size === void 0 ? 'm' : _ref$size,
|
|
43
|
+
ariaLabel = _ref['aria-label'],
|
|
44
|
+
ariaLabelledby = _ref['aria-labelledby'],
|
|
43
45
|
rest = (0, _objectWithoutProperties2.default)(_ref, _excluded);
|
|
44
46
|
if (disabled) status = 'disabled';
|
|
45
47
|
var classes = (0, _classnames.default)('euiStepHorizontal', className);
|
|
@@ -49,7 +51,7 @@ var EuiStepHorizontal = exports.EuiStepHorizontal = function EuiStepHorizontal(_
|
|
|
49
51
|
var cssNumberStyles = [numberStyles.euiStepHorizontal__number];
|
|
50
52
|
var titleStyles = (0, _services.useEuiMemoizedStyles)(_step_horizontal.euiStepHorizontalTitleStyles);
|
|
51
53
|
var cssTitleStyles = [titleStyles.euiStepHorizontal__title, status === 'disabled' && titleStyles.disabled];
|
|
52
|
-
var
|
|
54
|
+
var labelMap = {
|
|
53
55
|
step: (0, _step_strings.useI18nStep)({
|
|
54
56
|
number: step,
|
|
55
57
|
title: title
|
|
@@ -83,14 +85,15 @@ var EuiStepHorizontal = exports.EuiStepHorizontal = function EuiStepHorizontal(_
|
|
|
83
85
|
title: title
|
|
84
86
|
})
|
|
85
87
|
};
|
|
86
|
-
var
|
|
88
|
+
var ariaLabelAttr = labelMap[status || 'step'];
|
|
87
89
|
var onStepClick = function onStepClick(event) {
|
|
88
|
-
if (!disabled) onClick(event);
|
|
90
|
+
if (!disabled && status !== 'disabled') onClick(event);
|
|
89
91
|
};
|
|
90
92
|
return (0, _react2.jsx)("button", (0, _extends2.default)({
|
|
91
93
|
"aria-disabled": status === 'disabled' ? true : undefined,
|
|
92
94
|
className: classes,
|
|
93
|
-
|
|
95
|
+
"aria-label": ariaLabel !== null && ariaLabel !== void 0 ? ariaLabel : ariaLabelledby ? undefined : ariaLabelAttr,
|
|
96
|
+
"aria-labelledby": ariaLabelledby,
|
|
94
97
|
onClick: onStepClick,
|
|
95
98
|
disabled: disabled,
|
|
96
99
|
css: cssStyles,
|