@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.
Files changed (115) hide show
  1. package/CHANGELOG.md +36 -0
  2. package/dist/cjs/ui/menu-item/expandable-menu-item/expandable-menu-item-trigger.js +16 -3
  3. package/dist/cjs/ui/menu-item/menu-item.compiled.css +2 -2
  4. package/dist/cjs/ui/menu-item/menu-item.js +5 -4
  5. package/dist/es2019/ui/menu-item/expandable-menu-item/expandable-menu-item-trigger.js +17 -4
  6. package/dist/es2019/ui/menu-item/menu-item.compiled.css +2 -2
  7. package/dist/es2019/ui/menu-item/menu-item.js +4 -3
  8. package/dist/esm/ui/menu-item/expandable-menu-item/expandable-menu-item-trigger.js +17 -4
  9. package/dist/esm/ui/menu-item/menu-item.compiled.css +2 -2
  10. package/dist/esm/ui/menu-item/menu-item.js +5 -4
  11. package/dist/types/components/skip-links/skip-link.d.ts +1 -1
  12. package/dist/types/components/skip-links/skip-links-container.d.ts +1 -2
  13. package/dist/types/context/skip-links/skip-links-context.d.ts +15 -2
  14. package/dist/types/context/skip-links/skip-links-data-context.d.ts +0 -1
  15. package/dist/types/context/top-nav-start/top-nav-start-context.d.ts +0 -1
  16. package/dist/types/ui/menu-item/button-menu-item.d.ts +4 -4
  17. package/dist/types/ui/menu-item/container-avatar.d.ts +0 -1
  18. package/dist/types/ui/menu-item/drag-handle.d.ts +0 -1
  19. package/dist/types/ui/menu-item/expandable-menu-item/expandable-menu-item-context.d.ts +1 -2
  20. package/dist/types/ui/menu-item/expandable-menu-item/expandable-menu-item-level-context.d.ts +0 -1
  21. package/dist/types/ui/menu-item/expandable-menu-item/expandable-menu-item-trigger.d.ts +5 -5
  22. package/dist/types/ui/menu-item/flyout-menu-item/flyout-menu-item-context.d.ts +0 -1
  23. package/dist/types/ui/menu-item/flyout-menu-item/flyout-menu-item-trigger.d.ts +2 -2
  24. package/dist/types/ui/menu-item/link-menu-item.d.ts +6 -11
  25. package/dist/types/ui/menu-item/menu-item.d.ts +16 -11
  26. package/dist/types/ui/menu-item/menu-list-item.d.ts +1 -2
  27. package/dist/types/ui/menu-item/menu-list.d.ts +0 -1
  28. package/dist/types/ui/menu-item/top-level-spacer.d.ts +0 -1
  29. package/dist/types/ui/menu-item/use-scroll-menu-item-into-view.d.ts +0 -1
  30. package/dist/types/ui/menu-section/divider.d.ts +0 -1
  31. package/dist/types/ui/menu-section/menu-section-context.d.ts +0 -1
  32. package/dist/types/ui/page-layout/aside.d.ts +0 -1
  33. package/dist/types/ui/page-layout/banner.d.ts +0 -1
  34. package/dist/types/ui/page-layout/hoist-slot-sizes-context.d.ts +0 -1
  35. package/dist/types/ui/page-layout/hoist-utils.d.ts +2 -2
  36. package/dist/types/ui/page-layout/main/main-sticky-context.d.ts +0 -1
  37. package/dist/types/ui/page-layout/main/main.d.ts +0 -1
  38. package/dist/types/ui/page-layout/panel-splitter/get-width.d.ts +2 -2
  39. package/dist/types/ui/page-layout/panel.d.ts +0 -1
  40. package/dist/types/ui/page-layout/side-nav/side-nav-footer.d.ts +1 -1
  41. package/dist/types/ui/page-layout/side-nav/side-nav.d.ts +0 -1
  42. package/dist/types/ui/page-layout/side-nav/toggle-button-context.d.ts +0 -1
  43. package/dist/types/ui/page-layout/side-nav/toggle-button.d.ts +4 -4
  44. package/dist/types/ui/page-layout/top-nav/top-nav.d.ts +0 -1
  45. package/dist/types/ui/top-nav-items/chat-button.d.ts +3 -3
  46. package/dist/types/ui/top-nav-items/nav-logo/app-logo.d.ts +1 -1
  47. package/dist/types/ui/top-nav-items/nav-logo/custom-logo.d.ts +1 -1
  48. package/dist/types/ui/top-nav-items/search.d.ts +5 -5
  49. package/dist/types/ui/top-nav-items/themed/button.d.ts +2 -2
  50. package/dist/types/ui/top-nav-items/themed/has-custom-theme-context.d.ts +0 -1
  51. package/dist/types/ui/top-nav-items/themed/use-custom-theme.d.ts +0 -1
  52. package/dist/types-ts4.5/components/skip-links/skip-link.d.ts +1 -1
  53. package/dist/types-ts4.5/components/skip-links/skip-links-container.d.ts +1 -2
  54. package/dist/types-ts4.5/context/skip-links/skip-links-context.d.ts +15 -2
  55. package/dist/types-ts4.5/context/skip-links/skip-links-data-context.d.ts +0 -1
  56. package/dist/types-ts4.5/context/top-nav-start/top-nav-start-context.d.ts +0 -1
  57. package/dist/types-ts4.5/ui/menu-item/button-menu-item.d.ts +4 -4
  58. package/dist/types-ts4.5/ui/menu-item/container-avatar.d.ts +0 -1
  59. package/dist/types-ts4.5/ui/menu-item/drag-handle.d.ts +0 -1
  60. package/dist/types-ts4.5/ui/menu-item/expandable-menu-item/expandable-menu-item-context.d.ts +1 -2
  61. package/dist/types-ts4.5/ui/menu-item/expandable-menu-item/expandable-menu-item-level-context.d.ts +0 -1
  62. package/dist/types-ts4.5/ui/menu-item/expandable-menu-item/expandable-menu-item-trigger.d.ts +5 -5
  63. package/dist/types-ts4.5/ui/menu-item/flyout-menu-item/flyout-menu-item-context.d.ts +0 -1
  64. package/dist/types-ts4.5/ui/menu-item/flyout-menu-item/flyout-menu-item-trigger.d.ts +2 -2
  65. package/dist/types-ts4.5/ui/menu-item/link-menu-item.d.ts +6 -11
  66. package/dist/types-ts4.5/ui/menu-item/menu-item.d.ts +16 -11
  67. package/dist/types-ts4.5/ui/menu-item/menu-list-item.d.ts +1 -2
  68. package/dist/types-ts4.5/ui/menu-item/menu-list.d.ts +0 -1
  69. package/dist/types-ts4.5/ui/menu-item/top-level-spacer.d.ts +0 -1
  70. package/dist/types-ts4.5/ui/menu-item/use-scroll-menu-item-into-view.d.ts +0 -1
  71. package/dist/types-ts4.5/ui/menu-section/divider.d.ts +0 -1
  72. package/dist/types-ts4.5/ui/menu-section/menu-section-context.d.ts +0 -1
  73. package/dist/types-ts4.5/ui/page-layout/aside.d.ts +0 -1
  74. package/dist/types-ts4.5/ui/page-layout/banner.d.ts +0 -1
  75. package/dist/types-ts4.5/ui/page-layout/hoist-slot-sizes-context.d.ts +0 -1
  76. package/dist/types-ts4.5/ui/page-layout/hoist-utils.d.ts +2 -2
  77. package/dist/types-ts4.5/ui/page-layout/main/main-sticky-context.d.ts +0 -1
  78. package/dist/types-ts4.5/ui/page-layout/main/main.d.ts +0 -1
  79. package/dist/types-ts4.5/ui/page-layout/panel-splitter/get-width.d.ts +2 -2
  80. package/dist/types-ts4.5/ui/page-layout/panel.d.ts +0 -1
  81. package/dist/types-ts4.5/ui/page-layout/side-nav/side-nav-footer.d.ts +1 -1
  82. package/dist/types-ts4.5/ui/page-layout/side-nav/side-nav.d.ts +0 -1
  83. package/dist/types-ts4.5/ui/page-layout/side-nav/toggle-button-context.d.ts +0 -1
  84. package/dist/types-ts4.5/ui/page-layout/side-nav/toggle-button.d.ts +4 -4
  85. package/dist/types-ts4.5/ui/page-layout/top-nav/top-nav.d.ts +0 -1
  86. package/dist/types-ts4.5/ui/top-nav-items/chat-button.d.ts +3 -3
  87. package/dist/types-ts4.5/ui/top-nav-items/nav-logo/app-logo.d.ts +1 -1
  88. package/dist/types-ts4.5/ui/top-nav-items/nav-logo/custom-logo.d.ts +1 -1
  89. package/dist/types-ts4.5/ui/top-nav-items/search.d.ts +5 -5
  90. package/dist/types-ts4.5/ui/top-nav-items/themed/button.d.ts +2 -2
  91. package/dist/types-ts4.5/ui/top-nav-items/themed/has-custom-theme-context.d.ts +0 -1
  92. package/dist/types-ts4.5/ui/top-nav-items/themed/use-custom-theme.d.ts +0 -1
  93. package/examples/company-hub-mock.tsx +0 -4
  94. package/examples/confluence-mock.tsx +1 -4
  95. package/examples/drag-and-drop-jira-scaling-vr.tsx +25 -0
  96. package/examples/expandable-menu-item.tsx +1 -0
  97. package/examples/page-layout.tsx +0 -3
  98. package/package.json +5 -3
  99. 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
  100. 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
  101. package/src/__tests__/informational-vr-tests/__snapshots__/layering/side-nav-expanded-on-mobile--mobile.png +0 -0
  102. package/src/__tests__/informational-vr-tests/__snapshots__/layering/side-nav-expanded-on-mobile-without-panel--mobile.png +0 -0
  103. package/src/__tests__/informational-vr-tests/layering.vr.tsx +6 -0
  104. package/src/__tests__/vr-tests/__snapshots__/a11y-scaling/app--desktop.png +0 -0
  105. package/src/__tests__/vr-tests/a11y-scaling.vr.tsx +12 -0
  106. package/src/ui/menu-item/__tests__/playwright/scroll-into-view.spec.tsx +9 -10
  107. package/src/ui/menu-item/__tests__/unit/expandable-menu-item.test.tsx +88 -63
  108. package/src/ui/menu-item/__tests__/vr-tests/__snapshots__/menu-item/button-menu-item-example--desktop-webkit.png +0 -0
  109. package/src/ui/menu-item/__tests__/vr-tests/__snapshots__/menu-item/button-menu-item-rtlexample--desktop-webkit.png +0 -0
  110. package/src/ui/menu-item/__tests__/vr-tests/__snapshots__/menu-item/link-menu-item-example--desktop-webkit.png +0 -0
  111. package/src/ui/menu-item/__tests__/vr-tests/__snapshots__/menu-item/link-menu-item-rtlexample--desktop-webkit.png +0 -0
  112. package/src/ui/menu-item/__tests__/vr-tests/expandable.vr.tsx +8 -8
  113. package/src/ui/menu-item/expandable-menu-item/expandable-menu-item-trigger.tsx +19 -2
  114. package/src/ui/menu-item/menu-item.tsx +10 -8
  115. package/src/ui/page-layout/__tests__/unit/react-safety.test.tsx +0 -8
