@atlaskit/atlassian-navigation 2.2.5 → 2.2.8
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 +19 -0
- package/dist/cjs/components/AppSwitcher/index.js +10 -0
- package/dist/cjs/components/AtlassianNavigation/index.js +10 -1
- package/dist/cjs/components/AtlassianNavigation/skeleton.js +13 -0
- package/dist/cjs/components/BadgeContainer/index.js +2 -1
- package/dist/cjs/components/Create/index.js +14 -2
- package/dist/cjs/components/Create/skeleton.js +2 -1
- package/dist/cjs/components/Help/index.js +9 -0
- package/dist/cjs/components/IconButton/index.js +11 -1
- package/dist/cjs/components/IconButton/skeleton.js +2 -1
- package/dist/cjs/components/Notifications/index.js +10 -0
- package/dist/cjs/components/PrimaryButton/index.js +12 -1
- package/dist/cjs/components/PrimaryButton/skeleton.js +6 -8
- package/dist/cjs/components/PrimaryButton/styles.js +1 -1
- package/dist/cjs/components/PrimaryDropdownButton/index.js +10 -0
- package/dist/cjs/components/PrimaryItemsContainer/index.js +2 -1
- package/dist/cjs/components/PrimaryItemsContainer/skeleton.js +2 -1
- package/dist/cjs/components/ProductHome/custom-product-home.js +10 -1
- package/dist/cjs/components/ProductHome/product-home.js +13 -1
- package/dist/cjs/components/ProductHome/skeleton.js +2 -1
- package/dist/cjs/components/Profile/index.js +10 -0
- package/dist/cjs/components/Profile/skeleton.js +2 -0
- package/dist/cjs/components/Search/index.js +11 -1
- package/dist/cjs/components/Search/skeleton.js +2 -1
- package/dist/cjs/components/Settings/index.js +8 -0
- package/dist/cjs/components/SignIn/index.js +10 -1
- package/dist/cjs/components/SignIn/skeleton.js +2 -0
- package/dist/cjs/components/SkeletonCreateButton/index.js +12 -1
- package/dist/cjs/components/SkeletonIconButton/index.js +12 -1
- package/dist/cjs/components/SkeletonPrimaryButton/index.js +11 -0
- package/dist/cjs/controllers/overflow/index.js +14 -5
- package/dist/cjs/skeleton-help-button.js +10 -0
- package/dist/cjs/skeleton-notification-button.js +10 -0
- package/dist/cjs/skeleton-settings-button.js +10 -0
- package/dist/cjs/skeleton-switcher-button.js +10 -0
- package/dist/cjs/theme/{defaultTheme.js → default-theme.js} +13 -3
- package/dist/cjs/theme/index.js +5 -5
- package/dist/cjs/theme/{themeGenerator.js → theme-generator.js} +11 -4
- package/dist/cjs/theme/{themeHelpers.js → theme-helpers.js} +0 -0
- package/dist/cjs/theme/{ThemeProvider.js → theme-provider.js} +8 -0
- package/dist/cjs/theme/themes.js +2 -2
- package/dist/cjs/theme/{useTheme.js → use-theme.js} +2 -2
- package/dist/cjs/version.json +1 -1
- package/dist/es2019/components/AppSwitcher/index.js +11 -0
- package/dist/es2019/components/AtlassianNavigation/index.js +11 -1
- package/dist/es2019/components/AtlassianNavigation/skeleton.js +14 -0
- package/dist/es2019/components/BadgeContainer/index.js +3 -1
- package/dist/es2019/components/Create/index.js +14 -2
- package/dist/es2019/components/Create/skeleton.js +3 -1
- package/dist/es2019/components/Help/index.js +9 -0
- package/dist/es2019/components/IconButton/index.js +12 -1
- package/dist/es2019/components/IconButton/skeleton.js +3 -1
- package/dist/es2019/components/Notifications/index.js +10 -0
- package/dist/es2019/components/PrimaryButton/index.js +12 -1
- package/dist/es2019/components/PrimaryButton/skeleton.js +7 -6
- package/dist/es2019/components/PrimaryButton/styles.js +1 -1
- package/dist/es2019/components/PrimaryDropdownButton/index.js +10 -0
- package/dist/es2019/components/PrimaryItemsContainer/index.js +3 -1
- package/dist/es2019/components/PrimaryItemsContainer/skeleton.js +3 -1
- package/dist/es2019/components/ProductHome/custom-product-home.js +10 -1
- package/dist/es2019/components/ProductHome/product-home.js +13 -1
- package/dist/es2019/components/ProductHome/skeleton.js +3 -1
- package/dist/es2019/components/Profile/index.js +11 -0
- package/dist/es2019/components/Profile/skeleton.js +3 -1
- package/dist/es2019/components/Search/index.js +11 -1
- package/dist/es2019/components/Search/skeleton.js +3 -1
- package/dist/es2019/components/Settings/index.js +9 -0
- package/dist/es2019/components/SignIn/index.js +11 -1
- package/dist/es2019/components/SignIn/skeleton.js +3 -1
- package/dist/es2019/components/SkeletonCreateButton/index.js +13 -1
- package/dist/es2019/components/SkeletonIconButton/index.js +13 -1
- package/dist/es2019/components/SkeletonPrimaryButton/index.js +12 -0
- package/dist/es2019/controllers/overflow/index.js +12 -3
- package/dist/es2019/skeleton-help-button.js +11 -0
- package/dist/es2019/skeleton-notification-button.js +11 -0
- package/dist/es2019/skeleton-settings-button.js +11 -0
- package/dist/es2019/skeleton-switcher-button.js +11 -0
- package/dist/es2019/theme/{defaultTheme.js → default-theme.js} +13 -3
- package/dist/es2019/theme/index.js +4 -4
- package/dist/es2019/theme/{themeGenerator.js → theme-generator.js} +11 -4
- package/dist/es2019/theme/{themeHelpers.js → theme-helpers.js} +0 -0
- package/dist/es2019/theme/theme-provider.js +12 -0
- package/dist/es2019/theme/themes.js +2 -2
- package/dist/es2019/theme/use-theme.js +3 -0
- package/dist/es2019/version.json +1 -1
- package/dist/esm/components/AppSwitcher/index.js +11 -0
- package/dist/esm/components/AtlassianNavigation/index.js +11 -1
- package/dist/esm/components/AtlassianNavigation/skeleton.js +14 -0
- package/dist/esm/components/BadgeContainer/index.js +3 -1
- package/dist/esm/components/Create/index.js +14 -2
- package/dist/esm/components/Create/skeleton.js +3 -1
- package/dist/esm/components/Help/index.js +9 -0
- package/dist/esm/components/IconButton/index.js +12 -1
- package/dist/esm/components/IconButton/skeleton.js +3 -1
- package/dist/esm/components/Notifications/index.js +10 -0
- package/dist/esm/components/PrimaryButton/index.js +12 -1
- package/dist/esm/components/PrimaryButton/skeleton.js +7 -6
- package/dist/esm/components/PrimaryButton/styles.js +1 -1
- package/dist/esm/components/PrimaryDropdownButton/index.js +10 -0
- package/dist/esm/components/PrimaryItemsContainer/index.js +3 -1
- package/dist/esm/components/PrimaryItemsContainer/skeleton.js +3 -1
- package/dist/esm/components/ProductHome/custom-product-home.js +10 -1
- package/dist/esm/components/ProductHome/product-home.js +13 -1
- package/dist/esm/components/ProductHome/skeleton.js +3 -1
- package/dist/esm/components/Profile/index.js +11 -0
- package/dist/esm/components/Profile/skeleton.js +3 -1
- package/dist/esm/components/Search/index.js +11 -1
- package/dist/esm/components/Search/skeleton.js +3 -1
- package/dist/esm/components/Settings/index.js +9 -0
- package/dist/esm/components/SignIn/index.js +11 -1
- package/dist/esm/components/SignIn/skeleton.js +3 -1
- package/dist/esm/components/SkeletonCreateButton/index.js +13 -1
- package/dist/esm/components/SkeletonIconButton/index.js +13 -1
- package/dist/esm/components/SkeletonPrimaryButton/index.js +12 -0
- package/dist/esm/controllers/overflow/index.js +12 -3
- package/dist/esm/skeleton-help-button.js +11 -0
- package/dist/esm/skeleton-notification-button.js +11 -0
- package/dist/esm/skeleton-settings-button.js +11 -0
- package/dist/esm/skeleton-switcher-button.js +11 -0
- package/dist/esm/theme/{defaultTheme.js → default-theme.js} +13 -3
- package/dist/esm/theme/index.js +4 -4
- package/dist/esm/theme/{themeGenerator.js → theme-generator.js} +11 -4
- package/dist/esm/theme/{themeHelpers.js → theme-helpers.js} +0 -0
- package/dist/esm/theme/theme-provider.js +12 -0
- package/dist/esm/theme/themes.js +2 -2
- package/dist/esm/theme/{useTheme.js → use-theme.js} +1 -1
- package/dist/esm/version.json +1 -1
- package/dist/types/components/AppSwitcher/index.d.ts +9 -0
- package/dist/types/components/AtlassianNavigation/index.d.ts +8 -0
- package/dist/types/components/AtlassianNavigation/skeleton.d.ts +13 -0
- package/dist/types/components/Create/index.d.ts +9 -0
- package/dist/types/components/Create/types.d.ts +2 -2
- package/dist/types/components/Help/index.d.ts +8 -0
- package/dist/types/components/IconButton/index.d.ts +9 -0
- package/dist/types/components/IconButton/types.d.ts +14 -14
- package/dist/types/components/Notifications/index.d.ts +9 -0
- package/dist/types/components/PrimaryButton/index.d.ts +9 -0
- package/dist/types/components/PrimaryButton/types.d.ts +14 -14
- package/dist/types/components/PrimaryDropdownButton/index.d.ts +9 -0
- package/dist/types/components/ProductHome/custom-product-home.d.ts +8 -0
- package/dist/types/components/ProductHome/product-home.d.ts +11 -0
- package/dist/types/components/Profile/index.d.ts +9 -0
- package/dist/types/components/Search/index.d.ts +8 -0
- package/dist/types/components/Settings/index.d.ts +8 -0
- package/dist/types/components/SignIn/index.d.ts +8 -0
- package/dist/types/components/SkeletonCreateButton/index.d.ts +10 -0
- package/dist/types/components/SkeletonIconButton/index.d.ts +10 -0
- package/dist/types/components/SkeletonPrimaryButton/index.d.ts +10 -0
- package/dist/types/controllers/overflow/index.d.ts +18 -5
- package/dist/types/skeleton-help-button.d.ts +10 -0
- package/dist/types/skeleton-notification-button.d.ts +10 -0
- package/dist/types/skeleton-settings-button.d.ts +10 -0
- package/dist/types/skeleton-switcher-button.d.ts +10 -0
- package/dist/types/theme/{defaultTheme.d.ts → default-theme.d.ts} +0 -0
- package/dist/types/theme/index.d.ts +4 -4
- package/dist/types/theme/{themeGenerator.d.ts → theme-generator.d.ts} +0 -0
- package/dist/types/theme/{themeHelpers.d.ts → theme-helpers.d.ts} +0 -0
- package/dist/types/theme/{ThemeProvider.d.ts → theme-provider.d.ts} +5 -0
- package/dist/types/theme/types.d.ts +1 -0
- package/dist/types/theme/{useTheme.d.ts → use-theme.d.ts} +0 -0
- package/docs/01-intro.tsx +2 -2
- package/docs/02-atlassian-navigation.tsx +2 -2
- package/docs/03-product-home.tsx +4 -4
- package/docs/04-app-switcher.tsx +2 -2
- package/docs/05-create.tsx +4 -4
- package/docs/06-primary-actions.tsx +4 -4
- package/docs/07-secondary-actions.tsx +2 -2
- package/docs/97-theming.tsx +1 -1
- package/package.json +7 -5
- package/dist/es2019/theme/ThemeProvider.js +0 -4
- package/dist/es2019/theme/useTheme.js +0 -3
- package/dist/esm/theme/ThemeProvider.js +0 -4
|
@@ -1,4 +1,17 @@
|
|
|
1
1
|
/// <reference types="react" />
|
|
2
2
|
import { NavigationSkeletonProps } from './types';
|
|
3
|
+
/**
|
|
4
|
+
* __Navigation skeleton__
|
|
5
|
+
*
|
|
6
|
+
* Use loading skeletons to reduce the perceived loading time of heavier
|
|
7
|
+
* full-page experiences. This should only be used when the whole navigation is
|
|
8
|
+
* delayed; if there are only certain dynamically loaded navigation items that
|
|
9
|
+
* slow down the page, you should look into using
|
|
10
|
+
* [skeleton buttons](https://atlassian.design/components/atlassian-navigation/examples#skeleton-button)
|
|
11
|
+
* instead.
|
|
12
|
+
*
|
|
13
|
+
* - [Examples](https://atlassian.design/components/atlassian-navigation/examples#skeleton-loader)
|
|
14
|
+
* - [Code](https://atlassian.design/components/{packageName}/code)
|
|
15
|
+
*/
|
|
3
16
|
export declare const NavigationSkeleton: ({ primaryItemsCount, secondaryItemsCount, theme, showSiteName, shouldShowSearch, testId, }: NavigationSkeletonProps) => JSX.Element;
|
|
4
17
|
export default NavigationSkeleton;
|
|
@@ -1,4 +1,13 @@
|
|
|
1
1
|
/// <reference types="react" />
|
|
2
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
|
+
*/
|
|
3
12
|
export declare const Create: ({ onClick, href, text, buttonTooltip, iconButtonTooltip, testId, }: CreateProps) => JSX.Element;
|
|
4
13
|
export default Create;
|
|
@@ -25,9 +25,9 @@ export interface CreateProps {
|
|
|
25
25
|
* A `testId` prop is provided for specified elements,
|
|
26
26
|
* which is a unique string that appears as a data attribute `data-testid` in the rendered code,
|
|
27
27
|
* serving as a hook for automated tests.
|
|
28
|
-
|
|
28
|
+
*
|
|
29
29
|
* Will set these elements when defined:
|
|
30
|
-
|
|
30
|
+
*
|
|
31
31
|
* - Create button shown on large screen sizes - `{testId}-button`
|
|
32
32
|
* - Create icon button shown on small screen sizes - `{testId}-icon-button`
|
|
33
33
|
*/
|
|
@@ -1,4 +1,12 @@
|
|
|
1
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
|
+
*/
|
|
2
10
|
export declare const Help: React.ForwardRefExoticComponent<import("../IconButton/types").BaseIconButtonProps & {
|
|
3
11
|
badge?: React.ComponentType<{}> | undefined;
|
|
4
12
|
} & React.RefAttributes<any>>;
|
|
@@ -1,4 +1,13 @@
|
|
|
1
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
|
+
*/
|
|
2
11
|
export declare const IconButton: React.ForwardRefExoticComponent<import("./types").BaseIconButtonProps & {
|
|
3
12
|
icon: React.ReactChild | undefined;
|
|
4
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;
|
|
@@ -59,20 +59,20 @@ export interface BaseIconButtonProps {
|
|
|
59
59
|
*/
|
|
60
60
|
target?: string;
|
|
61
61
|
/**
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
62
|
+
* Allows for overriding the component used to render the button.
|
|
63
|
+
*
|
|
64
|
+
* This is primarily intended for compatibility with custom
|
|
65
|
+
* routing libraries when using the `href` prop.
|
|
66
|
+
*
|
|
67
|
+
* For further usage information, refer to the [documentation for button](https://atlassian.design/components/button/code).
|
|
68
|
+
*
|
|
69
|
+
* @example
|
|
70
|
+
* ```tsx
|
|
71
|
+
* <Settings
|
|
72
|
+
* component={CustomRouterLink}
|
|
73
|
+
* href="/path/to/url"
|
|
74
|
+
* />
|
|
75
|
+
* ```
|
|
76
76
|
*/
|
|
77
77
|
component?: CustomThemeButtonProps['component'];
|
|
78
78
|
/**
|
|
@@ -1,4 +1,13 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
|
+
/**
|
|
3
|
+
* __Notifications__
|
|
4
|
+
*
|
|
5
|
+
* A notifications button that can be passed into `AtlassianNavigation`'s
|
|
6
|
+
* `renderNotifications` prop.
|
|
7
|
+
*
|
|
8
|
+
* - [Examples](https://atlassian.design/components/atlassian-navigation/examples#notifications)
|
|
9
|
+
* - [Code](https://atlassian.design/components/atlassian-navigation/code)
|
|
10
|
+
*/
|
|
2
11
|
export declare const Notifications: React.ForwardRefExoticComponent<import("../IconButton/types").BaseIconButtonProps & {
|
|
3
12
|
badge: React.ComponentType<{}>;
|
|
4
13
|
} & React.RefAttributes<any>>;
|
|
@@ -1,4 +1,13 @@
|
|
|
1
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
|
+
*/
|
|
2
11
|
export declare const PrimaryButton: import("react").ForwardRefExoticComponent<Omit<import("@atlaskit/button/custom-theme-button").CustomThemeButtonProps, "appearance" | "onClick"> & {
|
|
3
12
|
component?: import("react").ComponentType<import("react").AllHTMLAttributes<HTMLElement>> | import("react").ElementType<any> | undefined;
|
|
4
13
|
isHighlighted?: boolean | undefined;
|
|
@@ -2,20 +2,20 @@ import { AllHTMLAttributes, ComponentType, ElementType } from 'react';
|
|
|
2
2
|
import { CustomThemeButtonProps } from '@atlaskit/button/types';
|
|
3
3
|
export declare type PrimaryButtonProps = Omit<CustomThemeButtonProps, 'appearance' | 'onClick'> & {
|
|
4
4
|
/**
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
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
19
|
*/
|
|
20
20
|
component?: ComponentType<AllHTMLAttributes<HTMLElement>> | ElementType<any>;
|
|
21
21
|
/**
|
|
@@ -1,4 +1,13 @@
|
|
|
1
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
|
+
*/
|
|
2
11
|
export declare const PrimaryDropdownButton: import("react").ForwardRefExoticComponent<Omit<import("../..").PrimaryButtonProps, "iconAfter"> & {
|
|
3
12
|
isHighlighted?: boolean | undefined;
|
|
4
13
|
testId?: string | undefined;
|
|
@@ -1,4 +1,12 @@
|
|
|
1
1
|
/// <reference types="react" />
|
|
2
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
|
+
*/
|
|
3
11
|
declare const CustomProductHome: (props: CustomProductHomeProps) => JSX.Element;
|
|
4
12
|
export default CustomProductHome;
|
|
@@ -1,4 +1,15 @@
|
|
|
1
1
|
/// <reference types="react" />
|
|
2
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
|
+
*/
|
|
3
14
|
declare const ProductHome: ({ icon: Icon, logo: Logo, siteTitle, onClick, href, onMouseDown, testId, logoMaxWidth, ...rest }: ProductHomeProps) => JSX.Element;
|
|
4
15
|
export default ProductHome;
|
|
@@ -1,5 +1,14 @@
|
|
|
1
1
|
/// <reference types="react" />
|
|
2
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
|
+
*/
|
|
3
12
|
export declare const Profile: import("react").ForwardRefExoticComponent<import("../IconButton/types").BaseIconButtonProps & {
|
|
4
13
|
icon: import("react").ReactChild | undefined;
|
|
5
14
|
theme?: ((current: (props: import("@atlaskit/button").ThemeProps) => import("@atlaskit/button").ThemeTokens, props: import("@atlaskit/button").ThemeProps) => import("@atlaskit/button").ThemeTokens) | undefined;
|
|
@@ -1,4 +1,12 @@
|
|
|
1
1
|
/// <reference types="react" />
|
|
2
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
|
+
*/
|
|
3
11
|
export declare const Search: (props: SearchProps) => JSX.Element;
|
|
4
12
|
export default Search;
|
|
@@ -1,3 +1,11 @@
|
|
|
1
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
|
+
*/
|
|
2
10
|
export declare const Settings: React.ForwardRefExoticComponent<import("../IconButton/types").BaseIconButtonProps & React.RefAttributes<any>>;
|
|
3
11
|
export default Settings;
|
|
@@ -1,4 +1,12 @@
|
|
|
1
1
|
/// <reference types="react" />
|
|
2
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
|
+
*/
|
|
3
11
|
export declare const SignIn: (props: SignInProps) => JSX.Element;
|
|
4
12
|
export default SignIn;
|
|
@@ -1,3 +1,13 @@
|
|
|
1
1
|
/// <reference types="react" />
|
|
2
2
|
import { SkeletonCreateButtonProps } from './types';
|
|
3
|
+
/**
|
|
4
|
+
* __Skeleton create button__
|
|
5
|
+
*
|
|
6
|
+
* Skeleton buttons are lightweight HTML button elements with CSS that represent
|
|
7
|
+
* their heavier interactive counterparts, for use when elements of the
|
|
8
|
+
* navigation are loaded dynamically. This one represents the Create button.
|
|
9
|
+
*
|
|
10
|
+
* - [Examples](https://atlassian.design/components/atlassian-navigation/examples#skeleton-button)
|
|
11
|
+
* - [Code](https://atlassian.design/components/atlassian-navigation/code)
|
|
12
|
+
*/
|
|
3
13
|
export declare const SkeletonCreateButton: ({ text, testId, }: SkeletonCreateButtonProps) => JSX.Element;
|
|
@@ -1,3 +1,13 @@
|
|
|
1
1
|
/// <reference types="react" />
|
|
2
2
|
import { SkeletonIconButtonProps } from './types';
|
|
3
|
+
/**
|
|
4
|
+
* __Skeleton icon button__
|
|
5
|
+
*
|
|
6
|
+
* Skeleton buttons are lightweight HTML button elements with CSS that represent
|
|
7
|
+
* their heavier interactive counterparts, for use when elements of the
|
|
8
|
+
* navigation are loaded dynamically. This one represents a generic icon button.
|
|
9
|
+
*
|
|
10
|
+
* - [Examples](https://atlassian.design/components/atlassian-navigation/examples#skeleton-button)
|
|
11
|
+
* - [Code](https://atlassian.design/components/atlassian-navigation/code)
|
|
12
|
+
*/
|
|
3
13
|
export declare const SkeletonIconButton: ({ children, testId, }: SkeletonIconButtonProps) => JSX.Element;
|
|
@@ -1,3 +1,13 @@
|
|
|
1
1
|
/// <reference types="react" />
|
|
2
2
|
import { SkeletonPrimaryButtonProps } from './types';
|
|
3
|
+
/**
|
|
4
|
+
* __Skeleton primary button__
|
|
5
|
+
*
|
|
6
|
+
* Skeleton buttons are lightweight HTML button elements with CSS that represent
|
|
7
|
+
* their heavier interactive counterparts, for use when elements of the
|
|
8
|
+
* navigation are loaded dynamically. This one represents a primary button.
|
|
9
|
+
*
|
|
10
|
+
* - [Examples](https://atlassian.design/components/atlassian-navigation/examples#skeleton-button)
|
|
11
|
+
* - [Code](https://atlassian.design/components/atlassian-navigation/code)
|
|
12
|
+
*/
|
|
3
13
|
export declare const SkeletonPrimaryButton: ({ isDropdownButton, isHighlighted, text, children, testId, }: SkeletonPrimaryButtonProps) => JSX.Element;
|
|
@@ -1,7 +1,8 @@
|
|
|
1
1
|
/// <reference types="lodash" />
|
|
2
2
|
import React, { ReactNode } from 'react';
|
|
3
|
+
import noop from '@atlaskit/ds-lib/noop';
|
|
3
4
|
import { OverflowProviderProps } from './types';
|
|
4
|
-
interface
|
|
5
|
+
interface OverflowContext {
|
|
5
6
|
/**
|
|
6
7
|
* Returns `true` when the navigation item is visible,
|
|
7
8
|
* and `false` when the navigation item has been pushed into the overflow menu.
|
|
@@ -16,16 +17,28 @@ interface OverflowContextType {
|
|
|
16
17
|
*/
|
|
17
18
|
closeOverflowMenu: () => void;
|
|
18
19
|
}
|
|
20
|
+
declare const OverflowContext: React.Context<{
|
|
21
|
+
isVisible: boolean;
|
|
22
|
+
openOverflowMenu: typeof noop;
|
|
23
|
+
closeOverflowMenu: typeof noop;
|
|
24
|
+
}>;
|
|
19
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
|
+
*/
|
|
20
33
|
export declare const useOverflowStatus: () => {
|
|
21
34
|
isVisible: boolean;
|
|
22
|
-
openOverflowMenu:
|
|
23
|
-
closeOverflowMenu:
|
|
35
|
+
openOverflowMenu: typeof noop;
|
|
36
|
+
closeOverflowMenu: typeof noop;
|
|
24
37
|
};
|
|
25
38
|
export declare const useOverflowController: (nodes: ReactNode | ReactNode[]) => {
|
|
26
39
|
visibleItems: (string | number | boolean | {} | React.ReactElement<any, string | React.JSXElementConstructor<any>> | React.ReactNodeArray | React.ReactPortal | null | undefined)[];
|
|
27
40
|
overflowItems: (string | number | boolean | {} | React.ReactElement<any, string | React.JSXElementConstructor<any>> | React.ReactNodeArray | React.ReactPortal | null | undefined)[];
|
|
28
|
-
updateWidth: React.Dispatch<React.SetStateAction<number
|
|
41
|
+
updateWidth: import("lodash").DebouncedFunc<React.Dispatch<React.SetStateAction<number>>>;
|
|
29
42
|
};
|
|
30
|
-
declare const _default: (props:
|
|
43
|
+
declare const _default: (props: OverflowContext) => void;
|
|
31
44
|
export default _default;
|
|
@@ -6,4 +6,14 @@ export declare type SkeletonHelpButtonProps = {
|
|
|
6
6
|
*/
|
|
7
7
|
label: string;
|
|
8
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
|
+
*/
|
|
9
19
|
export declare const SkeletonHelpButton: ({ label }: SkeletonHelpButtonProps) => JSX.Element;
|
|
@@ -6,4 +6,14 @@ export declare type SkeletonNotificationButtonProps = {
|
|
|
6
6
|
*/
|
|
7
7
|
label: string;
|
|
8
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
|
+
*/
|
|
9
19
|
export declare const SkeletonNotificationButton: ({ label, }: SkeletonNotificationButtonProps) => JSX.Element;
|
|
@@ -6,4 +6,14 @@ export declare type SkeletonSettingsButtonProps = {
|
|
|
6
6
|
*/
|
|
7
7
|
label: string;
|
|
8
8
|
};
|
|
9
|
+
/**
|
|
10
|
+
* __Skeleton settings 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 Settings button.
|
|
15
|
+
*
|
|
16
|
+
* - [Examples](https://atlassian.design/components/atlassian-navigation/examples#skeleton-button)
|
|
17
|
+
* - [Code](https://atlassian.design/components/atlassian-navigation/code)
|
|
18
|
+
*/
|
|
9
19
|
export declare const SkeletonSettingsButton: ({ label, }: SkeletonSettingsButtonProps) => JSX.Element;
|
|
@@ -6,4 +6,14 @@ export declare type SkeletonSwitcherButtonProps = {
|
|
|
6
6
|
*/
|
|
7
7
|
label: string;
|
|
8
8
|
};
|
|
9
|
+
/**
|
|
10
|
+
* __Skeleton switcher 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 AppSwitcher button.
|
|
15
|
+
*
|
|
16
|
+
* - [Examples](https://atlassian.design/components/atlassian-navigation/examples#skeleton-button)
|
|
17
|
+
* - [Code](https://atlassian.design/components/atlassian-navigation/code)
|
|
18
|
+
*/
|
|
9
19
|
export declare const SkeletonSwitcherButton: ({ label, }: SkeletonSwitcherButtonProps) => JSX.Element;
|
|
File without changes
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
export { generateTheme } from './
|
|
2
|
-
export { ThemeProvider } from './
|
|
1
|
+
export { generateTheme } from './theme-generator';
|
|
2
|
+
export { ThemeProvider } from './theme-provider';
|
|
3
3
|
export { atlassianTheme, defaultTheme } from './themes';
|
|
4
4
|
export type { CreateCSS, IconButtonCSS, Mode, NavigationCSS, NavigationTheme, PrimaryButtonCSS, SearchCSS, ProductHomeCSS, SkeletonCSS, Colors, GenerateThemeArgs, } from './types';
|
|
5
|
-
export { useTheme } from './
|
|
6
|
-
export { hexToRGBA } from './
|
|
5
|
+
export { useTheme } from './use-theme';
|
|
6
|
+
export { hexToRGBA } from './theme-helpers';
|
|
File without changes
|
|
File without changes
|
|
@@ -1,3 +1,8 @@
|
|
|
1
1
|
/// <reference types="react" />
|
|
2
2
|
export declare const ThemeContext: import("react").Context<import("./types").NavigationTheme>;
|
|
3
|
+
/**
|
|
4
|
+
* __Theme provider__
|
|
5
|
+
*
|
|
6
|
+
* A provider for the theme context used by all navigation components.
|
|
7
|
+
*/
|
|
3
8
|
export declare const ThemeProvider: import("react").Provider<import("./types").NavigationTheme>;
|
|
@@ -17,6 +17,7 @@ export declare type ButtonCSSContext = {
|
|
|
17
17
|
focus: ButtonFocusCSSProperties;
|
|
18
18
|
active: ButtonCSSProperties;
|
|
19
19
|
selected: ButtonCSSProperties;
|
|
20
|
+
selectedHover?: ButtonCSSProperties;
|
|
20
21
|
};
|
|
21
22
|
export declare type CreateCSS = ButtonCSSContext;
|
|
22
23
|
export declare type IconButtonCSS = ButtonCSSContext;
|
|
File without changes
|
package/docs/01-intro.tsx
CHANGED
|
@@ -39,8 +39,8 @@ const AtlassianHome = () => (
|
|
|
39
39
|
${(
|
|
40
40
|
<Example
|
|
41
41
|
title="Atlassian navigation"
|
|
42
|
-
Component={require('../examples/barebones
|
|
43
|
-
source={require('!!raw-loader!../examples/barebones
|
|
42
|
+
Component={require('../examples/barebones').default}
|
|
43
|
+
source={require('!!raw-loader!../examples/barebones')}
|
|
44
44
|
/>
|
|
45
45
|
)}
|
|
46
46
|
`;
|
|
@@ -24,8 +24,8 @@ import { AtlassianNavigation } from '@atlaskit/atlassian-navigation';
|
|
|
24
24
|
${(
|
|
25
25
|
<Example
|
|
26
26
|
title="Atlassian navigation"
|
|
27
|
-
Component={require('../examples/barebones
|
|
28
|
-
source={require('!!raw-loader!../examples/barebones
|
|
27
|
+
Component={require('../examples/barebones').default}
|
|
28
|
+
source={require('!!raw-loader!../examples/barebones')}
|
|
29
29
|
/>
|
|
30
30
|
)}
|
|
31
31
|
|
package/docs/03-product-home.tsx
CHANGED
|
@@ -19,8 +19,8 @@ import { AtlassianLogo, AtlassianIcon } from '@atlaskit/logo';
|
|
|
19
19
|
${(
|
|
20
20
|
<Example
|
|
21
21
|
title="Product home"
|
|
22
|
-
Component={require('../examples/product-home
|
|
23
|
-
source={require('!!raw-loader!../examples/product-home
|
|
22
|
+
Component={require('../examples/product-home').default}
|
|
23
|
+
source={require('!!raw-loader!../examples/product-home')}
|
|
24
24
|
/>
|
|
25
25
|
)}
|
|
26
26
|
|
|
@@ -57,8 +57,8 @@ export default () => (
|
|
|
57
57
|
${(
|
|
58
58
|
<Example
|
|
59
59
|
title="Custom product home"
|
|
60
|
-
Component={require('../examples/custom-product-home
|
|
61
|
-
source={require('!!raw-loader!../examples/custom-product-home
|
|
60
|
+
Component={require('../examples/custom-product-home').default}
|
|
61
|
+
source={require('!!raw-loader!../examples/custom-product-home')}
|
|
62
62
|
/>
|
|
63
63
|
)}
|
|
64
64
|
|
package/docs/04-app-switcher.tsx
CHANGED
|
@@ -15,8 +15,8 @@ import { AppSwitcher } from '@atlaskit/atlassian-navigation';
|
|
|
15
15
|
${(
|
|
16
16
|
<Example
|
|
17
17
|
title="App switcher"
|
|
18
|
-
Component={require('../examples/app-switcher
|
|
19
|
-
source={require('!!raw-loader!../examples/app-switcher
|
|
18
|
+
Component={require('../examples/app-switcher').default}
|
|
19
|
+
source={require('!!raw-loader!../examples/app-switcher')}
|
|
20
20
|
/>
|
|
21
21
|
)}
|
|
22
22
|
|
package/docs/05-create.tsx
CHANGED
|
@@ -15,16 +15,16 @@ import { Create } from '@atlaskit/atlassian-navigation';
|
|
|
15
15
|
${(
|
|
16
16
|
<Example
|
|
17
17
|
title="Create"
|
|
18
|
-
Component={require('../examples/create
|
|
19
|
-
source={require('!!raw-loader!../examples/create
|
|
18
|
+
Component={require('../examples/create').default}
|
|
19
|
+
source={require('!!raw-loader!../examples/create')}
|
|
20
20
|
/>
|
|
21
21
|
)}
|
|
22
22
|
|
|
23
23
|
${(
|
|
24
24
|
<Example
|
|
25
25
|
title="Create as a link"
|
|
26
|
-
Component={require('../examples/create-with-link
|
|
27
|
-
source={require('!!raw-loader!../examples/create-with-link
|
|
26
|
+
Component={require('../examples/create-with-link').default}
|
|
27
|
+
source={require('!!raw-loader!../examples/create-with-link')}
|
|
28
28
|
/>
|
|
29
29
|
)}
|
|
30
30
|
|
|
@@ -21,8 +21,8 @@ import { PrimaryButton } from '@atlaskit/atlassian-navigation';
|
|
|
21
21
|
${(
|
|
22
22
|
<Example
|
|
23
23
|
title="Primary button"
|
|
24
|
-
Component={require('../examples/primary-button
|
|
25
|
-
source={require('!!raw-loader!../examples/primary-button
|
|
24
|
+
Component={require('../examples/primary-button').default}
|
|
25
|
+
source={require('!!raw-loader!../examples/primary-button')}
|
|
26
26
|
/>
|
|
27
27
|
)}
|
|
28
28
|
|
|
@@ -48,8 +48,8 @@ import { PrimaryDropdownButton } from '@atlaskit/atlassian-navigation';
|
|
|
48
48
|
${(
|
|
49
49
|
<Example
|
|
50
50
|
title="Primary dropdown button"
|
|
51
|
-
Component={require('../examples/primary-dropdown-button
|
|
52
|
-
source={require('!!raw-loader!../examples/primary-dropdown-button
|
|
51
|
+
Component={require('../examples/primary-dropdown-button').default}
|
|
52
|
+
source={require('!!raw-loader!../examples/primary-dropdown-button')}
|
|
53
53
|
/>
|
|
54
54
|
)}
|
|
55
55
|
|
|
@@ -21,8 +21,8 @@ import { Help } from '@atlaskit/atlassian-navigation';
|
|
|
21
21
|
${(
|
|
22
22
|
<Example
|
|
23
23
|
title="Help button"
|
|
24
|
-
Component={require('../examples/help-button
|
|
25
|
-
source={require('!!raw-loader!../examples/help-button
|
|
24
|
+
Component={require('../examples/help-button').default}
|
|
25
|
+
source={require('!!raw-loader!../examples/help-button')}
|
|
26
26
|
/>
|
|
27
27
|
)}
|
|
28
28
|
|
package/docs/97-theming.tsx
CHANGED