@atlaskit/util-data-test 17.5.5 → 17.5.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 +6 -0
- package/dist/cjs/user-picker/ChevronRight.js +51 -0
- package/dist/cjs/user-picker/user-picker-team-data.js +3 -9
- package/dist/cjs/version.json +1 -1
- package/dist/es2019/user-picker/ChevronRight.js +24 -0
- package/dist/es2019/user-picker/user-picker-team-data.js +3 -9
- package/dist/es2019/version.json +1 -1
- package/dist/esm/user-picker/ChevronRight.js +34 -0
- package/dist/esm/user-picker/user-picker-team-data.js +3 -9
- package/dist/esm/version.json +1 -1
- package/dist/types/user-picker/ChevronRight.d.ts +3 -0
- package/dist/types-ts4.0/user-picker/ChevronRight.d.ts +3 -0
- package/package.json +4 -1
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,11 @@
|
|
|
1
1
|
# @atlaskit/util-data-test
|
|
2
2
|
|
|
3
|
+
## 17.5.6
|
|
4
|
+
|
|
5
|
+
### Patch Changes
|
|
6
|
+
|
|
7
|
+
- [`12e166e12ee`](https://bitbucket.org/atlassian/atlassian-frontend/commits/12e166e12ee) - Updated user picker team data to demonstrate a hover effect on the custom icon. New example component added for custom icon.
|
|
8
|
+
|
|
3
9
|
## 17.5.5
|
|
4
10
|
|
|
5
11
|
### Patch Changes
|
|
@@ -0,0 +1,51 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefault");
|
|
4
|
+
|
|
5
|
+
Object.defineProperty(exports, "__esModule", {
|
|
6
|
+
value: true
|
|
7
|
+
});
|
|
8
|
+
exports.default = void 0;
|
|
9
|
+
|
|
10
|
+
var _slicedToArray2 = _interopRequireDefault(require("@babel/runtime/helpers/slicedToArray"));
|
|
11
|
+
|
|
12
|
+
var _react = require("react");
|
|
13
|
+
|
|
14
|
+
var _core = require("@emotion/core");
|
|
15
|
+
|
|
16
|
+
var _chevronRight = _interopRequireDefault(require("@atlaskit/icon/glyph/chevron-right"));
|
|
17
|
+
|
|
18
|
+
var _colors = require("@atlaskit/theme/colors");
|
|
19
|
+
|
|
20
|
+
var _tokens = require("@atlaskit/tokens");
|
|
21
|
+
|
|
22
|
+
/** @jsx jsx */
|
|
23
|
+
var wrapper = (0, _core.css)({
|
|
24
|
+
display: 'flex'
|
|
25
|
+
});
|
|
26
|
+
|
|
27
|
+
var _default = function _default() {
|
|
28
|
+
var _useState = (0, _react.useState)(false),
|
|
29
|
+
_useState2 = (0, _slicedToArray2.default)(_useState, 2),
|
|
30
|
+
isMouseHovered = _useState2[0],
|
|
31
|
+
setHoverState = _useState2[1];
|
|
32
|
+
|
|
33
|
+
var onMouseEnter = (0, _react.useCallback)(function () {
|
|
34
|
+
return setHoverState(true);
|
|
35
|
+
}, [setHoverState]);
|
|
36
|
+
var onMouseLeave = (0, _react.useCallback)(function () {
|
|
37
|
+
return setHoverState(false);
|
|
38
|
+
}, [setHoverState]);
|
|
39
|
+
return (0, _core.jsx)("div", {
|
|
40
|
+
css: wrapper,
|
|
41
|
+
onMouseEnter: onMouseEnter,
|
|
42
|
+
onMouseLeave: onMouseLeave
|
|
43
|
+
}, (0, _core.jsx)(_chevronRight.default, {
|
|
44
|
+
testId: "chevron-right-icon",
|
|
45
|
+
label: "chevron right",
|
|
46
|
+
size: "large",
|
|
47
|
+
primaryColor: (0, _tokens.token)('color.text.subtlest', isMouseHovered ? _colors.N200 : _colors.N50)
|
|
48
|
+
}));
|
|
49
|
+
};
|
|
50
|
+
|
|
51
|
+
exports.default = _default;
|
|
@@ -9,7 +9,7 @@ exports.userPickerTeamData = void 0;
|
|
|
9
9
|
|
|
10
10
|
var _react = _interopRequireDefault(require("react"));
|
|
11
11
|
|
|
12
|
-
var
|
|
12
|
+
var _ChevronRight = _interopRequireDefault(require("./ChevronRight"));
|
|
13
13
|
|
|
14
14
|
var userPickerTeamData = [{
|
|
15
15
|
id: 'team-custom-icon',
|
|
@@ -17,10 +17,7 @@ var userPickerTeamData = [{
|
|
|
17
17
|
type: 'team',
|
|
18
18
|
fixed: false,
|
|
19
19
|
description: 'This team has a custom icon',
|
|
20
|
-
lozenge: /*#__PURE__*/_react.default.createElement(
|
|
21
|
-
label: "chevron right",
|
|
22
|
-
size: "large"
|
|
23
|
-
})
|
|
20
|
+
lozenge: /*#__PURE__*/_react.default.createElement(_ChevronRight.default, null)
|
|
24
21
|
}, {
|
|
25
22
|
id: 'team-custom-icon-and-byline',
|
|
26
23
|
name: 'Team with custom icon and byline',
|
|
@@ -28,9 +25,6 @@ var userPickerTeamData = [{
|
|
|
28
25
|
fixed: false,
|
|
29
26
|
description: 'This team has a custom icon and byline which is not reliant on memberCount and includesYou props',
|
|
30
27
|
byline: 'Select team members',
|
|
31
|
-
lozenge: /*#__PURE__*/_react.default.createElement(
|
|
32
|
-
label: "chevron right",
|
|
33
|
-
size: "large"
|
|
34
|
-
})
|
|
28
|
+
lozenge: /*#__PURE__*/_react.default.createElement(_ChevronRight.default, null)
|
|
35
29
|
}];
|
|
36
30
|
exports.userPickerTeamData = userPickerTeamData;
|
package/dist/cjs/version.json
CHANGED
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
/** @jsx jsx */
|
|
2
|
+
import { useCallback, useState } from 'react';
|
|
3
|
+
import { css, jsx } from '@emotion/core';
|
|
4
|
+
import ChevronRightIcon from '@atlaskit/icon/glyph/chevron-right';
|
|
5
|
+
import { N50, N200 } from '@atlaskit/theme/colors';
|
|
6
|
+
import { token } from '@atlaskit/tokens';
|
|
7
|
+
const wrapper = css({
|
|
8
|
+
display: 'flex'
|
|
9
|
+
});
|
|
10
|
+
export default (() => {
|
|
11
|
+
const [isMouseHovered, setHoverState] = useState(false);
|
|
12
|
+
const onMouseEnter = useCallback(() => setHoverState(true), [setHoverState]);
|
|
13
|
+
const onMouseLeave = useCallback(() => setHoverState(false), [setHoverState]);
|
|
14
|
+
return jsx("div", {
|
|
15
|
+
css: wrapper,
|
|
16
|
+
onMouseEnter: onMouseEnter,
|
|
17
|
+
onMouseLeave: onMouseLeave
|
|
18
|
+
}, jsx(ChevronRightIcon, {
|
|
19
|
+
testId: "chevron-right-icon",
|
|
20
|
+
label: "chevron right",
|
|
21
|
+
size: "large",
|
|
22
|
+
primaryColor: token('color.text.subtlest', isMouseHovered ? N200 : N50)
|
|
23
|
+
}));
|
|
24
|
+
});
|
|
@@ -1,15 +1,12 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
|
-
import
|
|
2
|
+
import ChevronRight from './ChevronRight';
|
|
3
3
|
export const userPickerTeamData = [{
|
|
4
4
|
id: 'team-custom-icon',
|
|
5
5
|
name: 'Team with custom icon',
|
|
6
6
|
type: 'team',
|
|
7
7
|
fixed: false,
|
|
8
8
|
description: 'This team has a custom icon',
|
|
9
|
-
lozenge: /*#__PURE__*/React.createElement(
|
|
10
|
-
label: "chevron right",
|
|
11
|
-
size: "large"
|
|
12
|
-
})
|
|
9
|
+
lozenge: /*#__PURE__*/React.createElement(ChevronRight, null)
|
|
13
10
|
}, {
|
|
14
11
|
id: 'team-custom-icon-and-byline',
|
|
15
12
|
name: 'Team with custom icon and byline',
|
|
@@ -17,8 +14,5 @@ export const userPickerTeamData = [{
|
|
|
17
14
|
fixed: false,
|
|
18
15
|
description: 'This team has a custom icon and byline which is not reliant on memberCount and includesYou props',
|
|
19
16
|
byline: 'Select team members',
|
|
20
|
-
lozenge: /*#__PURE__*/React.createElement(
|
|
21
|
-
label: "chevron right",
|
|
22
|
-
size: "large"
|
|
23
|
-
})
|
|
17
|
+
lozenge: /*#__PURE__*/React.createElement(ChevronRight, null)
|
|
24
18
|
}];
|
package/dist/es2019/version.json
CHANGED
|
@@ -0,0 +1,34 @@
|
|
|
1
|
+
import _slicedToArray from "@babel/runtime/helpers/slicedToArray";
|
|
2
|
+
|
|
3
|
+
/** @jsx jsx */
|
|
4
|
+
import { useCallback, useState } from 'react';
|
|
5
|
+
import { css, jsx } from '@emotion/core';
|
|
6
|
+
import ChevronRightIcon from '@atlaskit/icon/glyph/chevron-right';
|
|
7
|
+
import { N50, N200 } from '@atlaskit/theme/colors';
|
|
8
|
+
import { token } from '@atlaskit/tokens';
|
|
9
|
+
var wrapper = css({
|
|
10
|
+
display: 'flex'
|
|
11
|
+
});
|
|
12
|
+
export default (function () {
|
|
13
|
+
var _useState = useState(false),
|
|
14
|
+
_useState2 = _slicedToArray(_useState, 2),
|
|
15
|
+
isMouseHovered = _useState2[0],
|
|
16
|
+
setHoverState = _useState2[1];
|
|
17
|
+
|
|
18
|
+
var onMouseEnter = useCallback(function () {
|
|
19
|
+
return setHoverState(true);
|
|
20
|
+
}, [setHoverState]);
|
|
21
|
+
var onMouseLeave = useCallback(function () {
|
|
22
|
+
return setHoverState(false);
|
|
23
|
+
}, [setHoverState]);
|
|
24
|
+
return jsx("div", {
|
|
25
|
+
css: wrapper,
|
|
26
|
+
onMouseEnter: onMouseEnter,
|
|
27
|
+
onMouseLeave: onMouseLeave
|
|
28
|
+
}, jsx(ChevronRightIcon, {
|
|
29
|
+
testId: "chevron-right-icon",
|
|
30
|
+
label: "chevron right",
|
|
31
|
+
size: "large",
|
|
32
|
+
primaryColor: token('color.text.subtlest', isMouseHovered ? N200 : N50)
|
|
33
|
+
}));
|
|
34
|
+
});
|
|
@@ -1,15 +1,12 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
|
-
import
|
|
2
|
+
import ChevronRight from './ChevronRight';
|
|
3
3
|
export var userPickerTeamData = [{
|
|
4
4
|
id: 'team-custom-icon',
|
|
5
5
|
name: 'Team with custom icon',
|
|
6
6
|
type: 'team',
|
|
7
7
|
fixed: false,
|
|
8
8
|
description: 'This team has a custom icon',
|
|
9
|
-
lozenge: /*#__PURE__*/React.createElement(
|
|
10
|
-
label: "chevron right",
|
|
11
|
-
size: "large"
|
|
12
|
-
})
|
|
9
|
+
lozenge: /*#__PURE__*/React.createElement(ChevronRight, null)
|
|
13
10
|
}, {
|
|
14
11
|
id: 'team-custom-icon-and-byline',
|
|
15
12
|
name: 'Team with custom icon and byline',
|
|
@@ -17,8 +14,5 @@ export var userPickerTeamData = [{
|
|
|
17
14
|
fixed: false,
|
|
18
15
|
description: 'This team has a custom icon and byline which is not reliant on memberCount and includesYou props',
|
|
19
16
|
byline: 'Select team members',
|
|
20
|
-
lozenge: /*#__PURE__*/React.createElement(
|
|
21
|
-
label: "chevron right",
|
|
22
|
-
size: "large"
|
|
23
|
-
})
|
|
17
|
+
lozenge: /*#__PURE__*/React.createElement(ChevronRight, null)
|
|
24
18
|
}];
|
package/dist/esm/version.json
CHANGED
package/package.json
CHANGED
|
@@ -7,7 +7,7 @@
|
|
|
7
7
|
}
|
|
8
8
|
},
|
|
9
9
|
"name": "@atlaskit/util-data-test",
|
|
10
|
-
"version": "17.5.
|
|
10
|
+
"version": "17.5.6",
|
|
11
11
|
"description": "Shared test and story data",
|
|
12
12
|
"publishConfig": {
|
|
13
13
|
"registry": "https://registry.npmjs.org/"
|
|
@@ -80,9 +80,12 @@
|
|
|
80
80
|
"@atlaskit/mention": "^21.0.0",
|
|
81
81
|
"@atlaskit/profilecard": "^17.2.0",
|
|
82
82
|
"@atlaskit/task-decision": "^17.5.0",
|
|
83
|
+
"@atlaskit/theme": "^12.2.1",
|
|
84
|
+
"@atlaskit/tokens": "^0.10.22",
|
|
83
85
|
"@atlaskit/user-picker": "^9.4.0",
|
|
84
86
|
"@atlaskit/util-service-support": "^6.1.0",
|
|
85
87
|
"@babel/runtime": "^7.0.0",
|
|
88
|
+
"@emotion/core": "^10.0.9",
|
|
86
89
|
"lodash": "^4.17.21",
|
|
87
90
|
"memoize-one": "^6.0.0",
|
|
88
91
|
"uuid": "^3.1.0"
|