@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
@@ -5,9 +5,7 @@ Object.defineProperty(exports, "__esModule", {
5
5
  value: true
6
6
  });
7
7
  exports.TitleWrapperClassName = exports.TitleWrapper = exports.RightIconPositionWrapper = exports.LozengeWrapper = exports.IconWrapper = exports.IconTitleWrapper = exports.IconPositionWrapper = exports.IconOverrides = exports.IconObjectOverrides = exports.IconEmptyWrapper = exports.EmojiWrapper = void 0;
8
- var _taggedTemplateLiteral2 = _interopRequireDefault(require("@babel/runtime/helpers/taggedTemplateLiteral"));
9
8
  var _styled = _interopRequireDefault(require("@emotion/styled"));
10
- var _templateObject, _templateObject2, _templateObject3, _templateObject4, _templateObject5, _templateObject6, _templateObject7, _templateObject8;
11
9
  // TODO: remove this override behaviour for @atlaskit/icon-object
12
10
  var IconObjectOverrides = exports.IconObjectOverrides = "\n & > span {\n height: 16px;\n width: 14px;\n position: absolute;\n top: 3px;\n left: 0;\n line-height: 14px;\n & > svg {\n position: absolute;\n top: 50%;\n left: 50%;\n transform: translate(-50%, -50%);\n }\n }\n";
13
11
  // TODO: remove this override behaviour for @atlaskit/icon
@@ -19,27 +17,55 @@ var IconOverrides = exports.IconOverrides = "\n\n & > * > span {\n height: 1
19
17
  // - @atlaskit/icon-object: for object icons, e.g. repository, branch, etc.
20
18
  // NB: the first set of overrides style icons imported from @atlaskit/icon-object correctly.
21
19
  // NB: the second set of overrides style icons imported from @atlaskit/icon correctly.
22
- var IconWrapper = exports.IconWrapper = _styled.default.span(_templateObject || (_templateObject = (0, _taggedTemplateLiteral2.default)(["\n user-select: none;\n ", "\n ", "\n"])), IconOverrides, IconObjectOverrides);
20
+ var IconWrapper = exports.IconWrapper = _styled.default.span({
21
+ userSelect: 'none'
22
+ }, IconOverrides, IconObjectOverrides);
23
23
 
24
24
  // Wraps all emoji in Inline Links similar to icon
25
- var EmojiWrapper = exports.EmojiWrapper = _styled.default.span(_templateObject2 || (_templateObject2 = (0, _taggedTemplateLiteral2.default)(["\n display: inline-block;\n margin-right: ", ";\n user-select: none;\n ", "\n ", "\n"])), "var(--ds-space-025, 2px)", IconOverrides, IconObjectOverrides);
25
+ var EmojiWrapper = exports.EmojiWrapper = _styled.default.span({
26
+ display: 'inline-block',
27
+ marginRight: "var(--ds-space-025, 2px)",
28
+ userSelect: 'none'
29
+ }, IconOverrides, IconObjectOverrides);
26
30
 
27
31
  // The main 'wrapping' element, title of the content.
28
32
  // NB: `white-space` adds little whitespace before wrapping.
29
33
  // NB: `word-break` line breaks as soon as an overflow takes place.
30
- var IconTitleWrapper = exports.IconTitleWrapper = _styled.default.span(_templateObject3 || (_templateObject3 = (0, _taggedTemplateLiteral2.default)(["\n white-space: pre-wrap;\n word-break: break-all;\n box-decoration-break: clone;\n padding: ", " ", ";\n"])), "var(--ds-space-025, 2px)", "var(--ds-space-050, 4px)");
34
+ var IconTitleWrapper = exports.IconTitleWrapper = _styled.default.span({
35
+ whiteSpace: 'pre-wrap',
36
+ wordBreak: 'break-all',
37
+ boxDecorationBreak: 'clone',
38
+ padding: "var(--ds-space-025, 2px)".concat(" ", "var(--ds-space-050, 4px)")
39
+ });
31
40
 
