@elastic/eui 109.1.0-snapshot.1763390960850 → 109.2.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.
Files changed (124) hide show
  1. package/es/components/basic_table/basic_table.js +4 -1
  2. package/es/components/breadcrumbs/_breadcrumb_content.js +3 -0
  3. package/es/components/breadcrumbs/breadcrumbs.js +3 -0
  4. package/es/components/button/button_group/button_group.styles.js +2 -2
  5. package/es/components/button/button_group/button_group_button.styles.js +1 -1
  6. package/es/components/date_picker/super_date_picker/date_popover/absolute_tab.js +7 -1
  7. package/es/components/date_picker/super_date_picker/super_date_picker.js +35 -17
  8. package/es/components/date_picker/super_date_picker/super_date_picker.styles.js +1 -3
  9. package/es/components/flex/flex_item.js +6 -4
  10. package/es/components/header/header_breadcrumbs/header_breadcrumbs.js +3 -0
  11. package/es/components/header/header_links/header_links.js +3 -0
  12. package/es/components/page/page_header/page_header_content.js +3 -0
  13. package/es/components/popover/input_popover.js +4 -1
  14. package/es/components/popover/popover.js +7 -4
  15. package/es/components/selectable/selectable_templates/selectable_template_sitewide_popover.js +1 -0
  16. package/es/components/table/_table_cell_content.styles.js +4 -4
  17. package/es/components/table/table.js +16 -3
  18. package/es/components/table/table.styles.js +2 -1
  19. package/es/components/table/table_cells_shared.styles.js +4 -1
  20. package/es/components/table/table_context.js +12 -0
  21. package/es/components/table/table_footer_cell.js +6 -2
  22. package/es/components/table/table_row.js +5 -2
  23. package/es/components/table/table_row.styles.js +22 -6
  24. package/es/components/table/table_row_cell.styles.js +3 -3
  25. package/es/components/tool_tip/tool_tip_anchor.js +8 -0
  26. package/es/components/tour/tour_step.js +9 -3
  27. package/es/global_styling/mixins/_button.js +4 -3
  28. package/es/global_styling/mixins/_typography.js +9 -0
  29. package/eui.d.ts +37 -8
  30. package/lib/components/basic_table/basic_table.js +4 -1
  31. package/lib/components/breadcrumbs/_breadcrumb_content.js +3 -0
  32. package/lib/components/button/button_group/button_group.styles.js +1 -1
  33. package/lib/components/button/button_group/button_group_button.styles.js +1 -1
  34. package/lib/components/date_picker/super_date_picker/date_popover/absolute_tab.js +7 -1
  35. package/lib/components/date_picker/super_date_picker/super_date_picker.js +34 -16
  36. package/lib/components/date_picker/super_date_picker/super_date_picker.styles.js +1 -3
  37. package/lib/components/flex/flex_item.js +6 -4
  38. package/lib/components/popover/input_popover.js +4 -1
  39. package/lib/components/popover/popover.js +7 -4
  40. package/lib/components/selectable/selectable_templates/selectable_template_sitewide_popover.js +1 -0
  41. package/lib/components/table/_table_cell_content.styles.js +4 -4
  42. package/lib/components/table/table.js +16 -3
  43. package/lib/components/table/table.styles.js +2 -1
  44. package/lib/components/table/table_cells_shared.styles.js +4 -1
  45. package/lib/components/table/table_context.js +18 -0
  46. package/lib/components/table/table_footer_cell.js +9 -2
  47. package/lib/components/table/table_row.js +8 -2
  48. package/lib/components/table/table_row.styles.js +20 -4
  49. package/lib/components/table/table_row_cell.styles.js +3 -3
  50. package/lib/components/tool_tip/tool_tip_anchor.js +8 -0
  51. package/lib/components/tour/tour_step.js +6 -3
  52. package/lib/global_styling/mixins/_button.js +4 -3
  53. package/lib/global_styling/mixins/_typography.js +10 -1
  54. package/optimize/es/components/basic_table/basic_table.js +4 -1
  55. package/optimize/es/components/button/button_group/button_group.styles.js +2 -2
  56. package/optimize/es/components/button/button_group/button_group_button.styles.js +1 -1
  57. package/optimize/es/components/date_picker/super_date_picker/date_popover/absolute_tab.js +7 -1
  58. package/optimize/es/components/date_picker/super_date_picker/super_date_picker.js +35 -17
  59. package/optimize/es/components/date_picker/super_date_picker/super_date_picker.styles.js +1 -3
  60. package/optimize/es/components/flex/flex_item.js +6 -4
  61. package/optimize/es/components/popover/input_popover.js +4 -1
  62. package/optimize/es/components/popover/popover.js +4 -4
  63. package/optimize/es/components/selectable/selectable_templates/selectable_template_sitewide_popover.js +1 -0
  64. package/optimize/es/components/table/_table_cell_content.styles.js +4 -4
  65. package/optimize/es/components/table/table.js +10 -3
  66. package/optimize/es/components/table/table.styles.js +2 -1
  67. package/optimize/es/components/table/table_cells_shared.styles.js +4 -1
  68. package/optimize/es/components/table/table_context.js +12 -0
  69. package/optimize/es/components/table/table_footer_cell.js +6 -2
  70. package/optimize/es/components/table/table_row.js +5 -2
  71. package/optimize/es/components/table/table_row.styles.js +22 -6
  72. package/optimize/es/components/table/table_row_cell.styles.js +3 -3
  73. package/optimize/es/components/tool_tip/tool_tip_anchor.js +8 -0
  74. package/optimize/es/components/tour/tour_step.js +4 -2
  75. package/optimize/es/global_styling/mixins/_button.js +4 -3
  76. package/optimize/es/global_styling/mixins/_typography.js +9 -0
  77. package/optimize/lib/components/basic_table/basic_table.js +4 -1
  78. package/optimize/lib/components/button/button_group/button_group.styles.js +1 -1
  79. package/optimize/lib/components/button/button_group/button_group_button.styles.js +1 -1
  80. package/optimize/lib/components/date_picker/super_date_picker/date_popover/absolute_tab.js +7 -1
  81. package/optimize/lib/components/date_picker/super_date_picker/super_date_picker.js +34 -16
  82. package/optimize/lib/components/date_picker/super_date_picker/super_date_picker.styles.js +1 -3
  83. package/optimize/lib/components/flex/flex_item.js +6 -4
  84. package/optimize/lib/components/popover/input_popover.js +4 -1
  85. package/optimize/lib/components/popover/popover.js +4 -4
  86. package/optimize/lib/components/selectable/selectable_templates/selectable_template_sitewide_popover.js +1 -0
  87. package/optimize/lib/components/table/_table_cell_content.styles.js +4 -4
  88. package/optimize/lib/components/table/table.js +10 -3
  89. package/optimize/lib/components/table/table.styles.js +2 -1
  90. package/optimize/lib/components/table/table_cells_shared.styles.js +4 -1
  91. package/optimize/lib/components/table/table_context.js +18 -0
  92. package/optimize/lib/components/table/table_footer_cell.js +9 -2
  93. package/optimize/lib/components/table/table_row.js +8 -2
  94. package/optimize/lib/components/table/table_row.styles.js +20 -4
  95. package/optimize/lib/components/table/table_row_cell.styles.js +3 -3
  96. package/optimize/lib/components/tool_tip/tool_tip_anchor.js +8 -0
  97. package/optimize/lib/components/tour/tour_step.js +4 -2
  98. package/optimize/lib/global_styling/mixins/_button.js +4 -3
  99. package/optimize/lib/global_styling/mixins/_typography.js +10 -1
  100. package/package.json +5 -6
  101. package/test-env/components/basic_table/basic_table.js +4 -1
  102. package/test-env/components/breadcrumbs/_breadcrumb_content.js +3 -0
  103. package/test-env/components/button/button_group/button_group.styles.js +1 -1
  104. package/test-env/components/button/button_group/button_group_button.styles.js +1 -1
  105. package/test-env/components/date_picker/super_date_picker/date_popover/absolute_tab.js +7 -1
  106. package/test-env/components/date_picker/super_date_picker/super_date_picker.js +34 -16
  107. package/test-env/components/date_picker/super_date_picker/super_date_picker.styles.js +1 -3
  108. package/test-env/components/flex/flex_item.js +6 -4
  109. package/test-env/components/popover/input_popover.js +4 -1
  110. package/test-env/components/popover/popover.js +7 -4
  111. package/test-env/components/selectable/selectable_templates/selectable_template_sitewide_popover.js +1 -0
  112. package/test-env/components/table/_table_cell_content.styles.js +4 -4
  113. package/test-env/components/table/table.js +16 -3
  114. package/test-env/components/table/table.styles.js +2 -1
  115. package/test-env/components/table/table_cells_shared.styles.js +4 -1
  116. package/test-env/components/table/table_context.js +18 -0
  117. package/test-env/components/table/table_footer_cell.js +9 -2
  118. package/test-env/components/table/table_row.js +8 -2
  119. package/test-env/components/table/table_row.styles.js +20 -4
  120. package/test-env/components/table/table_row_cell.styles.js +3 -3
  121. package/test-env/components/tool_tip/tool_tip_anchor.js +8 -0
  122. package/test-env/components/tour/tour_step.js +6 -3
  123. package/test-env/global_styling/mixins/_button.js +4 -3
  124. package/test-env/global_styling/mixins/_typography.js +10 -1
