@atlaskit/smart-card 26.55.1 → 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 (223) hide show
  1. package/CHANGELOG.md +20 -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/index.js +3 -2
  7. package/dist/cjs/state/hooks/use-ai-summary/ai-summary-service/types.js +1 -1
  8. package/dist/cjs/utils/analytics/analytics.js +1 -1
  9. package/dist/cjs/view/BlockCard/views/flexible/FlexibleUnauthorisedView.js +5 -3
  10. package/dist/cjs/view/BlockCard/views/styled.js +5 -3
  11. package/dist/cjs/view/Card/types.js +1 -0
  12. package/dist/cjs/view/EmbedCard/views/unresolved-view/styled.js +29 -8
  13. package/dist/cjs/view/EmbedModal/components/embed-content/index.js +5 -4
  14. package/dist/cjs/view/FlexibleCard/components/actions/action/action-button/index.js +24 -7
  15. package/dist/cjs/view/FlexibleCard/components/actions/action/action-stack-item/index.js +3 -1
  16. package/dist/cjs/view/FlexibleCard/components/actions/action/index.js +12 -4
  17. package/dist/cjs/view/FlexibleCard/components/actions/copy-link-action/index.js +88 -0
  18. package/dist/cjs/view/FlexibleCard/components/actions/copy-link-action/types.js +5 -0
  19. package/dist/cjs/view/FlexibleCard/components/actions/index.js +8 -1
  20. package/dist/cjs/view/FlexibleCard/components/blocks/ai-summary-block/ai-motion-wrapper/index.js +55 -0
  21. package/dist/cjs/view/FlexibleCard/components/blocks/ai-summary-block/ai-motion-wrapper/types.js +5 -0
  22. package/dist/cjs/view/FlexibleCard/components/blocks/ai-summary-block/ai-state-indicator/ai-state-error.js +6 -2
  23. package/dist/cjs/view/FlexibleCard/components/blocks/ai-summary-block/feature-discovery/index.js +54 -0
  24. package/dist/cjs/view/FlexibleCard/components/blocks/ai-summary-block/feature-discovery/styled.js +21 -0
  25. package/dist/cjs/view/FlexibleCard/components/blocks/ai-summary-block/resolved/index.js +37 -9
  26. package/dist/cjs/view/FlexibleCard/components/blocks/block/index.js +3 -1
  27. package/dist/cjs/view/FlexibleCard/components/blocks/element-group/index.js +34 -7
  28. package/dist/cjs/view/FlexibleCard/components/blocks/metadata-block/index.js +3 -3
  29. package/dist/cjs/view/FlexibleCard/components/blocks/preview-block/resolved/index.js +13 -3
  30. package/dist/cjs/view/FlexibleCard/components/blocks/related-urls-block/index.js +3 -3
  31. package/dist/cjs/view/FlexibleCard/components/blocks/related-urls-block/resolved/related-url-list/index.js +3 -3
  32. package/dist/cjs/view/FlexibleCard/components/blocks/title-block/errored/index.js +16 -4
  33. package/dist/cjs/view/FlexibleCard/components/blocks/title-block/resolved/index.js +3 -3
  34. package/dist/cjs/view/FlexibleCard/components/blocks/utils.js +2 -0
  35. package/dist/cjs/view/FlexibleCard/components/common/loading-skeleton/index.js +27 -4
  36. package/dist/cjs/view/FlexibleCard/components/container/index.js +2 -0
  37. package/dist/cjs/view/FlexibleCard/components/container/layered-link/index.js +33 -3
  38. package/dist/cjs/view/FlexibleCard/components/elements/atlaskit-badge/index.js +5 -3
  39. package/dist/cjs/view/FlexibleCard/components/elements/avatar-group/index.js +10 -3
  40. package/dist/cjs/view/FlexibleCard/components/elements/badge/index.js +16 -4
  41. package/dist/cjs/view/FlexibleCard/components/elements/date-time/index.js +6 -3
  42. package/dist/cjs/view/FlexibleCard/components/elements/icon/index.js +23 -7
  43. package/dist/cjs/view/FlexibleCard/components/elements/link/index.js +38 -8
  44. package/dist/cjs/view/FlexibleCard/components/elements/lozenge/index.js +5 -3
  45. package/dist/cjs/view/FlexibleCard/components/elements/lozenge/lozenge-action/styled.js +46 -6
  46. package/dist/cjs/view/FlexibleCard/components/elements/media/index.js +31 -3
  47. package/dist/cjs/view/FlexibleCard/components/elements/text/index.js +7 -3
  48. package/dist/cjs/view/FlexibleCard/components/utils.js +1 -0
  49. package/dist/cjs/view/HoverCard/components/ContentContainer.js +5 -1
  50. package/dist/cjs/view/HoverCard/components/views/forbidden/styled.js +16 -6
  51. package/dist/cjs/view/HoverCard/components/views/resolved/index.js +12 -10
  52. package/dist/cjs/view/HoverCard/components/views/resolved/styled.js +10 -3
  53. package/dist/cjs/view/HoverCard/components/views/resolving/styled.js +23 -7
  54. package/dist/cjs/view/HoverCard/components/views/unauthorised/styled.js +14 -6
  55. package/dist/cjs/view/HoverCard/styled.js +4 -0
  56. package/dist/cjs/view/InlineCard/IconAndTitleLayout/styled.js +36 -10
  57. package/dist/cjs/view/InlineCard/ResolvingView/styled.js +4 -3
  58. package/dist/cjs/view/InlineCard/styled.js +37 -6
  59. package/dist/cjs/view/LinkUrl/LinkWarningModal/styled.js +4 -4
  60. package/dist/cjs/view/LinkUrl/index.js +1 -1
  61. package/dist/cjs/view/common/Icon.js +12 -4
  62. package/dist/cjs/view/common/ai-icon-loading/index.js +12 -3
  63. package/dist/es2019/constants.js +1 -0
  64. package/dist/es2019/extractors/flexible/actions/extract-copy-link-action.js +15 -0
  65. package/dist/es2019/extractors/flexible/actions/index.js +2 -0
  66. package/dist/es2019/messages.js +10 -0
  67. package/dist/es2019/state/hooks/use-ai-summary/ai-summary-service/index.js +2 -1
  68. package/dist/es2019/state/hooks/use-ai-summary/ai-summary-service/types.js +1 -1
  69. package/dist/es2019/utils/analytics/analytics.js +1 -1
  70. package/dist/es2019/view/BlockCard/views/flexible/FlexibleUnauthorisedView.js +5 -5
  71. package/dist/es2019/view/BlockCard/views/styled.js +4 -4
  72. package/dist/es2019/view/Card/types.js +1 -0
  73. package/dist/es2019/view/EmbedCard/views/unresolved-view/styled.js +29 -29
  74. package/dist/es2019/view/EmbedModal/components/embed-content/index.js +4 -4
  75. package/dist/es2019/view/FlexibleCard/components/actions/action/action-button/index.js +23 -26
  76. package/dist/es2019/view/FlexibleCard/components/actions/action/action-stack-item/index.js +3 -1
  77. package/dist/es2019/view/FlexibleCard/components/actions/action/index.js +12 -4
  78. package/dist/es2019/view/FlexibleCard/components/actions/copy-link-action/index.js +53 -0
  79. package/dist/es2019/view/FlexibleCard/components/actions/copy-link-action/types.js +1 -0
  80. package/dist/es2019/view/FlexibleCard/components/actions/index.js +2 -1
  81. package/dist/es2019/view/FlexibleCard/components/blocks/ai-summary-block/ai-motion-wrapper/index.js +39 -0
  82. package/dist/es2019/view/FlexibleCard/components/blocks/ai-summary-block/ai-motion-wrapper/types.js +1 -0
  83. package/dist/es2019/view/FlexibleCard/components/blocks/ai-summary-block/ai-state-indicator/ai-state-error.js +6 -2
  84. package/dist/es2019/view/FlexibleCard/components/blocks/ai-summary-block/feature-discovery/index.js +44 -0
  85. package/dist/es2019/view/FlexibleCard/components/blocks/ai-summary-block/feature-discovery/styled.js +15 -0
  86. package/dist/es2019/view/FlexibleCard/components/blocks/ai-summary-block/resolved/index.js +42 -16
  87. package/dist/es2019/view/FlexibleCard/components/blocks/block/index.js +3 -1
  88. package/dist/es2019/view/FlexibleCard/components/blocks/element-group/index.js +29 -34
  89. package/dist/es2019/view/FlexibleCard/components/blocks/metadata-block/index.js +3 -4
  90. package/dist/es2019/view/FlexibleCard/components/blocks/preview-block/resolved/index.js +11 -13
  91. package/dist/es2019/view/FlexibleCard/components/blocks/related-urls-block/index.js +3 -3
  92. package/dist/es2019/view/FlexibleCard/components/blocks/related-urls-block/resolved/related-url-list/index.js +3 -3
  93. package/dist/es2019/view/FlexibleCard/components/blocks/title-block/errored/index.js +14 -16
  94. package/dist/es2019/view/FlexibleCard/components/blocks/title-block/resolved/index.js +3 -3
  95. package/dist/es2019/view/FlexibleCard/components/blocks/utils.js +2 -0
  96. package/dist/es2019/view/FlexibleCard/components/common/loading-skeleton/index.js +25 -26
  97. package/dist/es2019/view/FlexibleCard/components/container/index.js +2 -0
  98. package/dist/es2019/view/FlexibleCard/components/container/layered-link/index.js +16 -18
  99. package/dist/es2019/view/FlexibleCard/components/elements/atlaskit-badge/index.js +4 -4
  100. package/dist/es2019/view/FlexibleCard/components/elements/avatar-group/index.js +8 -7
  101. package/dist/es2019/view/FlexibleCard/components/elements/badge/index.js +14 -12
  102. package/dist/es2019/view/FlexibleCard/components/elements/date-time/index.js +5 -6
  103. package/dist/es2019/view/FlexibleCard/components/elements/icon/index.js +20 -23
  104. package/dist/es2019/view/FlexibleCard/components/elements/link/index.js +33 -40
  105. package/dist/es2019/view/FlexibleCard/components/elements/lozenge/index.js +4 -4
  106. package/dist/es2019/view/FlexibleCard/components/elements/lozenge/lozenge-action/styled.js +42 -53
  107. package/dist/es2019/view/FlexibleCard/components/elements/media/index.js +28 -32
  108. package/dist/es2019/view/FlexibleCard/components/elements/text/index.js +6 -7
  109. package/dist/es2019/view/FlexibleCard/components/utils.js +1 -0
  110. package/dist/es2019/view/HoverCard/components/ContentContainer.js +6 -1
  111. package/dist/es2019/view/HoverCard/components/views/forbidden/styled.js +16 -16
  112. package/dist/es2019/view/HoverCard/components/views/resolved/index.js +13 -10
  113. package/dist/es2019/view/HoverCard/components/views/resolved/styled.js +9 -7
  114. package/dist/es2019/view/HoverCard/components/views/resolving/styled.js +22 -22
  115. package/dist/es2019/view/HoverCard/components/views/unauthorised/styled.js +13 -13
  116. package/dist/es2019/view/HoverCard/styled.js +4 -0
  117. package/dist/es2019/view/InlineCard/IconAndTitleLayout/styled.js +36 -40
  118. package/dist/es2019/view/InlineCard/ResolvingView/styled.js +4 -4
  119. package/dist/es2019/view/InlineCard/styled.js +34 -35
  120. package/dist/es2019/view/LinkUrl/LinkWarningModal/styled.js +4 -4
  121. package/dist/es2019/view/LinkUrl/index.js +1 -1
  122. package/dist/es2019/view/common/Icon.js +11 -11
  123. package/dist/es2019/view/common/ai-icon-loading/index.js +10 -14
  124. package/dist/esm/constants.js +1 -0
  125. package/dist/esm/extractors/flexible/actions/extract-copy-link-action.js +15 -0
  126. package/dist/esm/extractors/flexible/actions/index.js +2 -1
  127. package/dist/esm/messages.js +10 -0
  128. package/dist/esm/state/hooks/use-ai-summary/ai-summary-service/index.js +3 -2
  129. package/dist/esm/state/hooks/use-ai-summary/ai-summary-service/types.js +1 -1
  130. package/dist/esm/utils/analytics/analytics.js +1 -1
  131. package/dist/esm/view/BlockCard/views/flexible/FlexibleUnauthorisedView.js +5 -3
  132. package/dist/esm/view/BlockCard/views/styled.js +5 -3
  133. package/dist/esm/view/Card/types.js +1 -0
  134. package/dist/esm/view/EmbedCard/views/unresolved-view/styled.js +29 -7
  135. package/dist/esm/view/EmbedModal/components/embed-content/index.js +4 -3
  136. package/dist/esm/view/FlexibleCard/components/actions/action/action-button/index.js +22 -6
  137. package/dist/esm/view/FlexibleCard/components/actions/action/action-stack-item/index.js +3 -1
  138. package/dist/esm/view/FlexibleCard/components/actions/action/index.js +12 -4
  139. package/dist/esm/view/FlexibleCard/components/actions/copy-link-action/index.js +78 -0
  140. package/dist/esm/view/FlexibleCard/components/actions/copy-link-action/types.js +1 -0
  141. package/dist/esm/view/FlexibleCard/components/actions/index.js +2 -1
  142. package/dist/esm/view/FlexibleCard/components/blocks/ai-summary-block/ai-motion-wrapper/index.js +45 -0
  143. package/dist/esm/view/FlexibleCard/components/blocks/ai-summary-block/ai-motion-wrapper/types.js +1 -0
  144. package/dist/esm/view/FlexibleCard/components/blocks/ai-summary-block/ai-state-indicator/ai-state-error.js +6 -2
  145. package/dist/esm/view/FlexibleCard/components/blocks/ai-summary-block/feature-discovery/index.js +47 -0
  146. package/dist/esm/view/FlexibleCard/components/blocks/ai-summary-block/feature-discovery/styled.js +15 -0
  147. package/dist/esm/view/FlexibleCard/components/blocks/ai-summary-block/resolved/index.js +37 -9
  148. package/dist/esm/view/FlexibleCard/components/blocks/block/index.js +3 -1
  149. package/dist/esm/view/FlexibleCard/components/blocks/element-group/index.js +34 -7
  150. package/dist/esm/view/FlexibleCard/components/blocks/metadata-block/index.js +3 -3
  151. package/dist/esm/view/FlexibleCard/components/blocks/preview-block/resolved/index.js +13 -3
  152. package/dist/esm/view/FlexibleCard/components/blocks/related-urls-block/index.js +3 -3
  153. package/dist/esm/view/FlexibleCard/components/blocks/related-urls-block/resolved/related-url-list/index.js +3 -3
  154. package/dist/esm/view/FlexibleCard/components/blocks/title-block/errored/index.js +16 -4
  155. package/dist/esm/view/FlexibleCard/components/blocks/title-block/resolved/index.js +3 -3
  156. package/dist/esm/view/FlexibleCard/components/blocks/utils.js +2 -0
  157. package/dist/esm/view/FlexibleCard/components/common/loading-skeleton/index.js +26 -4
  158. package/dist/esm/view/FlexibleCard/components/container/index.js +2 -0
  159. package/dist/esm/view/FlexibleCard/components/container/layered-link/index.js +32 -3
  160. package/dist/esm/view/FlexibleCard/components/elements/atlaskit-badge/index.js +4 -3
  161. package/dist/esm/view/FlexibleCard/components/elements/avatar-group/index.js +11 -3
  162. package/dist/esm/view/FlexibleCard/components/elements/badge/index.js +16 -4
  163. package/dist/esm/view/FlexibleCard/components/elements/date-time/index.js +5 -3
  164. package/dist/esm/view/FlexibleCard/components/elements/icon/index.js +21 -6
  165. package/dist/esm/view/FlexibleCard/components/elements/link/index.js +36 -7
  166. package/dist/esm/view/FlexibleCard/components/elements/lozenge/index.js +4 -3
  167. package/dist/esm/view/FlexibleCard/components/elements/lozenge/lozenge-action/styled.js +46 -5
  168. package/dist/esm/view/FlexibleCard/components/elements/media/index.js +30 -3
  169. package/dist/esm/view/FlexibleCard/components/elements/text/index.js +6 -3
  170. package/dist/esm/view/FlexibleCard/components/utils.js +1 -0
  171. package/dist/esm/view/HoverCard/components/ContentContainer.js +5 -1
  172. package/dist/esm/view/HoverCard/components/views/forbidden/styled.js +16 -5
  173. package/dist/esm/view/HoverCard/components/views/resolved/index.js +12 -10
  174. package/dist/esm/view/HoverCard/components/views/resolved/styled.js +10 -3
  175. package/dist/esm/view/HoverCard/components/views/resolving/styled.js +23 -6
  176. package/dist/esm/view/HoverCard/components/views/unauthorised/styled.js +14 -5
  177. package/dist/esm/view/HoverCard/styled.js +4 -0
  178. package/dist/esm/view/InlineCard/IconAndTitleLayout/styled.js +36 -10
  179. package/dist/esm/view/InlineCard/ResolvingView/styled.js +4 -3
  180. package/dist/esm/view/InlineCard/styled.js +37 -6
  181. package/dist/esm/view/LinkUrl/LinkWarningModal/styled.js +4 -3
  182. package/dist/esm/view/LinkUrl/index.js +1 -1
  183. package/dist/esm/view/common/Icon.js +11 -4
  184. package/dist/esm/view/common/ai-icon-loading/index.js +11 -3
  185. package/dist/types/constants.d.ts +1 -0
  186. package/dist/types/extractors/flexible/actions/extract-copy-link-action.d.ts +4 -0
  187. package/dist/types/messages.d.ts +1 -1
  188. package/dist/types/state/flexible-ui-context/types.d.ts +4 -0
  189. package/dist/types/state/hooks/use-ai-summary/ai-summary-service/types.d.ts +2 -2
  190. package/dist/types/view/Card/types.d.ts +2 -1
  191. package/dist/types/view/FlexibleCard/components/actions/action/action-button/types.d.ts +2 -0
  192. package/dist/types/view/FlexibleCard/components/actions/action/action-stack-item/types.d.ts +2 -0
  193. package/dist/types/view/FlexibleCard/components/actions/action/types.d.ts +19 -0
  194. package/dist/types/view/FlexibleCard/components/actions/copy-link-action/index.d.ts +4 -0
  195. package/dist/types/view/FlexibleCard/components/actions/copy-link-action/types.d.ts +2 -0
  196. package/dist/types/view/FlexibleCard/components/actions/index.d.ts +1 -0
  197. package/dist/types/view/FlexibleCard/components/blocks/ai-summary-block/ai-motion-wrapper/index.d.ts +4 -0
  198. package/dist/types/view/FlexibleCard/components/blocks/ai-summary-block/ai-motion-wrapper/types.d.ts +7 -0
  199. package/dist/types/view/FlexibleCard/components/blocks/ai-summary-block/feature-discovery/index.d.ts +12 -0
  200. package/dist/types/view/FlexibleCard/components/blocks/ai-summary-block/feature-discovery/styled.d.ts +1 -0
  201. package/dist/types/view/FlexibleCard/components/blocks/ai-summary-block/resolved/index.d.ts +4 -3
  202. package/dist/types/view/FlexibleCard/components/blocks/types.d.ts +3 -1
  203. package/dist/types/view/FlexibleCard/components/elements/avatar-group/index.d.ts +0 -1
  204. package/dist/types-ts4.5/constants.d.ts +1 -0
  205. package/dist/types-ts4.5/extractors/flexible/actions/extract-copy-link-action.d.ts +4 -0
  206. package/dist/types-ts4.5/messages.d.ts +1 -1
  207. package/dist/types-ts4.5/state/flexible-ui-context/types.d.ts +4 -0
  208. package/dist/types-ts4.5/state/hooks/use-ai-summary/ai-summary-service/types.d.ts +3 -2
  209. package/dist/types-ts4.5/view/Card/types.d.ts +2 -1
  210. package/dist/types-ts4.5/view/FlexibleCard/components/actions/action/action-button/types.d.ts +2 -0
  211. package/dist/types-ts4.5/view/FlexibleCard/components/actions/action/action-stack-item/types.d.ts +2 -0
  212. package/dist/types-ts4.5/view/FlexibleCard/components/actions/action/types.d.ts +19 -0
  213. package/dist/types-ts4.5/view/FlexibleCard/components/actions/copy-link-action/index.d.ts +4 -0
  214. package/dist/types-ts4.5/view/FlexibleCard/components/actions/copy-link-action/types.d.ts +2 -0
  215. package/dist/types-ts4.5/view/FlexibleCard/components/actions/index.d.ts +1 -0
  216. package/dist/types-ts4.5/view/FlexibleCard/components/blocks/ai-summary-block/ai-motion-wrapper/index.d.ts +4 -0
  217. package/dist/types-ts4.5/view/FlexibleCard/components/blocks/ai-summary-block/ai-motion-wrapper/types.d.ts +7 -0
  218. package/dist/types-ts4.5/view/FlexibleCard/components/blocks/ai-summary-block/feature-discovery/index.d.ts +12 -0
  219. package/dist/types-ts4.5/view/FlexibleCard/components/blocks/ai-summary-block/feature-discovery/styled.d.ts +1 -0
  220. package/dist/types-ts4.5/view/FlexibleCard/components/blocks/ai-summary-block/resolved/index.d.ts +4 -3
  221. package/dist/types-ts4.5/view/FlexibleCard/components/blocks/types.d.ts +3 -1
  222. package/dist/types-ts4.5/view/FlexibleCard/components/elements/avatar-group/index.d.ts +0 -1
  223. package/package.json +2 -1
