@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.
Files changed (33) hide show
  1. package/CHANGELOG.md +12 -0
  2. package/dist/cjs/api/PresenceResource.js +6 -6
  3. package/dist/cjs/components/Mention/PrimitiveMention.js +1 -1
  4. package/dist/cjs/components/MentionDescriptionByline/styles.js +9 -3
  5. package/dist/cjs/components/MentionItem/styles.js +65 -16
  6. package/dist/cjs/components/MentionList/styles.js +11 -5
  7. package/dist/cjs/components/MentionListError/styles.js +20 -5
  8. package/dist/cjs/components/MentionPicker/styles.js +22 -5
  9. package/dist/cjs/components/Scrollable/styles.js +10 -3
  10. package/dist/cjs/util/analytics.js +1 -1
  11. package/dist/es2019/api/PresenceResource.js +4 -4
  12. package/dist/es2019/components/Mention/PrimitiveMention.js +18 -18
  13. package/dist/es2019/components/MentionDescriptionByline/styles.js +9 -11
  14. package/dist/es2019/components/MentionItem/styles.js +56 -57
  15. package/dist/es2019/components/MentionList/styles.js +8 -10
  16. package/dist/es2019/components/MentionListError/styles.js +20 -20
  17. package/dist/es2019/components/MentionPicker/styles.js +19 -20
  18. package/dist/es2019/components/Scrollable/styles.js +10 -13
  19. package/dist/es2019/util/analytics.js +1 -1
  20. package/dist/esm/api/PresenceResource.js +6 -6
  21. package/dist/esm/components/Mention/PrimitiveMention.js +1 -1
  22. package/dist/esm/components/MentionDescriptionByline/styles.js +9 -3
  23. package/dist/esm/components/MentionItem/styles.js +65 -16
  24. package/dist/esm/components/MentionList/styles.js +11 -5
  25. package/dist/esm/components/MentionListError/styles.js +20 -5
  26. package/dist/esm/components/MentionPicker/styles.js +22 -5
  27. package/dist/esm/components/Scrollable/styles.js +10 -3
  28. package/dist/esm/util/analytics.js +1 -1
  29. package/docs/0-intro.tsx +8 -14
  30. package/docs/1-in-editor.tsx +16 -17
  31. package/local-config-example.ts +38 -38
  32. package/package.json +2 -2
  33. package/report.api.md +619 -661
package/CHANGELOG.md CHANGED
@@ -1,5 +1,17 @@
1
1
  # @atlaskit/mention
2
2
 
3
+ ## 23.2.0
4
+
5
+ ### Minor Changes
6
+
7
+ - [#104824](https://stash.atlassian.com/projects/CONFCLOUD/repos/confluence-frontend/pull-requests/104824)
8
+ [`10443be28cedb`](https://stash.atlassian.com/projects/CONFCLOUD/repos/confluence-frontend/commits/10443be28cedb) -
9
+ converting tagged template syntax to object syntax for remanining styles from DSP-17626
10
+
11
+ ### Patch Changes
12
+
13
+ - Updated dependencies
14
+
3
15
  ## 23.1.0
4
16
 
5
17
  ### Minor Changes
@@ -32,8 +32,8 @@ var CacheEntry = /*#__PURE__*/function () {
32
32
  }]);
33
33
  return CacheEntry;
34
34
  }();
