@atlaskit/page-layout 4.2.26 → 4.2.28

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 (63) hide show
  1. package/CHANGELOG.md +12 -0
  2. package/dist/cjs/components/resize-control/index.js +15 -1
  3. package/dist/cjs/components/resize-control/resize-button.js +1 -1
  4. package/dist/cjs/components/resize-control/shadow.js +1 -1
  5. package/dist/cjs/components/skip-links/skip-link-components.js +6 -2
  6. package/dist/cjs/components/slots/banner-slot.js +1 -1
  7. package/dist/cjs/components/slots/content.js +1 -1
  8. package/dist/cjs/components/slots/internal/left-sidebar-inner.js +1 -1
  9. package/dist/cjs/components/slots/internal/resizable-children-wrapper.js +1 -1
  10. package/dist/cjs/components/slots/internal/slot-focus-ring.js +1 -1
  11. package/dist/cjs/components/slots/left-panel.js +1 -1
  12. package/dist/cjs/components/slots/left-sidebar-without-resize.js +1 -1
  13. package/dist/cjs/components/slots/left-sidebar.js +10 -2
  14. package/dist/cjs/components/slots/main.js +1 -1
  15. package/dist/cjs/components/slots/page-layout.js +1 -1
  16. package/dist/cjs/components/slots/right-panel.js +1 -1
  17. package/dist/cjs/components/slots/right-sidebar.js +1 -1
  18. package/dist/cjs/components/slots/top-navigation.js +1 -1
  19. package/dist/es2019/components/resize-control/index.js +15 -1
  20. package/dist/es2019/components/resize-control/resize-button.js +1 -1
  21. package/dist/es2019/components/resize-control/shadow.js +1 -1
  22. package/dist/es2019/components/skip-links/skip-link-components.js +7 -2
  23. package/dist/es2019/components/slots/banner-slot.js +1 -1
  24. package/dist/es2019/components/slots/content.js +1 -1
  25. package/dist/es2019/components/slots/internal/left-sidebar-inner.js +1 -1
  26. package/dist/es2019/components/slots/internal/resizable-children-wrapper.js +1 -1
  27. package/dist/es2019/components/slots/internal/slot-focus-ring.js +1 -1
  28. package/dist/es2019/components/slots/left-panel.js +1 -1
  29. package/dist/es2019/components/slots/left-sidebar-without-resize.js +1 -1
  30. package/dist/es2019/components/slots/left-sidebar.js +10 -2
  31. package/dist/es2019/components/slots/main.js +1 -1
  32. package/dist/es2019/components/slots/page-layout.js +1 -1
  33. package/dist/es2019/components/slots/right-panel.js +1 -1
  34. package/dist/es2019/components/slots/right-sidebar.js +1 -1
  35. package/dist/es2019/components/slots/top-navigation.js +1 -1
  36. package/dist/esm/components/resize-control/index.js +15 -1
  37. package/dist/esm/components/resize-control/resize-button.js +1 -1
  38. package/dist/esm/components/resize-control/shadow.js +1 -1
  39. package/dist/esm/components/skip-links/skip-link-components.js +6 -2
  40. package/dist/esm/components/slots/banner-slot.js +1 -1
  41. package/dist/esm/components/slots/content.js +1 -1
  42. package/dist/esm/components/slots/internal/left-sidebar-inner.js +1 -1
  43. package/dist/esm/components/slots/internal/resizable-children-wrapper.js +1 -1
  44. package/dist/esm/components/slots/internal/slot-focus-ring.js +1 -1
  45. package/dist/esm/components/slots/left-panel.js +1 -1
  46. package/dist/esm/components/slots/left-sidebar-without-resize.js +1 -1
  47. package/dist/esm/components/slots/left-sidebar.js +10 -2
  48. package/dist/esm/components/slots/main.js +1 -1
  49. package/dist/esm/components/slots/page-layout.js +1 -1
  50. package/dist/esm/components/slots/right-panel.js +1 -1
  51. package/dist/esm/components/slots/right-sidebar.js +1 -1
  52. package/dist/esm/components/slots/top-navigation.js +1 -1
  53. package/dist/types/common/constants.d.ts +7 -7
  54. package/dist/types/components/skip-links/skip-link-components.d.ts +1 -1
  55. package/dist/types/components/slots/internal/left-sidebar-outer.d.ts +2 -2
  56. package/dist/types/controllers/sidebar-resize-context.d.ts +2 -2
  57. package/dist/types/controllers/skip-link-context.d.ts +2 -1
  58. package/dist/types-ts4.5/common/constants.d.ts +7 -7
  59. package/dist/types-ts4.5/components/skip-links/skip-link-components.d.ts +1 -1
  60. package/dist/types-ts4.5/components/slots/internal/left-sidebar-outer.d.ts +2 -2
  61. package/dist/types-ts4.5/controllers/sidebar-resize-context.d.ts +2 -2
  62. package/dist/types-ts4.5/controllers/skip-link-context.d.ts +2 -1
  63. package/package.json +4 -4
package/CHANGELOG.md CHANGED
@@ -1,5 +1,17 @@
1
1
  # @atlaskit/page-layout
2
2
 
3
+ ## 4.2.28
4
+
5
+ ### Patch Changes
6
+
7
+ - Updated dependencies
8
+
9
+ ## 4.2.27
10
+
11
+ ### Patch Changes
12
+
13
+ - Updated dependencies
14
+
3
15
  ## 4.2.26
4
16
 
5
17
  ### Patch Changes
