@elastic/eui 101.1.0 → 101.2.0-classic.1
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/badge.styles.js +2 -2
- package/es/components/badge/color_utils.js +16 -6
- package/es/components/badge/notification_badge/badge_notification.styles.js +1 -1
- package/es/components/basic_table/basic_table.js +11 -0
- package/es/components/basic_table/in_memory_table.js +11 -0
- package/es/components/code/code.styles.js +4 -2
- package/es/components/code/code_syntax.styles.js +6 -3
- package/es/components/color_picker/color_picker_swatch.js +85 -3
- package/es/components/color_picker/color_picker_swatch.styles.js +11 -1
- package/es/components/header/header.styles.js +4 -1
- package/es/components/panel/panel.styles.js +1 -1
- package/es/components/provider/provider.js +2 -2
- package/es/components/table/table_header_cell.js +9 -0
- package/es/components/toast/toast.styles.js +3 -3
- package/es/components/tool_tip/icon_tip.js +9 -0
- package/es/components/tool_tip/tool_tip.js +18 -4
- package/es/components/tool_tip/tool_tip_anchor.js +1 -1
- package/es/global_styling/mixins/_button.js +3 -2
- package/es/services/color/vis_color_store.js +1 -1
- package/es/services/theme/context.js +2 -2
- package/eui.d.ts +366 -327
- package/lib/components/badge/badge.styles.js +2 -2
- package/lib/components/badge/color_utils.js +16 -6
- package/lib/components/badge/notification_badge/badge_notification.styles.js +1 -1
- package/lib/components/basic_table/basic_table.js +11 -0
- package/lib/components/basic_table/in_memory_table.js +11 -0
- package/lib/components/code/code.styles.js +3 -1
- package/lib/components/code/code_syntax.styles.js +6 -3
- package/lib/components/color_picker/color_picker_swatch.js +85 -3
- package/lib/components/color_picker/color_picker_swatch.styles.js +11 -3
- package/lib/components/header/header.styles.js +4 -1
- package/lib/components/icon/svgs/aggregate.svg +0 -0
- package/lib/components/icon/svgs/color.svg +0 -0
- package/lib/components/icon/svgs/continuityAbove.svg +0 -0
- package/lib/components/icon/svgs/continuityAboveBelow.svg +0 -0
- package/lib/components/icon/svgs/continuityBelow.svg +0 -0
- package/lib/components/icon/svgs/continuityWithin.svg +0 -0
- package/lib/components/icon/svgs/documentation.svg +0 -0
- package/lib/components/icon/svgs/eraser.svg +0 -0
- package/lib/components/icon/svgs/folder_check.svg +0 -0
- package/lib/components/icon/svgs/folder_closed.svg +0 -0
- package/lib/components/icon/svgs/folder_exclamation.svg +0 -0
- package/lib/components/icon/svgs/folder_open.svg +0 -0
- package/lib/components/icon/svgs/fullScreenExit.svg +0 -0
- package/lib/components/icon/svgs/function.svg +0 -0
- package/lib/components/icon/svgs/layers.svg +0 -0
- package/lib/components/icon/svgs/menu.svg +0 -0
- package/lib/components/icon/svgs/ml_data_visualizer.svg +0 -0
- package/lib/components/icon/svgs/pageSelect.svg +0 -0
- package/lib/components/icon/svgs/pagesSelect.svg +0 -0
- package/lib/components/icon/svgs/percent.svg +0 -0
- package/lib/components/icon/svgs/push.svg +0 -0
- package/lib/components/icon/svgs/quote.svg +0 -0
- package/lib/components/icon/svgs/reporter.svg +0 -0
- package/lib/components/icon/svgs/securitySignal.svg +0 -0
- package/lib/components/icon/svgs/securitySignalDetected.svg +0 -0
- package/lib/components/icon/svgs/securitySignalResolved.svg +0 -0
- package/lib/components/icon/svgs/timeline.svg +0 -0
- package/lib/components/icon/svgs/users.svg +0 -0
- package/lib/components/icon/svgs/wordWrap.svg +0 -0
- package/lib/components/icon/svgs/wordWrapDisabled.svg +0 -0
- package/lib/components/panel/panel.styles.js +1 -1
- package/lib/components/provider/provider.js +2 -2
- package/lib/components/table/table_header_cell.js +9 -0
- package/lib/components/toast/toast.styles.js +3 -3
- package/lib/components/tool_tip/icon_tip.js +9 -0
- package/lib/components/tool_tip/tool_tip.js +18 -4
- package/lib/components/tool_tip/tool_tip_anchor.js +1 -1
- package/lib/global_styling/mixins/_button.js +3 -2
- package/lib/services/color/vis_color_store.js +2 -2
- package/lib/services/theme/context.js +2 -2
- package/optimize/es/components/badge/badge.styles.js +2 -2
- package/optimize/es/components/badge/color_utils.js +16 -6
- package/optimize/es/components/badge/notification_badge/badge_notification.styles.js +1 -1
- package/optimize/es/components/code/code.styles.js +4 -2
- package/optimize/es/components/code/code_syntax.styles.js +6 -3
- package/optimize/es/components/color_picker/color_picker_swatch.js +18 -2
- package/optimize/es/components/color_picker/color_picker_swatch.styles.js +11 -1
- package/optimize/es/components/header/header.styles.js +4 -1
- package/optimize/es/components/panel/panel.styles.js +1 -1
- package/optimize/es/components/provider/provider.js +2 -2
- package/optimize/es/components/toast/toast.styles.js +3 -3
- package/optimize/es/components/tool_tip/tool_tip.js +9 -4
- package/optimize/es/components/tool_tip/tool_tip_anchor.js +1 -1
- package/optimize/es/global_styling/mixins/_button.js +3 -2
- package/optimize/es/services/color/vis_color_store.js +1 -1
- package/optimize/es/services/theme/context.js +2 -2
- package/optimize/lib/components/badge/badge.styles.js +2 -2
- package/optimize/lib/components/badge/color_utils.js +16 -6
- package/optimize/lib/components/badge/notification_badge/badge_notification.styles.js +1 -1
- package/optimize/lib/components/code/code.styles.js +3 -1
- package/optimize/lib/components/code/code_syntax.styles.js +6 -3
- package/optimize/lib/components/color_picker/color_picker_swatch.js +18 -2
- package/optimize/lib/components/color_picker/color_picker_swatch.styles.js +11 -3
- package/optimize/lib/components/header/header.styles.js +4 -1
- package/optimize/lib/components/icon/svgs/aggregate.svg +0 -0
- package/optimize/lib/components/icon/svgs/color.svg +0 -0
- package/optimize/lib/components/icon/svgs/continuityAbove.svg +0 -0
- package/optimize/lib/components/icon/svgs/continuityAboveBelow.svg +0 -0
- package/optimize/lib/components/icon/svgs/continuityBelow.svg +0 -0
- package/optimize/lib/components/icon/svgs/continuityWithin.svg +0 -0
- package/optimize/lib/components/icon/svgs/documentation.svg +0 -0
- package/optimize/lib/components/icon/svgs/eraser.svg +0 -0
- package/optimize/lib/components/icon/svgs/folder_check.svg +0 -0
- package/optimize/lib/components/icon/svgs/folder_closed.svg +0 -0
- package/optimize/lib/components/icon/svgs/folder_exclamation.svg +0 -0
- package/optimize/lib/components/icon/svgs/folder_open.svg +0 -0
- package/optimize/lib/components/icon/svgs/fullScreenExit.svg +0 -0
- package/optimize/lib/components/icon/svgs/function.svg +0 -0
- package/optimize/lib/components/icon/svgs/layers.svg +0 -0
- package/optimize/lib/components/icon/svgs/menu.svg +0 -0
- package/optimize/lib/components/icon/svgs/ml_data_visualizer.svg +0 -0
- package/optimize/lib/components/icon/svgs/pageSelect.svg +0 -0
- package/optimize/lib/components/icon/svgs/pagesSelect.svg +0 -0
- package/optimize/lib/components/icon/svgs/percent.svg +0 -0
- package/optimize/lib/components/icon/svgs/push.svg +0 -0
- package/optimize/lib/components/icon/svgs/quote.svg +0 -0
- package/optimize/lib/components/icon/svgs/reporter.svg +0 -0
- package/optimize/lib/components/icon/svgs/securitySignal.svg +0 -0
- package/optimize/lib/components/icon/svgs/securitySignalDetected.svg +0 -0
- package/optimize/lib/components/icon/svgs/securitySignalResolved.svg +0 -0
- package/optimize/lib/components/icon/svgs/timeline.svg +0 -0
- package/optimize/lib/components/icon/svgs/users.svg +0 -0
- package/optimize/lib/components/icon/svgs/wordWrap.svg +0 -0
- package/optimize/lib/components/icon/svgs/wordWrapDisabled.svg +0 -0
- package/optimize/lib/components/panel/panel.styles.js +1 -1
- package/optimize/lib/components/provider/provider.js +2 -2
- package/optimize/lib/components/toast/toast.styles.js +3 -3
- package/optimize/lib/components/tool_tip/tool_tip.js +9 -4
- package/optimize/lib/components/tool_tip/tool_tip_anchor.js +1 -1
- package/optimize/lib/global_styling/mixins/_button.js +3 -2
- package/optimize/lib/services/color/vis_color_store.js +2 -2
- package/optimize/lib/services/theme/context.js +2 -2
- package/package.json +3 -3
- package/test-env/components/badge/badge.styles.js +2 -2
- package/test-env/components/badge/color_utils.js +16 -6
- package/test-env/components/badge/notification_badge/badge_notification.styles.js +1 -1
- package/test-env/components/basic_table/basic_table.js +11 -0
- package/test-env/components/basic_table/in_memory_table.js +11 -0
- package/test-env/components/code/code.styles.js +3 -1
- package/test-env/components/code/code_syntax.styles.js +6 -3
- package/test-env/components/color_picker/color_picker_swatch.js +85 -3
- package/test-env/components/color_picker/color_picker_swatch.styles.js +11 -3
- package/test-env/components/header/header.styles.js +4 -1
- package/test-env/components/panel/panel.styles.js +1 -1
- package/test-env/components/provider/provider.js +2 -2
- package/test-env/components/table/table_header_cell.js +9 -0
- package/test-env/components/toast/toast.styles.js +3 -3
- package/test-env/components/tool_tip/icon_tip.js +9 -0
- package/test-env/components/tool_tip/tool_tip.js +18 -4
- package/test-env/components/tool_tip/tool_tip_anchor.js +1 -1
- package/test-env/global_styling/mixins/_button.js +3 -2
- package/test-env/services/color/vis_color_store.js +2 -2
- package/test-env/services/theme/context.js +2 -2
- package/CHANGELOG.md +0 -5
|
@@ -16,8 +16,9 @@ var _services = require("../../services");
|
|
|
16
16
|
var _i18n = require("../i18n");
|
|
17
17
|
var _utils = require("./utils");
|
|
18
18
|
var _color_picker_swatch = require("./color_picker_swatch.styles");
|
|
19
|
+
var _tool_tip = require("../tool_tip");
|
|
19
20
|
var _react2 = require("@emotion/react");
|
|
20
|
-
var _excluded = ["className", "color", "style"];
|
|
21
|
+
var _excluded = ["className", "color", "style", "toolTipProps", "showToolTip"];
|
|
21
22
|
/*
|
|
22
23
|
* Copyright Elasticsearch B.V. and/or licensed to Elasticsearch B.V. under one
|
|
23
24
|
* or more contributor license agreements. Licensed under the Elastic License
|
|
@@ -30,9 +31,13 @@ function _interopRequireWildcard(e, r) { if (!r && e && e.__esModule) return e;
|
|
|
30
31
|
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; }
|
|
31
32
|
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) { (0, _defineProperty2.default)(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; }
|
|
32
33
|
var EuiColorPickerSwatch = exports.EuiColorPickerSwatch = /*#__PURE__*/(0, _react.forwardRef)(function (_ref, ref) {
|
|
34
|
+
var _toolTipProps$anchorP;
|
|
33
35
|
var className = _ref.className,
|
|
34
36
|
color = _ref.color,
|
|
35
37
|
style = _ref.style,
|
|
38
|
+
toolTipProps = _ref.toolTipProps,
|
|
39
|
+
_ref$showToolTip = _ref.showToolTip,
|
|
40
|
+
showToolTip = _ref$showToolTip === void 0 ? true : _ref$showToolTip,
|
|
36
41
|
rest = (0, _objectWithoutProperties2.default)(_ref, _excluded);
|
|
37
42
|
var classes = (0, _classnames.default)('euiColorPickerSwatch', className);
|
|
38
43
|
var styles = (0, _services.useEuiMemoizedStyles)(_color_picker_swatch.euiColorPickerSwatchStyles);
|
|
@@ -45,7 +50,7 @@ var EuiColorPickerSwatch = exports.EuiColorPickerSwatch = /*#__PURE__*/(0, _reac
|
|
|
45
50
|
var ariaLabel = (0, _i18n.useEuiI18n)('euiColorPickerSwatch.ariaLabel', 'Select {color} as the color', {
|
|
46
51
|
color: color
|
|
47
52
|
});
|
|
48
|
-
|
|
53
|
+
var element = (0, _react2.jsx)("button", (0, _extends2.default)({
|
|
49
54
|
type: "button",
|
|
50
55
|
css: styles.euiColorPickerSwatch,
|
|
51
56
|
className: classes,
|
|
@@ -55,12 +60,89 @@ var EuiColorPickerSwatch = exports.EuiColorPickerSwatch = /*#__PURE__*/(0, _reac
|
|
|
55
60
|
background: background
|
|
56
61
|
}, style)
|
|
57
62
|
}, rest));
|
|
63
|
+
return showToolTip ? (0, _react2.jsx)(_tool_tip.EuiToolTip, (0, _extends2.default)({
|
|
64
|
+
content: color
|
|
65
|
+
}, toolTipProps, {
|
|
66
|
+
anchorProps: _objectSpread(_objectSpread({}, toolTipProps === null || toolTipProps === void 0 ? void 0 : toolTipProps.anchorProps), {}, {
|
|
67
|
+
css: [toolTipProps === null || toolTipProps === void 0 || (_toolTipProps$anchorP = toolTipProps.anchorProps) === null || _toolTipProps$anchorP === void 0 ? void 0 : _toolTipProps$anchorP.css, styles.tooltip]
|
|
68
|
+
})
|
|
69
|
+
// since the button already has a descriptive `ariaLabel` we can disable
|
|
70
|
+
// the tooltip content from being read additionally by screen readers
|
|
71
|
+
,
|
|
72
|
+
disableScreenReaderOutput: true
|
|
73
|
+
}), element) : element;
|
|
58
74
|
});
|
|
59
75
|
EuiColorPickerSwatch.propTypes = {
|
|
60
76
|
className: _propTypes.default.string,
|
|
61
77
|
"aria-label": _propTypes.default.string,
|
|
62
78
|
"data-test-subj": _propTypes.default.string,
|
|
63
79
|
css: _propTypes.default.any,
|
|
64
|
-
color: _propTypes.default.string
|
|
80
|
+
color: _propTypes.default.string,
|
|
81
|
+
/**
|
|
82
|
+
* renders a tooltip with the color value to provide a visual text alternative
|
|
83
|
+
* @default true
|
|
84
|
+
*/
|
|
85
|
+
showToolTip: _propTypes.default.bool,
|
|
86
|
+
/** Additional props for the EuiToolip when `showToolTip={true}` */toolTipProps: _propTypes.default.shape({
|
|
87
|
+
/**
|
|
88
|
+
* Passes onto the span wrapping the trigger.
|
|
89
|
+
*/
|
|
90
|
+
anchorClassName: _propTypes.default.string,
|
|
91
|
+
/**
|
|
92
|
+
* Passes onto the span wrapping the trigger.
|
|
93
|
+
*/
|
|
94
|
+
anchorProps: _propTypes.default.shape({
|
|
95
|
+
className: _propTypes.default.string,
|
|
96
|
+
"aria-label": _propTypes.default.string,
|
|
97
|
+
"data-test-subj": _propTypes.default.string,
|
|
98
|
+
css: _propTypes.default.any
|
|
99
|
+
}),
|
|
100
|
+
/**
|
|
101
|
+
* Passes onto the tooltip itself, not the trigger.
|
|
102
|
+
*/
|
|
103
|
+
className: _propTypes.default.string,
|
|
104
|
+
/**
|
|
105
|
+
* The main content of your tooltip.
|
|
106
|
+
*/
|
|
107
|
+
content: _propTypes.default.node,
|
|
108
|
+
/**
|
|
109
|
+
* Common display alternatives for the anchor wrapper
|
|
110
|
+
*/
|
|
111
|
+
display: _propTypes.default.any,
|
|
112
|
+
/**
|
|
113
|
+
* An optional title for your tooltip.
|
|
114
|
+
*/
|
|
115
|
+
title: _propTypes.default.node,
|
|
116
|
+
/**
|
|
117
|
+
* Unless you provide one, this will be randomly generated.
|
|
118
|
+
*/
|
|
119
|
+
id: _propTypes.default.string,
|
|
120
|
+
/**
|
|
121
|
+
* When `true`, the tooltip's position is re-calculated when the user
|
|
122
|
+
* scrolls. This supports having fixed-position tooltip anchors.
|
|
123
|
+
*
|
|
124
|
+
* When nesting an `EuiTooltip` in a scrollable container, `repositionOnScroll` should be `true`
|
|
125
|
+
*/
|
|
126
|
+
repositionOnScroll: _propTypes.default.bool,
|
|
127
|
+
/**
|
|
128
|
+
* Disables the tooltip content being read by screen readers when focusing the trigger element.
|
|
129
|
+
* Do not use when the trigger `aria-label` and tooltip `content` can be rephrased to be standalone
|
|
130
|
+
* information (action & additional information).
|
|
131
|
+
* Enable this prop only when the trigger has a descriptive label that either duplicates or includes
|
|
132
|
+
* the tooltip content and would result in repetitive output.
|
|
133
|
+
* @default false
|
|
134
|
+
*/
|
|
135
|
+
disableScreenReaderOutput: _propTypes.default.bool,
|
|
136
|
+
/**
|
|
137
|
+
* If supplied, called when mouse movement causes the tool tip to be
|
|
138
|
+
* hidden.
|
|
139
|
+
*/
|
|
140
|
+
onMouseOut: _propTypes.default.func,
|
|
141
|
+
"aria-label": _propTypes.default.string,
|
|
142
|
+
"data-test-subj": _propTypes.default.string,
|
|
143
|
+
css: _propTypes.default.any,
|
|
144
|
+
delay: _propTypes.default.any,
|
|
145
|
+
position: _propTypes.default.any
|
|
146
|
+
})
|
|
65
147
|
};
|
|
66
148
|
EuiColorPickerSwatch.displayName = 'EuiColorPickerSwatch';
|
|
@@ -8,14 +8,21 @@ var _react = require("@emotion/react");
|
|
|
8
8
|
var _services = require("../../services");
|
|
9
9
|
var _global_styling = require("../../global_styling");
|
|
10
10
|
var _high_contrast = require("../../global_styling/functions/high_contrast");
|
|
11
|
-
/*
|
|
11
|
+
function _EMOTION_STRINGIFIED_CSS_ERROR__() { return "You have tried to stringify object returned from `css` function. It isn't supposed to be used directly (e.g. as value of the `className` prop), but rather handed to emotion so it can handle it (e.g. as value of `css` prop)."; } /*
|
|
12
12
|
* Copyright Elasticsearch B.V. and/or licensed to Elasticsearch B.V. under one
|
|
13
13
|
* or more contributor license agreements. Licensed under the Elastic License
|
|
14
14
|
* 2.0 and the Server Side Public License, v 1; you may not use this file except
|
|
15
15
|
* in compliance with, at your election, the Elastic License 2.0 or the Server
|
|
16
16
|
* Side Public License, v 1.
|
|
17
17
|
*/
|
|
18
|
-
|
|
18
|
+
var _ref = process.env.NODE_ENV === "production" ? {
|
|
19
|
+
name: "164u3xw-tooltip",
|
|
20
|
+
styles: "display:inline-flex;label:tooltip;"
|
|
21
|
+
} : {
|
|
22
|
+
name: "164u3xw-tooltip",
|
|
23
|
+
styles: "display:inline-flex;label:tooltip;",
|
|
24
|
+
toString: _EMOTION_STRINGIFIED_CSS_ERROR__
|
|
25
|
+
};
|
|
19
26
|
var euiColorPickerSwatchStyles = exports.euiColorPickerSwatchStyles = function euiColorPickerSwatchStyles(euiThemeContext) {
|
|
20
27
|
var euiTheme = euiThemeContext.euiTheme;
|
|
21
28
|
return {
|
|
@@ -25,6 +32,7 @@ var euiColorPickerSwatchStyles = exports.euiColorPickerSwatchStyles = function e
|
|
|
25
32
|
none: "\n border: ".concat(euiTheme.border.width.thin, " solid\n ").concat(euiTheme.colors.borderBaseFormsColorSwatch, ";\n box-shadow: inset 0 0 0 ").concat(euiTheme.border.width.thin, "\n ").concat((0, _services.transparentize)(euiTheme.colors.emptyShade, 0.05), ";\n "),
|
|
26
33
|
preferred: "border: ".concat(euiTheme.border.thin, ";"),
|
|
27
34
|
forced: (0, _high_contrast.preventForcedColors)(euiThemeContext)
|
|
28
|
-
}), " cursor:pointer;&:disabled{cursor:default;}&:focus{", (0, _global_styling.euiOutline)(euiThemeContext, 'center'), ";};label:euiColorPickerSwatch;")
|
|
35
|
+
}), " cursor:pointer;&:disabled{cursor:default;}&:focus{", (0, _global_styling.euiOutline)(euiThemeContext, 'center'), ";};label:euiColorPickerSwatch;"),
|
|
36
|
+
tooltip: _ref
|
|
29
37
|
};
|
|
30
38
|
};
|
|
@@ -64,5 +64,8 @@ var euiHeaderDarkStyles = function euiHeaderDarkStyles(euiThemeContext) {
|
|
|
64
64
|
borderColor: euiTheme.components.headerDarkSearchBorderColor,
|
|
65
65
|
placeholderColor: (0, _services.makeHighContrastColor)(controlPlaceholderText, 8)(backgroundColor)
|
|
66
66
|
};
|
|
67
|
-
return "\n background-color: ".concat(backgroundColor, ";\n\n .euiHeaderLogo__text,\n .euiHeaderLink,\n .euiHeaderSectionItemButton {\n color: ").concat(euiTheme.colors.ghost, ";\n }\n\n .euiHeaderLink-isActive {\n color: ").concat((0, _services.makeHighContrastColor)(euiTheme.colors.primary)(backgroundColor), ";\n }\n\n .euiHeaderLogo,\n .euiHeaderLink,\n .euiHeaderSectionItemButton {\n &:focus {\n background-color: ").concat(euiTheme.components.headerDarkSectionItemBackgroundFocus, ";\n }\n }\n\n .euiHeaderSectionItemButton__notification--badge {\n box-shadow: 0 0 0 ").concat(euiTheme.border.width.thin, " ").concat(backgroundColor, ";\n }\n\n .euiHeaderSectionItemButton__notification--dot {\n stroke: ").concat(backgroundColor, ";\n }\n\n .euiSelectableTemplateSitewide .euiFormControlLayout {\n background-color: transparent;\n\n input {\n box-shadow: inset 0 0 0 ").concat(euiTheme.border.width.thin, " ").concat(selectableSitewide.borderColor, ";\n }\n\n &--group {\n border-color: ").concat(
|
|
67
|
+
return "\n background-color: ".concat(backgroundColor, ";\n\n .euiHeaderLogo__text,\n .euiHeaderLink,\n .euiHeaderSectionItemButton {\n color: ").concat(euiTheme.colors.ghost, ";\n }\n\n .euiHeaderLink-isActive {\n color: ").concat((0, _services.makeHighContrastColor)(euiTheme.colors.primary)(backgroundColor), ";\n }\n\n .euiHeaderLogo,\n .euiHeaderLink,\n .euiHeaderSectionItemButton {\n &:focus {\n background-color: ").concat(euiTheme.components.headerDarkSectionItemBackgroundFocus, ";\n }\n }\n\n .euiHeaderSectionItemButton__notification--badge {\n box-shadow: 0 0 0 ").concat(euiTheme.border.width.thin, " ").concat(backgroundColor, ";\n }\n\n .euiHeaderSectionItemButton__notification--dot {\n stroke: ").concat(backgroundColor, ";\n }\n\n .euiSelectableTemplateSitewide .euiFormControlLayout {\n background-color: transparent;\n\n input {\n box-shadow: inset 0 0 0 ").concat(euiTheme.border.width.thin, " ").concat(selectableSitewide.borderColor, ";\n }\n\n &--group {\n border-color: ").concat(
|
|
68
|
+
// the header is in a faux dark mode, we can't rely on color
|
|
69
|
+
// switch tokens as they'd be in the wrong color mode
|
|
70
|
+
highContrastMode ? euiTheme.colors.plainLight : euiTheme.components.headerDarkSearchBorderColor, ";\n\n input {\n box-shadow: none;\n }\n }\n\n &__append {\n border-color: ").concat(highContrastMode ? euiTheme.colors.plainLight : '', "\n }\n\n &:not(:focus-within) {\n /* Increase contrast of filled text to be more than placeholder text */\n color: ").concat(selectableSitewide.color, ";\n\n input {\n /* Increase contrast of placeholder text */\n &::placeholder {\n color: ").concat(selectableSitewide.placeholderColor, ";\n }\n\n /* Inherit color from form control layout */\n color: inherit;\n background-color: transparent;\n }\n\n .euiFormControlLayout__append,\n .euiFormControlLayout__prepend {\n background-color: transparent;\n }\n\n .euiFormLabel {\n color: inherit;\n }\n }\n }\n ");
|
|
68
71
|
};
|
|
@@ -27,7 +27,7 @@ var euiPanelBorderStyles = exports.euiPanelBorderStyles = function euiPanelBorde
|
|
|
27
27
|
euiTheme.colors.borderBaseFloating is enough then */
|
|
28
28
|
var hasVisibleBorder = hasFloatingBorder && colorMode === 'DARK';
|
|
29
29
|
return (0, _high_contrast.highContrastModeStyles)(euiThemeContext, {
|
|
30
|
-
none: "\n /* Using a pseudo element for the border instead of floating border only \n because the transparent border might otherwise be visible with arbitrary \n full-width/height content in light mode. */\n &::
|
|
30
|
+
none: "\n /* Using a pseudo element for the border instead of floating border only \n because the transparent border might otherwise be visible with arbitrary \n full-width/height content in light mode. */\n &::after {\n content: '';\n position: absolute;\n /* ensure to keep on top of flush content */\n z-index: 0;\n inset: 0;\n border: ".concat(euiTheme.border.width.thin, " solid\n ").concat((borderColor !== null && borderColor !== void 0 ? borderColor : hasVisibleBorder) ? euiTheme.border.color : euiTheme.colors.borderBaseFloating, ";\n border-radius: inherit;\n pointer-events: none;\n }\n "),
|
|
31
31
|
preferred: "\n border: ".concat(euiTheme.border.thin, ";\n ")
|
|
32
32
|
});
|
|
33
33
|
};
|
|
@@ -6,7 +6,7 @@ Object.defineProperty(exports, "__esModule", {
|
|
|
6
6
|
});
|
|
7
7
|
exports.EuiProvider = void 0;
|
|
8
8
|
var _react = _interopRequireDefault(require("react"));
|
|
9
|
-
var
|
|
9
|
+
var _themes = require("../../themes");
|
|
10
10
|
var _services = require("../../services");
|
|
11
11
|
var _warning = require("../../services/theme/warning");
|
|
12
12
|
var _css = require("../../services/emotion/css");
|
|
@@ -33,7 +33,7 @@ var EuiProvider = exports.EuiProvider = function EuiProvider(_ref) {
|
|
|
33
33
|
var _ref$cache = _ref.cache,
|
|
34
34
|
cache = _ref$cache === void 0 ? _css.cache : _ref$cache,
|
|
35
35
|
_ref$theme = _ref.theme,
|
|
36
|
-
theme = _ref$theme === void 0 ?
|
|
36
|
+
theme = _ref$theme === void 0 ? _themes.EuiThemeAmsterdam : _ref$theme,
|
|
37
37
|
_ref$globalStyles = _ref.globalStyles,
|
|
38
38
|
Globals = _ref$globalStyles === void 0 ? _global_styles.EuiGlobalStyles : _ref$globalStyles,
|
|
39
39
|
_ref$utilityClasses = _ref.utilityClasses,
|
|
@@ -198,6 +198,15 @@ EuiTableHeaderCell.propTypes = {
|
|
|
198
198
|
* When nesting an `EuiTooltip` in a scrollable container, `repositionOnScroll` should be `true`
|
|
199
199
|
*/
|
|
200
200
|
repositionOnScroll: _propTypes.default.bool,
|
|
201
|
+
/**
|
|
202
|
+
* Disables the tooltip content being read by screen readers when focusing the trigger element.
|
|
203
|
+
* Do not use when the trigger `aria-label` and tooltip `content` can be rephrased to be standalone
|
|
204
|
+
* information (action & additional information).
|
|
205
|
+
* Enable this prop only when the trigger has a descriptive label that either duplicates or includes
|
|
206
|
+
* the tooltip content and would result in repetitive output.
|
|
207
|
+
* @default false
|
|
208
|
+
*/
|
|
209
|
+
disableScreenReaderOutput: _propTypes.default.bool,
|
|
201
210
|
/**
|
|
202
211
|
* If supplied, called when mouse movement causes the tool tip to be
|
|
203
212
|
* hidden.
|
|
@@ -22,7 +22,7 @@ var euiToastStyles = exports.euiToastStyles = function euiToastStyles(euiThemeCo
|
|
|
22
22
|
var euiTheme = euiThemeContext.euiTheme,
|
|
23
23
|
highContrastMode = euiThemeContext.highContrastMode;
|
|
24
24
|
var highlightStyles = function highlightStyles(color, width) {
|
|
25
|
-
return "\n &:
|
|
25
|
+
return "\n &:before {\n content: '';\n position: absolute;\n /* ensure highlight border is on top of panel border */\n z-index: 1;\n inset: 0;\n border-radius: inherit;\n ".concat((0, _global_styling.logicalCSS)('border-top', "".concat(width, " solid ").concat(color)), "\n pointer-events: none;\n }\n ");
|
|
26
26
|
};
|
|
27
27
|
return {
|
|
28
28
|
// Base
|
|
@@ -42,11 +42,11 @@ var euiToastStyles = exports.euiToastStyles = function euiToastStyles(euiThemeCo
|
|
|
42
42
|
}) : euiTheme.border.width.thick;
|
|
43
43
|
return (0, _high_contrast.highContrastModeStyles)(euiThemeContext, {
|
|
44
44
|
none: highlightStyles(color, borderWidth),
|
|
45
|
-
preferred: "\n ".concat(highlightStyles(color, borderWidth), "\n \n &::
|
|
45
|
+
preferred: "\n ".concat(highlightStyles(color, borderWidth), "\n \n &::before {\n ").concat((0, _global_styling.logicalCSS)('width', "calc(100% + ".concat((0, _euiThemeCommon.mathWithUnits)(euiTheme.border.width.thin, function (x) {
|
|
46
46
|
return x * 2;
|
|
47
47
|
}), ")")), "\n ").concat((0, _global_styling.logicalCSS)('margin-top', "-".concat(euiTheme.border.width.thin)), "\n ").concat((0, _global_styling.logicalCSS)('margin-left', "-".concat(euiTheme.border.width.thin)), "\n }\n "),
|
|
48
48
|
// Windows high contrast mode ignores/overrides border colors, which have semantic meaning here. To get around this, we'll use a pseudo element that ignores forced colors
|
|
49
|
-
forced: "\n overflow: hidden;\n\n &::
|
|
49
|
+
forced: "\n overflow: hidden;\n\n &::before {\n content: '';\n position: absolute;\n ".concat((0, _global_styling.logicalCSS)('top', 0), "\n ").concat((0, _global_styling.logicalCSS)('horizontal', 0), "\n ").concat((0, _global_styling.logicalCSS)('height', borderWidth), "\n background-color: ").concat(color, ";\n ").concat((0, _high_contrast.preventForcedColors)(euiThemeContext), "\n pointer-events: none;\n }\n ")
|
|
50
50
|
});
|
|
51
51
|
},
|
|
52
52
|
get primary() {
|
|
@@ -86,6 +86,15 @@ EuiIconTip.propTypes = {
|
|
|
86
86
|
* When nesting an `EuiTooltip` in a scrollable container, `repositionOnScroll` should be `true`
|
|
87
87
|
*/
|
|
88
88
|
repositionOnScroll: _propTypes.default.bool,
|
|
89
|
+
/**
|
|
90
|
+
* Disables the tooltip content being read by screen readers when focusing the trigger element.
|
|
91
|
+
* Do not use when the trigger `aria-label` and tooltip `content` can be rephrased to be standalone
|
|
92
|
+
* information (action & additional information).
|
|
93
|
+
* Enable this prop only when the trigger has a descriptive label that either duplicates or includes
|
|
94
|
+
* the tooltip content and would result in repetitive output.
|
|
95
|
+
* @default false
|
|
96
|
+
*/
|
|
97
|
+
disableScreenReaderOutput: _propTypes.default.bool,
|
|
89
98
|
/**
|
|
90
99
|
* If supplied, called when mouse movement causes the tool tip to be
|
|
91
100
|
* hidden.
|
|
@@ -26,7 +26,7 @@ var _tool_tip_anchor = require("./tool_tip_anchor");
|
|
|
26
26
|
var _tool_tip_arrow = require("./tool_tip_arrow");
|
|
27
27
|
var _tool_tip_manager = require("./tool_tip_manager");
|
|
28
28
|
var _react3 = require("@emotion/react");
|
|
29
|
-
var _excluded = ["children", "className", "anchorClassName", "anchorProps", "content", "title", "delay", "display", "repositionOnScroll"];
|
|
29
|
+
var _excluded = ["children", "className", "anchorClassName", "anchorProps", "content", "title", "delay", "display", "repositionOnScroll", "disableScreenReaderOutput"];
|
|
30
30
|
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); }
|
|
31
31
|
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; }
|
|
32
32
|
function _callSuper(t, o, e) { return o = (0, _getPrototypeOf2.default)(o), (0, _possibleConstructorReturn2.default)(t, _isNativeReflectConstruct() ? Reflect.construct(o, e || [], (0, _getPrototypeOf2.default)(t).constructor) : o.apply(t, e)); }
|
|
@@ -246,6 +246,8 @@ var EuiToolTip = exports.EuiToolTip = /*#__PURE__*/function (_Component) {
|
|
|
246
246
|
delay = _this$props.delay,
|
|
247
247
|
display = _this$props.display,
|
|
248
248
|
repositionOnScroll = _this$props.repositionOnScroll,
|
|
249
|
+
_this$props$disableSc = _this$props.disableScreenReaderOutput,
|
|
250
|
+
disableScreenReaderOutput = _this$props$disableSc === void 0 ? false : _this$props$disableSc,
|
|
249
251
|
rest = (0, _objectWithoutProperties2.default)(_this$props, _excluded);
|
|
250
252
|
var _this$state = this.state,
|
|
251
253
|
arrowStyles = _this$state.arrowStyles,
|
|
@@ -261,8 +263,10 @@ var EuiToolTip = exports.EuiToolTip = /*#__PURE__*/function (_Component) {
|
|
|
261
263
|
onFocus: this.onFocus,
|
|
262
264
|
onKeyDown: this.onEscapeKey,
|
|
263
265
|
onMouseOver: this.showToolTip,
|
|
264
|
-
onMouseOut: this.onMouseOut
|
|
265
|
-
id
|
|
266
|
+
onMouseOut: this.onMouseOut
|
|
267
|
+
// `id` defines if the trigger and tooltip are automatically linked via `aria-describedby`.
|
|
268
|
+
,
|
|
269
|
+
id: !disableScreenReaderOutput ? id : undefined,
|
|
266
270
|
className: anchorClasses,
|
|
267
271
|
display: display,
|
|
268
272
|
isVisible: visible
|
|
@@ -292,7 +296,8 @@ var EuiToolTip = exports.EuiToolTip = /*#__PURE__*/function (_Component) {
|
|
|
292
296
|
(0, _defineProperty2.default)(EuiToolTip, "defaultProps", {
|
|
293
297
|
position: 'top',
|
|
294
298
|
delay: 'regular',
|
|
295
|
-
display: 'inlineBlock'
|
|
299
|
+
display: 'inlineBlock',
|
|
300
|
+
disableScreenReaderOutput: false
|
|
296
301
|
});
|
|
297
302
|
EuiToolTip.propTypes = {
|
|
298
303
|
/**
|
|
@@ -347,6 +352,15 @@ EuiToolTip.propTypes = {
|
|
|
347
352
|
* When nesting an `EuiTooltip` in a scrollable container, `repositionOnScroll` should be `true`
|
|
348
353
|
*/
|
|
349
354
|
repositionOnScroll: _propTypes.default.bool,
|
|
355
|
+
/**
|
|
356
|
+
* Disables the tooltip content being read by screen readers when focusing the trigger element.
|
|
357
|
+
* Do not use when the trigger `aria-label` and tooltip `content` can be rephrased to be standalone
|
|
358
|
+
* information (action & additional information).
|
|
359
|
+
* Enable this prop only when the trigger has a descriptive label that either duplicates or includes
|
|
360
|
+
* the tooltip content and would result in repetitive output.
|
|
361
|
+
* @default false
|
|
362
|
+
*/
|
|
363
|
+
disableScreenReaderOutput: _propTypes.default.bool,
|
|
350
364
|
/**
|
|
351
365
|
* If supplied, called when mouse movement causes the tool tip to be
|
|
352
366
|
* hidden.
|
|
@@ -55,7 +55,7 @@ var EuiToolTipAnchor = exports.EuiToolTipAnchor = /*#__PURE__*/(0, _react.forwar
|
|
|
55
55
|
_onBlur();
|
|
56
56
|
children.props.onBlur && children.props.onBlur(e);
|
|
57
57
|
},
|
|
58
|
-
'aria-describedby': isVisible ? (0, _classnames.default)(id, children.props['aria-describedby']) : children.props['aria-describedby']
|
|
58
|
+
'aria-describedby': isVisible && id ? (0, _classnames.default)(id, children.props['aria-describedby']) : children.props['aria-describedby']
|
|
59
59
|
}))
|
|
60
60
|
);
|
|
61
61
|
});
|
|
@@ -46,10 +46,11 @@ var euiButtonColor = exports.euiButtonColor = function euiButtonColor(euiThemeCo
|
|
|
46
46
|
* @returns Style object `{ backgroundColor, color }`
|
|
47
47
|
*/
|
|
48
48
|
var euiButtonFillColor = exports.euiButtonFillColor = function euiButtonFillColor(euiThemeContext, color) {
|
|
49
|
-
var euiTheme = euiThemeContext.euiTheme
|
|
49
|
+
var euiTheme = euiThemeContext.euiTheme,
|
|
50
|
+
highContrastMode = euiThemeContext.highContrastMode;
|
|
50
51
|
var backgroundTokenName = (0, _euiThemeCommon.getTokenName)('backgroundFilled', color);
|
|
51
52
|
var textColorTokenName = (0, _euiThemeCommon.getTokenName)('textColorFilled', color);
|
|
52
|
-
var foreground = euiTheme.components.buttons[textColorTokenName];
|
|
53
|
+
var foreground = highContrastMode ? color === 'warning' ? euiTheme.colors.ink : euiTheme.colors.textInverse : euiTheme.components.buttons[textColorTokenName];
|
|
53
54
|
var background = euiTheme.components.buttons[backgroundTokenName];
|
|
54
55
|
return _objectSpread({
|
|
55
56
|
color: foreground,
|
|
@@ -5,7 +5,7 @@ Object.defineProperty(exports, "__esModule", {
|
|
|
5
5
|
});
|
|
6
6
|
exports.EUI_VIS_COLOR_STORE = void 0;
|
|
7
7
|
var _euiThemeCommon = require("@elastic/eui-theme-common");
|
|
8
|
-
var
|
|
8
|
+
var _colors_vis = require("../../themes/amsterdam/global_styling/variables/_colors_vis");
|
|
9
9
|
/*
|
|
10
10
|
* Copyright Elasticsearch B.V. and/or licensed to Elasticsearch B.V. under one
|
|
11
11
|
* or more contributor license agreements. Licensed under the Elastic License
|
|
@@ -15,4 +15,4 @@ var _euiThemeBorealis = require("@elastic/eui-theme-borealis");
|
|
|
15
15
|
*/
|
|
16
16
|
|
|
17
17
|
// initialsetup of Vis color storage with default colors
|
|
18
|
-
var EUI_VIS_COLOR_STORE = exports.EUI_VIS_COLOR_STORE = _euiThemeCommon.EuiVisColorStore.getInstance(
|
|
18
|
+
var EUI_VIS_COLOR_STORE = exports.EUI_VIS_COLOR_STORE = _euiThemeCommon.EuiVisColorStore.getInstance(_colors_vis.colorVis, true);
|
|
@@ -5,7 +5,7 @@ Object.defineProperty(exports, "__esModule", {
|
|
|
5
5
|
});
|
|
6
6
|
exports.defaultComputedTheme = exports.EuiThemeContext = exports.EuiSystemContext = exports.EuiNestedThemeContext = exports.EuiModificationsContext = exports.EuiHighContrastModeContext = exports.EuiColorModeContext = exports.DEFAULTS = void 0;
|
|
7
7
|
var _react = require("react");
|
|
8
|
-
var
|
|
8
|
+
var _theme = require("../../themes/amsterdam/theme");
|
|
9
9
|
var _utils = require("./utils");
|
|
10
10
|
/*
|
|
11
11
|
* Copyright Elasticsearch B.V. and/or licensed to Elasticsearch B.V. under one
|
|
@@ -16,7 +16,7 @@ var _utils = require("./utils");
|
|
|
16
16
|
*/
|
|
17
17
|
|
|
18
18
|
var DEFAULTS = exports.DEFAULTS = {
|
|
19
|
-
system:
|
|
19
|
+
system: _theme.EuiThemeAmsterdam,
|
|
20
20
|
modifications: {},
|
|
21
21
|
colorMode: _utils.DEFAULT_COLOR_MODE,
|
|
22
22
|
highContrastMode: false
|
package/CHANGELOG.md
DELETED
|
@@ -1,5 +0,0 @@
|
|
|
1
|
-
EUI's changelogs are too numerous to view in a single file, and have been split up by year. Ways to view them:
|
|
2
|
-
|
|
3
|
-
- In the [changelogs](./changelogs) folder as raw markdown files
|
|
4
|
-
- On our [docs website](https://eui.elastic.co/#/package/changelog) as rich text
|
|
5
|
-
- [Searching for individual release](https://github.com/elastic/eui/releases) changelogs
|