@atlaskit/drawer 7.4.1 → 7.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/components/blanket.js +23 -8
- package/dist/cjs/components/index.js +1 -1
- package/dist/cjs/components/primitives/drawer-wrapper.js +2 -1
- package/dist/cjs/version.json +1 -1
- package/dist/es2019/components/blanket.js +17 -5
- package/dist/es2019/components/index.js +1 -1
- package/dist/es2019/components/primitives/drawer-wrapper.js +1 -1
- package/dist/es2019/version.json +1 -1
- package/dist/esm/components/blanket.js +17 -5
- package/dist/esm/components/index.js +1 -1
- package/dist/esm/components/primitives/drawer-wrapper.js +1 -1
- package/dist/esm/version.json +1 -1
- package/dist/types/components/blanket.d.ts +3 -1
- package/dist/types/components/index.d.ts +2 -2
- package/dist/types/components/primitives/drawer-wrapper.d.ts +2 -1
- package/package.json +4 -6
- package/report.api.md +43 -33
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,17 @@
|
|
|
1
1
|
# @atlaskit/drawer
|
|
2
2
|
|
|
3
|
+
## 7.4.3
|
|
4
|
+
|
|
5
|
+
### Patch Changes
|
|
6
|
+
|
|
7
|
+
- Updated dependencies
|
|
8
|
+
|
|
9
|
+
## 7.4.2
|
|
10
|
+
|
|
11
|
+
### Patch Changes
|
|
12
|
+
|
|
13
|
+
- [`5bd499c254f`](https://bitbucket.org/atlassian/atlassian-frontend/commits/5bd499c254f) - Fix zIndex stacking of internal Blanket component during css transition
|
|
14
|
+
|
|
3
15
|
## 7.4.1
|
|
4
16
|
|
|
5
17
|
### Patch Changes
|
|
@@ -9,22 +9,36 @@ exports.default = void 0;
|
|
|
9
9
|
|
|
10
10
|
var _react = _interopRequireDefault(require("react"));
|
|
11
11
|
|
|
12
|
+
var _react2 = require("@emotion/react");
|
|
13
|
+
|
|
12
14
|
var _blanket = _interopRequireDefault(require("@atlaskit/blanket"));
|
|
13
15
|
|
|
14
16
|
var _motion = require("@atlaskit/motion");
|
|
15
17
|
|
|
16
|
-
var _constants = require("
|
|
18
|
+
var _constants = require("@atlaskit/theme/constants");
|
|
19
|
+
|
|
20
|
+
var _constants2 = require("../constants");
|
|
21
|
+
|
|
22
|
+
/** @jsx jsx */
|
|
17
23
|
|
|
24
|
+
/**
|
|
25
|
+
* The FadeIn opacity transition creates a new stacking context so we need ensure layering is the same as @atlaskit/blanket
|
|
26
|
+
*/
|
|
27
|
+
var stackingStyles = (0, _react2.css)({
|
|
28
|
+
position: 'relative',
|
|
29
|
+
zIndex: _constants.layers.blanket()
|
|
30
|
+
});
|
|
18
31
|
/**
|
|
19
32
|
* A wrapper around `@atlaskit/blanket` that adds a fade in/out transition.
|
|
20
33
|
*/
|
|
34
|
+
|
|
21
35
|
var Blanket = function Blanket(_ref) {
|
|
22
36
|
var isOpen = _ref.isOpen,
|
|
23
37
|
onBlanketClicked = _ref.onBlanketClicked,
|
|
24
38
|
testId = _ref.testId;
|
|
25
|
-
return
|
|
39
|
+
return (0, _react2.jsx)(_motion.ExitingPersistence, {
|
|
26
40
|
appear: true
|
|
27
|
-
}, isOpen &&
|
|
41
|
+
}, isOpen && (0, _react2.jsx)(_motion.FadeIn
|
|
28
42
|
/**
|
|
29
43
|
* We double the duration because the fade in keyframes have
|
|
30
44
|
* `opacity: 1` at `50%`.
|
|
@@ -32,19 +46,20 @@ var Blanket = function Blanket(_ref) {
|
|
|
32
46
|
* The fade out animation uses half the passed duration so it evens out.
|
|
33
47
|
*/
|
|
34
48
|
, {
|
|
35
|
-
duration:
|
|
49
|
+
duration: _constants2.transitionDurationMs * 2
|
|
36
50
|
/**
|
|
37
51
|
* We don't expose this on `FadeIn` but it does get passed down.
|
|
38
52
|
* TODO: figure out how we want to handle this...
|
|
39
53
|
*/
|
|
40
54
|
// @ts-ignore
|
|
41
55
|
,
|
|
42
|
-
animationTimingFunction:
|
|
56
|
+
animationTimingFunction: _constants2.animationTimingFunction
|
|
43
57
|
}, function (_ref2) {
|
|
44
58
|
var className = _ref2.className;
|
|
45
|
-
return
|
|
46
|
-
className: className
|
|
47
|
-
|
|
59
|
+
return (0, _react2.jsx)("div", {
|
|
60
|
+
className: className,
|
|
61
|
+
css: stackingStyles
|
|
62
|
+
}, (0, _react2.jsx)(_blanket.default, {
|
|
48
63
|
isTinted: true,
|
|
49
64
|
onBlanketClicked: onBlanketClicked,
|
|
50
65
|
testId: testId && testId
|
|
@@ -50,7 +50,7 @@ function _createSuper(Derived) { var hasNativeReflectConstruct = _isNativeReflec
|
|
|
50
50
|
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; } }
|
|
51
51
|
|
|
52
52
|
var packageName = "@atlaskit/drawer";
|
|
53
|
-
var packageVersion = "7.4.
|
|
53
|
+
var packageVersion = "7.4.3";
|
|
54
54
|
var createAndFireEventOnAtlaskit = (0, _analyticsNext.createAndFireEvent)('atlaskit');
|
|
55
55
|
|
|
56
56
|
var createAndFireOnClick = function createAndFireOnClick(createAnalyticsEvent, trigger) {
|
|
@@ -5,7 +5,7 @@ var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefau
|
|
|
5
5
|
Object.defineProperty(exports, "__esModule", {
|
|
6
6
|
value: true
|
|
7
7
|
});
|
|
8
|
-
exports.default = void 0;
|
|
8
|
+
exports.widths = exports.default = void 0;
|
|
9
9
|
|
|
10
10
|
var _react = require("react");
|
|
11
11
|
|
|
@@ -27,6 +27,7 @@ var widths = {
|
|
|
27
27
|
medium: 60 * (0, _constants.gridSize)(),
|
|
28
28
|
wide: 75 * (0, _constants.gridSize)()
|
|
29
29
|
};
|
|
30
|
+
exports.widths = widths;
|
|
30
31
|
var wrapperStyles = (0, _react2.css)({
|
|
31
32
|
display: 'flex',
|
|
32
33
|
height: '100vh',
|
package/dist/cjs/version.json
CHANGED
|
@@ -1,19 +1,30 @@
|
|
|
1
|
+
/** @jsx jsx */
|
|
1
2
|
import React from 'react';
|
|
3
|
+
import { css, jsx } from '@emotion/react';
|
|
2
4
|
import AkBlanket from '@atlaskit/blanket';
|
|
3
5
|
import { ExitingPersistence, FadeIn } from '@atlaskit/motion';
|
|
6
|
+
import { layers } from '@atlaskit/theme/constants';
|
|
4
7
|
import { animationTimingFunction, transitionDurationMs } from '../constants';
|
|
5
8
|
|
|
9
|
+
/**
|
|
10
|
+
* The FadeIn opacity transition creates a new stacking context so we need ensure layering is the same as @atlaskit/blanket
|
|
11
|
+
*/
|
|
12
|
+
const stackingStyles = css({
|
|
13
|
+
position: 'relative',
|
|
14
|
+
zIndex: layers.blanket()
|
|
15
|
+
});
|
|
6
16
|
/**
|
|
7
17
|
* A wrapper around `@atlaskit/blanket` that adds a fade in/out transition.
|
|
8
18
|
*/
|
|
19
|
+
|
|
9
20
|
const Blanket = ({
|
|
10
21
|
isOpen,
|
|
11
22
|
onBlanketClicked,
|
|
12
23
|
testId
|
|
13
24
|
}) => {
|
|
14
|
-
return
|
|
25
|
+
return jsx(ExitingPersistence, {
|
|
15
26
|
appear: true
|
|
16
|
-
}, isOpen &&
|
|
27
|
+
}, isOpen && jsx(FadeIn
|
|
17
28
|
/**
|
|
18
29
|
* We double the duration because the fade in keyframes have
|
|
19
30
|
* `opacity: 1` at `50%`.
|
|
@@ -31,9 +42,10 @@ const Blanket = ({
|
|
|
31
42
|
animationTimingFunction: animationTimingFunction
|
|
32
43
|
}, ({
|
|
33
44
|
className
|
|
34
|
-
}) =>
|
|
35
|
-
className: className
|
|
36
|
-
|
|
45
|
+
}) => jsx("div", {
|
|
46
|
+
className: className,
|
|
47
|
+
css: stackingStyles
|
|
48
|
+
}, jsx(AkBlanket, {
|
|
37
49
|
isTinted: true,
|
|
38
50
|
onBlanketClicked: onBlanketClicked,
|
|
39
51
|
testId: testId && testId
|
|
@@ -9,7 +9,7 @@ import { defaultFocusLockSettings } from '../constants';
|
|
|
9
9
|
import Blanket from './blanket';
|
|
10
10
|
import DrawerPrimitive from './primitives';
|
|
11
11
|
const packageName = "@atlaskit/drawer";
|
|
12
|
-
const packageVersion = "7.4.
|
|
12
|
+
const packageVersion = "7.4.3";
|
|
13
13
|
const createAndFireEventOnAtlaskit = createAndFireEvent('atlaskit');
|
|
14
14
|
|
|
15
15
|
const createAndFireOnClick = (createAnalyticsEvent, trigger) => createAndFireEventOnAtlaskit({
|
|
@@ -5,7 +5,7 @@ import { useMergeRefs } from 'use-callback-ref';
|
|
|
5
5
|
import { N0 } from '@atlaskit/theme/colors';
|
|
6
6
|
import { gridSize, layers } from '@atlaskit/theme/constants';
|
|
7
7
|
import usePreventProgrammaticScroll from './hooks/use-prevent-programmatic-scroll';
|
|
8
|
-
const widths = {
|
|
8
|
+
export const widths = {
|
|
9
9
|
full: '100vw',
|
|
10
10
|
extended: '95vw',
|
|
11
11
|
narrow: 45 * gridSize(),
|
package/dist/es2019/version.json
CHANGED
|
@@ -1,18 +1,29 @@
|
|
|
1
|
+
/** @jsx jsx */
|
|
1
2
|
import React from 'react';
|
|
3
|
+
import { css, jsx } from '@emotion/react';
|
|
2
4
|
import AkBlanket from '@atlaskit/blanket';
|
|
3
5
|
import { ExitingPersistence, FadeIn } from '@atlaskit/motion';
|
|
6
|
+
import { layers } from '@atlaskit/theme/constants';
|
|
4
7
|
import { animationTimingFunction, transitionDurationMs } from '../constants';
|
|
5
8
|
|
|
9
|
+
/**
|
|
10
|
+
* The FadeIn opacity transition creates a new stacking context so we need ensure layering is the same as @atlaskit/blanket
|
|
11
|
+
*/
|
|
12
|
+
var stackingStyles = css({
|
|
13
|
+
position: 'relative',
|
|
14
|
+
zIndex: layers.blanket()
|
|
15
|
+
});
|
|
6
16
|
/**
|
|
7
17
|
* A wrapper around `@atlaskit/blanket` that adds a fade in/out transition.
|
|
8
18
|
*/
|
|
19
|
+
|
|
9
20
|
var Blanket = function Blanket(_ref) {
|
|
10
21
|
var isOpen = _ref.isOpen,
|
|
11
22
|
onBlanketClicked = _ref.onBlanketClicked,
|
|
12
23
|
testId = _ref.testId;
|
|
13
|
-
return
|
|
24
|
+
return jsx(ExitingPersistence, {
|
|
14
25
|
appear: true
|
|
15
|
-
}, isOpen &&
|
|
26
|
+
}, isOpen && jsx(FadeIn
|
|
16
27
|
/**
|
|
17
28
|
* We double the duration because the fade in keyframes have
|
|
18
29
|
* `opacity: 1` at `50%`.
|
|
@@ -30,9 +41,10 @@ var Blanket = function Blanket(_ref) {
|
|
|
30
41
|
animationTimingFunction: animationTimingFunction
|
|
31
42
|
}, function (_ref2) {
|
|
32
43
|
var className = _ref2.className;
|
|
33
|
-
return
|
|
34
|
-
className: className
|
|
35
|
-
|
|
44
|
+
return jsx("div", {
|
|
45
|
+
className: className,
|
|
46
|
+
css: stackingStyles
|
|
47
|
+
}, jsx(AkBlanket, {
|
|
36
48
|
isTinted: true,
|
|
37
49
|
onBlanketClicked: onBlanketClicked,
|
|
38
50
|
testId: testId && testId
|
|
@@ -23,7 +23,7 @@ import { defaultFocusLockSettings } from '../constants';
|
|
|
23
23
|
import Blanket from './blanket';
|
|
24
24
|
import DrawerPrimitive from './primitives';
|
|
25
25
|
var packageName = "@atlaskit/drawer";
|
|
26
|
-
var packageVersion = "7.4.
|
|
26
|
+
var packageVersion = "7.4.3";
|
|
27
27
|
var createAndFireEventOnAtlaskit = createAndFireEvent('atlaskit');
|
|
28
28
|
|
|
29
29
|
var createAndFireOnClick = function createAndFireOnClick(createAnalyticsEvent, trigger) {
|
|
@@ -5,7 +5,7 @@ import { useMergeRefs } from 'use-callback-ref';
|
|
|
5
5
|
import { N0 } from '@atlaskit/theme/colors';
|
|
6
6
|
import { gridSize, layers } from '@atlaskit/theme/constants';
|
|
7
7
|
import usePreventProgrammaticScroll from './hooks/use-prevent-programmatic-scroll';
|
|
8
|
-
var widths = {
|
|
8
|
+
export var widths = {
|
|
9
9
|
full: '100vw',
|
|
10
10
|
extended: '95vw',
|
|
11
11
|
narrow: 45 * gridSize(),
|
package/dist/esm/version.json
CHANGED
|
@@ -1,4 +1,6 @@
|
|
|
1
|
+
/** @jsx jsx */
|
|
1
2
|
import React from 'react';
|
|
3
|
+
import { jsx } from '@emotion/react';
|
|
2
4
|
declare type BlanketProps = {
|
|
3
5
|
isOpen: boolean;
|
|
4
6
|
onBlanketClicked: (event: React.MouseEvent<HTMLDivElement, MouseEvent>) => void;
|
|
@@ -7,5 +9,5 @@ declare type BlanketProps = {
|
|
|
7
9
|
/**
|
|
8
10
|
* A wrapper around `@atlaskit/blanket` that adds a fade in/out transition.
|
|
9
11
|
*/
|
|
10
|
-
declare const Blanket: ({ isOpen, onBlanketClicked, testId }: BlanketProps) => JSX.Element;
|
|
12
|
+
declare const Blanket: ({ isOpen, onBlanketClicked, testId }: BlanketProps) => jsx.JSX.Element;
|
|
11
13
|
export default Blanket;
|
|
@@ -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;
|
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
/** @jsx jsx */
|
|
2
2
|
import { ReactElement, Ref } from 'react';
|
|
3
|
-
import { DrawerPrimitiveProps } from '../types';
|
|
3
|
+
import { DrawerPrimitiveProps, Widths } from '../types';
|
|
4
|
+
export declare const widths: Widths;
|
|
4
5
|
interface FocusLockRefTargetProps extends Pick<DrawerPrimitiveProps, 'width' | 'testId'> {
|
|
5
6
|
/**
|
|
6
7
|
* This must have two children explicitly as we target the second child as the Content.
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@atlaskit/drawer",
|
|
3
|
-
"version": "7.4.
|
|
3
|
+
"version": "7.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/"
|
|
@@ -32,7 +32,7 @@
|
|
|
32
32
|
"@atlaskit/motion": "^1.3.0",
|
|
33
33
|
"@atlaskit/portal": "^4.0.0",
|
|
34
34
|
"@atlaskit/theme": "^12.2.0",
|
|
35
|
-
"@atlaskit/tokens": "^0.
|
|
35
|
+
"@atlaskit/tokens": "^0.12.0",
|
|
36
36
|
"@babel/runtime": "^7.0.0",
|
|
37
37
|
"@emotion/react": "^11.7.1",
|
|
38
38
|
"bind-event-listener": "^2.1.1",
|
|
@@ -46,7 +46,7 @@
|
|
|
46
46
|
"react": "^16.8.0"
|
|
47
47
|
},
|
|
48
48
|
"devDependencies": {
|
|
49
|
-
"@atlaskit/button": "^16.
|
|
49
|
+
"@atlaskit/button": "^16.5.0",
|
|
50
50
|
"@atlaskit/checkbox": "^12.4.0",
|
|
51
51
|
"@atlaskit/code": "^14.4.0",
|
|
52
52
|
"@atlaskit/docs": "*",
|
|
@@ -60,9 +60,7 @@
|
|
|
60
60
|
"@atlaskit/visual-regression": "*",
|
|
61
61
|
"@atlaskit/webdriver-runner": "*",
|
|
62
62
|
"@atlassian/atlassian-frontend-prettier-config-1.0.1": "npm:@atlassian/atlassian-frontend-prettier-config@1.0.1",
|
|
63
|
-
"@testing-library/dom": "^8.17.1",
|
|
64
63
|
"@testing-library/react": "^12.1.5",
|
|
65
|
-
"enzyme": "^3.10.0",
|
|
66
64
|
"lodash": "^4.17.21",
|
|
67
65
|
"react-dom": "^16.8.0",
|
|
68
66
|
"react-lorem-component": "^0.13.0",
|
|
@@ -87,4 +85,4 @@
|
|
|
87
85
|
}
|
|
88
86
|
},
|
|
89
87
|
"prettier": "@atlassian/atlassian-frontend-prettier-config-1.0.1"
|
|
90
|
-
}
|
|
88
|
+
}
|
package/report.api.md
CHANGED
|
@@ -1,17 +1,23 @@
|
|
|
1
|
+
<!-- API Report Version: 2.2 -->
|
|
2
|
+
|
|
1
3
|
## API Report File for "@atlaskit/drawer"
|
|
2
4
|
|
|
3
|
-
> Do not edit this file.
|
|
5
|
+
> Do not edit this file. This report is auto-generated using [API Extractor](https://api-extractor.com/).
|
|
6
|
+
> [Learn more about API reports](https://hello.atlassian.net/wiki/spaces/UR/pages/1825484529/Package+API+Reports)
|
|
7
|
+
|
|
8
|
+
### Table of contents
|
|
4
9
|
|
|
5
|
-
|
|
6
|
-
Generated API Report version: 2.0
|
|
7
|
-
-->
|
|
10
|
+
- [Main Entry Types](#main-entry-types)
|
|
8
11
|
|
|
9
|
-
|
|
12
|
+
### Main Entry Types
|
|
13
|
+
|
|
14
|
+
<!--SECTION START: Main Entry Types-->
|
|
10
15
|
|
|
11
16
|
```ts
|
|
12
17
|
import { ComponentType } from 'react';
|
|
13
18
|
import { CSSObject } from '@emotion/react';
|
|
14
19
|
import { default as React_2 } from 'react';
|
|
20
|
+
import { ReactElement } from 'react';
|
|
15
21
|
import { ReactNode } from 'react';
|
|
16
22
|
import { SyntheticEvent } from 'react';
|
|
17
23
|
import { WithAnalyticsEventsProps } from '@atlaskit/analytics-next';
|
|
@@ -48,56 +54,54 @@ const _default: React_2.ForwardRefExoticComponent<
|
|
|
48
54
|
Pick<
|
|
49
55
|
Omit<DrawerProps, keyof WithAnalyticsEventsProps>,
|
|
50
56
|
| 'children'
|
|
51
|
-
| 'onKeyDown'
|
|
52
|
-
| 'isOpen'
|
|
53
|
-
| 'testId'
|
|
54
|
-
| 'zIndex'
|
|
55
57
|
| 'icon'
|
|
58
|
+
| 'isOpen'
|
|
56
59
|
| 'onClose'
|
|
57
60
|
| 'onCloseComplete'
|
|
61
|
+
| 'onKeyDown'
|
|
58
62
|
| 'onOpenComplete'
|
|
59
63
|
| 'overrides'
|
|
60
64
|
| 'shouldUnmountOnExit'
|
|
65
|
+
| 'testId'
|
|
66
|
+
| 'zIndex'
|
|
61
67
|
> &
|
|
62
68
|
Partial<
|
|
63
69
|
Pick<
|
|
64
70
|
Omit<DrawerProps, keyof WithAnalyticsEventsProps>,
|
|
65
|
-
|
|
66
|
-
| 'isFocusLockEnabled'
|
|
67
|
-
| 'autoFocusFirstElem'
|
|
68
|
-
| 'shouldReturnFocus'
|
|
71
|
+
'width' | keyof FocusLockSettings
|
|
69
72
|
>
|
|
70
73
|
> &
|
|
71
74
|
Partial<
|
|
72
75
|
Pick<
|
|
73
76
|
{
|
|
77
|
+
autoFocusFirstElem?:
|
|
78
|
+
| (() => HTMLElement | null)
|
|
79
|
+
| boolean
|
|
80
|
+
| undefined;
|
|
81
|
+
isFocusLockEnabled?: boolean | undefined;
|
|
82
|
+
shouldReturnFocus?: boolean | undefined;
|
|
74
83
|
width: DrawerWidth;
|
|
75
|
-
isFocusLockEnabled: boolean;
|
|
76
|
-
shouldReturnFocus: boolean;
|
|
77
|
-
autoFocusFirstElem: boolean;
|
|
78
84
|
},
|
|
79
85
|
never
|
|
80
86
|
>
|
|
81
87
|
> &
|
|
82
88
|
React_2.RefAttributes<any> &
|
|
83
89
|
WithContextProps,
|
|
84
|
-
| 'width'
|
|
85
|
-
| 'children'
|
|
86
|
-
| 'onKeyDown'
|
|
87
|
-
| 'key'
|
|
88
|
-
| 'isOpen'
|
|
89
|
-
| 'testId'
|
|
90
90
|
| 'analyticsContext'
|
|
91
|
-
| '
|
|
92
|
-
| 'autoFocusFirstElem'
|
|
93
|
-
| 'shouldReturnFocus'
|
|
94
|
-
| 'zIndex'
|
|
91
|
+
| 'children'
|
|
95
92
|
| 'icon'
|
|
93
|
+
| 'isOpen'
|
|
94
|
+
| 'key'
|
|
96
95
|
| 'onClose'
|
|
97
96
|
| 'onCloseComplete'
|
|
97
|
+
| 'onKeyDown'
|
|
98
98
|
| 'onOpenComplete'
|
|
99
99
|
| 'overrides'
|
|
100
100
|
| 'shouldUnmountOnExit'
|
|
101
|
+
| 'testId'
|
|
102
|
+
| 'width'
|
|
103
|
+
| 'zIndex'
|
|
104
|
+
| keyof FocusLockSettings
|
|
101
105
|
> &
|
|
102
106
|
React_2.RefAttributes<any>
|
|
103
107
|
>;
|
|
@@ -116,16 +120,16 @@ export type DefaultsType = {
|
|
|
116
120
|
};
|
|
117
121
|
|
|
118
122
|
// @public (undocumented)
|
|
119
|
-
export type DrawerPrimitiveDefaults = Pick<DefaultsType, '
|
|
123
|
+
export type DrawerPrimitiveDefaults = Pick<DefaultsType, 'Content' | 'Sidebar'>;
|
|
120
124
|
|
|
121
125
|
// @public (undocumented)
|
|
122
126
|
export type DrawerPrimitiveOverrides = Pick<
|
|
123
127
|
OverridesType,
|
|
124
|
-
'
|
|
128
|
+
'Content' | 'Sidebar'
|
|
125
129
|
>;
|
|
126
130
|
|
|
127
131
|
// @public (undocumented)
|
|
128
|
-
export interface DrawerPrimitiveProps extends BaseProps {
|
|
132
|
+
export interface DrawerPrimitiveProps extends BaseProps, FocusLockSettings {
|
|
129
133
|
// (undocumented)
|
|
130
134
|
in: boolean;
|
|
131
135
|
// (undocumented)
|
|
@@ -134,7 +138,7 @@ export interface DrawerPrimitiveProps extends BaseProps {
|
|
|
134
138
|
|
|
135
139
|
// @public (undocumented)
|
|
136
140
|
export type DrawerProps = BaseProps &
|
|
137
|
-
|
|
141
|
+
FocusLockSettings &
|
|
138
142
|
WithAnalyticsEventsProps & {
|
|
139
143
|
onKeyDown?: (event: SyntheticEvent) => void;
|
|
140
144
|
onClose?: (event: SyntheticEvent<HTMLElement>, analyticsEvent: any) => void;
|
|
@@ -146,9 +150,13 @@ export type DrawerProps = BaseProps &
|
|
|
146
150
|
export type DrawerWidth = 'extended' | 'full' | 'medium' | 'narrow' | 'wide';
|
|
147
151
|
|
|
148
152
|
// @public (undocumented)
|
|
149
|
-
export interface FocusLockProps {
|
|
150
|
-
|
|
151
|
-
|
|
153
|
+
export interface FocusLockProps extends FocusLockSettings {
|
|
154
|
+
children?: ReactElement;
|
|
155
|
+
}
|
|
156
|
+
|
|
157
|
+
// @public (undocumented)
|
|
158
|
+
interface FocusLockSettings {
|
|
159
|
+
autoFocusFirstElem?: (() => HTMLElement | null) | boolean;
|
|
152
160
|
isFocusLockEnabled?: boolean;
|
|
153
161
|
shouldReturnFocus?: boolean;
|
|
154
162
|
}
|
|
@@ -185,3 +193,5 @@ export type Widths = {
|
|
|
185
193
|
|
|
186
194
|
// (No @packageDocumentation comment for this package)
|
|
187
195
|
```
|
|
196
|
+
|
|
197
|
+
<!--SECTION END: Main Entry Types-->
|