@elastic/eui 106.4.0 → 106.6.0-backport.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/es/components/avatar/avatar.js +2 -0
- package/es/components/badge/badge.js +5 -7
- package/es/components/badge/badge.styles.js +10 -4
- package/es/components/basic_table/basic_table.js +6 -0
- package/es/components/basic_table/in_memory_table.js +6 -0
- package/es/components/color_picker/color_picker_swatch.js +4 -0
- package/es/components/datagrid/controls/column_selector.js +32 -3
- package/es/components/datagrid/data_grid.styles.js +1 -1
- package/es/components/date_picker/super_date_picker/quick_select_popover/quick_select.js +4 -4
- package/es/components/date_picker/super_date_picker/super_date_picker.styles.js +1 -1
- package/es/components/modal/modal.js +16 -5
- package/es/components/table/table_header_cell.js +4 -0
- package/es/components/tool_tip/icon_tip.js +4 -0
- package/es/components/tool_tip/tool_tip.js +8 -2
- package/es/services/color/contrast.js +11 -0
- package/eui.d.ts +129 -121
- package/i18ntokens.json +2305 -2287
- package/lib/components/avatar/avatar.js +2 -0
- package/lib/components/badge/badge.js +3 -5
- package/lib/components/badge/badge.styles.js +10 -4
- package/lib/components/basic_table/basic_table.js +6 -0
- package/lib/components/basic_table/in_memory_table.js +6 -0
- package/lib/components/color_picker/color_picker_swatch.js +4 -0
- package/lib/components/datagrid/controls/column_selector.js +32 -3
- package/lib/components/datagrid/data_grid.styles.js +1 -1
- package/lib/components/date_picker/super_date_picker/quick_select_popover/quick_select.js +4 -4
- package/lib/components/date_picker/super_date_picker/super_date_picker.styles.js +1 -1
- package/lib/components/modal/modal.js +15 -4
- package/lib/components/table/table_header_cell.js +4 -0
- package/lib/components/tool_tip/icon_tip.js +4 -0
- package/lib/components/tool_tip/tool_tip.js +9 -3
- package/lib/services/color/contrast.js +12 -1
- package/optimize/es/components/avatar/avatar.js +2 -0
- package/optimize/es/components/badge/badge.js +5 -7
- package/optimize/es/components/badge/badge.styles.js +10 -4
- package/optimize/es/components/datagrid/controls/column_selector.js +34 -3
- package/optimize/es/components/datagrid/data_grid.styles.js +1 -1
- package/optimize/es/components/date_picker/super_date_picker/quick_select_popover/quick_select.js +4 -4
- package/optimize/es/components/date_picker/super_date_picker/super_date_picker.styles.js +1 -1
- package/optimize/es/components/modal/modal.js +16 -5
- package/optimize/es/components/tool_tip/tool_tip.js +4 -2
- package/optimize/es/services/color/contrast.js +11 -0
- package/optimize/lib/components/avatar/avatar.js +2 -0
- package/optimize/lib/components/badge/badge.js +3 -5
- package/optimize/lib/components/badge/badge.styles.js +10 -4
- package/optimize/lib/components/datagrid/controls/column_selector.js +34 -5
- package/optimize/lib/components/datagrid/data_grid.styles.js +1 -1
- package/optimize/lib/components/date_picker/super_date_picker/quick_select_popover/quick_select.js +4 -4
- package/optimize/lib/components/date_picker/super_date_picker/super_date_picker.styles.js +1 -1
- package/optimize/lib/components/modal/modal.js +15 -4
- package/optimize/lib/components/tool_tip/tool_tip.js +5 -3
- package/optimize/lib/services/color/contrast.js +12 -1
- package/package.json +3 -3
- package/test-env/components/avatar/avatar.js +2 -0
- package/test-env/components/badge/badge.js +3 -5
- package/test-env/components/badge/badge.styles.js +10 -4
- package/test-env/components/basic_table/basic_table.js +6 -0
- package/test-env/components/basic_table/in_memory_table.js +6 -0
- package/test-env/components/color_picker/color_picker_swatch.js +4 -0
- package/test-env/components/datagrid/controls/column_selector.js +34 -5
- package/test-env/components/datagrid/data_grid.styles.js +1 -1
- package/test-env/components/date_picker/super_date_picker/quick_select_popover/quick_select.js +4 -4
- package/test-env/components/date_picker/super_date_picker/super_date_picker.styles.js +1 -1
- package/test-env/components/modal/modal.js +15 -4
- package/test-env/components/table/table_header_cell.js +4 -0
- package/test-env/components/tool_tip/icon_tip.js +4 -0
- package/test-env/components/tool_tip/tool_tip.js +9 -3
- package/test-env/services/color/contrast.js +12 -1
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import _extends from "@babel/runtime/helpers/extends";
|
|
2
2
|
import _defineProperty from "@babel/runtime/helpers/defineProperty";
|
|
3
3
|
import _objectWithoutProperties from "@babel/runtime/helpers/objectWithoutProperties";
|
|
4
|
-
var _excluded = ["className", "children", "initialFocus", "onClose", "maxWidth", "role", "style", "focusTrapProps"];
|
|
4
|
+
var _excluded = ["className", "children", "initialFocus", "onClose", "maxWidth", "role", "style", "focusTrapProps", "aria-describedby"];
|
|
5
5
|
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; }
|
|
6
6
|
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; }
|
|
7
7
|
/*
|
|
@@ -14,13 +14,14 @@ function _objectSpread(e) { for (var r = 1; r < arguments.length; r++) { var t =
|
|
|
14
14
|
|
|
15
15
|
import React from 'react';
|
|
16
16
|
import classnames from 'classnames';
|
|
17
|
-
import { keys, useEuiTheme } from '../../services';
|
|
17
|
+
import { keys, useEuiTheme, useGeneratedHtmlId } from '../../services';
|
|
18
18
|
import { isDOMNode } from '../../utils';
|
|
19
19
|
import { EuiButtonIcon } from '../button';
|
|
20
20
|
import { EuiFocusTrap } from '../focus_trap';
|
|
21
21
|
import { EuiOverlayMask } from '../overlay_mask';
|
|
22
22
|
import { EuiI18n } from '../i18n';
|
|
23
23
|
import { euiModalStyles } from './modal.styles';
|
|
24
|
+
import { EuiScreenReaderOnly } from '../accessibility';
|
|
24
25
|
import { jsx as ___EmotionJSX } from "@emotion/react";
|
|
25
26
|
export var EuiModal = function EuiModal(_ref) {
|
|
26
27
|
var className = _ref.className,
|
|
@@ -33,6 +34,7 @@ export var EuiModal = function EuiModal(_ref) {
|
|
|
33
34
|
role = _ref$role === void 0 ? 'dialog' : _ref$role,
|
|
34
35
|
style = _ref.style,
|
|
35
36
|
focusTrapProps = _ref.focusTrapProps,
|
|
37
|
+
_ariaDescribedBy = _ref['aria-describedby'],
|
|
36
38
|
rest = _objectWithoutProperties(_ref, _excluded);
|
|
37
39
|
var onKeyDown = function onKeyDown(event) {
|
|
38
40
|
if (event.key === keys.ESCAPE) {
|
|
@@ -54,6 +56,14 @@ export var EuiModal = function EuiModal(_ref) {
|
|
|
54
56
|
var styles = euiModalStyles(euiTheme);
|
|
55
57
|
var cssStyles = [styles.euiModal, maxWidth === true && styles.defaultMaxWidth];
|
|
56
58
|
var cssCloseIconStyles = [styles.euiModal__closeIcon];
|
|
59
|
+
var descriptionId = useGeneratedHtmlId();
|
|
60
|
+
var ariaDescribedBy = classnames(descriptionId, _ariaDescribedBy);
|
|
61
|
+
var screenReaderDescription = ___EmotionJSX(EuiScreenReaderOnly, null, ___EmotionJSX("p", {
|
|
62
|
+
id: descriptionId
|
|
63
|
+
}, ___EmotionJSX(EuiI18n, {
|
|
64
|
+
token: "euiModal.screenReaderModalDialog",
|
|
65
|
+
default: "You are in a modal dialog. Press Escape or tap/click outside the dialog on the shadowed overlay to close."
|
|
66
|
+
})));
|
|
57
67
|
return ___EmotionJSX(EuiOverlayMask, null, ___EmotionJSX(EuiFocusTrap, _extends({}, focusTrapProps, {
|
|
58
68
|
initialFocus: initialFocus,
|
|
59
69
|
scrollLock: true,
|
|
@@ -65,8 +75,9 @@ export var EuiModal = function EuiModal(_ref) {
|
|
|
65
75
|
tabIndex: 0,
|
|
66
76
|
style: newStyle,
|
|
67
77
|
role: role,
|
|
68
|
-
"aria-modal": true
|
|
69
|
-
|
|
78
|
+
"aria-modal": true,
|
|
79
|
+
"aria-describedby": ariaDescribedBy
|
|
80
|
+
}, rest), children, screenReaderDescription, ___EmotionJSX(EuiI18n, {
|
|
70
81
|
token: "euiModal.closeModal",
|
|
71
82
|
default: "Closes this modal window"
|
|
72
83
|
}, function (closeModal) {
|
|
@@ -78,5 +89,5 @@ export var EuiModal = function EuiModal(_ref) {
|
|
|
78
89
|
color: "text",
|
|
79
90
|
"aria-label": closeModal
|
|
80
91
|
});
|
|
81
|
-
})
|
|
92
|
+
}))));
|
|
82
93
|
};
|
|
@@ -30,6 +30,7 @@ import { toolTipManager } from './tool_tip_manager';
|
|
|
30
30
|
import { jsx as ___EmotionJSX } from "@emotion/react";
|
|
31
31
|
export var POSITIONS = ['top', 'right', 'bottom', 'left'];
|
|
32
32
|
var DISPLAYS = ['inlineBlock', 'block'];
|
|
33
|
+
export var DEFAULT_TOOLTIP_OFFSET = 16;
|
|
33
34
|
var delayToMsMap = {
|
|
34
35
|
regular: 250,
|
|
35
36
|
long: 250 * 5
|
|
@@ -104,7 +105,9 @@ export var EuiToolTip = /*#__PURE__*/function (_Component) {
|
|
|
104
105
|
}
|
|
105
106
|
});
|
|
106
107
|
_defineProperty(_this, "positionToolTip", function () {
|
|
108
|
+
var _this$props$offset;
|
|
107
109
|
var requestedPosition = _this.props.position;
|
|
110
|
+
var offset = (_this$props$offset = _this.props.offset) !== null && _this$props$offset !== void 0 ? _this$props$offset : DEFAULT_TOOLTIP_OFFSET;
|
|
108
111
|
if (!_this.anchor || !_this.popover) {
|
|
109
112
|
return;
|
|
110
113
|
}
|
|
@@ -112,8 +115,7 @@ export var EuiToolTip = /*#__PURE__*/function (_Component) {
|
|
|
112
115
|
anchor: _this.anchor,
|
|
113
116
|
popover: _this.popover,
|
|
114
117
|
position: requestedPosition,
|
|
115
|
-
offset:
|
|
116
|
-
// offset popover 16px from the anchor
|
|
118
|
+
offset: offset,
|
|
117
119
|
arrowConfig: {
|
|
118
120
|
arrowWidth: 12,
|
|
119
121
|
arrowBuffer: 4
|
|
@@ -10,6 +10,9 @@ import _typeof from "@babel/runtime/helpers/typeof";
|
|
|
10
10
|
import chroma from 'chroma-js';
|
|
11
11
|
import { shade, tint, lightness as getLightness } from './manipulation';
|
|
12
12
|
import { getOn } from '../theme/utils';
|
|
13
|
+
export var getColorContrast = function getColorContrast(textColor, backgroundColor) {
|
|
14
|
+
return chroma.contrast(textColor, backgroundColor);
|
|
15
|
+
};
|
|
13
16
|
export var wcagContrastMin = 4.5; // WCAG AA minimum contrast ratio for normal (non-large) text
|
|
14
17
|
|
|
15
18
|
/**
|
|
@@ -68,4 +71,12 @@ export var makeDisabledContrastColor = function makeDisabledContrastColor(color)
|
|
|
68
71
|
return function (themeOrBackground) {
|
|
69
72
|
return makeHighContrastColor(color, ratio)(themeOrBackground);
|
|
70
73
|
};
|
|
74
|
+
};
|
|
75
|
+
export var warnIfContrastBelowMin = function warnIfContrastBelowMin(textColor, backgroundColor) {
|
|
76
|
+
var min = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : wcagContrastMin;
|
|
77
|
+
var ratio = getColorContrast(textColor, backgroundColor);
|
|
78
|
+
if (ratio < min) {
|
|
79
|
+
// eslint-disable-next-line no-console
|
|
80
|
+
console.warn("Warning: ".concat(backgroundColor, " background with ").concat(textColor, " text has a low contrast of ").concat(ratio.toFixed(2), ". Should be above ").concat(min, "."));
|
|
81
|
+
}
|
|
71
82
|
};
|
|
@@ -12,6 +12,7 @@ var _defineProperty2 = _interopRequireDefault(require("@babel/runtime/helpers/de
|
|
|
12
12
|
var _objectWithoutProperties2 = _interopRequireDefault(require("@babel/runtime/helpers/objectWithoutProperties"));
|
|
13
13
|
var _react = _interopRequireWildcard(require("react"));
|
|
14
14
|
var _classnames = _interopRequireDefault(require("classnames"));
|
|
15
|
+
var _contrast = require("../../services/color/contrast");
|
|
15
16
|
var _color = require("../../services/color");
|
|
16
17
|
var _services = require("../../services");
|
|
17
18
|
var _icon = require("../icon");
|
|
@@ -82,6 +83,7 @@ var EuiAvatar = exports.EuiAvatar = function EuiAvatar(_ref) {
|
|
|
82
83
|
checkValidColor(color);
|
|
83
84
|
var assignedColor = color || visColors[Math.floor(name.length % visColors.length)];
|
|
84
85
|
var textColor = _color.isColorDark.apply(void 0, (0, _toConsumableArray2.default)((0, _color.hexToRgb)(assignedColor))) ? '#FFFFFF' : '#000000';
|
|
86
|
+
(0, _contrast.warnIfContrastBelowMin)(textColor, assignedColor, _contrast.wcagContrastMin);
|
|
85
87
|
return {
|
|
86
88
|
backgroundColor: assignedColor,
|
|
87
89
|
color: textColor
|
|
@@ -17,6 +17,7 @@ var _href_validator = require("../../services/security/href_validator");
|
|
|
17
17
|
var _inner_text = require("../inner_text");
|
|
18
18
|
var _icon = require("../icon");
|
|
19
19
|
var _color_utils = require("./color_utils");
|
|
20
|
+
var _contrast = require("../../services/color/contrast");
|
|
20
21
|
var _badge = require("./badge.styles");
|
|
21
22
|
var _react2 = require("@emotion/react");
|
|
22
23
|
var _excluded = ["children", "color", "iconType", "iconSide", "className", "isDisabled", "onClick", "iconOnClick", "onClickAriaLabel", "iconOnClickAriaLabel", "closeButtonProps", "href", "rel", "target", "style"];
|
|
@@ -67,11 +68,8 @@ var EuiBadge = exports.EuiBadge = function EuiBadge(_ref) {
|
|
|
67
68
|
// Set dark or light text color based upon best contrast
|
|
68
69
|
var textColor = (0, _color_utils.getTextColor)(euiTheme, color);
|
|
69
70
|
|
|
70
|
-
//
|
|
71
|
-
|
|
72
|
-
if (contrastRatio < _services.wcagContrastMin) {
|
|
73
|
-
console.warn("Warning: ".concat(color, " badge has a low contrast of ").concat(contrastRatio.toFixed(2), ". Should be above ").concat(_services.wcagContrastMin, "."));
|
|
74
|
-
}
|
|
71
|
+
// Emit a warning if contrast is below WCAG threshold (centralized util)
|
|
72
|
+
(0, _contrast.warnIfContrastBelowMin)(textColor, color, _contrast.wcagContrastMin);
|
|
75
73
|
return _objectSpread({
|
|
76
74
|
'--euiBadgeBackgroundColor': color,
|
|
77
75
|
'--euiBadgeTextColor': textColor
|
|
@@ -15,6 +15,14 @@ function _EMOTION_STRINGIFIED_CSS_ERROR__() { return "You have tried to stringif
|
|
|
15
15
|
* Side Public License, v 1.
|
|
16
16
|
*/
|
|
17
17
|
var _ref = process.env.NODE_ENV === "production" ? {
|
|
18
|
+
name: "1jbvl30-euiBadge__iconButton",
|
|
19
|
+
styles: "font-size:0;&:disabled{cursor:not-allowed;}.euiBadge__icon{margin:0!important;};label:euiBadge__iconButton;"
|
|
20
|
+
} : {
|
|
21
|
+
name: "1jbvl30-euiBadge__iconButton",
|
|
22
|
+
styles: "font-size:0;&:disabled{cursor:not-allowed;}.euiBadge__icon{margin:0!important;};label:euiBadge__iconButton;",
|
|
23
|
+
toString: _EMOTION_STRINGIFIED_CSS_ERROR__
|
|
24
|
+
};
|
|
25
|
+
var _ref2 = process.env.NODE_ENV === "production" ? {
|
|
18
26
|
name: "1hw5vc4-clickable",
|
|
19
27
|
styles: "cursor:pointer;label:clickable;"
|
|
20
28
|
} : {
|
|
@@ -57,7 +65,7 @@ var euiBadgeStyles = exports.euiBadgeStyles = function euiBadgeStyles(euiThemeCo
|
|
|
57
65
|
// Text
|
|
58
66
|
text: {
|
|
59
67
|
euiBadge__text: /*#__PURE__*/(0, _react.css)((0, _global_styling.euiTextTruncate)(), " cursor:inherit;;label:euiBadge__text;"),
|
|
60
|
-
clickable:
|
|
68
|
+
clickable: _ref2
|
|
61
69
|
},
|
|
62
70
|
// Icon
|
|
63
71
|
icon: {
|
|
@@ -67,9 +75,7 @@ var euiBadgeStyles = exports.euiBadgeStyles = function euiBadgeStyles(euiThemeCo
|
|
|
67
75
|
},
|
|
68
76
|
// Clickable icons (iconOnClick)
|
|
69
77
|
iconButton: {
|
|
70
|
-
euiBadge__iconButton:
|
|
71
|
-
return x / 2;
|
|
72
|
-
}), ";}&:disabled{cursor:not-allowed;}.euiBadge__icon{margin:0!important;};label:euiBadge__iconButton;"),
|
|
78
|
+
euiBadge__iconButton: _ref,
|
|
73
79
|
right: /*#__PURE__*/(0, _react.css)((0, _global_styling.logicalCSS)('margin-left', euiTheme.size.xs), ";;label:right;"),
|
|
74
80
|
left: /*#__PURE__*/(0, _react.css)((0, _global_styling.logicalCSS)('margin-right', euiTheme.size.xs), ";;label:left;")
|
|
75
81
|
},
|
|
@@ -26,28 +26,57 @@ var _column_selector = require("./column_selector.styles");
|
|
|
26
26
|
var _react2 = require("@emotion/react");
|
|
27
27
|
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); }
|
|
28
28
|
function _interopRequireWildcard(e, r) { if (!r && e && e.__esModule) return e; if (null === e || "object" != _typeof(e) && "function" != typeof e) return { default: e }; var t = _getRequireWildcardCache(r); if (t && t.has(e)) return t.get(e); var n = { __proto__: null }, a = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var u in e) if ("default" !== u && {}.hasOwnProperty.call(e, u)) { var i = a ? Object.getOwnPropertyDescriptor(e, u) : null; i && (i.get || i.set) ? Object.defineProperty(n, u, i) : n[u] = e[u]; } return n.default = e, t && t.set(e, n), n; }
|
|
29
|
-
|
|
29
|
+
function _createForOfIteratorHelper(r, e) { var t = "undefined" != typeof Symbol && r[Symbol.iterator] || r["@@iterator"]; if (!t) { if (Array.isArray(r) || (t = _unsupportedIterableToArray(r)) || e && r && "number" == typeof r.length) { t && (r = t); var _n = 0, F = function F() {}; return { s: F, n: function n() { return _n >= r.length ? { done: !0 } : { done: !1, value: r[_n++] }; }, e: function e(r) { throw r; }, f: F }; } throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method."); } var o, a = !0, u = !1; return { s: function s() { t = t.call(r); }, n: function n() { var r = t.next(); return a = r.done, r; }, e: function e(r) { u = !0, o = r; }, f: function f() { try { a || null == t.return || t.return(); } finally { if (u) throw o; } } }; }
|
|
30
|
+
function _unsupportedIterableToArray(r, a) { if (r) { if ("string" == typeof r) return _arrayLikeToArray(r, a); var t = {}.toString.call(r).slice(8, -1); return "Object" === t && r.constructor && (t = r.constructor.name), "Map" === t || "Set" === t ? Array.from(r) : "Arguments" === t || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(t) ? _arrayLikeToArray(r, a) : void 0; } }
|
|
31
|
+
function _arrayLikeToArray(r, a) { (null == a || a > r.length) && (a = r.length); for (var e = 0, n = Array(a); e < a; e++) n[e] = r[e]; return n; } /*
|
|
30
32
|
* Copyright Elasticsearch B.V. and/or licensed to Elasticsearch B.V. under one
|
|
31
33
|
* or more contributor license agreements. Licensed under the Elastic License
|
|
32
34
|
* 2.0 and the Server Side Public License, v 1; you may not use this file except
|
|
33
35
|
* in compliance with, at your election, the Elastic License 2.0 or the Server
|
|
34
36
|
* Side Public License, v 1.
|
|
35
37
|
*/
|
|
36
|
-
|
|
37
38
|
var useDataGridColumnSelector = exports.useDataGridColumnSelector = function useDataGridColumnSelector(availableColumns, columnVisibility, showColumnSelector, displayValues) {
|
|
38
39
|
var allowColumnHiding = (0, _data_grid_toolbar.getNestedObjectOptions)(showColumnSelector, 'allowHide');
|
|
39
40
|
var allowColumnReorder = (0, _data_grid_toolbar.getNestedObjectOptions)(showColumnSelector, 'allowReorder');
|
|
41
|
+
var visibleColumns = columnVisibility.visibleColumns,
|
|
42
|
+
setVisibleColumns = columnVisibility.setVisibleColumns;
|
|
40
43
|
var _useDependentState = (0, _services.useDependentState)(function () {
|
|
41
|
-
|
|
44
|
+
var availableColumnIds = availableColumns.map(function (_ref) {
|
|
42
45
|
var id = _ref.id;
|
|
43
46
|
return id;
|
|
44
47
|
});
|
|
48
|
+
var availableSet = new Set(availableColumnIds);
|
|
49
|
+
// Filter visibleColumns to only include existing columns
|
|
50
|
+
var validVisibleColumns = visibleColumns.filter(function (id) {
|
|
51
|
+
return availableSet.has(id);
|
|
52
|
+
});
|
|
53
|
+
var visibleSet = new Set(validVisibleColumns);
|
|
54
|
+
var result = [];
|
|
55
|
+
var visibleIndex = 0;
|
|
56
|
+
var _iterator = _createForOfIteratorHelper(availableColumnIds),
|
|
57
|
+
_step;
|
|
58
|
+
try {
|
|
59
|
+
for (_iterator.s(); !(_step = _iterator.n()).done;) {
|
|
60
|
+
var columnId = _step.value;
|
|
61
|
+
if (visibleSet.has(columnId)) {
|
|
62
|
+
// Replace with next visible column in order
|
|
63
|
+
result.push(validVisibleColumns[visibleIndex++]);
|
|
64
|
+
} else {
|
|
65
|
+
// Keep hidden column in original position
|
|
66
|
+
result.push(columnId);
|
|
67
|
+
}
|
|
68
|
+
}
|
|
69
|
+
} catch (err) {
|
|
70
|
+
_iterator.e(err);
|
|
71
|
+
} finally {
|
|
72
|
+
_iterator.f();
|
|
73
|
+
}
|
|
74
|
+
return result;
|
|
75
|
+
// doesn't depend on visibleColumns on purpose to keep it an initial state
|
|
45
76
|
}, [availableColumns]),
|
|
46
77
|
_useDependentState2 = (0, _slicedToArray2.default)(_useDependentState, 2),
|
|
47
78
|
sortedColumns = _useDependentState2[0],
|
|
48
79
|
setSortedColumns = _useDependentState2[1];
|
|
49
|
-
var visibleColumns = columnVisibility.visibleColumns,
|
|
50
|
-
setVisibleColumns = columnVisibility.setVisibleColumns;
|
|
51
80
|
var visibleColumnIds = (0, _react.useMemo)(function () {
|
|
52
81
|
return new Set(visibleColumns);
|
|
53
82
|
}, [visibleColumns]);
|
|
@@ -58,7 +58,7 @@ var euiDataGridStyles = exports.euiDataGridStyles = function euiDataGridStyles(e
|
|
|
58
58
|
};
|
|
59
59
|
var border = "".concat(euiTheme.border.width.thin, " solid ").concat(borderColors.default);
|
|
60
60
|
return {
|
|
61
|
-
euiDataGrid: /*#__PURE__*/(0, _react.css)("display:flex;flex-direction:column;align-items:stretch;", (0, _global_styling.logicalCSS)('height', '100%'), " overflow:hidden;*:where(& .euiDataGridRow){background-color:", euiTheme.components.dataGridRowBackground, ";}*:where(&.euiDataGrid--rowHoverHighlight .euiDataGridRow:hover){background-color:", euiTheme.components.dataGridRowBackgroundHover, ";}*:where(
|
|
61
|
+
euiDataGrid: /*#__PURE__*/(0, _react.css)("display:flex;flex-direction:column;align-items:stretch;", (0, _global_styling.logicalCSS)('height', '100%'), " overflow:hidden;*:where(& .euiDataGridRow){background-color:", euiTheme.components.dataGridRowBackground, ";}*:where(&.euiDataGrid--rowHoverHighlight .euiDataGridRow:hover){background-color:", euiTheme.components.dataGridRowBackgroundHover, ";}*:where(& .euiDataGridRow--selected){background-color:", euiTheme.components.dataGridRowBackgroundSelect, ";}*:where(& .euiDataGridRow--marked){background-color:", euiTheme.components.dataGridRowBackgroundMarked, ";.euiDataGridRowCell.euiDataGridRowCell{", outlineSelectors.marked, "{", (0, _data_grid_cell.euiDataGridCellOutlineStyles)(euiThemeContext).markedStyles, ";}}}*:where(&.euiDataGrid--rowHoverHighlight .euiDataGridRow--marked){&:hover{background-color:", euiTheme.components.dataGridRowBackgroundMarkedHover, ";}}*:where(\n &.euiDataGrid--rowHoverHighlight .euiDataGridRow--selected:hover\n ){background-color:", euiTheme.components.dataGridRowBackgroundSelectHover, ";}*:where(&.euiDataGrid--stripes .euiDataGridRow){background-color:", euiTheme.components.dataGridRowStripesBackground, ";}*:where(&.euiDataGrid--stripes .euiDataGridRow--striped){background-color:", euiTheme.components.dataGridRowStripesBackgroundStriped, ";}*:where(\n &.euiDataGrid--stripes.euiDataGrid--rowHoverHighlight\n .euiDataGridRow:hover\n ){background-color:", euiTheme.components.dataGridRowStripesBackgroundHover, ";}*:where(\n &.euiDataGrid--stripes.euiDataGrid--rowHoverHighlight\n .euiDataGridRow--striped:hover\n ){background-color:", euiTheme.components.dataGridRowStripesBackgroundStripedHover, ";}*:where(&.euiDataGrid--stripes .euiDataGridRow--selected){background-color:", euiTheme.components.dataGridRowStripesBackgroundSelect, ";}*:where(&.euiDataGrid--stripes .euiDataGridRow--marked){background-color:", euiTheme.components.dataGridRowBackgroundMarked, ";}*:where(\n &.euiDataGrid--stripes.euiDataGrid--rowHoverHighlight\n .euiDataGridRow--selected:hover\n ){background-color:", euiTheme.components.dataGridRowStripesBackgroundSelectHover, ";}*:where(&.euiDataGrid--rowHoverHighlight .euiDataGridRow)::before{content:'';position:absolute;z-index:-1;pointer-events:none;inset:0;background-color:", euiTheme.components.dataGridRowBackground, ";};label:euiDataGrid;"),
|
|
62
62
|
cellPadding: {
|
|
63
63
|
cellPadding: function cellPadding(size) {
|
|
64
64
|
return /*#__PURE__*/(0, _react.css)(".euiDataGridHeaderCell,.euiDataGridRowCell__content{padding:", _cellPadding[size], ";}.euiDataGridRowCell__content--lineCountHeight,.euiDataGridRowCell__content--autoBelowLineCountHeight{", (0, _high_contrast.highContrastModeStyles)(euiThemeContext, {
|
package/optimize/lib/components/date_picker/super_date_picker/quick_select_popover/quick_select.js
CHANGED
|
@@ -120,8 +120,8 @@ var EuiQuickSelect = exports.EuiQuickSelect = /*#__PURE__*/function (_Component)
|
|
|
120
120
|
max = _this$getBounds.max;
|
|
121
121
|
var diff = max.diff(min);
|
|
122
122
|
_this.props.applyTime({
|
|
123
|
-
start: (0, _moment.default)(max).
|
|
124
|
-
end: (0, _moment.default)(max).add(diff
|
|
123
|
+
start: (0, _moment.default)(max).toISOString(),
|
|
124
|
+
end: (0, _moment.default)(max).add(diff, 'ms').toISOString(),
|
|
125
125
|
keepPopoverOpen: true
|
|
126
126
|
});
|
|
127
127
|
});
|
|
@@ -131,8 +131,8 @@ var EuiQuickSelect = exports.EuiQuickSelect = /*#__PURE__*/function (_Component)
|
|
|
131
131
|
max = _this$getBounds2.max;
|
|
132
132
|
var diff = max.diff(min);
|
|
133
133
|
_this.props.applyTime({
|
|
134
|
-
start: (0, _moment.default)(min).subtract(diff
|
|
135
|
-
end: (0, _moment.default)(min).
|
|
134
|
+
start: (0, _moment.default)(min).subtract(diff, 'ms').toISOString(),
|
|
135
|
+
end: (0, _moment.default)(min).toISOString(),
|
|
136
136
|
keepPopoverOpen: true
|
|
137
137
|
});
|
|
138
138
|
});
|
|
@@ -79,7 +79,7 @@ var euiSuperDatePickerStyles = exports.euiSuperDatePickerStyles = function euiSu
|
|
|
79
79
|
full: "\n label: isAutoRefreshOnly;\n display: block;\n "
|
|
80
80
|
},
|
|
81
81
|
// isQuickSelectOnly forces `width` to be `auto`
|
|
82
|
-
isQuickSelectOnly: /*#__PURE__*/(0, _react.css)((0, _global_styling.logicalCSS)('min-width', 0), ".euiFormControlLayout__prepend{", (0, _global_styling.logicalCSS)('max-width', 'none'), ";};label:isQuickSelectOnly;"),
|
|
82
|
+
isQuickSelectOnly: /*#__PURE__*/(0, _react.css)((0, _global_styling.logicalCSS)('min-width', 0), ".euiFormControlLayout__prepend{", (0, _global_styling.logicalCSS)('max-width', 'none'), ";}.euiFormControlLayoutDelimited__delimiter:first-child{", (0, _global_styling.logicalCSS)('padding-horizontal', 0), ";};label:isQuickSelectOnly;"),
|
|
83
83
|
euiSuperDatePicker__range: _ref,
|
|
84
84
|
euiSuperDatePicker__rangeInput: /*#__PURE__*/(0, _react.css)("flex-grow:1;", (0, _global_styling.logicalCSS)('width', 'auto'), " overflow:hidden;;label:euiSuperDatePicker__rangeInput;"),
|
|
85
85
|
euiSuperDatePicker__prettyFormat: /*#__PURE__*/(0, _react.css)(_buttonStyles(euiThemeContext), " text-align:start;", isRefreshVariant && prettyFormatStyles, ";;label:euiSuperDatePicker__prettyFormat;"),
|
|
@@ -17,8 +17,9 @@ var _focus_trap = require("../focus_trap");
|
|
|
17
17
|
var _overlay_mask = require("../overlay_mask");
|
|
18
18
|
var _i18n = require("../i18n");
|
|
19
19
|
var _modal = require("./modal.styles");
|
|
20
|
+
var _accessibility = require("../accessibility");
|
|
20
21
|
var _react2 = require("@emotion/react");
|
|
21
|
-
var _excluded = ["className", "children", "initialFocus", "onClose", "maxWidth", "role", "style", "focusTrapProps"];
|
|
22
|
+
var _excluded = ["className", "children", "initialFocus", "onClose", "maxWidth", "role", "style", "focusTrapProps", "aria-describedby"];
|
|
22
23
|
/*
|
|
23
24
|
* Copyright Elasticsearch B.V. and/or licensed to Elasticsearch B.V. under one
|
|
24
25
|
* or more contributor license agreements. Licensed under the Elastic License
|
|
@@ -39,6 +40,7 @@ var EuiModal = exports.EuiModal = function EuiModal(_ref) {
|
|
|
39
40
|
role = _ref$role === void 0 ? 'dialog' : _ref$role,
|
|
40
41
|
style = _ref.style,
|
|
41
42
|
focusTrapProps = _ref.focusTrapProps,
|
|
43
|
+
_ariaDescribedBy = _ref['aria-describedby'],
|
|
42
44
|
rest = (0, _objectWithoutProperties2.default)(_ref, _excluded);
|
|
43
45
|
var onKeyDown = function onKeyDown(event) {
|
|
44
46
|
if (event.key === _services.keys.ESCAPE) {
|
|
@@ -60,6 +62,14 @@ var EuiModal = exports.EuiModal = function EuiModal(_ref) {
|
|
|
60
62
|
var styles = (0, _modal.euiModalStyles)(euiTheme);
|
|
61
63
|
var cssStyles = [styles.euiModal, maxWidth === true && styles.defaultMaxWidth];
|
|
62
64
|
var cssCloseIconStyles = [styles.euiModal__closeIcon];
|
|
65
|
+
var descriptionId = (0, _services.useGeneratedHtmlId)();
|
|
66
|
+
var ariaDescribedBy = (0, _classnames.default)(descriptionId, _ariaDescribedBy);
|
|
67
|
+
var screenReaderDescription = (0, _react2.jsx)(_accessibility.EuiScreenReaderOnly, null, (0, _react2.jsx)("p", {
|
|
68
|
+
id: descriptionId
|
|
69
|
+
}, (0, _react2.jsx)(_i18n.EuiI18n, {
|
|
70
|
+
token: "euiModal.screenReaderModalDialog",
|
|
71
|
+
default: "You are in a modal dialog. Press Escape or tap/click outside the dialog on the shadowed overlay to close."
|
|
72
|
+
})));
|
|
63
73
|
return (0, _react2.jsx)(_overlay_mask.EuiOverlayMask, null, (0, _react2.jsx)(_focus_trap.EuiFocusTrap, (0, _extends2.default)({}, focusTrapProps, {
|
|
64
74
|
initialFocus: initialFocus,
|
|
65
75
|
scrollLock: true,
|
|
@@ -71,8 +81,9 @@ var EuiModal = exports.EuiModal = function EuiModal(_ref) {
|
|
|
71
81
|
tabIndex: 0,
|
|
72
82
|
style: newStyle,
|
|
73
83
|
role: role,
|
|
74
|
-
"aria-modal": true
|
|
75
|
-
|
|
84
|
+
"aria-modal": true,
|
|
85
|
+
"aria-describedby": ariaDescribedBy
|
|
86
|
+
}, rest), children, screenReaderDescription, (0, _react2.jsx)(_i18n.EuiI18n, {
|
|
76
87
|
token: "euiModal.closeModal",
|
|
77
88
|
default: "Closes this modal window"
|
|
78
89
|
}, function (closeModal) {
|
|
@@ -84,5 +95,5 @@ var EuiModal = exports.EuiModal = function EuiModal(_ref) {
|
|
|
84
95
|
color: "text",
|
|
85
96
|
"aria-label": closeModal
|
|
86
97
|
});
|
|
87
|
-
})
|
|
98
|
+
}))));
|
|
88
99
|
};
|
|
@@ -5,7 +5,7 @@ var _typeof = require("@babel/runtime/helpers/typeof");
|
|
|
5
5
|
Object.defineProperty(exports, "__esModule", {
|
|
6
6
|
value: true
|
|
7
7
|
});
|
|
8
|
-
exports.POSITIONS = exports.EuiToolTip = void 0;
|
|
8
|
+
exports.POSITIONS = exports.EuiToolTip = exports.DEFAULT_TOOLTIP_OFFSET = void 0;
|
|
9
9
|
var _extends2 = _interopRequireDefault(require("@babel/runtime/helpers/extends"));
|
|
10
10
|
var _objectWithoutProperties2 = _interopRequireDefault(require("@babel/runtime/helpers/objectWithoutProperties"));
|
|
11
11
|
var _classCallCheck2 = _interopRequireDefault(require("@babel/runtime/helpers/classCallCheck"));
|
|
@@ -38,6 +38,7 @@ function _isNativeReflectConstruct() { try { var t = !Boolean.prototype.valueOf.
|
|
|
38
38
|
*/
|
|
39
39
|
var POSITIONS = exports.POSITIONS = ['top', 'right', 'bottom', 'left'];
|
|
40
40
|
var DISPLAYS = ['inlineBlock', 'block'];
|
|
41
|
+
var DEFAULT_TOOLTIP_OFFSET = exports.DEFAULT_TOOLTIP_OFFSET = 16;
|
|
41
42
|
var delayToMsMap = {
|
|
42
43
|
regular: 250,
|
|
43
44
|
long: 250 * 5
|
|
@@ -112,7 +113,9 @@ var EuiToolTip = exports.EuiToolTip = /*#__PURE__*/function (_Component) {
|
|
|
112
113
|
}
|
|
113
114
|
});
|
|
114
115
|
(0, _defineProperty2.default)(_this, "positionToolTip", function () {
|
|
116
|
+
var _this$props$offset;
|
|
115
117
|
var requestedPosition = _this.props.position;
|
|
118
|
+
var offset = (_this$props$offset = _this.props.offset) !== null && _this$props$offset !== void 0 ? _this$props$offset : DEFAULT_TOOLTIP_OFFSET;
|
|
116
119
|
if (!_this.anchor || !_this.popover) {
|
|
117
120
|
return;
|
|
118
121
|
}
|
|
@@ -120,8 +123,7 @@ var EuiToolTip = exports.EuiToolTip = /*#__PURE__*/function (_Component) {
|
|
|
120
123
|
anchor: _this.anchor,
|
|
121
124
|
popover: _this.popover,
|
|
122
125
|
position: requestedPosition,
|
|
123
|
-
offset:
|
|
124
|
-
// offset popover 16px from the anchor
|
|
126
|
+
offset: offset,
|
|
125
127
|
arrowConfig: {
|
|
126
128
|
arrowWidth: 12,
|
|
127
129
|
arrowBuffer: 4
|
|
@@ -4,7 +4,7 @@ var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefau
|
|
|
4
4
|
Object.defineProperty(exports, "__esModule", {
|
|
5
5
|
value: true
|
|
6
6
|
});
|
|
7
|
-
exports.wcagContrastMin = exports.makeHighContrastColor = exports.makeDisabledContrastColor = void 0;
|
|
7
|
+
exports.wcagContrastMin = exports.warnIfContrastBelowMin = exports.makeHighContrastColor = exports.makeDisabledContrastColor = exports.getColorContrast = void 0;
|
|
8
8
|
var _typeof2 = _interopRequireDefault(require("@babel/runtime/helpers/typeof"));
|
|
9
9
|
var _chromaJs = _interopRequireDefault(require("chroma-js"));
|
|
10
10
|
var _manipulation = require("./manipulation");
|
|
@@ -17,6 +17,9 @@ var _utils = require("../theme/utils");
|
|
|
17
17
|
* Side Public License, v 1.
|
|
18
18
|
*/
|
|
19
19
|
|
|
20
|
+
var getColorContrast = exports.getColorContrast = function getColorContrast(textColor, backgroundColor) {
|
|
21
|
+
return _chromaJs.default.contrast(textColor, backgroundColor);
|
|
22
|
+
};
|
|
20
23
|
var wcagContrastMin = exports.wcagContrastMin = 4.5; // WCAG AA minimum contrast ratio for normal (non-large) text
|
|
21
24
|
|
|
22
25
|
/**
|
|
@@ -75,4 +78,12 @@ var makeDisabledContrastColor = exports.makeDisabledContrastColor = function mak
|
|
|
75
78
|
return function (themeOrBackground) {
|
|
76
79
|
return makeHighContrastColor(color, ratio)(themeOrBackground);
|
|
77
80
|
};
|
|
81
|
+
};
|
|
82
|
+
var warnIfContrastBelowMin = exports.warnIfContrastBelowMin = function warnIfContrastBelowMin(textColor, backgroundColor) {
|
|
83
|
+
var min = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : wcagContrastMin;
|
|
84
|
+
var ratio = getColorContrast(textColor, backgroundColor);
|
|
85
|
+
if (ratio < min) {
|
|
86
|
+
// eslint-disable-next-line no-console
|
|
87
|
+
console.warn("Warning: ".concat(backgroundColor, " background with ").concat(textColor, " text has a low contrast of ").concat(ratio.toFixed(2), ". Should be above ").concat(min, "."));
|
|
88
|
+
}
|
|
78
89
|
};
|
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@elastic/eui",
|
|
3
3
|
"description": "Elastic UI Component Library",
|
|
4
|
-
"version": "106.
|
|
4
|
+
"version": "106.6.0-backport.0",
|
|
5
5
|
"license": "SEE LICENSE IN LICENSE.txt",
|
|
6
6
|
"main": "lib",
|
|
7
7
|
"module": "es",
|
|
@@ -107,7 +107,7 @@
|
|
|
107
107
|
"@cypress/webpack-dev-server": "^1.7.0",
|
|
108
108
|
"@elastic/charts": "^64.1.0",
|
|
109
109
|
"@elastic/datemath": "^5.0.3",
|
|
110
|
-
"@elastic/eui-theme-borealis": "3.
|
|
110
|
+
"@elastic/eui-theme-borealis": "3.4.0",
|
|
111
111
|
"@emotion/babel-preset-css-prop": "^11.11.0",
|
|
112
112
|
"@emotion/cache": "^11.11.0",
|
|
113
113
|
"@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": "3.
|
|
260
|
+
"@elastic/eui-theme-borealis": "3.4.0",
|
|
261
261
|
"@emotion/css": "11.x",
|
|
262
262
|
"@emotion/react": "11.x",
|
|
263
263
|
"@types/react": "^17.0 || ^18.0",
|
|
@@ -13,6 +13,7 @@ var _objectWithoutProperties2 = _interopRequireDefault(require("@babel/runtime/h
|
|
|
13
13
|
var _react = _interopRequireWildcard(require("react"));
|
|
14
14
|
var _propTypes = _interopRequireDefault(require("prop-types"));
|
|
15
15
|
var _classnames = _interopRequireDefault(require("classnames"));
|
|
16
|
+
var _contrast = require("../../services/color/contrast");
|
|
16
17
|
var _color = require("../../services/color");
|
|
17
18
|
var _services = require("../../services");
|
|
18
19
|
var _icon = require("../icon");
|
|
@@ -83,6 +84,7 @@ var EuiAvatar = exports.EuiAvatar = function EuiAvatar(_ref) {
|
|
|
83
84
|
checkValidColor(color);
|
|
84
85
|
var assignedColor = color || visColors[Math.floor(name.length % visColors.length)];
|
|
85
86
|
var textColor = _color.isColorDark.apply(void 0, (0, _toConsumableArray2.default)((0, _color.hexToRgb)(assignedColor))) ? '#FFFFFF' : '#000000';
|
|
87
|
+
(0, _contrast.warnIfContrastBelowMin)(textColor, assignedColor, _contrast.wcagContrastMin);
|
|
86
88
|
return {
|
|
87
89
|
backgroundColor: assignedColor,
|
|
88
90
|
color: textColor
|
|
@@ -18,6 +18,7 @@ var _href_validator = require("../../services/security/href_validator");
|
|
|
18
18
|
var _inner_text = require("../inner_text");
|
|
19
19
|
var _icon = require("../icon");
|
|
20
20
|
var _color_utils = require("./color_utils");
|
|
21
|
+
var _contrast = require("../../services/color/contrast");
|
|
21
22
|
var _badge = require("./badge.styles");
|
|
22
23
|
var _react2 = require("@emotion/react");
|
|
23
24
|
var _excluded = ["children", "color", "iconType", "iconSide", "className", "isDisabled", "onClick", "iconOnClick", "onClickAriaLabel", "iconOnClickAriaLabel", "closeButtonProps", "href", "rel", "target", "style"];
|
|
@@ -68,11 +69,8 @@ var EuiBadge = exports.EuiBadge = function EuiBadge(_ref) {
|
|
|
68
69
|
// Set dark or light text color based upon best contrast
|
|
69
70
|
var textColor = (0, _color_utils.getTextColor)(euiTheme, color);
|
|
70
71
|
|
|
71
|
-
//
|
|
72
|
-
|
|
73
|
-
if (contrastRatio < _services.wcagContrastMin) {
|
|
74
|
-
console.warn("Warning: ".concat(color, " badge has a low contrast of ").concat(contrastRatio.toFixed(2), ". Should be above ").concat(_services.wcagContrastMin, "."));
|
|
75
|
-
}
|
|
72
|
+
// Emit a warning if contrast is below WCAG threshold (centralized util)
|
|
73
|
+
(0, _contrast.warnIfContrastBelowMin)(textColor, color, _contrast.wcagContrastMin);
|
|
76
74
|
return _objectSpread({
|
|
77
75
|
'--euiBadgeBackgroundColor': color,
|
|
78
76
|
'--euiBadgeTextColor': textColor
|
|
@@ -15,6 +15,14 @@ function _EMOTION_STRINGIFIED_CSS_ERROR__() { return "You have tried to stringif
|
|
|
15
15
|
* Side Public License, v 1.
|
|
16
16
|
*/
|
|
17
17
|
var _ref = process.env.NODE_ENV === "production" ? {
|
|
18
|
+
name: "1jbvl30-euiBadge__iconButton",
|
|
19
|
+
styles: "font-size:0;&:disabled{cursor:not-allowed;}.euiBadge__icon{margin:0!important;};label:euiBadge__iconButton;"
|
|
20
|
+
} : {
|
|
21
|
+
name: "1jbvl30-euiBadge__iconButton",
|
|
22
|
+
styles: "font-size:0;&:disabled{cursor:not-allowed;}.euiBadge__icon{margin:0!important;};label:euiBadge__iconButton;",
|
|
23
|
+
toString: _EMOTION_STRINGIFIED_CSS_ERROR__
|
|
24
|
+
};
|
|
25
|
+
var _ref2 = process.env.NODE_ENV === "production" ? {
|
|
18
26
|
name: "1hw5vc4-clickable",
|
|
19
27
|
styles: "cursor:pointer;label:clickable;"
|
|
20
28
|
} : {
|
|
@@ -57,7 +65,7 @@ var euiBadgeStyles = exports.euiBadgeStyles = function euiBadgeStyles(euiThemeCo
|
|
|
57
65
|
// Text
|
|
58
66
|
text: {
|
|
59
67
|
euiBadge__text: /*#__PURE__*/(0, _react.css)((0, _global_styling.euiTextTruncate)(), " cursor:inherit;;label:euiBadge__text;"),
|
|
60
|
-
clickable:
|
|
68
|
+
clickable: _ref2
|
|
61
69
|
},
|
|
62
70
|
// Icon
|
|
63
71
|
icon: {
|
|
@@ -67,9 +75,7 @@ var euiBadgeStyles = exports.euiBadgeStyles = function euiBadgeStyles(euiThemeCo
|
|
|
67
75
|
},
|
|
68
76
|
// Clickable icons (iconOnClick)
|
|
69
77
|
iconButton: {
|
|
70
|
-
euiBadge__iconButton:
|
|
71
|
-
return x / 2;
|
|
72
|
-
}), ";}&:disabled{cursor:not-allowed;}.euiBadge__icon{margin:0!important;};label:euiBadge__iconButton;"),
|
|
78
|
+
euiBadge__iconButton: _ref,
|
|
73
79
|
right: /*#__PURE__*/(0, _react.css)((0, _global_styling.logicalCSS)('margin-left', euiTheme.size.xs), ";;label:right;"),
|
|
74
80
|
left: /*#__PURE__*/(0, _react.css)((0, _global_styling.logicalCSS)('margin-right', euiTheme.size.xs), ";;label:left;")
|
|
75
81
|
},
|
|
@@ -1129,6 +1129,10 @@ EuiBasicTable.propTypes = {
|
|
|
1129
1129
|
* hidden.
|
|
1130
1130
|
*/
|
|
1131
1131
|
onMouseOut: _propTypes.default.func,
|
|
1132
|
+
/**
|
|
1133
|
+
* Offset in pixels from the anchor. Defaults to 16.
|
|
1134
|
+
*/
|
|
1135
|
+
offset: _propTypes.default.number,
|
|
1132
1136
|
"aria-label": _propTypes.default.string,
|
|
1133
1137
|
"data-test-subj": _propTypes.default.string,
|
|
1134
1138
|
css: _propTypes.default.any,
|
|
@@ -1244,6 +1248,7 @@ EuiBasicTable.propTypes = {
|
|
|
1244
1248
|
repositionOnScroll: _propTypes.default.bool,
|
|
1245
1249
|
disableScreenReaderOutput: _propTypes.default.bool,
|
|
1246
1250
|
onMouseOut: _propTypes.default.func,
|
|
1251
|
+
offset: _propTypes.default.number,
|
|
1247
1252
|
"aria-label": _propTypes.default.string,
|
|
1248
1253
|
"data-test-subj": _propTypes.default.string,
|
|
1249
1254
|
css: _propTypes.default.any,
|
|
@@ -1385,6 +1390,7 @@ EuiBasicTable.propTypes = {
|
|
|
1385
1390
|
repositionOnScroll: _propTypes.default.bool,
|
|
1386
1391
|
disableScreenReaderOutput: _propTypes.default.bool,
|
|
1387
1392
|
onMouseOut: _propTypes.default.func,
|
|
1393
|
+
offset: _propTypes.default.number,
|
|
1388
1394
|
"aria-label": _propTypes.default.string,
|
|
1389
1395
|
"data-test-subj": _propTypes.default.string,
|
|
1390
1396
|
css: _propTypes.default.any,
|
|
@@ -631,6 +631,10 @@ EuiInMemoryTable.propTypes = {
|
|
|
631
631
|
* hidden.
|
|
632
632
|
*/
|
|
633
633
|
onMouseOut: _propTypes.default.func,
|
|
634
|
+
/**
|
|
635
|
+
* Offset in pixels from the anchor. Defaults to 16.
|
|
636
|
+
*/
|
|
637
|
+
offset: _propTypes.default.number,
|
|
634
638
|
"aria-label": _propTypes.default.string,
|
|
635
639
|
"data-test-subj": _propTypes.default.string,
|
|
636
640
|
css: _propTypes.default.any,
|
|
@@ -746,6 +750,7 @@ EuiInMemoryTable.propTypes = {
|
|
|
746
750
|
repositionOnScroll: _propTypes.default.bool,
|
|
747
751
|
disableScreenReaderOutput: _propTypes.default.bool,
|
|
748
752
|
onMouseOut: _propTypes.default.func,
|
|
753
|
+
offset: _propTypes.default.number,
|
|
749
754
|
"aria-label": _propTypes.default.string,
|
|
750
755
|
"data-test-subj": _propTypes.default.string,
|
|
751
756
|
css: _propTypes.default.any,
|
|
@@ -887,6 +892,7 @@ EuiInMemoryTable.propTypes = {
|
|
|
887
892
|
repositionOnScroll: _propTypes.default.bool,
|
|
888
893
|
disableScreenReaderOutput: _propTypes.default.bool,
|
|
889
894
|
onMouseOut: _propTypes.default.func,
|
|
895
|
+
offset: _propTypes.default.number,
|
|
890
896
|
"aria-label": _propTypes.default.string,
|
|
891
897
|
"data-test-subj": _propTypes.default.string,
|
|
892
898
|
css: _propTypes.default.any,
|
|
@@ -138,6 +138,10 @@ EuiColorPickerSwatch.propTypes = {
|
|
|
138
138
|
* hidden.
|
|
139
139
|
*/
|
|
140
140
|
onMouseOut: _propTypes.default.func,
|
|
141
|
+
/**
|
|
142
|
+
* Offset in pixels from the anchor. Defaults to 16.
|
|
143
|
+
*/
|
|
144
|
+
offset: _propTypes.default.number,
|
|
141
145
|
"aria-label": _propTypes.default.string,
|
|
142
146
|
"data-test-subj": _propTypes.default.string,
|
|
143
147
|
css: _propTypes.default.any,
|