@elastic/eui 97.3.0 → 97.3.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/combo_box/combo_box.js +9 -6
- package/es/components/date_picker/super_date_picker/date_popover/date_popover_button.js +3 -1
- package/es/components/date_picker/super_date_picker/date_popover/date_popover_button.styles.js +11 -1
- package/es/components/date_picker/super_date_picker/super_date_picker.styles.js +1 -1
- package/es/components/page/page_header/page_header_content.js +2 -1
- package/es/components/page/page_header/page_header_content.styles.js +2 -1
- package/eui.d.ts +3 -0
- package/i18ntokens.json +4 -4
- package/lib/components/combo_box/combo_box.js +9 -6
- package/lib/components/date_picker/super_date_picker/date_popover/date_popover_button.js +3 -1
- package/lib/components/date_picker/super_date_picker/date_popover/date_popover_button.styles.js +11 -3
- package/lib/components/date_picker/super_date_picker/super_date_picker.styles.js +1 -1
- package/lib/components/page/page_header/page_header_content.js +2 -1
- package/lib/components/page/page_header/page_header_content.styles.js +2 -1
- package/optimize/es/components/combo_box/combo_box.js +9 -6
- package/optimize/es/components/date_picker/super_date_picker/date_popover/date_popover_button.js +3 -1
- package/optimize/es/components/date_picker/super_date_picker/date_popover/date_popover_button.styles.js +11 -1
- package/optimize/es/components/date_picker/super_date_picker/super_date_picker.styles.js +1 -1
- package/optimize/es/components/page/page_header/page_header_content.js +2 -1
- package/optimize/es/components/page/page_header/page_header_content.styles.js +2 -1
- package/optimize/lib/components/combo_box/combo_box.js +9 -6
- package/optimize/lib/components/date_picker/super_date_picker/date_popover/date_popover_button.js +3 -1
- package/optimize/lib/components/date_picker/super_date_picker/date_popover/date_popover_button.styles.js +11 -3
- package/optimize/lib/components/date_picker/super_date_picker/super_date_picker.styles.js +1 -1
- package/optimize/lib/components/page/page_header/page_header_content.js +2 -1
- package/optimize/lib/components/page/page_header/page_header_content.styles.js +2 -1
- package/package.json +1 -1
- package/test-env/components/combo_box/combo_box.js +9 -6
- package/test-env/components/date_picker/super_date_picker/date_popover/date_popover_button.js +3 -1
- package/test-env/components/date_picker/super_date_picker/date_popover/date_popover_button.styles.js +11 -3
- package/test-env/components/date_picker/super_date_picker/super_date_picker.styles.js +1 -1
- package/test-env/components/page/page_header/page_header_content.js +2 -1
- package/test-env/components/page/page_header/page_header_content.styles.js +2 -1
|
@@ -316,12 +316,15 @@ export var EuiComboBox = /*#__PURE__*/function (_Component) {
|
|
|
316
316
|
}
|
|
317
317
|
break;
|
|
318
318
|
case keys.ENTER:
|
|
319
|
-
|
|
320
|
-
event.
|
|
321
|
-
|
|
322
|
-
|
|
323
|
-
|
|
324
|
-
|
|
319
|
+
// Do not block enter keypresses for the clear button or delete selection buttons
|
|
320
|
+
if (event.target === _this.searchInputRefInstance) {
|
|
321
|
+
event.preventDefault();
|
|
322
|
+
event.stopPropagation();
|
|
323
|
+
if (_this.hasActiveOption()) {
|
|
324
|
+
_this.onAddOption(_this.state.matchingOptions[_this.state.activeOptionIndex]);
|
|
325
|
+
} else {
|
|
326
|
+
_this.setCustomOptions(false);
|
|
327
|
+
}
|
|
325
328
|
}
|
|
326
329
|
break;
|
|
327
330
|
case keys.TAB:
|
|
@@ -87,7 +87,9 @@ export var EuiDatePopoverButton = function EuiDatePopoverButton(props) {
|
|
|
87
87
|
anchorPosition: position === 'start' ? 'downLeft' : 'downRight',
|
|
88
88
|
display: "block",
|
|
89
89
|
panelPaddingSize: "none"
|
|
90
|
-
}, rest
|
|
90
|
+
}, rest, {
|
|
91
|
+
css: value === 'now' && styles.now
|
|
92
|
+
}), ___EmotionJSX(EuiDatePopoverContent, {
|
|
91
93
|
value: value,
|
|
92
94
|
roundUp: roundUp,
|
|
93
95
|
canRoundRelativeUnits: canRoundRelativeUnits,
|
package/es/components/date_picker/super_date_picker/date_popover/date_popover_button.styles.js
CHANGED
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
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)."; }
|
|
1
2
|
/*
|
|
2
3
|
* Copyright Elasticsearch B.V. and/or licensed to Elasticsearch B.V. under one
|
|
3
4
|
* or more contributor license agreements. Licensed under the Elastic License
|
|
@@ -8,8 +9,17 @@
|
|
|
8
9
|
|
|
9
10
|
import { css } from '@emotion/react';
|
|
10
11
|
import { _buttonStyles } from '../super_date_picker.styles';
|
|
12
|
+
var _ref = process.env.NODE_ENV === "production" ? {
|
|
13
|
+
name: "170kc3d-now",
|
|
14
|
+
styles: "flex-grow:0.5!important;label:now;"
|
|
15
|
+
} : {
|
|
16
|
+
name: "170kc3d-now",
|
|
17
|
+
styles: "flex-grow:0.5!important;label:now;",
|
|
18
|
+
toString: _EMOTION_STRINGIFIED_CSS_ERROR__
|
|
19
|
+
};
|
|
11
20
|
export var euiDatePopoverButtonStyles = function euiDatePopoverButtonStyles(euiThemeContext) {
|
|
12
21
|
return {
|
|
13
|
-
euiDatePopoverButton: /*#__PURE__*/css(_buttonStyles(euiThemeContext), ";;label:euiDatePopoverButton;")
|
|
22
|
+
euiDatePopoverButton: /*#__PURE__*/css(_buttonStyles(euiThemeContext), ";;label:euiDatePopoverButton;"),
|
|
23
|
+
now: _ref
|
|
14
24
|
};
|
|
15
25
|
};
|
|
@@ -64,7 +64,7 @@ export var euiSuperDatePickerStyles = function euiSuperDatePickerStyles(euiTheme
|
|
|
64
64
|
// isQuickSelectOnly forces `width` to be `auto`
|
|
65
65
|
isQuickSelectOnly: /*#__PURE__*/css(logicalCSS('min-width', 0), ".euiFormControlLayout__prepend{", logicalCSS('max-width', 'none'), ";};label:isQuickSelectOnly;"),
|
|
66
66
|
euiSuperDatePicker__range: _ref,
|
|
67
|
-
euiSuperDatePicker__rangeInput: /*#__PURE__*/css("flex-grow:1;", logicalCSS('width', 'auto'), ";;label:euiSuperDatePicker__rangeInput;"),
|
|
67
|
+
euiSuperDatePicker__rangeInput: /*#__PURE__*/css("flex-grow:1;", logicalCSS('width', 'auto'), " overflow:hidden;;label:euiSuperDatePicker__rangeInput;"),
|
|
68
68
|
euiSuperDatePicker__prettyFormat: /*#__PURE__*/css(_buttonStyles(euiThemeContext), " text-align:start;;label:euiSuperDatePicker__prettyFormat;"),
|
|
69
69
|
// Form states
|
|
70
70
|
states: {
|
|
@@ -177,8 +177,9 @@ export var EuiPageHeaderContent = function EuiPageHeaderContent(_ref) {
|
|
|
177
177
|
var itemsToRender = isResponsiveBreakpoint ? rightSideItems : _toConsumableArray(rightSideItems).reverse();
|
|
178
178
|
var rightSideFlexItems = itemsToRender.map(function (item, index) {
|
|
179
179
|
return ___EmotionJSX(EuiFlexItem, {
|
|
180
|
+
key: index,
|
|
180
181
|
grow: false,
|
|
181
|
-
|
|
182
|
+
css: contentStyles.euiPageHeaderContent__rightSideItem
|
|
182
183
|
}, item);
|
|
183
184
|
});
|
|
184
185
|
var _cssStyles = [contentStyles.euiPageHeaderContent__rightSideItems, rightSideGroupProps === null || rightSideGroupProps === void 0 ? void 0 : rightSideGroupProps.css];
|
|
@@ -83,7 +83,8 @@ export var euiPageHeaderContentStyles = function euiPageHeaderContentStyles(_ref
|
|
|
83
83
|
},
|
|
84
84
|
euiPageHeaderContent__top: _ref,
|
|
85
85
|
euiPageHeaderContent__leftSideItems: /*#__PURE__*/css("@container (max-width: ", euiTheme.breakpoint.m, "px){", logicalCSS('min-width', '50%'), ";};label:euiPageHeaderContent__leftSideItems;"),
|
|
86
|
-
euiPageHeaderContent__rightSideItems: /*#__PURE__*/css("flex:0 1 auto;align-content:flex-start
|
|
86
|
+
euiPageHeaderContent__rightSideItems: /*#__PURE__*/css("flex:0 1 auto;align-content:flex-start;", logicalCSS('max-width', '100%'), "@container (min-width: ", euiTheme.breakpoint.m, "px){", logicalCSS('max-width', '50%'), " justify-content:flex-end;};label:euiPageHeaderContent__rightSideItems;"),
|
|
87
|
+
euiPageHeaderContent__rightSideItem: /*#__PURE__*/css(logicalCSS('max-width', '100%'), ";;label:euiPageHeaderContent__rightSideItem;"),
|
|
87
88
|
euiPageHeaderContent__titleIcon: /*#__PURE__*/css("position:relative;", logicalCSS('top', "-".concat(euiTheme.size.xs)), " ", logicalCSS('margin-right', euiTheme.size.base), ";;label:euiPageHeaderContent__titleIcon;")
|
|
88
89
|
};
|
|
89
90
|
};
|
package/eui.d.ts
CHANGED
|
@@ -17586,6 +17586,7 @@ declare module '@elastic/eui/src/components/date_picker/super_date_picker/date_p
|
|
|
17586
17586
|
import { UseEuiTheme } from '@elastic/eui/src/services';
|
|
17587
17587
|
export const euiDatePopoverButtonStyles: (euiThemeContext: UseEuiTheme) => {
|
|
17588
17588
|
euiDatePopoverButton: import("@emotion/utils").SerializedStyles;
|
|
17589
|
+
now: import("@emotion/utils").SerializedStyles;
|
|
17589
17590
|
};
|
|
17590
17591
|
|
|
17591
17592
|
}
|
|
@@ -20828,6 +20829,7 @@ declare module '@elastic/eui/src/components/page/page_header/page_header_content
|
|
|
20828
20829
|
euiPageHeaderContent__top: import("@emotion/utils").SerializedStyles;
|
|
20829
20830
|
euiPageHeaderContent__leftSideItems: import("@emotion/utils").SerializedStyles;
|
|
20830
20831
|
euiPageHeaderContent__rightSideItems: import("@emotion/utils").SerializedStyles;
|
|
20832
|
+
euiPageHeaderContent__rightSideItem: import("@emotion/utils").SerializedStyles;
|
|
20831
20833
|
euiPageHeaderContent__titleIcon: import("@emotion/utils").SerializedStyles;
|
|
20832
20834
|
};
|
|
20833
20835
|
|
|
@@ -25315,6 +25317,7 @@ declare module '@elastic/eui/.storybook/test' {
|
|
|
25315
25317
|
*/
|
|
25316
25318
|
waitForAndClick: (testSubject: string) => Promise<void>;
|
|
25317
25319
|
waitForEuiPopoverVisible: () => Promise<void>;
|
|
25320
|
+
waitForEuiPopoverHidden: () => Promise<void>;
|
|
25318
25321
|
getByLabelText: (<T extends HTMLElement = HTMLElement>(id: import("@testing-library/dom").Matcher, options?: import("@testing-library/dom").SelectorMatcherOptions | undefined) => T) & ((id: import("@testing-library/dom").Matcher, options?: import("@testing-library/dom").SelectorMatcherOptions | undefined) => HTMLElement);
|
|
25319
25322
|
getAllByLabelText: (<T_1 extends HTMLElement = HTMLElement>(id: import("@testing-library/dom").Matcher, options?: import("@testing-library/dom").SelectorMatcherOptions | undefined) => T_1[]) & ((id: import("@testing-library/dom").Matcher, options?: import("@testing-library/dom").SelectorMatcherOptions | undefined) => HTMLElement[]);
|
|
25320
25323
|
queryByLabelText: (<T_2 extends HTMLElement = HTMLElement>(id: import("@testing-library/dom").Matcher, options?: import("@testing-library/dom").SelectorMatcherOptions | undefined) => T_2 | null) & ((id: import("@testing-library/dom").Matcher, options?: import("@testing-library/dom").SelectorMatcherOptions | undefined) => HTMLElement | null);
|
package/i18ntokens.json
CHANGED
|
@@ -995,14 +995,14 @@
|
|
|
995
995
|
"highlighting": "string",
|
|
996
996
|
"loc": {
|
|
997
997
|
"start": {
|
|
998
|
-
"line":
|
|
998
|
+
"line": 794,
|
|
999
999
|
"column": 8,
|
|
1000
|
-
"index":
|
|
1000
|
+
"index": 23332
|
|
1001
1001
|
},
|
|
1002
1002
|
"end": {
|
|
1003
|
-
"line":
|
|
1003
|
+
"line": 797,
|
|
1004
1004
|
"column": 9,
|
|
1005
|
-
"index":
|
|
1005
|
+
"index": 23451
|
|
1006
1006
|
}
|
|
1007
1007
|
},
|
|
1008
1008
|
"filepath": "src/components/combo_box/combo_box.tsx"
|
|
@@ -320,12 +320,15 @@ var EuiComboBox = exports.EuiComboBox = /*#__PURE__*/function (_Component) {
|
|
|
320
320
|
}
|
|
321
321
|
break;
|
|
322
322
|
case _services.keys.ENTER:
|
|
323
|
-
|
|
324
|
-
event.
|
|
325
|
-
|
|
326
|
-
|
|
327
|
-
|
|
328
|
-
|
|
323
|
+
// Do not block enter keypresses for the clear button or delete selection buttons
|
|
324
|
+
if (event.target === _this.searchInputRefInstance) {
|
|
325
|
+
event.preventDefault();
|
|
326
|
+
event.stopPropagation();
|
|
327
|
+
if (_this.hasActiveOption()) {
|
|
328
|
+
_this.onAddOption(_this.state.matchingOptions[_this.state.activeOptionIndex]);
|
|
329
|
+
} else {
|
|
330
|
+
_this.setCustomOptions(false);
|
|
331
|
+
}
|
|
329
332
|
}
|
|
330
333
|
break;
|
|
331
334
|
case _services.keys.TAB:
|
|
@@ -92,7 +92,9 @@ var EuiDatePopoverButton = exports.EuiDatePopoverButton = function EuiDatePopove
|
|
|
92
92
|
anchorPosition: position === 'start' ? 'downLeft' : 'downRight',
|
|
93
93
|
display: "block",
|
|
94
94
|
panelPaddingSize: "none"
|
|
95
|
-
}, rest
|
|
95
|
+
}, rest, {
|
|
96
|
+
css: value === 'now' && styles.now
|
|
97
|
+
}), (0, _react2.jsx)(_date_popover_content.EuiDatePopoverContent, {
|
|
96
98
|
value: value,
|
|
97
99
|
roundUp: roundUp,
|
|
98
100
|
canRoundRelativeUnits: canRoundRelativeUnits,
|
package/lib/components/date_picker/super_date_picker/date_popover/date_popover_button.styles.js
CHANGED
|
@@ -6,16 +6,24 @@ Object.defineProperty(exports, "__esModule", {
|
|
|
6
6
|
exports.euiDatePopoverButtonStyles = void 0;
|
|
7
7
|
var _react = require("@emotion/react");
|
|
8
8
|
var _super_date_picker = require("../super_date_picker.styles");
|
|
9
|
-
/*
|
|
9
|
+
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)."; } /*
|
|
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
|
|
12
12
|
* 2.0 and the Server Side Public License, v 1; you may not use this file except
|
|
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
|
-
|
|
16
|
+
var _ref = process.env.NODE_ENV === "production" ? {
|
|
17
|
+
name: "170kc3d-now",
|
|
18
|
+
styles: "flex-grow:0.5!important;label:now;"
|
|
19
|
+
} : {
|
|
20
|
+
name: "170kc3d-now",
|
|
21
|
+
styles: "flex-grow:0.5!important;label:now;",
|
|
22
|
+
toString: _EMOTION_STRINGIFIED_CSS_ERROR__
|
|
23
|
+
};
|
|
17
24
|
var euiDatePopoverButtonStyles = exports.euiDatePopoverButtonStyles = function euiDatePopoverButtonStyles(euiThemeContext) {
|
|
18
25
|
return {
|
|
19
|
-
euiDatePopoverButton: /*#__PURE__*/(0, _react.css)((0, _super_date_picker._buttonStyles)(euiThemeContext), ";;label:euiDatePopoverButton;")
|
|
26
|
+
euiDatePopoverButton: /*#__PURE__*/(0, _react.css)((0, _super_date_picker._buttonStyles)(euiThemeContext), ";;label:euiDatePopoverButton;"),
|
|
27
|
+
now: _ref
|
|
20
28
|
};
|
|
21
29
|
};
|
|
@@ -68,7 +68,7 @@ var euiSuperDatePickerStyles = exports.euiSuperDatePickerStyles = function euiSu
|
|
|
68
68
|
// isQuickSelectOnly forces `width` to be `auto`
|
|
69
69
|
isQuickSelectOnly: /*#__PURE__*/(0, _react.css)((0, _global_styling.logicalCSS)('min-width', 0), ".euiFormControlLayout__prepend{", (0, _global_styling.logicalCSS)('max-width', 'none'), ";};label:isQuickSelectOnly;"),
|
|
70
70
|
euiSuperDatePicker__range: _ref,
|
|
71
|
-
euiSuperDatePicker__rangeInput: /*#__PURE__*/(0, _react.css)("flex-grow:1;", (0, _global_styling.logicalCSS)('width', 'auto'), ";;label:euiSuperDatePicker__rangeInput;"),
|
|
71
|
+
euiSuperDatePicker__rangeInput: /*#__PURE__*/(0, _react.css)("flex-grow:1;", (0, _global_styling.logicalCSS)('width', 'auto'), " overflow:hidden;;label:euiSuperDatePicker__rangeInput;"),
|
|
72
72
|
euiSuperDatePicker__prettyFormat: /*#__PURE__*/(0, _react.css)(_buttonStyles(euiThemeContext), " text-align:start;;label:euiSuperDatePicker__prettyFormat;"),
|
|
73
73
|
// Form states
|
|
74
74
|
states: {
|
|
@@ -183,8 +183,9 @@ var EuiPageHeaderContent = exports.EuiPageHeaderContent = function EuiPageHeader
|
|
|
183
183
|
var itemsToRender = isResponsiveBreakpoint ? rightSideItems : _toConsumableArray(rightSideItems).reverse();
|
|
184
184
|
var rightSideFlexItems = itemsToRender.map(function (item, index) {
|
|
185
185
|
return (0, _react2.jsx)(_flex.EuiFlexItem, {
|
|
186
|
+
key: index,
|
|
186
187
|
grow: false,
|
|
187
|
-
|
|
188
|
+
css: contentStyles.euiPageHeaderContent__rightSideItem
|
|
188
189
|
}, item);
|
|
189
190
|
});
|
|
190
191
|
var _cssStyles = [contentStyles.euiPageHeaderContent__rightSideItems, rightSideGroupProps === null || rightSideGroupProps === void 0 ? void 0 : rightSideGroupProps.css];
|
|
@@ -87,7 +87,8 @@ var euiPageHeaderContentStyles = exports.euiPageHeaderContentStyles = function e
|
|
|
87
87
|
},
|
|
88
88
|
euiPageHeaderContent__top: _ref,
|
|
89
89
|
euiPageHeaderContent__leftSideItems: /*#__PURE__*/(0, _react.css)("@container (max-width: ", euiTheme.breakpoint.m, "px){", (0, _global_styling.logicalCSS)('min-width', '50%'), ";};label:euiPageHeaderContent__leftSideItems;"),
|
|
90
|
-
euiPageHeaderContent__rightSideItems: /*#__PURE__*/(0, _react.css)("flex:0 1 auto;align-content:flex-start
|
|
90
|
+
euiPageHeaderContent__rightSideItems: /*#__PURE__*/(0, _react.css)("flex:0 1 auto;align-content:flex-start;", (0, _global_styling.logicalCSS)('max-width', '100%'), "@container (min-width: ", euiTheme.breakpoint.m, "px){", (0, _global_styling.logicalCSS)('max-width', '50%'), " justify-content:flex-end;};label:euiPageHeaderContent__rightSideItems;"),
|
|
91
|
+
euiPageHeaderContent__rightSideItem: /*#__PURE__*/(0, _react.css)((0, _global_styling.logicalCSS)('max-width', '100%'), ";;label:euiPageHeaderContent__rightSideItem;"),
|
|
91
92
|
euiPageHeaderContent__titleIcon: /*#__PURE__*/(0, _react.css)("position:relative;", (0, _global_styling.logicalCSS)('top', "-".concat(euiTheme.size.xs)), " ", (0, _global_styling.logicalCSS)('margin-right', euiTheme.size.base), ";;label:euiPageHeaderContent__titleIcon;")
|
|
92
93
|
};
|
|
93
94
|
};
|
|
@@ -308,12 +308,15 @@ export var EuiComboBox = /*#__PURE__*/function (_Component) {
|
|
|
308
308
|
}
|
|
309
309
|
break;
|
|
310
310
|
case keys.ENTER:
|
|
311
|
-
|
|
312
|
-
event.
|
|
313
|
-
|
|
314
|
-
|
|
315
|
-
|
|
316
|
-
|
|
311
|
+
// Do not block enter keypresses for the clear button or delete selection buttons
|
|
312
|
+
if (event.target === _this.searchInputRefInstance) {
|
|
313
|
+
event.preventDefault();
|
|
314
|
+
event.stopPropagation();
|
|
315
|
+
if (_this.hasActiveOption()) {
|
|
316
|
+
_this.onAddOption(_this.state.matchingOptions[_this.state.activeOptionIndex]);
|
|
317
|
+
} else {
|
|
318
|
+
_this.setCustomOptions(false);
|
|
319
|
+
}
|
|
317
320
|
}
|
|
318
321
|
break;
|
|
319
322
|
case keys.TAB:
|
package/optimize/es/components/date_picker/super_date_picker/date_popover/date_popover_button.js
CHANGED
|
@@ -85,7 +85,9 @@ export var EuiDatePopoverButton = function EuiDatePopoverButton(props) {
|
|
|
85
85
|
anchorPosition: position === 'start' ? 'downLeft' : 'downRight',
|
|
86
86
|
display: "block",
|
|
87
87
|
panelPaddingSize: "none"
|
|
88
|
-
}, rest
|
|
88
|
+
}, rest, {
|
|
89
|
+
css: value === 'now' && styles.now
|
|
90
|
+
}), ___EmotionJSX(EuiDatePopoverContent, {
|
|
89
91
|
value: value,
|
|
90
92
|
roundUp: roundUp,
|
|
91
93
|
canRoundRelativeUnits: canRoundRelativeUnits,
|
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
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)."; }
|
|
1
2
|
/*
|
|
2
3
|
* Copyright Elasticsearch B.V. and/or licensed to Elasticsearch B.V. under one
|
|
3
4
|
* or more contributor license agreements. Licensed under the Elastic License
|
|
@@ -8,8 +9,17 @@
|
|
|
8
9
|
|
|
9
10
|
import { css } from '@emotion/react';
|
|
10
11
|
import { _buttonStyles } from '../super_date_picker.styles';
|
|
12
|
+
var _ref = process.env.NODE_ENV === "production" ? {
|
|
13
|
+
name: "170kc3d-now",
|
|
14
|
+
styles: "flex-grow:0.5!important;label:now;"
|
|
15
|
+
} : {
|
|
16
|
+
name: "170kc3d-now",
|
|
17
|
+
styles: "flex-grow:0.5!important;label:now;",
|
|
18
|
+
toString: _EMOTION_STRINGIFIED_CSS_ERROR__
|
|
19
|
+
};
|
|
11
20
|
export var euiDatePopoverButtonStyles = function euiDatePopoverButtonStyles(euiThemeContext) {
|
|
12
21
|
return {
|
|
13
|
-
euiDatePopoverButton: /*#__PURE__*/css(_buttonStyles(euiThemeContext), ";;label:euiDatePopoverButton;")
|
|
22
|
+
euiDatePopoverButton: /*#__PURE__*/css(_buttonStyles(euiThemeContext), ";;label:euiDatePopoverButton;"),
|
|
23
|
+
now: _ref
|
|
14
24
|
};
|
|
15
25
|
};
|
|
@@ -64,7 +64,7 @@ export var euiSuperDatePickerStyles = function euiSuperDatePickerStyles(euiTheme
|
|
|
64
64
|
// isQuickSelectOnly forces `width` to be `auto`
|
|
65
65
|
isQuickSelectOnly: /*#__PURE__*/css(logicalCSS('min-width', 0), ".euiFormControlLayout__prepend{", logicalCSS('max-width', 'none'), ";};label:isQuickSelectOnly;"),
|
|
66
66
|
euiSuperDatePicker__range: _ref,
|
|
67
|
-
euiSuperDatePicker__rangeInput: /*#__PURE__*/css("flex-grow:1;", logicalCSS('width', 'auto'), ";;label:euiSuperDatePicker__rangeInput;"),
|
|
67
|
+
euiSuperDatePicker__rangeInput: /*#__PURE__*/css("flex-grow:1;", logicalCSS('width', 'auto'), " overflow:hidden;;label:euiSuperDatePicker__rangeInput;"),
|
|
68
68
|
euiSuperDatePicker__prettyFormat: /*#__PURE__*/css(_buttonStyles(euiThemeContext), " text-align:start;;label:euiSuperDatePicker__prettyFormat;"),
|
|
69
69
|
// Form states
|
|
70
70
|
states: {
|
|
@@ -170,8 +170,9 @@ export var EuiPageHeaderContent = function EuiPageHeaderContent(_ref) {
|
|
|
170
170
|
var itemsToRender = isResponsiveBreakpoint ? rightSideItems : _toConsumableArray(rightSideItems).reverse();
|
|
171
171
|
var rightSideFlexItems = itemsToRender.map(function (item, index) {
|
|
172
172
|
return ___EmotionJSX(EuiFlexItem, {
|
|
173
|
+
key: index,
|
|
173
174
|
grow: false,
|
|
174
|
-
|
|
175
|
+
css: contentStyles.euiPageHeaderContent__rightSideItem
|
|
175
176
|
}, item);
|
|
176
177
|
});
|
|
177
178
|
var _cssStyles = [contentStyles.euiPageHeaderContent__rightSideItems, rightSideGroupProps === null || rightSideGroupProps === void 0 ? void 0 : rightSideGroupProps.css];
|
|
@@ -83,7 +83,8 @@ export var euiPageHeaderContentStyles = function euiPageHeaderContentStyles(_ref
|
|
|
83
83
|
},
|
|
84
84
|
euiPageHeaderContent__top: _ref,
|
|
85
85
|
euiPageHeaderContent__leftSideItems: /*#__PURE__*/css("@container (max-width: ", euiTheme.breakpoint.m, "px){", logicalCSS('min-width', '50%'), ";};label:euiPageHeaderContent__leftSideItems;"),
|
|
86
|
-
euiPageHeaderContent__rightSideItems: /*#__PURE__*/css("flex:0 1 auto;align-content:flex-start
|
|
86
|
+
euiPageHeaderContent__rightSideItems: /*#__PURE__*/css("flex:0 1 auto;align-content:flex-start;", logicalCSS('max-width', '100%'), "@container (min-width: ", euiTheme.breakpoint.m, "px){", logicalCSS('max-width', '50%'), " justify-content:flex-end;};label:euiPageHeaderContent__rightSideItems;"),
|
|
87
|
+
euiPageHeaderContent__rightSideItem: /*#__PURE__*/css(logicalCSS('max-width', '100%'), ";;label:euiPageHeaderContent__rightSideItem;"),
|
|
87
88
|
euiPageHeaderContent__titleIcon: /*#__PURE__*/css("position:relative;", logicalCSS('top', "-".concat(euiTheme.size.xs)), " ", logicalCSS('margin-right', euiTheme.size.base), ";;label:euiPageHeaderContent__titleIcon;")
|
|
88
89
|
};
|
|
89
90
|
};
|
|
@@ -313,12 +313,15 @@ var EuiComboBox = exports.EuiComboBox = /*#__PURE__*/function (_Component) {
|
|
|
313
313
|
}
|
|
314
314
|
break;
|
|
315
315
|
case _services.keys.ENTER:
|
|
316
|
-
|
|
317
|
-
event.
|
|
318
|
-
|
|
319
|
-
|
|
320
|
-
|
|
321
|
-
|
|
316
|
+
// Do not block enter keypresses for the clear button or delete selection buttons
|
|
317
|
+
if (event.target === _this.searchInputRefInstance) {
|
|
318
|
+
event.preventDefault();
|
|
319
|
+
event.stopPropagation();
|
|
320
|
+
if (_this.hasActiveOption()) {
|
|
321
|
+
_this.onAddOption(_this.state.matchingOptions[_this.state.activeOptionIndex]);
|
|
322
|
+
} else {
|
|
323
|
+
_this.setCustomOptions(false);
|
|
324
|
+
}
|
|
322
325
|
}
|
|
323
326
|
break;
|
|
324
327
|
case _services.keys.TAB:
|
package/optimize/lib/components/date_picker/super_date_picker/date_popover/date_popover_button.js
CHANGED
|
@@ -90,7 +90,9 @@ var EuiDatePopoverButton = exports.EuiDatePopoverButton = function EuiDatePopove
|
|
|
90
90
|
anchorPosition: position === 'start' ? 'downLeft' : 'downRight',
|
|
91
91
|
display: "block",
|
|
92
92
|
panelPaddingSize: "none"
|
|
93
|
-
}, rest
|
|
93
|
+
}, rest, {
|
|
94
|
+
css: value === 'now' && styles.now
|
|
95
|
+
}), (0, _react2.jsx)(_date_popover_content.EuiDatePopoverContent, {
|
|
94
96
|
value: value,
|
|
95
97
|
roundUp: roundUp,
|
|
96
98
|
canRoundRelativeUnits: canRoundRelativeUnits,
|
|
@@ -6,16 +6,24 @@ Object.defineProperty(exports, "__esModule", {
|
|
|
6
6
|
exports.euiDatePopoverButtonStyles = void 0;
|
|
7
7
|
var _react = require("@emotion/react");
|
|
8
8
|
var _super_date_picker = require("../super_date_picker.styles");
|
|
9
|
-
/*
|
|
9
|
+
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)."; } /*
|
|
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
|
|
12
12
|
* 2.0 and the Server Side Public License, v 1; you may not use this file except
|
|
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
|
-
|
|
16
|
+
var _ref = process.env.NODE_ENV === "production" ? {
|
|
17
|
+
name: "170kc3d-now",
|
|
18
|
+
styles: "flex-grow:0.5!important;label:now;"
|
|
19
|
+
} : {
|
|
20
|
+
name: "170kc3d-now",
|
|
21
|
+
styles: "flex-grow:0.5!important;label:now;",
|
|
22
|
+
toString: _EMOTION_STRINGIFIED_CSS_ERROR__
|
|
23
|
+
};
|
|
17
24
|
var euiDatePopoverButtonStyles = exports.euiDatePopoverButtonStyles = function euiDatePopoverButtonStyles(euiThemeContext) {
|
|
18
25
|
return {
|
|
19
|
-
euiDatePopoverButton: /*#__PURE__*/(0, _react.css)((0, _super_date_picker._buttonStyles)(euiThemeContext), ";;label:euiDatePopoverButton;")
|
|
26
|
+
euiDatePopoverButton: /*#__PURE__*/(0, _react.css)((0, _super_date_picker._buttonStyles)(euiThemeContext), ";;label:euiDatePopoverButton;"),
|
|
27
|
+
now: _ref
|
|
20
28
|
};
|
|
21
29
|
};
|
|
@@ -68,7 +68,7 @@ var euiSuperDatePickerStyles = exports.euiSuperDatePickerStyles = function euiSu
|
|
|
68
68
|
// isQuickSelectOnly forces `width` to be `auto`
|
|
69
69
|
isQuickSelectOnly: /*#__PURE__*/(0, _react.css)((0, _global_styling.logicalCSS)('min-width', 0), ".euiFormControlLayout__prepend{", (0, _global_styling.logicalCSS)('max-width', 'none'), ";};label:isQuickSelectOnly;"),
|
|
70
70
|
euiSuperDatePicker__range: _ref,
|
|
71
|
-
euiSuperDatePicker__rangeInput: /*#__PURE__*/(0, _react.css)("flex-grow:1;", (0, _global_styling.logicalCSS)('width', 'auto'), ";;label:euiSuperDatePicker__rangeInput;"),
|
|
71
|
+
euiSuperDatePicker__rangeInput: /*#__PURE__*/(0, _react.css)("flex-grow:1;", (0, _global_styling.logicalCSS)('width', 'auto'), " overflow:hidden;;label:euiSuperDatePicker__rangeInput;"),
|
|
72
72
|
euiSuperDatePicker__prettyFormat: /*#__PURE__*/(0, _react.css)(_buttonStyles(euiThemeContext), " text-align:start;;label:euiSuperDatePicker__prettyFormat;"),
|
|
73
73
|
// Form states
|
|
74
74
|
states: {
|
|
@@ -176,8 +176,9 @@ var EuiPageHeaderContent = exports.EuiPageHeaderContent = function EuiPageHeader
|
|
|
176
176
|
var itemsToRender = isResponsiveBreakpoint ? rightSideItems : (0, _toConsumableArray2.default)(rightSideItems).reverse();
|
|
177
177
|
var rightSideFlexItems = itemsToRender.map(function (item, index) {
|
|
178
178
|
return (0, _react2.jsx)(_flex.EuiFlexItem, {
|
|
179
|
+
key: index,
|
|
179
180
|
grow: false,
|
|
180
|
-
|
|
181
|
+
css: contentStyles.euiPageHeaderContent__rightSideItem
|
|
181
182
|
}, item);
|
|
182
183
|
});
|
|
183
184
|
var _cssStyles = [contentStyles.euiPageHeaderContent__rightSideItems, rightSideGroupProps === null || rightSideGroupProps === void 0 ? void 0 : rightSideGroupProps.css];
|
|
@@ -87,7 +87,8 @@ var euiPageHeaderContentStyles = exports.euiPageHeaderContentStyles = function e
|
|
|
87
87
|
},
|
|
88
88
|
euiPageHeaderContent__top: _ref,
|
|
89
89
|
euiPageHeaderContent__leftSideItems: /*#__PURE__*/(0, _react.css)("@container (max-width: ", euiTheme.breakpoint.m, "px){", (0, _global_styling.logicalCSS)('min-width', '50%'), ";};label:euiPageHeaderContent__leftSideItems;"),
|
|
90
|
-
euiPageHeaderContent__rightSideItems: /*#__PURE__*/(0, _react.css)("flex:0 1 auto;align-content:flex-start
|
|
90
|
+
euiPageHeaderContent__rightSideItems: /*#__PURE__*/(0, _react.css)("flex:0 1 auto;align-content:flex-start;", (0, _global_styling.logicalCSS)('max-width', '100%'), "@container (min-width: ", euiTheme.breakpoint.m, "px){", (0, _global_styling.logicalCSS)('max-width', '50%'), " justify-content:flex-end;};label:euiPageHeaderContent__rightSideItems;"),
|
|
91
|
+
euiPageHeaderContent__rightSideItem: /*#__PURE__*/(0, _react.css)((0, _global_styling.logicalCSS)('max-width', '100%'), ";;label:euiPageHeaderContent__rightSideItem;"),
|
|
91
92
|
euiPageHeaderContent__titleIcon: /*#__PURE__*/(0, _react.css)("position:relative;", (0, _global_styling.logicalCSS)('top', "-".concat(euiTheme.size.xs)), " ", (0, _global_styling.logicalCSS)('margin-right', euiTheme.size.base), ";;label:euiPageHeaderContent__titleIcon;")
|
|
92
93
|
};
|
|
93
94
|
};
|
package/package.json
CHANGED
|
@@ -314,12 +314,15 @@ var EuiComboBox = exports.EuiComboBox = /*#__PURE__*/function (_Component) {
|
|
|
314
314
|
}
|
|
315
315
|
break;
|
|
316
316
|
case _services.keys.ENTER:
|
|
317
|
-
|
|
318
|
-
event.
|
|
319
|
-
|
|
320
|
-
|
|
321
|
-
|
|
322
|
-
|
|
317
|
+
// Do not block enter keypresses for the clear button or delete selection buttons
|
|
318
|
+
if (event.target === _this.searchInputRefInstance) {
|
|
319
|
+
event.preventDefault();
|
|
320
|
+
event.stopPropagation();
|
|
321
|
+
if (_this.hasActiveOption()) {
|
|
322
|
+
_this.onAddOption(_this.state.matchingOptions[_this.state.activeOptionIndex]);
|
|
323
|
+
} else {
|
|
324
|
+
_this.setCustomOptions(false);
|
|
325
|
+
}
|
|
323
326
|
}
|
|
324
327
|
break;
|
|
325
328
|
case _services.keys.TAB:
|
package/test-env/components/date_picker/super_date_picker/date_popover/date_popover_button.js
CHANGED
|
@@ -91,7 +91,9 @@ var EuiDatePopoverButton = exports.EuiDatePopoverButton = function EuiDatePopove
|
|
|
91
91
|
anchorPosition: position === 'start' ? 'downLeft' : 'downRight',
|
|
92
92
|
display: "block",
|
|
93
93
|
panelPaddingSize: "none"
|
|
94
|
-
}, rest
|
|
94
|
+
}, rest, {
|
|
95
|
+
css: value === 'now' && styles.now
|
|
96
|
+
}), (0, _react2.jsx)(_date_popover_content.EuiDatePopoverContent, {
|
|
95
97
|
value: value,
|
|
96
98
|
roundUp: roundUp,
|
|
97
99
|
canRoundRelativeUnits: canRoundRelativeUnits,
|
package/test-env/components/date_picker/super_date_picker/date_popover/date_popover_button.styles.js
CHANGED
|
@@ -6,16 +6,24 @@ Object.defineProperty(exports, "__esModule", {
|
|
|
6
6
|
exports.euiDatePopoverButtonStyles = void 0;
|
|
7
7
|
var _react = require("@emotion/react");
|
|
8
8
|
var _super_date_picker = require("../super_date_picker.styles");
|
|
9
|
-
/*
|
|
9
|
+
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)."; } /*
|
|
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
|
|
12
12
|
* 2.0 and the Server Side Public License, v 1; you may not use this file except
|
|
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
|
-
|
|
16
|
+
var _ref = process.env.NODE_ENV === "production" ? {
|
|
17
|
+
name: "170kc3d-now",
|
|
18
|
+
styles: "flex-grow:0.5!important;label:now;"
|
|
19
|
+
} : {
|
|
20
|
+
name: "170kc3d-now",
|
|
21
|
+
styles: "flex-grow:0.5!important;label:now;",
|
|
22
|
+
toString: _EMOTION_STRINGIFIED_CSS_ERROR__
|
|
23
|
+
};
|
|
17
24
|
var euiDatePopoverButtonStyles = exports.euiDatePopoverButtonStyles = function euiDatePopoverButtonStyles(euiThemeContext) {
|
|
18
25
|
return {
|
|
19
|
-
euiDatePopoverButton: /*#__PURE__*/(0, _react.css)((0, _super_date_picker._buttonStyles)(euiThemeContext), ";;label:euiDatePopoverButton;")
|
|
26
|
+
euiDatePopoverButton: /*#__PURE__*/(0, _react.css)((0, _super_date_picker._buttonStyles)(euiThemeContext), ";;label:euiDatePopoverButton;"),
|
|
27
|
+
now: _ref
|
|
20
28
|
};
|
|
21
29
|
};
|
|
@@ -68,7 +68,7 @@ var euiSuperDatePickerStyles = exports.euiSuperDatePickerStyles = function euiSu
|
|
|
68
68
|
// isQuickSelectOnly forces `width` to be `auto`
|
|
69
69
|
isQuickSelectOnly: /*#__PURE__*/(0, _react.css)((0, _global_styling.logicalCSS)('min-width', 0), ".euiFormControlLayout__prepend{", (0, _global_styling.logicalCSS)('max-width', 'none'), ";};label:isQuickSelectOnly;"),
|
|
70
70
|
euiSuperDatePicker__range: _ref,
|
|
71
|
-
euiSuperDatePicker__rangeInput: /*#__PURE__*/(0, _react.css)("flex-grow:1;", (0, _global_styling.logicalCSS)('width', 'auto'), ";;label:euiSuperDatePicker__rangeInput;"),
|
|
71
|
+
euiSuperDatePicker__rangeInput: /*#__PURE__*/(0, _react.css)("flex-grow:1;", (0, _global_styling.logicalCSS)('width', 'auto'), " overflow:hidden;;label:euiSuperDatePicker__rangeInput;"),
|
|
72
72
|
euiSuperDatePicker__prettyFormat: /*#__PURE__*/(0, _react.css)(_buttonStyles(euiThemeContext), " text-align:start;;label:euiSuperDatePicker__prettyFormat;"),
|
|
73
73
|
// Form states
|
|
74
74
|
states: {
|
|
@@ -177,8 +177,9 @@ var EuiPageHeaderContent = exports.EuiPageHeaderContent = function EuiPageHeader
|
|
|
177
177
|
var itemsToRender = isResponsiveBreakpoint ? rightSideItems : (0, _toConsumableArray2.default)(rightSideItems).reverse();
|
|
178
178
|
var rightSideFlexItems = itemsToRender.map(function (item, index) {
|
|
179
179
|
return (0, _react2.jsx)(_flex.EuiFlexItem, {
|
|
180
|
+
key: index,
|
|
180
181
|
grow: false,
|
|
181
|
-
|
|
182
|
+
css: contentStyles.euiPageHeaderContent__rightSideItem
|
|
182
183
|
}, item);
|
|
183
184
|
});
|
|
184
185
|
var _cssStyles = [contentStyles.euiPageHeaderContent__rightSideItems, rightSideGroupProps === null || rightSideGroupProps === void 0 ? void 0 : rightSideGroupProps.css];
|
|
@@ -87,7 +87,8 @@ var euiPageHeaderContentStyles = exports.euiPageHeaderContentStyles = function e
|
|
|
87
87
|
},
|
|
88
88
|
euiPageHeaderContent__top: _ref,
|
|
89
89
|
euiPageHeaderContent__leftSideItems: /*#__PURE__*/(0, _react.css)("@container (max-width: ", euiTheme.breakpoint.m, "px){", (0, _global_styling.logicalCSS)('min-width', '50%'), ";};label:euiPageHeaderContent__leftSideItems;"),
|
|
90
|
-
euiPageHeaderContent__rightSideItems: /*#__PURE__*/(0, _react.css)("flex:0 1 auto;align-content:flex-start
|
|
90
|
+
euiPageHeaderContent__rightSideItems: /*#__PURE__*/(0, _react.css)("flex:0 1 auto;align-content:flex-start;", (0, _global_styling.logicalCSS)('max-width', '100%'), "@container (min-width: ", euiTheme.breakpoint.m, "px){", (0, _global_styling.logicalCSS)('max-width', '50%'), " justify-content:flex-end;};label:euiPageHeaderContent__rightSideItems;"),
|
|
91
|
+
euiPageHeaderContent__rightSideItem: /*#__PURE__*/(0, _react.css)((0, _global_styling.logicalCSS)('max-width', '100%'), ";;label:euiPageHeaderContent__rightSideItem;"),
|
|
91
92
|
euiPageHeaderContent__titleIcon: /*#__PURE__*/(0, _react.css)("position:relative;", (0, _global_styling.logicalCSS)('top', "-".concat(euiTheme.size.xs)), " ", (0, _global_styling.logicalCSS)('margin-right', euiTheme.size.base), ";;label:euiPageHeaderContent__titleIcon;")
|
|
92
93
|
};
|
|
93
94
|
};
|