@atlaskit/drawer 9.4.2 → 9.4.4
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 +16 -0
- package/dist/cjs/compiled/blanket.js +3 -7
- package/dist/cjs/compiled/drawer-panel/drawer-panel.js +2 -12
- package/dist/cjs/compiled/drawer.js +3 -3
- package/dist/cjs/components/blanket.js +2 -3
- package/dist/cjs/components/index.js +3 -3
- package/dist/cjs/components/primitives/index.js +2 -12
- package/dist/cjs/constants.js +1 -8
- package/dist/es2019/compiled/blanket.js +3 -7
- package/dist/es2019/compiled/drawer-panel/drawer-panel.js +3 -14
- package/dist/es2019/compiled/drawer.js +3 -3
- package/dist/es2019/components/blanket.js +2 -3
- package/dist/es2019/components/index.js +3 -3
- package/dist/es2019/components/primitives/index.js +3 -14
- package/dist/es2019/constants.js +0 -5
- package/dist/esm/compiled/blanket.js +3 -7
- package/dist/esm/compiled/drawer-panel/drawer-panel.js +3 -13
- package/dist/esm/compiled/drawer.js +3 -3
- package/dist/esm/components/blanket.js +2 -3
- package/dist/esm/components/index.js +3 -3
- package/dist/esm/components/primitives/index.js +3 -13
- package/dist/esm/constants.js +0 -7
- package/dist/types/constants.d.ts +0 -4
- package/dist/types-ts4.5/constants.d.ts +0 -4
- package/package.json +4 -4
- package/dist/cjs/compiled/constants.js +0 -12
- package/dist/es2019/compiled/constants.js +0 -4
- package/dist/esm/compiled/constants.js +0 -6
- package/dist/types/compiled/constants.d.ts +0 -3
- package/dist/types-ts4.5/compiled/constants.d.ts +0 -3
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,21 @@
|
|
|
1
1
|
# @atlaskit/drawer
|
|
2
2
|
|
|
3
|
+
## 9.4.4
|
|
4
|
+
|
|
5
|
+
### Patch Changes
|
|
6
|
+
|
|
7
|
+
- [#114382](https://stash.atlassian.com/projects/CONFCLOUD/repos/confluence-frontend/pull-requests/114382)
|
|
8
|
+
[`5033cb80b3765`](https://stash.atlassian.com/projects/CONFCLOUD/repos/confluence-frontend/commits/5033cb80b3765) -
|
|
9
|
+
Updates internal animation logic to leverage static animation timing names, rather than arbitrary
|
|
10
|
+
values.
|
|
11
|
+
- Updated dependencies
|
|
12
|
+
|
|
13
|
+
## 9.4.3
|
|
14
|
+
|
|
15
|
+
### Patch Changes
|
|
16
|
+
|
|
17
|
+
- Updated dependencies
|
|
18
|
+
|
|
3
19
|
## 9.4.2
|
|
4
20
|
|
|
5
21
|
### Patch Changes
|
|
@@ -11,7 +11,6 @@ var _runtime = require("@compiled/react/runtime");
|
|
|
11
11
|
var _react = _interopRequireDefault(require("react"));
|
|
12
12
|
var _blanket = _interopRequireDefault(require("@atlaskit/blanket"));
|
|
13
13
|
var _motion = require("@atlaskit/motion");
|
|
14
|
-
var _constants = require("../constants");
|
|
15
14
|
var styles = {
|
|
16
15
|
blanket: "_kqswh2mm"
|
|
17
16
|
};
|
|
@@ -26,20 +25,17 @@ var Blanket = function Blanket(_ref) {
|
|
|
26
25
|
return /*#__PURE__*/_react.default.createElement(_motion.ExitingPersistence, {
|
|
27
26
|
appear: true
|
|
28
27
|
}, 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
|
-
*
|
|
28
|
+
/*
|
|
33
29
|
* The fade out animation uses half the passed duration so it evens out.
|
|
34
30
|
*/, {
|
|
35
|
-
duration:
|
|
31
|
+
duration: "large"
|
|
36
32
|
/**
|
|
37
33
|
* We don't expose this on `FadeIn` but it does get passed down.
|
|
38
34
|
* TODO: figure out how we want to handle this...
|
|
39
35
|
*/
|
|
40
36
|
// @ts-ignore
|
|
41
37
|
,
|
|
42
|
-
animationTimingFunction:
|
|
38
|
+
animationTimingFunction: "ease-out"
|
|
43
39
|
}, function (_ref2) {
|
|
44
40
|
var className = _ref2.className;
|
|
45
41
|
return /*#__PURE__*/_react.default.createElement("div", {
|
|
@@ -12,7 +12,6 @@ var _react = _interopRequireWildcard(require("react"));
|
|
|
12
12
|
var React = _react;
|
|
13
13
|
var _runtime = require("@compiled/react/runtime");
|
|
14
14
|
var _motion = require("@atlaskit/motion");
|
|
15
|
-
var _constants = require("../../constants");
|
|
16
15
|
var _context = require("../../context");
|
|
17
16
|
var _focusLock = _interopRequireDefault(require("./focus-lock"));
|
|
18
17
|
function _getRequireWildcardCache(e) { if ("function" != typeof WeakMap) return null; var r = new WeakMap(), t = new WeakMap(); return (_getRequireWildcardCache = function _getRequireWildcardCache(e) { return e ? t : r; })(e); }
|
|
@@ -34,18 +33,9 @@ var CustomSlideIn = function CustomSlideIn(_ref) {
|
|
|
34
33
|
var children = _ref.children,
|
|
35
34
|
onFinish = _ref.onFinish,
|
|
36
35
|
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
36
|
return /*#__PURE__*/React.createElement(_motion.SlideIn, {
|
|
47
|
-
animationTimingFunction:
|
|
48
|
-
duration:
|
|
37
|
+
animationTimingFunction: "ease-out",
|
|
38
|
+
duration: "small",
|
|
49
39
|
enterFrom: enterFrom,
|
|
50
40
|
exitTo: enterFrom,
|
|
51
41
|
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.4",
|
|
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.4",
|
|
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.4",
|
|
106
106
|
analyticsData: {
|
|
107
107
|
trigger: 'backButton'
|
|
108
108
|
}
|
|
@@ -9,7 +9,6 @@ var _react = _interopRequireDefault(require("react"));
|
|
|
9
9
|
var _react2 = require("@emotion/react");
|
|
10
10
|
var _blanket = _interopRequireDefault(require("@atlaskit/blanket"));
|
|
11
11
|
var _motion = require("@atlaskit/motion");
|
|
12
|
-
var _constants = require("../constants");
|
|
13
12
|
/**
|
|
14
13
|
* @jsxRuntime classic
|
|
15
14
|
* @jsx jsx
|
|
@@ -37,14 +36,14 @@ var Blanket = function Blanket(_ref) {
|
|
|
37
36
|
*
|
|
38
37
|
* The fade out animation uses half the passed duration so it evens out.
|
|
39
38
|
*/, {
|
|
40
|
-
duration:
|
|
39
|
+
duration: "large"
|
|
41
40
|
/**
|
|
42
41
|
* We don't expose this on `FadeIn` but it does get passed down.
|
|
43
42
|
* TODO: figure out how we want to handle this...
|
|
44
43
|
*/
|
|
45
44
|
// @ts-ignore
|
|
46
45
|
,
|
|
47
|
-
animationTimingFunction:
|
|
46
|
+
animationTimingFunction: "ease-out"
|
|
48
47
|
}, function (_ref2) {
|
|
49
48
|
var className = _ref2.className;
|
|
50
49
|
return (
|
|
@@ -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.4",
|
|
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.4",
|
|
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.4",
|
|
111
111
|
analyticsData: {
|
|
112
112
|
trigger: 'backButton'
|
|
113
113
|
}
|
|
@@ -12,7 +12,6 @@ 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
14
|
var _motion = require("@atlaskit/motion");
|
|
15
|
-
var _constants = require("../../constants");
|
|
16
15
|
var _utils = require("../utils");
|
|
17
16
|
var _content = _interopRequireDefault(require("./content"));
|
|
18
17
|
var _drawerWrapper = _interopRequireDefault(require("./drawer-wrapper"));
|
|
@@ -40,18 +39,9 @@ var CustomSlideIn = function CustomSlideIn(_ref) {
|
|
|
40
39
|
var children = _ref.children,
|
|
41
40
|
onFinish = _ref.onFinish,
|
|
42
41
|
enterFrom = _ref.enterFrom;
|
|
43
|
-
var _useExitingPersistenc = (0, _motion.useExitingPersistence)(),
|
|
44
|
-
isExiting = _useExitingPersistenc.isExiting;
|
|
45
|
-
|
|
46
|
-
/**
|
|
47
|
-
* The actual duration should be the same for both enter and exit,
|
|
48
|
-
* but motion halves the passed duration for exit animations,
|
|
49
|
-
* so we double it when exiting.
|
|
50
|
-
*/
|
|
51
|
-
var duration = isExiting ? _constants.transitionDurationMs * 2 : _constants.transitionDurationMs;
|
|
52
42
|
return (0, _react2.jsx)(_motion.SlideIn, {
|
|
53
|
-
animationTimingFunction:
|
|
54
|
-
duration:
|
|
43
|
+
animationTimingFunction: "ease-out",
|
|
44
|
+
duration: "small",
|
|
55
45
|
enterFrom: enterFrom,
|
|
56
46
|
exitTo: enterFrom,
|
|
57
47
|
fade: "none",
|
package/dist/cjs/constants.js
CHANGED
|
@@ -3,16 +3,9 @@
|
|
|
3
3
|
Object.defineProperty(exports, "__esModule", {
|
|
4
4
|
value: true
|
|
5
5
|
});
|
|
6
|
-
exports.widths = exports.
|
|
7
|
-
var _curves = require("@atlaskit/motion/curves");
|
|
8
|
-
var transitionDuration = exports.transitionDuration = '0.22s';
|
|
9
|
-
var transitionDurationMs = exports.transitionDurationMs = 220;
|
|
10
|
-
var transitionTimingFunction = exports.transitionTimingFunction = _curves.easeOut;
|
|
6
|
+
exports.widths = exports.directions = exports.defaultFocusLockSettings = void 0;
|
|
11
7
|
var widths = exports.widths = ['narrow', 'medium', 'wide', 'extended', 'full'];
|
|
12
8
|
var directions = exports.directions = ['top', 'right', 'bottom', 'left'];
|
|
13
|
-
var animationTimingFunction = exports.animationTimingFunction = function animationTimingFunction() {
|
|
14
|
-
return _curves.easeOut;
|
|
15
|
-
};
|
|
16
9
|
var defaultFocusLockSettings = exports.defaultFocusLockSettings = {
|
|
17
10
|
isFocusLockEnabled: true,
|
|
18
11
|
shouldReturnFocus: true,
|
|
@@ -4,7 +4,6 @@ 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, transitionDurationMs } from '../constants';
|
|
8
7
|
const styles = {
|
|
9
8
|
blanket: "_kqswh2mm"
|
|
10
9
|
};
|
|
@@ -20,20 +19,17 @@ const Blanket = ({
|
|
|
20
19
|
return /*#__PURE__*/React.createElement(ExitingPersistence, {
|
|
21
20
|
appear: true
|
|
22
21
|
}, isOpen && /*#__PURE__*/React.createElement(FadeIn
|
|
23
|
-
|
|
24
|
-
* We double the duration because the fade in keyframes have
|
|
25
|
-
* `opacity: 1` at `50%`.
|
|
26
|
-
*
|
|
22
|
+
/*
|
|
27
23
|
* The fade out animation uses half the passed duration so it evens out.
|
|
28
24
|
*/, {
|
|
29
|
-
duration:
|
|
25
|
+
duration: "large"
|
|
30
26
|
/**
|
|
31
27
|
* We don't expose this on `FadeIn` but it does get passed down.
|
|
32
28
|
* TODO: figure out how we want to handle this...
|
|
33
29
|
*/
|
|
34
30
|
// @ts-ignore
|
|
35
31
|
,
|
|
36
|
-
animationTimingFunction:
|
|
32
|
+
animationTimingFunction: "ease-out"
|
|
37
33
|
}, ({
|
|
38
34
|
className
|
|
39
35
|
}) => /*#__PURE__*/React.createElement("div", {
|
|
@@ -3,8 +3,7 @@ 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, transitionDurationMs } from '../../constants';
|
|
6
|
+
import { ExitingPersistence, SlideIn } from '@atlaskit/motion';
|
|
8
7
|
import { EnsureIsInsideDrawerContext, OnCloseContext } from '../../context';
|
|
9
8
|
import FocusLock from './focus-lock';
|
|
10
9
|
const LOCAL_CURRENT_SURFACE_CSS_VAR = '--ds-elevation-surface-current';
|
|
@@ -25,19 +24,9 @@ const CustomSlideIn = ({
|
|
|
25
24
|
onFinish,
|
|
26
25
|
enterFrom
|
|
27
26
|
}) => {
|
|
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
27
|
return /*#__PURE__*/React.createElement(SlideIn, {
|
|
39
|
-
animationTimingFunction:
|
|
40
|
-
duration:
|
|
28
|
+
animationTimingFunction: "ease-out",
|
|
29
|
+
duration: "small",
|
|
41
30
|
enterFrom: enterFrom,
|
|
42
31
|
exitTo: enterFrom,
|
|
43
32
|
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.4",
|
|
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.4",
|
|
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.4",
|
|
86
86
|
analyticsData: {
|
|
87
87
|
trigger: 'backButton'
|
|
88
88
|
}
|
|
@@ -8,7 +8,6 @@ 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, transitionDurationMs } from '../constants';
|
|
12
11
|
const blanketStyles = css({
|
|
13
12
|
position: 'relative'
|
|
14
13
|
});
|
|
@@ -30,14 +29,14 @@ const Blanket = ({
|
|
|
30
29
|
*
|
|
31
30
|
* The fade out animation uses half the passed duration so it evens out.
|
|
32
31
|
*/, {
|
|
33
|
-
duration:
|
|
32
|
+
duration: "large"
|
|
34
33
|
/**
|
|
35
34
|
* We don't expose this on `FadeIn` but it does get passed down.
|
|
36
35
|
* TODO: figure out how we want to handle this...
|
|
37
36
|
*/
|
|
38
37
|
// @ts-ignore
|
|
39
38
|
,
|
|
40
|
-
animationTimingFunction:
|
|
39
|
+
animationTimingFunction: "ease-out"
|
|
41
40
|
}, ({
|
|
42
41
|
className
|
|
43
42
|
}) =>
|
|
@@ -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.4",
|
|
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.4",
|
|
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.4",
|
|
92
92
|
analyticsData: {
|
|
93
93
|
trigger: 'backButton'
|
|
94
94
|
}
|
|
@@ -10,8 +10,7 @@ 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 { ExitingPersistence, SlideIn
|
|
14
|
-
import { animationTimingFunction, transitionDurationMs } from '../../constants';
|
|
13
|
+
import { ExitingPersistence, SlideIn } from '@atlaskit/motion';
|
|
15
14
|
import { createExtender } from '../utils';
|
|
16
15
|
import ContentOverrides from './content';
|
|
17
16
|
import DrawerWrapper from './drawer-wrapper';
|
|
@@ -34,19 +33,9 @@ const CustomSlideIn = ({
|
|
|
34
33
|
onFinish,
|
|
35
34
|
enterFrom
|
|
36
35
|
}) => {
|
|
37
|
-
const {
|
|
38
|
-
isExiting
|
|
39
|
-
} = useExitingPersistence();
|
|
40
|
-
|
|
41
|
-
/**
|
|
42
|
-
* The actual duration should be the same for both enter and exit,
|
|
43
|
-
* but motion halves the passed duration for exit animations,
|
|
44
|
-
* so we double it when exiting.
|
|
45
|
-
*/
|
|
46
|
-
const duration = isExiting ? transitionDurationMs * 2 : transitionDurationMs;
|
|
47
36
|
return jsx(SlideIn, {
|
|
48
|
-
animationTimingFunction:
|
|
49
|
-
duration:
|
|
37
|
+
animationTimingFunction: "ease-out",
|
|
38
|
+
duration: "small",
|
|
50
39
|
enterFrom: enterFrom,
|
|
51
40
|
exitTo: enterFrom,
|
|
52
41
|
fade: "none",
|
package/dist/es2019/constants.js
CHANGED
|
@@ -1,10 +1,5 @@
|
|
|
1
|
-
import { easeOut } from '@atlaskit/motion/curves';
|
|
2
|
-
export const transitionDuration = '0.22s';
|
|
3
|
-
export const transitionDurationMs = 220;
|
|
4
|
-
export const transitionTimingFunction = easeOut;
|
|
5
1
|
export const widths = ['narrow', 'medium', 'wide', 'extended', 'full'];
|
|
6
2
|
export const directions = ['top', 'right', 'bottom', 'left'];
|
|
7
|
-
export const animationTimingFunction = () => easeOut;
|
|
8
3
|
export const defaultFocusLockSettings = {
|
|
9
4
|
isFocusLockEnabled: true,
|
|
10
5
|
shouldReturnFocus: true,
|
|
@@ -4,7 +4,6 @@ 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, transitionDurationMs } from '../constants';
|
|
8
7
|
var styles = {
|
|
9
8
|
blanket: "_kqswh2mm"
|
|
10
9
|
};
|
|
@@ -19,20 +18,17 @@ var Blanket = function Blanket(_ref) {
|
|
|
19
18
|
return /*#__PURE__*/React.createElement(ExitingPersistence, {
|
|
20
19
|
appear: true
|
|
21
20
|
}, isOpen && /*#__PURE__*/React.createElement(FadeIn
|
|
22
|
-
|
|
23
|
-
* We double the duration because the fade in keyframes have
|
|
24
|
-
* `opacity: 1` at `50%`.
|
|
25
|
-
*
|
|
21
|
+
/*
|
|
26
22
|
* The fade out animation uses half the passed duration so it evens out.
|
|
27
23
|
*/, {
|
|
28
|
-
duration:
|
|
24
|
+
duration: "large"
|
|
29
25
|
/**
|
|
30
26
|
* We don't expose this on `FadeIn` but it does get passed down.
|
|
31
27
|
* TODO: figure out how we want to handle this...
|
|
32
28
|
*/
|
|
33
29
|
// @ts-ignore
|
|
34
30
|
,
|
|
35
|
-
animationTimingFunction:
|
|
31
|
+
animationTimingFunction: "ease-out"
|
|
36
32
|
}, function (_ref2) {
|
|
37
33
|
var className = _ref2.className;
|
|
38
34
|
return /*#__PURE__*/React.createElement("div", {
|
|
@@ -3,8 +3,7 @@ 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, transitionDurationMs } from '../../constants';
|
|
6
|
+
import { ExitingPersistence, SlideIn } from '@atlaskit/motion';
|
|
8
7
|
import { EnsureIsInsideDrawerContext, OnCloseContext } from '../../context';
|
|
9
8
|
import FocusLock from './focus-lock';
|
|
10
9
|
var LOCAL_CURRENT_SURFACE_CSS_VAR = '--ds-elevation-surface-current';
|
|
@@ -24,18 +23,9 @@ var CustomSlideIn = function CustomSlideIn(_ref) {
|
|
|
24
23
|
var children = _ref.children,
|
|
25
24
|
onFinish = _ref.onFinish,
|
|
26
25
|
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
26
|
return /*#__PURE__*/React.createElement(SlideIn, {
|
|
37
|
-
animationTimingFunction:
|
|
38
|
-
duration:
|
|
27
|
+
animationTimingFunction: "ease-out",
|
|
28
|
+
duration: "small",
|
|
39
29
|
enterFrom: enterFrom,
|
|
40
30
|
exitTo: enterFrom,
|
|
41
31
|
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.4",
|
|
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.4",
|
|
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.4",
|
|
95
95
|
analyticsData: {
|
|
96
96
|
trigger: 'backButton'
|
|
97
97
|
}
|
|
@@ -8,7 +8,6 @@ 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, transitionDurationMs } from '../constants';
|
|
12
11
|
var blanketStyles = css({
|
|
13
12
|
position: 'relative'
|
|
14
13
|
});
|
|
@@ -29,14 +28,14 @@ var Blanket = function Blanket(_ref) {
|
|
|
29
28
|
*
|
|
30
29
|
* The fade out animation uses half the passed duration so it evens out.
|
|
31
30
|
*/, {
|
|
32
|
-
duration:
|
|
31
|
+
duration: "large"
|
|
33
32
|
/**
|
|
34
33
|
* We don't expose this on `FadeIn` but it does get passed down.
|
|
35
34
|
* TODO: figure out how we want to handle this...
|
|
36
35
|
*/
|
|
37
36
|
// @ts-ignore
|
|
38
37
|
,
|
|
39
|
-
animationTimingFunction:
|
|
38
|
+
animationTimingFunction: "ease-out"
|
|
40
39
|
}, function (_ref2) {
|
|
41
40
|
var className = _ref2.className;
|
|
42
41
|
return (
|
|
@@ -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.4",
|
|
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.4",
|
|
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.4",
|
|
100
100
|
analyticsData: {
|
|
101
101
|
trigger: 'backButton'
|
|
102
102
|
}
|
|
@@ -13,8 +13,7 @@ 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 { ExitingPersistence, SlideIn
|
|
17
|
-
import { animationTimingFunction, transitionDurationMs } from '../../constants';
|
|
16
|
+
import { ExitingPersistence, SlideIn } from '@atlaskit/motion';
|
|
18
17
|
import { createExtender } from '../utils';
|
|
19
18
|
import ContentOverrides from './content';
|
|
20
19
|
import DrawerWrapper from './drawer-wrapper';
|
|
@@ -36,18 +35,9 @@ var CustomSlideIn = function CustomSlideIn(_ref) {
|
|
|
36
35
|
var children = _ref.children,
|
|
37
36
|
onFinish = _ref.onFinish,
|
|
38
37
|
enterFrom = _ref.enterFrom;
|
|
39
|
-
var _useExitingPersistenc = useExitingPersistence(),
|
|
40
|
-
isExiting = _useExitingPersistenc.isExiting;
|
|
41
|
-
|
|
42
|
-
/**
|
|
43
|
-
* The actual duration should be the same for both enter and exit,
|
|
44
|
-
* but motion halves the passed duration for exit animations,
|
|
45
|
-
* so we double it when exiting.
|
|
46
|
-
*/
|
|
47
|
-
var duration = isExiting ? transitionDurationMs * 2 : transitionDurationMs;
|
|
48
38
|
return jsx(SlideIn, {
|
|
49
|
-
animationTimingFunction:
|
|
50
|
-
duration:
|
|
39
|
+
animationTimingFunction: "ease-out",
|
|
40
|
+
duration: "small",
|
|
51
41
|
enterFrom: enterFrom,
|
|
52
42
|
exitTo: enterFrom,
|
|
53
43
|
fade: "none",
|
package/dist/esm/constants.js
CHANGED
|
@@ -1,12 +1,5 @@
|
|
|
1
|
-
import { easeOut } from '@atlaskit/motion/curves';
|
|
2
|
-
export var transitionDuration = '0.22s';
|
|
3
|
-
export var transitionDurationMs = 220;
|
|
4
|
-
export var transitionTimingFunction = easeOut;
|
|
5
1
|
export var widths = ['narrow', 'medium', 'wide', 'extended', 'full'];
|
|
6
2
|
export var directions = ['top', 'right', 'bottom', 'left'];
|
|
7
|
-
export var animationTimingFunction = function animationTimingFunction() {
|
|
8
|
-
return easeOut;
|
|
9
|
-
};
|
|
10
3
|
export var defaultFocusLockSettings = {
|
|
11
4
|
isFocusLockEnabled: true,
|
|
12
5
|
shouldReturnFocus: true,
|
|
@@ -1,9 +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
|
-
export declare const transitionTimingFunction: import("@atlaskit/motion/curves").AnimationCurve;
|
|
6
3
|
export declare const widths: DrawerWidth[];
|
|
7
4
|
export declare const directions: Direction[];
|
|
8
|
-
export declare const animationTimingFunction: () => import("@atlaskit/motion/curves").AnimationCurve;
|
|
9
5
|
export declare const defaultFocusLockSettings: FocusLockSettings;
|
|
@@ -1,9 +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
|
-
export declare const transitionTimingFunction: import("@atlaskit/motion/curves").AnimationCurve;
|
|
6
3
|
export declare const widths: DrawerWidth[];
|
|
7
4
|
export declare const directions: Direction[];
|
|
8
|
-
export declare const animationTimingFunction: () => import("@atlaskit/motion/curves").AnimationCurve;
|
|
9
5
|
export declare const defaultFocusLockSettings: FocusLockSettings;
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@atlaskit/drawer",
|
|
3
|
-
"version": "9.4.
|
|
3
|
+
"version": "9.4.4",
|
|
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/"
|
|
@@ -60,9 +60,9 @@
|
|
|
60
60
|
"@atlaskit/blanket": "^14.1.0",
|
|
61
61
|
"@atlaskit/button": "^20.5.0",
|
|
62
62
|
"@atlaskit/css": "^0.8.0",
|
|
63
|
-
"@atlaskit/icon": "^23.
|
|
63
|
+
"@atlaskit/icon": "^23.9.0",
|
|
64
64
|
"@atlaskit/layering": "^1.1.0",
|
|
65
|
-
"@atlaskit/motion": "^
|
|
65
|
+
"@atlaskit/motion": "^3.0.0",
|
|
66
66
|
"@atlaskit/platform-feature-flags": "^1.0.0",
|
|
67
67
|
"@atlaskit/portal": "^4.11.0",
|
|
68
68
|
"@atlaskit/theme": "^15.0.0",
|
|
@@ -93,7 +93,7 @@
|
|
|
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
99
|
"@testing-library/react": "^13.4.0",
|
|
@@ -1,12 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
|
|
3
|
-
Object.defineProperty(exports, "__esModule", {
|
|
4
|
-
value: true
|
|
5
|
-
});
|
|
6
|
-
exports.transitionDurationMs = exports.transitionDuration = exports.animationTimingFunction = void 0;
|
|
7
|
-
var _curves = require("@atlaskit/motion/curves");
|
|
8
|
-
var transitionDuration = exports.transitionDuration = '0.22s';
|
|
9
|
-
var transitionDurationMs = exports.transitionDurationMs = 220;
|
|
10
|
-
var animationTimingFunction = exports.animationTimingFunction = function animationTimingFunction() {
|
|
11
|
-
return _curves.easeOut;
|
|
12
|
-
};
|