@@ -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';
@@ -0,0 +1,45 @@
1
+ import _slicedToArray from "@babel/runtime/helpers/slicedToArray";
2
+ import { Box } from '@atlaskit/primitives';
3
+ import React, { useEffect, useRef, useState } from 'react';
4
+ export var AIMotionWrapper = function AIMotionWrapper(_ref) {
5
+ var children = _ref.children,
6
+ _ref$isFadeIn = _ref.isFadeIn,
7
+ isFadeIn = _ref$isFadeIn === void 0 ? false : _ref$isFadeIn,
8
+ _ref$minHeight = _ref.minHeight,
9
+ minHeight = _ref$minHeight === void 0 ? 0 : _ref$minHeight,
10
+ show = _ref.show,
11
+ _ref$showTransition = _ref.showTransition,
12
+ showTransition = _ref$showTransition === void 0 ? false : _ref$showTransition;
13
+ var _useState = useState(0),
14
+ _useState2 = _slicedToArray(_useState, 2),
15
+ height = _useState2[0],
16
+ setHeight = _useState2[1];
17
+ var ref = useRef(null);
18
+ var transition = isFadeIn ? 'height, opacity' : 'height';
19
+ useEffect(function () {
20
+ if (show && ref.current) {
21
+ // set the height of the error message container explicitly to the height
22
+ // of its contents (including anything hidden due to overflow) so that we
23
+ // can animate the height of the container
24
+ setHeight(ref.current.scrollHeight);
25
+ } else {
26
+ setHeight(0);
27
+ }
28
+ }, [children, show]);
29
+ return show ? /*#__PURE__*/React.createElement(Box, {
30
+ style: {
31
+ height: height,
32
+ minHeight: minHeight,
33
+ lineHeight: 0,
34
+ overflow: 'hidden',
35
+ // a fit for purpose state variable to control when the 'visible' styles should be appled
36
+ opacity: height > 0 ? 1 : 0,
37
+ // we only want to transition opacity and height when the error message is initially shown
38
+ // not if its to be shown on mount
39
+ transitionProperty: showTransition ? transition : 'none',
40
+ transitionDuration: '0.3s'
41
+ },
42
+ ref: ref
43
+ }, children) : null;
44
+ };
45
+ export default AIMotionWrapper;
@@ -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
+ };
@@ -7,30 +7,37 @@ import { ActionName, SmartLinkDirection, SmartLinkSize, SmartLinkWidth } from '.
7
7
  import ActionGroup from '../../action-group';
