@atlaskit/dropdown-menu 12.17.2 → 12.17.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.17.3
4
+
5
+ ### Patch Changes
6
+
7
+ - [#133182](https://stash.atlassian.com/projects/CONFCLOUD/repos/confluence-frontend/pull-requests/133182)
8
+ [`063ecc7968c68`](https://stash.atlassian.com/projects/CONFCLOUD/repos/confluence-frontend/commits/063ecc7968c68) -
9
+ We are testing an internal change to use an ID generator compatible with both React 16 and
10
+ React 18. If these changes are successful, it will be rolled out in a later release.
11
+
3
12
  ## 12.17.2
4
13
 
5
14
  ### Patch Changes
@@ -8,7 +8,7 @@ exports.default = void 0;
8
8
  var _extends2 = _interopRequireDefault(require("@babel/runtime/helpers/extends"));
9
9
  var _objectWithoutProperties2 = _interopRequireDefault(require("@babel/runtime/helpers/objectWithoutProperties"));
10
10
  var _react = _interopRequireDefault(require("react"));
11
- var _reactUid = require("react-uid");
11
+ var _reactUid = require("@atlaskit/ds-lib/react-uid");
12
12
  var _section = _interopRequireDefault(require("@atlaskit/menu/section"));
13
13
  var _groupTitle = _interopRequireDefault(require("../internal/components/group-title"));
14
14
  var _checkboxGroupContext = require("../internal/context/checkbox-group-context");
@@ -29,7 +29,7 @@ var DropdownItemCheckboxGroup = function DropdownItemCheckboxGroup(_ref) {
29
29
  testId = _ref.testId,
30
30
  title = _ref.title,
31
31
  rest = (0, _objectWithoutProperties2.default)(_ref, _excluded);
32
- var uid = (0, _reactUid.useUID)();
32
+ var uid = (0, _reactUid.useId)();
33
33
  var titleId = "dropdown-menu-item-checkbox-group-title-".concat(uid);
34
34
  return /*#__PURE__*/_react.default.createElement(_checkboxGroupContext.CheckboxGroupContext.Provider, {
35
35
  value: id
@@ -9,7 +9,7 @@ exports.default = void 0;
9
9
  var _extends2 = _interopRequireDefault(require("@babel/runtime/helpers/extends"));
10
10
  var _objectWithoutProperties2 = _interopRequireDefault(require("@babel/runtime/helpers/objectWithoutProperties"));
11
11
  var _react = _interopRequireWildcard(require("react"));
12
- var _reactUid = require("react-uid");
12
+ var _reactUid = require("@atlaskit/ds-lib/react-uid");
13
13
  var _menu = require("@atlaskit/menu");
14
14
  var _groupTitle = _interopRequireDefault(require("./internal/components/group-title"));
15
15
  var _excluded = ["children", "id", "isList", "isScrollable", "title", "testId", "hasSeparator", "overrides"];
@@ -31,7 +31,7 @@ var DropdownMenuItemGroup = /*#__PURE__*/(0, _react.forwardRef)(function (_ref,
31
31
  hasSeparator = _ref.hasSeparator,
32
32
  overrides = _ref.overrides,
33
33
  rest = (0, _objectWithoutProperties2.default)(_ref, _excluded);
34
- var uid = (0, _reactUid.useUID)();
34
+ var uid = (0, _reactUid.useId)();
35
35
  var titleId = "dropdown-menu-item-group-title-".concat(uid);
36
36
  return /*#__PURE__*/_react.default.createElement(_menu.Section, (0, _extends2.default)({
37
37
  id: id,
@@ -11,8 +11,8 @@ var _defineProperty2 = _interopRequireDefault(require("@babel/runtime/helpers/de
11
11
  var _slicedToArray2 = _interopRequireDefault(require("@babel/runtime/helpers/slicedToArray"));
12
12
  var _objectWithoutProperties2 = _interopRequireDefault(require("@babel/runtime/helpers/objectWithoutProperties"));
13
13
  var _react = _interopRequireWildcard(require("react"));
14
- var _reactUid = require("react-uid");
15
14
  var _noop = _interopRequireDefault(require("@atlaskit/ds-lib/noop"));
15
+ var _reactUid = require("@atlaskit/ds-lib/react-uid");
16
16
  var _menu = require("@atlaskit/menu");
17
17
  var _groupTitle = _interopRequireDefault(require("../internal/components/group-title"));
18
18
  var _selectionStore = require("../internal/context/selection-store");
@@ -51,7 +51,7 @@ var DropdownItemRadioGroup = function DropdownItemRadioGroup(_ref) {
51
51
  var _useContext = (0, _react.useContext)(_selectionStore.SelectionStoreContext),
52
52
  setGroupState = _useContext.setGroupState,
53
53
  getGroupState = _useContext.getGroupState;
54
- var uid = (0, _reactUid.useUID)();
54
+ var uid = (0, _reactUid.useId)();
55
55
  var titleId = "dropdown-menu-item-radio-group-title-".concat(uid);
56
56
 
57
57
  /**
@@ -1,6 +1,6 @@
1
1
  import _extends from "@babel/runtime/helpers/extends";
2
2
  import React from 'react';
3
- import { useUID } from 'react-uid';
3
+ import { useId } from '@atlaskit/ds-lib/react-uid';
4
4
  import Section from '@atlaskit/menu/section';
5
5
  import GroupTitle from '../internal/components/group-title';
6
6
  import { CheckboxGroupContext } from '../internal/context/checkbox-group-context';
@@ -22,7 +22,7 @@ const DropdownItemCheckboxGroup = ({
22
22
  // DSP-13312 TODO: remove spread props in future major release
23
23
  ...rest
24
24
  }) => {
25
- const uid = useUID();
25
+ const uid = useId();
26
26
  const titleId = `dropdown-menu-item-checkbox-group-title-${uid}`;
27
27
  return /*#__PURE__*/React.createElement(CheckboxGroupContext.Provider, {
28
28
  value: id
@@ -1,6 +1,6 @@
1
1
  import _extends from "@babel/runtime/helpers/extends";
2
2
  import React, { forwardRef } from 'react';
3
- import { useUID } from 'react-uid';
3
+ import { useId } from '@atlaskit/ds-lib/react-uid';
4
4
  import { Section } from '@atlaskit/menu';
5
5
  import GroupTitle from './internal/components/group-title';
6
6
 
@@ -21,7 +21,7 @@ const DropdownMenuItemGroup = /*#__PURE__*/forwardRef(({
21
21
  overrides,
22
22
  ...rest
23
23
  }, ref) => {
24
- const uid = useUID();
24
+ const uid = useId();
25
25
  const titleId = `dropdown-menu-item-group-title-${uid}`;
26
26
  return /*#__PURE__*/React.createElement(Section, _extends({
27
27
  id: id,
@@ -1,7 +1,7 @@
1
1
  import _extends from "@babel/runtime/helpers/extends";
2
2
  import React, { createContext, useContext, useState } from 'react';
3
- import { useUID } from 'react-uid';
4
3
  import noop from '@atlaskit/ds-lib/noop';
4
+ import { useId } from '@atlaskit/ds-lib/react-uid';
5
5
  import { Section } from '@atlaskit/menu';
6
6
  import GroupTitle from '../internal/components/group-title';
7
7
  import { SelectionStoreContext } from '../internal/context/selection-store';
@@ -38,7 +38,7 @@ const DropdownItemRadioGroup = ({
38
38
  setGroupState,
39
39
  getGroupState
40
40
  } = useContext(SelectionStoreContext);
41
- const uid = useUID();
41
+ const uid = useId();
42
42
  const titleId = `dropdown-menu-item-radio-group-title-${uid}`;
43
43
 
44
44
  /**
@@ -2,7 +2,7 @@ import _extends from "@babel/runtime/helpers/extends";
2
2
  import _objectWithoutProperties from "@babel/runtime/helpers/objectWithoutProperties";
3
3
  var _excluded = ["children", "hasSeparator", "id", "isList", "isScrollable", "overrides", "testId", "title"];
4
4
  import React from 'react';
5
- import { useUID } from 'react-uid';
5
+ import { useId } from '@atlaskit/ds-lib/react-uid';
6
6
  import Section from '@atlaskit/menu/section';
7
7
  import GroupTitle from '../internal/components/group-title';
8
8
  import { CheckboxGroupContext } from '../internal/context/checkbox-group-context';
@@ -22,7 +22,7 @@ var DropdownItemCheckboxGroup = function DropdownItemCheckboxGroup(_ref) {
22
22
  testId = _ref.testId,
23
23
  title = _ref.title,
24
24
  rest = _objectWithoutProperties(_ref, _excluded);
25
- var uid = useUID();
25
+ var uid = useId();
26
26
  var titleId = "dropdown-menu-item-checkbox-group-title-".concat(uid);
27
27
  return /*#__PURE__*/React.createElement(CheckboxGroupContext.Provider, {
28
28
  value: id
@@ -2,7 +2,7 @@ import _extends from "@babel/runtime/helpers/extends";
2
2
  import _objectWithoutProperties from "@babel/runtime/helpers/objectWithoutProperties";
3
3
  var _excluded = ["children", "id", "isList", "isScrollable", "title", "testId", "hasSeparator", "overrides"];
4
4
  import React, { forwardRef } from 'react';
5
- import { useUID } from 'react-uid';
5
+ import { useId } from '@atlaskit/ds-lib/react-uid';
6
6
  import { Section } from '@atlaskit/menu';
7
7
  import GroupTitle from './internal/components/group-title';
8
8
 
@@ -22,7 +22,7 @@ var DropdownMenuItemGroup = /*#__PURE__*/forwardRef(function (_ref, ref) {
22
22
  hasSeparator = _ref.hasSeparator,
23
23
  overrides = _ref.overrides,
24
24
  rest = _objectWithoutProperties(_ref, _excluded);
25
- var uid = useUID();
25
+ var uid = useId();
26
26
  var titleId = "dropdown-menu-item-group-title-".concat(uid);
27
27
  return /*#__PURE__*/React.createElement(Section, _extends({
28
28
  id: id,
@@ -6,8 +6,8 @@ var _excluded = ["children", "hasSeparator", "id", "isList", "isScrollable", "ov
6
6
  function ownKeys(e, r) { var t = Object.keys(e); if (Object.getOwnPropertySymbols) { var o = Object.getOwnPropertySymbols(e); r && (o = o.filter(function (r) { return Object.getOwnPropertyDescriptor(e, r).enumerable; })), t.push.apply(t, o); } return t; }
7
7
  function _objectSpread(e) { for (var r = 1; r < arguments.length; r++) { var t = null != arguments[r] ? arguments[r] : {}; r % 2 ? ownKeys(Object(t), !0).forEach(function (r) { _defineProperty(e, r, t[r]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e, Object.getOwnPropertyDescriptors(t)) : ownKeys(Object(t)).forEach(function (r) { Object.defineProperty(e, r, Object.getOwnPropertyDescriptor(t, r)); }); } return e; }
8
8
  import React, { createContext, useContext, useState } from 'react';
9
- import { useUID } from 'react-uid';
10
9
  import noop from '@atlaskit/ds-lib/noop';
10
+ import { useId } from '@atlaskit/ds-lib/react-uid';
11
11
  import { Section } from '@atlaskit/menu';
12
12
  import GroupTitle from '../internal/components/group-title';
13
13
  import { SelectionStoreContext } from '../internal/context/selection-store';
@@ -41,7 +41,7 @@ var DropdownItemRadioGroup = function DropdownItemRadioGroup(_ref) {
41
41
  var _useContext = useContext(SelectionStoreContext),
42
42
  setGroupState = _useContext.setGroupState,
43
43
  getGroupState = _useContext.getGroupState;
44
- var uid = useUID();
44
+ var uid = useId();
45
45
  var titleId = "dropdown-menu-item-radio-group-title-".concat(uid);
46
46
 
47
47
  /**
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@atlaskit/dropdown-menu",
3
- "version": "12.17.2",
3
+ "version": "12.17.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/"
@@ -27,21 +27,20 @@
27
27
  "runReact18": true
28
28
  },
29
29
  "dependencies": {
30
- "@atlaskit/button": "^20.0.0",
30
+ "@atlaskit/button": "^20.1.0",
31
31
  "@atlaskit/codemod-utils": "^4.2.0",
32
- "@atlaskit/ds-lib": "^2.4.0",
33
- "@atlaskit/icon": "^22.13.0",
32
+ "@atlaskit/ds-lib": "^2.5.0",
33
+ "@atlaskit/icon": "^22.14.0",
34
34
  "@atlaskit/layering": "^0.4.0",
35
35
  "@atlaskit/menu": "^2.12.0",
36
- "@atlaskit/popup": "^1.22.0",
36
+ "@atlaskit/popup": "^1.23.0",
37
37
  "@atlaskit/primitives": "^12.0.0",
38
38
  "@atlaskit/spinner": "^16.3.0",
39
39
  "@atlaskit/theme": "^13.0.0",
40
- "@atlaskit/tokens": "^1.58.0",
40
+ "@atlaskit/tokens": "^1.59.0",
41
41
  "@babel/runtime": "^7.0.0",
42
42
  "@emotion/react": "^11.7.1",
43
- "bind-event-listener": "^3.0.0",
44
- "react-uid": "^2.2.0"
43
+ "bind-event-listener": "^3.0.0"
45
44
  },
46
45
  "peerDependencies": {
47
46
  "react": "^16.8.0 || ^17.0.0 || ^18.0.0",