@elastic/eui 63.0.2 → 63.0.5

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 (30) hide show
  1. package/dist/eui_charts_theme.js +330 -330
  2. package/dist/eui_charts_theme.js.map +1 -1
  3. package/es/components/basic_table/collapsed_item_actions.js +1 -2
  4. package/es/components/description_list/description_list_title.js +1 -1
  5. package/es/components/header/header.js +2 -2
  6. package/es/components/page/page_sidebar/page_sidebar.js +8 -2
  7. package/es/components/page_template/page_template.js +3 -1
  8. package/eui.d.ts +1 -1
  9. package/i18ntokens.json +4 -4
  10. package/lib/components/basic_table/collapsed_item_actions.js +1 -2
  11. package/lib/components/description_list/description_list_title.js +1 -1
  12. package/lib/components/header/header.js +2 -2
  13. package/lib/components/page/page_sidebar/page_sidebar.js +8 -2
  14. package/lib/components/page_template/page_template.js +3 -1
  15. package/optimize/es/components/basic_table/collapsed_item_actions.js +1 -2
  16. package/optimize/es/components/description_list/description_list_title.js +1 -1
  17. package/optimize/es/components/header/header.js +2 -2
  18. package/optimize/es/components/page/page_sidebar/page_sidebar.js +8 -2
  19. package/optimize/es/components/page_template/page_template.js +3 -1
  20. package/optimize/lib/components/basic_table/collapsed_item_actions.js +1 -2
  21. package/optimize/lib/components/description_list/description_list_title.js +1 -1
  22. package/optimize/lib/components/header/header.js +2 -2
  23. package/optimize/lib/components/page/page_sidebar/page_sidebar.js +8 -2
  24. package/optimize/lib/components/page_template/page_template.js +3 -1
  25. package/package.json +1 -1
  26. package/test-env/components/basic_table/collapsed_item_actions.js +1 -2
  27. package/test-env/components/description_list/description_list_title.js +1 -1
  28. package/test-env/components/header/header.js +2 -2
  29. package/test-env/components/page/page_sidebar/page_sidebar.js +8 -2
  30. package/test-env/components/page_template/page_template.js +3 -1
