@atlaskit/profilecard 16.6.1 → 16.7.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,11 @@
1
1
  # @atlaskit/profilecard
2
2
 
3
+ ## 16.7.0
4
+
5
+ ### Minor Changes
6
+
7
+ - [`4e9fbfb9e85`](https://bitbucket.org/atlassian/atlassian-frontend/commits/4e9fbfb9e85) - [ux] Adding meatballs overflow menu when the profile card has more than two action buttons
8
+
3
9
  ## 16.6.1
4
10
 
5
11
  ### Patch Changes
@@ -0,0 +1,69 @@
1
+ "use strict";
2
+
3
+ var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefault");
4
+
5
+ var _typeof = require("@babel/runtime/helpers/typeof");
6
+
7
+ Object.defineProperty(exports, "__esModule", {
8
+ value: true
9
+ });
10
+ exports.OverflowProfileCardButtons = void 0;
11
+
12
+ var _extends2 = _interopRequireDefault(require("@babel/runtime/helpers/extends"));
13
+
14
+ var _objectWithoutProperties2 = _interopRequireDefault(require("@babel/runtime/helpers/objectWithoutProperties"));
15
+
16
+ var _react = _interopRequireDefault(require("react"));
17
+
18
+ var _reactIntlNext = require("react-intl-next");
19
+
20
+ var _customThemeButton = _interopRequireDefault(require("@atlaskit/button/custom-theme-button"));
21
+
22
+ var _dropdownMenu = _interopRequireWildcard(require("@atlaskit/dropdown-menu"));
23
+
24
+ var _more = _interopRequireDefault(require("@atlaskit/icon/glyph/more"));
25
+
26
+ var _messages = _interopRequireDefault(require("../../messages"));
27
+
28
+ var _Card = require("../../styled/Card");
29
+
30
+ var _excluded = ["triggerRef", "isSelected", "testId"];
31
+
32
+ function _getRequireWildcardCache(nodeInterop) { if (typeof WeakMap !== "function") return null; var cacheBabelInterop = new WeakMap(); var cacheNodeInterop = new WeakMap(); return (_getRequireWildcardCache = function _getRequireWildcardCache(nodeInterop) { return nodeInterop ? cacheNodeInterop : cacheBabelInterop; })(nodeInterop); }
33
+
34
+ function _interopRequireWildcard(obj, nodeInterop) { if (!nodeInterop && obj && obj.__esModule) { return obj; } if (obj === null || _typeof(obj) !== "object" && typeof obj !== "function") { return { default: obj }; } var cache = _getRequireWildcardCache(nodeInterop); if (cache && cache.has(obj)) { return cache.get(obj); } var newObj = {}; var hasPropertyDescriptor = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var key in obj) { if (key !== "default" && Object.prototype.hasOwnProperty.call(obj, key)) { var desc = hasPropertyDescriptor ? Object.getOwnPropertyDescriptor(obj, key) : null; if (desc && (desc.get || desc.set)) { Object.defineProperty(newObj, key, desc); } else { newObj[key] = obj[key]; } } } newObj.default = obj; if (cache) { cache.set(obj, newObj); } return newObj; }
35
+
36
+ var OverflowProfileCardButtons = function OverflowProfileCardButtons(props) {
37
+ var intl = (0, _reactIntlNext.useIntl)();
38
+ return /*#__PURE__*/_react.default.createElement(_Card.OverflowActionButtonsWrapper, null, /*#__PURE__*/_react.default.createElement(_dropdownMenu.default, {
39
+ placement: 'bottom-end',
40
+ trigger: function trigger(_ref) {
41
+ var triggerRef = _ref.triggerRef,
42
+ isSelected = _ref.isSelected,
43
+ testId = _ref.testId,
44
+ providedProps = (0, _objectWithoutProperties2.default)(_ref, _excluded);
45
+ return /*#__PURE__*/_react.default.createElement(_customThemeButton.default, (0, _extends2.default)({
46
+ type: "button"
47
+ }, providedProps, {
48
+ ref: triggerRef,
49
+ iconBefore: /*#__PURE__*/_react.default.createElement(_more.default, {
50
+ label: intl.formatMessage(_messages.default.profileCardMoreIconLabel)
51
+ })
52
+ }));
53
+ }
54
+ }, /*#__PURE__*/_react.default.createElement(_dropdownMenu.DropdownItemGroup, null, props.actions.map(function (action) {
55
+ return /*#__PURE__*/_react.default.createElement(_dropdownMenu.DropdownItem, {
56
+ key: action.id,
57
+ onClick: function onClick(event) {
58
+ for (var _len = arguments.length, args = new Array(_len > 1 ? _len - 1 : 0), _key = 1; _key < _len; _key++) {
59
+ args[_key - 1] = arguments[_key];
60
+ }
61
+
62
+ props.onItemClick(action, args, event);
63
+ },
64
+ href: action.link
65
+ }, action.label);
66
+ }))));
67
+ };
68
+
69
+ exports.OverflowProfileCardButtons = OverflowProfileCardButtons;
@@ -11,6 +11,8 @@ var _extends2 = _interopRequireDefault(require("@babel/runtime/helpers/extends")
11
11
 
12
12
  var _objectWithoutProperties2 = _interopRequireDefault(require("@babel/runtime/helpers/objectWithoutProperties"));
13
13
 
14
+ var _toConsumableArray2 = _interopRequireDefault(require("@babel/runtime/helpers/toConsumableArray"));
15
+
14
16
  var _classCallCheck2 = _interopRequireDefault(require("@babel/runtime/helpers/classCallCheck"));
15
17
 
16
18
  var _createClass2 = _interopRequireDefault(require("@babel/runtime/helpers/createClass"));
@@ -55,6 +57,8 @@ var _Error = require("../Error");
55
57
 
56
58
  var _Icon = require("../Icon");
57
59
 
60
+ var _OverflowProfileCardButtons = require("./OverflowProfileCardButtons");
61
+
58
62
  var _ReportingLinesDetails = _interopRequireDefault(require("./ReportingLinesDetails"));
59
63
 
60
64
  var _excluded = ["text"];
@@ -106,20 +110,11 @@ var Profilecard = /*#__PURE__*/function (_React$PureComponent) {
106
110
  appearance: idx === 0 ? 'default' : 'subtle',
107
111
  key: action.id || idx,
108
112
  onClick: function onClick(event) {
109
- _this.callAnalytics(_analytics.AnalyticsName.PROFILE_CARD_CLICK, {
110
- id: action.id || null,
111
- duration: _this.durationSince(_this.timeOpen)
112
- });
113
-
114
- if (action.callback && (0, _click.isBasicClick)(event)) {
115
- event.preventDefault();
116
-
117
- for (var _len = arguments.length, args = new Array(_len > 1 ? _len - 1 : 0), _key = 1; _key < _len; _key++) {
118
- args[_key - 1] = arguments[_key];
119
- }
120
-
121
- action.callback.apply(action, [event].concat(args));
113
+ for (var _len = arguments.length, args = new Array(_len > 1 ? _len - 1 : 0), _key = 1; _key < _len; _key++) {
114
+ args[_key - 1] = arguments[_key];
122
115
  }
116
+
117
+ return _this.onActionClick(action, args, event);
123
118
  },
124
119
  href: action.link
125
120
  }, action.label);
@@ -182,10 +177,30 @@ var Profilecard = /*#__PURE__*/function (_React$PureComponent) {
182
177
  }
183
178
 
184
179
  var actions = this.getActions();
185
- return /*#__PURE__*/_react.default.createElement(_Card.ActionButtonGroup, null, actions.map(function (action, idx) {
180
+ var firstTwoActions = actions.slice(0, 2);
181
+ var restOfActions = actions && actions.length > 2 ? actions.slice(2) : undefined;
182
+ return /*#__PURE__*/_react.default.createElement(_Card.ActionButtonGroup, null, firstTwoActions.map(function (action, idx) {
186
183
  return _this4.renderButton(action, idx);
184
+ }), restOfActions && /*#__PURE__*/_react.default.createElement(_OverflowProfileCardButtons.OverflowProfileCardButtons, {
185
+ actions: restOfActions,
186
+ onItemClick: function onItemClick(action, args, event) {
187
+ return _this4.onActionClick(action, args, event);
188
+ }
187
189
  }));
188
190
  }
191
+ }, {
192
+ key: "onActionClick",
193
+ value: function onActionClick(action, args, event) {
194
+ this.callAnalytics(_analytics.AnalyticsName.PROFILE_CARD_CLICK, {
195
+ id: action.id || null,
196
+ duration: this.durationSince(this.timeOpen)
197
+ });
198
+
199
+ if (action.callback && (0, _click.isBasicClick)(event)) {
200
+ event.preventDefault();
201
+ action.callback.apply(action, [event].concat((0, _toConsumableArray2.default)(args)));
202
+ }
203
+ }
189
204
  }, {
190
205
  key: "renderCardDetailsDefault",
191
206
  value: function renderCardDetailsDefault() {
@@ -152,6 +152,11 @@ var messages = (0, _reactIntlNext.defineMessages)({
152
152
  id: 'pt.profile-card.give-kudos',
153
153
  defaultMessage: 'Give kudos',
154
154
  description: 'Title for the button on the profile card for a user to give a kudos'
155
+ },
156
+ profileCardMoreIconLabel: {
157
+ id: 'pt.profile-card.more-icon-label',
158
+ defaultMessage: 'More',
159
+ description: 'Label for the meatballs icon on the profile card, which when clicked will provide more options'
155
160
  }
156
161
  });
157
162
  var _default = messages;
@@ -7,7 +7,7 @@ var _typeof = require("@babel/runtime/helpers/typeof");
7
7
  Object.defineProperty(exports, "__esModule", {
8
8
  value: true
9
9
  });
10
- exports.SpinnerContainer = exports.ProfileImage = exports.LozengeWrapper = exports.JobTitleLabel = exports.FullNameLabel = exports.DisabledInfo = exports.DetailsLabelText = exports.DetailsLabelIcon = exports.DetailsLabel = exports.DetailsGroup = exports.CustomLozengeContainer = exports.CardWrapper = exports.CardContent = exports.CardContainerEmpty = exports.CardContainer = exports.AppTitleLabel = exports.ActionsFlexSpacer = exports.ActionButtonGroup = void 0;
10
+ exports.SpinnerContainer = exports.ProfileImage = exports.OverflowActionButtonsWrapper = exports.LozengeWrapper = exports.JobTitleLabel = exports.FullNameLabel = exports.DisabledInfo = exports.DetailsLabelText = exports.DetailsLabelIcon = exports.DetailsLabel = exports.DetailsGroup = exports.CustomLozengeContainer = exports.CardWrapper = exports.CardContent = exports.CardContainerEmpty = exports.CardContainer = exports.AppTitleLabel = exports.ActionsFlexSpacer = exports.ActionButtonGroup = void 0;
11
11
 
12
12
  var _taggedTemplateLiteral2 = _interopRequireDefault(require("@babel/runtime/helpers/taggedTemplateLiteral"));
13
13
 
@@ -17,7 +17,7 @@ var _constants = require("@atlaskit/theme/constants");
17
17
 
18
18
  var _constants2 = require("../styled/constants");
19
19
 
20
- var _templateObject, _templateObject2, _templateObject3, _templateObject4, _templateObject5, _templateObject6, _templateObject7, _templateObject8, _templateObject9, _templateObject10, _templateObject11, _templateObject12, _templateObject13, _templateObject14, _templateObject15, _templateObject16, _templateObject17, _templateObject18, _templateObject19;
20
+ var _templateObject, _templateObject2, _templateObject3, _templateObject4, _templateObject5, _templateObject6, _templateObject7, _templateObject8, _templateObject9, _templateObject10, _templateObject11, _templateObject12, _templateObject13, _templateObject14, _templateObject15, _templateObject16, _templateObject17, _templateObject18, _templateObject19, _templateObject20;
21
21
 
22
22
  function _getRequireWildcardCache(nodeInterop) { if (typeof WeakMap !== "function") return null; var cacheBabelInterop = new WeakMap(); var cacheNodeInterop = new WeakMap(); return (_getRequireWildcardCache = function _getRequireWildcardCache(nodeInterop) { return nodeInterop ? cacheNodeInterop : cacheBabelInterop; })(nodeInterop); }
23
23
 
@@ -47,19 +47,23 @@ var ActionButtonGroup = _styledComponents.default.div(_templateObject5 || (_temp
47
47
 
48
48
  exports.ActionButtonGroup = ActionButtonGroup;
49
49
 
50
- var CardContent = _styledComponents.default.div(_templateObject6 || (_templateObject6 = (0, _taggedTemplateLiteral2.default)(["\n display: flex;\n flex-direction: column;\n min-height: ", "px;\n"])), (0, _constants.gridSize)() * 17);
50
+ var OverflowActionButtonsWrapper = _styledComponents.default.div(_templateObject6 || (_templateObject6 = (0, _taggedTemplateLiteral2.default)(["\n display: inline-block;\n width: 32px;\n height: 32px;\n margin-left: ", "px;\n"])), _constants.gridSize);
51
+
52
+ exports.OverflowActionButtonsWrapper = OverflowActionButtonsWrapper;
53
+
54
+ var CardContent = _styledComponents.default.div(_templateObject7 || (_templateObject7 = (0, _taggedTemplateLiteral2.default)(["\n display: flex;\n flex-direction: column;\n min-height: ", "px;\n"])), (0, _constants.gridSize)() * 17);
51
55
 
52
56
  exports.CardContent = CardContent;
53
57
 
54
- var DetailsGroup = _styledComponents.default.div(_templateObject7 || (_templateObject7 = (0, _taggedTemplateLiteral2.default)(["\n display: flex;\n flex-direction: column;\n margin-left: ", "px;\n width: ", "px;\n"])), (0, _constants.gridSize)() * 14.5, (0, _constants.gridSize)() * 24.5);
58
+ var DetailsGroup = _styledComponents.default.div(_templateObject8 || (_templateObject8 = (0, _taggedTemplateLiteral2.default)(["\n display: flex;\n flex-direction: column;\n margin-left: ", "px;\n width: ", "px;\n"])), (0, _constants.gridSize)() * 14.5, (0, _constants.gridSize)() * 24.5);
55
59
 
56
60
  exports.DetailsGroup = DetailsGroup;
57
61
 
58
- var DisabledInfo = _styledComponents.default.div(_templateObject8 || (_templateObject8 = (0, _taggedTemplateLiteral2.default)(["\n font-size: ", "px;\n color: ", ";\n margin: ", "px 0 0 0;\n line-height: ", "px;\n"])), _constants.fontSizeSmall, _constants2.labelTextColor, (0, _constants.gridSize)() * 1.5, (0, _constants.gridSize)() * 2);
62
+ var DisabledInfo = _styledComponents.default.div(_templateObject9 || (_templateObject9 = (0, _taggedTemplateLiteral2.default)(["\n font-size: ", "px;\n color: ", ";\n margin: ", "px 0 0 0;\n line-height: ", "px;\n"])), _constants.fontSizeSmall, _constants2.labelTextColor, (0, _constants.gridSize)() * 1.5, (0, _constants.gridSize)() * 2);
59
63
 
60
64
  exports.DisabledInfo = DisabledInfo;
61
65
 
62
- var FullNameLabel = _styledComponents.default.span(_templateObject9 || (_templateObject9 = (0, _taggedTemplateLiteral2.default)(["\n overflow: hidden;\n text-overflow: ellipsis;\n white-space: nowrap;\n\n font-size: 18px;\n color: ", ";\n margin: ", ";\n line-height: ", "em;\n"])), function (props) {
66
+ var FullNameLabel = _styledComponents.default.span(_templateObject10 || (_templateObject10 = (0, _taggedTemplateLiteral2.default)(["\n overflow: hidden;\n text-overflow: ellipsis;\n white-space: nowrap;\n\n font-size: 18px;\n color: ", ";\n margin: ", ";\n line-height: ", "em;\n"])), function (props) {
63
67
  return props.isDisabledAccount ? _constants2.headerTextColorInactive : _constants2.headerTextColor;
64
68
  }, function (props) {
65
69
  return getFullNameMargin(props);
@@ -67,25 +71,25 @@ var FullNameLabel = _styledComponents.default.span(_templateObject9 || (_templat
67
71
 
68
72
  exports.FullNameLabel = FullNameLabel;
69
73
 
70
- var LozengeWrapper = _styledComponents.default.div(_templateObject10 || (_templateObject10 = (0, _taggedTemplateLiteral2.default)(["\n margin-top: ", "px;\n text-transform: uppercase;\n display: block;\n"])), (0, _constants.gridSize)() * 2);
74
+ var LozengeWrapper = _styledComponents.default.div(_templateObject11 || (_templateObject11 = (0, _taggedTemplateLiteral2.default)(["\n margin-top: ", "px;\n text-transform: uppercase;\n display: block;\n"])), (0, _constants.gridSize)() * 2);
71
75
 
72
76
  exports.LozengeWrapper = LozengeWrapper;
73
- var CustomLozengeContainer = (0, _styledComponents.default)(LozengeWrapper)(_templateObject11 || (_templateObject11 = (0, _taggedTemplateLiteral2.default)(["\n display: flex;\n flex-direction: row;\n flex-wrap: wrap;\n justify-content: flex-start;\n margin-top: ", "px;\n > * {\n margin-top: ", "px;\n &:not(:last-child) {\n margin-right: ", "px;\n }\n }\n"])), (0, _constants.gridSize)() * 1.5, (0, _constants.gridSize)() / 2, (0, _constants.gridSize)() / 2);
77
+ var CustomLozengeContainer = (0, _styledComponents.default)(LozengeWrapper)(_templateObject12 || (_templateObject12 = (0, _taggedTemplateLiteral2.default)(["\n display: flex;\n flex-direction: row;\n flex-wrap: wrap;\n justify-content: flex-start;\n margin-top: ", "px;\n > * {\n margin-top: ", "px;\n &:not(:last-child) {\n margin-right: ", "px;\n }\n }\n"])), (0, _constants.gridSize)() * 1.5, (0, _constants.gridSize)() / 2, (0, _constants.gridSize)() / 2);
74
78
  exports.CustomLozengeContainer = CustomLozengeContainer;
75
79
 
76
- var JobTitleLabel = _styledComponents.default.span(_templateObject12 || (_templateObject12 = (0, _taggedTemplateLiteral2.default)(["\n overflow: hidden;\n text-overflow: ellipsis;\n white-space: nowrap;\n\n font-size: 14px;\n color: ", ";\n margin: 0 0 ", "px 0;\n line-height: ", "em;\n"])), _constants2.headerTextColor, (0, _constants.gridSize)() * 1.5, 24 / 14);
80
+ var JobTitleLabel = _styledComponents.default.span(_templateObject13 || (_templateObject13 = (0, _taggedTemplateLiteral2.default)(["\n overflow: hidden;\n text-overflow: ellipsis;\n white-space: nowrap;\n\n font-size: 14px;\n color: ", ";\n margin: 0 0 ", "px 0;\n line-height: ", "em;\n"])), _constants2.headerTextColor, (0, _constants.gridSize)() * 1.5, 24 / 14);
77
81
 
78
82
  exports.JobTitleLabel = JobTitleLabel;
79
83
 
80
- var AppTitleLabel = _styledComponents.default.span(_templateObject13 || (_templateObject13 = (0, _taggedTemplateLiteral2.default)(["\n background: ", ";\n color: ", ";\n border-radius: ", ";\n padding: 0 6px;\n width: fit-content;\n font-weight: bold;\n text-transform: uppercase;\n\n font-size: 12px;\n margin: 4px 0 ", "px 0;\n line-height: ", "em;\n"])), _constants2.appLabelBgColor, _constants2.appLabelTextColor, (0, _constants.borderRadius)(), (0, _constants.gridSize)() * 1.5, 24 / 14);
84
+ var AppTitleLabel = _styledComponents.default.span(_templateObject14 || (_templateObject14 = (0, _taggedTemplateLiteral2.default)(["\n background: ", ";\n color: ", ";\n border-radius: ", ";\n padding: 0 6px;\n width: fit-content;\n font-weight: bold;\n text-transform: uppercase;\n\n font-size: 12px;\n margin: 4px 0 ", "px 0;\n line-height: ", "em;\n"])), _constants2.appLabelBgColor, _constants2.appLabelTextColor, (0, _constants.borderRadius)(), (0, _constants.gridSize)() * 1.5, 24 / 14);
81
85
 
82
86
  exports.AppTitleLabel = AppTitleLabel;
83
87
 
84
- var SpinnerContainer = _styledComponents.default.div(_templateObject14 || (_templateObject14 = (0, _taggedTemplateLiteral2.default)(["\n align-items: center;\n display: flex;\n height: ", "px;\n justify-content: center;\n position: relative;\n"])), (0, _constants.gridSize)() * 12);
88
+ var SpinnerContainer = _styledComponents.default.div(_templateObject15 || (_templateObject15 = (0, _taggedTemplateLiteral2.default)(["\n align-items: center;\n display: flex;\n height: ", "px;\n justify-content: center;\n position: relative;\n"])), (0, _constants.gridSize)() * 12);
85
89
 
86
90
  exports.SpinnerContainer = SpinnerContainer;
87
91
 
88
- var CardContainer = _styledComponents.default.div(_templateObject15 || (_templateObject15 = (0, _taggedTemplateLiteral2.default)(["\n position: relative;\n -webkit-font-smoothing: antialiased;\n -moz-osx-font-smoothing: grayscale;\n background-image: linear-gradient(\n to bottom,\n ", "\n 0%,\n ", "\n 100%\n );\n background-repeat: no-repeat;\n background-size: 100% ", "px;\n box-sizing: content-box;\n padding: ", "px;\n ", "\n"])), function (props) {
92
+ var CardContainer = _styledComponents.default.div(_templateObject16 || (_templateObject16 = (0, _taggedTemplateLiteral2.default)(["\n position: relative;\n -webkit-font-smoothing: antialiased;\n -moz-osx-font-smoothing: grayscale;\n background-image: linear-gradient(\n to bottom,\n ", "\n 0%,\n ", "\n 100%\n );\n background-repeat: no-repeat;\n background-size: 100% ", "px;\n box-sizing: content-box;\n padding: ", "px;\n ", "\n"])), function (props) {
89
93
  return props.isDisabledUser ? _constants2.headerBgColorDisabledUser : _constants2.headerBgColor;
90
94
  }, function (props) {
91
95
  return props.isDisabledUser ? _constants2.headerBgColorDisabledUser : _constants2.headerBgColor;
@@ -94,19 +98,19 @@ var CardContainer = _styledComponents.default.div(_templateObject15 || (_templat
94
98
  return '';
95
99
  }
96
100
 
97
- return (0, _styledComponents.css)(_templateObject16 || (_templateObject16 = (0, _taggedTemplateLiteral2.default)(["\n box-shadow: ", ";\n border-radius: ", "px;\n "])), _constants2.boxShadow, _constants.borderRadius);
101
+ return (0, _styledComponents.css)(_templateObject17 || (_templateObject17 = (0, _taggedTemplateLiteral2.default)(["\n box-shadow: ", ";\n border-radius: ", "px;\n "])), _constants2.boxShadow, _constants.borderRadius);
98
102
  });
99
103
 
100
104
  exports.CardContainer = CardContainer;
101
105
 
102
- var DetailsLabel = _styledComponents.default.div(_templateObject17 || (_templateObject17 = (0, _taggedTemplateLiteral2.default)(["\n display: flex;\n align-items: center;\n line-height: ", "px;\n font-size: ", "px;\n margin: ", "px 0 0 0;\n white-space: nowrap;\n\n & + & {\n margin-top: ", "px;\n }\n"])), (0, _constants.gridSize)() * 3, (0, _constants.gridSize)() * 1.5, (0, _constants.gridSize)() * 2, (0, _constants.gridSize)() / 4);
106
+ var DetailsLabel = _styledComponents.default.div(_templateObject18 || (_templateObject18 = (0, _taggedTemplateLiteral2.default)(["\n display: flex;\n align-items: center;\n line-height: ", "px;\n font-size: ", "px;\n margin: ", "px 0 0 0;\n white-space: nowrap;\n\n & + & {\n margin-top: ", "px;\n }\n"])), (0, _constants.gridSize)() * 3, (0, _constants.gridSize)() * 1.5, (0, _constants.gridSize)() * 2, (0, _constants.gridSize)() / 4);
103
107
 
104
108
  exports.DetailsLabel = DetailsLabel;
105
109
 
106
- var DetailsLabelIcon = _styledComponents.default.div(_templateObject18 || (_templateObject18 = (0, _taggedTemplateLiteral2.default)(["\n display: flex;\n flex-shrink: 0;\n color: ", ";\n width: ", "px;\n height: ", "px;\n padding: ", "px;\n vertical-align: top;\n\n svg {\n width: 100%;\n height: 100%;\n }\n"])), _constants2.labelIconColor, (0, _constants.gridSize)() * 2, (0, _constants.gridSize)() * 2, (0, _constants.gridSize)() / 2);
110
+ var DetailsLabelIcon = _styledComponents.default.div(_templateObject19 || (_templateObject19 = (0, _taggedTemplateLiteral2.default)(["\n display: flex;\n flex-shrink: 0;\n color: ", ";\n width: ", "px;\n height: ", "px;\n padding: ", "px;\n vertical-align: top;\n\n svg {\n width: 100%;\n height: 100%;\n }\n"])), _constants2.labelIconColor, (0, _constants.gridSize)() * 2, (0, _constants.gridSize)() * 2, (0, _constants.gridSize)() / 2);
107
111
 
108
112
  exports.DetailsLabelIcon = DetailsLabelIcon;
109
113
 
110
- var DetailsLabelText = _styledComponents.default.span(_templateObject19 || (_templateObject19 = (0, _taggedTemplateLiteral2.default)(["\n overflow: hidden;\n text-overflow: ellipsis;\n color: ", ";\n padding-left: ", "px;\n"])), _constants2.labelTextColor, (0, _constants.gridSize)() / 2);
114
+ var DetailsLabelText = _styledComponents.default.span(_templateObject20 || (_templateObject20 = (0, _taggedTemplateLiteral2.default)(["\n overflow: hidden;\n text-overflow: ellipsis;\n color: ", ";\n padding-left: ", "px;\n"])), _constants2.labelTextColor, (0, _constants.gridSize)() / 2);
111
115
 
112
116
  exports.DetailsLabelText = DetailsLabelText;
@@ -56,7 +56,7 @@ var createEvent = function createEvent(eventType, action, actionSubject, actionS
56
56
  actionSubjectId: actionSubjectId,
57
57
  attributes: _objectSpread(_objectSpread({
58
58
  packageName: "@atlaskit/profilecard",
59
- packageVersion: "16.6.1"
59
+ packageVersion: "16.7.0"
60
60
  }, attributes), {}, {
61
61
  firedAt: (0, _performance.getPageTime)()
62
62
  })
@@ -1,4 +1,4 @@
1
1
  {
2
2
  "name": "@atlaskit/profilecard",
3
- "version": "16.6.1"
3
+ "version": "16.7.0"
4
4
  }
@@ -0,0 +1,33 @@
1
+ import _extends from "@babel/runtime/helpers/extends";
2
+ import React from 'react';
3
+ import { useIntl } from 'react-intl-next';
4
+ import Button from '@atlaskit/button/custom-theme-button';
5
+ import DropdownMenu, { DropdownItem, DropdownItemGroup } from '@atlaskit/dropdown-menu';
6
+ import MoreIcon from '@atlaskit/icon/glyph/more';
7
+ import messages from '../../messages';
8
+ import { OverflowActionButtonsWrapper } from '../../styled/Card';
9
+ export const OverflowProfileCardButtons = props => {
10
+ const intl = useIntl();
11
+ return /*#__PURE__*/React.createElement(OverflowActionButtonsWrapper, null, /*#__PURE__*/React.createElement(DropdownMenu, {
12
+ placement: 'bottom-end',
13
+ trigger: ({
14
+ triggerRef,
15
+ isSelected,
16
+ testId,
17
+ ...providedProps
18
+ }) => /*#__PURE__*/React.createElement(Button, _extends({
19
+ type: "button"
20
+ }, providedProps, {
21
+ ref: triggerRef,
22
+ iconBefore: /*#__PURE__*/React.createElement(MoreIcon, {
23
+ label: intl.formatMessage(messages.profileCardMoreIconLabel)
24
+ })
25
+ }))
26
+ }, /*#__PURE__*/React.createElement(DropdownItemGroup, null, props.actions.map(action => /*#__PURE__*/React.createElement(DropdownItem, {
27
+ key: action.id,
28
+ onClick: (event, ...args) => {
29
+ props.onItemClick(action, args, event);
30
+ },
31
+ href: action.link
32
+ }, action.label)))));
33
+ };
@@ -15,6 +15,7 @@ import { ActionButtonGroup, ActionsFlexSpacer, AppTitleLabel, CardContainer, Car
15
15
  import { isBasicClick } from '../../util/click';
16
16
  import { ErrorMessage } from '../Error';
17
17
  import { IconLabel } from '../Icon';
18
+ import { OverflowProfileCardButtons } from './OverflowProfileCardButtons';
18
19
  import ReportingLinesDetails from './ReportingLinesDetails';
19
20
  export default class Profilecard extends React.PureComponent {
20
21
  constructor(props) {
@@ -55,17 +56,7 @@ export default class Profilecard extends React.PureComponent {
55
56
  return /*#__PURE__*/React.createElement(Button, {
56
57
  appearance: idx === 0 ? 'default' : 'subtle',
57
58
  key: action.id || idx,
58
- onClick: (event, ...args) => {
59
- this.callAnalytics(AnalyticsName.PROFILE_CARD_CLICK, {
60
- id: action.id || null,
61
- duration: this.durationSince(this.timeOpen)
62
- });
63
-
64
- if (action.callback && isBasicClick(event)) {
65
- event.preventDefault();
66
- action.callback(event, ...args);
67
- }
68
- },
59
+ onClick: (event, ...args) => this.onActionClick(action, args, event),
69
60
  href: action.link
70
61
  }, action.label);
71
62
  });
@@ -114,7 +105,24 @@ export default class Profilecard extends React.PureComponent {
114
105
  }
115
106
 
116
107
  const actions = this.getActions();
117
- return /*#__PURE__*/React.createElement(ActionButtonGroup, null, actions.map((action, idx) => this.renderButton(action, idx)));
108
+ const firstTwoActions = actions.slice(0, 2);
109
+ const restOfActions = actions && actions.length > 2 ? actions.slice(2) : undefined;
110
+ return /*#__PURE__*/React.createElement(ActionButtonGroup, null, firstTwoActions.map((action, idx) => this.renderButton(action, idx)), restOfActions && /*#__PURE__*/React.createElement(OverflowProfileCardButtons, {
111
+ actions: restOfActions,
112
+ onItemClick: (action, args, event) => this.onActionClick(action, args, event)
113
+ }));
114
+ }
115
+
116
+ onActionClick(action, args, event) {
117
+ this.callAnalytics(AnalyticsName.PROFILE_CARD_CLICK, {
118
+ id: action.id || null,
119
+ duration: this.durationSince(this.timeOpen)
120
+ });
121
+
122
+ if (action.callback && isBasicClick(event)) {
123
+ event.preventDefault();
124
+ action.callback(event, ...args);
125
+ }
118
126
  }
119
127
 
120
128
  renderCardDetailsDefault() {
@@ -144,6 +144,11 @@ const messages = defineMessages({
144
144
  id: 'pt.profile-card.give-kudos',
145
145
  defaultMessage: 'Give kudos',
146
146
  description: 'Title for the button on the profile card for a user to give a kudos'
147
+ },
148
+ profileCardMoreIconLabel: {
149
+ id: 'pt.profile-card.more-icon-label',
150
+ defaultMessage: 'More',
151
+ description: 'Label for the meatballs icon on the profile card, which when clicked will provide more options'
147
152
  }
148
153
  });
149
154
  export default messages;
@@ -33,6 +33,12 @@ export const ActionButtonGroup = styled.div`
33
33
  }
34
34
  }
35
35
  `;
36
+ export const OverflowActionButtonsWrapper = styled.div`
37
+ display: inline-block;
38
+ width: 32px;
39
+ height: 32px;
40
+ margin-left: ${gridSize}px;
41
+ `;
36
42
  export const CardContent = styled.div`
37
43
  display: flex;
38
44
  flex-direction: column;
@@ -35,7 +35,7 @@ const createEvent = (eventType, action, actionSubject, actionSubjectId, attribut
35
35
  actionSubjectId,
36
36
  attributes: {
37
37
  packageName: "@atlaskit/profilecard",
38
- packageVersion: "16.6.1",
38
+ packageVersion: "16.7.0",
39
39
  ...attributes,
40
40
  firedAt: getPageTime()
41
41
  }
@@ -1,4 +1,4 @@
1
1
  {
2
2
  "name": "@atlaskit/profilecard",
3
- "version": "16.6.1"
3
+ "version": "16.7.0"
4
4
  }
@@ -0,0 +1,43 @@
1
+ import _extends from "@babel/runtime/helpers/extends";
2
+ import _objectWithoutProperties from "@babel/runtime/helpers/objectWithoutProperties";
3
+ var _excluded = ["triggerRef", "isSelected", "testId"];
4
+ import React from 'react';
5
+ import { useIntl } from 'react-intl-next';
6
+ import Button from '@atlaskit/button/custom-theme-button';
7
+ import DropdownMenu, { DropdownItem, DropdownItemGroup } from '@atlaskit/dropdown-menu';
8
+ import MoreIcon from '@atlaskit/icon/glyph/more';
9
+ import messages from '../../messages';
10
+ import { OverflowActionButtonsWrapper } from '../../styled/Card';
11
+ export var OverflowProfileCardButtons = function OverflowProfileCardButtons(props) {
12
+ var intl = useIntl();
13
+ return /*#__PURE__*/React.createElement(OverflowActionButtonsWrapper, null, /*#__PURE__*/React.createElement(DropdownMenu, {
14
+ placement: 'bottom-end',
15
+ trigger: function trigger(_ref) {
16
+ var triggerRef = _ref.triggerRef,
17
+ isSelected = _ref.isSelected,
18
+ testId = _ref.testId,
19
+ providedProps = _objectWithoutProperties(_ref, _excluded);
20
+
21
+ return /*#__PURE__*/React.createElement(Button, _extends({
22
+ type: "button"
23
+ }, providedProps, {
24
+ ref: triggerRef,
25
+ iconBefore: /*#__PURE__*/React.createElement(MoreIcon, {
26
+ label: intl.formatMessage(messages.profileCardMoreIconLabel)
27
+ })
28
+ }));
29
+ }
30
+ }, /*#__PURE__*/React.createElement(DropdownItemGroup, null, props.actions.map(function (action) {
31
+ return /*#__PURE__*/React.createElement(DropdownItem, {
32
+ key: action.id,
33
+ onClick: function onClick(event) {
34
+ for (var _len = arguments.length, args = new Array(_len > 1 ? _len - 1 : 0), _key = 1; _key < _len; _key++) {
35
+ args[_key - 1] = arguments[_key];
36
+ }
37
+
38
+ props.onItemClick(action, args, event);
39
+ },
40
+ href: action.link
41
+ }, action.label);
42
+ }))));
43
+ };
@@ -1,5 +1,6 @@
1
1
  import _extends from "@babel/runtime/helpers/extends";
2
2
  import _objectWithoutProperties from "@babel/runtime/helpers/objectWithoutProperties";
3
+ import _toConsumableArray from "@babel/runtime/helpers/toConsumableArray";
3
4
  import _classCallCheck from "@babel/runtime/helpers/classCallCheck";
4
5
  import _createClass from "@babel/runtime/helpers/createClass";
5
6
  import _assertThisInitialized from "@babel/runtime/helpers/assertThisInitialized";
@@ -28,6 +29,7 @@ import { ActionButtonGroup, ActionsFlexSpacer, AppTitleLabel, CardContainer, Car
28
29
  import { isBasicClick } from '../../util/click';
29
30
  import { ErrorMessage } from '../Error';
30
31
  import { IconLabel } from '../Icon';
32
+ import { OverflowProfileCardButtons } from './OverflowProfileCardButtons';
31
33
  import ReportingLinesDetails from './ReportingLinesDetails';
32
34
 
33
35
  var Profilecard = /*#__PURE__*/function (_React$PureComponent) {
@@ -80,20 +82,11 @@ var Profilecard = /*#__PURE__*/function (_React$PureComponent) {
80
82
  appearance: idx === 0 ? 'default' : 'subtle',
81
83
  key: action.id || idx,
82
84
  onClick: function onClick(event) {
83
- _this.callAnalytics(AnalyticsName.PROFILE_CARD_CLICK, {
84
- id: action.id || null,
85
- duration: _this.durationSince(_this.timeOpen)
86
- });
87
-
88
- if (action.callback && isBasicClick(event)) {
89
- event.preventDefault();
90
-
91
- for (var _len = arguments.length, args = new Array(_len > 1 ? _len - 1 : 0), _key = 1; _key < _len; _key++) {
92
- args[_key - 1] = arguments[_key];
93
- }
94
-
95
- action.callback.apply(action, [event].concat(args));
85
+ for (var _len = arguments.length, args = new Array(_len > 1 ? _len - 1 : 0), _key = 1; _key < _len; _key++) {
86
+ args[_key - 1] = arguments[_key];
96
87
  }
88
+
89
+ return _this.onActionClick(action, args, event);
97
90
  },
98
91
  href: action.link
99
92
  }, action.label);
@@ -157,10 +150,30 @@ var Profilecard = /*#__PURE__*/function (_React$PureComponent) {
157
150
  }
158
151
 
159
152
  var actions = this.getActions();
160
- return /*#__PURE__*/React.createElement(ActionButtonGroup, null, actions.map(function (action, idx) {
153
+ var firstTwoActions = actions.slice(0, 2);
154
+ var restOfActions = actions && actions.length > 2 ? actions.slice(2) : undefined;
155
+ return /*#__PURE__*/React.createElement(ActionButtonGroup, null, firstTwoActions.map(function (action, idx) {
161
156
  return _this4.renderButton(action, idx);
157
+ }), restOfActions && /*#__PURE__*/React.createElement(OverflowProfileCardButtons, {
158
+ actions: restOfActions,
159
+ onItemClick: function onItemClick(action, args, event) {
160
+ return _this4.onActionClick(action, args, event);
161
+ }
162
162
  }));
163
163
  }
164
+ }, {
165
+ key: "onActionClick",
166
+ value: function onActionClick(action, args, event) {
167
+ this.callAnalytics(AnalyticsName.PROFILE_CARD_CLICK, {
168
+ id: action.id || null,
169
+ duration: this.durationSince(this.timeOpen)
170
+ });
171
+
172
+ if (action.callback && isBasicClick(event)) {
173
+ event.preventDefault();
174
+ action.callback.apply(action, [event].concat(_toConsumableArray(args)));
175
+ }
176
+ }
164
177
  }, {
165
178
  key: "renderCardDetailsDefault",
166
179
  value: function renderCardDetailsDefault() {
@@ -144,6 +144,11 @@ var messages = defineMessages({
144
144
  id: 'pt.profile-card.give-kudos',
145
145
  defaultMessage: 'Give kudos',
146
146
  description: 'Title for the button on the profile card for a user to give a kudos'
147
+ },
148
+ profileCardMoreIconLabel: {
149
+ id: 'pt.profile-card.more-icon-label',
150
+ defaultMessage: 'More',
151
+ description: 'Label for the meatballs icon on the profile card, which when clicked will provide more options'
147
152
  }
148
153
  });
149
154
  export default messages;
@@ -1,6 +1,6 @@
1
1
  import _taggedTemplateLiteral from "@babel/runtime/helpers/taggedTemplateLiteral";
2
2
 
3
- var _templateObject, _templateObject2, _templateObject3, _templateObject4, _templateObject5, _templateObject6, _templateObject7, _templateObject8, _templateObject9, _templateObject10, _templateObject11, _templateObject12, _templateObject13, _templateObject14, _templateObject15, _templateObject16, _templateObject17, _templateObject18, _templateObject19;
3
+ var _templateObject, _templateObject2, _templateObject3, _templateObject4, _templateObject5, _templateObject6, _templateObject7, _templateObject8, _templateObject9, _templateObject10, _templateObject11, _templateObject12, _templateObject13, _templateObject14, _templateObject15, _templateObject16, _templateObject17, _templateObject18, _templateObject19, _templateObject20;
4
4
 
5
5
  import styled, { css } from 'styled-components';
6
6
  import { borderRadius, fontSizeSmall, gridSize } from '@atlaskit/theme/constants';
@@ -15,20 +15,21 @@ export var CardWrapper = styled.div(_templateObject2 || (_templateObject2 = _tag
15
15
  export var ProfileImage = styled.div(_templateObject3 || (_templateObject3 = _taggedTemplateLiteral(["\n position: absolute;\n top: ", "px;\n left: ", "px;\n"])), gridSize() * 3, gridSize() * 3);
16
16
  export var ActionsFlexSpacer = styled.div(_templateObject4 || (_templateObject4 = _taggedTemplateLiteral(["\n flex: 1 0 auto;\n"])));
17
17
  export var ActionButtonGroup = styled.div(_templateObject5 || (_templateObject5 = _taggedTemplateLiteral(["\n user-select: none;\n margin: ", "px 0 0 0;\n text-align: right;\n\n button,\n a,\n span {\n margin-left: ", "px;\n\n &:first-child {\n margin-left: 0;\n }\n }\n"])), 2 * gridSize(), gridSize);
18
- export var CardContent = styled.div(_templateObject6 || (_templateObject6 = _taggedTemplateLiteral(["\n display: flex;\n flex-direction: column;\n min-height: ", "px;\n"])), gridSize() * 17);
19
- export var DetailsGroup = styled.div(_templateObject7 || (_templateObject7 = _taggedTemplateLiteral(["\n display: flex;\n flex-direction: column;\n margin-left: ", "px;\n width: ", "px;\n"])), gridSize() * 14.5, gridSize() * 24.5);
20
- export var DisabledInfo = styled.div(_templateObject8 || (_templateObject8 = _taggedTemplateLiteral(["\n font-size: ", "px;\n color: ", ";\n margin: ", "px 0 0 0;\n line-height: ", "px;\n"])), fontSizeSmall, labelTextColor, gridSize() * 1.5, gridSize() * 2);
21
- export var FullNameLabel = styled.span(_templateObject9 || (_templateObject9 = _taggedTemplateLiteral(["\n overflow: hidden;\n text-overflow: ellipsis;\n white-space: nowrap;\n\n font-size: 18px;\n color: ", ";\n margin: ", ";\n line-height: ", "em;\n"])), function (props) {
18
+ export var OverflowActionButtonsWrapper = styled.div(_templateObject6 || (_templateObject6 = _taggedTemplateLiteral(["\n display: inline-block;\n width: 32px;\n height: 32px;\n margin-left: ", "px;\n"])), gridSize);
19
+ export var CardContent = styled.div(_templateObject7 || (_templateObject7 = _taggedTemplateLiteral(["\n display: flex;\n flex-direction: column;\n min-height: ", "px;\n"])), gridSize() * 17);
20
+ export var DetailsGroup = styled.div(_templateObject8 || (_templateObject8 = _taggedTemplateLiteral(["\n display: flex;\n flex-direction: column;\n margin-left: ", "px;\n width: ", "px;\n"])), gridSize() * 14.5, gridSize() * 24.5);
21
+ export var DisabledInfo = styled.div(_templateObject9 || (_templateObject9 = _taggedTemplateLiteral(["\n font-size: ", "px;\n color: ", ";\n margin: ", "px 0 0 0;\n line-height: ", "px;\n"])), fontSizeSmall, labelTextColor, gridSize() * 1.5, gridSize() * 2);
22
+ export var FullNameLabel = styled.span(_templateObject10 || (_templateObject10 = _taggedTemplateLiteral(["\n overflow: hidden;\n text-overflow: ellipsis;\n white-space: nowrap;\n\n font-size: 18px;\n color: ", ";\n margin: ", ";\n line-height: ", "em;\n"])), function (props) {
22
23
  return props.isDisabledAccount ? headerTextColorInactive : headerTextColor;
23
24
  }, function (props) {
24
25
  return getFullNameMargin(props);
25
26
  }, 24 / 18);
26
- export var LozengeWrapper = styled.div(_templateObject10 || (_templateObject10 = _taggedTemplateLiteral(["\n margin-top: ", "px;\n text-transform: uppercase;\n display: block;\n"])), gridSize() * 2);
27
- export var CustomLozengeContainer = styled(LozengeWrapper)(_templateObject11 || (_templateObject11 = _taggedTemplateLiteral(["\n display: flex;\n flex-direction: row;\n flex-wrap: wrap;\n justify-content: flex-start;\n margin-top: ", "px;\n > * {\n margin-top: ", "px;\n &:not(:last-child) {\n margin-right: ", "px;\n }\n }\n"])), gridSize() * 1.5, gridSize() / 2, gridSize() / 2);
28
- export var JobTitleLabel = styled.span(_templateObject12 || (_templateObject12 = _taggedTemplateLiteral(["\n overflow: hidden;\n text-overflow: ellipsis;\n white-space: nowrap;\n\n font-size: 14px;\n color: ", ";\n margin: 0 0 ", "px 0;\n line-height: ", "em;\n"])), headerTextColor, gridSize() * 1.5, 24 / 14);
29
- export var AppTitleLabel = styled.span(_templateObject13 || (_templateObject13 = _taggedTemplateLiteral(["\n background: ", ";\n color: ", ";\n border-radius: ", ";\n padding: 0 6px;\n width: fit-content;\n font-weight: bold;\n text-transform: uppercase;\n\n font-size: 12px;\n margin: 4px 0 ", "px 0;\n line-height: ", "em;\n"])), appLabelBgColor, appLabelTextColor, borderRadius(), gridSize() * 1.5, 24 / 14);
30
- export var SpinnerContainer = styled.div(_templateObject14 || (_templateObject14 = _taggedTemplateLiteral(["\n align-items: center;\n display: flex;\n height: ", "px;\n justify-content: center;\n position: relative;\n"])), gridSize() * 12);
31
- export var CardContainer = styled.div(_templateObject15 || (_templateObject15 = _taggedTemplateLiteral(["\n position: relative;\n -webkit-font-smoothing: antialiased;\n -moz-osx-font-smoothing: grayscale;\n background-image: linear-gradient(\n to bottom,\n ", "\n 0%,\n ", "\n 100%\n );\n background-repeat: no-repeat;\n background-size: 100% ", "px;\n box-sizing: content-box;\n padding: ", "px;\n ", "\n"])), function (props) {
27
+ export var LozengeWrapper = styled.div(_templateObject11 || (_templateObject11 = _taggedTemplateLiteral(["\n margin-top: ", "px;\n text-transform: uppercase;\n display: block;\n"])), gridSize() * 2);
28
+ export var CustomLozengeContainer = styled(LozengeWrapper)(_templateObject12 || (_templateObject12 = _taggedTemplateLiteral(["\n display: flex;\n flex-direction: row;\n flex-wrap: wrap;\n justify-content: flex-start;\n margin-top: ", "px;\n > * {\n margin-top: ", "px;\n &:not(:last-child) {\n margin-right: ", "px;\n }\n }\n"])), gridSize() * 1.5, gridSize() / 2, gridSize() / 2);
29
+ export var JobTitleLabel = styled.span(_templateObject13 || (_templateObject13 = _taggedTemplateLiteral(["\n overflow: hidden;\n text-overflow: ellipsis;\n white-space: nowrap;\n\n font-size: 14px;\n color: ", ";\n margin: 0 0 ", "px 0;\n line-height: ", "em;\n"])), headerTextColor, gridSize() * 1.5, 24 / 14);
30
+ export var AppTitleLabel = styled.span(_templateObject14 || (_templateObject14 = _taggedTemplateLiteral(["\n background: ", ";\n color: ", ";\n border-radius: ", ";\n padding: 0 6px;\n width: fit-content;\n font-weight: bold;\n text-transform: uppercase;\n\n font-size: 12px;\n margin: 4px 0 ", "px 0;\n line-height: ", "em;\n"])), appLabelBgColor, appLabelTextColor, borderRadius(), gridSize() * 1.5, 24 / 14);
31
+ export var SpinnerContainer = styled.div(_templateObject15 || (_templateObject15 = _taggedTemplateLiteral(["\n align-items: center;\n display: flex;\n height: ", "px;\n justify-content: center;\n position: relative;\n"])), gridSize() * 12);
32
+ export var CardContainer = styled.div(_templateObject16 || (_templateObject16 = _taggedTemplateLiteral(["\n position: relative;\n -webkit-font-smoothing: antialiased;\n -moz-osx-font-smoothing: grayscale;\n background-image: linear-gradient(\n to bottom,\n ", "\n 0%,\n ", "\n 100%\n );\n background-repeat: no-repeat;\n background-size: 100% ", "px;\n box-sizing: content-box;\n padding: ", "px;\n ", "\n"])), function (props) {
32
33
  return props.isDisabledUser ? headerBgColorDisabledUser : headerBgColor;
33
34
  }, function (props) {
34
35
  return props.isDisabledUser ? headerBgColorDisabledUser : headerBgColor;
@@ -37,8 +38,8 @@ export var CardContainer = styled.div(_templateObject15 || (_templateObject15 =
37
38
  return '';
38
39
  }
39
40
 
40
- return css(_templateObject16 || (_templateObject16 = _taggedTemplateLiteral(["\n box-shadow: ", ";\n border-radius: ", "px;\n "])), boxShadow, borderRadius);
41
+ return css(_templateObject17 || (_templateObject17 = _taggedTemplateLiteral(["\n box-shadow: ", ";\n border-radius: ", "px;\n "])), boxShadow, borderRadius);
41
42
  });
42
- export var DetailsLabel = styled.div(_templateObject17 || (_templateObject17 = _taggedTemplateLiteral(["\n display: flex;\n align-items: center;\n line-height: ", "px;\n font-size: ", "px;\n margin: ", "px 0 0 0;\n white-space: nowrap;\n\n & + & {\n margin-top: ", "px;\n }\n"])), gridSize() * 3, gridSize() * 1.5, gridSize() * 2, gridSize() / 4);
43
- export var DetailsLabelIcon = styled.div(_templateObject18 || (_templateObject18 = _taggedTemplateLiteral(["\n display: flex;\n flex-shrink: 0;\n color: ", ";\n width: ", "px;\n height: ", "px;\n padding: ", "px;\n vertical-align: top;\n\n svg {\n width: 100%;\n height: 100%;\n }\n"])), labelIconColor, gridSize() * 2, gridSize() * 2, gridSize() / 2);
44
- export var DetailsLabelText = styled.span(_templateObject19 || (_templateObject19 = _taggedTemplateLiteral(["\n overflow: hidden;\n text-overflow: ellipsis;\n color: ", ";\n padding-left: ", "px;\n"])), labelTextColor, gridSize() / 2);
43
+ export var DetailsLabel = styled.div(_templateObject18 || (_templateObject18 = _taggedTemplateLiteral(["\n display: flex;\n align-items: center;\n line-height: ", "px;\n font-size: ", "px;\n margin: ", "px 0 0 0;\n white-space: nowrap;\n\n & + & {\n margin-top: ", "px;\n }\n"])), gridSize() * 3, gridSize() * 1.5, gridSize() * 2, gridSize() / 4);
44
+ export var DetailsLabelIcon = styled.div(_templateObject19 || (_templateObject19 = _taggedTemplateLiteral(["\n display: flex;\n flex-shrink: 0;\n color: ", ";\n width: ", "px;\n height: ", "px;\n padding: ", "px;\n vertical-align: top;\n\n svg {\n width: 100%;\n height: 100%;\n }\n"])), labelIconColor, gridSize() * 2, gridSize() * 2, gridSize() / 2);
45
+ export var DetailsLabelText = styled.span(_templateObject20 || (_templateObject20 = _taggedTemplateLiteral(["\n overflow: hidden;\n text-overflow: ellipsis;\n color: ", ";\n padding-left: ", "px;\n"])), labelTextColor, gridSize() / 2);
@@ -45,7 +45,7 @@ var createEvent = function createEvent(eventType, action, actionSubject, actionS
45
45
  actionSubjectId: actionSubjectId,
46
46
  attributes: _objectSpread(_objectSpread({
47
47
  packageName: "@atlaskit/profilecard",
48
- packageVersion: "16.6.1"
48
+ packageVersion: "16.7.0"
49
49
  }, attributes), {}, {
50
50
  firedAt: getPageTime()
51
51
  })
@@ -1,4 +1,4 @@
1
1
  {
2
2
  "name": "@atlaskit/profilecard",
3
- "version": "16.6.1"
3
+ "version": "16.7.0"
4
4
  }
@@ -0,0 +1,8 @@
1
+ import React from 'react';
2
+ import { ProfileCardAction } from '../../types';
3
+ declare type OverflowButtonsProps = {
4
+ actions: ProfileCardAction[];
5
+ onItemClick: (action: ProfileCardAction, args: any, event: React.MouseEvent | React.KeyboardEvent) => void;
6
+ };
7
+ export declare const OverflowProfileCardButtons: (props: OverflowButtonsProps) => JSX.Element;
8
+ export {};
@@ -15,6 +15,7 @@ export default class Profilecard extends React.PureComponent<ProfilecardProps> {
15
15
  getActions(): ProfileCardAction[];
16
16
  renderButton: (action: ProfileCardAction, idx: number) => ReactElement;
17
17
  renderActionsButtons(): JSX.Element | null;
18
+ private onActionClick;
18
19
  renderCardDetailsDefault(): JSX.Element;
19
20
  renderCardDetailsForDisabledAccount(): JSX.Element;
20
21
  getDisabledAccountName(): string | JSX.Element | null | undefined;
@@ -144,5 +144,10 @@ declare const messages: {
144
144
  defaultMessage: string;
145
145
  description: string;
146
146
  };
147
+ profileCardMoreIconLabel: {
148
+ id: string;
149
+ defaultMessage: string;
150
+ description: string;
151
+ };
147
152
  };
148
153
  export default messages;
@@ -8,6 +8,7 @@ export declare const CardWrapper: import("styled-components").StyledComponentCla
8
8
  export declare const ProfileImage: import("styled-components").StyledComponentClass<import("react").ClassAttributes<HTMLDivElement> & import("react").HTMLAttributes<HTMLDivElement>, any, import("react").ClassAttributes<HTMLDivElement> & import("react").HTMLAttributes<HTMLDivElement>>;
9
9
  export declare const ActionsFlexSpacer: import("styled-components").StyledComponentClass<import("react").ClassAttributes<HTMLDivElement> & import("react").HTMLAttributes<HTMLDivElement>, any, import("react").ClassAttributes<HTMLDivElement> & import("react").HTMLAttributes<HTMLDivElement>>;
10
10
  export declare const ActionButtonGroup: import("styled-components").StyledComponentClass<import("react").ClassAttributes<HTMLDivElement> & import("react").HTMLAttributes<HTMLDivElement>, any, import("react").ClassAttributes<HTMLDivElement> & import("react").HTMLAttributes<HTMLDivElement>>;
11
+ export declare const OverflowActionButtonsWrapper: import("styled-components").StyledComponentClass<import("react").ClassAttributes<HTMLDivElement> & import("react").HTMLAttributes<HTMLDivElement>, any, import("react").ClassAttributes<HTMLDivElement> & import("react").HTMLAttributes<HTMLDivElement>>;
11
12
  export declare const CardContent: import("styled-components").StyledComponentClass<import("react").ClassAttributes<HTMLDivElement> & import("react").HTMLAttributes<HTMLDivElement>, any, import("react").ClassAttributes<HTMLDivElement> & import("react").HTMLAttributes<HTMLDivElement>>;
12
13
  export declare const DetailsGroup: import("styled-components").StyledComponentClass<import("react").ClassAttributes<HTMLDivElement> & import("react").HTMLAttributes<HTMLDivElement>, any, import("react").ClassAttributes<HTMLDivElement> & import("react").HTMLAttributes<HTMLDivElement>>;
13
14
  export declare const DisabledInfo: import("styled-components").StyledComponentClass<import("react").ClassAttributes<HTMLDivElement> & import("react").HTMLAttributes<HTMLDivElement> & (import("@atlaskit/theme").ThemeProps | undefined), any, import("react").ClassAttributes<HTMLDivElement> & import("react").HTMLAttributes<HTMLDivElement> & (import("@atlaskit/theme").ThemeProps | undefined)>;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@atlaskit/profilecard",
3
- "version": "16.6.1",
3
+ "version": "16.7.0",
4
4
  "description": "A React component to display a card with user information.",
5
5
  "publishConfig": {
6
6
  "registry": "https://registry.npmjs.org/"
@@ -42,6 +42,7 @@
42
42
  "@atlaskit/avatar": "^21.0.0",
43
43
  "@atlaskit/avatar-group": "^9.0.0",
44
44
  "@atlaskit/button": "^16.3.0",
45
+ "@atlaskit/dropdown-menu": "^11.2.0",
45
46
  "@atlaskit/give-kudos": "^0.3.0",
46
47
  "@atlaskit/icon": "^21.10.0",
47
48
  "@atlaskit/lozenge": "^11.0.0",