@atlaskit/navigation-system 2.11.0 → 2.11.1

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 (44) hide show
  1. package/CHANGELOG.md +8 -0
  2. package/dist/types/components/list-item.d.ts +1 -1
  3. package/dist/types/components/list.d.ts +1 -1
  4. package/dist/types/ui/menu-item/button-menu-item.d.ts +1 -23
  5. package/dist/types/ui/menu-item/expandable-menu-item/expandable-menu-item-content.d.ts +1 -1
  6. package/dist/types/ui/menu-item/expandable-menu-item/expandable-menu-item-trigger.d.ts +1 -54
  7. package/dist/types/ui/menu-item/expandable-menu-item/expandable-menu-item.d.ts +1 -1
  8. package/dist/types/ui/menu-item/flyout-menu-item/flyout-menu-item-content.d.ts +1 -1
  9. package/dist/types/ui/menu-item/flyout-menu-item/flyout-menu-item-trigger.d.ts +1 -37
  10. package/dist/types/ui/menu-item/flyout-menu-item/flyout-menu-item.d.ts +1 -1
  11. package/dist/types/ui/page-layout/side-nav/side-nav-content.d.ts +1 -1
  12. package/dist/types/ui/top-nav-items/app-switcher.d.ts +1 -1
  13. package/dist/types/ui/top-nav-items/create-button.d.ts +1 -1
  14. package/dist/types/ui/top-nav-items/custom-title.d.ts +1 -1
  15. package/dist/types/ui/top-nav-items/end-item.d.ts +1 -1
  16. package/dist/types/ui/top-nav-items/help.d.ts +1 -1
  17. package/dist/types/ui/top-nav-items/log-in.d.ts +1 -1
  18. package/dist/types/ui/top-nav-items/notifications.d.ts +1 -1
  19. package/dist/types/ui/top-nav-items/profile.d.ts +1 -1
  20. package/dist/types/ui/top-nav-items/settings.d.ts +1 -1
  21. package/dist/types/ui/top-nav-items/themed/button.d.ts +2 -2
  22. package/dist/types/ui/top-nav-items/themed/migration.d.ts +4 -4
  23. package/dist/types-ts4.5/components/list-item.d.ts +1 -1
  24. package/dist/types-ts4.5/components/list.d.ts +1 -1
  25. package/dist/types-ts4.5/ui/menu-item/button-menu-item.d.ts +1 -23
  26. package/dist/types-ts4.5/ui/menu-item/expandable-menu-item/expandable-menu-item-content.d.ts +1 -1
  27. package/dist/types-ts4.5/ui/menu-item/expandable-menu-item/expandable-menu-item-trigger.d.ts +1 -54
  28. package/dist/types-ts4.5/ui/menu-item/expandable-menu-item/expandable-menu-item.d.ts +1 -1
  29. package/dist/types-ts4.5/ui/menu-item/flyout-menu-item/flyout-menu-item-content.d.ts +1 -1
  30. package/dist/types-ts4.5/ui/menu-item/flyout-menu-item/flyout-menu-item-trigger.d.ts +1 -37
  31. package/dist/types-ts4.5/ui/menu-item/flyout-menu-item/flyout-menu-item.d.ts +1 -1
  32. package/dist/types-ts4.5/ui/page-layout/side-nav/side-nav-content.d.ts +1 -1
  33. package/dist/types-ts4.5/ui/top-nav-items/app-switcher.d.ts +1 -1
  34. package/dist/types-ts4.5/ui/top-nav-items/create-button.d.ts +1 -1
  35. package/dist/types-ts4.5/ui/top-nav-items/custom-title.d.ts +1 -1
  36. package/dist/types-ts4.5/ui/top-nav-items/end-item.d.ts +1 -1
  37. package/dist/types-ts4.5/ui/top-nav-items/help.d.ts +1 -1
  38. package/dist/types-ts4.5/ui/top-nav-items/log-in.d.ts +1 -1
  39. package/dist/types-ts4.5/ui/top-nav-items/notifications.d.ts +1 -1
  40. package/dist/types-ts4.5/ui/top-nav-items/profile.d.ts +1 -1
  41. package/dist/types-ts4.5/ui/top-nav-items/settings.d.ts +1 -1
  42. package/dist/types-ts4.5/ui/top-nav-items/themed/button.d.ts +2 -2
  43. package/dist/types-ts4.5/ui/top-nav-items/themed/migration.d.ts +4 -4
  44. package/package.json +1 -1
package/CHANGELOG.md CHANGED
@@ -1,5 +1,13 @@
1
1
  # @atlassian/navigation-system
2
2
 
