@atlaskit/menu 1.3.5 → 1.3.6
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 +7 -0
- package/__perf__/utils/example-runner.tsx +12 -7
- package/dist/cjs/internal/components/skeleton-shimmer.js +3 -11
- package/dist/cjs/menu-item/skeleton-heading-item.js +1 -1
- package/dist/cjs/menu-item/skeleton-item.js +1 -1
- package/dist/cjs/menu-section/section.js +1 -1
- package/dist/cjs/version.json +1 -1
- package/dist/es2019/internal/components/skeleton-shimmer.js +3 -11
- package/dist/es2019/menu-item/skeleton-heading-item.js +2 -2
- package/dist/es2019/menu-item/skeleton-item.js +2 -2
- package/dist/es2019/version.json +1 -1
- package/dist/esm/internal/components/skeleton-shimmer.js +3 -11
- package/dist/esm/menu-item/skeleton-heading-item.js +2 -2
- package/dist/esm/menu-item/skeleton-item.js +2 -2
- package/dist/esm/menu-section/section.js +1 -1
- package/dist/esm/version.json +1 -1
- package/package.json +8 -5
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,12 @@
|
|
|
1
1
|
# @atlaskit/menu
|
|
2
2
|
|
|
3
|
+
## 1.3.6
|
|
4
|
+
|
|
5
|
+
### Patch Changes
|
|
6
|
+
|
|
7
|
+
- [`c8145459eb5`](https://bitbucket.org/atlassian/atlassian-frontend/commits/c8145459eb5) - [ux] Updating skeleton token in @atlakist/menu, @atlaskit/theme
|
|
8
|
+
- Updated dependencies
|
|
9
|
+
|
|
3
10
|
## 1.3.5
|
|
4
11
|
|
|
5
12
|
### Patch Changes
|
|
@@ -1,5 +1,7 @@
|
|
|
1
1
|
import React, { useLayoutEffect, useRef, useState } from 'react';
|
|
2
2
|
|
|
3
|
+
import { bindAll } from 'bind-event-listener';
|
|
4
|
+
|
|
3
5
|
type ItemComponentProps =
|
|
4
6
|
| React.ComponentType<React.AllHTMLAttributes<HTMLElement>>
|
|
5
7
|
| React.ElementType;
|
|
@@ -28,13 +30,16 @@ export default function Example({
|
|
|
28
30
|
throw new Error('Could not find button ref');
|
|
29
31
|
}
|
|
30
32
|
|
|
31
|
-
el
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
33
|
+
return bindAll(el, [
|
|
34
|
+
{
|
|
35
|
+
type: 'toggle-select',
|
|
36
|
+
listener: toggleSelect,
|
|
37
|
+
},
|
|
38
|
+
{
|
|
39
|
+
type: 'toggle-disabled',
|
|
40
|
+
listener: toggleDisabled,
|
|
41
|
+
},
|
|
42
|
+
]);
|
|
38
43
|
}, []);
|
|
39
44
|
|
|
40
45
|
return (
|
|
@@ -11,26 +11,18 @@ var _colors = require("@atlaskit/theme/colors");
|
|
|
11
11
|
|
|
12
12
|
/** @jsx jsx */
|
|
13
13
|
|
|
14
|
-
/**
|
|
15
|
-
* This color is mirrored in:
|
|
16
|
-
* packages/design-system/theme/src/colors.tsx
|
|
17
|
-
*
|
|
18
|
-
* Please update both.
|
|
19
|
-
*/
|
|
20
|
-
var skeletonColor = "var(--ds-background-neutral, ".concat(_colors.N20A, ")");
|
|
21
14
|
/**
|
|
22
15
|
* These keyframes are mirrored in:
|
|
23
16
|
* packages/design-system/theme/src/constants.tsx
|
|
24
17
|
*
|
|
25
18
|
* Please update both.
|
|
26
19
|
*/
|
|
27
|
-
|
|
28
20
|
var shimmerKeyframes = (0, _core.keyframes)({
|
|
29
21
|
from: {
|
|
30
|
-
backgroundColor: "var(--ds-
|
|
22
|
+
backgroundColor: "var(--ds-skeleton, ".concat(_colors.N20A, ")")
|
|
31
23
|
},
|
|
32
24
|
to: {
|
|
33
|
-
backgroundColor: "var(--ds-
|
|
25
|
+
backgroundColor: "var(--ds-skeleton-subtle, ".concat(_colors.N30A, ")")
|
|
34
26
|
}
|
|
35
27
|
});
|
|
36
28
|
/**
|
|
@@ -47,7 +39,7 @@ var shimmerStyles = (0, _core.css)({
|
|
|
47
39
|
animationIterationCount: 'infinite',
|
|
48
40
|
animationName: "".concat(shimmerKeyframes),
|
|
49
41
|
animationTimingFunction: 'linear',
|
|
50
|
-
backgroundColor: "var(--ds-
|
|
42
|
+
backgroundColor: "var(--ds-skeleton, ".concat(_colors.N20A, ")")
|
|
51
43
|
}
|
|
52
44
|
});
|
|
53
45
|
/**
|
|
@@ -24,7 +24,7 @@ var skeletonStyles = (0, _core.css)({
|
|
|
24
24
|
display: 'block',
|
|
25
25
|
width: '30%',
|
|
26
26
|
height: (0, _constants.gridSize)(),
|
|
27
|
-
backgroundColor: "var(--ds-
|
|
27
|
+
backgroundColor: "var(--ds-skeleton, ".concat(_colors.N20A, ")"),
|
|
28
28
|
borderRadius: 100,
|
|
29
29
|
content: '""'
|
|
30
30
|
}
|
|
@@ -28,7 +28,7 @@ var skeletonItemElemSize = gridSize * 2.5;
|
|
|
28
28
|
var itemElemSkeletonOffset = (itemExpectedElemSize - skeletonItemElemSize) / 2;
|
|
29
29
|
var skeletonTextBorderRadius = 100;
|
|
30
30
|
var skeletonContentHeight = 9;
|
|
31
|
-
var skeletonColor = "var(--ds-
|
|
31
|
+
var skeletonColor = "var(--ds-skeleton, ".concat(_colors.N20A, ")");
|
|
32
32
|
var skeletonStyles = (0, _core.css)({
|
|
33
33
|
display: 'flex',
|
|
34
34
|
minHeight: itemMinHeight,
|
|
@@ -76,7 +76,7 @@ var unscrollableStyles = (0, _core.css)({
|
|
|
76
76
|
flexShrink: 0
|
|
77
77
|
});
|
|
78
78
|
var separatorStyles = (0, _core.css)({
|
|
79
|
-
borderTop: "2px solid var(".concat(VAR_SEPARATOR_COLOR, ", "
|
|
79
|
+
borderTop: "2px solid var(".concat(VAR_SEPARATOR_COLOR, ", ", "var(--ds-border, ".concat(_colors.N30A, ")"), ")")
|
|
80
80
|
});
|
|
81
81
|
var noSeparatorStyles = (0, _core.css)({
|
|
82
82
|
// this is to ensure that adjacent sections without separators don't get additional margins.
|
package/dist/cjs/version.json
CHANGED
|
@@ -2,26 +2,18 @@
|
|
|
2
2
|
import { ClassNames, css, jsx, keyframes } from '@emotion/core';
|
|
3
3
|
import { N20A, N30A } from '@atlaskit/theme/colors';
|
|
4
4
|
|
|
5
|
-
/**
|
|
6
|
-
* This color is mirrored in:
|
|
7
|
-
* packages/design-system/theme/src/colors.tsx
|
|
8
|
-
*
|
|
9
|
-
* Please update both.
|
|
10
|
-
*/
|
|
11
|
-
const skeletonColor = `var(--ds-background-neutral, ${N20A})`;
|
|
12
5
|
/**
|
|
13
6
|
* These keyframes are mirrored in:
|
|
14
7
|
* packages/design-system/theme/src/constants.tsx
|
|
15
8
|
*
|
|
16
9
|
* Please update both.
|
|
17
10
|
*/
|
|
18
|
-
|
|
19
11
|
const shimmerKeyframes = keyframes({
|
|
20
12
|
from: {
|
|
21
|
-
backgroundColor: `var(--ds-
|
|
13
|
+
backgroundColor: `var(--ds-skeleton, ${N20A})`
|
|
22
14
|
},
|
|
23
15
|
to: {
|
|
24
|
-
backgroundColor: `var(--ds-
|
|
16
|
+
backgroundColor: `var(--ds-skeleton-subtle, ${N30A})`
|
|
25
17
|
}
|
|
26
18
|
});
|
|
27
19
|
/**
|
|
@@ -38,7 +30,7 @@ const shimmerStyles = css({
|
|
|
38
30
|
animationIterationCount: 'infinite',
|
|
39
31
|
animationName: `${shimmerKeyframes}`,
|
|
40
32
|
animationTimingFunction: 'linear',
|
|
41
|
-
backgroundColor: `var(--ds-
|
|
33
|
+
backgroundColor: `var(--ds-skeleton, ${N20A})`
|
|
42
34
|
}
|
|
43
35
|
});
|
|
44
36
|
/**
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
/** @jsx jsx */
|
|
2
2
|
import { css, jsx } from '@emotion/core';
|
|
3
3
|
import noop from '@atlaskit/ds-lib/noop';
|
|
4
|
-
import {
|
|
4
|
+
import { N20A } from '@atlaskit/theme/colors';
|
|
5
5
|
import { gridSize } from '@atlaskit/theme/constants';
|
|
6
6
|
import SkeletonShimmer from '../internal/components/skeleton-shimmer';
|
|
7
7
|
const skeletonStyles = css({
|
|
@@ -10,7 +10,7 @@ const skeletonStyles = css({
|
|
|
10
10
|
display: 'block',
|
|
11
11
|
width: '30%',
|
|
12
12
|
height: gridSize(),
|
|
13
|
-
backgroundColor: `var(--ds-
|
|
13
|
+
backgroundColor: `var(--ds-skeleton, ${N20A})`,
|
|
14
14
|
borderRadius: 100,
|
|
15
15
|
content: '""'
|
|
16
16
|
}
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
/** @jsx jsx */
|
|
2
2
|
import { css, jsx } from '@emotion/core';
|
|
3
3
|
import noop from '@atlaskit/ds-lib/noop';
|
|
4
|
-
import {
|
|
4
|
+
import { N20A } from '@atlaskit/theme/colors';
|
|
5
5
|
import { borderRadius as borderRadiusFn, gridSize as gridSizeFn } from '@atlaskit/theme/constants';
|
|
6
6
|
import SkeletonShimmer from '../internal/components/skeleton-shimmer';
|
|
7
7
|
const gridSize = gridSizeFn();
|
|
@@ -14,7 +14,7 @@ const skeletonItemElemSize = gridSize * 2.5;
|
|
|
14
14
|
const itemElemSkeletonOffset = (itemExpectedElemSize - skeletonItemElemSize) / 2;
|
|
15
15
|
const skeletonTextBorderRadius = 100;
|
|
16
16
|
const skeletonContentHeight = 9;
|
|
17
|
-
const skeletonColor = `var(--ds-
|
|
17
|
+
const skeletonColor = `var(--ds-skeleton, ${N20A})`;
|
|
18
18
|
const skeletonStyles = css({
|
|
19
19
|
display: 'flex',
|
|
20
20
|
minHeight: itemMinHeight,
|
package/dist/es2019/version.json
CHANGED
|
@@ -2,26 +2,18 @@
|
|
|
2
2
|
import { ClassNames, css, jsx, keyframes } from '@emotion/core';
|
|
3
3
|
import { N20A, N30A } from '@atlaskit/theme/colors';
|
|
4
4
|
|
|
5
|
-
/**
|
|
6
|
-
* This color is mirrored in:
|
|
7
|
-
* packages/design-system/theme/src/colors.tsx
|
|
8
|
-
*
|
|
9
|
-
* Please update both.
|
|
10
|
-
*/
|
|
11
|
-
var skeletonColor = "var(--ds-background-neutral, ".concat(N20A, ")");
|
|
12
5
|
/**
|
|
13
6
|
* These keyframes are mirrored in:
|
|
14
7
|
* packages/design-system/theme/src/constants.tsx
|
|
15
8
|
*
|
|
16
9
|
* Please update both.
|
|
17
10
|
*/
|
|
18
|
-
|
|
19
11
|
var shimmerKeyframes = keyframes({
|
|
20
12
|
from: {
|
|
21
|
-
backgroundColor: "var(--ds-
|
|
13
|
+
backgroundColor: "var(--ds-skeleton, ".concat(N20A, ")")
|
|
22
14
|
},
|
|
23
15
|
to: {
|
|
24
|
-
backgroundColor: "var(--ds-
|
|
16
|
+
backgroundColor: "var(--ds-skeleton-subtle, ".concat(N30A, ")")
|
|
25
17
|
}
|
|
26
18
|
});
|
|
27
19
|
/**
|
|
@@ -38,7 +30,7 @@ var shimmerStyles = css({
|
|
|
38
30
|
animationIterationCount: 'infinite',
|
|
39
31
|
animationName: "".concat(shimmerKeyframes),
|
|
40
32
|
animationTimingFunction: 'linear',
|
|
41
|
-
backgroundColor: "var(--ds-
|
|
33
|
+
backgroundColor: "var(--ds-skeleton, ".concat(N20A, ")")
|
|
42
34
|
}
|
|
43
35
|
});
|
|
44
36
|
/**
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
/** @jsx jsx */
|
|
2
2
|
import { css, jsx } from '@emotion/core';
|
|
3
3
|
import noop from '@atlaskit/ds-lib/noop';
|
|
4
|
-
import {
|
|
4
|
+
import { N20A } from '@atlaskit/theme/colors';
|
|
5
5
|
import { gridSize } from '@atlaskit/theme/constants';
|
|
6
6
|
import SkeletonShimmer from '../internal/components/skeleton-shimmer';
|
|
7
7
|
var skeletonStyles = css({
|
|
@@ -10,7 +10,7 @@ var skeletonStyles = css({
|
|
|
10
10
|
display: 'block',
|
|
11
11
|
width: '30%',
|
|
12
12
|
height: gridSize(),
|
|
13
|
-
backgroundColor: "var(--ds-
|
|
13
|
+
backgroundColor: "var(--ds-skeleton, ".concat(N20A, ")"),
|
|
14
14
|
borderRadius: 100,
|
|
15
15
|
content: '""'
|
|
16
16
|
}
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
/** @jsx jsx */
|
|
2
2
|
import { css, jsx } from '@emotion/core';
|
|
3
3
|
import noop from '@atlaskit/ds-lib/noop';
|
|
4
|
-
import {
|
|
4
|
+
import { N20A } from '@atlaskit/theme/colors';
|
|
5
5
|
import { borderRadius as borderRadiusFn, gridSize as gridSizeFn } from '@atlaskit/theme/constants';
|
|
6
6
|
import SkeletonShimmer from '../internal/components/skeleton-shimmer';
|
|
7
7
|
var gridSize = gridSizeFn();
|
|
@@ -14,7 +14,7 @@ var skeletonItemElemSize = gridSize * 2.5;
|
|
|
14
14
|
var itemElemSkeletonOffset = (itemExpectedElemSize - skeletonItemElemSize) / 2;
|
|
15
15
|
var skeletonTextBorderRadius = 100;
|
|
16
16
|
var skeletonContentHeight = 9;
|
|
17
|
-
var skeletonColor = "var(--ds-
|
|
17
|
+
var skeletonColor = "var(--ds-skeleton, ".concat(N20A, ")");
|
|
18
18
|
var skeletonStyles = css({
|
|
19
19
|
display: 'flex',
|
|
20
20
|
minHeight: itemMinHeight,
|
|
@@ -61,7 +61,7 @@ var unscrollableStyles = css({
|
|
|
61
61
|
flexShrink: 0
|
|
62
62
|
});
|
|
63
63
|
var separatorStyles = css({
|
|
64
|
-
borderTop: "2px solid var(".concat(VAR_SEPARATOR_COLOR, ", "
|
|
64
|
+
borderTop: "2px solid var(".concat(VAR_SEPARATOR_COLOR, ", ", "var(--ds-border, ".concat(N30A, ")"), ")")
|
|
65
65
|
});
|
|
66
66
|
var noSeparatorStyles = css({
|
|
67
67
|
// this is to ensure that adjacent sections without separators don't get additional margins.
|
package/dist/esm/version.json
CHANGED
package/package.json
CHANGED
|
@@ -1,11 +1,11 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@atlaskit/menu",
|
|
3
|
-
"version": "1.3.
|
|
3
|
+
"version": "1.3.6",
|
|
4
4
|
"description": "A collection of composable menu components that can be used anywhere.",
|
|
5
5
|
"publishConfig": {
|
|
6
6
|
"registry": "https://registry.npmjs.org/"
|
|
7
7
|
},
|
|
8
|
-
"repository": "https://bitbucket.org/atlassian/atlassian-frontend",
|
|
8
|
+
"repository": "https://bitbucket.org/atlassian/atlassian-frontend-mirror",
|
|
9
9
|
"author": "Atlassian Pty Ltd",
|
|
10
10
|
"license": "Apache-2.0",
|
|
11
11
|
"main": "dist/cjs/index.js",
|
|
@@ -18,7 +18,8 @@
|
|
|
18
18
|
"team": "Design System Team",
|
|
19
19
|
"releaseModel": "scheduled",
|
|
20
20
|
"website": {
|
|
21
|
-
"name": "Menu"
|
|
21
|
+
"name": "Menu",
|
|
22
|
+
"category": "Components"
|
|
22
23
|
}
|
|
23
24
|
},
|
|
24
25
|
"af:exports": {
|
|
@@ -35,7 +36,7 @@
|
|
|
35
36
|
".": "./src/index.tsx"
|
|
36
37
|
},
|
|
37
38
|
"dependencies": {
|
|
38
|
-
"@atlaskit/ds-lib": "^
|
|
39
|
+
"@atlaskit/ds-lib": "^2.0.0",
|
|
39
40
|
"@atlaskit/focus-ring": "^1.0.0",
|
|
40
41
|
"@atlaskit/theme": "^12.1.0",
|
|
41
42
|
"@atlaskit/tokens": "^0.10.0",
|
|
@@ -47,7 +48,7 @@
|
|
|
47
48
|
"react-dom": "^16.8.0"
|
|
48
49
|
},
|
|
49
50
|
"devDependencies": {
|
|
50
|
-
"@atlaskit/avatar": "^
|
|
51
|
+
"@atlaskit/avatar": "^21.0.0",
|
|
51
52
|
"@atlaskit/button": "^16.3.0",
|
|
52
53
|
"@atlaskit/docs": "*",
|
|
53
54
|
"@atlaskit/icon": "^21.10.0",
|
|
@@ -61,6 +62,7 @@
|
|
|
61
62
|
"@testing-library/react": "^8.0.1",
|
|
62
63
|
"@types/react-router-dom": "^4.3.1",
|
|
63
64
|
"ast-types": "^0.13.3",
|
|
65
|
+
"bind-event-listener": "^2.1.0",
|
|
64
66
|
"jest-axe": "^4.0.0",
|
|
65
67
|
"jest-emotion": "^10.0.32",
|
|
66
68
|
"jscodeshift": "^0.13.0",
|
|
@@ -78,6 +80,7 @@
|
|
|
78
80
|
"import-structure": "atlassian-conventions"
|
|
79
81
|
},
|
|
80
82
|
"@repo/internal": {
|
|
83
|
+
"dom-events": "use-bind-event-listener",
|
|
81
84
|
"ui-components": "lite-mode",
|
|
82
85
|
"design-system": "v1",
|
|
83
86
|
"styling": [
|