@atlaskit/smart-card 26.55.2 → 26.56.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (211) hide show
  1. package/CHANGELOG.md +13 -0
  2. package/dist/cjs/constants.js +1 -0
  3. package/dist/cjs/extractors/flexible/actions/extract-copy-link-action.js +21 -0
  4. package/dist/cjs/extractors/flexible/actions/index.js +2 -1
  5. package/dist/cjs/messages.js +10 -0
  6. package/dist/cjs/state/hooks/use-ai-summary/ai-summary-service/types.js +1 -1
  7. package/dist/cjs/utils/analytics/analytics.js +1 -1
  8. package/dist/cjs/view/BlockCard/views/flexible/FlexibleUnauthorisedView.js +5 -3
  9. package/dist/cjs/view/BlockCard/views/styled.js +5 -3
  10. package/dist/cjs/view/Card/types.js +1 -0
  11. package/dist/cjs/view/EmbedCard/views/unresolved-view/styled.js +29 -8
  12. package/dist/cjs/view/EmbedModal/components/embed-content/index.js +5 -4
  13. package/dist/cjs/view/FlexibleCard/components/actions/action/action-button/index.js +24 -7
  14. package/dist/cjs/view/FlexibleCard/components/actions/action/action-stack-item/index.js +3 -1
  15. package/dist/cjs/view/FlexibleCard/components/actions/action/index.js +12 -4
  16. package/dist/cjs/view/FlexibleCard/components/actions/copy-link-action/index.js +88 -0
  17. package/dist/cjs/view/FlexibleCard/components/actions/copy-link-action/types.js +5 -0
  18. package/dist/cjs/view/FlexibleCard/components/actions/index.js +8 -1
  19. package/dist/cjs/view/FlexibleCard/components/blocks/ai-summary-block/ai-motion-wrapper/types.js +5 -1
  20. package/dist/cjs/view/FlexibleCard/components/blocks/ai-summary-block/ai-state-indicator/ai-state-error.js +6 -2
  21. package/dist/cjs/view/FlexibleCard/components/blocks/ai-summary-block/feature-discovery/index.js +54 -0
  22. package/dist/cjs/view/FlexibleCard/components/blocks/ai-summary-block/feature-discovery/styled.js +21 -0
  23. package/dist/cjs/view/FlexibleCard/components/blocks/ai-summary-block/resolved/index.js +15 -1
  24. package/dist/cjs/view/FlexibleCard/components/blocks/block/index.js +3 -1
  25. package/dist/cjs/view/FlexibleCard/components/blocks/element-group/index.js +34 -7
  26. package/dist/cjs/view/FlexibleCard/components/blocks/metadata-block/index.js +3 -3
  27. package/dist/cjs/view/FlexibleCard/components/blocks/preview-block/resolved/index.js +13 -3
  28. package/dist/cjs/view/FlexibleCard/components/blocks/related-urls-block/index.js +3 -3
  29. package/dist/cjs/view/FlexibleCard/components/blocks/related-urls-block/resolved/related-url-list/index.js +3 -3
  30. package/dist/cjs/view/FlexibleCard/components/blocks/title-block/errored/index.js +16 -4
  31. package/dist/cjs/view/FlexibleCard/components/blocks/title-block/resolved/index.js +3 -3
  32. package/dist/cjs/view/FlexibleCard/components/blocks/utils.js +2 -0
  33. package/dist/cjs/view/FlexibleCard/components/common/loading-skeleton/index.js +27 -4
  34. package/dist/cjs/view/FlexibleCard/components/container/index.js +2 -0
  35. package/dist/cjs/view/FlexibleCard/components/container/layered-link/index.js +33 -3
  36. package/dist/cjs/view/FlexibleCard/components/elements/atlaskit-badge/index.js +5 -3
  37. package/dist/cjs/view/FlexibleCard/components/elements/avatar-group/index.js +10 -3
  38. package/dist/cjs/view/FlexibleCard/components/elements/badge/index.js +16 -4
  39. package/dist/cjs/view/FlexibleCard/components/elements/date-time/index.js +6 -3
  40. package/dist/cjs/view/FlexibleCard/components/elements/icon/index.js +23 -7
  41. package/dist/cjs/view/FlexibleCard/components/elements/link/index.js +38 -8
  42. package/dist/cjs/view/FlexibleCard/components/elements/lozenge/index.js +5 -3
  43. package/dist/cjs/view/FlexibleCard/components/elements/lozenge/lozenge-action/styled.js +46 -6
  44. package/dist/cjs/view/FlexibleCard/components/elements/media/index.js +31 -3
  45. package/dist/cjs/view/FlexibleCard/components/elements/text/index.js +7 -3
  46. package/dist/cjs/view/FlexibleCard/components/utils.js +1 -0
  47. package/dist/cjs/view/HoverCard/components/views/forbidden/styled.js +16 -6
  48. package/dist/cjs/view/HoverCard/components/views/resolved/styled.js +10 -3
  49. package/dist/cjs/view/HoverCard/components/views/resolving/styled.js +23 -7
  50. package/dist/cjs/view/HoverCard/components/views/unauthorised/styled.js +14 -6
  51. package/dist/cjs/view/HoverCard/styled.js +4 -0
  52. package/dist/cjs/view/InlineCard/IconAndTitleLayout/styled.js +36 -10
  53. package/dist/cjs/view/InlineCard/ResolvingView/styled.js +4 -3
  54. package/dist/cjs/view/InlineCard/styled.js +37 -6
  55. package/dist/cjs/view/LinkUrl/LinkWarningModal/styled.js +4 -4
  56. package/dist/cjs/view/LinkUrl/index.js +1 -1
  57. package/dist/cjs/view/common/Icon.js +12 -4
  58. package/dist/cjs/view/common/ai-icon-loading/index.js +12 -3
  59. package/dist/es2019/constants.js +1 -0
  60. package/dist/es2019/extractors/flexible/actions/extract-copy-link-action.js +15 -0
  61. package/dist/es2019/extractors/flexible/actions/index.js +2 -0
  62. package/dist/es2019/messages.js +10 -0
  63. package/dist/es2019/state/hooks/use-ai-summary/ai-summary-service/types.js +1 -1
  64. package/dist/es2019/utils/analytics/analytics.js +1 -1
  65. package/dist/es2019/view/BlockCard/views/flexible/FlexibleUnauthorisedView.js +5 -5
  66. package/dist/es2019/view/BlockCard/views/styled.js +4 -4
  67. package/dist/es2019/view/Card/types.js +1 -0
  68. package/dist/es2019/view/EmbedCard/views/unresolved-view/styled.js +29 -29
  69. package/dist/es2019/view/EmbedModal/components/embed-content/index.js +4 -4
  70. package/dist/es2019/view/FlexibleCard/components/actions/action/action-button/index.js +23 -26
  71. package/dist/es2019/view/FlexibleCard/components/actions/action/action-stack-item/index.js +3 -1
  72. package/dist/es2019/view/FlexibleCard/components/actions/action/index.js +12 -4
  73. package/dist/es2019/view/FlexibleCard/components/actions/copy-link-action/index.js +53 -0
  74. package/dist/es2019/view/FlexibleCard/components/actions/copy-link-action/types.js +1 -0
  75. package/dist/es2019/view/FlexibleCard/components/actions/index.js +2 -1
  76. package/dist/es2019/view/FlexibleCard/components/blocks/ai-summary-block/ai-motion-wrapper/types.js +1 -0
  77. package/dist/es2019/view/FlexibleCard/components/blocks/ai-summary-block/ai-state-indicator/ai-state-error.js +6 -2
  78. package/dist/es2019/view/FlexibleCard/components/blocks/ai-summary-block/feature-discovery/index.js +44 -0
  79. package/dist/es2019/view/FlexibleCard/components/blocks/ai-summary-block/feature-discovery/styled.js +15 -0
  80. package/dist/es2019/view/FlexibleCard/components/blocks/ai-summary-block/resolved/index.js +15 -1
  81. package/dist/es2019/view/FlexibleCard/components/blocks/block/index.js +3 -1
  82. package/dist/es2019/view/FlexibleCard/components/blocks/element-group/index.js +29 -34
  83. package/dist/es2019/view/FlexibleCard/components/blocks/metadata-block/index.js +3 -4
  84. package/dist/es2019/view/FlexibleCard/components/blocks/preview-block/resolved/index.js +11 -13
  85. package/dist/es2019/view/FlexibleCard/components/blocks/related-urls-block/index.js +3 -3
  86. package/dist/es2019/view/FlexibleCard/components/blocks/related-urls-block/resolved/related-url-list/index.js +3 -3
  87. package/dist/es2019/view/FlexibleCard/components/blocks/title-block/errored/index.js +14 -16
  88. package/dist/es2019/view/FlexibleCard/components/blocks/title-block/resolved/index.js +3 -3
  89. package/dist/es2019/view/FlexibleCard/components/blocks/utils.js +2 -0
  90. package/dist/es2019/view/FlexibleCard/components/common/loading-skeleton/index.js +25 -26
  91. package/dist/es2019/view/FlexibleCard/components/container/index.js +2 -0
  92. package/dist/es2019/view/FlexibleCard/components/container/layered-link/index.js +16 -18
  93. package/dist/es2019/view/FlexibleCard/components/elements/atlaskit-badge/index.js +4 -4
  94. package/dist/es2019/view/FlexibleCard/components/elements/avatar-group/index.js +8 -7
  95. package/dist/es2019/view/FlexibleCard/components/elements/badge/index.js +14 -12
  96. package/dist/es2019/view/FlexibleCard/components/elements/date-time/index.js +5 -6
  97. package/dist/es2019/view/FlexibleCard/components/elements/icon/index.js +20 -23
  98. package/dist/es2019/view/FlexibleCard/components/elements/link/index.js +33 -40
  99. package/dist/es2019/view/FlexibleCard/components/elements/lozenge/index.js +4 -4
  100. package/dist/es2019/view/FlexibleCard/components/elements/lozenge/lozenge-action/styled.js +42 -53
  101. package/dist/es2019/view/FlexibleCard/components/elements/media/index.js +28 -32
  102. package/dist/es2019/view/FlexibleCard/components/elements/text/index.js +6 -7
  103. package/dist/es2019/view/FlexibleCard/components/utils.js +1 -0
  104. package/dist/es2019/view/HoverCard/components/views/forbidden/styled.js +16 -16
  105. package/dist/es2019/view/HoverCard/components/views/resolved/styled.js +9 -7
  106. package/dist/es2019/view/HoverCard/components/views/resolving/styled.js +22 -22
  107. package/dist/es2019/view/HoverCard/components/views/unauthorised/styled.js +13 -13
  108. package/dist/es2019/view/HoverCard/styled.js +4 -0
  109. package/dist/es2019/view/InlineCard/IconAndTitleLayout/styled.js +36 -40
  110. package/dist/es2019/view/InlineCard/ResolvingView/styled.js +4 -4
  111. package/dist/es2019/view/InlineCard/styled.js +34 -35
  112. package/dist/es2019/view/LinkUrl/LinkWarningModal/styled.js +4 -4
  113. package/dist/es2019/view/LinkUrl/index.js +1 -1
  114. package/dist/es2019/view/common/Icon.js +11 -11
  115. package/dist/es2019/view/common/ai-icon-loading/index.js +10 -14
  116. package/dist/esm/constants.js +1 -0
  117. package/dist/esm/extractors/flexible/actions/extract-copy-link-action.js +15 -0
  118. package/dist/esm/extractors/flexible/actions/index.js +2 -1
  119. package/dist/esm/messages.js +10 -0
  120. package/dist/esm/state/hooks/use-ai-summary/ai-summary-service/types.js +1 -1
  121. package/dist/esm/utils/analytics/analytics.js +1 -1
  122. package/dist/esm/view/BlockCard/views/flexible/FlexibleUnauthorisedView.js +5 -3
  123. package/dist/esm/view/BlockCard/views/styled.js +5 -3
  124. package/dist/esm/view/Card/types.js +1 -0
  125. package/dist/esm/view/EmbedCard/views/unresolved-view/styled.js +29 -7
  126. package/dist/esm/view/EmbedModal/components/embed-content/index.js +4 -3
  127. package/dist/esm/view/FlexibleCard/components/actions/action/action-button/index.js +22 -6
  128. package/dist/esm/view/FlexibleCard/components/actions/action/action-stack-item/index.js +3 -1
  129. package/dist/esm/view/FlexibleCard/components/actions/action/index.js +12 -4
  130. package/dist/esm/view/FlexibleCard/components/actions/copy-link-action/index.js +78 -0
  131. package/dist/esm/view/FlexibleCard/components/actions/copy-link-action/types.js +1 -0
  132. package/dist/esm/view/FlexibleCard/components/actions/index.js +2 -1
  133. package/dist/esm/view/FlexibleCard/components/blocks/ai-summary-block/ai-motion-wrapper/types.js +1 -0
  134. package/dist/esm/view/FlexibleCard/components/blocks/ai-summary-block/ai-state-indicator/ai-state-error.js +6 -2
  135. package/dist/esm/view/FlexibleCard/components/blocks/ai-summary-block/feature-discovery/index.js +47 -0
  136. package/dist/esm/view/FlexibleCard/components/blocks/ai-summary-block/feature-discovery/styled.js +15 -0
  137. package/dist/esm/view/FlexibleCard/components/blocks/ai-summary-block/resolved/index.js +15 -1
  138. package/dist/esm/view/FlexibleCard/components/blocks/block/index.js +3 -1
  139. package/dist/esm/view/FlexibleCard/components/blocks/element-group/index.js +34 -7
  140. package/dist/esm/view/FlexibleCard/components/blocks/metadata-block/index.js +3 -3
  141. package/dist/esm/view/FlexibleCard/components/blocks/preview-block/resolved/index.js +13 -3
  142. package/dist/esm/view/FlexibleCard/components/blocks/related-urls-block/index.js +3 -3
  143. package/dist/esm/view/FlexibleCard/components/blocks/related-urls-block/resolved/related-url-list/index.js +3 -3
  144. package/dist/esm/view/FlexibleCard/components/blocks/title-block/errored/index.js +16 -4
  145. package/dist/esm/view/FlexibleCard/components/blocks/title-block/resolved/index.js +3 -3
  146. package/dist/esm/view/FlexibleCard/components/blocks/utils.js +2 -0
  147. package/dist/esm/view/FlexibleCard/components/common/loading-skeleton/index.js +26 -4
  148. package/dist/esm/view/FlexibleCard/components/container/index.js +2 -0
  149. package/dist/esm/view/FlexibleCard/components/container/layered-link/index.js +32 -3
  150. package/dist/esm/view/FlexibleCard/components/elements/atlaskit-badge/index.js +4 -3
  151. package/dist/esm/view/FlexibleCard/components/elements/avatar-group/index.js +11 -3
  152. package/dist/esm/view/FlexibleCard/components/elements/badge/index.js +16 -4
  153. package/dist/esm/view/FlexibleCard/components/elements/date-time/index.js +5 -3
  154. package/dist/esm/view/FlexibleCard/components/elements/icon/index.js +21 -6
  155. package/dist/esm/view/FlexibleCard/components/elements/link/index.js +36 -7
  156. package/dist/esm/view/FlexibleCard/components/elements/lozenge/index.js +4 -3
  157. package/dist/esm/view/FlexibleCard/components/elements/lozenge/lozenge-action/styled.js +46 -5
  158. package/dist/esm/view/FlexibleCard/components/elements/media/index.js +30 -3
  159. package/dist/esm/view/FlexibleCard/components/elements/text/index.js +6 -3
  160. package/dist/esm/view/FlexibleCard/components/utils.js +1 -0
  161. package/dist/esm/view/HoverCard/components/views/forbidden/styled.js +16 -5
  162. package/dist/esm/view/HoverCard/components/views/resolved/styled.js +10 -3
  163. package/dist/esm/view/HoverCard/components/views/resolving/styled.js +23 -6
  164. package/dist/esm/view/HoverCard/components/views/unauthorised/styled.js +14 -5
  165. package/dist/esm/view/HoverCard/styled.js +4 -0
  166. package/dist/esm/view/InlineCard/IconAndTitleLayout/styled.js +36 -10
  167. package/dist/esm/view/InlineCard/ResolvingView/styled.js +4 -3
  168. package/dist/esm/view/InlineCard/styled.js +37 -6
  169. package/dist/esm/view/LinkUrl/LinkWarningModal/styled.js +4 -3
  170. package/dist/esm/view/LinkUrl/index.js +1 -1
  171. package/dist/esm/view/common/Icon.js +11 -4
  172. package/dist/esm/view/common/ai-icon-loading/index.js +11 -3
  173. package/dist/types/constants.d.ts +1 -0
  174. package/dist/types/extractors/flexible/actions/extract-copy-link-action.d.ts +4 -0
  175. package/dist/types/messages.d.ts +1 -1
  176. package/dist/types/state/flexible-ui-context/types.d.ts +4 -0
  177. package/dist/types/state/hooks/use-ai-summary/ai-summary-service/types.d.ts +1 -1
  178. package/dist/types/view/Card/types.d.ts +2 -1
  179. package/dist/types/view/FlexibleCard/components/actions/action/action-button/types.d.ts +2 -0
  180. package/dist/types/view/FlexibleCard/components/actions/action/action-stack-item/types.d.ts +2 -0
  181. package/dist/types/view/FlexibleCard/components/actions/action/types.d.ts +19 -0
  182. package/dist/types/view/FlexibleCard/components/actions/copy-link-action/index.d.ts +4 -0
  183. package/dist/types/view/FlexibleCard/components/actions/copy-link-action/types.d.ts +2 -0
  184. package/dist/types/view/FlexibleCard/components/actions/index.d.ts +1 -0
  185. package/dist/types/view/FlexibleCard/components/blocks/ai-summary-block/ai-motion-wrapper/index.d.ts +2 -2
  186. package/dist/types/view/FlexibleCard/components/blocks/ai-summary-block/ai-motion-wrapper/types.d.ts +3 -2
  187. package/dist/types/view/FlexibleCard/components/blocks/ai-summary-block/feature-discovery/index.d.ts +12 -0
  188. package/dist/types/view/FlexibleCard/components/blocks/ai-summary-block/feature-discovery/styled.d.ts +1 -0
  189. package/dist/types/view/FlexibleCard/components/blocks/ai-summary-block/resolved/index.d.ts +1 -1
  190. package/dist/types/view/FlexibleCard/components/blocks/types.d.ts +3 -1
  191. package/dist/types/view/FlexibleCard/components/elements/avatar-group/index.d.ts +0 -1
  192. package/dist/types-ts4.5/constants.d.ts +1 -0
  193. package/dist/types-ts4.5/extractors/flexible/actions/extract-copy-link-action.d.ts +4 -0
  194. package/dist/types-ts4.5/messages.d.ts +1 -1
  195. package/dist/types-ts4.5/state/flexible-ui-context/types.d.ts +4 -0
  196. package/dist/types-ts4.5/state/hooks/use-ai-summary/ai-summary-service/types.d.ts +2 -1
  197. package/dist/types-ts4.5/view/Card/types.d.ts +2 -1
  198. package/dist/types-ts4.5/view/FlexibleCard/components/actions/action/action-button/types.d.ts +2 -0
  199. package/dist/types-ts4.5/view/FlexibleCard/components/actions/action/action-stack-item/types.d.ts +2 -0
  200. package/dist/types-ts4.5/view/FlexibleCard/components/actions/action/types.d.ts +19 -0
  201. package/dist/types-ts4.5/view/FlexibleCard/components/actions/copy-link-action/index.d.ts +4 -0
  202. package/dist/types-ts4.5/view/FlexibleCard/components/actions/copy-link-action/types.d.ts +2 -0
  203. package/dist/types-ts4.5/view/FlexibleCard/components/actions/index.d.ts +1 -0
  204. package/dist/types-ts4.5/view/FlexibleCard/components/blocks/ai-summary-block/ai-motion-wrapper/index.d.ts +2 -2
  205. package/dist/types-ts4.5/view/FlexibleCard/components/blocks/ai-summary-block/ai-motion-wrapper/types.d.ts +3 -2
  206. package/dist/types-ts4.5/view/FlexibleCard/components/blocks/ai-summary-block/feature-discovery/index.d.ts +12 -0
  207. package/dist/types-ts4.5/view/FlexibleCard/components/blocks/ai-summary-block/feature-discovery/styled.d.ts +1 -0
  208. package/dist/types-ts4.5/view/FlexibleCard/components/blocks/ai-summary-block/resolved/index.d.ts +1 -1
  209. package/dist/types-ts4.5/view/FlexibleCard/components/blocks/types.d.ts +3 -1
  210. package/dist/types-ts4.5/view/FlexibleCard/components/elements/avatar-group/index.d.ts +0 -1
  211. package/package.json +2 -1