8
8
  import Block from '../../block';
9
9
  import ElementGroup from '../../element-group';
10
+ import AIMotionWrapper from '../ai-motion-wrapper';
10
11
  import AIStateIndicator from '../ai-state-indicator';
11
12
  import { renderElementItems } from '../../utils';
12
13
  import { messages } from '../../../../../../messages';
13
14
  import { useAISummary } from '../../../../../../state/hooks/use-ai-summary';
14
15
  import { useFlexibleUiContext } from '../../../../../../state/flexible-ui-context';
16
+ import { useSmartLinkContext } from '@atlaskit/link-provider';
15
17
  import AIIcon from '../../../../../common/ai-icon';
16
18
  import AISummary from '../../../../../common/ai-summary';
17
19
  import { useAnalyticsEvents } from '../../../../../../common/analytics/generated/use-analytics-events';
18
20
  import AIEventSummaryViewed from '../ai-event-summary-viewed';
19
21
  import AIEventErrorViewed from '../ai-event-error-viewed';
20
22
  import { di } from 'react-magnetic-di';
23
+ import { css } from '@emotion/react';
24
+ import FeatureDiscovery from '../feature-discovery';
21
25
  export var AISummaryBlockErrorIndicator = function AISummaryBlockErrorIndicator(_ref) {
22
26
  var showErrorIndicator = _ref.showErrorIndicator,
23
27
  error = _ref.error,
28
+ showTransition = _ref.showTransition,
24
29
  testId = _ref.testId;
25
- return showErrorIndicator ? /*#__PURE__*/React.createElement(Inline, {
26
- grow: "fill"
30
+ return /*#__PURE__*/React.createElement(AIMotionWrapper, {
31
+ isFadeIn: true,
32
+ show: showErrorIndicator,
33
+ showTransition: showTransition
27
34
  }, /*#__PURE__*/React.createElement(AIEventErrorViewed, {
28
35
  reason: error
29
36
  }), /*#__PURE__*/React.createElement(AIStateIndicator, {
30
37
  error: error,
31
- state: 'error',
38
+ state: "error",
32
39
  testId: testId
33
- })) : null;
40
+ }));
34
41
  };
