@elastic/eui 97.0.0-backport.0 → 97.1.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 (131) hide show
  1. package/es/components/datagrid/body/cell/data_grid_cell.styles.js +4 -2
  2. package/es/components/datagrid/body/cell/focus_utils.js +14 -4
  3. package/es/components/datagrid/body/data_grid_body.js +2 -1
  4. package/es/components/datagrid/body/data_grid_body_custom.js +5 -2
  5. package/es/components/datagrid/body/data_grid_body_virtualized.js +8 -4
  6. package/es/components/datagrid/body/header/column_actions.js +262 -27
  7. package/es/components/datagrid/body/header/{data_grid_column_resizer.js → column_resizer.js} +10 -4
  8. package/es/components/datagrid/body/header/{data_grid_column_resizer.styles.js → column_resizer.styles.js} +6 -1
  9. package/es/components/datagrid/body/header/column_sorting.js +134 -0
  10. package/es/components/datagrid/body/header/data_grid_control_header_cell.js +3 -3
  11. package/es/components/datagrid/body/header/data_grid_header_cell.js +86 -305
  12. package/es/components/datagrid/body/header/data_grid_header_cell.styles.js +1 -1
  13. package/es/components/datagrid/body/header/data_grid_header_cell_wrapper.js +19 -17
  14. package/es/components/datagrid/body/header/data_grid_header_cell_wrapper.styles.js +1 -2
  15. package/es/components/datagrid/body/header/data_grid_header_row.js +25 -10
  16. package/es/components/datagrid/body/header/draggable_columns.js +301 -0
  17. package/es/components/datagrid/body/header/draggable_columns.styles.js +38 -0
  18. package/es/components/datagrid/data_grid.js +2 -1
  19. package/es/components/datagrid/data_grid.stories.utils.js +9 -6
  20. package/es/components/datagrid/utils/col_widths.js +17 -13
  21. package/es/components/datagrid/utils/focus.js +2 -2
  22. package/es/components/datagrid/utils/scrolling.js +13 -10
  23. package/es/components/drag_and_drop/draggable.js +13 -5
  24. package/es/components/header/header.styles.js +6 -12
  25. package/es/components/page_template/inner/page_inner.styles.js +3 -4
  26. package/es/components/tabs/tab.js +1 -1
  27. package/eui.d.ts +406 -311
  28. package/i18ntokens.json +123 -123
  29. package/lib/components/datagrid/body/cell/data_grid_cell.styles.js +4 -2
  30. package/lib/components/datagrid/body/cell/focus_utils.js +14 -4
  31. package/lib/components/datagrid/body/data_grid_body.js +2 -1
  32. package/lib/components/datagrid/body/data_grid_body_custom.js +5 -2
  33. package/lib/components/datagrid/body/data_grid_body_virtualized.js +8 -4
  34. package/lib/components/datagrid/body/header/column_actions.js +265 -29
  35. package/lib/components/datagrid/body/header/{data_grid_column_resizer.js → column_resizer.js} +11 -5
  36. package/{optimize/lib/components/datagrid/body/header/data_grid_column_resizer.styles.js → lib/components/datagrid/body/header/column_resizer.styles.js} +6 -1
  37. package/lib/components/datagrid/body/header/column_sorting.js +144 -0
  38. package/lib/components/datagrid/body/header/data_grid_control_header_cell.js +3 -3
  39. package/lib/components/datagrid/body/header/data_grid_header_cell.js +86 -305
  40. package/lib/components/datagrid/body/header/data_grid_header_cell.styles.js +1 -1
  41. package/lib/components/datagrid/body/header/data_grid_header_cell_wrapper.js +19 -17
  42. package/lib/components/datagrid/body/header/data_grid_header_cell_wrapper.styles.js +1 -2
  43. package/lib/components/datagrid/body/header/data_grid_header_row.js +24 -9
  44. package/lib/components/datagrid/body/header/draggable_columns.js +308 -0
  45. package/lib/components/datagrid/body/header/draggable_columns.styles.js +42 -0
  46. package/lib/components/datagrid/data_grid.js +2 -1
  47. package/lib/components/datagrid/data_grid.stories.utils.js +9 -6
  48. package/lib/components/datagrid/utils/col_widths.js +17 -13
  49. package/lib/components/datagrid/utils/focus.js +2 -2
  50. package/lib/components/datagrid/utils/scrolling.js +13 -10
  51. package/lib/components/drag_and_drop/draggable.js +13 -5
  52. package/lib/components/header/header.styles.js +6 -12
  53. package/lib/components/page_template/inner/page_inner.styles.js +3 -4
  54. package/lib/components/tabs/tab.js +1 -1
  55. package/optimize/es/components/datagrid/body/cell/data_grid_cell.styles.js +4 -2
  56. package/optimize/es/components/datagrid/body/cell/focus_utils.js +13 -4
  57. package/optimize/es/components/datagrid/body/data_grid_body_custom.js +3 -1
  58. package/optimize/es/components/datagrid/body/data_grid_body_virtualized.js +6 -3
  59. package/optimize/es/components/datagrid/body/header/column_actions.js +250 -26
  60. package/optimize/es/components/datagrid/body/header/{data_grid_column_resizer.js → column_resizer.js} +8 -3
  61. package/optimize/es/components/datagrid/body/header/{data_grid_column_resizer.styles.js → column_resizer.styles.js} +6 -1
  62. package/optimize/es/components/datagrid/body/header/column_sorting.js +134 -0
  63. package/optimize/es/components/datagrid/body/header/data_grid_control_header_cell.js +2 -2
  64. package/optimize/es/components/datagrid/body/header/data_grid_header_cell.js +82 -302
  65. package/optimize/es/components/datagrid/body/header/data_grid_header_cell.styles.js +1 -1
  66. package/optimize/es/components/datagrid/body/header/data_grid_header_cell_wrapper.js +15 -14
  67. package/optimize/es/components/datagrid/body/header/data_grid_header_cell_wrapper.styles.js +1 -2
  68. package/optimize/es/components/datagrid/body/header/data_grid_header_row.js +25 -10
  69. package/optimize/es/components/datagrid/body/header/draggable_columns.js +223 -0
  70. package/optimize/es/components/datagrid/body/header/draggable_columns.styles.js +38 -0
  71. package/optimize/es/components/datagrid/data_grid.js +2 -1
  72. package/optimize/es/components/datagrid/data_grid.stories.utils.js +7 -5
  73. package/optimize/es/components/datagrid/utils/col_widths.js +17 -13
  74. package/optimize/es/components/datagrid/utils/focus.js +2 -2
  75. package/optimize/es/components/datagrid/utils/scrolling.js +13 -10
  76. package/optimize/es/components/drag_and_drop/draggable.js +8 -3
  77. package/optimize/es/components/header/header.styles.js +6 -12
  78. package/optimize/es/components/page_template/inner/page_inner.styles.js +3 -4
  79. package/optimize/es/components/tabs/tab.js +1 -1
  80. package/optimize/lib/components/datagrid/body/cell/data_grid_cell.styles.js +4 -2
  81. package/optimize/lib/components/datagrid/body/cell/focus_utils.js +13 -4
  82. package/optimize/lib/components/datagrid/body/data_grid_body_custom.js +3 -1
  83. package/optimize/lib/components/datagrid/body/data_grid_body_virtualized.js +6 -3
  84. package/optimize/lib/components/datagrid/body/header/column_actions.js +253 -27
  85. package/optimize/lib/components/datagrid/body/header/{data_grid_column_resizer.js → column_resizer.js} +9 -4
  86. package/{test-env/components/datagrid/body/header/data_grid_column_resizer.styles.js → optimize/lib/components/datagrid/body/header/column_resizer.styles.js} +6 -1
  87. package/optimize/lib/components/datagrid/body/header/column_sorting.js +144 -0
  88. package/optimize/lib/components/datagrid/body/header/data_grid_control_header_cell.js +2 -2
  89. package/optimize/lib/components/datagrid/body/header/data_grid_header_cell.js +80 -300
  90. package/optimize/lib/components/datagrid/body/header/data_grid_header_cell.styles.js +1 -1
  91. package/optimize/lib/components/datagrid/body/header/data_grid_header_cell_wrapper.js +15 -14
  92. package/optimize/lib/components/datagrid/body/header/data_grid_header_cell_wrapper.styles.js +1 -2
  93. package/optimize/lib/components/datagrid/body/header/data_grid_header_row.js +24 -9
  94. package/optimize/lib/components/datagrid/body/header/draggable_columns.js +231 -0
  95. package/optimize/lib/components/datagrid/body/header/draggable_columns.styles.js +43 -0
  96. package/optimize/lib/components/datagrid/data_grid.js +2 -1
  97. package/optimize/lib/components/datagrid/data_grid.stories.utils.js +7 -5
  98. package/optimize/lib/components/datagrid/utils/col_widths.js +17 -13
  99. package/optimize/lib/components/datagrid/utils/focus.js +2 -2
  100. package/optimize/lib/components/datagrid/utils/scrolling.js +13 -10
  101. package/optimize/lib/components/drag_and_drop/draggable.js +8 -3
  102. package/optimize/lib/components/header/header.styles.js +6 -12
  103. package/optimize/lib/components/page_template/inner/page_inner.styles.js +3 -4
  104. package/optimize/lib/components/tabs/tab.js +1 -1
  105. package/package.json +2 -3
  106. package/test-env/components/datagrid/body/cell/data_grid_cell.styles.js +4 -2
  107. package/test-env/components/datagrid/body/cell/focus_utils.js +13 -4
  108. package/test-env/components/datagrid/body/data_grid_body.js +2 -1
  109. package/test-env/components/datagrid/body/data_grid_body_custom.js +5 -2
  110. package/test-env/components/datagrid/body/data_grid_body_virtualized.js +8 -4
  111. package/test-env/components/datagrid/body/header/column_actions.js +261 -27
  112. package/test-env/components/datagrid/body/header/{data_grid_column_resizer.js → column_resizer.js} +11 -5
  113. package/{lib/components/datagrid/body/header/data_grid_column_resizer.styles.js → test-env/components/datagrid/body/header/column_resizer.styles.js} +6 -1
  114. package/test-env/components/datagrid/body/header/column_sorting.js +144 -0
  115. package/test-env/components/datagrid/body/header/data_grid_control_header_cell.js +3 -3
  116. package/test-env/components/datagrid/body/header/data_grid_header_cell.js +82 -301
  117. package/test-env/components/datagrid/body/header/data_grid_header_cell.styles.js +1 -1
  118. package/test-env/components/datagrid/body/header/data_grid_header_cell_wrapper.js +19 -17
  119. package/test-env/components/datagrid/body/header/data_grid_header_cell_wrapper.styles.js +1 -2
  120. package/test-env/components/datagrid/body/header/data_grid_header_row.js +24 -9
  121. package/test-env/components/datagrid/body/header/draggable_columns.js +305 -0
  122. package/test-env/components/datagrid/body/header/draggable_columns.styles.js +43 -0
  123. package/test-env/components/datagrid/data_grid.js +2 -1
  124. package/test-env/components/datagrid/data_grid.stories.utils.js +9 -6
  125. package/test-env/components/datagrid/utils/col_widths.js +17 -13
  126. package/test-env/components/datagrid/utils/focus.js +2 -2
  127. package/test-env/components/datagrid/utils/scrolling.js +13 -10
  128. package/test-env/components/drag_and_drop/draggable.js +13 -5
  129. package/test-env/components/header/header.styles.js +6 -12
  130. package/test-env/components/page_template/inner/page_inner.styles.js +3 -4
  131. package/test-env/components/tabs/tab.js +1 -1