@@ -94,8 +94,7 @@ export var CollapsedItemActions = /*#__PURE__*/function (_Component) {
94
94
  _defineProperty(_assertThisInitialized(_this), "registerPopoverDiv", function (popoverDiv) {
95
95
  if (!_this.popoverDiv) {
96
96
  _this.popoverDiv = popoverDiv;
97
-
98
- _this.popoverDiv.addEventListener('focusout', _this.onPopoverBlur);
97
+ _this.popoverDiv && _this.popoverDiv.addEventListener('focusout', _this.onPopoverBlur);
99
98
  }
100
99
  });
101
100
 
@@ -46,7 +46,7 @@ export var EuiDescriptionListTitle = function EuiDescriptionListTitle(_ref) {
46
46
 
47
47
  var theme = useEuiTheme();
48
48
  var styles = euiDescriptionListTitleStyles(theme);
49
- var conditionalStyles = compressed && textStyle === 'reverse' ? [styles.fontStyles.compressed] : [styles.fontStyles[textStyle]];
49
+ var conditionalStyles = compressed && textStyle !== 'reverse' ? [styles.fontStyles.compressed] : [styles.fontStyles[textStyle]];
50
50
 
51
51
  switch (type) {
52
52
  case 'inline':
@@ -47,13 +47,13 @@ export var EuiHeader = function EuiHeader(_ref) {
47
47
  // Increment fixed header counter for each fixed header
48
48
  euiHeaderFixedCounter++;
49
49
  document.body.classList.add('euiBody--headerIsFixed');
50
- document.body.setAttribute('data-fixed-headers', String(euiHeaderFixedCounter));
50
+ document.body.dataset.fixedHeaders = String(euiHeaderFixedCounter);
51
51
  return function () {
52
52
  // Both decrement the fixed counter AND then check if there are none
53
53
  if (--euiHeaderFixedCounter === 0) {
54
54
  // If there are none, THEN remove class
55
55
  document.body.classList.remove('euiBody--headerIsFixed');
56
- document.body.removeAttribute('data-fixed-headers');
56
+ delete document.body.dataset.fixedHeaders;
57
57
  }
58
58
  };
59
59
  }
@@ -64,11 +64,17 @@ export var EuiPageSidebar = function EuiPageSidebar(_ref) {
64
64
  setInlineStyles = _useState2[1];
65
65
 
66
66
  useEffect(function () {
67
+ var updatedStyles = _objectSpread(_objectSpread({}, style), logicalStyle('min-width', isResponding ? '100%' : minWidth));
68
+
67
69
  if (sticky) {
68
- var euiHeaderFixedCounter = Number(document.body.dataset.fixedHeaders);
70
+ var _document$body$datase;
71
+
72
+ var euiHeaderFixedCounter = Number((_document$body$datase = document.body.dataset.fixedHeaders) !== null && _document$body$datase !== void 0 ? _document$body$datase : 0);
69
73
  var offset = _typeof(sticky) === 'object' ? sticky === null || sticky === void 0 ? void 0 : sticky.offset : themeContext.euiTheme.base * 3 * euiHeaderFixedCounter;
70
- setInlineStyles(_objectSpread(_objectSpread(_objectSpread(_objectSpread({}, style), logicalStyle('min-width', isResponding ? '100%' : minWidth)), logicalStyle('top', offset)), logicalStyle('max-height', "calc(100vh - ".concat(offset, "px)"))));
74
+ updatedStyles = _objectSpread(_objectSpread(_objectSpread({}, updatedStyles), logicalStyle('top', offset)), logicalStyle('max-height', "calc(100vh - ".concat(offset, "px)")));
71
75
  }
76
+
77
+ setInlineStyles(updatedStyles);
72
78
  }, [style, sticky, themeContext.euiTheme.base, isResponding, minWidth]);
73
79
  return ___EmotionJSX("div", _extends({
74
80
  className: className,
@@ -89,7 +89,9 @@ export var _EuiPageTemplate = function _EuiPageTemplate(_ref) {
89
89
  });
90
90
  useEffect(function () {
91
91
  if (_offset === undefined) {
92
- var euiHeaderFixedCounter = Number(document.body.dataset.fixedHeaders);
92
+ var _document$body$datase;
93
+
94
+ var euiHeaderFixedCounter = Number((_document$body$datase = document.body.dataset.fixedHeaders) !== null && _document$body$datase !== void 0 ? _document$body$datase : 0);
93
95
  setOffset(euiTheme.base * 3 * euiHeaderFixedCounter);
94
96
  }
95
97
  }, [_offset, euiTheme.base]); // Sections include page header
package/eui.d.ts CHANGED
@@ -18488,7 +18488,7 @@ declare module '@elastic/eui/src/components/basic_table/collapsed_item_actions'
18488
18488
  togglePopover: () => void;
18489
18489
  closePopover: () => void;
18490
18490
  onPopoverBlur: () => void;
18491
- registerPopoverDiv: (popoverDiv: HTMLDivElement) => void;
18491
+ registerPopoverDiv: (popoverDiv: HTMLDivElement | null) => void;
18492
18492
  componentWillUnmount(): void;
18493
18493
  onClickItem: (onClickAction: (() => void) | undefined) => void;
18494
18494
  render(): JSX.Element;
package/i18ntokens.json CHANGED
@@ -149,11 +149,11 @@
149
149
  "highlighting": "string",
150
150
  "loc": {
151
151
  "start": {
152
- "line": 169,
152
+ "line": 170,
153
153
  "column": 6
154
154
  },
155
155
  "end": {
156
- "line": 169,
156
+ "line": 170,
157
157
  "column": 80
158
158
  }
159
159
  },
@@ -165,11 +165,11 @@
165
165
  "highlighting": "string",
166
166
  "loc": {
167
167
  "start": {
168
- "line": 186,
168
+ "line": 187,
169
169
  "column": 6
170
170
  },
171
171
  "end": {
172
- "line": 186,
172
+ "line": 187,
173
173
  "column": 80
174
174
  }
175
175
  },
@@ -108,8 +108,7 @@ var CollapsedItemActions = /*#__PURE__*/function (_Component) {
108
108
  _defineProperty(_assertThisInitialized(_this), "registerPopoverDiv", function (popoverDiv) {
109
109
  if (!_this.popoverDiv) {
110
110
  _this.popoverDiv = popoverDiv;
111
-
112
- _this.popoverDiv.addEventListener('focusout', _this.onPopoverBlur);
111
+ _this.popoverDiv && _this.popoverDiv.addEventListener('focusout', _this.onPopoverBlur);
113
112
  }
114
113
  });
115
114
 
@@ -60,7 +60,7 @@ var EuiDescriptionListTitle = function EuiDescriptionListTitle(_ref) {
60
60
 
61
61
  var theme = (0, _services.useEuiTheme)();
62
62
  var styles = (0, _description_list_title.euiDescriptionListTitleStyles)(theme);
63
- var conditionalStyles = compressed && textStyle === 'reverse' ? [styles.fontStyles.compressed] : [styles.fontStyles[textStyle]];
63
+ var conditionalStyles = compressed && textStyle !== 'reverse' ? [styles.fontStyles.compressed] : [styles.fontStyles[textStyle]];
64
64
 
65
65
  switch (type) {
66
66
  case 'inline':
@@ -61,13 +61,13 @@ var EuiHeader = function EuiHeader(_ref) {
61
61
  // Increment fixed header counter for each fixed header
62
62
  euiHeaderFixedCounter++;
63
63
  document.body.classList.add('euiBody--headerIsFixed');
64
- document.body.setAttribute('data-fixed-headers', String(euiHeaderFixedCounter));
64
+ document.body.dataset.fixedHeaders = String(euiHeaderFixedCounter);
65
65
  return function () {
66
66
  // Both decrement the fixed counter AND then check if there are none
67
67
  if (--euiHeaderFixedCounter === 0) {
68
68
  // If there are none, THEN remove class
69
69
  document.body.classList.remove('euiBody--headerIsFixed');
70
- document.body.removeAttribute('data-fixed-headers');
70
+ delete document.body.dataset.fixedHeaders;
71
71
  }
72
72
  };
73
73
  }
@@ -76,11 +76,17 @@ var EuiPageSidebar = function EuiPageSidebar(_ref) {
76
76
  setInlineStyles = _useState2[1];
77
77
 
78
78
  (0, _react.useEffect)(function () {
79
+ var updatedStyles = _objectSpread(_objectSpread({}, style), (0, _global_styling.logicalStyle)('min-width', isResponding ? '100%' : minWidth));
80
+
79
81
  if (sticky) {
80
- var euiHeaderFixedCounter = Number(document.body.dataset.fixedHeaders);
82
+ var _document$body$datase;
83
+
84
+ var euiHeaderFixedCounter = Number((_document$body$datase = document.body.dataset.fixedHeaders) !== null && _document$body$datase !== void 0 ? _document$body$datase : 0);
81
85
  var offset = _typeof(sticky) === 'object' ? sticky === null || sticky === void 0 ? void 0 : sticky.offset : themeContext.euiTheme.base * 3 * euiHeaderFixedCounter;
82
- setInlineStyles(_objectSpread(_objectSpread(_objectSpread(_objectSpread({}, style), (0, _global_styling.logicalStyle)('min-width', isResponding ? '100%' : minWidth)), (0, _global_styling.logicalStyle)('top', offset)), (0, _global_styling.logicalStyle)('max-height', "calc(100vh - ".concat(offset, "px)"))));
86
+ updatedStyles = _objectSpread(_objectSpread(_objectSpread({}, updatedStyles), (0, _global_styling.logicalStyle)('top', offset)), (0, _global_styling.logicalStyle)('max-height', "calc(100vh - ".concat(offset, "px)")));
83
87
  }
88
+
89
+ setInlineStyles(updatedStyles);
84
90
  }, [style, sticky, themeContext.euiTheme.base, isResponding, minWidth]);
85
91
  return (0, _react2.jsx)("div", _extends({
86
92
  className: className,
@@ -109,7 +109,9 @@ var _EuiPageTemplate = function _EuiPageTemplate(_ref) {
109
109
  });
110
110
  (0, _react.useEffect)(function () {
111
111
  if (_offset === undefined) {
112
- var euiHeaderFixedCounter = Number(document.body.dataset.fixedHeaders);
112
+ var _document$body$datase;
113
+
114
+ var euiHeaderFixedCounter = Number((_document$body$datase = document.body.dataset.fixedHeaders) !== null && _document$body$datase !== void 0 ? _document$body$datase : 0);
113
115
  setOffset(euiTheme.base * 3 * euiHeaderFixedCounter);
114
116
  }
115
117
  }, [_offset, euiTheme.base]); // Sections include page header
@@ -81,8 +81,7 @@ export var CollapsedItemActions = /*#__PURE__*/function (_Component) {
81
81
  _defineProperty(_assertThisInitialized(_this), "registerPopoverDiv", function (popoverDiv) {
82
82
  if (!_this.popoverDiv) {
83
83
  _this.popoverDiv = popoverDiv;
84
-
85
- _this.popoverDiv.addEventListener('focusout', _this.onPopoverBlur);
84
+ _this.popoverDiv && _this.popoverDiv.addEventListener('focusout', _this.onPopoverBlur);
86
85
  }
87
86
  });
88
87
 
@@ -30,7 +30,7 @@ export var EuiDescriptionListTitle = function EuiDescriptionListTitle(_ref) {
30
30
 
31
31
  var theme = useEuiTheme();
32
32
  var styles = euiDescriptionListTitleStyles(theme);
33
- var conditionalStyles = compressed && textStyle === 'reverse' ? [styles.fontStyles.compressed] : [styles.fontStyles[textStyle]];
33
+ var conditionalStyles = compressed && textStyle !== 'reverse' ? [styles.fontStyles.compressed] : [styles.fontStyles[textStyle]];
34
34
 
35
35
  switch (type) {
36
36
  case 'inline':
@@ -42,13 +42,13 @@ export var EuiHeader = function EuiHeader(_ref) {
42
42
  // Increment fixed header counter for each fixed header
43
43
  euiHeaderFixedCounter++;
44
44
  document.body.classList.add('euiBody--headerIsFixed');
45
- document.body.setAttribute('data-fixed-headers', String(euiHeaderFixedCounter));
45
+ document.body.dataset.fixedHeaders = String(euiHeaderFixedCounter);
46
46
  return function () {
47
47
  // Both decrement the fixed counter AND then check if there are none
48
48
  if (--euiHeaderFixedCounter === 0) {
49
49
  // If there are none, THEN remove class
50
50
  document.body.classList.remove('euiBody--headerIsFixed');
51
- document.body.removeAttribute('data-fixed-headers');
51
+ delete document.body.dataset.fixedHeaders;
52
52
  }
53
53
  };
54
54
  }
@@ -46,11 +46,17 @@ export var EuiPageSidebar = function EuiPageSidebar(_ref) {
46
46
  setInlineStyles = _useState2[1];
47
47
 
48
48
  useEffect(function () {
49
+ var updatedStyles = _objectSpread(_objectSpread({}, style), logicalStyle('min-width', isResponding ? '100%' : minWidth));
50
+
49
51
  if (sticky) {
50
- var euiHeaderFixedCounter = Number(document.body.dataset.fixedHeaders);
52
+ var _document$body$datase;
53
+
54
+ var euiHeaderFixedCounter = Number((_document$body$datase = document.body.dataset.fixedHeaders) !== null && _document$body$datase !== void 0 ? _document$body$datase : 0);
51
55
  var offset = _typeof(sticky) === 'object' ? sticky === null || sticky === void 0 ? void 0 : sticky.offset : themeContext.euiTheme.base * 3 * euiHeaderFixedCounter;
52
- setInlineStyles(_objectSpread(_objectSpread(_objectSpread(_objectSpread({}, style), logicalStyle('min-width', isResponding ? '100%' : minWidth)), logicalStyle('top', offset)), logicalStyle('max-height', "calc(100vh - ".concat(offset, "px)"))));
56
+ updatedStyles = _objectSpread(_objectSpread(_objectSpread({}, updatedStyles), logicalStyle('top', offset)), logicalStyle('max-height', "calc(100vh - ".concat(offset, "px)")));
53
57
  }
58
+
59
+ setInlineStyles(updatedStyles);
54
60
  }, [style, sticky, themeContext.euiTheme.base, isResponding, minWidth]);
55
61
  return ___EmotionJSX("div", _extends({
56
62
  className: className,
@@ -72,7 +72,9 @@ export var _EuiPageTemplate = function _EuiPageTemplate(_ref) {
72
72
  });
73
73
  useEffect(function () {
74
74
  if (_offset === undefined) {
75
- var euiHeaderFixedCounter = Number(document.body.dataset.fixedHeaders);
75
+ var _document$body$datase;
76
+
77
+ var euiHeaderFixedCounter = Number((_document$body$datase = document.body.dataset.fixedHeaders) !== null && _document$body$datase !== void 0 ? _document$body$datase : 0);
76
78
  setOffset(euiTheme.base * 3 * euiHeaderFixedCounter);
77
79
  }
78
80
  }, [_offset, euiTheme.base]); // Sections include page header
@@ -96,8 +96,7 @@ var CollapsedItemActions = /*#__PURE__*/function (_Component) {
96
96
  (0, _defineProperty2.default)((0, _assertThisInitialized2.default)(_this), "registerPopoverDiv", function (popoverDiv) {
97
97
  if (!_this.popoverDiv) {
98
98
  _this.popoverDiv = popoverDiv;
99
-
100
- _this.popoverDiv.addEventListener('focusout', _this.onPopoverBlur);
99
+ _this.popoverDiv && _this.popoverDiv.addEventListener('focusout', _this.onPopoverBlur);
101
100
  }
102
101
  });
103
102
  (0, _defineProperty2.default)((0, _assertThisInitialized2.default)(_this), "onClickItem", function (onClickAction) {
@@ -46,7 +46,7 @@ var EuiDescriptionListTitle = function EuiDescriptionListTitle(_ref) {
46
46
 
47
47
  var theme = (0, _services.useEuiTheme)();
48
48
  var styles = (0, _description_list_title.euiDescriptionListTitleStyles)(theme);
49
- var conditionalStyles = compressed && textStyle === 'reverse' ? [styles.fontStyles.compressed] : [styles.fontStyles[textStyle]];
49
+ var conditionalStyles = compressed && textStyle !== 'reverse' ? [styles.fontStyles.compressed] : [styles.fontStyles[textStyle]];
50
50
 
51
51
  switch (type) {
52
52
  case 'inline':
@@ -56,13 +56,13 @@ var EuiHeader = function EuiHeader(_ref) {
56
56
  // Increment fixed header counter for each fixed header
57
57
  euiHeaderFixedCounter++;
58
58
  document.body.classList.add('euiBody--headerIsFixed');
59
- document.body.setAttribute('data-fixed-headers', String(euiHeaderFixedCounter));
59
+ document.body.dataset.fixedHeaders = String(euiHeaderFixedCounter);
60
60
  return function () {
61
61
  // Both decrement the fixed counter AND then check if there are none
62
62
  if (--euiHeaderFixedCounter === 0) {
63
63
  // If there are none, THEN remove class
64
64
  document.body.classList.remove('euiBody--headerIsFixed');
65
- document.body.removeAttribute('data-fixed-headers');
65
+ delete document.body.dataset.fixedHeaders;
66
66
  }
67
67
  };
68
68
  }
@@ -63,11 +63,17 @@ var EuiPageSidebar = function EuiPageSidebar(_ref) {
63
63
  setInlineStyles = _useState2[1];
64
64
 
65
65
  (0, _react.useEffect)(function () {
66
+ var updatedStyles = _objectSpread(_objectSpread({}, style), (0, _global_styling.logicalStyle)('min-width', isResponding ? '100%' : minWidth));
67
+
66
68
  if (sticky) {
67
- var euiHeaderFixedCounter = Number(document.body.dataset.fixedHeaders);
69
+ var _document$body$datase;
70
+
71
+ var euiHeaderFixedCounter = Number((_document$body$datase = document.body.dataset.fixedHeaders) !== null && _document$body$datase !== void 0 ? _document$body$datase : 0);
68
72
  var offset = (0, _typeof2.default)(sticky) === 'object' ? sticky === null || sticky === void 0 ? void 0 : sticky.offset : themeContext.euiTheme.base * 3 * euiHeaderFixedCounter;
69
- setInlineStyles(_objectSpread(_objectSpread(_objectSpread(_objectSpread({}, style), (0, _global_styling.logicalStyle)('min-width', isResponding ? '100%' : minWidth)), (0, _global_styling.logicalStyle)('top', offset)), (0, _global_styling.logicalStyle)('max-height', "calc(100vh - ".concat(offset, "px)"))));
73
+ updatedStyles = _objectSpread(_objectSpread(_objectSpread({}, updatedStyles), (0, _global_styling.logicalStyle)('top', offset)), (0, _global_styling.logicalStyle)('max-height', "calc(100vh - ".concat(offset, "px)")));
70
74
  }
75
+
76
+ setInlineStyles(updatedStyles);
71
77
  }, [style, sticky, themeContext.euiTheme.base, isResponding, minWidth]);
72
78
  return (0, _react2.jsx)("div", (0, _extends2.default)({
73
79
  className: className,
@@ -95,7 +95,9 @@ var _EuiPageTemplate = function _EuiPageTemplate(_ref) {
95
95
  });
96
96
  (0, _react.useEffect)(function () {
97
97
  if (_offset === undefined) {
98
- var euiHeaderFixedCounter = Number(document.body.dataset.fixedHeaders);
98
+ var _document$body$datase;
99
+
100
+ var euiHeaderFixedCounter = Number((_document$body$datase = document.body.dataset.fixedHeaders) !== null && _document$body$datase !== void 0 ? _document$body$datase : 0);
99
101
  setOffset(euiTheme.base * 3 * euiHeaderFixedCounter);
100
102
  }
101
103
  }, [_offset, euiTheme.base]); // Sections include page header
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@elastic/eui",
3
3
  "description": "Elastic UI Component Library",
4
- "version": "63.0.2",
4
+ "version": "63.0.5",
5
5
  "license": "SEE LICENSE IN LICENSE.txt",
6
6
  "main": "lib",
7
7
  "module": "es",
@@ -98,8 +98,7 @@ var CollapsedItemActions = /*#__PURE__*/function (_Component) {
98
98
  (0, _defineProperty2.default)((0, _assertThisInitialized2.default)(_this), "registerPopoverDiv", function (popoverDiv) {
99
99
  if (!_this.popoverDiv) {
100
100
  _this.popoverDiv = popoverDiv;
101
-
102
- _this.popoverDiv.addEventListener('focusout', _this.onPopoverBlur);
101
+ _this.popoverDiv && _this.popoverDiv.addEventListener('focusout', _this.onPopoverBlur);
103
102
  }
104
103
  });
105
104
  (0, _defineProperty2.default)((0, _assertThisInitialized2.default)(_this), "onClickItem", function (onClickAction) {
@@ -48,7 +48,7 @@ var EuiDescriptionListTitle = function EuiDescriptionListTitle(_ref) {
48
48
 
49
49
  var theme = (0, _services.useEuiTheme)();
50
50
  var styles = (0, _description_list_title.euiDescriptionListTitleStyles)(theme);
51
- var conditionalStyles = compressed && textStyle === 'reverse' ? [styles.fontStyles.compressed] : [styles.fontStyles[textStyle]];
51
+ var conditionalStyles = compressed && textStyle !== 'reverse' ? [styles.fontStyles.compressed] : [styles.fontStyles[textStyle]];
52
52
 
53
53
  switch (type) {
54
54
  case 'inline':
@@ -58,13 +58,13 @@ var EuiHeader = function EuiHeader(_ref) {
58
58
  // Increment fixed header counter for each fixed header
59
59
  euiHeaderFixedCounter++;
60
60
  document.body.classList.add('euiBody--headerIsFixed');
61
- document.body.setAttribute('data-fixed-headers', String(euiHeaderFixedCounter));
61
+ document.body.dataset.fixedHeaders = String(euiHeaderFixedCounter);
62
62
  return function () {
63
63
  // Both decrement the fixed counter AND then check if there are none
64
64
  if (--euiHeaderFixedCounter === 0) {
65
65
  // If there are none, THEN remove class
66
66
  document.body.classList.remove('euiBody--headerIsFixed');
67
- document.body.removeAttribute('data-fixed-headers');
67
+ delete document.body.dataset.fixedHeaders;
68
68
  }
69
69
  };
70
70
  }
@@ -65,11 +65,17 @@ var EuiPageSidebar = function EuiPageSidebar(_ref) {
65
65
  setInlineStyles = _useState2[1];
66
66
 
67
67
  (0, _react.useEffect)(function () {
68
+ var updatedStyles = _objectSpread(_objectSpread({}, style), (0, _global_styling.logicalStyle)('min-width', isResponding ? '100%' : minWidth));
69
+
68
70
  if (sticky) {
69
- var euiHeaderFixedCounter = Number(document.body.dataset.fixedHeaders);
71
+ var _document$body$datase;
72
+
73
+ var euiHeaderFixedCounter = Number((_document$body$datase = document.body.dataset.fixedHeaders) !== null && _document$body$datase !== void 0 ? _document$body$datase : 0);
70
74
  var offset = (0, _typeof2.default)(sticky) === 'object' ? sticky === null || sticky === void 0 ? void 0 : sticky.offset : themeContext.euiTheme.base * 3 * euiHeaderFixedCounter;
71
- setInlineStyles(_objectSpread(_objectSpread(_objectSpread(_objectSpread({}, style), (0, _global_styling.logicalStyle)('min-width', isResponding ? '100%' : minWidth)), (0, _global_styling.logicalStyle)('top', offset)), (0, _global_styling.logicalStyle)('max-height', "calc(100vh - ".concat(offset, "px)"))));
75
+ updatedStyles = _objectSpread(_objectSpread(_objectSpread({}, updatedStyles), (0, _global_styling.logicalStyle)('top', offset)), (0, _global_styling.logicalStyle)('max-height', "calc(100vh - ".concat(offset, "px)")));
72
76
  }
77
+
78
+ setInlineStyles(updatedStyles);
73
79
  }, [style, sticky, themeContext.euiTheme.base, isResponding, minWidth]);
74
80
  return (0, _react2.jsx)("div", (0, _extends2.default)({
75
81
  className: className,
@@ -97,7 +97,9 @@ var _EuiPageTemplate = function _EuiPageTemplate(_ref) {
97
97
  });
98
98
  (0, _react.useEffect)(function () {
99
99
  if (_offset === undefined) {
100
- var euiHeaderFixedCounter = Number(document.body.dataset.fixedHeaders);
100
+ var _document$body$datase;
101
+
102
+ var euiHeaderFixedCounter = Number((_document$body$datase = document.body.dataset.fixedHeaders) !== null && _document$body$datase !== void 0 ? _document$body$datase : 0);
101
103
  setOffset(euiTheme.base * 3 * euiHeaderFixedCounter);
102
104
  }
103
105
  }, [_offset, euiTheme.base]); // Sections include page header