32
41
  // TODO: Replace overrides with proper AtlasKit solution.
33
- var LozengeWrapper = exports.LozengeWrapper = _styled.default.span(_templateObject4 || (_templateObject4 = (0, _taggedTemplateLiteral2.default)(["\n display: inline-block;\n vertical-align: 1px;\n margin: 0 ", " 0 ", ";\n"])), "var(--ds-space-050, 4px)", "var(--ds-space-025, 2px)");
34
- var RightIconPositionWrapper = exports.RightIconPositionWrapper = _styled.default.span(_templateObject5 || (_templateObject5 = (0, _taggedTemplateLiteral2.default)(["\n margin-left: ", ";\n position: relative;\n display: inline-block;\n"])), "var(--ds-space-025, 2px)");
42
+ var LozengeWrapper = exports.LozengeWrapper = _styled.default.span({
43
+ display: 'inline-block',
44
+ verticalAlign: '1px',
45
+ margin: "0 ".concat("var(--ds-space-050, 4px)", " 0 ", "var(--ds-space-025, 2px)")
46
+ });
47
+ var RightIconPositionWrapper = exports.RightIconPositionWrapper = _styled.default.span({
48
+ marginLeft: "var(--ds-space-025, 2px)",
49
+ position: 'relative',
50
+ display: 'inline-block'
51
+ });
35
52
 
36
53
  // The following components are used to absolutely position icons in the vertical center.
37
54
  // - IconPositionWrapper: the `relative` parent which has no height in itself.
38
55
  // - IconEmptyWrapper: the child which forces `IconPositionWrapper` to have a height.
39
- var IconPositionWrapper = exports.IconPositionWrapper = _styled.default.span(_templateObject6 || (_templateObject6 = (0, _taggedTemplateLiteral2.default)(["\n margin-right: ", ";\n position: relative;\n display: inline-block;\n"])), "var(--ds-space-050, 4px)");
40
- var IconEmptyWrapper = exports.IconEmptyWrapper = _styled.default.span(_templateObject7 || (_templateObject7 = (0, _taggedTemplateLiteral2.default)(["\n width: 14px;\n height: 100%;\n display: inline-block;\n opacity: 0;\n"])));
56
+ var IconPositionWrapper = exports.IconPositionWrapper = _styled.default.span({
57
+ marginRight: "var(--ds-space-050, 4px)",
58
+ position: 'relative',
59
+ display: 'inline-block'
60
+ });
61
+ var IconEmptyWrapper = exports.IconEmptyWrapper = _styled.default.span({
62
+ width: '14px',
63
+ height: '100%',
64
+ display: 'inline-block',
65
+ opacity: 0
66
+ });
41
67
 
42
68
  // With emotion it's not possible to use reference to `TitleWrapper` as part of a selector,
43
69
  // To achieve same result we use classname instead.
44
70
  var TitleWrapperClassName = exports.TitleWrapperClassName = 'smart-link-title-wrapper';
45
- var TitleWrapper = exports.TitleWrapper = _styled.default.span(_templateObject8 || (_templateObject8 = (0, _taggedTemplateLiteral2.default)([""])));
71
+ var TitleWrapper = exports.TitleWrapper = _styled.default.span({});
@@ -5,8 +5,9 @@ Object.defineProperty(exports, "__esModule", {
5
5
  value: true
6
6
  });
7
7
  exports.SpinnerWrapper = void 0;
8
- var _taggedTemplateLiteral2 = _interopRequireDefault(require("@babel/runtime/helpers/taggedTemplateLiteral"));
9
8
  var _styled = _interopRequireDefault(require("@emotion/styled"));
10
9
  var _styled2 = require("../IconAndTitleLayout/styled");