@@ -1,4 +1,3 @@
1
- /// <reference types="react" />
2
1
  /**
3
2
  * Context for whether the slot sizes are to be hoisted to the document root.
4
3
  * It is set by consumers using a prop on the page layout `Root` element.
@@ -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 | undefined;
23
- responsiveValue?: string | number | undefined;
22
+ mediaQuery?: MediaQuery;
23
+ responsiveValue?: string | number;
24
24
  }) => React.JSX.Element;
@@ -1,4 +1,3 @@
1
- /// <reference types="react" />
2
1
  /**
3
2
  * Context for whether the main slot is sticky.
4
3
  */
@@ -1,4 +1,3 @@
1
- /// <reference types="react" />
2
1
  import type { StrictXCSSProp } from '@atlaskit/css';
3
2
  import type { CommonSlotProps } from '../types';
4
3
  /**
@@ -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: 'ltr' | 'rtl';
6
- position: 'start' | 'end';
5
+ direction: "ltr" | "rtl";
6
+ position: "start" | "end";
7
7
  }) => number;
8
8
  /**
9
9
  * Returns the computed width of an element in pixels.
@@ -1,4 +1,3 @@
1
- /// <reference types="react" />
2
1
  import type { StrictXCSSProp } from '@atlaskit/css';
3
2
  import type { CommonSlotProps } from './types';
4
3
  /**
@@ -15,5 +15,5 @@ export declare const SideNavFooter: ({ children, xcss, }: {
15
15
  /**
16
16
  * Bounded style overrides.
17
17
  */
