@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.
Files changed (172) hide show
  1. package/CHANGELOG.md +19 -0
  2. package/dist/cjs/components/AppSwitcher/index.js +10 -0
  3. package/dist/cjs/components/AtlassianNavigation/index.js +10 -1
  4. package/dist/cjs/components/AtlassianNavigation/skeleton.js +13 -0
  5. package/dist/cjs/components/BadgeContainer/index.js +2 -1
  6. package/dist/cjs/components/Create/index.js +14 -2
  7. package/dist/cjs/components/Create/skeleton.js +2 -1
  8. package/dist/cjs/components/Help/index.js +9 -0
  9. package/dist/cjs/components/IconButton/index.js +11 -1
  10. package/dist/cjs/components/IconButton/skeleton.js +2 -1
  11. package/dist/cjs/components/Notifications/index.js +10 -0
  12. package/dist/cjs/components/PrimaryButton/index.js +12 -1
  13. package/dist/cjs/components/PrimaryButton/skeleton.js +6 -8
  14. package/dist/cjs/components/PrimaryButton/styles.js +1 -1
  15. package/dist/cjs/components/PrimaryDropdownButton/index.js +10 -0
  16. package/dist/cjs/components/PrimaryItemsContainer/index.js +2 -1
  17. package/dist/cjs/components/PrimaryItemsContainer/skeleton.js +2 -1
  18. package/dist/cjs/components/ProductHome/custom-product-home.js +10 -1
  19. package/dist/cjs/components/ProductHome/product-home.js +13 -1
  20. package/dist/cjs/components/ProductHome/skeleton.js +2 -1
  21. package/dist/cjs/components/Profile/index.js +10 -0
  22. package/dist/cjs/components/Profile/skeleton.js +2 -0
  23. package/dist/cjs/components/Search/index.js +11 -1
  24. package/dist/cjs/components/Search/skeleton.js +2 -1
  25. package/dist/cjs/components/Settings/index.js +8 -0
  26. package/dist/cjs/components/SignIn/index.js +10 -1
  27. package/dist/cjs/components/SignIn/skeleton.js +2 -0
  28. package/dist/cjs/components/SkeletonCreateButton/index.js +12 -1
  29. package/dist/cjs/components/SkeletonIconButton/index.js +12 -1
  30. package/dist/cjs/components/SkeletonPrimaryButton/index.js +11 -0
  31. package/dist/cjs/controllers/overflow/index.js +14 -5
  32. package/dist/cjs/skeleton-help-button.js +10 -0
  33. package/dist/cjs/skeleton-notification-button.js +10 -0
  34. package/dist/cjs/skeleton-settings-button.js +10 -0
  35. package/dist/cjs/skeleton-switcher-button.js +10 -0
  36. package/dist/cjs/theme/{defaultTheme.js → default-theme.js} +13 -3
  37. package/dist/cjs/theme/index.js +5 -5
  38. package/dist/cjs/theme/{themeGenerator.js → theme-generator.js} +11 -4
  39. package/dist/cjs/theme/{themeHelpers.js → theme-helpers.js} +0 -0
  40. package/dist/cjs/theme/{ThemeProvider.js → theme-provider.js} +8 -0
  41. package/dist/cjs/theme/themes.js +2 -2
  42. package/dist/cjs/theme/{useTheme.js → use-theme.js} +2 -2
  43. package/dist/cjs/version.json +1 -1
  44. package/dist/es2019/components/AppSwitcher/index.js +11 -0
  45. package/dist/es2019/components/AtlassianNavigation/index.js +11 -1
  46. package/dist/es2019/components/AtlassianNavigation/skeleton.js +14 -0
  47. package/dist/es2019/components/BadgeContainer/index.js +3 -1
  48. package/dist/es2019/components/Create/index.js +14 -2
  49. package/dist/es2019/components/Create/skeleton.js +3 -1
  50. package/dist/es2019/components/Help/index.js +9 -0
  51. package/dist/es2019/components/IconButton/index.js +12 -1
  52. package/dist/es2019/components/IconButton/skeleton.js +3 -1
  53. package/dist/es2019/components/Notifications/index.js +10 -0
  54. package/dist/es2019/components/PrimaryButton/index.js +12 -1
  55. package/dist/es2019/components/PrimaryButton/skeleton.js +7 -6
  56. package/dist/es2019/components/PrimaryButton/styles.js +1 -1
  57. package/dist/es2019/components/PrimaryDropdownButton/index.js +10 -0
  58. package/dist/es2019/components/PrimaryItemsContainer/index.js +3 -1
  59. package/dist/es2019/components/PrimaryItemsContainer/skeleton.js +3 -1
  60. package/dist/es2019/components/ProductHome/custom-product-home.js +10 -1
  61. package/dist/es2019/components/ProductHome/product-home.js +13 -1
  62. package/dist/es2019/components/ProductHome/skeleton.js +3 -1
  63. package/dist/es2019/components/Profile/index.js +11 -0
  64. package/dist/es2019/components/Profile/skeleton.js +3 -1
  65. package/dist/es2019/components/Search/index.js +11 -1
  66. package/dist/es2019/components/Search/skeleton.js +3 -1
  67. package/dist/es2019/components/Settings/index.js +9 -0
  68. package/dist/es2019/components/SignIn/index.js +11 -1
  69. package/dist/es2019/components/SignIn/skeleton.js +3 -1
  70. package/dist/es2019/components/SkeletonCreateButton/index.js +13 -1
  71. package/dist/es2019/components/SkeletonIconButton/index.js +13 -1
  72. package/dist/es2019/components/SkeletonPrimaryButton/index.js +12 -0
  73. package/dist/es2019/controllers/overflow/index.js +12 -3
  74. package/dist/es2019/skeleton-help-button.js +11 -0
  75. package/dist/es2019/skeleton-notification-button.js +11 -0
  76. package/dist/es2019/skeleton-settings-button.js +11 -0
  77. package/dist/es2019/skeleton-switcher-button.js +11 -0
  78. package/dist/es2019/theme/{defaultTheme.js → default-theme.js} +13 -3
  79. package/dist/es2019/theme/index.js +4 -4
  80. package/dist/es2019/theme/{themeGenerator.js → theme-generator.js} +11 -4
  81. package/dist/es2019/theme/{themeHelpers.js → theme-helpers.js} +0 -0
  82. package/dist/es2019/theme/theme-provider.js +12 -0
  83. package/dist/es2019/theme/themes.js +2 -2
  84. package/dist/es2019/theme/use-theme.js +3 -0
  85. package/dist/es2019/version.json +1 -1
  86. package/dist/esm/components/AppSwitcher/index.js +11 -0
  87. package/dist/esm/components/AtlassianNavigation/index.js +11 -1
  88. package/dist/esm/components/AtlassianNavigation/skeleton.js +14 -0
  89. package/dist/esm/components/BadgeContainer/index.js +3 -1
  90. package/dist/esm/components/Create/index.js +14 -2
  91. package/dist/esm/components/Create/skeleton.js +3 -1
  92. package/dist/esm/components/Help/index.js +9 -0
  93. package/dist/esm/components/IconButton/index.js +12 -1
  94. package/dist/esm/components/IconButton/skeleton.js +3 -1
  95. package/dist/esm/components/Notifications/index.js +10 -0
  96. package/dist/esm/components/PrimaryButton/index.js +12 -1
  97. package/dist/esm/components/PrimaryButton/skeleton.js +7 -6
  98. package/dist/esm/components/PrimaryButton/styles.js +1 -1
  99. package/dist/esm/components/PrimaryDropdownButton/index.js +10 -0
  100. package/dist/esm/components/PrimaryItemsContainer/index.js +3 -1
  101. package/dist/esm/components/PrimaryItemsContainer/skeleton.js +3 -1
  102. package/dist/esm/components/ProductHome/custom-product-home.js +10 -1
  103. package/dist/esm/components/ProductHome/product-home.js +13 -1
  104. package/dist/esm/components/ProductHome/skeleton.js +3 -1
  105. package/dist/esm/components/Profile/index.js +11 -0
  106. package/dist/esm/components/Profile/skeleton.js +3 -1
  107. package/dist/esm/components/Search/index.js +11 -1
  108. package/dist/esm/components/Search/skeleton.js +3 -1
  109. package/dist/esm/components/Settings/index.js +9 -0
  110. package/dist/esm/components/SignIn/index.js +11 -1
  111. package/dist/esm/components/SignIn/skeleton.js +3 -1
  112. package/dist/esm/components/SkeletonCreateButton/index.js +13 -1
  113. package/dist/esm/components/SkeletonIconButton/index.js +13 -1
  114. package/dist/esm/components/SkeletonPrimaryButton/index.js +12 -0
  115. package/dist/esm/controllers/overflow/index.js +12 -3
  116. package/dist/esm/skeleton-help-button.js +11 -0
  117. package/dist/esm/skeleton-notification-button.js +11 -0
  118. package/dist/esm/skeleton-settings-button.js +11 -0
  119. package/dist/esm/skeleton-switcher-button.js +11 -0
  120. package/dist/esm/theme/{defaultTheme.js → default-theme.js} +13 -3
  121. package/dist/esm/theme/index.js +4 -4
  122. package/dist/esm/theme/{themeGenerator.js → theme-generator.js} +11 -4
  123. package/dist/esm/theme/{themeHelpers.js → theme-helpers.js} +0 -0
  124. package/dist/esm/theme/theme-provider.js +12 -0
  125. package/dist/esm/theme/themes.js +2 -2
  126. package/dist/esm/theme/{useTheme.js → use-theme.js} +1 -1
  127. package/dist/esm/version.json +1 -1
  128. package/dist/types/components/AppSwitcher/index.d.ts +9 -0
  129. package/dist/types/components/AtlassianNavigation/index.d.ts +8 -0
  130. package/dist/types/components/AtlassianNavigation/skeleton.d.ts +13 -0
  131. package/dist/types/components/Create/index.d.ts +9 -0
  132. package/dist/types/components/Create/types.d.ts +2 -2
  133. package/dist/types/components/Help/index.d.ts +8 -0
  134. package/dist/types/components/IconButton/index.d.ts +9 -0
  135. package/dist/types/components/IconButton/types.d.ts +14 -14
  136. package/dist/types/components/Notifications/index.d.ts +9 -0
  137. package/dist/types/components/PrimaryButton/index.d.ts +9 -0
  138. package/dist/types/components/PrimaryButton/types.d.ts +14 -14
  139. package/dist/types/components/PrimaryDropdownButton/index.d.ts +9 -0
  140. package/dist/types/components/ProductHome/custom-product-home.d.ts +8 -0
  141. package/dist/types/components/ProductHome/product-home.d.ts +11 -0
  142. package/dist/types/components/Profile/index.d.ts +9 -0
  143. package/dist/types/components/Search/index.d.ts +8 -0
  144. package/dist/types/components/Settings/index.d.ts +8 -0
  145. package/dist/types/components/SignIn/index.d.ts +8 -0
  146. package/dist/types/components/SkeletonCreateButton/index.d.ts +10 -0
  147. package/dist/types/components/SkeletonIconButton/index.d.ts +10 -0
  148. package/dist/types/components/SkeletonPrimaryButton/index.d.ts +10 -0
  149. package/dist/types/controllers/overflow/index.d.ts +18 -5
  150. package/dist/types/skeleton-help-button.d.ts +10 -0
  151. package/dist/types/skeleton-notification-button.d.ts +10 -0
  152. package/dist/types/skeleton-settings-button.d.ts +10 -0
  153. package/dist/types/skeleton-switcher-button.d.ts +10 -0
  154. package/dist/types/theme/{defaultTheme.d.ts → default-theme.d.ts} +0 -0
  155. package/dist/types/theme/index.d.ts +4 -4
  156. package/dist/types/theme/{themeGenerator.d.ts → theme-generator.d.ts} +0 -0
  157. package/dist/types/theme/{themeHelpers.d.ts → theme-helpers.d.ts} +0 -0
  158. package/dist/types/theme/{ThemeProvider.d.ts → theme-provider.d.ts} +5 -0
  159. package/dist/types/theme/types.d.ts +1 -0
  160. package/dist/types/theme/{useTheme.d.ts → use-theme.d.ts} +0 -0
  161. package/docs/01-intro.tsx +2 -2
  162. package/docs/02-atlassian-navigation.tsx +2 -2
  163. package/docs/03-product-home.tsx +4 -4
  164. package/docs/04-app-switcher.tsx +2 -2
  165. package/docs/05-create.tsx +4 -4
  166. package/docs/06-primary-actions.tsx +4 -4
  167. package/docs/07-secondary-actions.tsx +2 -2
  168. package/docs/97-theming.tsx +1 -1
  169. package/package.json +7 -5
  170. package/dist/es2019/theme/ThemeProvider.js +0 -4
  171. package/dist/es2019/theme/useTheme.js +0 -3
  172. 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
