@atlaskit/dropdown-menu 11.9.4 → 11.9.5

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,12 @@
1
1
  # @atlaskit/dropdown-menu
2
2
 
3
+ ## 11.9.5
4
+
5
+ ### Patch Changes
6
+
7
+ - [`6a13926a3d4`](https://bitbucket.org/atlassian/atlassian-frontend/commits/6a13926a3d4) - Internal code changes.
8
+ - Updated dependencies
9
+
3
10
  ## 11.9.4
4
11
 
5
12
  ### Patch Changes
@@ -18,6 +18,7 @@ var _noop = _interopRequireDefault(require("@atlaskit/ds-lib/noop"));
18
18
  var _useControlled = _interopRequireDefault(require("@atlaskit/ds-lib/use-controlled"));
19
19
  var _useFocusEvent = _interopRequireDefault(require("@atlaskit/ds-lib/use-focus-event"));
20
20
  var _chevronDown = _interopRequireDefault(require("@atlaskit/icon/glyph/chevron-down"));
21
+ var _platformFeatureFlags = require("@atlaskit/platform-feature-flags");
21
22
  var _popup = _interopRequireDefault(require("@atlaskit/popup"));
22
23
  var _constants = require("@atlaskit/theme/constants");
23
24
  var _focusManager = _interopRequireDefault(require("./internal/components/focus-manager"));
@@ -173,6 +174,7 @@ var DropdownMenu = function DropdownMenu(props) {
173
174
  fallbackPlacements: fallbackPlacements,
174
175
  testId: testId && "".concat(testId, "--content"),
175
176
  shouldUseCaptureOnOutsideClick: true,
177
+ shouldRenderToParent: (0, _platformFeatureFlags.getBooleanFF)('platform.design-system-team.render-popup-in-parent_f73ij') ? true : undefined,
176
178
  trigger: function trigger(triggerProps) {
177
179
  if (typeof _trigger === 'function') {
178
180
  var ref = triggerProps.ref,
@@ -1,5 +1,5 @@
1
1
  {
2
2
  "name": "@atlaskit/dropdown-menu",
3
- "version": "11.9.4",
3
+ "version": "11.9.5",
4
4
  "sideEffects": false
5
5
  }
@@ -7,6 +7,7 @@ import noop from '@atlaskit/ds-lib/noop';
7
7
  import useControlledState from '@atlaskit/ds-lib/use-controlled';
8
8
  import useFocus from '@atlaskit/ds-lib/use-focus-event';
9
9
  import ExpandIcon from '@atlaskit/icon/glyph/chevron-down';
10
+ import { getBooleanFF } from '@atlaskit/platform-feature-flags';
10
11
  import Popup from '@atlaskit/popup';
11
12
  // eslint-disable-next-line @atlaskit/design-system/no-deprecated-imports
12
13
  import { gridSize as gridSizeFn, layers } from '@atlaskit/theme/constants';
@@ -146,6 +147,7 @@ const DropdownMenu = props => {
146
147
  fallbackPlacements: fallbackPlacements,
147
148
  testId: testId && `${testId}--content`,
148
149
  shouldUseCaptureOnOutsideClick: true,
150
+ shouldRenderToParent: getBooleanFF('platform.design-system-team.render-popup-in-parent_f73ij') ? true : undefined,
149
151
  trigger: triggerProps => {
150
152
  if (typeof trigger === 'function') {
151
153
  const {
@@ -1,5 +1,5 @@
1
1
  {
2
2
  "name": "@atlaskit/dropdown-menu",
3
- "version": "11.9.4",
3
+ "version": "11.9.5",
4
4
  "sideEffects": false
5
5
  }
@@ -13,6 +13,7 @@ import noop from '@atlaskit/ds-lib/noop';
13
13
  import useControlledState from '@atlaskit/ds-lib/use-controlled';
14
14
  import useFocus from '@atlaskit/ds-lib/use-focus-event';
15
15
  import ExpandIcon from '@atlaskit/icon/glyph/chevron-down';
16
+ import { getBooleanFF } from '@atlaskit/platform-feature-flags';
16
17
  import Popup from '@atlaskit/popup';
17
18
  // eslint-disable-next-line @atlaskit/design-system/no-deprecated-imports
18
19
  import { gridSize as gridSizeFn, layers } from '@atlaskit/theme/constants';
@@ -164,6 +165,7 @@ var DropdownMenu = function DropdownMenu(props) {
164
165
  fallbackPlacements: fallbackPlacements,
165
166
  testId: testId && "".concat(testId, "--content"),
166
167
  shouldUseCaptureOnOutsideClick: true,
168
+ shouldRenderToParent: getBooleanFF('platform.design-system-team.render-popup-in-parent_f73ij') ? true : undefined,
167
169
  trigger: function trigger(triggerProps) {
168
170
  if (typeof _trigger === 'function') {
169
171
  var ref = triggerProps.ref,
@@ -1,5 +1,5 @@
1
1
  {
2
2
  "name": "@atlaskit/dropdown-menu",
3
- "version": "11.9.4",
3
+ "version": "11.9.5",
4
4
  "sideEffects": false
5
5
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@atlaskit/dropdown-menu",
3
- "version": "11.9.4",
3
+ "version": "11.9.5",
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/"
@@ -24,7 +24,7 @@
24
24
  "atlaskit:src": "src/index.tsx",
25
25
  "atlassian": {
26
26
  "team": "Design System Team",
27
- "releaseModel": "scheduled",
27
+ "releaseModel": "continuous",
28
28
  "website": {
29
29
  "name": "Dropdown menu",
30
30
  "category": "Components"
@@ -36,7 +36,8 @@
36
36
  "@atlaskit/ds-lib": "^2.2.0",
37
37
  "@atlaskit/icon": "^21.12.0",
38
38
  "@atlaskit/menu": "^1.7.0",
39
- "@atlaskit/popup": "^1.6.0",
39
+ "@atlaskit/platform-feature-flags": "^0.2.0",
40
+ "@atlaskit/popup": "^1.7.0",
40
41
  "@atlaskit/spinner": "^15.5.0",
41
42
  "@atlaskit/theme": "^12.5.0",
42
43
  "@atlaskit/tokens": "^1.5.0",
@@ -56,10 +57,8 @@
56
57
  "@atlaskit/heading": "^1.3.0",
57
58
  "@atlaskit/lozenge": "11.4.2",
58
59
  "@atlaskit/modal-dialog": "^12.6.0",
59
- "@atlaskit/primitives": "^0.9.0",
60
+ "@atlaskit/primitives": "^0.12.0",
60
61
  "@atlaskit/section-message": "^6.4.0",
61
- "@atlaskit/ssr": "*",
62
- "@atlaskit/tooltip": "^17.8.0",
63
62
  "@atlaskit/visual-regression": "*",
64
63
  "@atlaskit/webdriver-runner": "*",
65
64
  "@atlassian/atlassian-frontend-prettier-config-1.0.1": "npm:@atlassian/atlassian-frontend-prettier-config@1.0.1",
@@ -110,6 +109,9 @@
110
109
  "platform-feature-flags": {
111
110
  "platform.design-system-team.menu-selected-state-change_0see9": {
112
111
  "type": "boolean"
112
+ },
113
+ "platform.design-system-team.render-popup-in-parent_f73ij": {
114
+ "type": "boolean"
113
115
  }
114
116
  },
115
117
  "homepage": "https://atlassian.design/components/dropdown-menu/",
@@ -0,0 +1,146 @@
1
+ ## API Report File for "@atlaskit/dropdown-menu"
2
+
3
+ > Do not edit this file. It is a report generated by [API Extractor](https://api-extractor.com/).
4
+
5
+ ```ts
6
+
7
+ /// <reference types="react" />
8
+
9
+ import type { CustomItemProps } from '@atlaskit/menu/types';
10
+ import { default as DropdownItemGroup } from '@atlaskit/menu/section';
11
+ import { KeyboardEvent as KeyboardEvent_2 } from 'react';
12
+ import type { MenuGroupProps } from '@atlaskit/menu/types';
13
+ import { MouseEvent as MouseEvent_2 } from 'react';
14
+ import { default as React_2 } from 'react';
15
+ import { ReactElement } from 'react';
16
+ import { ReactNode } from 'react';
17
+ import { Ref } from 'react';
18
+ import type { SectionProps } from '@atlaskit/menu';
19
+ import type { SectionProps as SectionProps_2 } from '@atlaskit/menu/types';
20
+ import type { TriggerProps } from '@atlaskit/popup/types';
21
+
22
+ // @public (undocumented)
23
+ export interface CustomTriggerProps<TriggerElement extends HTMLElement = HTMLElement> extends Omit<TriggerProps, 'ref'> {
24
+ isSelected?: boolean;
25
+ onClick?: (e: KeyboardEvent_2 | MouseEvent_2) => void;
26
+ testId?: string;
27
+ triggerRef: Ref<TriggerElement>;
28
+ }
29
+
30
+ // @public
31
+ export const DropdownItem: React_2.ForwardRefExoticComponent<DropdownItemProps & React_2.RefAttributes<HTMLElement>>;
32
+
33
+ // @public
34
+ export const DropdownItemCheckbox: (props: DropdownItemCheckboxProps) => JSX.Element;
35
+
36
+ // @public
37
+ export const DropdownItemCheckboxGroup: (props: DropdownItemCheckboxGroupProps) => JSX.Element;
38
+
39
+ // @public (undocumented)
40
+ interface DropdownItemCheckboxGroupProps extends SectionProps {
41
+ id: string;
42
+ }
43
+
44
+ // @public (undocumented)
45
+ interface DropdownItemCheckboxProps {
46
+ children: React.ReactNode;
47
+ defaultSelected?: boolean;
48
+ description?: JSX.Element | string;
49
+ id: string;
50
+ isDisabled?: boolean;
51
+ isSelected?: boolean;
52
+ onClick?: (e: KeyboardEvent_2 | MouseEvent_2) => void;
53
+ shouldDescriptionWrap?: boolean;
54
+ shouldTitleWrap?: boolean;
55
+ testId?: string;
56
+ title?: string;
57
+ }
58
+
59
+ export { DropdownItemGroup }
60
+
61
+ // @public (undocumented)
62
+ export interface DropdownItemProps {
63
+ children: React.ReactNode;
64
+ component?: CustomItemProps['component'];
65
+ description?: JSX.Element | string;
66
+ elemAfter?: React.ReactNode;
67
+ elemBefore?: React.ReactNode;
68
+ href?: string;
69
+ isDisabled?: boolean;
70
+ isSelected?: boolean;
71
+ onClick?: (e: KeyboardEvent_2 | MouseEvent_2) => void;
72
+ rel?: string;
73
+ shouldDescriptionWrap?: boolean;
74
+ shouldTitleWrap?: boolean;
75
+ target?: string;
76
+ testId?: string;
77
+ title?: string;
78
+ }
79
+
80
+ // @public
81
+ export const DropdownItemRadio: (props: DropdownItemRadioProps) => JSX.Element;
82
+
83
+ // @public
84
+ export const DropdownItemRadioGroup: (props: DropdownItemRadioGroupProps) => JSX.Element;
85
+
86
+ // @public (undocumented)
87
+ interface DropdownItemRadioGroupProps extends SectionProps {
88
+ // (undocumented)
89
+ id: string;
90
+ }
91
+
92
+ // @public (undocumented)
93
+ interface DropdownItemRadioProps {
94
+ children: React.ReactNode;
95
+ defaultSelected?: boolean;
96
+ description?: JSX.Element | string;
97
+ id: string;
98
+ isDisabled?: boolean;
99
+ isSelected?: boolean;
100
+ onClick?: (e: KeyboardEvent_2 | MouseEvent_2) => void;
101
+ shouldDescriptionWrap?: boolean;
102
+ shouldTitleWrap?: boolean;
103
+ testId?: string;
104
+ title?: string;
105
+ }
106
+
107
+ // @public
108
+ const DropdownMenu: <T extends HTMLElement = HTMLElement>(props: DropdownMenuProps<T>) => JSX.Element;
109
+ export default DropdownMenu;
110
+
111
+ // @public (undocumented)
112
+ export interface DropdownMenuGroupProps extends SectionProps_2 {
113
+ }
114
+
115
+ // @public (undocumented)
116
+ export interface DropdownMenuProps<TriggerElement extends HTMLElement = HTMLElement> {
117
+ appearance?: 'default' | 'tall';
118
+ autoFocus?: boolean;
119
+ children?: ReactNode;
120
+ defaultOpen?: boolean;
121
+ isLoading?: boolean;
122
+ isOpen?: boolean;
123
+ onOpenChange?: (args: OnOpenChangeArgs) => void;
124
+ placement?: Placement;
125
+ shouldFlip?: boolean;
126
+ spacing?: Extract<MenuGroupProps['spacing'], 'compact' | 'cozy'>;
127
+ statusLabel?: string;
128
+ testId?: string;
129
+ trigger?: ((triggerButtonProps: CustomTriggerProps<TriggerElement>) => ReactElement) | string;
130
+ zIndex?: number;
131
+ }
132
+
133
+ // @public (undocumented)
134
+ export interface OnOpenChangeArgs {
135
+ // (undocumented)
136
+ event: KeyboardEvent_2 | MouseEvent_2;
137
+ // (undocumented)
138
+ isOpen: boolean;
139
+ }
140
+
141
+ // @public (undocumented)
142
+ type Placement = 'auto' | 'auto-end' | 'auto-start' | 'bottom' | 'bottom-end' | 'bottom-start' | 'left' | 'left-end' | 'left-start' | 'right' | 'right-end' | 'right-start' | 'top' | 'top-end' | 'top-start';
143
+
144
+ // (No @packageDocumentation comment for this package)
145
+
146
+ ```