@atlaskit/smart-card 23.7.1 → 23.7.3

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 (141) hide show
  1. package/CHANGELOG.md +12 -0
  2. package/dist/cjs/i18n/cs.js +6 -1
  3. package/dist/cjs/i18n/da.js +7 -1
  4. package/dist/cjs/i18n/de.js +6 -1
  5. package/dist/cjs/i18n/en.js +8 -1
  6. package/dist/cjs/i18n/en_GB.js +8 -1
  7. package/dist/cjs/i18n/es.js +5 -1
  8. package/dist/cjs/i18n/fi.js +7 -1
  9. package/dist/cjs/i18n/fr.js +7 -1
  10. package/dist/cjs/i18n/hu.js +6 -1
  11. package/dist/cjs/i18n/it.js +7 -1
  12. package/dist/cjs/i18n/ja.js +11 -5
  13. package/dist/cjs/i18n/ko.js +7 -1
  14. package/dist/cjs/i18n/nb.js +6 -1
  15. package/dist/cjs/i18n/nl.js +7 -1
  16. package/dist/cjs/i18n/pl.js +6 -1
  17. package/dist/cjs/i18n/pt_BR.js +7 -1
  18. package/dist/cjs/i18n/ru.js +7 -1
  19. package/dist/cjs/i18n/sv.js +7 -1
  20. package/dist/cjs/i18n/th.js +7 -1
  21. package/dist/cjs/i18n/tr.js +6 -1
  22. package/dist/cjs/i18n/uk.js +6 -1
  23. package/dist/cjs/i18n/vi.js +7 -1
  24. package/dist/cjs/i18n/zh.js +6 -1
  25. package/dist/cjs/i18n/zh_TW.js +6 -1
  26. package/dist/cjs/messages.js +4 -4
  27. package/dist/cjs/version.json +1 -1
  28. package/dist/cjs/view/InlineCard/ErroredView/index.js +6 -11
  29. package/dist/cjs/view/InlineCard/ForbiddenView/index.js +17 -21
  30. package/dist/cjs/view/InlineCard/Frame/index.js +4 -4
  31. package/dist/cjs/view/InlineCard/Frame/styled.js +22 -34
  32. package/dist/cjs/view/InlineCard/IconAndTitleLayout/index.js +52 -7
  33. package/dist/cjs/view/InlineCard/ResolvingView/index.js +3 -5
  34. package/dist/cjs/view/InlineCard/UnauthorisedView/index.js +8 -11
  35. package/dist/cjs/view/InlineCard/styled.js +2 -2
  36. package/dist/cjs/view/common/UnauthorisedViewContent.js +1 -1
  37. package/dist/es2019/i18n/cs.js +6 -1
  38. package/dist/es2019/i18n/da.js +7 -1
  39. package/dist/es2019/i18n/de.js +6 -1
  40. package/dist/es2019/i18n/en.js +8 -1
  41. package/dist/es2019/i18n/en_GB.js +8 -1
  42. package/dist/es2019/i18n/es.js +5 -1
  43. package/dist/es2019/i18n/fi.js +7 -1
  44. package/dist/es2019/i18n/fr.js +7 -1
  45. package/dist/es2019/i18n/hu.js +6 -1
  46. package/dist/es2019/i18n/it.js +7 -1
  47. package/dist/es2019/i18n/ja.js +11 -5
  48. package/dist/es2019/i18n/ko.js +7 -1
  49. package/dist/es2019/i18n/nb.js +6 -1
  50. package/dist/es2019/i18n/nl.js +7 -1
  51. package/dist/es2019/i18n/pl.js +6 -1
  52. package/dist/es2019/i18n/pt_BR.js +7 -1
  53. package/dist/es2019/i18n/ru.js +7 -1
  54. package/dist/es2019/i18n/sv.js +7 -1
  55. package/dist/es2019/i18n/th.js +7 -1
  56. package/dist/es2019/i18n/tr.js +6 -1
  57. package/dist/es2019/i18n/uk.js +6 -1
  58. package/dist/es2019/i18n/vi.js +7 -1
  59. package/dist/es2019/i18n/zh.js +6 -1
  60. package/dist/es2019/i18n/zh_TW.js +6 -1
  61. package/dist/es2019/messages.js +4 -4
  62. package/dist/es2019/version.json +1 -1
  63. package/dist/es2019/view/InlineCard/ErroredView/index.js +7 -9
  64. package/dist/es2019/view/InlineCard/ForbiddenView/index.js +8 -9
  65. package/dist/es2019/view/InlineCard/Frame/index.js +4 -4
  66. package/dist/es2019/view/InlineCard/Frame/styled.js +18 -31
  67. package/dist/es2019/view/InlineCard/IconAndTitleLayout/index.js +47 -6
  68. package/dist/es2019/view/InlineCard/ResolvingView/index.js +3 -5
  69. package/dist/es2019/view/InlineCard/UnauthorisedView/index.js +9 -10
  70. package/dist/es2019/view/InlineCard/styled.js +1 -6
  71. package/dist/es2019/view/common/UnauthorisedViewContent.js +1 -1
  72. package/dist/esm/i18n/cs.js +6 -1
  73. package/dist/esm/i18n/da.js +7 -1
  74. package/dist/esm/i18n/de.js +6 -1
  75. package/dist/esm/i18n/en.js +8 -1
  76. package/dist/esm/i18n/en_GB.js +8 -1
  77. package/dist/esm/i18n/es.js +5 -1
  78. package/dist/esm/i18n/fi.js +7 -1
  79. package/dist/esm/i18n/fr.js +7 -1
  80. package/dist/esm/i18n/hu.js +6 -1
  81. package/dist/esm/i18n/it.js +7 -1
  82. package/dist/esm/i18n/ja.js +11 -5
  83. package/dist/esm/i18n/ko.js +7 -1
  84. package/dist/esm/i18n/nb.js +6 -1
  85. package/dist/esm/i18n/nl.js +7 -1
  86. package/dist/esm/i18n/pl.js +6 -1
  87. package/dist/esm/i18n/pt_BR.js +7 -1
  88. package/dist/esm/i18n/ru.js +7 -1
  89. package/dist/esm/i18n/sv.js +7 -1
  90. package/dist/esm/i18n/th.js +7 -1
  91. package/dist/esm/i18n/tr.js +6 -1
  92. package/dist/esm/i18n/uk.js +6 -1
  93. package/dist/esm/i18n/vi.js +7 -1
  94. package/dist/esm/i18n/zh.js +6 -1
  95. package/dist/esm/i18n/zh_TW.js +6 -1
  96. package/dist/esm/messages.js +4 -4
  97. package/dist/esm/version.json +1 -1
  98. package/dist/esm/view/InlineCard/ErroredView/index.js +7 -9
  99. package/dist/esm/view/InlineCard/ForbiddenView/index.js +18 -20
  100. package/dist/esm/view/InlineCard/Frame/index.js +4 -4
  101. package/dist/esm/view/InlineCard/Frame/styled.js +17 -31
  102. package/dist/esm/view/InlineCard/IconAndTitleLayout/index.js +49 -7
  103. package/dist/esm/view/InlineCard/ResolvingView/index.js +3 -5
  104. package/dist/esm/view/InlineCard/UnauthorisedView/index.js +9 -10
  105. package/dist/esm/view/InlineCard/styled.js +2 -2
  106. package/dist/esm/view/common/UnauthorisedViewContent.js +1 -1
  107. package/dist/types/i18n/cs.d.ts +5 -0
  108. package/dist/types/i18n/da.d.ts +6 -0
  109. package/dist/types/i18n/de.d.ts +5 -0
  110. package/dist/types/i18n/en.d.ts +7 -0
  111. package/dist/types/i18n/en_GB.d.ts +7 -0
  112. package/dist/types/i18n/es.d.ts +4 -0
  113. package/dist/types/i18n/fi.d.ts +6 -0
  114. package/dist/types/i18n/fr.d.ts +6 -0
  115. package/dist/types/i18n/hu.d.ts +5 -0
  116. package/dist/types/i18n/it.d.ts +6 -0
  117. package/dist/types/i18n/ja.d.ts +6 -0
  118. package/dist/types/i18n/ko.d.ts +6 -0
  119. package/dist/types/i18n/nb.d.ts +5 -0
  120. package/dist/types/i18n/nl.d.ts +6 -0
  121. package/dist/types/i18n/pl.d.ts +5 -0
  122. package/dist/types/i18n/pt_BR.d.ts +6 -0
  123. package/dist/types/i18n/ru.d.ts +6 -0
  124. package/dist/types/i18n/sv.d.ts +6 -0
  125. package/dist/types/i18n/th.d.ts +6 -0
  126. package/dist/types/i18n/tr.d.ts +5 -0
  127. package/dist/types/i18n/uk.d.ts +5 -0
  128. package/dist/types/i18n/vi.d.ts +6 -0
  129. package/dist/types/i18n/zh.d.ts +5 -0
  130. package/dist/types/i18n/zh_TW.d.ts +5 -0
  131. package/dist/types/messages.d.ts +1 -1
  132. package/dist/types/view/InlineCard/ErroredView/index.d.ts +1 -1
  133. package/dist/types/view/InlineCard/ForbiddenView/index.d.ts +1 -1
  134. package/dist/types/view/InlineCard/Frame/index.d.ts +0 -1
  135. package/dist/types/view/InlineCard/Frame/styled.d.ts +3 -2
  136. package/dist/types/view/InlineCard/IconAndTitleLayout/index.d.ts +5 -0
  137. package/dist/types/view/InlineCard/ResolvingView/index.d.ts +0 -1
  138. package/dist/types/view/InlineCard/UnauthorisedView/index.d.ts +1 -1
  139. package/dist/types/view/InlineCard/styled.d.ts +1 -1
  140. package/package.json +1 -1
  141. package/report.api.md +16 -0
