@atlaskit/atlassian-navigation 2.2.5 → 2.2.6

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 (168) hide show
  1. package/CHANGELOG.md +7 -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/PrimaryDropdownButton/index.js +10 -0
  15. package/dist/cjs/components/PrimaryItemsContainer/index.js +2 -1
  16. package/dist/cjs/components/PrimaryItemsContainer/skeleton.js +2 -1
  17. package/dist/cjs/components/ProductHome/custom-product-home.js +10 -1
  18. package/dist/cjs/components/ProductHome/product-home.js +13 -1
  19. package/dist/cjs/components/ProductHome/skeleton.js +2 -1
  20. package/dist/cjs/components/Profile/index.js +10 -0
  21. package/dist/cjs/components/Profile/skeleton.js +2 -0
  22. package/dist/cjs/components/Search/index.js +11 -1
  23. package/dist/cjs/components/Search/skeleton.js +2 -1
  24. package/dist/cjs/components/Settings/index.js +8 -0
  25. package/dist/cjs/components/SignIn/index.js +10 -1
  26. package/dist/cjs/components/SignIn/skeleton.js +2 -0
  27. package/dist/cjs/components/SkeletonCreateButton/index.js +12 -1
  28. package/dist/cjs/components/SkeletonIconButton/index.js +12 -1
  29. package/dist/cjs/components/SkeletonPrimaryButton/index.js +11 -0
  30. package/dist/cjs/controllers/overflow/index.js +14 -5
  31. package/dist/cjs/skeleton-help-button.js +10 -0
  32. package/dist/cjs/skeleton-notification-button.js +10 -0
  33. package/dist/cjs/skeleton-settings-button.js +10 -0
  34. package/dist/cjs/skeleton-switcher-button.js +10 -0
  35. package/dist/cjs/theme/{defaultTheme.js → default-theme.js} +1 -1
  36. package/dist/cjs/theme/index.js +5 -5
  37. package/dist/cjs/theme/{themeGenerator.js → theme-generator.js} +4 -3
  38. package/dist/cjs/theme/{themeHelpers.js → theme-helpers.js} +0 -0
  39. package/dist/cjs/theme/{ThemeProvider.js → theme-provider.js} +8 -0
  40. package/dist/cjs/theme/themes.js +2 -2
  41. package/dist/cjs/theme/{useTheme.js → use-theme.js} +2 -2
  42. package/dist/cjs/version.json +1 -1
  43. package/dist/es2019/components/AppSwitcher/index.js +11 -0
  44. package/dist/es2019/components/AtlassianNavigation/index.js +11 -1
  45. package/dist/es2019/components/AtlassianNavigation/skeleton.js +14 -0
  46. package/dist/es2019/components/BadgeContainer/index.js +3 -1
  47. package/dist/es2019/components/Create/index.js +14 -2
  48. package/dist/es2019/components/Create/skeleton.js +3 -1
  49. package/dist/es2019/components/Help/index.js +9 -0
  50. package/dist/es2019/components/IconButton/index.js +12 -1
  51. package/dist/es2019/components/IconButton/skeleton.js +3 -1
  52. package/dist/es2019/components/Notifications/index.js +10 -0
  53. package/dist/es2019/components/PrimaryButton/index.js +12 -1
  54. package/dist/es2019/components/PrimaryButton/skeleton.js +7 -6
  55. package/dist/es2019/components/PrimaryDropdownButton/index.js +10 -0
  56. package/dist/es2019/components/PrimaryItemsContainer/index.js +3 -1
  57. package/dist/es2019/components/PrimaryItemsContainer/skeleton.js +3 -1
  58. package/dist/es2019/components/ProductHome/custom-product-home.js +10 -1
  59. package/dist/es2019/components/ProductHome/product-home.js +13 -1
  60. package/dist/es2019/components/ProductHome/skeleton.js +3 -1
  61. package/dist/es2019/components/Profile/index.js +11 -0
  62. package/dist/es2019/components/Profile/skeleton.js +3 -1
  63. package/dist/es2019/components/Search/index.js +11 -1
  64. package/dist/es2019/components/Search/skeleton.js +3 -1
  65. package/dist/es2019/components/Settings/index.js +9 -0
  66. package/dist/es2019/components/SignIn/index.js +11 -1
  67. package/dist/es2019/components/SignIn/skeleton.js +3 -1
  68. package/dist/es2019/components/SkeletonCreateButton/index.js +13 -1
  69. package/dist/es2019/components/SkeletonIconButton/index.js +13 -1
  70. package/dist/es2019/components/SkeletonPrimaryButton/index.js +12 -0
  71. package/dist/es2019/controllers/overflow/index.js +12 -3
  72. package/dist/es2019/skeleton-help-button.js +11 -0
  73. package/dist/es2019/skeleton-notification-button.js +11 -0
  74. package/dist/es2019/skeleton-settings-button.js +11 -0
  75. package/dist/es2019/skeleton-switcher-button.js +11 -0
  76. package/dist/es2019/theme/{defaultTheme.js → default-theme.js} +1 -1
  77. package/dist/es2019/theme/index.js +4 -4
  78. package/dist/es2019/theme/{themeGenerator.js → theme-generator.js} +4 -3
  79. package/dist/es2019/theme/{themeHelpers.js → theme-helpers.js} +0 -0
  80. package/dist/es2019/theme/theme-provider.js +12 -0
  81. package/dist/es2019/theme/themes.js +2 -2
  82. package/dist/es2019/theme/use-theme.js +3 -0
  83. package/dist/es2019/version.json +1 -1
  84. package/dist/esm/components/AppSwitcher/index.js +11 -0
  85. package/dist/esm/components/AtlassianNavigation/index.js +11 -1
  86. package/dist/esm/components/AtlassianNavigation/skeleton.js +14 -0
  87. package/dist/esm/components/BadgeContainer/index.js +3 -1
  88. package/dist/esm/components/Create/index.js +14 -2
  89. package/dist/esm/components/Create/skeleton.js +3 -1
  90. package/dist/esm/components/Help/index.js +9 -0
  91. package/dist/esm/components/IconButton/index.js +12 -1
  92. package/dist/esm/components/IconButton/skeleton.js +3 -1
  93. package/dist/esm/components/Notifications/index.js +10 -0
  94. package/dist/esm/components/PrimaryButton/index.js +12 -1
  95. package/dist/esm/components/PrimaryButton/skeleton.js +7 -6
  96. package/dist/esm/components/PrimaryDropdownButton/index.js +10 -0
  97. package/dist/esm/components/PrimaryItemsContainer/index.js +3 -1
  98. package/dist/esm/components/PrimaryItemsContainer/skeleton.js +3 -1
  99. package/dist/esm/components/ProductHome/custom-product-home.js +10 -1
  100. package/dist/esm/components/ProductHome/product-home.js +13 -1
  101. package/dist/esm/components/ProductHome/skeleton.js +3 -1
  102. package/dist/esm/components/Profile/index.js +11 -0
  103. package/dist/esm/components/Profile/skeleton.js +3 -1
  104. package/dist/esm/components/Search/index.js +11 -1
  105. package/dist/esm/components/Search/skeleton.js +3 -1
  106. package/dist/esm/components/Settings/index.js +9 -0
  107. package/dist/esm/components/SignIn/index.js +11 -1
  108. package/dist/esm/components/SignIn/skeleton.js +3 -1
  109. package/dist/esm/components/SkeletonCreateButton/index.js +13 -1
  110. package/dist/esm/components/SkeletonIconButton/index.js +13 -1
  111. package/dist/esm/components/SkeletonPrimaryButton/index.js +12 -0
  112. package/dist/esm/controllers/overflow/index.js +12 -3
  113. package/dist/esm/skeleton-help-button.js +11 -0
  114. package/dist/esm/skeleton-notification-button.js +11 -0
  115. package/dist/esm/skeleton-settings-button.js +11 -0
  116. package/dist/esm/skeleton-switcher-button.js +11 -0
  117. package/dist/esm/theme/{defaultTheme.js → default-theme.js} +1 -1
  118. package/dist/esm/theme/index.js +4 -4
  119. package/dist/esm/theme/{themeGenerator.js → theme-generator.js} +4 -3
  120. package/dist/esm/theme/{themeHelpers.js → theme-helpers.js} +0 -0
  121. package/dist/esm/theme/theme-provider.js +12 -0
  122. package/dist/esm/theme/themes.js +2 -2
  123. package/dist/esm/theme/{useTheme.js → use-theme.js} +1 -1
  124. package/dist/esm/version.json +1 -1
  125. package/dist/types/components/AppSwitcher/index.d.ts +9 -0
  126. package/dist/types/components/AtlassianNavigation/index.d.ts +8 -0
  127. package/dist/types/components/AtlassianNavigation/skeleton.d.ts +13 -0
  128. package/dist/types/components/Create/index.d.ts +9 -0
  129. package/dist/types/components/Create/types.d.ts +2 -2
  130. package/dist/types/components/Help/index.d.ts +8 -0
  131. package/dist/types/components/IconButton/index.d.ts +9 -0
  132. package/dist/types/components/IconButton/types.d.ts +14 -14
  133. package/dist/types/components/Notifications/index.d.ts +9 -0
  134. package/dist/types/components/PrimaryButton/index.d.ts +9 -0
  135. package/dist/types/components/PrimaryButton/types.d.ts +14 -14
  136. package/dist/types/components/PrimaryDropdownButton/index.d.ts +9 -0
  137. package/dist/types/components/ProductHome/custom-product-home.d.ts +8 -0
  138. package/dist/types/components/ProductHome/product-home.d.ts +11 -0
  139. package/dist/types/components/Profile/index.d.ts +9 -0
  140. package/dist/types/components/Search/index.d.ts +8 -0
  141. package/dist/types/components/Settings/index.d.ts +8 -0
  142. package/dist/types/components/SignIn/index.d.ts +8 -0
  143. package/dist/types/components/SkeletonCreateButton/index.d.ts +10 -0
  144. package/dist/types/components/SkeletonIconButton/index.d.ts +10 -0
  145. package/dist/types/components/SkeletonPrimaryButton/index.d.ts +10 -0
  146. package/dist/types/controllers/overflow/index.d.ts +17 -4
  147. package/dist/types/skeleton-help-button.d.ts +10 -0
  148. package/dist/types/skeleton-notification-button.d.ts +10 -0
  149. package/dist/types/skeleton-settings-button.d.ts +10 -0
  150. package/dist/types/skeleton-switcher-button.d.ts +10 -0
  151. package/dist/types/theme/{defaultTheme.d.ts → default-theme.d.ts} +0 -0
  152. package/dist/types/theme/index.d.ts +4 -4
  153. package/dist/types/theme/{themeGenerator.d.ts → theme-generator.d.ts} +0 -0
  154. package/dist/types/theme/{themeHelpers.d.ts → theme-helpers.d.ts} +0 -0
  155. package/dist/types/theme/{ThemeProvider.d.ts → theme-provider.d.ts} +5 -0
  156. package/dist/types/theme/{useTheme.d.ts → use-theme.d.ts} +0 -0
  157. package/docs/01-intro.tsx +2 -2
  158. package/docs/02-atlassian-navigation.tsx +2 -2
  159. package/docs/03-product-home.tsx +4 -4
  160. package/docs/04-app-switcher.tsx +2 -2
  161. package/docs/05-create.tsx +4 -4
  162. package/docs/06-primary-actions.tsx +4 -4
  163. package/docs/07-secondary-actions.tsx +2 -2
  164. package/docs/97-theming.tsx +1 -1
  165. package/package.json +5 -3
  166. package/dist/es2019/theme/ThemeProvider.js +0 -4
  167. package/dist/es2019/theme/useTheme.js +0 -3
  168. package/dist/esm/theme/ThemeProvider.js +0 -4
