@atlaskit/smart-card 34.10.2 → 34.10.4
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 +17 -0
- package/dist/cjs/extractors/common/icon/extractIconFromDocument.js +61 -7
- package/dist/cjs/utils/analytics/analytics.js +1 -1
- package/dist/cjs/view/EmbedCard/components/ExpandedFrame.compiled.css +50 -0
- package/dist/cjs/view/EmbedCard/components/ExpandedFrame.js +70 -7
- package/dist/cjs/view/EmbedCard/components/styled.js +22 -15
- package/dist/cjs/view/InlineCard/common/action-button/index.js +4 -1
- package/dist/cjs/view/LinkUrl/index.js +1 -1
- package/dist/cjs/view/common/UnauthorisedViewContent.js +8 -1
- package/dist/es2019/extractors/common/icon/extractIconFromDocument.js +61 -6
- package/dist/es2019/utils/analytics/analytics.js +1 -1
- package/dist/es2019/view/EmbedCard/components/ExpandedFrame.compiled.css +50 -0
- package/dist/es2019/view/EmbedCard/components/ExpandedFrame.js +71 -8
- package/dist/es2019/view/EmbedCard/components/styled.js +21 -14
- package/dist/es2019/view/InlineCard/common/action-button/index.js +6 -1
- package/dist/es2019/view/LinkUrl/index.js +1 -1
- package/dist/es2019/view/common/UnauthorisedViewContent.js +8 -1
- package/dist/esm/extractors/common/icon/extractIconFromDocument.js +61 -6
- package/dist/esm/utils/analytics/analytics.js +1 -1
- package/dist/esm/view/EmbedCard/components/ExpandedFrame.compiled.css +50 -0
- package/dist/esm/view/EmbedCard/components/ExpandedFrame.js +71 -8
- package/dist/esm/view/EmbedCard/components/styled.js +21 -14
- package/dist/esm/view/InlineCard/common/action-button/index.js +4 -1
- package/dist/esm/view/LinkUrl/index.js +1 -1
- package/dist/esm/view/common/UnauthorisedViewContent.js +8 -1
- package/dist/types/view/EmbedCard/components/styled.d.ts +7 -7
- package/dist/types/view/InlineCard/common/action-button/index.d.ts +1 -0
- package/dist/types-ts4.5/view/EmbedCard/components/styled.d.ts +7 -7
- package/dist/types-ts4.5/view/InlineCard/common/action-button/index.d.ts +1 -0
- package/package.json +4 -4
|
@@ -28,8 +28,9 @@ function _objectSpread(e) { for (var r = 1; r < arguments.length; r++) { var t =
|
|
|
28
28
|
import { B100, B50, N30, N300, N40 } from '@atlaskit/theme/colors';
|
|
29
29
|
export var className = 'media-card-frame';
|
|
30
30
|
export var embedHeaderHeight = 32;
|
|
31
|
+
// TODO Delete when cleaning platform-linking-visual-refresh-v1
|
|
31
32
|
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-styled,@atlaskit/ui-styling-standard/no-exported-styles
|
|
32
|
-
export var
|
|
33
|
+
export var LinkWrapperOldVisualRefresh = forwardRef(function (_ref, __cmplr) {
|
|
33
34
|
var _ref$as = _ref.as,
|
|
34
35
|
C = _ref$as === void 0 ? "div" : _ref$as,
|
|
35
36
|
__cmpls = _ref.style,
|
|
@@ -51,11 +52,12 @@ export var LinkWrapper = forwardRef(function (_ref, __cmplr) {
|
|
|
51
52
|
}));
|
|
52
53
|
});
|
|
53
54
|
|
|
55
|
+
// TODO Delete when cleaning platform-linking-visual-refresh-v1
|
|
54
56
|
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-styled,@atlaskit/ui-styling-standard/no-exported-styles
|
|
55
57
|
if (process.env.NODE_ENV !== 'production') {
|
|
56
|
-
|
|
58
|
+
LinkWrapperOldVisualRefresh.displayName = 'LinkWrapperOldVisualRefresh';
|
|
57
59
|
}
|
|
58
|
-
export var
|
|
60
|
+
export var WrapperOldVisualRefresh = forwardRef(function (_ref2, __cmplr) {
|
|
59
61
|
var _ref2$as = _ref2.as,
|
|
60
62
|
C = _ref2$as === void 0 ? "div" : _ref2$as,
|
|
61
63
|
__cmpls = _ref2.style,
|
|
@@ -77,11 +79,12 @@ export var Wrapper = forwardRef(function (_ref2, __cmplr) {
|
|
|
77
79
|
}));
|
|
78
80
|
});
|
|
79
81
|
|
|
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
|
|
81
84
|
if (process.env.NODE_ENV !== 'production') {
|
|
82
|
-
|
|
85
|
+
WrapperOldVisualRefresh.displayName = 'WrapperOldVisualRefresh';
|
|
83
86
|
}
|
|
84
|
-
export var
|
|
87
|
+
export var HeaderOldVisualRefresh = forwardRef(function (_ref3, __cmplr) {
|
|
85
88
|
var _ref3$as = _ref3.as,
|
|
86
89
|
C = _ref3$as === void 0 ? "div" : _ref3$as,
|
|
87
90
|
__cmpls = _ref3.style,
|
|
@@ -95,11 +98,12 @@ export var Header = forwardRef(function (_ref3, __cmplr) {
|
|
|
95
98
|
}));
|
|
96
99
|
});
|
|
97
100
|
|
|
101
|
+
// TODO Delete when cleaning platform-linking-visual-refresh-v1
|
|
98
102
|
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-styled,@atlaskit/ui-styling-standard/no-exported-styles
|
|
99
103
|
if (process.env.NODE_ENV !== 'production') {
|
|
100
|
-
|
|
104
|
+
HeaderOldVisualRefresh.displayName = 'HeaderOldVisualRefresh';
|
|
101
105
|
}
|
|
102
|
-
export var
|
|
106
|
+
export var IconWrapperOldVisualRefresh = forwardRef(function (_ref4, __cmplr) {
|
|
103
107
|
var _ref4$as = _ref4.as,
|
|
104
108
|
C = _ref4$as === void 0 ? "div" : _ref4$as,
|
|
105
109
|
__cmpls = _ref4.style,
|
|
@@ -113,11 +117,12 @@ export var IconWrapper = forwardRef(function (_ref4, __cmplr) {
|
|
|
113
117
|
}));
|
|
114
118
|
});
|
|
115
119
|
|
|
120
|
+
// TODO Delete when cleaning platform-linking-visual-refresh-v1
|
|
116
121
|
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-styled,@atlaskit/ui-styling-standard/no-exported-styles
|
|
117
122
|
if (process.env.NODE_ENV !== 'production') {
|
|
118
|
-
|
|
123
|
+
IconWrapperOldVisualRefresh.displayName = 'IconWrapperOldVisualRefresh';
|
|
119
124
|
}
|
|
120
|
-
export var
|
|
125
|
+
export var TextWrapperOldVisualRefresh = forwardRef(function (_ref5, __cmplr) {
|
|
121
126
|
var _ref5$as = _ref5.as,
|
|
122
127
|
C = _ref5$as === void 0 ? "div" : _ref5$as,
|
|
123
128
|
__cmpls = _ref5.style,
|
|
@@ -131,11 +136,12 @@ export var TextWrapper = forwardRef(function (_ref5, __cmplr) {
|
|
|
131
136
|
}));
|
|
132
137
|
});
|
|
133
138
|
|
|
139
|
+
// TODO Delete when cleaning platform-linking-visual-refresh-v1
|
|
134
140
|
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-styled,@atlaskit/ui-styling-standard/no-exported-styles
|
|
135
141
|
if (process.env.NODE_ENV !== 'production') {
|
|
136
|
-
|
|
142
|
+
TextWrapperOldVisualRefresh.displayName = 'TextWrapperOldVisualRefresh';
|
|
137
143
|
}
|
|
138
|
-
export var
|
|
144
|
+
export var TooltipWrapperOldVisualRefresh = forwardRef(function (_ref6, __cmplr) {
|
|
139
145
|
var _ref6$as = _ref6.as,
|
|
140
146
|
C = _ref6$as === void 0 ? "div" : _ref6$as,
|
|
141
147
|
__cmpls = _ref6.style,
|
|
@@ -147,14 +153,15 @@ export var TooltipWrapper = forwardRef(function (_ref6, __cmplr) {
|
|
|
147
153
|
}));
|
|
148
154
|
});
|
|
149
155
|
|
|
156
|
+
// TODO Delete when cleaning platform-linking-visual-refresh-v1
|
|
150
157
|
// NB: `overflow` is kept as `hidden` since
|
|
151
158
|
// the internal contents of the `iframe` should
|
|
152
159
|
// manage scrolling behaviour.
|
|
153
160
|
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-styled,@atlaskit/ui-styling-standard/no-exported-styles
|
|
154
161
|
if (process.env.NODE_ENV !== 'production') {
|
|
155
|
-
|
|
162
|
+
TooltipWrapperOldVisualRefresh.displayName = 'TooltipWrapperOldVisualRefresh';
|
|
156
163
|
}
|
|
157
|
-
export var
|
|
164
|
+
export var ContentOldVisualRefresh = forwardRef(function (_ref7, __cmplr) {
|
|
158
165
|
var _ref7$as = _ref7.as,
|
|
159
166
|
C = _ref7$as === void 0 ? "div" : _ref7$as,
|
|
160
167
|
__cmpls = _ref7.style,
|
|
@@ -170,7 +177,7 @@ export var Content = forwardRef(function (_ref7, __cmplr) {
|
|
|
170
177
|
}));
|
|
171
178
|
});
|
|
172
179
|
if (process.env.NODE_ENV !== 'production') {
|
|
173
|
-
|
|
180
|
+
ContentOldVisualRefresh.displayName = 'ContentOldVisualRefresh';
|
|
174
181
|
}
|
|
175
182
|
var getSizeWithUnit = function getSizeWithUnit() {
|
|
176
183
|
var value = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : '100%';
|
|
@@ -9,13 +9,16 @@ import { Box, xcss } from '@atlaskit/primitives';
|
|
|
9
9
|
export var ActionButton = /*#__PURE__*/forwardRef(function (_ref, ref) {
|
|
10
10
|
var children = _ref.children,
|
|
11
11
|
props = _objectWithoutProperties(_ref, _excluded);
|
|
12
|
+
// `Button transforms `testId` into `data-testid`. We need to transform it back to `testId`
|
|
13
|
+
var testId = props["data-testid"];
|
|
12
14
|
return /*#__PURE__*/React.createElement(Box, _extends({
|
|
13
15
|
as: "span",
|
|
14
16
|
ref: ref,
|
|
15
17
|
xcss: [actionButtonStyle, !props.disabled && actionButtonNotDisabledStyle]
|
|
16
18
|
}, props, {
|
|
17
19
|
"aria-disabled": props.disabled,
|
|
18
|
-
role: "button"
|
|
20
|
+
role: "button",
|
|
21
|
+
testId: testId
|
|
19
22
|
}), /*#__PURE__*/React.createElement(Box, {
|
|
20
23
|
as: "span",
|
|
21
24
|
xcss: internalButtonStyle
|
|
@@ -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.10.
|
|
16
|
+
packageVersion: "34.10.4",
|
|
17
17
|
componentName: 'linkUrl'
|
|
18
18
|
};
|
|
19
19
|
var Anchor = withLinkClickedEvent('a');
|
|
@@ -1,6 +1,8 @@
|
|
|
1
1
|
import _extends from "@babel/runtime/helpers/extends";
|
|
2
2
|
import React, { useCallback } from 'react';
|
|
3
3
|
import { FormattedMessage } from 'react-intl-next';
|
|
4
|
+
import { fg } from '@atlaskit/platform-feature-flags';
|
|
5
|
+
import { Anchor } from '@atlaskit/primitives';
|
|
4
6
|
import { useAnalyticsEvents } from '../../common/analytics/generated/use-analytics-events';
|
|
5
7
|
import { CONTENT_URL_3P_ACCOUNT_AUTH, CONTENT_URL_SECURITY_AND_PERMISSIONS } from '../../constants';
|
|
6
8
|
import { messages } from '../../messages';
|
|
@@ -23,7 +25,12 @@ var UnauthorisedViewContent = function UnauthorisedViewContent(_ref) {
|
|
|
23
25
|
values: {
|
|
24
26
|
context: providerName
|
|
25
27
|
}
|
|
26
|
-
})) : /*#__PURE__*/React.createElement(FormattedMessage, messages.connect_unauthorised_account_description_no_provider), ' ', /*#__PURE__*/React.createElement(
|
|
28
|
+
})) : /*#__PURE__*/React.createElement(FormattedMessage, messages.connect_unauthorised_account_description_no_provider), ' ', fg('platform-linking-visual-refresh-v1') ? /*#__PURE__*/React.createElement(Anchor, {
|
|
29
|
+
href: isProductIntegrationSupported ? CONTENT_URL_3P_ACCOUNT_AUTH : CONTENT_URL_SECURITY_AND_PERMISSIONS,
|
|
30
|
+
target: "_blank",
|
|
31
|
+
testId: "".concat(testId, "-learn-more"),
|
|
32
|
+
onClick: handleLearnMoreClick
|
|
33
|
+
}, /*#__PURE__*/React.createElement(FormattedMessage, learnMoreMessage)) : /*#__PURE__*/React.createElement("a", {
|
|
27
34
|
href: isProductIntegrationSupported ? CONTENT_URL_3P_ACCOUNT_AUTH : CONTENT_URL_SECURITY_AND_PERMISSIONS,
|
|
28
35
|
target: "_blank",
|
|
29
36
|
"data-testid": "".concat(testId, "-learn-more"),
|
|
@@ -36,12 +36,12 @@ export interface ThumbnailProps {
|
|
|
36
36
|
export interface PlaceholderProps {
|
|
37
37
|
isPlaceholder: boolean;
|
|
38
38
|
}
|
|
39
|
-
export declare const
|
|
40
|
-
export declare const
|
|
41
|
-
export declare const
|
|
42
|
-
export declare const
|
|
43
|
-
export declare const
|
|
44
|
-
export declare const
|
|
45
|
-
export declare const
|
|
39
|
+
export declare const LinkWrapperOldVisualRefresh: import("react").ComponentType<WrapperProps & import("react").ClassAttributes<HTMLDivElement> & import("react").HTMLAttributes<HTMLDivElement> & import("@compiled/react").StyledProps>;
|
|
40
|
+
export declare const WrapperOldVisualRefresh: import("react").ComponentType<WrapperProps & import("react").ClassAttributes<HTMLDivElement> & import("react").HTMLAttributes<HTMLDivElement> & import("@compiled/react").StyledProps>;
|
|
41
|
+
export declare const HeaderOldVisualRefresh: import("react").ComponentType<HeaderProps & import("react").ClassAttributes<HTMLDivElement> & import("react").HTMLAttributes<HTMLDivElement> & import("@compiled/react").StyledProps>;
|
|
42
|
+
export declare const IconWrapperOldVisualRefresh: import("react").ComponentType<PlaceholderProps & import("react").ClassAttributes<HTMLDivElement> & import("react").HTMLAttributes<HTMLDivElement> & import("@compiled/react").StyledProps>;
|
|
43
|
+
export declare const TextWrapperOldVisualRefresh: import("react").ComponentType<PlaceholderProps & import("react").ClassAttributes<HTMLDivElement> & import("react").HTMLAttributes<HTMLDivElement> & import("@compiled/react").StyledProps>;
|
|
44
|
+
export declare const TooltipWrapperOldVisualRefresh: import("react").ComponentType<import("react").ClassAttributes<HTMLDivElement> & import("react").HTMLAttributes<HTMLDivElement> & import("@compiled/react").StyledProps>;
|
|
45
|
+
export declare const ContentOldVisualRefresh: import("react").ComponentType<ContentProps & import("react").ClassAttributes<HTMLDivElement> & import("react").HTMLAttributes<HTMLDivElement> & import("@compiled/react").StyledProps>;
|
|
46
46
|
export declare const Image: import("react").ComponentType<ImageProps & import("react").ClassAttributes<HTMLImageElement> & import("react").ImgHTMLAttributes<HTMLImageElement> & import("@compiled/react").StyledProps>;
|
|
47
47
|
export declare const Thumbnail: import("react").ComponentType<ThumbnailProps & import("react").ClassAttributes<HTMLDivElement> & import("react").HTMLAttributes<HTMLDivElement> & import("@compiled/react").StyledProps>;
|
|
@@ -2,6 +2,7 @@ import React, { type ComponentPropsWithRef } from 'react';
|
|
|
2
2
|
import { Box } from '@atlaskit/primitives';
|
|
3
3
|
type ActionButtonProps = ComponentPropsWithRef<typeof Box> & {
|
|
4
4
|
disabled?: boolean;
|
|
5
|
+
[`data-testid`]?: string;
|
|
5
6
|
};
|
|
6
7
|
/**
|
|
7
8
|
* Action button has to be a span for the overflow to work correctly
|
|
@@ -36,12 +36,12 @@ export interface ThumbnailProps {
|
|
|
36
36
|
export interface PlaceholderProps {
|
|
37
37
|
isPlaceholder: boolean;
|
|
38
38
|
}
|
|
39
|
-
export declare const
|
|
40
|
-
export declare const
|
|
41
|
-
export declare const
|
|
42
|
-
export declare const
|
|
43
|
-
export declare const
|
|
44
|
-
export declare const
|
|
45
|
-
export declare const
|
|
39
|
+
export declare const LinkWrapperOldVisualRefresh: import("react").ComponentType<WrapperProps & import("react").ClassAttributes<HTMLDivElement> & import("react").HTMLAttributes<HTMLDivElement> & import("@compiled/react").StyledProps>;
|
|
40
|
+
export declare const WrapperOldVisualRefresh: import("react").ComponentType<WrapperProps & import("react").ClassAttributes<HTMLDivElement> & import("react").HTMLAttributes<HTMLDivElement> & import("@compiled/react").StyledProps>;
|
|
41
|
+
export declare const HeaderOldVisualRefresh: import("react").ComponentType<HeaderProps & import("react").ClassAttributes<HTMLDivElement> & import("react").HTMLAttributes<HTMLDivElement> & import("@compiled/react").StyledProps>;
|
|
42
|
+
export declare const IconWrapperOldVisualRefresh: import("react").ComponentType<PlaceholderProps & import("react").ClassAttributes<HTMLDivElement> & import("react").HTMLAttributes<HTMLDivElement> & import("@compiled/react").StyledProps>;
|
|
43
|
+
export declare const TextWrapperOldVisualRefresh: import("react").ComponentType<PlaceholderProps & import("react").ClassAttributes<HTMLDivElement> & import("react").HTMLAttributes<HTMLDivElement> & import("@compiled/react").StyledProps>;
|
|
44
|
+
export declare const TooltipWrapperOldVisualRefresh: import("react").ComponentType<import("react").ClassAttributes<HTMLDivElement> & import("react").HTMLAttributes<HTMLDivElement> & import("@compiled/react").StyledProps>;
|
|
45
|
+
export declare const ContentOldVisualRefresh: import("react").ComponentType<ContentProps & import("react").ClassAttributes<HTMLDivElement> & import("react").HTMLAttributes<HTMLDivElement> & import("@compiled/react").StyledProps>;
|
|
46
46
|
export declare const Image: import("react").ComponentType<ImageProps & import("react").ClassAttributes<HTMLImageElement> & import("react").ImgHTMLAttributes<HTMLImageElement> & import("@compiled/react").StyledProps>;
|
|
47
47
|
export declare const Thumbnail: import("react").ComponentType<ThumbnailProps & import("react").ClassAttributes<HTMLDivElement> & import("react").HTMLAttributes<HTMLDivElement> & import("@compiled/react").StyledProps>;
|
|
@@ -2,6 +2,7 @@ import React, { type ComponentPropsWithRef } from 'react';
|
|
|
2
2
|
import { Box } from '@atlaskit/primitives';
|
|
3
3
|
type ActionButtonProps = ComponentPropsWithRef<typeof Box> & {
|
|
4
4
|
disabled?: boolean;
|
|
5
|
+
[`data-testid`]?: string;
|
|
5
6
|
};
|
|
6
7
|
/**
|
|
7
8
|
* Action button has to be a span for the overflow to work correctly
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@atlaskit/smart-card",
|
|
3
|
-
"version": "34.10.
|
|
3
|
+
"version": "34.10.4",
|
|
4
4
|
"description": "Smart card component",
|
|
5
5
|
"publishConfig": {
|
|
6
6
|
"registry": "https://registry.npmjs.org/"
|
|
@@ -39,9 +39,9 @@
|
|
|
39
39
|
"@atlaskit/form": "^11.1.0",
|
|
40
40
|
"@atlaskit/frontend-utilities": "^2.9.0",
|
|
41
41
|
"@atlaskit/heading": "^4.1.0",
|
|
42
|
-
"@atlaskit/icon": "^23.
|
|
42
|
+
"@atlaskit/icon": "^23.7.0",
|
|
43
43
|
"@atlaskit/icon-file-type": "^6.9.0",
|
|
44
|
-
"@atlaskit/icon-lab": "^2.
|
|
44
|
+
"@atlaskit/icon-lab": "^2.4.0",
|
|
45
45
|
"@atlaskit/icon-object": "^6.10.0",
|
|
46
46
|
"@atlaskit/icon-priority": "^6.3.0",
|
|
47
47
|
"@atlaskit/legacy-custom-icons": "^0.21.0",
|
|
@@ -49,7 +49,7 @@
|
|
|
49
49
|
"@atlaskit/link-analytics": "^8.7.0",
|
|
50
50
|
"@atlaskit/link-client-extension": "^3.1.0",
|
|
51
51
|
"@atlaskit/link-extractors": "^1.10.0",
|
|
52
|
-
"@atlaskit/linking-common": "^6.
|
|
52
|
+
"@atlaskit/linking-common": "^6.3.0",
|
|
53
53
|
"@atlaskit/linking-types": "^9.6.0",
|
|
54
54
|
"@atlaskit/logo": "^15.2.0",
|
|
55
55
|
"@atlaskit/lozenge": "^11.13.0",
|