18
- xcss?: StrictXCSSProp<'backgroundColor', never>;
18
+ xcss?: StrictXCSSProp<"backgroundColor", never>;
19
19
  }) => JSX.Element;
@@ -1,4 +1,3 @@
1
- /// <reference types="react" />
2
1
  import type { CommonSlotProps } from '../types';
3
2
  import { type VisibilityCallback } from './use-side-nav-visibility-callbacks';
4
3
  type SideNavProps = CommonSlotProps & {
@@ -1,4 +1,3 @@
1
- /// <reference types="react" />
2
1
  /**
3
2
  * Context for the side nav toggle button element.
4
3
  * Used to power the side nav flyout by allowing the side nav to bind event listeners to the button element.
@@ -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 | undefined;
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 | undefined;
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 | undefined;
40
+ interactionName?: string;
41
41
  /**
42
42
  * The callback function that is called when the toggle button is clicked.
43
43
  */
44
- onClick?: ((e: React.MouseEvent<HTMLElement>, analyticsEvent: UIAnalyticsEvent, attributes?: SideNavVisibilityChangeAnalyticsAttributes) => void) | undefined;
44
+ onClick?: (e: React.MouseEvent<HTMLElement>, analyticsEvent: UIAnalyticsEvent, attributes?: SideNavVisibilityChangeAnalyticsAttributes) => void;
45
45
  }) => JSX.Element;
