@atlaskit/drawer 7.10.0 → 7.12.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 +710 -691
- package/dist/cjs/components/blanket.js +16 -8
- package/dist/cjs/components/index.js +4 -2
- package/dist/cjs/components/primitives/content.js +41 -14
- package/dist/cjs/components/primitives/drawer-wrapper.js +10 -2
- package/dist/cjs/components/primitives/index.js +11 -2
- package/dist/cjs/components/primitives/sidebar.js +5 -1
- package/dist/es2019/components/blanket.js +8 -1
- package/dist/es2019/components/index.js +4 -2
- package/dist/es2019/components/primitives/content.js +37 -11
- package/dist/es2019/components/primitives/drawer-wrapper.js +11 -2
- package/dist/es2019/components/primitives/index.js +12 -2
- package/dist/es2019/components/primitives/sidebar.js +5 -1
- package/dist/esm/components/blanket.js +16 -8
- package/dist/esm/components/index.js +4 -2
- package/dist/esm/components/primitives/content.js +41 -13
- package/dist/esm/components/primitives/drawer-wrapper.js +11 -2
- package/dist/esm/components/primitives/index.js +12 -2
- package/dist/esm/components/primitives/sidebar.js +5 -1
- package/dist/types/components/blanket.d.ts +3 -0
- package/dist/types/components/index.d.ts +2 -2
- package/dist/types/components/primitives/content.d.ts +4 -1
- package/dist/types/components/primitives/drawer-wrapper.d.ts +3 -0
- package/dist/types/components/primitives/index.d.ts +4 -1
- package/dist/types/components/primitives/sidebar.d.ts +3 -0
- package/dist/types/components/types.d.ts +8 -0
- package/dist/types-ts4.5/components/blanket.d.ts +3 -0
- package/dist/types-ts4.5/components/index.d.ts +2 -2
- package/dist/types-ts4.5/components/primitives/content.d.ts +4 -1
- package/dist/types-ts4.5/components/primitives/drawer-wrapper.d.ts +3 -0
- package/dist/types-ts4.5/components/primitives/index.d.ts +4 -1
- package/dist/types-ts4.5/components/primitives/sidebar.d.ts +3 -0
- package/dist/types-ts4.5/components/types.d.ts +8 -0
- package/package.json +100 -102
- package/report.api.md +117 -128
package/report.api.md
CHANGED
|
@@ -2,7 +2,8 @@
|
|
|
2
2
|
|
|
3
3
|
## API Report File for "@atlaskit/drawer"
|
|
4
4
|
|
|
5
|
-
> Do not edit this file. This report is auto-generated using
|
|
5
|
+
> Do not edit this file. This report is auto-generated using
|
|
6
|
+
> [API Extractor](https://api-extractor.com/).
|
|
6
7
|
> [Learn more about API reports](https://hello.atlassian.net/wiki/spaces/UR/pages/1825484529/Package+API+Reports)
|
|
7
8
|
|
|
8
9
|
### Table of contents
|
|
@@ -26,15 +27,15 @@ import { WithContextProps } from '@atlaskit/analytics-next';
|
|
|
26
27
|
|
|
27
28
|
// @public (undocumented)
|
|
28
29
|
export interface BaseProps {
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
30
|
+
children?: ReactNode;
|
|
31
|
+
icon?: ComponentType<any>;
|
|
32
|
+
onCloseComplete?: (node: HTMLElement | null) => void;
|
|
33
|
+
onOpenComplete?: (node: HTMLElement | null) => void;
|
|
34
|
+
overrides?: OverridesType;
|
|
35
|
+
// @deprecated (undocumented)
|
|
36
|
+
shouldUnmountOnExit?: boolean;
|
|
37
|
+
testId?: string;
|
|
38
|
+
width?: DrawerWidth;
|
|
38
39
|
}
|
|
39
40
|
|
|
40
41
|
// @public
|
|
@@ -45,145 +46,133 @@ export type ContentCSSProps = Omit<ContentProps, 'cssFn'>;
|
|
|
45
46
|
|
|
46
47
|
// @public (undocumented)
|
|
47
48
|
export interface ContentProps extends React.HTMLProps<HTMLDivElement> {
|
|
48
|
-
|
|
49
|
-
|
|
49
|
+
// @deprecated (undocumented)
|
|
50
|
+
cssFn: (defaultStyles: CSSObject) => CSSObject;
|
|
50
51
|
}
|
|
51
52
|
|
|
52
53
|
// @public (undocumented)
|
|
53
54
|
const _default: React_2.ForwardRefExoticComponent<
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
| 'width'
|
|
105
|
-
| 'zIndex'
|
|
106
|
-
| keyof DrawerLabel
|
|
107
|
-
| keyof FocusLockSettings
|
|
108
|
-
> &
|
|
109
|
-
React_2.RefAttributes<any>
|
|
55
|
+
Pick<
|
|
56
|
+
Pick<
|
|
57
|
+
Omit<DrawerProps, keyof WithAnalyticsEventsProps>,
|
|
58
|
+
| 'children'
|
|
59
|
+
| 'icon'
|
|
60
|
+
| 'isOpen'
|
|
61
|
+
| 'onClose'
|
|
62
|
+
| 'onCloseComplete'
|
|
63
|
+
| 'onKeyDown'
|
|
64
|
+
| 'onOpenComplete'
|
|
65
|
+
| 'overrides'
|
|
66
|
+
| 'shouldUnmountOnExit'
|
|
67
|
+
| 'testId'
|
|
68
|
+
| 'zIndex'
|
|
69
|
+
| keyof DrawerLabel
|
|
70
|
+
> &
|
|
71
|
+
Partial<
|
|
72
|
+
Pick<Omit<DrawerProps, keyof WithAnalyticsEventsProps>, 'width' | keyof FocusLockSettings>
|
|
73
|
+
> &
|
|
74
|
+
Partial<
|
|
75
|
+
Pick<
|
|
76
|
+
{
|
|
77
|
+
autoFocusFirstElem?: (() => HTMLElement | null) | boolean | undefined;
|
|
78
|
+
isFocusLockEnabled?: boolean | undefined;
|
|
79
|
+
shouldReturnFocus?: boolean | undefined;
|
|
80
|
+
width: DrawerWidth;
|
|
81
|
+
},
|
|
82
|
+
never
|
|
83
|
+
>
|
|
84
|
+
> &
|
|
85
|
+
React_2.RefAttributes<any> &
|
|
86
|
+
WithContextProps,
|
|
87
|
+
| 'analyticsContext'
|
|
88
|
+
| 'children'
|
|
89
|
+
| 'icon'
|
|
90
|
+
| 'isOpen'
|
|
91
|
+
| 'key'
|
|
92
|
+
| 'onClose'
|
|
93
|
+
| 'onCloseComplete'
|
|
94
|
+
| 'onKeyDown'
|
|
95
|
+
| 'onOpenComplete'
|
|
96
|
+
| 'overrides'
|
|
97
|
+
| 'shouldUnmountOnExit'
|
|
98
|
+
| 'testId'
|
|
99
|
+
| 'width'
|
|
100
|
+
| 'zIndex'
|
|
101
|
+
| keyof DrawerLabel
|
|
102
|
+
| keyof FocusLockSettings
|
|
103
|
+
> &
|
|
104
|
+
React_2.RefAttributes<any>
|
|
110
105
|
>;
|
|
111
106
|
export default _default;
|
|
112
107
|
|
|
113
108
|
// @public (undocumented)
|
|
114
109
|
export type DefaultsType = {
|
|
115
|
-
|
|
116
|
-
|
|
117
|
-
|
|
118
|
-
|
|
119
|
-
|
|
120
|
-
|
|
121
|
-
|
|
122
|
-
|
|
110
|
+
Sidebar: {
|
|
111
|
+
component: React.ComponentType<SidebarProps>;
|
|
112
|
+
cssFn: (defaultStyles: CSSObject) => CSSObject;
|
|
113
|
+
};
|
|
114
|
+
Content: {
|
|
115
|
+
component: React.ComponentType<ContentProps>;
|
|
116
|
+
cssFn: (defaultStyles: CSSObject) => CSSObject;
|
|
117
|
+
};
|
|
123
118
|
};
|
|
124
119
|
|
|
125
120
|
// @public (undocumented)
|
|
126
121
|
interface DrawerLabel {
|
|
127
|
-
|
|
128
|
-
|
|
122
|
+
label?: string;
|
|
123
|
+
titleId?: string;
|
|
129
124
|
}
|
|
130
125
|
|
|
131
126
|
// @public (undocumented)
|
|
132
127
|
export type DrawerPrimitiveDefaults = Pick<DefaultsType, 'Content' | 'Sidebar'>;
|
|
133
128
|
|
|
134
129
|
// @public (undocumented)
|
|
135
|
-
export type DrawerPrimitiveOverrides = Pick<
|
|
136
|
-
OverridesType,
|
|
137
|
-
'Content' | 'Sidebar'
|
|
138
|
-
>;
|
|
130
|
+
export type DrawerPrimitiveOverrides = Pick<OverridesType, 'Content' | 'Sidebar'>;
|
|
139
131
|
|
|
140
132
|
// @public (undocumented)
|
|
141
|
-
export interface DrawerPrimitiveProps
|
|
142
|
-
|
|
143
|
-
|
|
144
|
-
|
|
145
|
-
|
|
146
|
-
in: boolean;
|
|
147
|
-
// (undocumented)
|
|
148
|
-
onClose: (event: SyntheticEvent<HTMLElement>) => void;
|
|
133
|
+
export interface DrawerPrimitiveProps extends BaseProps, FocusLockSettings, DrawerLabel {
|
|
134
|
+
// (undocumented)
|
|
135
|
+
in: boolean;
|
|
136
|
+
// (undocumented)
|
|
137
|
+
onClose: (event: SyntheticEvent<HTMLElement>) => void;
|
|
149
138
|
}
|
|
150
139
|
|
|
151
140
|
// @public (undocumented)
|
|
152
141
|
export type DrawerProps = BaseProps &
|
|
153
|
-
|
|
154
|
-
|
|
155
|
-
|
|
156
|
-
|
|
157
|
-
|
|
158
|
-
|
|
159
|
-
|
|
160
|
-
|
|
142
|
+
FocusLockSettings &
|
|
143
|
+
WithAnalyticsEventsProps &
|
|
144
|
+
DrawerLabel & {
|
|
145
|
+
onKeyDown?: (event: SyntheticEvent) => void;
|
|
146
|
+
onClose?: (event: SyntheticEvent<HTMLElement>, analyticsEvent: any) => void;
|
|
147
|
+
isOpen: boolean;
|
|
148
|
+
zIndex?: number;
|
|
149
|
+
};
|
|
161
150
|
|
|
162
151
|
// @public (undocumented)
|
|
163
152
|
export type DrawerWidth = 'extended' | 'full' | 'medium' | 'narrow' | 'wide';
|
|
164
153
|
|
|
165
154
|
// @public (undocumented)
|
|
166
155
|
export interface FocusLockProps extends FocusLockSettings {
|
|
167
|
-
|
|
156
|
+
children?: ReactElement;
|
|
168
157
|
}
|
|
169
158
|
|
|
170
159
|
// @public (undocumented)
|
|
171
160
|
interface FocusLockSettings {
|
|
172
|
-
|
|
173
|
-
|
|
174
|
-
|
|
161
|
+
autoFocusFirstElem?: (() => HTMLElement | null) | boolean;
|
|
162
|
+
isFocusLockEnabled?: boolean;
|
|
163
|
+
shouldReturnFocus?: boolean;
|
|
175
164
|
}
|
|
176
165
|
|
|
177
166
|
// @public (undocumented)
|
|
178
167
|
export type OverridesType = {
|
|
179
|
-
|
|
180
|
-
|
|
181
|
-
|
|
182
|
-
|
|
183
|
-
|
|
184
|
-
|
|
185
|
-
|
|
186
|
-
|
|
168
|
+
Sidebar?: {
|
|
169
|
+
component?: React.ComponentType<SidebarProps>;
|
|
170
|
+
cssFn?: (defaultStyles: CSSObject) => CSSObject;
|
|
171
|
+
};
|
|
172
|
+
Content?: {
|
|
173
|
+
component?: React.ComponentType<ContentProps>;
|
|
174
|
+
cssFn?: (defaultStyles: CSSObject) => CSSObject;
|
|
175
|
+
};
|
|
187
176
|
};
|
|
188
177
|
|
|
189
178
|
// @public (undocumented)
|
|
@@ -191,27 +180,27 @@ export type SidebarCSSProps = Omit<SidebarProps, 'cssFn'>;
|
|
|
191
180
|
|
|
192
181
|
// @public (undocumented)
|
|
193
182
|
export interface SidebarProps extends React.HTMLProps<HTMLDivElement> {
|
|
194
|
-
|
|
195
|
-
|
|
183
|
+
// @deprecated (undocumented)
|
|
184
|
+
cssFn: (defaultStyles: CSSObject) => CSSObject;
|
|
196
185
|
}
|
|
197
186
|
|
|
198
187
|
// @public (undocumented)
|
|
199
188
|
export type Widths = {
|
|
200
|
-
|
|
201
|
-
|
|
202
|
-
|
|
203
|
-
|
|
204
|
-
|
|
205
|
-
|
|
206
|
-
|
|
207
|
-
|
|
208
|
-
|
|
209
|
-
|
|
210
|
-
|
|
211
|
-
|
|
212
|
-
|
|
213
|
-
|
|
214
|
-
|
|
189
|
+
extended: {
|
|
190
|
+
width: string;
|
|
191
|
+
};
|
|
192
|
+
full: {
|
|
193
|
+
width: string;
|
|
194
|
+
};
|
|
195
|
+
medium: {
|
|
196
|
+
width: number;
|
|
197
|
+
};
|
|
198
|
+
narrow: {
|
|
199
|
+
width: number;
|
|
200
|
+
};
|
|
201
|
+
wide: {
|
|
202
|
+
width: number;
|
|
203
|
+
};
|
|
215
204
|
};
|
|
216
205
|
|
|
217
206
|
// (No @packageDocumentation comment for this package)
|
|
@@ -225,7 +214,7 @@ export type Widths = {
|
|
|
225
214
|
|
|
226
215
|
```json
|
|
227
216
|
{
|
|
228
|
-
|
|
217
|
+
"react": "^16.8.0"
|
|
229
218
|
}
|
|
230
219
|
```
|
|
231
220
|
|