@elastic/eui 109.1.0 → 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 +4 -4
  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
@@ -9,9 +9,10 @@ var _propTypes = _interopRequireDefault(require("prop-types"));
9
9
  var _classnames = _interopRequireDefault(require("classnames"));
10
10
  var _services = require("../../services");
11
11
  var _responsive_context = require("./mobile/responsive_context");
12
+ var _table_context = require("./table_context");
12
13
  var _table = require("./table.styles");
13
14
  var _react2 = require("@emotion/react");
14
- var _excluded = ["children", "className", "compressed", "tableLayout", "responsiveBreakpoint"];
15
+ var _excluded = ["children", "className", "compressed", "tableLayout", "hasBackground", "responsiveBreakpoint"];
15
16
  /*
16
17
  * Copyright Elasticsearch B.V. and/or licensed to Elasticsearch B.V. under one
17
18
  * or more contributor license agreements. Licensed under the Elastic License
@@ -29,19 +30,25 @@ var EuiTable = exports.EuiTable = function EuiTable(_ref) {
29
30
  compressed = _ref.compressed,
30
31
  _ref$tableLayout = _ref.tableLayout,
31
32
  tableLayout = _ref$tableLayout === void 0 ? 'fixed' : _ref$tableLayout,
33
+ _ref$hasBackground = _ref.hasBackground,
34
+ hasBackground = _ref$hasBackground === void 0 ? true : _ref$hasBackground,
32
35
  responsiveBreakpoint = _ref.responsiveBreakpoint,
33
36
  rest = _objectWithoutProperties(_ref, _excluded);
34
37
  var isResponsive = (0, _responsive_context.useIsEuiTableResponsive)(responsiveBreakpoint);
35
38
  var classes = (0, _classnames.default)('euiTable', className);
36
39
  var styles = (0, _services.useEuiMemoizedStyles)(_table.euiTableStyles);
37
- var cssStyles = [styles.euiTable, styles.layout[tableLayout], (!compressed || isResponsive) && styles.uncompressed, compressed && !isResponsive && styles.compressed, isResponsive ? styles.mobile : styles.desktop];
40
+ var cssStyles = [styles.euiTable, styles.layout[tableLayout], (!compressed || isResponsive) && styles.uncompressed, compressed && !isResponsive && styles.compressed, hasBackground && styles.hasBackground, isResponsive ? styles.mobile : styles.desktop];
38
41
  return (0, _react2.jsx)("table", _extends({
39
42
  tabIndex: -1,
40
43
  css: cssStyles,
41
44
  className: classes
42
45
  }, rest), (0, _react2.jsx)(_responsive_context.EuiTableIsResponsiveContext.Provider, {
43
46
  value: isResponsive
44
- }, children));
47
+ }, (0, _react2.jsx)(_table_context.EuiTableVariantContext.Provider, {
48
+ value: {
49
+ hasBackground: hasBackground
50
+ }
51
+ }, children)));
45
52
  };
46
53
  EuiTable.propTypes = {
47
54
  compressed: _propTypes.default.bool,
@@ -57,8 +64,14 @@ EuiTable.propTypes = {
57
64
  responsiveBreakpoint: _propTypes.default.oneOfType([_propTypes.default.any.isRequired, _propTypes.default.bool.isRequired]),
58
65
  /**
59
66
  * Sets the table-layout CSS property
67
+ * @default 'fixed'
60
68
  */
61
69
  tableLayout: _propTypes.default.oneOf(["fixed", "auto"]),
70
+ /**
71
+ * Toggle the table's background
72
+ * @default true
73
+ */
74
+ hasBackground: _propTypes.default.bool,
62
75
  className: _propTypes.default.string,
63
76
  "aria-label": _propTypes.default.string,
64
77
  "data-test-subj": _propTypes.default.string,
@@ -71,11 +71,12 @@ var euiTableStyles = exports.euiTableStyles = function euiTableStyles(euiThemeCo
71
71
  cellContentPadding = _euiTableVariables.cellContentPadding,
72
72
  compressedCellContentPadding = _euiTableVariables.compressedCellContentPadding;
73
73
  return {
74
- euiTable: /*#__PURE__*/(0, _react.css)((0, _global_styling.euiNumberFormat)(euiThemeContext), " ", (0, _global_styling.logicalCSS)('width', '100%'), " border:none;border-collapse:collapse;background-color:", euiTheme.colors.emptyShade, ";;label:euiTable;"),
74
+ euiTable: /*#__PURE__*/(0, _react.css)((0, _global_styling.euiNumberFormat)(euiThemeContext), " ", (0, _global_styling.logicalCSS)('width', '100%'), " border:none;border-collapse:collapse;;label:euiTable;"),
75
75
  layout: {
76
76
  fixed: _ref3,
77
77
  auto: _ref2
78
78
  },
79
+ hasBackground: /*#__PURE__*/(0, _react.css)("background-color:", euiTheme.colors.backgroundBasePlain, ";;label:hasBackground;"),
79
80
  /**
80
81
  * 1. The padding on the `.euiTableCellContent` div allows the ellipsis to show if the
81
82
  * content is truncated. If the padding was on the cell, the ellipsis would be cropped.
@@ -32,7 +32,10 @@ var euiTableHeaderFooterCellStyles = exports.euiTableHeaderFooterCellStyles = fu
32
32
  euiTableHeaderCell: /*#__PURE__*/(0, _react.css)(sharedStyles, ";;label:euiTableHeaderCell;"),
33
33
  euiTableHeaderCell__content: /*#__PURE__*/(0, _react.css)("gap:", euiTheme.size.xs, ";;label:euiTableHeaderCell__content;"),
34
34
  euiTableHeaderCell__button: /*#__PURE__*/(0, _react.css)((0, _global_styling.logicalCSS)('width', '100%'), " font-weight:inherit;line-height:inherit;.euiTableSortIcon--sortable{color:", euiTheme.components.tableCellSortableIconColor, ";}&:hover,&:focus{color:", euiTheme.colors.textPrimary, ";text-decoration:underline;.euiTableSortIcon--sortable{color:", euiTheme.colors.textPrimary, ";}};label:euiTableHeaderCell__button;"),
35
- euiTableFooterCell: /*#__PURE__*/(0, _react.css)(sharedStyles, " background-color:", euiTheme.colors.lightestShade, ";;label:euiTableFooterCell;")
35
+ euiTableFooterCell: {
36
+ euiTableFooterCell: /*#__PURE__*/(0, _react.css)(sharedStyles, ";;label:euiTableFooterCell;"),
37
+ hasBackground: /*#__PURE__*/(0, _react.css)("background-color:", euiTheme.components.tableFooterBackground, ";;label:hasBackground;")
38
+ }
36
39
  };
37
40
  };