35
- var AbstractPresenceResource = exports.AbstractPresenceResource = /*#__PURE__*/function (_ref) {
36
- (0, _inherits2.default)(AbstractPresenceResource, _ref);
35
+ var AbstractPresenceResource = exports.AbstractPresenceResource = /*#__PURE__*/function (_AbstractResource) {
36
+ (0, _inherits2.default)(AbstractPresenceResource, _AbstractResource);
37
37
  var _super = _createSuper(AbstractPresenceResource);
38
38
  function AbstractPresenceResource() {
39
39
  (0, _classCallCheck2.default)(this, AbstractPresenceResource);
@@ -324,10 +324,10 @@ var DefaultPresenceParser = exports.DefaultPresenceParser = /*#__PURE__*/functio
324
324
  }
325
325
 
326
326
  /*
327
- This is a bit of an odd exception. In the case where a user is in "Focus Mode", their presence state
328
- is returned as 'busy' along with a `stateMetadata` object containing a `focus` field.
329
- In this case we ignore the value of the `state` field and treat the presence as a 'focus' state.
330
- */
327
+ This is a bit of an odd exception. In the case where a user is in "Focus Mode", their presence state
328
+ is returned as 'busy' along with a `stateMetadata` object containing a `focus` field.
329
+ In this case we ignore the value of the `state` field and treat the presence as a 'focus' state.
330
+ */
331
331
  }, {
332
332
  key: "isFocusState",
333
333
  value: function isFocusState(presence) {
@@ -45,7 +45,7 @@ var PrimitiveMention = /*#__PURE__*/(0, _react2.forwardRef)(function (_ref2, ref
45
45
  other = (0, _objectWithoutProperties2.default)(_ref2, _excluded);
46
46
  return (0, _react.jsx)("span", (0, _extends2.default)({
47
47
  ref: ref,
48
- css: (0, _react.css)(_templateObject || (_templateObject = (0, _taggedTemplateLiteral2.default)(["\n display: inline;\n border: 1px solid ", ";\n background: ", ";\n color: ", ";\n border-radius: 20px;\n cursor: pointer;\n padding: 0 0.3em 2px 0.23em;\n line-height: 1.714;\n font-size: 1em;\n font-weight: normal;\n word-break: break-word;\n &:hover {\n background: ", ";\n }\n &:active {\n background: ", ";\n }\n "])), getStyle({
48
+ css: (0, _react.css)(_templateObject || (_templateObject = (0, _taggedTemplateLiteral2.default)(["\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({
49
49
  mentionType: mentionType
50
50
  }, 'borderColor'), getStyle({
51
51
  mentionType: mentionType
@@ -5,9 +5,15 @@ Object.defineProperty(exports, "__esModule", {
5
5
  value: true
6
6
  });
7
7
  exports.DescriptionBylineStyle = void 0;
8
- var _taggedTemplateLiteral2 = _interopRequireDefault(require("@babel/runtime/helpers/taggedTemplateLiteral"));
9
8
  var _styled = _interopRequireDefault(require("@emotion/styled"));
10
9
  var _colors = require("@atlaskit/theme/colors");
11
- var _templateObject;
12
10
  // eslint-disable-next-line @atlaskit/ui-styling-standard/no-styled -- To migrate as part of go/ui-styling-standard
13
- var DescriptionBylineStyle = exports.DescriptionBylineStyle = _styled.default.span(_templateObject || (_templateObject = (0, _taggedTemplateLiteral2.default)(["\n color: ", ";\n font-size: 12px;\n\n margin-top: ", ";\n\n display: block;\n overflow: hidden;\n text-overflow: ellipsis;\n white-space: nowrap;\n"])), "var(--ds-text-subtlest, ".concat(_colors.N100, ")"), "var(--ds-space-025, 2px)");
11
+ var DescriptionBylineStyle = exports.DescriptionBylineStyle = _styled.default.span({
12
+ color: "var(--ds-text-subtlest, ".concat(_colors.N100, ")"),
13
+ fontSize: '12px',
14
+ marginTop: "var(--ds-space-025, 2px)",
15
+ display: 'block',
16
+ overflow: 'hidden',
17
+ textOverflow: 'ellipsis',
18
+ whiteSpace: 'nowrap'
19
+ });
@@ -5,38 +5,87 @@ Object.defineProperty(exports, "__esModule", {
5
5
  value: true
6
6
  });
7
7
  exports.TimeStyle = exports.RowStyle = exports.NameSectionStyle = exports.MentionItemStyle = exports.MENTION_ITEM_HEIGHT = exports.InfoSectionStyle = exports.FullNameStyle = exports.AvatarStyle = exports.AccessSectionStyle = void 0;
8
- var _taggedTemplateLiteral2 = _interopRequireDefault(require("@babel/runtime/helpers/taggedTemplateLiteral"));
9
8
  var _styled = _interopRequireDefault(require("@emotion/styled"));
10
9
  var _colors = require("@atlaskit/theme/colors");
11
- var _templateObject, _templateObject2, _templateObject3, _templateObject4, _templateObject5, _templateObject6, _templateObject7, _templateObject8;
12
10
  // eslint-disable-next-line @atlaskit/ui-styling-standard/no-styled -- To migrate as part of go/ui-styling-standard
13
- var RowStyle = exports.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: ", " ", ";\n text-overflow: ellipsis;\n vertical-align: middle;\n"])), "var(--ds-space-075, 6px)", "var(--ds-space-150, 12px)");
11
+ var RowStyle = exports.RowStyle = _styled.default.div({
12
+ alignItems: 'center',
13
+ display: 'flex',
14
+ flexDirection: 'row',
15
+ flexWrap: 'wrap',
16
+ overflow: 'hidden',
17
+ padding: "var(--ds-space-075, 6px)".concat(" ", "var(--ds-space-150, 12px)"),
18
+ textOverflow: 'ellipsis',
19
+ verticalAlign: 'middle'
20
+ });
14
21
 
15
22
  // eslint-disable-next-line @atlaskit/ui-styling-standard/no-styled -- To migrate as part of go/ui-styling-standard
16
- var AvatarStyle = exports.AvatarStyle = _styled.default.span(_templateObject2 || (_templateObject2 = (0, _taggedTemplateLiteral2.default)(["\n position: relative;\n flex: initial;\n opacity: ", ";\n"])), function (props) {
17
- return props.restricted ? '0.5' : 'inherit';
23
+ var AvatarStyle = exports.AvatarStyle = _styled.default.span(function (props) {
24
+ return {
25
+ position: 'relative',
26
+ flex: 'initial',
27
+ opacity: props.restricted ? '0.5' : 'inherit'
28
+ };
18
29
  });
19
30
 
20
31
  // eslint-disable-next-line @atlaskit/ui-styling-standard/no-styled -- To migrate as part of go/ui-styling-standard
21
- var NameSectionStyle = exports.NameSectionStyle = _styled.default.div(_templateObject3 || (_templateObject3 = (0, _taggedTemplateLiteral2.default)(["\n flex: 1;\n min-width: 0;\n margin-left: ", ";\n opacity: ", ";\n"])), "var(--ds-space-150, 12px)", function (props) {
22
- return props.restricted ? '0.5' : 'inherit';
32
+ var NameSectionStyle = exports.NameSectionStyle = _styled.default.div(function (props) {
33
+ return {
34
+ flex: 1,
35
+ minWidth: 0,
36
+ marginLeft: "var(--ds-space-150, 12px)",
37
+ opacity: props.restricted ? '0.5' : 'inherit'
38
+ };
23
39
  });
24
40
 
25
41
  // eslint-disable-next-line @atlaskit/ui-styling-standard/no-styled -- To migrate as part of go/ui-styling-standard
26
- var FullNameStyle = exports.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, ")"));
42
+ var FullNameStyle = exports.FullNameStyle = _styled.default.span({
43
+ display: 'block',
44
+ overflow: 'hidden',
45
+ textOverflow: 'ellipsis',
46
+ whiteSpace: 'nowrap',
47
+ color: "var(--ds-text, ".concat(_colors.N900, ")")
48
+ });
27
49
 
28
50
  // eslint-disable-next-line @atlaskit/ui-styling-standard/no-styled -- To migrate as part of go/ui-styling-standard
29
- var InfoSectionStyle = exports.InfoSectionStyle = _styled.default.div(_templateObject5 || (_templateObject5 = (0, _taggedTemplateLiteral2.default)(["\n display: flex;\n flex-direction: column;\n text-align: right;\n opacity: ", ";\n\n & {\n /* Lozenge */\n & > span {\n margin-bottom: ", ";\n }\n }\n"])), function (props) {
30
- return props.restricted ? '0.5' : 'inherit';
31
- }, "var(--ds-space-025, 2px)");
51
+ var InfoSectionStyle = exports.InfoSectionStyle = _styled.default.div(function (props) {
52
+ return {
53
+ display: 'flex',
54
+ flexDirection: 'column',
55
+ textAlign: 'right',
56
+ opacity: props.restricted ? '0.5' : 'inherit',
57
+ '&': {
58
+ /* Lozenge */
59
+ '& > span': {
60
+ marginBottom: "var(--ds-space-025, 2px)"
61
+ }
62
+ }
63
+ };
64
+ });
32
65
 
33
66
  // eslint-disable-next-line @atlaskit/ui-styling-standard/no-styled -- To migrate as part of go/ui-styling-standard
34
- var TimeStyle = exports.TimeStyle = _styled.default.div(_templateObject6 || (_templateObject6 = (0, _taggedTemplateLiteral2.default)(["\n margin-left: ", ";\n flex: none;\n color: ", ";\n font-size: 12px;\n"])), "var(--ds-space-250, 20px)", "var(--ds-text-subtlest, ".concat(_colors.N100, ")"));
67
+ var TimeStyle = exports.TimeStyle = _styled.default.div({
68
+ marginLeft: "var(--ds-space-250, 20px)",
69
+ flex: 'none',
70
+ color: "var(--ds-text-subtlest, ".concat(_colors.N100, ")"),
71
+ fontSize: '12px'
72
+ });
35
73
  var MENTION_ITEM_HEIGHT = exports.MENTION_ITEM_HEIGHT = 48;
36
74
  // eslint-disable-next-line @atlaskit/ui-styling-standard/no-styled -- To migrate as part of go/ui-styling-standard
37
- var MentionItemStyle = exports.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) {
38
- return props.selected ? "var(--ds-background-selected, ".concat(_colors.N30, ")") : 'transparent';
39
- }, MENTION_ITEM_HEIGHT);
75
+ var MentionItemStyle = exports.MentionItemStyle = _styled.default.div(function (props) {
76
+ return {
77
+ backgroundColor: props.selected ? "var(--ds-background-selected, ".concat(_colors.N30, ")") : 'transparent',
78
+ display: 'block',
79
+ overflow: 'hidden',
80
+ listStyleType: 'none',
81
+ height: "".concat(MENTION_ITEM_HEIGHT, "px"),
82
+ lineHeight: 1.2,
83
+ cursor: 'pointer'
84
+ };
85
+ });
40
86
 
41
87
  // eslint-disable-next-line @atlaskit/ui-styling-standard/no-styled -- To migrate as part of go/ui-styling-standard
42
- var AccessSectionStyle = exports.AccessSectionStyle = _styled.default.div(_templateObject8 || (_templateObject8 = (0, _taggedTemplateLiteral2.default)(["\n padding-left: ", ";\n color: ", ";\n"])), "var(--ds-space-050, 4px)", "var(--ds-text-subtle, ".concat(_colors.N500, ")"));
88
+ var AccessSectionStyle = exports.AccessSectionStyle = _styled.default.div({
89
+ paddingLeft: "var(--ds-space-050, 4px)",
90
+ color: "var(--ds-text-subtle, ".concat(_colors.N500, ")")
91
+ });
@@ -5,11 +5,17 @@ Object.defineProperty(exports, "__esModule", {
5
5
  value: true
6
6
  });
7
7
  exports.MentionListStyle = void 0;
8
- var _taggedTemplateLiteral2 = _interopRequireDefault(require("@babel/runtime/helpers/taggedTemplateLiteral"));
9
8
  var _styled = _interopRequireDefault(require("@emotion/styled"));
10
9
  var _sharedStyles = require("../../shared-styles");
11
- var _templateObject;
12
10
  // eslint-disable-next-line @atlaskit/ui-styling-standard/no-styled -- To migrate as part of go/ui-styling-standard
13
- var MentionListStyle = exports.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) {
14
- return props.empty ? 'none' : 'block';
15
- }, _sharedStyles.mentionListWidth, "var(--ds-text-subtle, #333)", _sharedStyles.noDialogContainerBorderColor, _sharedStyles.noDialogContainerBorderRadius, _sharedStyles.noDialogContainerBoxShadow);
11
+ var MentionListStyle = exports.MentionListStyle = _styled.default.div(function (props) {
12
+ return {
13
+ display: props.empty ? 'none' : 'block',
14
+ /* list style */
15
+ width: _sharedStyles.mentionListWidth,
16
+ color: "var(--ds-text-subtle, #333)",
17
+ border: "1px solid ".concat(_sharedStyles.noDialogContainerBorderColor),
18
+ borderRadius: _sharedStyles.noDialogContainerBorderRadius,
19
+ boxShadow: _sharedStyles.noDialogContainerBoxShadow
20
+ };
21
+ });
@@ -10,16 +10,31 @@ var _styled = _interopRequireDefault(require("@emotion/styled"));
10
10
  var _constants = require("@atlaskit/theme/constants");
11
11
  var _colors = require("@atlaskit/theme/colors");
12
12
  var _typography = require("@atlaskit/theme/typography");
13
- var _templateObject, _templateObject2, _templateObject3, _templateObject4;
13
+ var _templateObject;
14
14
  // eslint-disable-next-line @atlaskit/ui-styling-standard/no-styled -- To migrate as part of go/ui-styling-standard
15
- var MentionListErrorStyle = exports.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)());
15
+ var MentionListErrorStyle = exports.MentionListErrorStyle = _styled.default.div({
16
+ alignItems: 'center',
17
+ display: 'flex',
18
+ justifyContent: 'center',
19
+ flexDirection: 'column',
20
+ backgroundColor: "var(--ds-surface-overlay, white)",
21
+ color: "var(--ds-text-subtle, ".concat(_colors.N500, ")"),
22
+ border: "1px solid ".concat("var(--ds-surface-overlay, #fff)"),
23
+ borderRadius: "".concat((0, _constants.borderRadius)(), "px")
24
+ });
16
25
 
17
26
  // eslint-disable-next-line @atlaskit/ui-styling-standard/no-styled -- To migrate as part of go/ui-styling-standard
18
- var GenericErrorVisualStyle = exports.GenericErrorVisualStyle = _styled.default.div(_templateObject2 || (_templateObject2 = (0, _taggedTemplateLiteral2.default)(["\n margin-bottom: ", ";\n margin-top: ", ";\n width: ", ";\n"])), "var(--ds-space-100, 8px)", "var(--ds-space-400, 32px)", "var(--ds-space-1000, 80px)");
27
+ var GenericErrorVisualStyle = exports.GenericErrorVisualStyle = _styled.default.div({
28
+ marginBottom: "var(--ds-space-100, 8px)",
29
+ marginTop: "var(--ds-space-400, 32px)",
30
+ width: "var(--ds-space-1000, 80px)"
31
+ });
19
32
 
20
33
  // TODO: Figure out why the themed css function is causing type errors when passed prop children
21
34
  // eslint-disable-next-line @atlaskit/ui-styling-standard/no-styled -- To migrate as part of go/ui-styling-standard
22
- var MentionListErrorHeadlineStyle = exports.MentionListErrorHeadlineStyle = _styled.default.div(_templateObject3 || (_templateObject3 = (0, _taggedTemplateLiteral2.default)(["\n ", ";\n margin-bottom: ", ";\n"])), (0, _typography.h400)(), "var(--ds-space-100, 8px)");
35
+ var MentionListErrorHeadlineStyle = exports.MentionListErrorHeadlineStyle = _styled.default.div(_templateObject || (_templateObject = (0, _taggedTemplateLiteral2.default)(["\n\t", ";\n\tmargin-bottom: ", ";\n"])), (0, _typography.h400)(), "var(--ds-space-100, 8px)");
23
36
 
24
37
  // eslint-disable-next-line @atlaskit/ui-styling-standard/no-styled -- To migrate as part of go/ui-styling-standard
25
- var MentionListAdviceStyle = exports.MentionListAdviceStyle = _styled.default.div(_templateObject4 || (_templateObject4 = (0, _taggedTemplateLiteral2.default)(["\n margin-bottom: ", ";\n"])), "var(--ds-space-600, 48px)");
38
+ var MentionListAdviceStyle = exports.MentionListAdviceStyle = _styled.default.div({
39
+ marginBottom: "var(--ds-space-600, 48px)"
40
+ });
@@ -5,15 +5,32 @@ Object.defineProperty(exports, "__esModule", {
5
5
  value: true
6
6
  });
7
7
  exports.MentionPickerStyle = exports.MentionPickerInfoStyle = void 0;
8
- var _taggedTemplateLiteral2 = _interopRequireDefault(require("@babel/runtime/helpers/taggedTemplateLiteral"));
9
8
  var _styled = _interopRequireDefault(require("@emotion/styled"));
10
9
  var _colors = require("@atlaskit/theme/colors");
11
10
  var _sharedStyles = require("../../shared-styles");
12
- var _templateObject, _templateObject2;
13
11
  // eslint-disable-next-line @atlaskit/ui-styling-standard/no-styled -- To migrate as part of go/ui-styling-standard
14
- var MentionPickerStyle = exports.MentionPickerStyle = _styled.default.div(_templateObject || (_templateObject = (0, _taggedTemplateLiteral2.default)(["\n display: ", ";\n"])), function (props) {
15
- return props.visible ? 'block' : 'none';
12
+ var MentionPickerStyle = exports.MentionPickerStyle = _styled.default.div(function (props) {
13
+ return {
14
+ display: props.visible ? 'block' : 'none'
15
+ };
16
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
- var MentionPickerInfoStyle = exports.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: ", ";\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, "var(--ds-space-100, 8px)");
19
+ var MentionPickerInfoStyle = exports.MentionPickerInfoStyle = _styled.default.div({
20
+ background: "var(--ds-surface, #fff)",
21
+ color: "var(--ds-text-subtlest, ".concat(_colors.N100, ")"),
22
+ border: "1px solid ".concat(_sharedStyles.noDialogContainerBorderColor),
23
+ borderRadius: _sharedStyles.noDialogContainerBorderRadius,
24
+ boxShadow: _sharedStyles.noDialogContainerBoxShadow,
25
+ display: 'block',
26
+ width: _sharedStyles.mentionListWidth,
27
+ whiteSpace: 'nowrap',
28
+ '&': {
29
+ p: {
30
+ margin: 0,
31
+ overflow: 'hidden',
32
+ padding: "var(--ds-space-100, 8px)",
33
+ textOverflow: 'ellipsis'
34
+ }
35
+ }
36
+ });
@@ -5,10 +5,17 @@ Object.defineProperty(exports, "__esModule", {
5
5
  value: true
6
6
  });
7
7
  exports.ScrollableStyle = void 0;
8
- var _taggedTemplateLiteral2 = _interopRequireDefault(require("@babel/runtime/helpers/taggedTemplateLiteral"));
9
8
  var _styled = _interopRequireDefault(require("@emotion/styled"));
10
9
  var _constants = require("@atlaskit/theme/constants");
11
10
  var _sharedStyles = require("../../shared-styles");
12
- var _templateObject;
13
11
  // eslint-disable-next-line @atlaskit/ui-styling-standard/no-styled -- To migrate as part of go/ui-styling-standard
14
- var ScrollableStyle = exports.ScrollableStyle = _styled.default.div(_templateObject || (_templateObject = (0, _taggedTemplateLiteral2.default)(["\n display: block;\n overflow-x: hidden;\n overflow-y: auto;\n\n padding: ", " 0;\n margin: 0;\n\n background: ", ";\n max-height: ", ";\n\n border-radius: ", "px;\n"])), "var(--ds-space-050, 4px)", "var(--ds-surface, white)", _sharedStyles.scrollableMaxHeight, (0, _constants.borderRadius)());
12
+ var ScrollableStyle = exports.ScrollableStyle = _styled.default.div({
13
+ display: 'block',
14
+ overflowX: 'hidden',
15
+ overflowY: 'auto',
16
+ padding: "var(--ds-space-050, 4px)".concat(" 0"),
17
+ margin: 0,
18
+ background: "var(--ds-surface, white)",
19
+ maxHeight: _sharedStyles.scrollableMaxHeight,
20
+ borderRadius: "".concat((0, _constants.borderRadius)(), "px")
21
+ });
@@ -12,7 +12,7 @@ var _types = require("../types");
12
12
  function ownKeys(e, r) { var t = Object.keys(e); if (Object.getOwnPropertySymbols) { var o = Object.getOwnPropertySymbols(e); r && (o = o.filter(function (r) { return Object.getOwnPropertyDescriptor(e, r).enumerable; })), t.push.apply(t, o); } return t; }
13
13
  function _objectSpread(e) { for (var r = 1; r < arguments.length; r++) { var t = null != arguments[r] ? arguments[r] : {}; r % 2 ? ownKeys(Object(t), !0).forEach(function (r) { (0, _defineProperty2.default)(e, r, t[r]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e, Object.getOwnPropertyDescriptors(t)) : ownKeys(Object(t)).forEach(function (r) { Object.defineProperty(e, r, Object.getOwnPropertyDescriptor(t, r)); }); } return e; }
14
14
  var packageName = "@atlaskit/mention";
15
- var packageVersion = "23.1.0";
15
+ var packageVersion = "23.2.0";
16
16
  var SLI_EVENT_TYPE = exports.SLI_EVENT_TYPE = 'sli';
17
17
  var SMART_EVENT_TYPE = exports.SMART_EVENT_TYPE = 'smart';
18
18
  var SliNames = exports.SliNames = /*#__PURE__*/function (SliNames) {
@@ -225,10 +225,10 @@ export class DefaultPresenceParser {
225
225
  }
226
226
 
227
227
  /*
228
- This is a bit of an odd exception. In the case where a user is in "Focus Mode", their presence state
229
- is returned as 'busy' along with a `stateMetadata` object containing a `focus` field.
230
- In this case we ignore the value of the `state` field and treat the presence as a 'focus' state.
231
- */
228
+ This is a bit of an odd exception. In the case where a user is in "Focus Mode", their presence state
229
+ is returned as 'busy' along with a `stateMetadata` object containing a `focus` field.
230
+ In this case we ignore the value of the `state` field and treat the presence as a 'focus' state.
231
+ */
232
232
  static isFocusState(presence) {
233
233
  if (presence.stateMetadata) {
234
234
  try {
@@ -40,34 +40,34 @@ const PrimitiveMention = /*#__PURE__*/forwardRef(({
40
40
  return jsx("span", _extends({
41
41
  ref: ref,
42
42
  css: css`
43
- display: inline;
44
- border: 1px solid ${getStyle({
43
+ display: inline;
44
+ border: 1px solid ${getStyle({
45
45
  mentionType
46
46
  }, 'borderColor')};
47
- background: ${getStyle({
47
+ background: ${getStyle({
48
48
  mentionType
49
49
  }, 'background')};
50
- color: ${getStyle({
50
+ color: ${getStyle({
51
51
  mentionType
52
52
  }, 'text')};
53
- border-radius: 20px;
54
- cursor: pointer;
55
- padding: 0 0.3em 2px 0.23em;
56
- line-height: 1.714;
57
- font-size: 1em;
58
- font-weight: normal;
59
- word-break: break-word;
60
- &:hover {
61
- background: ${getStyle({
53
+ border-radius: 20px;
54
+ cursor: pointer;
55
+ padding: 0 0.3em 2px 0.23em;
56
+ line-height: 1.714;
57
+ font-size: 1em;
58
+ font-weight: normal;
59
+ word-break: break-word;
60
+ &:hover {
61
+ background: ${getStyle({
62
62
  mentionType
63
63
  }, 'hoveredBackground')};
64
- }
65
- &:active {
66
- background: ${getStyle({
64
+ }
65
+ &:active {
66
+ background: ${getStyle({
67
67
  mentionType
68
68
  }, 'pressedBackground')};
69
- }
70
- `
69
+ }
70
+ `
71
71
  }, other));
72
72
  });
73
73
  export default PrimitiveMention;
@@ -1,14 +1,12 @@
1
1
  import styled from '@emotion/styled';
2
2
  import { N100 } 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 DescriptionBylineStyle = styled.span`
5
- color: ${`var(--ds-text-subtlest, ${N100})`};
6
- font-size: 12px;
7
-
8
- margin-top: ${"var(--ds-space-025, 2px)"};
9
-
10
- display: block;
11
- overflow: hidden;
12
- text-overflow: ellipsis;
13
- white-space: nowrap;
14
- `;
4
+ export const DescriptionBylineStyle = styled.span({
5
+ color: `var(--ds-text-subtlest, ${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,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
- align-items: center;
6
- display: flex;
7
- flex-direction: row;
8
- flex-wrap: wrap;
9
- overflow: hidden;
10
- padding: ${"var(--ds-space-075, 6px)"} ${"var(--ds-space-150, 12px)"};
11
- text-overflow: ellipsis;
12
- vertical-align: middle;
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: ${props => props.restricted ? '0.5' : 'inherit'};
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
- min-width: 0;
26
- margin-left: ${"var(--ds-space-150, 12px)"};
27
- opacity: ${props => props.restricted ? '0.5' : 'inherit'};
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
- text-overflow: ellipsis;
35
- white-space: nowrap;
36
- color: ${`var(--ds-text, ${N900})`};
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
- flex-direction: column;
43
- text-align: right;
44
- opacity: ${props => props.restricted ? '0.5' : 'inherit'};
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
- margin-bottom: ${"var(--ds-space-025, 2px)"};
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
- margin-left: ${"var(--ds-space-250, 20px)"};
57
- flex: none;
58
- color: ${`var(--ds-text-subtlest, ${N100})`};
59
- font-size: 12px;
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
- background-color: ${props => props.selected ? `var(--ds-background-selected, ${N30})` : 'transparent'};
65
- display: block;
66
- overflow: hidden;
67
- list-style-type: none;
68
- height: ${MENTION_ITEM_HEIGHT}px;
69
- line-height: 1.2;
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
- padding-left: ${"var(--ds-space-050, 4px)"};
76
- color: ${`var(--ds-text-subtle, ${N500})`};
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: ${props => props.empty ? 'none' : 'block'};
6
-
4
+ export const MentionListStyle = styled.div(props => ({
5
+ display: props.empty ? 'none' : 'block',
7
6
  /* list style */
8
- width: ${mentionListWidth};
9
- color: ${"var(--ds-text-subtle, #333)"};
10
-
11
- border: 1px solid ${noDialogContainerBorderColor};
12
- border-radius: ${noDialogContainerBorderRadius};
13
- box-shadow: ${noDialogContainerBoxShadow};
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
- align-items: center;
9
- display: flex;
10
- justify-content: center;
11
- flex-direction: column;
12
- background-color: ${"var(--ds-surface-overlay, white)"};
13
- color: ${`var(--ds-text-subtle, ${N500})`};
14
- border: 1px solid ${"var(--ds-surface-overlay, #fff)"};
15
- border-radius: ${borderRadius()}px;
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
- margin-bottom: ${"var(--ds-space-100, 8px)"};
21
- margin-top: ${"var(--ds-space-400, 32px)"};
22
- width: ${"var(--ds-space-1000, 80px)"};
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
- ${h400()};
29
- margin-bottom: ${"var(--ds-space-100, 8px)"};
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
- margin-bottom: ${"var(--ds-space-600, 48px)"};
35
- `;
33
+ export const MentionListAdviceStyle = styled.div({
34
+ marginBottom: "var(--ds-space-600, 48px)"
35
+ });