@atlaskit/drawer 7.2.1 → 7.3.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +17 -0
- package/dist/cjs/components/blanket.js +1 -1
- package/dist/cjs/components/index.js +5 -3
- package/dist/cjs/components/primitives/icon-button.js +4 -2
- package/dist/cjs/version.json +1 -1
- package/dist/es2019/components/blanket.js +1 -1
- package/dist/es2019/components/index.js +4 -3
- package/dist/es2019/components/primitives/icon-button.js +4 -2
- package/dist/es2019/version.json +1 -1
- package/dist/esm/components/blanket.js +1 -1
- package/dist/esm/components/index.js +5 -3
- package/dist/esm/components/primitives/icon-button.js +4 -2
- package/dist/esm/version.json +1 -1
- package/dist/types/components/index.d.ts +2 -2
- package/dist/types/components/types.d.ts +6 -0
- package/dist/types-ts4.0/components/index.d.ts +2 -2
- package/dist/types-ts4.0/components/types.d.ts +6 -0
- package/package.json +12 -8
- package/report.api.md +61 -21
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,22 @@
|
|
|
1
1
|
# @atlaskit/drawer
|
|
2
2
|
|
|
3
|
+
## 7.3.1
|
|
4
|
+
|
|
5
|
+
### Patch Changes
|
|
6
|
+
|
|
7
|
+
- [`9de88fa1e1e`](https://bitbucket.org/atlassian/atlassian-frontend/commits/9de88fa1e1e) - Internal changes to include spacing tokens in component implementations.
|
|
8
|
+
|
|
9
|
+
## 7.3.0
|
|
10
|
+
|
|
11
|
+
### Minor Changes
|
|
12
|
+
|
|
13
|
+
- [`b975291711b`](https://bitbucket.org/atlassian/atlassian-frontend/commits/b975291711b) - Add zindex as prop to drawer
|
|
14
|
+
|
|
15
|
+
### Patch Changes
|
|
16
|
+
|
|
17
|
+
- [`a0653d05aa0`](https://bitbucket.org/atlassian/atlassian-frontend/commits/a0653d05aa0) - Add `testId` prop to internal blanket component, passthrough `testId` from Drawer to Blanket for testing purposes. No behaviour change.
|
|
18
|
+
- Updated dependencies
|
|
19
|
+
|
|
3
20
|
## 7.2.1
|
|
4
21
|
|
|
5
22
|
### Patch Changes
|
|
@@ -46,7 +46,7 @@ function _createSuper(Derived) { var hasNativeReflectConstruct = _isNativeReflec
|
|
|
46
46
|
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; } }
|
|
47
47
|
|
|
48
48
|
var packageName = "@atlaskit/drawer";
|
|
49
|
-
var packageVersion = "7.
|
|
49
|
+
var packageVersion = "7.3.1";
|
|
50
50
|
var createAndFireEventOnAtlaskit = (0, _analyticsNext.createAndFireEvent)('atlaskit');
|
|
51
51
|
|
|
52
52
|
var createAndFireOnClick = function createAndFireOnClick(createAnalyticsEvent, trigger) {
|
|
@@ -159,9 +159,11 @@ var DrawerBase = /*#__PURE__*/function (_Component) {
|
|
|
159
159
|
autoFocusFirstElem = _this$props3.autoFocusFirstElem,
|
|
160
160
|
isFocusLockEnabled = _this$props3.isFocusLockEnabled,
|
|
161
161
|
shouldReturnFocus = _this$props3.shouldReturnFocus,
|
|
162
|
-
overrides = _this$props3.overrides
|
|
162
|
+
overrides = _this$props3.overrides,
|
|
163
|
+
_this$props3$zIndex = _this$props3.zIndex,
|
|
164
|
+
zIndex = _this$props3$zIndex === void 0 ? 'unset' : _this$props3$zIndex;
|
|
163
165
|
return /*#__PURE__*/_react.default.createElement(_portal.default, {
|
|
164
|
-
zIndex:
|
|
166
|
+
zIndex: zIndex
|
|
165
167
|
}, /*#__PURE__*/_react.default.createElement(_blanket.default, {
|
|
166
168
|
isOpen: isOpen,
|
|
167
169
|
onBlanketClicked: this.handleBlanketClick,
|
|
@@ -17,8 +17,10 @@ var iconButtonStyles = (0, _react.css)({
|
|
|
17
17
|
display: 'flex',
|
|
18
18
|
width: 5 * gridSize,
|
|
19
19
|
height: 5 * gridSize,
|
|
20
|
-
|
|
21
|
-
|
|
20
|
+
// TODO Delete this comment after verifying spacing token -> previous value `2 * gridSize`
|
|
21
|
+
marginBottom: "var(--ds-scale-200, 16px)",
|
|
22
|
+
// TODO Delete this comment after verifying spacing token -> previous value `0`
|
|
23
|
+
padding: "var(--ds-scale-0, 0px)",
|
|
22
24
|
alignItems: 'center',
|
|
23
25
|
justifyContent: 'center',
|
|
24
26
|
background: 0,
|
package/dist/cjs/version.json
CHANGED
|
@@ -9,7 +9,7 @@ import Blanket from './blanket';
|
|
|
9
9
|
import FocusLock from './focus-lock';
|
|
10
10
|
import DrawerPrimitive from './primitives';
|
|
11
11
|
const packageName = "@atlaskit/drawer";
|
|
12
|
-
const packageVersion = "7.
|
|
12
|
+
const packageVersion = "7.3.1";
|
|
13
13
|
const createAndFireEventOnAtlaskit = createAndFireEvent('atlaskit');
|
|
14
14
|
|
|
15
15
|
const createAndFireOnClick = (createAnalyticsEvent, trigger) => createAndFireEventOnAtlaskit({
|
|
@@ -114,10 +114,11 @@ export class DrawerBase extends Component {
|
|
|
114
114
|
autoFocusFirstElem,
|
|
115
115
|
isFocusLockEnabled,
|
|
116
116
|
shouldReturnFocus,
|
|
117
|
-
overrides
|
|
117
|
+
overrides,
|
|
118
|
+
zIndex = 'unset'
|
|
118
119
|
} = this.props;
|
|
119
120
|
return /*#__PURE__*/React.createElement(Portal, {
|
|
120
|
-
zIndex:
|
|
121
|
+
zIndex: zIndex
|
|
121
122
|
}, /*#__PURE__*/React.createElement(Blanket, {
|
|
122
123
|
isOpen: isOpen,
|
|
123
124
|
onBlanketClicked: this.handleBlanketClick,
|
|
@@ -7,8 +7,10 @@ const iconButtonStyles = css({
|
|
|
7
7
|
display: 'flex',
|
|
8
8
|
width: 5 * gridSize,
|
|
9
9
|
height: 5 * gridSize,
|
|
10
|
-
|
|
11
|
-
|
|
10
|
+
// TODO Delete this comment after verifying spacing token -> previous value `2 * gridSize`
|
|
11
|
+
marginBottom: "var(--ds-scale-200, 16px)",
|
|
12
|
+
// TODO Delete this comment after verifying spacing token -> previous value `0`
|
|
13
|
+
padding: "var(--ds-scale-0, 0px)",
|
|
12
14
|
alignItems: 'center',
|
|
13
15
|
justifyContent: 'center',
|
|
14
16
|
background: 0,
|
package/dist/es2019/version.json
CHANGED
|
@@ -19,7 +19,7 @@ import Blanket from './blanket';
|
|
|
19
19
|
import FocusLock from './focus-lock';
|
|
20
20
|
import DrawerPrimitive from './primitives';
|
|
21
21
|
var packageName = "@atlaskit/drawer";
|
|
22
|
-
var packageVersion = "7.
|
|
22
|
+
var packageVersion = "7.3.1";
|
|
23
23
|
var createAndFireEventOnAtlaskit = createAndFireEvent('atlaskit');
|
|
24
24
|
|
|
25
25
|
var createAndFireOnClick = function createAndFireOnClick(createAnalyticsEvent, trigger) {
|
|
@@ -139,9 +139,11 @@ export var DrawerBase = /*#__PURE__*/function (_Component) {
|
|
|
139
139
|
autoFocusFirstElem = _this$props3.autoFocusFirstElem,
|
|
140
140
|
isFocusLockEnabled = _this$props3.isFocusLockEnabled,
|
|
141
141
|
shouldReturnFocus = _this$props3.shouldReturnFocus,
|
|
142
|
-
overrides = _this$props3.overrides
|
|
142
|
+
overrides = _this$props3.overrides,
|
|
143
|
+
_this$props3$zIndex = _this$props3.zIndex,
|
|
144
|
+
zIndex = _this$props3$zIndex === void 0 ? 'unset' : _this$props3$zIndex;
|
|
143
145
|
return /*#__PURE__*/React.createElement(Portal, {
|
|
144
|
-
zIndex:
|
|
146
|
+
zIndex: zIndex
|
|
145
147
|
}, /*#__PURE__*/React.createElement(Blanket, {
|
|
146
148
|
isOpen: isOpen,
|
|
147
149
|
onBlanketClicked: this.handleBlanketClick,
|
|
@@ -7,8 +7,10 @@ var iconButtonStyles = css({
|
|
|
7
7
|
display: 'flex',
|
|
8
8
|
width: 5 * gridSize,
|
|
9
9
|
height: 5 * gridSize,
|
|
10
|
-
|
|
11
|
-
|
|
10
|
+
// TODO Delete this comment after verifying spacing token -> previous value `2 * gridSize`
|
|
11
|
+
marginBottom: "var(--ds-scale-200, 16px)",
|
|
12
|
+
// TODO Delete this comment after verifying spacing token -> previous value `0`
|
|
13
|
+
padding: "var(--ds-scale-0, 0px)",
|
|
12
14
|
alignItems: 'center',
|
|
13
15
|
justifyContent: 'center',
|
|
14
16
|
background: 0,
|
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" | "isOpen" | "testId" | "icon" | "onCloseComplete" | "onOpenComplete" | "overrides" | "shouldUnmountOnExit"> & Partial<Pick<Omit<DrawerProps, keyof import("@atlaskit/analytics-next").WithAnalyticsEventsProps>, "width" | "isFocusLockEnabled" | "autoFocusFirstElem" | "shouldReturnFocus">> & Partial<Pick<{
|
|
25
|
+
declare const _default: React.ForwardRefExoticComponent<Pick<Pick<Omit<DrawerProps, keyof import("@atlaskit/analytics-next").WithAnalyticsEventsProps>, "children" | "onKeyDown" | "onClose" | "isOpen" | "testId" | "zIndex" | "icon" | "onCloseComplete" | "onOpenComplete" | "overrides" | "shouldUnmountOnExit"> & Partial<Pick<Omit<DrawerProps, keyof import("@atlaskit/analytics-next").WithAnalyticsEventsProps>, "width" | "isFocusLockEnabled" | "autoFocusFirstElem" | "shouldReturnFocus">> & Partial<Pick<{
|
|
26
26
|
width: DrawerWidth;
|
|
27
27
|
isFocusLockEnabled: boolean;
|
|
28
28
|
shouldReturnFocus: boolean;
|
|
29
29
|
autoFocusFirstElem: boolean;
|
|
30
|
-
}, never>> & React.RefAttributes<any> & import("@atlaskit/analytics-next").WithContextProps, "width" | "children" | "onKeyDown" | "key" | "onClose" | "isOpen" | "testId" | "analyticsContext" | "isFocusLockEnabled" | "autoFocusFirstElem" | "shouldReturnFocus" | "icon" | "onCloseComplete" | "onOpenComplete" | "overrides" | "shouldUnmountOnExit"> & React.RefAttributes<any>>;
|
|
30
|
+
}, never>> & React.RefAttributes<any> & import("@atlaskit/analytics-next").WithContextProps, "width" | "children" | "onKeyDown" | "key" | "onClose" | "isOpen" | "testId" | "analyticsContext" | "isFocusLockEnabled" | "autoFocusFirstElem" | "shouldReturnFocus" | "zIndex" | "icon" | "onCloseComplete" | "onOpenComplete" | "overrides" | "shouldUnmountOnExit"> & React.RefAttributes<any>>;
|
|
31
31
|
export default _default;
|
|
@@ -103,6 +103,12 @@ export declare type DrawerProps = BaseProps & FocusLockProps & WithAnalyticsEven
|
|
|
103
103
|
* Controls if the drawer is open or closed.
|
|
104
104
|
*/
|
|
105
105
|
isOpen: boolean;
|
|
106
|
+
/**
|
|
107
|
+
* Z-index that the popup should be displayed in.
|
|
108
|
+
* This is passed to the portal component.
|
|
109
|
+
* Defaults to `unset`.
|
|
110
|
+
*/
|
|
111
|
+
zIndex?: number;
|
|
106
112
|
};
|
|
107
113
|
export interface FocusLockProps {
|
|
108
114
|
/**
|
|
@@ -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" | "isOpen" | "testId" | "icon" | "onCloseComplete" | "onOpenComplete" | "overrides" | "shouldUnmountOnExit"> & Partial<Pick<Omit<DrawerProps, keyof import("@atlaskit/analytics-next").WithAnalyticsEventsProps>, "width" | "isFocusLockEnabled" | "autoFocusFirstElem" | "shouldReturnFocus">> & Partial<Pick<{
|
|
25
|
+
declare const _default: React.ForwardRefExoticComponent<Pick<Pick<Omit<DrawerProps, keyof import("@atlaskit/analytics-next").WithAnalyticsEventsProps>, "children" | "onKeyDown" | "onClose" | "isOpen" | "testId" | "zIndex" | "icon" | "onCloseComplete" | "onOpenComplete" | "overrides" | "shouldUnmountOnExit"> & Partial<Pick<Omit<DrawerProps, keyof import("@atlaskit/analytics-next").WithAnalyticsEventsProps>, "width" | "isFocusLockEnabled" | "autoFocusFirstElem" | "shouldReturnFocus">> & Partial<Pick<{
|
|
26
26
|
width: DrawerWidth;
|
|
27
27
|
isFocusLockEnabled: boolean;
|
|
28
28
|
shouldReturnFocus: boolean;
|
|
29
29
|
autoFocusFirstElem: boolean;
|
|
30
|
-
}, never>> & React.RefAttributes<any> & import("@atlaskit/analytics-next").WithContextProps, "width" | "children" | "onKeyDown" | "key" | "onClose" | "isOpen" | "testId" | "analyticsContext" | "isFocusLockEnabled" | "autoFocusFirstElem" | "shouldReturnFocus" | "icon" | "onCloseComplete" | "onOpenComplete" | "overrides" | "shouldUnmountOnExit"> & React.RefAttributes<any>>;
|
|
30
|
+
}, never>> & React.RefAttributes<any> & import("@atlaskit/analytics-next").WithContextProps, "width" | "children" | "onKeyDown" | "key" | "onClose" | "isOpen" | "testId" | "analyticsContext" | "isFocusLockEnabled" | "autoFocusFirstElem" | "shouldReturnFocus" | "zIndex" | "icon" | "onCloseComplete" | "onOpenComplete" | "overrides" | "shouldUnmountOnExit"> & React.RefAttributes<any>>;
|
|
31
31
|
export default _default;
|
|
@@ -103,6 +103,12 @@ export declare type DrawerProps = BaseProps & FocusLockProps & WithAnalyticsEven
|
|
|
103
103
|
* Controls if the drawer is open or closed.
|
|
104
104
|
*/
|
|
105
105
|
isOpen: boolean;
|
|
106
|
+
/**
|
|
107
|
+
* Z-index that the popup should be displayed in.
|
|
108
|
+
* This is passed to the portal component.
|
|
109
|
+
* Defaults to `unset`.
|
|
110
|
+
*/
|
|
111
|
+
zIndex?: number;
|
|
106
112
|
};
|
|
107
113
|
export interface FocusLockProps {
|
|
108
114
|
/**
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@atlaskit/drawer",
|
|
3
|
-
"version": "7.
|
|
3
|
+
"version": "7.3.1",
|
|
4
4
|
"description": "A drawer is a panel that slides in from the left side of the screen.",
|
|
5
5
|
"publishConfig": {
|
|
6
6
|
"registry": "https://registry.npmjs.org/"
|
|
@@ -15,7 +15,8 @@
|
|
|
15
15
|
"typesVersions": {
|
|
16
16
|
">=4.0 <4.5": {
|
|
17
17
|
"*": [
|
|
18
|
-
"dist/types-ts4.0/*"
|
|
18
|
+
"dist/types-ts4.0/*",
|
|
19
|
+
"dist/types-ts4.0/index.d.ts"
|
|
19
20
|
]
|
|
20
21
|
}
|
|
21
22
|
},
|
|
@@ -23,6 +24,7 @@
|
|
|
23
24
|
"atlaskit:src": "src/index.tsx",
|
|
24
25
|
"homepage": "https://atlassian.design/components/drawer",
|
|
25
26
|
"atlassian": {
|
|
27
|
+
"disableProductCI": true,
|
|
26
28
|
"team": "Design System Team",
|
|
27
29
|
"deprecatedAutoEntryPoints": true,
|
|
28
30
|
"releaseModel": "scheduled",
|
|
@@ -33,8 +35,8 @@
|
|
|
33
35
|
},
|
|
34
36
|
"dependencies": {
|
|
35
37
|
"@atlaskit/analytics-next": "^8.2.0",
|
|
36
|
-
"@atlaskit/blanket": "^12.
|
|
37
|
-
"@atlaskit/icon": "^21.
|
|
38
|
+
"@atlaskit/blanket": "^12.3.0",
|
|
39
|
+
"@atlaskit/icon": "^21.11.0",
|
|
38
40
|
"@atlaskit/motion": "^1.2.0",
|
|
39
41
|
"@atlaskit/portal": "^4.0.0",
|
|
40
42
|
"@atlaskit/theme": "^12.2.0",
|
|
@@ -50,15 +52,16 @@
|
|
|
50
52
|
},
|
|
51
53
|
"devDependencies": {
|
|
52
54
|
"@atlaskit/button": "^16.3.0",
|
|
53
|
-
"@atlaskit/checkbox": "^12.
|
|
54
|
-
"@atlaskit/code": "^14.
|
|
55
|
+
"@atlaskit/checkbox": "^12.4.0",
|
|
56
|
+
"@atlaskit/code": "^14.4.0",
|
|
55
57
|
"@atlaskit/docs": "*",
|
|
56
58
|
"@atlaskit/dropdown-menu": "^11.5.0",
|
|
57
59
|
"@atlaskit/ds-lib": "^2.1.0",
|
|
58
60
|
"@atlaskit/menu": "^1.3.0",
|
|
59
|
-
"@atlaskit/
|
|
61
|
+
"@atlaskit/modal-dialog": "^12.4.0",
|
|
62
|
+
"@atlaskit/section-message": "^6.3.0",
|
|
60
63
|
"@atlaskit/ssr": "*",
|
|
61
|
-
"@atlaskit/textarea": "^4.
|
|
64
|
+
"@atlaskit/textarea": "^4.5.0",
|
|
62
65
|
"@atlaskit/visual-regression": "*",
|
|
63
66
|
"@atlaskit/webdriver-runner": "*",
|
|
64
67
|
"@atlassian/atlassian-frontend-prettier-config-1.0.1": "npm:@atlassian/atlassian-frontend-prettier-config@1.0.1",
|
|
@@ -79,6 +82,7 @@
|
|
|
79
82
|
"dom-events": "use-bind-event-listener",
|
|
80
83
|
"design-system": "v1",
|
|
81
84
|
"analytics": "analytics-next",
|
|
85
|
+
"design-tokens": "spacing",
|
|
82
86
|
"theming": "tokens",
|
|
83
87
|
"styling": [
|
|
84
88
|
"static",
|
package/report.api.md
CHANGED
|
@@ -1,10 +1,12 @@
|
|
|
1
|
-
## API Report File for "@atlaskit/drawer"
|
|
1
|
+
## API Report File for "@atlaskit/drawer".
|
|
2
2
|
|
|
3
|
-
> Do not edit this file.
|
|
3
|
+
> Do not edit this file. This report is auto-generated by [API Extractor](https://api-extractor.com/).
|
|
4
|
+
|
|
5
|
+
[Learn more about API reports](https://hello.atlassian.net/wiki/spaces/UR/pages/1825484529/Package+API+Reports)
|
|
4
6
|
|
|
5
7
|
```ts
|
|
6
8
|
import { ComponentType } from 'react';
|
|
7
|
-
import { CSSObject } from '@emotion/
|
|
9
|
+
import { CSSObject } from '@emotion/react';
|
|
8
10
|
import { default as React_2 } from 'react';
|
|
9
11
|
import { ReactNode } from 'react';
|
|
10
12
|
import { SyntheticEvent } from 'react';
|
|
@@ -12,28 +14,44 @@ import { WithAnalyticsEventsProps } from '@atlaskit/analytics-next';
|
|
|
12
14
|
import { WithContextProps } from '@atlaskit/analytics-next';
|
|
13
15
|
|
|
14
16
|
export declare interface BaseProps {
|
|
15
|
-
/**
|
|
17
|
+
/**
|
|
18
|
+
* A unique hook to be used for testing.
|
|
19
|
+
*/
|
|
16
20
|
testId?: string;
|
|
17
|
-
/**
|
|
21
|
+
/**
|
|
22
|
+
* The content of the drawer.
|
|
23
|
+
*/
|
|
18
24
|
children?: ReactNode;
|
|
19
|
-
/**
|
|
25
|
+
/**
|
|
26
|
+
* Icon to be rendered in your drawer as a component, if available.
|
|
27
|
+
*/
|
|
20
28
|
icon?: ComponentType<any>;
|
|
21
|
-
/**
|
|
29
|
+
/**
|
|
30
|
+
* Available drawer sizes.
|
|
31
|
+
*/
|
|
22
32
|
width?: DrawerWidth;
|
|
23
|
-
/**
|
|
33
|
+
/**
|
|
34
|
+
* A callback function that will be called when the drawer has finished its opening transition.
|
|
35
|
+
*/
|
|
24
36
|
onOpenComplete?: (node: HTMLElement | null) => void;
|
|
25
|
-
/**
|
|
37
|
+
/**
|
|
38
|
+
* A callback function that will be called when the drawer has finished its close transition.
|
|
39
|
+
*/
|
|
26
40
|
onCloseComplete?: (node: HTMLElement | null) => void;
|
|
27
41
|
/**
|
|
28
|
-
*
|
|
42
|
+
* @deprecated Please avoid using this prop as we intend to remove the prop completely in a future release.
|
|
29
43
|
* Boolean that controls if drawer should be retained/discarded
|
|
30
|
-
|
|
44
|
+
*/
|
|
31
45
|
shouldUnmountOnExit?: boolean;
|
|
32
|
-
/**
|
|
46
|
+
/**
|
|
47
|
+
* Override drawer components.
|
|
48
|
+
*/
|
|
33
49
|
overrides?: OverridesType;
|
|
34
50
|
}
|
|
35
51
|
|
|
36
|
-
/**
|
|
52
|
+
/**
|
|
53
|
+
* Type of keyboard event that triggers which key will should close the drawer.
|
|
54
|
+
*/
|
|
37
55
|
export declare type CloseTrigger = 'backButton' | 'blanket' | 'escKey';
|
|
38
56
|
|
|
39
57
|
export declare type ContentCSSProps = Omit<ContentProps, 'cssFn'>;
|
|
@@ -53,6 +71,7 @@ declare const _default: React_2.ForwardRefExoticComponent<
|
|
|
53
71
|
| 'onKeyDown'
|
|
54
72
|
| 'isOpen'
|
|
55
73
|
| 'testId'
|
|
74
|
+
| 'zIndex'
|
|
56
75
|
| 'icon'
|
|
57
76
|
| 'onClose'
|
|
58
77
|
| 'onCloseComplete'
|
|
@@ -87,11 +106,12 @@ declare const _default: React_2.ForwardRefExoticComponent<
|
|
|
87
106
|
| 'onKeyDown'
|
|
88
107
|
| 'key'
|
|
89
108
|
| 'isOpen'
|
|
90
|
-
| 'analyticsContext'
|
|
91
109
|
| 'testId'
|
|
110
|
+
| 'analyticsContext'
|
|
92
111
|
| 'isFocusLockEnabled'
|
|
93
112
|
| 'autoFocusFirstElem'
|
|
94
113
|
| 'shouldReturnFocus'
|
|
114
|
+
| 'zIndex'
|
|
95
115
|
| 'icon'
|
|
96
116
|
| 'onClose'
|
|
97
117
|
| 'onCloseComplete'
|
|
@@ -132,12 +152,24 @@ export declare interface DrawerPrimitiveProps extends BaseProps {
|
|
|
132
152
|
export declare type DrawerProps = BaseProps &
|
|
133
153
|
FocusLockProps &
|
|
134
154
|
WithAnalyticsEventsProps & {
|
|
135
|
-
/**
|
|
155
|
+
/**
|
|
156
|
+
* Callback function called while the drawer is displayed and `keydown` event is triggered.
|
|
157
|
+
*/
|
|
136
158
|
onKeyDown?: (event: SyntheticEvent) => void;
|
|
137
|
-
/**
|
|
159
|
+
/**
|
|
160
|
+
* Callback function called when the drawer is closed.
|
|
161
|
+
*/
|
|
138
162
|
onClose?: (event: SyntheticEvent<HTMLElement>, analyticsEvent: any) => void;
|
|
139
|
-
/**
|
|
163
|
+
/**
|
|
164
|
+
* Controls if the drawer is open or closed.
|
|
165
|
+
*/
|
|
140
166
|
isOpen: boolean;
|
|
167
|
+
/**
|
|
168
|
+
* Z-index that the popup should be displayed in.
|
|
169
|
+
* This is passed to the portal component.
|
|
170
|
+
* Defaults to `unset`.
|
|
171
|
+
*/
|
|
172
|
+
zIndex?: number;
|
|
141
173
|
};
|
|
142
174
|
|
|
143
175
|
export declare type DrawerWidth =
|
|
@@ -148,13 +180,21 @@ export declare type DrawerWidth =
|
|
|
148
180
|
| 'wide';
|
|
149
181
|
|
|
150
182
|
export declare interface FocusLockProps {
|
|
151
|
-
/**
|
|
183
|
+
/**
|
|
184
|
+
* Controls whether to focus the first tabbable element inside the focus lock.
|
|
185
|
+
*/
|
|
152
186
|
autoFocusFirstElem?: boolean | (() => HTMLElement | null);
|
|
153
|
-
/**
|
|
187
|
+
/**
|
|
188
|
+
* Content inside the focus lock.
|
|
189
|
+
*/
|
|
154
190
|
children?: ReactNode;
|
|
155
|
-
/**
|
|
191
|
+
/**
|
|
192
|
+
* Whether the focus lock is active or not.
|
|
193
|
+
*/
|
|
156
194
|
isFocusLockEnabled?: boolean;
|
|
157
|
-
/**
|
|
195
|
+
/**
|
|
196
|
+
* Whether to return the focus to the previous active element on closing the drawer.
|
|
197
|
+
*/
|
|
158
198
|
shouldReturnFocus?: boolean;
|
|
159
199
|
}
|
|
160
200
|
|