@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
|
@@ -2,21 +2,22 @@ import _extends from "@babel/runtime/helpers/extends";
|
|
|
2
2
|
import _defineProperty from "@babel/runtime/helpers/defineProperty";
|
|
3
3
|
import React from 'react';
|
|
4
4
|
import { FormattedMessage } from 'react-intl-next';
|
|
5
|
-
import
|
|
5
|
+
import ButtonOld from '@atlaskit/button';
|
|
6
6
|
import LockLockedIcon from '@atlaskit/icon/core/lock-locked';
|
|
7
7
|
import LegacyLockIcon from '@atlaskit/icon/glyph/lock-filled';
|
|
8
8
|
import Lozenge from '@atlaskit/lozenge';
|
|
9
9
|
import { fg } from '@atlaskit/platform-feature-flags';
|
|
10
|
-
import { Box, xcss } from '@atlaskit/primitives';
|
|
10
|
+
import { Box, Pressable, xcss } from '@atlaskit/primitives';
|
|
11
11
|
import { N500, R400 } from '@atlaskit/theme/colors';
|
|
12
12
|
import { messages } from '../../../messages';
|
|
13
13
|
import { HoverCard } from '../../HoverCard';
|
|
14
|
+
import { ActionButton } from '../common/action-button';
|
|
14
15
|
import { Frame } from '../Frame';
|
|
15
16
|
import { AKIconWrapper } from '../Icon';
|
|
16
17
|
import { AKIconWrapper as AKIconWrapperOld } from '../Icon-emotion';
|
|
17
|
-
import { IconAndTitleLayout } from '../IconAndTitleLayout';
|
|
18
|
-
import {
|
|
19
|
-
import {
|
|
18
|
+
import { IconAndTitleLayout, LozengeWrapper as LozengeWrapperNew } from '../IconAndTitleLayout';
|
|
19
|
+
import { LozengeWrapperOldVisualRefresh } from '../IconAndTitleLayout/styled';
|
|
20
|
+
import { IconStyledButtonOldVisualRefresh } from '../styled';
|
|
20
21
|
import { IconStyledButton as IconStyledButtonOld } from '../styled-emotion';
|
|
21
22
|
import withFrameStyleControl from '../utils/withFrameStyleControl';
|
|
22
23
|
const iconWrapperStyles = xcss({
|
|
@@ -99,20 +100,30 @@ export class InlineCardForbiddenView extends React.Component {
|
|
|
99
100
|
const {
|
|
100
101
|
onAuthorise
|
|
101
102
|
} = this.props;
|
|
102
|
-
const
|
|
103
|
+
const LozengeWrapper = fg('platform-linking-visual-refresh-v1') ? LozengeWrapperNew : LozengeWrapperOldVisualRefresh;
|
|
104
|
+
const Button = withFrameStyleControl(ButtonOld, this.frameRef);
|
|
103
105
|
const accessType = (_this$props$requestAc2 = this.props.requestAccessContext) === null || _this$props$requestAc2 === void 0 ? void 0 : _this$props$requestAc2.accessType;
|
|
104
106
|
if (this.state.hasRequestAccessContextMessage) {
|
|
105
107
|
if (fg('bandicoots-compiled-migration-smartcard')) {
|
|
106
|
-
|
|
108
|
+
if (fg('platform-linking-visual-refresh-v1')) {
|
|
109
|
+
const isDisabled = accessType === 'PENDING_REQUEST_EXISTS';
|
|
110
|
+
return /*#__PURE__*/React.createElement(Button, {
|
|
111
|
+
onClick: this.handleRetry,
|
|
112
|
+
component: ActionButton,
|
|
113
|
+
testId: "button-connect-other-account",
|
|
114
|
+
isDisabled: isDisabled
|
|
115
|
+
}, this.renderForbiddenAccessMessage());
|
|
116
|
+
}
|
|
117
|
+
return /*#__PURE__*/React.createElement(Button, {
|
|
107
118
|
spacing: "none",
|
|
108
119
|
onClick: this.handleRetry,
|
|
109
|
-
component:
|
|
120
|
+
component: IconStyledButtonOldVisualRefresh,
|
|
110
121
|
testId: "button-connect-other-account",
|
|
111
122
|
role: "button",
|
|
112
123
|
isDisabled: accessType === 'PENDING_REQUEST_EXISTS'
|
|
113
124
|
}, this.renderForbiddenAccessMessage());
|
|
114
125
|
} else {
|
|
115
|
-
return /*#__PURE__*/React.createElement(
|
|
126
|
+
return /*#__PURE__*/React.createElement(Button, {
|
|
116
127
|
spacing: "none",
|
|
117
128
|
onClick: this.handleRetry,
|
|
118
129
|
component: IconStyledButtonOld,
|
|
@@ -123,6 +134,15 @@ export class InlineCardForbiddenView extends React.Component {
|
|
|
123
134
|
}
|
|
124
135
|
}
|
|
125
136
|
if (onAuthorise) {
|
|
137
|
+
if (fg('platform-linking-visual-refresh-v1')) {
|
|
138
|
+
return /*#__PURE__*/React.createElement(LozengeWrapper, null, /*#__PURE__*/React.createElement(Pressable, {
|
|
139
|
+
xcss: actionButtonLozengeStyle,
|
|
140
|
+
onClick: this.handleRetry,
|
|
141
|
+
testId: "button-connect-other-account"
|
|
142
|
+
}, /*#__PURE__*/React.createElement(Lozenge, {
|
|
143
|
+
appearance: 'moved'
|
|
144
|
+
}, this.renderForbiddenAccessMessage())));
|
|
145
|
+
}
|
|
126
146
|
return /*#__PURE__*/React.createElement(Button, {
|
|
127
147
|
spacing: "none",
|
|
128
148
|
onClick: this.handleRetry,
|
|
@@ -164,4 +184,8 @@ export class InlineCardForbiddenView extends React.Component {
|
|
|
164
184
|
}
|
|
165
185
|
return content;
|
|
166
186
|
}
|
|
167
|
-
}
|
|
187
|
+
}
|
|
188
|
+
const actionButtonLozengeStyle = xcss({
|
|
189
|
+
backgroundColor: 'color.background.neutral.subtle',
|
|
190
|
+
padding: 'space.0'
|
|
191
|
+
});
|
|
@@ -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)}
|
|
@@ -3,6 +3,7 @@ import _extends from "@babel/runtime/helpers/extends";
|
|
|
3
3
|
import "./styled.compiled.css";
|
|
4
4
|
import { ax, ix } from "@compiled/react/runtime";
|
|
5
5
|
import React, { forwardRef } from 'react';
|
|
6
|
+
import { fg } from '@atlaskit/platform-feature-flags';
|
|
6
7
|
import { B100, B200, B400, B50, N40 } from '@atlaskit/theme/colors';
|
|
7
8
|
const lineHeight = 22;
|
|
8
9
|
export const WrapperSpan = /*#__PURE__*/forwardRef(({
|
|
@@ -17,7 +18,7 @@ export const WrapperSpan = /*#__PURE__*/forwardRef(({
|
|
|
17
18
|
return /*#__PURE__*/React.createElement("span", _extends({
|
|
18
19
|
ref: ref
|
|
19
20
|
}, props, {
|
|
20
|
-
className: 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"])
|
|
21
|
+
className: ax([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 && fg('platform-linking-visual-refresh-v1') && "_1reo15vq _18m915vq _ca0qidpf _u5f3idpf _n3tdidpf _19bvidpf _1bto1l2s _1nmz9jpi _1e0c1abx _1yyjkb7n _sudp1e54 _17bix7n9 _nr8z1o8l", truncateInline && !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"])
|
|
21
22
|
}), props.children);
|
|
22
23
|
});
|
|
23
24
|
export const WrapperAnchor = /*#__PURE__*/forwardRef(({
|
|
@@ -33,10 +34,11 @@ export const WrapperAnchor = /*#__PURE__*/forwardRef(({
|
|
|
33
34
|
href: href,
|
|
34
35
|
ref: ref
|
|
35
36
|
}, props, {
|
|
36
|
-
className: 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"])
|
|
37
|
+
className: ax([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 && fg('platform-linking-visual-refresh-v1') && "_1reo15vq _18m915vq _ca0qidpf _u5f3idpf _n3tdidpf _19bvidpf _1bto1l2s _1nmz9jpi _1e0c1abx _1yyjkb7n _sudp1e54 _17bix7n9 _nr8z1o8l", truncateInline && !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"])
|
|
37
38
|
}), props.children);
|
|
38
39
|
});
|
|
39
|
-
const
|
|
40
|
+
const baseWrapperStylesNew = null;
|
|
41
|
+
const baseWrapperStylesOld = null;
|
|
40
42
|
|
|
41
43
|
// if the parent instruct the wrapper to be interactive, and the wrapper is in focus, apply selectedStyles
|
|
42
44
|
const interactiveStyles = null;
|
|
@@ -44,6 +46,7 @@ const hoveredStyles = null;
|
|
|
44
46
|
const hoveredWithBackgroundStyles = null;
|
|
45
47
|
const withoutBackgroundStyles = null;
|
|
46
48
|
const withBackgroundStyles = null;
|
|
47
|
-
const
|
|
49
|
+
const truncateStylesNew = null;
|
|
50
|
+
const truncateStylesOld = null;
|
|
48
51
|
const notSelectedStyle = null;
|
|
49
52
|
const selectedStyles = null;
|
|
@@ -5,16 +5,18 @@ import "./index.compiled.css";
|
|
|
5
5
|
import { forwardRef } from 'react';
|
|
6
6
|
import { ax, ix } from "@compiled/react/runtime";
|
|
7
7
|
import React from 'react';
|
|
8
|
+
import { di } from 'react-magnetic-di';
|
|
8
9
|
import ImageLoader from 'react-render-image';
|
|
9
10
|
import LinkIcon from '@atlaskit/icon/core/migration/link';
|
|
10
11
|
import { fg } from '@atlaskit/platform-feature-flags';
|
|
12
|
+
import { Box, xcss } from '@atlaskit/primitives';
|
|
11
13
|
import { B400, N200 } from '@atlaskit/theme/colors';
|
|
12
14
|
import { Icon, Shimmer } from '../Icon';
|
|
13
15
|
import { LinkAppearance as LinkAppearanceOld, NoLinkAppearance as NoLinkAppearanceOld } from '../styled-emotion';
|
|
14
|
-
import {
|
|
16
|
+
import { EmojiWrapperOldVisualRefresh, IconEmptyWrapperOldVisualRefresh, IconPositionWrapperOldVisualRefresh, IconTitleWrapperOldVisualRefresh, IconWrapperOldVisualRefresh, TitleWrapperClassNameOldVisualRefresh, TitleWrapperOldVisualRefresh } from './styled';
|
|
15
17
|
import { EmojiWrapper as EmojiWrapperOld, IconEmptyWrapper as IconEmptyWrapperOld, IconPositionWrapper as IconPositionWrapperOld, IconTitleWrapper as IconTitleWrapperOld, IconWrapper as IconWrapperOld, TitleWrapper as TitleWrapperOld } from './styled-emotion';
|
|
16
18
|
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-styled -- Ignored via go/DSP-18766
|
|
17
|
-
const
|
|
19
|
+
const NoLinkAppearanceOldVisualRefresh = forwardRef(({
|
|
18
20
|
as: C = "span",
|
|
19
21
|
style: __cmpls,
|
|
20
22
|
...__cmplp
|
|
@@ -28,7 +30,7 @@ const NoLinkAppearance = forwardRef(({
|
|
|
28
30
|
|
|
29
31
|
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-styled -- Ignored via go/DSP-18766
|
|
30
32
|
if (process.env.NODE_ENV !== 'production') {
|
|
31
|
-
|
|
33
|
+
NoLinkAppearanceOldVisualRefresh.displayName = 'NoLinkAppearanceOldVisualRefresh';
|
|
32
34
|
}
|
|
33
35
|
const LinkAppearance = forwardRef(({
|
|
34
36
|
as: C = "a",
|
|
@@ -77,12 +79,26 @@ export class IconAndTitleLayout extends React.Component {
|
|
|
77
79
|
emoji
|
|
78
80
|
} = this.props;
|
|
79
81
|
if (emoji) {
|
|
80
|
-
|
|
82
|
+
if (fg('platform-linking-visual-refresh-v1')) {
|
|
83
|
+
return /*#__PURE__*/React.createElement(Box, {
|
|
84
|
+
as: "span",
|
|
85
|
+
xcss: iconWrapperStyle,
|
|
86
|
+
testId: "icon-position-emoji-wrapper"
|
|
87
|
+
}, emoji);
|
|
88
|
+
}
|
|
89
|
+
return fg('bandicoots-compiled-migration-smartcard') ? /*#__PURE__*/React.createElement(EmojiWrapperOldVisualRefresh, null, emoji) : /*#__PURE__*/React.createElement(EmojiWrapperOld, null, emoji);
|
|
81
90
|
}
|
|
82
91
|
if (!icon || typeof icon === 'string') {
|
|
83
92
|
return null;
|
|
84
93
|
}
|
|
85
|
-
|
|
94
|
+
if (fg('platform-linking-visual-refresh-v1')) {
|
|
95
|
+
return /*#__PURE__*/React.createElement(Box, {
|
|
96
|
+
as: "span",
|
|
97
|
+
xcss: iconWrapperStyle,
|
|
98
|
+
testId: "icon-atlaskit-icon-wrapper"
|
|
99
|
+
}, icon);
|
|
100
|
+
}
|
|
101
|
+
return fg('bandicoots-compiled-migration-smartcard') ? /*#__PURE__*/React.createElement(IconWrapperOldVisualRefresh, null, icon) : /*#__PURE__*/React.createElement(IconWrapperOld, null, icon);
|
|
86
102
|
}
|
|
87
103
|
renderImageIcon(errored, testId) {
|
|
88
104
|
const {
|
|
@@ -91,6 +107,21 @@ export class IconAndTitleLayout extends React.Component {
|
|
|
91
107
|
if (!url || typeof url !== 'string') {
|
|
92
108
|
return null;
|
|
93
109
|
}
|
|
110
|
+
if (fg('platform-linking-visual-refresh-v1')) {
|
|
111
|
+
return /*#__PURE__*/React.createElement(ImageLoader, {
|
|
112
|
+
src: url,
|
|
113
|
+
loaded: /*#__PURE__*/React.createElement("img", {
|
|
114
|
+
src: url,
|
|
115
|
+
"data-testid": `${testId}-image`,
|
|
116
|
+
alt: "",
|
|
117
|
+
className: ax(["_1bsb1osq"])
|
|
118
|
+
}),
|
|
119
|
+
errored: errored,
|
|
120
|
+
loading: /*#__PURE__*/React.createElement(Shimmer, {
|
|
121
|
+
testId: `${testId}-loading`
|
|
122
|
+
})
|
|
123
|
+
});
|
|
124
|
+
}
|
|
94
125
|
return /*#__PURE__*/React.createElement(ImageLoader, {
|
|
95
126
|
src: url,
|
|
96
127
|
loaded: /*#__PURE__*/React.createElement(Icon
|
|
@@ -110,10 +141,18 @@ export class IconAndTitleLayout extends React.Component {
|
|
|
110
141
|
const {
|
|
111
142
|
defaultIcon
|
|
112
143
|
} = this.props;
|
|
144
|
+
if (fg('platform-linking-visual-refresh-v1')) {
|
|
145
|
+
return defaultIcon || /*#__PURE__*/React.createElement(LinkIcon, {
|
|
146
|
+
label: "link",
|
|
147
|
+
LEGACY_size: "small",
|
|
148
|
+
testId: `${testId}-default`,
|
|
149
|
+
color: "currentColor"
|
|
150
|
+
});
|
|
151
|
+
}
|
|
113
152
|
if (defaultIcon) {
|
|
114
|
-
return /*#__PURE__*/React.createElement(
|
|
153
|
+
return /*#__PURE__*/React.createElement(IconWrapperOldVisualRefresh, null, defaultIcon);
|
|
115
154
|
}
|
|
116
|
-
return /*#__PURE__*/React.createElement(
|
|
155
|
+
return /*#__PURE__*/React.createElement(IconWrapperOldVisualRefresh, null, /*#__PURE__*/React.createElement(LinkIcon, {
|
|
117
156
|
label: "link",
|
|
118
157
|
LEGACY_size: "small",
|
|
119
158
|
testId: `${testId}-default`,
|
|
@@ -131,6 +170,13 @@ export class IconAndTitleLayout extends React.Component {
|
|
|
131
170
|
}
|
|
132
171
|
const placeholder = this.renderIconPlaceholder(testId);
|
|
133
172
|
const image = this.renderImageIcon(placeholder, testId);
|
|
173
|
+
if (fg('platform-linking-visual-refresh-v1')) {
|
|
174
|
+
return /*#__PURE__*/React.createElement(Box, {
|
|
175
|
+
as: "span",
|
|
176
|
+
xcss: iconWrapperStyle,
|
|
177
|
+
testId: `${testId}-image-wrapper`
|
|
178
|
+
}, image || placeholder);
|
|
179
|
+
}
|
|
134
180
|
return image || placeholder;
|
|
135
181
|
}
|
|
136
182
|
render() {
|
|
@@ -143,20 +189,32 @@ export class IconAndTitleLayout extends React.Component {
|
|
|
143
189
|
rightSide,
|
|
144
190
|
testId = 'inline-card-icon-and-title'
|
|
145
191
|
} = this.props;
|
|
146
|
-
const titlePart = fg('bandicoots-compiled-migration-smartcard') ? /*#__PURE__*/React.createElement(React.Fragment, null, /*#__PURE__*/React.createElement(
|
|
192
|
+
const titlePart = fg('bandicoots-compiled-migration-smartcard') ? /*#__PURE__*/React.createElement(React.Fragment, null, fg('platform-linking-visual-refresh-v1') ? /*#__PURE__*/React.createElement(Box, {
|
|
193
|
+
as: "span",
|
|
194
|
+
xcss: iconOuterWrapperStyle,
|
|
195
|
+
testId: "icon-position-wrapper"
|
|
196
|
+
}, children || /*#__PURE__*/React.createElement(React.Fragment, null, /*#__PURE__*/React.createElement(Box, {
|
|
197
|
+
as: "span",
|
|
198
|
+
xcss: iconEmptyStyle,
|
|
199
|
+
testId: "icon-empty-wrapper"
|
|
200
|
+
}), this.renderIcon(testId))) : /*#__PURE__*/React.createElement(IconPositionWrapperOldVisualRefresh, {
|
|
147
201
|
"data-testid": "icon-position-wrapper"
|
|
148
|
-
}, children || /*#__PURE__*/React.createElement(React.Fragment, null, /*#__PURE__*/React.createElement(
|
|
202
|
+
}, children || /*#__PURE__*/React.createElement(React.Fragment, null, /*#__PURE__*/React.createElement(IconEmptyWrapperOldVisualRefresh, {
|
|
149
203
|
"data-testid": "icon-empty-wrapper"
|
|
150
|
-
}), this.renderIcon(testId))), /*#__PURE__*/React.createElement(
|
|
151
|
-
|
|
152
|
-
, {
|
|
204
|
+
}), this.renderIcon(testId))), fg('platform-linking-visual-refresh-v1') ? /*#__PURE__*/React.createElement(Box, _extends({
|
|
205
|
+
as: "span",
|
|
153
206
|
style: {
|
|
154
|
-
color: titleTextColor
|
|
207
|
+
color: this.props.titleTextColor
|
|
155
208
|
}
|
|
156
|
-
|
|
157
|
-
|
|
158
|
-
|
|
159
|
-
|
|
209
|
+
}, !fg('platform-linking-visual-refresh-v1') ? {
|
|
210
|
+
className: TitleWrapperClassNameOldVisualRefresh
|
|
211
|
+
} : {}), title) : /*#__PURE__*/React.createElement(TitleWrapperOldVisualRefresh, _extends({
|
|
212
|
+
style: {
|
|
213
|
+
color: this.props.titleTextColor
|
|
214
|
+
}
|
|
215
|
+
}, !fg('platform-linking-visual-refresh-v1') ? {
|
|
216
|
+
className: TitleWrapperClassNameOldVisualRefresh
|
|
217
|
+
} : {}), title)) : /*#__PURE__*/React.createElement(React.Fragment, null, /*#__PURE__*/React.createElement(IconPositionWrapperOld, {
|
|
160
218
|
"data-testid": "icon-position-wrapper"
|
|
161
219
|
}, children || /*#__PURE__*/React.createElement(React.Fragment, null, /*#__PURE__*/React.createElement(IconEmptyWrapperOld, {
|
|
162
220
|
"data-testid": "icon-empty-wrapper"
|
|
@@ -168,23 +226,31 @@ export class IconAndTitleLayout extends React.Component {
|
|
|
168
226
|
}
|
|
169
227
|
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-classname-prop -- Ignored via go/DSP-18766
|
|
170
228
|
,
|
|
171
|
-
className:
|
|
229
|
+
className: TitleWrapperClassNameOldVisualRefresh
|
|
172
230
|
}, title));
|
|
173
231
|
if (fg('bandicoots-compiled-migration-smartcard')) {
|
|
174
|
-
return (
|
|
175
|
-
|
|
176
|
-
|
|
177
|
-
|
|
178
|
-
|
|
179
|
-
|
|
180
|
-
|
|
181
|
-
|
|
182
|
-
|
|
183
|
-
|
|
184
|
-
|
|
185
|
-
|
|
186
|
-
|
|
187
|
-
|
|
232
|
+
return /*#__PURE__*/React.createElement(React.Fragment, null, fg('platform-linking-visual-refresh-v1') ? /*#__PURE__*/React.createElement(IconTitleWrapper, {
|
|
233
|
+
style: {
|
|
234
|
+
color: this.props.titleColor
|
|
235
|
+
},
|
|
236
|
+
testId: testId
|
|
237
|
+
}, link ? /*#__PURE__*/React.createElement(LinkAppearance, {
|
|
238
|
+
href: link,
|
|
239
|
+
onClick: this.handleClick,
|
|
240
|
+
onKeyPress: this.handleKeyPress
|
|
241
|
+
}, titlePart) : titlePart, rightSide ? /*#__PURE__*/React.createElement(Box, {
|
|
242
|
+
as: "span",
|
|
243
|
+
xcss: noLinkAppearanceStyle
|
|
244
|
+
}, rightSide) : null) : /*#__PURE__*/React.createElement(IconTitleWrapperOldVisualRefresh, {
|
|
245
|
+
style: {
|
|
246
|
+
color: this.props.titleColor
|
|
247
|
+
},
|
|
248
|
+
"data-testid": testId
|
|
249
|
+
}, link ? /*#__PURE__*/React.createElement(LinkAppearance, {
|
|
250
|
+
href: link,
|
|
251
|
+
onClick: this.handleClick,
|
|
252
|
+
onKeyPress: this.handleKeyPress
|
|
253
|
+
}, titlePart) : titlePart, rightSide ? /*#__PURE__*/React.createElement(NoLinkAppearanceOldVisualRefresh, null, rightSide) : null));
|
|
188
254
|
} else {
|
|
189
255
|
return (
|
|
190
256
|
/*#__PURE__*/
|
|
@@ -205,4 +271,68 @@ export class IconAndTitleLayout extends React.Component {
|
|
|
205
271
|
}
|
|
206
272
|
_defineProperty(IconAndTitleLayout, "defaultProps", {
|
|
207
273
|
rightSideSpacer: true
|
|
274
|
+
});
|
|
275
|
+
export const IconTitleWrapper = props => {
|
|
276
|
+
return /*#__PURE__*/React.createElement(Box, _extends({
|
|
277
|
+
as: "span",
|
|
278
|
+
xcss: iconTitleWrapperStyle
|
|
279
|
+
}, props));
|
|
280
|
+
};
|
|
281
|
+
export const LozengeWrapper = props => {
|
|
282
|
+
return /*#__PURE__*/React.createElement(Box, {
|
|
283
|
+
as: "span",
|
|
284
|
+
xcss: lozengeWrapperStyle
|
|
285
|
+
}, /*#__PURE__*/React.createElement(Box, _extends({
|
|
286
|
+
xcss: lozengeInternalWrapperStyle
|
|
287
|
+
}, props)));
|
|
288
|
+
};
|
|
289
|
+
const lozengeInternalWrapperStyle = xcss({
|
|
290
|
+
paddingBottom: 'space.025'
|
|
291
|
+
});
|
|
292
|
+
const lozengeWrapperStyle = xcss({
|
|
293
|
+
display: 'inline-block',
|
|
294
|
+
verticalAlign: 'bottom',
|
|
295
|
+
marginTop: 'space.0',
|
|
296
|
+
marginRight: 'space.050',
|
|
297
|
+
marginBottom: 'space.0',
|
|
298
|
+
marginLeft: 'space.025'
|
|
299
|
+
});
|
|
300
|
+
const horizontalPadding = 'space.050';
|
|
301
|
+
const verticalPadding = 'space.025';
|
|
302
|
+
const iconWidth = '16px';
|
|
303
|
+
const iconEmptyStyle = xcss({
|
|
304
|
+
width: iconWidth,
|
|
305
|
+
display: 'inline-block',
|
|
306
|
+
opacity: 0
|
|
307
|
+
});
|
|
308
|
+
const iconOuterWrapperStyle = xcss({
|
|
309
|
+
marginRight: 'space.050',
|
|
310
|
+
display: 'inline-block',
|
|
311
|
+
position: 'relative'
|
|
312
|
+
});
|
|
313
|
+
const iconTitleWrapperStyle = xcss({
|
|
314
|
+
whiteSpace: 'pre-wrap',
|
|
315
|
+
wordBreak: 'break-all',
|
|
316
|
+
boxDecorationBreak: 'clone',
|
|
317
|
+
paddingTop: verticalPadding,
|
|
318
|
+
paddingRight: horizontalPadding,
|
|
319
|
+
paddingBottom: verticalPadding,
|
|
320
|
+
paddingLeft: horizontalPadding
|
|
321
|
+
});
|
|
322
|
+
const iconWrapperStyle = xcss({
|
|
323
|
+
position: 'absolute',
|
|
324
|
+
display: 'inline-flex',
|
|
325
|
+
alignItems: 'center',
|
|
326
|
+
boxSizing: 'border-box',
|
|
327
|
+
top: 'space.0',
|
|
328
|
+
left: 'space.0',
|
|
329
|
+
bottom: 'space.0',
|
|
330
|
+
width: iconWidth,
|
|
331
|
+
userSelect: 'none'
|
|
332
|
+
});
|
|
333
|
+
const iconImageStyle = null;
|
|
334
|
+
const noLinkAppearanceStyle = xcss({
|
|
335
|
+
color: 'color.text.subtlest',
|
|
336
|
+
font: 'font.body',
|
|
337
|
+
marginLeft: 'space.050'
|
|
208
338
|
});
|
|
@@ -45,8 +45,9 @@ const IconOverrides = `
|
|
|
45
45
|
}
|
|
46
46
|
`;
|
|
47
47
|
|
|
48
|
+
// TODO Delete when cleaning platform-linking-visual-refresh-v1
|
|
48
49
|
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-styled, @atlaskit/ui-styling-standard/no-exported-styles -- Ignored via go/DSP-18766
|
|
49
|
-
export const
|
|
50
|
+
export const IconWrapperOldVisualRefresh = forwardRef(({
|
|
50
51
|
as: C = "span",
|
|
51
52
|
style: __cmpls,
|
|
52
53
|
...__cmplp
|
|
@@ -59,11 +60,12 @@ export const IconWrapper = forwardRef(({
|
|
|
59
60
|
});
|
|
60
61
|
|
|
61
62
|
// Wraps all emoji in Inline Links similar to icon
|
|
63
|
+
// TODO Delete when cleaning platform-linking-visual-refresh-v1
|
|
62
64
|
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-styled, @atlaskit/ui-styling-standard/no-exported-styles -- Ignored via go/DSP-18766
|
|
63
65
|
if (process.env.NODE_ENV !== 'production') {
|
|
64
|
-
|
|
66
|
+
IconWrapperOldVisualRefresh.displayName = 'IconWrapperOldVisualRefresh';
|
|
65
67
|
}
|
|
66
|
-
export const
|
|
68
|
+
export const EmojiWrapperOldVisualRefresh = forwardRef(({
|
|
67
69
|
as: C = "span",
|
|
68
70
|
style: __cmpls,
|
|
69
71
|
...__cmplp
|
|
@@ -78,11 +80,12 @@ export const EmojiWrapper = forwardRef(({
|
|
|
78
80
|
// The main 'wrapping' element, title of the content.
|
|
79
81
|
// NB: `white-space` adds little whitespace before wrapping.
|
|
80
82
|
// NB: `word-break` line breaks as soon as an overflow takes place.
|
|
83
|
+
// TODO Delete when cleaning platform-linking-visual-refresh-v1
|
|
81
84
|
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-styled, @atlaskit/ui-styling-standard/no-exported-styles -- Ignored via go/DSP-18766
|
|
82
85
|
if (process.env.NODE_ENV !== 'production') {
|
|
83
|
-
|
|
86
|
+
EmojiWrapperOldVisualRefresh.displayName = 'EmojiWrapperOldVisualRefresh';
|
|
84
87
|
}
|
|
85
|
-
export const
|
|
88
|
+
export const IconTitleWrapperOldVisualRefresh = forwardRef(({
|
|
86
89
|
as: C = "span",
|
|
87
90
|
style: __cmpls,
|
|
88
91
|
...__cmplp
|
|
@@ -94,12 +97,12 @@ export const IconTitleWrapper = forwardRef(({
|
|
|
94
97
|
}));
|
|
95
98
|
});
|
|
96
99
|
|
|
97
|
-
// TODO
|
|
100
|
+
// TODO Delete when cleaning platform-linking-visual-refresh-v1
|
|
98
101
|
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-styled, @atlaskit/ui-styling-standard/no-exported-styles -- Ignored via go/DSP-18766
|
|
99
102
|
if (process.env.NODE_ENV !== 'production') {
|
|
100
|
-
|
|
103
|
+
IconTitleWrapperOldVisualRefresh.displayName = 'IconTitleWrapperOldVisualRefresh';
|
|
101
104
|
}
|
|
102
|
-
export const
|
|
105
|
+
export const LozengeWrapperOldVisualRefresh = forwardRef(({
|
|
103
106
|
as: C = "span",
|
|
104
107
|
style: __cmpls,
|
|
105
108
|
...__cmplp
|
|
@@ -113,7 +116,7 @@ export const LozengeWrapper = forwardRef(({
|
|
|
113
116
|
|
|
114
117
|
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-styled, @atlaskit/ui-styling-standard/no-exported-styles -- Ignored via go/DSP-18766
|
|
115
118
|
if (process.env.NODE_ENV !== 'production') {
|
|
116
|
-
|
|
119
|
+
LozengeWrapperOldVisualRefresh.displayName = 'LozengeWrapperOldVisualRefresh';
|
|
117
120
|
}
|
|
118
121
|
export const RightIconPositionWrapper = forwardRef(({
|
|
119
122
|
as: C = "span",
|
|
@@ -130,11 +133,12 @@ export const RightIconPositionWrapper = forwardRef(({
|
|
|
130
133
|
// The following components are used to absolutely position icons in the vertical center.
|
|
131
134
|
// - IconPositionWrapper: the `relative` parent which has no height in itself.
|
|
132
135
|
// - IconEmptyWrapper: the child which forces `IconPositionWrapper` to have a height.
|
|
136
|
+
// TODO Delete when cleaning platform-linking-visual-refresh-v1
|
|
133
137
|
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-styled, @atlaskit/ui-styling-standard/no-exported-styles -- Ignored via go/DSP-18766
|
|
134
138
|
if (process.env.NODE_ENV !== 'production') {
|
|
135
139
|
RightIconPositionWrapper.displayName = 'RightIconPositionWrapper';
|
|
136
140
|
}
|
|
137
|
-
export const
|
|
141
|
+
export const IconPositionWrapperOldVisualRefresh = forwardRef(({
|
|
138
142
|
as: C = "span",
|
|
139
143
|
style: __cmpls,
|
|
140
144
|
...__cmplp
|
|
@@ -146,11 +150,12 @@ export const IconPositionWrapper = forwardRef(({
|
|
|
146
150
|
}));
|
|
147
151
|
});
|
|
148
152
|
|
|
153
|
+
// TODO Delete when cleaning platform-linking-visual-refresh-v1
|
|
149
154
|
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-styled, @atlaskit/ui-styling-standard/no-exported-styles -- Ignored via go/DSP-18766
|
|
150
155
|
if (process.env.NODE_ENV !== 'production') {
|
|
151
|
-
|
|
156
|
+
IconPositionWrapperOldVisualRefresh.displayName = 'IconPositionWrapperOldVisualRefresh';
|
|
152
157
|
}
|
|
153
|
-
export const
|
|
158
|
+
export const IconEmptyWrapperOldVisualRefresh = forwardRef(({
|
|
154
159
|
as: C = "span",
|
|
155
160
|
style: __cmpls,
|
|
156
161
|
...__cmplp
|
|
@@ -163,14 +168,16 @@ export const IconEmptyWrapper = forwardRef(({
|
|
|
163
168
|
});
|
|
164
169
|
|
|
165
170
|
// With emotion it's not possible to use reference to `TitleWrapper` as part of a selector,
|
|
171
|
+
// TODO Delete when cleaning platform-linking-visual-refresh-v1
|
|
166
172
|
// To achieve same result we use classname instead.
|
|
167
173
|
if (process.env.NODE_ENV !== 'production') {
|
|
168
|
-
|
|
174
|
+
IconEmptyWrapperOldVisualRefresh.displayName = 'IconEmptyWrapperOldVisualRefresh';
|
|
169
175
|
}
|
|
170
|
-
export const
|
|
176
|
+
export const TitleWrapperClassNameOldVisualRefresh = 'smart-link-title-wrapper';
|
|
171
177
|
|
|
178
|
+
// TODO Delete when cleaning platform-linking-visual-refresh-v1
|
|
172
179
|
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-styled, @atlaskit/ui-styling-standard/no-exported-styles, @atlaskit/design-system/no-empty-styled-expression -- Ignored via go/DSP-18766
|
|
173
|
-
export const
|
|
180
|
+
export const TitleWrapperOldVisualRefresh = forwardRef(({
|
|
174
181
|
as: C = "span",
|
|
175
182
|
style: __cmpls,
|
|
176
183
|
...__cmplp
|
|
@@ -182,5 +189,5 @@ export const TitleWrapper = forwardRef(({
|
|
|
182
189
|
}));
|
|
183
190
|
});
|
|
184
191
|
if (process.env.NODE_ENV !== 'production') {
|
|
185
|
-
|
|
192
|
+
TitleWrapperOldVisualRefresh.displayName = 'TitleWrapperOldVisualRefresh';
|
|
186
193
|
}
|
|
@@ -1,9 +1,10 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
2
|
import Lozenge from '@atlaskit/lozenge';
|
|
3
|
+
import { fg } from '@atlaskit/platform-feature-flags';
|
|
3
4
|
import { HoverCard } from '../../HoverCard';
|
|
4
5
|
import { Frame } from '../Frame';
|
|
5
|
-
import { IconAndTitleLayout } from '../IconAndTitleLayout';
|
|
6
|
-
import {
|
|
6
|
+
import { IconAndTitleLayout, LozengeWrapper as LozengeWrapperNew } from '../IconAndTitleLayout';
|
|
7
|
+
import { LozengeWrapperOldVisualRefresh } from '../IconAndTitleLayout/styled';
|
|
7
8
|
export class InlineCardResolvedView extends React.Component {
|
|
8
9
|
renderLozenge() {
|
|
9
10
|
const {
|
|
@@ -13,6 +14,7 @@ export class InlineCardResolvedView extends React.Component {
|
|
|
13
14
|
return null;
|
|
14
15
|
}
|
|
15
16
|
const appearance = lozenge.appearance || 'default';
|
|
17
|
+
const LozengeWrapper = fg('platform-linking-visual-refresh-v1') ? LozengeWrapperNew : LozengeWrapperOldVisualRefresh;
|
|
16
18
|
return /*#__PURE__*/React.createElement(LozengeWrapper, null, /*#__PURE__*/React.createElement(Lozenge, {
|
|
17
19
|
testId: "inline-card-resolved-view-lozenge",
|
|
18
20
|
appearance: appearance
|
|
@@ -2,10 +2,10 @@ import React from 'react';
|
|
|
2
2
|
import { fg } from '@atlaskit/platform-feature-flags';
|
|
3
3
|
import Spinner from '@atlaskit/spinner';
|
|
4
4
|
import { Frame } from '../Frame';
|
|
5
|
-
import { IconAndTitleLayout } from '../IconAndTitleLayout';
|
|
6
|
-
import {
|
|
5
|
+
import { IconAndTitleLayout, IconTitleWrapper } from '../IconAndTitleLayout';
|
|
6
|
+
import { IconTitleWrapperOldVisualRefresh, RightIconPositionWrapper } from '../IconAndTitleLayout/styled';
|
|
7
7
|
import { IconTitleWrapper as IconTitleWrapperOld, RightIconPositionWrapper as RightIconPositionWrapperOld } from '../IconAndTitleLayout/styled-emotion';
|
|
8
|
-
import {
|
|
8
|
+
import { SpinnerWrapperOldVisualRefresh } from './styled';
|
|
9
9
|
import { SpinnerWrapper as SpinnerWrapperOld } from './styled-emotion';
|
|
10
10
|
export class InlineCardResolvingView extends React.Component {
|
|
11
11
|
render() {
|
|
@@ -19,7 +19,8 @@ export class InlineCardResolvingView extends React.Component {
|
|
|
19
19
|
resolvingPlaceholder,
|
|
20
20
|
truncateInline
|
|
21
21
|
} = this.props;
|
|
22
|
-
const SpinnerWrapperComponent = fg('bandicoots-compiled-migration-smartcard') ?
|
|
22
|
+
const SpinnerWrapperComponent = fg('bandicoots-compiled-migration-smartcard') ? SpinnerWrapperOldVisualRefresh : SpinnerWrapperOld;
|
|
23
|
+
const IconTitleWrapperFFed = fg('platform-linking-visual-refresh-v1') ? IconTitleWrapper : IconTitleWrapperOldVisualRefresh;
|
|
23
24
|
if (inlinePreloaderStyle === 'on-right-without-skeleton') {
|
|
24
25
|
if (fg('bandicoots-compiled-migration-smartcard')) {
|
|
25
26
|
return /*#__PURE__*/React.createElement(Frame, {
|
|
@@ -28,11 +29,13 @@ export class InlineCardResolvingView extends React.Component {
|
|
|
28
29
|
onClick: onClick,
|
|
29
30
|
isSelected: isSelected,
|
|
30
31
|
truncateInline: truncateInline
|
|
31
|
-
}, /*#__PURE__*/React.createElement(
|
|
32
|
+
}, /*#__PURE__*/React.createElement(IconTitleWrapperFFed, null, url, /*#__PURE__*/React.createElement(RightIconPositionWrapper, null, fg('platform-linking-visual-refresh-v1') ? /*#__PURE__*/React.createElement(Spinner, {
|
|
33
|
+
size: 14
|
|
34
|
+
}) : /*#__PURE__*/React.createElement(React.Fragment, null, /*#__PURE__*/React.createElement(SpinnerWrapperComponent, {
|
|
32
35
|
className: "inline-resolving-spinner"
|
|
33
36
|
}, /*#__PURE__*/React.createElement(Spinner, {
|
|
34
37
|
size: 14
|
|
35
|
-
})))));
|
|
38
|
+
}))))));
|
|
36
39
|
} else {
|
|
37
40
|
return /*#__PURE__*/React.createElement(Frame, {
|
|
38
41
|
withoutBackground: true,
|
|
@@ -56,11 +59,13 @@ export class InlineCardResolvingView extends React.Component {
|
|
|
56
59
|
}, /*#__PURE__*/React.createElement(IconAndTitleLayout, {
|
|
57
60
|
title: resolvingPlaceholder !== null && resolvingPlaceholder !== void 0 ? resolvingPlaceholder : url,
|
|
58
61
|
titleTextColor: titleTextColor
|
|
59
|
-
}, /*#__PURE__*/React.createElement(
|
|
62
|
+
}, fg('platform-linking-visual-refresh-v1') ? /*#__PURE__*/React.createElement(Spinner, {
|
|
63
|
+
size: 14
|
|
64
|
+
}) : /*#__PURE__*/React.createElement(React.Fragment, null, /*#__PURE__*/React.createElement(SpinnerWrapperComponent, {
|
|
60
65
|
className: "inline-resolving-spinner"
|
|
61
66
|
}, /*#__PURE__*/React.createElement(Spinner, {
|
|
62
67
|
size: 14
|
|
63
|
-
}))));
|
|
68
|
+
})))));
|
|
64
69
|
}
|
|
65
70
|
}
|
|
66
71
|
}
|
|
@@ -4,11 +4,12 @@ import "./styled.compiled.css";
|
|
|
4
4
|
import { forwardRef } from 'react';
|
|
5
5
|
import * as React from 'react';
|
|
6
6
|
import { ax, ix } from "@compiled/react/runtime";
|
|
7
|
-
import {
|
|
7
|
+
import { IconTitleWrapperOldVisualRefresh } from '../IconAndTitleLayout/styled';
|
|
8
8
|
|
|
9
|
+
// TODO Delete when cleaning platform-linking-visual-refresh-v1
|
|
9
10
|
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-styled, @atlaskit/ui-styling-standard/no-exported-styles -- Ignored via go/DSP-18766
|
|
10
|
-
export const
|
|
11
|
-
as: C =
|
|
11
|
+
export const SpinnerWrapperOldVisualRefresh = forwardRef(({
|
|
12
|
+
as: C = IconTitleWrapperOldVisualRefresh,
|
|
12
13
|
style: __cmpls,
|
|
13
14
|
...__cmplp
|
|
14
15
|
}, __cmplr) => {
|
|
@@ -19,5 +20,5 @@ export const SpinnerWrapper = forwardRef(({
|
|
|
19
20
|
}));
|
|
20
21
|
});
|
|
21
22
|
if (process.env.NODE_ENV !== 'production') {
|
|
22
|
-
|
|
23
|
+
SpinnerWrapperOldVisualRefresh.displayName = 'SpinnerWrapperOldVisualRefresh';
|
|
23
24
|
}
|