38
41
  var euiTableCellCheckboxStyles = exports.euiTableCellCheckboxStyles = function euiTableCellCheckboxStyles(euiThemeContext) {
@@ -0,0 +1,18 @@
1
+ "use strict";
2
+
3
+ Object.defineProperty(exports, "__esModule", {
4
+ value: true
5
+ });
6
+ exports.EuiTableVariantContext = void 0;
7
+ var _react = require("react");
8
+ /*
9
+ * Copyright Elasticsearch B.V. and/or licensed to Elasticsearch B.V. under one
10
+ * or more contributor license agreements. Licensed under the Elastic License
11
+ * 2.0 and the Server Side Public License, v 1; you may not use this file except
12
+ * in compliance with, at your election, the Elastic License 2.0 or the Server
13
+ * Side Public License, v 1.
14
+ */
15
+
16
+ var EuiTableVariantContext = exports.EuiTableVariantContext = /*#__PURE__*/(0, _react.createContext)({
17
+ hasBackground: true
18
+ });
@@ -1,16 +1,18 @@
1
1
  "use strict";
2
2
 
3
+ 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); }
3
4
  Object.defineProperty(exports, "__esModule", {
4
5
  value: true
5
6
  });
6
7
  exports.EuiTableFooterCell = void 0;
7
- var _react = _interopRequireDefault(require("react"));
8
+ var _react = _interopRequireWildcard(require("react"));
8
9
  var _propTypes = _interopRequireDefault(require("prop-types"));
9
10
  var _classnames = _interopRequireDefault(require("classnames"));
10
11
  var _services = require("../../services");
11
12
  var _utils = require("./utils");
12
13
  var _table_cell_content = require("./_table_cell_content");
13
14
  var _table_cells_shared = require("./table_cells_shared.styles");
15
+ var _table_context = require("./table_context");
14
16
  var _react2 = require("@emotion/react");
15
17
  var _excluded = ["children", "align", "className", "width", "style"];
16
18
  /*
@@ -21,6 +23,8 @@ var _excluded = ["children", "align", "className", "width", "style"];
21
23
  * Side Public License, v 1.
22
24
  */
23
25
  function _interopRequireDefault(e) { return e && e.__esModule ? e : { default: e }; }
26
+ 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); }
27
+ function _interopRequireWildcard(e, r) { if (!r && e && e.__esModule) return e; if (null === e || "object" != _typeof(e) && "function" != typeof e) return { default: e }; var t = _getRequireWildcardCache(r); if (t && t.has(e)) return t.get(e); var n = { __proto__: null }, a = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var u in e) if ("default" !== u && {}.hasOwnProperty.call(e, u)) { var i = a ? Object.getOwnPropertyDescriptor(e, u) : null; i && (i.get || i.set) ? Object.defineProperty(n, u, i) : n[u] = e[u]; } return n.default = e, t && t.set(e, n), n; }
24
28
  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); }
25
29
  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; }
26
30
  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; }
@@ -32,11 +36,14 @@ var EuiTableFooterCell = exports.EuiTableFooterCell = function EuiTableFooterCel
32
36
  width = _ref.width,
33
37
  style = _ref.style,
34
38
  rest = _objectWithoutProperties(_ref, _excluded);
39
+ var _useContext = (0, _react.useContext)(_table_context.EuiTableVariantContext),
40
+ hasBackground = _useContext.hasBackground;
35
41
  var classes = (0, _classnames.default)('euiTableFooterCell', className);
36
42
  var inlineStyles = (0, _utils.resolveWidthAsStyle)(style, width);
37
43
  var styles = (0, _services.useEuiMemoizedStyles)(_table_cells_shared.euiTableHeaderFooterCellStyles);
