@atlaskit/dropdown-menu 11.7.1 → 11.7.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,18 @@
1
1
  # @atlaskit/dropdown-menu
2
2
 
3
+ ## 11.7.3
4
+
5
+ ### Patch Changes
6
+
7
+ - [`2e01c9c74b5`](https://bitbucket.org/atlassian/atlassian-frontend/commits/2e01c9c74b5) - DUMMY remove before merging to master; dupe adf-schema via adf-utils
8
+
9
+ ## 11.7.2
10
+
11
+ ### Patch Changes
12
+
13
+ - [`261420360ec`](https://bitbucket.org/atlassian/atlassian-frontend/commits/261420360ec) - Upgrades component types to support React 18.
14
+ - Updated dependencies
15
+
3
16
  ## 11.7.1
4
17
 
5
18
  ### Patch Changes
@@ -24,7 +24,7 @@ var _focusManager = _interopRequireDefault(require("./internal/components/focus-
24
24
  var _menuWrapper = _interopRequireDefault(require("./internal/components/menu-wrapper"));
25
25
  var _selectionStore = _interopRequireDefault(require("./internal/context/selection-store"));
26
26
  var _useGeneratedId = _interopRequireDefault(require("./internal/utils/use-generated-id"));
27
- var _excluded = ["ref"];
27
+ var _excluded = ["ref"]; // eslint-disable-next-line @atlaskit/design-system/no-deprecated-imports
28
28
  function _getRequireWildcardCache(nodeInterop) { if (typeof WeakMap !== "function") return null; var cacheBabelInterop = new WeakMap(); var cacheNodeInterop = new WeakMap(); return (_getRequireWildcardCache = function _getRequireWildcardCache(nodeInterop) { return nodeInterop ? cacheNodeInterop : cacheBabelInterop; })(nodeInterop); }
29
29
  function _interopRequireWildcard(obj, nodeInterop) { if (!nodeInterop && obj && obj.__esModule) { return obj; } if (obj === null || _typeof(obj) !== "object" && typeof obj !== "function") { return { default: obj }; } var cache = _getRequireWildcardCache(nodeInterop); if (cache && cache.has(obj)) { return cache.get(obj); } var newObj = {}; var hasPropertyDescriptor = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var key in obj) { if (key !== "default" && Object.prototype.hasOwnProperty.call(obj, key)) { var desc = hasPropertyDescriptor ? Object.getOwnPropertyDescriptor(obj, key) : null; if (desc && (desc.get || desc.set)) { Object.defineProperty(newObj, key, desc); } else { newObj[key] = obj[key]; } } } newObj.default = obj; if (cache) { cache.set(obj, newObj); } return newObj; }
30
30
  function ownKeys(object, enumerableOnly) { var keys = Object.keys(object); if (Object.getOwnPropertySymbols) { var symbols = Object.getOwnPropertySymbols(object); enumerableOnly && (symbols = symbols.filter(function (sym) { return Object.getOwnPropertyDescriptor(object, sym).enumerable; })), keys.push.apply(keys, symbols); } return keys; }
@@ -16,6 +16,7 @@ var _focusManager = require("../components/focus-manager");
16
16
  var _isCheckboxItem = _interopRequireDefault(require("../utils/is-checkbox-item"));
17
17
  var _isRadioItem = _interopRequireDefault(require("../utils/is-radio-item"));
18
18
  var _excluded = ["onClose", "onUpdate", "isLoading", "statusLabel", "setInitialFocusRef", "children"];
19
+ /** @jsx jsx */
19
20
  var spinnerContainerStyles = (0, _react2.css)({
20
21
  display: 'flex',
21
22
  minWidth: '160px',
@@ -25,16 +26,13 @@ var spinnerContainerStyles = (0, _react2.css)({
25
26
  var LoadingIndicator = function LoadingIndicator(_ref) {
26
27
  var _ref$statusLabel = _ref.statusLabel,
27
28
  statusLabel = _ref$statusLabel === void 0 ? 'Loading' : _ref$statusLabel;
28
- return (
29
- // eslint-disable-next-line @repo/internal/react/use-primitives
30
- (0, _react2.jsx)("div", {
31
- css: spinnerContainerStyles
32
- }, (0, _react2.jsx)(_spinner.default, {
33
- size: "small"
34
- }), (0, _react2.jsx)(_visuallyHidden.default, {
35
- role: "status"
36
- }, statusLabel))
37
- );
29
+ return (0, _react2.jsx)("div", {
30
+ css: spinnerContainerStyles
31
+ }, (0, _react2.jsx)(_spinner.default, {
32
+ size: "small"
33
+ }), (0, _react2.jsx)(_visuallyHidden.default, {
34
+ role: "status"
35
+ }, statusLabel));
38
36
  };
39
37
  /**
40
38
  *
@@ -1,5 +1,5 @@
1
1
  {
2
2
  "name": "@atlaskit/dropdown-menu",
3
- "version": "11.7.1",
3
+ "version": "11.7.3",
4
4
  "sideEffects": false
5
5
  }
@@ -8,6 +8,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
10
  import Popup from '@atlaskit/popup';
11
+ // eslint-disable-next-line @atlaskit/design-system/no-deprecated-imports
11
12
  import { gridSize as gridSizeFn, layers } from '@atlaskit/theme/constants';
12
13
  import FocusManager from './internal/components/focus-manager';
13
14
  import MenuWrapper from './internal/components/menu-wrapper';
@@ -16,9 +16,7 @@ const spinnerContainerStyles = css({
16
16
  });
17
17
  const LoadingIndicator = ({
18
18
  statusLabel = 'Loading'
19
- }) =>
20
- // eslint-disable-next-line @repo/internal/react/use-primitives
21
- jsx("div", {
19
+ }) => jsx("div", {
22
20
  css: spinnerContainerStyles
23
21
  }, jsx(Spinner, {
24
22
  size: "small"
@@ -1,5 +1,5 @@
1
1
  {
2
2
  "name": "@atlaskit/dropdown-menu",
3
- "version": "11.7.1",
3
+ "version": "11.7.3",
4
4
  "sideEffects": false
5
5
  }
@@ -14,6 +14,7 @@ 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
16
  import Popup from '@atlaskit/popup';
17
+ // eslint-disable-next-line @atlaskit/design-system/no-deprecated-imports
17
18
  import { gridSize as gridSizeFn, layers } from '@atlaskit/theme/constants';
18
19
  import FocusManager from './internal/components/focus-manager';
19
20
  import MenuWrapper from './internal/components/menu-wrapper';
@@ -19,16 +19,13 @@ var spinnerContainerStyles = css({
19
19
  var LoadingIndicator = function LoadingIndicator(_ref) {
20
20
  var _ref$statusLabel = _ref.statusLabel,
21
21
  statusLabel = _ref$statusLabel === void 0 ? 'Loading' : _ref$statusLabel;
22
- return (
23
- // eslint-disable-next-line @repo/internal/react/use-primitives
24
- jsx("div", {
25
- css: spinnerContainerStyles
26
- }, jsx(Spinner, {
27
- size: "small"
28
- }), jsx(VisuallyHidden, {
29
- role: "status"
30
- }, statusLabel))
31
- );
22
+ return jsx("div", {
23
+ css: spinnerContainerStyles
24
+ }, jsx(Spinner, {
25
+ size: "small"
26
+ }), jsx(VisuallyHidden, {
27
+ role: "status"
28
+ }, statusLabel));
32
29
  };
33
30
  /**
34
31
  *
@@ -1,5 +1,5 @@
1
1
  {
2
2
  "name": "@atlaskit/dropdown-menu",
3
- "version": "11.7.1",
3
+ "version": "11.7.3",
4
4
  "sideEffects": false
5
5
  }
@@ -1,4 +1,4 @@
1
- import React, { FC } from 'react';
1
+ import React, { FC, ReactNode } from 'react';
2
2
  import { FocusableElement } from '../../types';
3
3
  /**
4
4
  *
@@ -15,5 +15,7 @@ export declare const FocusManagerContext: React.Context<{
15
15
  /**
16
16
  * Focus manager logic
17
17
  */
18
- declare const FocusManager: FC;
18
+ declare const FocusManager: FC<{
19
+ children: ReactNode;
20
+ }>;
19
21
  export default FocusManager;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@atlaskit/dropdown-menu",
3
- "version": "11.7.1",
3
+ "version": "11.7.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/"
@@ -23,14 +23,14 @@
23
23
  }
24
24
  },
25
25
  "dependencies": {
26
- "@atlaskit/button": "^16.5.0",
26
+ "@atlaskit/button": "^16.6.0",
27
27
  "@atlaskit/codemod-utils": "^4.1.0",
28
28
  "@atlaskit/ds-lib": "^2.1.0",
29
29
  "@atlaskit/icon": "^21.11.0",
30
30
  "@atlaskit/menu": "^1.5.0",
31
31
  "@atlaskit/popup": "^1.5.0",
32
32
  "@atlaskit/spinner": "^15.4.0",
33
- "@atlaskit/theme": "^12.2.0",
33
+ "@atlaskit/theme": "^12.4.0",
34
34
  "@atlaskit/tokens": "^1.2.0",
35
35
  "@atlaskit/visually-hidden": "^1.1.0",
36
36
  "@babel/runtime": "^7.0.0",
@@ -45,10 +45,10 @@
45
45
  "@atlaskit/avatar": "^21.2.0",
46
46
  "@atlaskit/docs": "*",
47
47
  "@atlaskit/ds-explorations": "^2.0.0",
48
- "@atlaskit/heading": "^1.1.0",
49
- "@atlaskit/lozenge": "11.3.8",
48
+ "@atlaskit/heading": "^1.2.0",
49
+ "@atlaskit/lozenge": "11.3.9",
50
50
  "@atlaskit/modal-dialog": "^12.4.0",
51
- "@atlaskit/primitives": "^0.3.0",
51
+ "@atlaskit/primitives": "^0.8.0",
52
52
  "@atlaskit/section-message": "^6.3.0",
53
53
  "@atlaskit/ssr": "*",
54
54
  "@atlaskit/tooltip": "^17.7.0",
package/report.api.md CHANGED
@@ -20,6 +20,7 @@
20
20
  import type { CustomItemProps } from '@atlaskit/menu/types';
21
21
  import { default as DropdownItemGroup } from '@atlaskit/menu/section';
22
22
  import { KeyboardEvent as KeyboardEvent_2 } from 'react';
23
+ import type { MenuGroupProps } from '@atlaskit/menu/types';
23
24
  import { MouseEvent as MouseEvent_2 } from 'react';
24
25
  import { default as React_2 } from 'react';
25
26
  import { ReactElement } from 'react';
@@ -146,6 +147,7 @@ export interface DropdownMenuProps<
146
147
  onOpenChange?: (args: OnOpenChangeArgs) => void;
147
148
  placement?: Placement;
148
149
  shouldFlip?: boolean;
150
+ spacing?: Extract<MenuGroupProps['spacing'], 'compact' | 'cozy'>;
149
151
  statusLabel?: string;
150
152
  testId?: string;
151
153
  trigger?: