@atlaskit/menu 1.3.10 → 1.3.12

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/menu
2
2
 
3
+ ## 1.3.12
4
+
5
+ ### Patch Changes
6
+
7
+ - [`9de88fa1e1e`](https://bitbucket.org/atlassian/atlassian-frontend/commits/9de88fa1e1e) - Internal changes to include spacing tokens in component implementations.
8
+
9
+ ## 1.3.11
10
+
11
+ ### Patch Changes
12
+
13
+ - [`8f2153a45a7`](https://bitbucket.org/atlassian/atlassian-frontend/commits/8f2153a45a7) - Convert Menu Group to use primitives.
14
+ - Updated dependencies
15
+
3
16
  ## 1.3.10
4
17
 
5
18
  ### Patch Changes
@@ -28,11 +28,11 @@ var defaultRender = function defaultRender(Component, props) {
28
28
 
29
29
  var gridSize = (0, _constants.gridSize)();
30
30
  var fontSize = (0, _constants.fontSize)();
31
- var itemTopBottomPadding = gridSize;
32
- var itemSidePadding = gridSize * 2.5;
33
- var itemElemSpacing = gridSize * 1.5;
31
+ var itemTopBottomPadding = "var(--ds-scale-100, 8px)";
32
+ var itemSidePadding = "var(--ds-scale-250, 20px)";
33
+ var itemElemSpacing = "var(--ds-scale-150, 12px)";
34
34
  var itemDescriptionSpacing = gridSize * 0.375;
35
- var itemMinHeight = gridSize * 5;
35
+ var itemMinHeight = "var(--ds-scale-500, 40px)";
36
36
  var beforeElementStyles = (0, _core.css)({
37
37
  display: 'flex',
38
38
  marginRight: itemElemSpacing,
@@ -75,8 +75,9 @@ var primitiveStyles = (0, _core.css)({
75
75
  boxSizing: 'border-box',
76
76
  width: '100%',
77
77
  minHeight: itemMinHeight,
78
- margin: 0,
79
- padding: "".concat(itemTopBottomPadding, "px ").concat(itemSidePadding, "px"),
78
+ // TODO Delete this comment after verifying spacing token -> previous value `0`
79
+ margin: "var(--ds-scale-0, 0px)",
80
+ padding: "".concat(itemTopBottomPadding, " ").concat(itemSidePadding),
80
81
  alignItems: 'center',
81
82
  border: 0,
82
83
  fontSize: fontSize,
@@ -13,17 +13,15 @@ var _noop = _interopRequireDefault(require("@atlaskit/ds-lib/noop"));
13
13
 
14
14
  var _colors = require("@atlaskit/theme/colors");
15
15
 
16
- var _constants = require("@atlaskit/theme/constants");
17
-
18
16
  var _skeletonShimmer = _interopRequireDefault(require("../internal/components/skeleton-shimmer"));
19
17
 
20
18
  /** @jsx jsx */
21
19
  var skeletonStyles = (0, _core.css)({
22
- padding: "0 ".concat((0, _constants.gridSize)() * 2.5, "px"),
20
+ padding: "var(--ds-scale-0, 0px)".concat(" ", "var(--ds-scale-250, 20px)"),
23
21
  '::after': {
24
22
  display: 'block',
25
23
  width: '30%',
26
- height: (0, _constants.gridSize)(),
24
+ height: "var(--ds-scale-100, 8px)",
27
25
  backgroundColor: "var(--ds-skeleton, ".concat(_colors.N20A, ")"),
28
26
  borderRadius: 100,
29
27
  content: '""'
@@ -13,12 +13,10 @@ var _objectWithoutProperties2 = _interopRequireDefault(require("@babel/runtime/h
13
13
 
14
14
  var _core = require("@emotion/core");
15
15
 
16
+ var _dsExplorations = require("@atlaskit/ds-explorations");
17
+
16
18
  var _excluded = ["maxWidth", "minWidth", "minHeight", "maxHeight", "testId", "role"];
17
- var groupStyles = (0, _core.css)({
18
- display: 'flex',
19
- flexDirection: 'column',
20
- overflow: 'auto'
21
- });
19
+
22
20
  /**
23
21
  * __Menu group__
24
22
  *
@@ -27,7 +25,6 @@ var groupStyles = (0, _core.css)({
27
25
  * - [Examples](https://atlaskit.atlassian.com/packages/design-system/menu/docs/menu-group)
28
26
  * - [Code](https://atlaskit.atlassian.com/packages/design-system/menu)
29
27
  */
30
-
31
28
  var MenuGroup = function MenuGroup(_ref) {
32
29
  var maxWidth = _ref.maxWidth,
33
30
  minWidth = _ref.minWidth,
@@ -36,18 +33,23 @@ var MenuGroup = function MenuGroup(_ref) {
36
33
  testId = _ref.testId,
37
34
  role = _ref.role,
38
35
  rest = (0, _objectWithoutProperties2.default)(_ref, _excluded);
39
- return (0, _core.jsx)("div", (0, _extends2.default)({
40
- style: {
41
- minWidth: minWidth,
42
- maxWidth: maxWidth,
43
- minHeight: minHeight,
44
- maxHeight: maxHeight
45
- },
46
- css: groupStyles,
47
- "data-testid": testId,
48
- role: role // eslint-disable-next-line @repo/internal/react/no-unsafe-spread-props
49
-
50
- }, rest));
36
+ return (// @ts-ignore type of rest/children needs to be made stricter to fit in Box -- string shouldn't be allowed
37
+ (0, _core.jsx)(_dsExplorations.UNSAFE_Box, (0, _extends2.default)({
38
+ UNSAFE_style: {
39
+ minWidth: minWidth,
40
+ maxWidth: maxWidth,
41
+ minHeight: minHeight,
42
+ maxHeight: maxHeight
43
+ },
44
+ display: "flex",
45
+ flexDirection: "column",
46
+ overflow: "auto",
47
+ testId: testId,
48
+ role: role,
49
+ position: "static" // eslint-disable-next-line @repo/internal/react/no-unsafe-spread-props
50
+
51
+ }, rest))
52
+ );
51
53
  };
52
54
 
53
55
  var _default = MenuGroup;
@@ -1,5 +1,5 @@
1
1
  {
2
2
  "name": "@atlaskit/menu",
3
- "version": "1.3.10",
3
+ "version": "1.3.12",
4
4
  "sideEffects": false
5
5
  }
@@ -11,11 +11,11 @@ jsx(Component, props);
11
11
 
12
12
  const gridSize = gridSizeFn();
13
13
  const fontSize = fontSizeFn();
14
- const itemTopBottomPadding = gridSize;
15
- const itemSidePadding = gridSize * 2.5;
16
- const itemElemSpacing = gridSize * 1.5;
14
+ const itemTopBottomPadding = "var(--ds-scale-100, 8px)";
15
+ const itemSidePadding = "var(--ds-scale-250, 20px)";
16
+ const itemElemSpacing = "var(--ds-scale-150, 12px)";
17
17
  const itemDescriptionSpacing = gridSize * 0.375;
18
- const itemMinHeight = gridSize * 5;
18
+ const itemMinHeight = "var(--ds-scale-500, 40px)";
19
19
  const beforeElementStyles = css({
20
20
  display: 'flex',
21
21
  marginRight: itemElemSpacing,
@@ -58,8 +58,9 @@ const primitiveStyles = css({
58
58
  boxSizing: 'border-box',
59
59
  width: '100%',
60
60
  minHeight: itemMinHeight,
61
- margin: 0,
62
- padding: `${itemTopBottomPadding}px ${itemSidePadding}px`,
61
+ // TODO Delete this comment after verifying spacing token -> previous value `0`
62
+ margin: "var(--ds-scale-0, 0px)",
63
+ padding: `${itemTopBottomPadding} ${itemSidePadding}`,
63
64
  alignItems: 'center',
64
65
  border: 0,
65
66
  fontSize: fontSize,
@@ -2,14 +2,13 @@
2
2
  import { css, jsx } from '@emotion/core';
3
3
  import noop from '@atlaskit/ds-lib/noop';
4
4
  import { N20A } from '@atlaskit/theme/colors';
5
- import { gridSize } from '@atlaskit/theme/constants';
6
5
  import SkeletonShimmer from '../internal/components/skeleton-shimmer';
7
6
  const skeletonStyles = css({
8
- padding: `0 ${gridSize() * 2.5}px`,
7
+ padding: `${"var(--ds-scale-0, 0px)"} ${"var(--ds-scale-250, 20px)"}`,
9
8
  '::after': {
10
9
  display: 'block',
11
10
  width: '30%',
12
- height: gridSize(),
11
+ height: "var(--ds-scale-100, 8px)",
13
12
  backgroundColor: `var(--ds-skeleton, ${N20A})`,
14
13
  borderRadius: 100,
15
14
  content: '""'
@@ -1,12 +1,9 @@
1
1
  import _extends from "@babel/runtime/helpers/extends";
2
2
 
3
3
  /** @jsx jsx */
4
- import { css, jsx } from '@emotion/core';
5
- const groupStyles = css({
6
- display: 'flex',
7
- flexDirection: 'column',
8
- overflow: 'auto'
9
- });
4
+ import { jsx } from '@emotion/core';
5
+ import { UNSAFE_Box as Box } from '@atlaskit/ds-explorations';
6
+
10
7
  /**
11
8
  * __Menu group__
12
9
  *
@@ -15,7 +12,6 @@ const groupStyles = css({
15
12
  * - [Examples](https://atlaskit.atlassian.com/packages/design-system/menu/docs/menu-group)
16
13
  * - [Code](https://atlaskit.atlassian.com/packages/design-system/menu)
17
14
  */
18
-
19
15
  const MenuGroup = ({
20
16
  maxWidth,
21
17
  minWidth,
@@ -24,16 +20,20 @@ const MenuGroup = ({
24
20
  testId,
25
21
  role,
26
22
  ...rest
27
- }) => jsx("div", _extends({
28
- style: {
23
+ }) => // @ts-ignore type of rest/children needs to be made stricter to fit in Box -- string shouldn't be allowed
24
+ jsx(Box, _extends({
25
+ UNSAFE_style: {
29
26
  minWidth,
30
27
  maxWidth,
31
28
  minHeight,
32
29
  maxHeight
33
30
  },
34
- css: groupStyles,
35
- "data-testid": testId,
36
- role: role // eslint-disable-next-line @repo/internal/react/no-unsafe-spread-props
31
+ display: "flex",
32
+ flexDirection: "column",
33
+ overflow: "auto",
34
+ testId: testId,
35
+ role: role,
36
+ position: "static" // eslint-disable-next-line @repo/internal/react/no-unsafe-spread-props
37
37
 
38
38
  }, rest));
39
39
 
@@ -1,5 +1,5 @@
1
1
  {
2
2
  "name": "@atlaskit/menu",
3
- "version": "1.3.10",
3
+ "version": "1.3.12",
4
4
  "sideEffects": false
5
5
  }
@@ -14,11 +14,11 @@ var defaultRender = function defaultRender(Component, props) {
14
14
 
15
15
  var gridSize = gridSizeFn();
16
16
  var fontSize = fontSizeFn();
17
- var itemTopBottomPadding = gridSize;
18
- var itemSidePadding = gridSize * 2.5;
19
- var itemElemSpacing = gridSize * 1.5;
17
+ var itemTopBottomPadding = "var(--ds-scale-100, 8px)";
18
+ var itemSidePadding = "var(--ds-scale-250, 20px)";
19
+ var itemElemSpacing = "var(--ds-scale-150, 12px)";
20
20
  var itemDescriptionSpacing = gridSize * 0.375;
21
- var itemMinHeight = gridSize * 5;
21
+ var itemMinHeight = "var(--ds-scale-500, 40px)";
22
22
  var beforeElementStyles = css({
23
23
  display: 'flex',
24
24
  marginRight: itemElemSpacing,
@@ -61,8 +61,9 @@ var primitiveStyles = css({
61
61
  boxSizing: 'border-box',
62
62
  width: '100%',
63
63
  minHeight: itemMinHeight,
64
- margin: 0,
65
- padding: "".concat(itemTopBottomPadding, "px ").concat(itemSidePadding, "px"),
64
+ // TODO Delete this comment after verifying spacing token -> previous value `0`
65
+ margin: "var(--ds-scale-0, 0px)",
66
+ padding: "".concat(itemTopBottomPadding, " ").concat(itemSidePadding),
66
67
  alignItems: 'center',
67
68
  border: 0,
68
69
  fontSize: fontSize,
@@ -2,14 +2,13 @@
2
2
  import { css, jsx } from '@emotion/core';
3
3
  import noop from '@atlaskit/ds-lib/noop';
4
4
  import { N20A } from '@atlaskit/theme/colors';
5
- import { gridSize } from '@atlaskit/theme/constants';
6
5
  import SkeletonShimmer from '../internal/components/skeleton-shimmer';
7
6
  var skeletonStyles = css({
8
- padding: "0 ".concat(gridSize() * 2.5, "px"),
7
+ padding: "var(--ds-scale-0, 0px)".concat(" ", "var(--ds-scale-250, 20px)"),
9
8
  '::after': {
10
9
  display: 'block',
11
10
  width: '30%',
12
- height: gridSize(),
11
+ height: "var(--ds-scale-100, 8px)",
13
12
  backgroundColor: "var(--ds-skeleton, ".concat(N20A, ")"),
14
13
  borderRadius: 100,
15
14
  content: '""'
@@ -3,12 +3,9 @@ import _objectWithoutProperties from "@babel/runtime/helpers/objectWithoutProper
3
3
  var _excluded = ["maxWidth", "minWidth", "minHeight", "maxHeight", "testId", "role"];
4
4
 
5
5
  /** @jsx jsx */
6
- import { css, jsx } from '@emotion/core';
7
- var groupStyles = css({
8
- display: 'flex',
9
- flexDirection: 'column',
10
- overflow: 'auto'
11
- });
6
+ import { jsx } from '@emotion/core';
7
+ import { UNSAFE_Box as Box } from '@atlaskit/ds-explorations';
8
+
12
9
  /**
13
10
  * __Menu group__
14
11
  *
@@ -17,7 +14,6 @@ var groupStyles = css({
17
14
  * - [Examples](https://atlaskit.atlassian.com/packages/design-system/menu/docs/menu-group)
18
15
  * - [Code](https://atlaskit.atlassian.com/packages/design-system/menu)
19
16
  */
20
-
21
17
  var MenuGroup = function MenuGroup(_ref) {
22
18
  var maxWidth = _ref.maxWidth,
23
19
  minWidth = _ref.minWidth,
@@ -27,18 +23,23 @@ var MenuGroup = function MenuGroup(_ref) {
27
23
  role = _ref.role,
28
24
  rest = _objectWithoutProperties(_ref, _excluded);
29
25
 
30
- return jsx("div", _extends({
31
- style: {
32
- minWidth: minWidth,
33
- maxWidth: maxWidth,
34
- minHeight: minHeight,
35
- maxHeight: maxHeight
36
- },
37
- css: groupStyles,
38
- "data-testid": testId,
39
- role: role // eslint-disable-next-line @repo/internal/react/no-unsafe-spread-props
26
+ return (// @ts-ignore type of rest/children needs to be made stricter to fit in Box -- string shouldn't be allowed
27
+ jsx(Box, _extends({
28
+ UNSAFE_style: {
29
+ minWidth: minWidth,
30
+ maxWidth: maxWidth,
31
+ minHeight: minHeight,
32
+ maxHeight: maxHeight
33
+ },
34
+ display: "flex",
35
+ flexDirection: "column",
36
+ overflow: "auto",
37
+ testId: testId,
38
+ role: role,
39
+ position: "static" // eslint-disable-next-line @repo/internal/react/no-unsafe-spread-props
40
40
 
41
- }, rest));
41
+ }, rest))
42
+ );
42
43
  };
43
44
 
44
45
  export default MenuGroup;
@@ -1,5 +1,5 @@
1
1
  {
2
2
  "name": "@atlaskit/menu",
3
- "version": "1.3.10",
3
+ "version": "1.3.12",
4
4
  "sideEffects": false
5
5
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@atlaskit/menu",
3
- "version": "1.3.10",
3
+ "version": "1.3.12",
4
4
  "description": "A collection of composable menu components that can be used anywhere.",
5
5
  "publishConfig": {
6
6
  "registry": "https://registry.npmjs.org/"
@@ -15,13 +15,15 @@
15
15
  "typesVersions": {
16
16
  ">=4.0 <4.5": {
17
17
  "*": [
18
- "dist/types-ts4.0/*"
18
+ "dist/types-ts4.0/*",
19
+ "dist/types-ts4.0/index.d.ts"
19
20
  ]
20
21
  }
21
22
  },
22
23
  "sideEffects": false,
23
24
  "atlaskit:src": "src/index.tsx",
24
25
  "atlassian": {
26
+ "disableProductCI": true,
25
27
  "team": "Design System Team",
26
28
  "releaseModel": "scheduled",
27
29
  "website": {
@@ -43,8 +45,9 @@
43
45
  ".": "./src/index.tsx"
44
46
  },
45
47
  "dependencies": {
48
+ "@atlaskit/ds-explorations": "^0.1.0",
46
49
  "@atlaskit/ds-lib": "^2.1.0",
47
- "@atlaskit/focus-ring": "^1.0.0",
50
+ "@atlaskit/focus-ring": "^1.1.0",
48
51
  "@atlaskit/theme": "^12.2.0",
49
52
  "@atlaskit/tokens": "^0.10.0",
50
53
  "@babel/runtime": "^7.0.0",
@@ -55,13 +58,13 @@
55
58
  "react-dom": "^16.8.0"
56
59
  },
57
60
  "devDependencies": {
58
- "@atlaskit/avatar": "^21.0.0",
61
+ "@atlaskit/avatar": "^21.1.0",
59
62
  "@atlaskit/button": "^16.3.0",
60
63
  "@atlaskit/docs": "*",
61
- "@atlaskit/icon": "^21.10.0",
64
+ "@atlaskit/icon": "^21.11.0",
62
65
  "@atlaskit/icon-file-type": "^6.0.0",
63
66
  "@atlaskit/icon-object": "^6.0.0",
64
- "@atlaskit/section-message": "^6.2.0",
67
+ "@atlaskit/section-message": "^6.3.0",
65
68
  "@atlaskit/visual-regression": "*",
66
69
  "@atlaskit/webdriver-runner": "*",
67
70
  "@atlassian/atlassian-frontend-prettier-config-1.0.1": "npm:@atlassian/atlassian-frontend-prettier-config@1.0.1",
@@ -95,6 +98,7 @@
95
98
  "emotion"
96
99
  ],
97
100
  "analytics": "analytics-next",
101
+ "design-tokens": "spacing",
98
102
  "theming": "tokens",
99
103
  "deprecation": "no-deprecated-imports"
100
104
  }
package/report.api.md CHANGED
@@ -1,6 +1,8 @@
1
- ## API Report File for "@atlaskit/menu"
1
+ ## API Report File for "@atlaskit/menu".
2
2
 
3
- > Do not edit this file. It is a report generated by [API Extractor](https://api-extractor.com/).
3
+ > Do not edit this file. This report is auto-generated by [API Extractor](https://api-extractor.com/).
4
+
5
+ [Learn more about API reports](https://hello.atlassian.net/wiki/spaces/UR/pages/1825484529/Package+API+Reports)
4
6
 
5
7
  ```ts
6
8
  /// <reference types="react" />