@atlaskit/drawer 9.0.6 → 9.2.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/CHANGELOG.md CHANGED
@@ -1,5 +1,21 @@
1
1
  # @atlaskit/drawer
2
2
 
3
+ ## 9.2.0
4
+
5
+ ### Minor Changes
6
+
7
+ - [#157307](https://stash.atlassian.com/projects/CONFCLOUD/repos/confluence-frontend/pull-requests/157307)
8
+ [`a1e80ec0a5e4a`](https://stash.atlassian.com/projects/CONFCLOUD/repos/confluence-frontend/commits/a1e80ec0a5e4a) -
9
+ Enable new icons behind a feature flag.
10
+
11
+ ## 9.1.0
12
+
13
+ ### Minor Changes
14
+
15
+ - [#157176](https://stash.atlassian.com/projects/CONFCLOUD/repos/confluence-frontend/pull-requests/157176)
16
+ [`3d03c4f1002ab`](https://stash.atlassian.com/projects/CONFCLOUD/repos/confluence-frontend/commits/3d03c4f1002ab) -
17
+ Integrate layering and use CloseManager instead
18
+
3
19
  ## 9.0.6
4
20
 
5
21
  ### Patch Changes
@@ -10,7 +10,6 @@ var _react = _interopRequireWildcard(require("react"));
10
10
  var _exenv = require("exenv");
11
11
  var _analyticsNext = require("@atlaskit/analytics-next");
12
12
  var _layering = require("@atlaskit/layering");
13
- var _platformFeatureFlags = require("@atlaskit/platform-feature-flags");
14
13
  var _portal = _interopRequireDefault(require("@atlaskit/portal"));
15
14
  var _blanket = _interopRequireDefault(require("./blanket"));
16
15
  var _primitives = _interopRequireDefault(require("./primitives"));
@@ -73,20 +72,14 @@ var Drawer = exports.Drawer = function Drawer(_ref2) {
73
72
  action: 'dismissed',
74
73
  componentName: 'drawer',
75
74
  packageName: "@atlaskit/drawer",
76
- packageVersion: "9.0.6",
75
+ packageVersion: "9.2.0",
77
76
  analyticsData: {
78
77
  trigger: 'escKey'
79
78
  }
80
79
  });
81
80
  var handleKeyDown = (0, _react.useCallback)(function (evt) {
82
81
  onKeyDown && onKeyDown(evt);
83
- if (!(0, _platformFeatureFlags.fg)('platform.design-system-team.inline-message-layering_wfp1p')) {
84
- // when feature flag on, we will use the EscapeCloseManager instead
85
- if (evt.key === 'Escape' && isOpen && onClose) {
86
- handleClose(evt);
87
- }
88
- }
89
- }, [handleClose, isOpen, onClose, onKeyDown]);
82
+ }, [onKeyDown]);
90
83
  (0, _react.useEffect)(function () {
91
84
  if (isOpen) {
92
85
  window.addEventListener('keydown', handleKeyDown);
@@ -102,7 +95,7 @@ var Drawer = exports.Drawer = function Drawer(_ref2) {
102
95
  action: 'dismissed',
103
96
  componentName: 'drawer',
104
97
  packageName: "@atlaskit/drawer",
105
- packageVersion: "9.0.6",
98
+ packageVersion: "9.2.0",
106
99
  analyticsData: {
107
100
  trigger: 'blanket'
108
101
  }
@@ -114,7 +107,7 @@ var Drawer = exports.Drawer = function Drawer(_ref2) {
114
107
  action: 'dismissed',
115
108
  componentName: 'drawer',
116
109
  packageName: "@atlaskit/drawer",
117
- packageVersion: "9.0.6",
110
+ packageVersion: "9.2.0",
118
111
  analyticsData: {
119
112
  trigger: 'backButton'
120
113
  }
@@ -147,7 +140,7 @@ var Drawer = exports.Drawer = function Drawer(_ref2) {
147
140
  isFocusLockEnabled: isFocusLockEnabled,
148
141
  shouldReturnFocus: shouldReturnFocus,
149
142
  scrollContentLabel: scrollContentLabel
150
- }, isOpen && (0, _platformFeatureFlags.fg)('platform.design-system-team.inline-message-layering_wfp1p') ? /*#__PURE__*/_react.default.createElement(_layering.UNSAFE_LAYERING, {
143
+ }, isOpen ? /*#__PURE__*/_react.default.createElement(_layering.UNSAFE_LAYERING, {
151
144
  isDisabled: false
152
145
  }, children, /*#__PURE__*/_react.default.createElement(EscapeCloseManager, {
153
146
  onClose: handleClose
@@ -10,8 +10,10 @@ var _objectWithoutProperties2 = _interopRequireDefault(require("@babel/runtime/h
10
10
  var _react = require("react");
11
11
  var _react2 = require("@emotion/react");
12
12
  var _new = require("@atlaskit/button/new");
13
- var _arrowLeft = _interopRequireDefault(require("@atlaskit/icon/glyph/arrow-left"));
13
+ var _arrowLeft = _interopRequireDefault(require("@atlaskit/icon/core/migration/arrow-left"));
14
+ var _arrowLeft2 = _interopRequireDefault(require("@atlaskit/icon/glyph/arrow-left"));
14
15
  var _motion = require("@atlaskit/motion");
16
+ var _platformFeatureFlags = require("@atlaskit/platform-feature-flags");
15
17
  var _constants = require("../../constants");
16
18
  var _utils = require("../utils");
17
19
  var _content = _interopRequireDefault(require("./content"));
@@ -123,8 +125,12 @@ var DrawerPrimitive = function DrawerPrimitive(_ref2) {
123
125
  icon: Icon ? function (iconProps) {
124
126
  return (0, _react2.jsx)(Icon, (0, _extends2.default)({}, iconProps, {
125
127
  size: "large"
126
- }));
127
- } : _arrowLeft.default,
128
+ }, (0, _platformFeatureFlags.fg)('platform-visual-refresh-icon-ads-migration') ? {
129
+ LEGACY_size: 'large'
130
+ } : {}));
131
+ } : (0, _platformFeatureFlags.fg)('platform-visual-refresh-icon-ads-migration') ? _arrowLeft.default :
132
+ // eslint-disable-next-line @atlaskit/design-system/no-legacy-icons
133
+ _arrowLeft2.default,
128
134
  label: closeLabel,
129
135
  shape: "circle",
130
136
  appearance: "subtle"
@@ -3,7 +3,6 @@ import React, { useCallback, useEffect } from 'react';
3
3
  import { canUseDOM } from 'exenv';
4
4
  import { usePlatformLeafEventHandler } from '@atlaskit/analytics-next';
5
5
  import { UNSAFE_LAYERING, useCloseOnEscapePress } from '@atlaskit/layering';
6
- import { fg } from '@atlaskit/platform-feature-flags';
7
6
  import Portal from '@atlaskit/portal';
8
7
  import Blanket from './blanket';
9
8
  import DrawerPrimitive from './primitives';
@@ -58,20 +57,14 @@ export const Drawer = ({
58
57
  action: 'dismissed',
59
58
  componentName: 'drawer',
60
59
  packageName: "@atlaskit/drawer",
61
- packageVersion: "9.0.6",
60
+ packageVersion: "9.2.0",
62
61
  analyticsData: {
63
62
  trigger: 'escKey'
64
63
  }
65
64
  });
66
65
  const handleKeyDown = useCallback(evt => {
67
66
  onKeyDown && onKeyDown(evt);
68
- if (!fg('platform.design-system-team.inline-message-layering_wfp1p')) {
69
- // when feature flag on, we will use the EscapeCloseManager instead
70
- if (evt.key === 'Escape' && isOpen && onClose) {
71
- handleClose(evt);
72
- }
73
- }
74
- }, [handleClose, isOpen, onClose, onKeyDown]);
67
+ }, [onKeyDown]);
75
68
  useEffect(() => {
76
69
  if (isOpen) {
77
70
  window.addEventListener('keydown', handleKeyDown);
@@ -85,7 +78,7 @@ export const Drawer = ({
85
78
  action: 'dismissed',
86
79
  componentName: 'drawer',
87
80
  packageName: "@atlaskit/drawer",
88
- packageVersion: "9.0.6",
81
+ packageVersion: "9.2.0",
89
82
  analyticsData: {
90
83
  trigger: 'blanket'
91
84
  }
@@ -95,7 +88,7 @@ export const Drawer = ({
95
88
  action: 'dismissed',
96
89
  componentName: 'drawer',
97
90
  packageName: "@atlaskit/drawer",
98
- packageVersion: "9.0.6",
91
+ packageVersion: "9.2.0",
99
92
  analyticsData: {
100
93
  trigger: 'backButton'
101
94
  }
@@ -128,7 +121,7 @@ export const Drawer = ({
128
121
  isFocusLockEnabled: isFocusLockEnabled,
129
122
  shouldReturnFocus: shouldReturnFocus,
130
123
  scrollContentLabel: scrollContentLabel
131
- }, isOpen && fg('platform.design-system-team.inline-message-layering_wfp1p') ? /*#__PURE__*/React.createElement(UNSAFE_LAYERING, {
124
+ }, isOpen ? /*#__PURE__*/React.createElement(UNSAFE_LAYERING, {
132
125
  isDisabled: false
133
126
  }, children, /*#__PURE__*/React.createElement(EscapeCloseManager, {
134
127
  onClose: handleClose
@@ -9,8 +9,10 @@ import { useCallback, useRef } from 'react';
9
9
  // eslint-disable-next-line @atlaskit/ui-styling-standard/use-compiled -- Ignored via go/DSP-18766
10
10
  import { jsx } from '@emotion/react';
11
11
  import { IconButton } from '@atlaskit/button/new';
12
- import ArrowLeft from '@atlaskit/icon/glyph/arrow-left';
12
+ import ArrowLeft from '@atlaskit/icon/core/migration/arrow-left';
13
+ import ArrowLeftOld from '@atlaskit/icon/glyph/arrow-left';
13
14
  import { ExitingPersistence, SlideIn, useExitingPersistence } from '@atlaskit/motion';
15
+ import { fg } from '@atlaskit/platform-feature-flags';
14
16
  import { animationTimingFunction, transitionDurationMs } from '../../constants';
15
17
  import { createExtender } from '../utils';
16
18
  import ContentOverrides from './content';
@@ -118,7 +120,11 @@ const DrawerPrimitive = ({
118
120
  testId: testId && 'DrawerPrimitiveSidebarCloseButton',
119
121
  icon: Icon ? iconProps => jsx(Icon, _extends({}, iconProps, {
120
122
  size: "large"
121
- })) : ArrowLeft,
123
+ }, fg('platform-visual-refresh-icon-ads-migration') ? {
124
+ LEGACY_size: 'large'
125
+ } : {})) : fg('platform-visual-refresh-icon-ads-migration') ? ArrowLeft :
126
+ // eslint-disable-next-line @atlaskit/design-system/no-legacy-icons
127
+ ArrowLeftOld,
122
128
  label: closeLabel,
123
129
  shape: "circle",
124
130
  appearance: "subtle"
@@ -3,7 +3,6 @@ import React, { useCallback, useEffect } from 'react';
3
3
  import { canUseDOM } from 'exenv';
4
4
  import { usePlatformLeafEventHandler } from '@atlaskit/analytics-next';
5
5
  import { UNSAFE_LAYERING, useCloseOnEscapePress } from '@atlaskit/layering';
6
- import { fg } from '@atlaskit/platform-feature-flags';
7
6
  import Portal from '@atlaskit/portal';
8
7
  import Blanket from './blanket';
9
8
  import DrawerPrimitive from './primitives';
@@ -62,20 +61,14 @@ export var Drawer = function Drawer(_ref2) {
62
61
  action: 'dismissed',
63
62
  componentName: 'drawer',
64
63
  packageName: "@atlaskit/drawer",
65
- packageVersion: "9.0.6",
64
+ packageVersion: "9.2.0",
66
65
  analyticsData: {
67
66
  trigger: 'escKey'
68
67
  }
69
68
  });
70
69
  var handleKeyDown = useCallback(function (evt) {
71
70
  onKeyDown && onKeyDown(evt);
72
- if (!fg('platform.design-system-team.inline-message-layering_wfp1p')) {
73
- // when feature flag on, we will use the EscapeCloseManager instead
74
- if (evt.key === 'Escape' && isOpen && onClose) {
75
- handleClose(evt);
76
- }
77
- }
78
- }, [handleClose, isOpen, onClose, onKeyDown]);
71
+ }, [onKeyDown]);
79
72
  useEffect(function () {
80
73
  if (isOpen) {
81
74
  window.addEventListener('keydown', handleKeyDown);
@@ -91,7 +84,7 @@ export var Drawer = function Drawer(_ref2) {
91
84
  action: 'dismissed',
92
85
  componentName: 'drawer',
93
86
  packageName: "@atlaskit/drawer",
94
- packageVersion: "9.0.6",
87
+ packageVersion: "9.2.0",
95
88
  analyticsData: {
96
89
  trigger: 'blanket'
97
90
  }
@@ -103,7 +96,7 @@ export var Drawer = function Drawer(_ref2) {
103
96
  action: 'dismissed',
104
97
  componentName: 'drawer',
105
98
  packageName: "@atlaskit/drawer",
106
- packageVersion: "9.0.6",
99
+ packageVersion: "9.2.0",
107
100
  analyticsData: {
108
101
  trigger: 'backButton'
109
102
  }
@@ -136,7 +129,7 @@ export var Drawer = function Drawer(_ref2) {
136
129
  isFocusLockEnabled: isFocusLockEnabled,
137
130
  shouldReturnFocus: shouldReturnFocus,
138
131
  scrollContentLabel: scrollContentLabel
139
- }, isOpen && fg('platform.design-system-team.inline-message-layering_wfp1p') ? /*#__PURE__*/React.createElement(UNSAFE_LAYERING, {
132
+ }, isOpen ? /*#__PURE__*/React.createElement(UNSAFE_LAYERING, {
140
133
  isDisabled: false
141
134
  }, children, /*#__PURE__*/React.createElement(EscapeCloseManager, {
142
135
  onClose: handleClose
@@ -12,8 +12,10 @@ import { useCallback, useRef } from 'react';
12
12
  // eslint-disable-next-line @atlaskit/ui-styling-standard/use-compiled -- Ignored via go/DSP-18766
13
13
  import { jsx } from '@emotion/react';
14
14
  import { IconButton } from '@atlaskit/button/new';
15
- import ArrowLeft from '@atlaskit/icon/glyph/arrow-left';
15
+ import ArrowLeft from '@atlaskit/icon/core/migration/arrow-left';
16
+ import ArrowLeftOld from '@atlaskit/icon/glyph/arrow-left';
16
17
  import { ExitingPersistence, SlideIn, useExitingPersistence } from '@atlaskit/motion';
18
+ import { fg } from '@atlaskit/platform-feature-flags';
17
19
  import { animationTimingFunction, transitionDurationMs } from '../../constants';
18
20
  import { createExtender } from '../utils';
19
21
  import ContentOverrides from './content';
@@ -119,8 +121,12 @@ var DrawerPrimitive = function DrawerPrimitive(_ref2) {
119
121
  icon: Icon ? function (iconProps) {
120
122
  return jsx(Icon, _extends({}, iconProps, {
121
123
  size: "large"
122
- }));
123
- } : ArrowLeft,
124
+ }, fg('platform-visual-refresh-icon-ads-migration') ? {
125
+ LEGACY_size: 'large'
126
+ } : {}));
127
+ } : fg('platform-visual-refresh-icon-ads-migration') ? ArrowLeft :
128
+ // eslint-disable-next-line @atlaskit/design-system/no-legacy-icons
129
+ ArrowLeftOld,
124
130
  label: closeLabel,
125
131
  shape: "circle",
126
132
  appearance: "subtle"
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@atlaskit/drawer",
3
- "version": "9.0.6",
3
+ "version": "9.2.0",
4
4
  "description": "A drawer is a panel that slides in from the left side of the screen.",
5
5
  "publishConfig": {
6
6
  "registry": "https://registry.npmjs.org/"
@@ -38,8 +38,8 @@
38
38
  "dependencies": {
39
39
  "@atlaskit/analytics-next": "^10.1.0",
40
40
  "@atlaskit/blanket": "^13.3.0",
41
- "@atlaskit/button": "^20.2.0",
42
- "@atlaskit/icon": "^22.22.0",
41
+ "@atlaskit/button": "^20.3.0",
42
+ "@atlaskit/icon": "^22.24.0",
43
43
  "@atlaskit/layering": "^0.7.0",
44
44
  "@atlaskit/motion": "^1.9.0",
45
45
  "@atlaskit/platform-feature-flags": "^0.3.0",
@@ -76,10 +76,10 @@
76
76
  "wait-for-expect": "^1.2.0"
77
77
  },
78
78
  "platform-feature-flags": {
79
- "platform.design-system-team.inline-message-layering_wfp1p": {
79
+ "platform_dst_drawer-bump-react-focus-lock": {
80
80
  "type": "boolean"
81
81
  },
82
- "platform_dst_drawer-bump-react-focus-lock": {
82
+ "platform-visual-refresh-icon-ads-migration": {
83
83
  "type": "boolean"
84
84
  }
85
85
  },