44
+ var cssStyles = [styles.euiTableFooterCell.euiTableFooterCell, hasBackground && styles.euiTableFooterCell.hasBackground];
38
45
  return (0, _react2.jsx)("td", _extends({
39
- css: styles.euiTableFooterCell,
46
+ css: cssStyles,
40
47
  className: classes,
41
48
  style: inlineStyles
42
49
  }, rest), (0, _react2.jsx)(_table_cell_content.EuiTableCellContent, {
@@ -1,14 +1,16 @@
1
1
  "use strict";
2
2
 
3
+ 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); }
3
4
  Object.defineProperty(exports, "__esModule", {
4
5
  value: true
5
6
  });
6
7
  exports.EuiTableRow = void 0;
7
- var _react = _interopRequireDefault(require("react"));
8
+ var _react = _interopRequireWildcard(require("react"));
8
9
  var _propTypes = _interopRequireDefault(require("prop-types"));
9
10
  var _classnames = _interopRequireDefault(require("classnames"));
10
11
  var _services = require("../../services");
11
12
  var _responsive_context = require("./mobile/responsive_context");
13
+ var _table_context = require("./table_context");
12
14
  var _table_row = require("./table_row.styles");
13
15
  var _react2 = require("@emotion/react");
14
16
  var _excluded = ["children", "className", "hasSelection", "isSelected", "isSelectable", "hasActions", "isExpandedRow", "isExpandable", "onClick"];
@@ -20,6 +22,8 @@ var _excluded = ["children", "className", "hasSelection", "isSelected", "isSelec
20
22
  * Side Public License, v 1.
21
23
  */
22
24
  function _interopRequireDefault(e) { return e && e.__esModule ? e : { default: e }; }
25
+ 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); }
26
+ function _interopRequireWildcard(e, r) { if (!r && e && e.__esModule) return e; if (null === e || "object" != _typeof(e) && "function" != typeof e) return { default: e }; var t = _getRequireWildcardCache(r); if (t && t.has(e)) return t.get(e); var n = { __proto__: null }, a = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var u in e) if ("default" !== u && {}.hasOwnProperty.call(e, u)) { var i = a ? Object.getOwnPropertyDescriptor(e, u) : null; i && (i.get || i.set) ? Object.defineProperty(n, u, i) : n[u] = e[u]; } return n.default = e, t && t.set(e, n), n; }
23
27
  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); }
24
28
  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; }
25
29
  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; }
