@atlaskit/dropdown-menu 16.8.12 → 16.9.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.
package/CHANGELOG.md CHANGED
@@ -1,5 +1,18 @@
1
1
  # @atlaskit/dropdown-menu
2
2
 
3
+ ## 16.9.0
4
+
5
+ ### Minor Changes
6
+
7
+ - [`43e486948865a`](https://bitbucket.org/atlassian/atlassian-frontend-monorepo/commits/43e486948865a) -
8
+ When `platform-dst-top-layer` is enabled, the dropdown menu now uses the updated `widthFromAnchor`
9
+ prop (with string values `'min-anchor'` | `'none'`) on `Popup.Content` instead of the previous
10
+ `width` prop, to control whether the dropdown matches the width of its trigger.
11
+
12
+ ### Patch Changes
13
+
14
+ - Updated dependencies
15
+
3
16
  ## 16.8.12
4
17
 
5
18
  ### Patch Changes
@@ -252,9 +252,6 @@ function DropdownMenuTopLayer(_ref2) {
252
252
  });
253
253
  }, [isLocalOpen, isTriggeredUsingKeyboard, autoFocus]);
254
254
 
255
- // shouldFitContainer is handled by the width prop on Popup.Content below.
256
- var popupContentWidth = shouldFitContainer ? 'min-trigger' : 'content';
257
-
258
255
  // ── Close on menu item click ──
259
256
  // Close when a regular menuitem is clicked, but not checkboxes/radios
260
257
  // and not nested triggers (items with aria-haspopup).
@@ -325,7 +322,7 @@ function DropdownMenuTopLayer(_ref2) {
325
322
  label: (_ref6 = menuLabel !== null && menuLabel !== void 0 ? menuLabel : label) !== null && _ref6 !== void 0 ? _ref6 : typeof trigger === 'string' ? trigger : 'Menu',
326
323
  isOpen: isLocalOpen,
327
324
  animate: animation,
328
- width: popupContentWidth,
325
+ widthFromAnchor: shouldFitContainer ? 'min-anchor' : 'none',
329
326
  testId: testId && "".concat(testId, "--content")
330
327
  }, /*#__PURE__*/React.createElement("div", {
331
328
  ref: menuRef,
@@ -227,9 +227,6 @@ function DropdownMenuTopLayer({
227
227
  });
228
228
  }, [isLocalOpen, isTriggeredUsingKeyboard, autoFocus]);
229
229
 
230
- // shouldFitContainer is handled by the width prop on Popup.Content below.
231
- const popupContentWidth = shouldFitContainer ? 'min-trigger' : 'content';
232
-
233
230
  // ── Close on menu item click ──
234
231
  // Close when a regular menuitem is clicked, but not checkboxes/radios
235
232
  // and not nested triggers (items with aria-haspopup).
@@ -301,7 +298,7 @@ function DropdownMenuTopLayer({
301
298
  label: (_ref = menuLabel !== null && menuLabel !== void 0 ? menuLabel : label) !== null && _ref !== void 0 ? _ref : typeof trigger === 'string' ? trigger : 'Menu',
302
299
  isOpen: isLocalOpen,
303
300
  animate: animation,
304
- width: popupContentWidth,
301
+ widthFromAnchor: shouldFitContainer ? 'min-anchor' : 'none',
305
302
  testId: testId && `${testId}--content`
306
303
  }, /*#__PURE__*/React.createElement("div", {
307
304
  ref: menuRef,
@@ -243,9 +243,6 @@ function DropdownMenuTopLayer(_ref2) {
243
243
  });
244
244
  }, [isLocalOpen, isTriggeredUsingKeyboard, autoFocus]);
245
245
 
246
- // shouldFitContainer is handled by the width prop on Popup.Content below.
247
- var popupContentWidth = shouldFitContainer ? 'min-trigger' : 'content';
248
-
249
246
  // ── Close on menu item click ──
250
247
  // Close when a regular menuitem is clicked, but not checkboxes/radios
251
248
  // and not nested triggers (items with aria-haspopup).
@@ -316,7 +313,7 @@ function DropdownMenuTopLayer(_ref2) {
316
313
  label: (_ref6 = menuLabel !== null && menuLabel !== void 0 ? menuLabel : label) !== null && _ref6 !== void 0 ? _ref6 : typeof trigger === 'string' ? trigger : 'Menu',
317
314
  isOpen: isLocalOpen,
318
315
  animate: animation,
319
- width: popupContentWidth,
316
+ widthFromAnchor: shouldFitContainer ? 'min-anchor' : 'none',
320
317
  testId: testId && "".concat(testId, "--content")
321
318
  }, /*#__PURE__*/React.createElement("div", {
322
319
  ref: menuRef,
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@atlaskit/dropdown-menu",
3
- "version": "16.8.12",
3
+ "version": "16.9.0",
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/"
@@ -38,12 +38,12 @@
38
38
  "@atlaskit/layering": "^3.7.0",
39
39
  "@atlaskit/menu": "^8.5.0",
40
40
  "@atlaskit/platform-feature-flags": "^1.1.0",
41
- "@atlaskit/popup": "^4.19.0",
41
+ "@atlaskit/popup": "^4.20.0",
42
42
  "@atlaskit/primitives": "^19.0.0",
43
43
  "@atlaskit/spinner": "^19.1.0",
44
44
  "@atlaskit/theme": "^23.2.0",
45
45
  "@atlaskit/tokens": "^13.0.0",
46
- "@atlaskit/top-layer": "^0.6.0",
46
+ "@atlaskit/top-layer": "^0.7.0",
47
47
  "@atlaskit/visually-hidden": "^3.1.0",
48
48
  "@babel/runtime": "^7.0.0",
49
49
  "@compiled/react": "^0.20.0",
@@ -66,7 +66,7 @@
66
66
  "@atlaskit/heading": "^5.4.0",
67
67
  "@atlaskit/link": "^3.4.0",
68
68
  "@atlaskit/lozenge": "^13.8.0",
69
- "@atlaskit/modal-dialog": "^15.0.0",
69
+ "@atlaskit/modal-dialog": "^15.1.0",
70
70
  "@atlaskit/section-message": "^8.12.0",
71
71
  "@atlaskit/textfield": "^8.3.0",
72
72
  "@atlaskit/toggle": "^15.6.0",