@atlaskit/navigation-system 11.5.0 → 11.6.0
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 +12 -0
- package/dist/cjs/entry-points/top-nav-items/responsive-button.js +12 -0
- package/dist/cjs/ui/page-layout/top-nav/use-is-compact-top-nav.js +16 -0
- package/dist/cjs/ui/page-layout/top-nav/use-measured-top-nav-breakpoints.js +5 -3
- package/dist/cjs/ui/page-layout/top-nav/use-top-nav-breakpoints.js +4 -3
- package/dist/cjs/ui/top-nav-items/create-button.js +16 -1
- package/dist/cjs/ui/top-nav-items/responsive-button.js +38 -0
- package/dist/cjs/ui/top-nav-items/themed/icon-button.js +24 -4
- package/dist/cjs/ui/top-nav-items/themed/responsive-icon-button.compiled.css +18 -0
- package/dist/cjs/ui/top-nav-items/themed/responsive-icon-button.js +33 -0
- package/dist/cjs/ui/top-nav-items/themed/themed-icon-button.compiled.css +1 -0
- package/dist/cjs/ui/top-nav-items/themed/themed-icon-button.js +68 -55
- package/dist/cjs/ui/top-nav-items/themed/themed-pressable.compiled.css +1 -1
- package/dist/cjs/ui/top-nav-items/themed/themed-pressable.js +1 -1
- package/dist/es2019/entry-points/top-nav-items/responsive-button.js +1 -0
- package/dist/es2019/ui/page-layout/top-nav/use-is-compact-top-nav.js +11 -0
- package/dist/es2019/ui/page-layout/top-nav/use-measured-top-nav-breakpoints.js +5 -3
- package/dist/es2019/ui/page-layout/top-nav/use-top-nav-breakpoints.js +4 -3
- package/dist/es2019/ui/top-nav-items/create-button.js +16 -1
- package/dist/es2019/ui/top-nav-items/responsive-button.js +27 -0
- package/dist/es2019/ui/top-nav-items/themed/icon-button.js +23 -4
- package/dist/es2019/ui/top-nav-items/themed/responsive-icon-button.compiled.css +18 -0
- package/dist/es2019/ui/top-nav-items/themed/responsive-icon-button.js +26 -0
- package/dist/es2019/ui/top-nav-items/themed/themed-icon-button.compiled.css +1 -0
- package/dist/es2019/ui/top-nav-items/themed/themed-icon-button.js +63 -51
- package/dist/es2019/ui/top-nav-items/themed/themed-pressable.compiled.css +1 -1
- package/dist/es2019/ui/top-nav-items/themed/themed-pressable.js +1 -1
- package/dist/esm/entry-points/top-nav-items/responsive-button.js +1 -0
- package/dist/esm/ui/page-layout/top-nav/use-is-compact-top-nav.js +11 -0
- package/dist/esm/ui/page-layout/top-nav/use-measured-top-nav-breakpoints.js +5 -3
- package/dist/esm/ui/page-layout/top-nav/use-top-nav-breakpoints.js +4 -3
- package/dist/esm/ui/top-nav-items/create-button.js +16 -1
- package/dist/esm/ui/top-nav-items/responsive-button.js +29 -0
- package/dist/esm/ui/top-nav-items/themed/icon-button.js +24 -4
- package/dist/esm/ui/top-nav-items/themed/responsive-icon-button.compiled.css +18 -0
- package/dist/esm/ui/top-nav-items/themed/responsive-icon-button.js +26 -0
- package/dist/esm/ui/top-nav-items/themed/themed-icon-button.compiled.css +1 -0
- package/dist/esm/ui/top-nav-items/themed/themed-icon-button.js +68 -55
- package/dist/esm/ui/top-nav-items/themed/themed-pressable.compiled.css +1 -1
- package/dist/esm/ui/top-nav-items/themed/themed-pressable.js +1 -1
- package/dist/types/entry-points/top-nav-items/responsive-button.d.ts +1 -0
- package/dist/types/ui/page-layout/top-nav/top-nav-element-context.d.ts +4 -0
- package/dist/types/ui/page-layout/top-nav/use-is-compact-top-nav.d.ts +6 -0
- package/dist/types/ui/page-layout/top-nav/use-top-nav-breakpoints.d.ts +4 -3
- package/dist/types/ui/top-nav-items/create-button.d.ts +2 -0
- package/dist/types/ui/top-nav-items/responsive-button.d.ts +23 -0
- package/dist/types/ui/top-nav-items/themed/icon-button.d.ts +1 -5
- package/dist/types/ui/top-nav-items/themed/responsive-icon-button.d.ts +10 -0
- package/dist/types/ui/top-nav-items/themed/themed-icon-button.d.ts +8 -0
- package/package.json +4 -3
- package/top-nav-items/responsive-button/package.json +10 -0
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
import React, { type ComponentPropsWithoutRef } from 'react';
|
|
2
|
+
import type { Button } from './themed/button';
|
|
3
|
+
import type { IconButton } from './themed/icon-button';
|
|
4
|
+
type ResponsiveButtonProps = Omit<ComponentPropsWithoutRef<typeof Button>, 'children' | 'iconBefore'> & Pick<ComponentPropsWithoutRef<typeof IconButton>, 'icon' | 'label'> & {
|
|
5
|
+
/**
|
|
6
|
+
* The TopNavIconButton component used for both presentations.
|
|
7
|
+
* It must forward its ref and support TopNavIconButton's shouldShowLabel prop.
|
|
8
|
+
* Both presentations receive the same handlers and state.
|
|
9
|
+
*/
|
|
10
|
+
iconButton: typeof IconButton;
|
|
11
|
+
/**
|
|
12
|
+
* Tooltip options for the compact, icon-only presentation. Tooltips are enabled by default.
|
|
13
|
+
*/
|
|
14
|
+
tooltip?: ComponentPropsWithoutRef<typeof IconButton>['tooltip'];
|
|
15
|
+
};
|
|
16
|
+
/**
|
|
17
|
+
* An explicit responsive action: icon-only at xs/xxs, icon and label at sm and above.
|
|
18
|
+
* TopNav provides container measurements behind platform-dst-chat-panel-layout.
|
|
19
|
+
* Server markup uses an accessible icon-only fallback until client measurement.
|
|
20
|
+
* With the gate off or outside TopNav, it uses text. The button element is preserved.
|
|
21
|
+
*/
|
|
22
|
+
export declare const ResponsiveButton: React.ForwardRefExoticComponent<React.PropsWithoutRef<ResponsiveButtonProps> & React.RefAttributes<HTMLButtonElement>>;
|
|
23
|
+
export {};
|
|
@@ -1,7 +1,3 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
2
|
import { type ThemedIconButtonProps } from './themed-icon-button';
|
|
3
|
-
|
|
4
|
-
isTooltipDisabled?: boolean;
|
|
5
|
-
};
|
|
6
|
-
export declare const IconButton: React.ForwardRefExoticComponent<React.PropsWithoutRef<ThemedIconButtonProps & IconButtonMigrationProps> & React.RefAttributes<HTMLButtonElement>>;
|
|
7
|
-
export {};
|
|
3
|
+
export declare const IconButton: React.ForwardRefExoticComponent<React.PropsWithoutRef<ThemedIconButtonProps> & React.RefAttributes<HTMLButtonElement>>;
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* @jsxRuntime classic
|
|
3
|
+
* @jsx jsx
|
|
4
|
+
*/
|
|
5
|
+
import React from 'react';
|
|
6
|
+
import { type ThemedIconButtonProps } from './themed-icon-button';
|
|
7
|
+
/**
|
|
8
|
+
* Keep one control mounted, including its tooltip, while its label and shape change.
|
|
9
|
+
*/
|
|
10
|
+
export declare const ResponsiveIconButton: React.ForwardRefExoticComponent<React.PropsWithoutRef<ThemedIconButtonProps> & React.RefAttributes<HTMLButtonElement>>;
|
|
@@ -6,5 +6,13 @@ import React from 'react';
|
|
|
6
6
|
import type { PressableProps } from '@atlaskit/primitives/compiled/pressable';
|
|
7
7
|
import type { CommonProps, IconButtonCommonProps, OverriddenPrimitiveProps } from './types';
|
|
8
8
|
export interface ThemedIconButtonProps extends CommonProps, Omit<PressableProps, OverriddenPrimitiveProps>, IconButtonCommonProps {
|
|
9
|
+
/**
|
|
10
|
+
* Whether to suppress the icon button tooltip.
|
|
11
|
+
*/
|
|
12
|
+
isTooltipDisabled?: boolean;
|
|
13
|
+
/**
|
|
14
|
+
* Show the label without replacing the underlying button. Used by ResponsiveTopNavButton.
|
|
15
|
+
*/
|
|
16
|
+
shouldShowLabel?: boolean;
|
|
9
17
|
}
|
|
10
18
|
export declare const ThemedIconButton: React.ForwardRefExoticComponent<React.PropsWithoutRef<ThemedIconButtonProps> & React.RefAttributes<HTMLButtonElement>>;
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@atlaskit/navigation-system",
|
|
3
|
-
"version": "11.
|
|
3
|
+
"version": "11.6.0",
|
|
4
4
|
"description": "The latest navigation system for Atlassian apps.",
|
|
5
5
|
"repository": "https://bitbucket.org/atlassian/atlassian-frontend-mirror",
|
|
6
6
|
"license": "Apache-2.0",
|
|
@@ -59,7 +59,7 @@
|
|
|
59
59
|
"dependencies": {
|
|
60
60
|
"@atlaskit/analytics-next": "^12.6.0",
|
|
61
61
|
"@atlaskit/app-provider": "^8.3.0",
|
|
62
|
-
"@atlaskit/avatar": "^30.
|
|
62
|
+
"@atlaskit/avatar": "^30.1.0",
|
|
63
63
|
"@atlaskit/button": "^25.7.0",
|
|
64
64
|
"@atlaskit/css": "^1.1.0",
|
|
65
65
|
"@atlaskit/ds-lib": "^8.0.0",
|
|
@@ -129,10 +129,11 @@
|
|
|
129
129
|
"@atlassian/panel-system": "^2.0.0",
|
|
130
130
|
"@atlassian/react-async": "^0.23.0",
|
|
131
131
|
"@atlassian/react-entrypoint": "^1.1.0",
|
|
132
|
-
"@atlassian/search-dialog": "^10.
|
|
132
|
+
"@atlassian/search-dialog": "^10.31.0",
|
|
133
133
|
"@atlassian/ssr-tests": "workspace:^",
|
|
134
134
|
"@atlassian/test-utils": "^1.1.0",
|
|
135
135
|
"@atlassian/testing-library": "^0.12.0",
|
|
136
|
+
"@atlassian/universal-create": "^8.6.0",
|
|
136
137
|
"@atlassian/workbench": "workspace:^",
|
|
137
138
|
"@axe-core/playwright": "^4.11.1",
|
|
138
139
|
"raf-stub": "^2.0.1",
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
{
|
|
2
|
+
"name": "@atlaskit/navigation-system/top-nav-items/responsive-button",
|
|
3
|
+
"main": "../../dist/cjs/entry-points/top-nav-items/responsive-button.js",
|
|
4
|
+
"module": "../../dist/esm/entry-points/top-nav-items/responsive-button.js",
|
|
5
|
+
"module:es2019": "../../dist/es2019/entry-points/top-nav-items/responsive-button.js",
|
|
6
|
+
"sideEffects": [
|
|
7
|
+
"*.compiled.css"
|
|
8
|
+
],
|
|
9
|
+
"types": "../../dist/types/entry-points/top-nav-items/responsive-button.d.ts"
|
|
10
|
+
}
|