@atlaskit/popup 1.17.1 → 1.18.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 (33) hide show
  1. package/CHANGELOG.md +446 -431
  2. package/__perf__/closed.tsx +30 -30
  3. package/__perf__/default.tsx +19 -19
  4. package/__perf__/open.tsx +19 -23
  5. package/__perf__/popup.tsx +26 -26
  6. package/__perf__/utils/interaction-tasks.tsx +37 -50
  7. package/codemods/1.0.0-lite-mode.tsx +150 -182
  8. package/codemods/__tests__/1.0.0-lite-mode.tsx +88 -88
  9. package/codemods/utils/helpers.tsx +253 -263
  10. package/dist/cjs/popper-wrapper.js +15 -6
  11. package/dist/cjs/popup.js +17 -4
  12. package/dist/es2019/popper-wrapper.js +15 -5
  13. package/dist/es2019/popup.js +16 -4
  14. package/dist/esm/popper-wrapper.js +16 -6
  15. package/dist/esm/popup.js +17 -4
  16. package/dist/types/compositional/popup.d.ts +1 -1
  17. package/dist/types/entry-points/experimental/compositional.d.ts +1 -1
  18. package/dist/types/index.d.ts +1 -1
  19. package/dist/types/popper-wrapper.d.ts +2 -2
  20. package/dist/types/reposition-on-update.d.ts +2 -2
  21. package/dist/types/types.d.ts +26 -3
  22. package/dist/types/use-focus-manager.d.ts +1 -1
  23. package/dist/types/use-get-memoized-merged-trigger-ref.d.ts +1 -1
  24. package/dist/types-ts4.5/compositional/popup.d.ts +1 -1
  25. package/dist/types-ts4.5/entry-points/experimental/compositional.d.ts +1 -1
  26. package/dist/types-ts4.5/index.d.ts +1 -1
  27. package/dist/types-ts4.5/popper-wrapper.d.ts +2 -2
  28. package/dist/types-ts4.5/reposition-on-update.d.ts +2 -2
  29. package/dist/types-ts4.5/types.d.ts +26 -3
  30. package/dist/types-ts4.5/use-focus-manager.d.ts +1 -1
  31. package/dist/types-ts4.5/use-get-memoized-merged-trigger-ref.d.ts +1 -1
  32. package/package.json +117 -118
  33. package/report.api.md +41 -40
