@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
|
@@ -15,16 +15,18 @@ import { ax, ix } from "@compiled/react/runtime";
|
|
|
15
15
|
function _callSuper(t, o, e) { return o = _getPrototypeOf(o), _possibleConstructorReturn(t, _isNativeReflectConstruct() ? Reflect.construct(o, e || [], _getPrototypeOf(t).constructor) : o.apply(t, e)); }
|
|
16
16
|
function _isNativeReflectConstruct() { try { var t = !Boolean.prototype.valueOf.call(Reflect.construct(Boolean, [], function () {})); } catch (t) {} return (_isNativeReflectConstruct = function _isNativeReflectConstruct() { return !!t; })(); }
|
|
17
17
|
import React from 'react';
|
|
18
|
+
import { di } from 'react-magnetic-di';
|
|
18
19
|
import ImageLoader from 'react-render-image';
|
|
19
20
|
import LinkIcon from '@atlaskit/icon/core/migration/link';
|
|
20
21
|
import { fg } from '@atlaskit/platform-feature-flags';
|
|
22
|
+
import { Box, xcss } from '@atlaskit/primitives';
|
|
21
23
|
import { B400, N200 } from '@atlaskit/theme/colors';
|
|
22
24
|
import { Icon, Shimmer } from '../Icon';
|
|
23
25
|
import { LinkAppearance as LinkAppearanceOld, NoLinkAppearance as NoLinkAppearanceOld } from '../styled-emotion';
|
|
24
|
-
import {
|
|
26
|
+
import { EmojiWrapperOldVisualRefresh, IconEmptyWrapperOldVisualRefresh, IconPositionWrapperOldVisualRefresh, IconTitleWrapperOldVisualRefresh, IconWrapperOldVisualRefresh, TitleWrapperClassNameOldVisualRefresh, TitleWrapperOldVisualRefresh } from './styled';
|
|
25
27
|
import { EmojiWrapper as EmojiWrapperOld, IconEmptyWrapper as IconEmptyWrapperOld, IconPositionWrapper as IconPositionWrapperOld, IconTitleWrapper as IconTitleWrapperOld, IconWrapper as IconWrapperOld, TitleWrapper as TitleWrapperOld } from './styled-emotion';
|
|
26
28
|
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-styled -- Ignored via go/DSP-18766
|
|
27
|
-
var
|
|
29
|
+
var NoLinkAppearanceOldVisualRefresh = forwardRef(function (_ref, __cmplr) {
|
|
28
30
|
var _ref$as = _ref.as,
|
|
29
31
|
C = _ref$as === void 0 ? "span" : _ref$as,
|
|
30
32
|
__cmpls = _ref.style,
|
|
@@ -38,7 +40,7 @@ var NoLinkAppearance = forwardRef(function (_ref, __cmplr) {
|
|
|
38
40
|
|
|
39
41
|
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-styled -- Ignored via go/DSP-18766
|
|
40
42
|
if (process.env.NODE_ENV !== 'production') {
|
|
41
|
-
|
|
43
|
+
NoLinkAppearanceOldVisualRefresh.displayName = 'NoLinkAppearanceOldVisualRefresh';
|
|
42
44
|
}
|
|
43
45
|
var LinkAppearance = forwardRef(function (_ref2, __cmplr) {
|
|
44
46
|
var _ref2$as = _ref2.as,
|
|
@@ -91,12 +93,26 @@ export var IconAndTitleLayout = /*#__PURE__*/function (_React$Component) {
|
|
|
91
93
|
icon = _this$props.icon,
|
|
92
94
|
emoji = _this$props.emoji;
|
|
93
95
|
if (emoji) {
|
|
94
|
-
|
|
96
|
+
if (fg('platform-linking-visual-refresh-v1')) {
|
|
97
|
+
return /*#__PURE__*/React.createElement(Box, {
|
|
98
|
+
as: "span",
|
|
99
|
+
xcss: iconWrapperStyle,
|
|
100
|
+
testId: "icon-position-emoji-wrapper"
|
|
101
|
+
}, emoji);
|
|
102
|
+
}
|
|
103
|
+
return fg('bandicoots-compiled-migration-smartcard') ? /*#__PURE__*/React.createElement(EmojiWrapperOldVisualRefresh, null, emoji) : /*#__PURE__*/React.createElement(EmojiWrapperOld, null, emoji);
|
|
95
104
|
}
|
|
96
105
|
if (!icon || typeof icon === 'string') {
|
|
97
106
|
return null;
|
|
98
107
|
}
|
|
99
|
-
|
|
108
|
+
if (fg('platform-linking-visual-refresh-v1')) {
|
|
109
|
+
return /*#__PURE__*/React.createElement(Box, {
|
|
110
|
+
as: "span",
|
|
111
|
+
xcss: iconWrapperStyle,
|
|
112
|
+
testId: "icon-atlaskit-icon-wrapper"
|
|
113
|
+
}, icon);
|
|
114
|
+
}
|
|
115
|
+
return fg('bandicoots-compiled-migration-smartcard') ? /*#__PURE__*/React.createElement(IconWrapperOldVisualRefresh, null, icon) : /*#__PURE__*/React.createElement(IconWrapperOld, null, icon);
|
|
100
116
|
}
|
|
101
117
|
}, {
|
|
102
118
|
key: "renderImageIcon",
|
|
@@ -105,6 +121,21 @@ export var IconAndTitleLayout = /*#__PURE__*/function (_React$Component) {
|
|
|
105
121
|
if (!url || typeof url !== 'string') {
|
|
106
122
|
return null;
|
|
107
123
|
}
|
|
124
|
+
if (fg('platform-linking-visual-refresh-v1')) {
|
|
125
|
+
return /*#__PURE__*/React.createElement(ImageLoader, {
|
|
126
|
+
src: url,
|
|
127
|
+
loaded: /*#__PURE__*/React.createElement("img", {
|
|
128
|
+
src: url,
|
|
129
|
+
"data-testid": "".concat(testId, "-image"),
|
|
130
|
+
alt: "",
|
|
131
|
+
className: ax(["_1bsb1osq"])
|
|
132
|
+
}),
|
|
133
|
+
errored: errored,
|
|
134
|
+
loading: /*#__PURE__*/React.createElement(Shimmer, {
|
|
135
|
+
testId: "".concat(testId, "-loading")
|
|
136
|
+
})
|
|
137
|
+
});
|
|
138
|
+
}
|
|
108
139
|
return /*#__PURE__*/React.createElement(ImageLoader, {
|
|
109
140
|
src: url,
|
|
110
141
|
loaded: /*#__PURE__*/React.createElement(Icon
|
|
@@ -124,10 +155,18 @@ export var IconAndTitleLayout = /*#__PURE__*/function (_React$Component) {
|
|
|
124
155
|
key: "renderIconPlaceholder",
|
|
125
156
|
value: function renderIconPlaceholder(testId) {
|
|
126
157
|
var defaultIcon = this.props.defaultIcon;
|
|
158
|
+
if (fg('platform-linking-visual-refresh-v1')) {
|
|
159
|
+
return defaultIcon || /*#__PURE__*/React.createElement(LinkIcon, {
|
|
160
|
+
label: "link",
|
|
161
|
+
LEGACY_size: "small",
|
|
162
|
+
testId: "".concat(testId, "-default"),
|
|
163
|
+
color: "currentColor"
|
|
164
|
+
});
|
|
165
|
+
}
|
|
127
166
|
if (defaultIcon) {
|
|
128
|
-
return /*#__PURE__*/React.createElement(
|
|
167
|
+
return /*#__PURE__*/React.createElement(IconWrapperOldVisualRefresh, null, defaultIcon);
|
|
129
168
|
}
|
|
130
|
-
return /*#__PURE__*/React.createElement(
|
|
169
|
+
return /*#__PURE__*/React.createElement(IconWrapperOldVisualRefresh, null, /*#__PURE__*/React.createElement(LinkIcon, {
|
|
131
170
|
label: "link",
|
|
132
171
|
LEGACY_size: "small",
|
|
133
172
|
testId: "".concat(testId, "-default"),
|
|
@@ -147,6 +186,13 @@ export var IconAndTitleLayout = /*#__PURE__*/function (_React$Component) {
|
|
|
147
186
|
}
|
|
148
187
|
var placeholder = this.renderIconPlaceholder(testId);
|
|
149
188
|
var image = this.renderImageIcon(placeholder, testId);
|
|
189
|
+
if (fg('platform-linking-visual-refresh-v1')) {
|
|
190
|
+
return /*#__PURE__*/React.createElement(Box, {
|
|
191
|
+
as: "span",
|
|
192
|
+
xcss: iconWrapperStyle,
|
|
193
|
+
testId: "".concat(testId, "-image-wrapper")
|
|
194
|
+
}, image || placeholder);
|
|
195
|
+
}
|
|
150
196
|
return image || placeholder;
|
|
151
197
|
}
|
|
152
198
|
}, {
|
|
@@ -161,20 +207,32 @@ export var IconAndTitleLayout = /*#__PURE__*/function (_React$Component) {
|
|
|
161
207
|
rightSide = _this$props2.rightSide,
|
|
162
208
|
_this$props2$testId = _this$props2.testId,
|
|
163
209
|
testId = _this$props2$testId === void 0 ? 'inline-card-icon-and-title' : _this$props2$testId;
|
|
164
|
-
var titlePart = fg('bandicoots-compiled-migration-smartcard') ? /*#__PURE__*/React.createElement(React.Fragment, null, /*#__PURE__*/React.createElement(
|
|
210
|
+
var titlePart = fg('bandicoots-compiled-migration-smartcard') ? /*#__PURE__*/React.createElement(React.Fragment, null, fg('platform-linking-visual-refresh-v1') ? /*#__PURE__*/React.createElement(Box, {
|
|
211
|
+
as: "span",
|
|
212
|
+
xcss: iconOuterWrapperStyle,
|
|
213
|
+
testId: "icon-position-wrapper"
|
|
214
|
+
}, children || /*#__PURE__*/React.createElement(React.Fragment, null, /*#__PURE__*/React.createElement(Box, {
|
|
215
|
+
as: "span",
|
|
216
|
+
xcss: iconEmptyStyle,
|
|
217
|
+
testId: "icon-empty-wrapper"
|
|
218
|
+
}), this.renderIcon(testId))) : /*#__PURE__*/React.createElement(IconPositionWrapperOldVisualRefresh, {
|
|
165
219
|
"data-testid": "icon-position-wrapper"
|
|
166
|
-
}, children || /*#__PURE__*/React.createElement(React.Fragment, null, /*#__PURE__*/React.createElement(
|
|
220
|
+
}, children || /*#__PURE__*/React.createElement(React.Fragment, null, /*#__PURE__*/React.createElement(IconEmptyWrapperOldVisualRefresh, {
|
|
167
221
|
"data-testid": "icon-empty-wrapper"
|
|
168
|
-
}), this.renderIcon(testId))), /*#__PURE__*/React.createElement(
|
|
169
|
-
|
|
170
|
-
, {
|
|
222
|
+
}), this.renderIcon(testId))), fg('platform-linking-visual-refresh-v1') ? /*#__PURE__*/React.createElement(Box, _extends({
|
|
223
|
+
as: "span",
|
|
171
224
|
style: {
|
|
172
|
-
color: titleTextColor
|
|
225
|
+
color: this.props.titleTextColor
|
|
173
226
|
}
|
|
174
|
-
|
|
175
|
-
|
|
176
|
-
|
|
177
|
-
|
|
227
|
+
}, !fg('platform-linking-visual-refresh-v1') ? {
|
|
228
|
+
className: TitleWrapperClassNameOldVisualRefresh
|
|
229
|
+
} : {}), title) : /*#__PURE__*/React.createElement(TitleWrapperOldVisualRefresh, _extends({
|
|
230
|
+
style: {
|
|
231
|
+
color: this.props.titleTextColor
|
|
232
|
+
}
|
|
233
|
+
}, !fg('platform-linking-visual-refresh-v1') ? {
|
|
234
|
+
className: TitleWrapperClassNameOldVisualRefresh
|
|
235
|
+
} : {}), title)) : /*#__PURE__*/React.createElement(React.Fragment, null, /*#__PURE__*/React.createElement(IconPositionWrapperOld, {
|
|
178
236
|
"data-testid": "icon-position-wrapper"
|
|
179
237
|
}, children || /*#__PURE__*/React.createElement(React.Fragment, null, /*#__PURE__*/React.createElement(IconEmptyWrapperOld, {
|
|
180
238
|
"data-testid": "icon-empty-wrapper"
|
|
@@ -186,23 +244,31 @@ export var IconAndTitleLayout = /*#__PURE__*/function (_React$Component) {
|
|
|
186
244
|
}
|
|
187
245
|
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-classname-prop -- Ignored via go/DSP-18766
|
|
188
246
|
,
|
|
189
|
-
className:
|
|
247
|
+
className: TitleWrapperClassNameOldVisualRefresh
|
|
190
248
|
}, title));
|
|
191
249
|
if (fg('bandicoots-compiled-migration-smartcard')) {
|
|
192
|
-
return (
|
|
193
|
-
|
|
194
|
-
|
|
195
|
-
|
|
196
|
-
|
|
197
|
-
|
|
198
|
-
|
|
199
|
-
|
|
200
|
-
|
|
201
|
-
|
|
202
|
-
|
|
203
|
-
|
|
204
|
-
|
|
205
|
-
|
|
250
|
+
return /*#__PURE__*/React.createElement(React.Fragment, null, fg('platform-linking-visual-refresh-v1') ? /*#__PURE__*/React.createElement(IconTitleWrapper, {
|
|
251
|
+
style: {
|
|
252
|
+
color: this.props.titleColor
|
|
253
|
+
},
|
|
254
|
+
testId: testId
|
|
255
|
+
}, link ? /*#__PURE__*/React.createElement(LinkAppearance, {
|
|
256
|
+
href: link,
|
|
257
|
+
onClick: this.handleClick,
|
|
258
|
+
onKeyPress: this.handleKeyPress
|
|
259
|
+
}, titlePart) : titlePart, rightSide ? /*#__PURE__*/React.createElement(Box, {
|
|
260
|
+
as: "span",
|
|
261
|
+
xcss: noLinkAppearanceStyle
|
|
262
|
+
}, rightSide) : null) : /*#__PURE__*/React.createElement(IconTitleWrapperOldVisualRefresh, {
|
|
263
|
+
style: {
|
|
264
|
+
color: this.props.titleColor
|
|
265
|
+
},
|
|
266
|
+
"data-testid": testId
|
|
267
|
+
}, link ? /*#__PURE__*/React.createElement(LinkAppearance, {
|
|
268
|
+
href: link,
|
|
269
|
+
onClick: this.handleClick,
|
|
270
|
+
onKeyPress: this.handleKeyPress
|
|
271
|
+
}, titlePart) : titlePart, rightSide ? /*#__PURE__*/React.createElement(NoLinkAppearanceOldVisualRefresh, null, rightSide) : null));
|
|
206
272
|
} else {
|
|
207
273
|
return (
|
|
208
274
|
/*#__PURE__*/
|
|
@@ -224,4 +290,68 @@ export var IconAndTitleLayout = /*#__PURE__*/function (_React$Component) {
|
|
|
224
290
|
}(React.Component);
|
|
225
291
|
_defineProperty(IconAndTitleLayout, "defaultProps", {
|
|
226
292
|
rightSideSpacer: true
|
|
293
|
+
});
|
|
294
|
+
export var IconTitleWrapper = function IconTitleWrapper(props) {
|
|
295
|
+
return /*#__PURE__*/React.createElement(Box, _extends({
|
|
296
|
+
as: "span",
|
|
297
|
+
xcss: iconTitleWrapperStyle
|
|
298
|
+
}, props));
|
|
299
|
+
};
|
|
300
|
+
export var LozengeWrapper = function LozengeWrapper(props) {
|
|
301
|
+
return /*#__PURE__*/React.createElement(Box, {
|
|
302
|
+
as: "span",
|
|
303
|
+
xcss: lozengeWrapperStyle
|
|
304
|
+
}, /*#__PURE__*/React.createElement(Box, _extends({
|
|
305
|
+
xcss: lozengeInternalWrapperStyle
|
|
306
|
+
}, props)));
|
|
307
|
+
};
|
|
308
|
+
var lozengeInternalWrapperStyle = xcss({
|
|
309
|
+
paddingBottom: 'space.025'
|
|
310
|
+
});
|
|
311
|
+
var lozengeWrapperStyle = xcss({
|
|
312
|
+
display: 'inline-block',
|
|
313
|
+
verticalAlign: 'bottom',
|
|
314
|
+
marginTop: 'space.0',
|
|
315
|
+
marginRight: 'space.050',
|
|
316
|
+
marginBottom: 'space.0',
|
|
317
|
+
marginLeft: 'space.025'
|
|
318
|
+
});
|
|
319
|
+
var horizontalPadding = 'space.050';
|
|
320
|
+
var verticalPadding = 'space.025';
|
|
321
|
+
var iconWidth = '16px';
|
|
322
|
+
var iconEmptyStyle = xcss({
|
|
323
|
+
width: iconWidth,
|
|
324
|
+
display: 'inline-block',
|
|
325
|
+
opacity: 0
|
|
326
|
+
});
|
|
327
|
+
var iconOuterWrapperStyle = xcss({
|
|
328
|
+
marginRight: 'space.050',
|
|
329
|
+
display: 'inline-block',
|
|
330
|
+
position: 'relative'
|
|
331
|
+
});
|
|
332
|
+
var iconTitleWrapperStyle = xcss({
|
|
333
|
+
whiteSpace: 'pre-wrap',
|
|
334
|
+
wordBreak: 'break-all',
|
|
335
|
+
boxDecorationBreak: 'clone',
|
|
336
|
+
paddingTop: verticalPadding,
|
|
337
|
+
paddingRight: horizontalPadding,
|
|
338
|
+
paddingBottom: verticalPadding,
|
|
339
|
+
paddingLeft: horizontalPadding
|
|
340
|
+
});
|
|
341
|
+
var iconWrapperStyle = xcss({
|
|
342
|
+
position: 'absolute',
|
|
343
|
+
display: 'inline-flex',
|
|
344
|
+
alignItems: 'center',
|
|
345
|
+
boxSizing: 'border-box',
|
|
346
|
+
top: 'space.0',
|
|
347
|
+
left: 'space.0',
|
|
348
|
+
bottom: 'space.0',
|
|
349
|
+
width: iconWidth,
|
|
350
|
+
userSelect: 'none'
|
|
351
|
+
});
|
|
352
|
+
var iconImageStyle = null;
|
|
353
|
+
var noLinkAppearanceStyle = xcss({
|
|
354
|
+
color: 'color.text.subtlest',
|
|
355
|
+
font: 'font.body',
|
|
356
|
+
marginLeft: 'space.050'
|
|
227
357
|
});
|
|
@@ -27,8 +27,9 @@ var IconObjectOverrides = "\n & > span {\n height: 16px;\n width: 16px;\n
|
|
|
27
27
|
// TODO: remove this override behaviour for @atlaskit/icon
|
|
28
28
|
var IconOverrides = "\n & > * > span {\n height: 16px;\n width: 16px;\n position: absolute;\n left: 0;\n & > svg {\n position: absolute;\n top: 50%;\n left: 50%;\n transform: translate(-50%, -50%);\n }\n }\n";
|
|
29
29
|
|
|
30
|
+
// TODO Delete when cleaning platform-linking-visual-refresh-v1
|
|
30
31
|
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-styled, @atlaskit/ui-styling-standard/no-exported-styles -- Ignored via go/DSP-18766
|
|
31
|
-
export var
|
|
32
|
+
export var IconWrapperOldVisualRefresh = forwardRef(function (_ref, __cmplr) {
|
|
32
33
|
var _ref$as = _ref.as,
|
|
33
34
|
C = _ref$as === void 0 ? "span" : _ref$as,
|
|
34
35
|
__cmpls = _ref.style,
|
|
@@ -41,11 +42,12 @@ export var IconWrapper = forwardRef(function (_ref, __cmplr) {
|
|
|
41
42
|
});
|
|
42
43
|
|
|
43
44
|
// Wraps all emoji in Inline Links similar to icon
|
|
45
|
+
// TODO Delete when cleaning platform-linking-visual-refresh-v1
|
|
44
46
|
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-styled, @atlaskit/ui-styling-standard/no-exported-styles -- Ignored via go/DSP-18766
|
|
45
47
|
if (process.env.NODE_ENV !== 'production') {
|
|
46
|
-
|
|
48
|
+
IconWrapperOldVisualRefresh.displayName = 'IconWrapperOldVisualRefresh';
|
|
47
49
|
}
|
|
48
|
-
export var
|
|
50
|
+
export var EmojiWrapperOldVisualRefresh = forwardRef(function (_ref2, __cmplr) {
|
|
49
51
|
var _ref2$as = _ref2.as,
|
|
50
52
|
C = _ref2$as === void 0 ? "span" : _ref2$as,
|
|
51
53
|
__cmpls = _ref2.style,
|
|
@@ -60,11 +62,12 @@ export var EmojiWrapper = forwardRef(function (_ref2, __cmplr) {
|
|
|
60
62
|
// The main 'wrapping' element, title of the content.
|
|
61
63
|
// NB: `white-space` adds little whitespace before wrapping.
|
|
62
64
|
// NB: `word-break` line breaks as soon as an overflow takes place.
|
|
65
|
+
// TODO Delete when cleaning platform-linking-visual-refresh-v1
|
|
63
66
|
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-styled, @atlaskit/ui-styling-standard/no-exported-styles -- Ignored via go/DSP-18766
|
|
64
67
|
if (process.env.NODE_ENV !== 'production') {
|
|
65
|
-
|
|
68
|
+
EmojiWrapperOldVisualRefresh.displayName = 'EmojiWrapperOldVisualRefresh';
|
|
66
69
|
}
|
|
67
|
-
export var
|
|
70
|
+
export var IconTitleWrapperOldVisualRefresh = forwardRef(function (_ref3, __cmplr) {
|
|
68
71
|
var _ref3$as = _ref3.as,
|
|
69
72
|
C = _ref3$as === void 0 ? "span" : _ref3$as,
|
|
70
73
|
__cmpls = _ref3.style,
|
|
@@ -76,12 +79,12 @@ export var IconTitleWrapper = forwardRef(function (_ref3, __cmplr) {
|
|
|
76
79
|
}));
|
|
77
80
|
});
|
|
78
81
|
|
|
79
|
-
// TODO
|
|
82
|
+
// TODO Delete when cleaning platform-linking-visual-refresh-v1
|
|
80
83
|
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-styled, @atlaskit/ui-styling-standard/no-exported-styles -- Ignored via go/DSP-18766
|
|
81
84
|
if (process.env.NODE_ENV !== 'production') {
|
|
82
|
-
|
|
85
|
+
IconTitleWrapperOldVisualRefresh.displayName = 'IconTitleWrapperOldVisualRefresh';
|
|
83
86
|
}
|
|
84
|
-
export var
|
|
87
|
+
export var LozengeWrapperOldVisualRefresh = forwardRef(function (_ref4, __cmplr) {
|
|
85
88
|
var _ref4$as = _ref4.as,
|
|
86
89
|
C = _ref4$as === void 0 ? "span" : _ref4$as,
|
|
87
90
|
__cmpls = _ref4.style,
|
|
@@ -95,7 +98,7 @@ export var LozengeWrapper = forwardRef(function (_ref4, __cmplr) {
|
|
|
95
98
|
|
|
96
99
|
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-styled, @atlaskit/ui-styling-standard/no-exported-styles -- Ignored via go/DSP-18766
|
|
97
100
|
if (process.env.NODE_ENV !== 'production') {
|
|
98
|
-
|
|
101
|
+
LozengeWrapperOldVisualRefresh.displayName = 'LozengeWrapperOldVisualRefresh';
|
|
99
102
|
}
|
|
100
103
|
export var RightIconPositionWrapper = forwardRef(function (_ref5, __cmplr) {
|
|
101
104
|
var _ref5$as = _ref5.as,
|
|
@@ -112,11 +115,12 @@ export var RightIconPositionWrapper = forwardRef(function (_ref5, __cmplr) {
|
|
|
112
115
|
// The following components are used to absolutely position icons in the vertical center.
|
|
113
116
|
// - IconPositionWrapper: the `relative` parent which has no height in itself.
|
|
114
117
|
// - IconEmptyWrapper: the child which forces `IconPositionWrapper` to have a height.
|
|
118
|
+
// TODO Delete when cleaning platform-linking-visual-refresh-v1
|
|
115
119
|
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-styled, @atlaskit/ui-styling-standard/no-exported-styles -- Ignored via go/DSP-18766
|
|
116
120
|
if (process.env.NODE_ENV !== 'production') {
|
|
117
121
|
RightIconPositionWrapper.displayName = 'RightIconPositionWrapper';
|
|
118
122
|
}
|
|
119
|
-
export var
|
|
123
|
+
export var IconPositionWrapperOldVisualRefresh = forwardRef(function (_ref6, __cmplr) {
|
|
120
124
|
var _ref6$as = _ref6.as,
|
|
121
125
|
C = _ref6$as === void 0 ? "span" : _ref6$as,
|
|
122
126
|
__cmpls = _ref6.style,
|
|
@@ -128,11 +132,12 @@ export var IconPositionWrapper = forwardRef(function (_ref6, __cmplr) {
|
|
|
128
132
|
}));
|
|
129
133
|
});
|
|
130
134
|
|
|
135
|
+
// TODO Delete when cleaning platform-linking-visual-refresh-v1
|
|
131
136
|
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-styled, @atlaskit/ui-styling-standard/no-exported-styles -- Ignored via go/DSP-18766
|
|
132
137
|
if (process.env.NODE_ENV !== 'production') {
|
|
133
|
-
|
|
138
|
+
IconPositionWrapperOldVisualRefresh.displayName = 'IconPositionWrapperOldVisualRefresh';
|
|
134
139
|
}
|
|
135
|
-
export var
|
|
140
|
+
export var IconEmptyWrapperOldVisualRefresh = forwardRef(function (_ref7, __cmplr) {
|
|
136
141
|
var _ref7$as = _ref7.as,
|
|
137
142
|
C = _ref7$as === void 0 ? "span" : _ref7$as,
|
|
138
143
|
__cmpls = _ref7.style,
|
|
@@ -145,14 +150,16 @@ export var IconEmptyWrapper = forwardRef(function (_ref7, __cmplr) {
|
|
|
145
150
|
});
|
|
146
151
|
|
|
147
152
|
// With emotion it's not possible to use reference to `TitleWrapper` as part of a selector,
|
|
153
|
+
// TODO Delete when cleaning platform-linking-visual-refresh-v1
|
|
148
154
|
// To achieve same result we use classname instead.
|
|
149
155
|
if (process.env.NODE_ENV !== 'production') {
|
|
150
|
-
|
|
156
|
+
IconEmptyWrapperOldVisualRefresh.displayName = 'IconEmptyWrapperOldVisualRefresh';
|
|
151
157
|
}
|
|
152
|
-
export var
|
|
158
|
+
export var TitleWrapperClassNameOldVisualRefresh = 'smart-link-title-wrapper';
|
|
153
159
|
|
|
160
|
+
// TODO Delete when cleaning platform-linking-visual-refresh-v1
|
|
154
161
|
// 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
|
|
155
|
-
export var
|
|
162
|
+
export var TitleWrapperOldVisualRefresh = forwardRef(function (_ref8, __cmplr) {
|
|
156
163
|
var _ref8$as = _ref8.as,
|
|
157
164
|
C = _ref8$as === void 0 ? "span" : _ref8$as,
|
|
158
165
|
__cmpls = _ref8.style,
|
|
@@ -164,5 +171,5 @@ export var TitleWrapper = forwardRef(function (_ref8, __cmplr) {
|
|
|
164
171
|
}));
|
|
165
172
|
});
|
|
166
173
|
if (process.env.NODE_ENV !== 'production') {
|
|
167
|
-
|
|
174
|
+
TitleWrapperOldVisualRefresh.displayName = 'TitleWrapperOldVisualRefresh';
|
|
168
175
|
}
|
|
@@ -7,10 +7,11 @@ function _callSuper(t, o, e) { return o = _getPrototypeOf(o), _possibleConstruct
|
|
|
7
7
|
function _isNativeReflectConstruct() { try { var t = !Boolean.prototype.valueOf.call(Reflect.construct(Boolean, [], function () {})); } catch (t) {} return (_isNativeReflectConstruct = function _isNativeReflectConstruct() { return !!t; })(); }
|
|
8
8
|
import React from 'react';
|
|
9
9
|
import Lozenge from '@atlaskit/lozenge';
|
|
10
|
+
import { fg } from '@atlaskit/platform-feature-flags';
|
|
10
11
|
import { HoverCard } from '../../HoverCard';
|
|
11
12
|
import { Frame } from '../Frame';
|
|
12
|
-
import { IconAndTitleLayout } from '../IconAndTitleLayout';
|
|
13
|
-
import {
|
|
13
|
+
import { IconAndTitleLayout, LozengeWrapper as LozengeWrapperNew } from '../IconAndTitleLayout';
|
|
14
|
+
import { LozengeWrapperOldVisualRefresh } from '../IconAndTitleLayout/styled';
|
|
14
15
|
export var InlineCardResolvedView = /*#__PURE__*/function (_React$Component) {
|
|
15
16
|
function InlineCardResolvedView() {
|
|
16
17
|
_classCallCheck(this, InlineCardResolvedView);
|
|
@@ -25,6 +26,7 @@ export var InlineCardResolvedView = /*#__PURE__*/function (_React$Component) {
|
|
|
25
26
|
return null;
|
|
26
27
|
}
|
|
27
28
|
var appearance = lozenge.appearance || 'default';
|
|
29
|
+
var LozengeWrapper = fg('platform-linking-visual-refresh-v1') ? LozengeWrapperNew : LozengeWrapperOldVisualRefresh;
|
|
28
30
|
return /*#__PURE__*/React.createElement(LozengeWrapper, null, /*#__PURE__*/React.createElement(Lozenge, {
|
|
29
31
|
testId: "inline-card-resolved-view-lozenge",
|
|
30
32
|
appearance: appearance
|
|
@@ -9,10 +9,10 @@ import React from 'react';
|
|
|
9
9
|
import { fg } from '@atlaskit/platform-feature-flags';
|
|
10
10
|
import Spinner from '@atlaskit/spinner';
|
|
11
11
|
import { Frame } from '../Frame';
|
|
12
|
-
import { IconAndTitleLayout } from '../IconAndTitleLayout';
|
|
13
|
-
import {
|
|
12
|
+
import { IconAndTitleLayout, IconTitleWrapper } from '../IconAndTitleLayout';
|
|
13
|
+
import { IconTitleWrapperOldVisualRefresh, RightIconPositionWrapper } from '../IconAndTitleLayout/styled';
|
|
14
14
|
import { IconTitleWrapper as IconTitleWrapperOld, RightIconPositionWrapper as RightIconPositionWrapperOld } from '../IconAndTitleLayout/styled-emotion';
|
|
15
|
-
import {
|
|
15
|
+
import { SpinnerWrapperOldVisualRefresh } from './styled';
|
|
16
16
|
import { SpinnerWrapper as SpinnerWrapperOld } from './styled-emotion';
|
|
17
17
|
export var InlineCardResolvingView = /*#__PURE__*/function (_React$Component) {
|
|
18
18
|
function InlineCardResolvingView() {
|
|
@@ -33,7 +33,8 @@ export var InlineCardResolvingView = /*#__PURE__*/function (_React$Component) {
|
|
|
33
33
|
titleTextColor = _this$props.titleTextColor,
|
|
34
34
|
resolvingPlaceholder = _this$props.resolvingPlaceholder,
|
|
35
35
|
truncateInline = _this$props.truncateInline;
|
|
36
|
-
var SpinnerWrapperComponent = fg('bandicoots-compiled-migration-smartcard') ?
|
|
36
|
+
var SpinnerWrapperComponent = fg('bandicoots-compiled-migration-smartcard') ? SpinnerWrapperOldVisualRefresh : SpinnerWrapperOld;
|
|
37
|
+
var IconTitleWrapperFFed = fg('platform-linking-visual-refresh-v1') ? IconTitleWrapper : IconTitleWrapperOldVisualRefresh;
|
|
37
38
|
if (inlinePreloaderStyle === 'on-right-without-skeleton') {
|
|
38
39
|
if (fg('bandicoots-compiled-migration-smartcard')) {
|
|
39
40
|
return /*#__PURE__*/React.createElement(Frame, {
|
|
@@ -42,11 +43,13 @@ export var InlineCardResolvingView = /*#__PURE__*/function (_React$Component) {
|
|
|
42
43
|
onClick: onClick,
|
|
43
44
|
isSelected: isSelected,
|
|
44
45
|
truncateInline: truncateInline
|
|
45
|
-
}, /*#__PURE__*/React.createElement(
|
|
46
|
+
}, /*#__PURE__*/React.createElement(IconTitleWrapperFFed, null, url, /*#__PURE__*/React.createElement(RightIconPositionWrapper, null, fg('platform-linking-visual-refresh-v1') ? /*#__PURE__*/React.createElement(Spinner, {
|
|
47
|
+
size: 14
|
|
48
|
+
}) : /*#__PURE__*/React.createElement(React.Fragment, null, /*#__PURE__*/React.createElement(SpinnerWrapperComponent, {
|
|
46
49
|
className: "inline-resolving-spinner"
|
|
47
50
|
}, /*#__PURE__*/React.createElement(Spinner, {
|
|
48
51
|
size: 14
|
|
49
|
-
})))));
|
|
52
|
+
}))))));
|
|
50
53
|
} else {
|
|
51
54
|
return /*#__PURE__*/React.createElement(Frame, {
|
|
52
55
|
withoutBackground: true,
|
|
@@ -70,11 +73,13 @@ export var InlineCardResolvingView = /*#__PURE__*/function (_React$Component) {
|
|
|
70
73
|
}, /*#__PURE__*/React.createElement(IconAndTitleLayout, {
|
|
71
74
|
title: resolvingPlaceholder !== null && resolvingPlaceholder !== void 0 ? resolvingPlaceholder : url,
|
|
72
75
|
titleTextColor: titleTextColor
|
|
73
|
-
}, /*#__PURE__*/React.createElement(
|
|
76
|
+
}, fg('platform-linking-visual-refresh-v1') ? /*#__PURE__*/React.createElement(Spinner, {
|
|
77
|
+
size: 14
|
|
78
|
+
}) : /*#__PURE__*/React.createElement(React.Fragment, null, /*#__PURE__*/React.createElement(SpinnerWrapperComponent, {
|
|
74
79
|
className: "inline-resolving-spinner"
|
|
75
80
|
}, /*#__PURE__*/React.createElement(Spinner, {
|
|
76
81
|
size: 14
|
|
77
|
-
}))));
|
|
82
|
+
})))));
|
|
78
83
|
}
|
|
79
84
|
}
|
|
80
85
|
}]);
|
|
@@ -6,12 +6,13 @@ import "./styled.compiled.css";
|
|
|
6
6
|
import { forwardRef } from 'react';
|
|
7
7
|
import * as React from 'react';
|
|
8
8
|
import { ax, ix } from "@compiled/react/runtime";
|
|
9
|
-
import {
|
|
9
|
+
import { IconTitleWrapperOldVisualRefresh } from '../IconAndTitleLayout/styled';
|
|
10
10
|
|
|
11
|
+
// TODO Delete when cleaning platform-linking-visual-refresh-v1
|
|
11
12
|
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-styled, @atlaskit/ui-styling-standard/no-exported-styles -- Ignored via go/DSP-18766
|
|
12
|
-
export var
|
|
13
|
+
export var SpinnerWrapperOldVisualRefresh = forwardRef(function (_ref, __cmplr) {
|
|
13
14
|
var _ref$as = _ref.as,
|
|
14
|
-
C = _ref$as === void 0 ?
|
|
15
|
+
C = _ref$as === void 0 ? IconTitleWrapperOldVisualRefresh : _ref$as,
|
|
15
16
|
__cmpls = _ref.style,
|
|
16
17
|
__cmplp = _objectWithoutProperties(_ref, _excluded);
|
|
17
18
|
return /*#__PURE__*/React.createElement(C, _extends({}, __cmplp, {
|
|
@@ -21,5 +22,5 @@ export var SpinnerWrapper = forwardRef(function (_ref, __cmplr) {
|
|
|
21
22
|
}));
|
|
22
23
|
});
|
|
23
24
|
if (process.env.NODE_ENV !== 'production') {
|
|
24
|
-
|
|
25
|
+
SpinnerWrapperOldVisualRefresh.displayName = 'SpinnerWrapperOldVisualRefresh';
|
|
25
26
|
}
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import _extends from "@babel/runtime/helpers/extends";
|
|
2
2
|
import React from 'react';
|
|
3
3
|
import { FormattedMessage } from 'react-intl-next';
|
|
4
|
-
import
|
|
4
|
+
import ButtonOld from '@atlaskit/button';
|
|
5
5
|
import LockLockedIcon from '@atlaskit/icon/core/lock-locked';
|
|
6
6
|
import LegacyLockIcon from '@atlaskit/icon/glyph/lock-filled';
|
|
7
7
|
import { fg } from '@atlaskit/platform-feature-flags';
|
|
@@ -10,11 +10,12 @@ import { N500, R400 } from '@atlaskit/theme/colors';
|
|
|
10
10
|
import { useAnalyticsEvents } from '../../../common/analytics/generated/use-analytics-events';
|
|
11
11
|
import { messages } from '../../../messages';
|
|
12
12
|
import { HoverCard } from '../../HoverCard';
|
|
13
|
+
import { ActionButton } from '../common/action-button';
|
|
13
14
|
import { Frame } from '../Frame';
|
|
14
15
|
import { AKIconWrapper } from '../Icon';
|
|
15
16
|
import { AKIconWrapper as AKIconWrapperOld } from '../Icon-emotion';
|
|
16
17
|
import { IconAndTitleLayout } from '../IconAndTitleLayout';
|
|
17
|
-
import {
|
|
18
|
+
import { IconStyledButtonOldVisualRefresh } from '../styled';
|
|
18
19
|
import { IconStyledButton as IconStyledButtonOld } from '../styled-emotion';
|
|
19
20
|
import withFrameStyleControl from '../utils/withFrameStyleControl';
|
|
20
21
|
var iconWrapperStyles = xcss({
|
|
@@ -76,11 +77,22 @@ export var InlineCardUnauthorizedView = function InlineCardUnauthorizedView(_ref
|
|
|
76
77
|
}
|
|
77
78
|
}, [fireEvent, onAuthorise]);
|
|
78
79
|
var renderActionButton = React.useCallback(function () {
|
|
79
|
-
var
|
|
80
|
+
var Button = withFrameStyleControl(ButtonOld, frameRef);
|
|
80
81
|
if (fg('bandicoots-compiled-migration-smartcard')) {
|
|
81
|
-
|
|
82
|
+
if (fg('platform-linking-visual-refresh-v1')) {
|
|
83
|
+
return /*#__PURE__*/React.createElement(Button, {
|
|
84
|
+
component: ActionButton,
|
|
85
|
+
onClick: handleConnectAccount,
|
|
86
|
+
testId: "button-connect-account"
|
|
87
|
+
}, /*#__PURE__*/React.createElement(FormattedMessage, _extends({}, messages.connect_link_account_card_name, {
|
|
88
|
+
values: {
|
|
89
|
+
context: context
|
|
90
|
+
}
|
|
91
|
+
})));
|
|
92
|
+
}
|
|
93
|
+
return onAuthorise ? /*#__PURE__*/React.createElement(Button, {
|
|
82
94
|
spacing: "none",
|
|
83
|
-
component:
|
|
95
|
+
component: IconStyledButtonOldVisualRefresh,
|
|
84
96
|
onClick: handleConnectAccount,
|
|
85
97
|
testId: "button-connect-account"
|
|
86
98
|
}, /*#__PURE__*/React.createElement(FormattedMessage, _extends({}, messages.connect_link_account_card_name, {
|
|
@@ -89,7 +101,7 @@ export var InlineCardUnauthorizedView = function InlineCardUnauthorizedView(_ref
|
|
|
89
101
|
}
|
|
90
102
|
}))) : undefined;
|
|
91
103
|
} else {
|
|
92
|
-
return onAuthorise ? /*#__PURE__*/React.createElement(
|
|
104
|
+
return onAuthorise ? /*#__PURE__*/React.createElement(Button, {
|
|
93
105
|
spacing: "none",
|
|
94
106
|
component: IconStyledButtonOld,
|
|
95
107
|
onClick: handleConnectAccount,
|
|
@@ -0,0 +1,51 @@
|
|
|
1
|
+
import _extends from "@babel/runtime/helpers/extends";
|
|
2
|
+
import _objectWithoutProperties from "@babel/runtime/helpers/objectWithoutProperties";
|
|
3
|
+
var _excluded = ["children"];
|
|
4
|
+
import React, { forwardRef } from 'react';
|
|
5
|
+
import { Box, xcss } from '@atlaskit/primitives';
|
|
6
|
+
/**
|
|
7
|
+
* Action button has to be a span for the overflow to work correctly
|
|
8
|
+
*/
|
|
9
|
+
export var ActionButton = /*#__PURE__*/forwardRef(function (_ref, ref) {
|
|
10
|
+
var children = _ref.children,
|
|
11
|
+
props = _objectWithoutProperties(_ref, _excluded);
|
|
12
|
+
return /*#__PURE__*/React.createElement(Box, _extends({
|
|
13
|
+
as: "span",
|
|
14
|
+
ref: ref,
|
|
15
|
+
xcss: [actionButtonStyle, !props.disabled && actionButtonNotDisabledStyle]
|
|
16
|
+
}, props, {
|
|
17
|
+
"aria-disabled": props.disabled,
|
|
18
|
+
role: "button"
|
|
19
|
+
}), /*#__PURE__*/React.createElement(Box, {
|
|
20
|
+
as: "span",
|
|
21
|
+
xcss: internalButtonStyle
|
|
22
|
+
}, children));
|
|
23
|
+
});
|
|
24
|
+
var actionButtonStyle = xcss({
|
|
25
|
+
textAlign: 'initial',
|
|
26
|
+
display: 'inline',
|
|
27
|
+
borderRadius: 'border.radius.100',
|
|
28
|
+
borderTopLeftRadius: '0px',
|
|
29
|
+
borderBottomLeftRadius: '0px',
|
|
30
|
+
backgroundClip: 'padding-box',
|
|
31
|
+
boxDecorationBreak: 'clone',
|
|
32
|
+
font: 'font.body.large',
|
|
33
|
+
paddingTop: 'space.025',
|
|
34
|
+
paddingLeft: 'space.075',
|
|
35
|
+
paddingBottom: 'space.025',
|
|
36
|
+
paddingRight: 'space.075',
|
|
37
|
+
whiteSpace: 'nowrap',
|
|
38
|
+
backgroundColor: 'color.background.neutral',
|
|
39
|
+
cursor: 'not-allowed',
|
|
40
|
+
color: 'color.text.disabled'
|
|
41
|
+
});
|
|
42
|
+
var internalButtonStyle = xcss({
|
|
43
|
+
font: 'font.body'
|
|
44
|
+
});
|
|
45
|
+
var actionButtonNotDisabledStyle = xcss({
|
|
46
|
+
color: 'color.text',
|
|
47
|
+
cursor: 'pointer',
|
|
48
|
+
':hover': {
|
|
49
|
+
backgroundColor: 'color.background.neutral.hovered'
|
|
50
|
+
}
|
|
51
|
+
});
|
|
@@ -8,8 +8,9 @@ import * as React from 'react';
|
|
|
8
8
|
import { ax, ix } from "@compiled/react/runtime";
|
|
9
9
|
// By default buttons will hide overflow and ellipsis content instead of wrapping.
|
|
10
10
|
// This basically turns the button back into inline content
|
|
11
|
+
// TODO Delete when cleaning platform-linking-visual-refresh-v1
|
|
11
12
|
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-styled, @atlaskit/ui-styling-standard/no-exported-styles -- Ignored via go/DSP-18766
|
|
12
|
-
export var
|
|
13
|
+
export var IconStyledButtonOldVisualRefresh = forwardRef(function (_ref, __cmplr) {
|
|
13
14
|
var _ref$as = _ref.as,
|
|
14
15
|
C = _ref$as === void 0 ? "span" : _ref$as,
|
|
15
16
|
__cmpls = _ref.style,
|
|
@@ -21,5 +22,5 @@ export var IconStyledButton = forwardRef(function (_ref, __cmplr) {
|
|
|
21
22
|
}));
|
|
22
23
|
});
|
|
23
24
|
if (process.env.NODE_ENV !== 'production') {
|
|
24
|
-
|
|
25
|
+
IconStyledButtonOldVisualRefresh.displayName = 'IconStyledButtonOldVisualRefresh';
|
|
25
26
|
}
|
|
@@ -13,7 +13,7 @@ import LinkWarningModal from './LinkWarningModal';
|
|
|
13
13
|
import { useLinkWarningModal } from './LinkWarningModal/hooks/use-link-warning-modal';
|
|
14
14
|
var PACKAGE_DATA = {
|
|
15
15
|
packageName: "@atlaskit/smart-card",
|
|
16
|
-
packageVersion: "34.6.
|
|
16
|
+
packageVersion: "34.6.6",
|
|
17
17
|
componentName: 'linkUrl'
|
|
18
18
|
};
|
|
19
19
|
var Anchor = withLinkClickedEvent('a');
|