@atlaskit/dropdown-menu 11.5.12 → 11.6.1

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,23 @@
1
1
  # @atlaskit/dropdown-menu
2
2
 
3
+ ## 11.6.1
4
+
5
+ ### Patch Changes
6
+
7
+ - [`842bb999a85`](https://bitbucket.org/atlassian/atlassian-frontend/commits/842bb999a85) - Internal change only. Replace usages of Inline/Stack with stable version from `@atlaskit/primitives`.
8
+
9
+ ## 11.6.0
10
+
11
+ ### Minor Changes
12
+
13
+ - [`814e6ed4e14`](https://bitbucket.org/atlassian/atlassian-frontend/commits/814e6ed4e14) - [ux] Adds a new spacing prop on the `DropdownMenu` component to support information density.
14
+ - New usage `<DropdownMenu spacing="compact" />`
15
+ - The current default (can also be omitted) `<DropdownMenu spacing="cozy" />`
16
+
17
+ ### Patch Changes
18
+
19
+ - Updated dependencies
20
+
3
21
  ## 11.5.12
4
22
 
5
23
  ### Patch Changes
@@ -40,7 +40,7 @@ var DropdownItemCheckbox = function DropdownItemCheckbox(props) {
40
40
  _props$shouldDescript = props.shouldDescriptionWrap,
41
41
  shouldDescriptionWrap = _props$shouldDescript === void 0 ? true : _props$shouldDescript,
42
42
  rest = (0, _objectWithoutProperties2.default)(props, _excluded);
43
- if (process.env.NODE_ENV !== 'production' && typeof isSelected !== 'undefined' && typeof defaultSelected !== 'undefined') {
43
+ if (typeof process !== 'undefined' && process.env.NODE_ENV !== 'production' && typeof isSelected !== 'undefined' && typeof defaultSelected !== 'undefined') {
44
44
  // eslint-disable-next-line no-console
45
45
  console.warn("[DropdownItemCheckbox] You've used both `defaultSelected` and `isSelected` props. This is dangerous and can lead to unexpected results. Use one or the other depending if you want to control the components state yourself.");
46
46
  }
@@ -78,6 +78,7 @@ var DropdownMenu = function DropdownMenu(props) {
78
78
  _props$placement = props.placement,
79
79
  placement = _props$placement === void 0 ? 'bottom-start' : _props$placement,
80
80
  _trigger = props.trigger,
81
+ spacing = props.spacing,
81
82
  _props$shouldFlip = props.shouldFlip,
82
83
  shouldFlip = _props$shouldFlip === void 0 ? true : _props$shouldFlip,
83
84
  _props$isLoading = props.isLoading,
@@ -201,6 +202,7 @@ var DropdownMenu = function DropdownMenu(props) {
201
202
  var setInitialFocusRef = _ref.setInitialFocusRef,
202
203
  update = _ref.update;
203
204
  return /*#__PURE__*/_react.default.createElement(_focusManager.default, null, /*#__PURE__*/_react.default.createElement(_menuWrapper.default, {
205
+ spacing: spacing,
204
206
  maxHeight: MAX_HEIGHT,
205
207
  maxWidth: 800,
206
208
  onClose: handleOnClose,
@@ -40,7 +40,7 @@ var DropdownItemRadio = function DropdownItemRadio(props) {
40
40
  _props$shouldDescript = props.shouldDescriptionWrap,
41
41
  shouldDescriptionWrap = _props$shouldDescript === void 0 ? true : _props$shouldDescript,
42
42
  rest = (0, _objectWithoutProperties2.default)(props, _excluded);
43
- if (process.env.NODE_ENV !== 'production' && typeof isSelected !== 'undefined' && typeof defaultSelected !== 'undefined') {
43
+ if (typeof process !== 'undefined' && process.env.NODE_ENV !== 'production' && typeof isSelected !== 'undefined' && typeof defaultSelected !== 'undefined') {
44
44
  // eslint-disable-next-line no-console
45
45
  console.warn("[DropdownItemRadio] You've used both `defaultSelected` and `isSelected` props. This is dangerous and can lead to unexpected results. Use one or the other depending if you want to control the components state yourself.");
46
46
  }
@@ -1,5 +1,5 @@
1
1
  {
2
2
  "name": "@atlaskit/dropdown-menu",
3
- "version": "11.5.12",
3
+ "version": "11.6.1",
4
4
  "sideEffects": false
5
5
  }
@@ -26,7 +26,7 @@ const DropdownItemCheckbox = props => {
26
26
  shouldDescriptionWrap = true,
27
27
  ...rest
28
28
  } = props;
29
- if (process.env.NODE_ENV !== 'production' && typeof isSelected !== 'undefined' && typeof defaultSelected !== 'undefined') {
29
+ if (typeof process !== 'undefined' && process.env.NODE_ENV !== 'production' && typeof isSelected !== 'undefined' && typeof defaultSelected !== 'undefined') {
30
30
  // eslint-disable-next-line no-console
31
31
  console.warn("[DropdownItemCheckbox] You've used both `defaultSelected` and `isSelected` props. This is dangerous and can lead to unexpected results. Use one or the other depending if you want to control the components state yourself.");
32
32
  }
@@ -60,6 +60,7 @@ const DropdownMenu = props => {
60
60
  children,
61
61
  placement = 'bottom-start',
62
62
  trigger,
63
+ spacing,
63
64
  shouldFlip = true,
64
65
  isLoading = false,
65
66
  autoFocus = false,
@@ -177,6 +178,7 @@ const DropdownMenu = props => {
177
178
  setInitialFocusRef,
178
179
  update
179
180
  }) => /*#__PURE__*/React.createElement(FocusManager, null, /*#__PURE__*/React.createElement(MenuWrapper, {
181
+ spacing: spacing,
180
182
  maxHeight: MAX_HEIGHT,
181
183
  maxWidth: 800,
182
184
  onClose: handleOnClose,
@@ -26,7 +26,7 @@ const DropdownItemRadio = props => {
26
26
  shouldDescriptionWrap = true,
27
27
  ...rest
28
28
  } = props;
29
- if (process.env.NODE_ENV !== 'production' && typeof isSelected !== 'undefined' && typeof defaultSelected !== 'undefined') {
29
+ if (typeof process !== 'undefined' && process.env.NODE_ENV !== 'production' && typeof isSelected !== 'undefined' && typeof defaultSelected !== 'undefined') {
30
30
  // eslint-disable-next-line no-console
31
31
  console.warn("[DropdownItemRadio] You've used both `defaultSelected` and `isSelected` props. This is dangerous and can lead to unexpected results. Use one or the other depending if you want to control the components state yourself.");
32
32
  }
@@ -1,5 +1,5 @@
1
1
  {
2
2
  "name": "@atlaskit/dropdown-menu",
3
- "version": "11.5.12",
3
+ "version": "11.6.1",
4
4
  "sideEffects": false
5
5
  }
@@ -30,7 +30,7 @@ var DropdownItemCheckbox = function DropdownItemCheckbox(props) {
30
30
  _props$shouldDescript = props.shouldDescriptionWrap,
31
31
  shouldDescriptionWrap = _props$shouldDescript === void 0 ? true : _props$shouldDescript,
32
32
  rest = _objectWithoutProperties(props, _excluded);
33
- if (process.env.NODE_ENV !== 'production' && typeof isSelected !== 'undefined' && typeof defaultSelected !== 'undefined') {
33
+ if (typeof process !== 'undefined' && process.env.NODE_ENV !== 'production' && typeof isSelected !== 'undefined' && typeof defaultSelected !== 'undefined') {
34
34
  // eslint-disable-next-line no-console
35
35
  console.warn("[DropdownItemCheckbox] You've used both `defaultSelected` and `isSelected` props. This is dangerous and can lead to unexpected results. Use one or the other depending if you want to control the components state yourself.");
36
36
  }
@@ -68,6 +68,7 @@ var DropdownMenu = function DropdownMenu(props) {
68
68
  _props$placement = props.placement,
69
69
  placement = _props$placement === void 0 ? 'bottom-start' : _props$placement,
70
70
  _trigger = props.trigger,
71
+ spacing = props.spacing,
71
72
  _props$shouldFlip = props.shouldFlip,
72
73
  shouldFlip = _props$shouldFlip === void 0 ? true : _props$shouldFlip,
73
74
  _props$isLoading = props.isLoading,
@@ -191,6 +192,7 @@ var DropdownMenu = function DropdownMenu(props) {
191
192
  var setInitialFocusRef = _ref.setInitialFocusRef,
192
193
  update = _ref.update;
193
194
  return /*#__PURE__*/React.createElement(FocusManager, null, /*#__PURE__*/React.createElement(MenuWrapper, {
195
+ spacing: spacing,
194
196
  maxHeight: MAX_HEIGHT,
195
197
  maxWidth: 800,
196
198
  onClose: handleOnClose,
@@ -30,7 +30,7 @@ var DropdownItemRadio = function DropdownItemRadio(props) {
30
30
  _props$shouldDescript = props.shouldDescriptionWrap,
31
31
  shouldDescriptionWrap = _props$shouldDescript === void 0 ? true : _props$shouldDescript,
32
32
  rest = _objectWithoutProperties(props, _excluded);
33
- if (process.env.NODE_ENV !== 'production' && typeof isSelected !== 'undefined' && typeof defaultSelected !== 'undefined') {
33
+ if (typeof process !== 'undefined' && process.env.NODE_ENV !== 'production' && typeof isSelected !== 'undefined' && typeof defaultSelected !== 'undefined') {
34
34
  // eslint-disable-next-line no-console
35
35
  console.warn("[DropdownItemRadio] You've used both `defaultSelected` and `isSelected` props. This is dangerous and can lead to unexpected results. Use one or the other depending if you want to control the components state yourself.");
36
36
  }
@@ -1,5 +1,5 @@
1
1
  {
2
2
  "name": "@atlaskit/dropdown-menu",
3
- "version": "11.5.12",
3
+ "version": "11.6.1",
4
4
  "sideEffects": false
5
5
  }
@@ -92,6 +92,10 @@ export interface DropdownMenuProps<TriggerElement extends HTMLElement = HTMLElem
92
92
  * fit in the viewport.
93
93
  */
94
94
  shouldFlip?: boolean;
95
+ /**
96
+ * Controls the spacing density of the menu.
97
+ */
98
+ spacing?: Extract<MenuGroupProps['spacing'], 'cozy' | 'compact'>;
95
99
  /**
96
100
  * Content which will trigger the dropdown menu to open and close. Use with `triggerType`
97
101
  * to easily get a button trigger.
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@atlaskit/dropdown-menu",
3
- "version": "11.5.12",
3
+ "version": "11.6.1",
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/"
@@ -16,7 +16,6 @@
16
16
  "atlaskit:src": "src/index.tsx",
17
17
  "atlassian": {
18
18
  "team": "Design System Team",
19
- "disableProductCI": true,
20
19
  "releaseModel": "scheduled",
21
20
  "website": {
22
21
  "name": "Dropdown menu",
@@ -28,11 +27,11 @@
28
27
  "@atlaskit/codemod-utils": "^4.1.0",
29
28
  "@atlaskit/ds-lib": "^2.1.0",
30
29
  "@atlaskit/icon": "^21.11.0",
31
- "@atlaskit/menu": "^1.4.0",
30
+ "@atlaskit/menu": "^1.5.0",
32
31
  "@atlaskit/popup": "^1.5.0",
33
32
  "@atlaskit/spinner": "^15.3.0",
34
33
  "@atlaskit/theme": "^12.2.0",
35
- "@atlaskit/tokens": "^1.0.0",
34
+ "@atlaskit/tokens": "^1.2.0",
36
35
  "@atlaskit/visually-hidden": "^1.1.0",
37
36
  "@babel/runtime": "^7.0.0",
38
37
  "@emotion/react": "^11.7.1",
@@ -49,6 +48,7 @@
49
48
  "@atlaskit/heading": "^1.1.0",
50
49
  "@atlaskit/lozenge": "11.3.7",
51
50
  "@atlaskit/modal-dialog": "^12.4.0",
51
+ "@atlaskit/primitives": "^0.3.0",
52
52
  "@atlaskit/section-message": "^6.3.0",
53
53
  "@atlaskit/ssr": "*",
54
54
  "@atlaskit/tooltip": "^17.6.0",
@@ -82,6 +82,7 @@
82
82
  ],
83
83
  "design-system": "v1",
84
84
  "design-tokens": [
85
+ "color",
85
86
  "spacing"
86
87
  ],
87
88
  "styling": [
@@ -89,8 +90,7 @@
89
90
  "emotion"
90
91
  ],
91
92
  "analytics": "analytics-next",
92
- "deprecation": "no-deprecated-imports",
93
- "theming": "tokens"
93
+ "deprecation": "no-deprecated-imports"
94
94
  }
95
95
  },
96
96
  "af:exports": {