@@ -63,7 +63,8 @@ export var useScrollCellIntoView = function useScrollCellIntoView(_ref) {
63
63
  headerRowHeight = _ref.headerRowHeight,
64
64
  footerRowHeight = _ref.footerRowHeight,
65
65
  visibleRowCount = _ref.visibleRowCount,
66
- hasStickyFooter = _ref.hasStickyFooter;
66
+ hasStickyFooter = _ref.hasStickyFooter,
67
+ canDragAndDropColumns = _ref.canDragAndDropColumns;
67
68
  var scrollCellIntoView = useCallback(
68
69
  /*#__PURE__*/
69
70
  // Note: in order for this UX to work correctly with react-window's APIs,
@@ -72,7 +73,7 @@ export var useScrollCellIntoView = function useScrollCellIntoView(_ref) {
72
73
  function () {
73
74
  var _ref3 = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee(_ref2) {
74
75
  var _adjustedScrollLeft;
75
- var rowIndex, colIndex, getCell, cell, cellIsInView, _outerGridRef$current, scrollTop, scrollLeft, adjustedScrollTop, adjustedScrollLeft, cellRightPos, rightScrollBound, rightWidthOutOfView, cellLeftPos, leftScrollBound, leftWidthOutOfView, isStickyHeader, isStickyFooter, _adjustedScrollTop, parentRow, cellBottomPos, bottomScrollBound, bottomHeightOutOfView, cellTopPos, topScrollBound, topHeightOutOfView, _adjustedScrollLeft2, _adjustedScrollTop2;
76
+ var rowIndex, colIndex, getCell, cell, cellIsInView, isStickyHeader, isStickyFooter, isDraggableHeader, isDraggableHeaderCell, _outerGridRef$current, scrollTop, scrollLeft, adjustedScrollTop, adjustedScrollLeft, cellLeftPos, cellRightPos, rightScrollBound, rightWidthOutOfView, leftScrollBound, leftWidthOutOfView, _adjustedScrollTop, parentRow, cellBottomPos, bottomScrollBound, bottomHeightOutOfView, cellTopPos, topScrollBound, topHeightOutOfView, _adjustedScrollLeft2, _adjustedScrollTop2;
76
77
  return _regeneratorRuntime().wrap(function _callee$(_context) {
77
78
  while (1) switch (_context.prev = _context.next) {
78
79
  case 0:
@@ -119,7 +120,10 @@ export var useScrollCellIntoView = function useScrollCellIntoView(_ref) {
119
120
  return _context.abrupt("return");
120
121
  case 15:
121
122
  // If for some reason we can't find a valid cell, short-circuit
122
- // We now manually adjust scroll positioning around the cell to ensure it's
123
+ isStickyHeader = rowIndex === -1;
124
+ isStickyFooter = hasStickyFooter && rowIndex === visibleRowCount;
125
+ isDraggableHeader = canDragAndDropColumns && isStickyHeader;
126
+ isDraggableHeaderCell = isDraggableHeader && cell.offsetLeft === 0 && colIndex !== 0; // We now manually adjust scroll positioning around the cell to ensure it's
123
127
  // fully in view on all sides. A couple of notes on this:
124
128
  // 1. We're avoiding relying on react-window's scrollToItem for this because it also
125
129
  // does not account for sticky items (see https://github.com/bvaughn/react-window/issues/586)
@@ -128,8 +132,10 @@ export var useScrollCellIntoView = function useScrollCellIntoView(_ref) {
128
132
  // halfway there, but doesn't guarantee the *full* cell in view, or account for
129
133
  // sticky positioned rows or OS scrollbars, hence these workarounds
130
134
  _outerGridRef$current = outerGridRef.current, scrollTop = _outerGridRef$current.scrollTop, scrollLeft = _outerGridRef$current.scrollLeft;
131
- // Check if the cell's right side is outside the current scrolling bounds
132
- cellRightPos = cell.offsetLeft + cell.offsetWidth;
135
+ // Draggable header columns are nested within EuiDraggables,
136
+ // and their offsetLeft needs to go up a wrapper as a result
137
+ cellLeftPos = isDraggableHeaderCell ? cell.offsetParent.offsetLeft : cell.offsetLeft; // Check if the cell's right side is outside the current scrolling bounds
138
+ cellRightPos = cellLeftPos + cell.offsetWidth;
133
139
  rightScrollBound = scrollLeft + outerGridRef.current.clientWidth; // Note: We specifically want clientWidth and not offsetWidth here to account for scrollbars
134
140
  rightWidthOutOfView = cellRightPos - rightScrollBound;
135
141
  if (rightWidthOutOfView > 0) {
@@ -137,7 +143,6 @@ export var useScrollCellIntoView = function useScrollCellIntoView(_ref) {
137
143
  }
138
144
 
139
145
  // Check if the cell's left side is outside the current scrolling bounds
140
- cellLeftPos = cell.offsetLeft;
141
146
  leftScrollBound = (_adjustedScrollLeft = adjustedScrollLeft) !== null && _adjustedScrollLeft !== void 0 ? _adjustedScrollLeft : scrollLeft;
142
147
  leftWidthOutOfView = leftScrollBound - cellLeftPos;
143
148
  if (leftWidthOutOfView > 0) {
@@ -148,8 +153,6 @@ export var useScrollCellIntoView = function useScrollCellIntoView(_ref) {
148
153
 
149
154
  // Skip top/bottom scroll adjustments for sticky headers & footers
150
155
  // since they should always be in view vertically
151
- isStickyHeader = rowIndex === -1;
152
- isStickyFooter = hasStickyFooter && rowIndex === visibleRowCount;
153
156
  if (!isStickyHeader && !isStickyFooter) {
154
157
  parentRow = cell.parentNode; // Check if the cell's bottom side is outside the current scrolling bounds
155
158
  cellBottomPos = parentRow.offsetTop + cell.offsetHeight;
@@ -179,7 +182,7 @@ export var useScrollCellIntoView = function useScrollCellIntoView(_ref) {
179
182
  scrollTop: (_adjustedScrollTop2 = adjustedScrollTop) !== null && _adjustedScrollTop2 !== void 0 ? _adjustedScrollTop2 : scrollTop
180
183
  });
181
184
  }
182
- case 28:
185
+ case 30:
183
186
  case "end":
184
187
  return _context.stop();
185
188
  }
@@ -188,7 +191,7 @@ export var useScrollCellIntoView = function useScrollCellIntoView(_ref) {
188
191
  return function (_x) {
189
192
  return _ref3.apply(this, arguments);
190
193
  };
191
- }(), [gridRef, outerGridRef, hasGridScrolling, headerRowHeight, footerRowHeight, visibleRowCount, hasStickyFooter]);
194
+ }(), [gridRef, outerGridRef, hasGridScrolling, headerRowHeight, footerRowHeight, visibleRowCount, hasStickyFooter, canDragAndDropColumns]);
192
195
  return {
193
196
  scrollCellIntoView: scrollCellIntoView
194
197
  };
@@ -50,6 +50,7 @@ export var EuiDraggable = function EuiDraggable(_ref) {
50
50
  cloneItems = _useContext.cloneItems;
51
51
  var euiTheme = useEuiTheme();
52
52
  var styles = euiDraggableStyles(euiTheme);
53
+ var hasCustomDragHandle = customDragHandle !== false;
53
54
  return ___EmotionJSX(Draggable, _extends({
54
55
  draggableId: draggableId,
55
56
  index: index,
@@ -57,13 +58,14 @@ export var EuiDraggable = function EuiDraggable(_ref) {
57
58
  }, rest), function (provided, snapshot, rubric) {
58
59
  var _provided$dragHandleP, _provided$dragHandleP2;
59
60
  var isDragging = snapshot.isDragging;
61
+ var isFullyCustomDragHandle = customDragHandle === 'custom';
60
62
  var cssStyles = [styles.euiDraggable, cloneItems && !isDragging && styles.hasClone, isDragging && styles.isDragging, isRemovable && styles.isRemovable, styles.spacing[spacing]];
61
63
  var classes = classNames('euiDraggable', className);
62
64
  var childClasses = classNames('euiDraggable__item', {
63
65
  'euiDraggable__item-isDisabled': isDragDisabled
64
66
  });
65
67
  var DraggableElement = typeof children === 'function' ? children(provided, snapshot, rubric) : children;
66
- var content = ___EmotionJSX(React.Fragment, null, ___EmotionJSX("div", _extends({}, provided.draggableProps, !customDragHandle ? provided.dragHandleProps : {}, {
68
+ var content = ___EmotionJSX(React.Fragment, null, ___EmotionJSX("div", _extends({}, provided.draggableProps, !hasCustomDragHandle ? provided.dragHandleProps : {}, {
67
69
  ref: provided.innerRef,
68
70
  "data-test-subj": dataTestSubj,
69
71
  className: classes,
@@ -73,11 +75,14 @@ export var EuiDraggable = function EuiDraggable(_ref) {
73
75
  // interactive element. Screen readers will cue users that this is a container
74
76
  // and has one or more elements inside that are part of a related group.
75
77
  ,
76
- role: hasInteractiveChildren ? 'group' : (_provided$dragHandleP = provided.dragHandleProps) === null || _provided$dragHandleP === void 0 ? void 0 : _provided$dragHandleP.role
78
+ role: isFullyCustomDragHandle ? undefined // prevent wrapper role from removing semantics of the children
79
+ : hasInteractiveChildren ? 'group' : (_provided$dragHandleP = provided.dragHandleProps) === null || _provided$dragHandleP === void 0 ? void 0 : _provided$dragHandleP.role
77
80
  // If the container includes an interactive element, we remove the tabindex=0
78
81
  // because [role="group"] does not permit or warrant a tab stop
82
+ // additionally we remove the tabindex when the child is a fully custom handle
83
+ // that has its own tabindex and handle props
79
84
  ,
80
- tabIndex: hasInteractiveChildren ? undefined : (_provided$dragHandleP2 = provided.dragHandleProps) === null || _provided$dragHandleP2 === void 0 ? void 0 : _provided$dragHandleP2.tabIndex
85
+ tabIndex: hasInteractiveChildren || isFullyCustomDragHandle ? undefined : (_provided$dragHandleP2 = provided.dragHandleProps) === null || _provided$dragHandleP2 === void 0 ? void 0 : _provided$dragHandleP2.tabIndex
81
86
  }), cloneElementWithCss(DraggableElement, {
82
87
  className: classNames(DraggableElement.props.className, childClasses),
83
88
  css: [euiDraggableItemStyles.euiDraggable__item, isDragDisabled && euiDraggableItemStyles.disabled]
@@ -95,9 +100,12 @@ EuiDraggable.propTypes = {
95
100
  children: PropTypes.oneOfType([PropTypes.element.isRequired, PropTypes.any.isRequired]).isRequired,
96
101
  className: PropTypes.string,
97
102
  /**
98
- * Whether the `children` will provide and set up its own drag handle
103
+ * Whether the `children` will provide and set up its own drag handle.
104
+ * The `custom` value additionally removes the `role` from the draggable container.
105
+ * Use this if the `children` element is focusable and should keep its
106
+ * semantic role for accessibility purposes.
99
107
  */
100
- customDragHandle: PropTypes.bool,
108
+ customDragHandle: PropTypes.oneOfType([PropTypes.bool.isRequired, PropTypes.oneOf(["custom"])]),
101
109
  /**
102
110
  * Whether the container has interactive children and should have `role="group"` instead of `"button"`.
103
111
  * Setting this flag ensures your drag & drop container is keyboard and screen reader accessible.
@@ -19,23 +19,18 @@ export var euiHeaderVariables = function euiHeaderVariables(euiThemeContext) {
19
19
  };
20
20
  };
21
21
  export var euiHeaderStyles = function euiHeaderStyles(euiThemeContext) {
22
- var euiTheme = euiThemeContext.euiTheme,
23
- colorMode = euiThemeContext.colorMode;
22
+ var euiTheme = euiThemeContext.euiTheme;
24
23
  var _euiHeaderVariables = euiHeaderVariables(euiThemeContext),
25
24
  height = _euiHeaderVariables.height,
26
25
  padding = _euiHeaderVariables.padding;
27
-
28
- // Curated border color to fade into the shadow without looking too much like a border
29
- // It adds separation between the header and flyout
30
- var borderColor = colorMode === 'DARK' ? shade(euiTheme.colors.emptyShade, 0.35) : shade(euiTheme.border.color, 0.03);
31
26
  return {
32
- euiHeader: /*#__PURE__*/css("display:flex;justify-content:space-between;", logicalCSS('height', height), " ", logicalCSS('padding-horizontal', padding), " ", euiShadowSmall(euiThemeContext), ";;label:euiHeader;"),
27
+ euiHeader: /*#__PURE__*/css("display:flex;justify-content:space-between;", logicalCSS('height', height), " ", logicalCSS('padding-horizontal', padding), " ", logicalCSS('border-bottom', euiTheme.border.thin), " ", euiShadowSmall(euiThemeContext), ";;label:euiHeader;"),
33
28
  // Position
34
29
  static: /*#__PURE__*/css("z-index:", Number(euiTheme.levels.header) - 1, ";position:relative;;label:static;"),
35
30
  fixed: /*#__PURE__*/css("z-index:", euiTheme.levels.header, ";position:fixed;", logicalCSS('top', 0), " ", logicalCSS('horizontal', 0), ";;label:fixed;"),
36
31
  // Theme
37
- default: /*#__PURE__*/css("background-color:", euiTheme.colors.emptyShade, ";", logicalCSS('border-bottom', "".concat(euiTheme.border.width.thin, " solid ").concat(borderColor)), ";;label:default;"),
38
- dark: /*#__PURE__*/css(euiHeaderDarkStyles(euiThemeContext, borderColor), ";label:dark;")
32
+ default: /*#__PURE__*/css("background-color:", euiTheme.colors.emptyShade, ";;label:default;"),
33
+ dark: /*#__PURE__*/css(euiHeaderDarkStyles(euiThemeContext), ";label:dark;")
39
34
  };
40
35
  };
41
36
 
@@ -49,12 +44,11 @@ export var euiHeaderStyles = function euiHeaderStyles(euiThemeContext) {
49
44
  * by Kibana in the near future, at which point we can remove this
50
45
  */
51
46
  import { euiFormVariables } from '../form/form.styles';
52
- var euiHeaderDarkStyles = function euiHeaderDarkStyles(euiThemeContext, defaultBorderColor) {
47
+ var euiHeaderDarkStyles = function euiHeaderDarkStyles(euiThemeContext) {
53
48
  var euiTheme = euiThemeContext.euiTheme,
54
49
  colorMode = euiThemeContext.colorMode;
55
50
  var _euiFormVariables = euiFormVariables(euiThemeContext),
56
51
  controlPlaceholderText = _euiFormVariables.controlPlaceholderText;
57
52
  var backgroundColor = colorMode === 'DARK' ? shade(euiTheme.colors.lightestShade, 0.5) : shade(euiTheme.colors.darkestShade, 0.28);
58
- var borderColor = colorMode === 'DARK' ? defaultBorderColor : backgroundColor;
59
- return "\n background-color: ".concat(backgroundColor, ";\n ").concat(logicalCSS('border-bottom-color', borderColor), "\n\n .euiHeaderLogo__text,\n .euiHeaderLink,\n .euiHeaderSectionItemButton {\n color: ").concat(euiTheme.colors.ghost, ";\n }\n\n .euiHeaderLink-isActive {\n color: ").concat(makeHighContrastColor(euiTheme.colors.primary)(backgroundColor), ";\n }\n\n .euiHeaderLogo,\n .euiHeaderLink,\n .euiHeaderSectionItemButton {\n &:focus {\n background-color: ").concat(shade(euiTheme.colors.primary, 0.5), ";\n }\n }\n\n .euiHeaderSectionItemButton__notification--badge {\n box-shadow: 0 0 0 ").concat(euiTheme.border.width.thin, " ").concat(backgroundColor, ";\n }\n\n .euiHeaderSectionItemButton__notification--dot {\n stroke: ").concat(backgroundColor, ";\n }\n\n .euiSelectableTemplateSitewide .euiFormControlLayout {\n background-color: transparent;\n\n &--group {\n border-color: ").concat(transparentize(euiTheme.colors.ghost, 0.3), ";\n }\n\n &:not(:focus-within) {\n /* Increase contrast of filled text to be more than placeholder text */\n color: ").concat(euiTheme.colors.ghost, ";\n\n input {\n /* Increase contrast of placeholder text */\n &::placeholder {\n color: ").concat(makeHighContrastColor(controlPlaceholderText, 8)(backgroundColor), ";\n }\n\n /* Inherit color from form control layout */\n color: inherit;\n background-color: transparent;\n }\n\n .euiFormControlLayout__append,\n .euiFormControlLayout__prepend {\n background-color: transparent;\n }\n\n .euiFormLabel {\n color: inherit;\n }\n }\n }\n ");
53
+ return "\n background-color: ".concat(backgroundColor, ";\n\n .euiHeaderLogo__text,\n .euiHeaderLink,\n .euiHeaderSectionItemButton {\n color: ").concat(euiTheme.colors.ghost, ";\n }\n\n .euiHeaderLink-isActive {\n color: ").concat(makeHighContrastColor(euiTheme.colors.primary)(backgroundColor), ";\n }\n\n .euiHeaderLogo,\n .euiHeaderLink,\n .euiHeaderSectionItemButton {\n &:focus {\n background-color: ").concat(shade(euiTheme.colors.primary, 0.5), ";\n }\n }\n\n .euiHeaderSectionItemButton__notification--badge {\n box-shadow: 0 0 0 ").concat(euiTheme.border.width.thin, " ").concat(backgroundColor, ";\n }\n\n .euiHeaderSectionItemButton__notification--dot {\n stroke: ").concat(backgroundColor, ";\n }\n\n .euiSelectableTemplateSitewide .euiFormControlLayout {\n background-color: transparent;\n\n &--group {\n border-color: ").concat(transparentize(euiTheme.colors.ghost, 0.3), ";\n }\n\n &:not(:focus-within) {\n /* Increase contrast of filled text to be more than placeholder text */\n color: ").concat(euiTheme.colors.ghost, ";\n\n input {\n /* Increase contrast of placeholder text */\n &::placeholder {\n color: ").concat(makeHighContrastColor(controlPlaceholderText, 8)(backgroundColor), ";\n }\n\n /* Inherit color from form control layout */\n color: inherit;\n background-color: transparent;\n }\n\n .euiFormControlLayout__append,\n .euiFormControlLayout__prepend {\n background-color: transparent;\n }\n\n .euiFormLabel {\n color: inherit;\n }\n }\n }\n ");
60
54
  };
@@ -9,15 +9,14 @@
9
9
  import { css } from '@emotion/react';
10
10
  import { euiShadow } from '../../../themes/amsterdam/global_styling/mixins';
11
11
  import { euiBackgroundColor, logicalCSS } from '../../../global_styling';
12
- import { transparentize } from '../../../services';
13
12
  export var euiPageInnerStyles = function euiPageInnerStyles(euiThemeContext) {
14
- var borderColor = transparentize(euiThemeContext.euiTheme.colors.lightShade, 0.7);
13
+ var euiTheme = euiThemeContext.euiTheme;
15
14
  return {
16
15
  euiPageInner: /*#__PURE__*/css("display:flex;flex-direction:column;align-items:stretch;flex:1 1 100%;", logicalCSS('max-width', '100%'), " ", logicalCSS('min-width', '0'), ";;label:euiPageInner;"),
17
16
  panelled: /*#__PURE__*/css("background:", euiBackgroundColor(euiThemeContext, 'plain'), ";", euiShadow(euiThemeContext, 'm'), ";;label:panelled;"),
18
17
  border: {
19
- top: /*#__PURE__*/css(logicalCSS('border-top', "".concat(euiThemeContext.euiTheme.border.width.thin, " solid ").concat(borderColor)), ";;label:top;"),
20
- left: /*#__PURE__*/css(logicalCSS('border-left', "".concat(euiThemeContext.euiTheme.border.width.thin, " solid ").concat(borderColor)), ";;label:left;")
18
+ top: /*#__PURE__*/css(logicalCSS('border-top', euiTheme.border.thin), ";;label:top;"),
19
+ left: /*#__PURE__*/css(logicalCSS('border-left', euiTheme.border.thin), ";;label:left;")
21
20
  }
22
21
  };
23
22
  };
@@ -67,7 +67,7 @@ export var EuiTab = function EuiTab(_ref) {
67
67
  target: target,
68
68
  rel: secureRel
69
69
  }, rest), prependNode, ___EmotionJSX("span", {
70
- className: "euiTab__content",
70
+ className: "euiTab__content eui-textTruncate",
71
71
  css: cssTabContentStyles
72
72
  }, children), appendNode);
73
73
  }