@@ -1,4 +1,3 @@
1
- /// <reference types="react" />
2
1
  import type { StrictXCSSProp } from '@atlaskit/css';
3
2
  import { type CustomTheme } from '../../top-nav-items/themed/get-custom-theme-styles';
4
3
  import type { CommonSlotProps } from '../types';
@@ -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> | undefined;
16
+ onClick?: React.MouseEventHandler<HTMLButtonElement>;
17
17
  /**
18
18
  * Indicates that the button is selected.
19
19
  */
20
- isSelected?: boolean | undefined;
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 | undefined;
24
+ interactionName?: string;
25
25
  }) => React.JSX.Element;
@@ -33,5 +33,5 @@ export declare const AppLogo: ({ name, label, href, icon, onClick, }: {
33
33
  /**
34
34
  * Handler called on click.
35
35
  */
36
- onClick?: React.MouseEventHandler<HTMLAnchorElement> | undefined;
36
+ onClick?: React.MouseEventHandler<HTMLAnchorElement>;
37
37
  }) => JSX.Element;
@@ -33,5 +33,5 @@ export declare const CustomLogo: ({ href, logo, icon, onClick, label, }: {
33
33
  /**
34
34
  * Handler called on click.
35
35
  */
36
- onClick?: React.MouseEventHandler<HTMLAnchorElement> | undefined;
36
+ onClick?: React.MouseEventHandler<HTMLAnchorElement>;
37
37
  }) => 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: 'spacious';
