@atlaskit/atlassian-navigation 2.5.1 → 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.
Files changed (74) hide show
  1. package/CHANGELOG.md +6 -0
  2. package/dist/cjs/version.json +1 -1
  3. package/dist/es2019/version.json +1 -1
  4. package/dist/esm/version.json +1 -1
  5. package/dist/types-ts4.5/common/constants.d.ts +9 -0
  6. package/dist/types-ts4.5/common/styles.d.ts +10 -0
  7. package/dist/types-ts4.5/components/AppSwitcher/index.d.ts +14 -0
  8. package/dist/types-ts4.5/components/AppSwitcher/types.d.ts +2 -0
  9. package/dist/types-ts4.5/components/AtlassianNavigation/index.d.ts +13 -0
  10. package/dist/types-ts4.5/components/AtlassianNavigation/skeleton.d.ts +18 -0
  11. package/dist/types-ts4.5/components/AtlassianNavigation/types.d.ts +107 -0
  12. package/dist/types-ts4.5/components/BadgeContainer/index.d.ts +4 -0
  13. package/dist/types-ts4.5/components/BadgeContainer/types.d.ts +6 -0
  14. package/dist/types-ts4.5/components/Create/index.d.ts +13 -0
  15. package/dist/types-ts4.5/components/Create/skeleton.d.ts +2 -0
  16. package/dist/types-ts4.5/components/Create/styles.d.ts +3 -0
  17. package/dist/types-ts4.5/components/Create/types.d.ts +35 -0
  18. package/dist/types-ts4.5/components/Help/index.d.ts +13 -0
  19. package/dist/types-ts4.5/components/Help/types.d.ts +9 -0
  20. package/dist/types-ts4.5/components/IconButton/index.d.ts +14 -0
  21. package/dist/types-ts4.5/components/IconButton/skeleton.d.ts +4 -0
  22. package/dist/types-ts4.5/components/IconButton/styles.d.ts +3 -0
  23. package/dist/types-ts4.5/components/IconButton/types.d.ts +100 -0
  24. package/dist/types-ts4.5/components/Notifications/index.d.ts +14 -0
  25. package/dist/types-ts4.5/components/Notifications/types.d.ts +9 -0
  26. package/dist/types-ts4.5/components/PrimaryButton/index.d.ts +18 -0
  27. package/dist/types-ts4.5/components/PrimaryButton/skeleton.d.ts +4 -0
  28. package/dist/types-ts4.5/components/PrimaryButton/styles.d.ts +3 -0
  29. package/dist/types-ts4.5/components/PrimaryButton/types.d.ts +43 -0
  30. package/dist/types-ts4.5/components/PrimaryDropdownButton/index.d.ts +16 -0
  31. package/dist/types-ts4.5/components/PrimaryDropdownButton/types.d.ts +18 -0
  32. package/dist/types-ts4.5/components/PrimaryItemsContainer/index.d.ts +6 -0
  33. package/dist/types-ts4.5/components/PrimaryItemsContainer/skeleton.d.ts +3 -0
  34. package/dist/types-ts4.5/components/PrimaryItemsContainer/types.d.ts +10 -0
  35. package/dist/types-ts4.5/components/ProductHome/custom-product-home.d.ts +12 -0
  36. package/dist/types-ts4.5/components/ProductHome/index.d.ts +2 -0
  37. package/dist/types-ts4.5/components/ProductHome/product-home.d.ts +15 -0
  38. package/dist/types-ts4.5/components/ProductHome/skeleton.d.ts +5 -0
  39. package/dist/types-ts4.5/components/ProductHome/types.d.ts +100 -0
  40. package/dist/types-ts4.5/components/ProductHome/utils.d.ts +1 -0
  41. package/dist/types-ts4.5/components/Profile/index.d.ts +17 -0
  42. package/dist/types-ts4.5/components/Profile/skeleton.d.ts +2 -0
  43. package/dist/types-ts4.5/components/Profile/types.d.ts +2 -0
  44. package/dist/types-ts4.5/components/Search/index.d.ts +12 -0
  45. package/dist/types-ts4.5/components/Search/skeleton.d.ts +2 -0
  46. package/dist/types-ts4.5/components/Search/types.d.ts +16 -0
  47. package/dist/types-ts4.5/components/Settings/index.d.ts +11 -0
  48. package/dist/types-ts4.5/components/Settings/types.d.ts +2 -0
  49. package/dist/types-ts4.5/components/SignIn/index.d.ts +12 -0
  50. package/dist/types-ts4.5/components/SignIn/skeleton.d.ts +2 -0
  51. package/dist/types-ts4.5/components/SignIn/types.d.ts +2 -0
  52. package/dist/types-ts4.5/components/SkeletonCreateButton/index.d.ts +14 -0
  53. package/dist/types-ts4.5/components/SkeletonCreateButton/types.d.ts +12 -0
  54. package/dist/types-ts4.5/components/SkeletonIconButton/index.d.ts +14 -0
  55. package/dist/types-ts4.5/components/SkeletonIconButton/types.d.ts +18 -0
  56. package/dist/types-ts4.5/components/SkeletonPrimaryButton/index.d.ts +14 -0
  57. package/dist/types-ts4.5/components/SkeletonPrimaryButton/types.d.ts +25 -0
  58. package/dist/types-ts4.5/controllers/overflow/index.d.ts +44 -0
  59. package/dist/types-ts4.5/controllers/overflow/types.d.ts +7 -0
  60. package/dist/types-ts4.5/index.d.ts +30 -0
  61. package/dist/types-ts4.5/skeleton-help-button.d.ts +19 -0
  62. package/dist/types-ts4.5/skeleton-notification-button.d.ts +19 -0
  63. package/dist/types-ts4.5/skeleton-settings-button.d.ts +19 -0
  64. package/dist/types-ts4.5/skeleton-switcher-button.d.ts +19 -0
  65. package/dist/types-ts4.5/skeleton.d.ts +5 -0
  66. package/dist/types-ts4.5/theme/default-theme.d.ts +6 -0
  67. package/dist/types-ts4.5/theme/index.d.ts +6 -0
  68. package/dist/types-ts4.5/theme/theme-generator.d.ts +3 -0
  69. package/dist/types-ts4.5/theme/theme-helpers.d.ts +5 -0
  70. package/dist/types-ts4.5/theme/theme-provider.d.ts +8 -0
  71. package/dist/types-ts4.5/theme/themes.d.ts +3 -0
  72. package/dist/types-ts4.5/theme/types.d.ts +69 -0
  73. package/dist/types-ts4.5/theme/use-theme.d.ts +1 -0
  74. package/package.json +1 -1
