@atlaskit/mention 26.0.4 → 26.1.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 CHANGED
@@ -1,5 +1,12 @@
1
1
  # @atlaskit/mention
2
2
 
3
+ ## 26.1.0
4
+
5
+ ### Minor Changes
6
+
7
+ - [`7567557c596c7`](https://bitbucket.org/atlassian/atlassian-frontend-monorepo/commits/7567557c596c7) -
8
+ [ux] Update mention item styling platform_editor_agent_mentions
9
+
3
10
  ## 26.0.4
4
11
 
5
12
  ### Patch Changes
@@ -10,6 +10,12 @@ Object.defineProperty(exports, "MENTION_ITEM_HEIGHT", {
10
10
  return _styles.MENTION_ITEM_HEIGHT;
11
11
  }
12
12
  });
13
+ Object.defineProperty(exports, "MENTION_ITEM_HEIGHT_REFRESHED", {
14
+ enumerable: true,
15
+ get: function get() {
16
+ return _styles.MENTION_ITEM_HEIGHT_REFRESHED;
17
+ }
18
+ });
13
19
  exports.default = exports.MentionItemWithRef = void 0;
14
20
  var _extends2 = _interopRequireDefault(require("@babel/runtime/helpers/extends"));
15
21
  var _classCallCheck2 = _interopRequireDefault(require("@babel/runtime/helpers/classCallCheck"));
@@ -119,7 +125,8 @@ var MentionItem = exports.default = /*#__PURE__*/function (_React$PureComponent)
119
125
  var _this$props = this.props,
120
126
  mention = _this$props.mention,
121
127
  selected = _this$props.selected,
122
- forwardedRef = _this$props.forwardedRef;
128
+ forwardedRef = _this$props.forwardedRef,
129
+ height = _this$props.height;
123
130
  var id = mention.id,
124
131
  highlight = mention.highlight,
125
132
  presence = mention.presence,
@@ -135,6 +142,7 @@ var MentionItem = exports.default = /*#__PURE__*/function (_React$PureComponent)
135
142
  var xProductUserInfoIconColor = selected ? "var(--ds-icon-selected, #1868DB)" : "var(--ds-icon, #292A2E)";