@@ -1,5 +1,7 @@
1
- import _taggedTemplateLiteral from "@babel/runtime/helpers/taggedTemplateLiteral";
2
- var _templateObject;
3
1
  import styled from '@emotion/styled';
4
2
  // TODO: Replace overrides with proper AtlasKit solution.
5
- export var LozengeBlockWrapper = styled.span(_templateObject || (_templateObject = _taggedTemplateLiteral(["\n & > span {\n margin-left: ", ";\n }\n"])), "var(--ds-space-050, 4px)");
3
+ export var LozengeBlockWrapper = styled.span({
4
+ '& > span': {
5
+ marginLeft: "var(--ds-space-050, 4px)"
6
+ }
7
+ });
@@ -4,5 +4,6 @@ export var CardAction = /*#__PURE__*/function (CardAction) {
4
4
  CardAction["ViewAction"] = "ViewAction";
5
5
  CardAction["ChangeStatusAction"] = "ChangeStatusAction";
6
6
  CardAction["FollowAction"] = "FollowAction";
7
+ CardAction["CopyLinkAction"] = "CopyLinkAction";
7
8
  return CardAction;
8
9
  }({});
@@ -1,9 +1,31 @@
1
- import _taggedTemplateLiteral from "@babel/runtime/helpers/taggedTemplateLiteral";
2
- var _templateObject, _templateObject2, _templateObject3, _templateObject4, _templateObject5;
3
1
  import { css } from '@emotion/react';