@@ -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,2 @@
1
+ /// <reference types="react" />
2
+ export declare const ProfileSkeleton: () => JSX.Element;
@@ -0,0 +1,2 @@
1
+ import { IconButtonProps } from '../IconButton/types';
2
+ export type ProfileProps = IconButtonProps;
@@ -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,2 @@
1
+ import { jsx } from '@emotion/react';
2
+ export declare const SearchSkeleton: () => jsx.JSX.Element;
@@ -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,2 @@
1
+ import { BaseIconButtonProps } from '../IconButton/types';
2
+ export type SettingsProps = BaseIconButtonProps;
@@ -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,2 @@
1
+ /// <reference types="react" />
2
+ export declare const SignInSkeleton: () => JSX.Element;
@@ -0,0 +1,2 @@
1
+ import { BaseIconButtonProps } from '../IconButton/types';
2
+ export type SignInProps = BaseIconButtonProps;
@@ -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,7 @@
1
+ import { ReactNode } from 'react';
2
+ export type OverflowProviderProps = {
3
+ children: ReactNode;
4
+ isVisible: boolean;
5
+ openOverflowMenu: () => void;
6
+ closeOverflowMenu: () => void;
7
+ };
@@ -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;
@@ -0,0 +1,19 @@
1
+ /// <reference types="react" />
2
+ export type SkeletonSettingsButtonProps = {
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 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
+ */
19
+ export declare const SkeletonSettingsButton: ({ label, }: SkeletonSettingsButtonProps) => JSX.Element;
@@ -0,0 +1,19 @@
1
+ /// <reference types="react" />
2
+ export type SkeletonSwitcherButtonProps = {
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 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
+ */
19
+ export declare const SkeletonSwitcherButton: ({ label, }: SkeletonSwitcherButtonProps) => JSX.Element;
@@ -0,0 +1,5 @@
1
+ export { NavigationSkeleton } from './components/AtlassianNavigation/skeleton';
2
+ export type { NavigationSkeletonProps } from './components/AtlassianNavigation/types';
3
+ export { SkeletonCreateButton } from './components/SkeletonCreateButton';
4
+ export { SkeletonIconButton } from './components/SkeletonIconButton';
5
+ export { SkeletonPrimaryButton } from './components/SkeletonPrimaryButton';
@@ -0,0 +1,6 @@
1
+ import { Mode } from './types';
2
+ declare const defaultTheme: {
3
+ mode: Mode;
4
+ };
5
+ export declare const DEFAULT_THEME_NAME = "atlassian";
6
+ export default defaultTheme;
@@ -0,0 +1,6 @@
1
+ export { generateTheme } from './theme-generator';
2
+ export { ThemeProvider } from './theme-provider';
3
+ export { atlassianTheme, defaultTheme } from './themes';
4
+ export type { CreateCSS, IconButtonCSS, Mode, NavigationCSS, NavigationTheme, PrimaryButtonCSS, SearchCSS, ProductHomeCSS, SkeletonCSS, Colors, GenerateThemeArgs, } from './types';
5
+ export { useTheme } from './use-theme';
6
+ export { hexToRGBA } from './theme-helpers';
@@ -0,0 +1,3 @@
1
+ import { GenerateThemeArgs, NavigationTheme } from './types';
2
+ export declare const generateTheme: (themeColors: GenerateThemeArgs) => NavigationTheme;
3
+ export default generateTheme;
@@ -0,0 +1,5 @@
1
+ export declare const hexToRGBA: (hex: string, opacity?: number) => string;
2
+ export declare const getBoxShadow: (color: string) => string;
3
+ export declare const convertHexShorthand: (color: string) => string;
4
+ export declare const generateTextColor: (color: string) => string;
5
+ export declare const getContrastColor: (contrastValue: number, opacityValue: number, color: string) => string;
@@ -0,0 +1,8 @@
1
+ /// <reference types="react" />
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
+ */
8
+ export declare const ThemeProvider: import("react").Provider<import("./types").NavigationTheme>;
@@ -0,0 +1,3 @@
1
+ import { NavigationTheme } from './types';
2
+ export declare const atlassianTheme: NavigationTheme;
3
+ export declare const defaultTheme: NavigationTheme;
@@ -0,0 +1,69 @@
1
+ import { CSSObject } from '@emotion/react';
2
+ export type CSSProperties = CSSObject & {
3
+ backgroundColor: string;
4
+ color: string;
5
+ };
6
+ export type ButtonCSSProperties = CSSProperties & {
7
+ boxShadow: string;
8
+ };
9
+ export type ButtonCSSContext = {
10
+ default: ButtonCSSProperties;
11
+ hover: ButtonCSSProperties;
12
+ focus: ButtonCSSProperties;
13
+ active: ButtonCSSProperties;
14
+ selected: ButtonCSSProperties;
15
+ selectedHover?: ButtonCSSProperties;
16
+ };
17
+ export type CreateCSS = ButtonCSSContext;
18
+ export type IconButtonCSS = ButtonCSSContext;
19
+ export type PrimaryButtonCSS = ButtonCSSContext;
20
+ export type NavigationCSS = CSSProperties;
21
+ type LogoStyleProps = {
22
+ iconGradientStart?: string;
23
+ iconGradientStop?: string;
24
+ iconColor?: string;
25
+ textColor?: string;
26
+ };
27
+ export type ProductHomeCSS = CSSProperties & LogoStyleProps;
28
+ export type SearchCSS = {
29
+ default: CSSProperties;
30
+ focus: CSSObject;
31
+ hover: CSSObject;
32
+ };
33
+ export type SkeletonCSS = CSSObject & {
34
+ backgroundColor: string;
35
+ opacity: number;
36
+ };
37
+ export type Mode = {
38
+ create: CreateCSS;
39
+ iconButton: IconButtonCSS;
40
+ navigation: NavigationCSS;
41
+ primaryButton: PrimaryButtonCSS;
42
+ productHome: ProductHomeCSS;
43
+ search: SearchCSS;
44
+ skeleton: SkeletonCSS;
45
+ };
46
+ export type NavigationTheme = {
47
+ mode: Mode;
48
+ };
49
+ export type Colors = {
50
+ backgroundColor: string;
51
+ color: string;
52
+ };
53
+ export type GenerateThemeArgs = {
54
+ /**
55
+ * Name of the theme.
56
+ * If you pass in "atlassian" will return the default atlassian theme and not
57
+ * use any of the colors you pass in.
58
+ */
59
+ name?: string;
60
+ /**
61
+ * Main background color of the horizontal navigation bar.
62
+ */
63
+ backgroundColor: string;
64
+ /**
65
+ * Highlight color for the navigation actions.
66
+ */
67
+ highlightColor: string;
68
+ };
69
+ export {};
@@ -0,0 +1 @@
1
+ export declare const useTheme: () => import("./types").NavigationTheme;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@atlaskit/atlassian-navigation",
3
- "version": "2.5.1",
3
+ "version": "2.5.2",
4
4
  "description": "A horizontal navigation component for Atlassian products.",
5
5
  "publishConfig": {
6
6
  "registry": "https://registry.npmjs.org/"