35
42
  export var AISummaryBlockStatusIndicator = function AISummaryBlockStatusIndicator(_ref2) {
36
43
  var showStatusIndicator = _ref2.showStatusIndicator,
@@ -53,16 +60,20 @@ var AISummaryBlockResolvedView = function AISummaryBlockResolvedView(props) {
53
60
  _props$size = props.size,
54
61
  size = _props$size === void 0 ? SmartLinkSize.Medium : _props$size,
55
62
  testId = props.testId,
56
- aiSummaryMinHeight = props.aiSummaryMinHeight,
63
+ _props$aiSummaryMinHe = props.aiSummaryMinHeight,
64
+ aiSummaryMinHeight = _props$aiSummaryMinHe === void 0 ? 0 : _props$aiSummaryMinHe,
57
65
  metadata = props.metadata;
58
66
  var _useAnalyticsEvents = useAnalyticsEvents(),
59
67
  fireEvent = _useAnalyticsEvents.fireEvent;
60
68
  var context = useFlexibleUiContext();
61
69
  var url = (context === null || context === void 0 ? void 0 : context.url) || '';
62
70
  var ari = (context === null || context === void 0 ? void 0 : context.ari) || '';
71
+ var _useSmartLinkContext = useSmartLinkContext(),
72
+ product = _useSmartLinkContext.product;
63
73
  var _useAISummary = useAISummary({
64
74
  url: url,
65
- ari: ari
75
+ ari: ari,
76
+ product: product
66
77
  }),
67
78
  summariseUrl = _useAISummary.summariseUrl,
68
79
  _useAISummary$state = _useAISummary.state,
@@ -98,7 +109,12 @@ var AISummaryBlockResolvedView = function AISummaryBlockResolvedView(props) {
98
109
  testId: "".concat(testId, "-ai-summary-action"),
99
110
  icon: /*#__PURE__*/React.createElement(AIIcon, {
100
111
  label: "AIIcon"
101
- })
112
+ }),
113
+ /**
114
+ * Enabling feature discovery pulse
115
+ * Cleanup: https://product-fabric.atlassian.net/browse/EDM-9693
116
+ */
117
+ wrapper: FeatureDiscovery
102
118
  };