4
2
  import { gs } from '../../../common/utils';
5
- export var containerStyles = css(_templateObject || (_templateObject = _taggedTemplateLiteral(["\n display: grid;\n height: inherit;\n"])));
6
- export var contentStyles = css(_templateObject2 || (_templateObject2 = _taggedTemplateLiteral(["\n display: flex;\n flex-direction: column;\n justify-content: center;\n align-items: center;\n margin: auto;\n padding: ", ";\n gap: ", ";\n max-width: ", ";\n"])), "var(--ds-space-200, 16px)", "var(--ds-space-250, 20px)", gs(50));
7
- export var imageStyles = css(_templateObject3 || (_templateObject3 = _taggedTemplateLiteral(["\n height: 120px;\n width: 180px;\n object-fit: contain;\n object-position: center center;\n"])));
8
- export var titleStyles = css(_templateObject4 || (_templateObject4 = _taggedTemplateLiteral(["\n text-align: center;\n margin: 0;\n padding: 0;\n"])));
9
- export var descriptionStyles = css(_templateObject5 || (_templateObject5 = _taggedTemplateLiteral(["\n font-size: 1em;\n text-align: center;\n"])));
3
+ export var containerStyles = css({
4
+ display: 'grid',
5
+ height: 'inherit'
6
+ });
7
+ export var contentStyles = css({
8
+ display: 'flex',
9
+ flexDirection: 'column',
10
+ justifyContent: 'center',
11
+ alignItems: 'center',
12
+ margin: 'auto',
13
+ padding: "var(--ds-space-200, 16px)",
14
+ gap: "var(--ds-space-250, 20px)",
15
+ maxWidth: gs(50)
16
+ });
17
+ export var imageStyles = css({
18
+ height: '120px',
19
+ width: '180px',
20
+ objectFit: 'contain',
21
+ objectPosition: 'center center'
22
+ });
23
+ export var titleStyles = css({
24
+ textAlign: 'center',
25
+ margin: 0,
26
+ padding: 0
27
+ });
28
+ export var descriptionStyles = css({
29
+ fontSize: '1em',
30
+ textAlign: 'center'
31
+ });
@@ -1,12 +1,13 @@
1
- import _taggedTemplateLiteral from "@babel/runtime/helpers/taggedTemplateLiteral";
2
- var _templateObject;
3
1
  /** @jsx jsx */