@@ -70,10 +70,10 @@ export var euiTableRowCellStyles = function euiTableRowCellStyles(euiThemeContex
70
70
  rightColumnContent: "\n position: absolute;\n ".concat(logicalCSS('right', 0), "\n ").concat(logicalCSS('min-width', '0'), "\n ").concat(logicalCSS('width', mobileSizes.actions.width), "\n "),
71
71
  get actions() {
72
72
  // Note: Visible-on-hover actions on desktop always show on mobile
73
- return /*#__PURE__*/css(this.rightColumnContent, " ", logicalCSS('top', mobileSizes.actions.offset), ";;label:actions;");
73
+ return /*#__PURE__*/css(this.rightColumnContent, " ", logicalCSS('top', mobileSizes.actions.offset), ".euiTableCellContent{padding:0;};label:actions;");
74
74
  },
75
75
  get expander() {
76
- return /*#__PURE__*/css(this.rightColumnContent, " ", logicalCSS('bottom', mobileSizes.actions.offset), ";;label:expander;");
76
+ return /*#__PURE__*/css(this.rightColumnContent, ";;label:expander;");
77
77
  },
78
78
  /**
79
79
  * Custom actions may not be icons and therefore may not fit in a column
@@ -84,6 +84,6 @@ export var euiTableRowCellStyles = function euiTableRowCellStyles(euiThemeContex
84
84
  },
85
85
  euiTableRowCell__mobileHeader: /*#__PURE__*/css(euiTextTruncate(), " font-size:", euiFontSize(euiThemeContext, 's', {
86
86
  customScale: 'xxs'
87
- }).fontSize, ";display:block;color:", euiTheme.colors.darkShade, ";padding:", euiTheme.size.s, ";padding-block-end:0;margin-block-end:-", euiTheme.size.s, ";.euiTableRowCell:not(:only-child) &{", logicalCSS('min-height', euiTheme.size.l), ";};label:euiTableRowCell__mobileHeader;")
87
+ }).fontSize, ";display:block;color:", euiTheme.colors.textSubdued, ";padding:", euiTheme.size.s, ";padding-block-end:0;margin-block-end:-", euiTheme.size.s, ";.euiTableRowCell:not(:only-child) &{", logicalCSS('min-height', euiTheme.size.l), ";};label:euiTableRowCell__mobileHeader;")
88
88
  };
89
89
  };