@@ -35,8 +39,10 @@ var EuiTableRow = exports.EuiTableRow = function EuiTableRow(_ref) {
35
39
  onClick = _ref.onClick,
36
40
  rest = _objectWithoutProperties(_ref, _excluded);
37
41
  var isResponsive = (0, _responsive_context.useEuiTableIsResponsive)();
42
+ var _useContext = (0, _react.useContext)(_table_context.EuiTableVariantContext),
43
+ hasBackground = _useContext.hasBackground;
38
44
  var styles = (0, _services.useEuiMemoizedStyles)(_table_row.euiTableRowStyles);
39
- var cssStyles = isResponsive ? [styles.euiTableRow, styles.mobile.mobile, isSelected && styles.mobile.selected, isExpandedRow && styles.mobile.expanded, (hasActions === true || isExpandable || isExpandedRow) && styles.mobile.hasRightColumn, hasSelection && styles.mobile.hasLeftColumn] : [styles.euiTableRow, styles.desktop.desktop, onClick && styles.desktop.clickable, isSelected && styles.desktop.selected, isExpandedRow && styles.desktop.expanded, isExpandedRow && hasSelection && styles.desktop.checkboxOffset];
45
+ var cssStyles = isResponsive ? [styles.euiTableRow, styles.mobile.mobile, !hasBackground && styles.mobile.hasBorder, hasBackground && styles.mobile.hasBackground, isSelected && styles.mobile.selected, isExpandedRow && styles.mobile.expanded, (hasActions === true || isExpandable || isExpandedRow) && styles.mobile.hasRightColumn, hasSelection && styles.mobile.hasLeftColumn] : [styles.euiTableRow, styles.desktop.desktop, onClick && styles.desktop.clickable, isSelected && styles.desktop.selected, isExpandedRow && styles.desktop.expanded.expanded, isExpandedRow && hasBackground && styles.desktop.expanded.hasBackground, isExpandedRow && hasSelection && styles.desktop.checkboxOffset];
40
46
  var classes = (0, _classnames.default)('euiTableRow', className, {
41
47
  'euiTableRow-isSelectable': isSelectable,
42
48
  'euiTableRow-isSelected': isSelected,
@@ -31,7 +31,11 @@ var euiTableRowStyles = exports.euiTableRowStyles = function euiTableRowStyles(e
31
31
  euiTableRow: /*#__PURE__*/(0, _react.css)(":where(&.euiTableRow--marked){background-color:", rowColors.marked.background, ";};label:euiTableRow;"),
32
32
  desktop: {
33
33
  desktop: /*#__PURE__*/(0, _react.css)("&:hover{background-color:", rowColors.hover, ";}", markedStyles, ";;label:desktop;"),
34
- expanded: /*#__PURE__*/(0, _react.css)("background-color:", rowColors.hover, ";", expandedAnimationCss, ";;label:expanded;"),
34
+ expanded: {
35
+ expanded: /*#__PURE__*/(0, _react.css)(expandedAnimationCss, ";;label:expanded;"),
36
+ // skipping adding a css class as it's a default style when expanded
37
+ hasBackground: "\n background-color: ".concat(rowColors.hover, ";\n ")
38
+ },
35
39
  clickable: /*#__PURE__*/(0, _react.css)("&:hover{background-color:", rowColors.clickable.hover, ";cursor:pointer;}", markedStyles, " &:focus{background-color:", rowColors.clickable.focus, ";};label:clickable;"),
36
40
  selected: /*#__PURE__*/(0, _react.css)("&,&+.euiTableRow-isExpandedRow{background-color:", rowColors.selected.background, ";}&:hover,&:hover+.euiTableRow-isExpandedRow{background-color:", rowColors.selected.hover, ";};label:selected;"),
37
41
  // Offset expanded & selectable rows by the checkbox width to line up content with the 2nd column
@@ -39,9 +43,21 @@ var euiTableRowStyles = exports.euiTableRowStyles = function euiTableRowStyles(e
39
43
  checkboxOffset: /*#__PURE__*/(0, _react.css)("&>.euiTableRowCell:first-child{", (0, _global_styling.logicalCSS)('padding-left', checkboxSize), ";};label:checkboxOffset;")
40
44
  },
41
45
  mobile: {
42
- mobile: /*#__PURE__*/(0, _react.css)("position:relative;display:flex;flex-wrap:wrap;padding:", cellContentPadding, ";", (0, _global_styling.logicalCSS)('margin-bottom', cellContentPadding), (0, _euiThemeCommon.euiShadow)(euiThemeContext, 's', {
46
+ mobile: /*#__PURE__*/(0, _react.css)("position:relative;display:flex;flex-wrap:wrap;padding:", cellContentPadding, ";", (0, _global_styling.logicalCSS)('margin-bottom', cellContentPadding), " border-radius:", euiTheme.border.radius.medium, ";", (0, _supports.cssSupportsHasWithNextSibling)("\n &:has(+ .euiTableRow-isExpandedRow) {\n ".concat((0, _global_styling.logicalCSS)('border-bottom-left-radius', 0), "\n ").concat((0, _global_styling.logicalCSS)('border-bottom-right-radius', 0), "\n }\n ")), ";;label:mobile;"),
47
+ /* Omitting adding a class via css here as it's a default style on mobile, not a standalone prop-related style.
48
+ Adding it separate allows better appliance control via props without the need to override the styles. */
49
+ hasBorder: "\n ".concat((0, _global_styling.highContrastModeStyles)(euiThemeContext, {
50
+ // uses pseudo-border to align dimensions with shadows applied by `hasBackground`
51
+ none: "\n ".concat((0, _euiThemeCommon.euiBorderStyles)(euiThemeContext, {
52
+ side: 'all'
53
+ }), "\n transform: translateZ(0);\n "),
54
+ preferred: "\n border: ".concat(euiTheme.border.thin, "\n ")
55
+ }), "\n "),
56
+ hasBackground: /*#__PURE__*/(0, _react.css)((0, _euiThemeCommon.euiShadow)(euiThemeContext, 's', {
43
57
  borderAllInHighContrastMode: true
44
- }), " background-color:", euiTheme.colors.backgroundBasePlain, ";border-radius:", euiTheme.border.radius.medium, ";", (0, _supports.cssSupportsHasWithNextSibling)("\n &:has(+ .euiTableRow-isExpandedRow) {\n ".concat((0, _global_styling.logicalCSS)('border-bottom-left-radius', 0), "\n ").concat((0, _global_styling.logicalCSS)('border-bottom-right-radius', 0), "\n }\n ")), ";;label:mobile;"),
58
+ }), " background-color:", euiTheme.colors.backgroundBasePlain, ";", (0, _global_styling.highContrastModeStyles)(euiThemeContext, {
59
+ none: "\n border: none;\n "
60
+ }), ";;label:hasBackground;"),
45
61
  selected: /*#__PURE__*/(0, _react.css)("&,&+.euiTableRow-isExpandedRow{background-color:", rowColors.selected.background, ";};label:selected;"),
46
62
  /**
47
63
  * Left column offset (no border)
@@ -60,7 +76,7 @@ var euiTableRowStyles = exports.euiTableRowStyles = function euiTableRowStyles(e
60
76
  // On mobile, visually move the expanded row to join up with the
61
77
  // preceding table row via negative margins
62
78
  'margin-top', (0, _global_styling.mathWithUnits)([cellContentPadding, euiTheme.border.width.thin], function (x, y) {
63
- return (x + y * 2) * -1;
79
+ return (x + y) * -1;
64
80
  })), (0, _global_styling.logicalCSS)('padding-left', cellContentPadding), " ", (0, _global_styling.logicalCSS)('border-top', euiTheme.border.thin), " ", (0, _global_styling.logicalCSS)('border-top-left-radius', 0), " ", (0, _global_styling.logicalCSS)('border-top-right-radius', 0), " &:after{", (0, _global_styling.logicalCSS)('border-top', 'none'), ";}clip-path:polygon(-50% 0, 150% 0, 150% 150%, -50% 150%);>.euiTableRowCell{", (0, _global_styling.logicalCSS)('width', '100%'), ";}", expandedAnimationCss, ";;label:expanded;")
65
81
  }
66
82
  };
@@ -74,10 +74,10 @@ var euiTableRowCellStyles = exports.euiTableRowCellStyles = function euiTableRow
74
74
  rightColumnContent: "\n position: absolute;\n ".concat((0, _global_styling.logicalCSS)('right', 0), "\n ").concat((0, _global_styling.logicalCSS)('min-width', '0'), "\n ").concat((0, _global_styling.logicalCSS)('width', mobileSizes.actions.width), "\n "),
75
75
  get actions() {
76
76
  // Note: Visible-on-hover actions on desktop always show on mobile
77
- return /*#__PURE__*/(0, _react.css)(this.rightColumnContent, " ", (0, _global_styling.logicalCSS)('top', mobileSizes.actions.offset), ";;label:actions;");
77
+ return /*#__PURE__*/(0, _react.css)(this.rightColumnContent, " ", (0, _global_styling.logicalCSS)('top', mobileSizes.actions.offset), ".euiTableCellContent{padding:0;};label:actions;");
78
78
  },
79
79
  get expander() {
80
- return /*#__PURE__*/(0, _react.css)(this.rightColumnContent, " ", (0, _global_styling.logicalCSS)('bottom', mobileSizes.actions.offset), ";;label:expander;");
80
+ return /*#__PURE__*/(0, _react.css)(this.rightColumnContent, ";;label:expander;");
81
81
  },
82
82
  /**
83
83
  * Custom actions may not be icons and therefore may not fit in a column
@@ -88,6 +88,6 @@ var euiTableRowCellStyles = exports.euiTableRowCellStyles = function euiTableRow
88
88
  },
89
89
  euiTableRowCell__mobileHeader: /*#__PURE__*/(0, _react.css)((0, _global_styling.euiTextTruncate)(), " font-size:", (0, _global_styling.euiFontSize)(euiThemeContext, 's', {
90
90
  customScale: 'xxs'
91
- }).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) &{", (0, _global_styling.logicalCSS)('min-height', euiTheme.size.l), ";};label:euiTableRowCell__mobileHeader;")
91
+ }).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) &{", (0, _global_styling.logicalCSS)('min-height', euiTheme.size.l), ";};label:euiTableRowCell__mobileHeader;")
92
92
  };
93
93
  };
