@elastic/eui 109.1.0 → 110.0.0-snapshot.1764684698664
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/basic_table.js +4 -1
- package/es/components/basic_table/in_memory_table.js +86 -233
- package/es/components/breadcrumbs/_breadcrumb_content.js +3 -0
- package/es/components/breadcrumbs/breadcrumbs.js +3 -0
- package/es/components/button/button_group/button_group.styles.js +2 -2
- package/es/components/button/button_group/button_group_button.styles.js +1 -1
- package/es/components/date_picker/super_date_picker/date_popover/absolute_tab.js +12 -2
- 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/super_date_picker.js +35 -17
- package/es/components/date_picker/super_date_picker/super_date_picker.styles.js +1 -3
- 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/flex/flex_item.js +6 -4
- package/es/components/header/header_breadcrumbs/header_breadcrumbs.js +3 -0
- package/es/components/header/header_links/header_links.js +3 -0
- 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/page_header/page_header_content.js +3 -0
- 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/popover/input_popover.js +4 -1
- package/es/components/popover/popover.js +7 -4
- package/es/components/search_bar/search_bar.js +4 -4
- package/es/components/selectable/selectable.js +7 -2
- package/es/components/selectable/selectable_templates/selectable_template_sitewide_popover.js +1 -0
- package/es/components/table/_table_cell_content.styles.js +4 -4
- package/es/components/table/table.js +16 -3
- package/es/components/table/table.styles.js +2 -1
- package/es/components/table/table_cells_shared.styles.js +4 -1
- package/es/components/table/table_context.js +12 -0
- package/es/components/table/table_footer_cell.js +6 -2
- package/es/components/table/table_row.js +5 -2
- package/es/components/table/table_row.styles.js +22 -6
- package/es/components/table/table_row_cell.styles.js +3 -3
- package/es/components/tool_tip/tool_tip_anchor.js +8 -0
- package/es/components/tour/tour_step.js +9 -3
- package/es/global_styling/mixins/_button.js +4 -3
- package/es/global_styling/mixins/_typography.js +9 -0
- package/es/services/string/to_initials.js +26 -4
- package/eui.d.ts +75 -29
- package/lib/components/basic_table/basic_table.js +4 -1
- package/lib/components/basic_table/in_memory_table.js +85 -234
- package/lib/components/breadcrumbs/_breadcrumb_content.js +3 -0
- package/lib/components/button/button_group/button_group.styles.js +1 -1
- package/lib/components/button/button_group/button_group_button.styles.js +1 -1
- package/lib/components/date_picker/super_date_picker/date_popover/absolute_tab.js +12 -2
- 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/super_date_picker.js +34 -16
- package/lib/components/date_picker/super_date_picker/super_date_picker.styles.js +1 -3
- 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/flex/flex_item.js +6 -4
- 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/popover/input_popover.js +4 -1
- package/lib/components/popover/popover.js +7 -4
- package/lib/components/search_bar/search_bar.js +4 -4
- package/lib/components/selectable/selectable.js +7 -2
- package/lib/components/selectable/selectable_templates/selectable_template_sitewide_popover.js +1 -0
- package/lib/components/table/_table_cell_content.styles.js +4 -4
- package/lib/components/table/table.js +16 -3
- package/lib/components/table/table.styles.js +2 -1
- package/lib/components/table/table_cells_shared.styles.js +4 -1
- package/lib/components/table/table_context.js +18 -0
- package/lib/components/table/table_footer_cell.js +9 -2
- package/lib/components/table/table_row.js +8 -2
- package/lib/components/table/table_row.styles.js +20 -4
- package/lib/components/table/table_row_cell.styles.js +3 -3
- package/lib/components/tool_tip/tool_tip_anchor.js +8 -0
- package/lib/components/tour/tour_step.js +6 -3
- package/lib/global_styling/mixins/_button.js +4 -3
- package/lib/global_styling/mixins/_typography.js +10 -1
- package/lib/services/string/to_initials.js +26 -4
- package/optimize/es/components/basic_table/basic_table.js +4 -1
- package/optimize/es/components/basic_table/in_memory_table.js +73 -46
- package/optimize/es/components/button/button_group/button_group.styles.js +2 -2
- package/optimize/es/components/button/button_group/button_group_button.styles.js +1 -1
- package/optimize/es/components/date_picker/super_date_picker/date_popover/absolute_tab.js +12 -2
- 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/super_date_picker.js +35 -17
- package/optimize/es/components/date_picker/super_date_picker/super_date_picker.styles.js +1 -3
- 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/flex/flex_item.js +6 -4
- 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/popover/input_popover.js +4 -1
- package/optimize/es/components/popover/popover.js +4 -4
- package/optimize/es/components/selectable/selectable.js +7 -2
- package/optimize/es/components/selectable/selectable_templates/selectable_template_sitewide_popover.js +1 -0
- package/optimize/es/components/table/_table_cell_content.styles.js +4 -4
- package/optimize/es/components/table/table.js +10 -3
- package/optimize/es/components/table/table.styles.js +2 -1
- package/optimize/es/components/table/table_cells_shared.styles.js +4 -1
- package/optimize/es/components/table/table_context.js +12 -0
- package/optimize/es/components/table/table_footer_cell.js +6 -2
- package/optimize/es/components/table/table_row.js +5 -2
- package/optimize/es/components/table/table_row.styles.js +22 -6
- package/optimize/es/components/table/table_row_cell.styles.js +3 -3
- package/optimize/es/components/tool_tip/tool_tip_anchor.js +8 -0
- package/optimize/es/components/tour/tour_step.js +4 -2
- package/optimize/es/global_styling/mixins/_button.js +4 -3
- package/optimize/es/global_styling/mixins/_typography.js +9 -0
- package/optimize/es/services/string/to_initials.js +26 -4
- package/optimize/lib/components/basic_table/basic_table.js +4 -1
- package/optimize/lib/components/basic_table/in_memory_table.js +72 -47
- package/optimize/lib/components/button/button_group/button_group.styles.js +1 -1
- package/optimize/lib/components/button/button_group/button_group_button.styles.js +1 -1
- package/optimize/lib/components/date_picker/super_date_picker/date_popover/absolute_tab.js +12 -2
- 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/super_date_picker.js +34 -16
- package/optimize/lib/components/date_picker/super_date_picker/super_date_picker.styles.js +1 -3
- 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/flex/flex_item.js +6 -4
- 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/popover/input_popover.js +4 -1
- package/optimize/lib/components/popover/popover.js +4 -4
- package/optimize/lib/components/selectable/selectable.js +7 -2
- package/optimize/lib/components/selectable/selectable_templates/selectable_template_sitewide_popover.js +1 -0
- package/optimize/lib/components/table/_table_cell_content.styles.js +4 -4
- package/optimize/lib/components/table/table.js +10 -3
- package/optimize/lib/components/table/table.styles.js +2 -1
- package/optimize/lib/components/table/table_cells_shared.styles.js +4 -1
- package/optimize/lib/components/table/table_context.js +18 -0
- package/optimize/lib/components/table/table_footer_cell.js +9 -2
- package/optimize/lib/components/table/table_row.js +8 -2
- package/optimize/lib/components/table/table_row.styles.js +20 -4
- package/optimize/lib/components/table/table_row_cell.styles.js +3 -3
- package/optimize/lib/components/tool_tip/tool_tip_anchor.js +8 -0
- package/optimize/lib/components/tour/tour_step.js +4 -2
- package/optimize/lib/global_styling/mixins/_button.js +4 -3
- package/optimize/lib/global_styling/mixins/_typography.js +10 -1
- package/optimize/lib/services/string/to_initials.js +26 -4
- package/package.json +6 -5
- package/test-env/components/basic_table/basic_table.js +4 -1
- package/test-env/components/basic_table/in_memory_table.js +85 -234
- package/test-env/components/breadcrumbs/_breadcrumb_content.js +3 -0
- package/test-env/components/button/button_group/button_group.styles.js +1 -1
- package/test-env/components/button/button_group/button_group_button.styles.js +1 -1
- package/test-env/components/date_picker/super_date_picker/date_popover/absolute_tab.js +12 -2
- 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/super_date_picker.js +34 -16
- package/test-env/components/date_picker/super_date_picker/super_date_picker.styles.js +1 -3
- 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/flex/flex_item.js +6 -4
- 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/popover/input_popover.js +4 -1
- package/test-env/components/popover/popover.js +7 -4
- package/test-env/components/search_bar/search_bar.js +4 -4
- package/test-env/components/selectable/selectable.js +7 -2
- package/test-env/components/selectable/selectable_templates/selectable_template_sitewide_popover.js +1 -0
- package/test-env/components/table/_table_cell_content.styles.js +4 -4
- package/test-env/components/table/table.js +16 -3
- package/test-env/components/table/table.styles.js +2 -1
- package/test-env/components/table/table_cells_shared.styles.js +4 -1
- package/test-env/components/table/table_context.js +18 -0
- package/test-env/components/table/table_footer_cell.js +9 -2
- package/test-env/components/table/table_row.js +8 -2
- package/test-env/components/table/table_row.styles.js +20 -4
- package/test-env/components/table/table_row_cell.styles.js +3 -3
- package/test-env/components/tool_tip/tool_tip_anchor.js +8 -0
- package/test-env/components/tour/tour_step.js +6 -3
- package/test-env/global_styling/mixins/_button.js +4 -3
- package/test-env/global_styling/mixins/_typography.js +10 -1
- package/test-env/services/string/to_initials.js +26 -4
|
@@ -54,7 +54,9 @@ export var EuiTimeZoneDisplay = function EuiTimeZoneDisplay(_ref) {
|
|
|
54
54
|
"data-test-subj": "euiTimeZoneDisplay",
|
|
55
55
|
"aria-label": label
|
|
56
56
|
}, rest), typeof customRender === 'function' ? customRender({
|
|
57
|
-
nameDisplay: nameDisplay
|
|
57
|
+
nameDisplay: nameDisplay,
|
|
58
|
+
utcOffset: utc,
|
|
59
|
+
timeZoneName: name
|
|
58
60
|
}) : nameDisplay);
|
|
59
61
|
};
|
|
60
62
|
|
|
@@ -9,4 +9,5 @@
|
|
|
9
9
|
export { EuiCommonlyUsedTimeRanges } from './commonly_used_time_ranges';
|
|
10
10
|
export { EuiQuickSelectPopover } from './quick_select_popover';
|
|
11
11
|
export { EuiQuickSelect } from './quick_select';
|
|
12
|
+
export { EuiQuickSelectPanel } from './quick_select_panel';
|
|
12
13
|
export { EuiRecentlyUsed } from './recently_used';
|
|
@@ -31,11 +31,13 @@ import PropTypes from "prop-types";
|
|
|
31
31
|
import classNames from 'classnames';
|
|
32
32
|
import moment from 'moment'; // eslint-disable-line import/named
|
|
33
33
|
import dateMath from '@elastic/datemath';
|
|
34
|
-
import { useEuiMemoizedStyles } from '../../../services';
|
|
34
|
+
import { useEuiMemoizedStyles, RenderWithEuiTheme } from '../../../services';
|
|
35
35
|
import { isObject } from '../../../services/predicate';
|
|
36
|
+
import { euiTextTruncateCSS } from '../../../global_styling';
|
|
36
37
|
import { EuiI18nConsumer } from '../../context';
|
|
37
38
|
import { EuiDatePickerRange } from '../date_picker_range';
|
|
38
39
|
import { EuiFormControlButton, EuiFormControlLayout } from '../../form';
|
|
40
|
+
import { EuiToolTip } from '../../tool_tip';
|
|
39
41
|
import { RenderI18nTimeOptions } from './time_options';
|
|
40
42
|
import { PrettyDuration, showPrettyDuration } from './pretty_duration';
|
|
41
43
|
import { EuiTimeWindowButtons } from './time_window_buttons';
|
|
@@ -301,22 +303,38 @@ export var EuiSuperDatePickerInternal = /*#__PURE__*/function (_Component) {
|
|
|
301
303
|
};
|
|
302
304
|
var isDisabledDisplay = isObject(isDisabled) && (isDisabled === null || isDisabled === void 0 ? void 0 : isDisabled.display);
|
|
303
305
|
if (isDisabledDisplay || showPrettyDuration && !isStartDatePopoverOpen && !isEndDatePopoverOpen) {
|
|
304
|
-
|
|
305
|
-
|
|
306
|
-
|
|
307
|
-
|
|
308
|
-
|
|
309
|
-
|
|
310
|
-
|
|
311
|
-
|
|
312
|
-
|
|
313
|
-
|
|
314
|
-
|
|
315
|
-
|
|
316
|
-
|
|
317
|
-
|
|
318
|
-
|
|
319
|
-
|
|
306
|
+
// Tooltip content with full range
|
|
307
|
+
var startMoment = dateMath.parse(start);
|
|
308
|
+
var endMoment = dateMath.parse(end, {
|
|
309
|
+
roundUp: true
|
|
310
|
+
});
|
|
311
|
+
var separator = ' – ';
|
|
312
|
+
var formattedFullRange = isInvalid ? '' : (startMoment === null || startMoment === void 0 ? void 0 : startMoment.format(dateFormat)) + separator + (endMoment === null || endMoment === void 0 ? void 0 : endMoment.format(dateFormat));
|
|
313
|
+
return ___EmotionJSX(RenderWithEuiTheme, null, function (euiTheme) {
|
|
314
|
+
return ___EmotionJSX(EuiFormControlLayout, formControlLayoutProps, !isQuickSelectOnly && ___EmotionJSX(EuiToolTip, {
|
|
315
|
+
css: styles.euiSuperDatePicker__prettyDurationTooltip,
|
|
316
|
+
content: formattedFullRange,
|
|
317
|
+
display: "block",
|
|
318
|
+
offset: euiTheme.euiTheme.base * 0.5
|
|
319
|
+
}, ___EmotionJSX(EuiFormControlButton, {
|
|
320
|
+
type: "button",
|
|
321
|
+
className: classNames('euiSuperDatePicker__prettyFormat', {
|
|
322
|
+
'euiSuperDatePicker__prettyFormat--disabled': isDisabled
|
|
323
|
+
}),
|
|
324
|
+
compressed: compressed,
|
|
325
|
+
"data-test-subj": "superDatePickerShowDatesButton",
|
|
326
|
+
disabled: !!isDisabled,
|
|
327
|
+
onClick: _this.hidePrettyDuration,
|
|
328
|
+
onFocus: onFocus
|
|
329
|
+
}, isDisabledDisplay ? isDisabled.display : ___EmotionJSX("span", {
|
|
330
|
+
css: euiTextTruncateCSS()
|
|
331
|
+
}, ___EmotionJSX(PrettyDuration, {
|
|
332
|
+
timeFrom: start,
|
|
333
|
+
timeTo: end,
|
|
334
|
+
quickRanges: commonlyUsedRanges,
|
|
335
|
+
dateFormat: dateFormat
|
|
336
|
+
})))));
|
|
337
|
+
});
|
|
320
338
|
}
|
|
321
339
|
var rangeCssStyles = [styles.euiSuperDatePicker__range, formControlLayoutProps.css];
|
|
322
340
|
|
|
@@ -65,9 +65,7 @@ export var euiSuperDatePickerStyles = function euiSuperDatePickerStyles(euiTheme
|
|
|
65
65
|
isQuickSelectOnly: /*#__PURE__*/css(logicalCSS('min-width', 0), ".euiFormControlLayout__prepend{", logicalCSS('max-width', 'none'), ";}.euiFormControlLayoutDelimited__delimiter:first-child{", logicalCSS('padding-horizontal', 0), ";};label:isQuickSelectOnly;"),
|
|
66
66
|
euiSuperDatePicker__range: _ref,
|
|
67
67
|
euiSuperDatePicker__rangeInput: /*#__PURE__*/css("flex-grow:1;", logicalCSS('width', 'auto'), " overflow:hidden;;label:euiSuperDatePicker__rangeInput;"),
|
|
68
|
-
|
|
69
|
-
preferred: "\n border: none;\n "
|
|
70
|
-
}), ";;label:euiSuperDatePicker__prettyFormat;"),
|
|
68
|
+
euiSuperDatePicker__prettyDurationTooltip: /*#__PURE__*/css(logicalCSS('max-width', 'min(58ch, 90vw)'), ";;label:euiSuperDatePicker__prettyDurationTooltip;"),
|
|
71
69
|
// Form states
|
|
72
70
|
states: {
|
|
73
71
|
euiSuperDatePicker__formControlLayout: /*#__PURE__*/css(".euiFormControlLayout__childrenWrapper{--euiFormControlStateHoverColor:", forms.borderHovered, ";", highContrastModeStyles(euiThemeContext, {
|
|
@@ -35,7 +35,7 @@ export var EuiTimeWindowButtons = function EuiTimeWindowButtons(_ref) {
|
|
|
35
35
|
zoomFactor = _ref$zoomFactor === void 0 ? ZOOM_FACTOR_DEFAULT : _ref$zoomFactor;
|
|
36
36
|
var buttonColor = 'text';
|
|
37
37
|
var buttonSize = compressed ? 's' : 'm';
|
|
38
|
-
var iconSize =
|
|
38
|
+
var iconSize = 'm';
|
|
39
39
|
var styles = useEuiMemoizedStyles(euiButtonGroupButtonsStyles);
|
|
40
40
|
var _useEuiTimeWindow = useEuiTimeWindow(start, end, applyTime, {
|
|
41
41
|
zoomFactor: zoomFactor
|
|
@@ -236,7 +236,7 @@ describe('EuiFilterGroup multiselect example', function () {
|
|
|
236
236
|
cy.realPress('Enter');
|
|
237
237
|
cy.get('div[data-test-subj="euiSelectableList"]').should('exist');
|
|
238
238
|
cy.realPress('Tab');
|
|
239
|
-
cy.repeatRealPress('ArrowDown',
|
|
239
|
+
cy.repeatRealPress('ArrowDown', 4);
|
|
240
240
|
cy.realPress('Enter');
|
|
241
241
|
cy.get('li[aria-selected="true"]').find('span.euiSelectableListItem__text').should('have.text', 'Dmitri Shostakovich. Checked option. To exclude this option, press Enter.');
|
|
242
242
|
cy.realPress('ArrowDown');
|
|
@@ -19,15 +19,17 @@ var EuiFlexItemInternal = function EuiFlexItemInternal(_ref, ref) {
|
|
|
19
19
|
var children = _ref.children,
|
|
20
20
|
className = _ref.className,
|
|
21
21
|
_ref$grow = _ref.grow,
|
|
22
|
-
|
|
22
|
+
_grow = _ref$grow === void 0 ? true : _ref$grow,
|
|
23
23
|
_ref$component = _ref.component,
|
|
24
24
|
component = _ref$component === void 0 ? 'div' : _ref$component,
|
|
25
25
|
rest = _objectWithoutProperties(_ref, _excluded);
|
|
26
|
+
// resets `grow` to the default value when an invalid value is passed
|
|
27
|
+
var grow = VALID_GROW_VALUES.indexOf(_grow) === -1 ? true : _grow;
|
|
26
28
|
useEffect(function () {
|
|
27
|
-
if (VALID_GROW_VALUES.indexOf(
|
|
28
|
-
|
|
29
|
+
if (process.env.NODE_ENV === 'development' && VALID_GROW_VALUES.indexOf(_grow) === -1) {
|
|
30
|
+
console.warn("Prop `grow` passed to `EuiFlexItem` must be a boolean or an integer between 0 and 10, received `".concat(_grow, "`. Defaulting to `true`."));
|
|
29
31
|
}
|
|
30
|
-
}, [
|
|
32
|
+
}, [_grow]);
|
|
31
33
|
var cssStyles = [styles.euiFlexItem, !grow ? styles.growZero : styles.grow, grow && (typeof grow === 'number' ? styles.growSizes[grow] : styles.growSizes['1'])];
|
|
32
34
|
var classes = classNames('euiFlexItem', className);
|
|
33
35
|
|
|
@@ -101,6 +101,7 @@ EuiHeaderBreadcrumbs.propTypes = {
|
|
|
101
101
|
popoverProps: PropTypes.shape({
|
|
102
102
|
/**
|
|
103
103
|
* Alignment of the popover and arrow relative to the button
|
|
104
|
+
* @default downLeft
|
|
104
105
|
*/
|
|
105
106
|
anchorPosition: PropTypes.any,
|
|
106
107
|
/**
|
|
@@ -122,6 +123,7 @@ EuiHeaderBreadcrumbs.propTypes = {
|
|
|
122
123
|
focusTrapProps: PropTypes.any,
|
|
123
124
|
/**
|
|
124
125
|
* Show arrow indicating to originating button
|
|
126
|
+
* @default false
|
|
125
127
|
*/
|
|
126
128
|
hasArrow: PropTypes.bool,
|
|
127
129
|
/**
|
|
@@ -214,6 +216,7 @@ EuiHeaderBreadcrumbs.propTypes = {
|
|
|
214
216
|
zIndex: PropTypes.number,
|
|
215
217
|
/**
|
|
216
218
|
* Distance away from the anchor that the popover will render
|
|
219
|
+
* @default 4 (0 when `hasArrow=true`)
|
|
217
220
|
*/
|
|
218
221
|
offset: PropTypes.number,
|
|
219
222
|
/**
|
|
@@ -138,6 +138,7 @@ EuiHeaderLinks.propTypes = {
|
|
|
138
138
|
popoverProps: PropTypes.shape({
|
|
139
139
|
/**
|
|
140
140
|
* Alignment of the popover and arrow relative to the button
|
|
141
|
+
* @default downLeft
|
|
141
142
|
*/
|
|
142
143
|
anchorPosition: PropTypes.any,
|
|
143
144
|
/**
|
|
@@ -159,6 +160,7 @@ EuiHeaderLinks.propTypes = {
|
|
|
159
160
|
focusTrapProps: PropTypes.any,
|
|
160
161
|
/**
|
|
161
162
|
* Show arrow indicating to originating button
|
|
163
|
+
* @default false
|
|
162
164
|
*/
|
|
163
165
|
hasArrow: PropTypes.bool,
|
|
164
166
|
/**
|
|
@@ -251,6 +253,7 @@ EuiHeaderLinks.propTypes = {
|
|
|
251
253
|
zIndex: PropTypes.number,
|
|
252
254
|
/**
|
|
253
255
|
* Distance away from the anchor that the popover will render
|
|
256
|
+
* @default 4 (0 when `hasArrow=true`)
|
|
254
257
|
*/
|
|
255
258
|
offset: PropTypes.number,
|
|
256
259
|
/**
|
|
@@ -15,6 +15,7 @@ import PropTypes from "prop-types";
|
|
|
15
15
|
import classNames from 'classnames';
|
|
16
16
|
import { useEuiMemoizedStyles, getSecureRelForTarget } from '../../../services';
|
|
17
17
|
import { validateHref } from '../../../services/security/href_validator';
|
|
18
|
+
import { useEuiButtonColorCSS } from '../../../global_styling';
|
|
18
19
|
import { EuiIcon } from '../../icon';
|
|
19
20
|
import { euiHeaderLogoStyles } from './header_logo.styles';
|
|
20
21
|
import { jsx as ___EmotionJSX } from "@emotion/react";
|
|
@@ -31,6 +32,10 @@ export var EuiHeaderLogo = function EuiHeaderLogo(_ref) {
|
|
|
31
32
|
rest = _objectWithoutProperties(_ref, _excluded);
|
|
32
33
|
var classes = classNames('euiHeaderLogo', className);
|
|
33
34
|
var styles = useEuiMemoizedStyles(euiHeaderLogoStyles);
|
|
35
|
+
var buttonColorStyles = useEuiButtonColorCSS({
|
|
36
|
+
display: 'empty'
|
|
37
|
+
});
|
|
38
|
+
var cssStyles = [styles.euiHeaderLogo, buttonColorStyles.text];
|
|
34
39
|
var secureRel = getSecureRelForTarget({
|
|
35
40
|
href: href,
|
|
36
41
|
rel: rel,
|
|
@@ -41,7 +46,7 @@ export var EuiHeaderLogo = function EuiHeaderLogo(_ref) {
|
|
|
41
46
|
href: isHrefValid ? href : '',
|
|
42
47
|
rel: secureRel,
|
|
43
48
|
target: target,
|
|
44
|
-
css:
|
|
49
|
+
css: cssStyles,
|
|
45
50
|
className: classes
|
|
46
51
|
}, rest), ___EmotionJSX(EuiIcon, {
|
|
47
52
|
"aria-label": iconTitle,
|
|
@@ -15,7 +15,7 @@ export var euiHeaderLogoStyles = function euiHeaderLogoStyles(euiThemeContext) {
|
|
|
15
15
|
var _euiHeaderVariables = euiHeaderVariables(euiThemeContext),
|
|
16
16
|
childHeight = _euiHeaderVariables.childHeight;
|
|
17
17
|
return {
|
|
18
|
-
euiHeaderLogo: /*#__PURE__*/css("position:relative;", logicalCSS('height', childHeight), " line-height:", childHeight, ";", logicalCSS('min-width', childHeight), " padding-inline:", euiTheme.size.s, ";display:inline-flex;align-items:center;white-space:nowrap;", euiBreakpoint(euiThemeContext, ['xs']), "{", logicalCSS('padding-left', euiTheme.size.xs), ";};label:euiHeaderLogo;"),
|
|
18
|
+
euiHeaderLogo: /*#__PURE__*/css("position:relative;", logicalCSS('height', childHeight), " line-height:", childHeight, ";", logicalCSS('min-width', childHeight), " padding-inline:", euiTheme.size.s, ";display:inline-flex;border-radius:", euiTheme.border.radius.small, ";align-items:center;white-space:nowrap;", euiBreakpoint(euiThemeContext, ['xs']), "{", logicalCSS('padding-left', euiTheme.size.xs), ";};label:euiHeaderLogo;"),
|
|
19
19
|
euiHeaderLogo__text: /*#__PURE__*/css(euiTitle(euiThemeContext, 'xxs'), " ", logicalCSS('padding-left', euiTheme.size.base), " ", euiBreakpoint(euiThemeContext, ['xs']), "{", logicalCSS('padding-left', euiTheme.size.s), ";};label:euiHeaderLogo__text;")
|
|
20
20
|
};
|
|
21
21
|
};
|
|
@@ -14,11 +14,11 @@ import { logicalSizeCSS, euiCanAnimate } from '../../global_styling';
|
|
|
14
14
|
export var iconLoadingOpacity = 0.05;
|
|
15
15
|
var iconLoading = keyframes(_templateObject || (_templateObject = _taggedTemplateLiteral(["\n 0% {\n opacity: ", ";\n }\n\n 100% {\n opacity: 1;\n }\n"])), iconLoadingOpacity);
|
|
16
16
|
var _ref = process.env.NODE_ENV === "production" ? {
|
|
17
|
-
name: "
|
|
18
|
-
styles: "*[fill]{fill:none!important;
|
|
17
|
+
name: "p0011s-logoElasticOutline",
|
|
18
|
+
styles: "*[fill]{fill:none!important;stroke:currentColor!important;};label:logoElasticOutline;"
|
|
19
19
|
} : {
|
|
20
|
-
name: "
|
|
21
|
-
styles: "*[fill]{fill:none!important;
|
|
20
|
+
name: "p0011s-logoElasticOutline",
|
|
21
|
+
styles: "*[fill]{fill:none!important;stroke:currentColor!important;};label:logoElasticOutline;",
|
|
22
22
|
toString: _EMOTION_STRINGIFIED_CSS_ERROR__
|
|
23
23
|
};
|
|
24
24
|
var _ref2 = process.env.NODE_ENV === "production" ? {
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
var _excluded = ["children", "restrictWidth", "className", "paddingSize", "grow", "direction"];
|
|
1
|
+
var _excluded = ["children", "restrictWidth", "className", "paddingSize", "grow", "direction", "color"];
|
|
2
2
|
function _extends() { return _extends = Object.assign ? Object.assign.bind() : function (n) { for (var e = 1; e < arguments.length; e++) { var t = arguments[e]; for (var r in t) ({}).hasOwnProperty.call(t, r) && (n[r] = t[r]); } return n; }, _extends.apply(null, arguments); }
|
|
3
3
|
function _objectWithoutProperties(e, t) { if (null == e) return {}; var o, r, i = _objectWithoutPropertiesLoose(e, t); if (Object.getOwnPropertySymbols) { var n = Object.getOwnPropertySymbols(e); for (r = 0; r < n.length; r++) o = n[r], t.indexOf(o) >= 0 || {}.propertyIsEnumerable.call(e, o) && (i[o] = e[o]); } return i; }
|
|
4
4
|
function _objectWithoutPropertiesLoose(r, e) { if (null == r) return {}; var t = {}; for (var n in r) if ({}.hasOwnProperty.call(r, n)) { if (e.indexOf(n) >= 0) continue; t[n] = r[n]; } return t; }
|
|
@@ -14,7 +14,7 @@ import React from 'react';
|
|
|
14
14
|
import PropTypes from "prop-types";
|
|
15
15
|
import classNames from 'classnames';
|
|
16
16
|
import { setStyleForRestrictedPageWidth } from './_restrict_width';
|
|
17
|
-
import { useEuiPaddingCSS } from '../../global_styling';
|
|
17
|
+
import { useEuiPaddingCSS, useEuiBackgroundColorCSS } from '../../global_styling';
|
|
18
18
|
import { euiPageStyles } from './page.styles';
|
|
19
19
|
import { useEuiTheme } from '../../services';
|
|
20
20
|
import { jsx as ___EmotionJSX } from "@emotion/react";
|
|
@@ -29,13 +29,16 @@ export var EuiPage = function EuiPage(_ref) {
|
|
|
29
29
|
grow = _ref$grow === void 0 ? true : _ref$grow,
|
|
30
30
|
_ref$direction = _ref.direction,
|
|
31
31
|
direction = _ref$direction === void 0 ? 'row' : _ref$direction,
|
|
32
|
+
_ref$color = _ref.color,
|
|
33
|
+
color = _ref$color === void 0 ? 'transparent' : _ref$color,
|
|
32
34
|
rest = _objectWithoutProperties(_ref, _excluded);
|
|
33
35
|
// Set max-width as a style prop
|
|
34
36
|
var widthStyles = setStyleForRestrictedPageWidth(restrictWidth, rest === null || rest === void 0 ? void 0 : rest.style);
|
|
35
37
|
var euiTheme = useEuiTheme();
|
|
36
38
|
var styles = euiPageStyles(euiTheme);
|
|
37
39
|
var padding = useEuiPaddingCSS()[paddingSize];
|
|
38
|
-
var
|
|
40
|
+
var backgroundColor = useEuiBackgroundColorCSS()[color];
|
|
41
|
+
var stylesCSS = [styles.euiPage, styles[direction], backgroundColor, grow && styles.grow, padding, restrictWidth && styles.restrictWidth];
|
|
39
42
|
var classes = classNames('euiPage', className);
|
|
40
43
|
return ___EmotionJSX("div", _extends({
|
|
41
44
|
css: stylesCSS,
|
|
@@ -60,6 +63,11 @@ EuiPage.propTypes = {
|
|
|
60
63
|
* Flip to `column` when not including a sidebar.
|
|
61
64
|
*/
|
|
62
65
|
direction: PropTypes.oneOf(["row", "column"]),
|
|
66
|
+
/**
|
|
67
|
+
* Defines the page background color.
|
|
68
|
+
* @default 'transparent'
|
|
69
|
+
*/
|
|
70
|
+
color: PropTypes.oneOf(["plain", "transparent"]),
|
|
63
71
|
className: PropTypes.string,
|
|
64
72
|
"aria-label": PropTypes.string,
|
|
65
73
|
"data-test-subj": PropTypes.string,
|
|
@@ -26,9 +26,8 @@ var _ref2 = process.env.NODE_ENV === "production" ? {
|
|
|
26
26
|
toString: _EMOTION_STRINGIFIED_CSS_ERROR__
|
|
27
27
|
};
|
|
28
28
|
export var euiPageStyles = function euiPageStyles(euiThemeContext) {
|
|
29
|
-
var euiTheme = euiThemeContext.euiTheme;
|
|
30
29
|
return {
|
|
31
|
-
euiPage: /*#__PURE__*/css("display:flex;
|
|
30
|
+
euiPage: /*#__PURE__*/css("display:flex;flex-shrink:0;", logicalCSS('max-width', '100%'), ";;label:euiPage;"),
|
|
32
31
|
// Grow
|
|
33
32
|
grow: _ref2,
|
|
34
33
|
// Direction
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
var _excluded = ["className", "restrictWidth", "paddingSize", "bottomBorder", "alignItems", "responsive", "children", "pageTitle", "pageTitleProps", "iconType", "iconProps", "tabs", "tabsProps", "breadcrumbs", "breadcrumbProps", "description", "rightSideItems", "rightSideGroupProps"];
|
|
1
|
+
var _excluded = ["className", "restrictWidth", "paddingSize", "bottomBorder", "color", "alignItems", "responsive", "children", "pageTitle", "pageTitleProps", "iconType", "iconProps", "tabs", "tabsProps", "breadcrumbs", "breadcrumbProps", "description", "rightSideItems", "rightSideGroupProps"];
|
|
2
2
|
function _extends() { return _extends = Object.assign ? Object.assign.bind() : function (n) { for (var e = 1; e < arguments.length; e++) { var t = arguments[e]; for (var r in t) ({}).hasOwnProperty.call(t, r) && (n[r] = t[r]); } return n; }, _extends.apply(null, arguments); }
|
|
3
3
|
function _objectWithoutProperties(e, t) { if (null == e) return {}; var o, r, i = _objectWithoutPropertiesLoose(e, t); if (Object.getOwnPropertySymbols) { var n = Object.getOwnPropertySymbols(e); for (r = 0; r < n.length; r++) o = n[r], t.indexOf(o) >= 0 || {}.propertyIsEnumerable.call(e, o) && (i[o] = e[o]); } return i; }
|
|
4
4
|
function _objectWithoutPropertiesLoose(r, e) { if (null == r) return {}; var t = {}; for (var n in r) if ({}.hasOwnProperty.call(r, n)) { if (e.indexOf(n) >= 0) continue; t[n] = r[n]; } return t; }
|
|
@@ -14,7 +14,7 @@ import React from 'react';
|
|
|
14
14
|
import PropTypes from "prop-types";
|
|
15
15
|
import classNames from 'classnames';
|
|
16
16
|
import { useEuiTheme } from '../../../services';
|
|
17
|
-
import { useEuiPaddingCSS } from '../../../global_styling';
|
|
17
|
+
import { useEuiPaddingCSS, useEuiBackgroundColorCSS } from '../../../global_styling';
|
|
18
18
|
import { EuiPageHeaderContent } from './page_header_content';
|
|
19
19
|
import { euiPageHeaderStyles } from './page_header.styles';
|
|
20
20
|
import { jsx as ___EmotionJSX } from "@emotion/react";
|
|
@@ -25,6 +25,8 @@ export var EuiPageHeader = function EuiPageHeader(_ref) {
|
|
|
25
25
|
_ref$paddingSize = _ref.paddingSize,
|
|
26
26
|
paddingSize = _ref$paddingSize === void 0 ? 'none' : _ref$paddingSize,
|
|
27
27
|
bottomBorder = _ref.bottomBorder,
|
|
28
|
+
_ref$color = _ref.color,
|
|
29
|
+
color = _ref$color === void 0 ? 'transparent' : _ref$color,
|
|
28
30
|
alignItems = _ref.alignItems,
|
|
29
31
|
_ref$responsive = _ref.responsive,
|
|
30
32
|
responsive = _ref$responsive === void 0 ? true : _ref$responsive,
|
|
@@ -44,7 +46,8 @@ export var EuiPageHeader = function EuiPageHeader(_ref) {
|
|
|
44
46
|
var useTheme = useEuiTheme();
|
|
45
47
|
var styles = euiPageHeaderStyles(useTheme);
|
|
46
48
|
var inlinePadding = useEuiPaddingCSS('horizontal');
|
|
47
|
-
var
|
|
49
|
+
var backgroundColor = useEuiBackgroundColorCSS()[color];
|
|
50
|
+
var cssStyles = [styles.euiPageHeader, inlinePadding[paddingSize], bottomBorder === 'extended' && styles.border, backgroundColor];
|
|
48
51
|
var classes = classNames('euiPageHeader', className);
|
|
49
52
|
var contentProps = {
|
|
50
53
|
restrictWidth: restrictWidth,
|
|
@@ -76,6 +79,11 @@ EuiPageHeader.propTypes = {
|
|
|
76
79
|
* Adjust the overall padding.
|
|
77
80
|
*/
|
|
78
81
|
paddingSize: PropTypes.any,
|
|
82
|
+
/**
|
|
83
|
+
* Define the header background color
|
|
84
|
+
* @default 'transparent'
|
|
85
|
+
*/
|
|
86
|
+
color: PropTypes.oneOf(["plain", "transparent"]),
|
|
79
87
|
className: PropTypes.string,
|
|
80
88
|
"aria-label": PropTypes.string,
|
|
81
89
|
"data-test-subj": PropTypes.string,
|
|
@@ -315,6 +315,7 @@ EuiPageHeaderContent.propTypes = {
|
|
|
315
315
|
popoverProps: PropTypes.shape({
|
|
316
316
|
/**
|
|
317
317
|
* Alignment of the popover and arrow relative to the button
|
|
318
|
+
* @default downLeft
|
|
318
319
|
*/
|
|
319
320
|
anchorPosition: PropTypes.any,
|
|
320
321
|
/**
|
|
@@ -336,6 +337,7 @@ EuiPageHeaderContent.propTypes = {
|
|
|
336
337
|
focusTrapProps: PropTypes.any,
|
|
337
338
|
/**
|
|
338
339
|
* Show arrow indicating to originating button
|
|
340
|
+
* @default false
|
|
339
341
|
*/
|
|
340
342
|
hasArrow: PropTypes.bool,
|
|
341
343
|
/**
|
|
@@ -428,6 +430,7 @@ EuiPageHeaderContent.propTypes = {
|
|
|
428
430
|
zIndex: PropTypes.number,
|
|
429
431
|
/**
|
|
430
432
|
* Distance away from the anchor that the popover will render
|
|
433
|
+
* @default 4 (0 when `hasArrow=true`)
|
|
431
434
|
*/
|
|
432
435
|
offset: PropTypes.number,
|
|
433
436
|
/**
|
|
@@ -12,7 +12,7 @@ function _objectWithoutPropertiesLoose(r, e) { if (null == r) return {}; var t =
|
|
|
12
12
|
|
|
13
13
|
import React from 'react';
|
|
14
14
|
import PropTypes from "prop-types";
|
|
15
|
-
import {
|
|
15
|
+
import { useIsWithinBreakpoints } from '../../../services';
|
|
16
16
|
import { euiPageOuterStyles } from './page_outer.styles';
|
|
17
17
|
import { jsx as ___EmotionJSX } from "@emotion/react";
|
|
18
18
|
export var PAGE_DIRECTIONS = ['row', 'column'];
|
|
@@ -25,8 +25,7 @@ export var _EuiPageOuter = function _EuiPageOuter(_ref) {
|
|
|
25
25
|
_ref$responsive = _ref.responsive,
|
|
26
26
|
responsive = _ref$responsive === void 0 ? ['xs', 's'] : _ref$responsive,
|
|
27
27
|
rest = _objectWithoutProperties(_ref, _excluded);
|
|
28
|
-
var
|
|
29
|
-
var styles = euiPageOuterStyles(themeContext);
|
|
28
|
+
var styles = euiPageOuterStyles;
|
|
30
29
|
var isResponding = useIsWithinBreakpoints(responsive);
|
|
31
30
|
var cssStyles = [styles.euiPageOuter, styles[isResponding ? 'column' : direction], grow && styles.grow];
|
|
32
31
|
return ___EmotionJSX("div", _extends({
|
|
@@ -9,39 +9,33 @@ function _EMOTION_STRINGIFIED_CSS_ERROR__() { return "You have tried to stringif
|
|
|
9
9
|
|
|
10
10
|
import { css } from '@emotion/react';
|
|
11
11
|
import { logicalCSS } from '../../../global_styling';
|
|
12
|
-
var
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
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
|
-
// Grow
|
|
42
|
-
grow: _ref3,
|
|
43
|
-
// Direction
|
|
44
|
-
column: _ref2,
|
|
45
|
-
row: _ref
|
|
46
|
-
};
|
|
12
|
+
export var euiPageOuterStyles = {
|
|
13
|
+
euiPageOuter: /*#__PURE__*/css("display:flex;flex-shrink:0;", logicalCSS('max-width', '100%' // Ensures Firefox doesn't expand width beyond bounds
|
|
14
|
+
), ";;label:euiPageOuter;"),
|
|
15
|
+
// Grow
|
|
16
|
+
grow: process.env.NODE_ENV === "production" ? {
|
|
17
|
+
name: "122lw0e-grow",
|
|
18
|
+
styles: "flex-grow:1;label:grow;"
|
|
19
|
+
} : {
|
|
20
|
+
name: "122lw0e-grow",
|
|
21
|
+
styles: "flex-grow:1;label:grow;",
|
|
22
|
+
toString: _EMOTION_STRINGIFIED_CSS_ERROR__
|
|
23
|
+
},
|
|
24
|
+
// Direction
|
|
25
|
+
column: process.env.NODE_ENV === "production" ? {
|
|
26
|
+
name: "ll8kmq-column",
|
|
27
|
+
styles: "flex-direction:column;label:column;"
|
|
28
|
+
} : {
|
|
29
|
+
name: "ll8kmq-column",
|
|
30
|
+
styles: "flex-direction:column;label:column;",
|
|
31
|
+
toString: _EMOTION_STRINGIFIED_CSS_ERROR__
|
|
32
|
+
},
|
|
33
|
+
row: process.env.NODE_ENV === "production" ? {
|
|
34
|
+
name: "15mvjmo-row",
|
|
35
|
+
styles: "flex-direction:row;label:row;"
|
|
36
|
+
} : {
|
|
37
|
+
name: "15mvjmo-row",
|
|
38
|
+
styles: "flex-direction:row;label:row;",
|
|
39
|
+
toString: _EMOTION_STRINGIFIED_CSS_ERROR__
|
|
40
|
+
}
|
|
47
41
|
};
|
|
@@ -108,7 +108,8 @@ export var _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.string,
|
|
166
167
|
css: PropTypes.any,
|
|
167
168
|
/**
|
|
168
|
-
* Adds a
|
|
169
|
+
* Adds a background and shadow to define the area.
|
|
169
170
|
*/
|
|
170
171
|
panelled: PropTypes.bool,
|
|
171
172
|
/**
|
|
@@ -313,6 +314,11 @@ _EuiPageHeader.propTypes = {
|
|
|
313
314
|
* Adjust the overall padding.
|
|
314
315
|
*/
|
|
315
316
|
paddingSize: PropTypes.any,
|
|
317
|
+
/**
|
|
318
|
+
* Define the header background color
|
|
319
|
+
* @default 'transparent'
|
|
320
|
+
*/
|
|
321
|
+
color: PropTypes.oneOf(["plain", "transparent"]),
|
|
316
322
|
className: PropTypes.string,
|
|
317
323
|
"aria-label": PropTypes.string,
|
|
318
324
|
"data-test-subj": PropTypes.string,
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
function _typeof(o) { "@babel/helpers - typeof"; return _typeof = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function (o) { return typeof o; } : function (o) { return o && "function" == typeof Symbol && o.constructor === Symbol && o !== Symbol.prototype ? "symbol" : typeof o; }, _typeof(o); }
|
|
2
|
-
var _excluded = ["children", "className", "closePopover", "anchorPosition", "attachToAnchor", "repositionToCrossAxis", "display", "panelPaddingSize", "closeOnScroll", "ownFocus", "disableFocusTrap", "focusTrapProps", "input", "fullWidth", "panelMinWidth", "onPanelResize", "inputRef", "panelRef"];
|
|
2
|
+
var _excluded = ["children", "className", "closePopover", "anchorPosition", "attachToAnchor", "repositionToCrossAxis", "display", "panelPaddingSize", "closeOnScroll", "ownFocus", "disableFocusTrap", "focusTrapProps", "input", "fullWidth", "panelMinWidth", "onPanelResize", "inputRef", "panelRef", "offset"];
|
|
3
3
|
function _extends() { return _extends = Object.assign ? Object.assign.bind() : function (n) { for (var e = 1; e < arguments.length; e++) { var t = arguments[e]; for (var r in t) ({}).hasOwnProperty.call(t, r) && (n[r] = t[r]); } return n; }, _extends.apply(null, arguments); }
|
|
4
4
|
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; }
|
|
5
5
|
function _objectSpread(e) { for (var r = 1; r < arguments.length; r++) { var t = null != arguments[r] ? arguments[r] : {}; r % 2 ? ownKeys(Object(t), !0).forEach(function (r) { _defineProperty(e, r, t[r]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e, Object.getOwnPropertyDescriptors(t)) : ownKeys(Object(t)).forEach(function (r) { Object.defineProperty(e, r, Object.getOwnPropertyDescriptor(t, r)); }); } return e; }
|
|
@@ -66,6 +66,8 @@ export var EuiInputPopover = function EuiInputPopover(_ref) {
|
|
|
66
66
|
onPanelResize = _ref.onPanelResize,
|
|
67
67
|
_inputRef = _ref.inputRef,
|
|
68
68
|
_panelRef = _ref.panelRef,
|
|
69
|
+
_ref$offset = _ref.offset,
|
|
70
|
+
offset = _ref$offset === void 0 ? 2 : _ref$offset,
|
|
69
71
|
props = _objectWithoutProperties(_ref, _excluded);
|
|
70
72
|
var classes = classnames('euiInputPopover', className);
|
|
71
73
|
var euiTheme = useEuiTheme();
|
|
@@ -204,6 +206,7 @@ export var EuiInputPopover = function EuiInputPopover(_ref) {
|
|
|
204
206
|
closePopover: closePopover,
|
|
205
207
|
anchorPosition: anchorPosition,
|
|
206
208
|
attachToAnchor: attachToAnchor,
|
|
209
|
+
offset: offset,
|
|
207
210
|
repositionToCrossAxis: repositionToCrossAxis,
|
|
208
211
|
panelPaddingSize: panelPaddingSize,
|
|
209
212
|
ownFocus: ownFocus
|
|
@@ -204,8 +204,8 @@ export var EuiPopover = /*#__PURE__*/function (_Component) {
|
|
|
204
204
|
if (_this.button == null || _this.panel == null) return;
|
|
205
205
|
var _ref6 = _this.props,
|
|
206
206
|
anchorPosition = _ref6.anchorPosition,
|
|
207
|
-
|
|
208
|
-
|
|
207
|
+
_offset = _ref6.offset;
|
|
208
|
+
var offset = _offset != null ? _offset : _this.props.hasArrow ? 0 : 4;
|
|
209
209
|
var position = getPopoverPositionFromAnchorPosition(anchorPosition);
|
|
210
210
|
var forcePosition = undefined;
|
|
211
211
|
if (allowEnforcePosition && _this.state.isOpenStable && _this.state.openPosition != null) {
|
|
@@ -542,14 +542,15 @@ _defineProperty(EuiPopover, "defaultProps", {
|
|
|
542
542
|
isOpen: false,
|
|
543
543
|
ownFocus: true,
|
|
544
544
|
repositionToCrossAxis: true,
|
|
545
|
-
anchorPosition: '
|
|
545
|
+
anchorPosition: 'downLeft',
|
|
546
546
|
panelPaddingSize: 'm',
|
|
547
|
-
hasArrow:
|
|
547
|
+
hasArrow: false,
|
|
548
548
|
display: 'inline-block'
|
|
549
549
|
});
|
|
550
550
|
EuiPopover.propTypes = {
|
|
551
551
|
/**
|
|
552
552
|
* Alignment of the popover and arrow relative to the button
|
|
553
|
+
* @default downLeft
|
|
553
554
|
*/
|
|
554
555
|
anchorPosition: PropTypes.any,
|
|
555
556
|
/**
|
|
@@ -579,6 +580,7 @@ EuiPopover.propTypes = {
|
|
|
579
580
|
focusTrapProps: PropTypes.any,
|
|
580
581
|
/**
|
|
581
582
|
* Show arrow indicating to originating button
|
|
583
|
+
* @default false
|
|
582
584
|
*/
|
|
583
585
|
hasArrow: PropTypes.bool,
|
|
584
586
|
/**
|
|
@@ -675,6 +677,7 @@ EuiPopover.propTypes = {
|
|
|
675
677
|
zIndex: PropTypes.number,
|
|
676
678
|
/**
|
|
677
679
|
* Distance away from the anchor that the popover will render
|
|
680
|
+
* @default 4 (0 when `hasArrow=true`)
|
|
678
681
|
*/
|
|
679
682
|
offset: PropTypes.number,
|
|
680
683
|
/**
|
|
@@ -242,15 +242,15 @@ _defineProperty(EuiSearchBar, "Query", Query);
|
|
|
242
242
|
EuiSearchBar.propTypes = {
|
|
243
243
|
onChange: PropTypes.func,
|
|
244
244
|
/**
|
|
245
|
-
The initial query the bar will hold when first mounted
|
|
245
|
+
* The initial query the bar will hold when first mounted
|
|
246
246
|
*/
|
|
247
247
|
defaultQuery: PropTypes.oneOfType([PropTypes.any.isRequired, PropTypes.string.isRequired]),
|
|
248
248
|
/**
|
|
249
|
-
If you wish to use the search bar as a controlled component, continuously pass the query via this prop.
|
|
249
|
+
* If you wish to use the search bar as a controlled component, continuously pass the query via this prop.
|
|
250
250
|
*/
|
|
251
251
|
query: PropTypes.oneOfType([PropTypes.any.isRequired, PropTypes.string.isRequired]),
|
|
252
252
|
/**
|
|
253
|
-
Configures the search box. Set `placeholder` to change the placeholder text in the box and `incremental` to support incremental (as you type) search.
|
|
253
|
+
* Configures the search box. Set `placeholder` to change the placeholder text in the box and `incremental` to support incremental (as you type) search.
|
|
254
254
|
*/
|
|
255
255
|
box: PropTypes.shape({
|
|
256
256
|
name: PropTypes.string,
|
|
@@ -310,7 +310,7 @@ EuiSearchBar.propTypes = {
|
|
|
310
310
|
}).isRequired, PropTypes.bool.isRequired])
|
|
311
311
|
}),
|
|
312
312
|
/**
|
|
313
|
-
An array of search filters. See {@link SearchFilterConfig}.
|
|
313
|
+
* An array of search filters. See {@link SearchFilterConfig}.
|
|
314
314
|
*/
|
|
315
315
|
filters: PropTypes.arrayOf(PropTypes.oneOfType([PropTypes.shape({
|
|
316
316
|
type: PropTypes.oneOf(["is"]).isRequired,
|
|
@@ -91,6 +91,12 @@ export var EuiSelectable = /*#__PURE__*/function (_Component) {
|
|
|
91
91
|
_this.preventOnFocus = false;
|
|
92
92
|
return;
|
|
93
93
|
}
|
|
94
|
+
if (event && _this.props.searchable && event.target === _this.inputRef) {
|
|
95
|
+
_this.setState({
|
|
96
|
+
isFocused: true
|
|
97
|
+
});
|
|
98
|
+
return;
|
|
99
|
+
}
|
|
94
100
|
if (!_this.state.visibleOptions.length || _this.state.activeOptionIndex != null) {
|
|
95
101
|
return;
|
|
96
102
|
}
|
|
@@ -466,8 +472,7 @@ export var EuiSelectable = /*#__PURE__*/function (_Component) {
|
|
|
466
472
|
onChange: _this2.onSearchChange,
|
|
467
473
|
listId: _this2.optionsListRef.current ? _this2.listId : undefined // Only pass the listId if it exists on the page
|
|
468
474
|
,
|
|
469
|
-
"aria-activedescendant": _this2.makeOptionId(activeOptionIndex)
|
|
470
|
-
,
|
|
475
|
+
"aria-activedescendant": activeOptionIndex != null ? _this2.makeOptionId(activeOptionIndex) : undefined,
|
|
471
476
|
placeholder: placeholderName,
|
|
472
477
|
isPreFiltered: !!isPreFiltered,
|
|
473
478
|
optionMatcher: optionMatcher,
|
package/es/components/selectable/selectable_templates/selectable_template_sitewide_popover.js
CHANGED
|
@@ -31,6 +31,7 @@ export var EuiSelectableTemplateSitewidePopover = function EuiSelectableTemplate
|
|
|
31
31
|
var styles = useEuiMemoizedStyles(euiSelectableTemplateSitewidePopoverStyles);
|
|
32
32
|
return ___EmotionJSX(EuiPopover, _extends({
|
|
33
33
|
panelPaddingSize: "none",
|
|
34
|
+
anchorPosition: "downCenter",
|
|
34
35
|
isOpen: isOpen,
|
|
35
36
|
ownFocus: !!trigger,
|
|
36
37
|
display: trigger ? 'inline-block' : 'block'
|