@atlaskit/page-layout 1.2.8 → 1.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 +16 -0
- package/__perf__/utils/perf-example.tsx +1 -1
- package/__perf__/utils/product-integration/atlassian-navigation.tsx +1 -1
- package/__perf__/utils/product-integration/notifications-popup.tsx +1 -1
- package/__perf__/utils/product-integration/sample-footer.tsx +1 -1
- package/__perf__/utils/product-integration/sample-header.tsx +1 -1
- package/__perf__/utils/product-integration/side-navigation.tsx +1 -1
- package/dist/cjs/components/resize-control/grab-area.js +6 -6
- package/dist/cjs/components/resize-control/index.js +7 -7
- package/dist/cjs/components/resize-control/resize-button.js +7 -7
- package/dist/cjs/components/resize-control/shadow.js +4 -4
- package/dist/cjs/components/skip-links/skip-link-components.js +10 -10
- package/dist/cjs/components/slots/banner.js +6 -6
- package/dist/cjs/components/slots/content.js +3 -3
- package/dist/cjs/components/slots/internal/left-sidebar-inner.js +7 -7
- package/dist/cjs/components/slots/internal/left-sidebar-outer.js +9 -9
- package/dist/cjs/components/slots/internal/resizable-children-wrapper.js +7 -7
- package/dist/cjs/components/slots/internal/slot-focus-ring.js +4 -4
- package/dist/cjs/components/slots/left-panel.js +6 -6
- package/dist/cjs/components/slots/left-sidebar-without-resize.js +4 -4
- package/dist/cjs/components/slots/left-sidebar.js +6 -6
- package/dist/cjs/components/slots/main.js +7 -7
- package/dist/cjs/components/slots/page-layout.js +5 -5
- package/dist/cjs/components/slots/right-panel.js +6 -6
- package/dist/cjs/components/slots/right-sidebar.js +9 -9
- package/dist/cjs/components/slots/top-navigation.js +6 -6
- package/dist/cjs/version.json +1 -1
- package/dist/es2019/components/resize-control/grab-area.js +1 -1
- package/dist/es2019/components/resize-control/index.js +1 -1
- package/dist/es2019/components/resize-control/resize-button.js +1 -1
- package/dist/es2019/components/resize-control/shadow.js +1 -1
- package/dist/es2019/components/skip-links/skip-link-components.js +1 -1
- package/dist/es2019/components/slots/banner.js +1 -1
- package/dist/es2019/components/slots/content.js +1 -1
- package/dist/es2019/components/slots/internal/left-sidebar-inner.js +1 -1
- package/dist/es2019/components/slots/internal/left-sidebar-outer.js +1 -1
- package/dist/es2019/components/slots/internal/resizable-children-wrapper.js +1 -1
- package/dist/es2019/components/slots/internal/slot-focus-ring.js +1 -1
- package/dist/es2019/components/slots/left-panel.js +1 -1
- package/dist/es2019/components/slots/left-sidebar-without-resize.js +1 -1
- package/dist/es2019/components/slots/left-sidebar.js +1 -1
- package/dist/es2019/components/slots/main.js +1 -1
- package/dist/es2019/components/slots/page-layout.js +1 -1
- package/dist/es2019/components/slots/right-panel.js +1 -1
- package/dist/es2019/components/slots/right-sidebar.js +1 -1
- package/dist/es2019/components/slots/top-navigation.js +1 -1
- package/dist/es2019/version.json +1 -1
- package/dist/esm/components/resize-control/grab-area.js +1 -1
- package/dist/esm/components/resize-control/index.js +1 -1
- package/dist/esm/components/resize-control/resize-button.js +1 -1
- package/dist/esm/components/resize-control/shadow.js +1 -1
- package/dist/esm/components/skip-links/skip-link-components.js +1 -1
- package/dist/esm/components/slots/banner.js +1 -1
- package/dist/esm/components/slots/content.js +1 -1
- package/dist/esm/components/slots/internal/left-sidebar-inner.js +1 -1
- package/dist/esm/components/slots/internal/left-sidebar-outer.js +1 -1
- package/dist/esm/components/slots/internal/resizable-children-wrapper.js +1 -1
- package/dist/esm/components/slots/internal/slot-focus-ring.js +1 -1
- package/dist/esm/components/slots/left-panel.js +1 -1
- package/dist/esm/components/slots/left-sidebar-without-resize.js +1 -1
- package/dist/esm/components/slots/left-sidebar.js +1 -1
- package/dist/esm/components/slots/main.js +1 -1
- package/dist/esm/components/slots/page-layout.js +1 -1
- package/dist/esm/components/slots/right-panel.js +1 -1
- package/dist/esm/components/slots/right-sidebar.js +1 -1
- package/dist/esm/components/slots/top-navigation.js +1 -1
- package/dist/esm/version.json +1 -1
- package/dist/types/components/resize-control/grab-area.d.ts +2 -1
- package/dist/types/components/resize-control/index.d.ts +2 -2
- package/dist/types/components/resize-control/resize-button.d.ts +2 -2
- package/dist/types/components/resize-control/shadow.d.ts +2 -2
- package/dist/types/components/skip-links/skip-link-components.d.ts +3 -2
- package/dist/types/components/slots/banner.d.ts +2 -2
- package/dist/types/components/slots/content.d.ts +2 -1
- package/dist/types/components/slots/internal/left-sidebar-inner.d.ts +2 -1
- package/dist/types/components/slots/internal/resizable-children-wrapper.d.ts +2 -1
- package/dist/types/components/slots/internal/slot-focus-ring.d.ts +2 -1
- package/dist/types/components/slots/left-panel.d.ts +2 -2
- package/dist/types/components/slots/left-sidebar-without-resize.d.ts +2 -2
- package/dist/types/components/slots/left-sidebar.d.ts +2 -2
- package/dist/types/components/slots/main.d.ts +2 -2
- package/dist/types/components/slots/page-layout.d.ts +2 -2
- package/dist/types/components/slots/right-panel.d.ts +2 -2
- package/dist/types/components/slots/right-sidebar.d.ts +2 -2
- package/dist/types/components/slots/top-navigation.d.ts +2 -2
- package/dist/types-ts4.0/common/constants.d.ts +47 -0
- package/dist/types-ts4.0/common/hooks/index.d.ts +2 -0
- package/dist/types-ts4.0/common/hooks/use-is-sidebar-collapsing.d.ts +2 -0
- package/dist/types-ts4.0/common/hooks/use-is-sidebar-dragging.d.ts +2 -0
- package/dist/types-ts4.0/common/safe-local-storage.d.ts +2 -0
- package/dist/types-ts4.0/common/types.d.ts +117 -0
- package/dist/types-ts4.0/common/utils.d.ts +13 -0
- package/dist/types-ts4.0/components/index.d.ts +12 -0
- package/dist/types-ts4.0/components/resize-control/grab-area.d.ts +9 -0
- package/dist/types-ts4.0/components/resize-control/index.d.ts +4 -0
- package/dist/types-ts4.0/components/resize-control/resize-button.d.ts +4 -0
- package/dist/types-ts4.0/components/resize-control/shadow.d.ts +6 -0
- package/dist/types-ts4.0/components/resize-control/types.d.ts +25 -0
- package/dist/types-ts4.0/components/skip-links/index.d.ts +2 -0
- package/dist/types-ts4.0/components/skip-links/skip-link-components.d.ts +11 -0
- package/dist/types-ts4.0/components/skip-links/types.d.ts +8 -0
- package/dist/types-ts4.0/components/skip-links/use-custom-skip-link.d.ts +2 -0
- package/dist/types-ts4.0/components/slots/banner.d.ts +12 -0
- package/dist/types-ts4.0/components/slots/content.d.ts +23 -0
- package/dist/types-ts4.0/components/slots/internal/left-sidebar-inner.d.ts +10 -0
- package/dist/types-ts4.0/components/slots/internal/left-sidebar-outer.d.ts +13 -0
- package/dist/types-ts4.0/components/slots/internal/resizable-children-wrapper.d.ts +11 -0
- package/dist/types-ts4.0/components/slots/internal/slot-focus-ring.d.ts +20 -0
- package/dist/types-ts4.0/components/slots/left-panel.d.ts +12 -0
- package/dist/types-ts4.0/components/slots/left-sidebar-without-resize.d.ts +12 -0
- package/dist/types-ts4.0/components/slots/left-sidebar.d.ts +12 -0
- package/dist/types-ts4.0/components/slots/main.d.ts +12 -0
- package/dist/types-ts4.0/components/slots/page-layout.d.ts +12 -0
- package/dist/types-ts4.0/components/slots/right-panel.d.ts +12 -0
- package/dist/types-ts4.0/components/slots/right-sidebar.d.ts +12 -0
- package/dist/types-ts4.0/components/slots/slot-dimensions.d.ts +7 -0
- package/dist/types-ts4.0/components/slots/top-navigation.d.ts +12 -0
- package/dist/types-ts4.0/controllers/index.d.ts +6 -0
- package/dist/types-ts4.0/controllers/sidebar-resize-context.d.ts +42 -0
- package/dist/types-ts4.0/controllers/sidebar-resize-controller.d.ts +3 -0
- package/dist/types-ts4.0/controllers/skip-link-context.d.ts +5 -0
- package/dist/types-ts4.0/controllers/skip-link-controller.d.ts +2 -0
- package/dist/types-ts4.0/controllers/types.d.ts +22 -0
- package/dist/types-ts4.0/controllers/use-page-layout-grid.d.ts +3 -0
- package/dist/types-ts4.0/controllers/use-update-css-vars.d.ts +2 -0
- package/dist/types-ts4.0/index.d.ts +4 -0
- package/package.json +17 -10
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
/** @jsx jsx */
|
|
2
|
+
import { ReactNode } from 'react';
|
|
3
|
+
import { jsx } from '@emotion/react';
|
|
4
|
+
interface ContentProps {
|
|
5
|
+
/**
|
|
6
|
+
* React children
|
|
7
|
+
*/
|
|
8
|
+
children: ReactNode;
|
|
9
|
+
/**
|
|
10
|
+
* A `testId` prop is provided for specified elements, which is a unique string that appears as a data attribute `data-testid` in the rendered code, serving as a hook for automated tests.
|
|
11
|
+
*/
|
|
12
|
+
testId?: string;
|
|
13
|
+
}
|
|
14
|
+
/**
|
|
15
|
+
* __Content__
|
|
16
|
+
*
|
|
17
|
+
* Provides a slot for your application content within the PageLayout.
|
|
18
|
+
*
|
|
19
|
+
* - [Examples](https://atlassian.design/components/page-layout/examples)
|
|
20
|
+
* - [Code](https://atlassian.design/components/page-layout/code)
|
|
21
|
+
*/
|
|
22
|
+
declare const Content: (props: ContentProps) => jsx.JSX.Element;
|
|
23
|
+
export default Content;
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
/** @jsx jsx */
|
|
2
|
+
import type { ReactNode } from 'react';
|
|
3
|
+
import { jsx } from '@emotion/react';
|
|
4
|
+
declare type LeftSidebarInnerProps = {
|
|
5
|
+
children: ReactNode;
|
|
6
|
+
isFixed?: boolean;
|
|
7
|
+
isFlyoutOpen?: boolean;
|
|
8
|
+
};
|
|
9
|
+
declare const LeftSidebarInner: ({ children, isFixed, isFlyoutOpen, }: LeftSidebarInnerProps) => jsx.JSX.Element;
|
|
10
|
+
export default LeftSidebarInner;
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
/** @jsx jsx */
|
|
2
|
+
import { MouseEventHandler, ReactNode } from 'react';
|
|
3
|
+
declare type LeftSidebarOuterProps = {
|
|
4
|
+
children: ReactNode;
|
|
5
|
+
isFixed?: boolean;
|
|
6
|
+
isFlyoutOpen?: boolean;
|
|
7
|
+
testId?: string;
|
|
8
|
+
id?: string;
|
|
9
|
+
onMouseOver?: MouseEventHandler;
|
|
10
|
+
onMouseLeave?: MouseEventHandler;
|
|
11
|
+
};
|
|
12
|
+
declare const _default: import("react").ForwardRefExoticComponent<LeftSidebarOuterProps & import("react").RefAttributes<HTMLDivElement>>;
|
|
13
|
+
export default _default;
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
/** @jsx jsx */
|
|
2
|
+
import type { ReactNode } from 'react';
|
|
3
|
+
import { jsx } from '@emotion/react';
|
|
4
|
+
declare type ResizableChildrenWrapperProps = {
|
|
5
|
+
children: ReactNode;
|
|
6
|
+
isFlyoutOpen?: boolean;
|
|
7
|
+
isLeftSidebarCollapsed?: boolean;
|
|
8
|
+
hasCollapsedState?: boolean;
|
|
9
|
+
};
|
|
10
|
+
declare const ResizableChildrenWrapper: ({ children, isLeftSidebarCollapsed, hasCollapsedState, isFlyoutOpen, }: ResizableChildrenWrapperProps) => jsx.JSX.Element;
|
|
11
|
+
export default ResizableChildrenWrapper;
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
/** @jsx jsx */
|
|
2
|
+
import type { ReactNode } from 'react';
|
|
3
|
+
import { jsx } from '@emotion/react';
|
|
4
|
+
declare type SlotFocusRingProps = {
|
|
5
|
+
children: (props: {
|
|
6
|
+
className: string;
|
|
7
|
+
}) => ReactNode;
|
|
8
|
+
isSidebar?: boolean;
|
|
9
|
+
};
|
|
10
|
+
/**
|
|
11
|
+
* We don't use `@atlaskit/focus-ring` here,
|
|
12
|
+
* because we need inset focus styles and:
|
|
13
|
+
*
|
|
14
|
+
* 1. If we set them directly to the layout element,
|
|
15
|
+
* then any child element's background will cover the shadow.
|
|
16
|
+
* 2. We cannot wrap `children` in `FocusRing`,
|
|
17
|
+
* because there's no guarantee the passed child takes `className`.
|
|
18
|
+
*/
|
|
19
|
+
declare const SlotFocusRing: ({ children, isSidebar }: SlotFocusRingProps) => jsx.JSX.Element;
|
|
20
|
+
export default SlotFocusRing;
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
import { jsx } from '@emotion/react';
|
|
2
|
+
import { SlotWidthProps } from '../../common/types';
|
|
3
|
+
/**
|
|
4
|
+
* __Left panel__
|
|
5
|
+
*
|
|
6
|
+
* Provides a slot for a left panel within the PageLayout.
|
|
7
|
+
*
|
|
8
|
+
* - [Examples](https://atlassian.design/components/page-layout/examples)
|
|
9
|
+
* - [Code](https://atlassian.design/components/page-layout/code)
|
|
10
|
+
*/
|
|
11
|
+
declare const LeftPanel: (props: SlotWidthProps) => jsx.JSX.Element;
|
|
12
|
+
export default LeftPanel;
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
import { jsx } from '@emotion/react';
|
|
2
|
+
import { SlotWidthProps } from '../../common/types';
|
|
3
|
+
/**
|
|
4
|
+
* __Left sidebar without resize__
|
|
5
|
+
*
|
|
6
|
+
* Provides a slot for a left sidebar without resize within the PageLayout.
|
|
7
|
+
*
|
|
8
|
+
* - [Examples](https://atlassian.design/components/page-layout/examples)
|
|
9
|
+
* - [Code](https://atlassian.design/components/page-layout/code)
|
|
10
|
+
*/
|
|
11
|
+
declare const LeftSidebarWithoutResize: (props: SlotWidthProps) => jsx.JSX.Element;
|
|
12
|
+
export default LeftSidebarWithoutResize;
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
import { jsx } from '@emotion/react';
|
|
2
|
+
import { LeftSidebarProps } from '../../common/types';
|
|
3
|
+
/**
|
|
4
|
+
* __Left sidebar__
|
|
5
|
+
*
|
|
6
|
+
* Provides a slot for a left sidebar within the PageLayout.
|
|
7
|
+
*
|
|
8
|
+
* - [Examples](https://atlassian.design/components/page-layout/examples)
|
|
9
|
+
* - [Code](https://atlassian.design/components/page-layout/code)
|
|
10
|
+
*/
|
|
11
|
+
declare const LeftSidebar: (props: LeftSidebarProps) => jsx.JSX.Element;
|
|
12
|
+
export default LeftSidebar;
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
import { jsx } from '@emotion/react';
|
|
2
|
+
import { SlotWidthProps } from '../../common/types';
|
|
3
|
+
/**
|
|
4
|
+
* __Main__
|
|
5
|
+
*
|
|
6
|
+
* Provides a slot for main content within the PageLayout.
|
|
7
|
+
*
|
|
8
|
+
* - [Examples](https://atlassian.design/components/page-layout/examples)
|
|
9
|
+
* - [Code](https://atlassian.design/components/page-layout/code)
|
|
10
|
+
*/
|
|
11
|
+
declare const Main: (props: SlotWidthProps) => jsx.JSX.Element;
|
|
12
|
+
export default Main;
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
import { jsx } from '@emotion/react';
|
|
2
|
+
import { PageLayoutProps } from '../../common/types';
|
|
3
|
+
/**
|
|
4
|
+
* __Page layout__
|
|
5
|
+
*
|
|
6
|
+
* A collection of components which let you compose an application's page layout.
|
|
7
|
+
*
|
|
8
|
+
* - [Examples](https://atlassian.design/components/page-layout/examples)
|
|
9
|
+
* - [Code](https://atlassian.design/components/page-layout/code)
|
|
10
|
+
*/
|
|
11
|
+
declare const PageLayout: ({ skipLinksLabel, children, testId, onLeftSidebarExpand, onLeftSidebarCollapse, }: PageLayoutProps) => jsx.JSX.Element;
|
|
12
|
+
export default PageLayout;
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
import { jsx } from '@emotion/react';
|
|
2
|
+
import { SlotWidthProps } from '../../common/types';
|
|
3
|
+
/**
|
|
4
|
+
* __Right panel__
|
|
5
|
+
*
|
|
6
|
+
* Provides a slot for a right panel within the PageLayout.
|
|
7
|
+
*
|
|
8
|
+
* - [Examples](https://atlassian.design/components/page-layout/examples)
|
|
9
|
+
* - [Code](https://atlassian.design/components/page-layout/code)
|
|
10
|
+
*/
|
|
11
|
+
declare const RightPanel: (props: SlotWidthProps) => jsx.JSX.Element;
|
|
12
|
+
export default RightPanel;
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
import { jsx } from '@emotion/react';
|
|
2
|
+
import { SlotWidthProps } from '../../common/types';
|
|
3
|
+
/**
|
|
4
|
+
* __Right sidebar__
|
|
5
|
+
*
|
|
6
|
+
* Provides a slot for a right sidebar within the PageLayout.
|
|
7
|
+
*
|
|
8
|
+
* - [Examples](https://atlassian.design/components/page-layout/examples)
|
|
9
|
+
* - [Code](https://atlassian.design/components/page-layout/code)
|
|
10
|
+
*/
|
|
11
|
+
declare const RightSidebar: (props: SlotWidthProps) => jsx.JSX.Element;
|
|
12
|
+
export default RightSidebar;
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
import { jsx } from '@emotion/react';
|
|
2
|
+
import { SlotHeightProps } from '../../common/types';
|
|
3
|
+
/**
|
|
4
|
+
* __Top navigation__
|
|
5
|
+
*
|
|
6
|
+
* Provides a slot for top navigation within the PageLayout.
|
|
7
|
+
*
|
|
8
|
+
* - [Examples](https://atlassian.design/components/page-layout/examples)
|
|
9
|
+
* - [Code](https://atlassian.design/components/page-layout/code)
|
|
10
|
+
*/
|
|
11
|
+
declare const TopNavigation: (props: SlotHeightProps) => jsx.JSX.Element;
|
|
12
|
+
export default TopNavigation;
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
export type { SkipLinkData } from './types';
|
|
2
|
+
export { default as publishGridState } from './use-page-layout-grid';
|
|
3
|
+
export { SidebarResizeContext, usePageLayoutResize, useLeftSidebarFlyoutLock, } from './sidebar-resize-context';
|
|
4
|
+
export { SidebarResizeController } from './sidebar-resize-controller';
|
|
5
|
+
export { useSkipLinks, useSkipLink } from './skip-link-context';
|
|
6
|
+
export { SkipLinksController } from './skip-link-controller';
|
|
@@ -0,0 +1,42 @@
|
|
|
1
|
+
import { KeyboardEvent, MouseEvent } from 'react';
|
|
2
|
+
export declare type LeftSidebarState = {
|
|
3
|
+
isFlyoutOpen: boolean;
|
|
4
|
+
isResizing: boolean;
|
|
5
|
+
isLeftSidebarCollapsed: boolean;
|
|
6
|
+
leftSidebarWidth: number;
|
|
7
|
+
lastLeftSidebarWidth: number;
|
|
8
|
+
flyoutLockCount: number;
|
|
9
|
+
isFixed: boolean;
|
|
10
|
+
};
|
|
11
|
+
export declare type SidebarResizeContextValue = {
|
|
12
|
+
isLeftSidebarCollapsed: boolean;
|
|
13
|
+
expandLeftSidebar: () => void;
|
|
14
|
+
collapseLeftSidebar: (event?: MouseEvent | KeyboardEvent, collapseWithoutTransition?: boolean) => void;
|
|
15
|
+
leftSidebarState: LeftSidebarState;
|
|
16
|
+
setLeftSidebarState: (value: LeftSidebarState | ((prevState: LeftSidebarState) => LeftSidebarState)) => void;
|
|
17
|
+
};
|
|
18
|
+
export declare const SidebarResizeContext: import("react").Context<SidebarResizeContextValue>;
|
|
19
|
+
export declare const usePageLayoutResize: () => {
|
|
20
|
+
isLeftSidebarCollapsed: boolean;
|
|
21
|
+
expandLeftSidebar: () => void;
|
|
22
|
+
collapseLeftSidebar: (event?: MouseEvent<Element, globalThis.MouseEvent> | KeyboardEvent<Element> | undefined, collapseWithoutTransition?: boolean | undefined) => void;
|
|
23
|
+
leftSidebarState: LeftSidebarState;
|
|
24
|
+
};
|
|
25
|
+
/**
|
|
26
|
+
* _**WARNING:**_ This hook is intended as a temporary solution and
|
|
27
|
+
* is likely to be removed in a future version of page-layout.
|
|
28
|
+
*
|
|
29
|
+
* ---
|
|
30
|
+
*
|
|
31
|
+
* This hook will prevent the left sidebar from automatically collapsing
|
|
32
|
+
* when it is in a flyout state.
|
|
33
|
+
*
|
|
34
|
+
* The intended use case for this hook is to allow popup menus in the
|
|
35
|
+
* left sidebar to be usable while it is in a flyout state.
|
|
36
|
+
*
|
|
37
|
+
* ## Usage
|
|
38
|
+
* The intended usage is to use this hook within the popup component
|
|
39
|
+
* you are rendering. This way the left sidebar will be locked for
|
|
40
|
+
* as long as the popup is open.
|
|
41
|
+
*/
|
|
42
|
+
export declare const useLeftSidebarFlyoutLock: () => void;
|
|
@@ -0,0 +1,5 @@
|
|
|
1
|
+
/// <reference types="react" />
|
|
2
|
+
import { SkipLinkContextProps } from './types';
|
|
3
|
+
export declare const SkipLinksContext: import("react").Context<SkipLinkContextProps>;
|
|
4
|
+
export declare const useSkipLinks: () => SkipLinkContextProps;
|
|
5
|
+
export declare const useSkipLink: (id?: string | undefined, skipLinkTitle?: string | undefined) => void;
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
export declare type SkipLinkContextProps = {
|
|
2
|
+
skipLinksData: SkipLinkData[];
|
|
3
|
+
registerSkipLink: (skipLinkDate: SkipLinkData) => void;
|
|
4
|
+
unregisterSkipLink: (id: string | undefined) => void;
|
|
5
|
+
};
|
|
6
|
+
export declare type SkipLinkData = {
|
|
7
|
+
/**
|
|
8
|
+
* id for the element that will be skipped to
|
|
9
|
+
*/
|
|
10
|
+
id: string;
|
|
11
|
+
/**
|
|
12
|
+
* Text for the link that will appear in the skip link menu
|
|
13
|
+
*/
|
|
14
|
+
skipLinkTitle: string;
|
|
15
|
+
/**
|
|
16
|
+
* Desired position in the skip link menu
|
|
17
|
+
*/
|
|
18
|
+
listIndex?: number;
|
|
19
|
+
};
|
|
20
|
+
export declare type SkipLinkI18n = {
|
|
21
|
+
title: string;
|
|
22
|
+
};
|
|
@@ -0,0 +1,4 @@
|
|
|
1
|
+
export { PageLayout, Main, Content, RightSidebar, LeftSidebar, LeftSidebarWithoutResize, RightPanel, LeftPanel, Banner, TopNavigation, useCustomSkipLink, } from './components';
|
|
2
|
+
export { LEFT_PANEL_WIDTH, RIGHT_PANEL_WIDTH, BANNER_HEIGHT, TOP_NAVIGATION_HEIGHT, LEFT_SIDEBAR_WIDTH, RIGHT_SIDEBAR_WIDTH, } from './common/constants';
|
|
3
|
+
export { usePageLayoutResize, useLeftSidebarFlyoutLock } from './controllers';
|
|
4
|
+
export type { SlotHeightProps, SlotWidthProps, Dimensions, LeftSidebarState, } from './common/types';
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@atlaskit/page-layout",
|
|
3
|
-
"version": "1.
|
|
3
|
+
"version": "1.3.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,13 @@
|
|
|
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.0 <4.5": {
|
|
17
|
+
"*": [
|
|
18
|
+
"dist/types-ts4.0/*"
|
|
19
|
+
]
|
|
20
|
+
}
|
|
21
|
+
},
|
|
15
22
|
"sideEffects": false,
|
|
16
23
|
"atlaskit:src": "src/index.tsx",
|
|
17
24
|
"atlassian": {
|
|
@@ -28,10 +35,10 @@
|
|
|
28
35
|
"@atlaskit/ds-lib": "^2.1.0",
|
|
29
36
|
"@atlaskit/icon": "^21.10.0",
|
|
30
37
|
"@atlaskit/motion": "^1.2.0",
|
|
31
|
-
"@atlaskit/theme": "^12.
|
|
38
|
+
"@atlaskit/theme": "^12.2.0",
|
|
32
39
|
"@atlaskit/tokens": "^0.10.0",
|
|
33
40
|
"@babel/runtime": "^7.0.0",
|
|
34
|
-
"@emotion/
|
|
41
|
+
"@emotion/react": "^11.7.1",
|
|
35
42
|
"bind-event-listener": "^2.1.1",
|
|
36
43
|
"raf-schd": "^4.0.3"
|
|
37
44
|
},
|
|
@@ -44,29 +51,29 @@
|
|
|
44
51
|
"@atlaskit/atlassian-notifications": "^0.3.0",
|
|
45
52
|
"@atlaskit/button": "^16.3.0",
|
|
46
53
|
"@atlaskit/docs": "*",
|
|
47
|
-
"@atlaskit/drawer": "^7.
|
|
54
|
+
"@atlaskit/drawer": "^7.2.0",
|
|
48
55
|
"@atlaskit/icon": "*",
|
|
49
|
-
"@atlaskit/logo": "^13.
|
|
56
|
+
"@atlaskit/logo": "^13.9.0",
|
|
50
57
|
"@atlaskit/menu": "^1.3.0",
|
|
51
58
|
"@atlaskit/notification-indicator": "^9.0.0",
|
|
52
59
|
"@atlaskit/notification-log-client": "^6.0.0",
|
|
53
60
|
"@atlaskit/onboarding": "^10.5.0",
|
|
54
61
|
"@atlaskit/popup": "^1.4.0",
|
|
55
|
-
"@atlaskit/section-message": "^6.
|
|
62
|
+
"@atlaskit/section-message": "^6.2.0",
|
|
56
63
|
"@atlaskit/side-navigation": "^1.2.0",
|
|
57
64
|
"@atlaskit/ssr": "*",
|
|
58
65
|
"@atlaskit/tooltip": "*",
|
|
59
66
|
"@atlaskit/visual-regression": "*",
|
|
60
67
|
"@atlaskit/webdriver-runner": "*",
|
|
61
68
|
"@atlassian/atlassian-frontend-prettier-config-1.0.1": "npm:@atlassian/atlassian-frontend-prettier-config@1.0.1",
|
|
62
|
-
"@testing-library/dom": "^
|
|
63
|
-
"@testing-library/react": "^
|
|
64
|
-
"@testing-library/react-hooks": "^
|
|
69
|
+
"@testing-library/dom": "^8.17.1",
|
|
70
|
+
"@testing-library/react": "^12.1.5",
|
|
71
|
+
"@testing-library/react-hooks": "^8.0.1",
|
|
65
72
|
"@types/raf-schd": "^4.0.1",
|
|
66
73
|
"jest-emotion": "^10.0.32",
|
|
67
74
|
"raf-stub": "^2.0.1",
|
|
68
75
|
"storybook-addon-performance": "^0.16.0",
|
|
69
|
-
"typescript": "4.
|
|
76
|
+
"typescript": "4.5.5"
|
|
70
77
|
},
|
|
71
78
|
"keywords": [
|
|
72
79
|
"atlaskit",
|