@atlaskit/drawer 7.3.1 → 7.4.0
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/components/index.js +16 -16
- package/dist/cjs/components/primitives/drawer-wrapper.js +79 -0
- package/dist/cjs/components/{focus-lock.js → primitives/focus-lock.js} +16 -4
- package/dist/cjs/components/primitives/hooks/use-prevent-programmatic-scroll.js +64 -0
- package/dist/cjs/components/primitives/index.js +31 -43
- package/dist/cjs/constants.js +8 -2
- package/dist/cjs/version.json +1 -1
- package/dist/es2019/components/index.js +9 -12
- package/dist/es2019/components/primitives/drawer-wrapper.js +63 -0
- package/dist/es2019/components/{focus-lock.js → primitives/focus-lock.js} +11 -4
- package/dist/es2019/components/primitives/hooks/use-prevent-programmatic-scroll.js +48 -0
- package/dist/es2019/components/primitives/index.js +31 -44
- package/dist/es2019/constants.js +6 -1
- package/dist/es2019/version.json +1 -1
- package/dist/esm/components/index.js +15 -15
- package/dist/esm/components/primitives/drawer-wrapper.js +63 -0
- package/dist/esm/components/{focus-lock.js → primitives/focus-lock.js} +13 -3
- package/dist/esm/components/primitives/hooks/use-prevent-programmatic-scroll.js +53 -0
- package/dist/esm/components/primitives/index.js +27 -40
- package/dist/esm/constants.js +5 -0
- package/dist/esm/version.json +1 -1
- package/dist/types/components/index.d.ts +8 -8
- package/dist/types/components/primitives/drawer-wrapper.d.ts +22 -0
- package/dist/types/components/primitives/focus-lock.d.ts +11 -0
- package/dist/types/components/primitives/hooks/use-prevent-programmatic-scroll.d.ts +9 -0
- package/dist/types/components/primitives/index.d.ts +1 -1
- package/dist/types/components/types.d.ts +12 -9
- package/dist/types/constants.d.ts +2 -1
- package/dist/types-ts4.0/components/index.d.ts +8 -8
- package/dist/types-ts4.0/components/primitives/drawer-wrapper.d.ts +25 -0
- package/dist/types-ts4.0/components/primitives/focus-lock.d.ts +11 -0
- package/dist/types-ts4.0/components/primitives/hooks/use-prevent-programmatic-scroll.d.ts +9 -0
- package/dist/types-ts4.0/components/primitives/index.d.ts +1 -1
- package/dist/types-ts4.0/components/types.d.ts +12 -9
- package/dist/types-ts4.0/constants.d.ts +2 -1
- package/package.json +8 -5
- package/report.api.md +49 -98
- package/dist/types/components/focus-lock.d.ts +0 -6
- package/dist/types-ts4.0/components/focus-lock.d.ts +0 -6
|
@@ -1,6 +1,7 @@
|
|
|
1
|
-
import type { DrawerWidth } from './components/types';
|
|
1
|
+
import type { DrawerWidth, FocusLockSettings } from './components/types';
|
|
2
2
|
export declare const transitionDuration = "0.22s";
|
|
3
3
|
export declare const transitionDurationMs = 220;
|
|
4
4
|
export declare const transitionTimingFunction: import("@atlaskit/motion/curves").AnimationCurve;
|
|
5
5
|
export declare const widths: DrawerWidth[];
|
|
6
6
|
export declare const animationTimingFunction: () => import("@atlaskit/motion/curves").AnimationCurve;
|
|
7
|
+
export declare const defaultFocusLockSettings: FocusLockSettings;
|
|
@@ -4,10 +4,10 @@ export declare class DrawerBase extends Component<DrawerProps, {
|
|
|
4
4
|
renderPortal: boolean;
|
|
5
5
|
}> {
|
|
6
6
|
static defaultProps: {
|
|
7
|
+
autoFocusFirstElem?: boolean | (() => HTMLElement | null) | undefined;
|
|
8
|
+
isFocusLockEnabled?: boolean | undefined;
|
|
9
|
+
shouldReturnFocus?: boolean | undefined;
|
|
7
10
|
width: DrawerWidth;
|
|
8
|
-
isFocusLockEnabled: boolean;
|
|
9
|
-
shouldReturnFocus: boolean;
|
|
10
|
-
autoFocusFirstElem: boolean;
|
|
11
11
|
};
|
|
12
12
|
state: {
|
|
13
13
|
renderPortal: boolean;
|
|
@@ -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" | "
|
|
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" | "isOpen" | "zIndex"> & Partial<Pick<Omit<DrawerProps, keyof import("@atlaskit/analytics-next").WithAnalyticsEventsProps>, "width" | keyof import("./types").FocusLockSettings>> & Partial<Pick<{
|
|
26
|
+
autoFocusFirstElem?: boolean | (() => HTMLElement | null) | undefined;
|
|
27
|
+
isFocusLockEnabled?: boolean | undefined;
|
|
28
|
+
shouldReturnFocus?: boolean | undefined;
|
|
26
29
|
width: DrawerWidth;
|
|
27
|
-
|
|
28
|
-
shouldReturnFocus: boolean;
|
|
29
|
-
autoFocusFirstElem: boolean;
|
|
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>>;
|
|
30
|
+
}, never>> & React.RefAttributes<any> & import("@atlaskit/analytics-next").WithContextProps, "width" | "children" | "onKeyDown" | "key" | "onClose" | "testId" | "icon" | "onOpenComplete" | "onCloseComplete" | "shouldUnmountOnExit" | "overrides" | "isOpen" | "analyticsContext" | "zIndex" | keyof import("./types").FocusLockSettings> & React.RefAttributes<any>>;
|
|
31
31
|
export default _default;
|
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
/** @jsx jsx */
|
|
2
|
+
import { ReactElement, Ref } from 'react';
|
|
3
|
+
import { DrawerPrimitiveProps } from '../types';
|
|
4
|
+
interface FocusLockRefTargetProps extends Pick<DrawerPrimitiveProps, 'width' | 'testId'> {
|
|
5
|
+
/**
|
|
6
|
+
* This must have two children explicitly as we target the second child as the Content.
|
|
7
|
+
*/
|
|
8
|
+
children: [
|
|
9
|
+
ReactElement,
|
|
10
|
+
ReactElement
|
|
11
|
+
];
|
|
12
|
+
/**
|
|
13
|
+
* A ref pointing to our drawer wrapper, passed to `onCloseComplete` and `onOpenComplete` callbacks.
|
|
14
|
+
*/
|
|
15
|
+
drawerRef: Ref<HTMLDivElement>;
|
|
16
|
+
/**
|
|
17
|
+
* The className coming from the SlideIn render callback.
|
|
18
|
+
*/
|
|
19
|
+
className?: string;
|
|
20
|
+
}
|
|
21
|
+
/**
|
|
22
|
+
* A wrapper that controls the styling of the drawer with a few hacks with refs to get our Touch±Scroll locks working.
|
|
23
|
+
*/
|
|
24
|
+
declare const DrawerWrapper: import("react").ForwardRefExoticComponent<FocusLockRefTargetProps & import("react").RefAttributes<HTMLElement>>;
|
|
25
|
+
export default DrawerWrapper;
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import { Component } from 'react';
|
|
2
|
+
import { FocusLockProps } from '../types';
|
|
3
|
+
export default class FocusLock extends Component<FocusLockProps> {
|
|
4
|
+
static defaultProps: {
|
|
5
|
+
autoFocusFirstElem?: boolean | (() => HTMLElement | null) | undefined;
|
|
6
|
+
isFocusLockEnabled?: boolean | undefined;
|
|
7
|
+
shouldReturnFocus?: boolean | undefined;
|
|
8
|
+
};
|
|
9
|
+
componentDidMount(): void;
|
|
10
|
+
render(): JSX.Element;
|
|
11
|
+
}
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Prevents programmatic scrolling of the viewport with `scrollIntoView`.
|
|
3
|
+
* Should be used in conjunction with a scroll lock to prevent a user from scrolling.
|
|
4
|
+
*
|
|
5
|
+
* ⚠️ This is copied from `packages/design-system/modal-dialog/src/internal/hooks/use-prevent-programmatic-scroll.tsx`
|
|
6
|
+
*
|
|
7
|
+
* @returns scroll top offset of the viewport
|
|
8
|
+
*/
|
|
9
|
+
export default function usePreventProgrammaticScroll(): number;
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
/** @jsx jsx */
|
|
2
2
|
import { jsx } from '@emotion/react';
|
|
3
3
|
import { DrawerPrimitiveProps } from '../types';
|
|
4
|
-
declare const DrawerPrimitive: ({ children, icon: Icon, onClose, onCloseComplete, onOpenComplete, overrides, testId, in: isOpen,
|
|
4
|
+
declare const DrawerPrimitive: ({ children, icon: Icon, onClose, onCloseComplete, onOpenComplete, overrides, testId, in: isOpen, shouldReturnFocus, autoFocusFirstElem, isFocusLockEnabled, width, }: DrawerPrimitiveProps) => jsx.JSX.Element;
|
|
5
5
|
export default DrawerPrimitive;
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { ComponentType, ReactNode, SyntheticEvent } from 'react';
|
|
1
|
+
import { ComponentType, ReactElement, ReactNode, SyntheticEvent } from 'react';
|
|
2
2
|
import { CSSObject } from '@emotion/react';
|
|
3
3
|
import { WithAnalyticsEventsProps } from '@atlaskit/analytics-next';
|
|
4
4
|
export declare type Widths = {
|
|
@@ -86,11 +86,11 @@ export interface ContentProps extends React.HTMLProps<HTMLDivElement> {
|
|
|
86
86
|
cssFn: (defaultStyles: CSSObject) => CSSObject;
|
|
87
87
|
}
|
|
88
88
|
export declare type ContentCSSProps = Omit<ContentProps, 'cssFn'>;
|
|
89
|
-
export interface DrawerPrimitiveProps extends BaseProps {
|
|
89
|
+
export interface DrawerPrimitiveProps extends BaseProps, FocusLockSettings {
|
|
90
90
|
in: boolean;
|
|
91
91
|
onClose: (event: SyntheticEvent<HTMLElement>) => void;
|
|
92
92
|
}
|
|
93
|
-
export declare type DrawerProps = BaseProps &
|
|
93
|
+
export declare type DrawerProps = BaseProps & FocusLockSettings & WithAnalyticsEventsProps & {
|
|
94
94
|
/**
|
|
95
95
|
* Callback function called while the drawer is displayed and `keydown` event is triggered.
|
|
96
96
|
*/
|
|
@@ -110,17 +110,13 @@ export declare type DrawerProps = BaseProps & FocusLockProps & WithAnalyticsEven
|
|
|
110
110
|
*/
|
|
111
111
|
zIndex?: number;
|
|
112
112
|
};
|
|
113
|
-
export interface
|
|
113
|
+
export interface FocusLockSettings {
|
|
114
114
|
/**
|
|
115
115
|
* Controls whether to focus the first tabbable element inside the focus lock.
|
|
116
116
|
*/
|
|
117
117
|
autoFocusFirstElem?: boolean | (() => HTMLElement | null);
|
|
118
118
|
/**
|
|
119
|
-
*
|
|
120
|
-
*/
|
|
121
|
-
children?: ReactNode;
|
|
122
|
-
/**
|
|
123
|
-
* Whether the focus lock is active or not.
|
|
119
|
+
* Whether the focus lock is active or not.
|
|
124
120
|
*/
|
|
125
121
|
isFocusLockEnabled?: boolean;
|
|
126
122
|
/**
|
|
@@ -128,6 +124,13 @@ export interface FocusLockProps {
|
|
|
128
124
|
*/
|
|
129
125
|
shouldReturnFocus?: boolean;
|
|
130
126
|
}
|
|
127
|
+
export interface FocusLockProps extends FocusLockSettings {
|
|
128
|
+
/**
|
|
129
|
+
* Content inside the focus lock.
|
|
130
|
+
* Must strictly be a ReactElement and it *must* be implemented to take a `ref` passed from `react-scrolllock` to enable Touch Scrolling.
|
|
131
|
+
*/
|
|
132
|
+
children?: ReactElement;
|
|
133
|
+
}
|
|
131
134
|
/**
|
|
132
135
|
* Type of keyboard event that triggers which key will should close the drawer.
|
|
133
136
|
*/
|
|
@@ -1,6 +1,7 @@
|
|
|
1
|
-
import type { DrawerWidth } from './components/types';
|
|
1
|
+
import type { DrawerWidth, FocusLockSettings } from './components/types';
|
|
2
2
|
export declare const transitionDuration = "0.22s";
|
|
3
3
|
export declare const transitionDurationMs = 220;
|
|
4
4
|
export declare const transitionTimingFunction: import("@atlaskit/motion/curves").AnimationCurve;
|
|
5
5
|
export declare const widths: DrawerWidth[];
|
|
6
6
|
export declare const animationTimingFunction: () => import("@atlaskit/motion/curves").AnimationCurve;
|
|
7
|
+
export declare const defaultFocusLockSettings: FocusLockSettings;
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@atlaskit/drawer",
|
|
3
|
-
"version": "7.
|
|
3
|
+
"version": "7.4.0",
|
|
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/"
|
|
@@ -37,27 +37,30 @@
|
|
|
37
37
|
"@atlaskit/analytics-next": "^8.2.0",
|
|
38
38
|
"@atlaskit/blanket": "^12.3.0",
|
|
39
39
|
"@atlaskit/icon": "^21.11.0",
|
|
40
|
-
"@atlaskit/motion": "^1.
|
|
40
|
+
"@atlaskit/motion": "^1.3.0",
|
|
41
41
|
"@atlaskit/portal": "^4.0.0",
|
|
42
42
|
"@atlaskit/theme": "^12.2.0",
|
|
43
43
|
"@atlaskit/tokens": "^0.10.0",
|
|
44
44
|
"@babel/runtime": "^7.0.0",
|
|
45
45
|
"@emotion/react": "^11.7.1",
|
|
46
|
+
"bind-event-listener": "^2.1.1",
|
|
46
47
|
"exenv": "^1.2.2",
|
|
47
48
|
"react-focus-lock": "^2.5.2",
|
|
48
|
-
"
|
|
49
|
+
"react-scrolllock": "^5.0.1",
|
|
50
|
+
"tiny-invariant": "^1.2.0",
|
|
51
|
+
"use-callback-ref": "^1.2.3"
|
|
49
52
|
},
|
|
50
53
|
"peerDependencies": {
|
|
51
54
|
"react": "^16.8.0"
|
|
52
55
|
},
|
|
53
56
|
"devDependencies": {
|
|
54
|
-
"@atlaskit/button": "^16.
|
|
57
|
+
"@atlaskit/button": "^16.4.0",
|
|
55
58
|
"@atlaskit/checkbox": "^12.4.0",
|
|
56
59
|
"@atlaskit/code": "^14.4.0",
|
|
57
60
|
"@atlaskit/docs": "*",
|
|
58
61
|
"@atlaskit/dropdown-menu": "^11.5.0",
|
|
59
62
|
"@atlaskit/ds-lib": "^2.1.0",
|
|
60
|
-
"@atlaskit/menu": "^1.
|
|
63
|
+
"@atlaskit/menu": "^1.4.0",
|
|
61
64
|
"@atlaskit/modal-dialog": "^12.4.0",
|
|
62
65
|
"@atlaskit/section-message": "^6.3.0",
|
|
63
66
|
"@atlaskit/ssr": "*",
|
package/report.api.md
CHANGED
|
@@ -1,6 +1,10 @@
|
|
|
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. It is a report generated by [API Extractor](https://api-extractor.com/).
|
|
4
|
+
|
|
5
|
+
<!--
|
|
6
|
+
Generated API Report version: 2.0
|
|
7
|
+
-->
|
|
4
8
|
|
|
5
9
|
[Learn more about API reports](https://hello.atlassian.net/wiki/spaces/UR/pages/1825484529/Package+API+Reports)
|
|
6
10
|
|
|
@@ -13,57 +17,33 @@ import { SyntheticEvent } from 'react';
|
|
|
13
17
|
import { WithAnalyticsEventsProps } from '@atlaskit/analytics-next';
|
|
14
18
|
import { WithContextProps } from '@atlaskit/analytics-next';
|
|
15
19
|
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
* A unique hook to be used for testing.
|
|
19
|
-
*/
|
|
20
|
-
testId?: string;
|
|
21
|
-
/**
|
|
22
|
-
* The content of the drawer.
|
|
23
|
-
*/
|
|
20
|
+
// @public (undocumented)
|
|
21
|
+
export interface BaseProps {
|
|
24
22
|
children?: ReactNode;
|
|
25
|
-
/**
|
|
26
|
-
* Icon to be rendered in your drawer as a component, if available.
|
|
27
|
-
*/
|
|
28
23
|
icon?: ComponentType<any>;
|
|
29
|
-
/**
|
|
30
|
-
* Available drawer sizes.
|
|
31
|
-
*/
|
|
32
|
-
width?: DrawerWidth;
|
|
33
|
-
/**
|
|
34
|
-
* A callback function that will be called when the drawer has finished its opening transition.
|
|
35
|
-
*/
|
|
36
|
-
onOpenComplete?: (node: HTMLElement | null) => void;
|
|
37
|
-
/**
|
|
38
|
-
* A callback function that will be called when the drawer has finished its close transition.
|
|
39
|
-
*/
|
|
40
24
|
onCloseComplete?: (node: HTMLElement | null) => void;
|
|
41
|
-
|
|
42
|
-
* @deprecated Please avoid using this prop as we intend to remove the prop completely in a future release.
|
|
43
|
-
* Boolean that controls if drawer should be retained/discarded
|
|
44
|
-
*/
|
|
45
|
-
shouldUnmountOnExit?: boolean;
|
|
46
|
-
/**
|
|
47
|
-
* Override drawer components.
|
|
48
|
-
*/
|
|
25
|
+
onOpenComplete?: (node: HTMLElement | null) => void;
|
|
49
26
|
overrides?: OverridesType;
|
|
27
|
+
// @deprecated (undocumented)
|
|
28
|
+
shouldUnmountOnExit?: boolean;
|
|
29
|
+
testId?: string;
|
|
30
|
+
width?: DrawerWidth;
|
|
50
31
|
}
|
|
51
32
|
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
*/
|
|
55
|
-
export declare type CloseTrigger = 'backButton' | 'blanket' | 'escKey';
|
|
33
|
+
// @public
|
|
34
|
+
export type CloseTrigger = 'backButton' | 'blanket' | 'escKey';
|
|
56
35
|
|
|
57
|
-
|
|
36
|
+
// @public (undocumented)
|
|
37
|
+
export type ContentCSSProps = Omit<ContentProps, 'cssFn'>;
|
|
58
38
|
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
*/
|
|
39
|
+
// @public (undocumented)
|
|
40
|
+
export interface ContentProps extends React.HTMLProps<HTMLDivElement> {
|
|
41
|
+
// @deprecated (undocumented)
|
|
63
42
|
cssFn: (defaultStyles: CSSObject) => CSSObject;
|
|
64
43
|
}
|
|
65
44
|
|
|
66
|
-
|
|
45
|
+
// @public (undocumented)
|
|
46
|
+
const _default: React_2.ForwardRefExoticComponent<
|
|
67
47
|
Pick<
|
|
68
48
|
Pick<
|
|
69
49
|
Omit<DrawerProps, keyof WithAnalyticsEventsProps>,
|
|
@@ -123,7 +103,8 @@ declare const _default: React_2.ForwardRefExoticComponent<
|
|
|
123
103
|
>;
|
|
124
104
|
export default _default;
|
|
125
105
|
|
|
126
|
-
|
|
106
|
+
// @public (undocumented)
|
|
107
|
+
export type DefaultsType = {
|
|
127
108
|
Sidebar: {
|
|
128
109
|
component: React.ComponentType<SidebarProps>;
|
|
129
110
|
cssFn: (defaultStyles: CSSObject) => CSSObject;
|
|
@@ -134,97 +115,67 @@ export declare type DefaultsType = {
|
|
|
134
115
|
};
|
|
135
116
|
};
|
|
136
117
|
|
|
137
|
-
|
|
138
|
-
|
|
139
|
-
'Sidebar' | 'Content'
|
|
140
|
-
>;
|
|
118
|
+
// @public (undocumented)
|
|
119
|
+
export type DrawerPrimitiveDefaults = Pick<DefaultsType, 'Sidebar' | 'Content'>;
|
|
141
120
|
|
|
142
|
-
|
|
121
|
+
// @public (undocumented)
|
|
122
|
+
export type DrawerPrimitiveOverrides = Pick<
|
|
143
123
|
OverridesType,
|
|
144
124
|
'Sidebar' | 'Content'
|
|
145
125
|
>;
|
|
146
126
|
|
|
147
|
-
|
|
127
|
+
// @public (undocumented)
|
|
128
|
+
export interface DrawerPrimitiveProps extends BaseProps {
|
|
129
|
+
// (undocumented)
|
|
148
130
|
in: boolean;
|
|
131
|
+
// (undocumented)
|
|
149
132
|
onClose: (event: SyntheticEvent<HTMLElement>) => void;
|
|
150
133
|
}
|
|
151
134
|
|
|
152
|
-
|
|
135
|
+
// @public (undocumented)
|
|
136
|
+
export type DrawerProps = BaseProps &
|
|
153
137
|
FocusLockProps &
|
|
154
138
|
WithAnalyticsEventsProps & {
|
|
155
|
-
/**
|
|
156
|
-
* Callback function called while the drawer is displayed and `keydown` event is triggered.
|
|
157
|
-
*/
|
|
158
139
|
onKeyDown?: (event: SyntheticEvent) => void;
|
|
159
|
-
/**
|
|
160
|
-
* Callback function called when the drawer is closed.
|
|
161
|
-
*/
|
|
162
140
|
onClose?: (event: SyntheticEvent<HTMLElement>, analyticsEvent: any) => void;
|
|
163
|
-
/**
|
|
164
|
-
* Controls if the drawer is open or closed.
|
|
165
|
-
*/
|
|
166
141
|
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
142
|
zIndex?: number;
|
|
173
143
|
};
|
|
174
144
|
|
|
175
|
-
|
|
176
|
-
|
|
177
|
-
|
|
178
|
-
|
|
179
|
-
|
|
180
|
-
| 'wide';
|
|
181
|
-
|
|
182
|
-
export declare interface FocusLockProps {
|
|
183
|
-
/**
|
|
184
|
-
* Controls whether to focus the first tabbable element inside the focus lock.
|
|
185
|
-
*/
|
|
145
|
+
// @public (undocumented)
|
|
146
|
+
export type DrawerWidth = 'extended' | 'full' | 'medium' | 'narrow' | 'wide';
|
|
147
|
+
|
|
148
|
+
// @public (undocumented)
|
|
149
|
+
export interface FocusLockProps {
|
|
186
150
|
autoFocusFirstElem?: boolean | (() => HTMLElement | null);
|
|
187
|
-
/**
|
|
188
|
-
* Content inside the focus lock.
|
|
189
|
-
*/
|
|
190
151
|
children?: ReactNode;
|
|
191
|
-
/**
|
|
192
|
-
* Whether the focus lock is active or not.
|
|
193
|
-
*/
|
|
194
152
|
isFocusLockEnabled?: boolean;
|
|
195
|
-
/**
|
|
196
|
-
* Whether to return the focus to the previous active element on closing the drawer.
|
|
197
|
-
*/
|
|
198
153
|
shouldReturnFocus?: boolean;
|
|
199
154
|
}
|
|
200
155
|
|
|
201
|
-
|
|
156
|
+
// @public (undocumented)
|
|
157
|
+
export type OverridesType = {
|
|
202
158
|
Sidebar?: {
|
|
203
159
|
component?: React.ComponentType<SidebarProps>;
|
|
204
|
-
/**
|
|
205
|
-
* @deprecated Please avoid using this prop as we intend to remove the prop completely in a future release. See DSP-2673 for more information.
|
|
206
|
-
*/
|
|
207
160
|
cssFn?: (defaultStyles: CSSObject) => CSSObject;
|
|
208
161
|
};
|
|
209
162
|
Content?: {
|
|
210
163
|
component?: React.ComponentType<ContentProps>;
|
|
211
|
-
/**
|
|
212
|
-
* @deprecated Please avoid using this prop as we intend to remove the prop completely in a future release. See DSP-2673 for more information.
|
|
213
|
-
*/
|
|
214
164
|
cssFn?: (defaultStyles: CSSObject) => CSSObject;
|
|
215
165
|
};
|
|
216
166
|
};
|
|
217
167
|
|
|
218
|
-
|
|
168
|
+
// @public (undocumented)
|
|
169
|
+
export type SidebarCSSProps = Omit<SidebarProps, 'cssFn'>;
|
|
219
170
|
|
|
220
|
-
|
|
221
|
-
|
|
222
|
-
|
|
223
|
-
*/
|
|
171
|
+
// @public (undocumented)
|
|
172
|
+
export interface SidebarProps extends React.HTMLProps<HTMLDivElement> {
|
|
173
|
+
// @deprecated (undocumented)
|
|
224
174
|
cssFn: (defaultStyles: CSSObject) => CSSObject;
|
|
225
175
|
}
|
|
226
176
|
|
|
227
|
-
|
|
177
|
+
// @public (undocumented)
|
|
178
|
+
export type Widths = {
|
|
228
179
|
extended: string;
|
|
229
180
|
full: string;
|
|
230
181
|
medium: number;
|
|
@@ -232,5 +183,5 @@ export declare type Widths = {
|
|
|
232
183
|
wide: number;
|
|
233
184
|
};
|
|
234
185
|
|
|
235
|
-
|
|
186
|
+
// (No @packageDocumentation comment for this package)
|
|
236
187
|
```
|