136
143
  return /*#__PURE__*/_react.default.createElement(_MessagesIntlProvider.default, null, /*#__PURE__*/_react.default.createElement(_styles.MentionItemStyle, {
137
144
  selected: selected,
145
+ height: height,
138
146
  onMouseDown: this.onMentionSelected,
139
147
  onMouseMove: this.onMentionMenuItemMouseMove,
140
148
  onMouseEnter: this.onMentionMenuItemMouseEnter,
@@ -4,7 +4,7 @@ var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefau
4
4
  Object.defineProperty(exports, "__esModule", {
5
5
  value: true
6
6
  });
7
- exports.TimeStyle = exports.RowStyle = exports.NameSectionStyle = exports.MentionItemStyle = exports.MENTION_ITEM_HEIGHT = exports.InfoSectionStyle = exports.FullNameStyle = exports.AvatarStyle = exports.AccessSectionStyle = void 0;
7
+ exports.TimeStyle = exports.RowStyle = exports.NameSectionStyle = exports.MentionItemStyle = exports.MENTION_ITEM_HEIGHT_REFRESHED = exports.MENTION_ITEM_HEIGHT = exports.InfoSectionStyle = exports.FullNameStyle = exports.AvatarStyle = exports.AccessSectionStyle = void 0;
8
8
  var _styled = _interopRequireDefault(require("@emotion/styled"));
9
9
  var _platformFeatureFlags = require("@atlaskit/platform-feature-flags");
10
10
  // eslint-disable-next-line @atlaskit/ui-styling-standard/use-compiled -- Ignored via go/DSP-18766
@@ -83,15 +83,18 @@ var TimeStyle = exports.TimeStyle = _styled.default.div({
83
83
  font: "var(--ds-font-body-small, normal 400 12px/16px \"Atlassian Sans\", ui-sans-serif, -apple-system, BlinkMacSystemFont, \"Segoe UI\", Ubuntu, \"Helvetica Neue\", sans-serif)"
84
84
  });
85
85
  var MENTION_ITEM_HEIGHT = exports.MENTION_ITEM_HEIGHT = 48;
86
+ var MENTION_ITEM_HEIGHT_REFRESHED = exports.MENTION_ITEM_HEIGHT_REFRESHED = 44;
86
87
  // eslint-disable-next-line @atlaskit/ui-styling-standard/no-styled, @atlaskit/ui-styling-standard/no-exported-styles, @atlaskit/ui-styling-standard/no-dynamic-styles -- Ignored via go/DSP-18766
87
88
  var MentionItemStyle = exports.MentionItemStyle = _styled.default.div(function (props) {
89
+ var _props$height;
88
90
  return {
89
91
  // eslint-disable-next-line @atlaskit/ui-styling-standard/no-unsafe-values -- Ignored via go/DSP-18766
90
92
  backgroundColor: props.selected ? "var(--ds-background-selected, #E9F2FE)" : 'transparent',
91
93
  display: 'block',
92
94
  overflow: 'hidden',
93
95
  listStyleType: 'none',
94
- height: "".concat(MENTION_ITEM_HEIGHT, "px"),
96
+ // eslint-disable-next-line @atlaskit/ui-styling-standard/no-unsafe-values -- Ignored via go/DSP-18766
97
+ height: "".concat((_props$height = props.height) !== null && _props$height !== void 0 ? _props$height : MENTION_ITEM_HEIGHT, "px"),
95
98
  // eslint-disable-next-line @atlaskit/design-system/use-tokens-typography
96
99
  lineHeight: 1.2,
97
100
  cursor: 'pointer'
package/dist/cjs/item.js CHANGED
@@ -10,6 +10,12 @@ Object.defineProperty(exports, "MENTION_ITEM_HEIGHT", {
10
10
  return _MentionItem.MENTION_ITEM_HEIGHT;
11
11
  }
12
12
  });
13
+ Object.defineProperty(exports, "MENTION_ITEM_HEIGHT_REFRESHED", {
14
+ enumerable: true,
15
+ get: function get() {
16
+ return _MentionItem.MENTION_ITEM_HEIGHT_REFRESHED;
17
+ }
18
+ });
13
19
  Object.defineProperty(exports, "MentionItem", {
14
20
  enumerable: true,
15
21
  get: function get() {
@@ -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 = "26.0.3";
15
+ var packageVersion = "26.0.4";
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 fireAnalyticsMentionTypeaheadEvent = exports.fireAnalyticsMentionTypeaheadEvent = function fireAnalyticsMentionTypeaheadEvent(props) {
@@ -15,7 +15,7 @@ import { renderHighlight } from './MentionHighlightHelpers';
15
15
  import MentionDescriptionByline from '../MentionDescriptionByline';
16
16
  import MessagesIntlProvider from '../MessagesIntlProvider';
17
17
  import { MentionAvatar } from '../MentionAvatar';
18
- export { MENTION_ITEM_HEIGHT } from './styles';
18
+ export { MENTION_ITEM_HEIGHT, MENTION_ITEM_HEIGHT_REFRESHED } from './styles';
19
19
  const lozengeAppearanceToTagColor = {
20
20
  default: 'standard',
21
21
  success: 'lime',
@@ -94,7 +94,8 @@ export default class MentionItem extends React.PureComponent {
94
94
  const {
95
95
  mention,
96
96
  selected,
97
- forwardedRef
97
+ forwardedRef,
98
+ height
98
99
  } = this.props;
99
100
  const {
100
101
  id,
@@ -114,6 +115,7 @@ export default class MentionItem extends React.PureComponent {
114
115
  const xProductUserInfoIconColor = selected ? "var(--ds-icon-selected, #1868DB)" : "var(--ds-icon, #292A2E)";
115
116
  return /*#__PURE__*/React.createElement(MessagesIntlProvider, null, /*#__PURE__*/React.createElement(MentionItemStyle, {
116
117
  selected: selected,
118
+ height: height,
117
119
  onMouseDown: this.onMentionSelected,
118
120
  onMouseMove: this.onMentionMenuItemMouseMove,
119
121
  onMouseEnter: this.onMentionMenuItemMouseEnter,
@@ -69,18 +69,23 @@ export const TimeStyle = styled.div({
69
69
  font: "var(--ds-font-body-small, normal 400 12px/16px \"Atlassian Sans\", ui-sans-serif, -apple-system, BlinkMacSystemFont, \"Segoe UI\", Ubuntu, \"Helvetica Neue\", sans-serif)"
70
70
  });
71
71
  export const MENTION_ITEM_HEIGHT = 48;
72
+ export const MENTION_ITEM_HEIGHT_REFRESHED = 44;
72
73
  // eslint-disable-next-line @atlaskit/ui-styling-standard/no-styled, @atlaskit/ui-styling-standard/no-exported-styles, @atlaskit/ui-styling-standard/no-dynamic-styles -- Ignored via go/DSP-18766
73
- export const MentionItemStyle = styled.div(props => ({
74
- // eslint-disable-next-line @atlaskit/ui-styling-standard/no-unsafe-values -- Ignored via go/DSP-18766
75
- backgroundColor: props.selected ? "var(--ds-background-selected, #E9F2FE)" : 'transparent',
76
- display: 'block',
77
- overflow: 'hidden',
78
- listStyleType: 'none',
79
- height: `${MENTION_ITEM_HEIGHT}px`,
80
- // eslint-disable-next-line @atlaskit/design-system/use-tokens-typography
81
- lineHeight: 1.2,
82
- cursor: 'pointer'
83
- }));
74
+ export const MentionItemStyle = styled.div(props => {
75
+ var _props$height;
76
+ return {
77
+ // eslint-disable-next-line @atlaskit/ui-styling-standard/no-unsafe-values -- Ignored via go/DSP-18766
78
+ backgroundColor: props.selected ? "var(--ds-background-selected, #E9F2FE)" : 'transparent',
79
+ display: 'block',
80
+ overflow: 'hidden',
81
+ listStyleType: 'none',
82
+ // eslint-disable-next-line @atlaskit/ui-styling-standard/no-unsafe-values -- Ignored via go/DSP-18766
83
+ height: `${(_props$height = props.height) !== null && _props$height !== void 0 ? _props$height : MENTION_ITEM_HEIGHT}px`,
84
+ // eslint-disable-next-line @atlaskit/design-system/use-tokens-typography
85
+ lineHeight: 1.2,
86
+ cursor: 'pointer'
87
+ };
88
+ });
84
89
 
85
90
  // eslint-disable-next-line @atlaskit/ui-styling-standard/no-styled, @atlaskit/ui-styling-standard/no-exported-styles -- Ignored via go/DSP-18766
86
91
  export const AccessSectionStyle = styled.div({
@@ -1,4 +1,4 @@
1
- import MentionItem, { MENTION_ITEM_HEIGHT } from './components/MentionItem';
1
+ import MentionItem, { MENTION_ITEM_HEIGHT, MENTION_ITEM_HEIGHT_REFRESHED } from './components/MentionItem';
2
2
  export {
3
3
  // Components
4
- MentionItem, MENTION_ITEM_HEIGHT };
4
+ MentionItem, MENTION_ITEM_HEIGHT, MENTION_ITEM_HEIGHT_REFRESHED };
@@ -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 { ComponentNames, isSpecialMentionText } from '../types';
4
4
  const packageName = "@atlaskit/mention";
5
- const packageVersion = "26.0.3";
5
+ const packageVersion = "26.0.4";
6
6
  export const SLI_EVENT_TYPE = 'sli';
7
7
  export const SMART_EVENT_TYPE = 'smart';
8
8
  export const fireAnalyticsMentionTypeaheadEvent = props => (action, duration, userIds = [], query) => {
@@ -23,7 +23,7 @@ import { renderHighlight } from './MentionHighlightHelpers';
23
23
  import MentionDescriptionByline from '../MentionDescriptionByline';
24
24
  import MessagesIntlProvider from '../MessagesIntlProvider';
25
25
  import { MentionAvatar } from '../MentionAvatar';
26
- export { MENTION_ITEM_HEIGHT } from './styles';
26
+ export { MENTION_ITEM_HEIGHT, MENTION_ITEM_HEIGHT_REFRESHED } from './styles';
27
27
  var lozengeAppearanceToTagColor = {
28
28
  default: 'standard',
29
29
  success: 'lime',
@@ -107,7 +107,8 @@ var MentionItem = /*#__PURE__*/function (_React$PureComponent) {
107
107
  var _this$props = this.props,
108
108
  mention = _this$props.mention,
109
109
  selected = _this$props.selected,
110
- forwardedRef = _this$props.forwardedRef;
110
+ forwardedRef = _this$props.forwardedRef,
111
+ height = _this$props.height;
111
112
  var id = mention.id,
112
113
  highlight = mention.highlight,
113
114
  presence = mention.presence,
@@ -123,6 +124,7 @@ var MentionItem = /*#__PURE__*/function (_React$PureComponent) {
123
124
  var xProductUserInfoIconColor = selected ? "var(--ds-icon-selected, #1868DB)" : "var(--ds-icon, #292A2E)";
124
125
  return /*#__PURE__*/React.createElement(MessagesIntlProvider, null, /*#__PURE__*/React.createElement(MentionItemStyle, {
125
126
  selected: selected,
127
+ height: height,
126
128
  onMouseDown: this.onMentionSelected,
127
129
  onMouseMove: this.onMentionMenuItemMouseMove,
128
130
  onMouseEnter: this.onMentionMenuItemMouseEnter,
@@ -75,15 +75,18 @@ export var TimeStyle = styled.div({
75
75
  font: "var(--ds-font-body-small, normal 400 12px/16px \"Atlassian Sans\", ui-sans-serif, -apple-system, BlinkMacSystemFont, \"Segoe UI\", Ubuntu, \"Helvetica Neue\", sans-serif)"
76
76
  });
77
77
  export var MENTION_ITEM_HEIGHT = 48;
78
+ export var MENTION_ITEM_HEIGHT_REFRESHED = 44;
78
79
  // eslint-disable-next-line @atlaskit/ui-styling-standard/no-styled, @atlaskit/ui-styling-standard/no-exported-styles, @atlaskit/ui-styling-standard/no-dynamic-styles -- Ignored via go/DSP-18766
79
80
  export var MentionItemStyle = styled.div(function (props) {
81
+ var _props$height;
80
82
  return {
81
83
  // eslint-disable-next-line @atlaskit/ui-styling-standard/no-unsafe-values -- Ignored via go/DSP-18766
82
84
  backgroundColor: props.selected ? "var(--ds-background-selected, #E9F2FE)" : 'transparent',
83
85
  display: 'block',
84
86
  overflow: 'hidden',
85
87
  listStyleType: 'none',
86
- height: "".concat(MENTION_ITEM_HEIGHT, "px"),
88
+ // eslint-disable-next-line @atlaskit/ui-styling-standard/no-unsafe-values -- Ignored via go/DSP-18766
89
+ height: "".concat((_props$height = props.height) !== null && _props$height !== void 0 ? _props$height : MENTION_ITEM_HEIGHT, "px"),
87
90
  // eslint-disable-next-line @atlaskit/design-system/use-tokens-typography
88
91
  lineHeight: 1.2,
89
92
  cursor: 'pointer'
package/dist/esm/item.js CHANGED
@@ -1,4 +1,4 @@
1
- import MentionItem, { MENTION_ITEM_HEIGHT } from './components/MentionItem';
1
+ import MentionItem, { MENTION_ITEM_HEIGHT, MENTION_ITEM_HEIGHT_REFRESHED } from './components/MentionItem';
2
2
  export {
3
3
  // Components
4
- MentionItem, MENTION_ITEM_HEIGHT };
4
+ MentionItem, MENTION_ITEM_HEIGHT, MENTION_ITEM_HEIGHT_REFRESHED };
@@ -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 { ComponentNames, isSpecialMentionText } from '../types';
7
7
  var packageName = "@atlaskit/mention";
8
- var packageVersion = "26.0.3";
8
+ var packageVersion = "26.0.4";
9
9
  export var SLI_EVENT_TYPE = 'sli';
10
10
  export var SMART_EVENT_TYPE = 'smart';
11
11
  export var fireAnalyticsMentionTypeaheadEvent = function fireAnalyticsMentionTypeaheadEvent(props) {
@@ -1,8 +1,9 @@
1
1
  import React from 'react';
2
2
  import { type MentionDescription, type OnMentionEvent } from '../../types';
3
- export { MENTION_ITEM_HEIGHT } from './styles';
3
+ export { MENTION_ITEM_HEIGHT, MENTION_ITEM_HEIGHT_REFRESHED } from './styles';
4
4
  export interface Props {
5
5
  forwardedRef?: React.Ref<HTMLDivElement>;
6
+ height?: number;
6
7
  mention: MentionDescription;
7
8
  onMouseEnter?: OnMentionEvent;
8
9
  onMouseMove?: OnMentionEvent;
@@ -2,6 +2,7 @@ import { type StyledComponent } from '@emotion/styled';
2
2
  import type { Theme } from '@emotion/react';
3
3
  import type { DetailedHTMLProps, HTMLAttributes } from 'react';
4
4
  export interface MentionItemStyleProps {
5
+ height?: number;
5
6
  selected?: boolean;
6
7
  }
7
8
  export interface AvatarSectionStyleProps {
@@ -38,6 +39,7 @@ export declare const TimeStyle: StyledComponent<{
38
39
  theme?: Theme;
39
40
  }, DetailedHTMLProps<HTMLAttributes<HTMLDivElement>, HTMLDivElement>, {}>;
40
41
  export declare const MENTION_ITEM_HEIGHT = 48;
42
+ export declare const MENTION_ITEM_HEIGHT_REFRESHED = 44;
41
43
  export declare const MentionItemStyle: StyledComponent<{
42
44
  as?: React.ElementType;
43
45
  theme?: Theme;
@@ -1,2 +1,2 @@
1
- import MentionItem, { MENTION_ITEM_HEIGHT } from './components/MentionItem';
2
- export { MentionItem, MENTION_ITEM_HEIGHT, };
1
+ import MentionItem, { MENTION_ITEM_HEIGHT, MENTION_ITEM_HEIGHT_REFRESHED } from './components/MentionItem';
2
+ export { MentionItem, MENTION_ITEM_HEIGHT, MENTION_ITEM_HEIGHT_REFRESHED, };
@@ -1,8 +1,9 @@
1
1
  import React from 'react';
2
2
  import { type MentionDescription, type OnMentionEvent } from '../../types';
3
- export { MENTION_ITEM_HEIGHT } from './styles';
3
+ export { MENTION_ITEM_HEIGHT, MENTION_ITEM_HEIGHT_REFRESHED } from './styles';
4
4
  export interface Props {
5
5
  forwardedRef?: React.Ref<HTMLDivElement>;
6
+ height?: number;
6
7
  mention: MentionDescription;
7
8
  onMouseEnter?: OnMentionEvent;
8
9
  onMouseMove?: OnMentionEvent;
@@ -2,6 +2,7 @@ import { type StyledComponent } from '@emotion/styled';
2
2
  import type { Theme } from '@emotion/react';
3
3
  import type { DetailedHTMLProps, HTMLAttributes } from 'react';
4
4
  export interface MentionItemStyleProps {
5
+ height?: number;
5
6
  selected?: boolean;
6
7
  }
7
8
  export interface AvatarSectionStyleProps {
@@ -38,6 +39,7 @@ export declare const TimeStyle: StyledComponent<{
38
39
  theme?: Theme;
39
40
  }, DetailedHTMLProps<HTMLAttributes<HTMLDivElement>, HTMLDivElement>, {}>;
40
41
  export declare const MENTION_ITEM_HEIGHT = 48;
42
+ export declare const MENTION_ITEM_HEIGHT_REFRESHED = 44;
41
43
  export declare const MentionItemStyle: StyledComponent<{
42
44
  as?: React.ElementType;
43
45
  theme?: Theme;
@@ -1,2 +1,2 @@
1
- import MentionItem, { MENTION_ITEM_HEIGHT } from './components/MentionItem';
2
- export { MentionItem, MENTION_ITEM_HEIGHT, };
1
+ import MentionItem, { MENTION_ITEM_HEIGHT, MENTION_ITEM_HEIGHT_REFRESHED } from './components/MentionItem';
2
+ export { MentionItem, MENTION_ITEM_HEIGHT, MENTION_ITEM_HEIGHT_REFRESHED, };
package/package.json CHANGED
@@ -26,20 +26,20 @@
26
26
  "access": "public"
27
27
  },
28
28
  "dependencies": {
29
- "@atlaskit/afm-i18n-platform-elements-mention": "2.130.0",
29
+ "@atlaskit/afm-i18n-platform-elements-mention": "2.142.0",
30
30
  "@atlaskit/analytics-gas-types": "^5.1.0",
31
- "@atlaskit/analytics-next": "^11.2.0",
31
+ "@atlaskit/analytics-next": "^11.3.0",
32
32
  "@atlaskit/avatar": "^25.15.0",
33
33
  "@atlaskit/focus-ring": "^3.1.0",
34
34
  "@atlaskit/heading": "^5.4.0",
35
- "@atlaskit/icon": "^35.3.0",
35
+ "@atlaskit/icon": "^35.4.0",
36
36
  "@atlaskit/lozenge": "^13.8.0",
37
37
  "@atlaskit/platform-feature-flags": "^1.1.0",
38
38
  "@atlaskit/primitives": "^19.0.0",
39
- "@atlaskit/tag": "^14.14.0",
39
+ "@atlaskit/tag": "^14.15.0",
40
40
  "@atlaskit/teams-avatar": "^2.7.0",
41
- "@atlaskit/tokens": "^13.0.0",
42
- "@atlaskit/tooltip": "^22.3.0",
41
+ "@atlaskit/tokens": "^13.1.0",
42
+ "@atlaskit/tooltip": "^22.6.0",
43
43
  "@atlaskit/ufo": "^0.5.0",
44
44
  "@atlaskit/util-service-support": "^6.4.0",
45
45
  "@babel/runtime": "^7.0.0",
@@ -120,5 +120,5 @@
120
120
  ]
121
121
  }
122
122
  },
123
- "version": "26.0.4"
123
+ "version": "26.1.0"
124
124
  }