103
119
  return [aiAction].concat(_toConsumableArray(actions));
104
120
  }
@@ -114,14 +130,25 @@ var AISummaryBlockResolvedView = function AISummaryBlockResolvedView(props) {
114
130
  return /*#__PURE__*/React.createElement(Block, _extends({}, props, {
115
131
  direction: SmartLinkDirection.Vertical,
116
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)
117
140
  }), status === 'done' && /*#__PURE__*/React.createElement(AIEventSummaryViewed, {
118
141
  fromCache: isSummarisedOnMountRef.current
119
- }), showAISummary && /*#__PURE__*/React.createElement(AISummary, {
142
+ }), /*#__PURE__*/React.createElement(AIMotionWrapper, {
143
+ minHeight: aiSummaryMinHeight,
144
+ show: showAISummary,
145
+ showTransition: !isSummarisedOnMountRef.current
146
+ }, /*#__PURE__*/React.createElement(AISummary, {
120
147
  testId: "".concat(testId, "-ai-summary"),
121
148
  minHeight: aiSummaryMinHeight,
122
149
  content: content,
123
150
  showIcon: isSummarisedOnMountRef.current
124
- }), /*#__PURE__*/React.createElement(Inline, {
151
+ })), /*#__PURE__*/React.createElement(Inline, {
125
152
  alignBlock: "center",
126
153
  alignInline: "end",
127
154
  grow: "fill",
@@ -138,6 +165,7 @@ var AISummaryBlockResolvedView = function AISummaryBlockResolvedView(props) {
138
165
  size: size
139
166
  }))), /*#__PURE__*/React.createElement(AISummaryBlockErrorIndicator, {
140
167
  showErrorIndicator: !isErroredOnMountRef.current && status === 'error',
168
+ showTransition: !isErroredOnMountRef.current,
141
169
  error: error,
142
170
  testId: testId
143
171
  }));
@@ -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));