11
- var _templateObject;
12
- var SpinnerWrapper = exports.SpinnerWrapper = (0, _styled.default)(_styled2.IconTitleWrapper)(_templateObject || (_templateObject = (0, _taggedTemplateLiteral2.default)(["\n vertical-align: text-bottom;\n padding: 0px;\n"])));
10
+ var SpinnerWrapper = exports.SpinnerWrapper = (0, _styled.default)(_styled2.IconTitleWrapper)({
11
+ verticalAlign: 'text-bottom',
12
+ padding: '0px'
13
+ });
@@ -5,13 +5,44 @@ Object.defineProperty(exports, "__esModule", {
5
5
  value: true
6
6
  });
7
7
  exports.NoLinkAppearance = exports.LowercaseAppearance = exports.LinkAppearance = exports.IconStyledButton = void 0;
8
- var _taggedTemplateLiteral2 = _interopRequireDefault(require("@babel/runtime/helpers/taggedTemplateLiteral"));
9
8
  var _styled = _interopRequireDefault(require("@emotion/styled"));
10
9
  var _colors = require("@atlaskit/theme/colors");
11
- var _templateObject, _templateObject2, _templateObject3, _templateObject4;
12
10
  // By default buttons will hide overflow and ellipsis content instead of wrapping.
13
11
  // This basically turns the button back into inline content
14
- var IconStyledButton = exports.IconStyledButton = _styled.default.span(_templateObject || (_templateObject = (0, _taggedTemplateLiteral2.default)(["\n &&& {\n text-align: initial;\n display: inline;\n vertical-align: baseline;\n border-radius: ", ";\n border-top-left-radius: 0px;\n border-bottom-left-radius: 0px;\n padding: ", " ", ";\n background-clip: padding-box;\n box-decoration-break: clone;\n }\n > span {\n display: inline;\n overflow: initial;\n text-overflow: initial;\n white-space: initial;\n > span {\n overflow: initial;\n text-overflow: initial;\n white-space: initial;\n }\n }\n"])), "var(--ds-border-radius-100, 4px)", "var(--ds-space-025, 2px)", "var(--ds-space-075, 6px)");
15
- var NoLinkAppearance = exports.NoLinkAppearance = _styled.default.span(_templateObject2 || (_templateObject2 = (0, _taggedTemplateLiteral2.default)(["\n color: ", ";\n margin-left: ", ";\n"])), "var(--ds-text-subtlest, ".concat(_colors.N200, ")"), "var(--ds-space-050, 4px)");
16
- var LowercaseAppearance = exports.LowercaseAppearance = _styled.default.span(_templateObject3 || (_templateObject3 = (0, _taggedTemplateLiteral2.default)(["\n text-transform: lowercase;\n"])));
17
- var LinkAppearance = exports.LinkAppearance = _styled.default.a(_templateObject4 || (_templateObject4 = (0, _taggedTemplateLiteral2.default)(["\n color: ", ";\n\n &:hover {\n text-decoration: none;\n }\n"])), "var(--ds-link, ".concat(_colors.B400, ")"));
12
+ var IconStyledButton = exports.IconStyledButton = _styled.default.span({
13
+ '&&&': {
14
+ textAlign: 'initial',
15
+ display: 'inline',
16
+ verticalAlign: 'baseline',
17
+ borderRadius: "var(--ds-border-radius-100, 4px)",
18
+ borderTopLeftRadius: '0px',
19
+ borderBottomLeftRadius: '0px',
20
+ padding: "var(--ds-space-025, 2px)".concat(" ", "var(--ds-space-075, 6px)"),
21
+ backgroundClip: 'padding-box',
22
+ boxDecorationBreak: 'clone'
23
+ },
24
+ '> span': {
25
+ display: 'inline',
26
+ overflow: 'initial',
27
+ textOverflow: 'initial',
28
+ whiteSpace: 'initial',
29
+ '> span': {
30
+ overflow: 'initial',
31
+ textOverflow: 'initial',
32
+ whiteSpace: 'initial'
33
+ }
34
+ }
35
+ });
36
+ var NoLinkAppearance = exports.NoLinkAppearance = _styled.default.span({
37
+ color: "var(--ds-text-subtlest, ".concat(_colors.N200, ")"),
38
+ marginLeft: "var(--ds-space-050, 4px)"
39
+ });
40
+ var LowercaseAppearance = exports.LowercaseAppearance = _styled.default.span({
41
+ textTransform: 'lowercase'
42
+ });
43
+ var LinkAppearance = exports.LinkAppearance = _styled.default.a({
44
+ color: "var(--ds-link, ".concat(_colors.B400, ")"),
45
+ '&:hover': {
46
+ textDecoration: 'none'
47
+ }
48
+ });
@@ -1,11 +1,11 @@
1
1
  "use strict";