- 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
- ```
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
- 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
- ```
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 OverflowContextType {
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: () => void;
23
- closeOverflowMenu: () => void;
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>> & import("lodash").Cancelable;
41
+ updateWidth: import("lodash").DebouncedFunc<React.Dispatch<React.SetStateAction<number>>>;
29
42
  };
30
- declare const _default: (props: OverflowContextType) => void;
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;
@@ -1,6 +1,6 @@
1
- export { generateTheme } from './themeGenerator';
2
- export { ThemeProvider } from './ThemeProvider';
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 './useTheme';
6
- export { hexToRGBA } from './themeHelpers';
5
+ export { useTheme } from './use-theme';
6
+ export { hexToRGBA } from './theme-helpers';
@@ -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;
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.tsx').default}
43
- source={require('!!raw-loader!../examples/barebones.tsx')}
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.tsx').default}
28
- source={require('!!raw-loader!../examples/barebones.tsx')}
27
+ Component={require('../examples/barebones').default}
28
+ source={require('!!raw-loader!../examples/barebones')}
29
29
  />
30
30
  )}
31
31
 
@@ -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.tsx').default}
23
- source={require('!!raw-loader!../examples/product-home.tsx')}
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.tsx').default}
61
- source={require('!!raw-loader!../examples/custom-product-home.tsx')}
60
+ Component={require('../examples/custom-product-home').default}
61
+ source={require('!!raw-loader!../examples/custom-product-home')}
62
62
  />