@@ -23,7 +23,7 @@ function ownKeys(e, r) { var t = Object.keys(e); if (Object.getOwnPropertySymbol
23
23
  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) { (0, _defineProperty2.default)(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; } /**
24
24
  * @jsxRuntime classic
25
25
  * @jsx jsx
26
- */ // eslint-disable-next-line @atlaskit/ui-styling-standard/no-global-styles, @atlaskit/ui-styling-standard/use-compiled -- Ignored via go/DSP-18766
26
+ */ // eslint-disable-next-line @typescript-eslint/consistent-type-imports, @atlaskit/ui-styling-standard/no-global-styles, @atlaskit/ui-styling-standard/use-compiled
27
27
  /* import useUpdateCssVar from '../../controllers/use-update-css-vars'; */
28
28
  var cssSelector = (0, _defineProperty2.default)({}, _constants.RESIZE_CONTROL_SELECTOR, true);
29
29
  var resizeControlStyles = (0, _react2.css)({
@@ -172,11 +172,14 @@ var ResizeControl = function ResizeControl(_ref) {
172
172
  // Will return sidebar to the same size it was before the resizing started
173
173
  if (event.key === 'Escape') {
174
174
  sidebarWidth.current = Math.max(leftSidebarState.lastLeftSidebarWidth, _constants.COLLAPSED_LEFT_SIDEBAR_WIDTH);
175
+
176
+ // eslint-disable-next-line @atlaskit/platform/no-direct-document-usage
175
177
  document.documentElement.style.setProperty("--".concat(_constants.VAR_LEFT_SIDEBAR_WIDTH), "".concat(sidebarWidth.current, "px"));
176
178
  onFinishResizing();
177
179
  }
178
180
  }
179
181
  }]);
182
+ // eslint-disable-next-line @atlaskit/platform/no-direct-document-usage
180
183
  document.documentElement.setAttribute(_constants.IS_SIDEBAR_DRAGGING, 'true');
181
184
  var newLeftbarState = _objectSpread(_objectSpread({}, leftSidebarState), {}, {
182
185
  isResizing: true
@@ -189,6 +192,7 @@ var ResizeControl = function ResizeControl(_ref) {
189
192
  onUpdateResize.cancel();
190
193
  (_unbindEvents$current = unbindEvents.current) === null || _unbindEvents$current === void 0 || _unbindEvents$current.call(unbindEvents);
191
194
  unbindEvents.current = null;
195
+ // eslint-disable-next-line @atlaskit/platform/no-direct-document-usage
192
196
  document.documentElement.removeAttribute(_constants.IS_SIDEBAR_DRAGGING);
193
197
  offset.current = 0;
194
198
  collapseLeftSidebar(undefined, true);
@@ -212,6 +216,8 @@ var ResizeControl = function ResizeControl(_ref) {
212
216
  }
213
217
  var delta = Math.max(Math.min(clientX - leftSidebarWidth - leftPanelWidth, maxWidth - leftSidebarWidth - leftPanelWidth), _constants.COLLAPSED_LEFT_SIDEBAR_WIDTH - leftSidebarWidth - leftPanelWidth);
214
218
  sidebarWidth.current = Math.max(leftSidebarWidth + delta - offset.current, _constants.COLLAPSED_LEFT_SIDEBAR_WIDTH);
219
+
220
+ // eslint-disable-next-line @atlaskit/platform/no-direct-document-usage
215
221
  document.documentElement.style.setProperty("--".concat(_constants.VAR_LEFT_SIDEBAR_WIDTH), "".concat(sidebarWidth.current, "px"));
216
222
  });
217
223
  }),
