@atlaskit/drawer 9.4.1 → 9.4.3
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 +12 -0
- package/dist/cjs/compiled/blanket.js +2 -5
- package/dist/cjs/compiled/constants.js +1 -3
- package/dist/cjs/compiled/drawer-panel/drawer-close-button.js +4 -9
- package/dist/cjs/compiled/drawer-panel/drawer-panel.js +1 -10
- package/dist/cjs/compiled/drawer.js +3 -3
- package/dist/cjs/components/blanket.js +1 -1
- package/dist/cjs/components/index.js +3 -3
- package/dist/cjs/components/primitives/index.js +5 -19
- package/dist/cjs/constants.js +1 -3
- package/dist/es2019/compiled/blanket.js +3 -6
- package/dist/es2019/compiled/constants.js +0 -2
- package/dist/es2019/compiled/drawer-panel/drawer-close-button.js +3 -8
- package/dist/es2019/compiled/drawer-panel/drawer-panel.js +3 -13
- package/dist/es2019/compiled/drawer.js +3 -3
- package/dist/es2019/components/blanket.js +2 -2
- package/dist/es2019/components/index.js +3 -3
- package/dist/es2019/components/primitives/index.js +6 -21
- package/dist/es2019/constants.js +0 -2
- package/dist/esm/compiled/blanket.js +3 -6
- package/dist/esm/compiled/constants.js +0 -2
- package/dist/esm/compiled/drawer-panel/drawer-close-button.js +4 -9
- package/dist/esm/compiled/drawer-panel/drawer-panel.js +3 -12
- package/dist/esm/compiled/drawer.js +3 -3
- package/dist/esm/components/blanket.js +2 -2
- package/dist/esm/components/index.js +3 -3
- package/dist/esm/components/primitives/index.js +7 -21
- package/dist/esm/constants.js +0 -2
- package/dist/types/compiled/constants.d.ts +0 -2
- package/dist/types/compiled/drawer-panel/drawer-close-button.d.ts +2 -2
- package/dist/types/compiled/drawer-panel/focus-lock.d.ts +2 -2
- package/dist/types/compiled/drawer.d.ts +2 -2
- package/dist/types/components/index.d.ts +2 -2
- package/dist/types/components/primitives/focus-lock.d.ts +2 -2
- package/dist/types/constants.d.ts +0 -2
- package/dist/types-ts4.5/compiled/constants.d.ts +0 -2
- package/dist/types-ts4.5/compiled/drawer-panel/drawer-close-button.d.ts +2 -2
- package/dist/types-ts4.5/compiled/drawer-panel/focus-lock.d.ts +2 -2
- package/dist/types-ts4.5/compiled/drawer.d.ts +2 -2
- package/dist/types-ts4.5/components/index.d.ts +2 -2
- package/dist/types-ts4.5/components/primitives/focus-lock.d.ts +2 -2
- package/dist/types-ts4.5/constants.d.ts +0 -2
- package/package.json +6 -12
package/CHANGELOG.md
CHANGED
|
@@ -26,13 +26,10 @@ var Blanket = function Blanket(_ref) {
|
|
|
26
26
|
return /*#__PURE__*/_react.default.createElement(_motion.ExitingPersistence, {
|
|
27
27
|
appear: true
|
|
28
28
|
}, isOpen && /*#__PURE__*/_react.default.createElement(_motion.FadeIn
|
|
29
|
-
|
|
30
|
-
* We double the duration because the fade in keyframes have
|
|
31
|
-
* `opacity: 1` at `50%`.
|
|
32
|
-
*
|
|
29
|
+
/*
|
|
33
30
|
* The fade out animation uses half the passed duration so it evens out.
|
|
34
31
|
*/, {
|
|
35
|
-
duration:
|
|
32
|
+
duration: "large"
|
|
36
33
|
/**
|
|
37
34
|
* We don't expose this on `FadeIn` but it does get passed down.
|
|
38
35
|
* TODO: figure out how we want to handle this...
|
|
@@ -3,10 +3,8 @@
|
|
|
3
3
|
Object.defineProperty(exports, "__esModule", {
|
|
4
4
|
value: true
|
|
5
5
|
});
|
|
6
|
-
exports.
|
|
6
|
+
exports.animationTimingFunction = void 0;
|
|
7
7
|
var _curves = require("@atlaskit/motion/curves");
|
|
8
|
-
var transitionDuration = exports.transitionDuration = '0.22s';
|
|
9
|
-
var transitionDurationMs = exports.transitionDurationMs = 220;
|
|
10
8
|
var animationTimingFunction = exports.animationTimingFunction = function animationTimingFunction() {
|
|
11
9
|
return _curves.easeOut;
|
|
12
10
|
};
|
|
@@ -9,8 +9,6 @@ var _extends2 = _interopRequireDefault(require("@babel/runtime/helpers/extends")
|
|
|
9
9
|
var _react = _interopRequireDefault(require("react"));
|
|
10
10
|
var _new = require("@atlaskit/button/new");
|
|
11
11
|
var _arrowLeft = _interopRequireDefault(require("@atlaskit/icon/core/migration/arrow-left"));
|
|
12
|
-
var _arrowLeft2 = _interopRequireDefault(require("@atlaskit/icon/glyph/arrow-left"));
|
|
13
|
-
var _platformFeatureFlags = require("@atlaskit/platform-feature-flags");
|
|
14
12
|
var _context = require("../../context");
|
|
15
13
|
/**
|
|
16
14
|
* __Drawer close button
|
|
@@ -30,13 +28,10 @@ var DrawerCloseButton = exports.DrawerCloseButton = function DrawerCloseButton(_
|
|
|
30
28
|
testId: testId,
|
|
31
29
|
icon: Icon ? function (iconProps) {
|
|
32
30
|
return /*#__PURE__*/_react.default.createElement(Icon, (0, _extends2.default)({}, iconProps, {
|
|
33
|
-
size: "large"
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
} : (0, _platformFeatureFlags.fg)('platform-visual-refresh-icon-ads-migration') ? _arrowLeft.default :
|
|
38
|
-
// eslint-disable-next-line @atlaskit/design-system/no-legacy-icons
|
|
39
|
-
_arrowLeft2.default,
|
|
31
|
+
size: "large",
|
|
32
|
+
LEGACY_size: "large"
|
|
33
|
+
}));
|
|
34
|
+
} : _arrowLeft.default,
|
|
40
35
|
label: label,
|
|
41
36
|
shape: "circle",
|
|
42
37
|
appearance: "subtle"
|
|
@@ -34,18 +34,9 @@ var CustomSlideIn = function CustomSlideIn(_ref) {
|
|
|
34
34
|
var children = _ref.children,
|
|
35
35
|
onFinish = _ref.onFinish,
|
|
36
36
|
enterFrom = _ref.enterFrom;
|
|
37
|
-
var _useExitingPersistenc = (0, _motion.useExitingPersistence)(),
|
|
38
|
-
isExiting = _useExitingPersistenc.isExiting;
|
|
39
|
-
|
|
40
|
-
/**
|
|
41
|
-
* The actual duration should be the same for both enter and exit,
|
|
42
|
-
* but motion halves the passed duration for exit animations,
|
|
43
|
-
* so we double it when exiting.
|
|
44
|
-
*/
|
|
45
|
-
var duration = isExiting ? _constants.transitionDurationMs * 2 : _constants.transitionDurationMs;
|
|
46
37
|
return /*#__PURE__*/React.createElement(_motion.SlideIn, {
|
|
47
38
|
animationTimingFunction: _constants.animationTimingFunction,
|
|
48
|
-
duration:
|
|
39
|
+
duration: "small",
|
|
49
40
|
enterFrom: enterFrom,
|
|
50
41
|
exitTo: enterFrom,
|
|
51
42
|
fade: "none",
|
|
@@ -67,7 +67,7 @@ var Drawer = exports.Drawer = function Drawer(_ref2) {
|
|
|
67
67
|
action: 'dismissed',
|
|
68
68
|
componentName: 'drawer',
|
|
69
69
|
packageName: "@atlaskit/drawer",
|
|
70
|
-
packageVersion: "9.4.
|
|
70
|
+
packageVersion: "9.4.3",
|
|
71
71
|
analyticsData: {
|
|
72
72
|
trigger: 'escKey'
|
|
73
73
|
}
|
|
@@ -90,7 +90,7 @@ var Drawer = exports.Drawer = function Drawer(_ref2) {
|
|
|
90
90
|
action: 'dismissed',
|
|
91
91
|
componentName: 'drawer',
|
|
92
92
|
packageName: "@atlaskit/drawer",
|
|
93
|
-
packageVersion: "9.4.
|
|
93
|
+
packageVersion: "9.4.3",
|
|
94
94
|
analyticsData: {
|
|
95
95
|
trigger: 'blanket'
|
|
96
96
|
}
|
|
@@ -102,7 +102,7 @@ var Drawer = exports.Drawer = function Drawer(_ref2) {
|
|
|
102
102
|
action: 'dismissed',
|
|
103
103
|
componentName: 'drawer',
|
|
104
104
|
packageName: "@atlaskit/drawer",
|
|
105
|
-
packageVersion: "9.4.
|
|
105
|
+
packageVersion: "9.4.3",
|
|
106
106
|
analyticsData: {
|
|
107
107
|
trigger: 'backButton'
|
|
108
108
|
}
|
|
@@ -37,7 +37,7 @@ var Blanket = function Blanket(_ref) {
|
|
|
37
37
|
*
|
|
38
38
|
* The fade out animation uses half the passed duration so it evens out.
|
|
39
39
|
*/, {
|
|
40
|
-
duration:
|
|
40
|
+
duration: "large"
|
|
41
41
|
/**
|
|
42
42
|
* We don't expose this on `FadeIn` but it does get passed down.
|
|
43
43
|
* TODO: figure out how we want to handle this...
|
|
@@ -72,7 +72,7 @@ var Drawer = function Drawer(_ref2) {
|
|
|
72
72
|
action: 'dismissed',
|
|
73
73
|
componentName: 'drawer',
|
|
74
74
|
packageName: "@atlaskit/drawer",
|
|
75
|
-
packageVersion: "9.4.
|
|
75
|
+
packageVersion: "9.4.3",
|
|
76
76
|
analyticsData: {
|
|
77
77
|
trigger: 'escKey'
|
|
78
78
|
}
|
|
@@ -95,7 +95,7 @@ var Drawer = function Drawer(_ref2) {
|
|
|
95
95
|
action: 'dismissed',
|
|
96
96
|
componentName: 'drawer',
|
|
97
97
|
packageName: "@atlaskit/drawer",
|
|
98
|
-
packageVersion: "9.4.
|
|
98
|
+
packageVersion: "9.4.3",
|
|
99
99
|
analyticsData: {
|
|
100
100
|
trigger: 'blanket'
|
|
101
101
|
}
|
|
@@ -107,7 +107,7 @@ var Drawer = function Drawer(_ref2) {
|
|
|
107
107
|
action: 'dismissed',
|
|
108
108
|
componentName: 'drawer',
|
|
109
109
|
packageName: "@atlaskit/drawer",
|
|
110
|
-
packageVersion: "9.4.
|
|
110
|
+
packageVersion: "9.4.3",
|
|
111
111
|
analyticsData: {
|
|
112
112
|
trigger: 'backButton'
|
|
113
113
|
}
|
|
@@ -11,9 +11,7 @@ var _react = require("react");
|
|
|
11
11
|
var _react2 = require("@emotion/react");
|
|
12
12
|
var _new = require("@atlaskit/button/new");
|
|
13
13
|
var _arrowLeft = _interopRequireDefault(require("@atlaskit/icon/core/migration/arrow-left"));
|
|
14
|
-
var _arrowLeft2 = _interopRequireDefault(require("@atlaskit/icon/glyph/arrow-left"));
|
|
15
14
|
var _motion = require("@atlaskit/motion");
|
|
16
|
-
var _platformFeatureFlags = require("@atlaskit/platform-feature-flags");
|
|
17
15
|
var _constants = require("../../constants");
|
|
18
16
|
var _utils = require("../utils");
|
|
19
17
|
var _content = _interopRequireDefault(require("./content"));
|
|
@@ -42,18 +40,9 @@ var CustomSlideIn = function CustomSlideIn(_ref) {
|
|
|
42
40
|
var children = _ref.children,
|
|
43
41
|
onFinish = _ref.onFinish,
|
|
44
42
|
enterFrom = _ref.enterFrom;
|
|
45
|
-
var _useExitingPersistenc = (0, _motion.useExitingPersistence)(),
|
|
46
|
-
isExiting = _useExitingPersistenc.isExiting;
|
|
47
|
-
|
|
48
|
-
/**
|
|
49
|
-
* The actual duration should be the same for both enter and exit,
|
|
50
|
-
* but motion halves the passed duration for exit animations,
|
|
51
|
-
* so we double it when exiting.
|
|
52
|
-
*/
|
|
53
|
-
var duration = isExiting ? _constants.transitionDurationMs * 2 : _constants.transitionDurationMs;
|
|
54
43
|
return (0, _react2.jsx)(_motion.SlideIn, {
|
|
55
44
|
animationTimingFunction: _constants.animationTimingFunction,
|
|
56
|
-
duration:
|
|
45
|
+
duration: "small",
|
|
57
46
|
enterFrom: enterFrom,
|
|
58
47
|
exitTo: enterFrom,
|
|
59
48
|
fade: "none",
|
|
@@ -124,13 +113,10 @@ var DrawerPrimitive = function DrawerPrimitive(_ref2) {
|
|
|
124
113
|
testId: testId && 'DrawerPrimitiveSidebarCloseButton',
|
|
125
114
|
icon: Icon ? function (iconProps) {
|
|
126
115
|
return (0, _react2.jsx)(Icon, (0, _extends2.default)({}, iconProps, {
|
|
127
|
-
size: "large"
|
|
128
|
-
|
|
129
|
-
|
|
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,
|
|
116
|
+
size: "large",
|
|
117
|
+
LEGACY_size: "large"
|
|
118
|
+
}));
|
|
119
|
+
} : _arrowLeft.default,
|
|
134
120
|
label: closeLabel,
|
|
135
121
|
shape: "circle",
|
|
136
122
|
appearance: "subtle"
|
package/dist/cjs/constants.js
CHANGED
|
@@ -3,10 +3,8 @@
|
|
|
3
3
|
Object.defineProperty(exports, "__esModule", {
|
|
4
4
|
value: true
|
|
5
5
|
});
|
|
6
|
-
exports.widths = exports.transitionTimingFunction = exports.
|
|
6
|
+
exports.widths = exports.transitionTimingFunction = exports.directions = exports.defaultFocusLockSettings = exports.animationTimingFunction = void 0;
|
|
7
7
|
var _curves = require("@atlaskit/motion/curves");
|
|
8
|
-
var transitionDuration = exports.transitionDuration = '0.22s';
|
|
9
|
-
var transitionDurationMs = exports.transitionDurationMs = 220;
|
|
10
8
|
var transitionTimingFunction = exports.transitionTimingFunction = _curves.easeOut;
|
|
11
9
|
var widths = exports.widths = ['narrow', 'medium', 'wide', 'extended', 'full'];
|
|
12
10
|
var directions = exports.directions = ['top', 'right', 'bottom', 'left'];
|
|
@@ -4,7 +4,7 @@ import { ax, ix } from "@compiled/react/runtime";
|
|
|
4
4
|
import React from 'react';
|
|
5
5
|
import AkBlanket from '@atlaskit/blanket';
|
|
6
6
|
import { ExitingPersistence, FadeIn } from '@atlaskit/motion';
|
|
7
|
-
import { animationTimingFunction
|
|
7
|
+
import { animationTimingFunction } from '../constants';
|
|
8
8
|
const styles = {
|
|
9
9
|
blanket: "_kqswh2mm"
|
|
10
10
|
};
|
|
@@ -20,13 +20,10 @@ const Blanket = ({
|
|
|
20
20
|
return /*#__PURE__*/React.createElement(ExitingPersistence, {
|
|
21
21
|
appear: true
|
|
22
22
|
}, isOpen && /*#__PURE__*/React.createElement(FadeIn
|
|
23
|
-
|
|
24
|
-
* We double the duration because the fade in keyframes have
|
|
25
|
-
* `opacity: 1` at `50%`.
|
|
26
|
-
*
|
|
23
|
+
/*
|
|
27
24
|
* The fade out animation uses half the passed duration so it evens out.
|
|
28
25
|
*/, {
|
|
29
|
-
duration:
|
|
26
|
+
duration: "large"
|
|
30
27
|
/**
|
|
31
28
|
* We don't expose this on `FadeIn` but it does get passed down.
|
|
32
29
|
* TODO: figure out how we want to handle this...
|
|
@@ -2,8 +2,6 @@ import _extends from "@babel/runtime/helpers/extends";
|
|
|
2
2
|
import React from 'react';
|
|
3
3
|
import { IconButton } from '@atlaskit/button/new';
|
|
4
4
|
import ArrowLeft from '@atlaskit/icon/core/migration/arrow-left';
|
|
5
|
-
import ArrowLeftOld from '@atlaskit/icon/glyph/arrow-left';
|
|
6
|
-
import { fg } from '@atlaskit/platform-feature-flags';
|
|
7
5
|
import { useEnsureIsInsideDrawer, useOnClose } from '../../context';
|
|
8
6
|
/**
|
|
9
7
|
* __Drawer close button
|
|
@@ -21,12 +19,9 @@ export const DrawerCloseButton = ({
|
|
|
21
19
|
onClick: onClose,
|
|
22
20
|
testId: testId,
|
|
23
21
|
icon: Icon ? iconProps => /*#__PURE__*/React.createElement(Icon, _extends({}, iconProps, {
|
|
24
|
-
size: "large"
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
} : {})) : fg('platform-visual-refresh-icon-ads-migration') ? ArrowLeft :
|
|
28
|
-
// eslint-disable-next-line @atlaskit/design-system/no-legacy-icons
|
|
29
|
-
ArrowLeftOld,
|
|
22
|
+
size: "large",
|
|
23
|
+
LEGACY_size: "large"
|
|
24
|
+
})) : ArrowLeft,
|
|
30
25
|
label: label,
|
|
31
26
|
shape: "circle",
|
|
32
27
|
appearance: "subtle"
|
|
@@ -3,8 +3,8 @@ import "./drawer-panel.compiled.css";
|
|
|
3
3
|
import * as React from 'react';
|
|
4
4
|
import { ax, ix } from "@compiled/react/runtime";
|
|
5
5
|
import { useCallback, useRef } from 'react';
|
|
6
|
-
import { ExitingPersistence, SlideIn
|
|
7
|
-
import { animationTimingFunction
|
|
6
|
+
import { ExitingPersistence, SlideIn } from '@atlaskit/motion';
|
|
7
|
+
import { animationTimingFunction } from '../../constants';
|
|
8
8
|
import { EnsureIsInsideDrawerContext, OnCloseContext } from '../../context';
|
|
9
9
|
import FocusLock from './focus-lock';
|
|
10
10
|
const LOCAL_CURRENT_SURFACE_CSS_VAR = '--ds-elevation-surface-current';
|
|
@@ -25,19 +25,9 @@ const CustomSlideIn = ({
|
|
|
25
25
|
onFinish,
|
|
26
26
|
enterFrom
|
|
27
27
|
}) => {
|
|
28
|
-
const {
|
|
29
|
-
isExiting
|
|
30
|
-
} = useExitingPersistence();
|
|
31
|
-
|
|
32
|
-
/**
|
|
33
|
-
* The actual duration should be the same for both enter and exit,
|
|
34
|
-
* but motion halves the passed duration for exit animations,
|
|
35
|
-
* so we double it when exiting.
|
|
36
|
-
*/
|
|
37
|
-
const duration = isExiting ? transitionDurationMs * 2 : transitionDurationMs;
|
|
38
28
|
return /*#__PURE__*/React.createElement(SlideIn, {
|
|
39
29
|
animationTimingFunction: animationTimingFunction,
|
|
40
|
-
duration:
|
|
30
|
+
duration: "small",
|
|
41
31
|
enterFrom: enterFrom,
|
|
42
32
|
exitTo: enterFrom,
|
|
43
33
|
fade: "none",
|
|
@@ -51,7 +51,7 @@ export const Drawer = ({
|
|
|
51
51
|
action: 'dismissed',
|
|
52
52
|
componentName: 'drawer',
|
|
53
53
|
packageName: "@atlaskit/drawer",
|
|
54
|
-
packageVersion: "9.4.
|
|
54
|
+
packageVersion: "9.4.3",
|
|
55
55
|
analyticsData: {
|
|
56
56
|
trigger: 'escKey'
|
|
57
57
|
}
|
|
@@ -72,7 +72,7 @@ export const Drawer = ({
|
|
|
72
72
|
action: 'dismissed',
|
|
73
73
|
componentName: 'drawer',
|
|
74
74
|
packageName: "@atlaskit/drawer",
|
|
75
|
-
packageVersion: "9.4.
|
|
75
|
+
packageVersion: "9.4.3",
|
|
76
76
|
analyticsData: {
|
|
77
77
|
trigger: 'blanket'
|
|
78
78
|
}
|
|
@@ -82,7 +82,7 @@ export const Drawer = ({
|
|
|
82
82
|
action: 'dismissed',
|
|
83
83
|
componentName: 'drawer',
|
|
84
84
|
packageName: "@atlaskit/drawer",
|
|
85
|
-
packageVersion: "9.4.
|
|
85
|
+
packageVersion: "9.4.3",
|
|
86
86
|
analyticsData: {
|
|
87
87
|
trigger: 'backButton'
|
|
88
88
|
}
|
|
@@ -8,7 +8,7 @@ import React from 'react';
|
|
|
8
8
|
import { css, jsx } from '@emotion/react';
|
|
9
9
|
import AkBlanket from '@atlaskit/blanket';
|
|
10
10
|
import { ExitingPersistence, FadeIn } from '@atlaskit/motion';
|
|
11
|
-
import { animationTimingFunction
|
|
11
|
+
import { animationTimingFunction } from '../constants';
|
|
12
12
|
const blanketStyles = css({
|
|
13
13
|
position: 'relative'
|
|
14
14
|
});
|
|
@@ -30,7 +30,7 @@ const Blanket = ({
|
|
|
30
30
|
*
|
|
31
31
|
* The fade out animation uses half the passed duration so it evens out.
|
|
32
32
|
*/, {
|
|
33
|
-
duration:
|
|
33
|
+
duration: "large"
|
|
34
34
|
/**
|
|
35
35
|
* We don't expose this on `FadeIn` but it does get passed down.
|
|
36
36
|
* TODO: figure out how we want to handle this...
|
|
@@ -57,7 +57,7 @@ const Drawer = ({
|
|
|
57
57
|
action: 'dismissed',
|
|
58
58
|
componentName: 'drawer',
|
|
59
59
|
packageName: "@atlaskit/drawer",
|
|
60
|
-
packageVersion: "9.4.
|
|
60
|
+
packageVersion: "9.4.3",
|
|
61
61
|
analyticsData: {
|
|
62
62
|
trigger: 'escKey'
|
|
63
63
|
}
|
|
@@ -78,7 +78,7 @@ const Drawer = ({
|
|
|
78
78
|
action: 'dismissed',
|
|
79
79
|
componentName: 'drawer',
|
|
80
80
|
packageName: "@atlaskit/drawer",
|
|
81
|
-
packageVersion: "9.4.
|
|
81
|
+
packageVersion: "9.4.3",
|
|
82
82
|
analyticsData: {
|
|
83
83
|
trigger: 'blanket'
|
|
84
84
|
}
|
|
@@ -88,7 +88,7 @@ const Drawer = ({
|
|
|
88
88
|
action: 'dismissed',
|
|
89
89
|
componentName: 'drawer',
|
|
90
90
|
packageName: "@atlaskit/drawer",
|
|
91
|
-
packageVersion: "9.4.
|
|
91
|
+
packageVersion: "9.4.3",
|
|
92
92
|
analyticsData: {
|
|
93
93
|
trigger: 'backButton'
|
|
94
94
|
}
|
|
@@ -10,10 +10,8 @@ import { useCallback, useRef } from 'react';
|
|
|
10
10
|
import { jsx } from '@emotion/react';
|
|
11
11
|
import { IconButton } from '@atlaskit/button/new';
|
|
12
12
|
import ArrowLeft from '@atlaskit/icon/core/migration/arrow-left';
|
|
13
|
-
import
|
|
14
|
-
import {
|
|
15
|
-
import { fg } from '@atlaskit/platform-feature-flags';
|
|
16
|
-
import { animationTimingFunction, transitionDurationMs } from '../../constants';
|
|
13
|
+
import { ExitingPersistence, SlideIn } from '@atlaskit/motion';
|
|
14
|
+
import { animationTimingFunction } from '../../constants';
|
|
17
15
|
import { createExtender } from '../utils';
|
|
18
16
|
import ContentOverrides from './content';
|
|
19
17
|
import DrawerWrapper from './drawer-wrapper';
|
|
@@ -36,19 +34,9 @@ const CustomSlideIn = ({
|
|
|
36
34
|
onFinish,
|
|
37
35
|
enterFrom
|
|
38
36
|
}) => {
|
|
39
|
-
const {
|
|
40
|
-
isExiting
|
|
41
|
-
} = useExitingPersistence();
|
|
42
|
-
|
|
43
|
-
/**
|
|
44
|
-
* The actual duration should be the same for both enter and exit,
|
|
45
|
-
* but motion halves the passed duration for exit animations,
|
|
46
|
-
* so we double it when exiting.
|
|
47
|
-
*/
|
|
48
|
-
const duration = isExiting ? transitionDurationMs * 2 : transitionDurationMs;
|
|
49
37
|
return jsx(SlideIn, {
|
|
50
38
|
animationTimingFunction: animationTimingFunction,
|
|
51
|
-
duration:
|
|
39
|
+
duration: "small",
|
|
52
40
|
enterFrom: enterFrom,
|
|
53
41
|
exitTo: enterFrom,
|
|
54
42
|
fade: "none",
|
|
@@ -119,12 +107,9 @@ const DrawerPrimitive = ({
|
|
|
119
107
|
onClick: onClose,
|
|
120
108
|
testId: testId && 'DrawerPrimitiveSidebarCloseButton',
|
|
121
109
|
icon: Icon ? iconProps => jsx(Icon, _extends({}, iconProps, {
|
|
122
|
-
size: "large"
|
|
123
|
-
|
|
124
|
-
|
|
125
|
-
} : {})) : fg('platform-visual-refresh-icon-ads-migration') ? ArrowLeft :
|
|
126
|
-
// eslint-disable-next-line @atlaskit/design-system/no-legacy-icons
|
|
127
|
-
ArrowLeftOld,
|
|
110
|
+
size: "large",
|
|
111
|
+
LEGACY_size: "large"
|
|
112
|
+
})) : ArrowLeft,
|
|
128
113
|
label: closeLabel,
|
|
129
114
|
shape: "circle",
|
|
130
115
|
appearance: "subtle"
|
package/dist/es2019/constants.js
CHANGED
|
@@ -1,6 +1,4 @@
|
|
|
1
1
|
import { easeOut } from '@atlaskit/motion/curves';
|
|
2
|
-
export const transitionDuration = '0.22s';
|
|
3
|
-
export const transitionDurationMs = 220;
|
|
4
2
|
export const transitionTimingFunction = easeOut;
|
|
5
3
|
export const widths = ['narrow', 'medium', 'wide', 'extended', 'full'];
|
|
6
4
|
export const directions = ['top', 'right', 'bottom', 'left'];
|
|
@@ -4,7 +4,7 @@ import { ax, ix } from "@compiled/react/runtime";
|
|
|
4
4
|
import React from 'react';
|
|
5
5
|
import AkBlanket from '@atlaskit/blanket';
|
|
6
6
|
import { ExitingPersistence, FadeIn } from '@atlaskit/motion';
|
|
7
|
-
import { animationTimingFunction
|
|
7
|
+
import { animationTimingFunction } from '../constants';
|
|
8
8
|
var styles = {
|
|
9
9
|
blanket: "_kqswh2mm"
|
|
10
10
|
};
|
|
@@ -19,13 +19,10 @@ var Blanket = function Blanket(_ref) {
|
|
|
19
19
|
return /*#__PURE__*/React.createElement(ExitingPersistence, {
|
|
20
20
|
appear: true
|
|
21
21
|
}, isOpen && /*#__PURE__*/React.createElement(FadeIn
|
|
22
|
-
|
|
23
|
-
* We double the duration because the fade in keyframes have
|
|
24
|
-
* `opacity: 1` at `50%`.
|
|
25
|
-
*
|
|
22
|
+
/*
|
|
26
23
|
* The fade out animation uses half the passed duration so it evens out.
|
|
27
24
|
*/, {
|
|
28
|
-
duration:
|
|
25
|
+
duration: "large"
|
|
29
26
|
/**
|
|
30
27
|
* We don't expose this on `FadeIn` but it does get passed down.
|
|
31
28
|
* TODO: figure out how we want to handle this...
|
|
@@ -2,8 +2,6 @@ import _extends from "@babel/runtime/helpers/extends";
|
|
|
2
2
|
import React from 'react';
|
|
3
3
|
import { IconButton } from '@atlaskit/button/new';
|
|
4
4
|
import ArrowLeft from '@atlaskit/icon/core/migration/arrow-left';
|
|
5
|
-
import ArrowLeftOld from '@atlaskit/icon/glyph/arrow-left';
|
|
6
|
-
import { fg } from '@atlaskit/platform-feature-flags';
|
|
7
5
|
import { useEnsureIsInsideDrawer, useOnClose } from '../../context';
|
|
8
6
|
/**
|
|
9
7
|
* __Drawer close button
|
|
@@ -23,13 +21,10 @@ export var DrawerCloseButton = function DrawerCloseButton(_ref) {
|
|
|
23
21
|
testId: testId,
|
|
24
22
|
icon: Icon ? function (iconProps) {
|
|
25
23
|
return /*#__PURE__*/React.createElement(Icon, _extends({}, iconProps, {
|
|
26
|
-
size: "large"
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
} : fg('platform-visual-refresh-icon-ads-migration') ? ArrowLeft :
|
|
31
|
-
// eslint-disable-next-line @atlaskit/design-system/no-legacy-icons
|
|
32
|
-
ArrowLeftOld,
|
|
24
|
+
size: "large",
|
|
25
|
+
LEGACY_size: "large"
|
|
26
|
+
}));
|
|
27
|
+
} : ArrowLeft,
|
|
33
28
|
label: label,
|
|
34
29
|
shape: "circle",
|
|
35
30
|
appearance: "subtle"
|
|
@@ -3,8 +3,8 @@ import "./drawer-panel.compiled.css";
|
|
|
3
3
|
import * as React from 'react';
|
|
4
4
|
import { ax, ix } from "@compiled/react/runtime";
|
|
5
5
|
import { useCallback, useRef } from 'react';
|
|
6
|
-
import { ExitingPersistence, SlideIn
|
|
7
|
-
import { animationTimingFunction
|
|
6
|
+
import { ExitingPersistence, SlideIn } from '@atlaskit/motion';
|
|
7
|
+
import { animationTimingFunction } from '../../constants';
|
|
8
8
|
import { EnsureIsInsideDrawerContext, OnCloseContext } from '../../context';
|
|
9
9
|
import FocusLock from './focus-lock';
|
|
10
10
|
var LOCAL_CURRENT_SURFACE_CSS_VAR = '--ds-elevation-surface-current';
|
|
@@ -24,18 +24,9 @@ var CustomSlideIn = function CustomSlideIn(_ref) {
|
|
|
24
24
|
var children = _ref.children,
|
|
25
25
|
onFinish = _ref.onFinish,
|
|
26
26
|
enterFrom = _ref.enterFrom;
|
|
27
|
-
var _useExitingPersistenc = useExitingPersistence(),
|
|
28
|
-
isExiting = _useExitingPersistenc.isExiting;
|
|
29
|
-
|
|
30
|
-
/**
|
|
31
|
-
* The actual duration should be the same for both enter and exit,
|
|
32
|
-
* but motion halves the passed duration for exit animations,
|
|
33
|
-
* so we double it when exiting.
|
|
34
|
-
*/
|
|
35
|
-
var duration = isExiting ? transitionDurationMs * 2 : transitionDurationMs;
|
|
36
27
|
return /*#__PURE__*/React.createElement(SlideIn, {
|
|
37
28
|
animationTimingFunction: animationTimingFunction,
|
|
38
|
-
duration:
|
|
29
|
+
duration: "small",
|
|
39
30
|
enterFrom: enterFrom,
|
|
40
31
|
exitTo: enterFrom,
|
|
41
32
|
fade: "none",
|
|
@@ -56,7 +56,7 @@ export var Drawer = function Drawer(_ref2) {
|
|
|
56
56
|
action: 'dismissed',
|
|
57
57
|
componentName: 'drawer',
|
|
58
58
|
packageName: "@atlaskit/drawer",
|
|
59
|
-
packageVersion: "9.4.
|
|
59
|
+
packageVersion: "9.4.3",
|
|
60
60
|
analyticsData: {
|
|
61
61
|
trigger: 'escKey'
|
|
62
62
|
}
|
|
@@ -79,7 +79,7 @@ export var Drawer = function Drawer(_ref2) {
|
|
|
79
79
|
action: 'dismissed',
|
|
80
80
|
componentName: 'drawer',
|
|
81
81
|
packageName: "@atlaskit/drawer",
|
|
82
|
-
packageVersion: "9.4.
|
|
82
|
+
packageVersion: "9.4.3",
|
|
83
83
|
analyticsData: {
|
|
84
84
|
trigger: 'blanket'
|
|
85
85
|
}
|
|
@@ -91,7 +91,7 @@ export var Drawer = function Drawer(_ref2) {
|
|
|
91
91
|
action: 'dismissed',
|
|
92
92
|
componentName: 'drawer',
|
|
93
93
|
packageName: "@atlaskit/drawer",
|
|
94
|
-
packageVersion: "9.4.
|
|
94
|
+
packageVersion: "9.4.3",
|
|
95
95
|
analyticsData: {
|
|
96
96
|
trigger: 'backButton'
|
|
97
97
|
}
|
|
@@ -8,7 +8,7 @@ import React from 'react';
|
|
|
8
8
|
import { css, jsx } from '@emotion/react';
|
|
9
9
|
import AkBlanket from '@atlaskit/blanket';
|
|
10
10
|
import { ExitingPersistence, FadeIn } from '@atlaskit/motion';
|
|
11
|
-
import { animationTimingFunction
|
|
11
|
+
import { animationTimingFunction } from '../constants';
|
|
12
12
|
var blanketStyles = css({
|
|
13
13
|
position: 'relative'
|
|
14
14
|
});
|
|
@@ -29,7 +29,7 @@ var Blanket = function Blanket(_ref) {
|
|
|
29
29
|
*
|
|
30
30
|
* The fade out animation uses half the passed duration so it evens out.
|
|
31
31
|
*/, {
|
|
32
|
-
duration:
|
|
32
|
+
duration: "large"
|
|
33
33
|
/**
|
|
34
34
|
* We don't expose this on `FadeIn` but it does get passed down.
|
|
35
35
|
* TODO: figure out how we want to handle this...
|
|
@@ -61,7 +61,7 @@ var Drawer = function Drawer(_ref2) {
|
|
|
61
61
|
action: 'dismissed',
|
|
62
62
|
componentName: 'drawer',
|
|
63
63
|
packageName: "@atlaskit/drawer",
|
|
64
|
-
packageVersion: "9.4.
|
|
64
|
+
packageVersion: "9.4.3",
|
|
65
65
|
analyticsData: {
|
|
66
66
|
trigger: 'escKey'
|
|
67
67
|
}
|
|
@@ -84,7 +84,7 @@ var Drawer = function Drawer(_ref2) {
|
|
|
84
84
|
action: 'dismissed',
|
|
85
85
|
componentName: 'drawer',
|
|
86
86
|
packageName: "@atlaskit/drawer",
|
|
87
|
-
packageVersion: "9.4.
|
|
87
|
+
packageVersion: "9.4.3",
|
|
88
88
|
analyticsData: {
|
|
89
89
|
trigger: 'blanket'
|
|
90
90
|
}
|
|
@@ -96,7 +96,7 @@ var Drawer = function Drawer(_ref2) {
|
|
|
96
96
|
action: 'dismissed',
|
|
97
97
|
componentName: 'drawer',
|
|
98
98
|
packageName: "@atlaskit/drawer",
|
|
99
|
-
packageVersion: "9.4.
|
|
99
|
+
packageVersion: "9.4.3",
|
|
100
100
|
analyticsData: {
|
|
101
101
|
trigger: 'backButton'
|
|
102
102
|
}
|
|
@@ -13,10 +13,8 @@ import { useCallback, useRef } from 'react';
|
|
|
13
13
|
import { jsx } from '@emotion/react';
|
|
14
14
|
import { IconButton } from '@atlaskit/button/new';
|
|
15
15
|
import ArrowLeft from '@atlaskit/icon/core/migration/arrow-left';
|
|
16
|
-
import
|
|
17
|
-
import {
|
|
18
|
-
import { fg } from '@atlaskit/platform-feature-flags';
|
|
19
|
-
import { animationTimingFunction, transitionDurationMs } from '../../constants';
|
|
16
|
+
import { ExitingPersistence, SlideIn } from '@atlaskit/motion';
|
|
17
|
+
import { animationTimingFunction } from '../../constants';
|
|
20
18
|
import { createExtender } from '../utils';
|
|
21
19
|
import ContentOverrides from './content';
|
|
22
20
|
import DrawerWrapper from './drawer-wrapper';
|
|
@@ -38,18 +36,9 @@ var CustomSlideIn = function CustomSlideIn(_ref) {
|
|
|
38
36
|
var children = _ref.children,
|
|
39
37
|
onFinish = _ref.onFinish,
|
|
40
38
|
enterFrom = _ref.enterFrom;
|
|
41
|
-
var _useExitingPersistenc = useExitingPersistence(),
|
|
42
|
-
isExiting = _useExitingPersistenc.isExiting;
|
|
43
|
-
|
|
44
|
-
/**
|
|
45
|
-
* The actual duration should be the same for both enter and exit,
|
|
46
|
-
* but motion halves the passed duration for exit animations,
|
|
47
|
-
* so we double it when exiting.
|
|
48
|
-
*/
|
|
49
|
-
var duration = isExiting ? transitionDurationMs * 2 : transitionDurationMs;
|
|
50
39
|
return jsx(SlideIn, {
|
|
51
40
|
animationTimingFunction: animationTimingFunction,
|
|
52
|
-
duration:
|
|
41
|
+
duration: "small",
|
|
53
42
|
enterFrom: enterFrom,
|
|
54
43
|
exitTo: enterFrom,
|
|
55
44
|
fade: "none",
|
|
@@ -120,13 +109,10 @@ var DrawerPrimitive = function DrawerPrimitive(_ref2) {
|
|
|
120
109
|
testId: testId && 'DrawerPrimitiveSidebarCloseButton',
|
|
121
110
|
icon: Icon ? function (iconProps) {
|
|
122
111
|
return jsx(Icon, _extends({}, iconProps, {
|
|
123
|
-
size: "large"
|
|
124
|
-
|
|
125
|
-
|
|
126
|
-
|
|
127
|
-
} : fg('platform-visual-refresh-icon-ads-migration') ? ArrowLeft :
|
|
128
|
-
// eslint-disable-next-line @atlaskit/design-system/no-legacy-icons
|
|
129
|
-
ArrowLeftOld,
|
|
112
|
+
size: "large",
|
|
113
|
+
LEGACY_size: "large"
|
|
114
|
+
}));
|
|
115
|
+
} : ArrowLeft,
|
|
130
116
|
label: closeLabel,
|
|
131
117
|
shape: "circle",
|
|
132
118
|
appearance: "subtle"
|
package/dist/esm/constants.js
CHANGED
|
@@ -1,6 +1,4 @@
|
|
|
1
1
|
import { easeOut } from '@atlaskit/motion/curves';
|
|
2
|
-
export var transitionDuration = '0.22s';
|
|
3
|
-
export var transitionDurationMs = 220;
|
|
4
2
|
export var transitionTimingFunction = easeOut;
|
|
5
3
|
export var widths = ['narrow', 'medium', 'wide', 'extended', 'full'];
|
|
6
4
|
export var directions = ['top', 'right', 'bottom', 'left'];
|
|
@@ -1,8 +1,8 @@
|
|
|
1
|
-
|
|
1
|
+
import React from 'react';
|
|
2
2
|
import { type DrawerCloseButtonProps } from '../types';
|
|
3
3
|
/**
|
|
4
4
|
* __Drawer close button
|
|
5
5
|
*
|
|
6
6
|
* A button that closes the drawer.
|
|
7
7
|
*/
|
|
8
|
-
export declare const DrawerCloseButton: ({ icon: Icon, label, testId, }: DrawerCloseButtonProps) => JSX.Element;
|
|
8
|
+
export declare const DrawerCloseButton: ({ icon: Icon, label, testId, }: DrawerCloseButtonProps) => React.JSX.Element;
|
|
@@ -1,9 +1,9 @@
|
|
|
1
|
-
|
|
1
|
+
import React from 'react';
|
|
2
2
|
import { type FocusLockProps } from '../types';
|
|
3
3
|
/**
|
|
4
4
|
* __Focus lock__
|
|
5
5
|
*
|
|
6
6
|
* Thin wrapper around react-focus-lock.
|
|
7
7
|
*/
|
|
8
|
-
declare const FocusLock: ({ isFocusLockEnabled, autoFocusFirstElem, shouldReturnFocus, children, }: FocusLockProps) => JSX.Element;
|
|
8
|
+
declare const FocusLock: ({ isFocusLockEnabled, autoFocusFirstElem, shouldReturnFocus, children, }: FocusLockProps) => React.JSX.Element;
|
|
9
9
|
export default FocusLock;
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
|
|
1
|
+
import React from 'react';
|
|
2
2
|
import type { DrawerProps } from './types';
|
|
3
3
|
/**
|
|
4
4
|
* __Drawer__
|
|
@@ -9,4 +9,4 @@ import type { DrawerProps } from './types';
|
|
|
9
9
|
* - [Code](https://atlassian.design/components/drawer/code)
|
|
10
10
|
* - [Usage](https://atlassian.design/components/drawer/usage)
|
|
11
11
|
*/
|
|
12
|
-
export declare const Drawer: ({ width, isOpen, isFocusLockEnabled, shouldReturnFocus, autoFocusFirstElem, onKeyDown, testId, children, onClose, onCloseComplete, onOpenComplete, zIndex, label, titleId, enterFrom, }: DrawerProps) => JSX.Element | null;
|
|
12
|
+
export declare const Drawer: ({ width, isOpen, isFocusLockEnabled, shouldReturnFocus, autoFocusFirstElem, onKeyDown, testId, children, onClose, onCloseComplete, onOpenComplete, zIndex, label, titleId, enterFrom, }: DrawerProps) => React.JSX.Element | null;
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
|
|
1
|
+
import React from 'react';
|
|
2
2
|
import { type DrawerProps } from './types';
|
|
3
3
|
/**
|
|
4
4
|
* __Drawer__
|
|
@@ -9,5 +9,5 @@ import { type DrawerProps } from './types';
|
|
|
9
9
|
* - [Code](https://atlassian.design/components/drawer/code)
|
|
10
10
|
* - [Usage](https://atlassian.design/components/drawer/usage)
|
|
11
11
|
*/
|
|
12
|
-
declare const Drawer: ({ width, isOpen, isFocusLockEnabled, shouldReturnFocus, autoFocusFirstElem, onKeyDown, onClose, testId, children, icon, closeLabel, scrollContentLabel, onCloseComplete, onOpenComplete, overrides, zIndex, label, titleId, enterFrom, }: DrawerProps) => JSX.Element | null;
|
|
12
|
+
declare const Drawer: ({ width, isOpen, isFocusLockEnabled, shouldReturnFocus, autoFocusFirstElem, onKeyDown, onClose, testId, children, icon, closeLabel, scrollContentLabel, onCloseComplete, onOpenComplete, overrides, zIndex, label, titleId, enterFrom, }: DrawerProps) => React.JSX.Element | null;
|
|
13
13
|
export default Drawer;
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
|
|
1
|
+
import React from 'react';
|
|
2
2
|
import { type FocusLockProps } from '../types';
|
|
3
3
|
/**
|
|
4
4
|
* __Focus lock__
|
|
@@ -6,5 +6,5 @@ import { type FocusLockProps } from '../types';
|
|
|
6
6
|
* Thin wrapper over react-focus-lock. This wrapper only exists to ensure API compatibility.
|
|
7
7
|
* This component should be deleted during https://ecosystem.atlassian.net/browse/AK-5658
|
|
8
8
|
*/
|
|
9
|
-
declare const FocusLock: ({ isFocusLockEnabled, autoFocusFirstElem, shouldReturnFocus, children, }: FocusLockProps) => JSX.Element;
|
|
9
|
+
declare const FocusLock: ({ isFocusLockEnabled, autoFocusFirstElem, shouldReturnFocus, children, }: FocusLockProps) => React.JSX.Element;
|
|
10
10
|
export default FocusLock;
|
|
@@ -1,7 +1,5 @@
|
|
|
1
1
|
import type { Direction } from '@atlaskit/motion';
|
|
2
2
|
import type { DrawerWidth, FocusLockSettings } from './components/types';
|
|
3
|
-
export declare const transitionDuration = "0.22s";
|
|
4
|
-
export declare const transitionDurationMs = 220;
|
|
5
3
|
export declare const transitionTimingFunction: import("@atlaskit/motion/curves").AnimationCurve;
|
|
6
4
|
export declare const widths: DrawerWidth[];
|
|
7
5
|
export declare const directions: Direction[];
|
|
@@ -1,8 +1,8 @@
|
|
|
1
|
-
|
|
1
|
+
import React from 'react';
|
|
2
2
|
import { type DrawerCloseButtonProps } from '../types';
|
|
3
3
|
/**
|
|
4
4
|
* __Drawer close button
|
|
5
5
|
*
|
|
6
6
|
* A button that closes the drawer.
|
|
7
7
|
*/
|
|
8
|
-
export declare const DrawerCloseButton: ({ icon: Icon, label, testId, }: DrawerCloseButtonProps) => JSX.Element;
|
|
8
|
+
export declare const DrawerCloseButton: ({ icon: Icon, label, testId, }: DrawerCloseButtonProps) => React.JSX.Element;
|
|
@@ -1,9 +1,9 @@
|
|
|
1
|
-
|
|
1
|
+
import React from 'react';
|
|
2
2
|
import { type FocusLockProps } from '../types';
|
|
3
3
|
/**
|
|
4
4
|
* __Focus lock__
|
|
5
5
|
*
|
|
6
6
|
* Thin wrapper around react-focus-lock.
|
|
7
7
|
*/
|
|
8
|
-
declare const FocusLock: ({ isFocusLockEnabled, autoFocusFirstElem, shouldReturnFocus, children, }: FocusLockProps) => JSX.Element;
|
|
8
|
+
declare const FocusLock: ({ isFocusLockEnabled, autoFocusFirstElem, shouldReturnFocus, children, }: FocusLockProps) => React.JSX.Element;
|
|
9
9
|
export default FocusLock;
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
|
|
1
|
+
import React from 'react';
|
|
2
2
|
import type { DrawerProps } from './types';
|
|
3
3
|
/**
|
|
4
4
|
* __Drawer__
|
|
@@ -9,4 +9,4 @@ import type { DrawerProps } from './types';
|
|
|
9
9
|
* - [Code](https://atlassian.design/components/drawer/code)
|
|
10
10
|
* - [Usage](https://atlassian.design/components/drawer/usage)
|
|
11
11
|
*/
|
|
12
|
-
export declare const Drawer: ({ width, isOpen, isFocusLockEnabled, shouldReturnFocus, autoFocusFirstElem, onKeyDown, testId, children, onClose, onCloseComplete, onOpenComplete, zIndex, label, titleId, enterFrom, }: DrawerProps) => JSX.Element | null;
|
|
12
|
+
export declare const Drawer: ({ width, isOpen, isFocusLockEnabled, shouldReturnFocus, autoFocusFirstElem, onKeyDown, testId, children, onClose, onCloseComplete, onOpenComplete, zIndex, label, titleId, enterFrom, }: DrawerProps) => React.JSX.Element | null;
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
|
|
1
|
+
import React from 'react';
|
|
2
2
|
import { type DrawerProps } from './types';
|
|
3
3
|
/**
|
|
4
4
|
* __Drawer__
|
|
@@ -9,5 +9,5 @@ import { type DrawerProps } from './types';
|
|
|
9
9
|
* - [Code](https://atlassian.design/components/drawer/code)
|
|
10
10
|
* - [Usage](https://atlassian.design/components/drawer/usage)
|
|
11
11
|
*/
|
|
12
|
-
declare const Drawer: ({ width, isOpen, isFocusLockEnabled, shouldReturnFocus, autoFocusFirstElem, onKeyDown, onClose, testId, children, icon, closeLabel, scrollContentLabel, onCloseComplete, onOpenComplete, overrides, zIndex, label, titleId, enterFrom, }: DrawerProps) => JSX.Element | null;
|
|
12
|
+
declare const Drawer: ({ width, isOpen, isFocusLockEnabled, shouldReturnFocus, autoFocusFirstElem, onKeyDown, onClose, testId, children, icon, closeLabel, scrollContentLabel, onCloseComplete, onOpenComplete, overrides, zIndex, label, titleId, enterFrom, }: DrawerProps) => React.JSX.Element | null;
|
|
13
13
|
export default Drawer;
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
|
|
1
|
+
import React from 'react';
|
|
2
2
|
import { type FocusLockProps } from '../types';
|
|
3
3
|
/**
|
|
4
4
|
* __Focus lock__
|
|
@@ -6,5 +6,5 @@ import { type FocusLockProps } from '../types';
|
|
|
6
6
|
* Thin wrapper over react-focus-lock. This wrapper only exists to ensure API compatibility.
|
|
7
7
|
* This component should be deleted during https://ecosystem.atlassian.net/browse/AK-5658
|
|
8
8
|
*/
|
|
9
|
-
declare const FocusLock: ({ isFocusLockEnabled, autoFocusFirstElem, shouldReturnFocus, children, }: FocusLockProps) => JSX.Element;
|
|
9
|
+
declare const FocusLock: ({ isFocusLockEnabled, autoFocusFirstElem, shouldReturnFocus, children, }: FocusLockProps) => React.JSX.Element;
|
|
10
10
|
export default FocusLock;
|
|
@@ -1,7 +1,5 @@
|
|
|
1
1
|
import type { Direction } from '@atlaskit/motion';
|
|
2
2
|
import type { DrawerWidth, FocusLockSettings } from './components/types';
|
|
3
|
-
export declare const transitionDuration = "0.22s";
|
|
4
|
-
export declare const transitionDurationMs = 220;
|
|
5
3
|
export declare const transitionTimingFunction: import("@atlaskit/motion/curves").AnimationCurve;
|
|
6
4
|
export declare const widths: DrawerWidth[];
|
|
7
5
|
export declare const directions: Direction[];
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@atlaskit/drawer",
|
|
3
|
-
"version": "9.4.
|
|
3
|
+
"version": "9.4.3",
|
|
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/"
|
|
@@ -58,14 +58,14 @@
|
|
|
58
58
|
"dependencies": {
|
|
59
59
|
"@atlaskit/analytics-next": "^10.3.0",
|
|
60
60
|
"@atlaskit/blanket": "^14.1.0",
|
|
61
|
-
"@atlaskit/button": "^20.
|
|
61
|
+
"@atlaskit/button": "^20.5.0",
|
|
62
62
|
"@atlaskit/css": "^0.8.0",
|
|
63
|
-
"@atlaskit/icon": "^23.
|
|
63
|
+
"@atlaskit/icon": "^23.8.0",
|
|
64
64
|
"@atlaskit/layering": "^1.1.0",
|
|
65
|
-
"@atlaskit/motion": "^
|
|
65
|
+
"@atlaskit/motion": "^2.0.0",
|
|
66
66
|
"@atlaskit/platform-feature-flags": "^1.0.0",
|
|
67
67
|
"@atlaskit/portal": "^4.11.0",
|
|
68
|
-
"@atlaskit/theme": "^
|
|
68
|
+
"@atlaskit/theme": "^15.0.0",
|
|
69
69
|
"@atlaskit/tokens": "^3.3.0",
|
|
70
70
|
"@babel/runtime": "^7.0.0",
|
|
71
71
|
"@compiled/react": "^0.18.1",
|
|
@@ -93,10 +93,9 @@
|
|
|
93
93
|
"@atlaskit/link": "*",
|
|
94
94
|
"@atlaskit/menu": "^2.14.0",
|
|
95
95
|
"@atlaskit/modal-dialog": "^12.20.0",
|
|
96
|
-
"@atlaskit/primitives": "^13.
|
|
96
|
+
"@atlaskit/primitives": "^13.5.0",
|
|
97
97
|
"@atlaskit/section-message": "*",
|
|
98
98
|
"@atlaskit/ssr": "*",
|
|
99
|
-
"@atlaskit/visual-regression": "*",
|
|
100
99
|
"@testing-library/react": "^13.4.0",
|
|
101
100
|
"@testing-library/user-event": "^14.4.3",
|
|
102
101
|
"@types/exenv": "^1.2.0",
|
|
@@ -104,11 +103,6 @@
|
|
|
104
103
|
"react-lorem-component": "^0.13.0",
|
|
105
104
|
"typescript": "~5.4.2"
|
|
106
105
|
},
|
|
107
|
-
"platform-feature-flags": {
|
|
108
|
-
"platform-visual-refresh-icon-ads-migration": {
|
|
109
|
-
"type": "boolean"
|
|
110
|
-
}
|
|
111
|
-
},
|
|
112
106
|
"techstack": {
|
|
113
107
|
"@atlassian/frontend": {
|
|
114
108
|
"import-structure": "atlassian-conventions"
|