63
63
  )}
64
64
 
@@ -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.tsx').default}
19
- source={require('!!raw-loader!../examples/app-switcher.tsx')}
18
+ Component={require('../examples/app-switcher').default}
19
+ source={require('!!raw-loader!../examples/app-switcher')}
20
20
  />
21
21
  )}
22
22
 
@@ -15,16 +15,16 @@ import { Create } from '@atlaskit/atlassian-navigation';
15
15
  ${(
16
16
  <Example
17
17
  title="Create"
18
- Component={require('../examples/create.tsx').default}
19
- source={require('!!raw-loader!../examples/create.tsx')}
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.tsx').default}
27
- source={require('!!raw-loader!../examples/create-with-link.tsx')}
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.tsx').default}
25
- source={require('!!raw-loader!../examples/primary-button.tsx')}
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.tsx').default}
52
- source={require('!!raw-loader!../examples/primary-dropdown-button.tsx')}
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.tsx').default}
25
- source={require('!!raw-loader!../examples/help-button.tsx')}
24
+ Component={require('../examples/help-button').default}
25
+ source={require('!!raw-loader!../examples/help-button')}
26
26
  />
27
27
  )}
28
28
 
@@ -39,7 +39,7 @@ const theme = generateTheme({
39
39
  ${(
40
40
  <Props
41
41
  heading=""
42
- props={require('!!extract-react-types-loader!../src/theme/themeGenerator')}
42
+ props={require('!!extract-react-types-loader!../src/theme/theme-generator')}
43
43
  />
44
44
  )}
45
45
  `;