@atlaskit/dropdown-menu 12.13.2 → 12.13.3

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/CHANGELOG.md CHANGED
@@ -1,5 +1,14 @@
1
1
  # @atlaskit/dropdown-menu
2
2
 
3
+ ## 12.13.3
4
+
5
+ ### Patch Changes
6
+
7
+ - [#114987](https://stash.atlassian.com/projects/CONFCLOUD/repos/confluence-frontend/pull-requests/114987)
8
+ [`8e9045b0b4ce2`](https://stash.atlassian.com/projects/CONFCLOUD/repos/confluence-frontend/commits/8e9045b0b4ce2) -
9
+ Update DropdownMenu's default generic type for `triggerRef` from `HTMLElement` to `any`.
10
+ - Updated dependencies
11
+
3
12
  ## 12.13.2
4
13
 
5
14
  ### Patch Changes
@@ -9,5 +9,5 @@ import type { DropdownMenuProps } from './types';
9
9
  * - [Code](https://atlassian.design/components/dropdown-menu/code)
10
10
  * - [Usage](https://atlassian.design/components/dropdown-menu/usage)
11
11
  */
12
- declare const DropdownMenu: <T extends HTMLElement = HTMLElement>({ autoFocus, children, defaultOpen, isLoading, isOpen, onOpenChange, placement, shouldFitContainer, shouldFlip, shouldRenderToParent, spacing, statusLabel, testId, trigger, zIndex, label, }: DropdownMenuProps<T>) => JSX.Element;
12
+ declare const DropdownMenu: <T extends HTMLElement = any>({ autoFocus, children, defaultOpen, isLoading, isOpen, onOpenChange, placement, shouldFitContainer, shouldFlip, shouldRenderToParent, spacing, statusLabel, testId, trigger, zIndex, label, }: DropdownMenuProps<T>) => JSX.Element;
13
13
  export default DropdownMenu;
@@ -15,7 +15,7 @@ export type FocusItem = {
15
15
  itemNode: HTMLElement;
16
16
  };
17
17
  export type Behaviors = 'checkbox' | 'radio' | 'menuitemcheckbox' | 'menuitemradio';
18
- export interface CustomTriggerProps<TriggerElement extends HTMLElement = HTMLElement> extends Omit<TriggerProps, 'ref'> {
18
+ export interface CustomTriggerProps<TriggerElement extends HTMLElement = any> extends Omit<TriggerProps, 'ref'> {
19
19
  /**
20
20
  * Ref that should be applied to the trigger. This is used to calculate the menu position.
21
21
  */
@@ -55,7 +55,7 @@ export interface MenuWrapperProps extends MenuGroupProps {
55
55
  }
56
56
  export interface DropdownMenuGroupProps extends SectionProps {
57
57
  }
58
- interface InternalDropdownMenuProps<TriggerElement extends HTMLElement = HTMLElement> {
58
+ interface InternalDropdownMenuProps<TriggerElement extends HTMLElement = any> {
59
59
  /**
60
60
  * Controls the appearance of the menu.
61
61
  * The default menu will scroll after its height exceeds the pre-defined amount.
@@ -151,14 +151,14 @@ interface InternalDropdownMenuProps<TriggerElement extends HTMLElement = HTMLEle
151
151
  */
152
152
  label?: string;
153
153
  }
154
- type StandardDropdownMenuProps<TriggerElement extends HTMLElement = HTMLElement> = InternalDropdownMenuProps<TriggerElement> & {
154
+ type StandardDropdownMenuProps<TriggerElement extends HTMLElement = any> = InternalDropdownMenuProps<TriggerElement> & {
155
155
  shouldFitContainer?: false;
156
156
  };
157
- type ShouldFitContainerDropdownMenuProps<TriggerElement extends HTMLElement = HTMLElement> = InternalDropdownMenuProps<TriggerElement> & {
157
+ type ShouldFitContainerDropdownMenuProps<TriggerElement extends HTMLElement = any> = InternalDropdownMenuProps<TriggerElement> & {
158
158
  shouldFitContainer: true;
159
159
  shouldRenderToParent?: true;
160
160
  };
161
- export type DropdownMenuProps<TriggerElement extends HTMLElement = HTMLElement> = StandardDropdownMenuProps<TriggerElement> | ShouldFitContainerDropdownMenuProps<TriggerElement>;
161
+ export type DropdownMenuProps<TriggerElement extends HTMLElement = any> = StandardDropdownMenuProps<TriggerElement> | ShouldFitContainerDropdownMenuProps<TriggerElement>;
162
162
  export interface DropdownItemProps {
163
163
  /**
164
164
  * Primary content for the item.
@@ -9,5 +9,5 @@ import type { DropdownMenuProps } from './types';
9
9
  * - [Code](https://atlassian.design/components/dropdown-menu/code)
10
10
  * - [Usage](https://atlassian.design/components/dropdown-menu/usage)
11
11
  */
12
- declare const DropdownMenu: <T extends HTMLElement = HTMLElement>({ autoFocus, children, defaultOpen, isLoading, isOpen, onOpenChange, placement, shouldFitContainer, shouldFlip, shouldRenderToParent, spacing, statusLabel, testId, trigger, zIndex, label, }: DropdownMenuProps<T>) => JSX.Element;
12
+ declare const DropdownMenu: <T extends HTMLElement = any>({ autoFocus, children, defaultOpen, isLoading, isOpen, onOpenChange, placement, shouldFitContainer, shouldFlip, shouldRenderToParent, spacing, statusLabel, testId, trigger, zIndex, label, }: DropdownMenuProps<T>) => JSX.Element;
13
13
  export default DropdownMenu;
@@ -15,7 +15,7 @@ export type FocusItem = {
15
15
  itemNode: HTMLElement;
16
16
  };
17
17
  export type Behaviors = 'checkbox' | 'radio' | 'menuitemcheckbox' | 'menuitemradio';
18
- export interface CustomTriggerProps<TriggerElement extends HTMLElement = HTMLElement> extends Omit<TriggerProps, 'ref'> {
18
+ export interface CustomTriggerProps<TriggerElement extends HTMLElement = any> extends Omit<TriggerProps, 'ref'> {
19
19
  /**
20
20
  * Ref that should be applied to the trigger. This is used to calculate the menu position.
21
21
  */
@@ -55,7 +55,7 @@ export interface MenuWrapperProps extends MenuGroupProps {
55
55
  }
56
56
  export interface DropdownMenuGroupProps extends SectionProps {
57
57
  }
58
- interface InternalDropdownMenuProps<TriggerElement extends HTMLElement = HTMLElement> {
58
+ interface InternalDropdownMenuProps<TriggerElement extends HTMLElement = any> {
59
59
  /**
60
60
  * Controls the appearance of the menu.
61
61
  * The default menu will scroll after its height exceeds the pre-defined amount.
@@ -151,14 +151,14 @@ interface InternalDropdownMenuProps<TriggerElement extends HTMLElement = HTMLEle
151
151
  */
152
152
  label?: string;
153
153
  }
154
- type StandardDropdownMenuProps<TriggerElement extends HTMLElement = HTMLElement> = InternalDropdownMenuProps<TriggerElement> & {
154
+ type StandardDropdownMenuProps<TriggerElement extends HTMLElement = any> = InternalDropdownMenuProps<TriggerElement> & {
155
155
  shouldFitContainer?: false;
156
156
  };
157
- type ShouldFitContainerDropdownMenuProps<TriggerElement extends HTMLElement = HTMLElement> = InternalDropdownMenuProps<TriggerElement> & {
157
+ type ShouldFitContainerDropdownMenuProps<TriggerElement extends HTMLElement = any> = InternalDropdownMenuProps<TriggerElement> & {
158
158
  shouldFitContainer: true;
159
159
  shouldRenderToParent?: true;
160
160
  };
161
- export type DropdownMenuProps<TriggerElement extends HTMLElement = HTMLElement> = StandardDropdownMenuProps<TriggerElement> | ShouldFitContainerDropdownMenuProps<TriggerElement>;
161
+ export type DropdownMenuProps<TriggerElement extends HTMLElement = any> = StandardDropdownMenuProps<TriggerElement> | ShouldFitContainerDropdownMenuProps<TriggerElement>;
162
162
  export interface DropdownItemProps {
163
163
  /**
164
164
  * Primary content for the item.
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@atlaskit/dropdown-menu",
3
- "version": "12.13.2",
3
+ "version": "12.13.3",
4
4
  "description": "A dropdown menu displays a list of actions or options to a user.",
5
5
  "publishConfig": {
6
6
  "registry": "https://registry.npmjs.org/"
@@ -30,14 +30,14 @@
30
30
  "@atlaskit/button": "^18.0.0",
31
31
  "@atlaskit/codemod-utils": "^4.2.0",
32
32
  "@atlaskit/ds-lib": "^2.3.0",
33
- "@atlaskit/icon": "^22.4.0",
33
+ "@atlaskit/icon": "^22.5.0",
34
34
  "@atlaskit/layering": "^0.3.0",
35
35
  "@atlaskit/menu": "^2.5.0",
36
36
  "@atlaskit/popup": "^1.19.0",
37
- "@atlaskit/primitives": "^8.0.0",
37
+ "@atlaskit/primitives": "^9.0.0",
38
38
  "@atlaskit/spinner": "^16.2.0",
39
39
  "@atlaskit/theme": "^12.11.0",
40
- "@atlaskit/tokens": "^1.52.0",
40
+ "@atlaskit/tokens": "^1.53.0",
41
41
  "@babel/runtime": "^7.0.0",
42
42
  "@emotion/react": "^11.7.1",
43
43
  "bind-event-listener": "^3.0.0",