@@ -1,260 +1,256 @@
1
- import { NodePath } from 'ast-types/lib/node-path';
2
- import core, {
3
- ASTPath,
4
- ImportDeclaration,
5
- JSXAttribute,
6
- JSXElement,
7
- Node,
1
+ import { type NodePath } from 'ast-types/lib/node-path';
2
+ import {
3
+ type ASTPath,
4
+ type default as core,
5
+ type ImportDeclaration,
6
+ type JSXAttribute,
7
+ type JSXElement,
8
+ type Node,
8
9
  } from 'jscodeshift';
9
- import { Collection } from 'jscodeshift/src/Collection';
10
+ import { type Collection } from 'jscodeshift/src/Collection';
10
11
 
11
12
  export type Nullable<T> = T | null;
12
13
 
13
14
  export function hasImportDeclaration(
14
- j: core.JSCodeshift,
15
- source: string,
16
- importPath: string,
15
+ j: core.JSCodeshift,
16
+ source: string,
17
+ importPath: string,
17
18
  ): boolean {
18
- return (
19
- j(source)
20
- .find(j.ImportDeclaration)
21
- .filter(
22
- (path: ASTPath<ImportDeclaration>) =>
23
- path.node.source.value === importPath,
24
- ).length > 0
25
- );
19
+ return (
20
+ j(source)
21
+ .find(j.ImportDeclaration)
22
+ .filter((path: ASTPath<ImportDeclaration>) => path.node.source.value === importPath).length >
23
+ 0
24
+ );
26
25
  }
27
26
 
28
27
  export function getDefaultSpecifierName({
29
- j,
30
- base,
31
- packageName,
28
+ j,
29
+ base,
30
+ packageName,
32
31
  }: {
33
- j: core.JSCodeshift;
34
- base: Collection<any>;
35
- packageName: string;
32
+ j: core.JSCodeshift;
33
+ base: Collection<any>;
34
+ packageName: string;
36
35
  }): Nullable<string> {
37
- const specifiers = base
38
- .find(j.ImportDeclaration)
39
- .filter((path) => path.node.source.value === packageName)
40
- .find(j.ImportDefaultSpecifier);
36
+ const specifiers = base
37
+ .find(j.ImportDeclaration)
38
+ .filter((path) => path.node.source.value === packageName)
39
+ .find(j.ImportDefaultSpecifier);
41
40
 
42
- if (!specifiers.length) {
43
- return null;
44
- }
45
- return specifiers.nodes()[0]!.local!.name;
41
+ if (!specifiers.length) {
42
+ return null;
43
+ }
44
+ return specifiers.nodes()[0]!.local!.name;
46
45
  }
47
46
 
48
47
  export function getSpecifierName({
49
- j,
50
- base,
51
- packageName,
52
- component,
48
+ j,
49
+ base,
50
+ packageName,
51
+ component,
53
52
  }: {
54
- j: core.JSCodeshift;
55
- base: Collection<any>;
56
- packageName: string;
57
- component: string;
53
+ j: core.JSCodeshift;
54
+ base: Collection<any>;
55
+ packageName: string;
56
+ component: string;
58
57
  }): Nullable<string> {
59
- const specifiers = base
60
- .find(j.ImportDeclaration)
61
- .filter((path) => path.node.source.value === packageName)
62
- .find(j.ImportSpecifier);
58
+ const specifiers = base
59
+ .find(j.ImportDeclaration)
60
+ .filter((path) => path.node.source.value === packageName)
61
+ .find(j.ImportSpecifier);
63
62
 
64
- if (!specifiers.length) {
65
- return null;
66
- }
67
- const specifierNode = specifiers
68
- .nodes()
69
- .find((node) => node.imported.name === component);
70
- if (!specifierNode) {
71
- return null;
72
- }
73
- // @ts-ignore
74
- return specifierNode.local.name;
63
+ if (!specifiers.length) {
64
+ return null;
65
+ }
66
+ const specifierNode = specifiers.nodes().find((node) => node.imported.name === component);
67
+ if (!specifierNode) {
68
+ return null;
69
+ }
70
+ // @ts-ignore
71
+ return specifierNode.local.name;
75
72
  }
76
73
 
77
74
  export function getJSXAttributesByName({
78
- j,
79
- element,
80
- attributeName,
75
+ j,
76
+ element,
77
+ attributeName,
81
78
  }: {
82
- j: core.JSCodeshift;
83
- element: JSXElement | ASTPath<JSXElement>;
84
- attributeName: string;
79
+ j: core.JSCodeshift;
80
+ element: JSXElement | ASTPath<JSXElement>;
81
+ attributeName: string;
85
82
  }): Collection<JSXAttribute> {
86
- return j(element)
87
- .find(j.JSXOpeningElement)
88
- .find(j.JSXAttribute)
89
- .filter((attribute) => {
90
- const matches = j(attribute)
91
- .find(j.JSXIdentifier)
92
- .filter((identifier) => identifier.value.name === attributeName);
93
- return Boolean(matches.length);
94
- });
83
+ return j(element)
84
+ .find(j.JSXOpeningElement)
85
+ .find(j.JSXAttribute)
86
+ .filter((attribute) => {
87
+ const matches = j(attribute)
88
+ .find(j.JSXIdentifier)
89
+ .filter((identifier) => identifier.value.name === attributeName);
90
+ return Boolean(matches.length);
91
+ });
95
92
  }
96
93
 
97
94
  export function hasJSXAttributesByName({
98
- j,
99
- element,
100
- attributeName,
95
+ j,
96
+ element,
97
+ attributeName,
101
98
  }: {
102
- j: core.JSCodeshift;
103
- element: JSXElement;
104
- attributeName: string;
99
+ j: core.JSCodeshift;
100
+ element: JSXElement;
101
+ attributeName: string;
105
102
  }): boolean {
106
- return getJSXAttributesByName({ j, element, attributeName }).length > 0;
103
+ return getJSXAttributesByName({ j, element, attributeName }).length > 0;
107
104
  }
108
105
 
109
106
  export function isUsingSupportedSpread({
110
- j,
111
- base,
112
- element,
107
+ j,
108
+ base,
109
+ element,
113
110
  }: {
114
- j: core.JSCodeshift;
115
- base: Collection<any>;
116
- element: NodePath<JSXElement, JSXElement>;
111
+ j: core.JSCodeshift;
112
+ base: Collection<any>;
113
+ element: NodePath<JSXElement, JSXElement>;
117
114
  }): boolean {
118
- const isUsingSpread: boolean =
119
- j(element).find(j.JSXSpreadAttribute).length > 0;
115
+ const isUsingSpread: boolean = j(element).find(j.JSXSpreadAttribute).length > 0;
120
116
 
121
- if (!isUsingSpread) {
122
- return true;
123
- }
117
+ if (!isUsingSpread) {
118
+ return true;
119
+ }
124
120
 
125
- return (
126
- j(element)
127
- .find(j.JSXSpreadAttribute)
128
- .filter((spread) => {
129
- const argument = spread.value.argument;
130
- // in place expression is supported
131
- if (argument.type === 'ObjectExpression') {
132
- return true;
133
- }
121
+ return (
122
+ j(element)
123
+ .find(j.JSXSpreadAttribute)
124
+ .filter((spread) => {
125
+ const argument = spread.value.argument;
126
+ // in place expression is supported
127
+ if (argument.type === 'ObjectExpression') {
128
+ return true;
129
+ }
134
130
 
135
- // Supporting identifiers that point to an a local object expression
136
- if (argument.type === 'Identifier') {
137
- return (
138
- base.find(j.VariableDeclarator).filter((declarator): boolean => {
139
- return (
140
- declarator.value.id.type === 'Identifier' &&
141
- // @ts-ignore
142
- declarator.value.init.type === 'ObjectExpression'
143
- );
144
- }).length > 0
145
- );
146
- }
131
+ // Supporting identifiers that point to an a local object expression
132
+ if (argument.type === 'Identifier') {
133
+ return (
134
+ base.find(j.VariableDeclarator).filter((declarator): boolean => {
135
+ return (
136
+ declarator.value.id.type === 'Identifier' &&
137
+ // @ts-ignore
138
+ declarator.value.init.type === 'ObjectExpression'
139
+ );
140
+ }).length > 0
141
+ );
142
+ }
147
143
 
148
- // We don't support anything else
149
- return false;
150
- }).length > 0
151
- );
144
+ // We don't support anything else
145
+ return false;
146
+ }).length > 0
147
+ );
152
148
  }
153
149
 
154
150
  export function isUsingThroughSpread({
155
- j,
156
- base,
157
- element,
158
- propName,
151
+ j,
152
+ base,
153
+ element,
154
+ propName,
159
155
  }: {
160
- j: core.JSCodeshift;
161
- base: Collection<any>;
162
- element: NodePath<JSXElement, JSXElement>;
163
- propName: string;
156
+ j: core.JSCodeshift;
157
+ base: Collection<any>;
158
+ element: NodePath<JSXElement, JSXElement>;
159
+ propName: string;
164
160
  }): boolean {
165
- if (!isUsingSupportedSpread({ j, base, element })) {
166
- return false;
167
- }
161
+ if (!isUsingSupportedSpread({ j, base, element })) {
162
+ return false;
163
+ }
168
164
 
169
- const isUsedThroughExpression: boolean =
170
- j(element)
171
- .find(j.JSXSpreadAttribute)
172
- .find(j.ObjectExpression)
173
- .filter((item) => {
174
- const match: boolean =
175
- item.value.properties.filter(
176
- (property) =>
177
- property.type === 'ObjectProperty' &&
178
- property.key.type === 'Identifier' &&
179
- property.key.name === propName,
180
- ).length > 0;
165
+ const isUsedThroughExpression: boolean =
166
+ j(element)
167
+ .find(j.JSXSpreadAttribute)
168
+ .find(j.ObjectExpression)
169
+ .filter((item) => {
170
+ const match: boolean =
171
+ item.value.properties.filter(
172
+ (property) =>
173
+ property.type === 'ObjectProperty' &&
174
+ property.key.type === 'Identifier' &&
175
+ property.key.name === propName,
176
+ ).length > 0;
181
177
 
182
- return match;
183
- }).length > 0;
178
+ return match;
179
+ }).length > 0;
184
180
 
185
- if (isUsedThroughExpression) {
186
- return true;
187
- }
181
+ if (isUsedThroughExpression) {
182
+ return true;
183
+ }
188
184
 
189
- const isUsedThroughIdentifier: boolean =
190
- j(element)
191
- .find(j.JSXSpreadAttribute)
192
- .find(j.Identifier)
193
- .filter((identifier): boolean => {
194
- return (
195
- base
196
- .find(j.VariableDeclarator)
197
- .filter(
198
- (declarator) =>
199
- declarator.value.id.type === 'Identifier' &&
200
- declarator.value.id.name === identifier.value.name,
201
- )
202
- .filter((declarator) => {
203
- const value = declarator.value;
204
- if (value.id.type !== 'Identifier') {
205
- return false;
206
- }
185
+ const isUsedThroughIdentifier: boolean =
186
+ j(element)
187
+ .find(j.JSXSpreadAttribute)
188
+ .find(j.Identifier)
189
+ .filter((identifier): boolean => {
190
+ return (
191
+ base
192
+ .find(j.VariableDeclarator)
193
+ .filter(
194
+ (declarator) =>
195
+ declarator.value.id.type === 'Identifier' &&
196
+ declarator.value.id.name === identifier.value.name,
197
+ )
198
+ .filter((declarator) => {
199
+ const value = declarator.value;
200
+ if (value.id.type !== 'Identifier') {
201
+ return false;
202
+ }
207
203
 
208
- if (value.id.name !== identifier.value.name) {
209
- return false;
210
- }
211
- // @ts-ignore
212
- if (value.init.type !== 'ObjectExpression') {
213
- return false;
214
- }
204
+ if (value.id.name !== identifier.value.name) {
205
+ return false;
206
+ }
207
+ // @ts-ignore
208
+ if (value.init.type !== 'ObjectExpression') {
209
+ return false;
210
+ }
215
211
 
216
- const match: boolean =
217
- // @ts-ignore
218
- value.init.properties.filter(
219
- // @ts-ignore
220
- (property) =>
221
- property.type === 'ObjectProperty' &&
222
- property.key.type === 'Identifier' &&
223
- property.key.name === propName,
224
- ).length > 0;
212
+ const match: boolean =
213
+ // @ts-ignore
214
+ value.init.properties.filter(
215
+ // @ts-ignore
216
+ (property) =>
217
+ property.type === 'ObjectProperty' &&
218
+ property.key.type === 'Identifier' &&
219
+ property.key.name === propName,
220
+ ).length > 0;
225
221
 
226
- return match;
227
- }).length > 0
228
- );
229
- }).length > 0;
222
+ return match;
223
+ }).length > 0
224
+ );
225
+ }).length > 0;
230
226
 
231
- return isUsedThroughIdentifier;
227
+ return isUsedThroughIdentifier;
232
228
  }
233
229
 
234
230
  export function isUsingProp({
235
- j,
236
- base,
237
- element,
238
- propName,
231
+ j,
232
+ base,
233
+ element,
234
+ propName,
239
235
  }: {
240
- j: core.JSCodeshift;
241
- base: Collection<any>;
242
- element: NodePath<JSXElement, JSXElement>;
243
- propName: string;
236
+ j: core.JSCodeshift;
237
+ base: Collection<any>;
238
+ element: NodePath<JSXElement, JSXElement>;
239
+ propName: string;
244
240
  }): boolean {
245
- return (
246
- hasJSXAttributesByName({
247
- j,
248
- element: element.value,
249
- attributeName: propName,
250
- }) ||
251
- isUsingThroughSpread({
252
- j,
253
- base,
254
- element,
255
- propName,
256
- })
257
- );
241
+ return (
242
+ hasJSXAttributesByName({
243
+ j,
244
+ element: element.value,
245
+ attributeName: propName,
246
+ }) ||
247
+ isUsingThroughSpread({
248
+ j,
249
+ base,
250
+ element,
251
+ propName,
252
+ })
253
+ );
258
254
  }
259
255
 
260
256
  // not replacing newlines (which \s does)
@@ -262,82 +258,76 @@ const spacesAndTabs: RegExp = /[ \t]{2,}/g;
262
258
  const lineStartWithSpaces: RegExp = /^[ \t]*/gm;
263
259
 
264
260
  function clean(value: string): string {
265
- return (
266
- value
267
- .replace(spacesAndTabs, ' ')
268
- .replace(lineStartWithSpaces, '')
269
- // using .trim() to clear the any newlines before the first text and after last text
270
- .trim()
271
- );
261
+ return (
262
+ value
263
+ .replace(spacesAndTabs, ' ')
264
+ .replace(lineStartWithSpaces, '')
265
+ // using .trim() to clear the any newlines before the first text and after last text
266
+ .trim()
267
+ );
272
268
  }
273
269
 
274
270
  export function addCommentToStartOfFile({
275
- j,
276
- base,
277
- message,
271
+ j,
272
+ base,
273
+ message,
278
274
  }: {
279
- j: core.JSCodeshift;
280
- base: Collection<Node>;
281
- message: string;
275
+ j: core.JSCodeshift;
276
+ base: Collection<Node>;
277
+ message: string;
282
278
  }) {
283
- addCommentBefore({
284
- j,
285
- // @ts-ignore
286
- target: base.find(j.Program),
287
- message,
288
- });
279
+ addCommentBefore({
280
+ j,
281
+ // @ts-ignore
282
+ target: base.find(j.Program),
283
+ message,
284
+ });
289
285
  }
290
286
 
291
287
  export function addCommentBefore({
292
- j,
293
- target,
294
- message,
288
+ j,
289
+ target,
290
+ message,
295
291
  }: {
296
- j: core.JSCodeshift;
297
- target: Collection<Node>;
298
- message: string;
292
+ j: core.JSCodeshift;
293
+ target: Collection<Node>;
294
+ message: string;
299
295
  }) {
300
- const content: string = ` TODO: (from codemod) ${clean(message)} `;
301
- target.forEach((path) => {
302
- path.value.comments = path.value.comments || [];
296
+ const content: string = ` TODO: (from codemod) ${clean(message)} `;
297
+ target.forEach((path) => {
298
+ path.value.comments = path.value.comments || [];
303
299
 
304
- const exists = path.value.comments.find(
305
- (comment) => comment.value === content,
306
- );
300
+ const exists = path.value.comments.find((comment) => comment.value === content);
307
301
 
308
- // avoiding duplicates of the same comment
309
- if (exists) {
310
- return;
311
- }
302
+ // avoiding duplicates of the same comment
303
+ if (exists) {
304
+ return;
305
+ }
312
306
 
313
- path.value.comments.push(j.commentBlock(content));
314
- });
307
+ path.value.comments.push(j.commentBlock(content));
308
+ });
315
309
  }
316
310
 
317
311
  export function updateRenderProps(
318
- j: core.JSCodeshift,
319
- source: Collection<any>,
320
- specifier: string,
321
- oldProperty: string,
322
- newProperty: string,
312
+ j: core.JSCodeshift,
313
+ source: Collection<any>,
314
+ specifier: string,
315
+ oldProperty: string,
316
+ newProperty: string,
323
317
  ) {
324
- source.findJSXElements(specifier).forEach((element: ASTPath<JSXElement>) => {
325
- j(element)
326
- .find(j.ArrowFunctionExpression)
327
- .find(j.ObjectPattern)
328
- .find(j.ObjectProperty)
329
- .filter(
330
- // @ts-ignore
331
- (path: ASTPath<ObjectProperty>) => path.value.key.name === oldProperty,
332
- )
333
- .forEach((path) => {
334
- j(path).replaceWith(
335
- j.property(
336
- 'init',
337
- j.identifier(newProperty),
338
- j.identifier(oldProperty),
339
- ),
340
- );
341
- });
342
- });
318
+ source.findJSXElements(specifier).forEach((element: ASTPath<JSXElement>) => {
319
+ j(element)
320
+ .find(j.ArrowFunctionExpression)
321
+ .find(j.ObjectPattern)
322
+ .find(j.ObjectProperty)
323
+ .filter(
324
+ // @ts-ignore
325
+ (path: ASTPath<ObjectProperty>) => path.value.key.name === oldProperty,
326
+ )
327
+ .forEach((path) => {
328
+ j(path).replaceWith(
329
+ j.property('init', j.identifier(newProperty), j.identifier(oldProperty)),
330
+ );
331
+ });
332
+ });
343
333
  }
@@ -20,9 +20,13 @@ var _tokens = require("@atlaskit/tokens");
20
20
  var _repositionOnUpdate = require("./reposition-on-update");
21
21
  var _useCloseManager = require("./use-close-manager");
22
22
  var _useFocusManager = require("./use-focus-manager");
23
- var _excluded = ["shouldRenderToParent", "children"];
23
+ var _excluded = ["shouldRenderToParent", "shouldFitContainer", "children"];
24
24
  var _css;
25
25
  /** @jsx jsx */
26
+ // eslint-disable-next-line @atlaskit/ui-styling-standard/no-global-styles -- Ignored via go/DSP-18766
27
+ var popupFullWidthStyles = (0, _react2.css)({
28
+ width: '100%'
29
+ });
26
30
  var popupStyles = (0, _react2.css)((_css = {
27
31
  display: 'block',
28
32
  boxSizing: 'border-box',
@@ -31,7 +35,7 @@ var popupStyles = (0, _react2.css)((_css = {
31
35
  backgroundColor: "var(--ds-surface-overlay, ".concat(_colors.N0, ")"),
32
36
  borderRadius: "var(--ds-border-radius, 3px)",
33
37
  boxShadow: "var(--ds-shadow-overlay, ".concat("0 4px 8px -2px ".concat(_colors.N50A, ", 0 0 1px ").concat(_colors.N60A), ")")
34
- }, (0, _defineProperty2.default)(_css, _tokens.CURRENT_SURFACE_CSS_VAR, "var(--ds-surface-overlay, ".concat(_colors.N0, ")")), (0, _defineProperty2.default)(_css, ':focus', {
38
+ }, (0, _defineProperty2.default)(_css, _tokens.CURRENT_SURFACE_CSS_VAR, "var(--ds-surface-overlay, ".concat(_colors.N0, ")")), (0, _defineProperty2.default)(_css, '&:focus', {
35
39
  outline: 'none'
36
40
  }), _css));
37
41
  var popupOverflowStyles = (0, _react2.css)({
@@ -41,17 +45,18 @@ var popupOverflowStyles = (0, _react2.css)({
41
45
  // disables iframe pointer events while popup is open, except if iframe is nested inside popup
42
46
  // solves an issue of popup not being closed on iframe click
43
47
  var blockPointerEventsOnExternalIframeStyles = (0, _react2.css)({
44
- // eslint-disable-next-line @atlaskit/design-system/no-nested-styles
48
+ // eslint-disable-next-line @atlaskit/design-system/no-nested-styles, @atlaskit/ui-styling-standard/no-nested-selectors, @atlaskit/ui-styling-standard/no-unsafe-selectors -- Ignored via go/DSP-18766
45
49
  'iframe:not([data-ds--level] iframe)': {
46
50
  pointerEvents: 'none'
47
51
  }
48
52
  });
49
53
  var DefaultPopupComponent = /*#__PURE__*/(0, _react.forwardRef)(function (props, ref) {
50
54
  var shouldRenderToParent = props.shouldRenderToParent,
55
+ shouldFitContainer = props.shouldFitContainer,
51
56
  children = props.children,
52
57
  htmlAttributes = (0, _objectWithoutProperties2.default)(props, _excluded);
53
58
  return (0, _react2.jsx)("div", (0, _extends2.default)({
54
- css: [popupStyles, !shouldRenderToParent && popupOverflowStyles]
59
+ css: [popupStyles, !shouldRenderToParent && popupOverflowStyles, shouldFitContainer && popupFullWidthStyles]
55
60
  }, htmlAttributes, {
56
61
  ref: ref
57
62
  }), children);
@@ -76,6 +81,7 @@ function PopperWrapper(_ref) {
76
81
  triggerRef = _ref.triggerRef,
77
82
  shouldUseCaptureOnOutsideClick = _ref.shouldUseCaptureOnOutsideClick,
78
83
  shouldRenderToParent = _ref.shouldRenderToParent,
84
+ shouldFitContainer = _ref.shouldFitContainer,
79
85
  shouldDisableFocusLock = _ref.shouldDisableFocusLock,
80
86
  strategy = _ref.strategy,
81
87
  role = _ref.role,
@@ -146,13 +152,16 @@ function PopperWrapper(_ref) {
146
152
  }
147
153
  setPopupRef(node);
148
154
  }
149
- },
155
+ }
156
+ // eslint-disable-next-line @atlaskit/ui-styling-standard/enforce-style-prop -- Ignored via go/DSP-18766
157
+ ,
150
158
  style: style
151
159
  // using tabIndex={-1} would cause a bug where Safari focuses
152
160
  // first on the browser address bar when using keyboard
153
161
  ,
154
162
  tabIndex: autoFocus ? 0 : undefined,
155
- shouldRenderToParent: shouldRenderToParent
163
+ shouldRenderToParent: shouldRenderToParent,
164
+ shouldFitContainer: shouldFitContainer
156
165
  }, (0, _platformFeatureFlags.getBooleanFF)('platform.design-system-team.iframe_gojiv') && (0, _react2.jsx)(_react2.Global, {
157
166
  styles: blockPointerEventsOnExternalIframeStyles
158
167
  }), (0, _react2.jsx)(_repositionOnUpdate.RepositionOnUpdate, {