@atlaskit/drawer 9.1.0 → 9.2.1

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.1
4
+
5
+ ### Patch Changes
6
+
7
+ - [#161638](https://stash.atlassian.com/projects/CONFCLOUD/repos/confluence-frontend/pull-requests/161638)
8
+ [`d2e5e5ce0053d`](https://stash.atlassian.com/projects/CONFCLOUD/repos/confluence-frontend/commits/d2e5e5ce0053d) -
9
+ Use new API of layering without UNSAFE prefix
10
+
11
+ ## 9.2.0
12
+
13
+ ### Minor Changes
14
+
15
+ - [#157307](https://stash.atlassian.com/projects/CONFCLOUD/repos/confluence-frontend/pull-requests/157307)
16
+ [`a1e80ec0a5e4a`](https://stash.atlassian.com/projects/CONFCLOUD/repos/confluence-frontend/commits/a1e80ec0a5e4a) -
17
+ Enable new icons behind a feature flag.
18
+
3
19
  ## 9.1.0
4
20
 
5
21
  ### Minor Changes
@@ -72,7 +72,7 @@ var Drawer = exports.Drawer = function Drawer(_ref2) {
72
72
  action: 'dismissed',
73
73
  componentName: 'drawer',
74
74
  packageName: "@atlaskit/drawer",
75
- packageVersion: "9.1.0",
75
+ packageVersion: "9.2.1",
76
76
  analyticsData: {
77
77
  trigger: 'escKey'
78
78
  }
@@ -95,7 +95,7 @@ var Drawer = exports.Drawer = function Drawer(_ref2) {
95
95
  action: 'dismissed',
96
96
  componentName: 'drawer',
97
97
  packageName: "@atlaskit/drawer",
98
- packageVersion: "9.1.0",
98
+ packageVersion: "9.2.1",
99
99
  analyticsData: {
100
100
  trigger: 'blanket'
101
101
  }
@@ -107,7 +107,7 @@ var Drawer = exports.Drawer = function Drawer(_ref2) {
107
107
  action: 'dismissed',
108
108
  componentName: 'drawer',
109
109
  packageName: "@atlaskit/drawer",
110
- packageVersion: "9.1.0",
110
+ packageVersion: "9.2.1",
111
111
  analyticsData: {
112
112
  trigger: 'backButton'
113
113
  }
@@ -140,7 +140,7 @@ var Drawer = exports.Drawer = function Drawer(_ref2) {
140
140
  isFocusLockEnabled: isFocusLockEnabled,
141
141
  shouldReturnFocus: shouldReturnFocus,
142
142
  scrollContentLabel: scrollContentLabel
143
- }, isOpen ? /*#__PURE__*/_react.default.createElement(_layering.UNSAFE_LAYERING, {
143
+ }, isOpen ? /*#__PURE__*/_react.default.createElement(_layering.Layering, {
144
144
  isDisabled: false
145
145
  }, children, /*#__PURE__*/_react.default.createElement(EscapeCloseManager, {
146
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"
@@ -2,7 +2,7 @@
2
2
  import React, { useCallback, useEffect } from 'react';
3
3
  import { canUseDOM } from 'exenv';
4
4
  import { usePlatformLeafEventHandler } from '@atlaskit/analytics-next';
5
- import { UNSAFE_LAYERING, useCloseOnEscapePress } from '@atlaskit/layering';
5
+ import { Layering, useCloseOnEscapePress } from '@atlaskit/layering';
6
6
  import Portal from '@atlaskit/portal';
7
7
  import Blanket from './blanket';
8
8
  import DrawerPrimitive from './primitives';
@@ -57,7 +57,7 @@ export const Drawer = ({
57
57
  action: 'dismissed',
58
58
  componentName: 'drawer',
59
59
  packageName: "@atlaskit/drawer",
60
- packageVersion: "9.1.0",
60
+ packageVersion: "9.2.1",
61
61
  analyticsData: {
62
62
  trigger: 'escKey'
63
63
  }
@@ -78,7 +78,7 @@ export const Drawer = ({
78
78
  action: 'dismissed',
79
79
  componentName: 'drawer',
80
80
  packageName: "@atlaskit/drawer",
81
- packageVersion: "9.1.0",
81
+ packageVersion: "9.2.1",
82
82
  analyticsData: {
83
83
  trigger: 'blanket'
84
84
  }
@@ -88,7 +88,7 @@ export const Drawer = ({
88
88
  action: 'dismissed',
89
89
  componentName: 'drawer',
90
90
  packageName: "@atlaskit/drawer",
91
- packageVersion: "9.1.0",
91
+ packageVersion: "9.2.1",
92
92
  analyticsData: {
93
93
  trigger: 'backButton'
94
94
  }
@@ -121,7 +121,7 @@ export const Drawer = ({
121
121
  isFocusLockEnabled: isFocusLockEnabled,
122
122
  shouldReturnFocus: shouldReturnFocus,
123
123
  scrollContentLabel: scrollContentLabel
124
- }, isOpen ? /*#__PURE__*/React.createElement(UNSAFE_LAYERING, {
124
+ }, isOpen ? /*#__PURE__*/React.createElement(Layering, {
125
125
  isDisabled: false
126
126
  }, children, /*#__PURE__*/React.createElement(EscapeCloseManager, {
127
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"
@@ -2,7 +2,7 @@
2
2
  import React, { useCallback, useEffect } from 'react';
3
3
  import { canUseDOM } from 'exenv';
4
4
  import { usePlatformLeafEventHandler } from '@atlaskit/analytics-next';
5
- import { UNSAFE_LAYERING, useCloseOnEscapePress } from '@atlaskit/layering';
5
+ import { Layering, useCloseOnEscapePress } from '@atlaskit/layering';
6
6
  import Portal from '@atlaskit/portal';
7
7
  import Blanket from './blanket';
8
8
  import DrawerPrimitive from './primitives';
@@ -61,7 +61,7 @@ export var Drawer = function Drawer(_ref2) {
61
61
  action: 'dismissed',
62
62
  componentName: 'drawer',
63
63
  packageName: "@atlaskit/drawer",
64
- packageVersion: "9.1.0",
64
+ packageVersion: "9.2.1",
65
65
  analyticsData: {
66
66
  trigger: 'escKey'
67
67
  }
@@ -84,7 +84,7 @@ export var Drawer = function Drawer(_ref2) {
84
84
  action: 'dismissed',
85
85
  componentName: 'drawer',
86
86
  packageName: "@atlaskit/drawer",
87
- packageVersion: "9.1.0",
87
+ packageVersion: "9.2.1",
88
88
  analyticsData: {
89
89
  trigger: 'blanket'
90
90
  }
@@ -96,7 +96,7 @@ export var Drawer = function Drawer(_ref2) {
96
96
  action: 'dismissed',
97
97
  componentName: 'drawer',
98
98
  packageName: "@atlaskit/drawer",
99
- packageVersion: "9.1.0",
99
+ packageVersion: "9.2.1",
100
100
  analyticsData: {
101
101
  trigger: 'backButton'
102
102
  }
@@ -129,7 +129,7 @@ export var Drawer = function Drawer(_ref2) {
129
129
  isFocusLockEnabled: isFocusLockEnabled,
130
130
  shouldReturnFocus: shouldReturnFocus,
131
131
  scrollContentLabel: scrollContentLabel
132
- }, isOpen ? /*#__PURE__*/React.createElement(UNSAFE_LAYERING, {
132
+ }, isOpen ? /*#__PURE__*/React.createElement(Layering, {
133
133
  isDisabled: false
134
134
  }, children, /*#__PURE__*/React.createElement(EscapeCloseManager, {
135
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.1.0",
3
+ "version": "9.2.1",
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/"
@@ -45,7 +45,7 @@
45
45
  "@atlaskit/platform-feature-flags": "^0.3.0",
46
46
  "@atlaskit/portal": "^4.9.0",
47
47
  "@atlaskit/theme": "^14.0.0",
48
- "@atlaskit/tokens": "^2.0.0",
48
+ "@atlaskit/tokens": "^2.2.0",
49
49
  "@babel/runtime": "^7.0.0",
50
50
  "@emotion/react": "^11.7.1",
51
51
  "bind-event-listener": "^3.0.0",
@@ -78,6 +78,9 @@
78
78
  "platform-feature-flags": {
79
79
  "platform_dst_drawer-bump-react-focus-lock": {
80
80
  "type": "boolean"
81
+ },
82
+ "platform-visual-refresh-icon-ads-migration": {
83
+ "type": "boolean"
81
84
  }
82
85
  },
83
86
  "techstack": {