@@ -8,6 +8,7 @@ exports.EuiToolTipAnchor = void 0;
8
8
  var _react = _interopRequireWildcard(require("react"));
9
9
  var _propTypes = _interopRequireDefault(require("prop-types"));
10
10
  var _classnames = _interopRequireDefault(require("classnames"));
11
+ var _services = require("../../services");
11
12
  var _tool_tip = require("./tool_tip.styles");
12
13
  var _react2 = require("@emotion/react");
13
14
  var _excluded = ["onBlur", "onFocus", "onMouseOver", "onMouseOut", "id", "className", "children", "display", "isVisible"];
@@ -38,11 +39,18 @@ var EuiToolTipAnchor = exports.EuiToolTipAnchor = /*#__PURE__*/(0, _react.forwar
38
39
  var anchorCss = (0, _tool_tip.euiToolTipAnchorStyles)();
39
40
  var cssStyles = [anchorCss.euiToolTipAnchor, anchorCss[display]];
40
41
  var classes = (0, _classnames.default)('euiToolTipAnchor', className);
42
+ var anchorId = (0, _services.useGeneratedHtmlId)({
43
+ suffix: 'euiToolTipAnchor',
44
+ conditionalId: id ? "".concat(id, "-wrapper") : undefined
45
+ });
41
46
  return (
42
47
  // eslint-disable-next-line jsx-a11y/mouse-events-have-key-events
43
48
  (0, _react2.jsx)("span", _extends({
44
49
  ref: ref,
45
50
  css: cssStyles
51
+ /* A11y: NVDA combines elements with identical markup into a single navigational stop. ¯\_(ツ)_/¯
52
+ The `id` ensures the wrappers are unique and navigated as standalone elements. (data- attributes don't work) */,
53
+ id: anchorId
46
54
  }, rest, {
47
55
  className: classes,
48
56
  onMouseOver: onMouseOver,
@@ -16,7 +16,7 @@ var _tour_header = require("./_tour_header");
16
16
  var _tour_footer = require("./_tour_footer");
17
17
  var _tour = require("./tour.styles");
18
18
  var _react2 = require("@emotion/react");
19
- var _excluded = ["anchorPosition", "anchor", "children", "className", "css", "closePopover", "content", "isStepOpen", "minWidth", "maxWidth", "onFinish", "step", "stepsTotal", "subtitle", "title", "decoration", "footerAction", "panelProps", "panelClassName"];
19
+ var _excluded = ["anchorPosition", "anchor", "children", "className", "css", "closePopover", "content", "isStepOpen", "minWidth", "maxWidth", "onFinish", "step", "stepsTotal", "subtitle", "title", "decoration", "hasArrow", "footerAction", "panelProps", "panelClassName"];
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
@@ -65,6 +65,7 @@ var EuiTourStep = exports.EuiTourStep = function EuiTourStep(_ref) {
65
65
  title = _ref.title,
66
66
  _ref$decoration = _ref.decoration,
67
67
  decoration = _ref$decoration === void 0 ? 'beacon' : _ref$decoration,
68
+ hasArrow = _ref.hasArrow,
68
69
  footerAction = _ref.footerAction,
69
70
  panelProps = _ref.panelProps,
70
71
  panelClassName = _ref.panelClassName,
@@ -126,8 +127,9 @@ var EuiTourStep = exports.EuiTourStep = function EuiTourStep(_ref) {
126
127
  panelProps: _objectSpread(_objectSpread({}, panelProps), {}, {
127
128
  css: [tourStyles.euiTour, css, panelProps === null || panelProps === void 0 ? void 0 : panelProps.css]
128
129
  }),
129
- offset: hasBeacon ? 10 : 0,
130
+ offset: hasBeacon && hasArrow !== false ? 10 : undefined,
130
131
  "aria-labelledby": titleId,
132
+ hasArrow: hasArrow !== null && hasArrow !== void 0 ? hasArrow : hasBeacon,
131
133
  arrowChildren: hasBeacon && (0, _react2.jsx)(_beacon.EuiBeacon, {
132
134
  css: beaconCss,
133
135
  className: "euiTour__beacon"
@@ -195,7 +197,8 @@ EuiTourStep.propTypes = {
195
197
  */
196
198
  title: _propTypes.default.node.isRequired,
197
199
  /**
198
- * Extra visual indication of step location
200
+ * Extra visual indication of step location.
201
+ * It does not apply when `hasArrow=false`
199
202
  */
200
203
  decoration: _propTypes.default.oneOf(["none", "beacon"]),
201
204
  /**
@@ -8,6 +8,7 @@ var _react = require("@emotion/react");
8
8
  var _euiThemeCommon = require("@elastic/eui-theme-common");
9
9
  var _services = require("../../services");
10
10
  var _functions = require("../functions");
11
+ var _selectors = require("../utility/selectors");
11
12
  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); }
12
13
  function _toConsumableArray(r) { return _arrayWithoutHoles(r) || _iterableToArray(r) || _unsupportedIterableToArray(r) || _nonIterableSpread(); }
13
14
  function _nonIterableSpread() { throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method."); }
@@ -215,11 +216,11 @@ var _interactionStyles = function _interactionStyles(euiThemeContext, buttonColo
215
216
  var baseStyles = function baseStyles() {
216
217
  // button hover is applied as pseudo element with a transparent background-color
217
218
  if (type === 'overlay') {
218
- 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((0, _functions.logicalCSS)('width', '100%'), "\n ").concat((0, _functions.logicalCSS)('height', '100%'), "\n\n content: '';\n position: absolute;\n inset: 0;\n background-color: ").concat(buttonColors.backgroundActive, ";\n }\n }\n ");
219
+ return "\n position: relative;\n overflow: hidden;\n\n &:hover:not(".concat(_selectors.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(_selectors.euiDisabledSelector, ") {\n &::before {\n ").concat((0, _functions.logicalCSS)('width', '100%'), "\n ").concat((0, _functions.logicalCSS)('height', '100%'), "\n\n content: '';\n position: absolute;\n inset: 0;\n background-color: ").concat(buttonColors.backgroundActive, ";\n }\n }\n ");
219
220
  }
220
221
 
221
222
  // button hover is applied as opaque color
222
- 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 ");
223
+ return "\n &:hover:not(".concat(_selectors.euiDisabledSelector, ") {\n background-color: ").concat(buttonColors.backgroundHover, ";\n }\n\n &:active:not(").concat(_selectors.euiDisabledSelector, ") {\n background-color: ").concat(buttonColors.backgroundActive, ";\n }\n ");
223
224
  };
224
225
  return " \n ".concat((0, _functions.highContrastModeStyles)(euiThemeContext, {
225
226
  none: baseStyles(),
@@ -232,7 +233,7 @@ var _interactionStyles = function _interactionStyles(euiThemeContext, buttonColo
232
233
  */
233
234
  var highContrastHoverIndicatorStyles = exports.highContrastHoverIndicatorStyles = function highContrastHoverIndicatorStyles(_ref2) {
234
235
  var euiTheme = _ref2.euiTheme;
235
- 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((0, _euiThemeCommon.mathWithUnits)(euiTheme.border.radius.small, function (x) {
236
+ return "\n &:hover:not(".concat(_selectors.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((0, _euiThemeCommon.mathWithUnits)(euiTheme.border.radius.small, function (x) {
236
237
  return x / 2;
237
238
  }), ";\n background-color: transparent;\n pointer-events: none;\n }\n }\n");
238
239
  };
@@ -3,7 +3,8 @@
3
3
  Object.defineProperty(exports, "__esModule", {
4
4
  value: true
5
5
  });
6
- exports.useEuiFontSize = exports.euiTextTruncate = exports.euiTextBreakWord = exports.euiNumberFormat = exports.euiFontSize = void 0;
6
+ exports.useEuiFontSize = exports.euiTextTruncateCSS = exports.euiTextTruncate = exports.euiTextBreakWord = exports.euiNumberFormat = exports.euiFontSize = void 0;
7
+ var _react = require("@emotion/react");
7
8
  var _typography = require("../functions/typography");
8
9
  var _theme = require("../../services/theme");
9
10
  var _typography2 = require("../variables/typography");
@@ -60,6 +61,14 @@ var euiTextTruncate = exports.euiTextTruncate = function euiTextTruncate() {
60
61
  , "\n overflow: hidden !important;\n text-overflow: ellipsis !important;\n white-space: nowrap !important;\n");
61
62
  };
62
63
 
64
+ /**
65
+ * Emotion CSS wrapper around `euiTextTruncate` style.
66
+ */
67
+ var euiTextTruncateCSS = exports.euiTextTruncateCSS = function euiTextTruncateCSS() {
68
+ var maxWidth = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : '100%';
69
+ return /*#__PURE__*/(0, _react.css)(euiTextTruncate(maxWidth), ";;label:euiTextTruncateCSS;");
70
+ };
71
+
63
72
  /**
64
73
  * Fixed-width numbers for tabular data
65
74
  */
@@ -8,7 +8,7 @@ import _possibleConstructorReturn from "@babel/runtime/helpers/possibleConstruct
8
8
  import _getPrototypeOf from "@babel/runtime/helpers/getPrototypeOf";
9
9
  import _inherits from "@babel/runtime/helpers/inherits";
10
10
  import _defineProperty from "@babel/runtime/helpers/defineProperty";
11
- var _excluded = ["className", "loading", "items", "itemId", "columns", "pagination", "sorting", "selection", "onChange", "error", "noItemsMessage", "compressed", "itemIdToExpandedRowMap", "responsiveBreakpoint", "rowProps", "cellProps", "tableCaption", "rowHeader", "tableLayout"],
11
+ var _excluded = ["className", "loading", "items", "itemId", "columns", "pagination", "sorting", "selection", "onChange", "error", "noItemsMessage", "compressed", "itemIdToExpandedRowMap", "responsiveBreakpoint", "rowProps", "cellProps", "tableCaption", "rowHeader", "tableLayout", "hasBackground"],
12
12
  _excluded2 = ["align", "render", "dataType", "isExpander", "textOnly", "name", "field", "description", "sortable", "footer", "mobileOptions", "nameTooltip"];
13
13
  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; }
14
14
  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; }
@@ -352,6 +352,7 @@ export var EuiBasicTable = /*#__PURE__*/function (_Component) {
352
352
  tableCaption = _this$props2.tableCaption,
353
353
  rowHeader = _this$props2.rowHeader,
354
354
  tableLayout = _this$props2.tableLayout,
355
+ hasBackground = _this$props2.hasBackground,
355
356
  rest = _objectWithoutProperties(_this$props2, _excluded);
356
357
  var classes = classNames('euiBasicTable', {
357
358
  'euiBasicTable-loading': loading
@@ -369,6 +370,7 @@ export var EuiBasicTable = /*#__PURE__*/function (_Component) {
369
370
  compressed = _this$props3.compressed,
370
371
  responsiveBreakpoint = _this$props3.responsiveBreakpoint,
371
372
  tableLayout = _this$props3.tableLayout,
373
+ hasBackground = _this$props3.hasBackground,
372
374
  loading = _this$props3.loading;
373
375
  return ___EmotionJSX(React.Fragment, null, ___EmotionJSX(EuiTableHeaderMobile, {
374
376
  responsiveBreakpoint: responsiveBreakpoint
@@ -377,6 +379,7 @@ export var EuiBasicTable = /*#__PURE__*/function (_Component) {
377
379
  tableLayout: tableLayout,
378
380
  responsiveBreakpoint: responsiveBreakpoint,
379
381
  compressed: compressed,
382
+ hasBackground: hasBackground,
380
383
  css: loading && safariLoadingWorkaround
381
384
  }, this.renderTableCaption(), this.renderTableHead(), this.renderTableBody(), this.renderTableFooter())));
382
385
  }
@@ -8,7 +8,7 @@ function _EMOTION_STRINGIFIED_CSS_ERROR__() { return "You have tried to stringif
8
8
  */
9
9
 
10
10
  import { css } from '@emotion/react';
11
- import { logicalCSS } from '../../../global_styling';
11
+ import { euiDisabledSelector, logicalCSS } from '../../../global_styling';
12
12
  import { highContrastModeStyles, preventForcedColors } from '../../../global_styling/functions/high_contrast';
13
13
  import { euiFormVariables } from '../../form/form.styles';
14
14
  export var euiButtonGroupStyles = {
@@ -43,6 +43,6 @@ var _highContrastStyles = function _highContrastStyles(euiThemeContext, compress
43
43
  var euiTheme = euiThemeContext.euiTheme;
44
44
  return highContrastModeStyles(euiThemeContext, {
45
45
  preferred: compressed ? "\n .euiButtonGroupButton {\n border: none;\n }\n " : '',
46
- forced: "\n .euiButtonGroupButton-isSelected {\n ".concat(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 ")
46
+ forced: "\n .euiButtonGroupButton-isSelected {\n ".concat(preventForcedColors(euiThemeContext), "\n color: ").concat(euiTheme.colors.emptyShade, ";\n background-color: ").concat(euiTheme.colors.fullShade, ";\n\n &:is(:hover, :focus):not(").concat(euiDisabledSelector, ") {\n &::before {\n border-color: ").concat(euiTheme.colors.textInverse, ";\n }\n }\n }\n\n .euiButtonGroupButton:is(").concat(euiDisabledSelector, ") {\n opacity: 0.5;\n }\n ")
47
47
  });
48
48
  };
@@ -84,7 +84,7 @@ export var euiButtonGroupButtonStyles = function euiButtonGroupButtonStyles(euiT
84
84
  },
85
85
  compressed: /*#__PURE__*/css(logicalCSS('height', compressedButtonHeight), " line-height:", compressedButtonHeight, ";font-weight:", euiTheme.font.weight.medium, ";padding:0;margin:", euiTheme.size.xxs, ";border-radius:", mathWithUnits(euiTheme.border.radius.small, function (x) {
86
86
  return x / 2;
87
- }), ";&+.euiButtonGroupButton{", logicalCSS('margin-left', '0'), ";}&:is(", selectedSelectors, "):not(:disabled){border:none;", highContrastModeStyles(euiThemeContext, {
87
+ }), ";&+.euiButtonGroupButton{", logicalCSS('margin-left', '0'), ";}&:is(", selectedSelectors, "):not(", euiDisabledSelector, "){border:none;", highContrastModeStyles(euiThemeContext, {
88
88
  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(mathWithUnits(euiTheme.border.width.thin, function (x) {
89
89
  return x * 3;
90
90
  }), ";\n }\n ")
@@ -95,10 +95,16 @@ export var EuiAbsoluteTab = function EuiAbsoluteTab(_ref) {
95
95
  return;
96
96
  }
97
97
 
98
+ // We can be forgiving for `dateFormat` if we are certain
99
+ // we're not expecting any of the other formats allowed;
100
+ // otherwise we can get valid but inaccurate results e.g.
101
+ // `1970-01-01` -> `Jan 19, 1970 @ 01:01:00.000`
102
+ var strictModeForPassedFormat = moment(textInputValue, ALLOWED_USER_DATE_FORMATS, true).isValid();
103
+
98
104
  // Attempt to parse with passed `dateFormat` and `locale`
99
105
  var _valueAsMoment = moment(textInputValue, dateFormat, typeof locale === 'string' ? locale : 'en',
100
106
  // Narrow the union type to string
101
- true);
107
+ strictModeForPassedFormat);
102
108
  var dateIsValid = _valueAsMoment.isValid();
103
109
 
104
110
  // If not valid, try a few other standardized formats
@@ -23,11 +23,13 @@ import React, { Component } from 'react';
23
23
  import classNames from 'classnames';
24
24
  import moment from 'moment'; // eslint-disable-line import/named
25
25
  import dateMath from '@elastic/datemath';
26
- import { useEuiMemoizedStyles } from '../../../services';
26
+ import { useEuiMemoizedStyles, RenderWithEuiTheme } from '../../../services';
27
27
  import { isObject } from '../../../services/predicate';
28
+ import { euiTextTruncateCSS } from '../../../global_styling';
28
29
  import { EuiI18nConsumer } from '../../context';
29
30
  import { EuiDatePickerRange } from '../date_picker_range';
30
31
  import { EuiFormControlButton, EuiFormControlLayout } from '../../form';
32
+ import { EuiToolTip } from '../../tool_tip';
31
33
  import { RenderI18nTimeOptions } from './time_options';
32
34
  import { PrettyDuration, showPrettyDuration } from './pretty_duration';
33
35
  import { EuiTimeWindowButtons } from './time_window_buttons';
@@ -293,22 +295,38 @@ export var EuiSuperDatePickerInternal = /*#__PURE__*/function (_Component) {
293
295
  };
294
296
  var isDisabledDisplay = isObject(isDisabled) && (isDisabled === null || isDisabled === void 0 ? void 0 : isDisabled.display);
295
297
  if (isDisabledDisplay || showPrettyDuration && !isStartDatePopoverOpen && !isEndDatePopoverOpen) {
296
- return ___EmotionJSX(EuiFormControlLayout, formControlLayoutProps, !isQuickSelectOnly && ___EmotionJSX(EuiFormControlButton, {
297
- type: "button",
298
- css: styles.euiSuperDatePicker__prettyFormat,
299
- className: classNames('euiSuperDatePicker__prettyFormat', {
300
- 'euiSuperDatePicker__prettyFormat--disabled': isDisabled
301
- }),
302
- "data-test-subj": "superDatePickerShowDatesButton",
303
- disabled: !!isDisabled,
304
- onClick: _this.hidePrettyDuration,
305
- onFocus: onFocus
306
- }, isDisabledDisplay ? isDisabled.display : ___EmotionJSX(PrettyDuration, {
307
- timeFrom: start,
308
- timeTo: end,
309
- quickRanges: commonlyUsedRanges,
310
- dateFormat: dateFormat
311
- })));
298
+ // Tooltip content with full range
299
+ var startMoment = dateMath.parse(start);
300
+ var endMoment = dateMath.parse(end, {
301
+ roundUp: true
302
+ });
303
+ var separator = ' – ';
304
+ var formattedFullRange = isInvalid ? '' : (startMoment === null || startMoment === void 0 ? void 0 : startMoment.format(dateFormat)) + separator + (endMoment === null || endMoment === void 0 ? void 0 : endMoment.format(dateFormat));
305
+ return ___EmotionJSX(RenderWithEuiTheme, null, function (euiTheme) {
306
+ return ___EmotionJSX(EuiFormControlLayout, formControlLayoutProps, !isQuickSelectOnly && ___EmotionJSX(EuiToolTip, {
307
+ css: styles.euiSuperDatePicker__prettyDurationTooltip,
308
+ content: formattedFullRange,
309
+ display: "block",
310
+ offset: euiTheme.euiTheme.base * 0.5
311
+ }, ___EmotionJSX(EuiFormControlButton, {
312
+ type: "button",
313
+ className: classNames('euiSuperDatePicker__prettyFormat', {
314
+ 'euiSuperDatePicker__prettyFormat--disabled': isDisabled
315
+ }),
316
+ compressed: compressed,
317
+ "data-test-subj": "superDatePickerShowDatesButton",
318
+ disabled: !!isDisabled,
319
+ onClick: _this.hidePrettyDuration,
320
+ onFocus: onFocus
321
+ }, isDisabledDisplay ? isDisabled.display : ___EmotionJSX("span", {
322
+ css: euiTextTruncateCSS()
323
+ }, ___EmotionJSX(PrettyDuration, {
324
+ timeFrom: start,
325
+ timeTo: end,
326
+ quickRanges: commonlyUsedRanges,
327
+ dateFormat: dateFormat
328
+ })))));
329
+ });
312
330
  }
313
331
  var rangeCssStyles = [styles.euiSuperDatePicker__range, formControlLayoutProps.css];
314
332
 
@@ -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
- euiSuperDatePicker__prettyFormat: /*#__PURE__*/css(_buttonStyles(euiThemeContext), " text-align:start;--euiFormControlStateHoverColor:", forms.borderHovered, ";", euiFormControlDefaultShadow(euiThemeContext), " &:focus{", euiFormControlFocusStyles(euiThemeContext), ";}", highContrastModeStyles(euiThemeContext, {
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, {
@@ -18,15 +18,17 @@ var EuiFlexItemInternal = function EuiFlexItemInternal(_ref, ref) {
18
18
  var children = _ref.children,
19
19
  className = _ref.className,
20
20
  _ref$grow = _ref.grow,
21
- grow = _ref$grow === void 0 ? true : _ref$grow,
21
+ _grow = _ref$grow === void 0 ? true : _ref$grow,
22
22
  _ref$component = _ref.component,
23
23
  component = _ref$component === void 0 ? 'div' : _ref$component,
24
24
  rest = _objectWithoutProperties(_ref, _excluded);
25
+ // resets `grow` to the default value when an invalid value is passed
26
+ var grow = VALID_GROW_VALUES.indexOf(_grow) === -1 ? true : _grow;
25
27
  useEffect(function () {
26
- if (VALID_GROW_VALUES.indexOf(grow) === -1) {
27
- throw new Error("Prop `grow` passed to `EuiFlexItem` must be a boolean or an integer between 0 and 10, received `".concat(grow, "`"));
28
+ if (process.env.NODE_ENV === 'development' && VALID_GROW_VALUES.indexOf(_grow) === -1) {
29
+ console.warn("Prop `grow` passed to `EuiFlexItem` must be a boolean or an integer between 0 and 10, received `".concat(_grow, "`. Defaulting to `true`."));
28
30
  }
29
- }, [grow]);
31
+ }, [_grow]);
30
32
  var cssStyles = [styles.euiFlexItem, !grow ? styles.growZero : styles.grow, grow && (typeof grow === 'number' ? styles.growSizes[grow] : styles.growSizes['1'])];
31
33
  var classes = classNames('euiFlexItem', className);
32
34