@atlaskit/mention 21.0.14 → 21.0.16
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 +12 -0
- package/dist/cjs/api/TeamMentionResource.js +2 -1
- package/dist/cjs/components/Mention/PrimitiveMention.js +20 -22
- package/dist/cjs/components/MentionDescriptionByline/styles.js +1 -3
- package/dist/cjs/components/MentionItem/index.js +1 -3
- package/dist/cjs/components/MentionItem/styles.js +4 -6
- package/dist/cjs/components/MentionList/styles.js +1 -3
- package/dist/cjs/components/MentionListError/styles.js +1 -3
- package/dist/cjs/components/MentionPicker/styles.js +1 -3
- package/dist/cjs/components/Scrollable/styles.js +1 -3
- package/dist/cjs/components/TeamMentionHighlight/styles.js +1 -3
- package/dist/cjs/shared-styles.js +2 -4
- package/dist/cjs/version.json +1 -1
- package/dist/es2019/api/TeamMentionResource.js +2 -1
- package/dist/es2019/components/Mention/PrimitiveMention.js +20 -21
- package/dist/es2019/components/MentionDescriptionByline/styles.js +1 -2
- package/dist/es2019/components/MentionItem/index.js +1 -2
- package/dist/es2019/components/MentionItem/styles.js +4 -5
- package/dist/es2019/components/MentionList/styles.js +1 -2
- package/dist/es2019/components/MentionListError/styles.js +3 -4
- package/dist/es2019/components/MentionPicker/styles.js +2 -3
- package/dist/es2019/components/Scrollable/styles.js +1 -2
- package/dist/es2019/components/TeamMentionHighlight/styles.js +1 -2
- package/dist/es2019/shared-styles.js +2 -3
- package/dist/es2019/version.json +1 -1
- package/dist/esm/api/TeamMentionResource.js +2 -1
- package/dist/esm/components/Mention/PrimitiveMention.js +20 -21
- package/dist/esm/components/MentionDescriptionByline/styles.js +1 -2
- package/dist/esm/components/MentionItem/index.js +1 -2
- package/dist/esm/components/MentionItem/styles.js +4 -5
- package/dist/esm/components/MentionList/styles.js +1 -2
- package/dist/esm/components/MentionListError/styles.js +1 -2
- package/dist/esm/components/MentionPicker/styles.js +1 -2
- package/dist/esm/components/Scrollable/styles.js +1 -2
- package/dist/esm/components/TeamMentionHighlight/styles.js +1 -2
- package/dist/esm/shared-styles.js +2 -3
- package/dist/esm/version.json +1 -1
- package/package.json +4 -4
- package/report.api.md +1 -1
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,17 @@
|
|
|
1
1
|
# @atlaskit/mention
|
|
2
2
|
|
|
3
|
+
## 21.0.16
|
|
4
|
+
|
|
5
|
+
### Patch Changes
|
|
6
|
+
|
|
7
|
+
- [`6455cf006b3`](https://bitbucket.org/atlassian/atlassian-frontend/commits/6455cf006b3) - Builds for this package now pass through a tokens babel plugin, removing runtime invocations of the tokens() function and improving performance.
|
|
8
|
+
|
|
9
|
+
## 21.0.15
|
|
10
|
+
|
|
11
|
+
### Patch Changes
|
|
12
|
+
|
|
13
|
+
- [`9ace7f714e3`](https://bitbucket.org/atlassian/atlassian-frontend/commits/9ace7f714e3) - Handle new Teams ARI format in mentions
|
|
14
|
+
|
|
3
15
|
## 21.0.14
|
|
4
16
|
|
|
5
17
|
### Patch Changes
|
|
@@ -356,7 +356,8 @@ var TeamMentionResource = /*#__PURE__*/function (_MentionResource) {
|
|
|
356
356
|
value: function trimTeamARI() {
|
|
357
357
|
var teamId = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : '';
|
|
358
358
|
var TEAM_ARI_PREFIX = 'ari:cloud:teams::team/';
|
|
359
|
-
|
|
359
|
+
var IDENTITY_TEAM_ARI_PREFIX = 'ari:cloud:identity::team/';
|
|
360
|
+
return teamId.replace(TEAM_ARI_PREFIX, '').replace(IDENTITY_TEAM_ARI_PREFIX, '');
|
|
360
361
|
}
|
|
361
362
|
}]);
|
|
362
363
|
return TeamMentionResource;
|
|
@@ -21,8 +21,6 @@ var _components = require("@atlaskit/theme/components");
|
|
|
21
21
|
|
|
22
22
|
var _colors = require("@atlaskit/theme/colors");
|
|
23
23
|
|
|
24
|
-
var _tokens = require("@atlaskit/tokens");
|
|
25
|
-
|
|
26
24
|
var _types = require("../../types");
|
|
27
25
|
|
|
28
26
|
var _react2 = require("react");
|
|
@@ -33,51 +31,51 @@ var _mentionStyle, _templateObject;
|
|
|
33
31
|
|
|
34
32
|
var mentionStyle = (_mentionStyle = {}, (0, _defineProperty2.default)(_mentionStyle, _types.MentionType.SELF, {
|
|
35
33
|
background: (0, _components.themed)({
|
|
36
|
-
light: (
|
|
37
|
-
dark: (
|
|
34
|
+
light: "var(--ds-background-brand-bold, ".concat(_colors.B400, ")"),
|
|
35
|
+
dark: "var(--ds-background-brand-bold, ".concat(_colors.B200, ")")
|
|
38
36
|
}),
|
|
39
37
|
borderColor: 'transparent',
|
|
40
38
|
text: (0, _components.themed)({
|
|
41
|
-
light: (
|
|
42
|
-
dark: (
|
|
39
|
+
light: "var(--ds-text-inverse, ".concat(_colors.N20, ")"),
|
|
40
|
+
dark: "var(--ds-text-inverse, ".concat(_colors.DN30, ")")
|
|
43
41
|
}),
|
|
44
42
|
hoveredBackground: (0, _components.themed)({
|
|
45
|
-
light: (
|
|
46
|
-
dark: (
|
|
43
|
+
light: "var(--ds-background-brand-bold-hovered, ".concat(_colors.B400, ")"),
|
|
44
|
+
dark: "var(--ds-background-brand-bold-hovered, ".concat(_colors.B200, ")")
|
|
47
45
|
}),
|
|
48
46
|
pressedBackground: (0, _components.themed)({
|
|
49
|
-
light: (
|
|
50
|
-
dark: (
|
|
47
|
+
light: "var(--ds-background-brand-bold-pressed, ".concat(_colors.B400, ")"),
|
|
48
|
+
dark: "var(--ds-background-brand-bold-pressed, ".concat(_colors.B200, ")")
|
|
51
49
|
})
|
|
52
50
|
}), (0, _defineProperty2.default)(_mentionStyle, _types.MentionType.RESTRICTED, {
|
|
53
51
|
background: 'transparent',
|
|
54
52
|
borderColor: (0, _components.themed)({
|
|
55
|
-
light: (
|
|
56
|
-
dark: (
|
|
53
|
+
light: "var(--ds-border-bold, ".concat(_colors.N500, ")"),
|
|
54
|
+
dark: "var(--ds-border-bold, ".concat(_colors.DN80, ")")
|
|
57
55
|
}),
|
|
58
56
|
text: (0, _components.themed)({
|
|
59
|
-
light: (
|
|
60
|
-
dark: (
|
|
57
|
+
light: "var(--ds-text, ".concat(_colors.N500, ")"),
|
|
58
|
+
dark: "var(--ds-text, ".concat(_colors.DN100, ")")
|
|
61
59
|
}),
|
|
62
60
|
hoveredBackground: 'transparent',
|
|
63
61
|
pressedBackground: 'transparent'
|
|
64
62
|
}), (0, _defineProperty2.default)(_mentionStyle, _types.MentionType.DEFAULT, {
|
|
65
63
|
background: (0, _components.themed)({
|
|
66
|
-
light: (
|
|
67
|
-
dark: (
|
|
64
|
+
light: "var(--ds-background-neutral, ".concat(_colors.N30A, ")"),
|
|
65
|
+
dark: "var(--ds-background-neutral, ".concat(_colors.DN80, ")")
|
|
68
66
|
}),
|
|
69
67
|
borderColor: 'transparent',
|
|
70
68
|
text: (0, _components.themed)({
|
|
71
|
-
light: (
|
|
72
|
-
dark: (
|
|
69
|
+
light: "var(--ds-text-subtle, ".concat(_colors.N500, ")"),
|
|
70
|
+
dark: "var(--ds-text-subtle, ".concat(_colors.DN800, ")")
|
|
73
71
|
}),
|
|
74
72
|
hoveredBackground: (0, _components.themed)({
|
|
75
|
-
light: (
|
|
76
|
-
dark: (
|
|
73
|
+
light: "var(--ds-background-neutral-hovered, ".concat(_colors.N30A, ")"),
|
|
74
|
+
dark: "var(--ds-background-neutral-hovered, ".concat(_colors.DN80, ")")
|
|
77
75
|
}),
|
|
78
76
|
pressedBackground: (0, _components.themed)({
|
|
79
|
-
light: (
|
|
80
|
-
dark: (
|
|
77
|
+
light: "var(--ds-background-neutral-pressed, ".concat(_colors.N30A, ")"),
|
|
78
|
+
dark: "var(--ds-background-neutral-pressed, ".concat(_colors.DN80, ")")
|
|
81
79
|
})
|
|
82
80
|
}), _mentionStyle);
|
|
83
81
|
|
|
@@ -13,10 +13,8 @@ var _styled = _interopRequireDefault(require("@emotion/styled"));
|
|
|
13
13
|
|
|
14
14
|
var _colors = require("@atlaskit/theme/colors");
|
|
15
15
|
|
|
16
|
-
var _tokens = require("@atlaskit/tokens");
|
|
17
|
-
|
|
18
16
|
var _templateObject;
|
|
19
17
|
|
|
20
|
-
var DescriptionBylineStyle = _styled.default.span(_templateObject || (_templateObject = (0, _taggedTemplateLiteral2.default)(["\n color: ", ";\n font-size: 12px;\n\n margin-top: 2px;\n\n display: block;\n overflow: hidden;\n text-overflow: ellipsis;\n white-space: nowrap;\n"])), (
|
|
18
|
+
var DescriptionBylineStyle = _styled.default.span(_templateObject || (_templateObject = (0, _taggedTemplateLiteral2.default)(["\n color: ", ";\n font-size: 12px;\n\n margin-top: 2px;\n\n display: block;\n overflow: hidden;\n text-overflow: ellipsis;\n white-space: nowrap;\n"])), "var(--ds-text-subtlest, ".concat(_colors.N100, ")"));
|
|
21
19
|
|
|
22
20
|
exports.DescriptionBylineStyle = DescriptionBylineStyle;
|
|
@@ -37,8 +37,6 @@ var _colors = require("@atlaskit/theme/colors");
|
|
|
37
37
|
|
|
38
38
|
var _react = _interopRequireDefault(require("react"));
|
|
39
39
|
|
|
40
|
-
var _tokens = require("@atlaskit/tokens");
|
|
41
|
-
|
|
42
40
|
var _types = require("../../types");
|
|
43
41
|
|
|
44
42
|
var _i18n = require("../../util/i18n");
|
|
@@ -141,7 +139,7 @@ var MentionItem = /*#__PURE__*/function (_React$PureComponent) {
|
|
|
141
139
|
|
|
142
140
|
var restricted = (0, _types.isRestricted)(accessLevel);
|
|
143
141
|
var nameHighlights = highlight && highlight.name;
|
|
144
|
-
var borderColor = selected ? (
|
|
142
|
+
var borderColor = selected ? "var(--ds-border, ".concat(_colors.N30, ")") : undefined;
|
|
145
143
|
return /*#__PURE__*/_react.default.createElement(_MessagesIntlProvider.default, null, /*#__PURE__*/_react.default.createElement(_styles.MentionItemStyle, {
|
|
146
144
|
selected: selected,
|
|
147
145
|
onMouseDown: this.onMentionSelected,
|
|
@@ -13,8 +13,6 @@ var _styled = _interopRequireDefault(require("@emotion/styled"));
|
|
|
13
13
|
|
|
14
14
|
var _colors = require("@atlaskit/theme/colors");
|
|
15
15
|
|
|
16
|
-
var _tokens = require("@atlaskit/tokens");
|
|
17
|
-
|
|
18
16
|
var _templateObject, _templateObject2, _templateObject3, _templateObject4, _templateObject5, _templateObject6, _templateObject7, _templateObject8;
|
|
19
17
|
|
|
20
18
|
var RowStyle = _styled.default.div(_templateObject || (_templateObject = (0, _taggedTemplateLiteral2.default)(["\n align-items: center;\n display: flex;\n flex-direction: row;\n flex-wrap: wrap;\n overflow: hidden;\n padding: 6px 14px;\n text-overflow: ellipsis;\n vertical-align: middle;\n"])));
|
|
@@ -33,7 +31,7 @@ var NameSectionStyle = _styled.default.div(_templateObject3 || (_templateObject3
|
|
|
33
31
|
|
|
34
32
|
exports.NameSectionStyle = NameSectionStyle;
|
|
35
33
|
|
|
36
|
-
var FullNameStyle = _styled.default.span(_templateObject4 || (_templateObject4 = (0, _taggedTemplateLiteral2.default)(["\n display: block;\n overflow: hidden;\n text-overflow: ellipsis;\n white-space: nowrap;\n color: ", ";\n"])), (
|
|
34
|
+
var FullNameStyle = _styled.default.span(_templateObject4 || (_templateObject4 = (0, _taggedTemplateLiteral2.default)(["\n display: block;\n overflow: hidden;\n text-overflow: ellipsis;\n white-space: nowrap;\n color: ", ";\n"])), "var(--ds-text, ".concat(_colors.N900, ")"));
|
|
37
35
|
|
|
38
36
|
exports.FullNameStyle = FullNameStyle;
|
|
39
37
|
|
|
@@ -43,18 +41,18 @@ var InfoSectionStyle = _styled.default.div(_templateObject5 || (_templateObject5
|
|
|
43
41
|
|
|
44
42
|
exports.InfoSectionStyle = InfoSectionStyle;
|
|
45
43
|
|
|
46
|
-
var TimeStyle = _styled.default.div(_templateObject6 || (_templateObject6 = (0, _taggedTemplateLiteral2.default)(["\n margin-left: 20px;\n flex: none;\n color: ", ";\n font-size: 12px;\n"])), (
|
|
44
|
+
var TimeStyle = _styled.default.div(_templateObject6 || (_templateObject6 = (0, _taggedTemplateLiteral2.default)(["\n margin-left: 20px;\n flex: none;\n color: ", ";\n font-size: 12px;\n"])), "var(--ds-text-subtlest, ".concat(_colors.N100, ")"));
|
|
47
45
|
|
|
48
46
|
exports.TimeStyle = TimeStyle;
|
|
49
47
|
var MENTION_ITEM_HEIGHT = 48;
|
|
50
48
|
exports.MENTION_ITEM_HEIGHT = MENTION_ITEM_HEIGHT;
|
|
51
49
|
|
|
52
50
|
var MentionItemStyle = _styled.default.div(_templateObject7 || (_templateObject7 = (0, _taggedTemplateLiteral2.default)(["\n background-color: ", ";\n display: block;\n overflow: hidden;\n list-style-type: none;\n height: ", "px;\n line-height: 1.2;\n cursor: pointer;\n"])), function (props) {
|
|
53
|
-
return props.selected ? (
|
|
51
|
+
return props.selected ? "var(--ds-background-selected, ".concat(_colors.N30, ")") : 'transparent';
|
|
54
52
|
}, MENTION_ITEM_HEIGHT);
|
|
55
53
|
|
|
56
54
|
exports.MentionItemStyle = MentionItemStyle;
|
|
57
55
|
|
|
58
|
-
var AccessSectionStyle = _styled.default.div(_templateObject8 || (_templateObject8 = (0, _taggedTemplateLiteral2.default)(["\n padding-left: 5px;\n color: ", ";\n"])), (
|
|
56
|
+
var AccessSectionStyle = _styled.default.div(_templateObject8 || (_templateObject8 = (0, _taggedTemplateLiteral2.default)(["\n padding-left: 5px;\n color: ", ";\n"])), "var(--ds-text-subtle, ".concat(_colors.N500, ")"));
|
|
59
57
|
|
|
60
58
|
exports.AccessSectionStyle = AccessSectionStyle;
|
|
@@ -11,14 +11,12 @@ var _taggedTemplateLiteral2 = _interopRequireDefault(require("@babel/runtime/hel
|
|
|
11
11
|
|
|
12
12
|
var _styled = _interopRequireDefault(require("@emotion/styled"));
|
|
13
13
|
|
|
14
|
-
var _tokens = require("@atlaskit/tokens");
|
|
15
|
-
|
|
16
14
|
var _sharedStyles = require("../../shared-styles");
|
|
17
15
|
|
|
18
16
|
var _templateObject;
|
|
19
17
|
|
|
20
18
|
var MentionListStyle = _styled.default.div(_templateObject || (_templateObject = (0, _taggedTemplateLiteral2.default)(["\n display: ", ";\n\n /* list style */\n width: ", ";\n color: ", ";\n\n border: 1px solid ", ";\n border-radius: ", ";\n box-shadow: ", ";\n"])), function (props) {
|
|
21
19
|
return props.empty ? 'none' : 'block';
|
|
22
|
-
}, _sharedStyles.mentionListWidth, (
|
|
20
|
+
}, _sharedStyles.mentionListWidth, "var(--ds-text-subtle, #333)", _sharedStyles.noDialogContainerBorderColor, _sharedStyles.noDialogContainerBorderRadius, _sharedStyles.noDialogContainerBoxShadow);
|
|
23
21
|
|
|
24
22
|
exports.MentionListStyle = MentionListStyle;
|
|
@@ -11,8 +11,6 @@ var _taggedTemplateLiteral2 = _interopRequireDefault(require("@babel/runtime/hel
|
|
|
11
11
|
|
|
12
12
|
var _styled = _interopRequireDefault(require("@emotion/styled"));
|
|
13
13
|
|
|
14
|
-
var _tokens = require("@atlaskit/tokens");
|
|
15
|
-
|
|
16
14
|
var _constants = require("@atlaskit/theme/constants");
|
|
17
15
|
|
|
18
16
|
var _colors = require("@atlaskit/theme/colors");
|
|
@@ -21,7 +19,7 @@ var _typography = require("@atlaskit/theme/typography");
|
|
|
21
19
|
|
|
22
20
|
var _templateObject, _templateObject2, _templateObject3, _templateObject4;
|
|
23
21
|
|
|
24
|
-
var MentionListErrorStyle = _styled.default.div(_templateObject || (_templateObject = (0, _taggedTemplateLiteral2.default)(["\n align-items: center;\n display: flex;\n justify-content: center;\n flex-direction: column;\n background-color: ", ";\n color: ", ";\n border: 1px solid ", ";\n border-radius: ", "px;\n"])), (
|
|
22
|
+
var MentionListErrorStyle = _styled.default.div(_templateObject || (_templateObject = (0, _taggedTemplateLiteral2.default)(["\n align-items: center;\n display: flex;\n justify-content: center;\n flex-direction: column;\n background-color: ", ";\n color: ", ";\n border: 1px solid ", ";\n border-radius: ", "px;\n"])), "var(--ds-surface-overlay, white)", "var(--ds-text-subtle, ".concat(_colors.N500, ")"), "var(--ds-surface-overlay, #fff)", (0, _constants.borderRadius)());
|
|
25
23
|
|
|
26
24
|
exports.MentionListErrorStyle = MentionListErrorStyle;
|
|
27
25
|
|
|
@@ -11,8 +11,6 @@ var _taggedTemplateLiteral2 = _interopRequireDefault(require("@babel/runtime/hel
|
|
|
11
11
|
|
|
12
12
|
var _styled = _interopRequireDefault(require("@emotion/styled"));
|
|
13
13
|
|
|
14
|
-
var _tokens = require("@atlaskit/tokens");
|
|
15
|
-
|
|
16
14
|
var _colors = require("@atlaskit/theme/colors");
|
|
17
15
|
|
|
18
16
|
var _sharedStyles = require("../../shared-styles");
|
|
@@ -25,6 +23,6 @@ var MentionPickerStyle = _styled.default.div(_templateObject || (_templateObject
|
|
|
25
23
|
|
|
26
24
|
exports.MentionPickerStyle = MentionPickerStyle;
|
|
27
25
|
|
|
28
|
-
var MentionPickerInfoStyle = _styled.default.div(_templateObject2 || (_templateObject2 = (0, _taggedTemplateLiteral2.default)(["\n background: ", ";\n color: ", ";\n border: 1px solid ", ";\n border-radius: ", ";\n box-shadow: ", ";\n display: block;\n width: ", ";\n white-space: nowrap;\n\n & {\n p {\n margin: 0;\n overflow: hidden;\n padding: 9px;\n text-overflow: ellipsis;\n }\n }\n"])), (
|
|
26
|
+
var MentionPickerInfoStyle = _styled.default.div(_templateObject2 || (_templateObject2 = (0, _taggedTemplateLiteral2.default)(["\n background: ", ";\n color: ", ";\n border: 1px solid ", ";\n border-radius: ", ";\n box-shadow: ", ";\n display: block;\n width: ", ";\n white-space: nowrap;\n\n & {\n p {\n margin: 0;\n overflow: hidden;\n padding: 9px;\n text-overflow: ellipsis;\n }\n }\n"])), "var(--ds-surface, #fff)", "var(--ds-text-subtlest, ".concat(_colors.N100, ")"), _sharedStyles.noDialogContainerBorderColor, _sharedStyles.noDialogContainerBorderRadius, _sharedStyles.noDialogContainerBoxShadow, _sharedStyles.mentionListWidth);
|
|
29
27
|
|
|
30
28
|
exports.MentionPickerInfoStyle = MentionPickerInfoStyle;
|
|
@@ -11,14 +11,12 @@ var _taggedTemplateLiteral2 = _interopRequireDefault(require("@babel/runtime/hel
|
|
|
11
11
|
|
|
12
12
|
var _styled = _interopRequireDefault(require("@emotion/styled"));
|
|
13
13
|
|
|
14
|
-
var _tokens = require("@atlaskit/tokens");
|
|
15
|
-
|
|
16
14
|
var _constants = require("@atlaskit/theme/constants");
|
|
17
15
|
|
|
18
16
|
var _sharedStyles = require("../../shared-styles");
|
|
19
17
|
|
|
20
18
|
var _templateObject;
|
|
21
19
|
|
|
22
|
-
var ScrollableStyle = _styled.default.div(_templateObject || (_templateObject = (0, _taggedTemplateLiteral2.default)(["\n display: block;\n overflow-x: hidden;\n overflow-y: auto;\n\n padding: 4px 0;\n margin: 0;\n\n background: ", ";\n max-height: ", ";\n\n border-radius: ", "px;\n"])), (
|
|
20
|
+
var ScrollableStyle = _styled.default.div(_templateObject || (_templateObject = (0, _taggedTemplateLiteral2.default)(["\n display: block;\n overflow-x: hidden;\n overflow-y: auto;\n\n padding: 4px 0;\n margin: 0;\n\n background: ", ";\n max-height: ", ";\n\n border-radius: ", "px;\n"])), "var(--ds-surface, white)", _sharedStyles.scrollableMaxHeight, (0, _constants.borderRadius)());
|
|
23
21
|
|
|
24
22
|
exports.ScrollableStyle = ScrollableStyle;
|
|
@@ -17,8 +17,6 @@ var _colors = require("@atlaskit/theme/colors");
|
|
|
17
17
|
|
|
18
18
|
var _typography = require("@atlaskit/theme/typography");
|
|
19
19
|
|
|
20
|
-
var _tokens = require("@atlaskit/tokens");
|
|
21
|
-
|
|
22
20
|
var _templateObject, _templateObject2, _templateObject3, _templateObject4, _templateObject5, _templateObject6, _templateObject7, _templateObject8;
|
|
23
21
|
|
|
24
22
|
var Actions = _styled.default.div(_templateObject || (_templateObject = (0, _taggedTemplateLiteral2.default)(["\n justify-content: flex-end;\n margin-top: -", "px; /* Negative margin is used to middle align x button with title */\n margin-right: ", "px;\n"])), (0, _constants.gridSize)() * 0.5, (0, _constants.gridSize)() * 0.5);
|
|
@@ -33,7 +31,7 @@ var Heading = _styled.default.div(_templateObject3 || (_templateObject3 = (0, _t
|
|
|
33
31
|
|
|
34
32
|
exports.Heading = Heading;
|
|
35
33
|
|
|
36
|
-
var Card = _styled.default.div(_templateObject4 || (_templateObject4 = (0, _taggedTemplateLiteral2.default)(["\n display: flex;\n flex-direction: row;\n background-color: ", ";\n overflow: hidden;\n line-height: 21px;\n padding-top: ", "px;\n padding-bottom: ", "px;\n padding-left: ", "px;\n padding-right: 0px;\n margin-top: -", "px; /* Negative margin is used to fill the entire top of the mention dropdown with background colour of highlight */\n"])), (
|
|
34
|
+
var Card = _styled.default.div(_templateObject4 || (_templateObject4 = (0, _taggedTemplateLiteral2.default)(["\n display: flex;\n flex-direction: row;\n background-color: ", ";\n overflow: hidden;\n line-height: 21px;\n padding-top: ", "px;\n padding-bottom: ", "px;\n padding-left: ", "px;\n padding-right: 0px;\n margin-top: -", "px; /* Negative margin is used to fill the entire top of the mention dropdown with background colour of highlight */\n"])), "var(--ds-background-discovery, ".concat(_colors.P50, ")"), (0, _constants.gridSize)() * 2, (0, _constants.gridSize)() * 2, (0, _constants.gridSize)() * 2, (0, _constants.gridSize)() * 0.5);
|
|
37
35
|
|
|
38
36
|
exports.Card = Card;
|
|
39
37
|
|
|
@@ -9,14 +9,12 @@ var _constants = require("@atlaskit/theme/constants");
|
|
|
9
9
|
|
|
10
10
|
var _colors = require("@atlaskit/theme/colors");
|
|
11
11
|
|
|
12
|
-
var
|
|
13
|
-
|
|
14
|
-
var noDialogContainerBorderColor = (0, _tokens.token)('color.border', _colors.N40); // This has not been confirmed by the ADG yet
|
|
12
|
+
var noDialogContainerBorderColor = "var(--ds-border, ".concat(_colors.N40, ")"); // This has not been confirmed by the ADG yet
|
|
15
13
|
|
|
16
14
|
exports.noDialogContainerBorderColor = noDialogContainerBorderColor;
|
|
17
15
|
var noDialogContainerBorderRadius = "".concat((0, _constants.borderRadius)(), "px");
|
|
18
16
|
exports.noDialogContainerBorderRadius = noDialogContainerBorderRadius;
|
|
19
|
-
var noDialogContainerBoxShadow = (
|
|
17
|
+
var noDialogContainerBoxShadow = "var(--ds-shadow-overlay, 0 4px 8px -2px rgba(9, 30, 66, 0.25), 0 0 1px rgba(9, 30, 66, 0.31))"; // Copied from droplist style
|
|
20
18
|
|
|
21
19
|
exports.noDialogContainerBoxShadow = noDialogContainerBoxShadow;
|
|
22
20
|
var scrollableMaxHeight = '264px';
|
package/dist/cjs/version.json
CHANGED
|
@@ -212,7 +212,8 @@ export default class TeamMentionResource extends MentionResource {
|
|
|
212
212
|
|
|
213
213
|
trimTeamARI(teamId = '') {
|
|
214
214
|
const TEAM_ARI_PREFIX = 'ari:cloud:teams::team/';
|
|
215
|
-
|
|
215
|
+
const IDENTITY_TEAM_ARI_PREFIX = 'ari:cloud:identity::team/';
|
|
216
|
+
return teamId.replace(TEAM_ARI_PREFIX, '').replace(IDENTITY_TEAM_ARI_PREFIX, '');
|
|
216
217
|
}
|
|
217
218
|
|
|
218
219
|
}
|
|
@@ -4,59 +4,58 @@ import _extends from "@babel/runtime/helpers/extends";
|
|
|
4
4
|
import { jsx, css } from '@emotion/react';
|
|
5
5
|
import { themed, useGlobalTheme } from '@atlaskit/theme/components';
|
|
6
6
|
import { B400, B200, N500, DN800, DN100, DN80, N30A, DN30, N20 } from '@atlaskit/theme/colors';
|
|
7
|
-
import { token } from '@atlaskit/tokens';
|
|
8
7
|
import { MentionType } from '../../types';
|
|
9
8
|
import { forwardRef } from 'react';
|
|
10
9
|
const mentionStyle = {
|
|
11
10
|
[MentionType.SELF]: {
|
|
12
11
|
background: themed({
|
|
13
|
-
light:
|
|
14
|
-
dark:
|
|
12
|
+
light: `var(--ds-background-brand-bold, ${B400})`,
|
|
13
|
+
dark: `var(--ds-background-brand-bold, ${B200})`
|
|
15
14
|
}),
|
|
16
15
|
borderColor: 'transparent',
|
|
17
16
|
text: themed({
|
|
18
|
-
light:
|
|
19
|
-
dark:
|
|
17
|
+
light: `var(--ds-text-inverse, ${N20})`,
|
|
18
|
+
dark: `var(--ds-text-inverse, ${DN30})`
|
|
20
19
|
}),
|
|
21
20
|
hoveredBackground: themed({
|
|
22
|
-
light:
|
|
23
|
-
dark:
|
|
21
|
+
light: `var(--ds-background-brand-bold-hovered, ${B400})`,
|
|
22
|
+
dark: `var(--ds-background-brand-bold-hovered, ${B200})`
|
|
24
23
|
}),
|
|
25
24
|
pressedBackground: themed({
|
|
26
|
-
light:
|
|
27
|
-
dark:
|
|
25
|
+
light: `var(--ds-background-brand-bold-pressed, ${B400})`,
|
|
26
|
+
dark: `var(--ds-background-brand-bold-pressed, ${B200})`
|
|
28
27
|
})
|
|
29
28
|
},
|
|
30
29
|
[MentionType.RESTRICTED]: {
|
|
31
30
|
background: 'transparent',
|
|
32
31
|
borderColor: themed({
|
|
33
|
-
light:
|
|
34
|
-
dark:
|
|
32
|
+
light: `var(--ds-border-bold, ${N500})`,
|
|
33
|
+
dark: `var(--ds-border-bold, ${DN80})`
|
|
35
34
|
}),
|
|
36
35
|
text: themed({
|
|
37
|
-
light:
|
|
38
|
-
dark:
|
|
36
|
+
light: `var(--ds-text, ${N500})`,
|
|
37
|
+
dark: `var(--ds-text, ${DN100})`
|
|
39
38
|
}),
|
|
40
39
|
hoveredBackground: 'transparent',
|
|
41
40
|
pressedBackground: 'transparent'
|
|
42
41
|
},
|
|
43
42
|
[MentionType.DEFAULT]: {
|
|
44
43
|
background: themed({
|
|
45
|
-
light:
|
|
46
|
-
dark:
|
|
44
|
+
light: `var(--ds-background-neutral, ${N30A})`,
|
|
45
|
+
dark: `var(--ds-background-neutral, ${DN80})`
|
|
47
46
|
}),
|
|
48
47
|
borderColor: 'transparent',
|
|
49
48
|
text: themed({
|
|
50
|
-
light:
|
|
51
|
-
dark:
|
|
49
|
+
light: `var(--ds-text-subtle, ${N500})`,
|
|
50
|
+
dark: `var(--ds-text-subtle, ${DN800})`
|
|
52
51
|
}),
|
|
53
52
|
hoveredBackground: themed({
|
|
54
|
-
light:
|
|
55
|
-
dark:
|
|
53
|
+
light: `var(--ds-background-neutral-hovered, ${N30A})`,
|
|
54
|
+
dark: `var(--ds-background-neutral-hovered, ${DN80})`
|
|
56
55
|
}),
|
|
57
56
|
pressedBackground: themed({
|
|
58
|
-
light:
|
|
59
|
-
dark:
|
|
57
|
+
light: `var(--ds-background-neutral-pressed, ${N30A})`,
|
|
58
|
+
dark: `var(--ds-background-neutral-pressed, ${DN80})`
|
|
60
59
|
})
|
|
61
60
|
}
|
|
62
61
|
};
|
|
@@ -1,8 +1,7 @@
|
|
|
1
1
|
import styled from '@emotion/styled';
|
|
2
2
|
import { N100 } from '@atlaskit/theme/colors';
|
|
3
|
-
import { token } from '@atlaskit/tokens';
|
|
4
3
|
export const DescriptionBylineStyle = styled.span`
|
|
5
|
-
color: ${
|
|
4
|
+
color: ${`var(--ds-text-subtlest, ${N100})`};
|
|
6
5
|
font-size: 12px;
|
|
7
6
|
|
|
8
7
|
margin-top: 2px;
|
|
@@ -3,7 +3,6 @@ import Avatar from '@atlaskit/avatar';
|
|
|
3
3
|
import Lozenge from '@atlaskit/lozenge';
|
|
4
4
|
import { N30 } from '@atlaskit/theme/colors';
|
|
5
5
|
import React from 'react';
|
|
6
|
-
import { token } from '@atlaskit/tokens';
|
|
7
6
|
import { isRestricted } from '../../types';
|
|
8
7
|
import { NoAccessLabel } from '../../util/i18n';
|
|
9
8
|
import { leftClick } from '../../util/mouse';
|
|
@@ -86,7 +85,7 @@ export default class MentionItem extends React.PureComponent {
|
|
|
86
85
|
} = presence || {};
|
|
87
86
|
const restricted = isRestricted(accessLevel);
|
|
88
87
|
const nameHighlights = highlight && highlight.name;
|
|
89
|
-
const borderColor = selected ?
|
|
88
|
+
const borderColor = selected ? `var(--ds-border, ${N30})` : undefined;
|
|
90
89
|
return /*#__PURE__*/React.createElement(MessagesIntlProvider, null, /*#__PURE__*/React.createElement(MentionItemStyle, {
|
|
91
90
|
selected: selected,
|
|
92
91
|
onMouseDown: this.onMentionSelected,
|
|
@@ -1,6 +1,5 @@
|
|
|
1
1
|
import styled from '@emotion/styled';
|
|
2
2
|
import { N900, N100, N30, N500 } from '@atlaskit/theme/colors';
|
|
3
|
-
import { token } from '@atlaskit/tokens';
|
|
4
3
|
export const RowStyle = styled.div`
|
|
5
4
|
align-items: center;
|
|
6
5
|
display: flex;
|
|
@@ -27,7 +26,7 @@ export const FullNameStyle = styled.span`
|
|
|
27
26
|
overflow: hidden;
|
|
28
27
|
text-overflow: ellipsis;
|
|
29
28
|
white-space: nowrap;
|
|
30
|
-
color: ${
|
|
29
|
+
color: ${`var(--ds-text, ${N900})`};
|
|
31
30
|
`;
|
|
32
31
|
export const InfoSectionStyle = styled.div`
|
|
33
32
|
display: flex;
|
|
@@ -45,12 +44,12 @@ export const InfoSectionStyle = styled.div`
|
|
|
45
44
|
export const TimeStyle = styled.div`
|
|
46
45
|
margin-left: 20px;
|
|
47
46
|
flex: none;
|
|
48
|
-
color: ${
|
|
47
|
+
color: ${`var(--ds-text-subtlest, ${N100})`};
|
|
49
48
|
font-size: 12px;
|
|
50
49
|
`;
|
|
51
50
|
export const MENTION_ITEM_HEIGHT = 48;
|
|
52
51
|
export const MentionItemStyle = styled.div`
|
|
53
|
-
background-color: ${props => props.selected ?
|
|
52
|
+
background-color: ${props => props.selected ? `var(--ds-background-selected, ${N30})` : 'transparent'};
|
|
54
53
|
display: block;
|
|
55
54
|
overflow: hidden;
|
|
56
55
|
list-style-type: none;
|
|
@@ -60,5 +59,5 @@ export const MentionItemStyle = styled.div`
|
|
|
60
59
|
`;
|
|
61
60
|
export const AccessSectionStyle = styled.div`
|
|
62
61
|
padding-left: 5px;
|
|
63
|
-
color: ${
|
|
62
|
+
color: ${`var(--ds-text-subtle, ${N500})`};
|
|
64
63
|
`;
|
|
@@ -1,12 +1,11 @@
|
|
|
1
1
|
import styled from '@emotion/styled';
|
|
2
|
-
import { token } from '@atlaskit/tokens';
|
|
3
2
|
import { mentionListWidth, noDialogContainerBorderColor, noDialogContainerBorderRadius, noDialogContainerBoxShadow } from '../../shared-styles';
|
|
4
3
|
export const MentionListStyle = styled.div`
|
|
5
4
|
display: ${props => props.empty ? 'none' : 'block'};
|
|
6
5
|
|
|
7
6
|
/* list style */
|
|
8
7
|
width: ${mentionListWidth};
|
|
9
|
-
color: ${
|
|
8
|
+
color: ${"var(--ds-text-subtle, #333)"};
|
|
10
9
|
|
|
11
10
|
border: 1px solid ${noDialogContainerBorderColor};
|
|
12
11
|
border-radius: ${noDialogContainerBorderRadius};
|
|
@@ -1,5 +1,4 @@
|
|
|
1
1
|
import styled from '@emotion/styled';
|
|
2
|
-
import { token } from '@atlaskit/tokens';
|
|
3
2
|
import { borderRadius } from '@atlaskit/theme/constants';
|
|
4
3
|
import { N500 } from '@atlaskit/theme/colors';
|
|
5
4
|
import { h400 } from '@atlaskit/theme/typography';
|
|
@@ -8,9 +7,9 @@ export const MentionListErrorStyle = styled.div`
|
|
|
8
7
|
display: flex;
|
|
9
8
|
justify-content: center;
|
|
10
9
|
flex-direction: column;
|
|
11
|
-
background-color: ${
|
|
12
|
-
color: ${
|
|
13
|
-
border: 1px solid ${
|
|
10
|
+
background-color: ${"var(--ds-surface-overlay, white)"};
|
|
11
|
+
color: ${`var(--ds-text-subtle, ${N500})`};
|
|
12
|
+
border: 1px solid ${"var(--ds-surface-overlay, #fff)"};
|
|
14
13
|
border-radius: ${borderRadius()}px;
|
|
15
14
|
`;
|
|
16
15
|
export const GenericErrorVisualStyle = styled.div`
|
|
@@ -1,13 +1,12 @@
|
|
|
1
1
|
import styled from '@emotion/styled';
|
|
2
|
-
import { token } from '@atlaskit/tokens';
|
|
3
2
|
import { N100 } from '@atlaskit/theme/colors';
|
|
4
3
|
import { mentionListWidth, noDialogContainerBorderColor, noDialogContainerBorderRadius, noDialogContainerBoxShadow } from '../../shared-styles';
|
|
5
4
|
export const MentionPickerStyle = styled.div`
|
|
6
5
|
display: ${props => props.visible ? 'block' : 'none'};
|
|
7
6
|
`;
|
|
8
7
|
export const MentionPickerInfoStyle = styled.div`
|
|
9
|
-
background: ${
|
|
10
|
-
color: ${
|
|
8
|
+
background: ${"var(--ds-surface, #fff)"};
|
|
9
|
+
color: ${`var(--ds-text-subtlest, ${N100})`};
|
|
11
10
|
border: 1px solid ${noDialogContainerBorderColor};
|
|
12
11
|
border-radius: ${noDialogContainerBorderRadius};
|
|
13
12
|
box-shadow: ${noDialogContainerBoxShadow};
|
|
@@ -1,5 +1,4 @@
|
|
|
1
1
|
import styled from '@emotion/styled';
|
|
2
|
-
import { token } from '@atlaskit/tokens';
|
|
3
2
|
import { borderRadius } from '@atlaskit/theme/constants';
|
|
4
3
|
import { scrollableMaxHeight } from '../../shared-styles';
|
|
5
4
|
export const ScrollableStyle = styled.div`
|
|
@@ -10,7 +9,7 @@ export const ScrollableStyle = styled.div`
|
|
|
10
9
|
padding: 4px 0;
|
|
11
10
|
margin: 0;
|
|
12
11
|
|
|
13
|
-
background: ${
|
|
12
|
+
background: ${"var(--ds-surface, white)"};
|
|
14
13
|
max-height: ${scrollableMaxHeight};
|
|
15
14
|
|
|
16
15
|
border-radius: ${borderRadius()}px;
|
|
@@ -2,7 +2,6 @@ import styled from '@emotion/styled';
|
|
|
2
2
|
import { gridSize } from '@atlaskit/theme/constants';
|
|
3
3
|
import { P50 } from '@atlaskit/theme/colors';
|
|
4
4
|
import { h400 } from '@atlaskit/theme/typography';
|
|
5
|
-
import { token } from '@atlaskit/tokens';
|
|
6
5
|
export const Actions = styled.div`
|
|
7
6
|
justify-content: flex-end;
|
|
8
7
|
margin-top: -${gridSize() * 0.5}px; /* Negative margin is used to middle align x button with title */
|
|
@@ -19,7 +18,7 @@ export const Heading = styled.div`
|
|
|
19
18
|
export const Card = styled.div`
|
|
20
19
|
display: flex;
|
|
21
20
|
flex-direction: row;
|
|
22
|
-
background-color: ${
|
|
21
|
+
background-color: ${`var(--ds-background-discovery, ${P50})`};
|
|
23
22
|
overflow: hidden;
|
|
24
23
|
line-height: 21px;
|
|
25
24
|
padding-top: ${gridSize() * 2}px;
|
|
@@ -1,10 +1,9 @@
|
|
|
1
1
|
import { borderRadius } from '@atlaskit/theme/constants';
|
|
2
2
|
import { N40 } from '@atlaskit/theme/colors';
|
|
3
|
-
|
|
4
|
-
export const noDialogContainerBorderColor = token('color.border', N40); // This has not been confirmed by the ADG yet
|
|
3
|
+
export const noDialogContainerBorderColor = `var(--ds-border, ${N40})`; // This has not been confirmed by the ADG yet
|
|
5
4
|
|
|
6
5
|
export const noDialogContainerBorderRadius = `${borderRadius()}px`;
|
|
7
|
-
export const noDialogContainerBoxShadow =
|
|
6
|
+
export const noDialogContainerBoxShadow = "var(--ds-shadow-overlay, 0 4px 8px -2px rgba(9, 30, 66, 0.25), 0 0 1px rgba(9, 30, 66, 0.31))"; // Copied from droplist style
|
|
8
7
|
|
|
9
8
|
export const scrollableMaxHeight = '264px';
|
|
10
9
|
export const mentionListWidth = '340px';
|
package/dist/es2019/version.json
CHANGED
|
@@ -337,7 +337,8 @@ var TeamMentionResource = /*#__PURE__*/function (_MentionResource) {
|
|
|
337
337
|
value: function trimTeamARI() {
|
|
338
338
|
var teamId = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : '';
|
|
339
339
|
var TEAM_ARI_PREFIX = 'ari:cloud:teams::team/';
|
|
340
|
-
|
|
340
|
+
var IDENTITY_TEAM_ARI_PREFIX = 'ari:cloud:identity::team/';
|
|
341
|
+
return teamId.replace(TEAM_ARI_PREFIX, '').replace(IDENTITY_TEAM_ARI_PREFIX, '');
|
|
341
342
|
}
|
|
342
343
|
}]);
|
|
343
344
|
|
|
@@ -10,56 +10,55 @@ var _mentionStyle, _templateObject;
|
|
|
10
10
|
import { jsx, css } from '@emotion/react';
|
|
11
11
|
import { themed, useGlobalTheme } from '@atlaskit/theme/components';
|
|
12
12
|
import { B400, B200, N500, DN800, DN100, DN80, N30A, DN30, N20 } from '@atlaskit/theme/colors';
|
|
13
|
-
import { token } from '@atlaskit/tokens';
|
|
14
13
|
import { MentionType } from '../../types';
|
|
15
14
|
import { forwardRef } from 'react';
|
|
16
15
|
var mentionStyle = (_mentionStyle = {}, _defineProperty(_mentionStyle, MentionType.SELF, {
|
|
17
16
|
background: themed({
|
|
18
|
-
light:
|
|
19
|
-
dark:
|
|
17
|
+
light: "var(--ds-background-brand-bold, ".concat(B400, ")"),
|
|
18
|
+
dark: "var(--ds-background-brand-bold, ".concat(B200, ")")
|
|
20
19
|
}),
|
|
21
20
|
borderColor: 'transparent',
|
|
22
21
|
text: themed({
|
|
23
|
-
light:
|
|
24
|
-
dark:
|
|
22
|
+
light: "var(--ds-text-inverse, ".concat(N20, ")"),
|
|
23
|
+
dark: "var(--ds-text-inverse, ".concat(DN30, ")")
|
|
25
24
|
}),
|
|
26
25
|
hoveredBackground: themed({
|
|
27
|
-
light:
|
|
28
|
-
dark:
|
|
26
|
+
light: "var(--ds-background-brand-bold-hovered, ".concat(B400, ")"),
|
|
27
|
+
dark: "var(--ds-background-brand-bold-hovered, ".concat(B200, ")")
|
|
29
28
|
}),
|
|
30
29
|
pressedBackground: themed({
|
|
31
|
-
light:
|
|
32
|
-
dark:
|
|
30
|
+
light: "var(--ds-background-brand-bold-pressed, ".concat(B400, ")"),
|
|
31
|
+
dark: "var(--ds-background-brand-bold-pressed, ".concat(B200, ")")
|
|
33
32
|
})
|
|
34
33
|
}), _defineProperty(_mentionStyle, MentionType.RESTRICTED, {
|
|
35
34
|
background: 'transparent',
|
|
36
35
|
borderColor: themed({
|
|
37
|
-
light:
|
|
38
|
-
dark:
|
|
36
|
+
light: "var(--ds-border-bold, ".concat(N500, ")"),
|
|
37
|
+
dark: "var(--ds-border-bold, ".concat(DN80, ")")
|
|
39
38
|
}),
|
|
40
39
|
text: themed({
|
|
41
|
-
light:
|
|
42
|
-
dark:
|
|
40
|
+
light: "var(--ds-text, ".concat(N500, ")"),
|
|
41
|
+
dark: "var(--ds-text, ".concat(DN100, ")")
|
|
43
42
|
}),
|
|
44
43
|
hoveredBackground: 'transparent',
|
|
45
44
|
pressedBackground: 'transparent'
|
|
46
45
|
}), _defineProperty(_mentionStyle, MentionType.DEFAULT, {
|
|
47
46
|
background: themed({
|
|
48
|
-
light:
|
|
49
|
-
dark:
|
|
47
|
+
light: "var(--ds-background-neutral, ".concat(N30A, ")"),
|
|
48
|
+
dark: "var(--ds-background-neutral, ".concat(DN80, ")")
|
|
50
49
|
}),
|
|
51
50
|
borderColor: 'transparent',
|
|
52
51
|
text: themed({
|
|
53
|
-
light:
|
|
54
|
-
dark:
|
|
52
|
+
light: "var(--ds-text-subtle, ".concat(N500, ")"),
|
|
53
|
+
dark: "var(--ds-text-subtle, ".concat(DN800, ")")
|
|
55
54
|
}),
|
|
56
55
|
hoveredBackground: themed({
|
|
57
|
-
light:
|
|
58
|
-
dark:
|
|
56
|
+
light: "var(--ds-background-neutral-hovered, ".concat(N30A, ")"),
|
|
57
|
+
dark: "var(--ds-background-neutral-hovered, ".concat(DN80, ")")
|
|
59
58
|
}),
|
|
60
59
|
pressedBackground: themed({
|
|
61
|
-
light:
|
|
62
|
-
dark:
|
|
60
|
+
light: "var(--ds-background-neutral-pressed, ".concat(N30A, ")"),
|
|
61
|
+
dark: "var(--ds-background-neutral-pressed, ".concat(DN80, ")")
|
|
63
62
|
})
|
|
64
63
|
}), _mentionStyle);
|
|
65
64
|
|
|
@@ -4,5 +4,4 @@ var _templateObject;
|
|
|
4
4
|
|
|
5
5
|
import styled from '@emotion/styled';
|
|
6
6
|
import { N100 } from '@atlaskit/theme/colors';
|
|
7
|
-
|
|
8
|
-
export var DescriptionBylineStyle = styled.span(_templateObject || (_templateObject = _taggedTemplateLiteral(["\n color: ", ";\n font-size: 12px;\n\n margin-top: 2px;\n\n display: block;\n overflow: hidden;\n text-overflow: ellipsis;\n white-space: nowrap;\n"])), token('color.text.subtlest', N100));
|
|
7
|
+
export var DescriptionBylineStyle = styled.span(_templateObject || (_templateObject = _taggedTemplateLiteral(["\n color: ", ";\n font-size: 12px;\n\n margin-top: 2px;\n\n display: block;\n overflow: hidden;\n text-overflow: ellipsis;\n white-space: nowrap;\n"])), "var(--ds-text-subtlest, ".concat(N100, ")"));
|
|
@@ -15,7 +15,6 @@ import Avatar from '@atlaskit/avatar';
|
|
|
15
15
|
import Lozenge from '@atlaskit/lozenge';
|
|
16
16
|
import { N30 } from '@atlaskit/theme/colors';
|
|
17
17
|
import React from 'react';
|
|
18
|
-
import { token } from '@atlaskit/tokens';
|
|
19
18
|
import { isRestricted } from '../../types';
|
|
20
19
|
import { NoAccessLabel } from '../../util/i18n';
|
|
21
20
|
import { leftClick } from '../../util/mouse';
|
|
@@ -111,7 +110,7 @@ var MentionItem = /*#__PURE__*/function (_React$PureComponent) {
|
|
|
111
110
|
|
|
112
111
|
var restricted = isRestricted(accessLevel);
|
|
113
112
|
var nameHighlights = highlight && highlight.name;
|
|
114
|
-
var borderColor = selected ?
|
|
113
|
+
var borderColor = selected ? "var(--ds-border, ".concat(N30, ")") : undefined;
|
|
115
114
|
return /*#__PURE__*/React.createElement(MessagesIntlProvider, null, /*#__PURE__*/React.createElement(MentionItemStyle, {
|
|
116
115
|
selected: selected,
|
|
117
116
|
onMouseDown: this.onMentionSelected,
|
|
@@ -4,7 +4,6 @@ var _templateObject, _templateObject2, _templateObject3, _templateObject4, _temp
|
|
|
4
4
|
|
|
5
5
|
import styled from '@emotion/styled';
|
|
6
6
|
import { N900, N100, N30, N500 } from '@atlaskit/theme/colors';
|
|
7
|
-
import { token } from '@atlaskit/tokens';
|
|
8
7
|
export var RowStyle = styled.div(_templateObject || (_templateObject = _taggedTemplateLiteral(["\n align-items: center;\n display: flex;\n flex-direction: row;\n flex-wrap: wrap;\n overflow: hidden;\n padding: 6px 14px;\n text-overflow: ellipsis;\n vertical-align: middle;\n"])));
|
|
9
8
|
export var AvatarStyle = styled.span(_templateObject2 || (_templateObject2 = _taggedTemplateLiteral(["\n position: relative;\n flex: initial;\n opacity: ", ";\n"])), function (props) {
|
|
10
9
|
return props.restricted ? '0.5' : 'inherit';
|
|
@@ -12,13 +11,13 @@ export var AvatarStyle = styled.span(_templateObject2 || (_templateObject2 = _ta
|
|
|
12
11
|
export var NameSectionStyle = styled.div(_templateObject3 || (_templateObject3 = _taggedTemplateLiteral(["\n flex: 1;\n min-width: 0;\n margin-left: 14px;\n opacity: ", ";\n"])), function (props) {
|
|
13
12
|
return props.restricted ? '0.5' : 'inherit';
|
|
14
13
|
});
|
|
15
|
-
export var FullNameStyle = styled.span(_templateObject4 || (_templateObject4 = _taggedTemplateLiteral(["\n display: block;\n overflow: hidden;\n text-overflow: ellipsis;\n white-space: nowrap;\n color: ", ";\n"])),
|
|
14
|
+
export var FullNameStyle = styled.span(_templateObject4 || (_templateObject4 = _taggedTemplateLiteral(["\n display: block;\n overflow: hidden;\n text-overflow: ellipsis;\n white-space: nowrap;\n color: ", ";\n"])), "var(--ds-text, ".concat(N900, ")"));
|
|
16
15
|
export var InfoSectionStyle = styled.div(_templateObject5 || (_templateObject5 = _taggedTemplateLiteral(["\n display: flex;\n flex-direction: column;\n text-align: right;\n opacity: ", ";\n\n & {\n /* Lozenge */\n & > span {\n margin-bottom: 2px;\n }\n }\n"])), function (props) {
|
|
17
16
|
return props.restricted ? '0.5' : 'inherit';
|
|
18
17
|
});
|
|
19
|
-
export var TimeStyle = styled.div(_templateObject6 || (_templateObject6 = _taggedTemplateLiteral(["\n margin-left: 20px;\n flex: none;\n color: ", ";\n font-size: 12px;\n"])),
|
|
18
|
+
export var TimeStyle = styled.div(_templateObject6 || (_templateObject6 = _taggedTemplateLiteral(["\n margin-left: 20px;\n flex: none;\n color: ", ";\n font-size: 12px;\n"])), "var(--ds-text-subtlest, ".concat(N100, ")"));
|
|
20
19
|
export var MENTION_ITEM_HEIGHT = 48;
|
|
21
20
|
export var MentionItemStyle = styled.div(_templateObject7 || (_templateObject7 = _taggedTemplateLiteral(["\n background-color: ", ";\n display: block;\n overflow: hidden;\n list-style-type: none;\n height: ", "px;\n line-height: 1.2;\n cursor: pointer;\n"])), function (props) {
|
|
22
|
-
return props.selected ?
|
|
21
|
+
return props.selected ? "var(--ds-background-selected, ".concat(N30, ")") : 'transparent';
|
|
23
22
|
}, MENTION_ITEM_HEIGHT);
|
|
24
|
-
export var AccessSectionStyle = styled.div(_templateObject8 || (_templateObject8 = _taggedTemplateLiteral(["\n padding-left: 5px;\n color: ", ";\n"])),
|
|
23
|
+
export var AccessSectionStyle = styled.div(_templateObject8 || (_templateObject8 = _taggedTemplateLiteral(["\n padding-left: 5px;\n color: ", ";\n"])), "var(--ds-text-subtle, ".concat(N500, ")"));
|
|
@@ -3,8 +3,7 @@ import _taggedTemplateLiteral from "@babel/runtime/helpers/taggedTemplateLiteral
|
|
|
3
3
|
var _templateObject;
|
|
4
4
|
|
|
5
5
|
import styled from '@emotion/styled';
|
|
6
|
-
import { token } from '@atlaskit/tokens';
|
|
7
6
|
import { mentionListWidth, noDialogContainerBorderColor, noDialogContainerBorderRadius, noDialogContainerBoxShadow } from '../../shared-styles';
|
|
8
7
|
export var MentionListStyle = styled.div(_templateObject || (_templateObject = _taggedTemplateLiteral(["\n display: ", ";\n\n /* list style */\n width: ", ";\n color: ", ";\n\n border: 1px solid ", ";\n border-radius: ", ";\n box-shadow: ", ";\n"])), function (props) {
|
|
9
8
|
return props.empty ? 'none' : 'block';
|
|
10
|
-
}, mentionListWidth,
|
|
9
|
+
}, mentionListWidth, "var(--ds-text-subtle, #333)", noDialogContainerBorderColor, noDialogContainerBorderRadius, noDialogContainerBoxShadow);
|
|
@@ -3,11 +3,10 @@ import _taggedTemplateLiteral from "@babel/runtime/helpers/taggedTemplateLiteral
|
|
|
3
3
|
var _templateObject, _templateObject2, _templateObject3, _templateObject4;
|
|
4
4
|
|
|
5
5
|
import styled from '@emotion/styled';
|
|
6
|
-
import { token } from '@atlaskit/tokens';
|
|
7
6
|
import { borderRadius } from '@atlaskit/theme/constants';
|
|
8
7
|
import { N500 } from '@atlaskit/theme/colors';
|
|
9
8
|
import { h400 } from '@atlaskit/theme/typography';
|
|
10
|
-
export var MentionListErrorStyle = styled.div(_templateObject || (_templateObject = _taggedTemplateLiteral(["\n align-items: center;\n display: flex;\n justify-content: center;\n flex-direction: column;\n background-color: ", ";\n color: ", ";\n border: 1px solid ", ";\n border-radius: ", "px;\n"])),
|
|
9
|
+
export var MentionListErrorStyle = styled.div(_templateObject || (_templateObject = _taggedTemplateLiteral(["\n align-items: center;\n display: flex;\n justify-content: center;\n flex-direction: column;\n background-color: ", ";\n color: ", ";\n border: 1px solid ", ";\n border-radius: ", "px;\n"])), "var(--ds-surface-overlay, white)", "var(--ds-text-subtle, ".concat(N500, ")"), "var(--ds-surface-overlay, #fff)", borderRadius());
|
|
11
10
|
export var GenericErrorVisualStyle = styled.div(_templateObject2 || (_templateObject2 = _taggedTemplateLiteral(["\n height: 108px;\n margin-bottom: 8px;\n margin-top: 36px;\n width: 83px;\n"]))); // TODO: Figure out why the themed css function is causing type errors when passed prop children
|
|
12
11
|
|
|
13
12
|
export var MentionListErrorHeadlineStyle = styled.div(_templateObject3 || (_templateObject3 = _taggedTemplateLiteral(["\n ", ";\n margin-bottom: 8px;\n"])), h400());
|
|
@@ -3,10 +3,9 @@ import _taggedTemplateLiteral from "@babel/runtime/helpers/taggedTemplateLiteral
|
|
|
3
3
|
var _templateObject, _templateObject2;
|
|
4
4
|
|
|
5
5
|
import styled from '@emotion/styled';
|
|
6
|
-
import { token } from '@atlaskit/tokens';
|
|
7
6
|
import { N100 } from '@atlaskit/theme/colors';
|
|
8
7
|
import { mentionListWidth, noDialogContainerBorderColor, noDialogContainerBorderRadius, noDialogContainerBoxShadow } from '../../shared-styles';
|
|
9
8
|
export var MentionPickerStyle = styled.div(_templateObject || (_templateObject = _taggedTemplateLiteral(["\n display: ", ";\n"])), function (props) {
|
|
10
9
|
return props.visible ? 'block' : 'none';
|
|
11
10
|
});
|
|
12
|
-
export var MentionPickerInfoStyle = styled.div(_templateObject2 || (_templateObject2 = _taggedTemplateLiteral(["\n background: ", ";\n color: ", ";\n border: 1px solid ", ";\n border-radius: ", ";\n box-shadow: ", ";\n display: block;\n width: ", ";\n white-space: nowrap;\n\n & {\n p {\n margin: 0;\n overflow: hidden;\n padding: 9px;\n text-overflow: ellipsis;\n }\n }\n"])),
|
|
11
|
+
export var MentionPickerInfoStyle = styled.div(_templateObject2 || (_templateObject2 = _taggedTemplateLiteral(["\n background: ", ";\n color: ", ";\n border: 1px solid ", ";\n border-radius: ", ";\n box-shadow: ", ";\n display: block;\n width: ", ";\n white-space: nowrap;\n\n & {\n p {\n margin: 0;\n overflow: hidden;\n padding: 9px;\n text-overflow: ellipsis;\n }\n }\n"])), "var(--ds-surface, #fff)", "var(--ds-text-subtlest, ".concat(N100, ")"), noDialogContainerBorderColor, noDialogContainerBorderRadius, noDialogContainerBoxShadow, mentionListWidth);
|
|
@@ -3,7 +3,6 @@ import _taggedTemplateLiteral from "@babel/runtime/helpers/taggedTemplateLiteral
|
|
|
3
3
|
var _templateObject;
|
|
4
4
|
|
|
5
5
|
import styled from '@emotion/styled';
|
|
6
|
-
import { token } from '@atlaskit/tokens';
|
|
7
6
|
import { borderRadius } from '@atlaskit/theme/constants';
|
|
8
7
|
import { scrollableMaxHeight } from '../../shared-styles';
|
|
9
|
-
export var ScrollableStyle = styled.div(_templateObject || (_templateObject = _taggedTemplateLiteral(["\n display: block;\n overflow-x: hidden;\n overflow-y: auto;\n\n padding: 4px 0;\n margin: 0;\n\n background: ", ";\n max-height: ", ";\n\n border-radius: ", "px;\n"])),
|
|
8
|
+
export var ScrollableStyle = styled.div(_templateObject || (_templateObject = _taggedTemplateLiteral(["\n display: block;\n overflow-x: hidden;\n overflow-y: auto;\n\n padding: 4px 0;\n margin: 0;\n\n background: ", ";\n max-height: ", ";\n\n border-radius: ", "px;\n"])), "var(--ds-surface, white)", scrollableMaxHeight, borderRadius());
|
|
@@ -6,11 +6,10 @@ import styled from '@emotion/styled';
|
|
|
6
6
|
import { gridSize } from '@atlaskit/theme/constants';
|
|
7
7
|
import { P50 } from '@atlaskit/theme/colors';
|
|
8
8
|
import { h400 } from '@atlaskit/theme/typography';
|
|
9
|
-
import { token } from '@atlaskit/tokens';
|
|
10
9
|
export var Actions = styled.div(_templateObject || (_templateObject = _taggedTemplateLiteral(["\n justify-content: flex-end;\n margin-top: -", "px; /* Negative margin is used to middle align x button with title */\n margin-right: ", "px;\n"])), gridSize() * 0.5, gridSize() * 0.5);
|
|
11
10
|
export var Title = styled.div(_templateObject2 || (_templateObject2 = _taggedTemplateLiteral(["\n ", ";\n margin-top: 0px;\n"])), h400);
|
|
12
11
|
export var Heading = styled.div(_templateObject3 || (_templateObject3 = _taggedTemplateLiteral(["\n margin-left: ", "px;\n margin-bottom: ", "px;\n"])), gridSize() * 2, gridSize() * 0.5);
|
|
13
|
-
export var Card = styled.div(_templateObject4 || (_templateObject4 = _taggedTemplateLiteral(["\n display: flex;\n flex-direction: row;\n background-color: ", ";\n overflow: hidden;\n line-height: 21px;\n padding-top: ", "px;\n padding-bottom: ", "px;\n padding-left: ", "px;\n padding-right: 0px;\n margin-top: -", "px; /* Negative margin is used to fill the entire top of the mention dropdown with background colour of highlight */\n"])),
|
|
12
|
+
export var Card = styled.div(_templateObject4 || (_templateObject4 = _taggedTemplateLiteral(["\n display: flex;\n flex-direction: row;\n background-color: ", ";\n overflow: hidden;\n line-height: 21px;\n padding-top: ", "px;\n padding-bottom: ", "px;\n padding-left: ", "px;\n padding-right: 0px;\n margin-top: -", "px; /* Negative margin is used to fill the entire top of the mention dropdown with background colour of highlight */\n"])), "var(--ds-background-discovery, ".concat(P50, ")"), gridSize() * 2, gridSize() * 2, gridSize() * 2, gridSize() * 0.5);
|
|
14
13
|
export var Content = styled.div(_templateObject5 || (_templateObject5 = _taggedTemplateLiteral(["\n max-width: 290px;\n display: flex;\n"])));
|
|
15
14
|
export var Section = styled.div(_templateObject6 || (_templateObject6 = _taggedTemplateLiteral([""])));
|
|
16
15
|
export var Aside = styled.div(_templateObject7 || (_templateObject7 = _taggedTemplateLiteral(["\n opacity: 0.8;\n"])));
|
|
@@ -1,10 +1,9 @@
|
|
|
1
1
|
import { borderRadius } from '@atlaskit/theme/constants';
|
|
2
2
|
import { N40 } from '@atlaskit/theme/colors';
|
|
3
|
-
|
|
4
|
-
export var noDialogContainerBorderColor = token('color.border', N40); // This has not been confirmed by the ADG yet
|
|
3
|
+
export var noDialogContainerBorderColor = "var(--ds-border, ".concat(N40, ")"); // This has not been confirmed by the ADG yet
|
|
5
4
|
|
|
6
5
|
export var noDialogContainerBorderRadius = "".concat(borderRadius(), "px");
|
|
7
|
-
export var noDialogContainerBoxShadow =
|
|
6
|
+
export var noDialogContainerBoxShadow = "var(--ds-shadow-overlay, 0 4px 8px -2px rgba(9, 30, 66, 0.25), 0 0 1px rgba(9, 30, 66, 0.31))"; // Copied from droplist style
|
|
8
7
|
|
|
9
8
|
export var scrollableMaxHeight = '264px';
|
|
10
9
|
export var mentionListWidth = '340px';
|
package/dist/esm/version.json
CHANGED
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@atlaskit/mention",
|
|
3
|
-
"version": "21.0.
|
|
3
|
+
"version": "21.0.16",
|
|
4
4
|
"description": "A React component used to display user profiles in a list for 'Mention' functionality",
|
|
5
5
|
"publishConfig": {
|
|
6
6
|
"registry": "https://registry.npmjs.org/"
|
|
@@ -50,10 +50,10 @@
|
|
|
50
50
|
"react-intl-next": "npm:react-intl@^5.18.1"
|
|
51
51
|
},
|
|
52
52
|
"devDependencies": {
|
|
53
|
-
"@atlaskit/adf-utils": "^
|
|
53
|
+
"@atlaskit/adf-utils": "^18.0.0",
|
|
54
54
|
"@atlaskit/docs": "^9.0.0",
|
|
55
|
-
"@atlaskit/editor-core": "^
|
|
56
|
-
"@atlaskit/editor-test-helpers": "^
|
|
55
|
+
"@atlaskit/editor-core": "^177.0.0",
|
|
56
|
+
"@atlaskit/editor-test-helpers": "^18.0.0",
|
|
57
57
|
"@atlaskit/elements-test-helpers": "^0.7.0",
|
|
58
58
|
"@atlaskit/section-message": "^6.3.0",
|
|
59
59
|
"@atlaskit/ssr": "*",
|
package/report.api.md
CHANGED