@atlaskit/atlassian-navigation 2.5.1 → 2.6.0
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/components/AtlassianNavigation/index.js +11 -1
- package/dist/cjs/components/PrimaryItemsContainer/skeleton.js +2 -2
- package/dist/cjs/components/PrimaryItemsContainerV2/index.js +149 -0
- package/dist/cjs/components/ProductHome/custom-product-home.js +6 -1
- package/dist/cjs/components/ProductHome/product-home.js +7 -1
- package/dist/cjs/version.json +1 -1
- package/dist/es2019/components/AtlassianNavigation/index.js +11 -1
- package/dist/es2019/components/PrimaryItemsContainer/skeleton.js +3 -3
- package/dist/es2019/components/PrimaryItemsContainerV2/index.js +129 -0
- package/dist/es2019/components/ProductHome/custom-product-home.js +9 -1
- package/dist/es2019/components/ProductHome/product-home.js +10 -1
- package/dist/es2019/version.json +1 -1
- package/dist/esm/components/AtlassianNavigation/index.js +11 -1
- package/dist/esm/components/PrimaryItemsContainer/skeleton.js +3 -3
- package/dist/esm/components/PrimaryItemsContainerV2/index.js +138 -0
- package/dist/esm/components/ProductHome/custom-product-home.js +6 -1
- package/dist/esm/components/ProductHome/product-home.js +7 -1
- package/dist/esm/version.json +1 -1
- package/dist/types/components/PrimaryItemsContainer/skeleton.d.ts +2 -1
- package/dist/types/components/PrimaryItemsContainerV2/index.d.ts +8 -0
- 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 +4 -0
- package/dist/types-ts4.5/components/PrimaryItemsContainer/types.d.ts +10 -0
- package/dist/types-ts4.5/components/PrimaryItemsContainerV2/index.d.ts +8 -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 +12 -2
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
/// <reference types="react" />
|
|
2
|
+
/**
|
|
3
|
+
* __Primary button__
|
|
4
|
+
*
|
|
5
|
+
* A primary button allows you to add top-level navigation items.
|
|
6
|
+
* Should be passed into `AtlassianNavigation`'s `primaryItems` prop.
|
|
7
|
+
*
|
|
8
|
+
* - [Examples](https://atlassian.design/components/atlassian-navigation/examples#dropdown-menu)
|
|
9
|
+
* - [Code](https://atlassian.design/components/atlassian-navigation/code)
|
|
10
|
+
*/
|
|
11
|
+
export declare const PrimaryButton: import("react").ForwardRefExoticComponent<Omit<import("@atlaskit/button/custom-theme-button").CustomThemeButtonProps, "appearance" | "onClick"> & {
|
|
12
|
+
component?: import("react").ComponentType<import("react").AllHTMLAttributes<HTMLElement>> | import("react").ElementType<any> | undefined;
|
|
13
|
+
isHighlighted?: boolean | undefined;
|
|
14
|
+
testId?: string | undefined;
|
|
15
|
+
tooltip?: import("react").ReactNode;
|
|
16
|
+
onClick?: ((event: import("react").MouseEvent<HTMLElement, MouseEvent>, analyticsEvent: any) => void) | undefined;
|
|
17
|
+
} & import("react").RefAttributes<HTMLElement>>;
|
|
18
|
+
export default PrimaryButton;
|
|
@@ -0,0 +1,3 @@
|
|
|
1
|
+
import { ThemeProps, ThemeTokens } from '@atlaskit/button/types';
|
|
2
|
+
import { NavigationTheme } from '../../theme';
|
|
3
|
+
export declare const getPrimaryButtonTheme: ({ mode: { primaryButton } }: NavigationTheme) => (current: (props: ThemeProps) => ThemeTokens, props: ThemeProps) => ThemeTokens;
|
|
@@ -0,0 +1,43 @@
|
|
|
1
|
+
import { AllHTMLAttributes, ComponentType, ElementType } from 'react';
|
|
2
|
+
import { CustomThemeButtonProps } from '@atlaskit/button/types';
|
|
3
|
+
export type PrimaryButtonProps = Omit<CustomThemeButtonProps, 'appearance' | 'onClick'> & {
|
|
4
|
+
/**
|
|
5
|
+
* Allows for overriding the component used to render the button.
|
|
6
|
+
*
|
|
7
|
+
* This is primarily intended for compatibility with custom
|
|
8
|
+
* routing libraries when using the `href` prop.
|
|
9
|
+
*
|
|
10
|
+
* For further usage information, refer to the [documentation for button](https://atlassian.design/components/button/code).
|
|
11
|
+
*
|
|
12
|
+
* @example
|
|
13
|
+
* ```tsx
|
|
14
|
+
* <Settings
|
|
15
|
+
* component={CustomRouterLink}
|
|
16
|
+
* href="/path/to/url"
|
|
17
|
+
* />
|
|
18
|
+
*```
|
|
19
|
+
*/
|
|
20
|
+
component?: ComponentType<AllHTMLAttributes<HTMLElement>> | ElementType<any>;
|
|
21
|
+
/**
|
|
22
|
+
* Will set the appearance of the button to look highlighted.
|
|
23
|
+
*/
|
|
24
|
+
isHighlighted?: boolean;
|
|
25
|
+
/**
|
|
26
|
+
* A `testId` prop is provided for specified elements,
|
|
27
|
+
* which is a unique string that appears as a data attribute `data-testid` in the rendered code,
|
|
28
|
+
* serving as a hook for automated tests
|
|
29
|
+
*/
|
|
30
|
+
testId?: string;
|
|
31
|
+
/**
|
|
32
|
+
* Optional text to show when the button is focused or hovered.
|
|
33
|
+
*/
|
|
34
|
+
tooltip?: React.ReactNode;
|
|
35
|
+
/**
|
|
36
|
+
* On click handler.
|
|
37
|
+
* See @atlaskit/analytics-next for analyticsEvent type information
|
|
38
|
+
*/
|
|
39
|
+
onClick?: (event: React.MouseEvent<HTMLElement>, analyticsEvent: any) => void;
|
|
40
|
+
};
|
|
41
|
+
export type PrimaryButtonSkeletonProps = {
|
|
42
|
+
className?: string;
|
|
43
|
+
};
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
/// <reference types="react" />
|
|
2
|
+
/**
|
|
3
|
+
* __Primary dropdown button__
|
|
4
|
+
*
|
|
5
|
+
* A primary dropdown button allows you to add dropdown menus to the navigation.
|
|
6
|
+
* Should be passed into `AtlassianNavigation`'s `primaryItems` prop.
|
|
7
|
+
*
|
|
8
|
+
* - [Examples](https://atlassian.design/components/atlassian-navigation/examples#button)
|
|
9
|
+
* - [Code](https://atlassian.design/components/atlassian-navigation/code)
|
|
10
|
+
*/
|
|
11
|
+
export declare const PrimaryDropdownButton: import("react").ForwardRefExoticComponent<Omit<import("../..").PrimaryButtonProps, "iconAfter"> & {
|
|
12
|
+
isHighlighted?: boolean | undefined;
|
|
13
|
+
testId?: string | undefined;
|
|
14
|
+
tooltip?: import("react").ReactNode;
|
|
15
|
+
} & import("react").RefAttributes<HTMLElement>>;
|
|
16
|
+
export default PrimaryDropdownButton;
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
/// <reference types="react" />
|
|
2
|
+
import { PrimaryButtonProps } from '../PrimaryButton/types';
|
|
3
|
+
export type PrimaryDropdownButtonProps = Omit<PrimaryButtonProps, 'iconAfter'> & {
|
|
4
|
+
/**
|
|
5
|
+
* Will set the appearance of the button to look highlighted.
|
|
6
|
+
*/
|
|
7
|
+
isHighlighted?: boolean;
|
|
8
|
+
/**
|
|
9
|
+
* A `testId` prop is provided for specified elements,
|
|
10
|
+
* which is a unique string that appears as a data attribute `data-testid` in the rendered code,
|
|
11
|
+
* serving as a hook for automated tests
|
|
12
|
+
*/
|
|
13
|
+
testId?: string;
|
|
14
|
+
/**
|
|
15
|
+
* Optional text to show when the button is focused or hovered.
|
|
16
|
+
*/
|
|
17
|
+
tooltip?: React.ReactNode;
|
|
18
|
+
};
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
import { jsx } from '@emotion/react';
|
|
2
|
+
import { NavigationTheme } from '../../theme';
|
|
3
|
+
import { PrimaryItemsContainerProps } from './types';
|
|
4
|
+
export declare const PrimaryItemsContainer: ({ moreLabel, items, create: Create, theme, testId, }: PrimaryItemsContainerProps & {
|
|
5
|
+
theme: NavigationTheme;
|
|
6
|
+
}) => jsx.JSX.Element;
|
|
@@ -0,0 +1,4 @@
|
|
|
1
|
+
/// <reference types="react" />
|
|
2
|
+
import { jsx } from '@emotion/react';
|
|
3
|
+
import { PrimaryItemsContainerSkeletonProps } from './types';
|
|
4
|
+
export declare const PrimaryItemsContainerSkeleton: import("react").MemoExoticComponent<({ count }: PrimaryItemsContainerSkeletonProps) => jsx.JSX.Element>;
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import { ComponentType, ReactNode, ReactNodeArray } from 'react';
|
|
2
|
+
export type PrimaryItemsContainerProps = {
|
|
3
|
+
moreLabel: ReactNode;
|
|
4
|
+
items: ReactNodeArray;
|
|
5
|
+
create?: ComponentType<{}>;
|
|
6
|
+
testId?: string;
|
|
7
|
+
};
|
|
8
|
+
export type PrimaryItemsContainerSkeletonProps = {
|
|
9
|
+
count: number;
|
|
10
|
+
};
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
/** @jsx jsx */
|
|
2
|
+
import React from 'react';
|
|
3
|
+
import { jsx } from '@emotion/react';
|
|
4
|
+
import { NavigationTheme } from '../../theme';
|
|
5
|
+
import { PrimaryItemsContainerProps } from '../PrimaryItemsContainer/types';
|
|
6
|
+
export declare const PrimaryItemsContainer: React.MemoExoticComponent<({ moreLabel, items, create: Create, theme, testId, }: PrimaryItemsContainerProps & {
|
|
7
|
+
theme: NavigationTheme;
|
|
8
|
+
}) => jsx.JSX.Element>;
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
import { jsx } from '@emotion/react';
|
|
2
|
+
import { CustomProductHomeProps } from './types';
|
|
3
|
+
/**
|
|
4
|
+
* __Custom product home__
|
|
5
|
+
*
|
|
6
|
+
* Use `CustomProductHome` to provide a custom logo and icon with URLs.
|
|
7
|
+
*
|
|
8
|
+
* - [Examples](https://atlassian.design/components/atlassian-navigation/examples#custom-product-home)
|
|
9
|
+
* - [Code](https://atlassian.design/components/atlassian-navigation/code)
|
|
10
|
+
*/
|
|
11
|
+
declare const CustomProductHome: (props: CustomProductHomeProps) => jsx.JSX.Element;
|
|
12
|
+
export default CustomProductHome;
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
import { jsx } from '@emotion/react';
|
|
2
|
+
import { ProductHomeProps } from './types';
|
|
3
|
+
/**
|
|
4
|
+
* __Product home__
|
|
5
|
+
*
|
|
6
|
+
* The ProductHome component displays the product visual identity composed of:
|
|
7
|
+
* logo, icon, and optional text. Values for logo and icon are never displayed
|
|
8
|
+
* at the same time, where icon is used only when space is restricted. Should be
|
|
9
|
+
* passed into `AtlassianNavigation`'s `renderProductHome` prop.
|
|
10
|
+
*
|
|
11
|
+
* - [Examples](https://atlassian.design/components/atlassian-navigation/examples#product-home)
|
|
12
|
+
* - [Code](https://atlassian.design/components/atlassian-navigation/code)
|
|
13
|
+
*/
|
|
14
|
+
declare const ProductHome: ({ icon: Icon, logo: Logo, siteTitle, onClick, href, onMouseDown, testId, logoMaxWidth, ...rest }: ProductHomeProps) => jsx.JSX.Element;
|
|
15
|
+
export default ProductHome;
|
|
@@ -0,0 +1,100 @@
|
|
|
1
|
+
import { ComponentType, MouseEvent } from 'react';
|
|
2
|
+
import { LogoProps } from '@atlaskit/logo';
|
|
3
|
+
export interface ProductHomeProps {
|
|
4
|
+
/**
|
|
5
|
+
* The product icon.
|
|
6
|
+
* Expected to be an Icon from the Atlaskit Logo package. Visible on smaller screen sizes
|
|
7
|
+
*/
|
|
8
|
+
icon: ComponentType<Partial<LogoProps>>;
|
|
9
|
+
/**
|
|
10
|
+
* The product logo,
|
|
11
|
+
* visible on larger screen sizes
|
|
12
|
+
*/
|
|
13
|
+
logo: ComponentType<Partial<LogoProps>>;
|
|
14
|
+
/**
|
|
15
|
+
* Maximum width in pixel, that logo can acquire. Defaults to 260px.
|
|
16
|
+
*/
|
|
17
|
+
logoMaxWidth?: number;
|
|
18
|
+
/**
|
|
19
|
+
* Optional onClick handler.
|
|
20
|
+
*/
|
|
21
|
+
onClick?: (event: MouseEvent<HTMLElement>) => void;
|
|
22
|
+
/**
|
|
23
|
+
* Optional mouseDown handler.
|
|
24
|
+
*/
|
|
25
|
+
onMouseDown?: (event: MouseEvent<HTMLElement>) => void;
|
|
26
|
+
/**
|
|
27
|
+
* Href to be passed to product home.
|
|
28
|
+
* Will add an interactive look and feel when defined.
|
|
29
|
+
*/
|
|
30
|
+
href?: string;
|
|
31
|
+
/**
|
|
32
|
+
* Name of the site that appears next to the logo.
|
|
33
|
+
*/
|
|
34
|
+
siteTitle?: string;
|
|
35
|
+
/**
|
|
36
|
+
A `testId` prop is provided for specified elements,
|
|
37
|
+
which is a unique string that appears as a data attribute `data-testid` in the rendered code,
|
|
38
|
+
serving as a hook for automated tests.
|
|
39
|
+
|
|
40
|
+
Will set these elements when defined:
|
|
41
|
+
|
|
42
|
+
- Root element of the component - `{testId}-container`
|
|
43
|
+
- Product logo shown at large screen sizes - `{testId}-logo`
|
|
44
|
+
- Product icon shown at small screen sizes - `{testId}-icon`
|
|
45
|
+
- Site title - `{testId}-site-title`
|
|
46
|
+
*/
|
|
47
|
+
testId?: string;
|
|
48
|
+
}
|
|
49
|
+
export interface CustomProductHomeProps {
|
|
50
|
+
/**
|
|
51
|
+
* Alt text for the icon that is displayed on small viewports.
|
|
52
|
+
*/
|
|
53
|
+
iconAlt: string;
|
|
54
|
+
/**
|
|
55
|
+
* Url for the icon that is displayed on small viewports.
|
|
56
|
+
*/
|
|
57
|
+
iconUrl: string;
|
|
58
|
+
/**
|
|
59
|
+
* Alt text for the icon that is displayed on large viewports.
|
|
60
|
+
*/
|
|
61
|
+
logoAlt: string;
|
|
62
|
+
/**
|
|
63
|
+
* Url for the icon that is displayed on large viewports.
|
|
64
|
+
*/
|
|
65
|
+
logoUrl: string;
|
|
66
|
+
/**
|
|
67
|
+
* Maximum width of the logo, in pixels. Defaults to 260px.
|
|
68
|
+
*/
|
|
69
|
+
logoMaxWidth?: number;
|
|
70
|
+
/**
|
|
71
|
+
* Optional onClick handler.
|
|
72
|
+
*/
|
|
73
|
+
onClick?: (event: MouseEvent<HTMLElement>) => void;
|
|
74
|
+
/**
|
|
75
|
+
* Optional mouseDown handler.
|
|
76
|
+
*/
|
|
77
|
+
onMouseDown?: (event: MouseEvent<HTMLElement>) => void;
|
|
78
|
+
/**
|
|
79
|
+
* Href to be passed to product home.
|
|
80
|
+
* Will add an interactive look and feel when defined.
|
|
81
|
+
*/
|
|
82
|
+
href?: string;
|
|
83
|
+
/**
|
|
84
|
+
* Name of the site that appears next to the logo
|
|
85
|
+
*/
|
|
86
|
+
siteTitle?: string;
|
|
87
|
+
/**
|
|
88
|
+
A `testId` prop is provided for specified elements,
|
|
89
|
+
which is a unique string that appears as a data attribute `data-testid` in the rendered code,
|
|
90
|
+
serving as a hook for automated tests.
|
|
91
|
+
|
|
92
|
+
Will set these elements when defined:
|
|
93
|
+
|
|
94
|
+
- Root element of the component - `{testId}-container`
|
|
95
|
+
- Product logo shown at large screen sizes - `{testId}-logo`
|
|
96
|
+
- Product icon shown at small screen sizes - `{testId}-icon`
|
|
97
|
+
- Site title - `{testId}-site-title`
|
|
98
|
+
*/
|
|
99
|
+
testId?: string;
|
|
100
|
+
}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export declare const getTag: (onClick?: ((arg: any) => void) | undefined, href?: string) => "button" | "a" | "div";
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
/// <reference types="react" />
|
|
2
|
+
import { IconButtonProps } from '../IconButton/types';
|
|
3
|
+
/**
|
|
4
|
+
* __Profile__
|
|
5
|
+
*
|
|
6
|
+
* A profile button which takes an icon/avatar component can be that can be
|
|
7
|
+
* passed into `AtlassianNavigation`'s `renderProfile` prop.
|
|
8
|
+
*
|
|
9
|
+
* - [Examples](https://atlassian.design/components/atlassian-navigation/examples#profile)
|
|
10
|
+
* - [Code](https://atlassian.design/components/atlassian-navigation/code)
|
|
11
|
+
*/
|
|
12
|
+
export declare const Profile: import("react").ForwardRefExoticComponent<import("../IconButton/types").BaseIconButtonProps & {
|
|
13
|
+
icon: import("react").ReactChild | undefined;
|
|
14
|
+
theme?: ((current: (props: import("@atlaskit/button").ThemeProps) => import("@atlaskit/button").ThemeTokens, props: import("@atlaskit/button").ThemeProps) => import("@atlaskit/button").ThemeTokens) | undefined;
|
|
15
|
+
} & import("react").RefAttributes<HTMLElement>>;
|
|
16
|
+
declare const _default: (props: IconButtonProps) => void;
|
|
17
|
+
export default _default;
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
import { jsx } from '@emotion/react';
|
|
2
|
+
import { SearchProps } from './types';
|
|
3
|
+
/**
|
|
4
|
+
* __Search__
|
|
5
|
+
*
|
|
6
|
+
* A search input that can be passed into `AtlassianNavigation`'s `renderSearch` prop.
|
|
7
|
+
*
|
|
8
|
+
* - [Examples](https://atlassian.design/components/atlassian-navigation/examples#search)
|
|
9
|
+
* - [Code](https://atlassian.design/components/atlassian-navigation/code)
|
|
10
|
+
*/
|
|
11
|
+
export declare const Search: (props: SearchProps) => jsx.JSX.Element;
|
|
12
|
+
export default Search;
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
import { BaseIconButtonProps } from '../IconButton/types';
|
|
2
|
+
export type SearchProps = BaseIconButtonProps & {
|
|
3
|
+
/**
|
|
4
|
+
* Placeholder text for the search textbox.
|
|
5
|
+
*/
|
|
6
|
+
placeholder: string;
|
|
7
|
+
/**
|
|
8
|
+
* Used to describe the search icon and text field for users viewing the
|
|
9
|
+
* page with a screen reader
|
|
10
|
+
*/
|
|
11
|
+
label: string;
|
|
12
|
+
/**
|
|
13
|
+
* Value of search field.
|
|
14
|
+
*/
|
|
15
|
+
value?: string;
|
|
16
|
+
};
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
/**
|
|
3
|
+
* __Settings__
|
|
4
|
+
*
|
|
5
|
+
* A settings button that can be passed into `AtlassianNavigation`'s `renderSettings` prop.
|
|
6
|
+
*
|
|
7
|
+
* - [Examples](https://atlassian.design/components/atlassian-navigation/examples#settings)
|
|
8
|
+
* - [Code](https://atlassian.design/components/atlassian-navigation/code)
|
|
9
|
+
*/
|
|
10
|
+
export declare const Settings: React.ForwardRefExoticComponent<import("../IconButton/types").BaseIconButtonProps & React.RefAttributes<any>>;
|
|
11
|
+
export default Settings;
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
/// <reference types="react" />
|
|
2
|
+
import { SignInProps } from './types';
|
|
3
|
+
/**
|
|
4
|
+
* __Sign in__
|
|
5
|
+
*
|
|
6
|
+
* A sign-in button that can be passed into `AtlassianNavigation`'s `renderSignIn` prop.
|
|
7
|
+
*
|
|
8
|
+
* - [Examples](https://atlassian.design/components/atlassian-navigation/examples#sign-in)
|
|
9
|
+
* - [Code](https://atlassian.design/components/atlassian-navigation/code)
|
|
10
|
+
*/
|
|
11
|
+
export declare const SignIn: (props: SignInProps) => JSX.Element;
|
|
12
|
+
export default SignIn;
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
/** @jsx jsx */
|
|
2
|
+
import { jsx } from '@emotion/react';
|
|
3
|
+
import { SkeletonCreateButtonProps } from './types';
|
|
4
|
+
/**
|
|
5
|
+
* __Skeleton create button__
|
|
6
|
+
*
|
|
7
|
+
* Skeleton buttons are lightweight HTML button elements with CSS that represent
|
|
8
|
+
* their heavier interactive counterparts, for use when elements of the
|
|
9
|
+
* navigation are loaded dynamically. This one represents the Create button.
|
|
10
|
+
*
|
|
11
|
+
* - [Examples](https://atlassian.design/components/atlassian-navigation/examples#skeleton-button)
|
|
12
|
+
* - [Code](https://atlassian.design/components/atlassian-navigation/code)
|
|
13
|
+
*/
|
|
14
|
+
export declare const SkeletonCreateButton: ({ text, testId, }: SkeletonCreateButtonProps) => jsx.JSX.Element;
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
export type SkeletonCreateButtonProps = {
|
|
2
|
+
/**
|
|
3
|
+
* Text to be displayed inside the skeleton create button.
|
|
4
|
+
*/
|
|
5
|
+
text: string;
|
|
6
|
+
/**
|
|
7
|
+
* A `testId` prop is provided for specified elements,
|
|
8
|
+
* which is a unique string that appears as a data attribute `data-testid` in the rendered code,
|
|
9
|
+
* serving as a hook for automated tests.
|
|
10
|
+
*/
|
|
11
|
+
testId?: string;
|
|
12
|
+
};
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
/** @jsx jsx */
|
|
2
|
+
import { jsx } from '@emotion/react';
|
|
3
|
+
import { SkeletonIconButtonProps } from './types';
|
|
4
|
+
/**
|
|
5
|
+
* __Skeleton icon button__
|
|
6
|
+
*
|
|
7
|
+
* Skeleton buttons are lightweight HTML button elements with CSS that represent
|
|
8
|
+
* their heavier interactive counterparts, for use when elements of the
|
|
9
|
+
* navigation are loaded dynamically. This one represents a generic icon button.
|
|
10
|
+
*
|
|
11
|
+
* - [Examples](https://atlassian.design/components/atlassian-navigation/examples#skeleton-button)
|
|
12
|
+
* - [Code](https://atlassian.design/components/atlassian-navigation/code)
|
|
13
|
+
*/
|
|
14
|
+
export declare const SkeletonIconButton: ({ children, testId, }: SkeletonIconButtonProps) => jsx.JSX.Element;
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
import { ReactNode } from 'react';
|
|
2
|
+
export type SkeletonIconButtonProps = {
|
|
3
|
+
/**
|
|
4
|
+
* Content to be placed inside the skeleton.
|
|
5
|
+
*/
|
|
6
|
+
children: ReactNode;
|
|
7
|
+
/**
|
|
8
|
+
* A `testId` prop is provided for specified elements,
|
|
9
|
+
* which is a unique string that appears as a data attribute `data-testid` in the rendered code,
|
|
10
|
+
* serving as a hook for automated tests.
|
|
11
|
+
*/
|
|
12
|
+
testId?: string;
|
|
13
|
+
/**
|
|
14
|
+
* Describes the specific role of this navigation component for users viewing the page with a screen
|
|
15
|
+
* reader. Differentiates from other navigation buttons on a page.
|
|
16
|
+
*/
|
|
17
|
+
label?: string;
|
|
18
|
+
};
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
/** @jsx jsx */
|
|
2
|
+
import { jsx } from '@emotion/react';
|
|
3
|
+
import { SkeletonPrimaryButtonProps } from './types';
|
|
4
|
+
/**
|
|
5
|
+
* __Skeleton primary button__
|
|
6
|
+
*
|
|
7
|
+
* Skeleton buttons are lightweight HTML button elements with CSS that represent
|
|
8
|
+
* their heavier interactive counterparts, for use when elements of the
|
|
9
|
+
* navigation are loaded dynamically. This one represents a primary button.
|
|
10
|
+
*
|
|
11
|
+
* - [Examples](https://atlassian.design/components/atlassian-navigation/examples#skeleton-button)
|
|
12
|
+
* - [Code](https://atlassian.design/components/atlassian-navigation/code)
|
|
13
|
+
*/
|
|
14
|
+
export declare const SkeletonPrimaryButton: ({ isDropdownButton, isHighlighted, text, children, testId, }: SkeletonPrimaryButtonProps) => jsx.JSX.Element;
|
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
import { ReactNode } from 'react';
|
|
2
|
+
export type SkeletonPrimaryButtonProps = {
|
|
3
|
+
/**
|
|
4
|
+
* Text content to be displayed inside the skeleton button.
|
|
5
|
+
*/
|
|
6
|
+
text?: ReactNode;
|
|
7
|
+
/**
|
|
8
|
+
* Children to be displayed inside the skeleton button.
|
|
9
|
+
* Renders if `text` prop not set
|
|
10
|
+
*/
|
|
11
|
+
children?: ReactNode;
|
|
12
|
+
/**
|
|
13
|
+
* Sets the appearance of the skeleton button to look like a dropdown button
|
|
14
|
+
*/
|
|
15
|
+
isDropdownButton?: boolean;
|
|
16
|
+
/**
|
|
17
|
+
* Sets the appearance of the skeleton button to look highlighted.
|
|
18
|
+
*/
|
|
19
|
+
isHighlighted?: boolean;
|
|
20
|
+
/**
|
|
21
|
+
* A unique string that appears as a data attribute `data-testid` in the rendered code,
|
|
22
|
+
* serving as a hook for automated tests.
|
|
23
|
+
*/
|
|
24
|
+
testId?: string;
|
|
25
|
+
};
|
|
@@ -0,0 +1,44 @@
|
|
|
1
|
+
/// <reference types="lodash" />
|
|
2
|
+
import React, { ReactNode } from 'react';
|
|
3
|
+
import noop from '@atlaskit/ds-lib/noop';
|
|
4
|
+
import { OverflowProviderProps } from './types';
|
|
5
|
+
interface OverflowContext {
|
|
6
|
+
/**
|
|
7
|
+
* Returns `true` when the navigation item is visible,
|
|
8
|
+
* and `false` when the navigation item has been pushed into the overflow menu.
|
|
9
|
+
*/
|
|
10
|
+
isVisible: boolean;
|
|
11
|
+
/**
|
|
12
|
+
* Method that can be used to programmatically open the overflow menu
|
|
13
|
+
*/
|
|
14
|
+
openOverflowMenu: () => void;
|
|
15
|
+
/**
|
|
16
|
+
* Method that can be used to programmatically close the overflow menu
|
|
17
|
+
*/
|
|
18
|
+
closeOverflowMenu: () => void;
|
|
19
|
+
}
|
|
20
|
+
declare const OverflowContext: React.Context<{
|
|
21
|
+
isVisible: boolean;
|
|
22
|
+
openOverflowMenu: typeof noop;
|
|
23
|
+
closeOverflowMenu: typeof noop;
|
|
24
|
+
}>;
|
|
25
|
+
export declare const OverflowProvider: ({ children, isVisible, openOverflowMenu, closeOverflowMenu, }: OverflowProviderProps) => JSX.Element;
|
|
26
|
+
/**
|
|
27
|
+
* __useOverFlowStatus__
|
|
28
|
+
*
|
|
29
|
+
* Returns the current context value for the nearest OverflowProvider.
|
|
30
|
+
*
|
|
31
|
+
* - [Example](https://atlassian.design/components/atlassian-navigation/examples#responsive)
|
|
32
|
+
*/
|
|
33
|
+
export declare const useOverflowStatus: () => {
|
|
34
|
+
isVisible: boolean;
|
|
35
|
+
openOverflowMenu: typeof noop;
|
|
36
|
+
closeOverflowMenu: typeof noop;
|
|
37
|
+
};
|
|
38
|
+
export declare const useOverflowController: (nodes: ReactNode | ReactNode[]) => {
|
|
39
|
+
visibleItems: (string | number | boolean | {} | React.ReactElement<any, string | React.JSXElementConstructor<any>> | React.ReactNodeArray | React.ReactPortal | null | undefined)[];
|
|
40
|
+
overflowItems: (string | number | boolean | {} | React.ReactElement<any, string | React.JSXElementConstructor<any>> | React.ReactNodeArray | React.ReactPortal | null | undefined)[];
|
|
41
|
+
updateWidth: import("lodash").DebouncedFunc<React.Dispatch<React.SetStateAction<number>>>;
|
|
42
|
+
};
|
|
43
|
+
declare const _default: (props: OverflowContext) => void;
|
|
44
|
+
export default _default;
|
|
@@ -0,0 +1,30 @@
|
|
|
1
|
+
export { AtlassianNavigation } from './components/AtlassianNavigation';
|
|
2
|
+
export type { AtlassianNavigationProps } from './components/AtlassianNavigation/types';
|
|
3
|
+
export { AppSwitcher } from './components/AppSwitcher';
|
|
4
|
+
export type { AppSwitcherProps } from './components/AppSwitcher/types';
|
|
5
|
+
export { Create } from './components/Create';
|
|
6
|
+
export type { CreateProps } from './components/Create/types';
|
|
7
|
+
export { Help } from './components/Help';
|
|
8
|
+
export type { HelpProps } from './components/Help/types';
|
|
9
|
+
export { Notifications } from './components/Notifications';
|
|
10
|
+
export type { NotificationsProps } from './components/Notifications/types';
|
|
11
|
+
export { PrimaryButton } from './components/PrimaryButton';
|
|
12
|
+
export type { PrimaryButtonProps } from './components/PrimaryButton/types';
|
|
13
|
+
export { PrimaryDropdownButton } from './components/PrimaryDropdownButton';
|
|
14
|
+
export type { PrimaryDropdownButtonProps } from './components/PrimaryDropdownButton/types';
|
|
15
|
+
export { IconButton } from './components/IconButton';
|
|
16
|
+
export type { IconButtonProps } from './components/IconButton/types';
|
|
17
|
+
export { CustomProductHome, ProductHome } from './components/ProductHome';
|
|
18
|
+
export type { CustomProductHomeProps, ProductHomeProps, } from './components/ProductHome/types';
|
|
19
|
+
export { Profile } from './components/Profile';
|
|
20
|
+
export type { ProfileProps } from './components/Profile/types';
|
|
21
|
+
export { Search } from './components/Search';
|
|
22
|
+
export type { SearchProps } from './components/Search/types';
|
|
23
|
+
export { Settings } from './components/Settings';
|
|
24
|
+
export type { SettingsProps } from './components/Settings/types';
|
|
25
|
+
export { SignIn } from './components/SignIn';
|
|
26
|
+
export type { SignInProps } from './components/SignIn/types';
|
|
27
|
+
export { useOverflowStatus } from './controllers/overflow';
|
|
28
|
+
export { HORIZONTAL_GLOBAL_NAV_HEIGHT } from './common/constants';
|
|
29
|
+
export { atlassianTheme, generateTheme, ThemeProvider } from './theme';
|
|
30
|
+
export type { Colors, CreateCSS, GenerateThemeArgs, IconButtonCSS, Mode, NavigationCSS, NavigationTheme, PrimaryButtonCSS, SearchCSS, SkeletonCSS, } from './theme';
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
/// <reference types="react" />
|
|
2
|
+
export type SkeletonHelpButtonProps = {
|
|
3
|
+
/**
|
|
4
|
+
* Describes the specific role of this navigation component for users viewing the page with a screen
|
|
5
|
+
* reader. Differentiates from other navigation buttons on a page.
|
|
6
|
+
*/
|
|
7
|
+
label: string;
|
|
8
|
+
};
|
|
9
|
+
/**
|
|
10
|
+
* __Skeleton Notification button__
|
|
11
|
+
*
|
|
12
|
+
* Skeleton buttons are lightweight HTML button elements with CSS that represent
|
|
13
|
+
* their heavier interactive counterparts, for use when elements of the
|
|
14
|
+
* navigation are loaded dynamically. This one represents the Help button.
|
|
15
|
+
*
|
|
16
|
+
* - [Examples](https://atlassian.design/components/atlassian-navigation/examples#skeleton-button)
|
|
17
|
+
* - [Code](https://atlassian.design/components/atlassian-navigation/code)
|
|
18
|
+
*/
|
|
19
|
+
export declare const SkeletonHelpButton: ({ label }: SkeletonHelpButtonProps) => JSX.Element;
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
/// <reference types="react" />
|
|
2
|
+
export type SkeletonNotificationButtonProps = {
|
|
3
|
+
/**
|
|
4
|
+
* Describes the specific role of this navigation component for users viewing the page with a screen
|
|
5
|
+
* reader. Differentiates from other navigation buttons on a page.
|
|
6
|
+
*/
|
|
7
|
+
label: string;
|
|
8
|
+
};
|
|
9
|
+
/**
|
|
10
|
+
* __Skeleton Notification button__
|
|
11
|
+
*
|
|
12
|
+
* Skeleton buttons are lightweight HTML button elements with CSS that represent
|
|
13
|
+
* their heavier interactive counterparts, for use when elements of the
|
|
14
|
+
* navigation are loaded dynamically. This one represents the Notification button.
|
|
15
|
+
*
|
|
16
|
+
* - [Examples](https://atlassian.design/components/atlassian-navigation/examples#skeleton-button)
|
|
17
|
+
* - [Code](https://atlassian.design/components/atlassian-navigation/code)
|
|
18
|
+
*/
|
|
19
|
+
export declare const SkeletonNotificationButton: ({ label, }: SkeletonNotificationButtonProps) => JSX.Element;
|