@atlaskit/smart-card 34.6.5 → 34.6.6
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 +8 -0
- package/dist/cjs/utils/analytics/analytics.js +1 -1
- package/dist/cjs/view/FlexibleCard/components/container/index.compiled.css +5 -2
- package/dist/cjs/view/FlexibleCard/components/container/index.js +1 -1
- package/dist/cjs/view/FlexibleCard/components/elements/lozenge/lozenge-action/lozenge-action-items-group/index.compiled.css +5 -2
- package/dist/cjs/view/FlexibleCard/components/elements/lozenge/lozenge-action/lozenge-action-items-group/index.js +1 -2
- package/dist/cjs/view/FlexibleCard/components/elements/lozenge/lozenge-action/lozenge-action-trigger/index.compiled.css +4 -1
- package/dist/cjs/view/FlexibleCard/components/elements/lozenge/lozenge-action/lozenge-action-trigger/index.js +1 -1
- package/dist/cjs/view/HoverCard/components/views/resolving/index.compiled.css +5 -2
- package/dist/cjs/view/HoverCard/components/views/resolving/index.js +1 -1
- package/dist/cjs/view/InlineCard/ErroredView/index.js +10 -3
- package/dist/cjs/view/InlineCard/ForbiddenView/index.js +31 -7
- package/dist/cjs/view/InlineCard/Frame/styled.compiled.css +3 -2
- package/dist/cjs/view/InlineCard/Frame/styled.js +7 -4
- package/dist/cjs/view/InlineCard/IconAndTitleLayout/index.compiled.css +1 -0
- package/dist/cjs/view/InlineCard/IconAndTitleLayout/index.js +162 -32
- package/dist/cjs/view/InlineCard/IconAndTitleLayout/styled.js +24 -17
- package/dist/cjs/view/InlineCard/ResolvedView/index.js +3 -1
- package/dist/cjs/view/InlineCard/ResolvingView/index.js +10 -5
- package/dist/cjs/view/InlineCard/ResolvingView/styled.js +5 -4
- package/dist/cjs/view/InlineCard/UnauthorisedView/index.js +16 -4
- package/dist/cjs/view/InlineCard/common/action-button/index.js +61 -0
- package/dist/cjs/view/InlineCard/styled.js +4 -3
- package/dist/cjs/view/LinkUrl/index.js +1 -1
- package/dist/es2019/utils/analytics/analytics.js +1 -1
- package/dist/es2019/view/FlexibleCard/components/container/index.compiled.css +5 -2
- package/dist/es2019/view/FlexibleCard/components/container/index.js +1 -1
- package/dist/es2019/view/FlexibleCard/components/elements/lozenge/lozenge-action/lozenge-action-items-group/index.compiled.css +5 -2
- package/dist/es2019/view/FlexibleCard/components/elements/lozenge/lozenge-action/lozenge-action-items-group/index.js +1 -1
- package/dist/es2019/view/FlexibleCard/components/elements/lozenge/lozenge-action/lozenge-action-trigger/index.compiled.css +4 -1
- package/dist/es2019/view/FlexibleCard/components/elements/lozenge/lozenge-action/lozenge-action-trigger/index.js +1 -1
- package/dist/es2019/view/HoverCard/components/views/resolving/index.compiled.css +5 -2
- package/dist/es2019/view/HoverCard/components/views/resolving/index.js +1 -1
- package/dist/es2019/view/InlineCard/ErroredView/index.js +12 -5
- package/dist/es2019/view/InlineCard/ForbiddenView/index.js +34 -10
- package/dist/es2019/view/InlineCard/Frame/styled.compiled.css +3 -2
- package/dist/es2019/view/InlineCard/Frame/styled.js +7 -4
- package/dist/es2019/view/InlineCard/IconAndTitleLayout/index.compiled.css +1 -0
- package/dist/es2019/view/InlineCard/IconAndTitleLayout/index.js +162 -32
- package/dist/es2019/view/InlineCard/IconAndTitleLayout/styled.js +23 -16
- package/dist/es2019/view/InlineCard/ResolvedView/index.js +4 -2
- package/dist/es2019/view/InlineCard/ResolvingView/index.js +13 -8
- package/dist/es2019/view/InlineCard/ResolvingView/styled.js +5 -4
- package/dist/es2019/view/InlineCard/UnauthorisedView/index.js +18 -6
- package/dist/es2019/view/InlineCard/common/action-button/index.js +50 -0
- package/dist/es2019/view/InlineCard/styled.js +3 -2
- package/dist/es2019/view/LinkUrl/index.js +1 -1
- package/dist/esm/utils/analytics/analytics.js +1 -1
- package/dist/esm/view/FlexibleCard/components/container/index.compiled.css +5 -2
- package/dist/esm/view/FlexibleCard/components/container/index.js +1 -1
- package/dist/esm/view/FlexibleCard/components/elements/lozenge/lozenge-action/lozenge-action-items-group/index.compiled.css +5 -2
- package/dist/esm/view/FlexibleCard/components/elements/lozenge/lozenge-action/lozenge-action-items-group/index.js +1 -2
- package/dist/esm/view/FlexibleCard/components/elements/lozenge/lozenge-action/lozenge-action-trigger/index.compiled.css +4 -1
- package/dist/esm/view/FlexibleCard/components/elements/lozenge/lozenge-action/lozenge-action-trigger/index.js +1 -1
- package/dist/esm/view/HoverCard/components/views/resolving/index.compiled.css +5 -2
- package/dist/esm/view/HoverCard/components/views/resolving/index.js +1 -1
- package/dist/esm/view/InlineCard/ErroredView/index.js +12 -5
- package/dist/esm/view/InlineCard/ForbiddenView/index.js +34 -10
- package/dist/esm/view/InlineCard/Frame/styled.compiled.css +3 -2
- package/dist/esm/view/InlineCard/Frame/styled.js +7 -4
- package/dist/esm/view/InlineCard/IconAndTitleLayout/index.compiled.css +1 -0
- package/dist/esm/view/InlineCard/IconAndTitleLayout/index.js +162 -32
- package/dist/esm/view/InlineCard/IconAndTitleLayout/styled.js +23 -16
- package/dist/esm/view/InlineCard/ResolvedView/index.js +4 -2
- package/dist/esm/view/InlineCard/ResolvingView/index.js +13 -8
- package/dist/esm/view/InlineCard/ResolvingView/styled.js +5 -4
- package/dist/esm/view/InlineCard/UnauthorisedView/index.js +18 -6
- package/dist/esm/view/InlineCard/common/action-button/index.js +51 -0
- package/dist/esm/view/InlineCard/styled.js +3 -2
- package/dist/esm/view/LinkUrl/index.js +1 -1
- package/dist/types/view/InlineCard/IconAndTitleLayout/index.d.ts +10 -2
- package/dist/types/view/InlineCard/IconAndTitleLayout/styled.d.ts +8 -8
- package/dist/types/view/InlineCard/ResolvingView/styled.d.ts +1 -1
- package/dist/types/view/InlineCard/common/action-button/index.d.ts +19 -0
- package/dist/types/view/InlineCard/styled.d.ts +1 -1
- package/dist/types-ts4.5/view/InlineCard/IconAndTitleLayout/index.d.ts +10 -2
- package/dist/types-ts4.5/view/InlineCard/IconAndTitleLayout/styled.d.ts +8 -8
- package/dist/types-ts4.5/view/InlineCard/ResolvingView/styled.d.ts +1 -1
- package/dist/types-ts4.5/view/InlineCard/common/action-button/index.d.ts +19 -0
- package/dist/types-ts4.5/view/InlineCard/styled.d.ts +1 -1
- package/package.json +5 -2
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,13 @@
|
|
|
1
1
|
# @atlaskit/smart-card
|
|
2
2
|
|
|
3
|
+
## 34.6.6
|
|
4
|
+
|
|
5
|
+
### Patch Changes
|
|
6
|
+
|
|
7
|
+
- [#107451](https://stash.atlassian.com/projects/CONFCLOUD/repos/confluence-frontend/pull-requests/107451)
|
|
8
|
+
[`2c1db58c1ac05`](https://stash.atlassian.com/projects/CONFCLOUD/repos/confluence-frontend/commits/2c1db58c1ac05) -
|
|
9
|
+
[ux] Update tokens for inline cards
|
|
10
|
+
|
|
3
11
|
## 34.6.5
|
|
4
12
|
|
|
5
13
|
### Patch Changes
|
|
@@ -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: "34.6.
|
|
14
|
+
packageVersion: "34.6.6"
|
|
15
15
|
};
|
|
16
16
|
var TrackQuickActionType = exports.TrackQuickActionType = /*#__PURE__*/function (TrackQuickActionType) {
|
|
17
17
|
TrackQuickActionType["StatusUpdate"] = "StatusUpdate";
|
|
@@ -1,15 +1,16 @@
|
|
|
1
|
-
|
|
1
|
+
|
|
2
2
|
._19itn8v0{border:var(--_vzvmm2)}
|
|
3
3
|
._1yt418y6{padding:var(--_1xumd0e)}
|
|
4
4
|
._2rkopd34{border-radius:var(--ds-border-radius-200,8px)}
|
|
5
5
|
._zulp1jvo{gap:1.25rem 0}
|
|
6
6
|
._zulp1qos{gap:.5rem 0}
|
|
7
7
|
._zulpfzsm{gap:.25rem 0}
|
|
8
|
-
._zulph3jc{gap:1rem 0}
|
|
8
|
+
._zulph3jc{gap:1rem 0}._18u0v77o{margin-left:var(--ds-space-025,2px)}
|
|
9
9
|
._19bv15sf{padding-left:calc(var(--preview-block-width) + 1.25rem)}
|
|
10
10
|
._19bv1ltm{padding-left:calc(var(--preview-block-width) + .25rem)}
|
|
11
11
|
._19bvf557{padding-left:calc(var(--preview-block-width) + 1rem)}
|
|
12
12
|
._19bvqox2{padding-left:calc(var(--preview-block-width) + .5rem)}
|
|
13
|
+
._19pkv77o{margin-top:var(--ds-space-025,2px)}
|
|
13
14
|
._1e0c1txw{display:flex}
|
|
14
15
|
._1pcmkb7n:hover~.actions-button-group{opacity:1}
|
|
15
16
|
._1reo15vq{overflow-x:hidden}
|
|
@@ -20,11 +21,13 @@
|
|
|
20
21
|
._1yob1kwk{--container-gap-right:.5rem}
|
|
21
22
|
._1yob1wow{--container-gap-right:var(--_12k13bg)}
|
|
22
23
|
._1yob6mu8{--container-gap-right:.25rem}
|
|
24
|
+
._2hwxv77o{margin-right:var(--ds-space-025,2px)}
|
|
23
25
|
._2lx21bp4{flex-direction:column}
|
|
24
26
|
._bfhkhp5a{background-color:var(--ds-surface-raised,#fff)}
|
|
25
27
|
._jb7v18y6{--container-padding:var(--_1xumd0e)}
|
|
26
28
|
._kqswh2mm{position:relative}
|
|
27
29
|
._nqwih2mm .has-action, ._18ywh2mm a, ._1nq3h2mm button{position:relative}
|
|
30
|
+
._otyrv77o{margin-bottom:var(--ds-space-025,2px)}
|
|
28
31
|
._r37x1r5k{--preview-block-width:30%}
|
|
29
32
|
._u5f315sf{padding-right:calc(var(--preview-block-width) + 1.25rem)}
|
|
30
33
|
._u5f31ltm{padding-right:calc(var(--preview-block-width) + .25rem)}
|
|
@@ -199,7 +199,7 @@ var ContainerNew = function ContainerNew(_ref3) {
|
|
|
199
199
|
var container = /*#__PURE__*/_react.default.createElement("div", {
|
|
200
200
|
"data-smart-link-container": true,
|
|
201
201
|
"data-testid": testId,
|
|
202
|
-
className: (0, _runtime.ax)(["_1e0c1txw _2lx21bp4 _1ul9idpf _1reo15vq _kqswh2mm _1pcmkb7n _1v7y1i6y _ufn21i6y", gapStyleMap[size], !hideBackground && "_bfhkhp5a", "_1yt418y6 _jb7v18y6 _y5vk167t _1yob1wow _r37x1r5k", previewOnLeft && previewOnLeftStyleMap[size], previewOnRight && previewOnRightStyleMap[size], !hideElevation && "_19itn8v0 _2rkopd34
|
|
202
|
+
className: (0, _runtime.ax)(["_1e0c1txw _2lx21bp4 _1ul9idpf _1reo15vq _kqswh2mm _1pcmkb7n _1v7y1i6y _ufn21i6y", gapStyleMap[size], !hideBackground && "_bfhkhp5a", "_1yt418y6 _jb7v18y6 _y5vk167t _1yob1wow _r37x1r5k", previewOnLeft && previewOnLeftStyleMap[size], previewOnRight && previewOnRightStyleMap[size], !hideElevation && "_19itn8v0 _2rkopd34 _19pkv77o _2hwxv77o _otyrv77o _18u0v77o", clickableContainer && "_nqwih2mm _18ywh2mm _1nq3h2mm _1t4ckb7n _1nxdkb7n _xnbykb7n"]),
|
|
203
203
|
style: {
|
|
204
204
|
"--_1xumd0e": (0, _runtime.ix)(padding),
|
|
205
205
|
"--_73mooq": (0, _runtime.ix)(previewOnLeft ? gap : padding),
|
|
@@ -1,8 +1,11 @@
|
|
|
1
|
-
|
|
2
|
-
.
|
|
1
|
+
._11lvutpp button{padding-left:var(--ds-space-150,9pt)}
|
|
2
|
+
._14hp1wdt button{width:220px}
|
|
3
3
|
._18m91wug{overflow-y:auto}
|
|
4
|
+
._1gfl12x7 button{padding-top:var(--ds-space-075,6px)}
|
|
5
|
+
._1gqn12x7 button{padding-bottom:var(--ds-space-075,6px)}
|
|
4
6
|
._c71l1mjv{max-height:300px}
|
|
5
7
|
._d4lf1f4h button{min-height:28px}
|
|
8
|
+
._yhjmutpp button{padding-right:var(--ds-space-150,9pt)}
|
|
6
9
|
._1ll7166n button:focus, ._qprf166n button:focus-visible{background-color:var(--ds-background-neutral-subtle-hovered,#091e420f)}
|
|
7
10
|
._1pv01r31 button:focus, ._1m1b1r31 button:focus-visible{outline-color:currentColor}
|
|
8
11
|
._n6y8usvi button:focus, ._109gusvi button:focus-visible{box-sizing:border-box}
|
|
@@ -24,9 +24,8 @@ var LozengeActionItemsGroupNew = function LozengeActionItemsGroupNew(_ref) {
|
|
|
24
24
|
onClick = _ref.onClick;
|
|
25
25
|
return /*#__PURE__*/React.createElement("span", {
|
|
26
26
|
"data-testid": "".concat(testId, "-item-group"),
|
|
27
|
-
className: (0, _runtime.ax)(["_c71l1mjv _18m91wug
|
|
27
|
+
className: (0, _runtime.ax)(["_c71l1mjv _18m91wug _1pv01r31 _1m1b1r31 _qh55glyw _lt2aglyw _ph3k1o36 _1twe1o36 _1ll7166n _qprf166n _n6y8usvi _109gusvi _z29h1bda _wlxp1bda _1gfl12x7 _yhjmutpp _1gqn12x7 _11lvutpp _d4lf1f4h _14hp1wdt _6pup1kw7"]),
|
|
28
28
|
style: {
|
|
29
|
-
"--_1puzam4": (0, _runtime.ix)("var(--ds-space-075, 6px)".concat(" ", "var(--ds-space-150, 12px)")),
|
|
30
29
|
"--_1uho1ce": (0, _runtime.ix)("inset 2px 0 0 ".concat("var(--ds-border-selected, #0C66E4)"))
|
|
31
30
|
}
|
|
32
31
|
}, /*#__PURE__*/React.createElement(_dropdownMenu.DropdownItemGroup, null, items.map(function (item, idx) {
|
|
@@ -1,14 +1,16 @@
|
|
|
1
1
|
|
|
2
2
|
._kkk2n7od{all:unset}
|
|
3
|
-
._18s8v77o{margin:var(--ds-space-025,2px)}
|
|
4
3
|
._15vhn7od{font-variant:unset}
|
|
5
4
|
._189eyh40{border-width:2px}
|
|
6
5
|
._1dqonqa1{border-style:solid}
|
|
7
6
|
._1h6d1j28{border-color:transparent}
|
|
7
|
+
._18u0v77o{margin-left:var(--ds-space-025,2px)}
|
|
8
8
|
._19bvidpf{padding-left:0}
|
|
9
|
+
._19pkv77o{margin-top:var(--ds-space-025,2px)}
|
|
9
10
|
._1e0c1txw{display:flex}
|
|
10
11
|
._1p1dn7od{text-transform:unset}
|
|
11
12
|
._1wybn7od{font-size:unset}
|
|
13
|
+
._2hwxv77o{margin-right:var(--ds-space-025,2px)}
|
|
12
14
|
._4cvr1h6o{align-items:center}
|
|
13
15
|
._80omtlke{cursor:pointer}
|
|
14
16
|
._bfhk18uv{background-color:initial}
|
|
@@ -16,6 +18,7 @@
|
|
|
16
18
|
._ect4n7od{font-family:unset}
|
|
17
19
|
._k48pn7od{font-weight:unset}
|
|
18
20
|
._n3tdidpf{padding-bottom:0}
|
|
21
|
+
._otyrv77o{margin-bottom:var(--ds-space-025,2px)}
|
|
19
22
|
._syazn7od{color:unset}
|
|
20
23
|
._u5f3idpf{padding-right:0}
|
|
21
24
|
._vwz4idpf{line-height:0}
|
|
@@ -70,7 +70,7 @@ var LozengeActionTriggerNew = function LozengeActionTriggerNew(_ref) {
|
|
|
70
70
|
onMouseEnter: onMouseEnter,
|
|
71
71
|
onMouseLeave: onMouseLeave,
|
|
72
72
|
ref: triggerRef,
|
|
73
|
-
className: (0, _runtime.ax)(["_kkk2n7od _ca0qidpf _u5f3idpf _n3tdidpf _19bvidpf
|
|
73
|
+
className: (0, _runtime.ax)(["_kkk2n7od _ca0qidpf _u5f3idpf _n3tdidpf _19bvidpf _15vhn7od _1dqonqa1 _189eyh40 _1h6d1j28 _bfhk18uv _syazn7od _80omtlke _ect4n7od _1wybn7od _zg8ln7od _k48pn7od _vwz4idpf _1p1dn7od _19pkv77o _2hwxv77o _otyrv77o _18u0v77o _mizu1r31 _1guj1r31 _p8tl1r31 _ra3xglyw _pbhaglyw _1q2vglyw _128m1o36 _11ow1o36 _j8b81o36 _1bas14y2 _19h614y2 _1d3914y2 _1ejjo89b _1u6lo89b _6ssho89b"]),
|
|
74
74
|
style: {
|
|
75
75
|
"--_sq39bb": (0, _runtime.ix)("0 0 0 2px ".concat("var(--ds-border-focused, #388BFF)"))
|
|
76
76
|
}
|
|
@@ -1,12 +1,15 @@
|
|
|
1
1
|
|
|
2
|
-
._1yt41e9d{padding:var(--ds-space-200,1rem)}
|
|
3
2
|
._zulpcxkx{gap:var(--ds-space-100,.5rem)}
|
|
4
3
|
._zulpud5o{gap:.625rem}._16jlkb7n{flex-grow:1}
|
|
4
|
+
._19bv1e9d{padding-left:var(--ds-space-200,1rem)}
|
|
5
5
|
._1bsb1osq{width:100%}
|
|
6
6
|
._1e0c1txw{display:flex}
|
|
7
7
|
._1o9zidpf{flex-shrink:0}
|
|
8
8
|
._2lx21bp4{flex-direction:column}
|
|
9
9
|
._4cvr1h6o{align-items:center}
|
|
10
10
|
._4t3i1k92{height:1.25rem}
|
|
11
|
+
._ca0q1e9d{padding-top:var(--ds-space-200,1rem)}
|
|
11
12
|
._e2oo1osq span{width:100%}
|
|
12
|
-
._i0dl1wug{flex-basis:auto}
|
|
13
|
+
._i0dl1wug{flex-basis:auto}
|
|
14
|
+
._n3td1e9d{padding-bottom:var(--ds-space-200,1rem)}
|
|
15
|
+
._u5f31e9d{padding-right:var(--ds-space-200,1rem)}
|
|
@@ -35,7 +35,7 @@ var HoverCardLoadingViewNew = function HoverCardLoadingViewNew(_ref) {
|
|
|
35
35
|
var LoadingSkeleton = (0, _platformFeatureFlags.fg)('platform-smart-card-icon-migration') ? _loadingSkeleton.LoadingSkeletonNew : _loadingSkeleton.LoadingSkeletonOld;
|
|
36
36
|
return /*#__PURE__*/_react.default.createElement("div", {
|
|
37
37
|
"data-testid": testId,
|
|
38
|
-
className: (0, _runtime.ax)(["
|
|
38
|
+
className: (0, _runtime.ax)(["_1e0c1txw _2lx21bp4 _ca0q1e9d _u5f31e9d _n3td1e9d _19bv1e9d"])
|
|
39
39
|
}, /*#__PURE__*/_react.default.createElement("div", {
|
|
40
40
|
className: (0, _runtime.ax)(["_zulpud5o _1e0c1txw _2lx21bp4 _4cvr1h6o"])
|
|
41
41
|
}, /*#__PURE__*/_react.default.createElement(_blocks.CustomBlock, (0, _extends2.default)({}, titleBlockProps, {
|
|
@@ -20,6 +20,7 @@ var _primitives = require("@atlaskit/primitives");
|
|
|
20
20
|
var _colors = require("@atlaskit/theme/colors");
|
|
21
21
|
var _messages = require("../../../messages");
|
|
22
22
|
var _HoverCard = require("../../HoverCard");
|
|
23
|
+
var _actionButton = require("../common/action-button");
|
|
23
24
|
var _Frame = require("../Frame");
|
|
24
25
|
var _Icon = require("../Icon");
|
|
25
26
|
var _IconEmotion = require("../Icon-emotion");
|
|
@@ -51,10 +52,16 @@ var InlineCardErroredView = exports.InlineCardErroredView = /*#__PURE__*/functio
|
|
|
51
52
|
});
|
|
52
53
|
(0, _defineProperty2.default)(_this, "renderActionButton", function () {
|
|
53
54
|
var onRetry = _this.props.onRetry;
|
|
54
|
-
var
|
|
55
|
-
|
|
55
|
+
var Button = (0, _withFrameStyleControl.default)(_button.default, _this.frameRef);
|
|
56
|
+
if ((0, _platformFeatureFlags.fg)('platform-linking-visual-refresh-v1')) {
|
|
57
|
+
return onRetry && /*#__PURE__*/_react.default.createElement(Button, {
|
|
58
|
+
component: _actionButton.ActionButton,
|
|
59
|
+
onClick: _this.handleRetry
|
|
60
|
+
}, /*#__PURE__*/_react.default.createElement(_reactIntlNext.FormattedMessage, _messages.messages.try_again));
|
|
61
|
+
}
|
|
62
|
+
return onRetry && /*#__PURE__*/_react.default.createElement(Button, {
|
|
56
63
|
spacing: "none",
|
|
57
|
-
component: (0, _platformFeatureFlags.fg)('bandicoots-compiled-migration-smartcard') ? _styled.
|
|
64
|
+
component: (0, _platformFeatureFlags.fg)('bandicoots-compiled-migration-smartcard') ? _styled.IconStyledButtonOldVisualRefresh : _styledEmotion.IconStyledButton,
|
|
58
65
|
onClick: _this.handleRetry,
|
|
59
66
|
role: "button"
|
|
60
67
|
}, /*#__PURE__*/_react.default.createElement(_reactIntlNext.FormattedMessage, _messages.messages.try_again));
|
|
@@ -23,6 +23,7 @@ var _primitives = require("@atlaskit/primitives");
|
|
|
23
23
|
var _colors = require("@atlaskit/theme/colors");
|
|
24
24
|
var _messages = require("../../../messages");
|
|
25
25
|
var _HoverCard = require("../../HoverCard");
|
|
26
|
+
var _actionButton = require("../common/action-button");
|
|
26
27
|
var _Frame = require("../Frame");
|
|
27
28
|
var _Icon = require("../Icon");
|
|
28
29
|
var _IconEmotion = require("../Icon-emotion");
|
|
@@ -112,20 +113,30 @@ var InlineCardForbiddenView = exports.InlineCardForbiddenView = /*#__PURE__*/fun
|
|
|
112
113
|
(0, _defineProperty2.default)(_this, "renderActionButton", function () {
|
|
113
114
|
var _this$props$requestAc;
|
|
114
115
|
var onAuthorise = _this.props.onAuthorise;
|
|
115
|
-
var
|
|
116
|
+
var LozengeWrapper = (0, _platformFeatureFlags.fg)('platform-linking-visual-refresh-v1') ? _IconAndTitleLayout.LozengeWrapper : _styled.LozengeWrapperOldVisualRefresh;
|
|
117
|
+
var Button = (0, _withFrameStyleControl.default)(_button.default, _this.frameRef);
|
|
116
118
|
var accessType = (_this$props$requestAc = _this.props.requestAccessContext) === null || _this$props$requestAc === void 0 ? void 0 : _this$props$requestAc.accessType;
|
|
117
119
|
if (_this.state.hasRequestAccessContextMessage) {
|
|
118
120
|
if ((0, _platformFeatureFlags.fg)('bandicoots-compiled-migration-smartcard')) {
|
|
119
|
-
|
|
121
|
+
if ((0, _platformFeatureFlags.fg)('platform-linking-visual-refresh-v1')) {
|
|
122
|
+
var isDisabled = accessType === 'PENDING_REQUEST_EXISTS';
|
|
123
|
+
return /*#__PURE__*/_react.default.createElement(Button, {
|
|
124
|
+
onClick: _this.handleRetry,
|
|
125
|
+
component: _actionButton.ActionButton,
|
|
126
|
+
testId: "button-connect-other-account",
|
|
127
|
+
isDisabled: isDisabled
|
|
128
|
+
}, _this.renderForbiddenAccessMessage());
|
|
129
|
+
}
|
|
130
|
+
return /*#__PURE__*/_react.default.createElement(Button, {
|
|
120
131
|
spacing: "none",
|
|
121
132
|
onClick: _this.handleRetry,
|
|
122
|
-
component: _styled2.
|
|
133
|
+
component: _styled2.IconStyledButtonOldVisualRefresh,
|
|
123
134
|
testId: "button-connect-other-account",
|
|
124
135
|
role: "button",
|
|
125
136
|
isDisabled: accessType === 'PENDING_REQUEST_EXISTS'
|
|
126
137
|
}, _this.renderForbiddenAccessMessage());
|
|
127
138
|
} else {
|
|
128
|
-
return /*#__PURE__*/_react.default.createElement(
|
|
139
|
+
return /*#__PURE__*/_react.default.createElement(Button, {
|
|
129
140
|
spacing: "none",
|
|
130
141
|
onClick: _this.handleRetry,
|
|
131
142
|
component: _styledEmotion.IconStyledButton,
|
|
@@ -136,13 +147,22 @@ var InlineCardForbiddenView = exports.InlineCardForbiddenView = /*#__PURE__*/fun
|
|
|
136
147
|
}
|
|
137
148
|
}
|
|
138
149
|
if (onAuthorise) {
|
|
139
|
-
|
|
150
|
+
if ((0, _platformFeatureFlags.fg)('platform-linking-visual-refresh-v1')) {
|
|
151
|
+
return /*#__PURE__*/_react.default.createElement(LozengeWrapper, null, /*#__PURE__*/_react.default.createElement(_primitives.Pressable, {
|
|
152
|
+
xcss: actionButtonLozengeStyle,
|
|
153
|
+
onClick: _this.handleRetry,
|
|
154
|
+
testId: "button-connect-other-account"
|
|
155
|
+
}, /*#__PURE__*/_react.default.createElement(_lozenge.default, {
|
|
156
|
+
appearance: 'moved'
|
|
157
|
+
}, _this.renderForbiddenAccessMessage())));
|
|
158
|
+
}
|
|
159
|
+
return /*#__PURE__*/_react.default.createElement(Button, {
|
|
140
160
|
spacing: "none",
|
|
141
161
|
onClick: _this.handleRetry,
|
|
142
162
|
appearance: "subtle-link",
|
|
143
163
|
testId: "button-connect-other-account",
|
|
144
164
|
role: "button"
|
|
145
|
-
}, /*#__PURE__*/_react.default.createElement(
|
|
165
|
+
}, /*#__PURE__*/_react.default.createElement(LozengeWrapper, null, /*#__PURE__*/_react.default.createElement(_lozenge.default, {
|
|
146
166
|
appearance: 'moved'
|
|
147
167
|
}, _this.renderForbiddenAccessMessage())));
|
|
148
168
|
}
|
|
@@ -182,4 +202,8 @@ var InlineCardForbiddenView = exports.InlineCardForbiddenView = /*#__PURE__*/fun
|
|
|
182
202
|
return content;
|
|
183
203
|
}
|
|
184
204
|
}]);
|
|
185
|
-
}(_react.default.Component);
|
|
205
|
+
}(_react.default.Component);
|
|
206
|
+
var actionButtonLozengeStyle = (0, _primitives.xcss)({
|
|
207
|
+
backgroundColor: 'color.background.neutral.subtle',
|
|
208
|
+
padding: 'space.0'
|
|
209
|
+
});
|
|
@@ -1,9 +1,10 @@
|
|
|
1
|
-
|
|
1
|
+
._11c81doa{font:var(--ds-font-body-large,normal 400 1pc/24px ui-sans-serif,-apple-system,BlinkMacSystemFont,"Segoe UI",Ubuntu,system-ui,"Helvetica Neue",sans-serif)}
|
|
2
2
|
._19ith6cr{border:1px solid var(--ds-border,#dfe1e6)}
|
|
3
3
|
._1yt4x7n9{padding:var(--ds-space-025,2px) 0}
|
|
4
4
|
._2rkoiti9{border-radius:var(--ds-border-radius-100,4px)}
|
|
5
5
|
._v56415x0{transition:all .1s ease-in-out}
|
|
6
|
-
._1h6dmr28{border-color:var(--ds-border-accent-blue,#2684ff)}
|
|
6
|
+
._1h6dmr28{border-color:var(--ds-border-accent-blue,#2684ff)}
|
|
7
|
+
._12ji1r31{outline-color:currentColor}
|
|
7
8
|
._12y31o36{outline-width:medium}
|
|
8
9
|
._16d9qvcn{-webkit-box-decoration-break:clone;box-decoration-break:clone}
|
|
9
10
|
._16qscw00{box-shadow:0 0 0 2px var(--ds-border-selected,#4c9aff)}
|
|
@@ -12,6 +12,7 @@ var _runtime = require("@compiled/react/runtime");
|
|
|
12
12
|
var _extends2 = _interopRequireDefault(require("@babel/runtime/helpers/extends"));
|
|
13
13
|
var _objectWithoutProperties2 = _interopRequireDefault(require("@babel/runtime/helpers/objectWithoutProperties"));
|
|
14
14
|
var _react = _interopRequireWildcard(require("react"));
|
|
15
|
+
var _platformFeatureFlags = require("@atlaskit/platform-feature-flags");
|
|
15
16
|
var _colors = require("@atlaskit/theme/colors");
|
|
16
17
|
var _excluded = ["truncateInline", "withoutBackground", "isHovered", "isInteractive", "isSelected", "href"],
|
|
17
18
|
_excluded2 = ["truncateInline", "withoutBackground", "isHovered", "isInteractive", "isSelected", "href"];
|
|
@@ -29,7 +30,7 @@ var WrapperSpan = exports.WrapperSpan = /*#__PURE__*/(0, _react.forwardRef)(func
|
|
|
29
30
|
return /*#__PURE__*/_react.default.createElement("span", (0, _extends2.default)({
|
|
30
31
|
ref: ref
|
|
31
32
|
}, props, {
|
|
32
|
-
className: (0, _runtime.ax)(["_1yt4x7n9 _2rkoiti9 _v56415x0 _vwz4qslr _1e0c1nu9 _16d9qvcn _syaz1y58 _1rkwglyw _4cvxmr28", truncateInline && "_1reo15vq _18m915vq _ca0qidpf _u5f3idpf _n3tdidpf _19bvidpf _1bto1l2s _1nmz9jpi _vwz4183y _1e0c1abx _1yyjkb7n _sudp1e54 _17bix7n9 _nr8z1o8l _102kqslr", withoutBackground ? "_19bvidpf _18u01i6y" : "_19ith6cr _bfhkhp5a _1a3b18uv _4fprglyw _5goinqa1 _9oik18uv _1bnxglyw _jf4cnqa1 _1nrm18uv _c2waglyw _1iohnqa1", isHovered && "_1h6dmr28", isHovered && !withoutBackground && "_4bfu18uv _1hmsglyw _ajmmnqa1", isSelected ? "_12ji1r31 _1qu2glyw _12y31o36 _80omtlke _16qscw00 _uiztglyw _1a3b18uv _4fprglyw _5goinqa1 _9oik18uv _1bnxglyw _jf4cnqa1 _bfw7h6cr _1nrm18uv _c2waglyw _1iohnqa1" : "_uizt1kdv"])
|
|
33
|
+
className: (0, _runtime.ax)([(0, _platformFeatureFlags.fg)('platform-linking-visual-refresh-v1') ? "_11c81doa _1yt4x7n9 _2rkoiti9 _v56415x0 _1e0c1nu9 _16d9qvcn _syaz1y58 _1rkwglyw _4cvxmr28" : "_1yt4x7n9 _2rkoiti9 _v56415x0 _vwz4qslr _1e0c1nu9 _16d9qvcn _syaz1y58 _1rkwglyw _4cvxmr28", truncateInline && (0, _platformFeatureFlags.fg)('platform-linking-visual-refresh-v1') && "_1reo15vq _18m915vq _ca0qidpf _u5f3idpf _n3tdidpf _19bvidpf _1bto1l2s _1nmz9jpi _1e0c1abx _1yyjkb7n _sudp1e54 _17bix7n9 _nr8z1o8l", truncateInline && !(0, _platformFeatureFlags.fg)('platform-linking-visual-refresh-v1') && "_1reo15vq _18m915vq _ca0qidpf _u5f3idpf _n3tdidpf _19bvidpf _1bto1l2s _1nmz9jpi _vwz4183y _1e0c1abx _1yyjkb7n _sudp1e54 _17bix7n9 _nr8z1o8l _102kqslr", withoutBackground ? "_19bvidpf _18u01i6y" : "_19ith6cr _bfhkhp5a _1a3b18uv _4fprglyw _5goinqa1 _9oik18uv _1bnxglyw _jf4cnqa1 _1nrm18uv _c2waglyw _1iohnqa1", isHovered && "_1h6dmr28", isHovered && !withoutBackground && "_4bfu18uv _1hmsglyw _ajmmnqa1", isSelected ? "_12ji1r31 _1qu2glyw _12y31o36 _80omtlke _16qscw00 _uiztglyw _1a3b18uv _4fprglyw _5goinqa1 _9oik18uv _1bnxglyw _jf4cnqa1 _bfw7h6cr _1nrm18uv _c2waglyw _1iohnqa1" : "_uizt1kdv"])
|
|
33
34
|
}), props.children);
|
|
34
35
|
});
|
|
35
36
|
var WrapperAnchor = exports.WrapperAnchor = /*#__PURE__*/(0, _react.forwardRef)(function (_ref2, ref) {
|
|
@@ -44,10 +45,11 @@ var WrapperAnchor = exports.WrapperAnchor = /*#__PURE__*/(0, _react.forwardRef)(
|
|
|
44
45
|
href: href,
|
|
45
46
|
ref: ref
|
|
46
47
|
}, props, {
|
|
47
|
-
className: (0, _runtime.ax)(["_1yt4x7n9 _2rkoiti9 _v56415x0 _vwz4qslr _1e0c1nu9 _16d9qvcn _syaz1y58 _1rkwglyw _4cvxmr28", truncateInline && "_1reo15vq _18m915vq _ca0qidpf _u5f3idpf _n3tdidpf _19bvidpf _1bto1l2s _1nmz9jpi _vwz4183y _1e0c1abx _1yyjkb7n _sudp1e54 _17bix7n9 _nr8z1o8l _102kqslr", withoutBackground ? "_19bvidpf _18u01i6y" : "_19ith6cr _bfhkhp5a _1a3b18uv _4fprglyw _5goinqa1 _9oik18uv _1bnxglyw _jf4cnqa1 _1nrm18uv _c2waglyw _1iohnqa1", isHovered && "_1h6dmr28", isHovered && !withoutBackground && "_4bfu18uv _1hmsglyw _ajmmnqa1", isSelected ? "_12ji1r31 _1qu2glyw _12y31o36 _80omtlke _16qscw00 _uiztglyw _1a3b18uv _4fprglyw _5goinqa1 _9oik18uv _1bnxglyw _jf4cnqa1 _bfw7h6cr _1nrm18uv _c2waglyw _1iohnqa1" : "_uizt1kdv", isInteractive && "_nt751r31 _49pcglyw _1hvw1o36 _1372tlke _7ehicw00 _1j5pglyw _1di629zg"])
|
|
48
|
+
className: (0, _runtime.ax)([(0, _platformFeatureFlags.fg)('platform-linking-visual-refresh-v1') ? "_11c81doa _1yt4x7n9 _2rkoiti9 _v56415x0 _1e0c1nu9 _16d9qvcn _syaz1y58 _1rkwglyw _4cvxmr28" : "_1yt4x7n9 _2rkoiti9 _v56415x0 _vwz4qslr _1e0c1nu9 _16d9qvcn _syaz1y58 _1rkwglyw _4cvxmr28", truncateInline && (0, _platformFeatureFlags.fg)('platform-linking-visual-refresh-v1') && "_1reo15vq _18m915vq _ca0qidpf _u5f3idpf _n3tdidpf _19bvidpf _1bto1l2s _1nmz9jpi _1e0c1abx _1yyjkb7n _sudp1e54 _17bix7n9 _nr8z1o8l", truncateInline && !(0, _platformFeatureFlags.fg)('platform-linking-visual-refresh-v1') && "_1reo15vq _18m915vq _ca0qidpf _u5f3idpf _n3tdidpf _19bvidpf _1bto1l2s _1nmz9jpi _vwz4183y _1e0c1abx _1yyjkb7n _sudp1e54 _17bix7n9 _nr8z1o8l _102kqslr", withoutBackground ? "_19bvidpf _18u01i6y" : "_19ith6cr _bfhkhp5a _1a3b18uv _4fprglyw _5goinqa1 _9oik18uv _1bnxglyw _jf4cnqa1 _1nrm18uv _c2waglyw _1iohnqa1", isHovered && "_1h6dmr28", isHovered && !withoutBackground && "_4bfu18uv _1hmsglyw _ajmmnqa1", isSelected ? "_12ji1r31 _1qu2glyw _12y31o36 _80omtlke _16qscw00 _uiztglyw _1a3b18uv _4fprglyw _5goinqa1 _9oik18uv _1bnxglyw _jf4cnqa1 _bfw7h6cr _1nrm18uv _c2waglyw _1iohnqa1" : "_uizt1kdv", isInteractive && "_nt751r31 _49pcglyw _1hvw1o36 _1372tlke _7ehicw00 _1j5pglyw _1di629zg"])
|
|
48
49
|
}), props.children);
|
|
49
50
|
});
|
|
50
|
-
var
|
|
51
|
+
var baseWrapperStylesNew = null;
|
|
52
|
+
var baseWrapperStylesOld = null;
|
|
51
53
|
|
|
52
54
|
// if the parent instruct the wrapper to be interactive, and the wrapper is in focus, apply selectedStyles
|
|
53
55
|
var interactiveStyles = null;
|
|
@@ -55,6 +57,7 @@ var hoveredStyles = null;
|
|
|
55
57
|
var hoveredWithBackgroundStyles = null;
|
|
56
58
|
var withoutBackgroundStyles = null;
|
|
57
59
|
var withBackgroundStyles = null;
|
|
58
|
-
var
|
|
60
|
+
var truncateStylesNew = null;
|
|
61
|
+
var truncateStylesOld = null;
|
|
59
62
|
var notSelectedStyle = null;
|
|
60
63
|
var selectedStyles = null;
|
|
@@ -6,7 +6,7 @@ var _typeof = require("@babel/runtime/helpers/typeof");
|
|
|
6
6
|
Object.defineProperty(exports, "__esModule", {
|
|
7
7
|
value: true
|
|
8
8
|
});
|
|
9
|
-
exports.IconAndTitleLayout = void 0;
|
|
9
|
+
exports.LozengeWrapper = exports.IconTitleWrapper = exports.IconAndTitleLayout = void 0;
|
|
10
10
|
require("./index.compiled.css");
|
|
11
11
|
var _react = _interopRequireWildcard(require("react"));
|
|
12
12
|
var _runtime = require("@compiled/react/runtime");
|
|
@@ -18,9 +18,11 @@ var _inherits2 = _interopRequireDefault(require("@babel/runtime/helpers/inherits
|
|
|
18
18
|
var _defineProperty2 = _interopRequireDefault(require("@babel/runtime/helpers/defineProperty"));
|
|
19
19
|
var _extends2 = _interopRequireDefault(require("@babel/runtime/helpers/extends"));
|
|
20
20
|
var _objectWithoutProperties2 = _interopRequireDefault(require("@babel/runtime/helpers/objectWithoutProperties"));
|
|
21
|
+
var _reactMagneticDi = require("react-magnetic-di");
|
|
21
22
|
var _reactRenderImage = _interopRequireDefault(require("react-render-image"));
|
|
22
23
|
var _link = _interopRequireDefault(require("@atlaskit/icon/core/migration/link"));
|
|
23
24
|
var _platformFeatureFlags = require("@atlaskit/platform-feature-flags");
|
|
25
|
+
var _primitives = require("@atlaskit/primitives");
|
|
24
26
|
var _colors = require("@atlaskit/theme/colors");
|
|
25
27
|
var _Icon = require("../Icon");
|
|
26
28
|
var _styledEmotion = require("../styled-emotion");
|
|
@@ -33,7 +35,7 @@ function _interopRequireWildcard(e, r) { if (!r && e && e.__esModule) return e;
|
|
|
33
35
|
function _callSuper(t, o, e) { return o = (0, _getPrototypeOf2.default)(o), (0, _possibleConstructorReturn2.default)(t, _isNativeReflectConstruct() ? Reflect.construct(o, e || [], (0, _getPrototypeOf2.default)(t).constructor) : o.apply(t, e)); }
|
|
34
36
|
function _isNativeReflectConstruct() { try { var t = !Boolean.prototype.valueOf.call(Reflect.construct(Boolean, [], function () {})); } catch (t) {} return (_isNativeReflectConstruct = function _isNativeReflectConstruct() { return !!t; })(); }
|
|
35
37
|
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-styled -- Ignored via go/DSP-18766
|
|
36
|
-
var
|
|
38
|
+
var NoLinkAppearanceOldVisualRefresh = (0, _react.forwardRef)(function (_ref, __cmplr) {
|
|
37
39
|
var _ref$as = _ref.as,
|
|
38
40
|
C = _ref$as === void 0 ? "span" : _ref$as,
|
|
39
41
|
__cmpls = _ref.style,
|
|
@@ -47,7 +49,7 @@ var NoLinkAppearance = (0, _react.forwardRef)(function (_ref, __cmplr) {
|
|
|
47
49
|
|
|
48
50
|
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-styled -- Ignored via go/DSP-18766
|
|
49
51
|
if (process.env.NODE_ENV !== 'production') {
|
|
50
|
-
|
|
52
|
+
NoLinkAppearanceOldVisualRefresh.displayName = 'NoLinkAppearanceOldVisualRefresh';
|
|
51
53
|
}
|
|
52
54
|
var LinkAppearance = (0, _react.forwardRef)(function (_ref2, __cmplr) {
|
|
53
55
|
var _ref2$as = _ref2.as,
|
|
@@ -100,12 +102,26 @@ var IconAndTitleLayout = exports.IconAndTitleLayout = /*#__PURE__*/function (_Re
|
|
|
100
102
|
icon = _this$props.icon,
|
|
101
103
|
emoji = _this$props.emoji;
|
|
102
104
|
if (emoji) {
|
|
103
|
-
|
|
105
|
+
if ((0, _platformFeatureFlags.fg)('platform-linking-visual-refresh-v1')) {
|
|
106
|
+
return /*#__PURE__*/_react.default.createElement(_primitives.Box, {
|
|
107
|
+
as: "span",
|
|
108
|
+
xcss: iconWrapperStyle,
|
|
109
|
+
testId: "icon-position-emoji-wrapper"
|
|
110
|
+
}, emoji);
|
|
111
|
+
}
|
|
112
|
+
return (0, _platformFeatureFlags.fg)('bandicoots-compiled-migration-smartcard') ? /*#__PURE__*/_react.default.createElement(_styled.EmojiWrapperOldVisualRefresh, null, emoji) : /*#__PURE__*/_react.default.createElement(_styledEmotion2.EmojiWrapper, null, emoji);
|
|
104
113
|
}
|
|
105
114
|
if (!icon || typeof icon === 'string') {
|
|
106
115
|
return null;
|
|
107
116
|
}
|
|
108
|
-
|
|
117
|
+
if ((0, _platformFeatureFlags.fg)('platform-linking-visual-refresh-v1')) {
|
|
118
|
+
return /*#__PURE__*/_react.default.createElement(_primitives.Box, {
|
|
119
|
+
as: "span",
|
|
120
|
+
xcss: iconWrapperStyle,
|
|
121
|
+
testId: "icon-atlaskit-icon-wrapper"
|
|
122
|
+
}, icon);
|
|
123
|
+
}
|
|
124
|
+
return (0, _platformFeatureFlags.fg)('bandicoots-compiled-migration-smartcard') ? /*#__PURE__*/_react.default.createElement(_styled.IconWrapperOldVisualRefresh, null, icon) : /*#__PURE__*/_react.default.createElement(_styledEmotion2.IconWrapper, null, icon);
|
|
109
125
|
}
|
|
110
126
|
}, {
|
|
111
127
|
key: "renderImageIcon",
|
|
@@ -114,6 +130,21 @@ var IconAndTitleLayout = exports.IconAndTitleLayout = /*#__PURE__*/function (_Re
|
|
|
114
130
|
if (!url || typeof url !== 'string') {
|
|
115
131
|
return null;
|
|
116
132
|
}
|
|
133
|
+
if ((0, _platformFeatureFlags.fg)('platform-linking-visual-refresh-v1')) {
|
|
134
|
+
return /*#__PURE__*/_react.default.createElement(_reactRenderImage.default, {
|
|
135
|
+
src: url,
|
|
136
|
+
loaded: /*#__PURE__*/_react.default.createElement("img", {
|
|
137
|
+
src: url,
|
|
138
|
+
"data-testid": "".concat(testId, "-image"),
|
|
139
|
+
alt: "",
|
|
140
|
+
className: (0, _runtime.ax)(["_1bsb1osq"])
|
|
141
|
+
}),
|
|
142
|
+
errored: errored,
|
|
143
|
+
loading: /*#__PURE__*/_react.default.createElement(_Icon.Shimmer, {
|
|
144
|
+
testId: "".concat(testId, "-loading")
|
|
145
|
+
})
|
|
146
|
+
});
|
|
147
|
+
}
|
|
117
148
|
return /*#__PURE__*/_react.default.createElement(_reactRenderImage.default, {
|
|
118
149
|
src: url,
|
|
119
150
|
loaded: /*#__PURE__*/_react.default.createElement(_Icon.Icon
|
|
@@ -133,10 +164,18 @@ var IconAndTitleLayout = exports.IconAndTitleLayout = /*#__PURE__*/function (_Re
|
|
|
133
164
|
key: "renderIconPlaceholder",
|
|
134
165
|
value: function renderIconPlaceholder(testId) {
|
|
135
166
|
var defaultIcon = this.props.defaultIcon;
|
|
167
|
+
if ((0, _platformFeatureFlags.fg)('platform-linking-visual-refresh-v1')) {
|
|
168
|
+
return defaultIcon || /*#__PURE__*/_react.default.createElement(_link.default, {
|
|
169
|
+
label: "link",
|
|
170
|
+
LEGACY_size: "small",
|
|
171
|
+
testId: "".concat(testId, "-default"),
|
|
172
|
+
color: "currentColor"
|
|
173
|
+
});
|
|
174
|
+
}
|
|
136
175
|
if (defaultIcon) {
|
|
137
|
-
return /*#__PURE__*/_react.default.createElement(_styled.
|
|
176
|
+
return /*#__PURE__*/_react.default.createElement(_styled.IconWrapperOldVisualRefresh, null, defaultIcon);
|
|
138
177
|
}
|
|
139
|
-
return /*#__PURE__*/_react.default.createElement(_styled.
|
|
178
|
+
return /*#__PURE__*/_react.default.createElement(_styled.IconWrapperOldVisualRefresh, null, /*#__PURE__*/_react.default.createElement(_link.default, {
|
|
140
179
|
label: "link",
|
|
141
180
|
LEGACY_size: "small",
|
|
142
181
|
testId: "".concat(testId, "-default"),
|
|
@@ -156,6 +195,13 @@ var IconAndTitleLayout = exports.IconAndTitleLayout = /*#__PURE__*/function (_Re
|
|
|
156
195
|
}
|
|
157
196
|
var placeholder = this.renderIconPlaceholder(testId);
|
|
158
197
|
var image = this.renderImageIcon(placeholder, testId);
|
|
198
|
+
if ((0, _platformFeatureFlags.fg)('platform-linking-visual-refresh-v1')) {
|
|
199
|
+
return /*#__PURE__*/_react.default.createElement(_primitives.Box, {
|
|
200
|
+
as: "span",
|
|
201
|
+
xcss: iconWrapperStyle,
|
|
202
|
+
testId: "".concat(testId, "-image-wrapper")
|
|
203
|
+
}, image || placeholder);
|
|
204
|
+
}
|
|
159
205
|
return image || placeholder;
|
|
160
206
|
}
|
|
161
207
|
}, {
|
|
@@ -170,20 +216,32 @@ var IconAndTitleLayout = exports.IconAndTitleLayout = /*#__PURE__*/function (_Re
|
|
|
170
216
|
rightSide = _this$props2.rightSide,
|
|
171
217
|
_this$props2$testId = _this$props2.testId,
|
|
172
218
|
testId = _this$props2$testId === void 0 ? 'inline-card-icon-and-title' : _this$props2$testId;
|
|
173
|
-
var titlePart = (0, _platformFeatureFlags.fg)('bandicoots-compiled-migration-smartcard') ? /*#__PURE__*/_react.default.createElement(_react.default.Fragment, null, /*#__PURE__*/_react.default.createElement(
|
|
219
|
+
var titlePart = (0, _platformFeatureFlags.fg)('bandicoots-compiled-migration-smartcard') ? /*#__PURE__*/_react.default.createElement(_react.default.Fragment, null, (0, _platformFeatureFlags.fg)('platform-linking-visual-refresh-v1') ? /*#__PURE__*/_react.default.createElement(_primitives.Box, {
|
|
220
|
+
as: "span",
|
|
221
|
+
xcss: iconOuterWrapperStyle,
|
|
222
|
+
testId: "icon-position-wrapper"
|
|
223
|
+
}, children || /*#__PURE__*/_react.default.createElement(_react.default.Fragment, null, /*#__PURE__*/_react.default.createElement(_primitives.Box, {
|
|
224
|
+
as: "span",
|
|
225
|
+
xcss: iconEmptyStyle,
|
|
226
|
+
testId: "icon-empty-wrapper"
|
|
227
|
+
}), this.renderIcon(testId))) : /*#__PURE__*/_react.default.createElement(_styled.IconPositionWrapperOldVisualRefresh, {
|
|
174
228
|
"data-testid": "icon-position-wrapper"
|
|
175
|
-
}, children || /*#__PURE__*/_react.default.createElement(_react.default.Fragment, null, /*#__PURE__*/_react.default.createElement(_styled.
|
|
229
|
+
}, children || /*#__PURE__*/_react.default.createElement(_react.default.Fragment, null, /*#__PURE__*/_react.default.createElement(_styled.IconEmptyWrapperOldVisualRefresh, {
|
|
176
230
|
"data-testid": "icon-empty-wrapper"
|
|
177
|
-
}), this.renderIcon(testId))), /*#__PURE__*/_react.default.createElement(
|
|
178
|
-
|
|
179
|
-
, {
|
|
231
|
+
}), this.renderIcon(testId))), (0, _platformFeatureFlags.fg)('platform-linking-visual-refresh-v1') ? /*#__PURE__*/_react.default.createElement(_primitives.Box, (0, _extends2.default)({
|
|
232
|
+
as: "span",
|
|
180
233
|
style: {
|
|
181
|
-
color: titleTextColor
|
|
234
|
+
color: this.props.titleTextColor
|
|
182
235
|
}
|
|
183
|
-
|
|
184
|
-
|
|
185
|
-
|
|
186
|
-
|
|
236
|
+
}, !(0, _platformFeatureFlags.fg)('platform-linking-visual-refresh-v1') ? {
|
|
237
|
+
className: _styled.TitleWrapperClassNameOldVisualRefresh
|
|
238
|
+
} : {}), title) : /*#__PURE__*/_react.default.createElement(_styled.TitleWrapperOldVisualRefresh, (0, _extends2.default)({
|
|
239
|
+
style: {
|
|
240
|
+
color: this.props.titleTextColor
|
|
241
|
+
}
|
|
242
|
+
}, !(0, _platformFeatureFlags.fg)('platform-linking-visual-refresh-v1') ? {
|
|
243
|
+
className: _styled.TitleWrapperClassNameOldVisualRefresh
|
|
244
|
+
} : {}), title)) : /*#__PURE__*/_react.default.createElement(_react.default.Fragment, null, /*#__PURE__*/_react.default.createElement(_styledEmotion2.IconPositionWrapper, {
|
|
187
245
|
"data-testid": "icon-position-wrapper"
|
|
188
246
|
}, children || /*#__PURE__*/_react.default.createElement(_react.default.Fragment, null, /*#__PURE__*/_react.default.createElement(_styledEmotion2.IconEmptyWrapper, {
|
|
189
247
|
"data-testid": "icon-empty-wrapper"
|
|
@@ -195,23 +253,31 @@ var IconAndTitleLayout = exports.IconAndTitleLayout = /*#__PURE__*/function (_Re
|
|
|
195
253
|
}
|
|
196
254
|
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-classname-prop -- Ignored via go/DSP-18766
|
|
197
255
|
,
|
|
198
|
-
className: _styled.
|
|
256
|
+
className: _styled.TitleWrapperClassNameOldVisualRefresh
|
|
199
257
|
}, title));
|
|
200
258
|
if ((0, _platformFeatureFlags.fg)('bandicoots-compiled-migration-smartcard')) {
|
|
201
|
-
return (
|
|
202
|
-
|
|
203
|
-
|
|
204
|
-
|
|
205
|
-
|
|
206
|
-
|
|
207
|
-
|
|
208
|
-
|
|
209
|
-
|
|
210
|
-
|
|
211
|
-
|
|
212
|
-
|
|
213
|
-
|
|
214
|
-
|
|
259
|
+
return /*#__PURE__*/_react.default.createElement(_react.default.Fragment, null, (0, _platformFeatureFlags.fg)('platform-linking-visual-refresh-v1') ? /*#__PURE__*/_react.default.createElement(IconTitleWrapper, {
|
|
260
|
+
style: {
|
|
261
|
+
color: this.props.titleColor
|
|
262
|
+
},
|
|
263
|
+
testId: testId
|
|
264
|
+
}, link ? /*#__PURE__*/_react.default.createElement(LinkAppearance, {
|
|
265
|
+
href: link,
|
|
266
|
+
onClick: this.handleClick,
|
|
267
|
+
onKeyPress: this.handleKeyPress
|
|
268
|
+
}, titlePart) : titlePart, rightSide ? /*#__PURE__*/_react.default.createElement(_primitives.Box, {
|
|
269
|
+
as: "span",
|
|
270
|
+
xcss: noLinkAppearanceStyle
|
|
271
|
+
}, rightSide) : null) : /*#__PURE__*/_react.default.createElement(_styled.IconTitleWrapperOldVisualRefresh, {
|
|
272
|
+
style: {
|
|
273
|
+
color: this.props.titleColor
|
|
274
|
+
},
|
|
275
|
+
"data-testid": testId
|
|
276
|
+
}, link ? /*#__PURE__*/_react.default.createElement(LinkAppearance, {
|
|
277
|
+
href: link,
|
|
278
|
+
onClick: this.handleClick,
|
|
279
|
+
onKeyPress: this.handleKeyPress
|
|
280
|
+
}, titlePart) : titlePart, rightSide ? /*#__PURE__*/_react.default.createElement(NoLinkAppearanceOldVisualRefresh, null, rightSide) : null));
|
|
215
281
|
} else {
|
|
216
282
|
return (
|
|
217
283
|
/*#__PURE__*/
|
|
@@ -233,4 +299,68 @@ var IconAndTitleLayout = exports.IconAndTitleLayout = /*#__PURE__*/function (_Re
|
|
|
233
299
|
}(_react.default.Component);
|
|
234
300
|
(0, _defineProperty2.default)(IconAndTitleLayout, "defaultProps", {
|
|
235
301
|
rightSideSpacer: true
|
|
302
|
+
});
|
|
303
|
+
var IconTitleWrapper = exports.IconTitleWrapper = function IconTitleWrapper(props) {
|
|
304
|
+
return /*#__PURE__*/_react.default.createElement(_primitives.Box, (0, _extends2.default)({
|
|
305
|
+
as: "span",
|
|
306
|
+
xcss: iconTitleWrapperStyle
|
|
307
|
+
}, props));
|
|
308
|
+
};
|
|
309
|
+
var LozengeWrapper = exports.LozengeWrapper = function LozengeWrapper(props) {
|
|
310
|
+
return /*#__PURE__*/_react.default.createElement(_primitives.Box, {
|
|
311
|
+
as: "span",
|
|
312
|
+
xcss: lozengeWrapperStyle
|
|
313
|
+
}, /*#__PURE__*/_react.default.createElement(_primitives.Box, (0, _extends2.default)({
|
|
314
|
+
xcss: lozengeInternalWrapperStyle
|
|
315
|
+
}, props)));
|
|
316
|
+
};
|
|
317
|
+
var lozengeInternalWrapperStyle = (0, _primitives.xcss)({
|
|
318
|
+
paddingBottom: 'space.025'
|
|
319
|
+
});
|
|
320
|
+
var lozengeWrapperStyle = (0, _primitives.xcss)({
|
|
321
|
+
display: 'inline-block',
|
|
322
|
+
verticalAlign: 'bottom',
|
|
323
|
+
marginTop: 'space.0',
|
|
324
|
+
marginRight: 'space.050',
|
|
325
|
+
marginBottom: 'space.0',
|
|
326
|
+
marginLeft: 'space.025'
|
|
327
|
+
});
|
|
328
|
+
var horizontalPadding = 'space.050';
|
|
329
|
+
var verticalPadding = 'space.025';
|
|
330
|
+
var iconWidth = '16px';
|
|
331
|
+
var iconEmptyStyle = (0, _primitives.xcss)({
|
|
332
|
+
width: iconWidth,
|
|
333
|
+
display: 'inline-block',
|
|
334
|
+
opacity: 0
|
|
335
|
+
});
|
|
336
|
+
var iconOuterWrapperStyle = (0, _primitives.xcss)({
|
|
337
|
+
marginRight: 'space.050',
|
|
338
|
+
display: 'inline-block',
|
|
339
|
+
position: 'relative'
|
|
340
|
+
});
|
|
341
|
+
var iconTitleWrapperStyle = (0, _primitives.xcss)({
|
|
342
|
+
whiteSpace: 'pre-wrap',
|
|
343
|
+
wordBreak: 'break-all',
|
|
344
|
+
boxDecorationBreak: 'clone',
|
|
345
|
+
paddingTop: verticalPadding,
|
|
346
|
+
paddingRight: horizontalPadding,
|
|
347
|
+
paddingBottom: verticalPadding,
|
|
348
|
+
paddingLeft: horizontalPadding
|
|
349
|
+
});
|
|
350
|
+
var iconWrapperStyle = (0, _primitives.xcss)({
|
|
351
|
+
position: 'absolute',
|
|
352
|
+
display: 'inline-flex',
|
|
353
|
+
alignItems: 'center',
|
|
354
|
+
boxSizing: 'border-box',
|
|
355
|
+
top: 'space.0',
|
|
356
|
+
left: 'space.0',
|
|
357
|
+
bottom: 'space.0',
|
|
358
|
+
width: iconWidth,
|
|
359
|
+
userSelect: 'none'
|
|
360
|
+
});
|
|
361
|
+
var iconImageStyle = null;
|
|
362
|
+
var noLinkAppearanceStyle = (0, _primitives.xcss)({
|
|
363
|
+
color: 'color.text.subtlest',
|
|
364
|
+
font: 'font.body',
|
|
365
|
+
marginLeft: 'space.050'
|
|
236
366
|
});
|