2
2
 
3
- var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefault");
4
3
  Object.defineProperty(exports, "__esModule", {
5
4
  value: true
6
5
  });
7
6
  exports.breakWordsCss = void 0;
8
- var _taggedTemplateLiteral2 = _interopRequireDefault(require("@babel/runtime/helpers/taggedTemplateLiteral"));
9
7
  var _react = require("@emotion/react");
10
- var _templateObject;
11
- var breakWordsCss = exports.breakWordsCss = (0, _react.css)(_templateObject || (_templateObject = (0, _taggedTemplateLiteral2.default)(["\n white-space: pre-line;\n word-break: break-all;\n"])));
8
+ var breakWordsCss = exports.breakWordsCss = (0, _react.css)({
9
+ whiteSpace: 'pre-line',
10
+ wordBreak: 'break-all'
11
+ });
@@ -17,7 +17,7 @@ var _excluded = ["href", "children", "checkSafety", "onClick", "testId"],
17
17
  _excluded2 = ["isLinkSafe", "showSafetyWarningModal"];
18
18
  var PACKAGE_DATA = {
19
19
  packageName: "@atlaskit/smart-card",
20
- packageVersion: "26.55.1",
20
+ packageVersion: "26.56.0",
21
21
  componentName: 'linkUrl'
22
22
  };
23
23
  var Link = (0, _click.withLinkClickedEvent)('a');
@@ -5,14 +5,13 @@ Object.defineProperty(exports, "__esModule", {
5
5
  value: true
6
6
  });
7
7
  exports.blockCardIconImageClassName = exports.Icon = void 0;
8
- var _taggedTemplateLiteral2 = _interopRequireDefault(require("@babel/runtime/helpers/taggedTemplateLiteral"));
9
8
  var _react = require("@emotion/react");
10
9
  var _react2 = _interopRequireDefault(require("react"));
11
10
  var _reactRenderImage = _interopRequireDefault(require("react-render-image"));
12
11
  var _link = _interopRequireDefault(require("@atlaskit/icon/glyph/link"));
13
12
  var _utils = require("./utils");
14
- var _templateObject, _templateObject2;
15
13
  /** @jsx jsx */
14
+
16
15
  /**
17
16
  * Class name for selecting non-flexible block card icon image
18
17
  *
@@ -24,13 +23,22 @@ var getImageStyles = function getImageStyles(isFlexibleUi) {
24
23
  if (isFlexibleUi) {
25
24
  return;
26
25
  }
27
- return (0, _react.css)(_templateObject || (_templateObject = (0, _taggedTemplateLiteral2.default)(["\n height: ", ";\n width: ", ";\n "])), (0, _utils.gs)(2), (0, _utils.gs)(2));
26
+ return (0, _react.css)({
27
+ height: (0, _utils.gs)(2),
28
+ width: (0, _utils.gs)(2)
29
+ });
28
30
  };
29
31
  var getSpanStyles = function getSpanStyles(isFlexibleUi) {
30
32
  if (isFlexibleUi) {
31
33
  return;
32
34
  }
33
- return (0, _react.css)(_templateObject2 || (_templateObject2 = (0, _taggedTemplateLiteral2.default)(["\n height: ", ";\n width: ", ";\n display: flex;\n align-items: center;\n justify-content: center;\n "])), (0, _utils.gs)(2.5), (0, _utils.gs)(2));
35
+ return (0, _react.css)({
36
+ height: (0, _utils.gs)(2.5),
37
+ width: (0, _utils.gs)(2),
38
+ display: 'flex',
39
+ alignItems: 'center',
40
+ justifyContent: 'center'
41
+ });
34
42
  };
35
43
  var Icon = exports.Icon = function Icon(_ref) {
36
44
  var url = _ref.url,
@@ -5,19 +5,28 @@ Object.defineProperty(exports, "__esModule", {
5
5
  value: true
6
6
  });
7
7
  exports.default = void 0;
8
- var _taggedTemplateLiteral2 = _interopRequireDefault(require("@babel/runtime/helpers/taggedTemplateLiteral"));
9
8
  var _react = require("@emotion/react");
10
9
  var _svg = _interopRequireDefault(require("@atlaskit/icon/svg"));
11
10
  var _constants = require("../ai-prism/constants");
12
- var _templateObject;
13
11
  /** @jsx jsx */
