@atlaskit/page-layout 1.6.0 → 1.6.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 +6 -0
- package/dist/cjs/version.json +1 -1
- package/dist/es2019/version.json +1 -1
- package/dist/esm/version.json +1 -1
- package/dist/types/common/types.d.ts +3 -3
- package/dist/types/common/utils.d.ts +1 -1
- package/dist/types/components/resize-control/grab-area.d.ts +1 -1
- package/dist/types/components/resize-control/types.d.ts +2 -2
- package/dist/types/components/skip-links/types.d.ts +2 -2
- package/dist/types/components/slots/internal/left-sidebar-inner.d.ts +1 -1
- package/dist/types/components/slots/internal/left-sidebar-outer.d.ts +1 -1
- package/dist/types/components/slots/internal/resizable-children-wrapper.d.ts +1 -1
- package/dist/types/components/slots/internal/slot-focus-ring.d.ts +1 -1
- package/dist/types/controllers/sidebar-resize-context.d.ts +3 -3
- package/dist/types/controllers/skip-link-context.d.ts +2 -2
- package/dist/types/controllers/types.d.ts +3 -3
- package/package.json +11 -3
package/CHANGELOG.md
CHANGED
package/dist/cjs/version.json
CHANGED
package/dist/es2019/version.json
CHANGED
package/dist/esm/version.json
CHANGED
|
@@ -91,7 +91,7 @@ export interface LeftSidebarProps extends SlotWidthProps {
|
|
|
91
91
|
*/
|
|
92
92
|
width?: number;
|
|
93
93
|
}
|
|
94
|
-
export
|
|
94
|
+
export type SidebarResizeControllerProps = {
|
|
95
95
|
/**
|
|
96
96
|
* React children!
|
|
97
97
|
*/
|
|
@@ -105,8 +105,8 @@ export declare type SidebarResizeControllerProps = {
|
|
|
105
105
|
*/
|
|
106
106
|
onLeftSidebarCollapse?: (leftSidebarState: LeftSidebarState) => void;
|
|
107
107
|
};
|
|
108
|
-
export
|
|
109
|
-
export
|
|
108
|
+
export type DimensionNames = 'leftPanelWidth' | 'bannerHeight' | 'topNavigationHeight' | 'leftSidebarWidth' | 'leftSidebarFlyoutWidth' | 'rightSidebarWidth' | 'rightPanelWidth';
|
|
109
|
+
export type Dimensions = Partial<Record<DimensionNames, number>>;
|
|
110
110
|
export interface PageLayoutProps extends SidebarResizeControllerProps {
|
|
111
111
|
skipLinksLabel?: string;
|
|
112
112
|
/**
|
|
@@ -2,7 +2,7 @@ import { DimensionNames, Dimensions } from './types';
|
|
|
2
2
|
declare const emptyGridState: Dimensions;
|
|
3
3
|
declare const mergeGridStateIntoStorage: (key: string, value: any) => void;
|
|
4
4
|
declare const getGridStateFromStorage: (key: string) => any;
|
|
5
|
-
declare const removeFromGridStateInStorage: (key: string, secondKey?: string
|
|
5
|
+
declare const removeFromGridStateInStorage: (key: string, secondKey?: string) => void;
|
|
6
6
|
declare const resolveDimension: (key: DimensionNames, dimension?: number, shouldPersist?: boolean) => any;
|
|
7
7
|
declare const getLeftPanelWidth: () => number;
|
|
8
8
|
declare const getLeftSidebarPercentage: (currentWidth: number, maxWidth: number) => number;
|
|
@@ -1,11 +1,11 @@
|
|
|
1
1
|
import { ButtonHTMLAttributes, ElementType, ReactElement } from 'react';
|
|
2
2
|
import { LeftSidebarState } from '../../controllers/sidebar-resize-context';
|
|
3
|
-
export
|
|
3
|
+
export type ResizeButtonProps = ButtonHTMLAttributes<HTMLButtonElement> & {
|
|
4
4
|
isLeftSidebarCollapsed: boolean;
|
|
5
5
|
label: string;
|
|
6
6
|
testId?: string;
|
|
7
7
|
};
|
|
8
|
-
export
|
|
8
|
+
export type ResizeControlProps = {
|
|
9
9
|
testId?: string;
|
|
10
10
|
overrides?: {
|
|
11
11
|
ResizeButton?: {
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
/** @jsx jsx */
|
|
2
2
|
import type { ReactNode } from 'react';
|
|
3
3
|
import { jsx } from '@emotion/react';
|
|
4
|
-
|
|
4
|
+
type ResizableChildrenWrapperProps = {
|
|
5
5
|
children: ReactNode;
|
|
6
6
|
isFlyoutOpen?: boolean;
|
|
7
7
|
isLeftSidebarCollapsed?: boolean;
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { KeyboardEvent, MouseEvent } from 'react';
|
|
2
|
-
export
|
|
2
|
+
export type LeftSidebarState = {
|
|
3
3
|
isFlyoutOpen: boolean;
|
|
4
4
|
isResizing: boolean;
|
|
5
5
|
isLeftSidebarCollapsed: boolean;
|
|
@@ -8,7 +8,7 @@ export declare type LeftSidebarState = {
|
|
|
8
8
|
flyoutLockCount: number;
|
|
9
9
|
isFixed: boolean;
|
|
10
10
|
};
|
|
11
|
-
export
|
|
11
|
+
export type SidebarResizeContextValue = {
|
|
12
12
|
isLeftSidebarCollapsed: boolean;
|
|
13
13
|
expandLeftSidebar: () => void;
|
|
14
14
|
collapseLeftSidebar: (event?: MouseEvent | KeyboardEvent, collapseWithoutTransition?: boolean) => void;
|
|
@@ -19,7 +19,7 @@ export declare const SidebarResizeContext: import("react").Context<SidebarResize
|
|
|
19
19
|
export declare const usePageLayoutResize: () => {
|
|
20
20
|
isLeftSidebarCollapsed: boolean;
|
|
21
21
|
expandLeftSidebar: () => void;
|
|
22
|
-
collapseLeftSidebar: (event?: MouseEvent
|
|
22
|
+
collapseLeftSidebar: (event?: MouseEvent | KeyboardEvent, collapseWithoutTransition?: boolean) => void;
|
|
23
23
|
leftSidebarState: LeftSidebarState;
|
|
24
24
|
};
|
|
25
25
|
/**
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
/// <reference types="react" />
|
|
2
|
-
import { SkipLinkContextProps } from './types';
|
|
2
|
+
import { SkipLinkContextProps, SkipLinkData } from './types';
|
|
3
3
|
export declare const SkipLinksContext: import("react").Context<SkipLinkContextProps>;
|
|
4
4
|
export declare const useSkipLinks: () => SkipLinkContextProps;
|
|
5
|
-
export declare const useSkipLink: (id?:
|
|
5
|
+
export declare const useSkipLink: (id?: SkipLinkData['id'], skipLinkTitle?: SkipLinkData['skipLinkTitle']) => void;
|
|
@@ -1,9 +1,9 @@
|
|
|
1
|
-
export
|
|
1
|
+
export type SkipLinkContextProps = {
|
|
2
2
|
skipLinksData: SkipLinkData[];
|
|
3
3
|
registerSkipLink: (skipLinkDate: SkipLinkData) => void;
|
|
4
4
|
unregisterSkipLink: (id: string | undefined) => void;
|
|
5
5
|
};
|
|
6
|
-
export
|
|
6
|
+
export type SkipLinkData = {
|
|
7
7
|
/**
|
|
8
8
|
* id for the element that will be skipped to
|
|
9
9
|
*/
|
|
@@ -17,6 +17,6 @@ export declare type SkipLinkData = {
|
|
|
17
17
|
*/
|
|
18
18
|
listIndex?: number;
|
|
19
19
|
};
|
|
20
|
-
export
|
|
20
|
+
export type SkipLinkI18n = {
|
|
21
21
|
title: string;
|
|
22
22
|
};
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@atlaskit/page-layout",
|
|
3
|
-
"version": "1.6.
|
|
3
|
+
"version": "1.6.1",
|
|
4
4
|
"description": "A collection of components which let you compose an application's page layout.",
|
|
5
5
|
"publishConfig": {
|
|
6
6
|
"registry": "https://registry.npmjs.org/"
|
|
@@ -12,6 +12,14 @@
|
|
|
12
12
|
"module": "dist/esm/index.js",
|
|
13
13
|
"module:es2019": "dist/es2019/index.js",
|
|
14
14
|
"types": "dist/types/index.d.ts",
|
|
15
|
+
"typesVersions": {
|
|
16
|
+
">=4.5 <4.9": {
|
|
17
|
+
"*": [
|
|
18
|
+
"dist/types-ts4.5/*",
|
|
19
|
+
"dist/types-ts4.5/index.d.ts"
|
|
20
|
+
]
|
|
21
|
+
}
|
|
22
|
+
},
|
|
15
23
|
"sideEffects": false,
|
|
16
24
|
"atlaskit:src": "src/index.tsx",
|
|
17
25
|
"atlassian": {
|
|
@@ -29,7 +37,7 @@
|
|
|
29
37
|
"@atlaskit/icon": "^21.12.0",
|
|
30
38
|
"@atlaskit/motion": "^1.4.0",
|
|
31
39
|
"@atlaskit/theme": "^12.5.0",
|
|
32
|
-
"@atlaskit/tokens": "^1.
|
|
40
|
+
"@atlaskit/tokens": "^1.4.0",
|
|
33
41
|
"@babel/runtime": "^7.0.0",
|
|
34
42
|
"@emotion/react": "^11.7.1",
|
|
35
43
|
"bind-event-listener": "^2.1.1",
|
|
@@ -66,7 +74,7 @@
|
|
|
66
74
|
"jest-emotion": "^10.0.32",
|
|
67
75
|
"raf-stub": "^2.0.1",
|
|
68
76
|
"storybook-addon-performance": "^0.16.0",
|
|
69
|
-
"typescript": "4.
|
|
77
|
+
"typescript": "~4.9.5"
|
|
70
78
|
},
|
|
71
79
|
"keywords": [
|
|
72
80
|
"atlaskit",
|