@@ -222,6 +228,8 @@ var ResizeControl = function ResizeControl(_ref) {
222
228
  if (isLeftSidebarCollapsed) {
223
229
  return;
224
230
  }
231
+
232
+ // eslint-disable-next-line @atlaskit/platform/no-direct-document-usage
225
233
  document.documentElement.removeAttribute(_constants.IS_SIDEBAR_DRAGGING);
226
234
 
227
235
  // TODO: the control flow is pretty strange as the first codepath which calls `collapseLeftSidebar()`
@@ -232,6 +240,7 @@ var ResizeControl = function ResizeControl(_ref) {
232
240
  // collapse the navigation
233
241
  if (sidebarWidth.current < _constants.MIN_LEFT_SIDEBAR_DRAG_THRESHOLD) {
234
242
  // TODO: for this codepath, `onCollapse` occurs before `onResizeEnd` which seems wrong
243
+ // eslint-disable-next-line @atlaskit/platform/no-direct-document-usage
235
244
  document.documentElement.style.setProperty("--".concat(_constants.VAR_LEFT_SIDEBAR_WIDTH), "".concat(_constants.COLLAPSED_LEFT_SIDEBAR_WIDTH, "px"));
236
245
  collapseLeftSidebar(undefined, true);
237
246
  }
@@ -239,6 +248,7 @@ var ResizeControl = function ResizeControl(_ref) {
239
248
  // min threshold and default width
240
249
  // expand the nav to the default width
241
250
  else if (sidebarWidth.current > _constants.MIN_LEFT_SIDEBAR_DRAG_THRESHOLD && sidebarWidth.current < _constants.DEFAULT_LEFT_SIDEBAR_WIDTH) {
251
+ // eslint-disable-next-line @atlaskit/platform/no-direct-document-usage
242
252
  document.documentElement.style.setProperty("--".concat(_constants.VAR_LEFT_SIDEBAR_WIDTH), "".concat(_constants.DEFAULT_LEFT_SIDEBAR_WIDTH, "px"));
243
253
  updatedLeftSidebarState = _objectSpread(_objectSpread({}, leftSidebarState), {}, (0, _defineProperty2.default)((0, _defineProperty2.default)({
244
254
  isResizing: false
@@ -288,9 +298,11 @@ var ResizeControl = function ResizeControl(_ref) {
288
298
  var width = leftSidebarWidth + stepValue;
289
299
  if (width <= _constants.DEFAULT_LEFT_SIDEBAR_WIDTH) {
290
300
  width = _constants.DEFAULT_LEFT_SIDEBAR_WIDTH;
301
+ // eslint-disable-next-line @atlaskit/platform/no-direct-document-usage
291
302
  document.documentElement.style.setProperty("--".concat(_constants.VAR_LEFT_SIDEBAR_WIDTH), "".concat(_constants.DEFAULT_LEFT_SIDEBAR_WIDTH - 20, "px"));
292
303
  } else if (width > maxWidth) {
293
304
  width = maxWidth;
305
+ // eslint-disable-next-line @atlaskit/platform/no-direct-document-usage
294
306
  document.documentElement.style.setProperty("--".concat(_constants.VAR_LEFT_SIDEBAR_WIDTH), "".concat(maxWidth + 20, "px"));
295
307
  } else if (hasModifierKey) {
296
308
  width = isRightOrBottomArrow ? maxWidth : _constants.DEFAULT_LEFT_SIDEBAR_WIDTH;
@@ -301,6 +313,8 @@ var ResizeControl = function ResizeControl(_ref) {
301
313
  requestAnimationFrame(function () {
302
314
  keyboardEventTimeout.current = window.setTimeout(function () {
303
315
  keyboardEventTimeout.current && clearTimeout(keyboardEventTimeout.current);
316
+
317
+ // eslint-disable-next-line @atlaskit/platform/no-direct-document-usage
304
318
  document.documentElement.style.setProperty("--".concat(_constants.VAR_LEFT_SIDEBAR_WIDTH), "".concat(width, "px"));
305
319
  var updatedLeftSidebarState = _objectSpread(_objectSpread({}, leftSidebarState), {}, (0, _defineProperty2.default)((0, _defineProperty2.default)({}, _constants.VAR_LEFT_SIDEBAR_WIDTH, width), "lastLeftSidebarWidth", width));
306
320
  setLeftSidebarState(updatedLeftSidebarState);
@@ -24,7 +24,7 @@ var _excluded = ["isLeftSidebarCollapsed", "label", "onClick", "testId"],
24
24
  * @jsxRuntime classic
25
25
  * @jsx jsx
26
26
  */
27
- // eslint-disable-next-line @atlaskit/ui-styling-standard/use-compiled -- Ignored via go/DSP-18766
27
+ // eslint-disable-next-line @atlaskit/ui-styling-standard/use-compiled, @typescript-eslint/consistent-type-imports
28
28
  var hitAreaSpanStyles = (0, _react.css)({
29
29
  position: 'absolute',
30
30
  insetBlockEnd: "var(--ds-space-negative-300, -24px)",
@@ -12,7 +12,7 @@ var _hooks = require("../../common/hooks");
12
12
  * @jsx jsx
13
13
  */
14
14
 
15
- // eslint-disable-next-line @atlaskit/ui-styling-standard/use-compiled -- Ignored via go/DSP-18766
15
+ // eslint-disable-next-line @atlaskit/ui-styling-standard/use-compiled, @typescript-eslint/consistent-type-imports
16
16
 
17
17
  var colorStops = "\n rgba(0, 0, 0, 0.2) 0px,\n rgba(0, 0, 0, 0.2) 1px,\n rgba(0, 0, 0, 0.1) 1px,\n rgba(0, 0, 0, 0) 100%\n ";
18
18
  var direction = 'to left';
@@ -17,7 +17,7 @@ function ownKeys(e, r) { var t = Object.keys(e); if (Object.getOwnPropertySymbol
17
17
  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) { (0, _defineProperty2.default)(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; } /* eslint-disable @repo/internal/dom-events/no-unsafe-event-listeners */ /**
18
18
  * @jsxRuntime classic
19
19
  * @jsx jsx
20
- */ // eslint-disable-next-line @atlaskit/ui-styling-standard/use-compiled -- Ignored via go/DSP-18766
20
+ */ // eslint-disable-next-line @atlaskit/ui-styling-standard/use-compiled, @typescript-eslint/consistent-type-imports
21
21
  // eslint-disable-next-line @atlaskit/design-system/consistent-css-prop-usage, @atlaskit/ui-styling-standard/no-imported-style-values, @atlaskit/ui-styling-standard/no-unsafe-values -- Ignored via go/DSP-18766
22
22
  var prefersReducedMotionStyles = (0, _react.css)((0, _motion.prefersReducedMotion)());
23
23
  var skipLinkStyles = (0, _react.css)({
@@ -98,7 +98,8 @@ var SkipLinkWrapper = exports.SkipLinkWrapper = function SkipLinkWrapper(_ref) {
98
98
  };
99
99
  var escapeHandler = function escapeHandler(event) {
100
100
  if (event.keyCode === 27) {
101
- var container = document.querySelector("[".concat(_constants.PAGE_LAYOUT_CONTAINER_SELECTOR, "=\"true\"]"));
101
+ var container = document.querySelector("[".concat(_constants.PAGE_LAYOUT_CONTAINER_SELECTOR, "=\"true\"]") // eslint-disable-next-line @atlaskit/platform/no-direct-document-usage
102
+ );
102
103
  if (container !== null) {
103
104
  container.focus();
104
105
  }
@@ -142,6 +143,7 @@ var focusTargetRef = function focusTargetRef(href) {
142
143
  event.preventDefault();
143
144
  var targetRef = document.querySelector(href);
144
145
 
146
+ // eslint-disable-next-line @atlaskit/platform/no-direct-document-usage
145
147
  // @ts-ignore
146
148
  var key = event.which || event.keycode;
147
149
  // if it is a keypress and the key is not
@@ -156,7 +158,9 @@ var focusTargetRef = function focusTargetRef(href) {
156
158
  // @ts-ignore
157
159
  targetRef.focus();
158
160
  document.activeElement && document.activeElement.scrollIntoView({
161
+ // eslint-disable-next-line @atlaskit/platform/no-direct-document-usage
159
162
  behavior: 'smooth'
163
+ // eslint-disable-next-line @atlaskit/platform/no-direct-document-usage
160
164
  });
161
165
  window.scrollTo(0, 0);
162
166
  }
@@ -19,7 +19,7 @@ var _slotDimensions = _interopRequireDefault(require("./slot-dimensions"));
19
19
  * @jsx jsx
20
20
  */
21
21
 
22
- // eslint-disable-next-line @atlaskit/ui-styling-standard/use-compiled -- Ignored via go/DSP-18766
22
+ // eslint-disable-next-line @atlaskit/ui-styling-standard/use-compiled, @typescript-eslint/consistent-type-imports
23
23
 
24
24
  var bannerStyles = (0, _react2.css)({
25
25
  // eslint-disable-next-line @atlaskit/ui-styling-standard/no-imported-style-values, @atlaskit/ui-styling-standard/no-unsafe-values -- Ignored via go/DSP-18766
@@ -11,7 +11,7 @@ var _constants = require("../../common/constants");
11
11
  * @jsx jsx
12
12
  */
13
13
 
14
- // eslint-disable-next-line @atlaskit/ui-styling-standard/use-compiled -- Ignored via go/DSP-18766
14
+ // eslint-disable-next-line @atlaskit/ui-styling-standard/use-compiled, @typescript-eslint/consistent-type-imports
15
15
 
16
16
  var contentStyles = (0, _react.css)({
17
17
  display: 'flex',
@@ -16,7 +16,7 @@ var _hooks = require("../../../common/hooks");
16
16
  * @jsx jsx
17
17
  */
18
18
 
19
- // eslint-disable-next-line @atlaskit/ui-styling-standard/use-compiled -- Ignored via go/DSP-18766
19
+ // eslint-disable-next-line @atlaskit/ui-styling-standard/use-compiled, @typescript-eslint/consistent-type-imports
20
20
 
21
21
  // eslint-disable-next-line @atlaskit/design-system/consistent-css-prop-usage, @atlaskit/ui-styling-standard/no-imported-style-values, @atlaskit/ui-styling-standard/no-unsafe-values -- Ignored via go/DSP-18766
22
22
  var prefersReducedMotionStyles = (0, _react.css)((0, _motion.prefersReducedMotion)());
@@ -13,7 +13,7 @@ var _hooks = require("../../../common/hooks");
13
13
  * @jsx jsx
14
14
  */
15
15
 
16
- // eslint-disable-next-line @atlaskit/ui-styling-standard/use-compiled -- Ignored via go/DSP-18766
16
+ // eslint-disable-next-line @atlaskit/ui-styling-standard/use-compiled, @typescript-eslint/consistent-type-imports
17
17
 
18
18
  // eslint-disable-next-line @atlaskit/design-system/consistent-css-prop-usage, @atlaskit/ui-styling-standard/no-imported-style-values, @atlaskit/ui-styling-standard/no-unsafe-values -- Ignored via go/DSP-18766
19
19
  var prefersReducedMotionStyles = (0, _react.css)((0, _motion.prefersReducedMotion)());
@@ -11,7 +11,7 @@ var _colors = require("@atlaskit/theme/colors");
11
11
  * @jsx jsx
12
12
  */
13
13
 
14
- // eslint-disable-next-line @atlaskit/ui-styling-standard/use-compiled -- Ignored via go/DSP-18766
14
+ // eslint-disable-next-line @atlaskit/ui-styling-standard/use-compiled, @typescript-eslint/consistent-type-imports
15
15
 
16
16
  var focusStyles = (0, _react.css)({
17
17
  // eslint-disable-next-line @atlaskit/ui-styling-standard/no-unsafe-selectors -- Ignored via go/DSP-18766
@@ -19,7 +19,7 @@ var _slotDimensions = _interopRequireDefault(require("./slot-dimensions"));
19
19
  * @jsx jsx
20
20
  */
21
21
 
22
- // eslint-disable-next-line @atlaskit/ui-styling-standard/use-compiled -- Ignored via go/DSP-18766
22
+ // eslint-disable-next-line @atlaskit/ui-styling-standard/use-compiled, @typescript-eslint/consistent-type-imports
23
23
 
24
24
  var leftPanelStyles = (0, _react2.css)({
25
25
  // eslint-disable-next-line @atlaskit/ui-styling-standard/no-imported-style-values, @atlaskit/ui-styling-standard/no-unsafe-values -- Ignored via go/DSP-18766
@@ -19,7 +19,7 @@ var _slotDimensions = _interopRequireDefault(require("./slot-dimensions"));
19
19
  * @jsx jsx
20
20
  */
21
21
 
22
- // eslint-disable-next-line @atlaskit/ui-styling-standard/use-compiled -- Ignored via go/DSP-18766
22
+ // eslint-disable-next-line @atlaskit/ui-styling-standard/use-compiled, @typescript-eslint/consistent-type-imports
23
23
 
24
24
  /**
25
25
  * __Left sidebar without resize__
@@ -24,7 +24,7 @@ function ownKeys(e, r) { var t = Object.keys(e); if (Object.getOwnPropertySymbol
24
24
  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) { (0, _defineProperty2.default)(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; } /* eslint-disable @repo/internal/dom-events/no-unsafe-event-listeners */ /**
25
25
  * @jsxRuntime classic
26
26
  * @jsx jsx
27
- */ // eslint-disable-next-line @atlaskit/ui-styling-standard/use-compiled -- Ignored via go/DSP-18766
27
+ */ // eslint-disable-next-line @atlaskit/ui-styling-standard/use-compiled, @typescript-eslint/consistent-type-imports
28
28
  var openBackdropStyles = (0, _react2.css)({
29
29
  width: '100%',
30
30
  height: '100%',
@@ -99,6 +99,8 @@ var LeftSidebar = function LeftSidebar(props) {
99
99
  handlerRef.current = function (event) {
100
100
  mouseXRef.current = event.clientX;
101
101
  };
102
+
103
+ // eslint-disable-next-line @atlaskit/platform/no-direct-document-usage
102
104
  document.addEventListener('mousemove', handlerRef.current);
103
105
  }
104
106
  if (!isLocked && handlerRef.current) {
@@ -109,11 +111,13 @@ var LeftSidebar = function LeftSidebar(props) {
109
111
  });
110
112
  });
111
113
  }
114
+ // eslint-disable-next-line @atlaskit/platform/no-direct-document-usage
112
115
  document.removeEventListener('mousemove', handlerRef.current);
113
116
  handlerRef.current = null;
114
117
  }
115
118
  return function () {
116
119
  if (handlerRef.current) {
120
+ // eslint-disable-next-line @atlaskit/platform/no-direct-document-usage
117
121
  document.removeEventListener('mousemove', handlerRef.current);
118
122
  }
119
123
  };
@@ -192,6 +196,8 @@ var LeftSidebar = function LeftSidebar(props) {
192
196
  }
193
197
  };
194
198
  }
199
+
200
+ // eslint-disable-next-line @atlaskit/platform/no-direct-document-usage
195
201
  document.addEventListener('mouseover', mouseOverEventRef.current, {
196
202
  capture: true,
197
203
  passive: true
@@ -206,7 +212,9 @@ var LeftSidebar = function LeftSidebar(props) {
206
212
  }, _constants.FLYOUT_DELAY);
207
213
  };
208
214
  var removeMouseOverListener = function removeMouseOverListener() {
209
- mouseOverEventRef.current && document.removeEventListener('mouseover', mouseOverEventRef.current, {
215
+ mouseOverEventRef.current &&
216
+ // eslint-disable-next-line @atlaskit/platform/no-direct-document-usage
217
+ document.removeEventListener('mouseover', mouseOverEventRef.current, {
210
218
  capture: true,
211
219
  passive: true
212
220
  });
@@ -20,7 +20,7 @@ var _slotFocusRing = _interopRequireDefault(require("./internal/slot-focus-ring"
20
20
  * @jsx jsx
21
21
  */
22
22
 
23
- // eslint-disable-next-line @atlaskit/ui-styling-standard/use-compiled -- Ignored via go/DSP-18766
23
+ // eslint-disable-next-line @atlaskit/ui-styling-standard/use-compiled, @typescript-eslint/consistent-type-imports
24
24
 
25
25
  // eslint-disable-next-line @atlaskit/design-system/consistent-css-prop-usage, @atlaskit/ui-styling-standard/no-imported-style-values, @atlaskit/ui-styling-standard/no-unsafe-values -- Ignored via go/DSP-18766
26
26
  var prefersReducedMotionStyles = (0, _react2.css)((0, _accessibility.prefersReducedMotion)());
@@ -18,7 +18,7 @@ var _skipLinks = require("../skip-links");
18
18
  * @jsx jsx
19
19
  */
20
20
 
21
- // eslint-disable-next-line @atlaskit/ui-styling-standard/use-compiled -- Ignored via go/DSP-18766
21
+ // eslint-disable-next-line @atlaskit/ui-styling-standard/use-compiled, @typescript-eslint/consistent-type-imports
22
22
 
23
23
  var pageLayoutSelector = (0, _defineProperty2.default)({}, _constants.PAGE_LAYOUT_CONTAINER_SELECTOR, true);
24
24
  var gridTemplateAreasMobile = "\n".concat("\n \"", _constants.LEFT_PANEL, " ").concat(_constants.BANNER, "\"\n ", "\n \"").concat(_constants.LEFT_PANEL, " ").concat(_constants.TOP_NAVIGATION, "\"\n ", "\n \"").concat(_constants.LEFT_PANEL, " ").concat(_constants.CONTENT, "\"\n ");
@@ -19,7 +19,7 @@ var _slotDimensions = _interopRequireDefault(require("./slot-dimensions"));
19
19
  * @jsx jsx
20
20
  */
21
21
 
22
- // eslint-disable-next-line @atlaskit/ui-styling-standard/use-compiled -- Ignored via go/DSP-18766
22
+ // eslint-disable-next-line @atlaskit/ui-styling-standard/use-compiled, @typescript-eslint/consistent-type-imports
23
23
 
24
24
  var baseStyles = (0, _react2.css)({
25
25
  // eslint-disable-next-line @atlaskit/ui-styling-standard/no-imported-style-values, @atlaskit/ui-styling-standard/no-unsafe-values -- Ignored via go/DSP-18766
@@ -19,7 +19,7 @@ var _slotDimensions = _interopRequireDefault(require("./slot-dimensions"));
19
19
  * @jsx jsx
20
20
  */
21
21
 
22
- // eslint-disable-next-line @atlaskit/ui-styling-standard/use-compiled -- Ignored via go/DSP-18766
22
+ // eslint-disable-next-line @atlaskit/ui-styling-standard/use-compiled, @typescript-eslint/consistent-type-imports
23
23
 
24
24
  /**
25
25
  * This inner wrapper is required to allow the sidebar to be `position: fixed`.
@@ -19,7 +19,7 @@ var _slotDimensions = _interopRequireDefault(require("./slot-dimensions"));
19
19
  * @jsx jsx
20
20
  */
21
21
 
22
- // eslint-disable-next-line @atlaskit/ui-styling-standard/use-compiled -- Ignored via go/DSP-18766
22
+ // eslint-disable-next-line @atlaskit/ui-styling-standard/use-compiled, @typescript-eslint/consistent-type-imports
23
23
 
24
24
  var topNavigationStyles = (0, _react2.css)({
25
25
  // eslint-disable-next-line @atlaskit/ui-styling-standard/no-imported-style-values, @atlaskit/ui-styling-standard/no-unsafe-values -- Ignored via go/DSP-18766
@@ -5,7 +5,7 @@ import _extends from "@babel/runtime/helpers/extends";
5
5
  */
6
6
  import { Fragment, useCallback, useContext, useEffect, useMemo, useRef, useState } from 'react';
7
7
 
8
- // eslint-disable-next-line @atlaskit/ui-styling-standard/no-global-styles, @atlaskit/ui-styling-standard/use-compiled -- Ignored via go/DSP-18766
8
+ // eslint-disable-next-line @typescript-eslint/consistent-type-imports, @atlaskit/ui-styling-standard/no-global-styles, @atlaskit/ui-styling-standard/use-compiled
9
9
  import { css, Global, jsx } from '@emotion/react';
10
10
  import { bindAll } from 'bind-event-listener';
11
11
  import rafSchd from 'raf-schd';
@@ -165,11 +165,14 @@ const ResizeControl = ({
165
165
  // Will return sidebar to the same size it was before the resizing started
166
166
  if (event.key === 'Escape') {
167
167
  sidebarWidth.current = Math.max(leftSidebarState.lastLeftSidebarWidth, COLLAPSED_LEFT_SIDEBAR_WIDTH);
168
+
169
+ // eslint-disable-next-line @atlaskit/platform/no-direct-document-usage
168
170
  document.documentElement.style.setProperty(`--${VAR_LEFT_SIDEBAR_WIDTH}`, `${sidebarWidth.current}px`);
169
171
  onFinishResizing();
170
172
  }
171
173
  }
172
174
  }]);
175
+ // eslint-disable-next-line @atlaskit/platform/no-direct-document-usage
173
176
  document.documentElement.setAttribute(IS_SIDEBAR_DRAGGING, 'true');
174
177
  const newLeftbarState = {
175
178
  ...leftSidebarState,
@@ -183,6 +186,7 @@ const ResizeControl = ({
183
186
  onUpdateResize.cancel();
184
187
  (_unbindEvents$current = unbindEvents.current) === null || _unbindEvents$current === void 0 ? void 0 : _unbindEvents$current.call(unbindEvents);
185
188
  unbindEvents.current = null;
189
+ // eslint-disable-next-line @atlaskit/platform/no-direct-document-usage
186
190
  document.documentElement.removeAttribute(IS_SIDEBAR_DRAGGING);
187
191
  offset.current = 0;
188
192
  collapseLeftSidebar(undefined, true);
@@ -206,6 +210,8 @@ const ResizeControl = ({
206
210
  }
207
211
  const delta = Math.max(Math.min(clientX - leftSidebarWidth - leftPanelWidth, maxWidth - leftSidebarWidth - leftPanelWidth), COLLAPSED_LEFT_SIDEBAR_WIDTH - leftSidebarWidth - leftPanelWidth);
208
212
  sidebarWidth.current = Math.max(leftSidebarWidth + delta - offset.current, COLLAPSED_LEFT_SIDEBAR_WIDTH);
213
+
214
+ // eslint-disable-next-line @atlaskit/platform/no-direct-document-usage
209
215
  document.documentElement.style.setProperty(`--${VAR_LEFT_SIDEBAR_WIDTH}`, `${sidebarWidth.current}px`);
210
216
  }));
211
217
  const onFinishResizing = () => {
@@ -213,6 +219,8 @@ const ResizeControl = ({
213
219
  if (isLeftSidebarCollapsed) {
214
220
  return;
215
221
  }
222
+
223
+ // eslint-disable-next-line @atlaskit/platform/no-direct-document-usage
216
224
  document.documentElement.removeAttribute(IS_SIDEBAR_DRAGGING);
217
225
 
218
226
  // TODO: the control flow is pretty strange as the first codepath which calls `collapseLeftSidebar()`
@@ -223,6 +231,7 @@ const ResizeControl = ({
223
231
  // collapse the navigation
224
232
  if (sidebarWidth.current < MIN_LEFT_SIDEBAR_DRAG_THRESHOLD) {
225
233
  // TODO: for this codepath, `onCollapse` occurs before `onResizeEnd` which seems wrong
234
+ // eslint-disable-next-line @atlaskit/platform/no-direct-document-usage
226
235
  document.documentElement.style.setProperty(`--${VAR_LEFT_SIDEBAR_WIDTH}`, `${COLLAPSED_LEFT_SIDEBAR_WIDTH}px`);
227
236
  collapseLeftSidebar(undefined, true);
228
237
  }
@@ -230,6 +239,7 @@ const ResizeControl = ({
230
239
  // min threshold and default width
231
240
  // expand the nav to the default width
232
241
  else if (sidebarWidth.current > MIN_LEFT_SIDEBAR_DRAG_THRESHOLD && sidebarWidth.current < DEFAULT_LEFT_SIDEBAR_WIDTH) {
242
+ // eslint-disable-next-line @atlaskit/platform/no-direct-document-usage
233
243
  document.documentElement.style.setProperty(`--${VAR_LEFT_SIDEBAR_WIDTH}`, `${DEFAULT_LEFT_SIDEBAR_WIDTH}px`);
234
244
  updatedLeftSidebarState = {
235
245
  ...leftSidebarState,
@@ -290,9 +300,11 @@ const ResizeControl = ({
290
300
  let width = leftSidebarWidth + stepValue;
291
301
  if (width <= DEFAULT_LEFT_SIDEBAR_WIDTH) {
292
302
  width = DEFAULT_LEFT_SIDEBAR_WIDTH;
303
+ // eslint-disable-next-line @atlaskit/platform/no-direct-document-usage
293
304
  document.documentElement.style.setProperty(`--${VAR_LEFT_SIDEBAR_WIDTH}`, `${DEFAULT_LEFT_SIDEBAR_WIDTH - 20}px`);
294
305
  } else if (width > maxWidth) {
295
306
  width = maxWidth;
307
+ // eslint-disable-next-line @atlaskit/platform/no-direct-document-usage
296
308
  document.documentElement.style.setProperty(`--${VAR_LEFT_SIDEBAR_WIDTH}`, `${maxWidth + 20}px`);
297
309
  } else if (hasModifierKey) {
298
310
  width = isRightOrBottomArrow ? maxWidth : DEFAULT_LEFT_SIDEBAR_WIDTH;
@@ -303,6 +315,8 @@ const ResizeControl = ({
303
315
  requestAnimationFrame(() => {
304
316
  keyboardEventTimeout.current = window.setTimeout(() => {
305
317
  keyboardEventTimeout.current && clearTimeout(keyboardEventTimeout.current);
318
+
319
+ // eslint-disable-next-line @atlaskit/platform/no-direct-document-usage
306
320
  document.documentElement.style.setProperty(`--${VAR_LEFT_SIDEBAR_WIDTH}`, `${width}px`);
307
321
  const updatedLeftSidebarState = {
308
322
  ...leftSidebarState,
@@ -6,7 +6,7 @@ import _extends from "@babel/runtime/helpers/extends";
6
6
  * @jsx jsx
7
7
  */
8
8
 
9
- // eslint-disable-next-line @atlaskit/ui-styling-standard/use-compiled -- Ignored via go/DSP-18766
9
+ // eslint-disable-next-line @atlaskit/ui-styling-standard/use-compiled, @typescript-eslint/consistent-type-imports
10
10
  import { css, jsx } from '@emotion/react';
11
11
  import ChevronRight from '@atlaskit/icon/core/chevron-right';
12
12
  import { easeOut } from '@atlaskit/motion/curves';
@@ -3,7 +3,7 @@
3
3
  * @jsx jsx
4
4
  */
5
5
 
6
- // eslint-disable-next-line @atlaskit/ui-styling-standard/use-compiled -- Ignored via go/DSP-18766
6
+ // eslint-disable-next-line @atlaskit/ui-styling-standard/use-compiled, @typescript-eslint/consistent-type-imports
7
7
  import { css, jsx } from '@emotion/react';
8
8
  import { easeOut } from '@atlaskit/motion';
9
9
  import { useIsSidebarDragging } from '../../common/hooks';
@@ -4,7 +4,7 @@
4
4
  * @jsx jsx
5
5
  */
6
6
 
7
- // eslint-disable-next-line @atlaskit/ui-styling-standard/use-compiled -- Ignored via go/DSP-18766
7
+ // eslint-disable-next-line @atlaskit/ui-styling-standard/use-compiled, @typescript-eslint/consistent-type-imports
8
8
  import { css, jsx } from '@emotion/react';
9
9
  import Link from '@atlaskit/link';
10
10
  import { easeOut, prefersReducedMotion } from '@atlaskit/motion';
@@ -86,7 +86,9 @@ export const SkipLinkWrapper = ({
86
86
  };
87
87
  const escapeHandler = event => {
88
88
  if (event.keyCode === 27) {
89
- const container = document.querySelector(`[${PAGE_LAYOUT_CONTAINER_SELECTOR}="true"]`);
89
+ const container = document.querySelector(`[${PAGE_LAYOUT_CONTAINER_SELECTOR}="true"]`
90
+ // eslint-disable-next-line @atlaskit/platform/no-direct-document-usage
91
+ );
90
92
  if (container !== null) {
91
93
  container.focus();
92
94
  }
@@ -124,6 +126,7 @@ const focusTargetRef = href => event => {
124
126
  event.preventDefault();
125
127
  const targetRef = document.querySelector(href);
126
128
 
129
+ // eslint-disable-next-line @atlaskit/platform/no-direct-document-usage
127
130
  // @ts-ignore
128
131
  const key = event.which || event.keycode;
129
132
  // if it is a keypress and the key is not
@@ -138,7 +141,9 @@ const focusTargetRef = href => event => {
138
141
  // @ts-ignore
139
142
  targetRef.focus();
140
143
  document.activeElement && document.activeElement.scrollIntoView({
144
+ // eslint-disable-next-line @atlaskit/platform/no-direct-document-usage
141
145
  behavior: 'smooth'
146
+ // eslint-disable-next-line @atlaskit/platform/no-direct-document-usage
142
147
  });
143
148
  window.scrollTo(0, 0);
144
149
  }
@@ -5,7 +5,7 @@ import _extends from "@babel/runtime/helpers/extends";
5
5
  */
6
6
  import { useEffect } from 'react';
7
7
 
8
- // eslint-disable-next-line @atlaskit/ui-styling-standard/use-compiled -- Ignored via go/DSP-18766
8
+ // eslint-disable-next-line @atlaskit/ui-styling-standard/use-compiled, @typescript-eslint/consistent-type-imports
9
9
  import { css, jsx } from '@emotion/react';
10
10
  import { BANNER, BANNER_HEIGHT, DEFAULT_BANNER_HEIGHT, LEFT_PANEL_WIDTH, RIGHT_PANEL_WIDTH, VAR_BANNER_HEIGHT } from '../../common/constants';
11
11
  import { getPageLayoutSlotSelector, resolveDimension } from '../../common/utils';
@@ -3,7 +3,7 @@
3
3
  * @jsx jsx
4
4
  */
5
5
 
6
- // eslint-disable-next-line @atlaskit/ui-styling-standard/use-compiled -- Ignored via go/DSP-18766
6
+ // eslint-disable-next-line @atlaskit/ui-styling-standard/use-compiled, @typescript-eslint/consistent-type-imports
7
7
  import { css, jsx } from '@emotion/react';
8
8
  import { CONTENT } from '../../common/constants';
9
9
  const contentStyles = css({
@@ -3,7 +3,7 @@
3
3
  * @jsx jsx
4
4
  */
5
5
 
6
- // eslint-disable-next-line @atlaskit/ui-styling-standard/use-compiled -- Ignored via go/DSP-18766
6
+ // eslint-disable-next-line @atlaskit/ui-styling-standard/use-compiled, @typescript-eslint/consistent-type-imports
7
7
  import { css, jsx } from '@emotion/react';
8
8
  import { easeOut, prefersReducedMotion } from '@atlaskit/motion';
9
9
  import { UNSAFE_media } from '@atlaskit/primitives/responsive';
@@ -3,7 +3,7 @@
3
3
  * @jsx jsx
4
4
  */
5
5
 
6
- // eslint-disable-next-line @atlaskit/ui-styling-standard/use-compiled -- Ignored via go/DSP-18766
6
+ // eslint-disable-next-line @atlaskit/ui-styling-standard/use-compiled, @typescript-eslint/consistent-type-imports
7
7
  import { css, jsx } from '@emotion/react';
8
8
  import { prefersReducedMotion } from '@atlaskit/motion';
9
9
  import { TRANSITION_DURATION } from '../../../common/constants';
@@ -3,7 +3,7 @@
3
3
  * @jsx jsx
4
4
  */
5
5
 
6
- // eslint-disable-next-line @atlaskit/ui-styling-standard/use-compiled -- Ignored via go/DSP-18766
6
+ // eslint-disable-next-line @atlaskit/ui-styling-standard/use-compiled, @typescript-eslint/consistent-type-imports
7
7
  import { ClassNames, css, jsx } from '@emotion/react';
8
8
  import { B100 } from '@atlaskit/theme/colors';
9
9
  const focusStyles = css({
@@ -5,7 +5,7 @@ import _extends from "@babel/runtime/helpers/extends";
5
5
  */
6
6
  import { useEffect } from 'react';
7
7
 
8
- // eslint-disable-next-line @atlaskit/ui-styling-standard/use-compiled -- Ignored via go/DSP-18766
8
+ // eslint-disable-next-line @atlaskit/ui-styling-standard/use-compiled, @typescript-eslint/consistent-type-imports
9
9
  import { css, jsx } from '@emotion/react';
10
10
  import { DEFAULT_LEFT_PANEL_WIDTH, LEFT_PANEL, LEFT_PANEL_WIDTH, VAR_LEFT_PANEL_WIDTH } from '../../common/constants';
11
11
  import { getPageLayoutSlotSelector, resolveDimension } from '../../common/utils';
@@ -4,7 +4,7 @@
4
4
  */
5
5
  import { useEffect } from 'react';
6
6
 
7
- // eslint-disable-next-line @atlaskit/ui-styling-standard/use-compiled -- Ignored via go/DSP-18766
7
+ // eslint-disable-next-line @atlaskit/ui-styling-standard/use-compiled, @typescript-eslint/consistent-type-imports
8
8
  import { jsx } from '@emotion/react';
9
9
  import { VAR_LEFT_SIDEBAR_WIDTH } from '../../common/constants';
10
10
  import { resolveDimension } from '../../common/utils';
@@ -5,7 +5,7 @@
5
5
  */
6
6
  import { Fragment, useCallback, useContext, useEffect, useRef } from 'react';
7
7
 
8
- // eslint-disable-next-line @atlaskit/ui-styling-standard/use-compiled -- Ignored via go/DSP-18766
8
+ // eslint-disable-next-line @atlaskit/ui-styling-standard/use-compiled, @typescript-eslint/consistent-type-imports
9
9
  import { css, jsx } from '@emotion/react';
10
10
  import useCloseOnEscapePress from '@atlaskit/ds-lib/use-close-on-escape-press';
11
11
  import { easeOut } from '@atlaskit/motion';
@@ -97,6 +97,8 @@ const LeftSidebar = props => {
97
97
  handlerRef.current = event => {
98
98
  mouseXRef.current = event.clientX;
99
99
  };
100
+
101
+ // eslint-disable-next-line @atlaskit/platform/no-direct-document-usage
100
102
  document.addEventListener('mousemove', handlerRef.current);
101
103
  }
102
104
  if (!isLocked && handlerRef.current) {
@@ -106,11 +108,13 @@ const LeftSidebar = props => {
106
108
  isFlyoutOpen: false
107
109
  }));
108
110
  }
111
+ // eslint-disable-next-line @atlaskit/platform/no-direct-document-usage
109
112
  document.removeEventListener('mousemove', handlerRef.current);
110
113
  handlerRef.current = null;
111
114
  }
112
115
  return () => {
113
116
  if (handlerRef.current) {
117
+ // eslint-disable-next-line @atlaskit/platform/no-direct-document-usage
114
118
  document.removeEventListener('mousemove', handlerRef.current);
115
119
  }
116
120
  };
@@ -191,6 +195,8 @@ const LeftSidebar = props => {
191
195
  }
192
196
  };
193
197
  }
198
+
199
+ // eslint-disable-next-line @atlaskit/platform/no-direct-document-usage
194
200
  document.addEventListener('mouseover', mouseOverEventRef.current, {
195
201
  capture: true,
196
202
  passive: true
@@ -204,7 +210,9 @@ const LeftSidebar = props => {
204
210
  }, FLYOUT_DELAY);
205
211
  };
206
212
  const removeMouseOverListener = () => {
207
- mouseOverEventRef.current && document.removeEventListener('mouseover', mouseOverEventRef.current, {
213
+ mouseOverEventRef.current &&
214
+ // eslint-disable-next-line @atlaskit/platform/no-direct-document-usage
215
+ document.removeEventListener('mouseover', mouseOverEventRef.current, {
208
216
  capture: true,
209
217
  passive: true
210
218
  });
@@ -5,7 +5,7 @@ import _extends from "@babel/runtime/helpers/extends";
5
5
  */
6
6
  import { useContext } from 'react';
7
7
 
8
- // eslint-disable-next-line @atlaskit/ui-styling-standard/use-compiled -- Ignored via go/DSP-18766
8
+ // eslint-disable-next-line @atlaskit/ui-styling-standard/use-compiled, @typescript-eslint/consistent-type-imports
9
9
  import { css, jsx } from '@emotion/react';
10
10
  import { prefersReducedMotion } from '@atlaskit/motion/accessibility';
11
11
  import { easeOut } from '@atlaskit/motion/curves';
@@ -5,7 +5,7 @@ import _extends from "@babel/runtime/helpers/extends";
5
5
  */
6
6
  import { Fragment } from 'react';
7
7
 
8
- // eslint-disable-next-line @atlaskit/ui-styling-standard/use-compiled -- Ignored via go/DSP-18766
8
+ // eslint-disable-next-line @atlaskit/ui-styling-standard/use-compiled, @typescript-eslint/consistent-type-imports
9
9
  import { css, jsx } from '@emotion/react';
10
10
  import { UNSAFE_media } from '@atlaskit/primitives/responsive';
11
11
  import { BANNER, BANNER_HEIGHT, CONTENT, DEFAULT_I18N_PROPS_SKIP_LINKS, LEFT_PANEL, LEFT_PANEL_WIDTH, PAGE_LAYOUT_CONTAINER_SELECTOR, RIGHT_PANEL, RIGHT_PANEL_WIDTH, TOP_NAVIGATION, TOP_NAVIGATION_HEIGHT } from '../../common/constants';