22
- }> | undefined;
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> | undefined;
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 | undefined;
35
- 'aria-haspopup'?: React.AriaAttributes['aria-haspopup'];
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<any, string | React.JSXElementConstructor<any>> | null;
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<any, string | React.JSXElementConstructor<any>> | null;
127
+ export declare const ThemedLinkIconButton: <RouterLinkConfig extends Record<string, any> = never>(props: ThemedLinkIconButtonProps<RouterLinkConfig> & React.RefAttributes<HTMLAnchorElement>) => React.ReactElement | null;
128
128
  export {};
@@ -1,4 +1,3 @@
1
- /// <reference types="react" />
2
1
  /**
3
2
  * Context to let components know if a custom theme is being applied.
4
3
  */
@@ -1,4 +1,3 @@
1
- /// <reference types="react" />
2
1
  import { type CustomTheme } from './get-custom-theme-styles';
3
2
  type Result = {
4
3
  isEnabled: false;
@@ -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['onBeforeNavigate'];
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 | undefined;
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: (id: string, label: string, listIndex?: number) => void;
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;
@@ -1,4 +1,3 @@
1
- /// <reference types="react" />
2
1
  import { type SkipLinkData } from './types';
3
2
  /**
4
3
  * Provides a way to store skip links
@@ -1,4 +1,3 @@
1
- /// <reference types="react" />
2
1
  /**
3
2
  * Context for the TopNavStart container element
4
3
  * Used to power the side nav flyout by allowing the side nav to bind event listeners to the element, so we can
@@ -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 | undefined;
35
- listItemRef?: React.Ref<HTMLDivElement> | undefined;
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 | undefined;
50
+ isDisabled?: boolean;
51
51
  /**
52
52
  * Called when the user has clicked on the trigger content.
53
53
  */
54
- onClick?: MenuItemOnClick<HTMLButtonElement> | undefined;
54
+ onClick?: MenuItemOnClick<HTMLButtonElement>;
55
55
  } & React.RefAttributes<HTMLButtonElement>>;
@@ -1,4 +1,3 @@
1
- /// <reference types="react" />
2
1
  export type ContainerAvatarProps = {
3
2
  /**
4
3
  * The source of the avatar image.
@@ -1,4 +1,3 @@
1
- /// <reference types="react" />
2
1
  /**
3
2
  * @jsxFrag
4
3
  * @jsxRuntime classic
@@ -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
  /**
@@ -1,4 +1,3 @@
1
- /// <reference types="react" />
2
1
  /**
3
2
  * A context for storing the level value of the ExpandableMenuItem.
4
3
  */
@@ -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 | undefined;
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 | undefined;
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?: ((event: React.MouseEvent<HTMLAnchorElement | HTMLButtonElement>, analyticsEvent: UIAnalyticsEvent, analyticsAttributes: {
118
+ onClick?: (event: React.MouseEvent<HTMLAnchorElement | HTMLButtonElement>, analyticsEvent: UIAnalyticsEvent, analyticsAttributes: {
119
119
  isExpanded: boolean;
120
- }) => void) | undefined;
121
- } & React.RefAttributes<HTMLButtonElement | HTMLAnchorElement>>;
120
+ }) => void;
121
+ } & React.RefAttributes<HTMLAnchorElement | HTMLButtonElement>>;
@@ -1,4 +1,3 @@
1
- /// <reference types="react" />
2
1
  /**
3
2
  * __Is open context__
4
3
  *
@@ -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> | undefined;
81
+ onClick?: MenuItemOnClick<HTMLButtonElement>;
82
82
  /**
83
83
  * Indicates that the menu item is selected.
84
84
  */
