@atlaskit/smart-card 42.1.0 → 42.2.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.
- package/CHANGELOG.md +26 -0
- package/dist/cjs/extractors/action/extract-invoke-preview-action.js +3 -2
- package/dist/cjs/utils/analytics/analytics.js +1 -1
- package/dist/cjs/view/EmbedCard/components/ErrorFrame.compiled.css +1 -1
- package/dist/cjs/view/EmbedCard/components/ErrorFrame.js +2 -2
- package/dist/cjs/view/EmbedModal/index.js +4 -2
- package/dist/cjs/view/FlexibleCard/components/elements/common/base-lozenge-element/lozenge-action/lozenge-action-trigger/index.compiled.css +3 -3
- package/dist/cjs/view/FlexibleCard/components/elements/common/base-lozenge-element/lozenge-action/lozenge-action-trigger/index.js +1 -1
- package/dist/cjs/view/LinkUrl/index.js +1 -1
- package/dist/es2019/extractors/action/extract-invoke-preview-action.js +3 -2
- package/dist/es2019/utils/analytics/analytics.js +1 -1
- package/dist/es2019/view/EmbedCard/components/ErrorFrame.compiled.css +1 -1
- package/dist/es2019/view/EmbedCard/components/ErrorFrame.js +2 -2
- package/dist/es2019/view/EmbedModal/index.js +4 -2
- package/dist/es2019/view/FlexibleCard/components/elements/common/base-lozenge-element/lozenge-action/lozenge-action-trigger/index.compiled.css +3 -3
- package/dist/es2019/view/FlexibleCard/components/elements/common/base-lozenge-element/lozenge-action/lozenge-action-trigger/index.js +1 -1
- package/dist/es2019/view/LinkUrl/index.js +1 -1
- package/dist/esm/extractors/action/extract-invoke-preview-action.js +3 -2
- package/dist/esm/utils/analytics/analytics.js +1 -1
- package/dist/esm/view/EmbedCard/components/ErrorFrame.compiled.css +1 -1
- package/dist/esm/view/EmbedCard/components/ErrorFrame.js +2 -2
- package/dist/esm/view/EmbedModal/index.js +4 -2
- package/dist/esm/view/FlexibleCard/components/elements/common/base-lozenge-element/lozenge-action/lozenge-action-trigger/index.compiled.css +3 -3
- package/dist/esm/view/FlexibleCard/components/elements/common/base-lozenge-element/lozenge-action/lozenge-action-trigger/index.js +1 -1
- package/dist/esm/view/LinkUrl/index.js +1 -1
- package/dist/types/view/Card/types.d.ts +4 -0
- package/dist/types/view/EmbedModal/types.d.ts +1 -0
- package/dist/types-ts4.5/view/Card/types.d.ts +4 -0
- package/dist/types-ts4.5/view/EmbedModal/types.d.ts +1 -0
- package/package.json +6 -3
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,31 @@
|
|
|
1
1
|
# @atlaskit/smart-card
|
|
2
2
|
|
|
3
|
+
## 42.2.0
|
|
4
|
+
|
|
5
|
+
### Minor Changes
|
|
6
|
+
|
|
7
|
+
- [`bdcb27019145f`](https://bitbucket.org/atlassian/atlassian-frontend-monorepo/commits/bdcb27019145f) -
|
|
8
|
+
This adds a new prop to the `actionOptions` which allows a user of smart actions to determine
|
|
9
|
+
whether the blanket should be hidden when the preview action modal is opened. It can be done by
|
|
10
|
+
defining the following: e.g.
|
|
11
|
+
```
|
|
12
|
+
<Card appearance="block"
|
|
13
|
+
actionOptions={
|
|
14
|
+
{ previewAction: { size: "large", hideBlanket: true } }} />
|
|
15
|
+
```
|
|
16
|
+
|
|
17
|
+
### Patch Changes
|
|
18
|
+
|
|
19
|
+
- [`407e1dc11eeed`](https://bitbucket.org/atlassian/atlassian-frontend-monorepo/commits/407e1dc11eeed) -
|
|
20
|
+
Minor changes to border radius values.
|
|
21
|
+
- Updated dependencies
|
|
22
|
+
|
|
23
|
+
## 42.1.1
|
|
24
|
+
|
|
25
|
+
### Patch Changes
|
|
26
|
+
|
|
27
|
+
- Updated dependencies
|
|
28
|
+
|
|
3
29
|
## 42.1.0
|
|
4
30
|
|
|
5
31
|
### Minor Changes
|
|
@@ -67,7 +67,7 @@ var extractInvokePreviewAction = exports.extractInvokePreviewAction = function e
|
|
|
67
67
|
invokeAction: {
|
|
68
68
|
actionFn: function () {
|
|
69
69
|
var _actionFn = (0, _asyncToGenerator2.default)( /*#__PURE__*/_regenerator.default.mark(function _callee() {
|
|
70
|
-
var resolvedUrl, responseUrl, _extractSmartLinkProv, _extractSmartLinkEmbe, _actionOptions$previe;
|
|
70
|
+
var resolvedUrl, responseUrl, _extractSmartLinkProv, _extractSmartLinkEmbe, _actionOptions$previe, _actionOptions$previe2;
|
|
71
71
|
return _regenerator.default.wrap(function _callee$(_context) {
|
|
72
72
|
while (1) switch (_context.prev = _context.next) {
|
|
73
73
|
case 0:
|
|
@@ -108,7 +108,8 @@ var extractInvokePreviewAction = exports.extractInvokePreviewAction = function e
|
|
|
108
108
|
src: (_extractSmartLinkEmbe = (0, _linkExtractors.extractSmartLinkEmbed)(response)) === null || _extractSmartLinkEmbe === void 0 ? void 0 : _extractSmartLinkEmbe.src,
|
|
109
109
|
title: (0, _linkExtractors.extractSmartLinkTitle)(response),
|
|
110
110
|
url: url,
|
|
111
|
-
|
|
111
|
+
isBlanketHidden: (0, _platformFeatureFlags.fg)('linking_platform_hide_preview_action_blanket_prop') ? actionOptions === null || actionOptions === void 0 || (_actionOptions$previe = actionOptions.previewAction) === null || _actionOptions$previe === void 0 ? void 0 : _actionOptions$previe.hideBlanket : undefined,
|
|
112
|
+
size: (0, _platformFeatureFlags.fg)('platform_linking_enable_card_preview_action_size') ? actionOptions === null || actionOptions === void 0 || (_actionOptions$previe2 = actionOptions.previewAction) === null || _actionOptions$previe2 === void 0 ? void 0 : _actionOptions$previe2.size : undefined
|
|
112
113
|
}, (0, _expValEquals.expValEquals)('platform_hover_card_preview_panel', 'cohort', 'test') && {
|
|
113
114
|
isInPreviewPanel: isInPreviewPanel
|
|
114
115
|
}));
|
|
@@ -11,7 +11,7 @@ var ANALYTICS_CHANNEL = exports.ANALYTICS_CHANNEL = 'media';
|
|
|
11
11
|
var context = exports.context = {
|
|
12
12
|
componentName: 'smart-cards',
|
|
13
13
|
packageName: "@atlaskit/smart-card",
|
|
14
|
-
packageVersion: "42.
|
|
14
|
+
packageVersion: "42.1.1"
|
|
15
15
|
};
|
|
16
16
|
var TrackQuickActionType = exports.TrackQuickActionType = /*#__PURE__*/function (TrackQuickActionType) {
|
|
17
17
|
TrackQuickActionType["StatusUpdate"] = "StatusUpdate";
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
|
|
2
|
-
._2rko1lya{border-radius:1.5px}
|
|
3
2
|
._2rkofajl{border-radius:var(--ds-radius-small,3px)}
|
|
3
|
+
._2rkolb4i{border-radius:var(--ds-radius-xsmall,2px)}
|
|
4
4
|
._189e1dm9{border-width:var(--ds-border-width-selected,2px)}
|
|
5
5
|
._1dqonqa1{border-style:solid}
|
|
6
6
|
._1h6d1j28{border-color:transparent}
|
|
@@ -37,7 +37,7 @@ var ExpandedFrame = exports.ExpandedFrame = function ExpandedFrame(_ref) {
|
|
|
37
37
|
"data-testid": testId
|
|
38
38
|
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-classname-prop -- Ignored via go/DSP-18766
|
|
39
39
|
,
|
|
40
|
-
className: (0, _runtime.ax)(["_1bsb1osq _1e0c1txw", "_p12fukw8 _bfhkhp5a", isHoverable && "_irr3uh3c _d0altlke", isFluidHeight ? "_1tkeidpf" : "_1tke68cl", isSelected ? "_2rkofajl _1h6d7a2i _1dqonqa1 _189e1dm9" : "
|
|
40
|
+
className: (0, _runtime.ax)(["_1bsb1osq _1e0c1txw", "_p12fukw8 _bfhkhp5a", isHoverable && "_irr3uh3c _d0altlke", isFluidHeight ? "_1tkeidpf" : "_1tke68cl", isSelected ? "_2rkofajl _1h6d7a2i _1dqonqa1 _189e1dm9" : "_2rkolb4i _1h6d1j28 _1dqonqa1 _189e1dm9", "_1reo15vq _18m915vq _1bah1yb4 _16qs1mq7", className]),
|
|
41
41
|
"data-trello-do-not-use-override": testId,
|
|
42
42
|
style: {
|
|
43
43
|
"--_1irqcwi": (0, _runtime.ix)("var(--ds-background-neutral-subtle-hovered, ".concat(_colors.N20A, ")")),
|
|
@@ -63,7 +63,7 @@ var CompactFrame = exports.CompactFrame = function CompactFrame(_ref2) {
|
|
|
63
63
|
"data-testid": testId
|
|
64
64
|
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-classname-prop -- Ignored via go/DSP-18766
|
|
65
65
|
,
|
|
66
|
-
className: (0, _runtime.ax)(["_1bsb1osq _1e0c1txw", "_p12fukw8 _bfhkhp5a", isHoverable && "_irr3bfnf", isSelected && "_2rkofajl _1h6d7a2i _1dqonqa1 _189e1dm9", !isSelected && "
|
|
66
|
+
className: (0, _runtime.ax)(["_1bsb1osq _1e0c1txw", "_p12fukw8 _bfhkhp5a", isHoverable && "_irr3bfnf", isSelected && "_2rkofajl _1h6d7a2i _1dqonqa1 _189e1dm9", !isSelected && "_2rkolb4i", "_1bah1h6o _4cvr1h6o _bfhkkq2v", inheritDimensions ? "_4t3i1osq" : "_4t3i1ylp", "_ca0qidpf _u5f3idpf _n3tdidpf _19bvidpf _1bsb1osq", className]),
|
|
67
67
|
style: {
|
|
68
68
|
"--_6j4ewu": (0, _runtime.ix)("var(--ds-background-neutral-hovered, ".concat(_colors.N30A, ")")),
|
|
69
69
|
"--_d9gj9p": (0, _runtime.ix)("var(--ds-border-selected, ".concat(_colors.B200, ")")),
|
|
@@ -48,7 +48,8 @@ var EmbedModal = function EmbedModal(_ref) {
|
|
|
48
48
|
testId = _ref$testId === void 0 ? 'smart-embed-preview-modal' : _ref$testId,
|
|
49
49
|
title = _ref.title,
|
|
50
50
|
invokeViewAction = _ref.invokeViewAction,
|
|
51
|
-
extensionKey = _ref.extensionKey
|
|
51
|
+
extensionKey = _ref.extensionKey,
|
|
52
|
+
isBlanketHidden = _ref.isBlanketHidden;
|
|
52
53
|
var defaultWidth = toWidth(size);
|
|
53
54
|
var _useState = (0, _react.useState)(showModal),
|
|
54
55
|
_useState2 = (0, _slicedToArray2.default)(_useState, 2),
|
|
@@ -109,7 +110,8 @@ var EmbedModal = function EmbedModal(_ref) {
|
|
|
109
110
|
onOpenComplete: handleOnOpenComplete,
|
|
110
111
|
testId: testId,
|
|
111
112
|
width: width,
|
|
112
|
-
label: title
|
|
113
|
+
label: title,
|
|
114
|
+
isBlanketHidden: isBlanketHidden
|
|
113
115
|
}, /*#__PURE__*/_react.default.createElement(_linkInfo.default, {
|
|
114
116
|
icon: linkIcon && {
|
|
115
117
|
icon: /*#__PURE__*/_react.default.createElement(_common.BaseIconElement, (0, _extends2.default)({}, linkIcon, {
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
|
|
2
2
|
._kkk2n7od{all:unset}
|
|
3
|
-
.
|
|
3
|
+
._1d391qi0[aria-expanded=true]{border-radius:var(--ds-radius-medium,6px)}
|
|
4
4
|
._2rko12b0{border-radius:var(--ds-radius-small,4px)}
|
|
5
5
|
._15vhn7od{font-variant:unset}
|
|
6
6
|
._189e1dm9{border-width:var(--ds-border-width-selected,2px)}
|
|
@@ -35,11 +35,11 @@
|
|
|
35
35
|
._u5f3idpf{padding-right:0}
|
|
36
36
|
._vwz4idpf{line-height:0}
|
|
37
37
|
._zg8ln7od{font-style:unset}
|
|
38
|
-
.
|
|
38
|
+
._19h61qi0:focus-within{border-radius:var(--ds-radius-medium,6px)}._11ow1o36:focus-within{outline-width:medium}
|
|
39
39
|
._1guj1r31:focus-within{outline-color:currentColor}
|
|
40
40
|
._1u6l1vm4:focus-within{box-shadow:0 0 0 2px var(--ds-border-focused,#388bff)}
|
|
41
41
|
._pbhaglyw:focus-within{outline-style:none}
|
|
42
|
-
.
|
|
42
|
+
._1bas1qi0:focus-visible{border-radius:var(--ds-radius-medium,6px)}
|
|
43
43
|
._128m1o36:focus-visible{outline-width:medium}
|
|
44
44
|
._1ejj1vm4:focus-visible{box-shadow:0 0 0 2px var(--ds-border-focused,#388bff)}
|
|
45
45
|
._mizu1r31:focus-visible{outline-color:currentColor}
|
|
@@ -120,7 +120,7 @@ var LozengeActionTrigger = function LozengeActionTrigger(_ref) {
|
|
|
120
120
|
onKeyDown: onMouseOrKeyDown,
|
|
121
121
|
onKeyUp: onMouseOrKeyUp,
|
|
122
122
|
ref: triggerRef,
|
|
123
|
-
className: (0, _runtime.ax)(["_kkk2n7od _ca0qidpf _u5f3idpf _n3tdidpf _19bvidpf _15vhn7od _1dqonqa1 _189e1dm9 _1h6d1j28 _bfhk1j28 _syazn7od _80omtlke _ect4n7od _1wybn7od _zg8ln7od _k48pn7od _vwz4idpf _1p1dn7od _19pkv77o _2hwxv77o _otyrv77o _18u0v77o _mizu1r31 _1guj1r31 _p8tl1r31 _ra3xglyw _pbhaglyw _1q2vglyw _128m1o36 _11ow1o36 _j8b81o36
|
|
123
|
+
className: (0, _runtime.ax)(["_kkk2n7od _ca0qidpf _u5f3idpf _n3tdidpf _19bvidpf _15vhn7od _1dqonqa1 _189e1dm9 _1h6d1j28 _bfhk1j28 _syazn7od _80omtlke _ect4n7od _1wybn7od _zg8ln7od _k48pn7od _vwz4idpf _1p1dn7od _19pkv77o _2hwxv77o _otyrv77o _18u0v77o _mizu1r31 _1guj1r31 _p8tl1r31 _ra3xglyw _pbhaglyw _1q2vglyw _128m1o36 _11ow1o36 _j8b81o36 _1bas1qi0 _19h61qi0 _1d391qi0 _1ejj1vm4 _1u6l1vm4 _6ssh1vm4"])
|
|
124
124
|
}), lozenge);
|
|
125
125
|
};
|
|
126
126
|
var _default = exports.default = LozengeActionTrigger;
|
|
@@ -25,7 +25,7 @@ var _excluded = ["href", "children", "checkSafety", "onClick", "testId", "isLink
|
|
|
25
25
|
function _interopRequireWildcard(e, t) { if ("function" == typeof WeakMap) var r = new WeakMap(), n = new WeakMap(); return (_interopRequireWildcard = function _interopRequireWildcard(e, t) { if (!t && e && e.__esModule) return e; var o, i, f = { __proto__: null, default: e }; if (null === e || "object" != _typeof(e) && "function" != typeof e) return f; if (o = t ? n : r) { if (o.has(e)) return o.get(e); o.set(e, f); } for (var _t in e) "default" !== _t && {}.hasOwnProperty.call(e, _t) && ((i = (o = Object.defineProperty) && Object.getOwnPropertyDescriptor(e, _t)) && (i.get || i.set) ? o(f, _t, i) : f[_t] = e[_t]); return f; })(e, t); }
|
|
26
26
|
var PACKAGE_DATA = {
|
|
27
27
|
packageName: "@atlaskit/smart-card",
|
|
28
|
-
packageVersion: "42.
|
|
28
|
+
packageVersion: "42.1.1",
|
|
29
29
|
componentName: 'linkUrl'
|
|
30
30
|
};
|
|
31
31
|
var Anchor = (0, _click.withLinkClickedEvent)('a');
|
|
@@ -73,7 +73,7 @@ export const extractInvokePreviewAction = param => {
|
|
|
73
73
|
previewType: 'panel'
|
|
74
74
|
});
|
|
75
75
|
} else {
|
|
76
|
-
var _extractSmartLinkProv, _extractSmartLinkEmbe, _actionOptions$previe;
|
|
76
|
+
var _extractSmartLinkProv, _extractSmartLinkEmbe, _actionOptions$previe, _actionOptions$previe2;
|
|
77
77
|
await openEmbedModal({
|
|
78
78
|
fireEvent,
|
|
79
79
|
extensionKey,
|
|
@@ -89,7 +89,8 @@ export const extractInvokePreviewAction = param => {
|
|
|
89
89
|
src: (_extractSmartLinkEmbe = extractSmartLinkEmbed(response)) === null || _extractSmartLinkEmbe === void 0 ? void 0 : _extractSmartLinkEmbe.src,
|
|
90
90
|
title: extractSmartLinkTitle(response),
|
|
91
91
|
url,
|
|
92
|
-
|
|
92
|
+
isBlanketHidden: fg('linking_platform_hide_preview_action_blanket_prop') ? actionOptions === null || actionOptions === void 0 ? void 0 : (_actionOptions$previe = actionOptions.previewAction) === null || _actionOptions$previe === void 0 ? void 0 : _actionOptions$previe.hideBlanket : undefined,
|
|
93
|
+
size: fg('platform_linking_enable_card_preview_action_size') ? actionOptions === null || actionOptions === void 0 ? void 0 : (_actionOptions$previe2 = actionOptions.previewAction) === null || _actionOptions$previe2 === void 0 ? void 0 : _actionOptions$previe2.size : undefined,
|
|
93
94
|
...(expValEquals('platform_hover_card_preview_panel', 'cohort', 'test') && {
|
|
94
95
|
isInPreviewPanel
|
|
95
96
|
})
|
|
@@ -2,7 +2,7 @@ export const ANALYTICS_CHANNEL = 'media';
|
|
|
2
2
|
export const context = {
|
|
3
3
|
componentName: 'smart-cards',
|
|
4
4
|
packageName: "@atlaskit/smart-card",
|
|
5
|
-
packageVersion: "42.
|
|
5
|
+
packageVersion: "42.1.1"
|
|
6
6
|
};
|
|
7
7
|
export let TrackQuickActionType = /*#__PURE__*/function (TrackQuickActionType) {
|
|
8
8
|
TrackQuickActionType["StatusUpdate"] = "StatusUpdate";
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
|
|
2
|
-
._2rko1lya{border-radius:1.5px}
|
|
3
2
|
._2rkofajl{border-radius:var(--ds-radius-small,3px)}
|
|
3
|
+
._2rkolb4i{border-radius:var(--ds-radius-xsmall,2px)}
|
|
4
4
|
._189e1dm9{border-width:var(--ds-border-width-selected,2px)}
|
|
5
5
|
._1dqonqa1{border-style:solid}
|
|
6
6
|
._1h6d1can{border-color:var(--ds-border-selected,#2684ff)}
|
|
@@ -28,7 +28,7 @@ export const ExpandedFrame = ({
|
|
|
28
28
|
"data-testid": testId
|
|
29
29
|
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-classname-prop -- Ignored via go/DSP-18766
|
|
30
30
|
,
|
|
31
|
-
className: ax(["_1bsb1osq _1e0c1txw", "_p12fukw8 _bfhkhp5a", isHoverable && "_irr3h3i3 _d0altlke", isFluidHeight ? "_1tkeidpf" : "_1tke68cl", isSelected ? "_2rkofajl _1h6d1can _1dqonqa1 _189e1dm9" : "
|
|
31
|
+
className: ax(["_1bsb1osq _1e0c1txw", "_p12fukw8 _bfhkhp5a", isHoverable && "_irr3h3i3 _d0altlke", isFluidHeight ? "_1tkeidpf" : "_1tke68cl", isSelected ? "_2rkofajl _1h6d1can _1dqonqa1 _189e1dm9" : "_2rkolb4i _1h6d1j28 _1dqonqa1 _189e1dm9", "_1reo15vq _18m915vq _1bah1yb4 _16qsy59s", className]),
|
|
32
32
|
"data-trello-do-not-use-override": testId
|
|
33
33
|
}, children);
|
|
34
34
|
};
|
|
@@ -50,6 +50,6 @@ export const CompactFrame = ({
|
|
|
50
50
|
"data-testid": testId
|
|
51
51
|
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-classname-prop -- Ignored via go/DSP-18766
|
|
52
52
|
,
|
|
53
|
-
className: ax(["_1bsb1osq _1e0c1txw", "_p12fukw8 _bfhkhp5a", isHoverable && "_irr317ks", isSelected && "_2rkofajl _1h6d1can _1dqonqa1 _189e1dm9", !isSelected && "
|
|
53
|
+
className: ax(["_1bsb1osq _1e0c1txw", "_p12fukw8 _bfhkhp5a", isHoverable && "_irr317ks", isSelected && "_2rkofajl _1h6d1can _1dqonqa1 _189e1dm9", !isSelected && "_2rkolb4i", "_1bah1h6o _4cvr1h6o _bfhk1j54", inheritDimensions ? "_4t3i1osq" : "_4t3i1ylp", "_ca0qidpf _u5f3idpf _n3tdidpf _19bvidpf _1bsb1osq", className])
|
|
54
54
|
}, children);
|
|
55
55
|
};
|
|
@@ -31,7 +31,8 @@ const EmbedModal = ({
|
|
|
31
31
|
testId = 'smart-embed-preview-modal',
|
|
32
32
|
title,
|
|
33
33
|
invokeViewAction,
|
|
34
|
-
extensionKey
|
|
34
|
+
extensionKey,
|
|
35
|
+
isBlanketHidden
|
|
35
36
|
}) => {
|
|
36
37
|
const defaultWidth = toWidth(size);
|
|
37
38
|
const [isOpen, setIsOpen] = useState(showModal);
|
|
@@ -85,7 +86,8 @@ const EmbedModal = ({
|
|
|
85
86
|
onOpenComplete: handleOnOpenComplete,
|
|
86
87
|
testId: testId,
|
|
87
88
|
width: width,
|
|
88
|
-
label: title
|
|
89
|
+
label: title,
|
|
90
|
+
isBlanketHidden: isBlanketHidden
|
|
89
91
|
}, /*#__PURE__*/React.createElement(LinkInfo, {
|
|
90
92
|
icon: linkIcon && {
|
|
91
93
|
icon: /*#__PURE__*/React.createElement(BaseIconElement, _extends({}, linkIcon, {
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
|
|
2
2
|
._kkk2n7od{all:unset}
|
|
3
|
-
.
|
|
3
|
+
._1d391qi0[aria-expanded=true]{border-radius:var(--ds-radius-medium,6px)}
|
|
4
4
|
._2rko12b0{border-radius:var(--ds-radius-small,4px)}
|
|
5
5
|
._15vhn7od{font-variant:unset}
|
|
6
6
|
._189e1dm9{border-width:var(--ds-border-width-selected,2px)}
|
|
@@ -35,11 +35,11 @@
|
|
|
35
35
|
._u5f3idpf{padding-right:0}
|
|
36
36
|
._vwz4idpf{line-height:0}
|
|
37
37
|
._zg8ln7od{font-style:unset}
|
|
38
|
-
.
|
|
38
|
+
._19h61qi0:focus-within{border-radius:var(--ds-radius-medium,6px)}._11ow1o36:focus-within{outline-width:medium}
|
|
39
39
|
._1guj1r31:focus-within{outline-color:currentColor}
|
|
40
40
|
._1u6l1vm4:focus-within{box-shadow:0 0 0 2px var(--ds-border-focused,#388bff)}
|
|
41
41
|
._pbhaglyw:focus-within{outline-style:none}
|
|
42
|
-
.
|
|
42
|
+
._1bas1qi0:focus-visible{border-radius:var(--ds-radius-medium,6px)}
|
|
43
43
|
._128m1o36:focus-visible{outline-width:medium}
|
|
44
44
|
._1ejj1vm4:focus-visible{box-shadow:0 0 0 2px var(--ds-border-focused,#388bff)}
|
|
45
45
|
._mizu1r31:focus-visible{outline-color:currentColor}
|
|
@@ -90,7 +90,7 @@ const LozengeActionTrigger = ({
|
|
|
90
90
|
onKeyDown: onMouseOrKeyDown,
|
|
91
91
|
onKeyUp: onMouseOrKeyUp,
|
|
92
92
|
ref: triggerRef,
|
|
93
|
-
className: ax(["_kkk2n7od _ca0qidpf _u5f3idpf _n3tdidpf _19bvidpf _15vhn7od _1dqonqa1 _189e1dm9 _1h6d1j28 _bfhk1j28 _syazn7od _80omtlke _ect4n7od _1wybn7od _zg8ln7od _k48pn7od _vwz4idpf _1p1dn7od _19pkv77o _2hwxv77o _otyrv77o _18u0v77o _mizu1r31 _1guj1r31 _p8tl1r31 _ra3xglyw _pbhaglyw _1q2vglyw _128m1o36 _11ow1o36 _j8b81o36
|
|
93
|
+
className: ax(["_kkk2n7od _ca0qidpf _u5f3idpf _n3tdidpf _19bvidpf _15vhn7od _1dqonqa1 _189e1dm9 _1h6d1j28 _bfhk1j28 _syazn7od _80omtlke _ect4n7od _1wybn7od _zg8ln7od _k48pn7od _vwz4idpf _1p1dn7od _19pkv77o _2hwxv77o _otyrv77o _18u0v77o _mizu1r31 _1guj1r31 _p8tl1r31 _ra3xglyw _pbhaglyw _1q2vglyw _128m1o36 _11ow1o36 _j8b81o36 _1bas1qi0 _19h61qi0 _1d391qi0 _1ejj1vm4 _1u6l1vm4 _6ssh1vm4"])
|
|
94
94
|
}), lozenge);
|
|
95
95
|
};
|
|
96
96
|
export default LozengeActionTrigger;
|
|
@@ -13,7 +13,7 @@ import LinkWarningModal from './LinkWarningModal';
|
|
|
13
13
|
import { useLinkWarningModal } from './LinkWarningModal/hooks/use-link-warning-modal';
|
|
14
14
|
const PACKAGE_DATA = {
|
|
15
15
|
packageName: "@atlaskit/smart-card",
|
|
16
|
-
packageVersion: "42.
|
|
16
|
+
packageVersion: "42.1.1",
|
|
17
17
|
componentName: 'linkUrl'
|
|
18
18
|
};
|
|
19
19
|
const Anchor = withLinkClickedEvent('a');
|
|
@@ -60,7 +60,7 @@ export var extractInvokePreviewAction = function extractInvokePreviewAction(para
|
|
|
60
60
|
invokeAction: {
|
|
61
61
|
actionFn: function () {
|
|
62
62
|
var _actionFn = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function _callee() {
|
|
63
|
-
var resolvedUrl, responseUrl, _extractSmartLinkProv, _extractSmartLinkEmbe, _actionOptions$previe;
|
|
63
|
+
var resolvedUrl, responseUrl, _extractSmartLinkProv, _extractSmartLinkEmbe, _actionOptions$previe, _actionOptions$previe2;
|
|
64
64
|
return _regeneratorRuntime.wrap(function _callee$(_context) {
|
|
65
65
|
while (1) switch (_context.prev = _context.next) {
|
|
66
66
|
case 0:
|
|
@@ -101,7 +101,8 @@ export var extractInvokePreviewAction = function extractInvokePreviewAction(para
|
|
|
101
101
|
src: (_extractSmartLinkEmbe = extractSmartLinkEmbed(response)) === null || _extractSmartLinkEmbe === void 0 ? void 0 : _extractSmartLinkEmbe.src,
|
|
102
102
|
title: extractSmartLinkTitle(response),
|
|
103
103
|
url: url,
|
|
104
|
-
|
|
104
|
+
isBlanketHidden: fg('linking_platform_hide_preview_action_blanket_prop') ? actionOptions === null || actionOptions === void 0 || (_actionOptions$previe = actionOptions.previewAction) === null || _actionOptions$previe === void 0 ? void 0 : _actionOptions$previe.hideBlanket : undefined,
|
|
105
|
+
size: fg('platform_linking_enable_card_preview_action_size') ? actionOptions === null || actionOptions === void 0 || (_actionOptions$previe2 = actionOptions.previewAction) === null || _actionOptions$previe2 === void 0 ? void 0 : _actionOptions$previe2.size : undefined
|
|
105
106
|
}, expValEquals('platform_hover_card_preview_panel', 'cohort', 'test') && {
|
|
106
107
|
isInPreviewPanel: isInPreviewPanel
|
|
107
108
|
}));
|
|
@@ -4,7 +4,7 @@ export var ANALYTICS_CHANNEL = 'media';
|
|
|
4
4
|
export var context = {
|
|
5
5
|
componentName: 'smart-cards',
|
|
6
6
|
packageName: "@atlaskit/smart-card",
|
|
7
|
-
packageVersion: "42.
|
|
7
|
+
packageVersion: "42.1.1"
|
|
8
8
|
};
|
|
9
9
|
export var TrackQuickActionType = /*#__PURE__*/function (TrackQuickActionType) {
|
|
10
10
|
TrackQuickActionType["StatusUpdate"] = "StatusUpdate";
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
|
|
2
|
-
._2rko1lya{border-radius:1.5px}
|
|
3
2
|
._2rkofajl{border-radius:var(--ds-radius-small,3px)}
|
|
3
|
+
._2rkolb4i{border-radius:var(--ds-radius-xsmall,2px)}
|
|
4
4
|
._189e1dm9{border-width:var(--ds-border-width-selected,2px)}
|
|
5
5
|
._1dqonqa1{border-style:solid}
|
|
6
6
|
._1h6d1j28{border-color:transparent}
|
|
@@ -30,7 +30,7 @@ export var ExpandedFrame = function ExpandedFrame(_ref) {
|
|
|
30
30
|
"data-testid": testId
|
|
31
31
|
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-classname-prop -- Ignored via go/DSP-18766
|
|
32
32
|
,
|
|
33
|
-
className: ax(["_1bsb1osq _1e0c1txw", "_p12fukw8 _bfhkhp5a", isHoverable && "_irr3uh3c _d0altlke", isFluidHeight ? "_1tkeidpf" : "_1tke68cl", isSelected ? "_2rkofajl _1h6d7a2i _1dqonqa1 _189e1dm9" : "
|
|
33
|
+
className: ax(["_1bsb1osq _1e0c1txw", "_p12fukw8 _bfhkhp5a", isHoverable && "_irr3uh3c _d0altlke", isFluidHeight ? "_1tkeidpf" : "_1tke68cl", isSelected ? "_2rkofajl _1h6d7a2i _1dqonqa1 _189e1dm9" : "_2rkolb4i _1h6d1j28 _1dqonqa1 _189e1dm9", "_1reo15vq _18m915vq _1bah1yb4 _16qs1mq7", className]),
|
|
34
34
|
"data-trello-do-not-use-override": testId,
|
|
35
35
|
style: {
|
|
36
36
|
"--_1irqcwi": ix("var(--ds-background-neutral-subtle-hovered, ".concat(N20A, ")")),
|
|
@@ -56,7 +56,7 @@ export var CompactFrame = function CompactFrame(_ref2) {
|
|
|
56
56
|
"data-testid": testId
|
|
57
57
|
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-classname-prop -- Ignored via go/DSP-18766
|
|
58
58
|
,
|
|
59
|
-
className: ax(["_1bsb1osq _1e0c1txw", "_p12fukw8 _bfhkhp5a", isHoverable && "_irr3bfnf", isSelected && "_2rkofajl _1h6d7a2i _1dqonqa1 _189e1dm9", !isSelected && "
|
|
59
|
+
className: ax(["_1bsb1osq _1e0c1txw", "_p12fukw8 _bfhkhp5a", isHoverable && "_irr3bfnf", isSelected && "_2rkofajl _1h6d7a2i _1dqonqa1 _189e1dm9", !isSelected && "_2rkolb4i", "_1bah1h6o _4cvr1h6o _bfhkkq2v", inheritDimensions ? "_4t3i1osq" : "_4t3i1ylp", "_ca0qidpf _u5f3idpf _n3tdidpf _19bvidpf _1bsb1osq", className]),
|
|
60
60
|
style: {
|
|
61
61
|
"--_6j4ewu": ix("var(--ds-background-neutral-hovered, ".concat(N30A, ")")),
|
|
62
62
|
"--_d9gj9p": ix("var(--ds-border-selected, ".concat(B200, ")")),
|
|
@@ -39,7 +39,8 @@ var EmbedModal = function EmbedModal(_ref) {
|
|
|
39
39
|
testId = _ref$testId === void 0 ? 'smart-embed-preview-modal' : _ref$testId,
|
|
40
40
|
title = _ref.title,
|
|
41
41
|
invokeViewAction = _ref.invokeViewAction,
|
|
42
|
-
extensionKey = _ref.extensionKey
|
|
42
|
+
extensionKey = _ref.extensionKey,
|
|
43
|
+
isBlanketHidden = _ref.isBlanketHidden;
|
|
43
44
|
var defaultWidth = toWidth(size);
|
|
44
45
|
var _useState = useState(showModal),
|
|
45
46
|
_useState2 = _slicedToArray(_useState, 2),
|
|
@@ -100,7 +101,8 @@ var EmbedModal = function EmbedModal(_ref) {
|
|
|
100
101
|
onOpenComplete: handleOnOpenComplete,
|
|
101
102
|
testId: testId,
|
|
102
103
|
width: width,
|
|
103
|
-
label: title
|
|
104
|
+
label: title,
|
|
105
|
+
isBlanketHidden: isBlanketHidden
|
|
104
106
|
}, /*#__PURE__*/React.createElement(LinkInfo, {
|
|
105
107
|
icon: linkIcon && {
|
|
106
108
|
icon: /*#__PURE__*/React.createElement(BaseIconElement, _extends({}, linkIcon, {
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
|
|
2
2
|
._kkk2n7od{all:unset}
|
|
3
|
-
.
|
|
3
|
+
._1d391qi0[aria-expanded=true]{border-radius:var(--ds-radius-medium,6px)}
|
|
4
4
|
._2rko12b0{border-radius:var(--ds-radius-small,4px)}
|
|
5
5
|
._15vhn7od{font-variant:unset}
|
|
6
6
|
._189e1dm9{border-width:var(--ds-border-width-selected,2px)}
|
|
@@ -35,11 +35,11 @@
|
|
|
35
35
|
._u5f3idpf{padding-right:0}
|
|
36
36
|
._vwz4idpf{line-height:0}
|
|
37
37
|
._zg8ln7od{font-style:unset}
|
|
38
|
-
.
|
|
38
|
+
._19h61qi0:focus-within{border-radius:var(--ds-radius-medium,6px)}._11ow1o36:focus-within{outline-width:medium}
|
|
39
39
|
._1guj1r31:focus-within{outline-color:currentColor}
|
|
40
40
|
._1u6l1vm4:focus-within{box-shadow:0 0 0 2px var(--ds-border-focused,#388bff)}
|
|
41
41
|
._pbhaglyw:focus-within{outline-style:none}
|
|
42
|
-
.
|
|
42
|
+
._1bas1qi0:focus-visible{border-radius:var(--ds-radius-medium,6px)}
|
|
43
43
|
._128m1o36:focus-visible{outline-width:medium}
|
|
44
44
|
._1ejj1vm4:focus-visible{box-shadow:0 0 0 2px var(--ds-border-focused,#388bff)}
|
|
45
45
|
._mizu1r31:focus-visible{outline-color:currentColor}
|
|
@@ -112,7 +112,7 @@ var LozengeActionTrigger = function LozengeActionTrigger(_ref) {
|
|
|
112
112
|
onKeyDown: onMouseOrKeyDown,
|
|
113
113
|
onKeyUp: onMouseOrKeyUp,
|
|
114
114
|
ref: triggerRef,
|
|
115
|
-
className: ax(["_kkk2n7od _ca0qidpf _u5f3idpf _n3tdidpf _19bvidpf _15vhn7od _1dqonqa1 _189e1dm9 _1h6d1j28 _bfhk1j28 _syazn7od _80omtlke _ect4n7od _1wybn7od _zg8ln7od _k48pn7od _vwz4idpf _1p1dn7od _19pkv77o _2hwxv77o _otyrv77o _18u0v77o _mizu1r31 _1guj1r31 _p8tl1r31 _ra3xglyw _pbhaglyw _1q2vglyw _128m1o36 _11ow1o36 _j8b81o36
|
|
115
|
+
className: ax(["_kkk2n7od _ca0qidpf _u5f3idpf _n3tdidpf _19bvidpf _15vhn7od _1dqonqa1 _189e1dm9 _1h6d1j28 _bfhk1j28 _syazn7od _80omtlke _ect4n7od _1wybn7od _zg8ln7od _k48pn7od _vwz4idpf _1p1dn7od _19pkv77o _2hwxv77o _otyrv77o _18u0v77o _mizu1r31 _1guj1r31 _p8tl1r31 _ra3xglyw _pbhaglyw _1q2vglyw _128m1o36 _11ow1o36 _j8b81o36 _1bas1qi0 _19h61qi0 _1d391qi0 _1ejj1vm4 _1u6l1vm4 _6ssh1vm4"])
|
|
116
116
|
}), lozenge);
|
|
117
117
|
};
|
|
118
118
|
export default LozengeActionTrigger;
|
|
@@ -16,7 +16,7 @@ import LinkWarningModal from './LinkWarningModal';
|
|
|
16
16
|
import { useLinkWarningModal } from './LinkWarningModal/hooks/use-link-warning-modal';
|
|
17
17
|
var PACKAGE_DATA = {
|
|
18
18
|
packageName: "@atlaskit/smart-card",
|
|
19
|
-
packageVersion: "42.
|
|
19
|
+
packageVersion: "42.1.1",
|
|
20
20
|
componentName: 'linkUrl'
|
|
21
21
|
};
|
|
22
22
|
var Anchor = withLinkClickedEvent('a');
|
|
@@ -32,6 +32,10 @@ export type CardActionOptions = CardActionVisibilityOptions & {
|
|
|
32
32
|
* Contains configuration for the preview action.
|
|
33
33
|
*/
|
|
34
34
|
previewAction?: {
|
|
35
|
+
/**
|
|
36
|
+
* Determines if the blanket behind the modal should be hidden when the preview action is clicked.
|
|
37
|
+
*/
|
|
38
|
+
hideBlanket?: boolean;
|
|
35
39
|
/**
|
|
36
40
|
* Determines the size of the preview modal when the preview action is clicked.
|
|
37
41
|
*/
|
|
@@ -17,6 +17,7 @@ export type EmbedModalProps = {
|
|
|
17
17
|
iframeName: string;
|
|
18
18
|
invokeDownloadAction?: InvokeClientActionProps;
|
|
19
19
|
invokeViewAction?: InvokeClientActionProps;
|
|
20
|
+
isBlanketHidden?: boolean;
|
|
20
21
|
isInPreviewPanel?: boolean;
|
|
21
22
|
isSupportTheming?: boolean;
|
|
22
23
|
isTrusted?: boolean;
|
|
@@ -32,6 +32,10 @@ export type CardActionOptions = CardActionVisibilityOptions & {
|
|
|
32
32
|
* Contains configuration for the preview action.
|
|
33
33
|
*/
|
|
34
34
|
previewAction?: {
|
|
35
|
+
/**
|
|
36
|
+
* Determines if the blanket behind the modal should be hidden when the preview action is clicked.
|
|
37
|
+
*/
|
|
38
|
+
hideBlanket?: boolean;
|
|
35
39
|
/**
|
|
36
40
|
* Determines the size of the preview modal when the preview action is clicked.
|
|
37
41
|
*/
|
|
@@ -17,6 +17,7 @@ export type EmbedModalProps = {
|
|
|
17
17
|
iframeName: string;
|
|
18
18
|
invokeDownloadAction?: InvokeClientActionProps;
|
|
19
19
|
invokeViewAction?: InvokeClientActionProps;
|
|
20
|
+
isBlanketHidden?: boolean;
|
|
20
21
|
isInPreviewPanel?: boolean;
|
|
21
22
|
isSupportTheming?: boolean;
|
|
22
23
|
isTrusted?: boolean;
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@atlaskit/smart-card",
|
|
3
|
-
"version": "42.
|
|
3
|
+
"version": "42.2.0",
|
|
4
4
|
"description": "Smart card component",
|
|
5
5
|
"publishConfig": {
|
|
6
6
|
"registry": "https://registry.npmjs.org/"
|
|
@@ -38,7 +38,7 @@
|
|
|
38
38
|
"@atlaskit/dropdown-menu": "^16.3.0",
|
|
39
39
|
"@atlaskit/embedded-confluence": "^4.2.0",
|
|
40
40
|
"@atlaskit/feature-gate-js-client": "^5.5.0",
|
|
41
|
-
"@atlaskit/form": "^
|
|
41
|
+
"@atlaskit/form": "^14.0.0",
|
|
42
42
|
"@atlaskit/frontend-utilities": "^3.1.0",
|
|
43
43
|
"@atlaskit/heading": "^5.2.0",
|
|
44
44
|
"@atlaskit/icon": "^28.2.0",
|
|
@@ -70,7 +70,7 @@
|
|
|
70
70
|
"@atlaskit/textarea": "^8.0.0",
|
|
71
71
|
"@atlaskit/textfield": "^8.0.0",
|
|
72
72
|
"@atlaskit/theme": "^21.0.0",
|
|
73
|
-
"@atlaskit/tmp-editor-statsig": "^12.
|
|
73
|
+
"@atlaskit/tmp-editor-statsig": "^12.29.0",
|
|
74
74
|
"@atlaskit/tokens": "^6.3.0",
|
|
75
75
|
"@atlaskit/tooltip": "^20.4.0",
|
|
76
76
|
"@atlaskit/ufo": "^0.4.0",
|
|
@@ -160,6 +160,9 @@
|
|
|
160
160
|
}
|
|
161
161
|
},
|
|
162
162
|
"platform-feature-flags": {
|
|
163
|
+
"linking_platform_hide_preview_action_blanket_prop": {
|
|
164
|
+
"type": "boolean"
|
|
165
|
+
},
|
|
163
166
|
"platform_linking_enable_card_preview_action_size": {
|
|
164
167
|
"type": "boolean"
|
|
165
168
|
},
|