@atlaskit/mention 23.0.4 → 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 +1409 -1396
- package/dist/cjs/api/MentionNameResolver.js +28 -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/MentionNameResolver.js +25 -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/MentionNameResolver.js +28 -0
- 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/dist/types/api/MentionNameResolver.d.ts +6 -1
- package/dist/types-ts4.5/api/MentionNameResolver.d.ts +6 -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 -4
- package/report.api.md +619 -661
|
@@ -1,77 +1,76 @@
|
|
|
1
1
|
import styled from '@emotion/styled';
|
|
2
2
|
import { N900, N100, N30, N500 } from '@atlaskit/theme/colors';
|
|
3
3
|
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-styled -- To migrate as part of go/ui-styling-standard
|
|
4
|
-
export const RowStyle = styled.div
|
|
5
|
-
|
|
6
|
-
display: flex
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
overflow: hidden
|
|
10
|
-
padding:
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
4
|
+
export const 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)"} ${"var(--ds-space-150, 12px)"}`,
|
|
11
|
+
textOverflow: 'ellipsis',
|
|
12
|
+
verticalAlign: 'middle'
|
|
13
|
+
});
|
|
14
14
|
|
|
15
15
|
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-styled -- To migrate as part of go/ui-styling-standard
|
|
16
|
-
export const AvatarStyle = styled.span
|
|
17
|
-
position: relative
|
|
18
|
-
flex: initial
|
|
19
|
-
opacity:
|
|
20
|
-
|
|
16
|
+
export const AvatarStyle = styled.span(props => ({
|
|
17
|
+
position: 'relative',
|
|
18
|
+
flex: 'initial',
|
|
19
|
+
opacity: props.restricted ? '0.5' : 'inherit'
|
|
20
|
+
}));
|
|
21
21
|
|
|
22
22
|
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-styled -- To migrate as part of go/ui-styling-standard
|
|
23
|
-
export const NameSectionStyle = styled.div
|
|
24
|
-
flex: 1
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
opacity:
|
|
28
|
-
|
|
23
|
+
export const NameSectionStyle = styled.div(props => ({
|
|
24
|
+
flex: 1,
|
|
25
|
+
minWidth: 0,
|
|
26
|
+
marginLeft: "var(--ds-space-150, 12px)",
|
|
27
|
+
opacity: props.restricted ? '0.5' : 'inherit'
|
|
28
|
+
}));
|
|
29
29
|
|
|
30
30
|
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-styled -- To migrate as part of go/ui-styling-standard
|
|
31
|
-
export const FullNameStyle = styled.span
|
|
32
|
-
display: block
|
|
33
|
-
overflow: hidden
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
color:
|
|
37
|
-
|
|
31
|
+
export const FullNameStyle = styled.span({
|
|
32
|
+
display: 'block',
|
|
33
|
+
overflow: 'hidden',
|
|
34
|
+
textOverflow: 'ellipsis',
|
|
35
|
+
whiteSpace: 'nowrap',
|
|
36
|
+
color: `var(--ds-text, ${N900})`
|
|
37
|
+
});
|
|
38
38
|
|
|
39
39
|
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-styled -- To migrate as part of go/ui-styling-standard
|
|
40
|
-
export const InfoSectionStyle = styled.div
|
|
41
|
-
display: flex
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
opacity:
|
|
45
|
-
|
|
46
|
-
& {
|
|
40
|
+
export const InfoSectionStyle = styled.div(props => ({
|
|
41
|
+
display: 'flex',
|
|
42
|
+
flexDirection: 'column',
|
|
43
|
+
textAlign: 'right',
|
|
44
|
+
opacity: props.restricted ? '0.5' : 'inherit',
|
|
45
|
+
'&': {
|
|
47
46
|
/* Lozenge */
|
|
48
|
-
& > span {
|
|
49
|
-
|
|
47
|
+
'& > span': {
|
|
48
|
+
marginBottom: "var(--ds-space-025, 2px)"
|
|
50
49
|
}
|
|
51
50
|
}
|
|
52
|
-
|
|
51
|
+
}));
|
|
53
52
|
|
|
54
53
|
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-styled -- To migrate as part of go/ui-styling-standard
|
|
55
|
-
export const TimeStyle = styled.div
|
|
56
|
-
|
|
57
|
-
flex: none
|
|
58
|
-
color:
|
|
59
|
-
|
|
60
|
-
|
|
54
|
+
export const TimeStyle = styled.div({
|
|
55
|
+
marginLeft: "var(--ds-space-250, 20px)",
|
|
56
|
+
flex: 'none',
|
|
57
|
+
color: `var(--ds-text-subtlest, ${N100})`,
|
|
58
|
+
fontSize: '12px'
|
|
59
|
+
});
|
|
61
60
|
export const MENTION_ITEM_HEIGHT = 48;
|
|
62
61
|
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-styled -- To migrate as part of go/ui-styling-standard
|
|
63
|
-
export const MentionItemStyle = styled.div
|
|
64
|
-
|
|
65
|
-
display: block
|
|
66
|
-
overflow: hidden
|
|
67
|
-
|
|
68
|
-
height:
|
|
69
|
-
|
|
70
|
-
cursor: pointer
|
|
71
|
-
|
|
62
|
+
export const MentionItemStyle = styled.div(props => ({
|
|
63
|
+
backgroundColor: props.selected ? `var(--ds-background-selected, ${N30})` : 'transparent',
|
|
64
|
+
display: 'block',
|
|
65
|
+
overflow: 'hidden',
|
|
66
|
+
listStyleType: 'none',
|
|
67
|
+
height: `${MENTION_ITEM_HEIGHT}px`,
|
|
68
|
+
lineHeight: 1.2,
|
|
69
|
+
cursor: 'pointer'
|
|
70
|
+
}));
|
|
72
71
|
|
|
73
72
|
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-styled -- To migrate as part of go/ui-styling-standard
|
|
74
|
-
export const AccessSectionStyle = styled.div
|
|
75
|
-
|
|
76
|
-
color:
|
|
77
|
-
|
|
73
|
+
export const AccessSectionStyle = styled.div({
|
|
74
|
+
paddingLeft: "var(--ds-space-050, 4px)",
|
|
75
|
+
color: `var(--ds-text-subtle, ${N500})`
|
|
76
|
+
});
|
|
@@ -1,14 +1,12 @@
|
|
|
1
1
|
import styled from '@emotion/styled';
|
|
2
2
|
import { mentionListWidth, noDialogContainerBorderColor, noDialogContainerBorderRadius, noDialogContainerBoxShadow } from '../../shared-styles';
|
|
3
3
|
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-styled -- To migrate as part of go/ui-styling-standard
|
|
4
|
-
export const MentionListStyle = styled.div
|
|
5
|
-
display:
|
|
6
|
-
|
|
4
|
+
export const MentionListStyle = styled.div(props => ({
|
|
5
|
+
display: props.empty ? 'none' : 'block',
|
|
7
6
|
/* list style */
|
|
8
|
-
width:
|
|
9
|
-
color:
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
`;
|
|
7
|
+
width: mentionListWidth,
|
|
8
|
+
color: "var(--ds-text-subtle, #333)",
|
|
9
|
+
border: `1px solid ${noDialogContainerBorderColor}`,
|
|
10
|
+
borderRadius: noDialogContainerBorderRadius,
|
|
11
|
+
boxShadow: noDialogContainerBoxShadow
|
|
12
|
+
}));
|
|
@@ -4,32 +4,32 @@ import { N500 } from '@atlaskit/theme/colors';
|
|
|
4
4
|
import { h400 } from '@atlaskit/theme/typography';
|
|
5
5
|
|
|
6
6
|
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-styled -- To migrate as part of go/ui-styling-standard
|
|
7
|
-
export const MentionListErrorStyle = styled.div
|
|
8
|
-
|
|
9
|
-
display: flex
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
color:
|
|
14
|
-
border: 1px solid ${"var(--ds-surface-overlay, #fff)"}
|
|
15
|
-
|
|
16
|
-
|
|
7
|
+
export const MentionListErrorStyle = styled.div({
|
|
8
|
+
alignItems: 'center',
|
|
9
|
+
display: 'flex',
|
|
10
|
+
justifyContent: 'center',
|
|
11
|
+
flexDirection: 'column',
|
|
12
|
+
backgroundColor: "var(--ds-surface-overlay, white)",
|
|
13
|
+
color: `var(--ds-text-subtle, ${N500})`,
|
|
14
|
+
border: `1px solid ${"var(--ds-surface-overlay, #fff)"}`,
|
|
15
|
+
borderRadius: `${borderRadius()}px`
|
|
16
|
+
});
|
|
17
17
|
|
|
18
18
|
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-styled -- To migrate as part of go/ui-styling-standard
|
|
19
|
-
export const GenericErrorVisualStyle = styled.div
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
width:
|
|
23
|
-
|
|
19
|
+
export const GenericErrorVisualStyle = styled.div({
|
|
20
|
+
marginBottom: "var(--ds-space-100, 8px)",
|
|
21
|
+
marginTop: "var(--ds-space-400, 32px)",
|
|
22
|
+
width: "var(--ds-space-1000, 80px)"
|
|
23
|
+
});
|
|
24
24
|
|
|
25
25
|
// TODO: Figure out why the themed css function is causing type errors when passed prop children
|
|
26
26
|
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-styled -- To migrate as part of go/ui-styling-standard
|
|
27
27
|
export const MentionListErrorHeadlineStyle = styled.div`
|
|
28
|
-
|
|
29
|
-
|
|
28
|
+
${h400()};
|
|
29
|
+
margin-bottom: ${"var(--ds-space-100, 8px)"};
|
|
30
30
|
`;
|
|
31
31
|
|
|
32
32
|
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-styled -- To migrate as part of go/ui-styling-standard
|
|
33
|
-
export const MentionListAdviceStyle = styled.div
|
|
34
|
-
|
|
35
|
-
|
|
33
|
+
export const MentionListAdviceStyle = styled.div({
|
|
34
|
+
marginBottom: "var(--ds-space-600, 48px)"
|
|
35
|
+
});
|
|
@@ -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.0
|
|
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) {
|
|
@@ -12,12 +12,15 @@ export var DefaultMentionNameResolver = /*#__PURE__*/function () {
|
|
|
12
12
|
function DefaultMentionNameResolver(client) {
|
|
13
13
|
var _this = this;
|
|
14
14
|
var analyticsProps = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {};
|
|
15
|
+
var onResolvedAll = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : function () {};
|
|
15
16
|
_classCallCheck(this, DefaultMentionNameResolver);
|
|
16
17
|
_defineProperty(this, "nameCache", new Map());
|
|
17
18
|
_defineProperty(this, "nameQueue", new Map());
|
|
18
19
|
_defineProperty(this, "nameStartTime", new Map());
|
|
19
20
|
_defineProperty(this, "processingQueue", new Map());
|
|
20
21
|
_defineProperty(this, "debounce", 0);
|
|
22
|
+
_defineProperty(this, "debounceOnResolve", null);
|
|
23
|
+
_defineProperty(this, "isOnResolvedAllCalled", false);
|
|
21
24
|
_defineProperty(this, "processQueue", function () {
|
|
22
25
|
clearTimeout(_this.debounce);
|
|
23
26
|
_this.debounce = 0;
|
|
@@ -52,10 +55,15 @@ export var DefaultMentionNameResolver = /*#__PURE__*/function () {
|
|
|
52
55
|
// Make sure anything left in the queue gets processed.
|
|
53
56
|
if (_this.nameQueue.size > 0) {
|
|
54
57
|
_this.scheduleProcessQueue();
|
|
58
|
+
} else {
|
|
59
|
+
_this.scheduleOnAllResolved();
|
|
55
60
|
}
|
|
56
61
|
});
|
|
57
62
|
this.client = client;
|
|
58
63
|
this.fireHydrationEvent = fireAnalyticsMentionHydrationEvent(analyticsProps);
|
|
64
|
+
// If provided, this will be called once all pending mentions in the queue are resolved.
|
|
65
|
+
// A sample usage is scrolling to a mention on page load, after the mentions have loadad.
|
|
66
|
+
this.onResolvedAll = onResolvedAll;
|
|
59
67
|
}
|
|
60
68
|
_createClass(DefaultMentionNameResolver, [{
|
|
61
69
|
key: "lookupName",
|
|
@@ -64,6 +72,9 @@ export var DefaultMentionNameResolver = /*#__PURE__*/function () {
|
|
|
64
72
|
var name = this.nameCache.get(id);
|
|
65
73
|
if (name) {
|
|
66
74
|
this.fireAnalytics(true, name);
|
|
75
|
+
if (this.nameQueue.size === 0) {
|
|
76
|
+
this.scheduleOnAllResolved();
|
|
77
|
+
}
|
|
67
78
|
return name;
|
|
68
79
|
}
|
|
69
80
|
return new Promise(function (resolve) {
|
|
@@ -98,6 +109,21 @@ export var DefaultMentionNameResolver = /*#__PURE__*/function () {
|
|
|
98
109
|
this.debounce = window.setTimeout(this.processQueue, DefaultMentionNameResolver.waitForBatch);
|
|
99
110
|
}
|
|
100
111
|
}
|
|
112
|
+
}, {
|
|
113
|
+
key: "scheduleOnAllResolved",
|
|
114
|
+
value: function scheduleOnAllResolved() {
|
|
115
|
+
var _this3 = this;
|
|
116
|
+
if (this.debounceOnResolve) {
|
|
117
|
+
clearTimeout(this.debounceOnResolve);
|
|
118
|
+
}
|
|
119
|
+
this.debounceOnResolve = window.setTimeout(function () {
|
|
120
|
+
if (_this3.isOnResolvedAllCalled) {
|
|
121
|
+
return;
|
|
122
|
+
}
|
|
123
|
+
_this3.onResolvedAll();
|
|
124
|
+
_this3.isOnResolvedAllCalled = true;
|
|
125
|
+
}, DefaultMentionNameResolver.waitForResolveAll);
|
|
126
|
+
}
|
|
101
127
|
}, {
|
|
102
128
|
key: "isQueueAtLimit",
|
|
103
129
|
value: function isQueueAtLimit() {
|
|
@@ -150,6 +176,8 @@ export var DefaultMentionNameResolver = /*#__PURE__*/function () {
|
|
|
150
176
|
* This addresses [this ticket](https://product-fabric.atlassian.net/browse/QS-3789).
|
|
151
177
|
*/
|
|
152
178
|
_defineProperty(DefaultMentionNameResolver, "waitForBatch", 100);
|
|
179
|
+
// ms
|
|
180
|
+
_defineProperty(DefaultMentionNameResolver, "waitForResolveAll", 800);
|
|
153
181
|
export function mergeNameResolverQueues(queueA, queueB) {
|
|
154
182
|
var queueBeingMerged = new Map(_toConsumableArray(queueA));
|
|
155
183
|
|
|
@@ -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
|
+
});
|