@atlaskit/drawer 7.5.2 → 7.5.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 +6 -0
- package/dist/cjs/components/blanket.js +6 -3
- package/dist/cjs/components/index.js +1 -1
- package/dist/cjs/components/primitives/content.js +1 -1
- package/dist/cjs/components/primitives/drawer-wrapper.js +18 -19
- package/dist/cjs/components/primitives/sidebar.js +1 -1
- package/dist/cjs/version.json +1 -1
- package/dist/es2019/components/blanket.js +7 -4
- package/dist/es2019/components/index.js +1 -1
- package/dist/es2019/components/primitives/content.js +1 -1
- package/dist/es2019/components/primitives/drawer-wrapper.js +17 -21
- package/dist/es2019/components/primitives/sidebar.js +1 -1
- package/dist/es2019/version.json +1 -1
- package/dist/esm/components/blanket.js +7 -4
- package/dist/esm/components/index.js +1 -1
- package/dist/esm/components/primitives/content.js +1 -1
- package/dist/esm/components/primitives/drawer-wrapper.js +17 -21
- package/dist/esm/components/primitives/sidebar.js +1 -1
- package/dist/esm/version.json +1 -1
- package/dist/types/components/index.d.ts +2 -2
- package/dist/types-ts4.5/components/index.d.ts +2 -2
- package/package.json +5 -6
- package/tmp/api-report-tmp.d.ts +141 -0
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,11 @@
|
|
|
1
1
|
# @atlaskit/drawer
|
|
2
2
|
|
|
3
|
+
## 7.5.3
|
|
4
|
+
|
|
5
|
+
### Patch Changes
|
|
6
|
+
|
|
7
|
+
- [`779727e307a`](https://bitbucket.org/atlassian/atlassian-frontend/commits/779727e307a) - Internal change only. Replace all instances of Box with stable @atlaskit/primitives version.
|
|
8
|
+
|
|
3
9
|
## 7.5.2
|
|
4
10
|
|
|
5
11
|
### Patch Changes
|
|
@@ -8,11 +8,14 @@ exports.default = void 0;
|
|
|
8
8
|
var _react = _interopRequireDefault(require("react"));
|
|
9
9
|
var _react2 = require("@emotion/react");
|
|
10
10
|
var _blanket = _interopRequireDefault(require("@atlaskit/blanket"));
|
|
11
|
-
var _box = _interopRequireDefault(require("@atlaskit/ds-explorations/box"));
|
|
12
11
|
var _motion = require("@atlaskit/motion");
|
|
13
12
|
var _constants = require("../constants");
|
|
14
13
|
/** @jsx jsx */
|
|
15
14
|
|
|
15
|
+
var blanketStyles = (0, _react2.css)({
|
|
16
|
+
position: 'relative'
|
|
17
|
+
});
|
|
18
|
+
|
|
16
19
|
/**
|
|
17
20
|
* A wrapper around `@atlaskit/blanket` that adds a fade in/out transition.
|
|
18
21
|
*/
|
|
@@ -39,8 +42,8 @@ var Blanket = function Blanket(_ref) {
|
|
|
39
42
|
animationTimingFunction: _constants.animationTimingFunction
|
|
40
43
|
}, function (_ref2) {
|
|
41
44
|
var className = _ref2.className;
|
|
42
|
-
return (0, _react2.jsx)(
|
|
43
|
-
|
|
45
|
+
return (0, _react2.jsx)("div", {
|
|
46
|
+
css: blanketStyles,
|
|
44
47
|
className: className
|
|
45
48
|
}, (0, _react2.jsx)(_blanket.default, {
|
|
46
49
|
isTinted: true,
|
|
@@ -27,7 +27,7 @@ function _objectSpread(target) { for (var i = 1; i < arguments.length; i++) { va
|
|
|
27
27
|
function _createSuper(Derived) { var hasNativeReflectConstruct = _isNativeReflectConstruct(); return function _createSuperInternal() { var Super = (0, _getPrototypeOf2.default)(Derived), result; if (hasNativeReflectConstruct) { var NewTarget = (0, _getPrototypeOf2.default)(this).constructor; result = Reflect.construct(Super, arguments, NewTarget); } else { result = Super.apply(this, arguments); } return (0, _possibleConstructorReturn2.default)(this, result); }; }
|
|
28
28
|
function _isNativeReflectConstruct() { if (typeof Reflect === "undefined" || !Reflect.construct) return false; if (Reflect.construct.sham) return false; if (typeof Proxy === "function") return true; try { Boolean.prototype.valueOf.call(Reflect.construct(Boolean, [], function () {})); return true; } catch (e) { return false; } } /* eslint-disable @repo/internal/dom-events/no-unsafe-event-listeners */
|
|
29
29
|
var packageName = "@atlaskit/drawer";
|
|
30
|
-
var packageVersion = "7.5.
|
|
30
|
+
var packageVersion = "7.5.3";
|
|
31
31
|
var createAndFireEventOnAtlaskit = (0, _analyticsNext.createAndFireEvent)('atlaskit');
|
|
32
32
|
var createAndFireOnClick = function createAndFireOnClick(createAnalyticsEvent, trigger) {
|
|
33
33
|
return createAndFireEventOnAtlaskit({
|
|
@@ -29,7 +29,7 @@ var Content = function Content(_ref) {
|
|
|
29
29
|
* a complete override with no chance of partially changing styles.
|
|
30
30
|
*/
|
|
31
31
|
|
|
32
|
-
// eslint-disable-next-line @
|
|
32
|
+
// eslint-disable-next-line @atlaskit/design-system/consistent-css-prop-usage, @repo/internal/react/no-unsafe-spread-props
|
|
33
33
|
(0, _react.jsx)("div", (0, _extends2.default)({
|
|
34
34
|
css: (0, _react.css)(cssFn(defaultStyles))
|
|
35
35
|
}, props))
|
|
@@ -5,15 +5,13 @@ Object.defineProperty(exports, "__esModule", {
|
|
|
5
5
|
value: true
|
|
6
6
|
});
|
|
7
7
|
exports.wrapperWidth = exports.default = void 0;
|
|
8
|
-
var _defineProperty2 = _interopRequireDefault(require("@babel/runtime/helpers/defineProperty"));
|
|
9
8
|
var _react = require("react");
|
|
10
9
|
var _react2 = require("@emotion/react");
|
|
11
10
|
var _useCallbackRef = require("use-callback-ref");
|
|
12
|
-
var
|
|
13
|
-
var _constants = require("@atlaskit/theme/constants");
|
|
11
|
+
var _colors = require("@atlaskit/theme/colors");
|
|
14
12
|
var _usePreventProgrammaticScroll = _interopRequireDefault(require("./hooks/use-prevent-programmatic-scroll"));
|
|
15
|
-
|
|
16
|
-
|
|
13
|
+
/** @jsx jsx */
|
|
14
|
+
|
|
17
15
|
var wrapperWidth = {
|
|
18
16
|
full: {
|
|
19
17
|
width: '100vw'
|
|
@@ -22,21 +20,26 @@ var wrapperWidth = {
|
|
|
22
20
|
width: '95vw'
|
|
23
21
|
},
|
|
24
22
|
narrow: {
|
|
25
|
-
width:
|
|
23
|
+
width: 360
|
|
26
24
|
},
|
|
27
25
|
medium: {
|
|
28
|
-
width:
|
|
26
|
+
width: 480
|
|
29
27
|
},
|
|
30
28
|
wide: {
|
|
31
|
-
width:
|
|
29
|
+
width: 600
|
|
32
30
|
}
|
|
33
31
|
};
|
|
34
32
|
exports.wrapperWidth = wrapperWidth;
|
|
35
|
-
var wrapperStyles = {
|
|
33
|
+
var wrapperStyles = (0, _react2.css)({
|
|
34
|
+
display: 'flex',
|
|
35
|
+
height: '100vh',
|
|
36
|
+
position: 'fixed',
|
|
37
|
+
zIndex: 500,
|
|
36
38
|
top: 0,
|
|
37
39
|
left: 0,
|
|
38
|
-
|
|
39
|
-
|
|
40
|
+
backgroundColor: "var(--ds-surface-overlay, ".concat(_colors.N0, ")"),
|
|
41
|
+
overflow: 'hidden'
|
|
42
|
+
});
|
|
40
43
|
/**
|
|
41
44
|
* A wrapper that controls the styling of the drawer with a few hacks with refs to get our Touch±Scroll locks working.
|
|
42
45
|
*/
|
|
@@ -63,15 +66,11 @@ var DrawerWrapper = /*#__PURE__*/(0, _react.forwardRef)(function (_ref, scrollRe
|
|
|
63
66
|
}, [scrollRef]);
|
|
64
67
|
var ref = (0, _useCallbackRef.useMergeRefs)([drawerRef, assignSecondChildRef]);
|
|
65
68
|
(0, _usePreventProgrammaticScroll.default)();
|
|
66
|
-
return (0, _react2.jsx)(
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
backgroundColor: "elevation.surface.overlay",
|
|
70
|
-
overflow: "hidden",
|
|
71
|
-
layer: "blanket",
|
|
72
|
-
UNSAFE_style: _objectSpread(_objectSpread({}, wrapperStyles), wrapperWidth[width]),
|
|
69
|
+
return (0, _react2.jsx)("div", {
|
|
70
|
+
css: wrapperStyles,
|
|
71
|
+
style: wrapperWidth[width],
|
|
73
72
|
className: className,
|
|
74
|
-
|
|
73
|
+
"data-testid": testId,
|
|
75
74
|
ref: ref
|
|
76
75
|
}, children);
|
|
77
76
|
});
|
|
@@ -29,7 +29,7 @@ var sidebarCSS = function sidebarCSS() {
|
|
|
29
29
|
var Sidebar = function Sidebar(_ref) {
|
|
30
30
|
var cssFn = _ref.cssFn,
|
|
31
31
|
props = (0, _objectWithoutProperties2.default)(_ref, _excluded);
|
|
32
|
-
// eslint-disable-next-line @
|
|
32
|
+
// eslint-disable-next-line @atlaskit/design-system/consistent-css-prop-usage, @repo/internal/react/no-unsafe-spread-props
|
|
33
33
|
return (0, _react.jsx)("div", (0, _extends2.default)({
|
|
34
34
|
css: (0, _react.css)(cssFn(defaultStyle))
|
|
35
35
|
}, props));
|
package/dist/cjs/version.json
CHANGED
|
@@ -1,10 +1,13 @@
|
|
|
1
1
|
/** @jsx jsx */
|
|
2
2
|
import React from 'react';
|
|
3
|
-
import { jsx } from '@emotion/react';
|
|
3
|
+
import { css, jsx } from '@emotion/react';
|
|
4
4
|
import AkBlanket from '@atlaskit/blanket';
|
|
5
|
-
import Box from '@atlaskit/ds-explorations/box';
|
|
6
5
|
import { ExitingPersistence, FadeIn } from '@atlaskit/motion';
|
|
7
6
|
import { animationTimingFunction, transitionDurationMs } from '../constants';
|
|
7
|
+
const blanketStyles = css({
|
|
8
|
+
position: 'relative'
|
|
9
|
+
});
|
|
10
|
+
|
|
8
11
|
/**
|
|
9
12
|
* A wrapper around `@atlaskit/blanket` that adds a fade in/out transition.
|
|
10
13
|
*/
|
|
@@ -32,8 +35,8 @@ const Blanket = ({
|
|
|
32
35
|
animationTimingFunction: animationTimingFunction
|
|
33
36
|
}, ({
|
|
34
37
|
className
|
|
35
|
-
}) => jsx(
|
|
36
|
-
|
|
38
|
+
}) => jsx("div", {
|
|
39
|
+
css: blanketStyles,
|
|
37
40
|
className: className
|
|
38
41
|
}, jsx(AkBlanket, {
|
|
39
42
|
isTinted: true,
|
|
@@ -8,7 +8,7 @@ import { defaultFocusLockSettings } from '../constants';
|
|
|
8
8
|
import Blanket from './blanket';
|
|
9
9
|
import DrawerPrimitive from './primitives';
|
|
10
10
|
const packageName = "@atlaskit/drawer";
|
|
11
|
-
const packageVersion = "7.5.
|
|
11
|
+
const packageVersion = "7.5.3";
|
|
12
12
|
const createAndFireEventOnAtlaskit = createAndFireEvent('atlaskit');
|
|
13
13
|
const createAndFireOnClick = (createAnalyticsEvent, trigger) => createAndFireEventOnAtlaskit({
|
|
14
14
|
action: 'dismissed',
|
|
@@ -19,7 +19,7 @@ const Content = ({
|
|
|
19
19
|
* a complete override with no chance of partially changing styles.
|
|
20
20
|
*/
|
|
21
21
|
|
|
22
|
-
// eslint-disable-next-line @
|
|
22
|
+
// eslint-disable-next-line @atlaskit/design-system/consistent-css-prop-usage, @repo/internal/react/no-unsafe-spread-props
|
|
23
23
|
jsx("div", _extends({
|
|
24
24
|
css: css(cssFn(defaultStyles))
|
|
25
25
|
}, props));
|
|
@@ -1,11 +1,9 @@
|
|
|
1
1
|
/** @jsx jsx */
|
|
2
2
|
|
|
3
3
|
import { forwardRef, useCallback } from 'react';
|
|
4
|
-
import { jsx } from '@emotion/react';
|
|
4
|
+
import { css, jsx } from '@emotion/react';
|
|
5
5
|
import { useMergeRefs } from 'use-callback-ref';
|
|
6
|
-
import
|
|
7
|
-
// eslint-disable-next-line @atlaskit/design-system/no-deprecated-imports
|
|
8
|
-
import { gridSize } from '@atlaskit/theme/constants';
|
|
6
|
+
import { N0 } from '@atlaskit/theme/colors';
|
|
9
7
|
import usePreventProgrammaticScroll from './hooks/use-prevent-programmatic-scroll';
|
|
10
8
|
export const wrapperWidth = {
|
|
11
9
|
full: {
|
|
@@ -15,20 +13,25 @@ export const wrapperWidth = {
|
|
|
15
13
|
width: '95vw'
|
|
16
14
|
},
|
|
17
15
|
narrow: {
|
|
18
|
-
width:
|
|
16
|
+
width: 360
|
|
19
17
|
},
|
|
20
18
|
medium: {
|
|
21
|
-
width:
|
|
19
|
+
width: 480
|
|
22
20
|
},
|
|
23
21
|
wide: {
|
|
24
|
-
width:
|
|
22
|
+
width: 600
|
|
25
23
|
}
|
|
26
24
|
};
|
|
27
|
-
const wrapperStyles = {
|
|
25
|
+
const wrapperStyles = css({
|
|
26
|
+
display: 'flex',
|
|
27
|
+
height: '100vh',
|
|
28
|
+
position: 'fixed',
|
|
29
|
+
zIndex: 500,
|
|
28
30
|
top: 0,
|
|
29
31
|
left: 0,
|
|
30
|
-
|
|
31
|
-
|
|
32
|
+
backgroundColor: `var(--ds-surface-overlay, ${N0})`,
|
|
33
|
+
overflow: 'hidden'
|
|
34
|
+
});
|
|
32
35
|
/**
|
|
33
36
|
* A wrapper that controls the styling of the drawer with a few hacks with refs to get our Touch±Scroll locks working.
|
|
34
37
|
*/
|
|
@@ -55,18 +58,11 @@ const DrawerWrapper = /*#__PURE__*/forwardRef(({
|
|
|
55
58
|
}, [scrollRef]);
|
|
56
59
|
const ref = useMergeRefs([drawerRef, assignSecondChildRef]);
|
|
57
60
|
usePreventProgrammaticScroll();
|
|
58
|
-
return jsx(
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
backgroundColor: "elevation.surface.overlay",
|
|
62
|
-
overflow: "hidden",
|
|
63
|
-
layer: "blanket",
|
|
64
|
-
UNSAFE_style: {
|
|
65
|
-
...wrapperStyles,
|
|
66
|
-
...wrapperWidth[width]
|
|
67
|
-
},
|
|
61
|
+
return jsx("div", {
|
|
62
|
+
css: wrapperStyles,
|
|
63
|
+
style: wrapperWidth[width],
|
|
68
64
|
className: className,
|
|
69
|
-
|
|
65
|
+
"data-testid": testId,
|
|
70
66
|
ref: ref
|
|
71
67
|
}, children);
|
|
72
68
|
});
|
|
@@ -20,7 +20,7 @@ const Sidebar = ({
|
|
|
20
20
|
cssFn,
|
|
21
21
|
...props
|
|
22
22
|
}) => {
|
|
23
|
-
// eslint-disable-next-line @
|
|
23
|
+
// eslint-disable-next-line @atlaskit/design-system/consistent-css-prop-usage, @repo/internal/react/no-unsafe-spread-props
|
|
24
24
|
return jsx("div", _extends({
|
|
25
25
|
css: css(cssFn(defaultStyle))
|
|
26
26
|
}, props));
|
package/dist/es2019/version.json
CHANGED
|
@@ -1,10 +1,13 @@
|
|
|
1
1
|
/** @jsx jsx */
|
|
2
2
|
import React from 'react';
|
|
3
|
-
import { jsx } from '@emotion/react';
|
|
3
|
+
import { css, jsx } from '@emotion/react';
|
|
4
4
|
import AkBlanket from '@atlaskit/blanket';
|
|
5
|
-
import Box from '@atlaskit/ds-explorations/box';
|
|
6
5
|
import { ExitingPersistence, FadeIn } from '@atlaskit/motion';
|
|
7
6
|
import { animationTimingFunction, transitionDurationMs } from '../constants';
|
|
7
|
+
var blanketStyles = css({
|
|
8
|
+
position: 'relative'
|
|
9
|
+
});
|
|
10
|
+
|
|
8
11
|
/**
|
|
9
12
|
* A wrapper around `@atlaskit/blanket` that adds a fade in/out transition.
|
|
10
13
|
*/
|
|
@@ -31,8 +34,8 @@ var Blanket = function Blanket(_ref) {
|
|
|
31
34
|
animationTimingFunction: animationTimingFunction
|
|
32
35
|
}, function (_ref2) {
|
|
33
36
|
var className = _ref2.className;
|
|
34
|
-
return jsx(
|
|
35
|
-
|
|
37
|
+
return jsx("div", {
|
|
38
|
+
css: blanketStyles,
|
|
36
39
|
className: className
|
|
37
40
|
}, jsx(AkBlanket, {
|
|
38
41
|
isTinted: true,
|
|
@@ -18,7 +18,7 @@ import { defaultFocusLockSettings } from '../constants';
|
|
|
18
18
|
import Blanket from './blanket';
|
|
19
19
|
import DrawerPrimitive from './primitives';
|
|
20
20
|
var packageName = "@atlaskit/drawer";
|
|
21
|
-
var packageVersion = "7.5.
|
|
21
|
+
var packageVersion = "7.5.3";
|
|
22
22
|
var createAndFireEventOnAtlaskit = createAndFireEvent('atlaskit');
|
|
23
23
|
var createAndFireOnClick = function createAndFireOnClick(createAnalyticsEvent, trigger) {
|
|
24
24
|
return createAndFireEventOnAtlaskit({
|
|
@@ -23,7 +23,7 @@ var Content = function Content(_ref) {
|
|
|
23
23
|
* a complete override with no chance of partially changing styles.
|
|
24
24
|
*/
|
|
25
25
|
|
|
26
|
-
// eslint-disable-next-line @
|
|
26
|
+
// eslint-disable-next-line @atlaskit/design-system/consistent-css-prop-usage, @repo/internal/react/no-unsafe-spread-props
|
|
27
27
|
jsx("div", _extends({
|
|
28
28
|
css: css(cssFn(defaultStyles))
|
|
29
29
|
}, props))
|
|
@@ -1,14 +1,9 @@
|
|
|
1
|
-
import _defineProperty from "@babel/runtime/helpers/defineProperty";
|
|
2
|
-
function ownKeys(object, enumerableOnly) { var keys = Object.keys(object); if (Object.getOwnPropertySymbols) { var symbols = Object.getOwnPropertySymbols(object); enumerableOnly && (symbols = symbols.filter(function (sym) { return Object.getOwnPropertyDescriptor(object, sym).enumerable; })), keys.push.apply(keys, symbols); } return keys; }
|
|
3
|
-
function _objectSpread(target) { for (var i = 1; i < arguments.length; i++) { var source = null != arguments[i] ? arguments[i] : {}; i % 2 ? ownKeys(Object(source), !0).forEach(function (key) { _defineProperty(target, key, source[key]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(target, Object.getOwnPropertyDescriptors(source)) : ownKeys(Object(source)).forEach(function (key) { Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key)); }); } return target; }
|
|
4
1
|
/** @jsx jsx */
|
|
5
2
|
|
|
6
3
|
import { forwardRef, useCallback } from 'react';
|
|
7
|
-
import { jsx } from '@emotion/react';
|
|
4
|
+
import { css, jsx } from '@emotion/react';
|
|
8
5
|
import { useMergeRefs } from 'use-callback-ref';
|
|
9
|
-
import
|
|
10
|
-
// eslint-disable-next-line @atlaskit/design-system/no-deprecated-imports
|
|
11
|
-
import { gridSize } from '@atlaskit/theme/constants';
|
|
6
|
+
import { N0 } from '@atlaskit/theme/colors';
|
|
12
7
|
import usePreventProgrammaticScroll from './hooks/use-prevent-programmatic-scroll';
|
|
13
8
|
export var wrapperWidth = {
|
|
14
9
|
full: {
|
|
@@ -18,20 +13,25 @@ export var wrapperWidth = {
|
|
|
18
13
|
width: '95vw'
|
|
19
14
|
},
|
|
20
15
|
narrow: {
|
|
21
|
-
width:
|
|
16
|
+
width: 360
|
|
22
17
|
},
|
|
23
18
|
medium: {
|
|
24
|
-
width:
|
|
19
|
+
width: 480
|
|
25
20
|
},
|
|
26
21
|
wide: {
|
|
27
|
-
width:
|
|
22
|
+
width: 600
|
|
28
23
|
}
|
|
29
24
|
};
|
|
30
|
-
var wrapperStyles = {
|
|
25
|
+
var wrapperStyles = css({
|
|
26
|
+
display: 'flex',
|
|
27
|
+
height: '100vh',
|
|
28
|
+
position: 'fixed',
|
|
29
|
+
zIndex: 500,
|
|
31
30
|
top: 0,
|
|
32
31
|
left: 0,
|
|
33
|
-
|
|
34
|
-
|
|
32
|
+
backgroundColor: "var(--ds-surface-overlay, ".concat(N0, ")"),
|
|
33
|
+
overflow: 'hidden'
|
|
34
|
+
});
|
|
35
35
|
/**
|
|
36
36
|
* A wrapper that controls the styling of the drawer with a few hacks with refs to get our Touch±Scroll locks working.
|
|
37
37
|
*/
|
|
@@ -58,15 +58,11 @@ var DrawerWrapper = /*#__PURE__*/forwardRef(function (_ref, scrollRef) {
|
|
|
58
58
|
}, [scrollRef]);
|
|
59
59
|
var ref = useMergeRefs([drawerRef, assignSecondChildRef]);
|
|
60
60
|
usePreventProgrammaticScroll();
|
|
61
|
-
return jsx(
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
backgroundColor: "elevation.surface.overlay",
|
|
65
|
-
overflow: "hidden",
|
|
66
|
-
layer: "blanket",
|
|
67
|
-
UNSAFE_style: _objectSpread(_objectSpread({}, wrapperStyles), wrapperWidth[width]),
|
|
61
|
+
return jsx("div", {
|
|
62
|
+
css: wrapperStyles,
|
|
63
|
+
style: wrapperWidth[width],
|
|
68
64
|
className: className,
|
|
69
|
-
|
|
65
|
+
"data-testid": testId,
|
|
70
66
|
ref: ref
|
|
71
67
|
}, children);
|
|
72
68
|
});
|
|
@@ -23,7 +23,7 @@ var sidebarCSS = function sidebarCSS() {
|
|
|
23
23
|
var Sidebar = function Sidebar(_ref) {
|
|
24
24
|
var cssFn = _ref.cssFn,
|
|
25
25
|
props = _objectWithoutProperties(_ref, _excluded);
|
|
26
|
-
// eslint-disable-next-line @
|
|
26
|
+
// eslint-disable-next-line @atlaskit/design-system/consistent-css-prop-usage, @repo/internal/react/no-unsafe-spread-props
|
|
27
27
|
return jsx("div", _extends({
|
|
28
28
|
css: css(cssFn(defaultStyle))
|
|
29
29
|
}, props));
|
package/dist/esm/version.json
CHANGED
|
@@ -22,10 +22,10 @@ export declare class DrawerBase extends Component<DrawerProps, {
|
|
|
22
22
|
handleKeyDown: (event: KeyboardEvent) => void;
|
|
23
23
|
render(): JSX.Element | null;
|
|
24
24
|
}
|
|
25
|
-
declare const _default: React.ForwardRefExoticComponent<Pick<Pick<Omit<DrawerProps, keyof import("@atlaskit/analytics-next").WithAnalyticsEventsProps>, "children" | "onKeyDown" | "onClose" | "testId" | "icon" | "onOpenComplete" | "onCloseComplete" | "shouldUnmountOnExit" | "overrides" | "
|
|
25
|
+
declare const _default: React.ForwardRefExoticComponent<Pick<Pick<Omit<DrawerProps, keyof import("@atlaskit/analytics-next").WithAnalyticsEventsProps>, "children" | "onKeyDown" | "onClose" | "testId" | "icon" | "onOpenComplete" | "onCloseComplete" | "shouldUnmountOnExit" | "overrides" | "zIndex" | "isOpen"> & Partial<Pick<Omit<DrawerProps, keyof import("@atlaskit/analytics-next").WithAnalyticsEventsProps>, "width" | keyof import("./types").FocusLockSettings>> & Partial<Pick<{
|
|
26
26
|
autoFocusFirstElem?: boolean | (() => HTMLElement | null) | undefined;
|
|
27
27
|
isFocusLockEnabled?: boolean | undefined;
|
|
28
28
|
shouldReturnFocus?: boolean | undefined;
|
|
29
29
|
width: DrawerWidth;
|
|
30
|
-
}, never>> & React.RefAttributes<any> & import("@atlaskit/analytics-next").WithContextProps, "width" | "children" | "onKeyDown" | "key" | "onClose" | "testId" | "icon" | "onOpenComplete" | "onCloseComplete" | "shouldUnmountOnExit" | "overrides" | "
|
|
30
|
+
}, never>> & React.RefAttributes<any> & import("@atlaskit/analytics-next").WithContextProps, "width" | "children" | "onKeyDown" | "key" | "onClose" | "testId" | "icon" | "onOpenComplete" | "onCloseComplete" | "shouldUnmountOnExit" | "overrides" | "zIndex" | "isOpen" | "analyticsContext" | keyof import("./types").FocusLockSettings> & React.RefAttributes<any>>;
|
|
31
31
|
export default _default;
|
|
@@ -22,10 +22,10 @@ export declare class DrawerBase extends Component<DrawerProps, {
|
|
|
22
22
|
handleKeyDown: (event: KeyboardEvent) => void;
|
|
23
23
|
render(): JSX.Element | null;
|
|
24
24
|
}
|
|
25
|
-
declare const _default: React.ForwardRefExoticComponent<Pick<Pick<Omit<DrawerProps, keyof import("@atlaskit/analytics-next").WithAnalyticsEventsProps>, "children" | "onKeyDown" | "onClose" | "testId" | "icon" | "onOpenComplete" | "onCloseComplete" | "shouldUnmountOnExit" | "overrides" | "
|
|
25
|
+
declare const _default: React.ForwardRefExoticComponent<Pick<Pick<Omit<DrawerProps, keyof import("@atlaskit/analytics-next").WithAnalyticsEventsProps>, "children" | "onKeyDown" | "onClose" | "testId" | "icon" | "onOpenComplete" | "onCloseComplete" | "shouldUnmountOnExit" | "overrides" | "zIndex" | "isOpen"> & Partial<Pick<Omit<DrawerProps, keyof import("@atlaskit/analytics-next").WithAnalyticsEventsProps>, "width" | keyof import("./types").FocusLockSettings>> & Partial<Pick<{
|
|
26
26
|
autoFocusFirstElem?: boolean | (() => HTMLElement | null) | undefined;
|
|
27
27
|
isFocusLockEnabled?: boolean | undefined;
|
|
28
28
|
shouldReturnFocus?: boolean | undefined;
|
|
29
29
|
width: DrawerWidth;
|
|
30
|
-
}, never>> & React.RefAttributes<any> & import("@atlaskit/analytics-next").WithContextProps, "width" | "children" | "onKeyDown" | "key" | "onClose" | "testId" | "icon" | "onOpenComplete" | "onCloseComplete" | "shouldUnmountOnExit" | "overrides" | "
|
|
30
|
+
}, never>> & React.RefAttributes<any> & import("@atlaskit/analytics-next").WithContextProps, "width" | "children" | "onKeyDown" | "key" | "onClose" | "testId" | "icon" | "onOpenComplete" | "onCloseComplete" | "shouldUnmountOnExit" | "overrides" | "zIndex" | "isOpen" | "analyticsContext" | keyof import("./types").FocusLockSettings> & React.RefAttributes<any>>;
|
|
31
31
|
export default _default;
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@atlaskit/drawer",
|
|
3
|
-
"version": "7.5.
|
|
3
|
+
"version": "7.5.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/"
|
|
@@ -26,7 +26,7 @@
|
|
|
26
26
|
"atlassian": {
|
|
27
27
|
"team": "Design System Team",
|
|
28
28
|
"deprecatedAutoEntryPoints": true,
|
|
29
|
-
"releaseModel": "
|
|
29
|
+
"releaseModel": "continuous",
|
|
30
30
|
"website": {
|
|
31
31
|
"name": "Drawer",
|
|
32
32
|
"category": "Components"
|
|
@@ -35,12 +35,11 @@
|
|
|
35
35
|
"dependencies": {
|
|
36
36
|
"@atlaskit/analytics-next": "^9.1.0",
|
|
37
37
|
"@atlaskit/blanket": "^12.4.0",
|
|
38
|
-
"@atlaskit/ds-explorations": "^2.1.0",
|
|
39
38
|
"@atlaskit/icon": "^21.12.0",
|
|
40
39
|
"@atlaskit/motion": "^1.4.0",
|
|
41
40
|
"@atlaskit/portal": "^4.3.0",
|
|
42
41
|
"@atlaskit/theme": "^12.5.0",
|
|
43
|
-
"@atlaskit/tokens": "^1.
|
|
42
|
+
"@atlaskit/tokens": "^1.5.0",
|
|
44
43
|
"@babel/runtime": "^7.0.0",
|
|
45
44
|
"@emotion/react": "^11.7.1",
|
|
46
45
|
"bind-event-listener": "^2.1.1",
|
|
@@ -61,10 +60,10 @@
|
|
|
61
60
|
"@atlaskit/dropdown-menu": "^11.9.0",
|
|
62
61
|
"@atlaskit/ds-lib": "^2.2.0",
|
|
63
62
|
"@atlaskit/menu": "^1.7.0",
|
|
64
|
-
"@atlaskit/modal-dialog": "^12.
|
|
63
|
+
"@atlaskit/modal-dialog": "^12.6.0",
|
|
65
64
|
"@atlaskit/section-message": "^6.4.0",
|
|
66
65
|
"@atlaskit/ssr": "*",
|
|
67
|
-
"@atlaskit/textarea": "^4.
|
|
66
|
+
"@atlaskit/textarea": "^4.7.0",
|
|
68
67
|
"@atlaskit/visual-regression": "*",
|
|
69
68
|
"@atlaskit/webdriver-runner": "*",
|
|
70
69
|
"@atlassian/atlassian-frontend-prettier-config-1.0.1": "npm:@atlassian/atlassian-frontend-prettier-config@1.0.1",
|
|
@@ -0,0 +1,141 @@
|
|
|
1
|
+
## API Report File for "@atlaskit/drawer"
|
|
2
|
+
|
|
3
|
+
> Do not edit this file. It is a report generated by [API Extractor](https://api-extractor.com/).
|
|
4
|
+
|
|
5
|
+
```ts
|
|
6
|
+
|
|
7
|
+
import { ComponentType } from 'react';
|
|
8
|
+
import { CSSObject } from '@emotion/react';
|
|
9
|
+
import { default as React_2 } from 'react';
|
|
10
|
+
import { ReactElement } from 'react';
|
|
11
|
+
import { ReactNode } from 'react';
|
|
12
|
+
import { SyntheticEvent } from 'react';
|
|
13
|
+
import { WithAnalyticsEventsProps } from '@atlaskit/analytics-next';
|
|
14
|
+
import { WithContextProps } from '@atlaskit/analytics-next';
|
|
15
|
+
|
|
16
|
+
// @public (undocumented)
|
|
17
|
+
export interface BaseProps {
|
|
18
|
+
children?: ReactNode;
|
|
19
|
+
icon?: ComponentType<any>;
|
|
20
|
+
onCloseComplete?: (node: HTMLElement | null) => void;
|
|
21
|
+
onOpenComplete?: (node: HTMLElement | null) => void;
|
|
22
|
+
overrides?: OverridesType;
|
|
23
|
+
// @deprecated (undocumented)
|
|
24
|
+
shouldUnmountOnExit?: boolean;
|
|
25
|
+
testId?: string;
|
|
26
|
+
width?: DrawerWidth;
|
|
27
|
+
}
|
|
28
|
+
|
|
29
|
+
// @public
|
|
30
|
+
export type CloseTrigger = 'backButton' | 'blanket' | 'escKey';
|
|
31
|
+
|
|
32
|
+
// @public (undocumented)
|
|
33
|
+
export type ContentCSSProps = Omit<ContentProps, 'cssFn'>;
|
|
34
|
+
|
|
35
|
+
// @public (undocumented)
|
|
36
|
+
export interface ContentProps extends React.HTMLProps<HTMLDivElement> {
|
|
37
|
+
// @deprecated (undocumented)
|
|
38
|
+
cssFn: (defaultStyles: CSSObject) => CSSObject;
|
|
39
|
+
}
|
|
40
|
+
|
|
41
|
+
// @public (undocumented)
|
|
42
|
+
const _default: React_2.ForwardRefExoticComponent<Pick<Pick<Omit<DrawerProps, keyof WithAnalyticsEventsProps>, "children" | "icon" | "isOpen" | "onClose" | "onCloseComplete" | "onKeyDown" | "onOpenComplete" | "overrides" | "shouldUnmountOnExit" | "testId" | "zIndex"> & Partial<Pick<Omit<DrawerProps, keyof WithAnalyticsEventsProps>, "width" | keyof FocusLockSettings>> & Partial<Pick<{
|
|
43
|
+
autoFocusFirstElem?: (() => HTMLElement | null) | boolean | undefined;
|
|
44
|
+
isFocusLockEnabled?: boolean | undefined;
|
|
45
|
+
shouldReturnFocus?: boolean | undefined;
|
|
46
|
+
width: DrawerWidth;
|
|
47
|
+
}, never>> & React_2.RefAttributes<any> & WithContextProps, "analyticsContext" | "children" | "icon" | "isOpen" | "key" | "onClose" | "onCloseComplete" | "onKeyDown" | "onOpenComplete" | "overrides" | "shouldUnmountOnExit" | "testId" | "width" | "zIndex" | keyof FocusLockSettings> & React_2.RefAttributes<any>>;
|
|
48
|
+
export default _default;
|
|
49
|
+
|
|
50
|
+
// @public (undocumented)
|
|
51
|
+
export type DefaultsType = {
|
|
52
|
+
Sidebar: {
|
|
53
|
+
component: React.ComponentType<SidebarProps>;
|
|
54
|
+
cssFn: (defaultStyles: CSSObject) => CSSObject;
|
|
55
|
+
};
|
|
56
|
+
Content: {
|
|
57
|
+
component: React.ComponentType<ContentProps>;
|
|
58
|
+
cssFn: (defaultStyles: CSSObject) => CSSObject;
|
|
59
|
+
};
|
|
60
|
+
};
|
|
61
|
+
|
|
62
|
+
// @public (undocumented)
|
|
63
|
+
export type DrawerPrimitiveDefaults = Pick<DefaultsType, 'Content' | 'Sidebar'>;
|
|
64
|
+
|
|
65
|
+
// @public (undocumented)
|
|
66
|
+
export type DrawerPrimitiveOverrides = Pick<OverridesType, 'Content' | 'Sidebar'>;
|
|
67
|
+
|
|
68
|
+
// @public (undocumented)
|
|
69
|
+
export interface DrawerPrimitiveProps extends BaseProps, FocusLockSettings {
|
|
70
|
+
// (undocumented)
|
|
71
|
+
in: boolean;
|
|
72
|
+
// (undocumented)
|
|
73
|
+
onClose: (event: SyntheticEvent<HTMLElement>) => void;
|
|
74
|
+
}
|
|
75
|
+
|
|
76
|
+
// @public (undocumented)
|
|
77
|
+
export type DrawerProps = BaseProps & FocusLockSettings & WithAnalyticsEventsProps & {
|
|
78
|
+
onKeyDown?: (event: SyntheticEvent) => void;
|
|
79
|
+
onClose?: (event: SyntheticEvent<HTMLElement>, analyticsEvent: any) => void;
|
|
80
|
+
isOpen: boolean;
|
|
81
|
+
zIndex?: number;
|
|
82
|
+
};
|
|
83
|
+
|
|
84
|
+
// @public (undocumented)
|
|
85
|
+
export type DrawerWidth = 'extended' | 'full' | 'medium' | 'narrow' | 'wide';
|
|
86
|
+
|
|
87
|
+
// @public (undocumented)
|
|
88
|
+
export interface FocusLockProps extends FocusLockSettings {
|
|
89
|
+
children?: ReactElement;
|
|
90
|
+
}
|
|
91
|
+
|
|
92
|
+
// @public (undocumented)
|
|
93
|
+
interface FocusLockSettings {
|
|
94
|
+
autoFocusFirstElem?: (() => HTMLElement | null) | boolean;
|
|
95
|
+
isFocusLockEnabled?: boolean;
|
|
96
|
+
shouldReturnFocus?: boolean;
|
|
97
|
+
}
|
|
98
|
+
|
|
99
|
+
// @public (undocumented)
|
|
100
|
+
export type OverridesType = {
|
|
101
|
+
Sidebar?: {
|
|
102
|
+
component?: React.ComponentType<SidebarProps>;
|
|
103
|
+
cssFn?: (defaultStyles: CSSObject) => CSSObject;
|
|
104
|
+
};
|
|
105
|
+
Content?: {
|
|
106
|
+
component?: React.ComponentType<ContentProps>;
|
|
107
|
+
cssFn?: (defaultStyles: CSSObject) => CSSObject;
|
|
108
|
+
};
|
|
109
|
+
};
|
|
110
|
+
|
|
111
|
+
// @public (undocumented)
|
|
112
|
+
export type SidebarCSSProps = Omit<SidebarProps, 'cssFn'>;
|
|
113
|
+
|
|
114
|
+
// @public (undocumented)
|
|
115
|
+
export interface SidebarProps extends React.HTMLProps<HTMLDivElement> {
|
|
116
|
+
// @deprecated (undocumented)
|
|
117
|
+
cssFn: (defaultStyles: CSSObject) => CSSObject;
|
|
118
|
+
}
|
|
119
|
+
|
|
120
|
+
// @public (undocumented)
|
|
121
|
+
export type Widths = {
|
|
122
|
+
extended: {
|
|
123
|
+
width: string;
|
|
124
|
+
};
|
|
125
|
+
full: {
|
|
126
|
+
width: string;
|
|
127
|
+
};
|
|
128
|
+
medium: {
|
|
129
|
+
width: number;
|
|
130
|
+
};
|
|
131
|
+
narrow: {
|
|
132
|
+
width: number;
|
|
133
|
+
};
|
|
134
|
+
wide: {
|
|
135
|
+
width: number;
|
|
136
|
+
};
|
|
137
|
+
};
|
|
138
|
+
|
|
139
|
+
// (No @packageDocumentation comment for this package)
|
|
140
|
+
|
|
141
|
+
```
|