@atlaskit/side-navigation 11.1.13 → 11.1.15
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 +15 -0
- package/dist/cjs/components/Item/button-item.js +2 -2
- package/dist/cjs/components/Item/custom-item.js +2 -2
- package/dist/cjs/components/Item/link-item.js +2 -2
- package/dist/cjs/components/Item/skeleton-item.js +2 -2
- package/dist/cjs/components/LoadingItems/index.js +2 -2
- package/dist/cjs/components/NavigationContent/container-css.js +33 -0
- package/dist/cjs/components/NavigationContent/index.js +2 -2
- package/dist/cjs/components/NavigationContent/inner-container-css.js +51 -0
- package/dist/cjs/components/NavigationContent/outer-container-css.js +44 -0
- package/dist/cjs/components/NestableNavigationContent/index.js +2 -2
- package/dist/cjs/components/NestableNavigationContent/nested-context.js +10 -0
- package/dist/cjs/components/NestableNavigationContent/use-nested-context.js +19 -0
- package/dist/cjs/components/NestableNavigationContent/use-should-nested-element-render.js +19 -0
- package/dist/cjs/components/NestingItem/index.js +4 -3
- package/dist/cjs/components/Section/heading-item.js +2 -3
- package/dist/cjs/components/Section/section.js +2 -2
- package/dist/cjs/components/Section/skeleton-heading-item.js +2 -3
- package/dist/cjs/index.js +8 -6
- package/dist/es2019/components/Item/button-item.js +1 -1
- package/dist/es2019/components/Item/custom-item.js +1 -1
- package/dist/es2019/components/Item/go-back-item.js +1 -0
- package/dist/es2019/components/Item/link-item.js +1 -1
- package/dist/es2019/components/Item/skeleton-item.js +2 -1
- package/dist/es2019/components/LoadingItems/index.js +1 -1
- package/dist/es2019/components/NavigationContent/container-css.js +25 -0
- package/dist/es2019/components/NavigationContent/index.js +1 -1
- package/dist/es2019/components/NavigationContent/inner-container-css.js +41 -0
- package/dist/es2019/components/NavigationContent/outer-container-css.js +36 -0
- package/dist/es2019/components/NestableNavigationContent/index.js +1 -1
- package/dist/es2019/components/NestableNavigationContent/nested-context.js +3 -0
- package/dist/es2019/components/NestableNavigationContent/use-nested-context.js +18 -0
- package/dist/es2019/components/NestableNavigationContent/use-should-nested-element-render.js +13 -0
- package/dist/es2019/components/NestingItem/index.js +2 -1
- package/dist/es2019/components/Section/heading-item.js +1 -2
- package/dist/es2019/components/Section/section.js +1 -1
- package/dist/es2019/components/Section/skeleton-heading-item.js +1 -2
- package/dist/es2019/index.js +4 -2
- package/dist/esm/components/Item/button-item.js +1 -1
- package/dist/esm/components/Item/custom-item.js +1 -1
- package/dist/esm/components/Item/go-back-item.js +1 -0
- package/dist/esm/components/Item/link-item.js +1 -1
- package/dist/esm/components/Item/skeleton-item.js +2 -1
- package/dist/esm/components/LoadingItems/index.js +1 -1
- package/dist/esm/components/NavigationContent/container-css.js +27 -0
- package/dist/esm/components/NavigationContent/index.js +1 -1
- package/dist/esm/components/NavigationContent/inner-container-css.js +44 -0
- package/dist/esm/components/NavigationContent/outer-container-css.js +38 -0
- package/dist/esm/components/NestableNavigationContent/index.js +1 -1
- package/dist/esm/components/NestableNavigationContent/nested-context.js +3 -0
- package/dist/esm/components/NestableNavigationContent/use-nested-context.js +13 -0
- package/dist/esm/components/NestableNavigationContent/use-should-nested-element-render.js +13 -0
- package/dist/esm/components/NestingItem/index.js +2 -1
- package/dist/esm/components/Section/heading-item.js +1 -2
- package/dist/esm/components/Section/section.js +1 -1
- package/dist/esm/components/Section/skeleton-heading-item.js +1 -2
- package/dist/esm/index.js +4 -2
- package/dist/types/components/Item/button-item.d.ts +0 -1
- package/dist/types/components/Item/custom-item.d.ts +3 -2
- package/dist/types/components/Item/go-back-item.d.ts +0 -1
- package/dist/types/components/Item/link-item.d.ts +0 -1
- package/dist/types/components/Item/skeleton-item.d.ts +0 -1
- package/dist/types/components/NavigationContent/container-css.d.ts +18 -0
- package/dist/types/components/NavigationContent/inner-container-css.d.ts +34 -0
- package/dist/types/components/NavigationContent/outer-container-css.d.ts +36 -0
- package/dist/types/components/NestableNavigationContent/{context.d.ts → nested-context.d.ts} +0 -15
- package/dist/types/components/NestableNavigationContent/use-nested-context.d.ts +2 -0
- package/dist/types/components/NestableNavigationContent/use-should-nested-element-render.d.ts +3 -0
- package/dist/types/components/Section/heading-item.d.ts +3 -2
- package/dist/types/components/Section/skeleton-heading-item.d.ts +3 -2
- package/dist/types/index.d.ts +12 -8
- package/dist/types-ts4.5/components/Item/button-item.d.ts +0 -1
- package/dist/types-ts4.5/components/Item/custom-item.d.ts +3 -2
- package/dist/types-ts4.5/components/Item/go-back-item.d.ts +0 -1
- package/dist/types-ts4.5/components/Item/link-item.d.ts +0 -1
- package/dist/types-ts4.5/components/Item/skeleton-item.d.ts +0 -1
- package/dist/types-ts4.5/components/NavigationContent/container-css.d.ts +18 -0
- package/dist/types-ts4.5/components/NavigationContent/inner-container-css.d.ts +34 -0
- package/dist/types-ts4.5/components/NavigationContent/outer-container-css.d.ts +36 -0
- package/dist/types-ts4.5/components/NestableNavigationContent/{context.d.ts → nested-context.d.ts} +0 -15
- package/dist/types-ts4.5/components/NestableNavigationContent/use-nested-context.d.ts +2 -0
- package/dist/types-ts4.5/components/NestableNavigationContent/use-should-nested-element-render.d.ts +3 -0
- package/dist/types-ts4.5/components/Section/heading-item.d.ts +3 -2
- package/dist/types-ts4.5/components/Section/skeleton-heading-item.d.ts +3 -2
- package/dist/types-ts4.5/index.d.ts +12 -8
- package/package.json +14 -6
- package/dist/cjs/components/NavigationContent/styles.js +0 -127
- package/dist/cjs/components/NestableNavigationContent/context.js +0 -43
- package/dist/cjs/components/Section/index.js +0 -27
- package/dist/es2019/components/NavigationContent/styles.js +0 -113
- package/dist/es2019/components/NestableNavigationContent/context.js +0 -43
- package/dist/es2019/components/Section/index.js +0 -3
- package/dist/esm/components/NavigationContent/styles.js +0 -120
- package/dist/esm/components/NestableNavigationContent/context.js +0 -38
- package/dist/esm/components/Section/index.js +0 -3
- package/dist/types/components/NavigationContent/styles.d.ts +0 -91
- package/dist/types/components/Section/index.d.ts +0 -6
- package/dist/types-ts4.5/components/NavigationContent/styles.d.ts +0 -91
- package/dist/types-ts4.5/components/Section/index.d.ts +0 -6
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
|
-
import { type SkeletonHeadingItemProps } from '@atlaskit/menu';
|
|
3
|
-
export
|
|
2
|
+
import { type SkeletonHeadingItemProps as MenuSkeletonHeadingItemProps } from '@atlaskit/menu';
|
|
3
|
+
export interface SkeletonHeadingItemProps extends MenuSkeletonHeadingItemProps {
|
|
4
|
+
}
|
|
4
5
|
/**
|
|
5
6
|
* __Skeleton heading item__
|
|
6
7
|
*
|
package/dist/types/index.d.ts
CHANGED
|
@@ -1,7 +1,11 @@
|
|
|
1
1
|
export { default as SideNavigation } from './components/SideNavigation';
|
|
2
2
|
export type { SideNavigationProps } from './components/SideNavigation';
|
|
3
|
-
export {
|
|
4
|
-
export
|
|
3
|
+
export { default as Section } from './components/Section/section';
|
|
4
|
+
export { default as HeadingItem } from './components/Section/heading-item';
|
|
5
|
+
export { default as SkeletonHeadingItem } from './components/Section/skeleton-heading-item';
|
|
6
|
+
export type { HeadingItemProps } from './components/Section/heading-item';
|
|
7
|
+
export type { SectionProps } from './components/Section/section';
|
|
8
|
+
export type { SkeletonHeadingItemProps } from './components/Section/skeleton-heading-item';
|
|
5
9
|
export { default as NestingItem } from './components/NestingItem';
|
|
6
10
|
export type { NestingItemProps } from './components/NestingItem';
|
|
7
11
|
export { default as NavigationContent } from './components/NavigationContent';
|
|
@@ -11,11 +15,11 @@ export { default as GoBackItem } from './components/Item/go-back-item';
|
|
|
11
15
|
export { default as LinkItem } from './components/Item/link-item';
|
|
12
16
|
export { default as CustomItem } from './components/Item/custom-item';
|
|
13
17
|
export { default as SkeletonItem } from './components/Item/skeleton-item';
|
|
14
|
-
export type { CustomItemComponentProps, CustomItemProps } from '
|
|
15
|
-
export type { ButtonItemProps } from '
|
|
16
|
-
export type { GoBackItemProps } from '
|
|
17
|
-
export type { LinkItemProps } from '
|
|
18
|
-
export type { SkeletonItemProps } from '
|
|
18
|
+
export type { CustomItemComponentProps, CustomItemProps } from '@atlaskit/menu';
|
|
19
|
+
export type { ButtonItemProps } from '@atlaskit/menu';
|
|
20
|
+
export type { ButtonItemProps as GoBackItemProps } from '@atlaskit/menu';
|
|
21
|
+
export type { LinkItemProps } from '@atlaskit/menu';
|
|
22
|
+
export type { SkeletonItemProps } from '@atlaskit/menu';
|
|
19
23
|
export { default as Footer } from './components/Footer';
|
|
20
24
|
export type { FooterProps } from './components/Footer';
|
|
21
25
|
export { default as Header } from './components/Header';
|
|
@@ -28,5 +32,5 @@ export { default as LoadingItems } from './components/LoadingItems';
|
|
|
28
32
|
export type { LoadingItemsProps } from './components/LoadingItems';
|
|
29
33
|
export { default as NestableNavigationContent } from './components/NestableNavigationContent';
|
|
30
34
|
export type { NestableNavigationContentProps } from './components/NestableNavigationContent';
|
|
31
|
-
export { useShouldNestedElementRender } from './components/NestableNavigationContent/
|
|
35
|
+
export { useShouldNestedElementRender } from './components/NestableNavigationContent/use-should-nested-element-render';
|
|
32
36
|
export { VAR_SCROLL_INDICATOR_COLOR, VAR_SEPARATOR_COLOR } from './common/constants';
|
|
@@ -1,5 +1,6 @@
|
|
|
1
|
-
import { type
|
|
2
|
-
export
|
|
1
|
+
import { type CustomItemProps, type CustomItemComponentProps as MenuCustomItemComponentProps } from '@atlaskit/menu';
|
|
2
|
+
export interface CustomItemComponentProps extends MenuCustomItemComponentProps {
|
|
3
|
+
}
|
|
3
4
|
interface CustomItemPropsHack {
|
|
4
5
|
<TComponentProps extends {}>(props: CustomItemProps<TComponentProps> & {
|
|
5
6
|
ref?: any;
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
interface StyleOpts {
|
|
2
|
+
showTopScrollIndicator?: boolean;
|
|
3
|
+
}
|
|
4
|
+
export declare const containerCSS: (opts: StyleOpts) => {
|
|
5
|
+
readonly marginTop: 0 | 2;
|
|
6
|
+
readonly marginLeft: "var(--ds-space-100)";
|
|
7
|
+
readonly marginRight: "var(--ds-space-100)";
|
|
8
|
+
readonly position: "relative";
|
|
9
|
+
readonly "& [data-ds--menu--heading-item]": {
|
|
10
|
+
readonly marginBottom: "var(--ds-space-075)";
|
|
11
|
+
readonly marginTop: "var(--ds-space-200)";
|
|
12
|
+
};
|
|
13
|
+
readonly "& [data-ds--menu--skeleton-heading-item]": {
|
|
14
|
+
readonly marginTop: number;
|
|
15
|
+
readonly marginBottom: number;
|
|
16
|
+
};
|
|
17
|
+
};
|
|
18
|
+
export {};
|
|
@@ -0,0 +1,34 @@
|
|
|
1
|
+
interface StyleOpts {
|
|
2
|
+
showTopScrollIndicator?: boolean;
|
|
3
|
+
}
|
|
4
|
+
export declare const innerContainerCSS: (opts: StyleOpts) => {
|
|
5
|
+
readonly "&::after": {
|
|
6
|
+
readonly borderRadius: "var(--ds-radius-xsmall)";
|
|
7
|
+
readonly content: "''";
|
|
8
|
+
readonly display: "block";
|
|
9
|
+
readonly flexShrink: 0;
|
|
10
|
+
readonly height: 2;
|
|
11
|
+
readonly marginTop: "auto";
|
|
12
|
+
readonly position: "relative";
|
|
13
|
+
readonly zIndex: 2;
|
|
14
|
+
readonly backgroundColor: "var(--ds-menu-scroll-indicator-color, var(--ds-surface))";
|
|
15
|
+
};
|
|
16
|
+
readonly "&::before"?: {
|
|
17
|
+
readonly borderRadius: "var(--ds-radius-xsmall)";
|
|
18
|
+
readonly content: "''";
|
|
19
|
+
readonly left: 0;
|
|
20
|
+
readonly right: 0;
|
|
21
|
+
readonly height: 2;
|
|
22
|
+
readonly backgroundColor: "var(--ds-menu-scroll-indicator-color, var(--ds-surface))";
|
|
23
|
+
readonly position: "absolute";
|
|
24
|
+
readonly display: "block";
|
|
25
|
+
readonly zIndex: 2;
|
|
26
|
+
} | undefined;
|
|
27
|
+
readonly display: "flex";
|
|
28
|
+
readonly overflow: "auto";
|
|
29
|
+
readonly width: "100%";
|
|
30
|
+
readonly position: "relative";
|
|
31
|
+
readonly boxSizing: "border-box";
|
|
32
|
+
readonly flexDirection: "column";
|
|
33
|
+
};
|
|
34
|
+
export {};
|
|
@@ -0,0 +1,36 @@
|
|
|
1
|
+
interface StyleOpts {
|
|
2
|
+
showTopScrollIndicator?: boolean;
|
|
3
|
+
}
|
|
4
|
+
export declare const outerContainerCSS: (opts: StyleOpts & {
|
|
5
|
+
scrollbarWidth: number;
|
|
6
|
+
}) => {
|
|
7
|
+
readonly display: "flex";
|
|
8
|
+
readonly height: "100%";
|
|
9
|
+
readonly overflow: "hidden";
|
|
10
|
+
readonly position: "relative";
|
|
11
|
+
readonly "&::before": {
|
|
12
|
+
readonly content: "''";
|
|
13
|
+
readonly display: "block";
|
|
14
|
+
readonly left: "var(--ds-space-100)";
|
|
15
|
+
readonly right: number;
|
|
16
|
+
readonly height: 2;
|
|
17
|
+
readonly borderRadius: "var(--ds-radius-xsmall)";
|
|
18
|
+
readonly backgroundColor: "var(--ds-menu-seperator-color, var(--ds-border))";
|
|
19
|
+
readonly position: "absolute";
|
|
20
|
+
readonly zIndex: 1;
|
|
21
|
+
};
|
|
22
|
+
readonly "&::after": {
|
|
23
|
+
readonly content: "''";
|
|
24
|
+
readonly position: "absolute";
|
|
25
|
+
readonly display: "block";
|
|
26
|
+
readonly borderRadius: "var(--ds-radius-xsmall)";
|
|
27
|
+
readonly flexShrink: 0;
|
|
28
|
+
readonly height: 2;
|
|
29
|
+
readonly left: "var(--ds-space-100)";
|
|
30
|
+
readonly right: number;
|
|
31
|
+
readonly bottom: 0;
|
|
32
|
+
readonly zIndex: 1;
|
|
33
|
+
readonly backgroundColor: "var(--ds-menu-seperator-color, var(--ds-border))";
|
|
34
|
+
};
|
|
35
|
+
};
|
|
36
|
+
export {};
|
package/dist/types-ts4.5/components/NestableNavigationContent/{context.d.ts → nested-context.d.ts}
RENAMED
|
@@ -1,7 +1,4 @@
|
|
|
1
1
|
import { type MutableRefObject } from 'react';
|
|
2
|
-
/**
|
|
3
|
-
* @internal
|
|
4
|
-
*/
|
|
5
2
|
export interface NestedContextValue {
|
|
6
3
|
currentStackId: string;
|
|
7
4
|
onNest: (id: string) => void;
|
|
@@ -16,16 +13,4 @@ export interface NestedContextValue {
|
|
|
16
13
|
isDefaultFocusControl?: boolean;
|
|
17
14
|
focusGoBackButton?: boolean;
|
|
18
15
|
}
|
|
19
|
-
/**
|
|
20
|
-
* @internal
|
|
21
|
-
*/
|
|
22
16
|
export declare const NestedContext: import('react').Context<NestedContextValue | undefined>;
|
|
23
|
-
export declare const useNestedContext: () => NestedContextValue;
|
|
24
|
-
/**
|
|
25
|
-
* Used by children of the NestableNavigationContent component to see if they should render or not.
|
|
26
|
-
* If `shouldRender` returns `true` - return your nodes.
|
|
27
|
-
* If it returns `false` - either return `null` or `children` if you have children.
|
|
28
|
-
*/
|
|
29
|
-
export declare const useShouldNestedElementRender: () => {
|
|
30
|
-
shouldRender: boolean;
|
|
31
|
-
};
|
|
@@ -2,8 +2,9 @@
|
|
|
2
2
|
* @jsxRuntime classic
|
|
3
3
|
* @jsx jsx
|
|
4
4
|
*/
|
|
5
|
-
import { type HeadingItemProps } from '@atlaskit/menu';
|
|
6
|
-
export
|
|
5
|
+
import { type HeadingItemProps as MenuHeadingItemProps } from '@atlaskit/menu';
|
|
6
|
+
export interface HeadingItemProps extends MenuHeadingItemProps {
|
|
7
|
+
}
|
|
7
8
|
/**
|
|
8
9
|
* __Heading item__
|
|
9
10
|
*
|
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
|
-
import { type SkeletonHeadingItemProps } from '@atlaskit/menu';
|
|
3
|
-
export
|
|
2
|
+
import { type SkeletonHeadingItemProps as MenuSkeletonHeadingItemProps } from '@atlaskit/menu';
|
|
3
|
+
export interface SkeletonHeadingItemProps extends MenuSkeletonHeadingItemProps {
|
|
4
|
+
}
|
|
4
5
|
/**
|
|
5
6
|
* __Skeleton heading item__
|
|
6
7
|
*
|
|
@@ -1,7 +1,11 @@
|
|
|
1
1
|
export { default as SideNavigation } from './components/SideNavigation';
|
|
2
2
|
export type { SideNavigationProps } from './components/SideNavigation';
|
|
3
|
-
export {
|
|
4
|
-
export
|
|
3
|
+
export { default as Section } from './components/Section/section';
|
|
4
|
+
export { default as HeadingItem } from './components/Section/heading-item';
|
|
5
|
+
export { default as SkeletonHeadingItem } from './components/Section/skeleton-heading-item';
|
|
6
|
+
export type { HeadingItemProps } from './components/Section/heading-item';
|
|
7
|
+
export type { SectionProps } from './components/Section/section';
|
|
8
|
+
export type { SkeletonHeadingItemProps } from './components/Section/skeleton-heading-item';
|
|
5
9
|
export { default as NestingItem } from './components/NestingItem';
|
|
6
10
|
export type { NestingItemProps } from './components/NestingItem';
|
|
7
11
|
export { default as NavigationContent } from './components/NavigationContent';
|
|
@@ -11,11 +15,11 @@ export { default as GoBackItem } from './components/Item/go-back-item';
|
|
|
11
15
|
export { default as LinkItem } from './components/Item/link-item';
|
|
12
16
|
export { default as CustomItem } from './components/Item/custom-item';
|
|
13
17
|
export { default as SkeletonItem } from './components/Item/skeleton-item';
|
|
14
|
-
export type { CustomItemComponentProps, CustomItemProps } from '
|
|
15
|
-
export type { ButtonItemProps } from '
|
|
16
|
-
export type { GoBackItemProps } from '
|
|
17
|
-
export type { LinkItemProps } from '
|
|
18
|
-
export type { SkeletonItemProps } from '
|
|
18
|
+
export type { CustomItemComponentProps, CustomItemProps } from '@atlaskit/menu';
|
|
19
|
+
export type { ButtonItemProps } from '@atlaskit/menu';
|
|
20
|
+
export type { ButtonItemProps as GoBackItemProps } from '@atlaskit/menu';
|
|
21
|
+
export type { LinkItemProps } from '@atlaskit/menu';
|
|
22
|
+
export type { SkeletonItemProps } from '@atlaskit/menu';
|
|
19
23
|
export { default as Footer } from './components/Footer';
|
|
20
24
|
export type { FooterProps } from './components/Footer';
|
|
21
25
|
export { default as Header } from './components/Header';
|
|
@@ -28,5 +32,5 @@ export { default as LoadingItems } from './components/LoadingItems';
|
|
|
28
32
|
export type { LoadingItemsProps } from './components/LoadingItems';
|
|
29
33
|
export { default as NestableNavigationContent } from './components/NestableNavigationContent';
|
|
30
34
|
export type { NestableNavigationContentProps } from './components/NestableNavigationContent';
|
|
31
|
-
export { useShouldNestedElementRender } from './components/NestableNavigationContent/
|
|
35
|
+
export { useShouldNestedElementRender } from './components/NestableNavigationContent/use-should-nested-element-render';
|
|
32
36
|
export { VAR_SCROLL_INDICATOR_COLOR, VAR_SEPARATOR_COLOR } from './common/constants';
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@atlaskit/side-navigation",
|
|
3
|
-
"version": "11.1.
|
|
3
|
+
"version": "11.1.15",
|
|
4
4
|
"description": "A highly composable side navigation component that supports nested views.",
|
|
5
5
|
"publishConfig": {
|
|
6
6
|
"registry": "https://registry.npmjs.org/"
|
|
@@ -17,6 +17,13 @@
|
|
|
17
17
|
],
|
|
18
18
|
"atlaskit:src": "src/index.tsx",
|
|
19
19
|
"atlassian": {
|
|
20
|
+
"react-compiler": {
|
|
21
|
+
"enabled": true,
|
|
22
|
+
"gating": {
|
|
23
|
+
"source": "@atlassian/react-compiler-gating",
|
|
24
|
+
"importSpecifierName": "isReactCompilerActivePlatform"
|
|
25
|
+
}
|
|
26
|
+
},
|
|
20
27
|
"team": "Design System Team",
|
|
21
28
|
"website": {
|
|
22
29
|
"name": "Side navigation",
|
|
@@ -29,13 +36,13 @@
|
|
|
29
36
|
},
|
|
30
37
|
"dependencies": {
|
|
31
38
|
"@atlaskit/css": "^0.19.0",
|
|
32
|
-
"@atlaskit/ds-lib": "^
|
|
39
|
+
"@atlaskit/ds-lib": "^7.0.0",
|
|
33
40
|
"@atlaskit/icon": "^34.0.0",
|
|
34
41
|
"@atlaskit/menu": "^8.4.0",
|
|
35
42
|
"@atlaskit/motion": "^5.5.0",
|
|
36
43
|
"@atlaskit/platform-feature-flags": "^1.1.0",
|
|
37
44
|
"@atlaskit/primitives": "^18.1.0",
|
|
38
|
-
"@atlaskit/tokens": "^
|
|
45
|
+
"@atlaskit/tokens": "^12.0.0",
|
|
39
46
|
"@babel/runtime": "^7.0.0",
|
|
40
47
|
"@compiled/react": "^0.20.0"
|
|
41
48
|
},
|
|
@@ -47,13 +54,13 @@
|
|
|
47
54
|
"@af/integration-testing": "workspace:^",
|
|
48
55
|
"@af/visual-regression": "workspace:^",
|
|
49
56
|
"@atlaskit/atlassian-navigation": "^5.6.0",
|
|
50
|
-
"@atlaskit/button": "^23.
|
|
57
|
+
"@atlaskit/button": "^23.11.0",
|
|
51
58
|
"@atlaskit/docs": "^11.7.0",
|
|
52
59
|
"@atlaskit/dropdown-menu": "^16.8.0",
|
|
53
60
|
"@atlaskit/form": "^15.5.0",
|
|
54
61
|
"@atlaskit/image": "^3.0.0",
|
|
55
|
-
"@atlaskit/link": "^3.
|
|
56
|
-
"@atlaskit/logo": "^
|
|
62
|
+
"@atlaskit/link": "^3.4.0",
|
|
63
|
+
"@atlaskit/logo": "^20.0.0",
|
|
57
64
|
"@atlaskit/pragmatic-drag-and-drop": "^1.7.0",
|
|
58
65
|
"@atlaskit/pragmatic-drag-and-drop-live-region": "^1.3.0",
|
|
59
66
|
"@atlaskit/pragmatic-drag-and-drop-react-accessibility": "^2.2.0",
|
|
@@ -61,6 +68,7 @@
|
|
|
61
68
|
"@atlaskit/section-message": "^8.12.0",
|
|
62
69
|
"@atlaskit/select": "^21.10.0",
|
|
63
70
|
"@atlaskit/spotlight": "^0.11.0",
|
|
71
|
+
"@atlassian/react-compiler-gating": "workspace:^",
|
|
64
72
|
"@testing-library/react": "^16.3.0",
|
|
65
73
|
"raf-stub": "^2.0.1",
|
|
66
74
|
"tiny-invariant": "^1.2.0"
|
|
@@ -1,127 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
|
|
3
|
-
var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefault");
|
|
4
|
-
Object.defineProperty(exports, "__esModule", {
|
|
5
|
-
value: true
|
|
6
|
-
});
|
|
7
|
-
exports.outerContainerCSS = exports.innerContainerCSS = exports.containerCSS = void 0;
|
|
8
|
-
var _defineProperty2 = _interopRequireDefault(require("@babel/runtime/helpers/defineProperty"));
|
|
9
|
-
var _constants = require("../../common/constants");
|
|
10
|
-
function ownKeys(e, r) { var t = Object.keys(e); if (Object.getOwnPropertySymbols) { var o = Object.getOwnPropertySymbols(e); r && (o = o.filter(function (r) { return Object.getOwnPropertyDescriptor(e, r).enumerable; })), t.push.apply(t, o); } return t; }
|
|
11
|
-
function _objectSpread(e) { for (var r = 1; r < arguments.length; r++) { var t = null != arguments[r] ? arguments[r] : {}; r % 2 ? ownKeys(Object(t), !0).forEach(function (r) { (0, _defineProperty2.default)(e, r, t[r]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e, Object.getOwnPropertyDescriptors(t)) : ownKeys(Object(t)).forEach(function (r) { Object.defineProperty(e, r, Object.getOwnPropertyDescriptor(t, r)); }); } return e; }
|
|
12
|
-
var scrollIndicatorMaskZIndex = 2;
|
|
13
|
-
var scrollIndicatorZIndex = 1;
|
|
14
|
-
var scrollIndicatorHeight = 2;
|
|
15
|
-
var scrollIndicatorBorderRadius = '1px';
|
|
16
|
-
var containerPadding = 8;
|
|
17
|
-
var itemHeadingContentHeight = 16; // Originally headingSizes.h100.lineHeight from '@atlaskit/theme/typography'
|
|
18
|
-
var skeletonHeadingHeight = containerPadding;
|
|
19
|
-
var skeletonHeadingMarginOffset = 3;
|
|
20
|
-
// Skeleton content is slightly shorter than the real content.
|
|
21
|
-
// Because of that we slightly increase the top margin to offset this so the
|
|
22
|
-
// containing size both real and skeleton always equal approx 30px.
|
|
23
|
-
var skeletonHeadingTopMargin = containerPadding * 2.5 + (itemHeadingContentHeight - skeletonHeadingHeight) - skeletonHeadingMarginOffset;
|
|
24
|
-
// We want to move the entire body up by 3px without affecting the height of the skeleton container.
|
|
25
|
-
var skeletonHeadingBottomMargin = containerPadding * 0.75 + skeletonHeadingMarginOffset;
|
|
26
|
-
/**
|
|
27
|
-
* This outer container css contains the "real" scroll indicators which are
|
|
28
|
-
* always rendered to the screen.
|
|
29
|
-
* They are "conditionally" shown from the users perspective using the inner container CSS
|
|
30
|
-
* which has other pseudo elements which "mask" the "real" scroll indicators.
|
|
31
|
-
*/
|
|
32
|
-
var outerContainerCSS = exports.outerContainerCSS = function outerContainerCSS(opts) {
|
|
33
|
-
return {
|
|
34
|
-
// Flex is needed to ensure the overflow indicators are positioned correctly.
|
|
35
|
-
display: 'flex',
|
|
36
|
-
height: '100%',
|
|
37
|
-
overflow: 'hidden',
|
|
38
|
-
position: 'relative',
|
|
39
|
-
'&::before': {
|
|
40
|
-
content: "''",
|
|
41
|
-
display: 'block',
|
|
42
|
-
left: "var(--ds-space-100, 8px)",
|
|
43
|
-
right: containerPadding + opts.scrollbarWidth,
|
|
44
|
-
height: scrollIndicatorHeight,
|
|
45
|
-
borderRadius: "var(--ds-radius-xsmall, ".concat(scrollIndicatorBorderRadius, ")"),
|
|
46
|
-
backgroundColor: "var(".concat(_constants.VAR_SEPARATOR_COLOR, ", ", "var(--ds-border, #0B120E24)", ")"),
|
|
47
|
-
position: 'absolute',
|
|
48
|
-
zIndex: scrollIndicatorZIndex
|
|
49
|
-
},
|
|
50
|
-
'&::after': {
|
|
51
|
-
content: "''",
|
|
52
|
-
position: 'absolute',
|
|
53
|
-
display: 'block',
|
|
54
|
-
borderRadius: "var(--ds-radius-xsmall, ".concat(scrollIndicatorBorderRadius, ")"),
|
|
55
|
-
flexShrink: 0,
|
|
56
|
-
height: scrollIndicatorHeight,
|
|
57
|
-
left: "var(--ds-space-100, 8px)",
|
|
58
|
-
right: containerPadding + opts.scrollbarWidth,
|
|
59
|
-
bottom: 0,
|
|
60
|
-
zIndex: scrollIndicatorZIndex,
|
|
61
|
-
backgroundColor: "var(".concat(_constants.VAR_SEPARATOR_COLOR, ", ", "var(--ds-border, #0B120E24)", ")")
|
|
62
|
-
}
|
|
63
|
-
};
|
|
64
|
-
};
|
|
65
|
-
|
|
66
|
-
/**
|
|
67
|
-
* This inner container css contains the "mask" logic for the scroll indicators.
|
|
68
|
-
* Essentially they cover (mask) the "real" scroll indicators when the user is scrolled
|
|
69
|
-
* to the top or bottom of the container.
|
|
70
|
-
*/
|
|
71
|
-
var innerContainerCSS = exports.innerContainerCSS = function innerContainerCSS(opts) {
|
|
72
|
-
return _objectSpread(_objectSpread({
|
|
73
|
-
display: 'flex',
|
|
74
|
-
overflow: 'auto',
|
|
75
|
-
width: '100%',
|
|
76
|
-
position: 'relative',
|
|
77
|
-
boxSizing: 'border-box',
|
|
78
|
-
flexDirection: 'column'
|
|
79
|
-
}, !opts.showTopScrollIndicator && {
|
|
80
|
-
'&::before': {
|
|
81
|
-
borderRadius: "var(--ds-radius-xsmall, ".concat(scrollIndicatorBorderRadius, ")"),
|
|
82
|
-
content: "''",
|
|
83
|
-
left: 0,
|
|
84
|
-
right: 0,
|
|
85
|
-
height: scrollIndicatorHeight,
|
|
86
|
-
backgroundColor: "var(".concat(_constants.VAR_SCROLL_INDICATOR_COLOR, ", ", "var(--ds-surface, #FFFFFF)", ")"),
|
|
87
|
-
position: 'absolute',
|
|
88
|
-
display: 'block',
|
|
89
|
-
zIndex: scrollIndicatorMaskZIndex
|
|
90
|
-
}
|
|
91
|
-
}), {}, {
|
|
92
|
-
// This after pseudo element abuses being a flex child and pushes itself down to the
|
|
93
|
-
// very bottom of the container - doing so ends up "masking" the actual scroll indicator.
|
|
94
|
-
'&::after': {
|
|
95
|
-
borderRadius: "var(--ds-radius-xsmall, ".concat(scrollIndicatorBorderRadius, ")"),
|
|
96
|
-
content: "''",
|
|
97
|
-
display: 'block',
|
|
98
|
-
flexShrink: 0,
|
|
99
|
-
height: scrollIndicatorHeight,
|
|
100
|
-
// This is used to "push" the element to the bottom of the flex container.
|
|
101
|
-
marginTop: 'auto',
|
|
102
|
-
position: 'relative',
|
|
103
|
-
zIndex: scrollIndicatorMaskZIndex,
|
|
104
|
-
backgroundColor: "var(".concat(_constants.VAR_SCROLL_INDICATOR_COLOR, ", ", "var(--ds-surface, #FFFFFF)", ")")
|
|
105
|
-
}
|
|
106
|
-
});
|
|
107
|
-
};
|
|
108
|
-
var containerCSS = exports.containerCSS = function containerCSS(opts) {
|
|
109
|
-
return {
|
|
110
|
-
// When the scroll indicator is always shown we need to add some padding
|
|
111
|
-
// so the spacing between matches what it would be if the indicator was a "block" element.
|
|
112
|
-
// We use margin here so any child absolutely positioned elements are positioned correctly.
|
|
113
|
-
marginTop: opts.showTopScrollIndicator ? scrollIndicatorHeight : 0,
|
|
114
|
-
marginLeft: "var(--ds-space-100, 8px)",
|
|
115
|
-
marginRight: "var(--ds-space-100, 8px)",
|
|
116
|
-
// Enables child absolutely positioned elements to be positioned relative to this element.
|
|
117
|
-
position: 'relative',
|
|
118
|
-
'& [data-ds--menu--heading-item]': {
|
|
119
|
-
marginBottom: "var(--ds-space-075, 6px)",
|
|
120
|
-
marginTop: "var(--ds-space-200, 16px)"
|
|
121
|
-
},
|
|
122
|
-
'& [data-ds--menu--skeleton-heading-item]': {
|
|
123
|
-
marginTop: skeletonHeadingTopMargin,
|
|
124
|
-
marginBottom: skeletonHeadingBottomMargin
|
|
125
|
-
}
|
|
126
|
-
};
|
|
127
|
-
};
|
|
@@ -1,43 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
|
|
3
|
-
Object.defineProperty(exports, "__esModule", {
|
|
4
|
-
value: true
|
|
5
|
-
});
|
|
6
|
-
exports.useShouldNestedElementRender = exports.useNestedContext = exports.NestedContext = void 0;
|
|
7
|
-
var _react = require("react");
|
|
8
|
-
/**
|
|
9
|
-
* @internal
|
|
10
|
-
*/
|
|
11
|
-
|
|
12
|
-
/**
|
|
13
|
-
* @internal
|
|
14
|
-
*/
|
|
15
|
-
var NestedContext = exports.NestedContext = /*#__PURE__*/(0, _react.createContext)(undefined);
|
|
16
|
-
var useNestedContext = exports.useNestedContext = function useNestedContext() {
|
|
17
|
-
var context = (0, _react.useContext)(NestedContext);
|
|
18
|
-
if (!context) {
|
|
19
|
-
var error = '';
|
|
20
|
-
if (process.env.NODE_ENV === 'development') {
|
|
21
|
-
error = "\nTo use a <NestingItem /> it needs to be a descendant of <NestableNavigationContent>.\nYou probably need to replace your <NavigationContent> with <NestableNavigationContent>.\n\nimport { NestableNavigationContent } from '@atlaskit/side-navigation';\n ";
|
|
22
|
-
}
|
|
23
|
-
throw new Error(error);
|
|
24
|
-
}
|
|
25
|
-
return context;
|
|
26
|
-
};
|
|
27
|
-
|
|
28
|
-
/**
|
|
29
|
-
* Used by children of the NestableNavigationContent component to see if they should render or not.
|
|
30
|
-
* If `shouldRender` returns `true` - return your nodes.
|
|
31
|
-
* If it returns `false` - either return `null` or `children` if you have children.
|
|
32
|
-
*/
|
|
33
|
-
var useShouldNestedElementRender = exports.useShouldNestedElementRender = function useShouldNestedElementRender() {
|
|
34
|
-
var context = (0, _react.useContext)(NestedContext);
|
|
35
|
-
if (!context) {
|
|
36
|
-
return {
|
|
37
|
-
shouldRender: true
|
|
38
|
-
};
|
|
39
|
-
}
|
|
40
|
-
return {
|
|
41
|
-
shouldRender: context.currentStackId === context.parentId
|
|
42
|
-
};
|
|
43
|
-
};
|
|
@@ -1,27 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
|
|
3
|
-
var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefault");
|
|
4
|
-
Object.defineProperty(exports, "__esModule", {
|
|
5
|
-
value: true
|
|
6
|
-
});
|
|
7
|
-
Object.defineProperty(exports, "HeadingItem", {
|
|
8
|
-
enumerable: true,
|
|
9
|
-
get: function get() {
|
|
10
|
-
return _headingItem.default;
|
|
11
|
-
}
|
|
12
|
-
});
|
|
13
|
-
Object.defineProperty(exports, "Section", {
|
|
14
|
-
enumerable: true,
|
|
15
|
-
get: function get() {
|
|
16
|
-
return _section.default;
|
|
17
|
-
}
|
|
18
|
-
});
|
|
19
|
-
Object.defineProperty(exports, "SkeletonHeadingItem", {
|
|
20
|
-
enumerable: true,
|
|
21
|
-
get: function get() {
|
|
22
|
-
return _skeletonHeadingItem.default;
|
|
23
|
-
}
|
|
24
|
-
});
|
|
25
|
-
var _headingItem = _interopRequireDefault(require("./heading-item"));
|
|
26
|
-
var _section = _interopRequireDefault(require("./section"));
|
|
27
|
-
var _skeletonHeadingItem = _interopRequireDefault(require("./skeleton-heading-item"));
|