4
2
 
5
3
  import { di } from 'react-magnetic-di';
6
4
  import { css, jsx } from '@emotion/react';
7
5
  import { getIframeSandboxAttribute } from '../../../../utils';
8
6
  import { IFrame } from '../../../EmbedCard/components/IFrame';
9
- var iframeCss = css(_templateObject || (_templateObject = _taggedTemplateLiteral(["\n width: 100%;\n height: calc(100vh - 208px);\n"])));
7
+ var iframeCss = css({
8
+ width: '100%',
9
+ height: 'calc(100vh - 208px)'
10
+ });
10
11
  var EmbedContent = function EmbedContent(_ref) {
11
12
  var isTrusted = _ref.isTrusted,
12
13
  name = _ref.name,
@@ -1,5 +1,3 @@
1
- import _taggedTemplateLiteral from "@babel/runtime/helpers/taggedTemplateLiteral";
2
- var _templateObject, _templateObject2;
3
1
  /** @jsx jsx */
4
2
  import React, { useCallback } from 'react';
5
3
  import { css, jsx } from '@emotion/react';
@@ -10,9 +8,23 @@ import { sizeToButtonSpacing } from '../../../utils';
10
8
  var getButtonStyle = function getButtonStyle(size, iconOnly) {
11
9
  switch (size) {
12
10
  case SmartLinkSize.Large:
13
- return iconOnly ? css(_templateObject || (_templateObject = _taggedTemplateLiteral(["\n button,\n button:hover,\n button:focus,\n button:active {\n padding: 0;\n > span {\n margin: 0;\n }\n }\n "]))) : '';
11
+ return iconOnly ? css({
12
+ 'button, button:hover, button:focus, button:active': {
13
+ padding: 0,
14
+ '> span': {
15
+ margin: 0
16
+ }
17
+ }
18
+ }) : '';
14
19
  case SmartLinkSize.Small:
15
- return css(_templateObject2 || (_templateObject2 = _taggedTemplateLiteral(["\n font-size: 0.75rem;\n font-weight: 500;\n line-height: 1rem;\n button,\n button:hover,\n button:focus,\n button:active {\n line-height: 1rem;\n ", "\n }\n "])), iconOnly ? "\n padding: 0.125rem;\n " : "\n padding-left: 0.25rem;\n padding-right: 0.25rem;\n ");
20
+ return css({
21
+ fontSize: '0.75rem',
22
+ fontWeight: 500,
23
+ lineHeight: '1rem',
24
+ 'button, button:hover, button:focus, button:active': [{
25
+ lineHeight: '1rem'
26
+ }, iconOnly ? "\n padding: 0.125rem;\n " : "\n padding-left: 0.25rem;\n padding-right: 0.25rem;\n "]
27
+ });
16
28
  case SmartLinkSize.XLarge:
17
29
  case SmartLinkSize.Medium:
18
30
  default:
@@ -30,7 +42,9 @@ var ActionButton = function ActionButton(_ref) {
30
42
  size = _ref.size,
31
43
  testId = _ref.testId,
32
44
  tooltipMessage = _ref.tooltipMessage,
33
- isDisabled = _ref.isDisabled;
45
+ isDisabled = _ref.isDisabled,
46
+ href = _ref.href,
47
+ ariaLabel = _ref.ariaLabel;
34
48
  var iconOnly = !content;
35
49
  var onButtonClick = useCallback(function (handler) {
36
50
  return function (e) {
@@ -53,7 +67,9 @@ var ActionButton = function ActionButton(_ref) {
53
67
  isLoading: isLoading,
54
68
  onClick: onButtonClick(onClick),
55
69
  spacing: sizeToButtonSpacing[size],
56
- testId: testId
70
+ testId: testId,
71
+ href: href,
72
+ "aria-label": ariaLabel
57
73
  }, content)));
58
74
  };
59
75
  export default ActionButton;
@@ -46,7 +46,8 @@ var ActionStackItem = function ActionStackItem(_ref) {
46
46
  spaceOption = _ref.space,
47
47
  testId = _ref.testId,
48
48
  tooltipMessage = _ref.tooltipMessage,
49
- xcss = _ref.xcss;
49
+ xcss = _ref.xcss,
50
+ tooltipOnHide = _ref.tooltipOnHide;
50
51
  var space = spaceOption !== null && spaceOption !== void 0 ? spaceOption : getPrimitivesInlineSpaceBySize(size);
51
52
  var onClick = useCallback(function () {
52
53
  if (!isDisabled && !isLoading && onClickCallback) {
@@ -64,6 +65,7 @@ var ActionStackItem = function ActionStackItem(_ref) {
64
65
  // Replace Box with Pressable once it becomes stable (currently beta)
65
66
  return /*#__PURE__*/React.createElement(Tooltip, {
66
67
  content: tooltipMessage || content,
68
+ onHide: tooltipOnHide,
67
69
  hideTooltipOnMouseDown: true
68
70
  }, function (tooltipProps) {
69
71
  return /*#__PURE__*/React.createElement(Box, _extends({
@@ -29,10 +29,14 @@ var Action = function Action(_ref) {
29
29
  iconPosition = _ref$iconPosition === void 0 ? 'before' : _ref$iconPosition,
30
30
  spaceInline = _ref.spaceInline,
31
31
  tooltipMessage = _ref.tooltipMessage,
32
+ tooltipOnHide = _ref.tooltipOnHide,
32
33
  xcss = _ref.xcss,
33
34
  asDropDownItem = _ref.asDropDownItem,
34
35
  overrideCss = _ref.overrideCss,
35
- isDisabled = _ref.isDisabled;
36
+ isDisabled = _ref.isDisabled,
37
+ href = _ref.href,
38
+ ariaLabel = _ref.ariaLabel,
39
+ Wrapper = _ref.wrapper;
36
40
  if (!onClick) {
37
41
  return null;
38
42
  }
@@ -58,7 +62,8 @@ var Action = function Action(_ref) {
58
62
  size: size,
59
63
  testId: testId,
60
64
  tooltipMessage: tooltipMessage || content,
61
- xcss: xcss
65
+ xcss: xcss,
66
+ tooltipOnHide: tooltipOnHide
62
67
  });
63
68
  }
64
69
  if (isDropdownItem) {
@@ -71,7 +76,7 @@ var Action = function Action(_ref) {
71
76
  testId: testId
72
77
  });
73
78
  }
74
- return jsx(ActionButton, {
79
+ var button = jsx(ActionButton, {
75
80
  appearance: appearance,
76
81
  content: content,
77
82
  iconAfter: iconAfter,
@@ -82,7 +87,10 @@ var Action = function Action(_ref) {
82
87
  size: size,
83
88
  testId: testId,
84
89
  tooltipMessage: tooltipMessage || content,
85
- isDisabled: isDisabled
90
+ isDisabled: isDisabled,
91
+ href: href,
92
+ ariaLabel: ariaLabel
86
93
  });
94
+ return Wrapper !== undefined ? jsx(Wrapper, null, button) : button;
87
95
  };
88
96
  export default Action;
@@ -0,0 +1,78 @@
1
+ import _extends from "@babel/runtime/helpers/extends";
2
+ import _asyncToGenerator from "@babel/runtime/helpers/asyncToGenerator";
3
+ import _slicedToArray from "@babel/runtime/helpers/slicedToArray";
4
+ import _objectWithoutProperties from "@babel/runtime/helpers/objectWithoutProperties";
5
+ var _excluded = ["onClick"];
6
+ import _regeneratorRuntime from "@babel/runtime/regenerator";
7
+ import React, { useCallback, useState } from 'react';
8
+ import Action from '../action';
9
+ import { messages } from '../../../../../messages';
10
+ import { FormattedMessage } from 'react-intl-next';
11
+ import LinkIcon from '@atlaskit/icon/glyph/link';
12
+ import { useFlexibleUiAnalyticsContext, useFlexibleUiContext } from '../../../../../state/flexible-ui-context';
13
+ import { ActionName } from '../../../../../constants';
14
+ import useInvokeClientAction from '../../../../../state/hooks/use-invoke-client-action';
15
+ var CopyLinkAction = function CopyLinkAction(_ref) {
16
+ var _context$actions;
17
+ var onClickCallback = _ref.onClick,
18
+ props = _objectWithoutProperties(_ref, _excluded);
19
+ var context = useFlexibleUiContext();
20
+ var analytics = useFlexibleUiAnalyticsContext();
21
+ var invoke = useInvokeClientAction({
22
+ analytics: analytics
23
+ });
24
+ var data = context === null || context === void 0 || (_context$actions = context.actions) === null || _context$actions === void 0 ? void 0 : _context$actions[ActionName.CopyLinkAction];
25
+ var _useState = useState(messages.copy_url_to_clipboard),
26
+ _useState2 = _slicedToArray(_useState, 2),
27
+ tooltipMessage = _useState2[0],
28
+ setTooltipMessage = _useState2[1];
29
+ var onClick = useCallback(function () {
30
+ if (data && data.url) {
31
+ invoke({
32
+ actionType: ActionName.CopyLinkAction,
33
+ actionFn: function () {
34
+ var _actionFn = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function _callee() {
35
+ var _data$url;
36
+ return _regeneratorRuntime.wrap(function _callee$(_context) {
37
+ while (1) switch (_context.prev = _context.next) {
38
+ case 0:
39
+ _context.next = 2;
40
+ return navigator.clipboard.writeText((_data$url = data.url) !== null && _data$url !== void 0 ? _data$url : '');
41
+ case 2:
42
+ setTooltipMessage(messages.copied_url_to_clipboard);
43
+ case 3:
44
+ case "end":
45
+ return _context.stop();
46
+ }
47
+ }, _callee);
48
+ }));
49
+ function actionFn() {
50
+ return _actionFn.apply(this, arguments);
51
+ }
52
+ return actionFn;
53
+ }(),
54
+ // These values have already been set in analytics context.
55
+ // We only pass these here for ufo experience.
56
+ display: analytics === null || analytics === void 0 ? void 0 : analytics.display,
57
+ extensionKey: analytics === null || analytics === void 0 ? void 0 : analytics.extensionKey
58
+ });
59
+ }
60
+ if (onClickCallback) {
61
+ onClickCallback();
62
+ }
63
+ }, [analytics, data, invoke, onClickCallback]);
64
+ return data ? /*#__PURE__*/React.createElement(Action, _extends({
65
+ content: /*#__PURE__*/React.createElement(FormattedMessage, messages.copy_url_to_clipboard),
66
+ icon: /*#__PURE__*/React.createElement(LinkIcon, {
67
+ label: "copy url",
68
+ size: "medium"
69
+ }),
70
+ onClick: onClick,
71
+ testId: "smart-action-copy-link-action",
72
+ tooltipMessage: /*#__PURE__*/React.createElement(FormattedMessage, tooltipMessage),
73
+ tooltipOnHide: function tooltipOnHide() {
74
+ return setTooltipMessage(messages.copy_url_to_clipboard);
75
+ }
76
+ }, data, props)) : null;
77
+ };
78
+ export default CopyLinkAction;
@@ -3,4 +3,5 @@ export { default as DeleteAction } from './delete-action';
3
3
  export { default as EditAction } from './edit-action';
4
4
  export { default as DownloadAction } from './download-action';
5
5
  export { default as FollowAction } from './follow-action';
6
- export { default as PreviewAction } from './preview-action';
6
+ export { default as PreviewAction } from './preview-action';
7
+ export { default as CopyLinkAction } from './copy-link-action';
@@ -14,7 +14,7 @@ var contentStyles = xcss({
14
14
  fontWeight: '400',
15
15
  lineHeight: '14px'
16
16
  });
17
- var MessageWithAnchor = function MessageWithAnchor(_ref) {
17
+ var FormattedErrorMessage = function FormattedErrorMessage(_ref) {
18
18
  var message = _ref.message,
19
19
  url = _ref.url;
20
20
  return /*#__PURE__*/React.createElement(FormattedMessage, _extends({}, message, {
@@ -34,6 +34,10 @@ var getErrorMesssageProps = function getErrorMesssageProps(error) {
34
34
  message: messages.ai_summary_error_acceptable_use_violation,
35
35
  url: CONTENT_URL_ACCEPTABLE_USE_POLICY
36
36
  };
37
+ case 'HIPAA_CONTENT_DETECTED':
38
+ return {
39
+ message: messages.ai_summary_error_hipaa_content_detected
40
+ };
37
41
  default:
38
42
  return {
39
43
  message: messages.ai_summary_error_generic,
@@ -62,7 +66,7 @@ var AIStateError = function AIStateError(_ref2) {
62
66
  content: /*#__PURE__*/React.createElement(Box, {
63
67
  testId: "".concat(testId, "-error-message"),
64
68
  xcss: contentStyles
65
- }, /*#__PURE__*/React.createElement(MessageWithAnchor, {
69
+ }, /*#__PURE__*/React.createElement(FormattedErrorMessage, {
66
70
  message: message,
67
71
  url: url
68
72
  })),
@@ -0,0 +1,47 @@
1
+ /** @jsx jsx */
2
+ import { jsx } from '@emotion/react';
3
+ import { useEffect, useMemo, useRef } from 'react';
4
+ import { StorageClient } from '@atlaskit/frontend-utilities/storage-client';
5
+ import { getPulseStyles } from './styled';
6
+ var LOCAL_STORAGE_CLIENT_KEY = '@atlaskit/smart-card';
7
+ var LOCAL_STORAGE_DISCOVERY_KEY = 'action-discovery-ai-summarise';
8
+ var LOCAL_STORAGE_DISCOVERY_VALUE = 'discovered';
9
+ var LOCAL_STORAGE_DISCOVERY_EXPIRY_IN_MS = 15552000000; // 180 days
10
+ var LOCAL_STORAGE_DISCOVERY_REQUIRED_TIME = 2000;
11
+ /**
12
+ * This is a hacky solution to help with the feature discovery.
13
+ * This implementation must be removed once the experiment is completed.
14
+ * Cleanup on https://product-fabric.atlassian.net/browse/EDM-9649
15
+ */
16
+ var FeatureDiscovery = function FeatureDiscovery(_ref) {
17
+ var children = _ref.children,
18
+ testId = _ref.testId;
19
+ var renderedTime = useRef();
20
+ var storageClient = useMemo(function () {
21
+ return new StorageClient(LOCAL_STORAGE_CLIENT_KEY);
22
+ }, []);
23
+ var discovered = useMemo(function () {
24
+ return storageClient.getItem(LOCAL_STORAGE_DISCOVERY_KEY) === LOCAL_STORAGE_DISCOVERY_VALUE;
25
+ }, [storageClient]);
26
+ useEffect(function () {
27
+ renderedTime.current = Date.now();
28
+ return function () {
29
+ if (!discovered && renderedTime.current) {
30
+ var duration = Date.now() - renderedTime.current;
31
+ if (duration > LOCAL_STORAGE_DISCOVERY_REQUIRED_TIME) {
32
+ storageClient.setItemWithExpiry(LOCAL_STORAGE_DISCOVERY_KEY, LOCAL_STORAGE_DISCOVERY_VALUE, LOCAL_STORAGE_DISCOVERY_EXPIRY_IN_MS);
33
+ }
34
+ }
35
+ };
36
+ }, [storageClient, discovered]);
37
+ var component = useMemo(function () {
38
+ if (!discovered) {
39
+ return jsx("span", {
40
+ css: getPulseStyles(),
41
+ "data-testid": "".concat(testId, "-discovery")
42
+ }, children);
43
+ }
44
+ }, [children, discovered, testId]);
45
+ return component !== null && component !== void 0 ? component : children;
46
+ };
47
+ export default FeatureDiscovery;
@@ -0,0 +1,15 @@
1
+ import { css, keyframes } from '@emotion/react';
2
+ export var getPulseStyles = function getPulseStyles() {
3
+ var color = "var(--ds-border-discovery, #8270DB)";
4
+ var pulseKeyframes = keyframes({
5
+ to: {
6
+ boxShadow: '0 0 0 7px rgba(0, 0, 0, 0)'
7
+ }
8
+ });
9
+ return css({
10
+ display: 'inline-flex',
11
+ borderRadius: '3px',
12
+ boxShadow: "0 0 0 0 ".concat(color),
13
+ animation: "".concat(pulseKeyframes, " 2s cubic-bezier(0.5, 0, 0, 1) 0.25s both 2")
14
+ });
15
+ };
@@ -20,6 +20,8 @@ import { useAnalyticsEvents } from '../../../../../../common/analytics/generated
20
20
  import AIEventSummaryViewed from '../ai-event-summary-viewed';
21
21
  import AIEventErrorViewed from '../ai-event-error-viewed';
22
22
  import { di } from 'react-magnetic-di';
23
+ import { css } from '@emotion/react';
24
+ import FeatureDiscovery from '../feature-discovery';
23
25
  export var AISummaryBlockErrorIndicator = function AISummaryBlockErrorIndicator(_ref) {
24
26
  var showErrorIndicator = _ref.showErrorIndicator,
25
27
  error = _ref.error,
@@ -107,7 +109,12 @@ var AISummaryBlockResolvedView = function AISummaryBlockResolvedView(props) {
107
109
  testId: "".concat(testId, "-ai-summary-action"),
108
110
  icon: /*#__PURE__*/React.createElement(AIIcon, {
109
111
  label: "AIIcon"
110
- })
112
+ }),
113
+ /**
114
+ * Enabling feature discovery pulse
115
+ * Cleanup: https://product-fabric.atlassian.net/browse/EDM-9693
116
+ */
117
+ wrapper: FeatureDiscovery
111
118
  };
112
119
  return [aiAction].concat(_toConsumableArray(actions));
113
120
  }
@@ -123,6 +130,13 @@ var AISummaryBlockResolvedView = function AISummaryBlockResolvedView(props) {
123
130
  return /*#__PURE__*/React.createElement(Block, _extends({}, props, {
124
131
  direction: SmartLinkDirection.Vertical,
125
132
  testId: "".concat(testId, "-resolved-view")
133
+ /**
134
+ * Enabled for feature discovery to allow box shadow to overflow
135
+ * Cleanup: https://product-fabric.atlassian.net/browse/EDM-8681
136
+ */,
137
+ overrideCss: css({
138
+ overflow: 'visible'
139
+ }, props.overrideCss)
126
140
  }), status === 'done' && /*#__PURE__*/React.createElement(AIEventSummaryViewed, {
127
141
  fromCache: isSummarisedOnMountRef.current
128
142
  }), /*#__PURE__*/React.createElement(AIMotionWrapper, {
@@ -5,7 +5,9 @@ import { useEffect } from 'react';
5
5
  import { css, jsx } from '@emotion/react';
6
6
  import { ElementName, SmartLinkDirection, SmartLinkSize } from '../../../../../constants';
7
7
  import { getBaseStyles, getGapSize, highlightRemoveStyles, renderChildren } from '../utils';
8
- var getBlockStyles = function getBlockStyles(direction, size) {
8
+ var getBlockStyles = function getBlockStyles(direction, size
9
+ // eslint-disable-next-line @atlaskit/design-system/no-css-tagged-template-expression -- needs manual remediation
10
+ ) {
9
11
  return css(_templateObject || (_templateObject = _taggedTemplateLiteral(["\n ", "\n ", "\n justify-content: flex-start;\n [data-separator] + [data-separator]:before {\n content: '\u2022';\n margin-right: ", "rem;\n }\n // Pull request elements: source branch \u2192 target branch\n [data-smart-element='", "']\n + [data-smart-element='", "']:before {\n content: '\u2192';\n }\n // Pull request elements: target branch \u2190 source branch\n [data-smart-element='", "']\n + [data-smart-element='", "']:before {\n content: '\u2190';\n }\n"])), getBaseStyles(direction, size), highlightRemoveStyles, getGapSize(size), ElementName.SourceBranch, ElementName.TargetBranch, ElementName.TargetBranch, ElementName.SourceBranch);
10
12
  };
11
13
 
@@ -1,5 +1,5 @@
1
1
  import _taggedTemplateLiteral from "@babel/runtime/helpers/taggedTemplateLiteral";
2
- var _templateObject, _templateObject2, _templateObject3, _templateObject4, _templateObject5, _templateObject6;
2
+ var _templateObject;
3
3
  /** @jsx jsx */
4
4
  import { css, jsx } from '@emotion/react';
5
5
  import { SmartLinkAlignment, SmartLinkDirection, SmartLinkPosition, SmartLinkSize, SmartLinkWidth } from '../../../../../constants';
@@ -8,25 +8,52 @@ import { getMaxLineHeight, getTruncateStyles } from '../../utils';
8
8
  var getAlignmentStyles = function getAlignmentStyles(align) {
9
9
  switch (align) {
10
10
  case SmartLinkAlignment.Right:
11
- return css(_templateObject || (_templateObject = _taggedTemplateLiteral(["\n -webkit-box-align: end;\n -ms-flex-align: end;\n justify-content: flex-end;\n text-align: right;\n "])));
11
+ return css({
12
+ WebkitBoxAlign: 'end',
13
+ MsFlexAlign: 'end',
14
+ justifyContent: 'flex-end',
15
+ textAlign: 'right'
16
+ });
12
17
  case SmartLinkAlignment.Left:
13
18
  default:
14
- return css(_templateObject2 || (_templateObject2 = _taggedTemplateLiteral(["\n -webkit-box-align: start;\n -ms-flex-align: start;\n justify-content: flex-start;\n text-align: left;\n "])));
19
+ return css({
20
+ WebkitBoxAlign: 'start',
21
+ MsFlexAlign: 'start',
22
+ justifyContent: 'flex-start',
23
+ textAlign: 'left'
24
+ });
15
25
  }
16
26
  };
17
27
  var getGapStyles = function getGapStyles(size, align) {
18
28
  var gap = getGapSize(size);
19
29
  if (align === SmartLinkAlignment.Right) {
20
- return css(_templateObject3 || (_templateObject3 = _taggedTemplateLiteral(["\n > span {\n margin-left: ", "rem;\n }\n\n > span:first-child {\n margin-left: initial;\n }\n "])), gap);
30
+ return css({
31
+ '> span': {
32
+ marginLeft: "".concat(gap, "rem")
33
+ },
34
+ '> span:first-child': {
35
+ marginLeft: 'initial'
36
+ }
37
+ });
21
38
  }
22
- return css(_templateObject4 || (_templateObject4 = _taggedTemplateLiteral(["\n > span {\n margin-right: ", "rem;\n &:last-child {\n margin-right: initial;\n }\n }\n "])), gap);
39
+ return css({
40
+ '> span': {
41
+ marginRight: "".concat(gap, "rem"),
42
+ '&:last-child': {
43
+ marginRight: 'initial'
44
+ }
45
+ }
46
+ });
23
47
  };
24
48
  var getHorizontalDirectionStyles = function getHorizontalDirectionStyles(size, align) {
25
49
  var lineHeight = getMaxLineHeight(size);
26
- return css(_templateObject5 || (_templateObject5 = _taggedTemplateLiteral(["\n display: block;\n vertical-align: middle;\n ", "\n\n > span, > div {\n vertical-align: middle;\n\n &[data-smart-element-date-time],\n &[data-smart-element-text] {\n // Show all/wrapped/truncated\n display: inline;\n }\n }\n\n ", "\n "])), getTruncateStyles(1, lineHeight + 'rem'), getGapStyles(size, align));
50
+ // eslint-disable-next-line @atlaskit/design-system/no-css-tagged-template-expression -- needs manual remediation
51
+ return css(_templateObject || (_templateObject = _taggedTemplateLiteral(["\n display: block;\n vertical-align: middle;\n ", "\n\n > span, > div {\n vertical-align: middle;\n\n &[data-smart-element-date-time],\n &[data-smart-element-text] {\n // Show all/wrapped/truncated\n display: inline;\n }\n }\n\n ", "\n "])), getTruncateStyles(1, lineHeight + 'rem'), getGapStyles(size, align));
27
52
  };
28
53
  export var getElementGroupStyles = function getElementGroupStyles(direction, size, align, width, position) {
29
- return css(_templateObject6 || (_templateObject6 = _taggedTemplateLiteral(["\n ", "\n ", "\n min-width: 10%;\n ", "\n ", "\n ", "\n"])), getBaseStyles(direction, size), getAlignmentStyles(align), width === SmartLinkWidth.Flexible ? "flex: 1 3;" : '', direction === SmartLinkDirection.Horizontal ? getHorizontalDirectionStyles(size, align) : '', position === SmartLinkPosition.Top ? 'align-self: flex-start;' : '');
54
+ return css(getBaseStyles(direction, size), getAlignmentStyles(align), {
55
+ minWidth: '10%'
56
+ }, width === SmartLinkWidth.Flexible ? "flex: 1 3;" : '', direction === SmartLinkDirection.Horizontal ? getHorizontalDirectionStyles(size, align) : '', position === SmartLinkPosition.Top ? 'align-self: flex-start;' : '');
30
57
  };
31
58
 
32
59
  /**
@@ -1,8 +1,6 @@
1
1
  import _extends from "@babel/runtime/helpers/extends";
2
2
  import _objectWithoutProperties from "@babel/runtime/helpers/objectWithoutProperties";
3
- import _taggedTemplateLiteral from "@babel/runtime/helpers/taggedTemplateLiteral";
4
3
  var _excluded = ["maxLines", "status", "testId", "primary", "secondary"];
5
- var _templateObject;
6
4
  import React from 'react';
7
5
  import { css } from '@emotion/react';
8
6
  import { SmartLinkAlignment, SmartLinkDirection, SmartLinkSize, SmartLinkStatus, SmartLinkWidth } from '../../../../../constants';
@@ -19,7 +17,9 @@ var getElementGroupStyles = function getElementGroupStyles(size, maxLines) {
19
17
  // We need the height of the line to be equal on both left and right
20
18
  // sides so they line up nicely.
21
19
  var lineHeight = getMaxLineHeight(size);
22
- return css(_templateObject || (_templateObject = _taggedTemplateLiteral(["\n line-height: ", "rem;\n ", "\n "])), lineHeight, getTruncateStyles(maxLines, lineHeight + 'rem'));
20
+ return css({
21
+ lineHeight: "".concat(lineHeight, "rem")
22
+ }, getTruncateStyles(maxLines, lineHeight + 'rem'));
23
23
  };
24
24
  var getMaxLines = function getMaxLines(maxLines) {
25
25
  if (maxLines > MAXIMUM_MAX_LINES) {
@@ -3,7 +3,7 @@ import _slicedToArray from "@babel/runtime/helpers/slicedToArray";
3
3
  import _objectWithoutProperties from "@babel/runtime/helpers/objectWithoutProperties";
4
4
  import _taggedTemplateLiteral from "@babel/runtime/helpers/taggedTemplateLiteral";
5
5
  var _excluded = ["ignoreContainerPadding", "onError", "overrideCss", "placement", "testId", "overrideUrl"];
6
- var _templateObject, _templateObject2, _templateObject3;
6
+ var _templateObject;
7
7
  /** @jsx jsx */
8
8
  import React, { useCallback, useEffect, useState } from 'react';
9
9
  import { css, jsx } from '@emotion/react';
@@ -29,10 +29,20 @@ import { Preview } from '../../../elements';
29
29
  var getPreviewBlockStyles = function getPreviewBlockStyles(placement, ignoreContainerPadding) {
30
30
  if (placement === MediaPlacement.Left || placement === MediaPlacement.Right) {
31
31
  var containerPadding = ignoreContainerPadding ? '0rem' : 'var(--container-padding)';
32
+ // eslint-disable-next-line @atlaskit/design-system/no-css-tagged-template-expression -- needs manual remediation
32
33
  return css(_templateObject || (_templateObject = _taggedTemplateLiteral(["\n position: absolute;\n top: ", ";\n bottom: ", ";\n width: calc(var(--preview-block-width) - ", ");\n\n ", "\n ", "\n\n [data-smart-element-media='image'] {\n aspect-ratio: unset;\n padding-top: unset;\n width: 100%;\n height: 100%;\n object-fit: cover;\n }\n "])), containerPadding, containerPadding, containerPadding, placement === MediaPlacement.Left ? "left: ".concat(containerPadding, ";") : '', placement === MediaPlacement.Right ? "right: ".concat(containerPadding, ";") : '');
33
34
  }
34
35
  if (ignoreContainerPadding) {
35
- return css(_templateObject2 || (_templateObject2 = _taggedTemplateLiteral(["\n margin-left: calc(var(--container-gap-left) * -1);\n margin-right: calc(var(--container-gap-right) * -1);\n &:first-of-type {\n margin-top: calc(var(--container-padding) * -1);\n }\n &:last-of-type {\n margin-bottom: calc(var(--container-padding) * -1);\n }\n "])));
36
+ return css({
37
+ marginLeft: 'calc(var(--container-gap-left) * -1)',
38
+ marginRight: 'calc(var(--container-gap-right) * -1)',
39
+ '&:first-of-type': {
40
+ marginTop: 'calc(var(--container-padding) * -1)'
41
+ },
42
+ '&:last-of-type': {
43
+ marginBottom: 'calc(var(--container-padding) * -1)'
44
+ }
45
+ });
36
46
  }
37
47
  };
38
48
 
@@ -56,7 +66,7 @@ var PreviewBlockResolvedView = function PreviewBlockResolvedView(_ref) {
56
66
  styles = _useState2[0],
57
67
  setStyles = _useState2[1];
58
68
  var updateStyles = useCallback(function () {
59
- setStyles(css(_templateObject3 || (_templateObject3 = _taggedTemplateLiteral(["\n ", "\n ", "\n "])), getPreviewBlockStyles(placement, ignoreContainerPadding), overrideCss));
69
+ setStyles(css(getPreviewBlockStyles(placement, ignoreContainerPadding), overrideCss));
60
70
  }, [ignoreContainerPadding, overrideCss, placement]);
61
71
  useEffect(function () {
62
72
  updateStyles();
@@ -1,9 +1,7 @@
1
- import _taggedTemplateLiteral from "@babel/runtime/helpers/taggedTemplateLiteral";
2
1
  import _extends from "@babel/runtime/helpers/extends";
3
2
  import _asyncToGenerator from "@babel/runtime/helpers/asyncToGenerator";
4
3
  import _slicedToArray from "@babel/runtime/helpers/slicedToArray";
5
4
  import _objectWithoutProperties from "@babel/runtime/helpers/objectWithoutProperties";
6
- var _templateObject;
7
5
  var _excluded = ["testId", "url", "renderers"];
8
6
  import _regeneratorRuntime from "@babel/runtime/regenerator";
9
7
  import React, { useEffect, useState } from 'react';
@@ -87,7 +85,9 @@ var RelatedUrlsBlock = function RelatedUrlsBlock(_ref) {
87
85
  if (relatedUrls) {
88
86
  return /*#__PURE__*/React.createElement(RelatedUrlsResolvedView, _extends({
89
87
  renderers: renderers,
90
- overrideCss: css(_templateObject || (_templateObject = _taggedTemplateLiteral(["\n min-height: 1.55rem;\n "]))),
88
+ overrideCss: css({
89
+ minHeight: '1.55rem'
90
+ }),
91
91
  testId: "".concat(testId, "-resolved-view"),
92
92
  relatedUrlsResponse: relatedUrls
93
93
  }, blockProps));
@@ -1,6 +1,4 @@
1
- import _taggedTemplateLiteral from "@babel/runtime/helpers/taggedTemplateLiteral";
2
1
  import _slicedToArray from "@babel/runtime/helpers/slicedToArray";
3
- var _templateObject;
4
2
  import React, { useCallback, useState } from 'react';
5
3
  import { useIntl } from 'react-intl-next';
6
4
  import ChevronDownIcon from '@atlaskit/icon/glyph/chevron-down';
@@ -42,7 +40,9 @@ var RelatedUrlList = function RelatedUrlList(_ref) {
42
40
  alignBlock: "center",
43
41
  spread: "space-between"
44
42
  }, /*#__PURE__*/React.createElement(Text, {
45
- overrideCss: css(_templateObject || (_templateObject = _taggedTemplateLiteral(["\n font-weight: ", ";\n "])), "var(--ds-font-weight-medium, 500)"),
43
+ overrideCss: css({
44
+ fontWeight: "var(--ds-font-weight-medium, 500)"
45
+ }),
46
46
  message: {
47
47
  descriptor: title
48
48
  }
@@ -1,8 +1,6 @@
1
1
  import _extends from "@babel/runtime/helpers/extends";
2
2
  import _objectWithoutProperties from "@babel/runtime/helpers/objectWithoutProperties";
3
- import _taggedTemplateLiteral from "@babel/runtime/helpers/taggedTemplateLiteral";
4
3
  var _excluded = ["actionGroup", "retry", "position", "testId", "title", "hideIcon"];
5
- var _templateObject, _templateObject2;
6
4
  /** @jsx jsx */
7
5
  import React from 'react';
8
6
  import { FormattedMessage } from 'react-intl-next';
@@ -12,10 +10,24 @@ import Block from '../../block';
12
10
  import { SmartLinkAlignment, SmartLinkDirection, SmartLinkSize } from '../../../../../../constants';
13
11
  import { getLinkLineHeight, getLinkSizeStyles, getTruncateStyles } from '../../../utils';
14
12
  import ElementGroup from '../../element-group';
15
- var actionStyles = css(_templateObject || (_templateObject = _taggedTemplateLiteral(["\n cursor: pointer;\n :hover {\n color: ", ";\n text-decoration: underline;\n }\n"])), "var(--ds-text-subtle, #8993A4)");
13
+ var actionStyles = css({
14
+ cursor: 'pointer',
15
+ ':hover': {
16
+ color: "var(--ds-text-subtle, #8993A4)",
17
+ textDecoration: 'underline'
18
+ }
19
+ });
16
20
  var getMessageStyles = function getMessageStyles(size, hasAction) {
17
21
  var sizeStyles = getLinkSizeStyles(size);
18
- return css(_templateObject2 || (_templateObject2 = _taggedTemplateLiteral(["\n flex: 1 1 auto;\n justify-content: flex-end;\n ", "\n ", "\n ", "\n color: ", ";\n :focus {\n outline: ", " solid 2px;\n }\n "])), hasAction ? actionStyles : '', sizeStyles, getTruncateStyles(1, getLinkLineHeight(size)), "var(--ds-text-disabled, #6B778C)", "var(--ds-border-focused, #388BFF)");
22
+ return css({
23
+ flex: '1 1 auto',
24
+ justifyContent: 'flex-end'
25
+ }, hasAction ? actionStyles : '', sizeStyles, getTruncateStyles(1, getLinkLineHeight(size)), {
26
+ color: "var(--ds-text-disabled, #6B778C)",
27
+ ':focus': {
28
+ outline: "var(--ds-border-focused, #388BFF)".concat(" solid 2px")
29
+ }
30
+ });
19
31
  };
20
32
 
21
33
  /**