@@ -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
41
  updateWidth: React.Dispatch<React.SetStateAction<number>> & import("lodash").Cancelable;
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>;
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
  `;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@atlaskit/atlassian-navigation",
3
- "version": "2.2.5",
3
+ "version": "2.2.6",
4
4
  "description": "A horizontal navigation component for Atlassian products.",
5
5
  "publishConfig": {
6
6
  "registry": "https://registry.npmjs.org/"
@@ -13,7 +13,7 @@
13
13
  "module:es2019": "dist/es2019/index.js",
14
14
  "types": "dist/types/index.d.ts",
15
15
  "sideEffects": false,
16
- "atlaskit:src": "src/index.ts",
16
+ "atlaskit:src": "src/index.tsx",
17
17
  "atlassian": {
18
18
  "team": "Design System Team",
19
19
  "deprecatedAutoEntryPoints": true,
@@ -26,9 +26,10 @@
26
26
  "dependencies": {
27
27
  "@atlaskit/analytics-namespaced-context": "^6.5.0",
28
28
  "@atlaskit/button": "^16.3.0",
29
+ "@atlaskit/ds-lib": "^2.1.0",
29
30
  "@atlaskit/icon": "^21.10.0",
30
31
  "@atlaskit/logo": "*",
31
- "@atlaskit/popup": "^1.3.0",
32
+ "@atlaskit/popup": "^1.4.0",
32
33
  "@atlaskit/theme": "^12.1.0",
33
34
  "@atlaskit/tokens": "^0.10.0",
34
35
  "@atlaskit/tooltip": "^17.5.0",
@@ -69,6 +70,7 @@
69
70
  "import-structure": "atlassian-conventions"
70
71
  },
71
72
  "@repo/internal": {
73
+ "design-system": "v1",
72
74
  "dom-events": "use-bind-event-listener",
73
75
  "ui-components": "lite-mode",
74
76
  "analytics": "analytics-next",
@@ -1,4 +0,0 @@
1
- import { createContext } from 'react';
2
- import { defaultTheme } from './themes';
3
- export const ThemeContext = /*#__PURE__*/createContext(defaultTheme);
4
- export const ThemeProvider = ThemeContext.Provider;
@@ -1,3 +0,0 @@
1
- import { useContext } from 'react';
2
- import { ThemeContext } from './ThemeProvider';
3
- export const useTheme = () => useContext(ThemeContext);
@@ -1,4 +0,0 @@
1
- import { createContext } from 'react';
2
- import { defaultTheme } from './themes';
3
- export var ThemeContext = /*#__PURE__*/createContext(defaultTheme);
4
- export var ThemeProvider = ThemeContext.Provider;