@atlaskit/drawer 7.1.3 → 7.1.6
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 +19 -0
- package/README.md +13 -0
- package/dist/cjs/components/index.js +1 -1
- package/dist/cjs/components/utils.js +3 -0
- package/dist/cjs/version.json +1 -1
- package/dist/es2019/components/index.js +1 -1
- package/dist/es2019/components/utils.js +3 -0
- package/dist/es2019/version.json +1 -1
- package/dist/esm/components/index.js +1 -1
- package/dist/esm/components/utils.js +3 -0
- package/dist/esm/version.json +1 -1
- package/dist/types/components/types.d.ts +28 -34
- package/dist/types/components/utils.d.ts +3 -0
- package/package.json +10 -6
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,24 @@
|
|
|
1
1
|
# @atlaskit/drawer
|
|
2
2
|
|
|
3
|
+
## 7.1.6
|
|
4
|
+
|
|
5
|
+
### Patch Changes
|
|
6
|
+
|
|
7
|
+
- [`ac9343c3ed4`](https://bitbucket.org/atlassian/atlassian-frontend/commits/ac9343c3ed4) - Replaces usage of deprecated design tokens. No visual or functional changes
|
|
8
|
+
- Updated dependencies
|
|
9
|
+
|
|
10
|
+
## 7.1.5
|
|
11
|
+
|
|
12
|
+
### Patch Changes
|
|
13
|
+
|
|
14
|
+
- Updated dependencies
|
|
15
|
+
|
|
16
|
+
## 7.1.4
|
|
17
|
+
|
|
18
|
+
### Patch Changes
|
|
19
|
+
|
|
20
|
+
- [`e9210b8a098`](https://bitbucket.org/atlassian/atlassian-frontend/commits/e9210b8a098) - Updates Drawer with deprecated status for `cssFn`/`overrides APIs.
|
|
21
|
+
|
|
3
22
|
## 7.1.3
|
|
4
23
|
|
|
5
24
|
### Patch Changes
|
package/README.md
ADDED
|
@@ -52,7 +52,7 @@ function _createSuper(Derived) { var hasNativeReflectConstruct = _isNativeReflec
|
|
|
52
52
|
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; } }
|
|
53
53
|
|
|
54
54
|
var packageName = "@atlaskit/drawer";
|
|
55
|
-
var packageVersion = "7.1.
|
|
55
|
+
var packageVersion = "7.1.6";
|
|
56
56
|
|
|
57
57
|
var OnlyChild = function OnlyChild(_ref) {
|
|
58
58
|
var children = _ref.children;
|
|
@@ -5,6 +5,9 @@ Object.defineProperty(exports, "__esModule", {
|
|
|
5
5
|
});
|
|
6
6
|
exports.createExtender = void 0;
|
|
7
7
|
|
|
8
|
+
/**
|
|
9
|
+
* @deprecated Please avoid using this function as we intend to remote it in a future release. See DSP-2673 for more information.
|
|
10
|
+
*/
|
|
8
11
|
var createExtender = function createExtender(defaults) {
|
|
9
12
|
var overrides = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : Object.create(Object.prototype);
|
|
10
13
|
|
package/dist/cjs/version.json
CHANGED
|
@@ -10,7 +10,7 @@ import FocusLock from './focus-lock';
|
|
|
10
10
|
import DrawerPrimitive from './primitives';
|
|
11
11
|
import { Fade } from './transitions';
|
|
12
12
|
const packageName = "@atlaskit/drawer";
|
|
13
|
-
const packageVersion = "7.1.
|
|
13
|
+
const packageVersion = "7.1.6";
|
|
14
14
|
|
|
15
15
|
const OnlyChild = ({
|
|
16
16
|
children
|
|
@@ -1,3 +1,6 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* @deprecated Please avoid using this function as we intend to remote it in a future release. See DSP-2673 for more information.
|
|
3
|
+
*/
|
|
1
4
|
export const createExtender = function createExtender(defaults,
|
|
2
5
|
/** We're defaulting to an Object.create call here to circumvent
|
|
3
6
|
* the fact that {} can't be reconciled
|
package/dist/es2019/version.json
CHANGED
|
@@ -21,7 +21,7 @@ import FocusLock from './focus-lock';
|
|
|
21
21
|
import DrawerPrimitive from './primitives';
|
|
22
22
|
import { Fade } from './transitions';
|
|
23
23
|
var packageName = "@atlaskit/drawer";
|
|
24
|
-
var packageVersion = "7.1.
|
|
24
|
+
var packageVersion = "7.1.6";
|
|
25
25
|
|
|
26
26
|
var OnlyChild = function OnlyChild(_ref) {
|
|
27
27
|
var children = _ref.children;
|
|
@@ -1,3 +1,6 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* @deprecated Please avoid using this function as we intend to remote it in a future release. See DSP-2673 for more information.
|
|
3
|
+
*/
|
|
1
4
|
export var createExtender = function createExtender(defaults) {
|
|
2
5
|
var overrides = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : Object.create(Object.prototype);
|
|
3
6
|
|
package/dist/esm/version.json
CHANGED
|
@@ -10,25 +10,21 @@ export declare type Widths = {
|
|
|
10
10
|
};
|
|
11
11
|
export declare type DrawerWidth = 'extended' | 'full' | 'medium' | 'narrow' | 'wide';
|
|
12
12
|
export interface BaseProps {
|
|
13
|
-
/** A unique hook to be used for testing */
|
|
13
|
+
/** A unique hook to be used for testing. */
|
|
14
14
|
testId?: string;
|
|
15
|
-
/** The content of the drawer */
|
|
15
|
+
/** The content of the drawer. */
|
|
16
16
|
children?: ReactNode;
|
|
17
|
-
/** Icon to be rendered in your drawer as a component, if available */
|
|
17
|
+
/** Icon to be rendered in your drawer as a component, if available. */
|
|
18
18
|
icon?: ComponentType<any>;
|
|
19
|
-
/** Available drawer sizes */
|
|
19
|
+
/** Available drawer sizes. */
|
|
20
20
|
width?: DrawerWidth;
|
|
21
|
-
/**
|
|
21
|
+
/** Callback function called when the drawer has finished its opening transition. */
|
|
22
22
|
onOpenComplete?: (node: HTMLElement) => void;
|
|
23
|
-
/**
|
|
23
|
+
/** Callback function called when the drawer has finished its close transition. */
|
|
24
24
|
onCloseComplete?: (node: HTMLElement) => void;
|
|
25
|
-
/**
|
|
25
|
+
/** Controls if drawer state should be retained/discarded on close. */
|
|
26
26
|
shouldUnmountOnExit?: boolean;
|
|
27
|
-
/**
|
|
28
|
-
* A prop for adding targeted customisations to the Drawer component
|
|
29
|
-
* For a detailed explanation of how to use this prop,
|
|
30
|
-
* please see the overrides section of the @atlaskit/drawer documentation.
|
|
31
|
-
*/
|
|
27
|
+
/** Override drawer components. */
|
|
32
28
|
overrides?: OverridesType;
|
|
33
29
|
}
|
|
34
30
|
export declare type DefaultsType = {
|
|
@@ -44,20 +40,32 @@ export declare type DefaultsType = {
|
|
|
44
40
|
export declare type OverridesType = {
|
|
45
41
|
Sidebar?: {
|
|
46
42
|
component?: React.ComponentType<SidebarProps>;
|
|
43
|
+
/**
|
|
44
|
+
* @deprecated Please avoid using this prop as we intend to remove the prop completely in a future release. See DSP-2673 for more information.
|
|
45
|
+
*/
|
|
47
46
|
cssFn?: (defaultStyles: CSSObject) => CSSObject;
|
|
48
47
|
};
|
|
49
48
|
Content?: {
|
|
50
49
|
component?: React.ComponentType<ContentProps>;
|
|
50
|
+
/**
|
|
51
|
+
* @deprecated Please avoid using this prop as we intend to remove the prop completely in a future release. See DSP-2673 for more information.
|
|
52
|
+
*/
|
|
51
53
|
cssFn?: (defaultStyles: CSSObject) => CSSObject;
|
|
52
54
|
};
|
|
53
55
|
};
|
|
54
56
|
export declare type DrawerPrimitiveDefaults = Pick<DefaultsType, 'Sidebar' | 'Content'>;
|
|
55
57
|
export declare type DrawerPrimitiveOverrides = Pick<OverridesType, 'Sidebar' | 'Content'>;
|
|
56
58
|
export interface SidebarProps extends React.HTMLProps<HTMLDivElement> {
|
|
59
|
+
/**
|
|
60
|
+
* @deprecated Please avoid using this prop as we intend to remove the prop completely in a future release. See DSP-2673 for more information.
|
|
61
|
+
*/
|
|
57
62
|
cssFn: (defaultStyles: CSSObject) => CSSObject;
|
|
58
63
|
}
|
|
59
64
|
export declare type SidebarCSSProps = Omit<SidebarProps, 'cssFn'>;
|
|
60
65
|
export interface ContentProps extends React.HTMLProps<HTMLDivElement> {
|
|
66
|
+
/**
|
|
67
|
+
* @deprecated Please avoid using this prop as we intend to remove the prop completely in a future release. See DSP-2673 for more information.
|
|
68
|
+
*/
|
|
61
69
|
cssFn: (defaultStyles: CSSObject) => CSSObject;
|
|
62
70
|
}
|
|
63
71
|
export declare type ContentCSSProps = Omit<ContentProps, 'cssFn'>;
|
|
@@ -66,36 +74,22 @@ export interface DrawerPrimitiveProps extends BaseProps {
|
|
|
66
74
|
onClose: (event: SyntheticEvent<HTMLElement>) => void;
|
|
67
75
|
}
|
|
68
76
|
export declare type DrawerProps = BaseProps & FocusLockProps & WithAnalyticsEventsProps & {
|
|
69
|
-
/**
|
|
70
|
-
Callback function that will be called when the drawer is displayed and `keydown` event is triggered.
|
|
71
|
-
*/
|
|
77
|
+
/** Callback function called while the drawer is displayed and `keydown` event is triggered. */
|
|
72
78
|
onKeyDown?: (event: SyntheticEvent) => void;
|
|
73
|
-
/**
|
|
74
|
-
Callback function to be called when the drawer will be closed.
|
|
75
|
-
*/
|
|
79
|
+
/** Callback function called when the drawer is closed. */
|
|
76
80
|
onClose?: (event: SyntheticEvent<HTMLElement>, analyticsEvent: any) => void;
|
|
77
|
-
/** Controls if the drawer is open or
|
|
81
|
+
/** Controls if the drawer is open or closed. */
|
|
78
82
|
isOpen: boolean;
|
|
79
83
|
};
|
|
80
84
|
export interface FocusLockProps {
|
|
81
|
-
/**
|
|
82
|
-
Boolean indicating whether to focus on the first tabbable element inside the focus lock.
|
|
83
|
-
*/
|
|
85
|
+
/** Controls whether to focus the first tabbable element inside the focus lock. */
|
|
84
86
|
autoFocusFirstElem?: boolean | (() => HTMLElement | null);
|
|
85
|
-
/**
|
|
86
|
-
Content inside the focus lock.
|
|
87
|
-
*/
|
|
87
|
+
/** Content inside the focus lock. */
|
|
88
88
|
children?: ReactNode;
|
|
89
|
-
/**
|
|
90
|
-
Whether the focus lock is active or not.
|
|
91
|
-
*/
|
|
89
|
+
/** Whether the focus lock is active or not. */
|
|
92
90
|
isFocusLockEnabled?: boolean;
|
|
93
|
-
/**
|
|
94
|
-
Whether to return the focus to the previous active element on closing the drawer
|
|
95
|
-
*/
|
|
91
|
+
/** Whether to return the focus to the previous active element on closing the drawer. */
|
|
96
92
|
shouldReturnFocus?: boolean;
|
|
97
93
|
}
|
|
98
|
-
/**
|
|
99
|
-
Type of keyboard event that triggers which key will should close the drawer.
|
|
100
|
-
*/
|
|
94
|
+
/** Type of keyboard event that triggers which key will should close the drawer. */
|
|
101
95
|
export declare type CloseTrigger = 'backButton' | 'blanket' | 'escKey';
|
|
@@ -1,4 +1,7 @@
|
|
|
1
1
|
declare type OverridesFunc<X extends Record<string, any>, Y extends Record<string, any>> = (key: string) => Record<string, any>;
|
|
2
2
|
export declare type ExtenderType = <D extends Record<string, any>, O extends Record<string, any>>(d: D, o?: O) => OverridesFunc<D, O>;
|
|
3
|
+
/**
|
|
4
|
+
* @deprecated Please avoid using this function as we intend to remote it in a future release. See DSP-2673 for more information.
|
|
5
|
+
*/
|
|
3
6
|
export declare const createExtender: ExtenderType;
|
|
4
7
|
export {};
|
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@atlaskit/drawer",
|
|
3
|
-
"version": "7.1.
|
|
4
|
-
"description": "
|
|
3
|
+
"version": "7.1.6",
|
|
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/"
|
|
7
7
|
},
|
|
@@ -14,6 +14,7 @@
|
|
|
14
14
|
"types": "dist/types/index.d.ts",
|
|
15
15
|
"sideEffects": false,
|
|
16
16
|
"atlaskit:src": "src/index.ts",
|
|
17
|
+
"homepage": "https://atlassian.design/components/drawer",
|
|
17
18
|
"atlassian": {
|
|
18
19
|
"team": "Design System Team",
|
|
19
20
|
"deprecatedAutoEntryPoints": true,
|
|
@@ -28,7 +29,7 @@
|
|
|
28
29
|
"@atlaskit/icon": "^21.10.0",
|
|
29
30
|
"@atlaskit/portal": "^4.0.0",
|
|
30
31
|
"@atlaskit/theme": "^12.1.0",
|
|
31
|
-
"@atlaskit/tokens": "^0.
|
|
32
|
+
"@atlaskit/tokens": "^0.8.0",
|
|
32
33
|
"@babel/runtime": "^7.0.0",
|
|
33
34
|
"@emotion/core": "^10.0.9",
|
|
34
35
|
"exenv": "^1.2.2",
|
|
@@ -40,12 +41,15 @@
|
|
|
40
41
|
"react": "^16.8.0"
|
|
41
42
|
},
|
|
42
43
|
"devDependencies": {
|
|
43
|
-
"@atlaskit/button": "^16.
|
|
44
|
+
"@atlaskit/button": "^16.2.0",
|
|
45
|
+
"@atlaskit/checkbox": "^12.3.9",
|
|
46
|
+
"@atlaskit/code": "^14.3.3",
|
|
44
47
|
"@atlaskit/docs": "*",
|
|
45
|
-
"@atlaskit/dropdown-menu": "^11.
|
|
46
|
-
"@atlaskit/menu": "^1.
|
|
48
|
+
"@atlaskit/dropdown-menu": "^11.1.0",
|
|
49
|
+
"@atlaskit/menu": "^1.3.0",
|
|
47
50
|
"@atlaskit/section-message": "^6.0.0",
|
|
48
51
|
"@atlaskit/ssr": "*",
|
|
52
|
+
"@atlaskit/textarea": "^4.3.1",
|
|
49
53
|
"@atlaskit/visual-regression": "*",
|
|
50
54
|
"@atlaskit/webdriver-runner": "*",
|
|
51
55
|
"@atlassian/atlassian-frontend-prettier-config-1.0.1": "npm:@atlassian/atlassian-frontend-prettier-config@1.0.1",
|