@elastic/eui 109.2.0 → 110.0.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/basic_table/in_memory_table.js +87 -61
- package/es/components/date_picker/super_date_picker/date_popover/absolute_tab.js +5 -1
- package/es/components/date_picker/super_date_picker/date_popover/relative_tab.js +5 -1
- package/es/components/date_picker/super_date_picker/date_popover/timezone_display.js +3 -1
- package/es/components/date_picker/super_date_picker/quick_select_popover/index.js +1 -0
- package/es/components/date_picker/super_date_picker/time_window_buttons.js +1 -1
- package/es/components/filter_group/filter_group.a11y.js +1 -1
- package/es/components/header/header_logo/header_logo.js +6 -1
- package/es/components/header/header_logo/header_logo.styles.js +1 -1
- package/es/components/icon/icon.styles.js +4 -4
- package/es/components/page/page.js +11 -3
- package/es/components/page/page.styles.js +1 -2
- package/es/components/page/page_header/page_header.js +11 -3
- package/es/components/page_template/outer/page_outer.js +2 -3
- package/es/components/page_template/outer/page_outer.styles.js +29 -35
- package/es/components/page_template/page_template.js +8 -2
- package/es/components/search_bar/search_bar.js +10 -4
- package/es/components/selectable/selectable.js +7 -2
- package/es/services/string/to_initials.js +26 -4
- package/eui.d.ts +41 -18
- package/lib/components/basic_table/in_memory_table.js +87 -61
- package/lib/components/date_picker/super_date_picker/date_popover/absolute_tab.js +5 -1
- package/lib/components/date_picker/super_date_picker/date_popover/relative_tab.js +5 -1
- package/lib/components/date_picker/super_date_picker/date_popover/timezone_display.js +3 -1
- package/lib/components/date_picker/super_date_picker/quick_select_popover/index.js +7 -0
- package/lib/components/date_picker/super_date_picker/time_window_buttons.js +1 -1
- package/lib/components/filter_group/filter_group.a11y.js +1 -1
- package/lib/components/header/header_logo/header_logo.js +6 -1
- package/lib/components/header/header_logo/header_logo.styles.js +1 -1
- package/lib/components/icon/icon.styles.js +4 -4
- package/lib/components/page/page.js +10 -2
- package/lib/components/page/page.styles.js +1 -2
- package/lib/components/page/page_header/page_header.js +10 -2
- package/lib/components/page_template/outer/page_outer.js +1 -2
- package/lib/components/page_template/outer/page_outer.styles.js +29 -35
- package/lib/components/page_template/page_template.js +8 -2
- package/lib/components/search_bar/search_bar.js +9 -4
- package/lib/components/selectable/selectable.js +7 -2
- package/lib/services/string/to_initials.js +26 -4
- package/optimize/es/components/basic_table/in_memory_table.js +71 -46
- package/optimize/es/components/date_picker/super_date_picker/date_popover/absolute_tab.js +5 -1
- package/optimize/es/components/date_picker/super_date_picker/date_popover/relative_tab.js +5 -1
- package/optimize/es/components/date_picker/super_date_picker/date_popover/timezone_display.js +3 -1
- package/optimize/es/components/date_picker/super_date_picker/quick_select_popover/index.js +1 -0
- package/optimize/es/components/date_picker/super_date_picker/time_window_buttons.js +1 -1
- package/optimize/es/components/filter_group/filter_group.a11y.js +1 -1
- package/optimize/es/components/header/header_logo/header_logo.js +6 -1
- package/optimize/es/components/header/header_logo/header_logo.styles.js +1 -1
- package/optimize/es/components/icon/icon.styles.js +4 -4
- package/optimize/es/components/page/page.js +6 -3
- package/optimize/es/components/page/page.styles.js +1 -2
- package/optimize/es/components/page/page_header/page_header.js +6 -3
- package/optimize/es/components/page_template/outer/page_outer.js +2 -3
- package/optimize/es/components/page_template/outer/page_outer.styles.js +29 -35
- package/optimize/es/components/page_template/page_template.js +2 -1
- package/optimize/es/components/search_bar/search_bar.js +6 -0
- package/optimize/es/components/selectable/selectable.js +7 -2
- package/optimize/es/services/string/to_initials.js +26 -4
- package/optimize/lib/components/basic_table/in_memory_table.js +71 -46
- package/optimize/lib/components/date_picker/super_date_picker/date_popover/absolute_tab.js +5 -1
- package/optimize/lib/components/date_picker/super_date_picker/date_popover/relative_tab.js +5 -1
- package/optimize/lib/components/date_picker/super_date_picker/date_popover/timezone_display.js +3 -1
- package/optimize/lib/components/date_picker/super_date_picker/quick_select_popover/index.js +7 -0
- package/optimize/lib/components/date_picker/super_date_picker/time_window_buttons.js +1 -1
- package/optimize/lib/components/filter_group/filter_group.a11y.js +1 -1
- package/optimize/lib/components/header/header_logo/header_logo.js +6 -1
- package/optimize/lib/components/header/header_logo/header_logo.styles.js +1 -1
- package/optimize/lib/components/icon/icon.styles.js +4 -4
- package/optimize/lib/components/page/page.js +5 -2
- package/optimize/lib/components/page/page.styles.js +1 -2
- package/optimize/lib/components/page/page_header/page_header.js +5 -2
- package/optimize/lib/components/page_template/outer/page_outer.js +1 -2
- package/optimize/lib/components/page_template/outer/page_outer.styles.js +29 -35
- package/optimize/lib/components/page_template/page_template.js +2 -1
- package/optimize/lib/components/search_bar/search_bar.js +5 -0
- package/optimize/lib/components/selectable/selectable.js +7 -2
- package/optimize/lib/services/string/to_initials.js +26 -4
- package/package.json +1 -1
- package/test-env/components/basic_table/in_memory_table.js +87 -61
- package/test-env/components/date_picker/super_date_picker/date_popover/absolute_tab.js +5 -1
- package/test-env/components/date_picker/super_date_picker/date_popover/relative_tab.js +5 -1
- package/test-env/components/date_picker/super_date_picker/date_popover/timezone_display.js +3 -1
- package/test-env/components/date_picker/super_date_picker/quick_select_popover/index.js +7 -0
- package/test-env/components/date_picker/super_date_picker/time_window_buttons.js +1 -1
- package/test-env/components/filter_group/filter_group.a11y.js +1 -1
- package/test-env/components/header/header_logo/header_logo.js +6 -1
- package/test-env/components/header/header_logo/header_logo.styles.js +1 -1
- package/test-env/components/icon/icon.styles.js +4 -4
- package/test-env/components/page/page.js +10 -2
- package/test-env/components/page/page.styles.js +1 -2
- package/test-env/components/page/page_header/page_header.js +10 -2
- package/test-env/components/page_template/outer/page_outer.js +1 -2
- package/test-env/components/page_template/outer/page_outer.styles.js +29 -35
- package/test-env/components/page_template/page_template.js +8 -2
- package/test-env/components/search_bar/search_bar.js +9 -4
- package/test-env/components/selectable/selectable.js +7 -2
- package/test-env/services/string/to_initials.js +26 -4
|
@@ -91,6 +91,7 @@ var EuiRelativeTab = exports.EuiRelativeTab = function EuiRelativeTab(_ref) {
|
|
|
91
91
|
if (!parsedValue || !parsedValue.isValid()) return '';
|
|
92
92
|
return parsedValue.locale(locale || 'en').format(dateFormat);
|
|
93
93
|
}, [isInvalid, value, roundUp, locale, dateFormat]);
|
|
94
|
+
var textInputLabelId = (0, _services.useGeneratedHtmlId)();
|
|
94
95
|
var relativeDateInputNumberDescriptionId = (0, _services.useGeneratedHtmlId)();
|
|
95
96
|
var timeZomeDescriptionId = (0, _services.useGeneratedHtmlId)();
|
|
96
97
|
var numberAriaLabel = (0, _i18n.useEuiI18n)('euiRelativeTab.numberInputLabel', 'Time span amount');
|
|
@@ -123,11 +124,14 @@ var EuiRelativeTab = exports.EuiRelativeTab = function EuiRelativeTab(_ref) {
|
|
|
123
124
|
}))), (0, _react2.jsx)(_spacer.EuiSpacer, {
|
|
124
125
|
size: "s"
|
|
125
126
|
}), (0, _react2.jsx)(_form.EuiFieldText, {
|
|
127
|
+
"aria-labelledby": textInputLabelId,
|
|
126
128
|
compressed: true,
|
|
127
129
|
value: formattedValue,
|
|
128
130
|
readOnly: true,
|
|
129
131
|
"aria-describedby": timeZomeDescriptionId,
|
|
130
|
-
prepend: (0, _react2.jsx)(_form.EuiFormLabel,
|
|
132
|
+
prepend: (0, _react2.jsx)(_form.EuiFormLabel, {
|
|
133
|
+
id: textInputLabelId
|
|
134
|
+
}, labelPrefix)
|
|
131
135
|
}), (0, _react2.jsx)(_accessibility.EuiScreenReaderOnly, null, (0, _react2.jsx)("p", {
|
|
132
136
|
id: relativeDateInputNumberDescriptionId
|
|
133
137
|
}, (0, _react2.jsx)(_i18n.EuiI18n, {
|
|
@@ -59,7 +59,9 @@ var EuiTimeZoneDisplay = exports.EuiTimeZoneDisplay = function EuiTimeZoneDispla
|
|
|
59
59
|
"data-test-subj": "euiTimeZoneDisplay",
|
|
60
60
|
"aria-label": label
|
|
61
61
|
}, rest), typeof customRender === 'function' ? customRender({
|
|
62
|
-
nameDisplay: nameDisplay
|
|
62
|
+
nameDisplay: nameDisplay,
|
|
63
|
+
utcOffset: utc,
|
|
64
|
+
timeZoneName: name
|
|
63
65
|
}) : nameDisplay);
|
|
64
66
|
};
|
|
65
67
|
|
|
@@ -15,6 +15,12 @@ Object.defineProperty(exports, "EuiQuickSelect", {
|
|
|
15
15
|
return _quick_select.EuiQuickSelect;
|
|
16
16
|
}
|
|
17
17
|
});
|
|
18
|
+
Object.defineProperty(exports, "EuiQuickSelectPanel", {
|
|
19
|
+
enumerable: true,
|
|
20
|
+
get: function get() {
|
|
21
|
+
return _quick_select_panel.EuiQuickSelectPanel;
|
|
22
|
+
}
|
|
23
|
+
});
|
|
18
24
|
Object.defineProperty(exports, "EuiQuickSelectPopover", {
|
|
19
25
|
enumerable: true,
|
|
20
26
|
get: function get() {
|
|
@@ -30,4 +36,5 @@ Object.defineProperty(exports, "EuiRecentlyUsed", {
|
|
|
30
36
|
var _commonly_used_time_ranges = require("./commonly_used_time_ranges");
|
|
31
37
|
var _quick_select_popover = require("./quick_select_popover");
|
|
32
38
|
var _quick_select = require("./quick_select");
|
|
39
|
+
var _quick_select_panel = require("./quick_select_panel");
|
|
33
40
|
var _recently_used = require("./recently_used");
|
|
@@ -43,7 +43,7 @@ var EuiTimeWindowButtons = exports.EuiTimeWindowButtons = function EuiTimeWindow
|
|
|
43
43
|
zoomFactor = _ref$zoomFactor === void 0 ? ZOOM_FACTOR_DEFAULT : _ref$zoomFactor;
|
|
44
44
|
var buttonColor = 'text';
|
|
45
45
|
var buttonSize = compressed ? 's' : 'm';
|
|
46
|
-
var iconSize =
|
|
46
|
+
var iconSize = 'm';
|
|
47
47
|
var styles = (0, _services.useEuiMemoizedStyles)(_button_group.euiButtonGroupButtonsStyles);
|
|
48
48
|
var _useEuiTimeWindow = useEuiTimeWindow(start, end, applyTime, {
|
|
49
49
|
zoomFactor: zoomFactor
|
|
@@ -237,7 +237,7 @@ describe('EuiFilterGroup multiselect example', function () {
|
|
|
237
237
|
cy.realPress('Enter');
|
|
238
238
|
cy.get('div[data-test-subj="euiSelectableList"]').should('exist');
|
|
239
239
|
cy.realPress('Tab');
|
|
240
|
-
cy.repeatRealPress('ArrowDown',
|
|
240
|
+
cy.repeatRealPress('ArrowDown', 4);
|
|
241
241
|
cy.realPress('Enter');
|
|
242
242
|
cy.get('li[aria-selected="true"]').find('span.euiSelectableListItem__text').should('have.text', 'Dmitri Shostakovich. Checked option. To exclude this option, press Enter.');
|
|
243
243
|
cy.realPress('ArrowDown');
|
|
@@ -12,6 +12,7 @@ var _propTypes = _interopRequireDefault(require("prop-types"));
|
|
|
12
12
|
var _classnames = _interopRequireDefault(require("classnames"));
|
|
13
13
|
var _services = require("../../../services");
|
|
14
14
|
var _href_validator = require("../../../services/security/href_validator");
|
|
15
|
+
var _global_styling = require("../../../global_styling");
|
|
15
16
|
var _icon = require("../../icon");
|
|
16
17
|
var _header_logo = require("./header_logo.styles");
|
|
17
18
|
var _react2 = require("@emotion/react");
|
|
@@ -36,6 +37,10 @@ var EuiHeaderLogo = exports.EuiHeaderLogo = function EuiHeaderLogo(_ref) {
|
|
|
36
37
|
rest = (0, _objectWithoutProperties2.default)(_ref, _excluded);
|
|
37
38
|
var classes = (0, _classnames.default)('euiHeaderLogo', className);
|
|
38
39
|
var styles = (0, _services.useEuiMemoizedStyles)(_header_logo.euiHeaderLogoStyles);
|
|
40
|
+
var buttonColorStyles = (0, _global_styling.useEuiButtonColorCSS)({
|
|
41
|
+
display: 'empty'
|
|
42
|
+
});
|
|
43
|
+
var cssStyles = [styles.euiHeaderLogo, buttonColorStyles.text];
|
|
39
44
|
var secureRel = (0, _services.getSecureRelForTarget)({
|
|
40
45
|
href: href,
|
|
41
46
|
rel: rel,
|
|
@@ -46,7 +51,7 @@ var EuiHeaderLogo = exports.EuiHeaderLogo = function EuiHeaderLogo(_ref) {
|
|
|
46
51
|
href: isHrefValid ? href : '',
|
|
47
52
|
rel: secureRel,
|
|
48
53
|
target: target,
|
|
49
|
-
css:
|
|
54
|
+
css: cssStyles,
|
|
50
55
|
className: classes
|
|
51
56
|
}, rest), (0, _react2.jsx)(_icon.EuiIcon, {
|
|
52
57
|
"aria-label": iconTitle,
|
|
@@ -21,7 +21,7 @@ var euiHeaderLogoStyles = exports.euiHeaderLogoStyles = function euiHeaderLogoSt
|
|
|
21
21
|
var _euiHeaderVariables = (0, _header.euiHeaderVariables)(euiThemeContext),
|
|
22
22
|
childHeight = _euiHeaderVariables.childHeight;
|
|
23
23
|
return {
|
|
24
|
-
euiHeaderLogo: /*#__PURE__*/(0, _react.css)("position:relative;", (0, _global_styling.logicalCSS)('height', childHeight), " line-height:", childHeight, ";", (0, _global_styling.logicalCSS)('min-width', childHeight), " padding-inline:", euiTheme.size.s, ";display:inline-flex;align-items:center;white-space:nowrap;", (0, _global_styling.euiBreakpoint)(euiThemeContext, ['xs']), "{", (0, _global_styling.logicalCSS)('padding-left', euiTheme.size.xs), ";};label:euiHeaderLogo;"),
|
|
24
|
+
euiHeaderLogo: /*#__PURE__*/(0, _react.css)("position:relative;", (0, _global_styling.logicalCSS)('height', childHeight), " line-height:", childHeight, ";", (0, _global_styling.logicalCSS)('min-width', childHeight), " padding-inline:", euiTheme.size.s, ";display:inline-flex;border-radius:", euiTheme.border.radius.small, ";align-items:center;white-space:nowrap;", (0, _global_styling.euiBreakpoint)(euiThemeContext, ['xs']), "{", (0, _global_styling.logicalCSS)('padding-left', euiTheme.size.xs), ";};label:euiHeaderLogo;"),
|
|
25
25
|
euiHeaderLogo__text: /*#__PURE__*/(0, _react.css)((0, _title.euiTitle)(euiThemeContext, 'xxs'), " ", (0, _global_styling.logicalCSS)('padding-left', euiTheme.size.base), " ", (0, _global_styling.euiBreakpoint)(euiThemeContext, ['xs']), "{", (0, _global_styling.logicalCSS)('padding-left', euiTheme.size.s), ";};label:euiHeaderLogo__text;")
|
|
26
26
|
};
|
|
27
27
|
};
|
|
@@ -19,11 +19,11 @@ function _EMOTION_STRINGIFIED_CSS_ERROR__() { return "You have tried to stringif
|
|
|
19
19
|
var iconLoadingOpacity = exports.iconLoadingOpacity = 0.05;
|
|
20
20
|
var iconLoading = (0, _react.keyframes)(_templateObject || (_templateObject = (0, _taggedTemplateLiteral2.default)(["\n 0% {\n opacity: ", ";\n }\n\n 100% {\n opacity: 1;\n }\n"])), iconLoadingOpacity);
|
|
21
21
|
var _ref = process.env.NODE_ENV === "production" ? {
|
|
22
|
-
name: "
|
|
23
|
-
styles: "*[fill]{fill:none!important;
|
|
22
|
+
name: "p0011s-logoElasticOutline",
|
|
23
|
+
styles: "*[fill]{fill:none!important;stroke:currentColor!important;};label:logoElasticOutline;"
|
|
24
24
|
} : {
|
|
25
|
-
name: "
|
|
26
|
-
styles: "*[fill]{fill:none!important;
|
|
25
|
+
name: "p0011s-logoElasticOutline",
|
|
26
|
+
styles: "*[fill]{fill:none!important;stroke:currentColor!important;};label:logoElasticOutline;",
|
|
27
27
|
toString: _EMOTION_STRINGIFIED_CSS_ERROR__
|
|
28
28
|
};
|
|
29
29
|
var _ref2 = process.env.NODE_ENV === "production" ? {
|
|
@@ -15,7 +15,7 @@ var _global_styling = require("../../global_styling");
|
|
|
15
15
|
var _page = require("./page.styles");
|
|
16
16
|
var _services = require("../../services");
|
|
17
17
|
var _react2 = require("@emotion/react");
|
|
18
|
-
var _excluded = ["children", "restrictWidth", "className", "paddingSize", "grow", "direction"];
|
|
18
|
+
var _excluded = ["children", "restrictWidth", "className", "paddingSize", "grow", "direction", "color"];
|
|
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
|
|
@@ -34,13 +34,16 @@ var EuiPage = exports.EuiPage = function EuiPage(_ref) {
|
|
|
34
34
|
grow = _ref$grow === void 0 ? true : _ref$grow,
|
|
35
35
|
_ref$direction = _ref.direction,
|
|
36
36
|
direction = _ref$direction === void 0 ? 'row' : _ref$direction,
|
|
37
|
+
_ref$color = _ref.color,
|
|
38
|
+
color = _ref$color === void 0 ? 'transparent' : _ref$color,
|
|
37
39
|
rest = (0, _objectWithoutProperties2.default)(_ref, _excluded);
|
|
38
40
|
// Set max-width as a style prop
|
|
39
41
|
var widthStyles = (0, _restrict_width.setStyleForRestrictedPageWidth)(restrictWidth, rest === null || rest === void 0 ? void 0 : rest.style);
|
|
40
42
|
var euiTheme = (0, _services.useEuiTheme)();
|
|
41
43
|
var styles = (0, _page.euiPageStyles)(euiTheme);
|
|
42
44
|
var padding = (0, _global_styling.useEuiPaddingCSS)()[paddingSize];
|
|
43
|
-
var
|
|
45
|
+
var backgroundColor = (0, _global_styling.useEuiBackgroundColorCSS)()[color];
|
|
46
|
+
var stylesCSS = [styles.euiPage, styles[direction], backgroundColor, grow && styles.grow, padding, restrictWidth && styles.restrictWidth];
|
|
44
47
|
var classes = (0, _classnames.default)('euiPage', className);
|
|
45
48
|
return (0, _react2.jsx)("div", (0, _extends2.default)({
|
|
46
49
|
css: stylesCSS,
|
|
@@ -65,6 +68,11 @@ EuiPage.propTypes = {
|
|
|
65
68
|
* Flip to `column` when not including a sidebar.
|
|
66
69
|
*/
|
|
67
70
|
direction: _propTypes.default.oneOf(["row", "column"]),
|
|
71
|
+
/**
|
|
72
|
+
* Defines the page background color.
|
|
73
|
+
* @default 'transparent'
|
|
74
|
+
*/
|
|
75
|
+
color: _propTypes.default.oneOf(["plain", "transparent"]),
|
|
68
76
|
className: _propTypes.default.string,
|
|
69
77
|
"aria-label": _propTypes.default.string,
|
|
70
78
|
"data-test-subj": _propTypes.default.string,
|
|
@@ -30,9 +30,8 @@ var _ref2 = process.env.NODE_ENV === "production" ? {
|
|
|
30
30
|
toString: _EMOTION_STRINGIFIED_CSS_ERROR__
|
|
31
31
|
};
|
|
32
32
|
var euiPageStyles = exports.euiPageStyles = function euiPageStyles(euiThemeContext) {
|
|
33
|
-
var euiTheme = euiThemeContext.euiTheme;
|
|
34
33
|
return {
|
|
35
|
-
euiPage: /*#__PURE__*/(0, _react.css)("display:flex;
|
|
34
|
+
euiPage: /*#__PURE__*/(0, _react.css)("display:flex;flex-shrink:0;", (0, _global_styling.logicalCSS)('max-width', '100%'), ";;label:euiPage;"),
|
|
36
35
|
// Grow
|
|
37
36
|
grow: _ref2,
|
|
38
37
|
// Direction
|
|
@@ -15,7 +15,7 @@ var _global_styling = require("../../../global_styling");
|
|
|
15
15
|
var _page_header_content = require("./page_header_content");
|
|
16
16
|
var _page_header = require("./page_header.styles");
|
|
17
17
|
var _react2 = require("@emotion/react");
|
|
18
|
-
var _excluded = ["className", "restrictWidth", "paddingSize", "bottomBorder", "alignItems", "responsive", "children", "pageTitle", "pageTitleProps", "iconType", "iconProps", "tabs", "tabsProps", "breadcrumbs", "breadcrumbProps", "description", "rightSideItems", "rightSideGroupProps"];
|
|
18
|
+
var _excluded = ["className", "restrictWidth", "paddingSize", "bottomBorder", "color", "alignItems", "responsive", "children", "pageTitle", "pageTitleProps", "iconType", "iconProps", "tabs", "tabsProps", "breadcrumbs", "breadcrumbProps", "description", "rightSideItems", "rightSideGroupProps"];
|
|
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
|
|
@@ -30,6 +30,8 @@ var EuiPageHeader = exports.EuiPageHeader = function EuiPageHeader(_ref) {
|
|
|
30
30
|
_ref$paddingSize = _ref.paddingSize,
|
|
31
31
|
paddingSize = _ref$paddingSize === void 0 ? 'none' : _ref$paddingSize,
|
|
32
32
|
bottomBorder = _ref.bottomBorder,
|
|
33
|
+
_ref$color = _ref.color,
|
|
34
|
+
color = _ref$color === void 0 ? 'transparent' : _ref$color,
|
|
33
35
|
alignItems = _ref.alignItems,
|
|
34
36
|
_ref$responsive = _ref.responsive,
|
|
35
37
|
responsive = _ref$responsive === void 0 ? true : _ref$responsive,
|
|
@@ -49,7 +51,8 @@ var EuiPageHeader = exports.EuiPageHeader = function EuiPageHeader(_ref) {
|
|
|
49
51
|
var useTheme = (0, _services.useEuiTheme)();
|
|
50
52
|
var styles = (0, _page_header.euiPageHeaderStyles)(useTheme);
|
|
51
53
|
var inlinePadding = (0, _global_styling.useEuiPaddingCSS)('horizontal');
|
|
52
|
-
var
|
|
54
|
+
var backgroundColor = (0, _global_styling.useEuiBackgroundColorCSS)()[color];
|
|
55
|
+
var cssStyles = [styles.euiPageHeader, inlinePadding[paddingSize], bottomBorder === 'extended' && styles.border, backgroundColor];
|
|
53
56
|
var classes = (0, _classnames.default)('euiPageHeader', className);
|
|
54
57
|
var contentProps = {
|
|
55
58
|
restrictWidth: restrictWidth,
|
|
@@ -81,6 +84,11 @@ EuiPageHeader.propTypes = {
|
|
|
81
84
|
* Adjust the overall padding.
|
|
82
85
|
*/
|
|
83
86
|
paddingSize: _propTypes.default.any,
|
|
87
|
+
/**
|
|
88
|
+
* Define the header background color
|
|
89
|
+
* @default 'transparent'
|
|
90
|
+
*/
|
|
91
|
+
color: _propTypes.default.oneOf(["plain", "transparent"]),
|
|
84
92
|
className: _propTypes.default.string,
|
|
85
93
|
"aria-label": _propTypes.default.string,
|
|
86
94
|
"data-test-subj": _propTypes.default.string,
|
|
@@ -30,8 +30,7 @@ var _EuiPageOuter = exports._EuiPageOuter = function _EuiPageOuter(_ref) {
|
|
|
30
30
|
_ref$responsive = _ref.responsive,
|
|
31
31
|
responsive = _ref$responsive === void 0 ? ['xs', 's'] : _ref$responsive,
|
|
32
32
|
rest = (0, _objectWithoutProperties2.default)(_ref, _excluded);
|
|
33
|
-
var
|
|
34
|
-
var styles = (0, _page_outer.euiPageOuterStyles)(themeContext);
|
|
33
|
+
var styles = _page_outer.euiPageOuterStyles;
|
|
35
34
|
var isResponding = (0, _services.useIsWithinBreakpoints)(responsive);
|
|
36
35
|
var cssStyles = [styles.euiPageOuter, styles[isResponding ? 'column' : direction], grow && styles.grow];
|
|
37
36
|
return (0, _react2.jsx)("div", (0, _extends2.default)({
|
|
@@ -13,39 +13,33 @@ function _EMOTION_STRINGIFIED_CSS_ERROR__() { return "You have tried to stringif
|
|
|
13
13
|
* in compliance with, at your election, the Elastic License 2.0 or the Server
|
|
14
14
|
* Side Public License, v 1.
|
|
15
15
|
*/
|
|
16
|
-
var
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
}
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
}
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
// Grow
|
|
46
|
-
grow: _ref3,
|
|
47
|
-
// Direction
|
|
48
|
-
column: _ref2,
|
|
49
|
-
row: _ref
|
|
50
|
-
};
|
|
16
|
+
var euiPageOuterStyles = exports.euiPageOuterStyles = {
|
|
17
|
+
euiPageOuter: /*#__PURE__*/(0, _react.css)("display:flex;flex-shrink:0;", (0, _global_styling.logicalCSS)('max-width', '100%' // Ensures Firefox doesn't expand width beyond bounds
|
|
18
|
+
), ";;label:euiPageOuter;"),
|
|
19
|
+
// Grow
|
|
20
|
+
grow: process.env.NODE_ENV === "production" ? {
|
|
21
|
+
name: "122lw0e-grow",
|
|
22
|
+
styles: "flex-grow:1;label:grow;"
|
|
23
|
+
} : {
|
|
24
|
+
name: "122lw0e-grow",
|
|
25
|
+
styles: "flex-grow:1;label:grow;",
|
|
26
|
+
toString: _EMOTION_STRINGIFIED_CSS_ERROR__
|
|
27
|
+
},
|
|
28
|
+
// Direction
|
|
29
|
+
column: process.env.NODE_ENV === "production" ? {
|
|
30
|
+
name: "ll8kmq-column",
|
|
31
|
+
styles: "flex-direction:column;label:column;"
|
|
32
|
+
} : {
|
|
33
|
+
name: "ll8kmq-column",
|
|
34
|
+
styles: "flex-direction:column;label:column;",
|
|
35
|
+
toString: _EMOTION_STRINGIFIED_CSS_ERROR__
|
|
36
|
+
},
|
|
37
|
+
row: process.env.NODE_ENV === "production" ? {
|
|
38
|
+
name: "15mvjmo-row",
|
|
39
|
+
styles: "flex-direction:row;label:row;"
|
|
40
|
+
} : {
|
|
41
|
+
name: "15mvjmo-row",
|
|
42
|
+
styles: "flex-direction:row;label:row;",
|
|
43
|
+
toString: _EMOTION_STRINGIFIED_CSS_ERROR__
|
|
44
|
+
}
|
|
51
45
|
};
|
|
@@ -108,7 +108,8 @@ var _EuiPageTemplate = exports._EuiPageTemplate = function _EuiPageTemplate(_ref
|
|
|
108
108
|
header: {
|
|
109
109
|
restrictWidth: restrictWidth,
|
|
110
110
|
paddingSize: paddingSize,
|
|
111
|
-
bottomBorder: headerBottomBorder
|
|
111
|
+
bottomBorder: headerBottomBorder,
|
|
112
|
+
color: panelled === false ? 'transparent' : 'plain'
|
|
112
113
|
},
|
|
113
114
|
section: {
|
|
114
115
|
restrictWidth: restrictWidth,
|
|
@@ -165,7 +166,7 @@ _EuiPageTemplate.propTypes = {
|
|
|
165
166
|
"data-test-subj": _propTypes.default.oneOfType([_propTypes.default.string, _propTypes.default.string]),
|
|
166
167
|
css: _propTypes.default.oneOfType([_propTypes.default.any, _propTypes.default.any]),
|
|
167
168
|
/**
|
|
168
|
-
* Adds a
|
|
169
|
+
* Adds a background and shadow to define the area.
|
|
169
170
|
*/
|
|
170
171
|
panelled: _propTypes.default.bool,
|
|
171
172
|
/**
|
|
@@ -313,6 +314,11 @@ _EuiPageHeader.propTypes = {
|
|
|
313
314
|
* Adjust the overall padding.
|
|
314
315
|
*/
|
|
315
316
|
paddingSize: _propTypes.default.any,
|
|
317
|
+
/**
|
|
318
|
+
* Define the header background color
|
|
319
|
+
* @default 'transparent'
|
|
320
|
+
*/
|
|
321
|
+
color: _propTypes.default.oneOf(["plain", "transparent"]),
|
|
316
322
|
className: _propTypes.default.string,
|
|
317
323
|
"aria-label": _propTypes.default.string,
|
|
318
324
|
"data-test-subj": _propTypes.default.string,
|
|
@@ -50,6 +50,11 @@ function _isNativeReflectConstruct() { try { var t = !Boolean.prototype.valueOf.
|
|
|
50
50
|
* in compliance with, at your election, the Elastic License 2.0 or the Server
|
|
51
51
|
* Side Public License, v 1.
|
|
52
52
|
*/
|
|
53
|
+
/**
|
|
54
|
+
* When `searchFormat` is 'text', `query` is null and the search is performed
|
|
55
|
+
* on the `queryText` directly without EQL parsing
|
|
56
|
+
*/
|
|
57
|
+
|
|
53
58
|
var parseQuery = function parseQuery(query, props) {
|
|
54
59
|
var _props$box, _props$box2;
|
|
55
60
|
var schema = undefined;
|
|
@@ -255,15 +260,15 @@ var EuiSearchBar = exports.EuiSearchBar = /*#__PURE__*/function (_Component) {
|
|
|
255
260
|
EuiSearchBar.propTypes = {
|
|
256
261
|
onChange: _propTypes.default.func,
|
|
257
262
|
/**
|
|
258
|
-
The initial query the bar will hold when first mounted
|
|
263
|
+
* The initial query the bar will hold when first mounted
|
|
259
264
|
*/
|
|
260
265
|
defaultQuery: _propTypes.default.oneOfType([_propTypes.default.any.isRequired, _propTypes.default.string.isRequired]),
|
|
261
266
|
/**
|
|
262
|
-
If you wish to use the search bar as a controlled component, continuously pass the query via this prop.
|
|
267
|
+
* If you wish to use the search bar as a controlled component, continuously pass the query via this prop.
|
|
263
268
|
*/
|
|
264
269
|
query: _propTypes.default.oneOfType([_propTypes.default.any.isRequired, _propTypes.default.string.isRequired]),
|
|
265
270
|
/**
|
|
266
|
-
Configures the search box. Set `placeholder` to change the placeholder text in the box and `incremental` to support incremental (as you type) search.
|
|
271
|
+
* Configures the search box. Set `placeholder` to change the placeholder text in the box and `incremental` to support incremental (as you type) search.
|
|
267
272
|
*/
|
|
268
273
|
box: _propTypes.default.shape({
|
|
269
274
|
name: _propTypes.default.string,
|
|
@@ -323,7 +328,7 @@ EuiSearchBar.propTypes = {
|
|
|
323
328
|
}).isRequired, _propTypes.default.bool.isRequired])
|
|
324
329
|
}),
|
|
325
330
|
/**
|
|
326
|
-
An array of search filters. See {@link SearchFilterConfig}.
|
|
331
|
+
* An array of search filters. See {@link SearchFilterConfig}.
|
|
327
332
|
*/
|
|
328
333
|
filters: _propTypes.default.arrayOf(_propTypes.default.oneOfType([_propTypes.default.shape({
|
|
329
334
|
type: _propTypes.default.oneOf(["is"]).isRequired,
|
|
@@ -85,6 +85,12 @@ var EuiSelectable = exports.EuiSelectable = /*#__PURE__*/function (_Component) {
|
|
|
85
85
|
_this.preventOnFocus = false;
|
|
86
86
|
return;
|
|
87
87
|
}
|
|
88
|
+
if (event && _this.props.searchable && event.target === _this.inputRef) {
|
|
89
|
+
_this.setState({
|
|
90
|
+
isFocused: true
|
|
91
|
+
});
|
|
92
|
+
return;
|
|
93
|
+
}
|
|
88
94
|
if (!_this.state.visibleOptions.length || _this.state.activeOptionIndex != null) {
|
|
89
95
|
return;
|
|
90
96
|
}
|
|
@@ -460,8 +466,7 @@ var EuiSelectable = exports.EuiSelectable = /*#__PURE__*/function (_Component) {
|
|
|
460
466
|
onChange: _this2.onSearchChange,
|
|
461
467
|
listId: _this2.optionsListRef.current ? _this2.listId : undefined // Only pass the listId if it exists on the page
|
|
462
468
|
,
|
|
463
|
-
"aria-activedescendant": _this2.makeOptionId(activeOptionIndex)
|
|
464
|
-
,
|
|
469
|
+
"aria-activedescendant": activeOptionIndex != null ? _this2.makeOptionId(activeOptionIndex) : undefined,
|
|
465
470
|
placeholder: placeholderName,
|
|
466
471
|
isPreFiltered: !!isPreFiltered,
|
|
467
472
|
optionMatcher: optionMatcher,
|
|
@@ -13,6 +13,8 @@ exports.toInitials = toInitials;
|
|
|
13
13
|
* Side Public License, v 1.
|
|
14
14
|
*/
|
|
15
15
|
|
|
16
|
+
var MAX_INITIALS = exports.MAX_INITIALS = 2;
|
|
17
|
+
|
|
16
18
|
/**
|
|
17
19
|
* This function calculates the initials/acronym for a given name.
|
|
18
20
|
* It defaults to only 2 characters and will take the first character (of each word).
|
|
@@ -24,11 +26,20 @@ exports.toInitials = toInitials;
|
|
|
24
26
|
* @param {string} name The full name of the item to turn into initials
|
|
25
27
|
* @param {number} initialsLength (Optional) How many characters to show (max 2 allowed)
|
|
26
28
|
* @param {string} initials (Optional) Custom initials (max 2 characters)
|
|
27
|
-
* @returns {string} True if the color is dark, false otherwise.
|
|
28
29
|
*/
|
|
29
|
-
|
|
30
|
-
var MAX_INITIALS = exports.MAX_INITIALS = 2;
|
|
31
30
|
function toInitials(name, initialsLength, initials) {
|
|
31
|
+
// If `initials` provided, check if it's a single emoji
|
|
32
|
+
// in order to support complex, "multi-character" ones
|
|
33
|
+
if (initials && typeof Intl !== 'undefined' && 'Segmenter' in Intl) {
|
|
34
|
+
var segmenter = new Intl.Segmenter('en', {
|
|
35
|
+
granularity: 'grapheme'
|
|
36
|
+
});
|
|
37
|
+
var segments = Array.from(segmenter.segment(initials));
|
|
38
|
+
if (segments.length === 1 && isEmoji(segments[0].segment)) {
|
|
39
|
+
return segments[0].segment;
|
|
40
|
+
}
|
|
41
|
+
}
|
|
42
|
+
|
|
32
43
|
// Calculate the number of initials to show, maxing out at MAX_INITIALS
|
|
33
44
|
var calculatedInitialsLength = initials ? initials.split('').length : name.split(' ').length;
|
|
34
45
|
calculatedInitialsLength = calculatedInitialsLength > MAX_INITIALS ? MAX_INITIALS : calculatedInitialsLength;
|
|
@@ -51,5 +62,16 @@ function toInitials(name, initialsLength, initials) {
|
|
|
51
62
|
calculatedInitials = name.substring(0, calculatedInitialsLength);
|
|
52
63
|
}
|
|
53
64
|
}
|
|
54
|
-
return calculatedInitials;
|
|
65
|
+
return calculatedInitials || '';
|
|
66
|
+
}
|
|
67
|
+
function isEmoji(str) {
|
|
68
|
+
/**
|
|
69
|
+
* The \p escape sequence allows matching a character based on its Unicode properties
|
|
70
|
+
* @see https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Regular_expressions/Unicode_character_class_escape
|
|
71
|
+
* @see https://www.unicode.org/Public/UCD/latest/ucd/emoji/emoji-data.txt
|
|
72
|
+
* @see https://www.unicode.org/reports/tr51/#Definitions
|
|
73
|
+
* @see https://util.unicode.org/UnicodeJsps/character.jsp?a=1F440&B1=Show
|
|
74
|
+
*/
|
|
75
|
+
var emojiRegex = /(?:[\xA9\xAE\u203C\u2049\u2122\u2139\u2194-\u2199\u21A9\u21AA\u231A\u231B\u2328\u2388\u23CF\u23E9-\u23F3\u23F8-\u23FA\u24C2\u25AA\u25AB\u25B6\u25C0\u25FB-\u25FE\u2600-\u2605\u2607-\u2612\u2614-\u2685\u2690-\u2705\u2708-\u2712\u2714\u2716\u271D\u2721\u2728\u2733\u2734\u2744\u2747\u274C\u274E\u2753-\u2755\u2757\u2763-\u2767\u2795-\u2797\u27A1\u27B0\u27BF\u2934\u2935\u2B05-\u2B07\u2B1B\u2B1C\u2B50\u2B55\u3030\u303D\u3297\u3299]|\uD83C[\uDC00-\uDCFF\uDD0D-\uDD0F\uDD2F\uDD6C-\uDD71\uDD7E\uDD7F\uDD8E\uDD91-\uDD9A\uDDAD-\uDDFF\uDE01-\uDE0F\uDE1A\uDE2F\uDE32-\uDE3A\uDE3C-\uDE3F\uDE49-\uDFFF]|\uD83D[\uDC00-\uDD3D\uDD46-\uDE4F\uDE80-\uDEFF\uDF74-\uDF7F\uDFD5-\uDFFF]|\uD83E[\uDC0C-\uDC0F\uDC48-\uDC4F\uDC5A-\uDC5F\uDC88-\uDC8F\uDCAE-\uDCFF\uDD0C-\uDD3A\uDD3C-\uDD45\uDD47-\uDEFF]|\uD83F[\uDC00-\uDFFD])/;
|
|
76
|
+
return emojiRegex.test(str);
|
|
55
77
|
}
|