85
- isSelected?: boolean | undefined;
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 | undefined;
29
- listItemRef?: Ref<HTMLDivElement> | undefined;
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?: string | undefined;
29
+ target?: HTMLAnchorElement["target"];
35
30
  /**
36
31
  * Whether the menu item is selected.
37
32
  */
38
- isSelected?: boolean | undefined;
33
+ isSelected?: boolean;
39
34
  /**
40
35
  * Called when the user has clicked on the trigger content.
41
36
  */
42
- onClick?: MenuItemOnClick<HTMLAnchorElement> | undefined;
43
- } & import("react").RefAttributes<HTMLAnchorElement>) => import("react").ReactElement<any, string | import("react").JSXElementConstructor<any>> | null;
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 HTMLButtonElement | HTMLAnchorElement>(props: import("./types").MenuItemCommonProps & import("./types").MenuItemSlots & {
31
- description?: string | undefined;
32
- listItemRef?: React.Ref<HTMLDivElement> | undefined;
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
- href?: string | Record<string, any> | undefined;
35
- target?: string | undefined;
36
- isDisabled?: boolean | undefined;
37
- isSelected?: boolean | undefined;
38
- ariaControls?: string | undefined;
39
- ariaExpanded?: boolean | undefined;
40
- ariaHasPopup?: boolean | "dialog" | undefined;
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<any, string | React.JSXElementConstructor<any>> | null;
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 | undefined;
8
+ testId?: string;
10
9
  xcss?: import("@atlaskit/css").StrictXCSSProp<"display" | "scrollMarginInline", never>;
11
10
  } & import("react").RefAttributes<HTMLDivElement>>;
@@ -1,4 +1,3 @@
1
- /// <reference types="react" />
2
1
  import { type ListProps } from '../../components/list';
3
2
  /**
4
3
  * __Menu list__
@@ -1,4 +1,3 @@
1
- /// <reference types="react" />
2
1
  /**
3
2
  * @jsxRuntime classic
4
3
  * @jsx jsx
@@ -1,4 +1,3 @@
1
- /// <reference types="react" />
2
1
  /**
3
2
  * Scrolls the element into view once it is selected, and once all its ancestors (expandable
4
3
  * parent menu items) are expanded.
@@ -1,4 +1,3 @@
1
- /// <reference types="react" />
2
1
  /**
3
2
  * __Divider__
4
3
  *
@@ -1,4 +1,3 @@
1
- /// <reference types="react" />
2
1
  /**
3
2
  * Context for the current menu section. It holds a unique ID for the section, used for associating the section heading
4
3
  * as an accessible label for the group.
@@ -1,4 +1,3 @@
1
- /// <reference types="react" />
2
1
  import type { StrictXCSSProp } from '@atlaskit/css';
3
2
  import type { CommonSlotProps } from './types';
4
3
  /**
@@ -1,4 +1,3 @@
1
- /// <reference types="react" />
2
1
  import type { StrictXCSSProp } from '@atlaskit/css';
3
2
  import type { CommonSlotProps } from './types';
4
3
  /**
@@ -1,4 +1,3 @@
1
- /// <reference types="react" />
2
1
  /**
3
2
  * Context for whether the slot sizes are to be hoisted to the document root.
4
3
  * It is set by consumers using a prop on the page layout `Root` element.
@@ -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 | undefined;
23
- responsiveValue?: string | number | undefined;
22
+ mediaQuery?: MediaQuery;
23
+ responsiveValue?: string | number;
24
24
  }) => React.JSX.Element;
@@ -1,4 +1,3 @@
1
- /// <reference types="react" />
2
1
  /**
3
2
  * Context for whether the main slot is sticky.
4
3
  */
@@ -1,4 +1,3 @@
1
- /// <reference types="react" />
2
1
  import type { StrictXCSSProp } from '@atlaskit/css';
3
2
  import type { CommonSlotProps } from '../types';
4
3
  /**
@@ -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: 'ltr' | 'rtl';
6
- position: 'start' | 'end';
5
+ direction: "ltr" | "rtl";
6
+ position: "start" | "end";
7
7
  }) => number;
8
8
  /**
9
9
  * Returns the computed width of an element in pixels.
@@ -1,4 +1,3 @@
1
- /// <reference types="react" />
2
1
  import type { StrictXCSSProp } from '@atlaskit/css';
3
2
  import type { CommonSlotProps } from './types';
4
3
  /**
@@ -15,5 +15,5 @@ export declare const SideNavFooter: ({ children, xcss, }: {
15
15
  /**
16
16
  * Bounded style overrides.
17
17
  */
18
- xcss?: StrictXCSSProp<'backgroundColor', never>;
18
+ xcss?: StrictXCSSProp<"backgroundColor", never>;
19
19
  }) => JSX.Element;
