@atlaskit/mention 23.1.0 → 23.2.0
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/PresenceResource.js +6 -6
- package/dist/cjs/components/Mention/PrimitiveMention.js +1 -1
- package/dist/cjs/components/MentionDescriptionByline/styles.js +9 -3
- package/dist/cjs/components/MentionItem/styles.js +65 -16
- package/dist/cjs/components/MentionList/styles.js +11 -5
- package/dist/cjs/components/MentionListError/styles.js +20 -5
- package/dist/cjs/components/MentionPicker/styles.js +22 -5
- package/dist/cjs/components/Scrollable/styles.js +10 -3
- package/dist/cjs/util/analytics.js +1 -1
- package/dist/es2019/api/PresenceResource.js +4 -4
- package/dist/es2019/components/Mention/PrimitiveMention.js +18 -18
- package/dist/es2019/components/MentionDescriptionByline/styles.js +9 -11
- package/dist/es2019/components/MentionItem/styles.js +56 -57
- package/dist/es2019/components/MentionList/styles.js +8 -10
- package/dist/es2019/components/MentionListError/styles.js +20 -20
- package/dist/es2019/components/MentionPicker/styles.js +19 -20
- package/dist/es2019/components/Scrollable/styles.js +10 -13
- package/dist/es2019/util/analytics.js +1 -1
- package/dist/esm/api/PresenceResource.js +6 -6
- package/dist/esm/components/Mention/PrimitiveMention.js +1 -1
- package/dist/esm/components/MentionDescriptionByline/styles.js +9 -3
- package/dist/esm/components/MentionItem/styles.js +65 -16
- package/dist/esm/components/MentionList/styles.js +11 -5
- package/dist/esm/components/MentionListError/styles.js +20 -5
- package/dist/esm/components/MentionPicker/styles.js +22 -5
- package/dist/esm/components/Scrollable/styles.js +10 -3
- package/dist/esm/util/analytics.js +1 -1
- package/docs/0-intro.tsx +8 -14
- package/docs/1-in-editor.tsx +16 -17
- package/local-config-example.ts +38 -38
- package/package.json +2 -2
- package/report.api.md +619 -661
|
@@ -2,27 +2,26 @@ import styled from '@emotion/styled';
|
|
|
2
2
|
import { N100 } from '@atlaskit/theme/colors';
|
|
3
3
|
import { mentionListWidth, noDialogContainerBorderColor, noDialogContainerBorderRadius, noDialogContainerBoxShadow } from '../../shared-styles';
|
|
4
4
|
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-styled -- To migrate as part of go/ui-styling-standard
|
|
5
|
-
export const MentionPickerStyle = styled.div
|
|
6
|
-
display:
|
|
7
|
-
|
|
5
|
+
export const MentionPickerStyle = styled.div(props => ({
|
|
6
|
+
display: props.visible ? 'block' : 'none'
|
|
7
|
+
}));
|
|
8
8
|
|
|
9
9
|
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-styled -- To migrate as part of go/ui-styling-standard
|
|
10
|
-
export const MentionPickerInfoStyle = styled.div
|
|
11
|
-
background:
|
|
12
|
-
color:
|
|
13
|
-
border: 1px solid ${noDialogContainerBorderColor}
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
display: block
|
|
17
|
-
width:
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
text-overflow: ellipsis;
|
|
10
|
+
export const MentionPickerInfoStyle = styled.div({
|
|
11
|
+
background: "var(--ds-surface, #fff)",
|
|
12
|
+
color: `var(--ds-text-subtlest, ${N100})`,
|
|
13
|
+
border: `1px solid ${noDialogContainerBorderColor}`,
|
|
14
|
+
borderRadius: noDialogContainerBorderRadius,
|
|
15
|
+
boxShadow: noDialogContainerBoxShadow,
|
|
16
|
+
display: 'block',
|
|
17
|
+
width: mentionListWidth,
|
|
18
|
+
whiteSpace: 'nowrap',
|
|
19
|
+
'&': {
|
|
20
|
+
p: {
|
|
21
|
+
margin: 0,
|
|
22
|
+
overflow: 'hidden',
|
|
23
|
+
padding: "var(--ds-space-100, 8px)",
|
|
24
|
+
textOverflow: 'ellipsis'
|
|
26
25
|
}
|
|
27
26
|
}
|
|
28
|
-
|
|
27
|
+
});
|
|
@@ -3,16 +3,13 @@ import { borderRadius } from '@atlaskit/theme/constants';
|
|
|
3
3
|
import { scrollableMaxHeight } from '../../shared-styles';
|
|
4
4
|
|
|
5
5
|
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-styled -- To migrate as part of go/ui-styling-standard
|
|
6
|
-
export const ScrollableStyle = styled.div
|
|
7
|
-
display: block
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
border-radius: ${borderRadius()}px;
|
|
18
|
-
`;
|
|
6
|
+
export const ScrollableStyle = styled.div({
|
|
7
|
+
display: 'block',
|
|
8
|
+
overflowX: 'hidden',
|
|
9
|
+
overflowY: 'auto',
|
|
10
|
+
padding: `${"var(--ds-space-050, 4px)"} 0`,
|
|
11
|
+
margin: 0,
|
|
12
|
+
background: "var(--ds-surface, white)",
|
|
13
|
+
maxHeight: scrollableMaxHeight,
|
|
14
|
+
borderRadius: `${borderRadius()}px`
|
|
15
|
+
});
|
|
@@ -2,7 +2,7 @@ import { OPERATIONAL_EVENT_TYPE, UI_EVENT_TYPE } from '@atlaskit/analytics-gas-t
|
|
|
2
2
|
import { ELEMENTS_CHANNEL } from '../_constants';
|
|
3
3
|
import { isSpecialMentionText } from '../types';
|
|
4
4
|
const packageName = "@atlaskit/mention";
|
|
5
|
-
const packageVersion = "23.
|
|
5
|
+
const packageVersion = "23.2.0";
|
|
6
6
|
export const SLI_EVENT_TYPE = 'sli';
|
|
7
7
|
export const SMART_EVENT_TYPE = 'smart';
|
|
8
8
|
export let SliNames = /*#__PURE__*/function (SliNames) {
|
|
@@ -25,8 +25,8 @@ var CacheEntry = /*#__PURE__*/function () {
|
|
|
25
25
|
}]);
|
|
26
26
|
return CacheEntry;
|
|
27
27
|
}();
|
|
28
|
-
var AbstractPresenceResource = /*#__PURE__*/function (
|
|
29
|
-
_inherits(AbstractPresenceResource,
|
|
28
|
+
var AbstractPresenceResource = /*#__PURE__*/function (_AbstractResource) {
|
|
29
|
+
_inherits(AbstractPresenceResource, _AbstractResource);
|
|
30
30
|
var _super = _createSuper(AbstractPresenceResource);
|
|
31
31
|
function AbstractPresenceResource() {
|
|
32
32
|
_classCallCheck(this, AbstractPresenceResource);
|
|
@@ -317,10 +317,10 @@ export var DefaultPresenceParser = /*#__PURE__*/function () {
|
|
|
317
317
|
}
|
|
318
318
|
|
|
319
319
|
/*
|
|
320
|
-
|
|
321
|
-
|
|
322
|
-
|
|
323
|
-
|
|
320
|
+
This is a bit of an odd exception. In the case where a user is in "Focus Mode", their presence state
|
|
321
|
+
is returned as 'busy' along with a `stateMetadata` object containing a `focus` field.
|
|
322
|
+
In this case we ignore the value of the `state` field and treat the presence as a 'focus' state.
|
|
323
|
+
*/
|
|
324
324
|
}, {
|
|
325
325
|
key: "isFocusState",
|
|
326
326
|
value: function isFocusState(presence) {
|
|
@@ -38,7 +38,7 @@ var PrimitiveMention = /*#__PURE__*/forwardRef(function (_ref2, ref) {
|
|
|
38
38
|
other = _objectWithoutProperties(_ref2, _excluded);
|
|
39
39
|
return jsx("span", _extends({
|
|
40
40
|
ref: ref,
|
|
41
|
-
css: css(_templateObject || (_templateObject = _taggedTemplateLiteral(["\n
|
|
41
|
+
css: css(_templateObject || (_templateObject = _taggedTemplateLiteral(["\n\t\t\t\t\tdisplay: inline;\n\t\t\t\t\tborder: 1px solid ", ";\n\t\t\t\t\tbackground: ", ";\n\t\t\t\t\tcolor: ", ";\n\t\t\t\t\tborder-radius: 20px;\n\t\t\t\t\tcursor: pointer;\n\t\t\t\t\tpadding: 0 0.3em 2px 0.23em;\n\t\t\t\t\tline-height: 1.714;\n\t\t\t\t\tfont-size: 1em;\n\t\t\t\t\tfont-weight: normal;\n\t\t\t\t\tword-break: break-word;\n\t\t\t\t\t&:hover {\n\t\t\t\t\t\tbackground: ", ";\n\t\t\t\t\t}\n\t\t\t\t\t&:active {\n\t\t\t\t\t\tbackground: ", ";\n\t\t\t\t\t}\n\t\t\t\t"])), getStyle({
|
|
42
42
|
mentionType: mentionType
|
|
43
43
|
}, 'borderColor'), getStyle({
|
|
44
44
|
mentionType: mentionType
|
|
@@ -1,6 +1,12 @@
|
|
|
1
|
-
import _taggedTemplateLiteral from "@babel/runtime/helpers/taggedTemplateLiteral";
|
|
2
|
-
var _templateObject;
|
|
3
1
|
import styled from '@emotion/styled';
|
|
4
2
|
import { N100 } from '@atlaskit/theme/colors';
|
|
5
3
|
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-styled -- To migrate as part of go/ui-styling-standard
|
|
6
|
-
export var DescriptionBylineStyle = styled.span(
|
|
4
|
+
export var DescriptionBylineStyle = styled.span({
|
|
5
|
+
color: "var(--ds-text-subtlest, ".concat(N100, ")"),
|
|
6
|
+
fontSize: '12px',
|
|
7
|
+
marginTop: "var(--ds-space-025, 2px)",
|
|
8
|
+
display: 'block',
|
|
9
|
+
overflow: 'hidden',
|
|
10
|
+
textOverflow: 'ellipsis',
|
|
11
|
+
whiteSpace: 'nowrap'
|
|
12
|
+
});
|
|
@@ -1,35 +1,84 @@
|
|
|
1
|
-
import _taggedTemplateLiteral from "@babel/runtime/helpers/taggedTemplateLiteral";
|
|
2
|
-
var _templateObject, _templateObject2, _templateObject3, _templateObject4, _templateObject5, _templateObject6, _templateObject7, _templateObject8;
|
|
3
1
|
import styled from '@emotion/styled';
|
|
4
2
|
import { N900, N100, N30, N500 } from '@atlaskit/theme/colors';
|
|
5
3
|
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-styled -- To migrate as part of go/ui-styling-standard
|
|
6
|
-
export var RowStyle = styled.div(
|
|
4
|
+
export var RowStyle = styled.div({
|
|
5
|
+
alignItems: 'center',
|
|
6
|
+
display: 'flex',
|
|
7
|
+
flexDirection: 'row',
|
|
8
|
+
flexWrap: 'wrap',
|
|
9
|
+
overflow: 'hidden',
|
|
10
|
+
padding: "var(--ds-space-075, 6px)".concat(" ", "var(--ds-space-150, 12px)"),
|
|
11
|
+
textOverflow: 'ellipsis',
|
|
12
|
+
verticalAlign: 'middle'
|
|
13
|
+
});
|
|
7
14
|
|
|
8
15
|
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-styled -- To migrate as part of go/ui-styling-standard
|
|
9
|
-
export var AvatarStyle = styled.span(
|
|
10
|
-
return
|
|
16
|
+
export var AvatarStyle = styled.span(function (props) {
|
|
17
|
+
return {
|
|
18
|
+
position: 'relative',
|
|
19
|
+
flex: 'initial',
|
|
20
|
+
opacity: props.restricted ? '0.5' : 'inherit'
|
|
21
|
+
};
|
|
11
22
|
});
|
|
12
23
|
|
|
13
24
|
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-styled -- To migrate as part of go/ui-styling-standard
|
|
14
|
-
export var NameSectionStyle = styled.div(
|
|
15
|
-
return
|
|
25
|
+
export var NameSectionStyle = styled.div(function (props) {
|
|
26
|
+
return {
|
|
27
|
+
flex: 1,
|
|
28
|
+
minWidth: 0,
|
|
29
|
+
marginLeft: "var(--ds-space-150, 12px)",
|
|
30
|
+
opacity: props.restricted ? '0.5' : 'inherit'
|
|
31
|
+
};
|
|
16
32
|
});
|
|
17
33
|
|
|
18
34
|
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-styled -- To migrate as part of go/ui-styling-standard
|
|
19
|
-
export var FullNameStyle = styled.span(
|
|
35
|
+
export var FullNameStyle = styled.span({
|
|
36
|
+
display: 'block',
|
|
37
|
+
overflow: 'hidden',
|
|
38
|
+
textOverflow: 'ellipsis',
|
|
39
|
+
whiteSpace: 'nowrap',
|
|
40
|
+
color: "var(--ds-text, ".concat(N900, ")")
|
|
41
|
+
});
|
|
20
42
|
|
|
21
43
|
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-styled -- To migrate as part of go/ui-styling-standard
|
|
22
|
-
export var InfoSectionStyle = styled.div(
|
|
23
|
-
return
|
|
24
|
-
|
|
44
|
+
export var InfoSectionStyle = styled.div(function (props) {
|
|
45
|
+
return {
|
|
46
|
+
display: 'flex',
|
|
47
|
+
flexDirection: 'column',
|
|
48
|
+
textAlign: 'right',
|
|
49
|
+
opacity: props.restricted ? '0.5' : 'inherit',
|
|
50
|
+
'&': {
|
|
51
|
+
/* Lozenge */
|
|
52
|
+
'& > span': {
|
|
53
|
+
marginBottom: "var(--ds-space-025, 2px)"
|
|
54
|
+
}
|
|
55
|
+
}
|
|
56
|
+
};
|
|
57
|
+
});
|
|
25
58
|
|
|
26
59
|
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-styled -- To migrate as part of go/ui-styling-standard
|
|
27
|
-
export var TimeStyle = styled.div(
|
|
60
|
+
export var TimeStyle = styled.div({
|
|
61
|
+
marginLeft: "var(--ds-space-250, 20px)",
|
|
62
|
+
flex: 'none',
|
|
63
|
+
color: "var(--ds-text-subtlest, ".concat(N100, ")"),
|
|
64
|
+
fontSize: '12px'
|
|
65
|
+
});
|
|
28
66
|
export var MENTION_ITEM_HEIGHT = 48;
|
|
29
67
|
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-styled -- To migrate as part of go/ui-styling-standard
|
|
30
|
-
export var MentionItemStyle = styled.div(
|
|
31
|
-
return
|
|
32
|
-
|
|
68
|
+
export var MentionItemStyle = styled.div(function (props) {
|
|
69
|
+
return {
|
|
70
|
+
backgroundColor: props.selected ? "var(--ds-background-selected, ".concat(N30, ")") : 'transparent',
|
|
71
|
+
display: 'block',
|
|
72
|
+
overflow: 'hidden',
|
|
73
|
+
listStyleType: 'none',
|
|
74
|
+
height: "".concat(MENTION_ITEM_HEIGHT, "px"),
|
|
75
|
+
lineHeight: 1.2,
|
|
76
|
+
cursor: 'pointer'
|
|
77
|
+
};
|
|
78
|
+
});
|
|
33
79
|
|
|
34
80
|
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-styled -- To migrate as part of go/ui-styling-standard
|
|
35
|
-
export var AccessSectionStyle = styled.div(
|
|
81
|
+
export var AccessSectionStyle = styled.div({
|
|
82
|
+
paddingLeft: "var(--ds-space-050, 4px)",
|
|
83
|
+
color: "var(--ds-text-subtle, ".concat(N500, ")")
|
|
84
|
+
});
|
|
@@ -1,8 +1,14 @@
|
|
|
1
|
-
import _taggedTemplateLiteral from "@babel/runtime/helpers/taggedTemplateLiteral";
|
|
2
|
-
var _templateObject;
|
|
3
1
|
import styled from '@emotion/styled';
|
|
4
2
|
import { mentionListWidth, noDialogContainerBorderColor, noDialogContainerBorderRadius, noDialogContainerBoxShadow } from '../../shared-styles';
|
|
5
3
|
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-styled -- To migrate as part of go/ui-styling-standard
|
|
6
|
-
export var MentionListStyle = styled.div(
|
|
7
|
-
return
|
|
8
|
-
|
|
4
|
+
export var MentionListStyle = styled.div(function (props) {
|
|
5
|
+
return {
|
|
6
|
+
display: props.empty ? 'none' : 'block',
|
|
7
|
+
/* list style */
|
|
8
|
+
width: mentionListWidth,
|
|
9
|
+
color: "var(--ds-text-subtle, #333)",
|
|
10
|
+
border: "1px solid ".concat(noDialogContainerBorderColor),
|
|
11
|
+
borderRadius: noDialogContainerBorderRadius,
|
|
12
|
+
boxShadow: noDialogContainerBoxShadow
|
|
13
|
+
};
|
|
14
|
+
});
|
|
@@ -1,19 +1,34 @@
|
|
|
1
1
|
import _taggedTemplateLiteral from "@babel/runtime/helpers/taggedTemplateLiteral";
|
|
2
|
-
var _templateObject
|
|
2
|
+
var _templateObject;
|
|
3
3
|
import styled from '@emotion/styled';
|
|
4
4
|
import { borderRadius } from '@atlaskit/theme/constants';
|
|
5
5
|
import { N500 } from '@atlaskit/theme/colors';
|
|
6
6
|
import { h400 } from '@atlaskit/theme/typography';
|
|
7
7
|
|
|
8
8
|
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-styled -- To migrate as part of go/ui-styling-standard
|
|
9
|
-
export var MentionListErrorStyle = styled.div(
|
|
9
|
+
export var MentionListErrorStyle = styled.div({
|
|
10
|
+
alignItems: 'center',
|
|
11
|
+
display: 'flex',
|
|
12
|
+
justifyContent: 'center',
|
|
13
|
+
flexDirection: 'column',
|
|
14
|
+
backgroundColor: "var(--ds-surface-overlay, white)",
|
|
15
|
+
color: "var(--ds-text-subtle, ".concat(N500, ")"),
|
|
16
|
+
border: "1px solid ".concat("var(--ds-surface-overlay, #fff)"),
|
|
17
|
+
borderRadius: "".concat(borderRadius(), "px")
|
|
18
|
+
});
|
|
10
19
|
|
|
11
20
|
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-styled -- To migrate as part of go/ui-styling-standard
|
|
12
|
-
export var GenericErrorVisualStyle = styled.div(
|
|
21
|
+
export var GenericErrorVisualStyle = styled.div({
|
|
22
|
+
marginBottom: "var(--ds-space-100, 8px)",
|
|
23
|
+
marginTop: "var(--ds-space-400, 32px)",
|
|
24
|
+
width: "var(--ds-space-1000, 80px)"
|
|
25
|
+
});
|
|
13
26
|
|
|
14
27
|
// TODO: Figure out why the themed css function is causing type errors when passed prop children
|
|
15
28
|
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-styled -- To migrate as part of go/ui-styling-standard
|
|
16
|
-
export var MentionListErrorHeadlineStyle = styled.div(
|
|
29
|
+
export var MentionListErrorHeadlineStyle = styled.div(_templateObject || (_templateObject = _taggedTemplateLiteral(["\n\t", ";\n\tmargin-bottom: ", ";\n"])), h400(), "var(--ds-space-100, 8px)");
|
|
17
30
|
|
|
18
31
|
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-styled -- To migrate as part of go/ui-styling-standard
|
|
19
|
-
export var MentionListAdviceStyle = styled.div(
|
|
32
|
+
export var MentionListAdviceStyle = styled.div({
|
|
33
|
+
marginBottom: "var(--ds-space-600, 48px)"
|
|
34
|
+
});
|
|
@@ -1,12 +1,29 @@
|
|
|
1
|
-
import _taggedTemplateLiteral from "@babel/runtime/helpers/taggedTemplateLiteral";
|
|
2
|
-
var _templateObject, _templateObject2;
|
|
3
1
|
import styled from '@emotion/styled';
|
|
4
2
|
import { N100 } from '@atlaskit/theme/colors';
|
|
5
3
|
import { mentionListWidth, noDialogContainerBorderColor, noDialogContainerBorderRadius, noDialogContainerBoxShadow } from '../../shared-styles';
|
|
6
4
|
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-styled -- To migrate as part of go/ui-styling-standard
|
|
7
|
-
export var MentionPickerStyle = styled.div(
|
|
8
|
-
return
|
|
5
|
+
export var MentionPickerStyle = styled.div(function (props) {
|
|
6
|
+
return {
|
|
7
|
+
display: props.visible ? 'block' : 'none'
|
|
8
|
+
};
|
|
9
9
|
});
|
|
10
10
|
|
|
11
11
|
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-styled -- To migrate as part of go/ui-styling-standard
|
|
12
|
-
export var MentionPickerInfoStyle = styled.div(
|
|
12
|
+
export var MentionPickerInfoStyle = styled.div({
|
|
13
|
+
background: "var(--ds-surface, #fff)",
|
|
14
|
+
color: "var(--ds-text-subtlest, ".concat(N100, ")"),
|
|
15
|
+
border: "1px solid ".concat(noDialogContainerBorderColor),
|
|
16
|
+
borderRadius: noDialogContainerBorderRadius,
|
|
17
|
+
boxShadow: noDialogContainerBoxShadow,
|
|
18
|
+
display: 'block',
|
|
19
|
+
width: mentionListWidth,
|
|
20
|
+
whiteSpace: 'nowrap',
|
|
21
|
+
'&': {
|
|
22
|
+
p: {
|
|
23
|
+
margin: 0,
|
|
24
|
+
overflow: 'hidden',
|
|
25
|
+
padding: "var(--ds-space-100, 8px)",
|
|
26
|
+
textOverflow: 'ellipsis'
|
|
27
|
+
}
|
|
28
|
+
}
|
|
29
|
+
});
|
|
@@ -1,8 +1,15 @@
|
|
|
1
|
-
import _taggedTemplateLiteral from "@babel/runtime/helpers/taggedTemplateLiteral";
|
|
2
|
-
var _templateObject;
|
|
3
1
|
import styled from '@emotion/styled';
|
|
4
2
|
import { borderRadius } from '@atlaskit/theme/constants';
|
|
5
3
|
import { scrollableMaxHeight } from '../../shared-styles';
|
|
6
4
|
|
|
7
5
|
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-styled -- To migrate as part of go/ui-styling-standard
|
|
8
|
-
export var ScrollableStyle = styled.div(
|
|
6
|
+
export var ScrollableStyle = styled.div({
|
|
7
|
+
display: 'block',
|
|
8
|
+
overflowX: 'hidden',
|
|
9
|
+
overflowY: 'auto',
|
|
10
|
+
padding: "var(--ds-space-050, 4px)".concat(" 0"),
|
|
11
|
+
margin: 0,
|
|
12
|
+
background: "var(--ds-surface, white)",
|
|
13
|
+
maxHeight: scrollableMaxHeight,
|
|
14
|
+
borderRadius: "".concat(borderRadius(), "px")
|
|
15
|
+
});
|
|
@@ -5,7 +5,7 @@ import { OPERATIONAL_EVENT_TYPE, UI_EVENT_TYPE } from '@atlaskit/analytics-gas-t
|
|
|
5
5
|
import { ELEMENTS_CHANNEL } from '../_constants';
|
|
6
6
|
import { isSpecialMentionText } from '../types';
|
|
7
7
|
var packageName = "@atlaskit/mention";
|
|
8
|
-
var packageVersion = "23.
|
|
8
|
+
var packageVersion = "23.2.0";
|
|
9
9
|
export var SLI_EVENT_TYPE = 'sli';
|
|
10
10
|
export var SMART_EVENT_TYPE = 'smart';
|
|
11
11
|
export var SliNames = /*#__PURE__*/function (SliNames) {
|
package/docs/0-intro.tsx
CHANGED
|
@@ -1,11 +1,5 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
|
-
import {
|
|
3
|
-
md,
|
|
4
|
-
Props,
|
|
5
|
-
Example,
|
|
6
|
-
code,
|
|
7
|
-
AtlassianInternalWarning,
|
|
8
|
-
} from '@atlaskit/docs';
|
|
2
|
+
import { md, Props, Example, code, AtlassianInternalWarning } from '@atlaskit/docs';
|
|
9
3
|
|
|
10
4
|
import SimpleMentionExample from '../examples/00-simple-mention-item';
|
|
11
5
|
const SimpleMentionSource = require('!!raw-loader!../examples/00-simple-mention-item');
|
|
@@ -77,13 +71,13 @@ export default md`
|
|
|
77
71
|
(e.g. enter and tab).
|
|
78
72
|
|
|
79
73
|
${(
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
74
|
+
<Example
|
|
75
|
+
packageName="@atlaskit/mention"
|
|
76
|
+
Component={SimpleMentionExample}
|
|
77
|
+
title="Simple Mention"
|
|
78
|
+
source={SimpleMentionSource}
|
|
79
|
+
/>
|
|
80
|
+
)}
|
|
87
81
|
|
|
88
82
|
${(<Props props={MentionProps} />)}
|
|
89
83
|
|
package/docs/1-in-editor.tsx
CHANGED
|
@@ -10,16 +10,15 @@ export default md`
|
|
|
10
10
|
## Using Mentions in AK Editor
|
|
11
11
|
|
|
12
12
|
${(
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
)}
|
|
13
|
+
<>
|
|
14
|
+
<p>
|
|
15
|
+
To use Mention in <a href="/packages/editor/editor-core">@atlaskit/editor-core</a>
|
|
16
|
+
{', '}
|
|
17
|
+
check the 'Editor with mentions' section in editor-core, then follow these steps for a more
|
|
18
|
+
involved tutorial:
|
|
19
|
+
</p>
|
|
20
|
+
</>
|
|
21
|
+
)}
|
|
23
22
|
|
|
24
23
|
### Option 1: Instantiate a \`MentionResource\`
|
|
25
24
|
|
|
@@ -58,13 +57,13 @@ export default md`
|
|
|
58
57
|
Extend the \`AbstractMentionResource\` to provide a more customized mentions experience.
|
|
59
58
|
|
|
60
59
|
${(
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
60
|
+
<Example
|
|
61
|
+
packageName="@atlaskit/mention"
|
|
62
|
+
Component={MentionWithEditorExample}
|
|
63
|
+
title="Mention With Editor"
|
|
64
|
+
source={MentionWithEditorExampleSource}
|
|
65
|
+
/>
|
|
66
|
+
)}
|
|
68
67
|
|
|
69
68
|
### Option 3: Extend and instantiate a \`SmartMentionResource\`
|
|
70
69
|
|
package/local-config-example.ts
CHANGED
|
@@ -1,41 +1,41 @@
|
|
|
1
1
|
// Copy this file to local-config.ts and customise.
|
|
2
2
|
export default {
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
3
|
+
asap: {
|
|
4
|
+
url: 'http://www.example.org/mentions',
|
|
5
|
+
securityProvider: () => ({
|
|
6
|
+
headers: {
|
|
7
|
+
'X-Bogus-Authorization': 'Bearer asap_token',
|
|
8
|
+
},
|
|
9
|
+
omitCredentials: true,
|
|
10
|
+
}),
|
|
11
|
+
},
|
|
12
|
+
sessionservice: {
|
|
13
|
+
url: 'http://www.example.org/mentions/some-cloud-id',
|
|
14
|
+
productId: 'micros-group/confluence',
|
|
15
|
+
securityProvider: () => ({
|
|
16
|
+
headers: {
|
|
17
|
+
'X-Bogus-Authorization': 'Session-bearer session_service_token',
|
|
18
|
+
},
|
|
19
|
+
}),
|
|
20
|
+
},
|
|
21
|
+
sessionServiceWithTeam: {
|
|
22
|
+
user: {
|
|
23
|
+
url: 'http://www.example.org/mentions/some-cloud-id',
|
|
24
|
+
productId: 'micros-group/confluence',
|
|
25
|
+
securityProvider: () => ({
|
|
26
|
+
headers: {
|
|
27
|
+
'X-Bogus-Authorization': 'Session-bearer session_service_token',
|
|
28
|
+
},
|
|
29
|
+
}),
|
|
30
|
+
},
|
|
31
|
+
team: {
|
|
32
|
+
url: 'http://www.example.org/teams/mentions',
|
|
33
|
+
productId: 'micros-group/confluence',
|
|
34
|
+
securityProvider: () => ({
|
|
35
|
+
headers: {
|
|
36
|
+
'X-Bogus-Authorization': 'Session-bearer session_service_token',
|
|
37
|
+
},
|
|
38
|
+
}),
|
|
39
|
+
},
|
|
40
|
+
},
|
|
41
41
|
};
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@atlaskit/mention",
|
|
3
|
-
"version": "23.
|
|
3
|
+
"version": "23.2.0",
|
|
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/"
|
|
@@ -42,7 +42,7 @@
|
|
|
42
42
|
"@atlaskit/focus-ring": "^1.4.0",
|
|
43
43
|
"@atlaskit/icon": "^22.3.0",
|
|
44
44
|
"@atlaskit/lozenge": "^11.7.0",
|
|
45
|
-
"@atlaskit/theme": "^12.
|
|
45
|
+
"@atlaskit/theme": "^12.9.0",
|
|
46
46
|
"@atlaskit/tokens": "^1.49.0",
|
|
47
47
|
"@atlaskit/tooltip": "^18.4.0",
|
|
48
48
|
"@atlaskit/ufo": "^0.2.0",
|