3
+ ## 2.11.1
4
+
5
+ ### Patch Changes
6
+
7
+ - [`39e543109ec09`](https://bitbucket.org/atlassian/atlassian-frontend-monorepo/commits/39e543109ec09) -
8
+ add type info to forwardRef components
9
+ - Updated dependencies
10
+
3
11
  ## 2.11.0
4
12
 
5
13
  ### Minor Changes
@@ -23,5 +23,5 @@ type ListItemProps = {
23
23
  *
24
24
  * A [list item](https://developer.mozilla.org/en-US/docs/Web/HTML/Element/li) with visual styles removed.
25
25
  */
26
- export declare const ListItem: import("react").ForwardRefExoticComponent<ListItemProps & import("react").RefAttributes<HTMLDivElement>>;
26
+ export declare const ListItem: React.ForwardRefExoticComponent<React.PropsWithoutRef<ListItemProps> & React.RefAttributes<HTMLDivElement>>;
27
27
  export {};
@@ -25,4 +25,4 @@ export type ListProps = {
25
25
  *
26
26
  * This is the internal primitive used by other external components in the navigation system.
27
27
  */
28
- export declare const List: import("react").ForwardRefExoticComponent<ListProps & import("react").RefAttributes<HTMLDivElement>>;
28
+ export declare const List: React.ForwardRefExoticComponent<React.PropsWithoutRef<ListProps> & React.RefAttributes<HTMLDivElement>>;
@@ -30,26 +30,4 @@ export type ButtonMenuItemProps = MenuItemLinkOrButtonCommonProps & {
30
30
  *
31
31
  * A menu item button. It should be used within a `ul`, as it renders a list item.
32
32
  */
33
- export declare const ButtonMenuItem: React.ForwardRefExoticComponent<import("./types").MenuItemCommonProps & import("./types").MenuItemSlots & {
34
- description?: string;
35
- listItemRef?: React.Ref<HTMLDivElement>;
36
- } & {
37
- /**
38
- * We are not using a discriminated union to enforce that the `actions` and `actionsOnHover`
39
- * props are not used when `isDisabled` is true due to ergonomic type issues with `boolean`
40
- * types (as oppposed to literal `true` or `false` types), e.g. if a conditional boolean
41
- * variable is passed to `isDisabled`.
42
- */
43
- /**
44
- * Whether the menu item is disabled.
45
- *
46
- * When disabled, content in the `actions` and `actionsOnHover` props will not be rendered.
47
- *
48
- * The menu item will not be interactive and will not respond to hover or focus.
49
- */
50
- isDisabled?: boolean;
51
- /**
52
- * Called when the user has clicked on the trigger content.
53
- */
54
- onClick?: MenuItemOnClick<HTMLButtonElement>;
55
- } & React.RefAttributes<HTMLButtonElement>>;
33
+ export declare const ButtonMenuItem: React.ForwardRefExoticComponent<React.PropsWithoutRef<ButtonMenuItemProps> & React.RefAttributes<HTMLButtonElement>>;
@@ -14,4 +14,4 @@ export type ExpandableMenuItemContentProps = {
14
14
  *
15
15
  * The expandable and collapsable section of the expandable menu item. It should contain the nested menu items.
16
16
  */
17
- export declare const ExpandableMenuItemContent: import("react").ForwardRefExoticComponent<ExpandableMenuItemContentProps & import("react").RefAttributes<HTMLDivElement>>;
17
+ export declare const ExpandableMenuItemContent: React.ForwardRefExoticComponent<React.PropsWithoutRef<ExpandableMenuItemContentProps> & React.RefAttributes<HTMLDivElement>>;
@@ -65,57 +65,4 @@ export type ExpandableMenuItemTriggerProps = MenuItemCommonProps & Omit<MenuItem
65
65
  *
66
66
  * The trigger component for an `ExpandableMenuItem`. Interacting with it will expand or collapse the expandable.
67
67
  */
68
- export declare const ExpandableMenuItemTrigger: React.ForwardRefExoticComponent<MenuItemCommonProps & Omit<MenuItemSlots, "actionsOnHover" | "elemBefore"> & {
69
- /**
70
- * `ReactNode` to be placed visually after the `children` and will
71
- * only be displayed on hover or focus, or when the expandable menu item
72
- * is expanded.
73
- *
74
- * It is intended for additional actions (e.g. IconButtons).
75
- *
76
- * This `ReactNode` will replace `elemAfter` on hover/focus or when expanded.
77
- *
78
- * This `ReactNode` will be rendered visually on top of the main
79
- * interactive element for the menu item. If this element does not
80
- * contain an interactive element (`button` or `a`) then `pointer-events`
81
- * will be set to `none` on this slot so that users can click through
82
- * this element onto the main interactive element of the menu item.
83
- */
84
- actionsOnHover?: ReactNode;
85
- /**
86
- * The element to display before the content of the menu item.
87
- *
88
- * By default, a chevron icon will be displayed in this slot. If a custom `elemBefore`
89
- * is provided, the custom element will replaced by the chevron icon while the user is
90
- * hovering or focused on the item.
91
- *
92
- * `ExpandableMenuItemTrigger` does not respect `COLLAPSE_ELEM_BEFORE` as a chevron
93
- * will always be displayed.
94
- */
95
- elemBefore?: ReactNode;
96
- /**
97
- * Indicates that the menu item is selected.
98
- */
99
- isSelected?: boolean;
100
- /**
101
- * If provided, the chevron icon (expand/collapse symbol) will be rendered within a separate
102
- * icon button element. Clicking on this icon button will not trigger the `onClick` event. It
103
- * will only expand or collapse the expandable.
104
- *
105
- * If a `href` is not provided, the chevron icon is rendered as part of the element.
106
- */
107
- href?: string;
108
- /**
109
- * Called when the user has clicked on the trigger content.
110
- *
111
- * __It is not called when the user clicks on the expand/collapse chevron icon button.__
112
- * This is to differentiate a click that will only "expand" the menu item _without selecting it_,
113
- * from a click to expand _and_ "select" or navigate to the menu item.
114
- *
115
- * If you need a callback for when the user expands or collapses the expandable, use
116
- * `onExpansionToggle` on the `ExpandableMenuItem` component instead.
117
- */
118
- onClick?: (event: React.MouseEvent<HTMLAnchorElement | HTMLButtonElement>, analyticsEvent: UIAnalyticsEvent, analyticsAttributes: {
119
- isExpanded: boolean;
120
- }) => void;
121
- } & React.RefAttributes<HTMLAnchorElement | HTMLButtonElement>>;
68
+ export declare const ExpandableMenuItemTrigger: React.ForwardRefExoticComponent<React.PropsWithoutRef<ExpandableMenuItemTriggerProps> & React.RefAttributes<HTMLButtonElement | HTMLAnchorElement>>;
@@ -62,4 +62,4 @@ export type ExpandableMenuItemProps = {
62
62
  * </ExpandableMenuItem>
63
63
  * ```
64
64
  */
65
- export declare const ExpandableMenuItem: import("react").ForwardRefExoticComponent<ExpandableMenuItemProps & import("react").RefAttributes<HTMLDivElement>>;
65
+ export declare const ExpandableMenuItem: React.ForwardRefExoticComponent<React.PropsWithoutRef<ExpandableMenuItemProps> & React.RefAttributes<HTMLDivElement>>;
@@ -29,4 +29,4 @@ export type FlyoutMenuItemContentProps = {
29
29
  *
30
30
  * The content that appears when the flyout menu is open.
31
31
  */
32
- export declare const FlyoutMenuItemContent: React.ForwardRefExoticComponent<FlyoutMenuItemContentProps & React.RefAttributes<HTMLDivElement>>;
32
+ export declare const FlyoutMenuItemContent: React.ForwardRefExoticComponent<React.PropsWithoutRef<FlyoutMenuItemContentProps> & React.RefAttributes<HTMLDivElement>>;
@@ -47,40 +47,4 @@ export type FlyoutMenuItemTriggerProps = MenuItemCommonProps & {
47
47
  *
48
48
  * The button that toggles the flyout menu.
49
49
  */
50
- export declare const FlyoutMenuItemTrigger: import("react").ForwardRefExoticComponent<MenuItemCommonProps & {
51
- /**
52
- * `ReactNode` to be placed visually before the `children`.
53
- *
54
- * This `ReactNode` will be rendered visually on top of the main
55
- * interactive element for the menu item. If this element does not
56
- * contain an interactive element (`button` or `a`) then `pointer-events`
57
- * will be set to `none` on this slot so that users can click through
58
- * this element onto the main interactive element of the menu item.
59
- *
60
- * If you want to collapse the `elemBefore` so it takes up no space,
61
- * then pass in the `COLLAPSE_ELEM_BEFORE` symbol. Keep in mind that
62
- * collapsing the `elemBefore` can break visual alignment and
63
- * will make it difficult for users to visually distinguish levels
64
- * in the side navigation.
65
- *
66
- * @example
67
- *
68
- * ```tsx
69
- * <FlyoutMenuItemTrigger elemBefore={<HomeIcon label="home" />}>Home</FlyoutMenuItemTrigger>
70
- *
71
- * // collapse the elemBefore
72
- * <FlyoutMenuItemTrigger elemBefore={COLLAPSE_ELEM_BEFORE}>Home</FlyoutMenuItemTrigger>
73
- * ```
74
- */
75
- elemBefore?: ReactNode | COLLAPSE_ELEM_BEFORE_TYPE;
76
- /**
77
- * Called when the user has clicked on the trigger.
78
- *
79
- * If you are controlling the open state of the flyout menu, use this to update your state.
80
- */
81
- onClick?: MenuItemOnClick<HTMLButtonElement>;
82
- /**
83
- * Indicates that the menu item is selected.
84
- */
85
- isSelected?: boolean;
86
- } & import("react").RefAttributes<HTMLButtonElement>>;
50
+ export declare const FlyoutMenuItemTrigger: React.ForwardRefExoticComponent<React.PropsWithoutRef<FlyoutMenuItemTriggerProps> & React.RefAttributes<HTMLButtonElement>>;
@@ -49,4 +49,4 @@ export type FlyoutMenuItemProps = {
49
49
  * </FlyoutMenuItem>
50
50
  * ```
51
51
  */
52
- export declare const FlyoutMenuItem: React.ForwardRefExoticComponent<FlyoutMenuItemProps & React.RefAttributes<HTMLDivElement>>;
52
+ export declare const FlyoutMenuItem: React.ForwardRefExoticComponent<React.PropsWithoutRef<FlyoutMenuItemProps> & React.RefAttributes<HTMLDivElement>>;
@@ -9,7 +9,7 @@ import React, { type ReactNode } from 'react';
9
9
  * It will grow to take up the available space in the side nav — this is used to push the footer to the
10
10
  * bottom of the side nav.
11
11
  */
12
- export declare const SideNavContent: React.ForwardRefExoticComponent<SideNavContentProps & React.RefAttributes<HTMLDivElement>>;
12
+ export declare const SideNavContent: React.ForwardRefExoticComponent<React.PropsWithoutRef<SideNavContentProps> & React.RefAttributes<HTMLDivElement>>;
13
13
  type SideNavContentProps = {
14
14
  /**
15
15
  * The content of the layout area.
@@ -28,5 +28,5 @@ interface AppSwitcherProps extends Partial<Omit<TriggerProps, 'ref' | 'data-ds--
28
28
  *
29
29
  * The trigger button for the app switcher. Allows users to switch between Atlassian products.
30
30
  */
31
- export declare const AppSwitcher: React.ForwardRefExoticComponent<AppSwitcherProps & React.RefAttributes<HTMLButtonElement>>;
31
+ export declare const AppSwitcher: React.ForwardRefExoticComponent<React.PropsWithoutRef<AppSwitcherProps> & React.RefAttributes<HTMLButtonElement>>;
32
32
  export {};
@@ -26,5 +26,5 @@ type CreateButtonProps = {
26
26
  *
27
27
  * The create button for the top navigation.
28
28
  */
29
- export declare const CreateButton: React.ForwardRefExoticComponent<CreateButtonProps & React.RefAttributes<HTMLButtonElement>>;
29
+ export declare const CreateButton: React.ForwardRefExoticComponent<React.PropsWithoutRef<CreateButtonProps> & React.RefAttributes<HTMLButtonElement>>;
30
30
  export {};
@@ -19,5 +19,5 @@ type CustomTitleProps = {
19
19
  * A custom site title to be displayed in the top navigation, to the right of the logo.
20
20
  * It is hidden on smaller viewports.
21
21
  */
22
- export declare const CustomTitle: import("react").ForwardRefExoticComponent<CustomTitleProps & import("react").RefAttributes<HTMLDivElement>>;
22
+ export declare const CustomTitle: React.ForwardRefExoticComponent<React.PropsWithoutRef<CustomTitleProps> & React.RefAttributes<HTMLDivElement>>;
23
23
  export {};
@@ -70,4 +70,4 @@ export interface EndItemProps extends Partial<Pick<TriggerProps, 'aria-controls'
70
70
  *
71
71
  * For common actions, like `Notifications`, `Help`, `Profile`, `Settings`, use the provided components as appropriate.
72
72
  */
73
- export declare const EndItem: React.ForwardRefExoticComponent<EndItemProps & React.RefAttributes<HTMLButtonElement>>;
73
+ export declare const EndItem: React.ForwardRefExoticComponent<React.PropsWithoutRef<EndItemProps> & React.RefAttributes<HTMLButtonElement>>;
@@ -15,5 +15,5 @@ interface HelpProps extends Omit<EndItemProps, 'icon' | 'aria-controls' | 'aria-
15
15
  *
16
16
  * The trigger button for the help menu in the top navigation bar.
17
17
  */
18
- export declare const Help: React.ForwardRefExoticComponent<HelpProps & React.RefAttributes<HTMLButtonElement>>;
18
+ export declare const Help: React.ForwardRefExoticComponent<React.PropsWithoutRef<HelpProps> & React.RefAttributes<HTMLButtonElement>>;
19
19
  export {};
@@ -32,5 +32,5 @@ interface LogInProps extends Pick<AnchorProps, 'href'> {
32
32
  *
33
33
  * The Log in button for the top navigation.
34
34
  */
35
- export declare const LogIn: React.ForwardRefExoticComponent<LogInProps & React.RefAttributes<HTMLAnchorElement>>;
35
+ export declare const LogIn: React.ForwardRefExoticComponent<React.PropsWithoutRef<LogInProps> & React.RefAttributes<HTMLAnchorElement>>;
36
36
  export {};
@@ -12,5 +12,5 @@ interface NotificationsProps extends Omit<EndItemProps, 'icon'> {
12
12
  *
13
13
  * The trigger button for the notifications menu in the top navigation bar.
14
14
  */
15
- export declare const Notifications: React.ForwardRefExoticComponent<NotificationsProps & React.RefAttributes<HTMLButtonElement>>;
15
+ export declare const Notifications: React.ForwardRefExoticComponent<React.PropsWithoutRef<NotificationsProps> & React.RefAttributes<HTMLButtonElement>>;
16
16
  export {};
@@ -11,5 +11,5 @@ interface ProfileProps extends Omit<EndItemProps, 'icon'> {
11
11
  *
12
12
  * The Profile button for the top navigation.
13
13
  */
14
- export declare const Profile: React.ForwardRefExoticComponent<ProfileProps & React.RefAttributes<HTMLButtonElement>>;
14
+ export declare const Profile: React.ForwardRefExoticComponent<React.PropsWithoutRef<ProfileProps> & React.RefAttributes<HTMLButtonElement>>;
15
15
  export {};
@@ -7,5 +7,5 @@ interface SettingsProps extends Omit<EndItemProps, 'icon'> {
7
7
  *
8
8
  * The Settings button for the top navigation.
9
9
  */
10
- export declare const Settings: React.ForwardRefExoticComponent<SettingsProps & React.RefAttributes<HTMLButtonElement>>;
10
+ export declare const Settings: React.ForwardRefExoticComponent<React.PropsWithoutRef<SettingsProps> & React.RefAttributes<HTMLButtonElement>>;
11
11
  export {};
@@ -80,7 +80,7 @@ export interface ThemedButtonProps extends ActionVariantCommonProps, TextButtonC
80
80
  *
81
81
  * A themed button for the top bar.
82
82
  */
83
- export declare const ThemedButton: React.ForwardRefExoticComponent<Omit<ThemedButtonProps, "ref"> & React.RefAttributes<HTMLButtonElement>>;
83
+ export declare const ThemedButton: React.ForwardRefExoticComponent<React.PropsWithoutRef<ThemedButtonProps> & React.RefAttributes<HTMLButtonElement>>;
84
84
  export interface ThemedLinkButtonProps<RouterLinkConfig extends Record<string, any> = never> extends LinkVariantCommonProps<RouterLinkConfig>, TextButtonCommonProps {
85
85
  }
86
86
  /**
@@ -115,7 +115,7 @@ export interface ThemedIconButtonProps extends ActionVariantCommonProps, IconBut
115
115
  *
116
116
  * A themed icon button for the top bar.
117
117
  */
118
- export declare const ThemedIconButton: React.ForwardRefExoticComponent<Omit<ThemedIconButtonProps, "ref"> & React.RefAttributes<HTMLButtonElement>>;
118
+ export declare const ThemedIconButton: React.ForwardRefExoticComponent<React.PropsWithoutRef<ThemedIconButtonProps> & React.RefAttributes<HTMLButtonElement>>;
119
119
  export interface ThemedLinkIconButtonProps<RouterLinkConfig extends Record<string, any> = never> extends LinkVariantCommonProps<RouterLinkConfig>, IconButtonCommonProps {
120
120
  href: string | RouterLinkConfig;
121
121
  }
@@ -3,8 +3,8 @@ import { type ThemedButtonProps, type ThemedIconButtonProps, type ThemedLinkButt
3
3
  type IconButtonMigrationProps = {
4
4
  isTooltipDisabled?: boolean;
5
5
  };
6
- declare const IconButton: React.ForwardRefExoticComponent<Omit<ThemedIconButtonProps & IconButtonMigrationProps, "ref"> & React.RefAttributes<HTMLButtonElement>>;
7
- declare const LinkIconButton: React.ForwardRefExoticComponent<Omit<ThemedLinkIconButtonProps<never> & IconButtonMigrationProps, "ref"> & React.RefAttributes<HTMLAnchorElement>>;
8
- declare const Button: React.ForwardRefExoticComponent<Omit<ThemedButtonProps & IconButtonMigrationProps, "ref"> & React.RefAttributes<HTMLButtonElement>>;
9
- declare const LinkButton: React.ForwardRefExoticComponent<Omit<ThemedLinkButtonProps<never>, "ref"> & React.RefAttributes<HTMLAnchorElement>>;
6
+ declare const IconButton: React.ForwardRefExoticComponent<React.PropsWithoutRef<ThemedIconButtonProps & IconButtonMigrationProps> & React.RefAttributes<HTMLButtonElement>>;
7
+ declare const LinkIconButton: React.ForwardRefExoticComponent<React.PropsWithoutRef<ThemedLinkIconButtonProps & IconButtonMigrationProps> & React.RefAttributes<HTMLAnchorElement>>;
8
+ declare const Button: React.ForwardRefExoticComponent<React.PropsWithoutRef<ThemedButtonProps & IconButtonMigrationProps> & React.RefAttributes<HTMLButtonElement>>;
9
+ declare const LinkButton: React.ForwardRefExoticComponent<React.PropsWithoutRef<ThemedLinkButtonProps> & React.RefAttributes<HTMLAnchorElement>>;
10
10
  export { IconButton, Button, LinkIconButton, LinkButton };
@@ -23,5 +23,5 @@ type ListItemProps = {
23
23
  *
24
24
  * A [list item](https://developer.mozilla.org/en-US/docs/Web/HTML/Element/li) with visual styles removed.
25
25
  */
26
- export declare const ListItem: import("react").ForwardRefExoticComponent<ListItemProps & import("react").RefAttributes<HTMLDivElement>>;
26
+ export declare const ListItem: React.ForwardRefExoticComponent<React.PropsWithoutRef<ListItemProps> & React.RefAttributes<HTMLDivElement>>;
27
27
  export {};
@@ -25,4 +25,4 @@ export type ListProps = {
25
25
  *
26
26
  * This is the internal primitive used by other external components in the navigation system.
27
27
  */
28
- export declare const List: import("react").ForwardRefExoticComponent<ListProps & import("react").RefAttributes<HTMLDivElement>>;
28
+ export declare const List: React.ForwardRefExoticComponent<React.PropsWithoutRef<ListProps> & React.RefAttributes<HTMLDivElement>>;
@@ -30,26 +30,4 @@ export type ButtonMenuItemProps = MenuItemLinkOrButtonCommonProps & {
30
30
  *
31
31
  * A menu item button. It should be used within a `ul`, as it renders a list item.
32
32
  */
33
- export declare const ButtonMenuItem: React.ForwardRefExoticComponent<import("./types").MenuItemCommonProps & import("./types").MenuItemSlots & {
34
- description?: string;
35
- listItemRef?: React.Ref<HTMLDivElement>;
36
- } & {
37
- /**
38
- * We are not using a discriminated union to enforce that the `actions` and `actionsOnHover`
39
- * props are not used when `isDisabled` is true due to ergonomic type issues with `boolean`
40
- * types (as oppposed to literal `true` or `false` types), e.g. if a conditional boolean
41
- * variable is passed to `isDisabled`.
42
- */
43
- /**
44
- * Whether the menu item is disabled.
45
- *
46
- * When disabled, content in the `actions` and `actionsOnHover` props will not be rendered.
47
- *
48
- * The menu item will not be interactive and will not respond to hover or focus.
49
- */
50
- isDisabled?: boolean;
51
- /**
52
- * Called when the user has clicked on the trigger content.
53
- */
54
- onClick?: MenuItemOnClick<HTMLButtonElement>;
55
- } & React.RefAttributes<HTMLButtonElement>>;
33
+ export declare const ButtonMenuItem: React.ForwardRefExoticComponent<React.PropsWithoutRef<ButtonMenuItemProps> & React.RefAttributes<HTMLButtonElement>>;
@@ -14,4 +14,4 @@ export type ExpandableMenuItemContentProps = {
14
14
  *
15
15
  * The expandable and collapsable section of the expandable menu item. It should contain the nested menu items.
16
16
  */
17
- export declare const ExpandableMenuItemContent: import("react").ForwardRefExoticComponent<ExpandableMenuItemContentProps & import("react").RefAttributes<HTMLDivElement>>;
17
+ export declare const ExpandableMenuItemContent: React.ForwardRefExoticComponent<React.PropsWithoutRef<ExpandableMenuItemContentProps> & React.RefAttributes<HTMLDivElement>>;
@@ -65,57 +65,4 @@ export type ExpandableMenuItemTriggerProps = MenuItemCommonProps & Omit<MenuItem
65
65
  *
66
66
  * The trigger component for an `ExpandableMenuItem`. Interacting with it will expand or collapse the expandable.
67
67
  */
68
- export declare const ExpandableMenuItemTrigger: React.ForwardRefExoticComponent<MenuItemCommonProps & Omit<MenuItemSlots, "actionsOnHover" | "elemBefore"> & {
69
- /**
70
- * `ReactNode` to be placed visually after the `children` and will
71
- * only be displayed on hover or focus, or when the expandable menu item
72
- * is expanded.
73
- *
74
- * It is intended for additional actions (e.g. IconButtons).
75
- *
76
- * This `ReactNode` will replace `elemAfter` on hover/focus or when expanded.
77
- *
78
- * This `ReactNode` will be rendered visually on top of the main
79
- * interactive element for the menu item. If this element does not
80
- * contain an interactive element (`button` or `a`) then `pointer-events`
81
- * will be set to `none` on this slot so that users can click through
82
- * this element onto the main interactive element of the menu item.
83
- */
84
- actionsOnHover?: ReactNode;
85
- /**
86
- * The element to display before the content of the menu item.
87
- *
88
- * By default, a chevron icon will be displayed in this slot. If a custom `elemBefore`
89
- * is provided, the custom element will replaced by the chevron icon while the user is
90
- * hovering or focused on the item.
91
- *
92
- * `ExpandableMenuItemTrigger` does not respect `COLLAPSE_ELEM_BEFORE` as a chevron
93
- * will always be displayed.
94
- */
95
- elemBefore?: ReactNode;
96
- /**
97
- * Indicates that the menu item is selected.
98
- */
99
- isSelected?: boolean;
100
- /**
101
- * If provided, the chevron icon (expand/collapse symbol) will be rendered within a separate
102
- * icon button element. Clicking on this icon button will not trigger the `onClick` event. It
103
- * will only expand or collapse the expandable.
104
- *
105
- * If a `href` is not provided, the chevron icon is rendered as part of the element.
106
- */
107
- href?: string;
108
- /**
109
- * Called when the user has clicked on the trigger content.
110
- *
111
- * __It is not called when the user clicks on the expand/collapse chevron icon button.__
112
- * This is to differentiate a click that will only "expand" the menu item _without selecting it_,
113
- * from a click to expand _and_ "select" or navigate to the menu item.
114
- *
115
- * If you need a callback for when the user expands or collapses the expandable, use
116
- * `onExpansionToggle` on the `ExpandableMenuItem` component instead.
117
- */
118
- onClick?: (event: React.MouseEvent<HTMLAnchorElement | HTMLButtonElement>, analyticsEvent: UIAnalyticsEvent, analyticsAttributes: {
119
- isExpanded: boolean;
120
- }) => void;
121
- } & React.RefAttributes<HTMLAnchorElement | HTMLButtonElement>>;
68
+ export declare const ExpandableMenuItemTrigger: React.ForwardRefExoticComponent<React.PropsWithoutRef<ExpandableMenuItemTriggerProps> & React.RefAttributes<HTMLButtonElement | HTMLAnchorElement>>;
@@ -62,4 +62,4 @@ export type ExpandableMenuItemProps = {
62
62
  * </ExpandableMenuItem>
63
63
  * ```
64
64
  */
65
- export declare const ExpandableMenuItem: import("react").ForwardRefExoticComponent<ExpandableMenuItemProps & import("react").RefAttributes<HTMLDivElement>>;
65
+ export declare const ExpandableMenuItem: React.ForwardRefExoticComponent<React.PropsWithoutRef<ExpandableMenuItemProps> & React.RefAttributes<HTMLDivElement>>;
@@ -29,4 +29,4 @@ export type FlyoutMenuItemContentProps = {
29
29
  *
30
30
  * The content that appears when the flyout menu is open.
31
31
  */
32
- export declare const FlyoutMenuItemContent: React.ForwardRefExoticComponent<FlyoutMenuItemContentProps & React.RefAttributes<HTMLDivElement>>;
32
+ export declare const FlyoutMenuItemContent: React.ForwardRefExoticComponent<React.PropsWithoutRef<FlyoutMenuItemContentProps> & React.RefAttributes<HTMLDivElement>>;
@@ -47,40 +47,4 @@ export type FlyoutMenuItemTriggerProps = MenuItemCommonProps & {
47
47
  *
48
48
  * The button that toggles the flyout menu.
49
49
  */
50
- export declare const FlyoutMenuItemTrigger: import("react").ForwardRefExoticComponent<MenuItemCommonProps & {
51
- /**
52
- * `ReactNode` to be placed visually before the `children`.
53
- *
54
- * This `ReactNode` will be rendered visually on top of the main
55
- * interactive element for the menu item. If this element does not
56
- * contain an interactive element (`button` or `a`) then `pointer-events`
57
- * will be set to `none` on this slot so that users can click through
58
- * this element onto the main interactive element of the menu item.
59
- *
60
- * If you want to collapse the `elemBefore` so it takes up no space,
61
- * then pass in the `COLLAPSE_ELEM_BEFORE` symbol. Keep in mind that
62
- * collapsing the `elemBefore` can break visual alignment and
63
- * will make it difficult for users to visually distinguish levels
64
- * in the side navigation.
65
- *
66
- * @example
67
- *
68
- * ```tsx
69
- * <FlyoutMenuItemTrigger elemBefore={<HomeIcon label="home" />}>Home</FlyoutMenuItemTrigger>
70
- *
71
- * // collapse the elemBefore
72
- * <FlyoutMenuItemTrigger elemBefore={COLLAPSE_ELEM_BEFORE}>Home</FlyoutMenuItemTrigger>
73
- * ```
74
- */
75
- elemBefore?: ReactNode | COLLAPSE_ELEM_BEFORE_TYPE;
76
- /**
77
- * Called when the user has clicked on the trigger.
78
- *
79
- * If you are controlling the open state of the flyout menu, use this to update your state.
80
- */
81
- onClick?: MenuItemOnClick<HTMLButtonElement>;
82
- /**
83
- * Indicates that the menu item is selected.
84
- */
85
- isSelected?: boolean;
86
- } & import("react").RefAttributes<HTMLButtonElement>>;
50
+ export declare const FlyoutMenuItemTrigger: React.ForwardRefExoticComponent<React.PropsWithoutRef<FlyoutMenuItemTriggerProps> & React.RefAttributes<HTMLButtonElement>>;
@@ -49,4 +49,4 @@ export type FlyoutMenuItemProps = {
49
49
  * </FlyoutMenuItem>
50
50
  * ```
51
51
  */
52
- export declare const FlyoutMenuItem: React.ForwardRefExoticComponent<FlyoutMenuItemProps & React.RefAttributes<HTMLDivElement>>;
52
+ export declare const FlyoutMenuItem: React.ForwardRefExoticComponent<React.PropsWithoutRef<FlyoutMenuItemProps> & React.RefAttributes<HTMLDivElement>>;
@@ -9,7 +9,7 @@ import React, { type ReactNode } from 'react';
9
9
  * It will grow to take up the available space in the side nav — this is used to push the footer to the
10
10
  * bottom of the side nav.
11
11
  */
12
- export declare const SideNavContent: React.ForwardRefExoticComponent<SideNavContentProps & React.RefAttributes<HTMLDivElement>>;
12
+ export declare const SideNavContent: React.ForwardRefExoticComponent<React.PropsWithoutRef<SideNavContentProps> & React.RefAttributes<HTMLDivElement>>;
13
13
  type SideNavContentProps = {
14
14
  /**
15
15
  * The content of the layout area.
@@ -28,5 +28,5 @@ interface AppSwitcherProps extends Partial<Omit<TriggerProps, 'ref' | 'data-ds--
28
28
  *
29
29
  * The trigger button for the app switcher. Allows users to switch between Atlassian products.
30
30
  */
31
- export declare const AppSwitcher: React.ForwardRefExoticComponent<AppSwitcherProps & React.RefAttributes<HTMLButtonElement>>;
31
+ export declare const AppSwitcher: React.ForwardRefExoticComponent<React.PropsWithoutRef<AppSwitcherProps> & React.RefAttributes<HTMLButtonElement>>;
32
32
  export {};
@@ -26,5 +26,5 @@ type CreateButtonProps = {
26
26
  *
27
27
  * The create button for the top navigation.
28
28
  */
29
- export declare const CreateButton: React.ForwardRefExoticComponent<CreateButtonProps & React.RefAttributes<HTMLButtonElement>>;
29
+ export declare const CreateButton: React.ForwardRefExoticComponent<React.PropsWithoutRef<CreateButtonProps> & React.RefAttributes<HTMLButtonElement>>;
30
30
  export {};
@@ -19,5 +19,5 @@ type CustomTitleProps = {
19
19
  * A custom site title to be displayed in the top navigation, to the right of the logo.
20
20
  * It is hidden on smaller viewports.
21
21
  */
22
- export declare const CustomTitle: import("react").ForwardRefExoticComponent<CustomTitleProps & import("react").RefAttributes<HTMLDivElement>>;
22
+ export declare const CustomTitle: React.ForwardRefExoticComponent<React.PropsWithoutRef<CustomTitleProps> & React.RefAttributes<HTMLDivElement>>;
23
23
  export {};
@@ -70,4 +70,4 @@ export interface EndItemProps extends Partial<Pick<TriggerProps, 'aria-controls'
70
70
  *
71
71
  * For common actions, like `Notifications`, `Help`, `Profile`, `Settings`, use the provided components as appropriate.
72
72
  */
73
- export declare const EndItem: React.ForwardRefExoticComponent<EndItemProps & React.RefAttributes<HTMLButtonElement>>;
73
+ export declare const EndItem: React.ForwardRefExoticComponent<React.PropsWithoutRef<EndItemProps> & React.RefAttributes<HTMLButtonElement>>;
@@ -15,5 +15,5 @@ interface HelpProps extends Omit<EndItemProps, 'icon' | 'aria-controls' | 'aria-
15
15
  *
16
16
  * The trigger button for the help menu in the top navigation bar.
17
17
  */
18
- export declare const Help: React.ForwardRefExoticComponent<HelpProps & React.RefAttributes<HTMLButtonElement>>;
18
+ export declare const Help: React.ForwardRefExoticComponent<React.PropsWithoutRef<HelpProps> & React.RefAttributes<HTMLButtonElement>>;
19
19
  export {};
@@ -32,5 +32,5 @@ interface LogInProps extends Pick<AnchorProps, 'href'> {
32
32
  *
33
33
  * The Log in button for the top navigation.
34
34
  */
35
- export declare const LogIn: React.ForwardRefExoticComponent<LogInProps & React.RefAttributes<HTMLAnchorElement>>;
35
+ export declare const LogIn: React.ForwardRefExoticComponent<React.PropsWithoutRef<LogInProps> & React.RefAttributes<HTMLAnchorElement>>;
36
36
  export {};
@@ -12,5 +12,5 @@ interface NotificationsProps extends Omit<EndItemProps, 'icon'> {
12
12
  *
13
13
  * The trigger button for the notifications menu in the top navigation bar.
14
14
  */
15
- export declare const Notifications: React.ForwardRefExoticComponent<NotificationsProps & React.RefAttributes<HTMLButtonElement>>;
15
+ export declare const Notifications: React.ForwardRefExoticComponent<React.PropsWithoutRef<NotificationsProps> & React.RefAttributes<HTMLButtonElement>>;
16
16
  export {};
@@ -11,5 +11,5 @@ interface ProfileProps extends Omit<EndItemProps, 'icon'> {
11
11
  *
12
12
  * The Profile button for the top navigation.
13
13
  */
14
- export declare const Profile: React.ForwardRefExoticComponent<ProfileProps & React.RefAttributes<HTMLButtonElement>>;
14
+ export declare const Profile: React.ForwardRefExoticComponent<React.PropsWithoutRef<ProfileProps> & React.RefAttributes<HTMLButtonElement>>;
15
15
  export {};
@@ -7,5 +7,5 @@ interface SettingsProps extends Omit<EndItemProps, 'icon'> {
7
7
  *
8
8
  * The Settings button for the top navigation.
9
9
  */
10
- export declare const Settings: React.ForwardRefExoticComponent<SettingsProps & React.RefAttributes<HTMLButtonElement>>;
10
+ export declare const Settings: React.ForwardRefExoticComponent<React.PropsWithoutRef<SettingsProps> & React.RefAttributes<HTMLButtonElement>>;
11
11
  export {};
@@ -80,7 +80,7 @@ export interface ThemedButtonProps extends ActionVariantCommonProps, TextButtonC
80
80
  *
81
81
  * A themed button for the top bar.
82
82
  */
83
- export declare const ThemedButton: React.ForwardRefExoticComponent<Omit<ThemedButtonProps, "ref"> & React.RefAttributes<HTMLButtonElement>>;
83
+ export declare const ThemedButton: React.ForwardRefExoticComponent<React.PropsWithoutRef<ThemedButtonProps> & React.RefAttributes<HTMLButtonElement>>;
84
84
  export interface ThemedLinkButtonProps<RouterLinkConfig extends Record<string, any> = never> extends LinkVariantCommonProps<RouterLinkConfig>, TextButtonCommonProps {
85
85
  }
86
86
  /**
@@ -115,7 +115,7 @@ export interface ThemedIconButtonProps extends ActionVariantCommonProps, IconBut
115
115
  *
116
116
  * A themed icon button for the top bar.
117
117
  */
118
- export declare const ThemedIconButton: React.ForwardRefExoticComponent<Omit<ThemedIconButtonProps, "ref"> & React.RefAttributes<HTMLButtonElement>>;
118
+ export declare const ThemedIconButton: React.ForwardRefExoticComponent<React.PropsWithoutRef<ThemedIconButtonProps> & React.RefAttributes<HTMLButtonElement>>;
119
119
  export interface ThemedLinkIconButtonProps<RouterLinkConfig extends Record<string, any> = never> extends LinkVariantCommonProps<RouterLinkConfig>, IconButtonCommonProps {
120
120
  href: string | RouterLinkConfig;
121
121
  }
@@ -3,8 +3,8 @@ import { type ThemedButtonProps, type ThemedIconButtonProps, type ThemedLinkButt
3
3
  type IconButtonMigrationProps = {
4
4
  isTooltipDisabled?: boolean;
5
5
  };
6
- declare const IconButton: React.ForwardRefExoticComponent<Omit<ThemedIconButtonProps & IconButtonMigrationProps, "ref"> & React.RefAttributes<HTMLButtonElement>>;
7
- declare const LinkIconButton: React.ForwardRefExoticComponent<Omit<ThemedLinkIconButtonProps<never> & IconButtonMigrationProps, "ref"> & React.RefAttributes<HTMLAnchorElement>>;
8
- declare const Button: React.ForwardRefExoticComponent<Omit<ThemedButtonProps & IconButtonMigrationProps, "ref"> & React.RefAttributes<HTMLButtonElement>>;
9
- declare const LinkButton: React.ForwardRefExoticComponent<Omit<ThemedLinkButtonProps<never>, "ref"> & React.RefAttributes<HTMLAnchorElement>>;
6
+ declare const IconButton: React.ForwardRefExoticComponent<React.PropsWithoutRef<ThemedIconButtonProps & IconButtonMigrationProps> & React.RefAttributes<HTMLButtonElement>>;
7
+ declare const LinkIconButton: React.ForwardRefExoticComponent<React.PropsWithoutRef<ThemedLinkIconButtonProps & IconButtonMigrationProps> & React.RefAttributes<HTMLAnchorElement>>;
8
+ declare const Button: React.ForwardRefExoticComponent<React.PropsWithoutRef<ThemedButtonProps & IconButtonMigrationProps> & React.RefAttributes<HTMLButtonElement>>;
9
+ declare const LinkButton: React.ForwardRefExoticComponent<React.PropsWithoutRef<ThemedLinkButtonProps> & React.RefAttributes<HTMLAnchorElement>>;
10
10
  export { IconButton, Button, LinkIconButton, LinkButton };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@atlaskit/navigation-system",
3
- "version": "2.11.0",
3
+ "version": "2.11.1",
4
4
  "description": "The latest navigation system for Atlassian apps.",
5
5
  "repository": "https://bitbucket.org/atlassian/atlassian-frontend-mirror",
6
6
  "author": "Atlassian Pty Ltd",