@@ -1,4 +1,3 @@
1
- /// <reference types="react" />
2
1
  import type { CommonSlotProps } from '../types';
3
2
  import { type VisibilityCallback } from './use-side-nav-visibility-callbacks';
4
3
  type SideNavProps = CommonSlotProps & {
@@ -1,4 +1,3 @@
1
- /// <reference types="react" />
2
1
  /**
3
2
  * Context for the side nav toggle button element.
4
3
  * Used to power the side nav flyout by allowing the side nav to bind event listeners to the button element.
@@ -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 | undefined;
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 | undefined;
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 | undefined;
40
+ interactionName?: string;
41
41
  /**
42
42
  * The callback function that is called when the toggle button is clicked.
43
43
  */
44
- onClick?: ((e: React.MouseEvent<HTMLElement>, analyticsEvent: UIAnalyticsEvent, attributes?: SideNavVisibilityChangeAnalyticsAttributes) => void) | undefined;
44
+ onClick?: (e: React.MouseEvent<HTMLElement>, analyticsEvent: UIAnalyticsEvent, attributes?: SideNavVisibilityChangeAnalyticsAttributes) => void;
45
45
  }) => JSX.Element;
@@ -1,4 +1,3 @@
1
- /// <reference types="react" />
2
1
  import type { StrictXCSSProp } from '@atlaskit/css';
3
2
  import { type CustomTheme } from '../../top-nav-items/themed/get-custom-theme-styles';
4
3
  import type { CommonSlotProps } from '../types';
@@ -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> | undefined;
16
+ onClick?: React.MouseEventHandler<HTMLButtonElement>;
17
17
  /**
18
18
  * Indicates that the button is selected.
19
19
  */
20
- isSelected?: boolean | undefined;
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 | undefined;
24
+ interactionName?: string;
25
25
  }) => React.JSX.Element;
@@ -33,5 +33,5 @@ export declare const AppLogo: ({ name, label, href, icon, onClick, }: {
33
33
  /**
34
34
  * Handler called on click.
35
35
  */
36
- onClick?: React.MouseEventHandler<HTMLAnchorElement> | undefined;
36
+ onClick?: React.MouseEventHandler<HTMLAnchorElement>;
37
37
  }) => JSX.Element;
@@ -33,5 +33,5 @@ export declare const CustomLogo: ({ href, logo, icon, onClick, label, }: {
33
33
  /**
34
34
  * Handler called on click.
35
35
  */
36
- onClick?: React.MouseEventHandler<HTMLAnchorElement> | undefined;
36
+ onClick?: React.MouseEventHandler<HTMLAnchorElement>;
37
37
  }) => JSX.Element;