@@ -13,6 +13,7 @@ function _objectWithoutPropertiesLoose(r, e) { if (null == r) return {}; var t =
13
13
  import React, { cloneElement, forwardRef } from 'react';
14
14
  import PropTypes from "prop-types";
15
15
  import classNames from 'classnames';
16
+ import { useGeneratedHtmlId } from '../../services';
16
17
  import { euiToolTipAnchorStyles } from './tool_tip.styles';
17
18
  import { jsx as ___EmotionJSX } from "@emotion/react";
18
19
  export var EuiToolTipAnchor = /*#__PURE__*/forwardRef(function (_ref, ref) {
@@ -29,11 +30,18 @@ export var EuiToolTipAnchor = /*#__PURE__*/forwardRef(function (_ref, ref) {
29
30
  var anchorCss = euiToolTipAnchorStyles();
30
31
  var cssStyles = [anchorCss.euiToolTipAnchor, anchorCss[display]];
31
32
  var classes = classNames('euiToolTipAnchor', className);
33
+ var anchorId = useGeneratedHtmlId({
34
+ suffix: 'euiToolTipAnchor',
35
+ conditionalId: id ? "".concat(id, "-wrapper") : undefined
36
+ });
32
37
  return (
33
38
  // eslint-disable-next-line jsx-a11y/mouse-events-have-key-events
34
39
  ___EmotionJSX("span", _extends({
35
40
  ref: ref,
36
41
  css: cssStyles
42
+ /* A11y: NVDA combines elements with identical markup into a single navigational stop. ¯\_(ツ)_/¯
43
+ The `id` ensures the wrappers are unique and navigated as standalone elements. (data- attributes don't work) */,
44
+ id: anchorId
37
45
  }, rest, {
38
46
  className: classes,
39
47
  onMouseOver: onMouseOver,
@@ -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 = ["anchorPosition", "anchor", "children", "className", "css", "closePopover", "content", "isStepOpen", "minWidth", "maxWidth", "onFinish", "step", "stepsTotal", "subtitle", "title", "decoration", "footerAction", "panelProps", "panelClassName"];
2
+ var _excluded = ["anchorPosition", "anchor", "children", "className", "css", "closePopover", "content", "isStepOpen", "minWidth", "maxWidth", "onFinish", "step", "stepsTotal", "subtitle", "title", "decoration", "hasArrow", "footerAction", "panelProps", "panelClassName"];
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; }
@@ -57,6 +57,7 @@ export var EuiTourStep = function EuiTourStep(_ref) {
57
57
  title = _ref.title,
58
58
  _ref$decoration = _ref.decoration,
59
59
  decoration = _ref$decoration === void 0 ? 'beacon' : _ref$decoration,
60
+ hasArrow = _ref.hasArrow,
60
61
  footerAction = _ref.footerAction,
61
62
  panelProps = _ref.panelProps,
62
63
  panelClassName = _ref.panelClassName,
@@ -118,8 +119,9 @@ export var EuiTourStep = function EuiTourStep(_ref) {
118
119
  panelProps: _objectSpread(_objectSpread({}, panelProps), {}, {
119
120
  css: [tourStyles.euiTour, css, panelProps === null || panelProps === void 0 ? void 0 : panelProps.css]
120
121
  }),
121
- offset: hasBeacon ? 10 : 0,
122
+ offset: hasBeacon && hasArrow !== false ? 10 : undefined,
122
123
  "aria-labelledby": titleId,
124
+ hasArrow: hasArrow !== null && hasArrow !== void 0 ? hasArrow : hasBeacon,
123
125
  arrowChildren: hasBeacon && ___EmotionJSX(EuiBeacon, {
124
126
  css: beaconCss,
125
127
  className: "euiTour__beacon"
@@ -150,6 +152,7 @@ EuiTourStep.propTypes = {
150
152
  css: PropTypes.any,
151
153
  /**
152
154
  * Alignment of the popover and arrow relative to the button
155
+ * @default downLeft
153
156
  */
154
157
  anchorPosition: PropTypes.any,
155
158
  /**
@@ -171,6 +174,7 @@ EuiTourStep.propTypes = {
171
174
  focusTrapProps: PropTypes.any,
172
175
  /**
173
176
  * Show arrow indicating to originating button
177
+ * @default false
174
178
  */
175
179
  hasArrow: PropTypes.bool,
176
180
  /**
@@ -263,6 +267,7 @@ EuiTourStep.propTypes = {
263
267
  zIndex: PropTypes.number,
264
268
  /**
265
269
  * Distance away from the anchor that the popover will render
270
+ * @default 4 (0 when `hasArrow=true`)
266
271
  */
267
272
  offset: PropTypes.number,
268
273
  /**
@@ -327,7 +332,8 @@ EuiTourStep.propTypes = {
327
332
  */
328
333
  title: PropTypes.node.isRequired,
329
334
  /**
330
- * Extra visual indication of step location
335
+ * Extra visual indication of step location.
336
+ * It does not apply when `hasArrow=false`
331
337
  */
332
338
  decoration: PropTypes.oneOf(["none", "beacon"]),
333
339
  /**
@@ -22,6 +22,7 @@ import { css } from '@emotion/react';
22
22
  import { getTokenName, mathWithUnits } from '@elastic/eui-theme-common';
23
23
  import { makeHighContrastColor, useEuiMemoizedStyles } from '../../services';
24
24
  import { highContrastModeStyles, logicalCSS } from '../functions';
25
+ import { euiDisabledSelector } from '../utility/selectors';
25
26
 
26
27
  /** Tentative usage; these exist only to be used as button directly when used within other components */
27
28
  export var SEVERITY_COLORS = ['neutral', 'risk'];
@@ -212,11 +213,11 @@ var _interactionStyles = function _interactionStyles(euiThemeContext, buttonColo
212
213
  var baseStyles = function baseStyles() {
213
214
  // button hover is applied as pseudo element with a transparent background-color
214
215
  if (type === 'overlay') {
215
- return "\n position: relative;\n overflow: hidden;\n\n &:hover:not(:disabled) {\n &::before {\n content: '';\n position: absolute;\n /* should stay under the content */\n z-index: 0;\n inset: 0;\n background-color: ".concat(buttonColors.backgroundHover, ";\n pointer-events: none;\n }\n }\n\n &:active:not(:disabled) {\n &::before {\n ").concat(logicalCSS('width', '100%'), "\n ").concat(logicalCSS('height', '100%'), "\n\n content: '';\n position: absolute;\n inset: 0;\n background-color: ").concat(buttonColors.backgroundActive, ";\n }\n }\n ");
216
+ return "\n position: relative;\n overflow: hidden;\n\n &:hover:not(".concat(euiDisabledSelector, ") {\n &::before {\n content: '';\n position: absolute;\n /* should stay under the content */\n z-index: 0;\n inset: 0;\n background-color: ").concat(buttonColors.backgroundHover, ";\n pointer-events: none;\n }\n }\n\n &:active:not(").concat(euiDisabledSelector, ") {\n &::before {\n ").concat(logicalCSS('width', '100%'), "\n ").concat(logicalCSS('height', '100%'), "\n\n content: '';\n position: absolute;\n inset: 0;\n background-color: ").concat(buttonColors.backgroundActive, ";\n }\n }\n ");
216
217
  }
217
218
 
218
219
  // button hover is applied as opaque color
219
- return "\n &:hover:not(:disabled) {\n background-color: ".concat(buttonColors.backgroundHover, ";\n }\n\n &:active:not(:disabled) {\n background-color: ").concat(buttonColors.backgroundActive, ";\n }\n ");
220
+ return "\n &:hover:not(".concat(euiDisabledSelector, ") {\n background-color: ").concat(buttonColors.backgroundHover, ";\n }\n\n &:active:not(").concat(euiDisabledSelector, ") {\n background-color: ").concat(buttonColors.backgroundActive, ";\n }\n ");
220
221
  };
221
222
  return " \n ".concat(highContrastModeStyles(euiThemeContext, {
222
223
  none: baseStyles(),
@@ -229,7 +230,7 @@ var _interactionStyles = function _interactionStyles(euiThemeContext, buttonColo
229
230
  */
230
231
  export var highContrastHoverIndicatorStyles = function highContrastHoverIndicatorStyles(_ref2) {
231
232
  var euiTheme = _ref2.euiTheme;
232
- return "\n &:hover:not(:disabled) {\n transition: none;\n\n /* using pseudo border to be able to control the color */\n &::after {\n content: '';\n position: absolute;\n inset: ".concat(euiTheme.border.width.thin, ";\n border: ").concat(euiTheme.border.width.thick, " solid var(--highContrastHoverIndicatorColor, ").concat(euiTheme.border.color, ");\n border-radius: ").concat(mathWithUnits(euiTheme.border.radius.small, function (x) {
233
+ return "\n &:hover:not(".concat(euiDisabledSelector, ") {\n transition: none;\n\n /* using pseudo border to be able to control the color */\n &::after {\n content: '';\n position: absolute;\n inset: ").concat(euiTheme.border.width.thin, ";\n border: ").concat(euiTheme.border.width.thick, " solid var(--highContrastHoverIndicatorColor, ").concat(euiTheme.border.color, ");\n border-radius: ").concat(mathWithUnits(euiTheme.border.radius.small, function (x) {
233
234
  return x / 2;
234
235
  }), ";\n background-color: transparent;\n pointer-events: none;\n }\n }\n");
235
236
  };
@@ -12,6 +12,7 @@ function _toPrimitive(t, r) { if ("object" != _typeof(t) || !t) return t; var e
12
12
  * Side Public License, v 1.
13
13
  */
14
14
 
15
+ import { css } from '@emotion/react';
15
16
  import { euiLineHeightFromBaseline, euiFontSizeFromScale } from '../functions/typography';
16
17
  import { useEuiMemoizedStyles, useEuiTheme } from '../../services/theme';
17
18
  import { EuiThemeFontScales } from '../variables/typography';
@@ -56,6 +57,14 @@ export var euiTextTruncate = function euiTextTruncate() {
56
57
  , "\n overflow: hidden !important;\n text-overflow: ellipsis !important;\n white-space: nowrap !important;\n");
57
58
  };
58
59
 
60
+ /**
61
+ * Emotion CSS wrapper around `euiTextTruncate` style.
62
+ */
63
+ export var euiTextTruncateCSS = function euiTextTruncateCSS() {
64
+ var maxWidth = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : '100%';
65
+ return /*#__PURE__*/css(euiTextTruncate(maxWidth), ";;label:euiTextTruncateCSS;");
66
+ };
67
+
59
68
  /**
60
69
  * Fixed-width numbers for tabular data
61
70
  */
package/eui.d.ts CHANGED
@@ -1136,6 +1136,10 @@ declare module '@elastic/eui/src/global_styling/functions' {
1136
1136
  export * from '@elastic/eui/src/global_styling/functions/size';
1137
1137
  export * from '@elastic/eui/src/global_styling/functions/typography';
1138
1138
 
1139
+ }
1140
+ declare module '@elastic/eui/src/global_styling/utility/selectors' {
1141
+ export const euiDisabledSelector = ":disabled, [aria-disabled=\"true\"]";
1142
+
1139
1143
  }
1140
1144
  declare module '@elastic/eui/src/global_styling/mixins/_button' {
1141
1145
  import { type SerializedStyles } from '@emotion/react';
@@ -1387,6 +1391,10 @@ declare module '@elastic/eui/src/global_styling/mixins/_typography' {
1387
1391
  * Prevent text from wrapping onto multiple lines, and truncate with an ellipsis.
1388
1392
  */
1389
1393
  export const euiTextTruncate: (maxWidth?: CSSProperties["maxWidth"]) => string;
1394
+ /**
1395
+ * Emotion CSS wrapper around `euiTextTruncate` style.
1396
+ */
1397
+ export const euiTextTruncateCSS: (maxWidth?: CSSProperties["maxWidth"]) => import("@emotion/react").SerializedStyles;
1390
1398
  /**
1391
1399
  * Fixed-width numbers for tabular data
1392
1400
  */
@@ -1514,10 +1522,6 @@ declare module '@elastic/eui/src/global_styling/utility/animations' {
1514
1522
  export const euiAnimSlideX: (size: string) => import("@emotion/serialize").Keyframes;
1515
1523
  export const euiAnimScale: import("@emotion/serialize").Keyframes;
1516
1524
 
1517
- }
1518
- declare module '@elastic/eui/src/global_styling/utility/selectors' {
1519
- export const euiDisabledSelector = ":disabled, [aria-disabled=\"true\"]";
1520
-
1521
1525
  }
1522
1526
  declare module '@elastic/eui/src/global_styling' {
1523
1527
  export * from '@elastic/eui/src/global_styling/reset/global_styles';
@@ -2049,6 +2053,12 @@ declare module '@elastic/eui/src/components/table/mobile/responsive_context' {
2049
2053
  export const EuiTableIsResponsiveContext: import("react").Context<boolean>;
2050
2054
  export const useEuiTableIsResponsive: () => boolean;
2051
2055
 
2056
+ }
2057
+ declare module '@elastic/eui/src/components/table/table_context' {
2058
+ export const EuiTableVariantContext: import("react").Context<{
2059
+ hasBackground: boolean;
2060
+ }>;
2061
+
2052
2062
  }
2053
2063
  declare module '@elastic/eui/src/components/table/table.styles' {
2054
2064
  import { UseEuiTheme } from '@elastic/eui/src/services';
@@ -2073,6 +2083,7 @@ declare module '@elastic/eui/src/components/table/table.styles' {
2073
2083
  fixed: import("@emotion/react").SerializedStyles;
2074
2084
  auto: import("@emotion/react").SerializedStyles;
2075
2085
  };
2086
+ hasBackground: import("@emotion/react").SerializedStyles;
2076
2087
  /**
2077
2088
  * 1. The padding on the `.euiTableCellContent` div allows the ellipsis to show if the
2078
2089
  * content is truncated. If the padding was on the cell, the ellipsis would be cropped.
@@ -2109,8 +2120,14 @@ declare module '@elastic/eui/src/components/table/table' {
2109
2120
  responsiveBreakpoint?: EuiBreakpointSize | boolean;
2110
2121
  /**
2111
2122
  * Sets the table-layout CSS property
2123
+ * @default 'fixed'
2112
2124
  */
2113
2125
  tableLayout?: 'fixed' | 'auto';
2126
+ /**
2127
+ * Toggle the table's background
2128
+ * @default true
2129
+ */
2130
+ hasBackground?: boolean;
2114
2131
  }
2115
2132
  export const EuiTable: FunctionComponent<EuiTableProps>;
2116
2133
 
@@ -2496,7 +2513,10 @@ declare module '@elastic/eui/src/components/table/table_cells_shared.styles' {
2496
2513
  euiTableHeaderCell: import("@emotion/react").SerializedStyles;
2497
2514
  euiTableHeaderCell__content: import("@emotion/react").SerializedStyles;
2498
2515
  euiTableHeaderCell__button: import("@emotion/react").SerializedStyles;
2499
- euiTableFooterCell: import("@emotion/react").SerializedStyles;
2516
+ euiTableFooterCell: {
2517
+ euiTableFooterCell: import("@emotion/react").SerializedStyles;
2518
+ hasBackground: import("@emotion/react").SerializedStyles;
2519
+ };
2500
2520
  };
2501
2521
  export const euiTableCellCheckboxStyles: (euiThemeContext: UseEuiTheme) => {
2502
2522
  euiTableHeaderCellCheckbox: import("@emotion/react").SerializedStyles;
@@ -5703,13 +5723,18 @@ declare module '@elastic/eui/src/components/table/table_row.styles' {
5703
5723
  euiTableRow: import("@emotion/react").SerializedStyles;
5704
5724
  desktop: {
5705
5725
  desktop: import("@emotion/react").SerializedStyles;
5706
- expanded: import("@emotion/react").SerializedStyles;
5726
+ expanded: {
5727
+ expanded: import("@emotion/react").SerializedStyles;
5728
+ hasBackground: string;
5729
+ };
5707
5730
  clickable: import("@emotion/react").SerializedStyles;
5708
5731
  selected: import("@emotion/react").SerializedStyles;
5709
5732
  checkboxOffset: import("@emotion/react").SerializedStyles;
5710
5733
  };
5711
5734
  mobile: {
5712
5735
  mobile: import("@emotion/react").SerializedStyles;
5736
+ hasBorder: string;
5737
+ hasBackground: import("@emotion/react").SerializedStyles;
5713
5738
  selected: import("@emotion/react").SerializedStyles;
5714
5739
  /**
5715
5740
  * Left column offset (no border)
@@ -7369,6 +7394,7 @@ declare module '@elastic/eui/src/components/popover/popover' {
7369
7394
  export interface EuiPopoverProps extends PropsWithChildren, CommonProps {
7370
7395
  /**
7371
7396
  * Alignment of the popover and arrow relative to the button
7397
+ * @default downLeft
7372
7398
  */
7373
7399
  anchorPosition?: PopoverAnchorPosition;
7374
7400
  /**
@@ -7398,6 +7424,7 @@ declare module '@elastic/eui/src/components/popover/popover' {
7398
7424
  focusTrapProps?: Partial<EuiFocusTrapProps>;
7399
7425
  /**
7400
7426
  * Show arrow indicating to originating button
7427
+ * @default false
7401
7428
  */
7402
7429
  hasArrow?: boolean;
7403
7430
  /**
@@ -7475,6 +7502,7 @@ declare module '@elastic/eui/src/components/popover/popover' {
7475
7502
  zIndex?: number;
7476
7503
  /**
7477
7504
  * Distance away from the anchor that the popover will render
7505
+ * @default 4 (0 when `hasArrow=true`)
7478
7506
  */
7479
7507
  offset?: number;
7480
7508
  /**
@@ -18556,7 +18584,7 @@ declare module '@elastic/eui/src/components/date_picker/super_date_picker/super_
18556
18584
  isQuickSelectOnly: import("@emotion/react").SerializedStyles;
18557
18585
  euiSuperDatePicker__range: import("@emotion/react").SerializedStyles;
18558
18586
  euiSuperDatePicker__rangeInput: import("@emotion/react").SerializedStyles;
18559
- euiSuperDatePicker__prettyFormat: import("@emotion/react").SerializedStyles;
18587
+ euiSuperDatePicker__prettyDurationTooltip: import("@emotion/react").SerializedStyles;
18560
18588
  states: {
18561
18589
  euiSuperDatePicker__formControlLayout: import("@emotion/react").SerializedStyles;
18562
18590
  default: import("@emotion/react").SerializedStyles;
@@ -25386,7 +25414,8 @@ declare module '@elastic/eui/src/components/tour/tour_step' {
25386
25414
  */
25387
25415
  title: ReactNode;
25388
25416
  /**
25389
- * Extra visual indication of step location
25417
+ * Extra visual indication of step location.
25418
+ * It does not apply when `hasArrow=false`
25390
25419
  */
25391
25420
  decoration?: 'none' | 'beacon';
25392
25421
  /**
@@ -26,7 +26,7 @@ var _delay_render = require("../delay_render");
26
26
  var _accessibility2 = require("../../services/accessibility");
27
27
  var _basic_table = require("./basic_table.styles");
28
28
  var _react2 = require("@emotion/react");
29
- var _excluded = ["className", "loading", "items", "itemId", "columns", "pagination", "sorting", "selection", "onChange", "error", "noItemsMessage", "compressed", "itemIdToExpandedRowMap", "responsiveBreakpoint", "rowProps", "cellProps", "tableCaption", "rowHeader", "tableLayout"],
29
+ var _excluded = ["className", "loading", "items", "itemId", "columns", "pagination", "sorting", "selection", "onChange", "error", "noItemsMessage", "compressed", "itemIdToExpandedRowMap", "responsiveBreakpoint", "rowProps", "cellProps", "tableCaption", "rowHeader", "tableLayout", "hasBackground"],
30
30
  _excluded2 = ["align", "render", "dataType", "isExpander", "textOnly", "name", "field", "description", "sortable", "footer", "mobileOptions", "nameTooltip"];
31
31
  function _interopRequireDefault(e) { return e && e.__esModule ? e : { default: e }; }
32
32
  function _getRequireWildcardCache(e) { if ("function" != typeof WeakMap) return null; var r = new WeakMap(), t = new WeakMap(); return (_getRequireWildcardCache = function _getRequireWildcardCache(e) { return e ? t : r; })(e); }
@@ -376,6 +376,7 @@ var EuiBasicTable = exports.EuiBasicTable = /*#__PURE__*/function (_Component) {
376
376
  tableCaption = _this$props2.tableCaption,
377
377
  rowHeader = _this$props2.rowHeader,
378
378
  tableLayout = _this$props2.tableLayout,
379
+ hasBackground = _this$props2.hasBackground,
379
380
  rest = _objectWithoutProperties(_this$props2, _excluded);
380
381
  var classes = (0, _classnames.default)('euiBasicTable', {
381
382
  'euiBasicTable-loading': loading
@@ -393,6 +394,7 @@ var EuiBasicTable = exports.EuiBasicTable = /*#__PURE__*/function (_Component) {
393
394
  compressed = _this$props3.compressed,
394
395
  responsiveBreakpoint = _this$props3.responsiveBreakpoint,
395
396
  tableLayout = _this$props3.tableLayout,
397
+ hasBackground = _this$props3.hasBackground,
396
398
  loading = _this$props3.loading;
397
399
  return (0, _react2.jsx)(_react.default.Fragment, null, (0, _react2.jsx)(_table.EuiTableHeaderMobile, {
398
400
  responsiveBreakpoint: responsiveBreakpoint
@@ -401,6 +403,7 @@ var EuiBasicTable = exports.EuiBasicTable = /*#__PURE__*/function (_Component) {
401
403
  tableLayout: tableLayout,
402
404
  responsiveBreakpoint: responsiveBreakpoint,
403
405
  compressed: compressed,
406
+ hasBackground: hasBackground,
404
407
  css: loading && _basic_table.safariLoadingWorkaround
405
408
  }, this.renderTableCaption(), this.renderTableHead(), this.renderTableBody(), this.renderTableFooter())));
406
409
  }
@@ -153,6 +153,7 @@ EuiBreadcrumbContent.propTypes = {
153
153
  popoverProps: _propTypes.default.shape({
154
154
  /**
155
155
  * Alignment of the popover and arrow relative to the button
156
+ * @default downLeft
156
157
  */
157
158
  anchorPosition: _propTypes.default.any,
158
159
  /**
@@ -174,6 +175,7 @@ EuiBreadcrumbContent.propTypes = {
174
175
  focusTrapProps: _propTypes.default.any,
175
176
  /**
176
177
  * Show arrow indicating to originating button
178
+ * @default false
177
179
  */
178
180
  hasArrow: _propTypes.default.bool,
179
181
  /**
@@ -266,6 +268,7 @@ EuiBreadcrumbContent.propTypes = {
266
268
  zIndex: _propTypes.default.number,
267
269
  /**
268
270
  * Distance away from the anchor that the popover will render
271
+ * @default 4 (0 when `hasArrow=true`)
269
272
  */
270
273
  offset: _propTypes.default.number,
271
274
  /**
@@ -47,6 +47,6 @@ var _highContrastStyles = function _highContrastStyles(euiThemeContext, compress
47
47
  var euiTheme = euiThemeContext.euiTheme;
48
48
  return (0, _high_contrast.highContrastModeStyles)(euiThemeContext, {
49
49
  preferred: compressed ? "\n .euiButtonGroupButton {\n border: none;\n }\n " : '',
50
- forced: "\n .euiButtonGroupButton-isSelected {\n ".concat((0, _high_contrast.preventForcedColors)(euiThemeContext), "\n color: ").concat(euiTheme.colors.emptyShade, ";\n background-color: ").concat(euiTheme.colors.fullShade, ";\n\n &:is(:hover, :focus):not(:disabled) {\n &::before {\n border-color: ").concat(euiTheme.colors.textInverse, ";\n }\n }\n }\n\n .euiButtonGroupButton[disabled] {\n opacity: 0.5;\n }\n ")
50
+ forced: "\n .euiButtonGroupButton-isSelected {\n ".concat((0, _high_contrast.preventForcedColors)(euiThemeContext), "\n color: ").concat(euiTheme.colors.emptyShade, ";\n background-color: ").concat(euiTheme.colors.fullShade, ";\n\n &:is(:hover, :focus):not(").concat(_global_styling.euiDisabledSelector, ") {\n &::before {\n border-color: ").concat(euiTheme.colors.textInverse, ";\n }\n }\n }\n\n .euiButtonGroupButton:is(").concat(_global_styling.euiDisabledSelector, ") {\n opacity: 0.5;\n }\n ")
51
51
  });
52
52
  };
@@ -96,7 +96,7 @@ var euiButtonGroupButtonStyles = exports.euiButtonGroupButtonStyles = function e
96
96
  },
97
97
  compressed: /*#__PURE__*/(0, _react.css)((0, _global_styling.logicalCSS)('height', compressedButtonHeight), " line-height:", compressedButtonHeight, ";font-weight:", euiTheme.font.weight.medium, ";padding:0;margin:", euiTheme.size.xxs, ";border-radius:", (0, _global_styling.mathWithUnits)(euiTheme.border.radius.small, function (x) {
98
98
  return x / 2;
99
- }), ";&+.euiButtonGroupButton{", (0, _global_styling.logicalCSS)('margin-left', '0'), ";}&:is(", selectedSelectors, "):not(:disabled){border:none;", (0, _global_styling.highContrastModeStyles)(euiThemeContext, {
99
+ }), ";&+.euiButtonGroupButton{", (0, _global_styling.logicalCSS)('margin-left', '0'), ";}&:is(", selectedSelectors, "):not(", _global_styling.euiDisabledSelector, "){border:none;", (0, _global_styling.highContrastModeStyles)(euiThemeContext, {
100
100
  forced: "\n /* use inset focus outline to ensure visibility, same as custom hover.\n NOTE: temp solution - this will be revisited once we handle global focus styles */\n &:focus-visible {\n outline-color: ".concat(euiTheme.colors.textInverse, ";\n /* has to be inset due to overflow: hidden */\n outline-offset: -").concat((0, _global_styling.mathWithUnits)(euiTheme.border.width.thin, function (x) {
101
101
  return x * 3;
102
102
  }), ";\n }\n ")
@@ -107,10 +107,16 @@ var EuiAbsoluteTab = exports.EuiAbsoluteTab = function EuiAbsoluteTab(_ref) {
107
107
  return;
108
108
  }
109
109
 
110
+ // We can be forgiving for `dateFormat` if we are certain
111
+ // we're not expecting any of the other formats allowed;
112
+ // otherwise we can get valid but inaccurate results e.g.
113
+ // `1970-01-01` -> `Jan 19, 1970 @ 01:01:00.000`
114
+ var strictModeForPassedFormat = (0, _moment.default)(textInputValue, ALLOWED_USER_DATE_FORMATS, true).isValid();
115
+
110
116
  // Attempt to parse with passed `dateFormat` and `locale`
111
117
  var _valueAsMoment = (0, _moment.default)(textInputValue, dateFormat, typeof locale === 'string' ? locale : 'en',
112
118
  // Narrow the union type to string
113
- true);
119
+ strictModeForPassedFormat);
114
120
  var dateIsValid = _valueAsMoment.isValid();
115
121
 
116
122
  // If not valid, try a few other standardized formats
@@ -11,9 +11,11 @@ var _moment = _interopRequireDefault(require("moment"));
11
11
  var _datemath = _interopRequireDefault(require("@elastic/datemath"));
12
12
  var _services = require("../../../services");
13
13
  var _predicate = require("../../../services/predicate");
14
+ var _global_styling = require("../../../global_styling");
14
15
  var _context = require("../../context");
15
16
  var _date_picker_range = require("../date_picker_range");
16
17
  var _form = require("../../form");
18
+ var _tool_tip = require("../../tool_tip");
17
19
  var _time_options = require("./time_options");
18
20
  var _pretty_duration = require("./pretty_duration");
19
21
  var _time_window_buttons = require("./time_window_buttons");
@@ -308,22 +310,38 @@ var EuiSuperDatePickerInternal = exports.EuiSuperDatePickerInternal = /*#__PURE_
308
310
  };
309
311
  var isDisabledDisplay = (0, _predicate.isObject)(isDisabled) && (isDisabled === null || isDisabled === void 0 ? void 0 : isDisabled.display);
310
312
  if (isDisabledDisplay || showPrettyDuration && !isStartDatePopoverOpen && !isEndDatePopoverOpen) {
311
- return (0, _react2.jsx)(_form.EuiFormControlLayout, formControlLayoutProps, !isQuickSelectOnly && (0, _react2.jsx)(_form.EuiFormControlButton, {
312
- type: "button",
313
- css: styles.euiSuperDatePicker__prettyFormat,
314
- className: (0, _classnames.default)('euiSuperDatePicker__prettyFormat', {
315
- 'euiSuperDatePicker__prettyFormat--disabled': isDisabled
316
- }),
317
- "data-test-subj": "superDatePickerShowDatesButton",
318
- disabled: !!isDisabled,
319
- onClick: _this.hidePrettyDuration,
320
- onFocus: onFocus
321
- }, isDisabledDisplay ? isDisabled.display : (0, _react2.jsx)(_pretty_duration.PrettyDuration, {
322
- timeFrom: start,
323
- timeTo: end,
324
- quickRanges: commonlyUsedRanges,
325
- dateFormat: dateFormat
326
- })));
313
+ // Tooltip content with full range
314
+ var startMoment = _datemath.default.parse(start);
315
+ var endMoment = _datemath.default.parse(end, {
316
+ roundUp: true
317
+ });
318
+ var separator = ' – ';
319
+ var formattedFullRange = isInvalid ? '' : (startMoment === null || startMoment === void 0 ? void 0 : startMoment.format(dateFormat)) + separator + (endMoment === null || endMoment === void 0 ? void 0 : endMoment.format(dateFormat));
320
+ return (0, _react2.jsx)(_services.RenderWithEuiTheme, null, function (euiTheme) {
321
+ return (0, _react2.jsx)(_form.EuiFormControlLayout, formControlLayoutProps, !isQuickSelectOnly && (0, _react2.jsx)(_tool_tip.EuiToolTip, {
322
+ css: styles.euiSuperDatePicker__prettyDurationTooltip,
323
+ content: formattedFullRange,
324
+ display: "block",
325
+ offset: euiTheme.euiTheme.base * 0.5
326
+ }, (0, _react2.jsx)(_form.EuiFormControlButton, {
327
+ type: "button",
328
+ className: (0, _classnames.default)('euiSuperDatePicker__prettyFormat', {
329
+ 'euiSuperDatePicker__prettyFormat--disabled': isDisabled
330
+ }),
331
+ compressed: compressed,
332
+ "data-test-subj": "superDatePickerShowDatesButton",
333
+ disabled: !!isDisabled,
334
+ onClick: _this.hidePrettyDuration,
335
+ onFocus: onFocus
336
+ }, isDisabledDisplay ? isDisabled.display : (0, _react2.jsx)("span", {
337
+ css: (0, _global_styling.euiTextTruncateCSS)()
338
+ }, (0, _react2.jsx)(_pretty_duration.PrettyDuration, {
339
+ timeFrom: start,
340
+ timeTo: end,
341
+ quickRanges: commonlyUsedRanges,
342
+ dateFormat: dateFormat
343
+ })))));
344
+ });
327
345
  }
328
346
  var rangeCssStyles = [styles.euiSuperDatePicker__range, formControlLayoutProps.css];
329
347
 
@@ -69,9 +69,7 @@ var euiSuperDatePickerStyles = exports.euiSuperDatePickerStyles = function euiSu
69
69
  isQuickSelectOnly: /*#__PURE__*/(0, _react.css)((0, _global_styling.logicalCSS)('min-width', 0), ".euiFormControlLayout__prepend{", (0, _global_styling.logicalCSS)('max-width', 'none'), ";}.euiFormControlLayoutDelimited__delimiter:first-child{", (0, _global_styling.logicalCSS)('padding-horizontal', 0), ";};label:isQuickSelectOnly;"),
70
70
  euiSuperDatePicker__range: _ref,
71
71
  euiSuperDatePicker__rangeInput: /*#__PURE__*/(0, _react.css)("flex-grow:1;", (0, _global_styling.logicalCSS)('width', 'auto'), " overflow:hidden;;label:euiSuperDatePicker__rangeInput;"),
72
- euiSuperDatePicker__prettyFormat: /*#__PURE__*/(0, _react.css)(_buttonStyles(euiThemeContext), " text-align:start;--euiFormControlStateHoverColor:", forms.borderHovered, ";", (0, _form.euiFormControlDefaultShadow)(euiThemeContext), " &:focus{", (0, _form.euiFormControlFocusStyles)(euiThemeContext), ";}", (0, _high_contrast.highContrastModeStyles)(euiThemeContext, {
73
- preferred: "\n border: none;\n "
74
- }), ";;label:euiSuperDatePicker__prettyFormat;"),
72
+ euiSuperDatePicker__prettyDurationTooltip: /*#__PURE__*/(0, _react.css)((0, _global_styling.logicalCSS)('max-width', 'min(58ch, 90vw)'), ";;label:euiSuperDatePicker__prettyDurationTooltip;"),
75
73
  // Form states
76
74
  states: {
77
75
  euiSuperDatePicker__formControlLayout: /*#__PURE__*/(0, _react.css)(".euiFormControlLayout__childrenWrapper{--euiFormControlStateHoverColor:", forms.borderHovered, ";", (0, _high_contrast.highContrastModeStyles)(euiThemeContext, {
@@ -28,15 +28,17 @@ var EuiFlexItemInternal = function EuiFlexItemInternal(_ref, ref) {
28
28
  var children = _ref.children,
29
29
  className = _ref.className,
30
30
  _ref$grow = _ref.grow,
31
- grow = _ref$grow === void 0 ? true : _ref$grow,
31
+ _grow = _ref$grow === void 0 ? true : _ref$grow,
32
32
  _ref$component = _ref.component,
33
33
  component = _ref$component === void 0 ? 'div' : _ref$component,
34
34
  rest = _objectWithoutProperties(_ref, _excluded);
35
+ // resets `grow` to the default value when an invalid value is passed
36
+ var grow = VALID_GROW_VALUES.indexOf(_grow) === -1 ? true : _grow;
35
37
  (0, _react.useEffect)(function () {
36
- if (VALID_GROW_VALUES.indexOf(grow) === -1) {
37
- throw new Error("Prop `grow` passed to `EuiFlexItem` must be a boolean or an integer between 0 and 10, received `".concat(grow, "`"));
38
+ if (process.env.NODE_ENV === 'development' && VALID_GROW_VALUES.indexOf(_grow) === -1) {
39
+ console.warn("Prop `grow` passed to `EuiFlexItem` must be a boolean or an integer between 0 and 10, received `".concat(_grow, "`. Defaulting to `true`."));
38
40
  }
39
- }, [grow]);
41
+ }, [_grow]);
40
42
  var cssStyles = [_flex_item.euiFlexItemStyles.euiFlexItem, !grow ? _flex_item.euiFlexItemStyles.growZero : _flex_item.euiFlexItemStyles.grow, grow && (typeof grow === 'number' ? _flex_item.euiFlexItemStyles.growSizes[grow] : _flex_item.euiFlexItemStyles.growSizes['1'])];
41
43
  var classes = (0, _classnames.default)('euiFlexItem', className);
42
44
 
@@ -16,7 +16,7 @@ var _resize_observer = require("../observer/resize_observer");
16
16
  var _focus_trap = require("../focus_trap");
17
17
  var _form = require("../form/form.styles");
18
18
  var _popover = require("./popover");
19
- var _excluded = ["children", "className", "closePopover", "anchorPosition", "attachToAnchor", "repositionToCrossAxis", "display", "panelPaddingSize", "closeOnScroll", "ownFocus", "disableFocusTrap", "focusTrapProps", "input", "fullWidth", "panelMinWidth", "onPanelResize", "inputRef", "panelRef"];
19
+ var _excluded = ["children", "className", "closePopover", "anchorPosition", "attachToAnchor", "repositionToCrossAxis", "display", "panelPaddingSize", "closeOnScroll", "ownFocus", "disableFocusTrap", "focusTrapProps", "input", "fullWidth", "panelMinWidth", "onPanelResize", "inputRef", "panelRef", "offset"];
20
20
  /*
21
21
  * Copyright Elasticsearch B.V. and/or licensed to Elasticsearch B.V. under one
22
22
  * or more contributor license agreements. Licensed under the Elastic License
@@ -73,6 +73,8 @@ var EuiInputPopover = exports.EuiInputPopover = function EuiInputPopover(_ref) {
73
73
  onPanelResize = _ref.onPanelResize,
74
74
  _inputRef = _ref.inputRef,
75
75
  _panelRef = _ref.panelRef,
76
+ _ref$offset = _ref.offset,
77
+ offset = _ref$offset === void 0 ? 2 : _ref$offset,
76
78
  props = _objectWithoutProperties(_ref, _excluded);
77
79
  var classes = (0, _classnames.default)('euiInputPopover', className);
78
80
  var euiTheme = (0, _services.useEuiTheme)();
@@ -211,6 +213,7 @@ var EuiInputPopover = exports.EuiInputPopover = function EuiInputPopover(_ref) {
211
213
  closePopover: closePopover,
212
214
  anchorPosition: anchorPosition,
213
215
  attachToAnchor: attachToAnchor,
216
+ offset: offset,
214
217
  repositionToCrossAxis: repositionToCrossAxis,
215
218
  panelPaddingSize: panelPaddingSize,
216
219
  ownFocus: ownFocus
@@ -213,8 +213,8 @@ var EuiPopover = exports.EuiPopover = /*#__PURE__*/function (_Component) {
213
213
  if (_this.button == null || _this.panel == null) return;
214
214
  var _ref6 = _this.props,
215
215
  anchorPosition = _ref6.anchorPosition,
216
- _ref6$offset = _ref6.offset,
217
- offset = _ref6$offset === void 0 ? 0 : _ref6$offset;
216
+ _offset = _ref6.offset;
217
+ var offset = _offset != null ? _offset : _this.props.hasArrow ? 0 : 4;
218
218
  var position = getPopoverPositionFromAnchorPosition(anchorPosition);
219
219
  var forcePosition = undefined;
220
220
  if (allowEnforcePosition && _this.state.isOpenStable && _this.state.openPosition != null) {
@@ -551,14 +551,15 @@ _defineProperty(EuiPopover, "defaultProps", {
551
551
  isOpen: false,
552
552
  ownFocus: true,
553
553
  repositionToCrossAxis: true,
554
- anchorPosition: 'downCenter',
554
+ anchorPosition: 'downLeft',
555
555
  panelPaddingSize: 'm',
556
- hasArrow: true,
556
+ hasArrow: false,
557
557
  display: 'inline-block'
558
558
  });
559
559
  EuiPopover.propTypes = {
560
560
  /**
561
561
  * Alignment of the popover and arrow relative to the button
562
+ * @default downLeft
562
563
  */
563
564
  anchorPosition: _propTypes.default.any,
564
565
  /**
@@ -588,6 +589,7 @@ EuiPopover.propTypes = {
588
589
  focusTrapProps: _propTypes.default.any,
589
590
  /**
590
591
  * Show arrow indicating to originating button
592
+ * @default false
591
593
  */
592
594
  hasArrow: _propTypes.default.bool,
593
595
  /**
@@ -665,6 +667,7 @@ EuiPopover.propTypes = {
665
667
  zIndex: _propTypes.default.number,
666
668
  /**
667
669
  * Distance away from the anchor that the popover will render
670
+ * @default 4 (0 when `hasArrow=true`)
668
671
  */
669
672
  offset: _propTypes.default.number,
670
673
  /**
@@ -37,6 +37,7 @@ var EuiSelectableTemplateSitewidePopover = exports.EuiSelectableTemplateSitewide
37
37
  var styles = (0, _services.useEuiMemoizedStyles)(_selectable_template_sitewide.euiSelectableTemplateSitewidePopoverStyles);
38
38
  return (0, _react2.jsx)(_popover.EuiPopover, _extends({
39
39
  panelPaddingSize: "none",
40
+ anchorPosition: "downCenter",
40
41
  isOpen: isOpen,
41
42
  ownFocus: !!trigger,
42
43
  display: trigger ? 'inline-block' : 'block'
@@ -14,11 +14,11 @@ function _EMOTION_STRINGIFIED_CSS_ERROR__() { return "You have tried to stringif
14
14
  * Side Public License, v 1.
15
15
  */
16
16
  var _ref = process.env.NODE_ENV === "production" ? {
17
- name: "1t1ptlc-mobile",
18
- styles: "flex-direction:column;padding:0;label:mobile;"
17
+ name: "7d9p9x-mobile",
18
+ styles: "flex-direction:column;label:mobile;"
19
19
  } : {
20
- name: "1t1ptlc-mobile",
21
- styles: "flex-direction:column;padding:0;label:mobile;",
20
+ name: "7d9p9x-mobile",
21
+ styles: "flex-direction:column;label:mobile;",
22
22
  toString: _EMOTION_STRINGIFIED_CSS_ERROR__
23
23
  };
24
24
  var _ref2 = process.env.NODE_ENV === "production" ? {