@atlaskit/atlassian-navigation 5.7.1 → 5.7.3
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +13 -0
- package/afm-cc/tsconfig.json +0 -1
- package/afm-products/tsconfig.json +0 -1
- package/dist/cjs/common/action-section-desktop-css.js +12 -0
- package/dist/cjs/common/action-section-mobile-css.js +12 -0
- package/dist/cjs/common/constants.js +3 -0
- package/dist/cjs/common/styles.js +13 -9
- package/dist/cjs/components/AppSwitcher/app-switcher-nav4.js +61 -0
- package/dist/cjs/components/AppSwitcher/app-switcher.js +79 -0
- package/dist/cjs/components/AppSwitcher/index.js +1 -119
- package/dist/cjs/components/AtlassianNavigation/index.js +6 -0
- package/dist/cjs/components/AtlassianNavigation/skeleton.js +2 -0
- package/dist/cjs/components/Create/index.js +2 -0
- package/dist/cjs/components/Help/index.js +2 -0
- package/dist/cjs/components/IconButton/index.js +1 -0
- package/dist/cjs/components/Notifications/index.js +2 -0
- package/dist/cjs/components/PrimaryButton/index.js +2 -0
- package/dist/cjs/components/PrimaryDropdownButton/index.js +2 -0
- package/dist/cjs/components/PrimaryItemsContainer/index.js +5 -4
- package/dist/cjs/components/ProductHome/app-home.js +180 -0
- package/dist/cjs/components/ProductHome/custom-product-home.js +2 -0
- package/dist/cjs/components/ProductHome/product-home.js +21 -110
- package/dist/cjs/components/Profile/index.js +2 -0
- package/dist/cjs/components/Profile/profile.js +74 -0
- package/dist/cjs/components/Search/index.js +2 -0
- package/dist/cjs/components/Settings/index.js +2 -0
- package/dist/cjs/components/SignIn/index.js +2 -0
- package/dist/cjs/controllers/overflow/index.js +2 -0
- package/dist/cjs/controllers/overflow/overflow-context.js +16 -0
- package/dist/cjs/controllers/overflow/overflow-provider.js +27 -0
- package/dist/cjs/controllers/overflow/use-overflow-controller.js +111 -0
- package/dist/cjs/controllers/overflow/use-overflow-status.js +20 -0
- package/dist/cjs/entry-points/app-switcher.js +4 -3
- package/dist/cjs/entry-points/overflow.js +2 -2
- package/dist/cjs/entry-points/profile.js +2 -2
- package/dist/cjs/entry-points/skeleton-help-button.js +2 -1
- package/dist/cjs/index.js +8 -7
- package/dist/cjs/nav4-skeleton-help-button.js +33 -0
- package/dist/cjs/nav4-skeleton-notification-button.js +24 -0
- package/dist/cjs/nav4-skeleton-settings-button.js +23 -0
- package/dist/cjs/nav4-skeleton-switcher-button.js +24 -0
- package/dist/cjs/skeleton-help-button.js +1 -24
- package/dist/cjs/skeleton-notification-button.js +8 -16
- package/dist/cjs/skeleton-settings-button.js +8 -15
- package/dist/cjs/skeleton-switcher-button.js +14 -17
- package/dist/cjs/theme/atlassian-theme.js +16 -0
- package/dist/cjs/theme/convert-hex-shorthand.js +47 -0
- package/dist/cjs/theme/default-theme-brand-refresh.js +10 -0
- package/dist/cjs/theme/default-theme.js +1 -2
- package/dist/cjs/theme/generate-text-color.js +13 -0
- package/dist/cjs/theme/get-box-shadow.js +9 -0
- package/dist/cjs/theme/get-contrast-color.js +12 -0
- package/dist/cjs/theme/hex-to-rgba.js +18 -0
- package/dist/cjs/theme/index.js +2 -2
- package/dist/cjs/theme/theme-context.js +10 -0
- package/dist/cjs/theme/theme-generator.js +28 -18
- package/dist/cjs/theme/theme-helpers.js +10 -5
- package/dist/cjs/theme/theme-provider.js +11 -8
- package/dist/cjs/theme/themes.js +11 -8
- package/dist/cjs/theme/use-theme.js +2 -2
- package/dist/es2019/common/action-section-desktop-css.js +6 -0
- package/dist/es2019/common/action-section-mobile-css.js +6 -0
- package/dist/es2019/common/constants.js +3 -0
- package/dist/es2019/common/styles.js +2 -11
- package/dist/es2019/components/AppSwitcher/app-switcher-nav4.js +52 -0
- package/dist/es2019/components/AppSwitcher/app-switcher.js +70 -0
- package/dist/es2019/components/AppSwitcher/index.js +0 -116
- package/dist/es2019/components/AtlassianNavigation/index.js +6 -0
- package/dist/es2019/components/AtlassianNavigation/skeleton.js +2 -0
- package/dist/es2019/components/Create/index.js +2 -0
- package/dist/es2019/components/Help/index.js +2 -0
- package/dist/es2019/components/IconButton/index.js +1 -0
- package/dist/es2019/components/Notifications/index.js +2 -0
- package/dist/es2019/components/PrimaryButton/index.js +2 -0
- package/dist/es2019/components/PrimaryDropdownButton/index.js +2 -0
- package/dist/es2019/components/PrimaryItemsContainer/index.js +2 -1
- package/dist/es2019/components/ProductHome/app-home.js +185 -0
- package/dist/es2019/components/ProductHome/custom-product-home.js +2 -0
- package/dist/es2019/components/ProductHome/product-home.js +5 -110
- package/dist/es2019/components/Profile/index.js +2 -0
- package/dist/es2019/components/Profile/profile.js +65 -0
- package/dist/es2019/components/Search/index.js +2 -0
- package/dist/es2019/components/Settings/index.js +2 -0
- package/dist/es2019/components/SignIn/index.js +2 -0
- package/dist/es2019/controllers/overflow/index.js +2 -0
- package/dist/es2019/controllers/overflow/overflow-context.js +8 -0
- package/dist/es2019/controllers/overflow/overflow-provider.js +18 -0
- package/dist/es2019/controllers/overflow/use-overflow-controller.js +89 -0
- package/dist/es2019/controllers/overflow/use-overflow-status.js +13 -0
- package/dist/es2019/entry-points/app-switcher.js +2 -1
- package/dist/es2019/entry-points/overflow.js +1 -1
- package/dist/es2019/entry-points/profile.js +1 -1
- package/dist/es2019/entry-points/skeleton-help-button.js +2 -1
- package/dist/es2019/index.js +4 -3
- package/dist/es2019/nav4-skeleton-help-button.js +24 -0
- package/dist/es2019/nav4-skeleton-notification-button.js +15 -0
- package/dist/es2019/nav4-skeleton-settings-button.js +14 -0
- package/dist/es2019/nav4-skeleton-switcher-button.js +15 -0
- package/dist/es2019/skeleton-help-button.js +1 -22
- package/dist/es2019/skeleton-notification-button.js +1 -13
- package/dist/es2019/skeleton-settings-button.js +1 -12
- package/dist/es2019/skeleton-switcher-button.js +8 -14
- package/dist/es2019/theme/atlassian-theme.js +10 -0
- package/dist/es2019/theme/convert-hex-shorthand.js +27 -0
- package/dist/es2019/theme/default-theme-brand-refresh.js +3 -0
- package/dist/es2019/theme/default-theme.js +0 -1
- package/dist/es2019/theme/generate-text-color.js +6 -0
- package/dist/es2019/theme/get-box-shadow.js +1 -0
- package/dist/es2019/theme/get-contrast-color.js +3 -0
- package/dist/es2019/theme/hex-to-rgba.js +8 -0
- package/dist/es2019/theme/index.js +1 -1
- package/dist/es2019/theme/theme-context.js +4 -0
- package/dist/es2019/theme/theme-generator.js +12 -2
- package/dist/es2019/theme/theme-helpers.js +3 -5
- package/dist/es2019/theme/theme-provider.js +5 -7
- package/dist/es2019/theme/themes.js +6 -8
- package/dist/es2019/theme/use-theme.js +1 -1
- package/dist/esm/common/action-section-desktop-css.js +5 -0
- package/dist/esm/common/action-section-mobile-css.js +5 -0
- package/dist/esm/common/constants.js +3 -0
- package/dist/esm/common/styles.js +2 -8
- package/dist/esm/components/AppSwitcher/app-switcher-nav4.js +52 -0
- package/dist/esm/components/AppSwitcher/app-switcher.js +70 -0
- package/dist/esm/components/AppSwitcher/index.js +0 -115
- package/dist/esm/components/AtlassianNavigation/index.js +6 -0
- package/dist/esm/components/AtlassianNavigation/skeleton.js +2 -0
- package/dist/esm/components/Create/index.js +2 -0
- package/dist/esm/components/Help/index.js +2 -0
- package/dist/esm/components/IconButton/index.js +1 -0
- package/dist/esm/components/Notifications/index.js +2 -0
- package/dist/esm/components/PrimaryButton/index.js +2 -0
- package/dist/esm/components/PrimaryDropdownButton/index.js +2 -0
- package/dist/esm/components/PrimaryItemsContainer/index.js +2 -1
- package/dist/esm/components/ProductHome/app-home.js +172 -0
- package/dist/esm/components/ProductHome/custom-product-home.js +2 -0
- package/dist/esm/components/ProductHome/product-home.js +16 -110
- package/dist/esm/components/Profile/index.js +2 -0
- package/dist/esm/components/Profile/profile.js +65 -0
- package/dist/esm/components/Search/index.js +2 -0
- package/dist/esm/components/Settings/index.js +2 -0
- package/dist/esm/components/SignIn/index.js +2 -0
- package/dist/esm/controllers/overflow/index.js +2 -0
- package/dist/esm/controllers/overflow/overflow-context.js +8 -0
- package/dist/esm/controllers/overflow/overflow-provider.js +19 -0
- package/dist/esm/controllers/overflow/use-overflow-controller.js +103 -0
- package/dist/esm/controllers/overflow/use-overflow-status.js +15 -0
- package/dist/esm/entry-points/app-switcher.js +2 -1
- package/dist/esm/entry-points/overflow.js +1 -1
- package/dist/esm/entry-points/profile.js +1 -1
- package/dist/esm/entry-points/skeleton-help-button.js +2 -1
- package/dist/esm/index.js +4 -3
- package/dist/esm/nav4-skeleton-help-button.js +26 -0
- package/dist/esm/nav4-skeleton-notification-button.js +17 -0
- package/dist/esm/nav4-skeleton-settings-button.js +16 -0
- package/dist/esm/nav4-skeleton-switcher-button.js +17 -0
- package/dist/esm/skeleton-help-button.js +0 -23
- package/dist/esm/skeleton-notification-button.js +1 -15
- package/dist/esm/skeleton-settings-button.js +1 -14
- package/dist/esm/skeleton-switcher-button.js +8 -16
- package/dist/esm/theme/atlassian-theme.js +10 -0
- package/dist/esm/theme/convert-hex-shorthand.js +40 -0
- package/dist/esm/theme/default-theme-brand-refresh.js +3 -0
- package/dist/esm/theme/default-theme.js +0 -1
- package/dist/esm/theme/generate-text-color.js +6 -0
- package/dist/esm/theme/get-box-shadow.js +3 -0
- package/dist/esm/theme/get-contrast-color.js +5 -0
- package/dist/esm/theme/hex-to-rgba.js +11 -0
- package/dist/esm/theme/index.js +1 -1
- package/dist/esm/theme/theme-context.js +4 -0
- package/dist/esm/theme/theme-generator.js +12 -2
- package/dist/esm/theme/theme-helpers.js +3 -5
- package/dist/esm/theme/theme-provider.js +5 -7
- package/dist/esm/theme/themes.js +6 -8
- package/dist/esm/theme/use-theme.js +1 -1
- package/dist/types/common/action-section-desktop-css.d.ts +5 -0
- package/dist/types/common/action-section-mobile-css.d.ts +5 -0
- package/dist/types/common/constants.d.ts +3 -0
- package/dist/types/common/styles.d.ts +2 -10
- package/dist/types/components/AppSwitcher/app-switcher-nav4.d.ts +6 -0
- package/dist/types/components/AppSwitcher/app-switcher.d.ts +14 -0
- package/dist/types/components/AppSwitcher/index.d.ts +0 -12
- package/dist/types/components/AppSwitcher/types.d.ts +3 -0
- package/dist/types/components/AtlassianNavigation/index.d.ts +2 -0
- package/dist/types/components/AtlassianNavigation/skeleton.d.ts +2 -0
- package/dist/types/components/AtlassianNavigation/types.d.ts +6 -0
- package/dist/types/components/Create/index.d.ts +2 -0
- package/dist/types/components/Help/index.d.ts +2 -0
- package/dist/types/components/IconButton/index.d.ts +1 -0
- package/dist/types/components/Notifications/index.d.ts +2 -0
- package/dist/types/components/PrimaryButton/index.d.ts +2 -0
- package/dist/types/components/PrimaryDropdownButton/index.d.ts +2 -0
- package/dist/types/components/ProductHome/app-home.d.ts +20 -0
- package/dist/types/components/ProductHome/custom-product-home.d.ts +2 -0
- package/dist/types/components/ProductHome/product-home.d.ts +4 -13
- package/dist/types/components/Profile/index.d.ts +2 -0
- package/dist/types/components/Profile/profile.d.ts +14 -0
- package/dist/types/components/Profile/types.d.ts +3 -0
- package/dist/types/components/Search/index.d.ts +2 -0
- package/dist/types/components/Search/types.d.ts +3 -0
- package/dist/types/components/Settings/index.d.ts +2 -0
- package/dist/types/components/Settings/types.d.ts +3 -0
- package/dist/types/components/SignIn/index.d.ts +2 -0
- package/dist/types/components/SignIn/types.d.ts +3 -0
- package/dist/types/components/SkeletonCreateButton/types.d.ts +3 -0
- package/dist/types/components/SkeletonIconButton/types.d.ts +3 -0
- package/dist/types/components/SkeletonPrimaryButton/types.d.ts +3 -0
- package/dist/types/controllers/overflow/index.d.ts +2 -0
- package/dist/types/controllers/overflow/overflow-context.d.ts +17 -0
- package/dist/types/controllers/overflow/overflow-provider.d.ts +3 -0
- package/dist/types/controllers/overflow/use-overflow-controller.d.ts +7 -0
- package/dist/types/controllers/overflow/use-overflow-status.d.ts +11 -0
- package/dist/types/entry-points/app-switcher.d.ts +2 -1
- package/dist/types/entry-points/overflow.d.ts +1 -1
- package/dist/types/entry-points/profile.d.ts +1 -1
- package/dist/types/entry-points/skeleton-help-button.d.ts +2 -1
- package/dist/types/index.d.ts +4 -3
- package/dist/types/nav4-skeleton-help-button.d.ts +8 -0
- package/dist/types/nav4-skeleton-notification-button.d.ts +9 -0
- package/dist/types/nav4-skeleton-settings-button.d.ts +8 -0
- package/dist/types/nav4-skeleton-switcher-button.d.ts +8 -0
- package/dist/types/skeleton-help-button.d.ts +0 -6
- package/dist/types/skeleton-notification-button.d.ts +1 -7
- package/dist/types/skeleton-settings-button.d.ts +1 -6
- package/dist/types/skeleton-switcher-button.d.ts +6 -6
- package/dist/types/theme/atlassian-theme.d.ts +5 -0
- package/dist/types/theme/convert-hex-shorthand.d.ts +1 -0
- package/dist/types/theme/default-theme-brand-refresh.d.ts +1 -0
- package/dist/types/theme/default-theme.d.ts +0 -1
- package/dist/types/theme/generate-text-color.d.ts +1 -0
- package/dist/types/theme/get-box-shadow.d.ts +1 -0
- package/dist/types/theme/get-contrast-color.d.ts +1 -0
- package/dist/types/theme/hex-to-rgba.d.ts +1 -0
- package/dist/types/theme/index.d.ts +1 -1
- package/dist/types/theme/theme-context.d.ts +3 -0
- package/dist/types/theme/theme-generator.d.ts +5 -0
- package/dist/types/theme/theme-helpers.d.ts +1 -1
- package/dist/types/theme/theme-provider.d.ts +4 -2
- package/dist/types/theme/themes.d.ts +4 -1
- package/dist/types/theme/types.d.ts +30 -0
- package/dist/types-ts4.5/common/action-section-desktop-css.d.ts +5 -0
- package/dist/types-ts4.5/common/action-section-mobile-css.d.ts +5 -0
- package/dist/types-ts4.5/common/constants.d.ts +3 -0
- package/dist/types-ts4.5/common/styles.d.ts +2 -10
- package/dist/types-ts4.5/components/AppSwitcher/app-switcher-nav4.d.ts +6 -0
- package/dist/types-ts4.5/components/AppSwitcher/app-switcher.d.ts +14 -0
- package/dist/types-ts4.5/components/AppSwitcher/index.d.ts +0 -12
- package/dist/types-ts4.5/components/AppSwitcher/types.d.ts +3 -0
- package/dist/types-ts4.5/components/AtlassianNavigation/index.d.ts +2 -0
- package/dist/types-ts4.5/components/AtlassianNavigation/skeleton.d.ts +2 -0
- package/dist/types-ts4.5/components/AtlassianNavigation/types.d.ts +6 -0
- package/dist/types-ts4.5/components/Create/index.d.ts +2 -0
- package/dist/types-ts4.5/components/Help/index.d.ts +2 -0
- package/dist/types-ts4.5/components/IconButton/index.d.ts +1 -0
- package/dist/types-ts4.5/components/Notifications/index.d.ts +2 -0
- package/dist/types-ts4.5/components/PrimaryButton/index.d.ts +2 -0
- package/dist/types-ts4.5/components/PrimaryDropdownButton/index.d.ts +2 -0
- package/dist/types-ts4.5/components/ProductHome/app-home.d.ts +20 -0
- package/dist/types-ts4.5/components/ProductHome/custom-product-home.d.ts +2 -0
- package/dist/types-ts4.5/components/ProductHome/product-home.d.ts +4 -13
- package/dist/types-ts4.5/components/Profile/index.d.ts +2 -0
- package/dist/types-ts4.5/components/Profile/profile.d.ts +14 -0
- package/dist/types-ts4.5/components/Profile/types.d.ts +3 -0
- package/dist/types-ts4.5/components/Search/index.d.ts +2 -0
- package/dist/types-ts4.5/components/Search/types.d.ts +3 -0
- package/dist/types-ts4.5/components/Settings/index.d.ts +2 -0
- package/dist/types-ts4.5/components/Settings/types.d.ts +3 -0
- package/dist/types-ts4.5/components/SignIn/index.d.ts +2 -0
- package/dist/types-ts4.5/components/SignIn/types.d.ts +3 -0
- package/dist/types-ts4.5/components/SkeletonCreateButton/types.d.ts +3 -0
- package/dist/types-ts4.5/components/SkeletonIconButton/types.d.ts +3 -0
- package/dist/types-ts4.5/components/SkeletonPrimaryButton/types.d.ts +3 -0
- package/dist/types-ts4.5/controllers/overflow/index.d.ts +2 -0
- package/dist/types-ts4.5/controllers/overflow/overflow-context.d.ts +17 -0
- package/dist/types-ts4.5/controllers/overflow/overflow-provider.d.ts +3 -0
- package/dist/types-ts4.5/controllers/overflow/use-overflow-controller.d.ts +7 -0
- package/dist/types-ts4.5/controllers/overflow/use-overflow-status.d.ts +11 -0
- package/dist/types-ts4.5/entry-points/app-switcher.d.ts +2 -1
- package/dist/types-ts4.5/entry-points/overflow.d.ts +1 -1
- package/dist/types-ts4.5/entry-points/profile.d.ts +1 -1
- package/dist/types-ts4.5/entry-points/skeleton-help-button.d.ts +2 -1
- package/dist/types-ts4.5/index.d.ts +4 -3
- package/dist/types-ts4.5/nav4-skeleton-help-button.d.ts +8 -0
- package/dist/types-ts4.5/nav4-skeleton-notification-button.d.ts +9 -0
- package/dist/types-ts4.5/nav4-skeleton-settings-button.d.ts +8 -0
- package/dist/types-ts4.5/nav4-skeleton-switcher-button.d.ts +8 -0
- package/dist/types-ts4.5/skeleton-help-button.d.ts +0 -6
- package/dist/types-ts4.5/skeleton-notification-button.d.ts +1 -7
- package/dist/types-ts4.5/skeleton-settings-button.d.ts +1 -6
- package/dist/types-ts4.5/skeleton-switcher-button.d.ts +6 -6
- package/dist/types-ts4.5/theme/atlassian-theme.d.ts +5 -0
- package/dist/types-ts4.5/theme/convert-hex-shorthand.d.ts +1 -0
- package/dist/types-ts4.5/theme/default-theme-brand-refresh.d.ts +1 -0
- package/dist/types-ts4.5/theme/default-theme.d.ts +0 -1
- package/dist/types-ts4.5/theme/generate-text-color.d.ts +1 -0
- package/dist/types-ts4.5/theme/get-box-shadow.d.ts +1 -0
- package/dist/types-ts4.5/theme/get-contrast-color.d.ts +1 -0
- package/dist/types-ts4.5/theme/hex-to-rgba.d.ts +1 -0
- package/dist/types-ts4.5/theme/index.d.ts +1 -1
- package/dist/types-ts4.5/theme/theme-context.d.ts +3 -0
- package/dist/types-ts4.5/theme/theme-generator.d.ts +5 -0
- package/dist/types-ts4.5/theme/theme-helpers.d.ts +1 -1
- package/dist/types-ts4.5/theme/theme-provider.d.ts +4 -2
- package/dist/types-ts4.5/theme/themes.d.ts +4 -1
- package/dist/types-ts4.5/theme/types.d.ts +30 -0
- package/package.json +12 -12
- package/afm-jira/tsconfig.json +0 -64
- /package/dist/cjs/components/AppSwitcher/{index.compiled.css → app-switcher.compiled.css} +0 -0
- /package/dist/cjs/{skeleton-help-button.compiled.css → nav4-skeleton-help-button.compiled.css} +0 -0
- /package/dist/es2019/components/AppSwitcher/{index.compiled.css → app-switcher.compiled.css} +0 -0
- /package/dist/es2019/{skeleton-help-button.compiled.css → nav4-skeleton-help-button.compiled.css} +0 -0
- /package/dist/esm/components/AppSwitcher/{index.compiled.css → app-switcher.compiled.css} +0 -0
- /package/dist/esm/{skeleton-help-button.compiled.css → nav4-skeleton-help-button.compiled.css} +0 -0
|
@@ -49,6 +49,8 @@ var TooltipSwitch = function TooltipSwitch(_ref) {
|
|
|
49
49
|
*
|
|
50
50
|
* - [Examples](https://atlassian.design/components/atlassian-navigation/examples#create)
|
|
51
51
|
* - [Code](https://atlassian.design/components/atlassian-navigation/code)
|
|
52
|
+
*
|
|
53
|
+
* @deprecated `@atlaskit/atlassian-navigation` is deprecated. Use `@atlaskit/navigation-system` instead.
|
|
52
54
|
*/
|
|
53
55
|
export var Create = function Create(_ref2) {
|
|
54
56
|
var onClick = _ref2.onClick,
|
|
@@ -21,6 +21,8 @@ var HELP_NOTIFICATION_BADGE_ID = 'atlassian-navigation-help-notification-count';
|
|
|
21
21
|
*
|
|
22
22
|
* - [Examples](https://atlassian.design/components/atlassian-navigation/examples#help)
|
|
23
23
|
* - [Code](https://atlassian.design/components/atlassian-navigation/code)
|
|
24
|
+
*
|
|
25
|
+
* @deprecated `@atlaskit/atlassian-navigation` is deprecated. Use `@atlaskit/navigation-system` instead.
|
|
24
26
|
*/
|
|
25
27
|
export var Help = /*#__PURE__*/forwardRef(function (props, ref) {
|
|
26
28
|
var badge = props.badge,
|
|
@@ -14,6 +14,7 @@ import { getIconButtonTheme } from './styles';
|
|
|
14
14
|
* pass into `AtlassianNavigation`'s render props, but where possible you should
|
|
15
15
|
* rely on the defaults.
|
|
16
16
|
*
|
|
17
|
+
* @deprecated `@atlaskit/atlassian-navigation` is deprecated. Use `@atlaskit/navigation-system` instead.
|
|
17
18
|
*/
|
|
18
19
|
export var IconButton = /*#__PURE__*/forwardRef(function (props, ref) {
|
|
19
20
|
var icon = props.icon,
|
|
@@ -22,6 +22,8 @@ var NOTIFICATIONS_BADGE_ID = 'atlassian-navigation-notification-count';
|
|
|
22
22
|
*
|
|
23
23
|
* - [Examples](https://atlassian.design/components/atlassian-navigation/examples#notifications)
|
|
24
24
|
* - [Code](https://atlassian.design/components/atlassian-navigation/code)
|
|
25
|
+
*
|
|
26
|
+
* @deprecated `@atlaskit/atlassian-navigation` is deprecated. Use `@atlaskit/navigation-system` instead.
|
|
25
27
|
*/
|
|
26
28
|
export var Notifications = /*#__PURE__*/forwardRef(function (props, ref) {
|
|
27
29
|
var badge = props.badge,
|
|
@@ -54,6 +54,8 @@ var buttonHighlightedStyles = css({
|
|
|
54
54
|
*
|
|
55
55
|
* - [Examples](https://atlassian.design/components/atlassian-navigation/examples#dropdown-menu)
|
|
56
56
|
* - [Code](https://atlassian.design/components/atlassian-navigation/code)
|
|
57
|
+
*
|
|
58
|
+
* @deprecated `@atlaskit/atlassian-navigation` is deprecated. Use `@atlaskit/navigation-system` instead.
|
|
57
59
|
*/
|
|
58
60
|
export var PrimaryButton = /*#__PURE__*/forwardRef(function (props, ref) {
|
|
59
61
|
var children = props.children,
|
|
@@ -23,6 +23,8 @@ var buttonNoOpStyle = css({
|
|
|
23
23
|
*
|
|
24
24
|
* - [Examples](https://atlassian.design/components/atlassian-navigation/examples#button)
|
|
25
25
|
* - [Code](https://atlassian.design/components/atlassian-navigation/code)
|
|
26
|
+
*
|
|
27
|
+
* @deprecated `@atlaskit/atlassian-navigation` is deprecated. Use `@atlaskit/navigation-system` instead.
|
|
26
28
|
*/
|
|
27
29
|
export var PrimaryDropdownButton = /*#__PURE__*/forwardRef(function (props, ref) {
|
|
28
30
|
var component = props.component,
|
|
@@ -10,7 +10,8 @@ import React, { useCallback, useState } from 'react';
|
|
|
10
10
|
import { css, jsx } from '@emotion/react';
|
|
11
11
|
import Popup from '@atlaskit/popup';
|
|
12
12
|
import { WidthObserver } from '@atlaskit/width-detector';
|
|
13
|
-
import { OverflowProvider
|
|
13
|
+
import { OverflowProvider } from '../../controllers/overflow/overflow-provider';
|
|
14
|
+
import { useOverflowController } from '../../controllers/overflow/use-overflow-controller';
|
|
14
15
|
import { PrimaryDropdownButton } from '../PrimaryDropdownButton';
|
|
15
16
|
var containerStyles = css({
|
|
16
17
|
display: 'flex',
|
|
@@ -0,0 +1,172 @@
|
|
|
1
|
+
import _extends from "@babel/runtime/helpers/extends";
|
|
2
|
+
import _objectWithoutProperties from "@babel/runtime/helpers/objectWithoutProperties";
|
|
3
|
+
import _defineProperty from "@babel/runtime/helpers/defineProperty";
|
|
4
|
+
var _excluded = ["aria-label", "href", "name", "icon", "onClick", "onMouseDown", "siteTitle", "testId"];
|
|
5
|
+
/**
|
|
6
|
+
* @jsxRuntime classic
|
|
7
|
+
* @jsx jsx
|
|
8
|
+
*/
|
|
9
|
+
import React, { Fragment } from 'react';
|
|
10
|
+
|
|
11
|
+
// eslint-disable-next-line @atlaskit/ui-styling-standard/use-compiled -- Ignored via go/DSP-18766
|
|
12
|
+
import { css, jsx } from '@emotion/react';
|
|
13
|
+
import { Inline, Text } from '@atlaskit/primitives/compiled';
|
|
14
|
+
import { PRODUCT_HOME_BREAKPOINT } from '../../common/constants';
|
|
15
|
+
import { useTheme } from '../../theme';
|
|
16
|
+
import { stripEmptyProperties } from '../../utils';
|
|
17
|
+
import { getTag } from './utils';
|
|
18
|
+
var VAR_PRODUCT_HOME_COLOR_ACTIVE = '--product-home-color-active';
|
|
19
|
+
var VAR_PRODUCT_HOME_BACKGROUND_COLOR_ACTIVE = '--product-home-bg-color-active';
|
|
20
|
+
var VAR_PRODUCT_HOME_BOX_SHADOW_ACTIVE = '--product-home-box-shadow-active';
|
|
21
|
+
var VAR_PRODUCT_HOME_COLOR_FOCUS = '--product-home-color-focus';
|
|
22
|
+
var VAR_PRODUCT_HOME_BACKGROUND_COLOR_FOCUS = '--product-home-bg-color-focus';
|
|
23
|
+
var VAR_PRODUCT_HOME_BOX_SHADOW_FOCUS = '--product-home-box-shadow-focus';
|
|
24
|
+
var VAR_PRODUCT_HOME_COLOR_HOVER = '--product-home-color-hover';
|
|
25
|
+
var VAR_PRODUCT_HOME_BACKGROUND_COLOR_HOVER = '--product-home-bg-color-hover';
|
|
26
|
+
var VAR_PRODUCT_HOME_BOX_SHADOW_HOVER = '--product-home-box-shadow-hover';
|
|
27
|
+
var productHomeButtonStyles = css(_defineProperty(_defineProperty({
|
|
28
|
+
display: 'flex',
|
|
29
|
+
padding: "var(--ds-space-050, 4px)",
|
|
30
|
+
alignItems: 'center',
|
|
31
|
+
background: 'none',
|
|
32
|
+
border: 0,
|
|
33
|
+
borderRadius: "var(--ds-radius-small, 3px)",
|
|
34
|
+
color: 'inherit',
|
|
35
|
+
cursor: 'pointer',
|
|
36
|
+
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-unsafe-selectors -- Ignored via go/DSP-18766
|
|
37
|
+
'&::-moz-focus-inner': {
|
|
38
|
+
border: 0
|
|
39
|
+
},
|
|
40
|
+
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-unsafe-selectors -- Ignored via go/DSP-18766
|
|
41
|
+
'&:first-of-type': {
|
|
42
|
+
marginInlineStart: 0
|
|
43
|
+
},
|
|
44
|
+
'&:hover': {
|
|
45
|
+
backgroundColor: "var(".concat(VAR_PRODUCT_HOME_BACKGROUND_COLOR_HOVER, ")"),
|
|
46
|
+
boxShadow: "var(".concat(VAR_PRODUCT_HOME_BOX_SHADOW_HOVER, ")"),
|
|
47
|
+
color: "var(".concat(VAR_PRODUCT_HOME_COLOR_HOVER, ")")
|
|
48
|
+
},
|
|
49
|
+
'&:active': {
|
|
50
|
+
backgroundColor: "var(".concat(VAR_PRODUCT_HOME_BACKGROUND_COLOR_ACTIVE, ")"),
|
|
51
|
+
boxShadow: "var(".concat(VAR_PRODUCT_HOME_BOX_SHADOW_ACTIVE, ")"),
|
|
52
|
+
color: "var(".concat(VAR_PRODUCT_HOME_COLOR_ACTIVE, ")")
|
|
53
|
+
},
|
|
54
|
+
'&:focus-visible': {
|
|
55
|
+
backgroundColor: "var(".concat(VAR_PRODUCT_HOME_BACKGROUND_COLOR_FOCUS, ")"),
|
|
56
|
+
color: "var(".concat(VAR_PRODUCT_HOME_COLOR_FOCUS, ")"),
|
|
57
|
+
outline: "var(--ds-border-width-focused, 2px)".concat(" solid ", "var(--ds-border-focused, #4688EC)")
|
|
58
|
+
},
|
|
59
|
+
// eslint-disable-next-line @atlaskit/design-system/no-nested-styles, @atlaskit/ui-styling-standard/no-nested-selectors, @atlaskit/ui-styling-standard/no-unsafe-selectors -- Ignored via go/DSP-18766
|
|
60
|
+
'div&': {
|
|
61
|
+
pointerEvents: 'none'
|
|
62
|
+
}
|
|
63
|
+
}, "@media (max-width: ".concat(PRODUCT_HOME_BREAKPOINT - 0.1, "px)"), {
|
|
64
|
+
margin: "0 ".concat("var(--ds-space-100, 8px)")
|
|
65
|
+
}), "@media (min-width: ".concat(PRODUCT_HOME_BREAKPOINT, "px)"), {
|
|
66
|
+
margin: "0 ".concat("var(--ds-space-200, 16px)")
|
|
67
|
+
}));
|
|
68
|
+
var appHomeIconStyles = css({
|
|
69
|
+
borderRadius: '10px'
|
|
70
|
+
});
|
|
71
|
+
var appIconStyles = css({
|
|
72
|
+
display: 'flex',
|
|
73
|
+
maxWidth: 24
|
|
74
|
+
});
|
|
75
|
+
var appLogoTextStyles = css(_defineProperty({
|
|
76
|
+
// Logo text should never wrap or overflow
|
|
77
|
+
width: 'max-content',
|
|
78
|
+
paddingInlineEnd: "var(--ds-space-025, 2px)"
|
|
79
|
+
}, "@media (max-width: ".concat(PRODUCT_HOME_BREAKPOINT - 0.1, "px)"), {
|
|
80
|
+
display: 'none'
|
|
81
|
+
}));
|
|
82
|
+
var siteTitleStyles = css({
|
|
83
|
+
display: 'flex',
|
|
84
|
+
alignItems: 'center',
|
|
85
|
+
marginInlineEnd: "var(--ds-space-050, 4px)",
|
|
86
|
+
marginInlineStart: "var(--ds-space-050, 4px)",
|
|
87
|
+
paddingInlineEnd: "var(--ds-space-200, 16px)"
|
|
88
|
+
});
|
|
89
|
+
|
|
90
|
+
/**
|
|
91
|
+
* __App home__
|
|
92
|
+
*
|
|
93
|
+
* A variant of the ProductHome component designed for use with the updated app logos.
|
|
94
|
+
*
|
|
95
|
+
* Takes an icon, displayed at all viewport sizes, and a product name, which is
|
|
96
|
+
* displayed only at larger viewport sizes.
|
|
97
|
+
*
|
|
98
|
+
* - [Examples](https://atlassian.design/components/atlassian-navigation/examples#app-product-home)
|
|
99
|
+
* - [Code](https://atlassian.design/components/atlassian-navigation/code)
|
|
100
|
+
*
|
|
101
|
+
* @deprecated `@atlaskit/atlassian-navigation` is deprecated. Use `@atlaskit/navigation-system` instead.
|
|
102
|
+
*/
|
|
103
|
+
export var AppHome = function AppHome(_ref) {
|
|
104
|
+
var ariaLabel = _ref['aria-label'],
|
|
105
|
+
href = _ref.href,
|
|
106
|
+
name = _ref.name,
|
|
107
|
+
Icon = _ref.icon,
|
|
108
|
+
onClick = _ref.onClick,
|
|
109
|
+
onMouseDown = _ref.onMouseDown,
|
|
110
|
+
siteTitle = _ref.siteTitle,
|
|
111
|
+
testId = _ref.testId,
|
|
112
|
+
rest = _objectWithoutProperties(_ref, _excluded);
|
|
113
|
+
var theme = useTheme();
|
|
114
|
+
var primaryButton = theme.mode.primaryButton;
|
|
115
|
+
// After the brand refresh, iconColor and textColor should be set to 'undefined' to allow the original
|
|
116
|
+
// multi-color logo tile colors to be visible, rather than a hardcoded blue.
|
|
117
|
+
var _theme$mode$productHo = theme.mode.productHome,
|
|
118
|
+
_theme$mode$productHo2 = _theme$mode$productHo.iconColor,
|
|
119
|
+
iconColor = _theme$mode$productHo2 === void 0 ? undefined : _theme$mode$productHo2,
|
|
120
|
+
_theme$mode$productHo3 = _theme$mode$productHo.textColor,
|
|
121
|
+
textColor = _theme$mode$productHo3 === void 0 ? undefined : _theme$mode$productHo3;
|
|
122
|
+
|
|
123
|
+
// The default theme is set at module scope and immediately used in context.
|
|
124
|
+
// To allow the feature flag to switch the logo color at runtime, we also detect the original hardcoded
|
|
125
|
+
// values and override them to undefined.
|
|
126
|
+
if (iconColor === '#357DE8' && textColor === "var(--ds-text, #292A2E)") {
|
|
127
|
+
iconColor = undefined;
|
|
128
|
+
textColor = undefined;
|
|
129
|
+
}
|
|
130
|
+
var Tag = getTag(onClick, href);
|
|
131
|
+
var preventFocusRing = function preventFocusRing(e) {
|
|
132
|
+
e.preventDefault();
|
|
133
|
+
onMouseDown && onMouseDown(e);
|
|
134
|
+
};
|
|
135
|
+
var productHomeButtonDynamicStyles = stripEmptyProperties(_defineProperty(_defineProperty(_defineProperty(_defineProperty(_defineProperty(_defineProperty(_defineProperty(_defineProperty(_defineProperty({}, VAR_PRODUCT_HOME_COLOR_ACTIVE, primaryButton.active.color), VAR_PRODUCT_HOME_BACKGROUND_COLOR_ACTIVE, primaryButton.active.backgroundColor), VAR_PRODUCT_HOME_BOX_SHADOW_ACTIVE, primaryButton.active.boxShadow), VAR_PRODUCT_HOME_COLOR_FOCUS, primaryButton.focus.color), VAR_PRODUCT_HOME_BACKGROUND_COLOR_FOCUS, primaryButton.focus.backgroundColor), VAR_PRODUCT_HOME_BOX_SHADOW_FOCUS, primaryButton.focus.boxShadow), VAR_PRODUCT_HOME_COLOR_HOVER, primaryButton.hover.color), VAR_PRODUCT_HOME_BACKGROUND_COLOR_HOVER, primaryButton.hover.backgroundColor), VAR_PRODUCT_HOME_BOX_SHADOW_HOVER, primaryButton.hover.boxShadow));
|
|
136
|
+
return jsx(Fragment, null, jsx(Tag
|
|
137
|
+
// eslint-disable-next-line @atlaskit/ui-styling-standard/enforce-style-prop -- Ignored via go/DSP-18766
|
|
138
|
+
, _extends({
|
|
139
|
+
style: productHomeButtonDynamicStyles,
|
|
140
|
+
css: [productHomeButtonStyles, appHomeIconStyles],
|
|
141
|
+
href: href,
|
|
142
|
+
onClick: onClick,
|
|
143
|
+
onMouseDown: preventFocusRing,
|
|
144
|
+
"data-testid": testId && "".concat(testId, "-container"),
|
|
145
|
+
"aria-label": ariaLabel
|
|
146
|
+
// Made all props explicit, leaving just in case
|
|
147
|
+
// eslint-disable-next-line @repo/internal/react/no-unsafe-spread-props
|
|
148
|
+
}, rest), jsx(Inline, {
|
|
149
|
+
space: "space.075",
|
|
150
|
+
alignBlock: "center"
|
|
151
|
+
}, jsx("div", {
|
|
152
|
+
css: [appIconStyles],
|
|
153
|
+
"data-testid": testId && "".concat(testId, "-icon")
|
|
154
|
+
}, jsx(Icon, {
|
|
155
|
+
iconColor: iconColor,
|
|
156
|
+
shouldUseNewLogoDesign: true,
|
|
157
|
+
size: "small",
|
|
158
|
+
appearance: "brand"
|
|
159
|
+
})), jsx("span", {
|
|
160
|
+
css: appLogoTextStyles
|
|
161
|
+
}, jsx(Text, {
|
|
162
|
+
"aria-hidden": true,
|
|
163
|
+
color: "inherit",
|
|
164
|
+
weight: "semibold"
|
|
165
|
+
}, name)))), siteTitle && jsx("div", {
|
|
166
|
+
style: {
|
|
167
|
+
borderRight: theme.mode.productHome.borderRight
|
|
168
|
+
},
|
|
169
|
+
css: siteTitleStyles,
|
|
170
|
+
"data-testid": testId && "".concat(testId, "-site-title")
|
|
171
|
+
}, siteTitle));
|
|
172
|
+
};
|
|
@@ -95,6 +95,8 @@ var siteTitleStyles = css({
|
|
|
95
95
|
*
|
|
96
96
|
* - [Examples](https://atlassian.design/components/atlassian-navigation/examples#custom-product-home)
|
|
97
97
|
* - [Code](https://atlassian.design/components/atlassian-navigation/code)
|
|
98
|
+
*
|
|
99
|
+
* @deprecated `@atlaskit/atlassian-navigation` is deprecated. Use `@atlaskit/navigation-system` instead.
|
|
98
100
|
*/
|
|
99
101
|
var CustomProductHome = function CustomProductHome(props) {
|
|
100
102
|
var href = props.href,
|
|
@@ -1,8 +1,7 @@
|
|
|
1
1
|
import _extends from "@babel/runtime/helpers/extends";
|
|
2
2
|
import _objectWithoutProperties from "@babel/runtime/helpers/objectWithoutProperties";
|
|
3
3
|
import _defineProperty from "@babel/runtime/helpers/defineProperty";
|
|
4
|
-
var _excluded = ["aria-label", "href", "
|
|
5
|
-
_excluded2 = ["aria-label", "href", "icon", "logo", "logoMaxWidth", "onClick", "onMouseDown", "siteTitle", "testId"];
|
|
4
|
+
var _excluded = ["aria-label", "href", "icon", "logo", "logoMaxWidth", "onClick", "onMouseDown", "siteTitle", "testId"];
|
|
6
5
|
/**
|
|
7
6
|
* @jsxRuntime classic
|
|
8
7
|
* @jsx jsx
|
|
@@ -13,7 +12,7 @@ import React, { Fragment } from 'react';
|
|
|
13
12
|
import { css, jsx } from '@emotion/react';
|
|
14
13
|
|
|
15
14
|
// eslint-disable-next-line @atlaskit/design-system/no-emotion-primitives -- to be migrated to @atlaskit/primitives/compiled – go/akcss
|
|
16
|
-
|
|
15
|
+
|
|
17
16
|
import { PRODUCT_HOME_BREAKPOINT } from '../../common/constants';
|
|
18
17
|
import { useTheme } from '../../theme';
|
|
19
18
|
import { stripEmptyProperties } from '../../utils';
|
|
@@ -99,20 +98,6 @@ var productIconStyles = css(_defineProperty({
|
|
|
99
98
|
}, "@media (min-width: ".concat(PRODUCT_HOME_BREAKPOINT, "px)"), {
|
|
100
99
|
display: 'none'
|
|
101
100
|
}));
|
|
102
|
-
var appHomeIconStyles = css({
|
|
103
|
-
borderRadius: '10px'
|
|
104
|
-
});
|
|
105
|
-
var appIconStyles = css({
|
|
106
|
-
display: 'flex',
|
|
107
|
-
maxWidth: 24
|
|
108
|
-
});
|
|
109
|
-
var appLogoTextStyles = css(_defineProperty({
|
|
110
|
-
// Logo text should never wrap or overflow
|
|
111
|
-
width: 'max-content',
|
|
112
|
-
paddingInlineEnd: "var(--ds-space-025, 2px)"
|
|
113
|
-
}, "@media (max-width: ".concat(PRODUCT_HOME_BREAKPOINT - 0.1, "px)"), {
|
|
114
|
-
display: 'none'
|
|
115
|
-
}));
|
|
116
101
|
var siteTitleStyles = css({
|
|
117
102
|
display: 'flex',
|
|
118
103
|
alignItems: 'center',
|
|
@@ -122,21 +107,25 @@ var siteTitleStyles = css({
|
|
|
122
107
|
});
|
|
123
108
|
|
|
124
109
|
/**
|
|
125
|
-
*
|
|
126
|
-
*
|
|
127
|
-
* A variant of the ProductHome component designed for use with the updated app logos.
|
|
110
|
+
* __Product home__
|
|
128
111
|
*
|
|
129
|
-
*
|
|
130
|
-
*
|
|
112
|
+
* The ProductHome component displays the product visual identity composed of:
|
|
113
|
+
* logo, icon, and optional text. Values for logo and icon are never displayed
|
|
114
|
+
* at the same time, where icon is used only when space is restricted. Should be
|
|
115
|
+
* passed into `AtlassianNavigation`'s `renderProductHome` prop.
|
|
131
116
|
*
|
|
132
|
-
* - [Examples](https://atlassian.design/components/atlassian-navigation/examples#
|
|
117
|
+
* - [Examples](https://atlassian.design/components/atlassian-navigation/examples#product-home)
|
|
133
118
|
* - [Code](https://atlassian.design/components/atlassian-navigation/code)
|
|
119
|
+
*
|
|
120
|
+
* @deprecated `@atlaskit/atlassian-navigation` is deprecated. Use `@atlaskit/navigation-system` instead.
|
|
134
121
|
*/
|
|
135
|
-
|
|
122
|
+
var ProductHome = function ProductHome(_ref) {
|
|
136
123
|
var ariaLabel = _ref['aria-label'],
|
|
137
124
|
href = _ref.href,
|
|
138
|
-
name = _ref.name,
|
|
139
125
|
Icon = _ref.icon,
|
|
126
|
+
Logo = _ref.logo,
|
|
127
|
+
_ref$logoMaxWidth = _ref.logoMaxWidth,
|
|
128
|
+
logoMaxWidth = _ref$logoMaxWidth === void 0 ? 260 : _ref$logoMaxWidth,
|
|
140
129
|
onClick = _ref.onClick,
|
|
141
130
|
onMouseDown = _ref.onMouseDown,
|
|
142
131
|
siteTitle = _ref.siteTitle,
|
|
@@ -144,96 +133,12 @@ export var AppHome = function AppHome(_ref) {
|
|
|
144
133
|
rest = _objectWithoutProperties(_ref, _excluded);
|
|
145
134
|
var theme = useTheme();
|
|
146
135
|
var primaryButton = theme.mode.primaryButton;
|
|
147
|
-
// After the brand refresh, iconColor and textColor should be set to 'undefined' to allow the original
|
|
148
|
-
// multi-color logo tile colors to be visible, rather than a hardcoded blue.
|
|
149
136
|
var _theme$mode$productHo = theme.mode.productHome,
|
|
150
137
|
_theme$mode$productHo2 = _theme$mode$productHo.iconColor,
|
|
151
138
|
iconColor = _theme$mode$productHo2 === void 0 ? undefined : _theme$mode$productHo2,
|
|
152
139
|
_theme$mode$productHo3 = _theme$mode$productHo.textColor,
|
|
153
140
|
textColor = _theme$mode$productHo3 === void 0 ? undefined : _theme$mode$productHo3;
|
|
154
141
|
|
|
155
|
-
// The default theme is set at module scope and immediately used in context.
|
|
156
|
-
// To allow the feature flag to switch the logo color at runtime, we also detect the original hardcoded
|
|
157
|
-
// values and override them to undefined.
|
|
158
|
-
if (iconColor === '#357DE8' && textColor === "var(--ds-text, #292A2E)") {
|
|
159
|
-
iconColor = undefined;
|
|
160
|
-
textColor = undefined;
|
|
161
|
-
}
|
|
162
|
-
var Tag = getTag(onClick, href);
|
|
163
|
-
var preventFocusRing = function preventFocusRing(e) {
|
|
164
|
-
e.preventDefault();
|
|
165
|
-
onMouseDown && onMouseDown(e);
|
|
166
|
-
};
|
|
167
|
-
var productHomeButtonDynamicStyles = stripEmptyProperties(_defineProperty(_defineProperty(_defineProperty(_defineProperty(_defineProperty(_defineProperty(_defineProperty(_defineProperty(_defineProperty({}, VAR_PRODUCT_HOME_COLOR_ACTIVE, primaryButton.active.color), VAR_PRODUCT_HOME_BACKGROUND_COLOR_ACTIVE, primaryButton.active.backgroundColor), VAR_PRODUCT_HOME_BOX_SHADOW_ACTIVE, primaryButton.active.boxShadow), VAR_PRODUCT_HOME_COLOR_FOCUS, primaryButton.focus.color), VAR_PRODUCT_HOME_BACKGROUND_COLOR_FOCUS, primaryButton.focus.backgroundColor), VAR_PRODUCT_HOME_BOX_SHADOW_FOCUS, primaryButton.focus.boxShadow), VAR_PRODUCT_HOME_COLOR_HOVER, primaryButton.hover.color), VAR_PRODUCT_HOME_BACKGROUND_COLOR_HOVER, primaryButton.hover.backgroundColor), VAR_PRODUCT_HOME_BOX_SHADOW_HOVER, primaryButton.hover.boxShadow));
|
|
168
|
-
return jsx(Fragment, null, jsx(Tag
|
|
169
|
-
// eslint-disable-next-line @atlaskit/ui-styling-standard/enforce-style-prop -- Ignored via go/DSP-18766
|
|
170
|
-
, _extends({
|
|
171
|
-
style: productHomeButtonDynamicStyles,
|
|
172
|
-
css: [productHomeButtonStyles, appHomeIconStyles],
|
|
173
|
-
href: href,
|
|
174
|
-
onClick: onClick,
|
|
175
|
-
onMouseDown: preventFocusRing,
|
|
176
|
-
"data-testid": testId && "".concat(testId, "-container"),
|
|
177
|
-
"aria-label": ariaLabel
|
|
178
|
-
// Made all props explicit, leaving just in case
|
|
179
|
-
// eslint-disable-next-line @repo/internal/react/no-unsafe-spread-props
|
|
180
|
-
}, rest), jsx(Inline, {
|
|
181
|
-
space: "space.075",
|
|
182
|
-
alignBlock: "center"
|
|
183
|
-
}, jsx("div", {
|
|
184
|
-
css: [appIconStyles],
|
|
185
|
-
"data-testid": testId && "".concat(testId, "-icon")
|
|
186
|
-
}, jsx(Icon, {
|
|
187
|
-
iconColor: iconColor,
|
|
188
|
-
shouldUseNewLogoDesign: true,
|
|
189
|
-
size: "small",
|
|
190
|
-
appearance: "brand"
|
|
191
|
-
})), jsx("span", {
|
|
192
|
-
css: appLogoTextStyles
|
|
193
|
-
}, jsx(Text, {
|
|
194
|
-
"aria-hidden": true,
|
|
195
|
-
color: "inherit",
|
|
196
|
-
weight: "semibold"
|
|
197
|
-
}, name)))), siteTitle && jsx("div", {
|
|
198
|
-
style: {
|
|
199
|
-
borderRight: theme.mode.productHome.borderRight
|
|
200
|
-
},
|
|
201
|
-
css: siteTitleStyles,
|
|
202
|
-
"data-testid": testId && "".concat(testId, "-site-title")
|
|
203
|
-
}, siteTitle));
|
|
204
|
-
};
|
|
205
|
-
|
|
206
|
-
/**
|
|
207
|
-
* __Product home__
|
|
208
|
-
*
|
|
209
|
-
* The ProductHome component displays the product visual identity composed of:
|
|
210
|
-
* logo, icon, and optional text. Values for logo and icon are never displayed
|
|
211
|
-
* at the same time, where icon is used only when space is restricted. Should be
|
|
212
|
-
* passed into `AtlassianNavigation`'s `renderProductHome` prop.
|
|
213
|
-
*
|
|
214
|
-
* - [Examples](https://atlassian.design/components/atlassian-navigation/examples#product-home)
|
|
215
|
-
* - [Code](https://atlassian.design/components/atlassian-navigation/code)
|
|
216
|
-
*/
|
|
217
|
-
var ProductHome = function ProductHome(_ref2) {
|
|
218
|
-
var ariaLabel = _ref2['aria-label'],
|
|
219
|
-
href = _ref2.href,
|
|
220
|
-
Icon = _ref2.icon,
|
|
221
|
-
Logo = _ref2.logo,
|
|
222
|
-
_ref2$logoMaxWidth = _ref2.logoMaxWidth,
|
|
223
|
-
logoMaxWidth = _ref2$logoMaxWidth === void 0 ? 260 : _ref2$logoMaxWidth,
|
|
224
|
-
onClick = _ref2.onClick,
|
|
225
|
-
onMouseDown = _ref2.onMouseDown,
|
|
226
|
-
siteTitle = _ref2.siteTitle,
|
|
227
|
-
testId = _ref2.testId,
|
|
228
|
-
rest = _objectWithoutProperties(_ref2, _excluded2);
|
|
229
|
-
var theme = useTheme();
|
|
230
|
-
var primaryButton = theme.mode.primaryButton;
|
|
231
|
-
var _theme$mode$productHo4 = theme.mode.productHome,
|
|
232
|
-
_theme$mode$productHo5 = _theme$mode$productHo4.iconColor,
|
|
233
|
-
iconColor = _theme$mode$productHo5 === void 0 ? undefined : _theme$mode$productHo5,
|
|
234
|
-
_theme$mode$productHo6 = _theme$mode$productHo4.textColor,
|
|
235
|
-
textColor = _theme$mode$productHo6 === void 0 ? undefined : _theme$mode$productHo6;
|
|
236
|
-
|
|
237
142
|
// If the theme returns the default Atlassian theme, rely on the Logo default behaviour instead
|
|
238
143
|
if (iconColor === '#357DE8' && textColor === "var(--ds-text, #292A2E)") {
|
|
239
144
|
iconColor = undefined;
|
|
@@ -283,4 +188,5 @@ var ProductHome = function ProductHome(_ref2) {
|
|
|
283
188
|
"data-testid": testId && "".concat(testId, "-site-title")
|
|
284
189
|
}, siteTitle));
|
|
285
190
|
};
|
|
286
|
-
export default ProductHome;
|
|
191
|
+
export default ProductHome;
|
|
192
|
+
export { AppHome } from './app-home';
|
|
@@ -11,6 +11,8 @@ import { IconButton } from '../IconButton';
|
|
|
11
11
|
*
|
|
12
12
|
* - [Examples](https://atlassian.design/components/atlassian-navigation/examples#profile)
|
|
13
13
|
* - [Code](https://atlassian.design/components/atlassian-navigation/code)
|
|
14
|
+
*
|
|
15
|
+
* @deprecated `@atlaskit/atlassian-navigation` is deprecated. Use `@atlaskit/navigation-system` instead.
|
|
14
16
|
*/
|
|
15
17
|
export var Profile = /*#__PURE__*/forwardRef(function (props, ref) {
|
|
16
18
|
var component = props.component,
|
|
@@ -0,0 +1,65 @@
|
|
|
1
|
+
import _extends from "@babel/runtime/helpers/extends";
|
|
2
|
+
import _objectWithoutProperties from "@babel/runtime/helpers/objectWithoutProperties";
|
|
3
|
+
var _excluded = ["component", "href", "icon", "id", "isDisabled", "isSelected", "label", "onBlur", "onClick", "onFocus", "onMouseDown", "onMouseEnter", "onMouseLeave", "onMouseUp", "target", "testId", "theme", "tooltip"];
|
|
4
|
+
import React, { forwardRef } from 'react';
|
|
5
|
+
import { IconButton } from '../IconButton';
|
|
6
|
+
/**
|
|
7
|
+
* __Profile__
|
|
8
|
+
*
|
|
9
|
+
* A profile button which takes an icon/avatar component can be that can be
|
|
10
|
+
* passed into `AtlassianNavigation`'s `renderProfile` prop.
|
|
11
|
+
*
|
|
12
|
+
* - [Examples](https://atlassian.design/components/atlassian-navigation/examples#profile)
|
|
13
|
+
* - [Code](https://atlassian.design/components/atlassian-navigation/code)
|
|
14
|
+
*
|
|
15
|
+
* @deprecated `@atlaskit/atlassian-navigation` is deprecated. Use `@atlaskit/navigation-system` instead.
|
|
16
|
+
*/
|
|
17
|
+
export var Profile = /*#__PURE__*/forwardRef(function (props, ref) {
|
|
18
|
+
var component = props.component,
|
|
19
|
+
href = props.href,
|
|
20
|
+
icon = props.icon,
|
|
21
|
+
id = props.id,
|
|
22
|
+
isDisabled = props.isDisabled,
|
|
23
|
+
isSelected = props.isSelected,
|
|
24
|
+
labelProp = props.label,
|
|
25
|
+
onBlur = props.onBlur,
|
|
26
|
+
onClick = props.onClick,
|
|
27
|
+
onFocus = props.onFocus,
|
|
28
|
+
onMouseDown = props.onMouseDown,
|
|
29
|
+
onMouseEnter = props.onMouseEnter,
|
|
30
|
+
onMouseLeave = props.onMouseLeave,
|
|
31
|
+
onMouseUp = props.onMouseUp,
|
|
32
|
+
target = props.target,
|
|
33
|
+
testId = props.testId,
|
|
34
|
+
theme = props.theme,
|
|
35
|
+
tooltip = props.tooltip,
|
|
36
|
+
rest = _objectWithoutProperties(props, _excluded);
|
|
37
|
+
var label = labelProp || (typeof tooltip === 'string' ? tooltip : 'Your profile and settings');
|
|
38
|
+
return /*#__PURE__*/React.createElement("div", {
|
|
39
|
+
role: "listitem"
|
|
40
|
+
}, /*#__PURE__*/React.createElement(IconButton, _extends({
|
|
41
|
+
component: component,
|
|
42
|
+
href: href,
|
|
43
|
+
icon: icon,
|
|
44
|
+
id: id,
|
|
45
|
+
isDisabled: isDisabled,
|
|
46
|
+
isSelected: isSelected,
|
|
47
|
+
label: label,
|
|
48
|
+
onBlur: onBlur,
|
|
49
|
+
onClick: onClick,
|
|
50
|
+
onFocus: onFocus,
|
|
51
|
+
onMouseDown: onMouseDown,
|
|
52
|
+
onMouseEnter: onMouseEnter,
|
|
53
|
+
onMouseLeave: onMouseLeave,
|
|
54
|
+
onMouseUp: onMouseUp,
|
|
55
|
+
ref: ref,
|
|
56
|
+
target: target,
|
|
57
|
+
testId: testId
|
|
58
|
+
// eslint-disable-next-line @repo/internal/react/no-unsafe-overrides
|
|
59
|
+
,
|
|
60
|
+
theme: theme,
|
|
61
|
+
tooltip: tooltip,
|
|
62
|
+
isTooltipAnnouncementDisabled: true
|
|
63
|
+
// These are mostly explicit, leaving it in just in case
|
|
64
|
+
}, rest)));
|
|
65
|
+
});
|
|
@@ -114,6 +114,8 @@ var SearchComponent = function SearchComponent(props) {
|
|
|
114
114
|
*
|
|
115
115
|
* - [Examples](https://atlassian.design/components/atlassian-navigation/examples#search)
|
|
116
116
|
* - [Code](https://atlassian.design/components/atlassian-navigation/code)
|
|
117
|
+
*
|
|
118
|
+
* @deprecated `@atlaskit/atlassian-navigation` is deprecated. Use `@atlaskit/navigation-system` instead.
|
|
117
119
|
*/
|
|
118
120
|
export var Search = function Search(props) {
|
|
119
121
|
var component = props.component,
|
|
@@ -19,6 +19,8 @@ var iconSpacingStyles = {
|
|
|
19
19
|
*
|
|
20
20
|
* - [Examples](https://atlassian.design/components/atlassian-navigation/examples#settings)
|
|
21
21
|
* - [Code](https://atlassian.design/components/atlassian-navigation/code)
|
|
22
|
+
*
|
|
23
|
+
* @deprecated `@atlaskit/atlassian-navigation` is deprecated. Use `@atlaskit/navigation-system` instead.
|
|
22
24
|
*/
|
|
23
25
|
export var Settings = /*#__PURE__*/forwardRef(function (props, ref) {
|
|
24
26
|
var component = props.component,
|
|
@@ -19,6 +19,8 @@ var iconSpacingStyles = {
|
|
|
19
19
|
*
|
|
20
20
|
* - [Examples](https://atlassian.design/components/atlassian-navigation/examples#sign-in)
|
|
21
21
|
* - [Code](https://atlassian.design/components/atlassian-navigation/code)
|
|
22
|
+
*
|
|
23
|
+
* @deprecated `@atlaskit/atlassian-navigation` is deprecated. Use `@atlaskit/navigation-system` instead.
|
|
22
24
|
*/
|
|
23
25
|
export var SignIn = function SignIn(props) {
|
|
24
26
|
var component = props.component,
|
|
@@ -48,6 +48,8 @@ export var OverflowProvider = function OverflowProvider(_ref) {
|
|
|
48
48
|
* Returns the current context value for the nearest OverflowProvider.
|
|
49
49
|
*
|
|
50
50
|
* - [Example](https://atlassian.design/components/atlassian-navigation/examples#responsive)
|
|
51
|
+
*
|
|
52
|
+
* @deprecated `@atlaskit/atlassian-navigation` is deprecated. Use `@atlaskit/navigation-system` instead.
|
|
51
53
|
*/
|
|
52
54
|
export var useOverflowStatus = function useOverflowStatus() {
|
|
53
55
|
return useContext(OverflowContext);
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
/* eslint-disable @repo/internal/react/require-jsdoc */
|
|
2
|
+
import { createContext } from 'react';
|
|
3
|
+
import noop from '@atlaskit/ds-lib/noop';
|
|
4
|
+
export var OverflowContext = /*#__PURE__*/createContext({
|
|
5
|
+
isVisible: true,
|
|
6
|
+
openOverflowMenu: noop,
|
|
7
|
+
closeOverflowMenu: noop
|
|
8
|
+
});
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
import React, { useMemo } from 'react';
|
|
2
|
+
import { OverflowContext } from './overflow-context';
|
|
3
|
+
// eslint-disable-next-line @repo/internal/react/require-jsdoc
|
|
4
|
+
export var OverflowProvider = function OverflowProvider(_ref) {
|
|
5
|
+
var children = _ref.children,
|
|
6
|
+
isVisible = _ref.isVisible,
|
|
7
|
+
openOverflowMenu = _ref.openOverflowMenu,
|
|
8
|
+
closeOverflowMenu = _ref.closeOverflowMenu;
|
|
9
|
+
var value = useMemo(function () {
|
|
10
|
+
return {
|
|
11
|
+
isVisible: isVisible,
|
|
12
|
+
openOverflowMenu: openOverflowMenu,
|
|
13
|
+
closeOverflowMenu: closeOverflowMenu
|
|
14
|
+
};
|
|
15
|
+
}, [isVisible, openOverflowMenu, closeOverflowMenu]);
|
|
16
|
+
return /*#__PURE__*/React.createElement(OverflowContext.Provider, {
|
|
17
|
+
value: value
|
|
18
|
+
}, children);
|
|
19
|
+
};
|