@@ -21,7 +21,7 @@ import { IconAndTitleLayout } from '../IconAndTitleLayout';
21
21
  import { AKIconWrapper } from '../Icon';
22
22
  import { messages } from '../../../messages';
23
23
  import { FormattedMessage } from 'react-intl-next';
24
- import { IconStyledButton, LowercaseAppearance, LinkAppearance } from '../styled';
24
+ import { IconStyledButton, LowercaseAppearance } from '../styled';
25
25
  var FallbackForbiddenIcon = /*#__PURE__*/React.createElement(AKIconWrapper, null, /*#__PURE__*/React.createElement(LockIcon, {
26
26
  label: "error",
27
27
  size: "small",
@@ -76,21 +76,18 @@ export var InlineCardForbiddenView = /*#__PURE__*/function (_React$Component) {
76
76
  }));
77
77
  });
78
78
 
79
- _defineProperty(_assertThisInitialized(_this), "renderMessage", function () {
80
- var _this$props4, _this$props4$requestA;
79
+ _defineProperty(_assertThisInitialized(_this), "renderRightSide", function () {
80
+ var _this$props3, _this$props3$requestA;
81
81
 
82
- var _this$props3 = _this.props,
83
- url = _this$props3.url,
84
- onAuthorise = _this$props3.onAuthorise;
85
- var link = /*#__PURE__*/React.createElement(LinkAppearance, null, url);
86
- var hasRequestAccessContextMessage = (_this$props4 = _this.props) === null || _this$props4 === void 0 ? void 0 : (_this$props4$requestA = _this$props4.requestAccessContext) === null || _this$props4$requestA === void 0 ? void 0 : _this$props4$requestA.callToActionMessageKey;
87
- return !onAuthorise && !hasRequestAccessContextMessage ? link : /*#__PURE__*/React.createElement(React.Fragment, null, link, ' - ', /*#__PURE__*/React.createElement(Button, {
82
+ var onAuthorise = _this.props.onAuthorise;
83
+ var hasRequestAccessContextMessage = (_this$props3 = _this.props) === null || _this$props3 === void 0 ? void 0 : (_this$props3$requestA = _this$props3.requestAccessContext) === null || _this$props3$requestA === void 0 ? void 0 : _this$props3$requestA.callToActionMessageKey;
84
+ return onAuthorise || hasRequestAccessContextMessage ? /*#__PURE__*/React.createElement(Button, {
88
85
  spacing: "none",
89
86
  appearance: "subtle-link",
90
87
  onClick: _this.handleRetry,
91
88
  component: IconStyledButton,
92
89
  testId: "button-connect-other-account"
93
- }, _this.renderForbiddenAccessMessage()));
90
+ }, _this.renderForbiddenAccessMessage()) : null;
94
91
  });
95
92
 
96
93
  return _this;
@@ -99,21 +96,22 @@ export var InlineCardForbiddenView = /*#__PURE__*/function (_React$Component) {
99
96
  _createClass(InlineCardForbiddenView, [{
100
97
  key: "render",
101
98
  value: function render() {
102
- var _this$props5 = this.props,
103
- url = _this$props5.url,
104
- icon = _this$props5.icon,
105
- onClick = _this$props5.onClick,
106
- isSelected = _this$props5.isSelected,
107
- _this$props5$testId = _this$props5.testId,
108
- testId = _this$props5$testId === void 0 ? 'inline-card-forbidden-view' : _this$props5$testId;
99
+ var _this$props4 = this.props,
100
+ url = _this$props4.url,
101
+ icon = _this$props4.icon,
102
+ onClick = _this$props4.onClick,
103
+ isSelected = _this$props4.isSelected,
104
+ _this$props4$testId = _this$props4.testId,
105
+ testId = _this$props4$testId === void 0 ? 'inline-card-forbidden-view' : _this$props4$testId;
109
106
  return /*#__PURE__*/React.createElement(Frame, {
110
107
  testId: testId,
111
- link: url,
112
- onClick: onClick,
113
108
  isSelected: isSelected
114
109
  }, /*#__PURE__*/React.createElement(IconAndTitleLayout, {
115
110
  icon: icon ? icon : FallbackForbiddenIcon,
116
- title: this.renderMessage(),
111
+ link: url,
112
+ title: url,
113
+ onClick: onClick,
114
+ rightSide: this.renderRightSide(),
117
115
  titleColor: token('color.text.subtle', N500)
118
116
  }));
119
117
  }
@@ -1,13 +1,12 @@
1
1
  import React, { useCallback } from 'react';
2
2
  import { useGlobalTheme } from '@atlaskit/theme/components';
3
- import { Wrapper } from './styled';
3
+ import { WrapperAnchor, WrapperSpan } from './styled';
4
4
  export var Frame = function Frame(props) {
5
5
  var isSelected = props.isSelected,
6
6
  children = props.children,
7
7
  onClick = props.onClick,
8
8
  link = props.link,
9
9
  withoutBackground = props.withoutBackground,
10
- withoutHover = props.withoutHover,
11
10
  testId = props.testId,
12
11
  className = props.className;
13
12
  var handleClick = useCallback(function (event) {
@@ -28,14 +27,15 @@ export var Frame = function Frame(props) {
28
27
  onClick(event);
29
28
  }
30
29
  }, [onClick]);
31
- var isInteractive = Boolean(onClick); // TODO Theming doesn't work right now in editor. Required React context does not trickle down atm.
30
+ var isInteractive = Boolean(onClick); // Depending on whenever Frame was given onClick or link itself we display span or anchor elements
31
+
32
+ var Wrapper = link || onClick ? WrapperAnchor : WrapperSpan; // TODO Theming doesn't work right now in editor. Required React context does not trickle down atm.
32
33
  // It will be worked as part of https://product-fabric.atlassian.net/jira/servicedesk/projects/DTR/queues/issue/DTR-154
33
34
 
34
35
  return /*#__PURE__*/React.createElement(Wrapper, {
35
36
  theme: useGlobalTheme(),
36
37
  href: link,
37
38
  withoutBackground: withoutBackground,
38
- withoutHover: withoutHover,
39
39
  isSelected: isSelected,
40
40
  isInteractive: isInteractive,
41
41
  tabIndex: isInteractive ? 0 : undefined,
@@ -1,13 +1,12 @@
1
1
  import _taggedTemplateLiteral from "@babel/runtime/helpers/taggedTemplateLiteral";
2
2
 
3
- var _templateObject;
3
+ var _templateObject, _templateObject2;
4
4
 
5
5
  import styled from '@emotion/styled';
6
6
  import { B100, B400, B50, DN40A, DN50A, N20, N40A, N50A } from '@atlaskit/theme/colors';
7
7
  import { borderRadius as akBorderRadius } from '@atlaskit/theme/constants';
8
8
  import { themed } from '@atlaskit/theme/components';
9
9
  import { token } from '@atlaskit/tokens';
10
- import { TitleWrapperClassName } from '../IconAndTitleLayout/styled';
11
10
  var BACKGROUND_COLOR_DARK = '#262B31';
12
11
  var selected = "\n cursor: pointer;\n box-shadow: 0 0 0 2px ".concat(token('color.border.selected', B100), ";\n outline: none;\n user-select: none;\n &, :hover, :focus, :active {\n text-decoration: none;\n }\n");
13
12
 
@@ -15,13 +14,13 @@ var isInteractive = function isInteractive(_ref) {
15
14
  var isInteractive = _ref.isInteractive;
16
15
 
17
16
  if (isInteractive) {
18
- return "\n cursor: pointer;\n :hover {\n background-color: ".concat(themed({
17
+ return "\n :hover {\n background-color: ".concat(themed({
19
18
  light: token('color.background.neutral.subtle.hovered', N20),
20
19
  dark: token('color.background.neutral.subtle.hovered', BACKGROUND_COLOR_DARK)
21
- }), ";\n text-decoration: none;\n }\n :active {\n background-color: ").concat(themed({
20
+ }), ";\n }\n :active {\n background-color: ").concat(themed({
22
21
  light: token('color.background.selected', B50),
23
22
  dark: token('color.background.selected', BACKGROUND_COLOR_DARK)
24
- }), ";\n text-decoration: none;\n }\n :focus {\n ").concat(selected, "\n text-decoration: none;\n }\n ");
23
+ }), ";\n }\n :focus {\n ").concat(selected, "\n }\n ");
25
24
  } else {
26
25
  return '';
27
26
  }
@@ -36,11 +35,6 @@ var isSelected = function isSelected(_ref2) {
36
35
  return 'user-select: text';
37
36
  }
38
37
  };
39
-
40
- var withoutHover = function withoutHover(_ref3) {
41
- var withoutHover = _ref3.withoutHover;
42
- return withoutHover ? "\n &:hover {\n text-decoration: none;\n }\n " : '';
43
- };
44
38
  /*
45
39
  Inline smart cards should have the following layout:
46
40
  ------------------------------------
@@ -55,28 +49,20 @@ var withoutHover = function withoutHover(_ref3) {
55
49
  // NB: `box-decoration-break` required for retaining properties (border-radius) on wrap.
56
50
 
57
51
 
58
- export var Wrapper = styled.a(_templateObject || (_templateObject = _taggedTemplateLiteral(["\n line-height: 16px;\n padding: 1px 0.24em 2px 0.24em;\n ", "\n display: inline;\n box-decoration-break: clone;\n border-radius: ", "px;\n color: ", ";\n background-color: ", ";\n ", "\n ", "\n ", ";\n ", "\n transition: 0.1s all ease-in-out;\n -moz-user-select: none;\n\n &:hover span.", " {\n text-decoration: ", ";\n }\n"])), function (props) {
59
- return props.withoutBackground ? "padding-left: 0; margin-left:-2px;" : '';
60
- }, akBorderRadius(), themed({
61
- light: token('color.link', B400),
62
- dark: token('color.link', '#4794FF')
63
- }), function (props) {
64
- return props.withoutBackground ? '' : themed({
52
+ var baseWrapperStyle = function baseWrapperStyle(props) {
53
+ return "\n line-height: 16px;\n padding: 1px 0.24em 2px 0.24em;\n ".concat(props.withoutBackground ? "padding-left: 0; margin-left:-2px;" : '', "\n display: inline;\n box-decoration-break: clone;\n border-radius: ").concat(akBorderRadius(), "px;\n color: ").concat(themed({
54
+ light: token('color.link', B400),
55
+ dark: token('color.link', '#4794FF')
56
+ })(props), ";\n background-color: ").concat(props.withoutBackground ? '' : themed({
65
57
  light: token('elevation.surface.raised', 'white'),
66
58
  dark: token('elevation.surface.raised', BACKGROUND_COLOR_DARK)
67
- });
68
- }, function (props) {
69
- return props.withoutBackground ? '' : themed({
59
+ })(props), ";\n ").concat(props.withoutBackground ? '' : themed({
70
60
  light: "box-shadow: ".concat(token('elevation.shadow.raised', "0 1px 1px ".concat(N50A, ", 0 0 1px 1px ").concat(N40A)), ";"),
71
61
  dark: "box-shadow: ".concat(token('elevation.shadow.raised', "0 1px 1px ".concat(DN50A, ", 0 0 1px 1px ").concat(DN40A)), ";")
72
- });
73
- }, function (props) {
74
- return isInteractive(props);
75
- }, function (props) {
76
- return isSelected(props);
77
- }, function (props) {
78
- return withoutHover(props);
79
- }, TitleWrapperClassName, function (_ref4) {
80
- var withoutHover = _ref4.withoutHover;
81
- return withoutHover ? 'none' : 'underline';
82
- });
62
+ })(props), "\n ").concat(isSelected(props), ";\n transition: 0.1s all ease-in-out;\n -moz-user-select: none;\n");
63
+ };
64
+
65
+ export var WrapperAnchor = styled.a(_templateObject || (_templateObject = _taggedTemplateLiteral(["\n ", "\n ", "\n"])), baseWrapperStyle, isInteractive);
66
+ WrapperAnchor.displayName = 'WrapperAnchor';
67
+ export var WrapperSpan = styled.span(_templateObject2 || (_templateObject2 = _taggedTemplateLiteral(["\n ", "\n"])), baseWrapperStyle);
68
+ WrapperSpan.displayName = 'WrapperSpan';
@@ -1,8 +1,10 @@
1
1
  import _classCallCheck from "@babel/runtime/helpers/classCallCheck";
2
2
  import _createClass from "@babel/runtime/helpers/createClass";
3
+ import _assertThisInitialized from "@babel/runtime/helpers/assertThisInitialized";
3
4
  import _inherits from "@babel/runtime/helpers/inherits";
4
5
  import _possibleConstructorReturn from "@babel/runtime/helpers/possibleConstructorReturn";
5
6
  import _getPrototypeOf from "@babel/runtime/helpers/getPrototypeOf";
7
+ import _defineProperty from "@babel/runtime/helpers/defineProperty";
6
8
 
7
9
  function _createSuper(Derived) { var hasNativeReflectConstruct = _isNativeReflectConstruct(); return function _createSuperInternal() { var Super = _getPrototypeOf(Derived), result; if (hasNativeReflectConstruct) { var NewTarget = _getPrototypeOf(this).constructor; result = Reflect.construct(Super, arguments, NewTarget); } else { result = Super.apply(this, arguments); } return _possibleConstructorReturn(this, result); }; }
8
10
 
@@ -13,15 +15,48 @@ import ImageLoader from 'react-render-image';
13
15
  import { Icon, Shimmer } from '../Icon';
14
16
  import { IconEmptyWrapper, IconPositionWrapper, IconTitleWrapper, IconWrapper, TitleWrapper, EmojiWrapper, TitleWrapperClassName } from './styled';
15
17
  import LinkIcon from '@atlaskit/icon/glyph/link';
18
+ import { LinkAppearance, NoLinkAppearance } from '../styled';
16
19
  export var IconAndTitleLayout = /*#__PURE__*/function (_React$Component) {
17
20
  _inherits(IconAndTitleLayout, _React$Component);
18
21
 
19
22
  var _super = _createSuper(IconAndTitleLayout);
20
23
 
21
24
  function IconAndTitleLayout() {
25
+ var _this;
26
+
22
27
  _classCallCheck(this, IconAndTitleLayout);
23
28
 
24
- return _super.apply(this, arguments);
29
+ for (var _len = arguments.length, args = new Array(_len), _key = 0; _key < _len; _key++) {
30
+ args[_key] = arguments[_key];
31
+ }
32
+
33
+ _this = _super.call.apply(_super, [this].concat(args));
34
+
35
+ _defineProperty(_assertThisInitialized(_this), "handleClick", function (event) {
36
+ var onClick = _this.props.onClick;
37
+
38
+ if (onClick) {
39
+ event.preventDefault();
40
+ event.stopPropagation();
41
+ onClick(event);
42
+ }
43
+ });
44
+
45
+ _defineProperty(_assertThisInitialized(_this), "handleKeyPress", function (event) {
46
+ var onClick = _this.props.onClick;
47
+
48
+ if (event.key !== ' ' && event.key !== 'Enter') {
49
+ return;
50
+ }
51
+
52
+ if (onClick) {
53
+ event.preventDefault();
54
+ event.stopPropagation();
55
+ onClick(event);
56
+ }
57
+ });
58
+
59
+ return _this;
25
60
  }
26
61
 
27
62
  _createClass(IconAndTitleLayout, [{
@@ -103,18 +138,25 @@ export var IconAndTitleLayout = /*#__PURE__*/function (_React$Component) {
103
138
  title = _this$props2.title,
104
139
  titleColor = _this$props2.titleColor,
105
140
  titleTextColor = _this$props2.titleTextColor,
141
+ link = _this$props2.link,
142
+ rightSide = _this$props2.rightSide,
106
143
  _this$props2$testId = _this$props2.testId,
107
144
  testId = _this$props2$testId === void 0 ? 'inline-card-icon-and-title' : _this$props2$testId;
108
- return /*#__PURE__*/React.createElement(React.Fragment, null, /*#__PURE__*/React.createElement(IconTitleWrapper, {
109
- style: {
110
- color: titleColor
111
- }
112
- }, /*#__PURE__*/React.createElement(IconPositionWrapper, null, children || /*#__PURE__*/React.createElement(React.Fragment, null, /*#__PURE__*/React.createElement(IconEmptyWrapper, null), this.renderIcon(testId))), /*#__PURE__*/React.createElement(TitleWrapper, {
145
+ var titlePart = /*#__PURE__*/React.createElement(React.Fragment, null, /*#__PURE__*/React.createElement(IconPositionWrapper, null, children || /*#__PURE__*/React.createElement(React.Fragment, null, /*#__PURE__*/React.createElement(IconEmptyWrapper, null), this.renderIcon(testId))), /*#__PURE__*/React.createElement(TitleWrapper, {
113
146
  style: {
114
147
  color: titleTextColor
115
148
  },
116
149
  className: TitleWrapperClassName
117
- }, title)));
150
+ }, title));
151
+ return /*#__PURE__*/React.createElement(React.Fragment, null, /*#__PURE__*/React.createElement(IconTitleWrapper, {
152
+ style: {
153
+ color: titleColor
154
+ }
155
+ }, link ? /*#__PURE__*/React.createElement(LinkAppearance, {
156
+ href: link,
157
+ onClick: this.handleClick,
158
+ onKeyPress: this.handleKeyPress
159
+ }, titlePart) : titlePart, rightSide ? /*#__PURE__*/React.createElement(NoLinkAppearance, null, ' - ', rightSide) : null));
118
160
  }
119
161
  }]);
120
162
 
@@ -35,13 +35,11 @@ export var InlineCardResolvingView = /*#__PURE__*/function (_React$Component) {
35
35
  inlinePreloaderStyle = _this$props.inlinePreloaderStyle,
36
36
  _this$props$testId = _this$props.testId,
37
37
  testId = _this$props$testId === void 0 ? 'inline-card-resolving-view' : _this$props$testId,
38
- titleTextColor = _this$props.titleTextColor,
39
- withoutHover = _this$props.withoutHover;
38
+ titleTextColor = _this$props.titleTextColor;
40
39
 
41
40
  if (inlinePreloaderStyle === 'on-right-without-skeleton') {
42
41
  return /*#__PURE__*/React.createElement(Frame, {
43
42
  withoutBackground: true,
44
- withoutHover: withoutHover,
45
43
  testId: testId,
46
44
  onClick: onClick,
47
45
  isSelected: isSelected
@@ -54,9 +52,9 @@ export var InlineCardResolvingView = /*#__PURE__*/function (_React$Component) {
54
52
  return /*#__PURE__*/React.createElement(Frame, {
55
53
  testId: testId,
56
54
  onClick: onClick,
57
- isSelected: isSelected,
58
- withoutHover: withoutHover
55
+ isSelected: isSelected
59
56
  }, /*#__PURE__*/React.createElement(IconAndTitleLayout, {
57
+ link: url,
60
58
  title: url,
61
59
  titleTextColor: titleTextColor
62
60
  }, /*#__PURE__*/React.createElement(SpinnerWrapper, {
@@ -21,7 +21,7 @@ import { messages } from '../../../messages';
21
21
  import { Frame } from '../Frame';
22
22
  import { AKIconWrapper } from '../Icon';
23
23
  import { IconAndTitleLayout } from '../IconAndTitleLayout';
24
- import { IconStyledButton, LinkAppearance } from '../styled';
24
+ import { IconStyledButton } from '../styled';
25
25
  import { HoverCard } from '../../HoverCard';
26
26
  var FallbackUnauthorizedIcon = /*#__PURE__*/React.createElement(AKIconWrapper, null, /*#__PURE__*/React.createElement(LockIcon, {
27
27
  label: "error",
@@ -51,13 +51,11 @@ export var InlineCardUnauthorizedView = /*#__PURE__*/function (_React$Component)
51
51
  return onAuthorise();
52
52
  });
53
53
 
54
- _defineProperty(_assertThisInitialized(_this), "renderMessage", function () {
54
+ _defineProperty(_assertThisInitialized(_this), "renderRightSide", function () {
55
55
  var _this$props = _this.props,
56
- context = _this$props.context,
57
56
  onAuthorise = _this$props.onAuthorise,
58
- url = _this$props.url;
59
- var link = /*#__PURE__*/React.createElement(LinkAppearance, null, url);
60
- return !onAuthorise ? link : /*#__PURE__*/React.createElement(React.Fragment, null, link, ' - ', /*#__PURE__*/React.createElement(Button, {
57
+ context = _this$props.context;
58
+ return onAuthorise ? /*#__PURE__*/React.createElement(Button, {
61
59
  spacing: "none",
62
60
  appearance: "subtle-link",
63
61
  component: IconStyledButton,
@@ -67,7 +65,7 @@ export var InlineCardUnauthorizedView = /*#__PURE__*/function (_React$Component)
67
65
  values: {
68
66
  context: context
69
67
  }
70
- }))));
68
+ }))) : undefined;
71
69
  });
72
70
 
73
71
  return _this;
@@ -87,12 +85,13 @@ export var InlineCardUnauthorizedView = /*#__PURE__*/function (_React$Component)
87
85
  showAuthTooltip = _this$props2$showAuth === void 0 ? false : _this$props2$showAuth;
88
86
  var inlineCardUnauthenticatedView = /*#__PURE__*/React.createElement(Frame, {
89
87
  testId: testId,
90
- link: url,
91
- onClick: onClick,
92
88
  isSelected: isSelected
93
89
  }, /*#__PURE__*/React.createElement(IconAndTitleLayout, {
94
90
  icon: icon ? icon : FallbackUnauthorizedIcon,
95
- title: this.renderMessage(),
91
+ title: url,
92
+ link: url,
93
+ rightSide: this.renderRightSide(),
94
+ onClick: onClick,
96
95
  titleColor: token('color.text.subtle', N500)
97
96
  }));
98
97
 
@@ -9,13 +9,13 @@ import { token } from '@atlaskit/tokens';
9
9
  var LINK_COLOR_DARK = '#4794FF'; // By default buttons will hide overflow and ellipsis content instead of wrapping.
10
10
  // This basically turns the button back into inline content
11
11
 
12
- export var IconStyledButton = styled.span(_templateObject || (_templateObject = _taggedTemplateLiteral(["\n text-align: initial !important;\n display: inline !important;\n\n &:hover {\n /* Remove the text-decoration to match other inline card hover states */\n text-decoration: none !important;\n }\n\n > span {\n display: inline;\n > span {\n overflow: initial;\n text-overflow: initial;\n white-space: initial;\n }\n }\n"])));
12
+ export var IconStyledButton = styled.span(_templateObject || (_templateObject = _taggedTemplateLiteral(["\n text-align: initial !important;\n display: inline !important;\n\n > span {\n display: inline;\n > span {\n overflow: initial;\n text-overflow: initial;\n white-space: initial;\n }\n }\n"])));
13
13
  export var NoLinkAppearance = styled.span(_templateObject2 || (_templateObject2 = _taggedTemplateLiteral(["\n color: ", ";\n"])), themed({
14
14
  light: token('color.text.subtlest', N200),
15
15
  dark: token('color.text.subtlest', LINK_COLOR_DARK)
16
16
  }));
17
17
  export var LowercaseAppearance = styled.span(_templateObject3 || (_templateObject3 = _taggedTemplateLiteral(["\n text-transform: lowercase;\n"])));
18
- export var LinkAppearance = styled.span(_templateObject4 || (_templateObject4 = _taggedTemplateLiteral(["\n color: ", ";\n"])), themed({
18
+ export var LinkAppearance = styled.a(_templateObject4 || (_templateObject4 = _taggedTemplateLiteral(["\n color: ", ";\n"])), themed({
19
19
  light: token('color.link', B400),
20
20
  dark: token('color.link', LINK_COLOR_DARK)
21
21
  }));
@@ -20,7 +20,7 @@ var UnauthorisedViewContent = function UnauthorisedViewContent(_ref) {
20
20
  href: CONTENT_URL_SECURITY_AND_PERMISSIONS,
21
21
  target: "_blank",
22
22
  "data-testid": "".concat(testId, "-learn-more")
23
- }, /*#__PURE__*/React.createElement(FormattedMessage, messages.learn_more_about_smart_links_security)));
23
+ }, /*#__PURE__*/React.createElement(FormattedMessage, messages.learn_more_about_smart_links)));
24
24
  };
25
25
 
26
26
  export default UnauthorisedViewContent;
@@ -13,6 +13,7 @@ declare const _default: {
13
13
  'fabric.linking.connect_link_account_card_view_description': string;
14
14
  'fabric.linking.connect_link_account_card_view_name': string;
15
15
  'fabric.linking.connect_to': string;
16
+ 'fabric.linking.connect_unauthorised_account_action': string;
16
17
  'fabric.linking.couldnt_load_link': string;
17
18
  'fabric.linking.create_on_absolute': string;
18
19
  'fabric.linking.create_on_relative': string;
@@ -31,8 +32,12 @@ declare const _default: {
31
32
  'fabric.linking.more_actions': string;
32
33
  'fabric.linking.not_found_description': string;
33
34
  'fabric.linking.not_found_title': string;
35
+ 'fabric.linking.open_link_in_a_new_tab': string;
34
36
  'fabric.linking.pending_request': string;
35
37
  'fabric.linking.preview': string;
38
+ 'fabric.linking.preview_close': string;
39
+ 'fabric.linking.preview_max_size': string;
40
+ 'fabric.linking.preview_min_size': string;
36
41
  'fabric.linking.priority_blocker': string;
37
42
  'fabric.linking.priority_critical': string;
38
43
  'fabric.linking.priority_high': string;
@@ -13,6 +13,7 @@ declare const _default: {
13
13
  'fabric.linking.connect_link_account_card_view_description': string;
14
14
  'fabric.linking.connect_link_account_card_view_name': string;
15
15
  'fabric.linking.connect_to': string;
16
+ 'fabric.linking.connect_unauthorised_account_action': string;
16
17
  'fabric.linking.couldnt_load_link': string;
17
18
  'fabric.linking.create_on_absolute': string;
18
19
  'fabric.linking.create_on_relative': string;
@@ -25,14 +26,19 @@ declare const _default: {
25
26
  'fabric.linking.invalid_permissions': string;
26
27
  'fabric.linking.invalid_permissions_description': string;
27
28
  'fabric.linking.join_to_view': string;
29
+ 'fabric.linking.learn_more_about_smart_links_security': string;
28
30
  'fabric.linking.loading': string;
29
31
  'fabric.linking.modified_on_absolute': string;
30
32
  'fabric.linking.modified_on_relative': string;
31
33
  'fabric.linking.more_actions': string;
32
34
  'fabric.linking.not_found_description': string;
33
35
  'fabric.linking.not_found_title': string;
36
+ 'fabric.linking.open_link_in_a_new_tab': string;
34
37
  'fabric.linking.pending_request': string;
35
38
  'fabric.linking.preview': string;
39
+ 'fabric.linking.preview_close': string;
40
+ 'fabric.linking.preview_max_size': string;
41
+ 'fabric.linking.preview_min_size': string;
36
42
  'fabric.linking.priority_blocker': string;
37
43
  'fabric.linking.priority_critical': string;
38
44
  'fabric.linking.priority_high': string;
@@ -13,6 +13,7 @@ declare const _default: {
13
13
  'fabric.linking.connect_link_account_card_view_description': string;
14
14
  'fabric.linking.connect_link_account_card_view_name': string;
15
15
  'fabric.linking.connect_to': string;
16
+ 'fabric.linking.connect_unauthorised_account_action': string;
16
17
  'fabric.linking.couldnt_load_link': string;
17
18
  'fabric.linking.create_on_absolute': string;
18
19
  'fabric.linking.create_on_relative': string;
@@ -31,8 +32,12 @@ declare const _default: {
31
32
  'fabric.linking.more_actions': string;
32
33
  'fabric.linking.not_found_description': string;
33
34
  'fabric.linking.not_found_title': string;
35
+ 'fabric.linking.open_link_in_a_new_tab': string;
34
36
  'fabric.linking.pending_request': string;
35
37
  'fabric.linking.preview': string;
38
+ 'fabric.linking.preview_close': string;
39
+ 'fabric.linking.preview_max_size': string;
40
+ 'fabric.linking.preview_min_size': string;
36
41
  'fabric.linking.priority_blocker': string;
37
42
  'fabric.linking.priority_critical': string;
38
43
  'fabric.linking.priority_high': string;
@@ -13,6 +13,8 @@ declare const _default: {
13
13
  'fabric.linking.connect_link_account_card_view_description': string;
14
14
  'fabric.linking.connect_link_account_card_view_name': string;
15
15
  'fabric.linking.connect_to': string;
16
+ 'fabric.linking.connect_unauthorized_account_action': string;
17
+ 'fabric.linking.connect_unauthorized_account_description': string;
16
18
  'fabric.linking.couldnt_load_link': string;
17
19
  'fabric.linking.create_on_absolute': string;
18
20
  'fabric.linking.create_on_relative': string;
@@ -25,14 +27,19 @@ declare const _default: {
25
27
  'fabric.linking.invalid_permissions': string;
26
28
  'fabric.linking.invalid_permissions_description': string;
27
29
  'fabric.linking.join_to_view': string;
30
+ 'fabric.linking.learn_more_about_smart_links_security': string;
28
31
  'fabric.linking.loading': string;
29
32
  'fabric.linking.modified_on_absolute': string;
30
33
  'fabric.linking.modified_on_relative': string;
31
34
  'fabric.linking.more_actions': string;
32
35
  'fabric.linking.not_found_description': string;
33
36
  'fabric.linking.not_found_title': string;
37
+ 'fabric.linking.open_link_in_a_new_tab': string;
34
38
  'fabric.linking.pending_request': string;
35
39
  'fabric.linking.preview': string;
40
+ 'fabric.linking.preview_close': string;
41
+ 'fabric.linking.preview_max_size': string;
42
+ 'fabric.linking.preview_min_size': string;
36
43
  'fabric.linking.priority_blocker': string;
37
44
  'fabric.linking.priority_critical': string;
38
45
  'fabric.linking.priority_high': string;
@@ -13,6 +13,8 @@ declare const _default: {
13
13
  'fabric.linking.connect_link_account_card_view_description': string;
14
14
  'fabric.linking.connect_link_account_card_view_name': string;
15
15
  'fabric.linking.connect_to': string;
16
+ 'fabric.linking.connect_unauthorised_account_action': string;
17
+ 'fabric.linking.connect_unauthorised_account_description': string;
16
18
  'fabric.linking.couldnt_load_link': string;
17
19
  'fabric.linking.create_on_absolute': string;
18
20
  'fabric.linking.create_on_relative': string;
@@ -25,14 +27,19 @@ declare const _default: {
25
27
  'fabric.linking.invalid_permissions': string;
26
28
  'fabric.linking.invalid_permissions_description': string;
27
29
  'fabric.linking.join_to_view': string;
30
+ 'fabric.linking.learn_more_about_smart_links_security': string;
28
31
  'fabric.linking.loading': string;
29
32
  'fabric.linking.modified_on_absolute': string;
30
33
  'fabric.linking.modified_on_relative': string;
31
34
  'fabric.linking.more_actions': string;
32
35
  'fabric.linking.not_found_description': string;
33
36
  'fabric.linking.not_found_title': string;
37
+ 'fabric.linking.open_link_in_a_new_tab': string;
34
38
  'fabric.linking.pending_request': string;
35
39
  'fabric.linking.preview': string;
40
+ 'fabric.linking.preview_close': string;
41
+ 'fabric.linking.preview_max_size': string;
42
+ 'fabric.linking.preview_min_size': string;
36
43
  'fabric.linking.priority_blocker': string;
37
44
  'fabric.linking.priority_critical': string;
38
45
  'fabric.linking.priority_high': string;
@@ -13,6 +13,7 @@ declare const _default: {
13
13
  'fabric.linking.connect_link_account_card_view_description': string;
14
14
  'fabric.linking.connect_link_account_card_view_name': string;
15
15
  'fabric.linking.connect_to': string;
16
+ 'fabric.linking.connect_unauthorised_account_action': string;
16
17
  'fabric.linking.couldnt_load_link': string;
17
18
  'fabric.linking.create_on_absolute': string;
18
19
  'fabric.linking.create_on_relative': string;
@@ -33,6 +34,9 @@ declare const _default: {
33
34
  'fabric.linking.not_found_title': string;
34
35
  'fabric.linking.pending_request': string;
35
36
  'fabric.linking.preview': string;
37
+ 'fabric.linking.preview_close': string;
38
+ 'fabric.linking.preview_max_size': string;
39
+ 'fabric.linking.preview_min_size': string;
36
40
  'fabric.linking.priority_blocker': string;
37
41
  'fabric.linking.priority_critical': string;
38
42
  'fabric.linking.priority_high': string;
@@ -13,6 +13,7 @@ declare const _default: {
13
13
  'fabric.linking.connect_link_account_card_view_description': string;
14
14
  'fabric.linking.connect_link_account_card_view_name': string;
15
15
  'fabric.linking.connect_to': string;
16
+ 'fabric.linking.connect_unauthorised_account_action': string;
16
17
  'fabric.linking.couldnt_load_link': string;
17
18
  'fabric.linking.create_on_absolute': string;
18
19
  'fabric.linking.create_on_relative': string;
@@ -25,14 +26,19 @@ declare const _default: {
25
26
  'fabric.linking.invalid_permissions': string;
26
27
  'fabric.linking.invalid_permissions_description': string;
27
28
  'fabric.linking.join_to_view': string;
29
+ 'fabric.linking.learn_more_about_smart_links_security': string;
28
30
  'fabric.linking.loading': string;
29
31
  'fabric.linking.modified_on_absolute': string;
30
32
  'fabric.linking.modified_on_relative': string;
31
33
  'fabric.linking.more_actions': string;
32
34
  'fabric.linking.not_found_description': string;
33
35
  'fabric.linking.not_found_title': string;
36
+ 'fabric.linking.open_link_in_a_new_tab': string;
34
37
  'fabric.linking.pending_request': string;
35
38
  'fabric.linking.preview': string;
39
+ 'fabric.linking.preview_close': string;
40
+ 'fabric.linking.preview_max_size': string;
41
+ 'fabric.linking.preview_min_size': string;
36
42
  'fabric.linking.priority_blocker': string;
37
43
  'fabric.linking.priority_critical': string;
38
44
  'fabric.linking.priority_high': string;
@@ -13,6 +13,7 @@ declare const _default: {
13
13
  'fabric.linking.connect_link_account_card_view_description': string;
14
14
  'fabric.linking.connect_link_account_card_view_name': string;
15
15
  'fabric.linking.connect_to': string;
16
+ 'fabric.linking.connect_unauthorised_account_action': string;
16
17
  'fabric.linking.couldnt_load_link': string;
17
18
  'fabric.linking.create_on_absolute': string;
18
19
  'fabric.linking.create_on_relative': string;
@@ -25,14 +26,19 @@ declare const _default: {
25
26
  'fabric.linking.invalid_permissions': string;
26
27
  'fabric.linking.invalid_permissions_description': string;
27
28
  'fabric.linking.join_to_view': string;
29
+ 'fabric.linking.learn_more_about_smart_links_security': string;
28
30
  'fabric.linking.loading': string;
29
31
  'fabric.linking.modified_on_absolute': string;
30
32
  'fabric.linking.modified_on_relative': string;
31
33
  'fabric.linking.more_actions': string;
32
34
  'fabric.linking.not_found_description': string;
33
35
  'fabric.linking.not_found_title': string;
36
+ 'fabric.linking.open_link_in_a_new_tab': string;
34
37
  'fabric.linking.pending_request': string;
35
38
  'fabric.linking.preview': string;
39
+ 'fabric.linking.preview_close': string;
40
+ 'fabric.linking.preview_max_size': string;
41
+ 'fabric.linking.preview_min_size': string;
36
42
  'fabric.linking.priority_blocker': string;
37
43
  'fabric.linking.priority_critical': string;
38
44
  'fabric.linking.priority_high': string;
@@ -13,6 +13,7 @@ declare const _default: {
13
13
  'fabric.linking.connect_link_account_card_view_description': string;
14
14
  'fabric.linking.connect_link_account_card_view_name': string;
15
15
  'fabric.linking.connect_to': string;
16
+ 'fabric.linking.connect_unauthorised_account_action': string;
16
17
  'fabric.linking.couldnt_load_link': string;
17
18
  'fabric.linking.create_on_absolute': string;
18
19
  'fabric.linking.create_on_relative': string;
@@ -31,8 +32,12 @@ declare const _default: {
31
32
  'fabric.linking.more_actions': string;
32
33
  'fabric.linking.not_found_description': string;
33
34
  'fabric.linking.not_found_title': string;
35
+ 'fabric.linking.open_link_in_a_new_tab': string;
34
36
  'fabric.linking.pending_request': string;
35
37
  'fabric.linking.preview': string;
38
+ 'fabric.linking.preview_close': string;
39
+ 'fabric.linking.preview_max_size': string;
40
+ 'fabric.linking.preview_min_size': string;
36
41
  'fabric.linking.priority_blocker': string;
37
42
  'fabric.linking.priority_critical': string;
38
43
  'fabric.linking.priority_high': string;