@atlaskit/atlassian-navigation 2.5.0 → 2.5.2
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 +12 -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/components/AppSwitcher/types.d.ts +1 -1
- package/dist/types/components/BadgeContainer/types.d.ts +1 -1
- package/dist/types/components/Help/types.d.ts +1 -1
- package/dist/types/components/IconButton/types.d.ts +1 -1
- package/dist/types/components/Notifications/types.d.ts +1 -1
- package/dist/types/components/PrimaryButton/types.d.ts +2 -2
- package/dist/types/components/PrimaryDropdownButton/types.d.ts +1 -1
- package/dist/types/components/PrimaryItemsContainer/types.d.ts +2 -2
- package/dist/types/components/ProductHome/utils.d.ts +1 -1
- package/dist/types/components/Profile/types.d.ts +1 -1
- package/dist/types/components/Search/types.d.ts +1 -1
- package/dist/types/components/Settings/types.d.ts +1 -1
- package/dist/types/components/SignIn/types.d.ts +1 -1
- package/dist/types/components/SkeletonCreateButton/types.d.ts +1 -1
- package/dist/types/components/SkeletonIconButton/types.d.ts +1 -1
- package/dist/types/components/SkeletonPrimaryButton/types.d.ts +1 -1
- package/dist/types/controllers/overflow/types.d.ts +1 -1
- package/dist/types/skeleton-help-button.d.ts +1 -1
- package/dist/types/skeleton-notification-button.d.ts +1 -1
- package/dist/types/skeleton-settings-button.d.ts +1 -1
- package/dist/types/skeleton-switcher-button.d.ts +1 -1
- package/dist/types/theme/types.d.ts +15 -15
- package/dist/types-ts4.5/common/constants.d.ts +9 -0
- package/dist/types-ts4.5/common/styles.d.ts +10 -0
- package/dist/types-ts4.5/components/AppSwitcher/index.d.ts +14 -0
- package/dist/types-ts4.5/components/AppSwitcher/types.d.ts +2 -0
- package/dist/types-ts4.5/components/AtlassianNavigation/index.d.ts +13 -0
- package/dist/types-ts4.5/components/AtlassianNavigation/skeleton.d.ts +18 -0
- package/dist/types-ts4.5/components/AtlassianNavigation/types.d.ts +107 -0
- package/dist/types-ts4.5/components/BadgeContainer/index.d.ts +4 -0
- package/dist/types-ts4.5/components/BadgeContainer/types.d.ts +6 -0
- package/dist/types-ts4.5/components/Create/index.d.ts +13 -0
- package/dist/types-ts4.5/components/Create/skeleton.d.ts +2 -0
- package/dist/types-ts4.5/components/Create/styles.d.ts +3 -0
- package/dist/types-ts4.5/components/Create/types.d.ts +35 -0
- package/dist/types-ts4.5/components/Help/index.d.ts +13 -0
- package/dist/types-ts4.5/components/Help/types.d.ts +9 -0
- package/dist/types-ts4.5/components/IconButton/index.d.ts +14 -0
- package/dist/types-ts4.5/components/IconButton/skeleton.d.ts +4 -0
- package/dist/types-ts4.5/components/IconButton/styles.d.ts +3 -0
- package/dist/types-ts4.5/components/IconButton/types.d.ts +100 -0
- package/dist/types-ts4.5/components/Notifications/index.d.ts +14 -0
- package/dist/types-ts4.5/components/Notifications/types.d.ts +9 -0
- package/dist/types-ts4.5/components/PrimaryButton/index.d.ts +18 -0
- package/dist/types-ts4.5/components/PrimaryButton/skeleton.d.ts +4 -0
- package/dist/types-ts4.5/components/PrimaryButton/styles.d.ts +3 -0
- package/dist/types-ts4.5/components/PrimaryButton/types.d.ts +43 -0
- package/dist/types-ts4.5/components/PrimaryDropdownButton/index.d.ts +16 -0
- package/dist/types-ts4.5/components/PrimaryDropdownButton/types.d.ts +18 -0
- package/dist/types-ts4.5/components/PrimaryItemsContainer/index.d.ts +6 -0
- package/dist/types-ts4.5/components/PrimaryItemsContainer/skeleton.d.ts +3 -0
- package/dist/types-ts4.5/components/PrimaryItemsContainer/types.d.ts +10 -0
- package/dist/types-ts4.5/components/ProductHome/custom-product-home.d.ts +12 -0
- package/dist/types-ts4.5/components/ProductHome/index.d.ts +2 -0
- package/dist/types-ts4.5/components/ProductHome/product-home.d.ts +15 -0
- package/dist/types-ts4.5/components/ProductHome/skeleton.d.ts +5 -0
- package/dist/types-ts4.5/components/ProductHome/types.d.ts +100 -0
- package/dist/types-ts4.5/components/ProductHome/utils.d.ts +1 -0
- package/dist/types-ts4.5/components/Profile/index.d.ts +17 -0
- package/dist/types-ts4.5/components/Profile/skeleton.d.ts +2 -0
- package/dist/types-ts4.5/components/Profile/types.d.ts +2 -0
- package/dist/types-ts4.5/components/Search/index.d.ts +12 -0
- package/dist/types-ts4.5/components/Search/skeleton.d.ts +2 -0
- package/dist/types-ts4.5/components/Search/types.d.ts +16 -0
- package/dist/types-ts4.5/components/Settings/index.d.ts +11 -0
- package/dist/types-ts4.5/components/Settings/types.d.ts +2 -0
- package/dist/types-ts4.5/components/SignIn/index.d.ts +12 -0
- package/dist/types-ts4.5/components/SignIn/skeleton.d.ts +2 -0
- package/dist/types-ts4.5/components/SignIn/types.d.ts +2 -0
- package/dist/types-ts4.5/components/SkeletonCreateButton/index.d.ts +14 -0
- package/dist/types-ts4.5/components/SkeletonCreateButton/types.d.ts +12 -0
- package/dist/types-ts4.5/components/SkeletonIconButton/index.d.ts +14 -0
- package/dist/types-ts4.5/components/SkeletonIconButton/types.d.ts +18 -0
- package/dist/types-ts4.5/components/SkeletonPrimaryButton/index.d.ts +14 -0
- package/dist/types-ts4.5/components/SkeletonPrimaryButton/types.d.ts +25 -0
- package/dist/types-ts4.5/controllers/overflow/index.d.ts +44 -0
- package/dist/types-ts4.5/controllers/overflow/types.d.ts +7 -0
- package/dist/types-ts4.5/index.d.ts +30 -0
- package/dist/types-ts4.5/skeleton-help-button.d.ts +19 -0
- package/dist/types-ts4.5/skeleton-notification-button.d.ts +19 -0
- package/dist/types-ts4.5/skeleton-settings-button.d.ts +19 -0
- package/dist/types-ts4.5/skeleton-switcher-button.d.ts +19 -0
- package/dist/types-ts4.5/skeleton.d.ts +5 -0
- package/dist/types-ts4.5/theme/default-theme.d.ts +6 -0
- package/dist/types-ts4.5/theme/index.d.ts +6 -0
- package/dist/types-ts4.5/theme/theme-generator.d.ts +3 -0
- package/dist/types-ts4.5/theme/theme-helpers.d.ts +5 -0
- package/dist/types-ts4.5/theme/theme-provider.d.ts +8 -0
- package/dist/types-ts4.5/theme/themes.d.ts +3 -0
- package/dist/types-ts4.5/theme/types.d.ts +69 -0
- package/dist/types-ts4.5/theme/use-theme.d.ts +1 -0
- package/package.json +11 -3
- package/skeleton/package.json +2 -2
- package/skeleton-help-button/package.json +2 -2
- package/skeleton-notification-button/package.json +2 -2
- package/skeleton-settings-button/package.json +2 -2
- package/skeleton-switcher-button/package.json +2 -2
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,17 @@
|
|
|
1
1
|
# @atlaskit/atlassian-navigation
|
|
2
2
|
|
|
3
|
+
## 2.5.2
|
|
4
|
+
|
|
5
|
+
### Patch Changes
|
|
6
|
+
|
|
7
|
+
- [`9d00501a414`](https://bitbucket.org/atlassian/atlassian-frontend/commits/9d00501a414) - Ensure legacy types are published for TS 4.5-4.8
|
|
8
|
+
|
|
9
|
+
## 2.5.1
|
|
10
|
+
|
|
11
|
+
### Patch Changes
|
|
12
|
+
|
|
13
|
+
- [`41fae2c6f68`](https://bitbucket.org/atlassian/atlassian-frontend/commits/41fae2c6f68) - Upgrade Typescript from `4.5.5` to `4.9.5`
|
|
14
|
+
|
|
3
15
|
## 2.5.0
|
|
4
16
|
|
|
5
17
|
### Minor Changes
|
package/dist/cjs/version.json
CHANGED
package/dist/es2019/version.json
CHANGED
package/dist/esm/version.json
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
import { BaseIconButtonProps } from '../IconButton/types';
|
|
2
|
-
export
|
|
2
|
+
export type AppSwitcherProps = BaseIconButtonProps;
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { ComponentType } from 'react';
|
|
2
2
|
import { BaseIconButtonProps } from '../IconButton/types';
|
|
3
|
-
export
|
|
3
|
+
export type HelpProps = BaseIconButtonProps & {
|
|
4
4
|
/**
|
|
5
5
|
* Component to be used for the badge.
|
|
6
6
|
* Generally you'll want to use `NotificationIndicator` from [`@atlaskit/notification-indicator`](/packages/notifications/notification-indicator).
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { ComponentType } from 'react';
|
|
2
2
|
import { BaseIconButtonProps } from '../IconButton/types';
|
|
3
|
-
export
|
|
3
|
+
export type NotificationsProps = BaseIconButtonProps & {
|
|
4
4
|
/**
|
|
5
5
|
* Component to be used for the badge.
|
|
6
6
|
* Generally you'll want to use `NotificationIndicator` from [`@atlaskit/notification-indicator`](/packages/notifications/notification-indicator).
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { AllHTMLAttributes, ComponentType, ElementType } from 'react';
|
|
2
2
|
import { CustomThemeButtonProps } from '@atlaskit/button/types';
|
|
3
|
-
export
|
|
3
|
+
export type PrimaryButtonProps = Omit<CustomThemeButtonProps, 'appearance' | 'onClick'> & {
|
|
4
4
|
/**
|
|
5
5
|
* Allows for overriding the component used to render the button.
|
|
6
6
|
*
|
|
@@ -38,6 +38,6 @@ export declare type PrimaryButtonProps = Omit<CustomThemeButtonProps, 'appearanc
|
|
|
38
38
|
*/
|
|
39
39
|
onClick?: (event: React.MouseEvent<HTMLElement>, analyticsEvent: any) => void;
|
|
40
40
|
};
|
|
41
|
-
export
|
|
41
|
+
export type PrimaryButtonSkeletonProps = {
|
|
42
42
|
className?: string;
|
|
43
43
|
};
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
/// <reference types="react" />
|
|
2
2
|
import { PrimaryButtonProps } from '../PrimaryButton/types';
|
|
3
|
-
export
|
|
3
|
+
export type PrimaryDropdownButtonProps = Omit<PrimaryButtonProps, 'iconAfter'> & {
|
|
4
4
|
/**
|
|
5
5
|
* Will set the appearance of the button to look highlighted.
|
|
6
6
|
*/
|
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
import { ComponentType, ReactNode, ReactNodeArray } from 'react';
|
|
2
|
-
export
|
|
2
|
+
export type PrimaryItemsContainerProps = {
|
|
3
3
|
moreLabel: ReactNode;
|
|
4
4
|
items: ReactNodeArray;
|
|
5
5
|
create?: ComponentType<{}>;
|
|
6
6
|
testId?: string;
|
|
7
7
|
};
|
|
8
|
-
export
|
|
8
|
+
export type PrimaryItemsContainerSkeletonProps = {
|
|
9
9
|
count: number;
|
|
10
10
|
};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
export declare const getTag: (onClick?: ((arg: any) => void) | undefined, href?: string
|
|
1
|
+
export declare const getTag: (onClick?: ((arg: any) => void) | undefined, href?: string) => "button" | "a" | "div";
|
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
import { IconButtonProps } from '../IconButton/types';
|
|
2
|
-
export
|
|
2
|
+
export type ProfileProps = IconButtonProps;
|
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
import { BaseIconButtonProps } from '../IconButton/types';
|
|
2
|
-
export
|
|
2
|
+
export type SettingsProps = BaseIconButtonProps;
|
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
import { BaseIconButtonProps } from '../IconButton/types';
|
|
2
|
-
export
|
|
2
|
+
export type SignInProps = BaseIconButtonProps;
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
/// <reference types="react" />
|
|
2
|
-
export
|
|
2
|
+
export type SkeletonHelpButtonProps = {
|
|
3
3
|
/**
|
|
4
4
|
* Describes the specific role of this navigation component for users viewing the page with a screen
|
|
5
5
|
* reader. Differentiates from other navigation buttons on a page.
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
/// <reference types="react" />
|
|
2
|
-
export
|
|
2
|
+
export type SkeletonNotificationButtonProps = {
|
|
3
3
|
/**
|
|
4
4
|
* Describes the specific role of this navigation component for users viewing the page with a screen
|
|
5
5
|
* reader. Differentiates from other navigation buttons on a page.
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
/// <reference types="react" />
|
|
2
|
-
export
|
|
2
|
+
export type SkeletonSettingsButtonProps = {
|
|
3
3
|
/**
|
|
4
4
|
* Describes the specific role of this navigation component for users viewing the page with a screen
|
|
5
5
|
* reader. Differentiates from other navigation buttons on a page.
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
/// <reference types="react" />
|
|
2
|
-
export
|
|
2
|
+
export type SkeletonSwitcherButtonProps = {
|
|
3
3
|
/**
|
|
4
4
|
* Describes the specific role of this navigation component for users viewing the page with a screen
|
|
5
5
|
* reader. Differentiates from other navigation buttons on a page.
|
|
@@ -1,12 +1,12 @@
|
|
|
1
1
|
import { CSSObject } from '@emotion/react';
|
|
2
|
-
export
|
|
2
|
+
export type CSSProperties = CSSObject & {
|
|
3
3
|
backgroundColor: string;
|
|
4
4
|
color: string;
|
|
5
5
|
};
|
|
6
|
-
export
|
|
6
|
+
export type ButtonCSSProperties = CSSProperties & {
|
|
7
7
|
boxShadow: string;
|
|
8
8
|
};
|
|
9
|
-
export
|
|
9
|
+
export type ButtonCSSContext = {
|
|
10
10
|
default: ButtonCSSProperties;
|
|
11
11
|
hover: ButtonCSSProperties;
|
|
12
12
|
focus: ButtonCSSProperties;
|
|
@@ -14,27 +14,27 @@ export declare type ButtonCSSContext = {
|
|
|
14
14
|
selected: ButtonCSSProperties;
|
|
15
15
|
selectedHover?: ButtonCSSProperties;
|
|
16
16
|
};
|
|
17
|
-
export
|
|
18
|
-
export
|
|
19
|
-
export
|
|
20
|
-
export
|
|
21
|
-
|
|
17
|
+
export type CreateCSS = ButtonCSSContext;
|
|
18
|
+
export type IconButtonCSS = ButtonCSSContext;
|
|
19
|
+
export type PrimaryButtonCSS = ButtonCSSContext;
|
|
20
|
+
export type NavigationCSS = CSSProperties;
|
|
21
|
+
type LogoStyleProps = {
|
|
22
22
|
iconGradientStart?: string;
|
|
23
23
|
iconGradientStop?: string;
|
|
24
24
|
iconColor?: string;
|
|
25
25
|
textColor?: string;
|
|
26
26
|
};
|
|
27
|
-
export
|
|
28
|
-
export
|
|
27
|
+
export type ProductHomeCSS = CSSProperties & LogoStyleProps;
|
|
28
|
+
export type SearchCSS = {
|
|
29
29
|
default: CSSProperties;
|
|
30
30
|
focus: CSSObject;
|
|
31
31
|
hover: CSSObject;
|
|
32
32
|
};
|
|
33
|
-
export
|
|
33
|
+
export type SkeletonCSS = CSSObject & {
|
|
34
34
|
backgroundColor: string;
|
|
35
35
|
opacity: number;
|
|
36
36
|
};
|
|
37
|
-
export
|
|
37
|
+
export type Mode = {
|
|
38
38
|
create: CreateCSS;
|
|
39
39
|
iconButton: IconButtonCSS;
|
|
40
40
|
navigation: NavigationCSS;
|
|
@@ -43,14 +43,14 @@ export declare type Mode = {
|
|
|
43
43
|
search: SearchCSS;
|
|
44
44
|
skeleton: SkeletonCSS;
|
|
45
45
|
};
|
|
46
|
-
export
|
|
46
|
+
export type NavigationTheme = {
|
|
47
47
|
mode: Mode;
|
|
48
48
|
};
|
|
49
|
-
export
|
|
49
|
+
export type Colors = {
|
|
50
50
|
backgroundColor: string;
|
|
51
51
|
color: string;
|
|
52
52
|
};
|
|
53
|
-
export
|
|
53
|
+
export type GenerateThemeArgs = {
|
|
54
54
|
/**
|
|
55
55
|
* Name of the theme.
|
|
56
56
|
* If you pass in "atlassian" will return the default atlassian theme and not
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
export declare const fontSize: number;
|
|
2
|
+
export declare const HORIZONTAL_GLOBAL_NAV_HEIGHT = 56;
|
|
3
|
+
export declare const PRODUCT_HOME_BREAKPOINT = 1280;
|
|
4
|
+
export declare const CREATE_BREAKPOINT = 1130;
|
|
5
|
+
export declare const varSearchFocusBorderColor = "--ds--ans--fbc";
|
|
6
|
+
export declare const varSearchHoverBackgroundColor = "--ds--ans--hbgc";
|
|
7
|
+
export declare const varSearchBackgroundColor = "--ds--ans--bgc";
|
|
8
|
+
export declare const varSearchColor = "--ds--ans--c";
|
|
9
|
+
export declare const varSearchBorderColor = "--ds--ans--bc";
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
import { AppSwitcherProps } from './types';
|
|
3
|
+
/**
|
|
4
|
+
* _App switcher__
|
|
5
|
+
*
|
|
6
|
+
* An AppSwitcher button that can be passed into `AtlassianNavigation`'s
|
|
7
|
+
* `renderAppSwitcher` prop.
|
|
8
|
+
*
|
|
9
|
+
* - [Examples](https://atlassian.design/components/atlassian-navigation/examples#app-switcher)
|
|
10
|
+
* - [Code](https://atlassian.design/components/atlassian-navigation/code)
|
|
11
|
+
*/
|
|
12
|
+
export declare const AppSwitcher: React.ForwardRefExoticComponent<import("../IconButton/types").BaseIconButtonProps & React.RefAttributes<any>>;
|
|
13
|
+
declare const _default: (props: AppSwitcherProps) => void;
|
|
14
|
+
export default _default;
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
/** @jsx jsx */
|
|
2
|
+
import { jsx } from '@emotion/react';
|
|
3
|
+
import { AtlassianNavigationProps } from './types';
|
|
4
|
+
/**
|
|
5
|
+
* __Atlassian navigation__
|
|
6
|
+
*
|
|
7
|
+
* The horizontal navigation component for Atlassian products.
|
|
8
|
+
*
|
|
9
|
+
* - [Examples](https://atlassian.design/components/atlassian-navigation/examples)
|
|
10
|
+
* - [Code](https://atlassian.design/components/atlassian-navigation/examples)
|
|
11
|
+
*/
|
|
12
|
+
export declare const AtlassianNavigation: (props: AtlassianNavigationProps) => jsx.JSX.Element;
|
|
13
|
+
export default AtlassianNavigation;
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
/** @jsx jsx */
|
|
2
|
+
import { jsx } from '@emotion/react';
|
|
3
|
+
import { NavigationSkeletonProps } from './types';
|
|
4
|
+
/**
|
|
5
|
+
* __Navigation skeleton__
|
|
6
|
+
*
|
|
7
|
+
* Use loading skeletons to reduce the perceived loading time of heavier
|
|
8
|
+
* full-page experiences. This should only be used when the whole navigation is
|
|
9
|
+
* delayed; if there are only certain dynamically loaded navigation items that
|
|
10
|
+
* slow down the page, you should look into using
|
|
11
|
+
* [skeleton buttons](https://atlassian.design/components/atlassian-navigation/examples#skeleton-button)
|
|
12
|
+
* instead.
|
|
13
|
+
*
|
|
14
|
+
* - [Examples](https://atlassian.design/components/atlassian-navigation/examples#skeleton-loader)
|
|
15
|
+
* - [Code](https://atlassian.design/components/{packageName}/code)
|
|
16
|
+
*/
|
|
17
|
+
export declare const NavigationSkeleton: ({ primaryItemsCount, secondaryItemsCount, theme, showSiteName, shouldShowSearch, testId, }: NavigationSkeletonProps) => jsx.JSX.Element;
|
|
18
|
+
export default NavigationSkeleton;
|
|
@@ -0,0 +1,107 @@
|
|
|
1
|
+
import React, { ReactNode, ReactNodeArray } from 'react';
|
|
2
|
+
import { NavigationTheme } from '../../theme';
|
|
3
|
+
export interface AtlassianNavigationProps {
|
|
4
|
+
/**
|
|
5
|
+
* Describes the specific role of this navigation component for users viewing the page with a screen
|
|
6
|
+
* reader. Differentiates from other navigation components on a page.
|
|
7
|
+
*/
|
|
8
|
+
label: string;
|
|
9
|
+
/**
|
|
10
|
+
* Slot for the primary actions.
|
|
11
|
+
*/
|
|
12
|
+
primaryItems: ReactNodeArray;
|
|
13
|
+
/**
|
|
14
|
+
* Slot for the app switcher.
|
|
15
|
+
*/
|
|
16
|
+
renderAppSwitcher?: React.ComponentType<{}>;
|
|
17
|
+
/**
|
|
18
|
+
* Slot for the create call to action button.
|
|
19
|
+
*/
|
|
20
|
+
renderCreate?: React.ComponentType<{}>;
|
|
21
|
+
/**
|
|
22
|
+
* Slot for the help button.
|
|
23
|
+
*/
|
|
24
|
+
renderHelp?: React.ComponentType<{}>;
|
|
25
|
+
/**
|
|
26
|
+
* Slot for the notification button.
|
|
27
|
+
*/
|
|
28
|
+
renderNotifications?: React.ComponentType<{}>;
|
|
29
|
+
/**
|
|
30
|
+
* Slot for the product home logo which renders a product's brand.
|
|
31
|
+
*/
|
|
32
|
+
renderProductHome: React.ComponentType<{}>;
|
|
33
|
+
/**
|
|
34
|
+
* Slot for the profile button.
|
|
35
|
+
*/
|
|
36
|
+
renderProfile?: React.ComponentType<{}>;
|
|
37
|
+
/**
|
|
38
|
+
* Slot for the search textbox.
|
|
39
|
+
*/
|
|
40
|
+
renderSearch?: React.ComponentType<{}>;
|
|
41
|
+
/**
|
|
42
|
+
* Slot for the sign in button.
|
|
43
|
+
*/
|
|
44
|
+
renderSignIn?: React.ComponentType<{}>;
|
|
45
|
+
/**
|
|
46
|
+
* Slot for the settings button.
|
|
47
|
+
*/
|
|
48
|
+
renderSettings?: React.ComponentType<{}>;
|
|
49
|
+
/**
|
|
50
|
+
* Label used for the overflow menu button tooltip.
|
|
51
|
+
*/
|
|
52
|
+
moreLabel?: ReactNode;
|
|
53
|
+
/**
|
|
54
|
+
* __Slow and discouraged custom theme API.__
|
|
55
|
+
*/
|
|
56
|
+
theme?: NavigationTheme;
|
|
57
|
+
/**
|
|
58
|
+
A `testId` prop is provided for specified elements,
|
|
59
|
+
which is a unique string that appears as a data attribute `data-testid` in the rendered code,
|
|
60
|
+
serving as a hook for automated tests.
|
|
61
|
+
|
|
62
|
+
Will set these elements when defined:
|
|
63
|
+
|
|
64
|
+
- Header element - `{testId}-header`
|
|
65
|
+
- Primary actions container - `{testId}-primary-actions`
|
|
66
|
+
- Secondary actions container - `{testId}-secondary-actions`
|
|
67
|
+
- Overflow menu popup - `{testId}-overflow-menu-popup`
|
|
68
|
+
- Overflow menu button - `{testId}-overflow-menu-trigger`
|
|
69
|
+
*/
|
|
70
|
+
testId?: string;
|
|
71
|
+
}
|
|
72
|
+
export interface NavigationSkeletonProps {
|
|
73
|
+
/**
|
|
74
|
+
* How many skeleton primary items to display.
|
|
75
|
+
*/
|
|
76
|
+
primaryItemsCount?: number;
|
|
77
|
+
/**
|
|
78
|
+
* How many skeleton secondary items to display.
|
|
79
|
+
*/
|
|
80
|
+
secondaryItemsCount?: number;
|
|
81
|
+
/**
|
|
82
|
+
* Whether to display a skeleton for the site name.
|
|
83
|
+
*/
|
|
84
|
+
showSiteName?: boolean;
|
|
85
|
+
/**
|
|
86
|
+
* Whether to display a skeleton for the search bar.
|
|
87
|
+
*/
|
|
88
|
+
shouldShowSearch?: boolean;
|
|
89
|
+
/**
|
|
90
|
+
* __Slow and discouraged custom theme API.__
|
|
91
|
+
*/
|
|
92
|
+
theme?: NavigationTheme;
|
|
93
|
+
/**
|
|
94
|
+
A `testId` prop is provided for specified elements,
|
|
95
|
+
which is a unique string that appears as a data attribute `data-testid` in the rendered code,
|
|
96
|
+
serving as a hook for automated tests.
|
|
97
|
+
|
|
98
|
+
Will set these elements when defined:
|
|
99
|
+
|
|
100
|
+
- Header element - `{testId}-header`
|
|
101
|
+
- Primary actions container - `{testId}-primary-actions`
|
|
102
|
+
- Secondary actions container - `{testId}-secondary-actions`
|
|
103
|
+
- Overflow menu popup - `{testId}-overflow-menu-popup`
|
|
104
|
+
- Overflow menu button - `{testId}-overflow-menu-trigger`
|
|
105
|
+
*/
|
|
106
|
+
testId?: string;
|
|
107
|
+
}
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
import { jsx } from '@emotion/react';
|
|
2
|
+
import { CreateProps } from './types';
|
|
3
|
+
/**
|
|
4
|
+
* _Create__
|
|
5
|
+
*
|
|
6
|
+
* A call to action button that can be passed into `AtlassianNavigation`'s
|
|
7
|
+
* `renderCreate` prop. It is shown after all other primary buttons.
|
|
8
|
+
*
|
|
9
|
+
* - [Examples](https://atlassian.design/components/atlassian-navigation/examples#create)
|
|
10
|
+
* - [Code](https://atlassian.design/components/atlassian-navigation/code)
|
|
11
|
+
*/
|
|
12
|
+
export declare const Create: ({ onClick, href, text, buttonTooltip, iconButtonTooltip, testId, }: CreateProps) => jsx.JSX.Element;
|
|
13
|
+
export default Create;
|
|
@@ -0,0 +1,3 @@
|
|
|
1
|
+
import { ThemeProps, ThemeTokens } from '@atlaskit/button/types';
|
|
2
|
+
import { NavigationTheme } from '../../theme';
|
|
3
|
+
export declare const getCreateButtonTheme: ({ mode: { create } }: NavigationTheme) => (current: (props: ThemeProps) => ThemeTokens, props: ThemeProps) => ThemeTokens;
|
|
@@ -0,0 +1,35 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
export interface CreateProps {
|
|
3
|
+
/**
|
|
4
|
+
* Primary text for the call to action.
|
|
5
|
+
*/
|
|
6
|
+
text: string;
|
|
7
|
+
/**
|
|
8
|
+
* Text for the button tooltip when seen on large viewports.
|
|
9
|
+
*/
|
|
10
|
+
buttonTooltip?: React.ReactNode;
|
|
11
|
+
/**
|
|
12
|
+
* Text for the icon button tooltip when seen on small viewports.
|
|
13
|
+
*/
|
|
14
|
+
iconButtonTooltip?: React.ReactNode;
|
|
15
|
+
/**
|
|
16
|
+
* Click handler.
|
|
17
|
+
* See @atlaskit/analytics-next for analyticsEvent type information
|
|
18
|
+
*/
|
|
19
|
+
onClick?: (e: React.MouseEvent<HTMLElement>, analyticsEvent: any) => void;
|
|
20
|
+
/**
|
|
21
|
+
* Causes the Create action to be rendered as a link. This is suitable for when the Create action is handled as a full page rather than in a modal-dialog.
|
|
22
|
+
*/
|
|
23
|
+
href?: string;
|
|
24
|
+
/**
|
|
25
|
+
* A `testId` prop is provided for specified elements,
|
|
26
|
+
* which is a unique string that appears as a data attribute `data-testid` in the rendered code,
|
|
27
|
+
* serving as a hook for automated tests.
|
|
28
|
+
*
|
|
29
|
+
* Will set these elements when defined:
|
|
30
|
+
*
|
|
31
|
+
* - Create button shown on large screen sizes - `{testId}-button`
|
|
32
|
+
* - Create icon button shown on small screen sizes - `{testId}-icon-button`
|
|
33
|
+
*/
|
|
34
|
+
testId?: string;
|
|
35
|
+
}
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
/**
|
|
3
|
+
* __Help__
|
|
4
|
+
*
|
|
5
|
+
* A help button that can be passed into `AtlassianNavigation`'s `renderHelp` prop.
|
|
6
|
+
*
|
|
7
|
+
* - [Examples](https://atlassian.design/components/atlassian-navigation/examples#help)
|
|
8
|
+
* - [Code](https://atlassian.design/components/atlassian-navigation/code)
|
|
9
|
+
*/
|
|
10
|
+
export declare const Help: React.ForwardRefExoticComponent<import("../IconButton/types").BaseIconButtonProps & {
|
|
11
|
+
badge?: React.ComponentType<{}> | undefined;
|
|
12
|
+
} & React.RefAttributes<any>>;
|
|
13
|
+
export default Help;
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import { ComponentType } from 'react';
|
|
2
|
+
import { BaseIconButtonProps } from '../IconButton/types';
|
|
3
|
+
export type HelpProps = BaseIconButtonProps & {
|
|
4
|
+
/**
|
|
5
|
+
* Component to be used for the badge.
|
|
6
|
+
* Generally you'll want to use `NotificationIndicator` from [`@atlaskit/notification-indicator`](/packages/notifications/notification-indicator).
|
|
7
|
+
*/
|
|
8
|
+
badge?: ComponentType<{}>;
|
|
9
|
+
};
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
/**
|
|
3
|
+
* __Icon button__
|
|
4
|
+
*
|
|
5
|
+
* An icon button is used to create navigation items such as Help, Settings
|
|
6
|
+
* and Notifications. You can use this component to create your own items to
|
|
7
|
+
* pass into `AtlassianNavigation`'s render props, but where possible you should
|
|
8
|
+
* rely on the defaults.
|
|
9
|
+
*
|
|
10
|
+
*/
|
|
11
|
+
export declare const IconButton: React.ForwardRefExoticComponent<import("./types").BaseIconButtonProps & {
|
|
12
|
+
icon: React.ReactChild | undefined;
|
|
13
|
+
theme?: ((current: (props: import("@atlaskit/button/custom-theme-button").ThemeProps) => import("@atlaskit/button/custom-theme-button").ThemeTokens, props: import("@atlaskit/button/custom-theme-button").ThemeProps) => import("@atlaskit/button/custom-theme-button").ThemeTokens) | undefined;
|
|
14
|
+
} & React.RefAttributes<HTMLElement>>;
|
|
@@ -0,0 +1,3 @@
|
|
|
1
|
+
import { ThemeProps, ThemeTokens } from '@atlaskit/button/types';
|
|
2
|
+
import { NavigationTheme } from '../../theme';
|
|
3
|
+
export declare const getIconButtonTheme: ({ mode: { iconButton } }: NavigationTheme) => (current: (props: ThemeProps) => ThemeTokens, props: ThemeProps) => ThemeTokens;
|