@atlaskit/navigation-system 0.177.2 → 0.178.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 +36 -0
- package/dist/cjs/ui/menu-item/expandable-menu-item/expandable-menu-item-trigger.js +16 -3
- package/dist/cjs/ui/menu-item/menu-item.compiled.css +2 -2
- package/dist/cjs/ui/menu-item/menu-item.js +5 -4
- package/dist/es2019/ui/menu-item/expandable-menu-item/expandable-menu-item-trigger.js +17 -4
- package/dist/es2019/ui/menu-item/menu-item.compiled.css +2 -2
- package/dist/es2019/ui/menu-item/menu-item.js +4 -3
- package/dist/esm/ui/menu-item/expandable-menu-item/expandable-menu-item-trigger.js +17 -4
- package/dist/esm/ui/menu-item/menu-item.compiled.css +2 -2
- package/dist/esm/ui/menu-item/menu-item.js +5 -4
- package/dist/types/components/skip-links/skip-link.d.ts +1 -1
- package/dist/types/components/skip-links/skip-links-container.d.ts +1 -2
- package/dist/types/context/skip-links/skip-links-context.d.ts +15 -2
- package/dist/types/context/skip-links/skip-links-data-context.d.ts +0 -1
- package/dist/types/context/top-nav-start/top-nav-start-context.d.ts +0 -1
- package/dist/types/ui/menu-item/button-menu-item.d.ts +4 -4
- package/dist/types/ui/menu-item/container-avatar.d.ts +0 -1
- package/dist/types/ui/menu-item/drag-handle.d.ts +0 -1
- package/dist/types/ui/menu-item/expandable-menu-item/expandable-menu-item-context.d.ts +1 -2
- package/dist/types/ui/menu-item/expandable-menu-item/expandable-menu-item-level-context.d.ts +0 -1
- package/dist/types/ui/menu-item/expandable-menu-item/expandable-menu-item-trigger.d.ts +5 -5
- package/dist/types/ui/menu-item/flyout-menu-item/flyout-menu-item-context.d.ts +0 -1
- package/dist/types/ui/menu-item/flyout-menu-item/flyout-menu-item-trigger.d.ts +2 -2
- package/dist/types/ui/menu-item/link-menu-item.d.ts +6 -11
- package/dist/types/ui/menu-item/menu-item.d.ts +16 -11
- package/dist/types/ui/menu-item/menu-list-item.d.ts +1 -2
- package/dist/types/ui/menu-item/menu-list.d.ts +0 -1
- package/dist/types/ui/menu-item/top-level-spacer.d.ts +0 -1
- package/dist/types/ui/menu-item/use-scroll-menu-item-into-view.d.ts +0 -1
- package/dist/types/ui/menu-section/divider.d.ts +0 -1
- package/dist/types/ui/menu-section/menu-section-context.d.ts +0 -1
- package/dist/types/ui/page-layout/aside.d.ts +0 -1
- package/dist/types/ui/page-layout/banner.d.ts +0 -1
- package/dist/types/ui/page-layout/hoist-slot-sizes-context.d.ts +0 -1
- package/dist/types/ui/page-layout/hoist-utils.d.ts +2 -2
- package/dist/types/ui/page-layout/main/main-sticky-context.d.ts +0 -1
- package/dist/types/ui/page-layout/main/main.d.ts +0 -1
- package/dist/types/ui/page-layout/panel-splitter/get-width.d.ts +2 -2
- package/dist/types/ui/page-layout/panel.d.ts +0 -1
- package/dist/types/ui/page-layout/side-nav/side-nav-footer.d.ts +1 -1
- package/dist/types/ui/page-layout/side-nav/side-nav.d.ts +0 -1
- package/dist/types/ui/page-layout/side-nav/toggle-button-context.d.ts +0 -1
- package/dist/types/ui/page-layout/side-nav/toggle-button.d.ts +4 -4
- package/dist/types/ui/page-layout/top-nav/top-nav.d.ts +0 -1
- package/dist/types/ui/top-nav-items/chat-button.d.ts +3 -3
- package/dist/types/ui/top-nav-items/nav-logo/app-logo.d.ts +1 -1
- package/dist/types/ui/top-nav-items/nav-logo/custom-logo.d.ts +1 -1
- package/dist/types/ui/top-nav-items/search.d.ts +5 -5
- package/dist/types/ui/top-nav-items/themed/button.d.ts +2 -2
- package/dist/types/ui/top-nav-items/themed/has-custom-theme-context.d.ts +0 -1
- package/dist/types/ui/top-nav-items/themed/use-custom-theme.d.ts +0 -1
- package/dist/types-ts4.5/components/skip-links/skip-link.d.ts +1 -1
- package/dist/types-ts4.5/components/skip-links/skip-links-container.d.ts +1 -2
- package/dist/types-ts4.5/context/skip-links/skip-links-context.d.ts +15 -2
- package/dist/types-ts4.5/context/skip-links/skip-links-data-context.d.ts +0 -1
- package/dist/types-ts4.5/context/top-nav-start/top-nav-start-context.d.ts +0 -1
- package/dist/types-ts4.5/ui/menu-item/button-menu-item.d.ts +4 -4
- package/dist/types-ts4.5/ui/menu-item/container-avatar.d.ts +0 -1
- package/dist/types-ts4.5/ui/menu-item/drag-handle.d.ts +0 -1
- package/dist/types-ts4.5/ui/menu-item/expandable-menu-item/expandable-menu-item-context.d.ts +1 -2
- package/dist/types-ts4.5/ui/menu-item/expandable-menu-item/expandable-menu-item-level-context.d.ts +0 -1
- package/dist/types-ts4.5/ui/menu-item/expandable-menu-item/expandable-menu-item-trigger.d.ts +5 -5
- package/dist/types-ts4.5/ui/menu-item/flyout-menu-item/flyout-menu-item-context.d.ts +0 -1
- package/dist/types-ts4.5/ui/menu-item/flyout-menu-item/flyout-menu-item-trigger.d.ts +2 -2
- package/dist/types-ts4.5/ui/menu-item/link-menu-item.d.ts +6 -11
- package/dist/types-ts4.5/ui/menu-item/menu-item.d.ts +16 -11
- package/dist/types-ts4.5/ui/menu-item/menu-list-item.d.ts +1 -2
- package/dist/types-ts4.5/ui/menu-item/menu-list.d.ts +0 -1
- package/dist/types-ts4.5/ui/menu-item/top-level-spacer.d.ts +0 -1
- package/dist/types-ts4.5/ui/menu-item/use-scroll-menu-item-into-view.d.ts +0 -1
- package/dist/types-ts4.5/ui/menu-section/divider.d.ts +0 -1
- package/dist/types-ts4.5/ui/menu-section/menu-section-context.d.ts +0 -1
- package/dist/types-ts4.5/ui/page-layout/aside.d.ts +0 -1
- package/dist/types-ts4.5/ui/page-layout/banner.d.ts +0 -1
- package/dist/types-ts4.5/ui/page-layout/hoist-slot-sizes-context.d.ts +0 -1
- package/dist/types-ts4.5/ui/page-layout/hoist-utils.d.ts +2 -2
- package/dist/types-ts4.5/ui/page-layout/main/main-sticky-context.d.ts +0 -1
- package/dist/types-ts4.5/ui/page-layout/main/main.d.ts +0 -1
- package/dist/types-ts4.5/ui/page-layout/panel-splitter/get-width.d.ts +2 -2
- package/dist/types-ts4.5/ui/page-layout/panel.d.ts +0 -1
- package/dist/types-ts4.5/ui/page-layout/side-nav/side-nav-footer.d.ts +1 -1
- package/dist/types-ts4.5/ui/page-layout/side-nav/side-nav.d.ts +0 -1
- package/dist/types-ts4.5/ui/page-layout/side-nav/toggle-button-context.d.ts +0 -1
- package/dist/types-ts4.5/ui/page-layout/side-nav/toggle-button.d.ts +4 -4
- package/dist/types-ts4.5/ui/page-layout/top-nav/top-nav.d.ts +0 -1
- package/dist/types-ts4.5/ui/top-nav-items/chat-button.d.ts +3 -3
- package/dist/types-ts4.5/ui/top-nav-items/nav-logo/app-logo.d.ts +1 -1
- package/dist/types-ts4.5/ui/top-nav-items/nav-logo/custom-logo.d.ts +1 -1
- package/dist/types-ts4.5/ui/top-nav-items/search.d.ts +5 -5
- package/dist/types-ts4.5/ui/top-nav-items/themed/button.d.ts +2 -2
- package/dist/types-ts4.5/ui/top-nav-items/themed/has-custom-theme-context.d.ts +0 -1
- package/dist/types-ts4.5/ui/top-nav-items/themed/use-custom-theme.d.ts +0 -1
- package/examples/company-hub-mock.tsx +0 -4
- package/examples/confluence-mock.tsx +1 -4
- package/examples/drag-and-drop-jira-scaling-vr.tsx +25 -0
- package/examples/expandable-menu-item.tsx +1 -0
- package/examples/page-layout.tsx +0 -3
- package/package.json +5 -3
- package/src/__tests__/informational-vr-tests/__snapshots__/layering/layers-in-main-slot-short-viewport--desktop--platform-dst-nav4-layering-in-main-slot-fixes-false.png +0 -0
- package/src/__tests__/informational-vr-tests/__snapshots__/layering/layers-in-main-slot-short-viewport--desktop--platform-dst-nav4-layering-in-main-slot-fixes-true.png +0 -0
- package/src/__tests__/informational-vr-tests/__snapshots__/layering/side-nav-expanded-on-mobile--mobile.png +0 -0
- package/src/__tests__/informational-vr-tests/__snapshots__/layering/side-nav-expanded-on-mobile-without-panel--mobile.png +0 -0
- package/src/__tests__/informational-vr-tests/layering.vr.tsx +6 -0
- package/src/__tests__/vr-tests/__snapshots__/a11y-scaling/app--desktop.png +0 -0
- package/src/__tests__/vr-tests/a11y-scaling.vr.tsx +12 -0
- package/src/ui/menu-item/__tests__/playwright/scroll-into-view.spec.tsx +9 -10
- package/src/ui/menu-item/__tests__/unit/expandable-menu-item.test.tsx +88 -63
- package/src/ui/menu-item/__tests__/vr-tests/__snapshots__/menu-item/button-menu-item-example--desktop-webkit.png +0 -0
- package/src/ui/menu-item/__tests__/vr-tests/__snapshots__/menu-item/button-menu-item-rtlexample--desktop-webkit.png +0 -0
- package/src/ui/menu-item/__tests__/vr-tests/__snapshots__/menu-item/link-menu-item-example--desktop-webkit.png +0 -0
- package/src/ui/menu-item/__tests__/vr-tests/__snapshots__/menu-item/link-menu-item-rtlexample--desktop-webkit.png +0 -0
- package/src/ui/menu-item/__tests__/vr-tests/expandable.vr.tsx +8 -8
- package/src/ui/menu-item/expandable-menu-item/expandable-menu-item-trigger.tsx +19 -2
- package/src/ui/menu-item/menu-item.tsx +10 -8
- package/src/ui/page-layout/__tests__/unit/react-safety.test.tsx +0 -8
|
@@ -19,6 +19,6 @@ export declare const HoistCssVarToLocalGrid: ({ variableName, value, }: {
|
|
|
19
19
|
export declare const DangerouslyHoistCssVarToDocumentRoot: ({ variableName, value, mediaQuery, responsiveValue, }: {
|
|
20
20
|
variableName: string;
|
|
21
21
|
value: string | number;
|
|
22
|
-
mediaQuery?: MediaQuery
|
|
23
|
-
responsiveValue?: string | number
|
|
22
|
+
mediaQuery?: MediaQuery;
|
|
23
|
+
responsiveValue?: string | number;
|
|
24
24
|
}) => React.JSX.Element;
|
|
@@ -2,8 +2,8 @@ import type { DragLocationHistory } from '@atlaskit/pragmatic-drag-and-drop/type
|
|
|
2
2
|
export declare const getWidthFromDragLocation: ({ initialWidth, location, direction, position, }: {
|
|
3
3
|
initialWidth: number;
|
|
4
4
|
location: DragLocationHistory;
|
|
5
|
-
direction:
|
|
6
|
-
position:
|
|
5
|
+
direction: "ltr" | "rtl";
|
|
6
|
+
position: "start" | "end";
|
|
7
7
|
}) => number;
|
|
8
8
|
/**
|
|
9
9
|
* Returns the computed width of an element in pixels.
|
|
@@ -21,7 +21,7 @@ export declare const SideNavToggleButton: ({ defaultCollapsed, expandLabel, coll
|
|
|
21
21
|
* __Note:__ If using this prop, ensure that it is also provided to the `SideNav` slot.
|
|
22
22
|
* This is to ensure the state is in sync before post-SSR hydration.
|
|
23
23
|
*/
|
|
24
|
-
defaultCollapsed?: boolean
|
|
24
|
+
defaultCollapsed?: boolean;
|
|
25
25
|
/**
|
|
26
26
|
* The label when the toggle button will expand the side nav.
|
|
27
27
|
*/
|
|
@@ -33,13 +33,13 @@ export declare const SideNavToggleButton: ({ defaultCollapsed, expandLabel, coll
|
|
|
33
33
|
/**
|
|
34
34
|
* A unique string that appears as data attribute `data-testid` in the rendered code, serving as a hook for automated tests.
|
|
35
35
|
*/
|
|
36
|
-
testId?: string
|
|
36
|
+
testId?: string;
|
|
37
37
|
/**
|
|
38
38
|
* An optional name used to identify events for [React UFO (Unified Frontend Observability) press interactions](https://developer.atlassian.com/platform/ufo/react-ufo/react-ufo/getting-started/#quick-start--press-interactions). For more information, see [React UFO integration into Design System components](https://go.atlassian.com/react-ufo-dst-integration).
|
|
39
39
|
*/
|
|
40
|
-
interactionName?: string
|
|
40
|
+
interactionName?: string;
|
|
41
41
|
/**
|
|
42
42
|
* The callback function that is called when the toggle button is clicked.
|
|
43
43
|
*/
|
|
44
|
-
onClick?: (
|
|
44
|
+
onClick?: (e: React.MouseEvent<HTMLElement>, analyticsEvent: UIAnalyticsEvent, attributes?: SideNavVisibilityChangeAnalyticsAttributes) => void;
|
|
45
45
|
}) => JSX.Element;
|
|
@@ -13,13 +13,13 @@ export declare const ChatButton: ({ children, onClick, isSelected, interactionNa
|
|
|
13
13
|
/**
|
|
14
14
|
* Handler called on click.
|
|
15
15
|
*/
|
|
16
|
-
onClick?: React.MouseEventHandler<HTMLButtonElement
|
|
16
|
+
onClick?: React.MouseEventHandler<HTMLButtonElement>;
|
|
17
17
|
/**
|
|
18
18
|
* Indicates that the button is selected.
|
|
19
19
|
*/
|
|
20
|
-
isSelected?: boolean
|
|
20
|
+
isSelected?: boolean;
|
|
21
21
|
/**
|
|
22
22
|
* An optional name used to identify events for [React UFO (Unified Frontend Observability) press interactions](https://developer.atlassian.com/platform/ufo/react-ufo/react-ufo/getting-started/#quick-start--press-interactions). For more information, see [React UFO integration into Design System components](https://go.atlassian.com/react-ufo-dst-integration).
|
|
23
23
|
*/
|
|
24
|
-
interactionName?: string
|
|
24
|
+
interactionName?: string;
|
|
25
25
|
}) => React.JSX.Element;
|
|
@@ -18,8 +18,8 @@ export declare const Search: ({ label, onClick, iconBefore: IconBefore, elemAfte
|
|
|
18
18
|
* The icon component to render before the search input.
|
|
19
19
|
*/
|
|
20
20
|
iconBefore?: React.ComponentType<NewIconProps & {
|
|
21
|
-
spacing:
|
|
22
|
-
}
|
|
21
|
+
spacing: "spacious";
|
|
22
|
+
}>;
|
|
23
23
|
/**
|
|
24
24
|
* The component to render after the search input.
|
|
25
25
|
*/
|
|
@@ -27,10 +27,10 @@ export declare const Search: ({ label, onClick, iconBefore: IconBefore, elemAfte
|
|
|
27
27
|
/**
|
|
28
28
|
* Handler called on click.
|
|
29
29
|
*/
|
|
30
|
-
onClick?: React.MouseEventHandler<HTMLButtonElement
|
|
30
|
+
onClick?: React.MouseEventHandler<HTMLButtonElement>;
|
|
31
31
|
/**
|
|
32
32
|
* An optional name used to identify events for [React UFO (Unified Frontend Observability) press interactions](https://developer.atlassian.com/platform/ufo/react-ufo/react-ufo/getting-started/#quick-start--press-interactions). For more information, see [React UFO integration into Design System components](https://go.atlassian.com/react-ufo-dst-integration).
|
|
33
33
|
*/
|
|
34
|
-
interactionName?: string
|
|
35
|
-
|
|
34
|
+
interactionName?: string;
|
|
35
|
+
"aria-haspopup"?: React.AriaAttributes["aria-haspopup"];
|
|
36
36
|
}) => JSX.Element;
|
|
@@ -88,7 +88,7 @@ export interface ThemedLinkButtonProps<RouterLinkConfig extends Record<string, a
|
|
|
88
88
|
*
|
|
89
89
|
* A themed link button for the top bar.
|
|
90
90
|
*/
|
|
91
|
-
export declare const ThemedLinkButton: <RouterLinkConfig extends Record<string, any> = never>(props: ThemedLinkButtonProps<RouterLinkConfig> & React.RefAttributes<HTMLAnchorElement>) => React.ReactElement
|
|
91
|
+
export declare const ThemedLinkButton: <RouterLinkConfig extends Record<string, any> = never>(props: ThemedLinkButtonProps<RouterLinkConfig> & React.RefAttributes<HTMLAnchorElement>) => React.ReactElement | null;
|
|
92
92
|
/**
|
|
93
93
|
* Props shared by `ThemedIconButtonProps` and `ThemedLinkIconButton`
|
|
94
94
|
*/
|
|
@@ -124,5 +124,5 @@ export interface ThemedLinkIconButtonProps<RouterLinkConfig extends Record<strin
|
|
|
124
124
|
*
|
|
125
125
|
* A themed link icon button for the top bar.
|
|
126
126
|
*/
|
|
127
|
-
export declare const ThemedLinkIconButton: <RouterLinkConfig extends Record<string, any> = never>(props: ThemedLinkIconButtonProps<RouterLinkConfig> & React.RefAttributes<HTMLAnchorElement>) => React.ReactElement
|
|
127
|
+
export declare const ThemedLinkIconButton: <RouterLinkConfig extends Record<string, any> = never>(props: ThemedLinkIconButtonProps<RouterLinkConfig> & React.RefAttributes<HTMLAnchorElement>) => React.ReactElement | null;
|
|
128
128
|
export {};
|
|
@@ -12,5 +12,5 @@ import type { SkipLinkData } from '../../context/skip-links/types';
|
|
|
12
12
|
export declare const SkipLink: ({ id, children, onBeforeNavigate, }: {
|
|
13
13
|
id: string;
|
|
14
14
|
children: ReactNode;
|
|
15
|
-
onBeforeNavigate?: SkipLinkData[
|
|
15
|
+
onBeforeNavigate?: SkipLinkData["onBeforeNavigate"];
|
|
16
16
|
}) => JSX.Element;
|
|
@@ -1,4 +1,3 @@
|
|
|
1
|
-
/// <reference types="react" />
|
|
2
1
|
/**
|
|
3
2
|
* A container element for the skip links
|
|
4
3
|
* The default label will be used when the `skipLinksLabel` attribute is not
|
|
@@ -9,5 +8,5 @@
|
|
|
9
8
|
*/
|
|
10
9
|
export declare const SkipLinksContainer: ({ label, testId }: {
|
|
11
10
|
label: string;
|
|
12
|
-
testId?: string
|
|
11
|
+
testId?: string;
|
|
13
12
|
}) => JSX.Element | null;
|
|
@@ -1,4 +1,3 @@
|
|
|
1
|
-
/// <reference types="react" />
|
|
2
1
|
import { type SkipLinkData } from './types';
|
|
3
2
|
export type SkipLinksContextData = {
|
|
4
3
|
registerSkipLink: (skipLinkData: SkipLinkData) => void;
|
|
@@ -20,4 +19,18 @@ export declare const useSkipLinkInternal: ({ id, label, listIndex, onBeforeNavig
|
|
|
20
19
|
/**
|
|
21
20
|
* Call `useSkipLink` to register a skip link for important elements on the page.
|
|
22
21
|
*/
|
|
23
|
-
export declare const useSkipLink: (
|
|
22
|
+
export declare const useSkipLink: (
|
|
23
|
+
/**
|
|
24
|
+
* The unique ID for the skip link.
|
|
25
|
+
* You can use the `useSkipLinkId` hook to generate a unique ID.
|
|
26
|
+
*/
|
|
27
|
+
id: string,
|
|
28
|
+
/**
|
|
29
|
+
* The label for the skip link.
|
|
30
|
+
*/
|
|
31
|
+
label: string,
|
|
32
|
+
/**
|
|
33
|
+
* You can optionally set the position of the skip link in the list of skip links.
|
|
34
|
+
* Positions are zero-indexed.
|
|
35
|
+
*/
|
|
36
|
+
listIndex?: number) => void;
|
|
@@ -31,8 +31,8 @@ export type ButtonMenuItemProps = MenuItemLinkOrButtonCommonProps & {
|
|
|
31
31
|
* A menu item button. It should be used within a `ul`, as it renders a list item.
|
|
32
32
|
*/
|
|
33
33
|
export declare const ButtonMenuItem: React.ForwardRefExoticComponent<import("./types").MenuItemCommonProps & import("./types").MenuItemSlots & {
|
|
34
|
-
description?: string
|
|
35
|
-
listItemRef?: React.Ref<HTMLDivElement
|
|
34
|
+
description?: string;
|
|
35
|
+
listItemRef?: React.Ref<HTMLDivElement>;
|
|
36
36
|
} & {
|
|
37
37
|
/**
|
|
38
38
|
* We are not using a discriminated union to enforce that the `actions` and `actionsOnHover`
|
|
@@ -47,9 +47,9 @@ export declare const ButtonMenuItem: React.ForwardRefExoticComponent<import("./t
|
|
|
47
47
|
*
|
|
48
48
|
* The menu item will not be interactive and will not respond to hover or focus.
|
|
49
49
|
*/
|
|
50
|
-
isDisabled?: boolean
|
|
50
|
+
isDisabled?: boolean;
|
|
51
51
|
/**
|
|
52
52
|
* Called when the user has clicked on the trigger content.
|
|
53
53
|
*/
|
|
54
|
-
onClick?: MenuItemOnClick<HTMLButtonElement
|
|
54
|
+
onClick?: MenuItemOnClick<HTMLButtonElement>;
|
|
55
55
|
} & React.RefAttributes<HTMLButtonElement>>;
|
package/dist/types-ts4.5/ui/menu-item/expandable-menu-item/expandable-menu-item-context.d.ts
CHANGED
|
@@ -1,4 +1,3 @@
|
|
|
1
|
-
/// <reference types="react" />
|
|
2
1
|
type onExpansionToggle = (isExpanded: boolean) => void;
|
|
3
2
|
/**
|
|
4
3
|
* Whether all ancestor menu items of the current menu item are expanded. Used to know if the current menu item is
|
|
@@ -22,7 +21,7 @@ export declare const OnExpansionToggleContext: import("react").Context<onExpansi
|
|
|
22
21
|
*/
|
|
23
22
|
export declare const LevelContext: import("react").Context<number>;
|
|
24
23
|
export declare const useIsExpanded: () => boolean;
|
|
25
|
-
export declare const useSetIsExpanded: () => (value: boolean) => void;
|
|
24
|
+
export declare const useSetIsExpanded: () => ((value: boolean) => void);
|
|
26
25
|
export declare const useOnExpansionToggle: () => onExpansionToggle | null;
|
|
27
26
|
export declare const useLevel: () => number;
|
|
28
27
|
/**
|
package/dist/types-ts4.5/ui/menu-item/expandable-menu-item/expandable-menu-item-trigger.d.ts
CHANGED
|
@@ -96,7 +96,7 @@ export declare const ExpandableMenuItemTrigger: React.ForwardRefExoticComponent<
|
|
|
96
96
|
/**
|
|
97
97
|
* Indicates that the menu item is selected.
|
|
98
98
|
*/
|
|
99
|
-
isSelected?: boolean
|
|
99
|
+
isSelected?: boolean;
|
|
100
100
|
/**
|
|
101
101
|
* If provided, the chevron icon (expand/collapse symbol) will be rendered within a separate
|
|
102
102
|
* icon button element. Clicking on this icon button will not trigger the `onClick` event. It
|
|
@@ -104,7 +104,7 @@ export declare const ExpandableMenuItemTrigger: React.ForwardRefExoticComponent<
|
|
|
104
104
|
*
|
|
105
105
|
* If a `href` is not provided, the chevron icon is rendered as part of the element.
|
|
106
106
|
*/
|
|
107
|
-
href?: string
|
|
107
|
+
href?: string;
|
|
108
108
|
/**
|
|
109
109
|
* Called when the user has clicked on the trigger content.
|
|
110
110
|
*
|
|
@@ -115,7 +115,7 @@ export declare const ExpandableMenuItemTrigger: React.ForwardRefExoticComponent<
|
|
|
115
115
|
* If you need a callback for when the user expands or collapses the expandable, use
|
|
116
116
|
* `onExpansionToggle` on the `ExpandableMenuItem` component instead.
|
|
117
117
|
*/
|
|
118
|
-
onClick?: (
|
|
118
|
+
onClick?: (event: React.MouseEvent<HTMLAnchorElement | HTMLButtonElement>, analyticsEvent: UIAnalyticsEvent, analyticsAttributes: {
|
|
119
119
|
isExpanded: boolean;
|
|
120
|
-
}) => void
|
|
121
|
-
} & React.RefAttributes<
|
|
120
|
+
}) => void;
|
|
121
|
+
} & React.RefAttributes<HTMLAnchorElement | HTMLButtonElement>>;
|
|
@@ -78,9 +78,9 @@ export declare const FlyoutMenuItemTrigger: import("react").ForwardRefExoticComp
|
|
|
78
78
|
*
|
|
79
79
|
* If you are controlling the open state of the flyout menu, use this to update your state.
|
|
80
80
|
*/
|
|
81
|
-
onClick?: MenuItemOnClick<HTMLButtonElement
|
|
81
|
+
onClick?: MenuItemOnClick<HTMLButtonElement>;
|
|
82
82
|
/**
|
|
83
83
|
* Indicates that the menu item is selected.
|
|
84
84
|
*/
|
|
85
|
-
isSelected?: boolean
|
|
85
|
+
isSelected?: boolean;
|
|
86
86
|
} & import("react").RefAttributes<HTMLButtonElement>>;
|
|
@@ -1,8 +1,3 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* @jsxRuntime classic
|
|
3
|
-
* @jsx jsx
|
|
4
|
-
*/
|
|
5
|
-
import { type Ref } from 'react';
|
|
6
1
|
import type { RouterLinkComponentProps } from '@atlaskit/app-provider';
|
|
7
2
|
import type { MenuItemLinkOrButtonCommonProps, MenuItemOnClick } from './types';
|
|
8
3
|
export type LinkMenuItemProps<RouterLinkConfig extends Record<string, any> = never> = MenuItemLinkOrButtonCommonProps & RouterLinkComponentProps<RouterLinkConfig> & {
|
|
@@ -25,19 +20,19 @@ export type LinkMenuItemProps<RouterLinkConfig extends Record<string, any> = nev
|
|
|
25
20
|
* A menu item link. It should be used within a `ul`.
|
|
26
21
|
*/
|
|
27
22
|
export declare const LinkMenuItem: <RouterLinkConfig extends Record<string, any> = never>(props: import("./types").MenuItemCommonProps & import("./types").MenuItemSlots & {
|
|
28
|
-
description?: string
|
|
29
|
-
listItemRef?: Ref<HTMLDivElement
|
|
23
|
+
description?: string;
|
|
24
|
+
listItemRef?: React.Ref<HTMLDivElement>;
|
|
30
25
|
} & RouterLinkComponentProps<RouterLinkConfig> & {
|
|
31
26
|
/**
|
|
32
27
|
* The native `target` attribute for the anchor element.
|
|
33
28
|
*/
|
|
34
|
-
target?:
|
|
29
|
+
target?: HTMLAnchorElement["target"];
|
|
35
30
|
/**
|
|
36
31
|
* Whether the menu item is selected.
|
|
37
32
|
*/
|
|
38
|
-
isSelected?: boolean
|
|
33
|
+
isSelected?: boolean;
|
|
39
34
|
/**
|
|
40
35
|
* Called when the user has clicked on the trigger content.
|
|
41
36
|
*/
|
|
42
|
-
onClick?: MenuItemOnClick<HTMLAnchorElement
|
|
43
|
-
} & import("react").RefAttributes<HTMLAnchorElement>) =>
|
|
37
|
+
onClick?: MenuItemOnClick<HTMLAnchorElement>;
|
|
38
|
+
} & import("react").RefAttributes<HTMLAnchorElement>) => React.ReactElement | null;
|
|
@@ -27,16 +27,21 @@ export declare const nestedOpenPopupCSSSelector = "&:has([aria-expanded=\"true\"
|
|
|
27
27
|
* It contains a type argument `<T>`, to specify the type of the interactive element (`button` or `a`).
|
|
28
28
|
* This can be inferred from the type of the `onClick` prop.
|
|
29
29
|
*/
|
|
30
|
-
export declare const MenuItemBase: <T extends
|
|
31
|
-
description?: string
|
|
32
|
-
listItemRef?: React.Ref<HTMLDivElement
|
|
30
|
+
export declare const MenuItemBase: <T extends HTMLAnchorElement | HTMLButtonElement>(props: import("./types").MenuItemCommonProps & import("./types").MenuItemSlots & {
|
|
31
|
+
description?: string;
|
|
32
|
+
listItemRef?: React.Ref<HTMLDivElement>;
|
|
33
33
|
} & {
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
34
|
+
/**
|
|
35
|
+
* ID attribute, passed to the interactive element (anchor/button). This is not publicly exposed, and is currently only
|
|
36
|
+
* used internally by `ExpandableMenuItemTrigger` for the `aria-labelledby` attribute.
|
|
37
|
+
*/
|
|
38
|
+
id?: string;
|
|
39
|
+
href?: string | Record<string, any>;
|
|
40
|
+
target?: HTMLAnchorElement["target"];
|
|
41
|
+
isDisabled?: boolean;
|
|
42
|
+
isSelected?: boolean;
|
|
43
|
+
ariaControls?: string;
|
|
44
|
+
ariaExpanded?: boolean;
|
|
45
|
+
ariaHasPopup?: boolean | "dialog";
|
|
41
46
|
onClick?: MenuItemOnClick<T> | undefined;
|
|
42
|
-
} & React.RefAttributes<T>) => React.ReactElement
|
|
47
|
+
} & React.RefAttributes<T>) => React.ReactElement | null;
|
|
@@ -1,4 +1,3 @@
|
|
|
1
|
-
/// <reference types="react" />
|
|
2
1
|
/**
|
|
3
2
|
* __Menu list item__
|
|
4
3
|
*
|
|
@@ -6,6 +5,6 @@
|
|
|
6
5
|
*/
|
|
7
6
|
export declare const MenuListItem: import("react").ForwardRefExoticComponent<{
|
|
8
7
|
children: import("react").ReactNode;
|
|
9
|
-
testId?: string
|
|
8
|
+
testId?: string;
|
|
10
9
|
xcss?: import("@atlaskit/css").StrictXCSSProp<"display" | "scrollMarginInline", never>;
|
|
11
10
|
} & import("react").RefAttributes<HTMLDivElement>>;
|
|
@@ -19,6 +19,6 @@ export declare const HoistCssVarToLocalGrid: ({ variableName, value, }: {
|
|
|
19
19
|
export declare const DangerouslyHoistCssVarToDocumentRoot: ({ variableName, value, mediaQuery, responsiveValue, }: {
|
|
20
20
|
variableName: string;
|
|
21
21
|
value: string | number;
|
|
22
|
-
mediaQuery?: MediaQuery
|
|
23
|
-
responsiveValue?: string | number
|
|
22
|
+
mediaQuery?: MediaQuery;
|
|
23
|
+
responsiveValue?: string | number;
|
|
24
24
|
}) => React.JSX.Element;
|
|
@@ -2,8 +2,8 @@ import type { DragLocationHistory } from '@atlaskit/pragmatic-drag-and-drop/type
|
|
|
2
2
|
export declare const getWidthFromDragLocation: ({ initialWidth, location, direction, position, }: {
|
|
3
3
|
initialWidth: number;
|
|
4
4
|
location: DragLocationHistory;
|
|
5
|
-
direction:
|
|
6
|
-
position:
|
|
5
|
+
direction: "ltr" | "rtl";
|
|
6
|
+
position: "start" | "end";
|
|
7
7
|
}) => number;
|
|
8
8
|
/**
|
|
9
9
|
* Returns the computed width of an element in pixels.
|
|
@@ -21,7 +21,7 @@ export declare const SideNavToggleButton: ({ defaultCollapsed, expandLabel, coll
|
|
|
21
21
|
* __Note:__ If using this prop, ensure that it is also provided to the `SideNav` slot.
|
|
22
22
|
* This is to ensure the state is in sync before post-SSR hydration.
|
|
23
23
|
*/
|
|
24
|
-
defaultCollapsed?: boolean
|
|
24
|
+
defaultCollapsed?: boolean;
|
|
25
25
|
/**
|
|
26
26
|
* The label when the toggle button will expand the side nav.
|
|
27
27
|
*/
|
|
@@ -33,13 +33,13 @@ export declare const SideNavToggleButton: ({ defaultCollapsed, expandLabel, coll
|
|
|
33
33
|
/**
|
|
34
34
|
* A unique string that appears as data attribute `data-testid` in the rendered code, serving as a hook for automated tests.
|
|
35
35
|
*/
|
|
36
|
-
testId?: string
|
|
36
|
+
testId?: string;
|
|
37
37
|
/**
|
|
38
38
|
* An optional name used to identify events for [React UFO (Unified Frontend Observability) press interactions](https://developer.atlassian.com/platform/ufo/react-ufo/react-ufo/getting-started/#quick-start--press-interactions). For more information, see [React UFO integration into Design System components](https://go.atlassian.com/react-ufo-dst-integration).
|
|
39
39
|
*/
|
|
40
|
-
interactionName?: string
|
|
40
|
+
interactionName?: string;
|
|
41
41
|
/**
|
|
42
42
|
* The callback function that is called when the toggle button is clicked.
|
|
43
43
|
*/
|
|
44
|
-
onClick?: (
|
|
44
|
+
onClick?: (e: React.MouseEvent<HTMLElement>, analyticsEvent: UIAnalyticsEvent, attributes?: SideNavVisibilityChangeAnalyticsAttributes) => void;
|
|
45
45
|
}) => JSX.Element;
|
|
@@ -13,13 +13,13 @@ export declare const ChatButton: ({ children, onClick, isSelected, interactionNa
|
|
|
13
13
|
/**
|
|
14
14
|
* Handler called on click.
|
|
15
15
|
*/
|
|
16
|
-
onClick?: React.MouseEventHandler<HTMLButtonElement
|
|
16
|
+
onClick?: React.MouseEventHandler<HTMLButtonElement>;
|
|
17
17
|
/**
|
|
18
18
|
* Indicates that the button is selected.
|
|
19
19
|
*/
|
|
20
|
-
isSelected?: boolean
|
|
20
|
+
isSelected?: boolean;
|
|
21
21
|
/**
|
|
22
22
|
* An optional name used to identify events for [React UFO (Unified Frontend Observability) press interactions](https://developer.atlassian.com/platform/ufo/react-ufo/react-ufo/getting-started/#quick-start--press-interactions). For more information, see [React UFO integration into Design System components](https://go.atlassian.com/react-ufo-dst-integration).
|
|
23
23
|
*/
|
|
24
|
-
interactionName?: string
|
|
24
|
+
interactionName?: string;
|
|
25
25
|
}) => React.JSX.Element;
|