@atlaskit/smart-card 18.0.14 → 18.0.17
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +27 -0
- package/dist/cjs/extractors/common/context/extractProvider.js +14 -4
- package/dist/cjs/extractors/common/detail/extractCommentCount.js +3 -1
- package/dist/cjs/extractors/common/detail/extractProgrammingLanguage.js +3 -1
- package/dist/cjs/extractors/common/detail/extractSubscriberCount.js +3 -1
- package/dist/cjs/extractors/common/primitives/extractTitleTextColor.js +3 -1
- package/dist/cjs/state/actions/index.js +1 -1
- package/dist/cjs/state/analytics/useSmartLinkAnalytics.js +9 -0
- package/dist/cjs/state/flexible-ui-context/index.js +4 -0
- package/dist/cjs/utils/analytics/analytics.js +52 -2
- package/dist/cjs/utils/analytics/index.js +18 -0
- package/dist/cjs/version.json +1 -1
- package/dist/cjs/view/BlockCard/components/Frame.js +10 -7
- package/dist/cjs/view/BlockCard/components/Link.js +3 -1
- package/dist/cjs/view/BlockCard/components/Provider.js +3 -1
- package/dist/cjs/view/BlockCard/views/ErroredView.js +3 -1
- package/dist/cjs/view/BlockCard/views/ForbiddenView.js +3 -1
- package/dist/cjs/view/BlockCard/views/NotFoundView.js +3 -1
- package/dist/cjs/view/BlockCard/views/ResolvingView.js +4 -2
- package/dist/cjs/view/CardWithUrl/component.js +4 -2
- package/dist/cjs/view/CardWithUrl/loader.js +4 -2
- package/dist/cjs/view/EmbedCard/components/styled.js +15 -13
- package/dist/cjs/view/EmbedCard/views/ErroredView.js +3 -1
- package/dist/cjs/view/FlexibleCard/components/actions/action/index.js +26 -4
- package/dist/cjs/view/FlexibleCard/components/actions/index.js +18 -2
- package/dist/cjs/view/FlexibleCard/components/blocks/action-group/index.js +6 -0
- package/dist/cjs/view/FlexibleCard/components/blocks/block/index.js +9 -2
- package/dist/cjs/view/FlexibleCard/components/blocks/element-group/index.js +9 -2
- package/dist/cjs/view/FlexibleCard/components/blocks/footer-block/index.js +6 -0
- package/dist/cjs/view/FlexibleCard/components/blocks/metadata-block/index.js +9 -2
- package/dist/cjs/view/FlexibleCard/components/blocks/preview-block/index.js +5 -0
- package/dist/cjs/view/FlexibleCard/components/blocks/snippet-block/index.js +5 -0
- package/dist/cjs/view/FlexibleCard/components/blocks/title-block/errored/index.js +39 -19
- package/dist/cjs/view/FlexibleCard/components/blocks/title-block/index.js +92 -17
- package/dist/cjs/view/FlexibleCard/components/blocks/title-block/resolved/index.js +45 -9
- package/dist/cjs/view/FlexibleCard/components/blocks/title-block/resolving/index.js +23 -12
- package/dist/cjs/view/FlexibleCard/components/common/atlaskit-icon/index.js +8 -2
- package/dist/cjs/view/FlexibleCard/components/common/image-icon/index.js +3 -1
- package/dist/cjs/view/FlexibleCard/components/container/index.js +5 -0
- package/dist/cjs/view/FlexibleCard/components/elements/avatar-group/index.js +12 -1
- package/dist/cjs/view/FlexibleCard/components/elements/badge/index.js +18 -3
- package/dist/cjs/view/FlexibleCard/components/elements/date-time/index.js +9 -1
- package/dist/cjs/view/FlexibleCard/components/elements/icon/index.js +9 -1
- package/dist/cjs/view/FlexibleCard/components/elements/index.js +96 -0
- package/dist/cjs/view/FlexibleCard/components/elements/link/index.js +10 -1
- package/dist/cjs/view/FlexibleCard/components/elements/lozenge/index.js +11 -3
- package/dist/cjs/view/FlexibleCard/components/elements/media/index.js +9 -2
- package/dist/cjs/view/FlexibleCard/components/elements/text/index.js +12 -6
- package/dist/cjs/view/FlexibleCard/components/elements/utils.js +7 -3
- package/dist/cjs/view/FlexibleCard/index.js +6 -0
- package/dist/cjs/view/HoverCard/index.js +48 -10
- package/dist/cjs/view/HoverCard/styled.js +3 -1
- package/dist/cjs/view/InlineCard/ErroredView/index.js +3 -1
- package/dist/cjs/view/InlineCard/ForbiddenView/index.js +4 -2
- package/dist/cjs/view/InlineCard/Frame/styled.js +16 -13
- package/dist/cjs/view/InlineCard/Icon.js +3 -1
- package/dist/cjs/view/InlineCard/UnauthorisedView/index.js +4 -2
- package/dist/cjs/view/InlineCard/styled.js +6 -4
- package/dist/cjs/view/common/Byline.js +3 -1
- package/dist/cjs/view/common/Metadata.js +3 -1
- package/dist/cjs/view/common/ModalHeader.js +4 -2
- package/dist/es2019/extractors/common/context/extractProvider.js +13 -4
- package/dist/es2019/extractors/common/detail/extractCommentCount.js +2 -1
- package/dist/es2019/extractors/common/detail/extractProgrammingLanguage.js +2 -1
- package/dist/es2019/extractors/common/detail/extractSubscriberCount.js +2 -1
- package/dist/es2019/extractors/common/primitives/extractTitleTextColor.js +2 -1
- package/dist/es2019/state/actions/index.js +1 -1
- package/dist/es2019/state/analytics/useSmartLinkAnalytics.js +7 -2
- package/dist/es2019/state/flexible-ui-context/index.js +5 -0
- package/dist/es2019/utils/analytics/analytics.js +35 -0
- package/dist/es2019/utils/analytics/index.js +1 -1
- package/dist/es2019/version.json +1 -1
- package/dist/es2019/view/BlockCard/components/Frame.js +9 -7
- package/dist/es2019/view/BlockCard/components/Link.js +2 -1
- package/dist/es2019/view/BlockCard/components/Provider.js +2 -1
- package/dist/es2019/view/BlockCard/views/ErroredView.js +2 -1
- package/dist/es2019/view/BlockCard/views/ForbiddenView.js +2 -1
- package/dist/es2019/view/BlockCard/views/NotFoundView.js +2 -1
- package/dist/es2019/view/BlockCard/views/ResolvingView.js +3 -2
- package/dist/es2019/view/CardWithUrl/component.js +4 -2
- package/dist/es2019/view/CardWithUrl/loader.js +4 -2
- package/dist/es2019/view/EmbedCard/components/styled.js +15 -15
- package/dist/es2019/view/EmbedCard/views/ErroredView.js +2 -1
- package/dist/es2019/view/FlexibleCard/components/actions/action/index.js +37 -4
- package/dist/es2019/view/FlexibleCard/components/actions/index.js +18 -2
- package/dist/es2019/view/FlexibleCard/components/blocks/action-group/index.js +6 -0
- package/dist/es2019/view/FlexibleCard/components/blocks/block/index.js +9 -2
- package/dist/es2019/view/FlexibleCard/components/blocks/element-group/index.js +8 -2
- package/dist/es2019/view/FlexibleCard/components/blocks/footer-block/index.js +6 -0
- package/dist/es2019/view/FlexibleCard/components/blocks/metadata-block/index.js +9 -2
- package/dist/es2019/view/FlexibleCard/components/blocks/preview-block/index.js +5 -0
- package/dist/es2019/view/FlexibleCard/components/blocks/snippet-block/index.js +5 -0
- package/dist/es2019/view/FlexibleCard/components/blocks/title-block/errored/index.js +31 -15
- package/dist/es2019/view/FlexibleCard/components/blocks/title-block/index.js +77 -15
- package/dist/es2019/view/FlexibleCard/components/blocks/title-block/resolved/index.js +35 -8
- package/dist/es2019/view/FlexibleCard/components/blocks/title-block/resolving/index.js +20 -11
- package/dist/es2019/view/FlexibleCard/components/common/atlaskit-icon/index.js +8 -3
- package/dist/es2019/view/FlexibleCard/components/common/image-icon/index.js +7 -6
- package/dist/es2019/view/FlexibleCard/components/container/index.js +5 -0
- package/dist/es2019/view/FlexibleCard/components/elements/avatar-group/index.js +12 -1
- package/dist/es2019/view/FlexibleCard/components/elements/badge/index.js +18 -3
- package/dist/es2019/view/FlexibleCard/components/elements/date-time/index.js +9 -1
- package/dist/es2019/view/FlexibleCard/components/elements/icon/index.js +9 -1
- package/dist/es2019/view/FlexibleCard/components/elements/index.js +96 -0
- package/dist/es2019/view/FlexibleCard/components/elements/link/index.js +10 -1
- package/dist/es2019/view/FlexibleCard/components/elements/lozenge/index.js +11 -3
- package/dist/es2019/view/FlexibleCard/components/elements/media/index.js +8 -1
- package/dist/es2019/view/FlexibleCard/components/elements/text/index.js +11 -4
- package/dist/es2019/view/FlexibleCard/components/elements/utils.js +5 -2
- package/dist/es2019/view/FlexibleCard/index.js +6 -0
- package/dist/es2019/view/HoverCard/index.js +40 -10
- package/dist/es2019/view/HoverCard/styled.js +6 -1
- package/dist/es2019/view/InlineCard/ErroredView/index.js +2 -1
- package/dist/es2019/view/InlineCard/ForbiddenView/index.js +3 -2
- package/dist/es2019/view/InlineCard/Frame/styled.js +15 -12
- package/dist/es2019/view/InlineCard/Icon.js +7 -6
- package/dist/es2019/view/InlineCard/UnauthorisedView/index.js +3 -2
- package/dist/es2019/view/InlineCard/styled.js +5 -4
- package/dist/es2019/view/common/Byline.js +2 -1
- package/dist/es2019/view/common/Metadata.js +2 -1
- package/dist/es2019/view/common/ModalHeader.js +3 -2
- package/dist/esm/extractors/common/context/extractProvider.js +13 -4
- package/dist/esm/extractors/common/detail/extractCommentCount.js +2 -1
- package/dist/esm/extractors/common/detail/extractProgrammingLanguage.js +2 -1
- package/dist/esm/extractors/common/detail/extractSubscriberCount.js +2 -1
- package/dist/esm/extractors/common/primitives/extractTitleTextColor.js +2 -1
- package/dist/esm/state/actions/index.js +1 -1
- package/dist/esm/state/analytics/useSmartLinkAnalytics.js +10 -1
- package/dist/esm/state/flexible-ui-context/index.js +5 -0
- package/dist/esm/utils/analytics/analytics.js +41 -0
- package/dist/esm/utils/analytics/index.js +1 -1
- package/dist/esm/version.json +1 -1
- package/dist/esm/view/BlockCard/components/Frame.js +9 -7
- package/dist/esm/view/BlockCard/components/Link.js +2 -1
- package/dist/esm/view/BlockCard/components/Provider.js +2 -1
- package/dist/esm/view/BlockCard/views/ErroredView.js +2 -1
- package/dist/esm/view/BlockCard/views/ForbiddenView.js +2 -1
- package/dist/esm/view/BlockCard/views/NotFoundView.js +2 -1
- package/dist/esm/view/BlockCard/views/ResolvingView.js +3 -2
- package/dist/esm/view/CardWithUrl/component.js +4 -2
- package/dist/esm/view/CardWithUrl/loader.js +4 -2
- package/dist/esm/view/EmbedCard/components/styled.js +14 -13
- package/dist/esm/view/EmbedCard/views/ErroredView.js +2 -1
- package/dist/esm/view/FlexibleCard/components/actions/action/index.js +25 -4
- package/dist/esm/view/FlexibleCard/components/actions/index.js +18 -2
- package/dist/esm/view/FlexibleCard/components/blocks/action-group/index.js +6 -0
- package/dist/esm/view/FlexibleCard/components/blocks/block/index.js +9 -2
- package/dist/esm/view/FlexibleCard/components/blocks/element-group/index.js +8 -2
- package/dist/esm/view/FlexibleCard/components/blocks/footer-block/index.js +6 -0
- package/dist/esm/view/FlexibleCard/components/blocks/metadata-block/index.js +9 -2
- package/dist/esm/view/FlexibleCard/components/blocks/preview-block/index.js +5 -0
- package/dist/esm/view/FlexibleCard/components/blocks/snippet-block/index.js +5 -0
- package/dist/esm/view/FlexibleCard/components/blocks/title-block/errored/index.js +33 -16
- package/dist/esm/view/FlexibleCard/components/blocks/title-block/index.js +79 -17
- package/dist/esm/view/FlexibleCard/components/blocks/title-block/resolved/index.js +39 -8
- package/dist/esm/view/FlexibleCard/components/blocks/title-block/resolving/index.js +22 -11
- package/dist/esm/view/FlexibleCard/components/common/atlaskit-icon/index.js +8 -3
- package/dist/esm/view/FlexibleCard/components/common/image-icon/index.js +2 -1
- package/dist/esm/view/FlexibleCard/components/container/index.js +5 -0
- package/dist/esm/view/FlexibleCard/components/elements/avatar-group/index.js +12 -1
- package/dist/esm/view/FlexibleCard/components/elements/badge/index.js +18 -3
- package/dist/esm/view/FlexibleCard/components/elements/date-time/index.js +9 -1
- package/dist/esm/view/FlexibleCard/components/elements/icon/index.js +9 -1
- package/dist/esm/view/FlexibleCard/components/elements/index.js +96 -0
- package/dist/esm/view/FlexibleCard/components/elements/link/index.js +10 -1
- package/dist/esm/view/FlexibleCard/components/elements/lozenge/index.js +11 -3
- package/dist/esm/view/FlexibleCard/components/elements/media/index.js +9 -2
- package/dist/esm/view/FlexibleCard/components/elements/text/index.js +12 -6
- package/dist/esm/view/FlexibleCard/components/elements/utils.js +5 -3
- package/dist/esm/view/FlexibleCard/index.js +6 -0
- package/dist/esm/view/HoverCard/index.js +42 -10
- package/dist/esm/view/HoverCard/styled.js +2 -1
- package/dist/esm/view/InlineCard/ErroredView/index.js +2 -1
- package/dist/esm/view/InlineCard/ForbiddenView/index.js +3 -2
- package/dist/esm/view/InlineCard/Frame/styled.js +16 -13
- package/dist/esm/view/InlineCard/Icon.js +2 -1
- package/dist/esm/view/InlineCard/UnauthorisedView/index.js +3 -2
- package/dist/esm/view/InlineCard/styled.js +5 -4
- package/dist/esm/view/common/Byline.js +2 -1
- package/dist/esm/view/common/Metadata.js +2 -1
- package/dist/esm/view/common/ModalHeader.js +3 -2
- package/dist/types/state/analytics/useSmartLinkAnalytics.d.ts +4 -0
- package/dist/types/state/flexible-ui-context/index.d.ts +4 -0
- package/dist/types/state/flexible-ui-context/types.d.ts +102 -0
- package/dist/types/state/hooks/useSmartLink.d.ts +3 -0
- package/dist/types/utils/analytics/analytics.d.ts +4 -0
- package/dist/types/utils/analytics/index.d.ts +1 -1
- package/dist/types/utils/types.d.ts +2 -2
- package/dist/types/view/Card/index.d.ts +1 -1
- package/dist/types/view/Card/types.d.ts +1 -0
- package/dist/types/view/CardWithUrl/component.d.ts +1 -1
- package/dist/types/view/CardWithUrl/types.d.ts +1 -0
- package/dist/types/view/FlexibleCard/components/actions/action/index.d.ts +8 -0
- package/dist/types/view/FlexibleCard/components/actions/action/types.d.ts +4 -2
- package/dist/types/view/FlexibleCard/components/actions/index.d.ts +15 -0
- package/dist/types/view/FlexibleCard/components/blocks/action-group/index.d.ts +6 -0
- package/dist/types/view/FlexibleCard/components/blocks/action-group/types.d.ts +1 -1
- package/dist/types/view/FlexibleCard/components/blocks/block/index.d.ts +6 -0
- package/dist/types/view/FlexibleCard/components/blocks/element-group/index.d.ts +6 -0
- package/dist/types/view/FlexibleCard/components/blocks/element-group/types.d.ts +2 -2
- package/dist/types/view/FlexibleCard/components/blocks/footer-block/index.d.ts +6 -0
- package/dist/types/view/FlexibleCard/components/blocks/metadata-block/index.d.ts +6 -0
- package/dist/types/view/FlexibleCard/components/blocks/preview-block/index.d.ts +5 -0
- package/dist/types/view/FlexibleCard/components/blocks/snippet-block/index.d.ts +5 -0
- package/dist/types/view/FlexibleCard/components/blocks/title-block/errored/index.d.ts +9 -2
- package/dist/types/view/FlexibleCard/components/blocks/title-block/index.d.ts +11 -0
- package/dist/types/view/FlexibleCard/components/blocks/title-block/resolved/index.d.ts +7 -3
- package/dist/types/view/FlexibleCard/components/blocks/title-block/resolving/index.d.ts +8 -2
- package/dist/types/view/FlexibleCard/components/blocks/title-block/types.d.ts +10 -1
- package/dist/types/view/FlexibleCard/components/blocks/types.d.ts +7 -5
- package/dist/types/view/FlexibleCard/components/container/index.d.ts +4 -0
- package/dist/types/view/FlexibleCard/components/container/types.d.ts +2 -2
- package/dist/types/view/FlexibleCard/components/elements/avatar-group/index.d.ts +7 -0
- package/dist/types/view/FlexibleCard/components/elements/badge/index.d.ts +13 -0
- package/dist/types/view/FlexibleCard/components/elements/date-time/index.d.ts +7 -0
- package/dist/types/view/FlexibleCard/components/elements/icon/index.d.ts +6 -0
- package/dist/types/view/FlexibleCard/components/elements/icon/types.d.ts +5 -1
- package/dist/types/view/FlexibleCard/components/elements/index.d.ts +77 -0
- package/dist/types/view/FlexibleCard/components/elements/link/index.d.ts +6 -0
- package/dist/types/view/FlexibleCard/components/elements/lozenge/index.d.ts +6 -0
- package/dist/types/view/FlexibleCard/components/elements/media/index.d.ts +6 -0
- package/dist/types/view/FlexibleCard/components/elements/text/index.d.ts +6 -0
- package/dist/types/view/FlexibleCard/components/elements/text/types.d.ts +1 -2
- package/dist/types/view/FlexibleCard/components/elements/types.d.ts +2 -0
- package/dist/types/view/FlexibleCard/index.d.ts +6 -0
- package/dist/types/view/HoverCard/index.d.ts +3 -2
- package/dist/types/view/HoverCard/types.d.ts +5 -2
- package/package.json +7 -2
- package/dist/cjs/view/FlexibleCard/components/blocks/title-block/utils.js +0 -105
- package/dist/es2019/view/FlexibleCard/components/blocks/title-block/utils.js +0 -71
- package/dist/esm/view/FlexibleCard/components/blocks/title-block/utils.js +0 -76
- package/dist/types/view/FlexibleCard/components/blocks/title-block/utils.d.ts +0 -11
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,32 @@
|
|
|
1
1
|
# @atlaskit/smart-card
|
|
2
2
|
|
|
3
|
+
## 18.0.17
|
|
4
|
+
|
|
5
|
+
### Patch Changes
|
|
6
|
+
|
|
7
|
+
- [`79b365c3757`](https://bitbucket.org/atlassian/atlassian-frontend/commits/79b365c3757) - [ux] If the "authFlow: disabled" prop is provided on the Smart Card Provider, then the call to action to authenticate forbidden links will also be disabled (in addition to the existing behaviour where only unauthenticated links have the call to action disabled).
|
|
8
|
+
|
|
9
|
+
## 18.0.16
|
|
10
|
+
|
|
11
|
+
### Patch Changes
|
|
12
|
+
|
|
13
|
+
- [`63d05619104`](https://bitbucket.org/atlassian/atlassian-frontend/commits/63d05619104) - [ux] Instrumented `@atlaskit/smart-card` with the new theming package, `@atlaskit/tokens`.
|
|
14
|
+
|
|
15
|
+
New tokens will be visible only in applications configured to use the new Tokens API (currently in alpha).
|
|
16
|
+
These changes are intended to be interoperable with the legacy theme implementation. Legacy dark mode users should expect no visual or breaking changes.
|
|
17
|
+
|
|
18
|
+
## 18.0.15
|
|
19
|
+
|
|
20
|
+
### Patch Changes
|
|
21
|
+
|
|
22
|
+
- [`c2a240de738`](https://bitbucket.org/atlassian/atlassian-frontend/commits/c2a240de738) - Add inline documentation for Flexible UI
|
|
23
|
+
- [`6976489a51a`](https://bitbucket.org/atlassian/atlassian-frontend/commits/6976489a51a) - Flexible UI: Enable css override for actions
|
|
24
|
+
- [`7d4e18ffddb`](https://bitbucket.org/atlassian/atlassian-frontend/commits/7d4e18ffddb) - instrument analytics events for hover card
|
|
25
|
+
- [`a123e96fc62`](https://bitbucket.org/atlassian/atlassian-frontend/commits/a123e96fc62) - expose prop on smart card
|
|
26
|
+
- [`5af3b7aba2a`](https://bitbucket.org/atlassian/atlassian-frontend/commits/5af3b7aba2a) - Flexible UI: Fix icon-only action padding
|
|
27
|
+
- [`3e19e206713`](https://bitbucket.org/atlassian/atlassian-frontend/commits/3e19e206713) - Flexible UI: Enable css override on elements
|
|
28
|
+
- [`750cb867124`](https://bitbucket.org/atlassian/atlassian-frontend/commits/750cb867124) - Flexible UI: Enable css override on blocks
|
|
29
|
+
|
|
3
30
|
## 18.0.14
|
|
4
31
|
|
|
5
32
|
### Patch Changes
|
|
@@ -11,6 +11,8 @@ var _react = _interopRequireDefault(require("react"));
|
|
|
11
11
|
|
|
12
12
|
var _colors = require("@atlaskit/theme/colors");
|
|
13
13
|
|
|
14
|
+
var _tokens = require("@atlaskit/tokens");
|
|
15
|
+
|
|
14
16
|
var _confluenceIcon = require("@atlaskit/logo/confluence-icon");
|
|
15
17
|
|
|
16
18
|
var _jiraIcon = require("@atlaskit/logo/jira-icon");
|
|
@@ -50,18 +52,26 @@ var extractProviderIcon = function extractProviderIcon(icon, id) {
|
|
|
50
52
|
if (id) {
|
|
51
53
|
if (id === _constants.CONFLUENCE_GENERATOR_ID) {
|
|
52
54
|
return /*#__PURE__*/_react.default.createElement(_confluenceIcon.ConfluenceIcon, {
|
|
53
|
-
textColor: _colors.N700
|
|
55
|
+
textColor: (0, _tokens.token)('color.text.subtle', _colors.N700)
|
|
56
|
+
/* eslint-disable @atlaskit/design-system/ensure-design-token-usage */
|
|
57
|
+
,
|
|
54
58
|
iconColor: _colors.B200,
|
|
55
59
|
iconGradientStart: _colors.B400,
|
|
56
|
-
iconGradientStop: _colors.B200
|
|
60
|
+
iconGradientStop: _colors.B200
|
|
61
|
+
/* eslint-enable @atlaskit/design-system/ensure-design-token-usage */
|
|
62
|
+
,
|
|
57
63
|
size: "xsmall"
|
|
58
64
|
});
|
|
59
65
|
} else if (id === _constants.JIRA_GENERATOR_ID) {
|
|
60
66
|
return /*#__PURE__*/_react.default.createElement(_jiraIcon.JiraIcon, {
|
|
61
|
-
textColor: _colors.N700
|
|
67
|
+
textColor: (0, _tokens.token)('color.text.subtle', _colors.N700)
|
|
68
|
+
/* eslint-disable @atlaskit/design-system/ensure-design-token-usage */
|
|
69
|
+
,
|
|
62
70
|
iconColor: _colors.B200,
|
|
63
71
|
iconGradientStart: _colors.B400,
|
|
64
|
-
iconGradientStop: _colors.B200
|
|
72
|
+
iconGradientStop: _colors.B200
|
|
73
|
+
/* eslint-enable @atlaskit/design-system/ensure-design-token-usage */
|
|
74
|
+
,
|
|
65
75
|
size: "xsmall"
|
|
66
76
|
});
|
|
67
77
|
}
|
|
@@ -11,6 +11,8 @@ var _react = _interopRequireDefault(require("react"));
|
|
|
11
11
|
|
|
12
12
|
var _colors = require("@atlaskit/theme/colors");
|
|
13
13
|
|
|
14
|
+
var _tokens = require("@atlaskit/tokens");
|
|
15
|
+
|
|
14
16
|
var _comment = _interopRequireDefault(require("@atlaskit/icon/glyph/comment"));
|
|
15
17
|
|
|
16
18
|
var extractCommentCount = function extractCommentCount(jsonLd) {
|
|
@@ -23,7 +25,7 @@ var extractCommentCount = function extractCommentCount(jsonLd) {
|
|
|
23
25
|
label: "comment-count",
|
|
24
26
|
key: "comments-count-icon",
|
|
25
27
|
size: "small",
|
|
26
|
-
primaryColor: _colors.N600
|
|
28
|
+
primaryColor: (0, _tokens.token)('color.icon.subtle', _colors.N600)
|
|
27
29
|
})
|
|
28
30
|
};
|
|
29
31
|
}
|
|
@@ -13,6 +13,8 @@ var _colors = require("@atlaskit/theme/colors");
|
|
|
13
13
|
|
|
14
14
|
var _code = _interopRequireDefault(require("@atlaskit/icon/glyph/code"));
|
|
15
15
|
|
|
16
|
+
var _tokens = require("@atlaskit/tokens");
|
|
17
|
+
|
|
16
18
|
var extractProgrammingLanguage = function extractProgrammingLanguage(jsonLd) {
|
|
17
19
|
var programmingLanguage = jsonLd['schema:programmingLanguage'];
|
|
18
20
|
|
|
@@ -22,7 +24,7 @@ var extractProgrammingLanguage = function extractProgrammingLanguage(jsonLd) {
|
|
|
22
24
|
icon: /*#__PURE__*/_react.default.createElement(_code.default, {
|
|
23
25
|
size: "small",
|
|
24
26
|
label: "code",
|
|
25
|
-
primaryColor: _colors.N600
|
|
27
|
+
primaryColor: (0, _tokens.token)('color.icon.subtle', _colors.N600)
|
|
26
28
|
})
|
|
27
29
|
};
|
|
28
30
|
}
|
|
@@ -13,6 +13,8 @@ var _colors = require("@atlaskit/theme/colors");
|
|
|
13
13
|
|
|
14
14
|
var _people = _interopRequireDefault(require("@atlaskit/icon/glyph/people"));
|
|
15
15
|
|
|
16
|
+
var _tokens = require("@atlaskit/tokens");
|
|
17
|
+
|
|
16
18
|
var extractSubscriberCount = function extractSubscriberCount(jsonLd) {
|
|
17
19
|
var subscriberCount = jsonLd['atlassian:subscriberCount'];
|
|
18
20
|
|
|
@@ -22,7 +24,7 @@ var extractSubscriberCount = function extractSubscriberCount(jsonLd) {
|
|
|
22
24
|
icon: /*#__PURE__*/_react.default.createElement(_people.default, {
|
|
23
25
|
size: "small",
|
|
24
26
|
label: "subscribers",
|
|
25
|
-
primaryColor: _colors.N600
|
|
27
|
+
primaryColor: (0, _tokens.token)('color.icon.subtle', _colors.N600)
|
|
26
28
|
})
|
|
27
29
|
};
|
|
28
30
|
}
|
|
@@ -9,6 +9,8 @@ var _priority = require("../icon/priority");
|
|
|
9
9
|
|
|
10
10
|
var _colors = require("@atlaskit/theme/colors");
|
|
11
11
|
|
|
12
|
+
var _tokens = require("@atlaskit/tokens");
|
|
13
|
+
|
|
12
14
|
var extractTitleTextColor = function extractTitleTextColor(jsonLd) {
|
|
13
15
|
var type = jsonLd['@type'];
|
|
14
16
|
|
|
@@ -19,7 +21,7 @@ var extractTitleTextColor = function extractTitleTextColor(jsonLd) {
|
|
|
19
21
|
|
|
20
22
|
switch (highestPriorityType) {
|
|
21
23
|
case 'atlassian:UndefinedLink':
|
|
22
|
-
return _colors.R500;
|
|
24
|
+
return (0, _tokens.token)('color.text.danger', _colors.R500);
|
|
23
25
|
|
|
24
26
|
default:
|
|
25
27
|
return undefined;
|
|
@@ -98,7 +98,7 @@ var useSmartCardActions = function useSmartCardActions(id, url, analytics) {
|
|
|
98
98
|
var nextStatus = response ? (0, _helpers2.getStatus)(response) : 'fatal'; // If we require authorization & do not have an authFlow available,
|
|
99
99
|
// throw an error and render as a normal blue link.
|
|
100
100
|
|
|
101
|
-
if (nextStatus === 'unauthorized' && !hasAuthFlowSupported) {
|
|
101
|
+
if ((nextStatus === 'unauthorized' || nextStatus === 'forbidden') && !hasAuthFlowSupported) {
|
|
102
102
|
handleResolvedLinkError(resourceUrl, new _errors.APIError('fallback', hostname, _constants.ERROR_MESSAGE_OAUTH));
|
|
103
103
|
return;
|
|
104
104
|
} // Handle any other errors
|
|
@@ -32,6 +32,9 @@ var useSmartLinkAnalytics = function useSmartLinkAnalytics(dispatchAnalytics) {
|
|
|
32
32
|
});
|
|
33
33
|
dispatchAnalytics((0, _analytics.uiActionClickedEvent)(extensionKey, actionType, display));
|
|
34
34
|
},
|
|
35
|
+
hoverCardOpenLinkClickedEvent: function hoverCardOpenLinkClickedEvent(previewDisplay, definitionId, extensionKey, previewInvokeMethod) {
|
|
36
|
+
dispatchAnalytics((0, _analytics.uiHoverCardOpenLinkClickedEvent)(previewDisplay, definitionId, extensionKey, previewInvokeMethod));
|
|
37
|
+
},
|
|
35
38
|
closedAuthEvent: function closedAuthEvent(display, definitionId, extensionKey) {
|
|
36
39
|
return dispatchAnalytics((0, _analytics.uiClosedAuthEvent)(display, definitionId, extensionKey));
|
|
37
40
|
},
|
|
@@ -45,6 +48,12 @@ var useSmartLinkAnalytics = function useSmartLinkAnalytics(dispatchAnalytics) {
|
|
|
45
48
|
display: display
|
|
46
49
|
});
|
|
47
50
|
dispatchAnalytics((0, _analytics.uiRenderSuccessEvent)(display, definitionId, extensionKey));
|
|
51
|
+
},
|
|
52
|
+
hoverCardViewedEvent: function hoverCardViewedEvent(hoverDisplay, definitionId, extensionKey, previewInvokeMethod) {
|
|
53
|
+
return dispatchAnalytics((0, _analytics.uiHoverCardViewedEvent)(hoverDisplay, definitionId, extensionKey, previewInvokeMethod));
|
|
54
|
+
},
|
|
55
|
+
hoverCardDismissedEvent: function hoverCardDismissedEvent(hoverDisplay, hoverTime, definitionId, extensionKey, previewInvokeMethod) {
|
|
56
|
+
return dispatchAnalytics((0, _analytics.uiHoverCardDismissedEvent)(hoverDisplay, hoverTime, definitionId, extensionKey, previewInvokeMethod));
|
|
48
57
|
}
|
|
49
58
|
};
|
|
50
59
|
}, [dispatchAnalytics]);
|
|
@@ -7,6 +7,10 @@ exports.useFlexibleUiContext = exports.FlexibleUiContext = void 0;
|
|
|
7
7
|
|
|
8
8
|
var _react = require("react");
|
|
9
9
|
|
|
10
|
+
/**
|
|
11
|
+
* This provides the data that will be used by Smart Links Flexible UI to populate it's
|
|
12
|
+
* underlying elements.
|
|
13
|
+
*/
|
|
10
14
|
var FlexibleUiContext = /*#__PURE__*/(0, _react.createContext)(undefined);
|
|
11
15
|
exports.FlexibleUiContext = FlexibleUiContext;
|
|
12
16
|
|
|
@@ -5,7 +5,7 @@ var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefau
|
|
|
5
5
|
Object.defineProperty(exports, "__esModule", {
|
|
6
6
|
value: true
|
|
7
7
|
});
|
|
8
|
-
exports.unresolvedEvent = exports.uiRenderSuccessEvent = exports.uiRenderFailedEvent = exports.uiClosedAuthEvent = exports.uiCardClickedEvent = exports.uiAuthEvent = exports.uiAuthAlternateAccountEvent = exports.uiActionClickedEvent = exports.trackAppAccountConnected = exports.screenAuthPopupEvent = exports.resolvedEvent = exports.invokeSucceededEvent = exports.invokeFailedEvent = exports.fireSmartLinkEvent = exports.context = exports.connectSucceededEvent = exports.connectFailedEvent = exports.SmartLinkEvents = exports.ANALYTICS_CHANNEL = void 0;
|
|
8
|
+
exports.unresolvedEvent = exports.uiRenderSuccessEvent = exports.uiRenderFailedEvent = exports.uiHoverCardViewedEvent = exports.uiHoverCardOpenLinkClickedEvent = exports.uiHoverCardDismissedEvent = exports.uiClosedAuthEvent = exports.uiCardClickedEvent = exports.uiAuthEvent = exports.uiAuthAlternateAccountEvent = exports.uiActionClickedEvent = exports.trackAppAccountConnected = exports.screenAuthPopupEvent = exports.resolvedEvent = exports.invokeSucceededEvent = exports.invokeFailedEvent = exports.fireSmartLinkEvent = exports.context = exports.connectSucceededEvent = exports.connectFailedEvent = exports.SmartLinkEvents = exports.ANALYTICS_CHANNEL = void 0;
|
|
9
9
|
|
|
10
10
|
var _defineProperty2 = _interopRequireDefault(require("@babel/runtime/helpers/defineProperty"));
|
|
11
11
|
|
|
@@ -317,4 +317,54 @@ var uiRenderFailedEvent = function uiRenderFailedEvent(display, error, errorInfo
|
|
|
317
317
|
};
|
|
318
318
|
};
|
|
319
319
|
|
|
320
|
-
exports.uiRenderFailedEvent = uiRenderFailedEvent;
|
|
320
|
+
exports.uiRenderFailedEvent = uiRenderFailedEvent;
|
|
321
|
+
|
|
322
|
+
var uiHoverCardViewedEvent = function uiHoverCardViewedEvent(hoverDisplay, definitionId, extensionKey, previewInvokeMethod) {
|
|
323
|
+
return {
|
|
324
|
+
action: 'viewed',
|
|
325
|
+
actionSubject: 'hoverCard',
|
|
326
|
+
eventType: 'ui',
|
|
327
|
+
attributes: _objectSpread(_objectSpread({}, context), {}, {
|
|
328
|
+
definitionId: definitionId || '',
|
|
329
|
+
extensionKey: extensionKey || '',
|
|
330
|
+
hoverDisplay: hoverDisplay,
|
|
331
|
+
previewInvokeMethod: previewInvokeMethod
|
|
332
|
+
})
|
|
333
|
+
};
|
|
334
|
+
};
|
|
335
|
+
|
|
336
|
+
exports.uiHoverCardViewedEvent = uiHoverCardViewedEvent;
|
|
337
|
+
|
|
338
|
+
var uiHoverCardDismissedEvent = function uiHoverCardDismissedEvent(hoverDisplay, hoverTime, definitionId, extensionKey, previewInvokeMethod) {
|
|
339
|
+
return {
|
|
340
|
+
action: 'dismissed',
|
|
341
|
+
actionSubject: 'hoverCard',
|
|
342
|
+
eventType: 'ui',
|
|
343
|
+
attributes: _objectSpread(_objectSpread({}, context), {}, {
|
|
344
|
+
definitionId: definitionId || '',
|
|
345
|
+
extensionKey: extensionKey || '',
|
|
346
|
+
hoverTime: hoverTime,
|
|
347
|
+
hoverDisplay: hoverDisplay,
|
|
348
|
+
previewInvokeMethod: previewInvokeMethod
|
|
349
|
+
})
|
|
350
|
+
};
|
|
351
|
+
};
|
|
352
|
+
|
|
353
|
+
exports.uiHoverCardDismissedEvent = uiHoverCardDismissedEvent;
|
|
354
|
+
|
|
355
|
+
var uiHoverCardOpenLinkClickedEvent = function uiHoverCardOpenLinkClickedEvent(previewDisplay, definitionId, extensionKey, previewInvokeMethod) {
|
|
356
|
+
return {
|
|
357
|
+
action: 'clicked',
|
|
358
|
+
actionSubject: 'button',
|
|
359
|
+
actionSubjectId: 'shortcutGoToLink',
|
|
360
|
+
eventType: 'ui',
|
|
361
|
+
attributes: _objectSpread(_objectSpread({}, context), {}, {
|
|
362
|
+
definitionId: definitionId || '',
|
|
363
|
+
extensionKey: extensionKey || '',
|
|
364
|
+
previewDisplay: previewDisplay,
|
|
365
|
+
previewInvokeMethod: previewInvokeMethod
|
|
366
|
+
})
|
|
367
|
+
};
|
|
368
|
+
};
|
|
369
|
+
|
|
370
|
+
exports.uiHoverCardOpenLinkClickedEvent = uiHoverCardOpenLinkClickedEvent;
|
|
@@ -96,6 +96,24 @@ Object.defineProperty(exports, "uiClosedAuthEvent", {
|
|
|
96
96
|
return _analytics.uiClosedAuthEvent;
|
|
97
97
|
}
|
|
98
98
|
});
|
|
99
|
+
Object.defineProperty(exports, "uiHoverCardDismissedEvent", {
|
|
100
|
+
enumerable: true,
|
|
101
|
+
get: function get() {
|
|
102
|
+
return _analytics.uiHoverCardDismissedEvent;
|
|
103
|
+
}
|
|
104
|
+
});
|
|
105
|
+
Object.defineProperty(exports, "uiHoverCardOpenLinkClickedEvent", {
|
|
106
|
+
enumerable: true,
|
|
107
|
+
get: function get() {
|
|
108
|
+
return _analytics.uiHoverCardOpenLinkClickedEvent;
|
|
109
|
+
}
|
|
110
|
+
});
|
|
111
|
+
Object.defineProperty(exports, "uiHoverCardViewedEvent", {
|
|
112
|
+
enumerable: true,
|
|
113
|
+
get: function get() {
|
|
114
|
+
return _analytics.uiHoverCardViewedEvent;
|
|
115
|
+
}
|
|
116
|
+
});
|
|
99
117
|
Object.defineProperty(exports, "uiRenderFailedEvent", {
|
|
100
118
|
enumerable: true,
|
|
101
119
|
get: function get() {
|
package/dist/cjs/version.json
CHANGED
|
@@ -15,6 +15,8 @@ var _react = _interopRequireDefault(require("react"));
|
|
|
15
15
|
|
|
16
16
|
var _colors = require("@atlaskit/theme/colors");
|
|
17
17
|
|
|
18
|
+
var _tokens = require("@atlaskit/tokens");
|
|
19
|
+
|
|
18
20
|
var _utils = require("../../common/utils");
|
|
19
21
|
|
|
20
22
|
function ownKeys(object, enumerableOnly) { var keys = Object.keys(object); if (Object.getOwnPropertySymbols) { var symbols = Object.getOwnPropertySymbols(object); enumerableOnly && (symbols = symbols.filter(function (sym) { return Object.getOwnPropertyDescriptor(object, sym).enumerable; })), keys.push.apply(keys, symbols); } return keys; }
|
|
@@ -35,7 +37,7 @@ var sharedFrameStyles = {
|
|
|
35
37
|
maxWidth: (0, _utils.gs)(95),
|
|
36
38
|
width: '100%',
|
|
37
39
|
display: 'flex',
|
|
38
|
-
backgroundColor: 'white'
|
|
40
|
+
backgroundColor: (0, _tokens.token)('elevation.surface', 'white')
|
|
39
41
|
};
|
|
40
42
|
|
|
41
43
|
var ExpandedFrame = function ExpandedFrame(_ref) {
|
|
@@ -48,15 +50,16 @@ var ExpandedFrame = function ExpandedFrame(_ref) {
|
|
|
48
50
|
return (0, _core.jsx)("div", {
|
|
49
51
|
css: (0, _utils.mq)(_objectSpread(_objectSpread({}, sharedFrameStyles), {}, {
|
|
50
52
|
'&:hover': isHoverable ? {
|
|
51
|
-
|
|
53
|
+
// TODO: https://product-fabric.atlassian.net/browse/DSP-4064
|
|
54
|
+
backgroundColor: (0, _tokens.token)('color.background.neutral.subtle.hovered', _colors.N20A),
|
|
52
55
|
cursor: 'pointer'
|
|
53
56
|
} : undefined,
|
|
54
57
|
minHeight: isFluidHeight ? 0 : [(0, _utils.gs)(21), (0, _utils.gs)(15)],
|
|
55
58
|
borderRadius: isSelected ? (0, _utils.br)() : (0, _utils.br)(0.5),
|
|
56
|
-
border: "2px solid ".concat(isSelected ? _colors.B200 : 'transparent'),
|
|
59
|
+
border: "2px solid ".concat(isSelected ? (0, _tokens.token)('color.border.selected', _colors.B200) : 'transparent'),
|
|
57
60
|
justifyContent: 'space-between',
|
|
58
61
|
overflow: 'hidden',
|
|
59
|
-
boxShadow: "0 1px 1px ".concat(_colors.N50A, ", 0 0 1px 1px ").concat(_colors.N40A
|
|
62
|
+
boxShadow: (0, _tokens.token)('elevation.shadow.raised', "0 1px 1px ".concat(_colors.N50A, ", 0 0 1px 1px ").concat(_colors.N40A))
|
|
60
63
|
})),
|
|
61
64
|
"data-testid": testId,
|
|
62
65
|
className: className,
|
|
@@ -76,14 +79,14 @@ var CompactFrame = function CompactFrame(_ref2) {
|
|
|
76
79
|
return (0, _core.jsx)("div", {
|
|
77
80
|
css: (0, _utils.mq)(_objectSpread(_objectSpread({}, sharedFrameStyles), {}, {
|
|
78
81
|
'&:hover': isHoverable ? {
|
|
79
|
-
backgroundColor: _colors.N30A
|
|
82
|
+
backgroundColor: (0, _tokens.token)('color.background.neutral.hovered', _colors.N30A)
|
|
80
83
|
} : undefined,
|
|
81
84
|
borderRadius: isSelected ? (0, _utils.br)() : (0, _utils.br)(0.5),
|
|
82
|
-
border: isSelected ? "2px solid ".concat(_colors.B200) : '',
|
|
85
|
+
border: isSelected ? "2px solid ".concat((0, _tokens.token)('color.border.selected', _colors.B200)) : '',
|
|
83
86
|
justifyContent: 'center',
|
|
84
87
|
alignItems: 'center',
|
|
85
88
|
height: inheritDimensions ? '100%' : (0, _utils.gs)(5),
|
|
86
|
-
backgroundColor: _colors.N20A,
|
|
89
|
+
backgroundColor: (0, _tokens.token)('color.background.neutral', _colors.N20A),
|
|
87
90
|
width: ['calc(100% - 16px)', '100%'],
|
|
88
91
|
padding: ["0px ".concat((0, _utils.gs)(1)), '0']
|
|
89
92
|
})),
|
|
@@ -9,6 +9,8 @@ var _core = require("@emotion/core");
|
|
|
9
9
|
|
|
10
10
|
var _colors = require("@atlaskit/theme/colors");
|
|
11
11
|
|
|
12
|
+
var _tokens = require("@atlaskit/tokens");
|
|
13
|
+
|
|
12
14
|
/** @jsx jsx */
|
|
13
15
|
var Link = function Link(_ref) {
|
|
14
16
|
var url = _ref.url,
|
|
@@ -19,7 +21,7 @@ var Link = function Link(_ref) {
|
|
|
19
21
|
"data-testid": "".concat(testId, "-link"),
|
|
20
22
|
className: className,
|
|
21
23
|
css: {
|
|
22
|
-
color: _colors.B400,
|
|
24
|
+
color: (0, _tokens.token)('color.link', _colors.B400),
|
|
23
25
|
wordBreak: 'break-all'
|
|
24
26
|
}
|
|
25
27
|
}, url);
|
|
@@ -11,6 +11,8 @@ var _colors = require("@atlaskit/theme/colors");
|
|
|
11
11
|
|
|
12
12
|
var _utils = require("../../common/utils");
|
|
13
13
|
|
|
14
|
+
var _tokens = require("@atlaskit/tokens");
|
|
15
|
+
|
|
14
16
|
/** @jsx jsx */
|
|
15
17
|
var Provider = function Provider(_ref) {
|
|
16
18
|
var name = _ref.name,
|
|
@@ -36,7 +38,7 @@ var Provider = function Provider(_ref) {
|
|
|
36
38
|
}, iconToRender, (0, _core.jsx)("span", {
|
|
37
39
|
css: {
|
|
38
40
|
fontSize: (0, _utils.gs)(1.5),
|
|
39
|
-
color: _colors.N300,
|
|
41
|
+
color: (0, _tokens.token)('color.text.subtlest', _colors.N300),
|
|
40
42
|
margin: 0,
|
|
41
43
|
marginLeft: (0, _utils.gs)(0.5),
|
|
42
44
|
// EDM-713: fixes copy-paste from renderer to editor for Firefox
|
|
@@ -41,6 +41,8 @@ var _UnresolvedText = require("../components/UnresolvedText");
|
|
|
41
41
|
|
|
42
42
|
var _RetryAction = require("../actions/RetryAction");
|
|
43
43
|
|
|
44
|
+
var _tokens = require("@atlaskit/tokens");
|
|
45
|
+
|
|
44
46
|
function ownKeys(object, enumerableOnly) { var keys = Object.keys(object); if (Object.getOwnPropertySymbols) { var symbols = Object.getOwnPropertySymbols(object); enumerableOnly && (symbols = symbols.filter(function (sym) { return Object.getOwnPropertyDescriptor(object, sym).enumerable; })), keys.push.apply(keys, symbols); } return keys; }
|
|
45
47
|
|
|
46
48
|
function _objectSpread(target) { for (var i = 1; i < arguments.length; i++) { var source = null != arguments[i] ? arguments[i] : {}; i % 2 ? ownKeys(Object(source), !0).forEach(function (key) { (0, _defineProperty2.default)(target, key, source[key]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(target, Object.getOwnPropertyDescriptors(source)) : ownKeys(Object(source)).forEach(function (key) { Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key)); }); } return target; }
|
|
@@ -88,7 +90,7 @@ var ErroredView = function ErroredView(_ref) {
|
|
|
88
90
|
icon: (0, _core.jsx)(_warning.default, {
|
|
89
91
|
label: "errored-warning-icon",
|
|
90
92
|
size: "small",
|
|
91
|
-
primaryColor: _colors.R300,
|
|
93
|
+
primaryColor: (0, _tokens.token)('color.icon.warning', _colors.R300),
|
|
92
94
|
testId: "".concat(testId, "-warning-icon")
|
|
93
95
|
}),
|
|
94
96
|
text: (0, _core.jsx)(_reactIntlNext.FormattedMessage, textDescriptionProps)
|
|
@@ -17,6 +17,8 @@ var _reactIntlNext = require("react-intl-next");
|
|
|
17
17
|
|
|
18
18
|
var _colors = require("@atlaskit/theme/colors");
|
|
19
19
|
|
|
20
|
+
var _tokens = require("@atlaskit/tokens");
|
|
21
|
+
|
|
20
22
|
var _lockFilled = _interopRequireDefault(require("@atlaskit/icon/glyph/lock-filled"));
|
|
21
23
|
|
|
22
24
|
var _Frame = require("../components/Frame");
|
|
@@ -93,7 +95,7 @@ var ForbiddenView = function ForbiddenView(_ref) {
|
|
|
93
95
|
icon: (0, _core.jsx)(_lockFilled.default, {
|
|
94
96
|
label: "forbidden-lock-icon",
|
|
95
97
|
size: "small",
|
|
96
|
-
primaryColor: _colors.R300,
|
|
98
|
+
primaryColor: (0, _tokens.token)('color.icon.danger', _colors.R300),
|
|
97
99
|
testId: "".concat(testId, "-lock-icon")
|
|
98
100
|
}),
|
|
99
101
|
text: (0, _core.jsx)(_reactIntlNext.FormattedMessage, (0, _extends2.default)({}, _messages.messages[descriptiveMessageKey], {
|
|
@@ -39,6 +39,8 @@ var _UnresolvedText = require("../components/UnresolvedText");
|
|
|
39
39
|
|
|
40
40
|
var _handlers = require("../utils/handlers");
|
|
41
41
|
|
|
42
|
+
var _tokens = require("@atlaskit/tokens");
|
|
43
|
+
|
|
42
44
|
function ownKeys(object, enumerableOnly) { var keys = Object.keys(object); if (Object.getOwnPropertySymbols) { var symbols = Object.getOwnPropertySymbols(object); enumerableOnly && (symbols = symbols.filter(function (sym) { return Object.getOwnPropertyDescriptor(object, sym).enumerable; })), keys.push.apply(keys, symbols); } return keys; }
|
|
43
45
|
|
|
44
46
|
function _objectSpread(target) { for (var i = 1; i < arguments.length; i++) { var source = null != arguments[i] ? arguments[i] : {}; i % 2 ? ownKeys(Object(source), !0).forEach(function (key) { (0, _defineProperty2.default)(target, key, source[key]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(target, Object.getOwnPropertyDescriptors(source)) : ownKeys(Object(source)).forEach(function (key) { Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key)); }); } return target; }
|
|
@@ -83,7 +85,7 @@ var NotFoundView = function NotFoundView(_ref) {
|
|
|
83
85
|
icon: (0, _core.jsx)(_warning.default, {
|
|
84
86
|
label: "not-found-warning-icon",
|
|
85
87
|
size: "small",
|
|
86
|
-
primaryColor: _colors.R300,
|
|
88
|
+
primaryColor: (0, _tokens.token)('color.icon.warning', _colors.R300),
|
|
87
89
|
testId: "".concat(testId, "-warning-icon")
|
|
88
90
|
}),
|
|
89
91
|
text: (0, _core.jsx)(_reactIntlNext.FormattedMessage, textDescriptionProps)
|
|
@@ -15,6 +15,8 @@ var _colors = require("@atlaskit/theme/colors");
|
|
|
15
15
|
|
|
16
16
|
var _constants = require("@atlaskit/theme/constants");
|
|
17
17
|
|
|
18
|
+
var _tokens = require("@atlaskit/tokens");
|
|
19
|
+
|
|
18
20
|
var _Frame = require("../components/Frame");
|
|
19
21
|
|
|
20
22
|
var _utils = require("../../common/utils");
|
|
@@ -41,12 +43,12 @@ var ResolvingView = function ResolvingView(_ref) {
|
|
|
41
43
|
className: blockCardResolvingViewClassName
|
|
42
44
|
}, (0, _core.jsx)(_documentFilled.default, {
|
|
43
45
|
size: "small",
|
|
44
|
-
primaryColor: _colors.N50,
|
|
46
|
+
primaryColor: (0, _tokens.token)('color.icon.subtle', _colors.N50),
|
|
45
47
|
label: "document-icon"
|
|
46
48
|
}), (0, _core.jsx)("span", {
|
|
47
49
|
css: {
|
|
48
50
|
fontSize: "".concat((0, _constants.fontSize)(), "px"),
|
|
49
|
-
color: _colors.N90,
|
|
51
|
+
color: (0, _tokens.token)('color.text.subtlest', _colors.N90),
|
|
50
52
|
marginLeft: (0, _utils.gs)(0.5)
|
|
51
53
|
}
|
|
52
54
|
}, (0, _core.jsx)(_reactIntlNext.FormattedMessage, _messages.messages.loading)));
|
|
@@ -51,7 +51,8 @@ function CardWithUrlContent(_ref) {
|
|
|
51
51
|
embedIframeRef = _ref.embedIframeRef,
|
|
52
52
|
inlinePreloaderStyle = _ref.inlinePreloaderStyle,
|
|
53
53
|
ui = _ref.ui,
|
|
54
|
-
children = _ref.children
|
|
54
|
+
children = _ref.children,
|
|
55
|
+
showHoverPreview = _ref.showHoverPreview;
|
|
55
56
|
|
|
56
57
|
// Get state, actions for this card.
|
|
57
58
|
var _useSmartLink = (0, _state.useSmartLink)(id, url, dispatchAnalytics),
|
|
@@ -155,7 +156,8 @@ function CardWithUrlContent(_ref) {
|
|
|
155
156
|
isSelected: isSelected,
|
|
156
157
|
onResolve: onResolve,
|
|
157
158
|
testId: testId,
|
|
158
|
-
inlinePreloaderStyle: inlinePreloaderStyle
|
|
159
|
+
inlinePreloaderStyle: inlinePreloaderStyle,
|
|
160
|
+
showHoverPreview: showHoverPreview
|
|
159
161
|
});
|
|
160
162
|
|
|
161
163
|
case 'block':
|
|
@@ -69,7 +69,8 @@ function CardWithURLRenderer(props) {
|
|
|
69
69
|
inlinePreloaderStyle = props.inlinePreloaderStyle,
|
|
70
70
|
createAnalyticsEvent = props.createAnalyticsEvent,
|
|
71
71
|
children = props.children,
|
|
72
|
-
ui = props.ui
|
|
72
|
+
ui = props.ui,
|
|
73
|
+
showHoverPreview = props.showHoverPreview; // Wrapper around analytics.
|
|
73
74
|
|
|
74
75
|
var dispatchAnalytics = (0, _react.useCallback)(function (analyticsPayload) {
|
|
75
76
|
if (analyticsPayload && analyticsPayload.attributes) {
|
|
@@ -122,7 +123,8 @@ function CardWithURLRenderer(props) {
|
|
|
122
123
|
platform: platform,
|
|
123
124
|
embedIframeRef: embedIframeRef,
|
|
124
125
|
inlinePreloaderStyle: inlinePreloaderStyle,
|
|
125
|
-
ui: ui
|
|
126
|
+
ui: ui,
|
|
127
|
+
showHoverPreview: showHoverPreview
|
|
126
128
|
};
|
|
127
129
|
return /*#__PURE__*/_react.default.createElement(_reactErrorBoundary.ErrorBoundary, {
|
|
128
130
|
FallbackComponent: ErrorFallback,
|
|
@@ -19,6 +19,8 @@ var _constants = require("@atlaskit/theme/constants");
|
|
|
19
19
|
|
|
20
20
|
var colors = _interopRequireWildcard(require("@atlaskit/theme/colors"));
|
|
21
21
|
|
|
22
|
+
var _tokens = require("@atlaskit/tokens");
|
|
23
|
+
|
|
22
24
|
var _utils = require("../../common/utils");
|
|
23
25
|
|
|
24
26
|
var _templateObject, _templateObject2, _templateObject3, _templateObject4, _templateObject5, _templateObject6, _templateObject7, _templateObject8, _templateObject9, _templateObject10, _templateObject11, _templateObject12, _templateObject13, _templateObject14, _templateObject15, _templateObject16;
|
|
@@ -56,13 +58,13 @@ function getinteractiveStyles(_ref3) {
|
|
|
56
58
|
var isInteractive = _ref3.isInteractive,
|
|
57
59
|
isFrameVisible = _ref3.isFrameVisible;
|
|
58
60
|
var visibleFrameStyles = isFrameVisible ? visibleStyles : '';
|
|
59
|
-
var interactiveFrameStyles = isInteractive ? "\n &:hover {\n ".concat(visibleStyles, "\n }\n &:active {\n background-color: ").concat(colors.B50, ";\n }\n") : '';
|
|
61
|
+
var interactiveFrameStyles = isInteractive ? "\n &:hover {\n ".concat(visibleStyles, "\n }\n &:active {\n background-color: ").concat((0, _tokens.token)('color.background.selected', colors.B50), ";\n }\n") : '';
|
|
60
62
|
return "".concat(visibleFrameStyles).concat(interactiveFrameStyles);
|
|
61
63
|
}
|
|
62
64
|
|
|
63
65
|
function selected(_ref4) {
|
|
64
66
|
var isSelected = _ref4.isSelected;
|
|
65
|
-
return isSelected ? "\n ".concat(visibleStyles, "\n &::after {\n cursor: pointer;\n box-shadow: 0 0 0 3px ").concat(colors.B100, ";\n content: '';\n outline: none;\n position: absolute;\n height: 100%;\n width: 100%;\n left: 0;\n ").concat(_mediaUi.borderRadius, "\n }\n ") : '';
|
|
67
|
+
return isSelected ? "\n ".concat(visibleStyles, "\n &::after {\n cursor: pointer;\n box-shadow: 0 0 0 3px ").concat((0, _tokens.token)('color.border.selected', colors.B100), ";\n content: '';\n outline: none;\n position: absolute;\n height: 100%;\n width: 100%;\n left: 0;\n ").concat(_mediaUi.borderRadius, "\n }\n ") : '';
|
|
66
68
|
}
|
|
67
69
|
|
|
68
70
|
var height = function height(_ref5) {
|
|
@@ -74,7 +76,7 @@ var wrapperStyles = function wrapperStyles(props) {
|
|
|
74
76
|
return "\n ".concat(_mediaUi.borderRadius, "\n ").concat(minWidth(props), "\n ").concat(maxWidth(props), "\n ").concat(getinteractiveStyles(props), "\n ").concat(visible(props), "\n display: inline-flex;\n flex-direction: column;\n box-sizing: border-box;\n font-family: ").concat((0, _constants.fontFamily)(), ";\n width: 100%;\n user-select: none;\n line-height: initial;\n transition: background 0.3s;\n position: relative;\n ").concat(height(props), ";\n ").concat(selected(props), "\n\n &:after {\n content: '';\n background: transparent;\n transition: background 0.3s, box-shadow 0.3s;\n position: absolute;\n width: calc(100% + ").concat((0, _utils.gs)(2), ");\n height: calc(100% + ").concat((0, _utils.gs)(1), ");\n left: -").concat((0, _utils.gs)(1), ";\n ").concat(_mediaUi.borderRadius, "\n }\n");
|
|
75
77
|
};
|
|
76
78
|
|
|
77
|
-
var visibleStyles = "\n background-color: ".concat(colors.N30, ";\n\n &:after {\n background: ").concat(colors.N30, " !important;\n }\n .embed-header {\n opacity: 1;\n }");
|
|
79
|
+
var visibleStyles = "\n background-color: ".concat((0, _tokens.token)('color.background.neutral.subtle', colors.N30), ";\n\n &:after {\n background: ").concat((0, _tokens.token)('color.background.neutral', colors.N30), " !important;\n }\n .embed-header {\n opacity: 1;\n }");
|
|
78
80
|
|
|
79
81
|
function visible(_ref6) {
|
|
80
82
|
var isVisible = _ref6.isVisible;
|
|
@@ -95,7 +97,7 @@ exports.Wrapper = Wrapper;
|
|
|
95
97
|
var embedHeaderHeight = 32;
|
|
96
98
|
exports.embedHeaderHeight = embedHeaderHeight;
|
|
97
99
|
|
|
98
|
-
var Header = _styled.default.div(_templateObject3 || (_templateObject3 = (0, _taggedTemplateLiteral2.default)(["\n height: ", "px;\n position: absolute;\n z-index: 1;\n width: 100%;\n display: flex;\n align-items: center;\n color: ", ";\n opacity: 0;\n transition: 300ms opacity cubic-bezier(0.15, 1, 0.3, 1);\n"])), embedHeaderHeight, colors.N300);
|
|
100
|
+
var Header = _styled.default.div(_templateObject3 || (_templateObject3 = (0, _taggedTemplateLiteral2.default)(["\n height: ", "px;\n position: absolute;\n z-index: 1;\n width: 100%;\n display: flex;\n align-items: center;\n color: ", ";\n opacity: 0;\n transition: 300ms opacity cubic-bezier(0.15, 1, 0.3, 1);\n"])), embedHeaderHeight, (0, _tokens.token)('color.icon', colors.N300));
|
|
99
101
|
|
|
100
102
|
exports.Header = Header;
|
|
101
103
|
|
|
@@ -103,7 +105,7 @@ var IconWrapper = _styled.default.div(_templateObject4 || (_templateObject4 = (0
|
|
|
103
105
|
var isPlaceholder = _ref7.isPlaceholder;
|
|
104
106
|
|
|
105
107
|
if (isPlaceholder) {
|
|
106
|
-
return "\n background-color: ".concat(colors.N30, ";\n ");
|
|
108
|
+
return "\n background-color: ".concat((0, _tokens.token)('color.skeleton', colors.N30), ";\n ");
|
|
107
109
|
} else {
|
|
108
110
|
return '';
|
|
109
111
|
}
|
|
@@ -115,22 +117,22 @@ var TextWrapper = _styled.default.div(_templateObject5 || (_templateObject5 = (0
|
|
|
115
117
|
var isPlaceholder = _ref8.isPlaceholder;
|
|
116
118
|
|
|
117
119
|
if (isPlaceholder) {
|
|
118
|
-
return "\n ".concat(_mediaUi.borderRadius, "\n width: 125px;\n height: 12px;\n background-color: ").concat(colors.N30, ";\n ");
|
|
120
|
+
return "\n ".concat(_mediaUi.borderRadius, "\n width: 125px;\n height: 12px;\n background-color: ").concat((0, _tokens.token)('color.skeleton', colors.N30), ";\n ");
|
|
119
121
|
} else {
|
|
120
122
|
return '';
|
|
121
123
|
}
|
|
122
|
-
}, colors.N300, (0, _mediaUi.ellipsis)('none'));
|
|
124
|
+
}, (0, _tokens.token)('color.text.subtlest', colors.N300), (0, _mediaUi.ellipsis)('none'));
|
|
123
125
|
|
|
124
126
|
exports.TextWrapper = TextWrapper;
|
|
125
127
|
|
|
126
128
|
// NB: `overflow` is kept as `hidden` since
|
|
127
129
|
// the internal contents of the `iframe` should
|
|
128
130
|
// manage scrolling behaviour.
|
|
129
|
-
var Content = _styled.default.div(_templateObject6 || (_templateObject6 = (0, _taggedTemplateLiteral2.default)(["\n ", "\n ", "\n background-color:
|
|
131
|
+
var Content = _styled.default.div(_templateObject6 || (_templateObject6 = (0, _taggedTemplateLiteral2.default)(["\n ", "\n ", "\n background-color: ", ";\n position: absolute;\n z-index: 1;\n width: 100%;\n top: ", ";\n overflow: hidden;\n height: calc(100% - ", ");\n transition: box-shadow 0.3s;\n\n > .calc-height > div > div {\n left: unset !important;\n width: unset !important;\n height: unset !important;\n position: initial !important;\n padding-bottom: unset !important;\n }\n > .embed-preview > div {\n margin: 0 auto;\n }\n\n ", ";\n"])), _mediaUi.borderRadius, cardShadow, (0, _tokens.token)('elevation.surface', 'white'), (0, _utils.gs)(4), (0, _utils.gs)(4), function (_ref9) {
|
|
130
132
|
var isInteractive = _ref9.isInteractive;
|
|
131
133
|
|
|
132
134
|
if (isInteractive) {
|
|
133
|
-
return "\n .".concat(className, ":hover & {\n box-shadow: 0 4px 8px -2px rgba(23, 43, 77, 0.32)
|
|
135
|
+
return "\n .".concat(className, ":hover & {\n box-shadow: ").concat((0, _tokens.token)('elevation.shadow.overlay', '0 4px 8px -2px rgba(23, 43, 77, 0.32), 0 0 1px rgba(23, 43, 77, 0.25)'), ";\n }\n ");
|
|
134
136
|
} else {
|
|
135
137
|
return '';
|
|
136
138
|
}
|
|
@@ -151,15 +153,15 @@ var ContentWrapper = _styled.default.div(_templateObject8 || (_templateObject8 =
|
|
|
151
153
|
|
|
152
154
|
exports.ContentWrapper = ContentWrapper;
|
|
153
155
|
|
|
154
|
-
var Title = _styled.default.div(_templateObject9 || (_templateObject9 = (0, _taggedTemplateLiteral2.default)(["\n color: ", ";\n font-size: 16px;\n font-weight: 500;\n line-height: ", ";\n max-height: ", "px;\n overflow: hidden;\n"])), colors.N900, 20 / 16, 20 * 4);
|
|
156
|
+
var Title = _styled.default.div(_templateObject9 || (_templateObject9 = (0, _taggedTemplateLiteral2.default)(["\n color: ", ";\n font-size: 16px;\n font-weight: 500;\n line-height: ", ";\n max-height: ", "px;\n overflow: hidden;\n"])), (0, _tokens.token)('color.text', colors.N900), 20 / 16, 20 * 4);
|
|
155
157
|
|
|
156
158
|
exports.Title = Title;
|
|
157
159
|
|
|
158
|
-
var Byline = _styled.default.div(_templateObject10 || (_templateObject10 = (0, _taggedTemplateLiteral2.default)(["\n margin-top: 4px;\n color: ", ";\n font-size: 12px;\n font-weight: normal;\n line-height: ", ";\n ", ";\n"])), colors.N300, 16 / 12, (0, _mediaUi.ellipsis)('100%'));
|
|
160
|
+
var Byline = _styled.default.div(_templateObject10 || (_templateObject10 = (0, _taggedTemplateLiteral2.default)(["\n margin-top: 4px;\n color: ", ";\n font-size: 12px;\n font-weight: normal;\n line-height: ", ";\n ", ";\n"])), (0, _tokens.token)('color.text.subtlest', colors.N300), 16 / 12, (0, _mediaUi.ellipsis)('100%'));
|
|
159
161
|
|
|
160
162
|
exports.Byline = Byline;
|
|
161
163
|
|
|
162
|
-
var Description = _styled.default.div(_templateObject11 || (_templateObject11 = (0, _taggedTemplateLiteral2.default)(["\n margin-top: 7px;\n color: ", ";\n font-size: 12px;\n font-weight: normal;\n line-height: ", ";\n max-height: ", "px;\n overflow: hidden;\n"])), colors.N800, 18 / 12, 18 * 3);
|
|
164
|
+
var Description = _styled.default.div(_templateObject11 || (_templateObject11 = (0, _taggedTemplateLiteral2.default)(["\n margin-top: 7px;\n color: ", ";\n font-size: 12px;\n font-weight: normal;\n line-height: ", ";\n max-height: ", "px;\n overflow: hidden;\n"])), (0, _tokens.token)('color.text', colors.N800), 18 / 12, 18 * 3);
|
|
163
165
|
|
|
164
166
|
exports.Description = Description;
|
|
165
167
|
|
|
@@ -167,7 +169,7 @@ var ResolvedViewIconWrapper = _styled.default.div(_templateObject12 || (_templat
|
|
|
167
169
|
|
|
168
170
|
exports.ResolvedViewIconWrapper = ResolvedViewIconWrapper;
|
|
169
171
|
|
|
170
|
-
var Thumbnail = _styled.default.div(_templateObject13 || (_templateObject13 = (0, _taggedTemplateLiteral2.default)(["\n ", "\n ", "\n float: right;\n margin: 4px 0 12px 12px;\n background-color: ", ";\n background-image: url(", ");\n background-size: cover;\n"])), _mediaUi.borderRadius, (0, _mediaUi.size)(48), colors.N30, function (_ref11) {
|
|
172
|
+
var Thumbnail = _styled.default.div(_templateObject13 || (_templateObject13 = (0, _taggedTemplateLiteral2.default)(["\n ", "\n ", "\n float: right;\n margin: 4px 0 12px 12px;\n background-color: ", ";\n background-image: url(", ");\n background-size: cover;\n"])), _mediaUi.borderRadius, (0, _mediaUi.size)(48), (0, _tokens.token)('color.skeleton', colors.N30), function (_ref11) {
|
|
171
173
|
var src = _ref11.src;
|
|
172
174
|
return src;
|
|
173
175
|
});
|
|
@@ -17,6 +17,8 @@ var _constants = require("@atlaskit/theme/constants");
|
|
|
17
17
|
|
|
18
18
|
var _colors = require("@atlaskit/theme/colors");
|
|
19
19
|
|
|
20
|
+
var _tokens = require("@atlaskit/tokens");
|
|
21
|
+
|
|
20
22
|
var _Frame = require("../../BlockCard/components/Frame");
|
|
21
23
|
|
|
22
24
|
var _reactIntlNext = require("react-intl-next");
|
|
@@ -40,7 +42,7 @@ var EmbedCardErroredView = function EmbedCardErroredView(_ref) {
|
|
|
40
42
|
testId: testId
|
|
41
43
|
}, (0, _core.jsx)(_error.default, {
|
|
42
44
|
size: "small",
|
|
43
|
-
primaryColor: _colors.R300,
|
|
45
|
+
primaryColor: (0, _tokens.token)('color.icon.danger', _colors.R300),
|
|
44
46
|
label: "error-icon"
|
|
45
47
|
}), (0, _core.jsx)("span", {
|
|
46
48
|
css: {
|