12
+
14
13
  /**
15
14
  * The bulk of this file is originally from
16
15
  * https://bitbucket.org/atlassian/barrel/src/master/ui/platform/ui-kit/ai
17
16
  * with modifications
18
17
  */
19
18
 
20
- var bounce = (0, _react.keyframes)(_templateObject || (_templateObject = (0, _taggedTemplateLiteral2.default)(["\n from {\n transform: translateY(0);\n }\n\n // 200ms of 1200ms = 16.67%\n 16.67% {\n transform: translateY(-2px);\n }\n\n // 400ms of 1200ms = 33.33%\n 33.33% {\n transform: translateY(0px);\n }\n"])));
19
+ var bounce = (0, _react.keyframes)({
20
+ from: {
21
+ transform: 'translateY(0)'
22
+ },
23
+ '16.67%': {
24
+ transform: 'translateY(-2px)'
25
+ },
26
+ '33.33%': {
27
+ transform: 'translateY(0px)'
28
+ }
29
+ });
21
30
  var BASE_DELAY = 400;
22
31
  var QUEUE_DELAY = 200;
23
32
  var animationStyles = (0, _react.css)({
@@ -145,6 +145,7 @@ export let ElementName = /*#__PURE__*/function (ElementName) {
145
145
  * Flexible UI action (button)
146
146
  */
147
147
  export let ActionName = /*#__PURE__*/function (ActionName) {
148
+ ActionName["CopyLinkAction"] = "CopyLinkAction";
148
149
  ActionName["DeleteAction"] = "DeleteAction";
149
150
  ActionName["EditAction"] = "EditAction";
150
151
  ActionName["FollowAction"] = "FollowAction";
@@ -0,0 +1,15 @@
1
+ import { extractLink } from '@atlaskit/link-extractors';
2
+ import { CardAction } from '../../../view/Card/types';
3
+ import { canShowAction } from '../../../utils/actions/can-show-action';
4
+ export const extractCopyLinkAction = (data, actionOptions) => {
5
+ if (!canShowAction(CardAction.CopyLinkAction, actionOptions)) {
6
+ return;
7
+ }
8
+ const url = extractLink(data);
9
+ if (!url) {
10
+ return;
11
+ }
12
+ return {
13
+ url
14
+ };
15
+ };
@@ -2,8 +2,10 @@ import { ActionName } from '../../../constants';
2
2
  import { extractDownloadAction } from './extract-download-action';
3
3
  import { extractPreviewAction } from './extract-preview-action';
4
4
  import extractFollowAction from './extract-follow-action';
5
+ import { extractCopyLinkAction } from './extract-copy-link-action';
5
6
  const extractActions = (response, data, actionOptions, id) => {
6
7
  const action = {
8
+ [ActionName.CopyLinkAction]: extractCopyLinkAction(data, actionOptions),
7
9
  [ActionName.DownloadAction]: extractDownloadAction(data, actionOptions),
8
10
  [ActionName.FollowAction]: extractFollowAction(response, actionOptions, id),
9
11
  [ActionName.PreviewAction]: extractPreviewAction(response, actionOptions)
@@ -45,6 +45,11 @@ export const messages = defineMessages({
45
45
  defaultMessage: "We cannot show the results of this summary as it goes against <a>Atlassian's Acceptable Use Policy</a>.",
46
46
  description: 'Shown when AI summary is summarising the link resource content and the content violates atlassians acceptable use policy.'
47
47
  },
48
+ ai_summary_error_hipaa_content_detected: {
49
+ id: 'fabric.linking.ai_summary_error_hipaa_content_detected',
50
+ defaultMessage: 'Atlassian Intelligence was unable to process your request as your content contains links to HIPAA restricted content.',
51
+ description: 'Shown when the AI summary is summarising the link resource content and the content contains HIPAA restricted content.'
52
+ },
48
53
  assigned_to: {
49
54
  id: 'fabric.linking.assigned_to',
50
55
  defaultMessage: 'Assigned to {context}',
@@ -145,6 +150,11 @@ export const messages = defineMessages({
145
150
  defaultMessage: 'Copy link',
146
151
  description: ''
147
152
  },
153
+ copied_url_to_clipboard: {
154
+ id: 'fabric.linking.copied_url_to_clipboard.nonfinal',
155
+ defaultMessage: 'Copied!',
156
+ description: 'Url has been copied to the clipboard'
157
+ },
148
158
  could_not_load_link: {
149
159
  id: 'fabric.linking.couldnt_load_link',
150
160
  defaultMessage: "We couldn't load this link for an unknown reason.",
@@ -5,6 +5,7 @@ import { addPath } from './utils';
5
5
  import { readStream } from './readStream';
6
6
  export class AISummaryService {
7
7
  constructor(props) {
8
+ var _props$product;
8
9
  _defineProperty(this, "state", {
9
10
  content: '',
10
11
  status: 'ready'
@@ -39,7 +40,7 @@ export class AISummaryService {
39
40
  headers: {
40
41
  'Content-Type': 'application/json;charset=UTF-8',
41
42
  'x-experience-id': 'smart-link',
42
- 'x-product': props.product || 'confluence',
43
+ 'x-product': ((_props$product = props.product) === null || _props$product === void 0 ? void 0 : _props$product.toLowerCase()) || 'confluence',
43
44
  ...props.headers
44
45
  }
45
46
  };
@@ -1 +1 @@
1
- export const errorMessages = ['NETWORK_ERROR', 'NO_ANSWER', 'RATE_LIMIT', 'NO_AGENT', 'PLUGIN_ERRORED', 'OPENAI_RATE_LIMIT_USER_ABUSE', 'ACCEPTABLE_USE_VIOLATIONS', 'AI_DISABLED', 'UNEXPECTED'];
1
+ export const errorMessages = ['NETWORK_ERROR', 'NO_ANSWER', 'RATE_LIMIT', 'NO_AGENT', 'PLUGIN_ERRORED', 'OPENAI_RATE_LIMIT_USER_ABUSE', 'ACCEPTABLE_USE_VIOLATIONS', 'AI_DISABLED', 'UNEXPECTED', 'HIPAA_CONTENT_DETECTED'];
@@ -4,7 +4,7 @@ export const ANALYTICS_CHANNEL = 'media';
4
4
  export const context = {
5
5
  componentName: 'smart-cards',
6
6
  packageName: "@atlaskit/smart-card",
7
- packageVersion: "26.55.1"
7
+ packageVersion: "26.56.0"
8
8
  };
9
9
  export let TrackQuickActionType = /*#__PURE__*/function (TrackQuickActionType) {
10
10
  TrackQuickActionType["StatusUpdate"] = "StatusUpdate";
@@ -10,11 +10,11 @@ import UnauthorisedViewContent from '../../../common/UnauthorisedViewContent';
10
10
  import { messages } from '../../../../messages';
11
11
  import UnresolvedView from './unresolved-view';
12
12
  import { withFlexibleUIBlockCardStyle } from './utils/withFlexibleUIBlockCardStyle';
13
- const contentStyles = css`
14
- color: ${"var(--ds-text-subtlest, #626F86)"};
15
- margin-top: 0.5rem;
16
- font-size: 0.75rem;
17
- `;
13
+ const contentStyles = css({
14
+ color: "var(--ds-text-subtlest, #626F86)",
15
+ marginTop: "var(--ds-space-100, 0.5rem)",
16
+ fontSize: '0.75rem'
17
+ });
18
18
 
19
19
  /**
20
20
  * This view represents a Block card that has an 'Unauthorized' status .
@@ -1,7 +1,7 @@
1
1
  import styled from '@emotion/styled';
2
2
  // TODO: Replace overrides with proper AtlasKit solution.
3
- export const LozengeBlockWrapper = styled.span`
4
- & > span {
5
- margin-left: ${"var(--ds-space-050, 4px)"};
3
+ export const LozengeBlockWrapper = styled.span({
4
+ '& > span': {
5
+ marginLeft: "var(--ds-space-050, 4px)"
6
6
  }
7
- `;
7
+ });
@@ -4,5 +4,6 @@ export let 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,31 +1,31 @@
1
1
  import { css } from '@emotion/react';
2
2
  import { gs } from '../../../common/utils';
3
- export const containerStyles = css`
4
- display: grid;
5
- height: inherit;
6
- `;
7
- export const contentStyles = css`
8
- display: flex;
9
- flex-direction: column;
10
- justify-content: center;
11
- align-items: center;
12
- margin: auto;
13
- padding: ${"var(--ds-space-200, 16px)"};
14
- gap: ${"var(--ds-space-250, 20px)"};
15
- max-width: ${gs(50)};
16
- `;
17
- export const imageStyles = css`
18
- height: 120px;
19
- width: 180px;
20
- object-fit: contain;
21
- object-position: center center;
22
- `;
23
- export const titleStyles = css`
24
- text-align: center;
25
- margin: 0;
26
- padding: 0;
27
- `;
28
- export const descriptionStyles = css`
29
- font-size: 1em;
30
- text-align: center;
31
- `;
3
+ export const containerStyles = css({
4
+ display: 'grid',
5
+ height: 'inherit'
6
+ });
7
+ export const 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 const imageStyles = css({
18
+ height: '120px',
19
+ width: '180px',
20
+ objectFit: 'contain',
21
+ objectPosition: 'center center'
22
+ });
23
+ export const titleStyles = css({
24
+ textAlign: 'center',
25
+ margin: 0,
26
+ padding: 0
27
+ });
28
+ export const descriptionStyles = css({
29
+ fontSize: '1em',
30
+ textAlign: 'center'
31
+ });
@@ -4,10 +4,10 @@ import { di } from 'react-magnetic-di';
4
4
  import { css, jsx } from '@emotion/react';
5
5
  import { getIframeSandboxAttribute } from '../../../../utils';
6
6
  import { IFrame } from '../../../EmbedCard/components/IFrame';
7
- const iframeCss = css`
8
- width: 100%;
9
- height: calc(100vh - 208px);
10
- `;
7
+ const iframeCss = css({
8
+ width: '100%',
9
+ height: 'calc(100vh - 208px)'
10
+ });
11
11
  const EmbedContent = ({
12
12
  isTrusted,
13
13
  name,
@@ -8,35 +8,28 @@ import { sizeToButtonSpacing } from '../../../utils';
8
8
  const getButtonStyle = (size, iconOnly) => {
9
9
  switch (size) {
10
10
  case SmartLinkSize.Large:
11
- return iconOnly ? css`
12
- button,
13
- button:hover,
14
- button:focus,
15
- button:active {
16
- padding: 0;
17
- > span {
18
- margin: 0;
19
- }
20
- }
21
- ` : '';
11
+ return iconOnly ? css({
12
+ 'button, button:hover, button:focus, button:active': {
13
+ padding: 0,
14
+ '> span': {
15
+ margin: 0
16
+ }
17
+ }
18
+ }) : '';
22
19
  case SmartLinkSize.Small:
23
- return css`
24
- font-size: 0.75rem;
25
- font-weight: 500;
26
- line-height: 1rem;
27
- button,
28
- button:hover,
29
- button:focus,
30
- button:active {
31
- line-height: 1rem;
32
- ${iconOnly ? `
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 ? `
33
27
  padding: 0.125rem;
34
28
  ` : `
35
29
  padding-left: 0.25rem;
36
30
  padding-right: 0.25rem;
37
- `}
38
- }
39
- `;
31
+ `]
32
+ });
40
33
  case SmartLinkSize.XLarge:
41
34
  case SmartLinkSize.Medium:
42
35
  default:
@@ -54,7 +47,9 @@ const ActionButton = ({
54
47
  size,
55
48
  testId,
56
49
  tooltipMessage,
57
- isDisabled
50
+ isDisabled,
51
+ href,
52
+ ariaLabel
58
53
  }) => {
59
54
  const iconOnly = !content;
60
55
  const onButtonClick = useCallback(handler => e => {
@@ -76,7 +71,9 @@ const ActionButton = ({
76
71
  isLoading: isLoading,
77
72
  onClick: onButtonClick(onClick),
78
73
  spacing: sizeToButtonSpacing[size],
79
- testId: testId
74
+ testId: testId,
75
+ href: href,
76
+ "aria-label": ariaLabel
80
77
  }, content)));
81
78
  };
82
79
  export default ActionButton;
@@ -46,7 +46,8 @@ const ActionStackItem = ({
46
46
  space: spaceOption,
47
47
  testId,
48
48
  tooltipMessage,
49
- xcss
49
+ xcss,
50
+ tooltipOnHide
50
51
  }) => {
51
52
  const space = spaceOption !== null && spaceOption !== void 0 ? spaceOption : getPrimitivesInlineSpaceBySize(size);
52
53
  const onClick = useCallback(() => {
@@ -65,6 +66,7 @@ const ActionStackItem = ({
65
66
  // Replace Box with Pressable once it becomes stable (currently beta)
66
67
  return /*#__PURE__*/React.createElement(Tooltip, {
67
68
  content: tooltipMessage || content,
69
+ onHide: tooltipOnHide,
68
70
  hideTooltipOnMouseDown: true
69
71
  }, tooltipProps => /*#__PURE__*/React.createElement(Box, _extends({
70
72
  as: "button",
@@ -24,10 +24,14 @@ const Action = ({
24
24
  iconPosition = 'before',
25
25
  spaceInline,
26
26
  tooltipMessage,
27
+ tooltipOnHide,
27
28
  xcss,
28
29
  asDropDownItem,
29
30
  overrideCss,
30
- isDisabled
31
+ isDisabled,
32
+ href,
33
+ ariaLabel,
34
+ wrapper: Wrapper
31
35
  }) => {
32
36
  if (!onClick) {
33
37
  return null;
@@ -54,7 +58,8 @@ const Action = ({
54
58
  size: size,
55
59
  testId: testId,
56
60
  tooltipMessage: tooltipMessage || content,
57
- xcss: xcss
61
+ xcss: xcss,
62
+ tooltipOnHide: tooltipOnHide
58
63
  });
59
64
  }
60
65
  if (isDropdownItem) {
@@ -67,7 +72,7 @@ const Action = ({
67
72
  testId: testId
68
73
  });
69
74
  }
70
- return jsx(ActionButton, {
75
+ const button = jsx(ActionButton, {
71
76
  appearance: appearance,
72
77
  content: content,
73
78
  iconAfter: iconAfter,
@@ -78,7 +83,10 @@ const Action = ({
78
83
  size: size,
79
84
  testId: testId,
80
85
  tooltipMessage: tooltipMessage || content,
81
- isDisabled: isDisabled
86
+ isDisabled: isDisabled,
87
+ href: href,
88
+ ariaLabel: ariaLabel
82
89
  });
90
+ return Wrapper !== undefined ? jsx(Wrapper, null, button) : button;
83
91
  };
84
92
  export default Action;