@atlaskit/media-card 77.10.5 → 77.10.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 +6 -0
- package/dist/cjs/card/card.js +1 -1
- package/dist/cjs/card/media-card-analytics-error-boundary.js +1 -1
- package/dist/cjs/card/ui/iconMessage/iconMessageWrapper.js +35 -6
- package/dist/cjs/card/ui/tickBox/styles.js +2 -16
- package/dist/cjs/card/ui/tickBox/tickBoxWrapper.js +25 -1
- package/dist/cjs/card/v2/cardV2.js +1 -1
- package/dist/cjs/inline/loader.js +1 -1
- package/dist/cjs/utils/ufoExperiences.js +1 -1
- package/dist/es2019/card/card.js +1 -1
- package/dist/es2019/card/media-card-analytics-error-boundary.js +1 -1
- package/dist/es2019/card/ui/iconMessage/iconMessageWrapper.js +36 -6
- package/dist/es2019/card/ui/tickBox/styles.js +2 -28
- package/dist/es2019/card/ui/tickBox/tickBoxWrapper.js +23 -1
- package/dist/es2019/card/v2/cardV2.js +1 -1
- package/dist/es2019/inline/loader.js +1 -1
- package/dist/es2019/utils/ufoExperiences.js +1 -1
- package/dist/esm/card/card.js +1 -1
- package/dist/esm/card/media-card-analytics-error-boundary.js +1 -1
- package/dist/esm/card/ui/iconMessage/iconMessageWrapper.js +36 -6
- package/dist/esm/card/ui/tickBox/styles.js +2 -15
- package/dist/esm/card/ui/tickBox/tickBoxWrapper.js +26 -1
- package/dist/esm/card/v2/cardV2.js +1 -1
- package/dist/esm/inline/loader.js +1 -1
- package/dist/esm/utils/ufoExperiences.js +1 -1
- package/dist/types/card/ui/tickBox/styles.d.ts +0 -5
- package/dist/types-ts4.5/card/ui/tickBox/styles.d.ts +0 -5
- package/package.json +3 -2
- package/dist/cjs/card/ui/iconMessage/styles.js +0 -22
- package/dist/es2019/card/ui/iconMessage/styles.js +0 -30
- package/dist/esm/card/ui/iconMessage/styles.js +0 -15
- package/dist/types/card/ui/iconMessage/styles.d.ts +0 -5
- package/dist/types-ts4.5/card/ui/iconMessage/styles.d.ts +0 -5
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,11 @@
|
|
|
1
1
|
# @atlaskit/media-card
|
|
2
2
|
|
|
3
|
+
## 77.10.6
|
|
4
|
+
|
|
5
|
+
### Patch Changes
|
|
6
|
+
|
|
7
|
+
- [#79344](https://stash.atlassian.com/projects/CONFCLOUD/repos/confluence-frontend/pull-requests/79344) [`b6bc418abde3`](https://stash.atlassian.com/projects/CONFCLOUD/repos/confluence-frontend/commits/b6bc418abde3) - CXP-3050 Enforced design tokens and primitives on media-card
|
|
8
|
+
|
|
3
9
|
## 77.10.5
|
|
4
10
|
|
|
5
11
|
### Patch Changes
|
package/dist/cjs/card/card.js
CHANGED
|
@@ -50,7 +50,7 @@ function _objectSpread(e) { for (var r = 1; r < arguments.length; r++) { var t =
|
|
|
50
50
|
function _createSuper(Derived) { var hasNativeReflectConstruct = _isNativeReflectConstruct(); return function _createSuperInternal() { var Super = (0, _getPrototypeOf2.default)(Derived), result; if (hasNativeReflectConstruct) { var NewTarget = (0, _getPrototypeOf2.default)(this).constructor; result = Reflect.construct(Super, arguments, NewTarget); } else { result = Super.apply(this, arguments); } return (0, _possibleConstructorReturn2.default)(this, result); }; }
|
|
51
51
|
function _isNativeReflectConstruct() { if (typeof Reflect === "undefined" || !Reflect.construct) return false; if (Reflect.construct.sham) return false; if (typeof Proxy === "function") return true; try { Boolean.prototype.valueOf.call(Reflect.construct(Boolean, [], function () {})); return true; } catch (e) { return false; } }
|
|
52
52
|
var packageName = "@atlaskit/media-card";
|
|
53
|
-
var packageVersion = "77.10.
|
|
53
|
+
var packageVersion = "77.10.6";
|
|
54
54
|
var CardBase = exports.CardBase = /*#__PURE__*/function (_Component) {
|
|
55
55
|
(0, _inherits2.default)(CardBase, _Component);
|
|
56
56
|
var _super = _createSuper(CardBase);
|
|
@@ -90,7 +90,7 @@ var WrappedMediaCardAnalyticsErrorBoundary = /*#__PURE__*/function (_React$Compo
|
|
|
90
90
|
}(_react.default.Component);
|
|
91
91
|
(0, _defineProperty2.default)(WrappedMediaCardAnalyticsErrorBoundary, "displayName", 'MediaCardAnalyticsErrorBoundary');
|
|
92
92
|
var packageName = "@atlaskit/media-card";
|
|
93
|
-
var packageVersion = "77.10.
|
|
93
|
+
var packageVersion = "77.10.6";
|
|
94
94
|
var MediaCardAnalyticsErrorBoundary = (0, _mediaCommon.withMediaAnalyticsContext)({
|
|
95
95
|
packageVersion: packageVersion,
|
|
96
96
|
packageName: packageName,
|
|
@@ -5,17 +5,46 @@ Object.defineProperty(exports, "__esModule", {
|
|
|
5
5
|
});
|
|
6
6
|
exports.IconMessageWrapper = void 0;
|
|
7
7
|
var _react = require("@emotion/react");
|
|
8
|
-
var
|
|
8
|
+
var _primitives = require("@atlaskit/primitives");
|
|
9
9
|
/**@jsx jsx */
|
|
10
10
|
|
|
11
|
+
var breatheAnimation = (0, _react.keyframes)({
|
|
12
|
+
'0%': {
|
|
13
|
+
opacity: 1
|
|
14
|
+
},
|
|
15
|
+
'50%': {
|
|
16
|
+
opacity: 0.3
|
|
17
|
+
},
|
|
18
|
+
'100%': {
|
|
19
|
+
opacity: 1
|
|
20
|
+
}
|
|
21
|
+
});
|
|
22
|
+
var animatedStyles = (0, _primitives.xcss)({
|
|
23
|
+
animationName: breatheAnimation,
|
|
24
|
+
animationDuration: '3.5s',
|
|
25
|
+
animationTimingFunction: 'ease-in-out',
|
|
26
|
+
animationIterationCount: 'infinite'
|
|
27
|
+
});
|
|
28
|
+
var reducedFontStyle = (0, _primitives.xcss)({
|
|
29
|
+
fontSize: '0.7em'
|
|
30
|
+
});
|
|
31
|
+
var baseStyles = (0, _primitives.xcss)({
|
|
32
|
+
overflow: 'hidden',
|
|
33
|
+
opacity: 1,
|
|
34
|
+
fontWeight: 450,
|
|
35
|
+
color: 'color.text.subtlest',
|
|
36
|
+
textAlign: 'center',
|
|
37
|
+
// eslint-disable-next-line @atlaskit/design-system/ensure-design-token-usage
|
|
38
|
+
marginBottom: '-1em',
|
|
39
|
+
// Needs pixel precision to align the icon at the center of the box
|
|
40
|
+
paddingBlock: 'space.050',
|
|
41
|
+
paddingInline: 'space.100'
|
|
42
|
+
});
|
|
11
43
|
var IconMessageWrapper = exports.IconMessageWrapper = function IconMessageWrapper(props) {
|
|
12
44
|
var animated = props.animated,
|
|
13
45
|
reducedFont = props.reducedFont;
|
|
14
|
-
return (0, _react.jsx)(
|
|
46
|
+
return (0, _react.jsx)(_primitives.Box, {
|
|
15
47
|
id: "iconMessageWrapper",
|
|
16
|
-
|
|
17
|
-
animated: animated,
|
|
18
|
-
reducedFont: reducedFont
|
|
19
|
-
})
|
|
48
|
+
xcss: [baseStyles, reducedFont && reducedFontStyle, animated && animatedStyles]
|
|
20
49
|
}, props.children);
|
|
21
50
|
};
|
|
@@ -1,23 +1,9 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
|
|
3
|
-
var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefault");
|
|
4
3
|
Object.defineProperty(exports, "__esModule", {
|
|
5
4
|
value: true
|
|
6
5
|
});
|
|
7
|
-
exports.
|
|
8
|
-
var _taggedTemplateLiteral2 = _interopRequireDefault(require("@babel/runtime/helpers/taggedTemplateLiteral"));
|
|
9
|
-
var _react = require("@emotion/react");
|
|
10
|
-
var _styles = require("../styles");
|
|
6
|
+
exports.tickboxFixedStyles = exports.tickBoxClassName = void 0;
|
|
11
7
|
var _colors = require("@atlaskit/theme/colors");
|
|
12
|
-
var _templateObject;
|
|
13
8
|
var tickBoxClassName = exports.tickBoxClassName = 'media-card-tickbox';
|
|
14
|
-
var tickboxFixedStyles = exports.tickboxFixedStyles = "\n background-color: ".concat("var(--ds-background-input, ".concat(_colors.N0, ")"), ";\n color: ", "var(--ds-icon-subtle, ".concat(_colors.N100, ")"), ";\n");
|
|
15
|
-
var getSelectedStyles = exports.getSelectedStyles = function getSelectedStyles(selected) {
|
|
16
|
-
return selected ? "background-color: ".concat("var(--ds-icon-information, ".concat(_colors.B200, ")"), ";\n color: ", "var(--ds-icon-inverse, white)", ";") : "";
|
|
17
|
-
};
|
|
18
|
-
|
|
19
|
-
// eslint-disable-next-line @atlaskit/design-system/ensure-design-token-usage
|
|
20
|
-
var wrapperStyles = exports.wrapperStyles = function wrapperStyles(selected) {
|
|
21
|
-
return (0, _react.css)(_templateObject || (_templateObject = (0, _taggedTemplateLiteral2.default)(["\n ", "\n font-size: 14px;\n width: 14px;\n height: 14px;\n position: absolute;\n top: 7px;\n left: 7px;\n border-radius: 20px;\n color: transparent;\n /* Enforce dimensions and position of \"tick\" icon */\n span {\n display: block;\n svg {\n height: 14px;\n }\n }\n ", "\n"])), _styles.transition && (0, _styles.transition)(), getSelectedStyles(selected));
|
|
22
|
-
};
|
|
23
|
-
wrapperStyles.displayName = 'TickBoxWrapper';
|
|
9
|
+
var tickboxFixedStyles = exports.tickboxFixedStyles = "\n background-color: ".concat("var(--ds-background-input, ".concat(_colors.N0, ")"), ";\n color: ", "var(--ds-icon-subtle, ".concat(_colors.N100, ")"), ";\n");
|
|
@@ -6,12 +6,36 @@ Object.defineProperty(exports, "__esModule", {
|
|
|
6
6
|
exports.TickBoxWrapper = void 0;
|
|
7
7
|
var _react = require("@emotion/react");
|
|
8
8
|
var _styles = require("./styles");
|
|
9
|
+
var _styles2 = require("../styles");
|
|
10
|
+
var _colors = require("@atlaskit/theme/colors");
|
|
9
11
|
/**@jsx jsx */
|
|
10
12
|
|
|
13
|
+
var getSelectedStyles = function getSelectedStyles(selected) {
|
|
14
|
+
return selected ? "background-color: ".concat("var(--ds-icon-information, ".concat(_colors.B200, ")"), ";\n color: ", "var(--ds-icon-inverse, white)", ";") : "";
|
|
15
|
+
};
|
|
16
|
+
var wrapperStyles = function wrapperStyles(selected) {
|
|
17
|
+
return (0, _react.css)(_styles2.transition && (0, _styles2.transition)(), {
|
|
18
|
+
fontSize: '14px',
|
|
19
|
+
width: '14px',
|
|
20
|
+
height: '14px',
|
|
21
|
+
position: 'absolute',
|
|
22
|
+
top: "var(--ds-space-075, 7px)",
|
|
23
|
+
left: "var(--ds-space-075, 7px)",
|
|
24
|
+
borderRadius: '20px',
|
|
25
|
+
color: 'transparent',
|
|
26
|
+
span: {
|
|
27
|
+
display: 'block',
|
|
28
|
+
svg: {
|
|
29
|
+
height: '14px'
|
|
30
|
+
}
|
|
31
|
+
}
|
|
32
|
+
}, getSelectedStyles(selected));
|
|
33
|
+
};
|
|
34
|
+
wrapperStyles.displayName = 'TickBoxWrapper';
|
|
11
35
|
var TickBoxWrapper = exports.TickBoxWrapper = function TickBoxWrapper(props) {
|
|
12
36
|
return (0, _react.jsx)("div", {
|
|
13
37
|
id: "tickBoxWrapper",
|
|
14
|
-
css:
|
|
38
|
+
css: wrapperStyles(props.selected),
|
|
15
39
|
className: _styles.tickBoxClassName
|
|
16
40
|
}, props.children);
|
|
17
41
|
};
|
|
@@ -16,7 +16,7 @@ var _externalImageCard = require("./externalImageCard");
|
|
|
16
16
|
var _fileCard = require("./fileCard");
|
|
17
17
|
var _excluded = ["identifier"];
|
|
18
18
|
var packageName = "@atlaskit/media-card";
|
|
19
|
-
var packageVersion = "77.10.
|
|
19
|
+
var packageVersion = "77.10.6";
|
|
20
20
|
var CardV2Base = exports.CardV2Base = function CardV2Base(_ref) {
|
|
21
21
|
var identifier = _ref.identifier,
|
|
22
22
|
otherProps = (0, _objectWithoutProperties2.default)(_ref, _excluded);
|
|
@@ -119,7 +119,7 @@ var MediaInlineCardLoader = exports.default = /*#__PURE__*/function (_React$Pure
|
|
|
119
119
|
ErrorBoundary = _this$state.ErrorBoundary;
|
|
120
120
|
var analyticsContext = {
|
|
121
121
|
packageVersion: "@atlaskit/media-card",
|
|
122
|
-
packageName: "77.10.
|
|
122
|
+
packageName: "77.10.6",
|
|
123
123
|
componentName: 'mediaInlineCard',
|
|
124
124
|
component: 'mediaInlineCard'
|
|
125
125
|
};
|
|
@@ -14,7 +14,7 @@ var _mediaClient = require("@atlaskit/media-client");
|
|
|
14
14
|
function ownKeys(e, r) { var t = Object.keys(e); if (Object.getOwnPropertySymbols) { var o = Object.getOwnPropertySymbols(e); r && (o = o.filter(function (r) { return Object.getOwnPropertyDescriptor(e, r).enumerable; })), t.push.apply(t, o); } return t; }
|
|
15
15
|
function _objectSpread(e) { for (var r = 1; r < arguments.length; r++) { var t = null != arguments[r] ? arguments[r] : {}; r % 2 ? ownKeys(Object(t), !0).forEach(function (r) { (0, _defineProperty2.default)(e, r, t[r]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e, Object.getOwnPropertyDescriptors(t)) : ownKeys(Object(t)).forEach(function (r) { Object.defineProperty(e, r, Object.getOwnPropertyDescriptor(t, r)); }); } return e; }
|
|
16
16
|
var packageName = "@atlaskit/media-card";
|
|
17
|
-
var packageVersion = "77.10.
|
|
17
|
+
var packageVersion = "77.10.6";
|
|
18
18
|
var concurrentExperience;
|
|
19
19
|
var getExperience = function getExperience(id) {
|
|
20
20
|
if (!concurrentExperience) {
|
package/dist/es2019/card/card.js
CHANGED
|
@@ -28,7 +28,7 @@ import { completeUfoExperience, startUfoExperience, abortUfoExperience } from '.
|
|
|
28
28
|
import { generateUniqueId } from '../utils/generateUniqueId';
|
|
29
29
|
import { DateOverrideContext } from '../dateOverrideContext';
|
|
30
30
|
const packageName = "@atlaskit/media-card";
|
|
31
|
-
const packageVersion = "77.10.
|
|
31
|
+
const packageVersion = "77.10.6";
|
|
32
32
|
export class CardBase extends Component {
|
|
33
33
|
constructor(props) {
|
|
34
34
|
super(props);
|
|
@@ -66,7 +66,7 @@ class WrappedMediaCardAnalyticsErrorBoundary extends React.Component {
|
|
|
66
66
|
}
|
|
67
67
|
_defineProperty(WrappedMediaCardAnalyticsErrorBoundary, "displayName", 'MediaCardAnalyticsErrorBoundary');
|
|
68
68
|
const packageName = "@atlaskit/media-card";
|
|
69
|
-
const packageVersion = "77.10.
|
|
69
|
+
const packageVersion = "77.10.6";
|
|
70
70
|
const MediaCardAnalyticsErrorBoundary = withMediaAnalyticsContext({
|
|
71
71
|
packageVersion,
|
|
72
72
|
packageName,
|
|
@@ -1,16 +1,46 @@
|
|
|
1
1
|
/**@jsx jsx */
|
|
2
2
|
import { jsx } from '@emotion/react';
|
|
3
|
-
import {
|
|
3
|
+
import { keyframes } from '@emotion/react';
|
|
4
|
+
import { Box, xcss } from '@atlaskit/primitives';
|
|
5
|
+
const breatheAnimation = keyframes({
|
|
6
|
+
'0%': {
|
|
7
|
+
opacity: 1
|
|
8
|
+
},
|
|
9
|
+
'50%': {
|
|
10
|
+
opacity: 0.3
|
|
11
|
+
},
|
|
12
|
+
'100%': {
|
|
13
|
+
opacity: 1
|
|
14
|
+
}
|
|
15
|
+
});
|
|
16
|
+
const animatedStyles = xcss({
|
|
17
|
+
animationName: breatheAnimation,
|
|
18
|
+
animationDuration: '3.5s',
|
|
19
|
+
animationTimingFunction: 'ease-in-out',
|
|
20
|
+
animationIterationCount: 'infinite'
|
|
21
|
+
});
|
|
22
|
+
const reducedFontStyle = xcss({
|
|
23
|
+
fontSize: '0.7em'
|
|
24
|
+
});
|
|
25
|
+
const baseStyles = xcss({
|
|
26
|
+
overflow: 'hidden',
|
|
27
|
+
opacity: 1,
|
|
28
|
+
fontWeight: 450,
|
|
29
|
+
color: 'color.text.subtlest',
|
|
30
|
+
textAlign: 'center',
|
|
31
|
+
// eslint-disable-next-line @atlaskit/design-system/ensure-design-token-usage
|
|
32
|
+
marginBottom: '-1em',
|
|
33
|
+
// Needs pixel precision to align the icon at the center of the box
|
|
34
|
+
paddingBlock: 'space.050',
|
|
35
|
+
paddingInline: 'space.100'
|
|
36
|
+
});
|
|
4
37
|
export const IconMessageWrapper = props => {
|
|
5
38
|
const {
|
|
6
39
|
animated,
|
|
7
40
|
reducedFont
|
|
8
41
|
} = props;
|
|
9
|
-
return jsx(
|
|
42
|
+
return jsx(Box, {
|
|
10
43
|
id: "iconMessageWrapper",
|
|
11
|
-
|
|
12
|
-
animated: animated,
|
|
13
|
-
reducedFont: reducedFont
|
|
14
|
-
})
|
|
44
|
+
xcss: [baseStyles, reducedFont && reducedFontStyle, animated && animatedStyles]
|
|
15
45
|
}, props.children);
|
|
16
46
|
};
|
|
@@ -1,32 +1,6 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import { transition } from '../styles';
|
|
3
|
-
import { B200, N0, N100 } from '@atlaskit/theme/colors';
|
|
1
|
+
import { N0, N100 } from '@atlaskit/theme/colors';
|
|
4
2
|
export const tickBoxClassName = 'media-card-tickbox';
|
|
5
3
|
export const tickboxFixedStyles = `
|
|
6
4
|
background-color: ${`var(--ds-background-input, ${N0})`};
|
|
7
5
|
color: ${`var(--ds-icon-subtle, ${N100})`};
|
|
8
|
-
`;
|
|
9
|
-
export const getSelectedStyles = selected => selected ? `background-color: ${`var(--ds-icon-information, ${B200})`};
|
|
10
|
-
color: ${"var(--ds-icon-inverse, white)"};` : ``;
|
|
11
|
-
|
|
12
|
-
// eslint-disable-next-line @atlaskit/design-system/ensure-design-token-usage
|
|
13
|
-
export const wrapperStyles = selected => css`
|
|
14
|
-
${transition && transition()}
|
|
15
|
-
font-size: 14px;
|
|
16
|
-
width: 14px;
|
|
17
|
-
height: 14px;
|
|
18
|
-
position: absolute;
|
|
19
|
-
top: 7px;
|
|
20
|
-
left: 7px;
|
|
21
|
-
border-radius: 20px;
|
|
22
|
-
color: transparent;
|
|
23
|
-
/* Enforce dimensions and position of "tick" icon */
|
|
24
|
-
span {
|
|
25
|
-
display: block;
|
|
26
|
-
svg {
|
|
27
|
-
height: 14px;
|
|
28
|
-
}
|
|
29
|
-
}
|
|
30
|
-
${getSelectedStyles(selected)}
|
|
31
|
-
`;
|
|
32
|
-
wrapperStyles.displayName = 'TickBoxWrapper';
|
|
6
|
+
`;
|
|
@@ -1,6 +1,28 @@
|
|
|
1
1
|
/**@jsx jsx */
|
|
2
2
|
import { jsx } from '@emotion/react';
|
|
3
|
-
import {
|
|
3
|
+
import { tickBoxClassName } from './styles';
|
|
4
|
+
import { css } from '@emotion/react';
|
|
5
|
+
import { transition } from '../styles';
|
|
6
|
+
import { B200 } from '@atlaskit/theme/colors';
|
|
7
|
+
const getSelectedStyles = selected => selected ? `background-color: ${`var(--ds-icon-information, ${B200})`};
|
|
8
|
+
color: ${"var(--ds-icon-inverse, white)"};` : ``;
|
|
9
|
+
const wrapperStyles = selected => css(transition && transition(), {
|
|
10
|
+
fontSize: '14px',
|
|
11
|
+
width: '14px',
|
|
12
|
+
height: '14px',
|
|
13
|
+
position: 'absolute',
|
|
14
|
+
top: "var(--ds-space-075, 7px)",
|
|
15
|
+
left: "var(--ds-space-075, 7px)",
|
|
16
|
+
borderRadius: '20px',
|
|
17
|
+
color: 'transparent',
|
|
18
|
+
span: {
|
|
19
|
+
display: 'block',
|
|
20
|
+
svg: {
|
|
21
|
+
height: '14px'
|
|
22
|
+
}
|
|
23
|
+
}
|
|
24
|
+
}, getSelectedStyles(selected));
|
|
25
|
+
wrapperStyles.displayName = 'TickBoxWrapper';
|
|
4
26
|
export const TickBoxWrapper = props => {
|
|
5
27
|
return jsx("div", {
|
|
6
28
|
id: "tickBoxWrapper",
|
|
@@ -7,7 +7,7 @@ import { IntlProvider, injectIntl } from 'react-intl-next';
|
|
|
7
7
|
import { ExternalImageCard } from './externalImageCard';
|
|
8
8
|
import { FileCard } from './fileCard';
|
|
9
9
|
const packageName = "@atlaskit/media-card";
|
|
10
|
-
const packageVersion = "77.10.
|
|
10
|
+
const packageVersion = "77.10.6";
|
|
11
11
|
export const CardV2Base = ({
|
|
12
12
|
identifier,
|
|
13
13
|
...otherProps
|
|
@@ -37,7 +37,7 @@ export default class MediaInlineCardLoader extends React.PureComponent {
|
|
|
37
37
|
} = this.state;
|
|
38
38
|
const analyticsContext = {
|
|
39
39
|
packageVersion: "@atlaskit/media-card",
|
|
40
|
-
packageName: "77.10.
|
|
40
|
+
packageName: "77.10.6",
|
|
41
41
|
componentName: 'mediaInlineCard',
|
|
42
42
|
component: 'mediaInlineCard'
|
|
43
43
|
};
|
|
@@ -4,7 +4,7 @@ import { extractErrorInfo, getRenderErrorRequestMetadata } from './analytics';
|
|
|
4
4
|
import { MediaCardError } from '../errors';
|
|
5
5
|
import { getMediaEnvironment, getMediaRegion } from '@atlaskit/media-client';
|
|
6
6
|
const packageName = "@atlaskit/media-card";
|
|
7
|
-
const packageVersion = "77.10.
|
|
7
|
+
const packageVersion = "77.10.6";
|
|
8
8
|
let concurrentExperience;
|
|
9
9
|
const getExperience = id => {
|
|
10
10
|
if (!concurrentExperience) {
|
package/dist/esm/card/card.js
CHANGED
|
@@ -41,7 +41,7 @@ import { completeUfoExperience, startUfoExperience, abortUfoExperience } from '.
|
|
|
41
41
|
import { generateUniqueId } from '../utils/generateUniqueId';
|
|
42
42
|
import { DateOverrideContext } from '../dateOverrideContext';
|
|
43
43
|
var packageName = "@atlaskit/media-card";
|
|
44
|
-
var packageVersion = "77.10.
|
|
44
|
+
var packageVersion = "77.10.6";
|
|
45
45
|
export var CardBase = /*#__PURE__*/function (_Component) {
|
|
46
46
|
_inherits(CardBase, _Component);
|
|
47
47
|
var _super = _createSuper(CardBase);
|
|
@@ -83,7 +83,7 @@ var WrappedMediaCardAnalyticsErrorBoundary = /*#__PURE__*/function (_React$Compo
|
|
|
83
83
|
}(React.Component);
|
|
84
84
|
_defineProperty(WrappedMediaCardAnalyticsErrorBoundary, "displayName", 'MediaCardAnalyticsErrorBoundary');
|
|
85
85
|
var packageName = "@atlaskit/media-card";
|
|
86
|
-
var packageVersion = "77.10.
|
|
86
|
+
var packageVersion = "77.10.6";
|
|
87
87
|
var MediaCardAnalyticsErrorBoundary = withMediaAnalyticsContext({
|
|
88
88
|
packageVersion: packageVersion,
|
|
89
89
|
packageName: packageName,
|
|
@@ -1,14 +1,44 @@
|
|
|
1
1
|
/**@jsx jsx */
|
|
2
2
|
import { jsx } from '@emotion/react';
|
|
3
|
-
import {
|
|
3
|
+
import { keyframes } from '@emotion/react';
|
|
4
|
+
import { Box, xcss } from '@atlaskit/primitives';
|
|
5
|
+
var breatheAnimation = keyframes({
|
|
6
|
+
'0%': {
|
|
7
|
+
opacity: 1
|
|
8
|
+
},
|
|
9
|
+
'50%': {
|
|
10
|
+
opacity: 0.3
|
|
11
|
+
},
|
|
12
|
+
'100%': {
|
|
13
|
+
opacity: 1
|
|
14
|
+
}
|
|
15
|
+
});
|
|
16
|
+
var animatedStyles = xcss({
|
|
17
|
+
animationName: breatheAnimation,
|
|
18
|
+
animationDuration: '3.5s',
|
|
19
|
+
animationTimingFunction: 'ease-in-out',
|
|
20
|
+
animationIterationCount: 'infinite'
|
|
21
|
+
});
|
|
22
|
+
var reducedFontStyle = xcss({
|
|
23
|
+
fontSize: '0.7em'
|
|
24
|
+
});
|
|
25
|
+
var baseStyles = xcss({
|
|
26
|
+
overflow: 'hidden',
|
|
27
|
+
opacity: 1,
|
|
28
|
+
fontWeight: 450,
|
|
29
|
+
color: 'color.text.subtlest',
|
|
30
|
+
textAlign: 'center',
|
|
31
|
+
// eslint-disable-next-line @atlaskit/design-system/ensure-design-token-usage
|
|
32
|
+
marginBottom: '-1em',
|
|
33
|
+
// Needs pixel precision to align the icon at the center of the box
|
|
34
|
+
paddingBlock: 'space.050',
|
|
35
|
+
paddingInline: 'space.100'
|
|
36
|
+
});
|
|
4
37
|
export var IconMessageWrapper = function IconMessageWrapper(props) {
|
|
5
38
|
var animated = props.animated,
|
|
6
39
|
reducedFont = props.reducedFont;
|
|
7
|
-
return jsx(
|
|
40
|
+
return jsx(Box, {
|
|
8
41
|
id: "iconMessageWrapper",
|
|
9
|
-
|
|
10
|
-
animated: animated,
|
|
11
|
-
reducedFont: reducedFont
|
|
12
|
-
})
|
|
42
|
+
xcss: [baseStyles, reducedFont && reducedFontStyle, animated && animatedStyles]
|
|
13
43
|
}, props.children);
|
|
14
44
|
};
|
|
@@ -1,16 +1,3 @@
|
|
|
1
|
-
import
|
|
2
|
-
var _templateObject;
|
|
3
|
-
import { css } from '@emotion/react';
|
|
4
|
-
import { transition } from '../styles';
|
|
5
|
-
import { B200, N0, N100 } from '@atlaskit/theme/colors';
|
|
1
|
+
import { N0, N100 } from '@atlaskit/theme/colors';
|
|
6
2
|
export var tickBoxClassName = 'media-card-tickbox';
|
|
7
|
-
export var tickboxFixedStyles = "\n background-color: ".concat("var(--ds-background-input, ".concat(N0, ")"), ";\n color: ", "var(--ds-icon-subtle, ".concat(N100, ")"), ";\n");
|
|
8
|
-
export var getSelectedStyles = function getSelectedStyles(selected) {
|
|
9
|
-
return selected ? "background-color: ".concat("var(--ds-icon-information, ".concat(B200, ")"), ";\n color: ", "var(--ds-icon-inverse, white)", ";") : "";
|
|
10
|
-
};
|
|
11
|
-
|
|
12
|
-
// eslint-disable-next-line @atlaskit/design-system/ensure-design-token-usage
|
|
13
|
-
export var wrapperStyles = function wrapperStyles(selected) {
|
|
14
|
-
return css(_templateObject || (_templateObject = _taggedTemplateLiteral(["\n ", "\n font-size: 14px;\n width: 14px;\n height: 14px;\n position: absolute;\n top: 7px;\n left: 7px;\n border-radius: 20px;\n color: transparent;\n /* Enforce dimensions and position of \"tick\" icon */\n span {\n display: block;\n svg {\n height: 14px;\n }\n }\n ", "\n"])), transition && transition(), getSelectedStyles(selected));
|
|
15
|
-
};
|
|
16
|
-
wrapperStyles.displayName = 'TickBoxWrapper';
|
|
3
|
+
export var tickboxFixedStyles = "\n background-color: ".concat("var(--ds-background-input, ".concat(N0, ")"), ";\n color: ", "var(--ds-icon-subtle, ".concat(N100, ")"), ";\n");
|
|
@@ -1,6 +1,31 @@
|
|
|
1
1
|
/**@jsx jsx */
|
|
2
2
|
import { jsx } from '@emotion/react';
|
|
3
|
-
import {
|
|
3
|
+
import { tickBoxClassName } from './styles';
|
|
4
|
+
import { css } from '@emotion/react';
|
|
5
|
+
import { transition } from '../styles';
|
|
6
|
+
import { B200 } from '@atlaskit/theme/colors';
|
|
7
|
+
var getSelectedStyles = function getSelectedStyles(selected) {
|
|
8
|
+
return selected ? "background-color: ".concat("var(--ds-icon-information, ".concat(B200, ")"), ";\n color: ", "var(--ds-icon-inverse, white)", ";") : "";
|
|
9
|
+
};
|
|
10
|
+
var wrapperStyles = function wrapperStyles(selected) {
|
|
11
|
+
return css(transition && transition(), {
|
|
12
|
+
fontSize: '14px',
|
|
13
|
+
width: '14px',
|
|
14
|
+
height: '14px',
|
|
15
|
+
position: 'absolute',
|
|
16
|
+
top: "var(--ds-space-075, 7px)",
|
|
17
|
+
left: "var(--ds-space-075, 7px)",
|
|
18
|
+
borderRadius: '20px',
|
|
19
|
+
color: 'transparent',
|
|
20
|
+
span: {
|
|
21
|
+
display: 'block',
|
|
22
|
+
svg: {
|
|
23
|
+
height: '14px'
|
|
24
|
+
}
|
|
25
|
+
}
|
|
26
|
+
}, getSelectedStyles(selected));
|
|
27
|
+
};
|
|
28
|
+
wrapperStyles.displayName = 'TickBoxWrapper';
|
|
4
29
|
export var TickBoxWrapper = function TickBoxWrapper(props) {
|
|
5
30
|
return jsx("div", {
|
|
6
31
|
id: "tickBoxWrapper",
|
|
@@ -9,7 +9,7 @@ import { IntlProvider, injectIntl } from 'react-intl-next';
|
|
|
9
9
|
import { ExternalImageCard } from './externalImageCard';
|
|
10
10
|
import { FileCard } from './fileCard';
|
|
11
11
|
var packageName = "@atlaskit/media-card";
|
|
12
|
-
var packageVersion = "77.10.
|
|
12
|
+
var packageVersion = "77.10.6";
|
|
13
13
|
export var CardV2Base = function CardV2Base(_ref) {
|
|
14
14
|
var identifier = _ref.identifier,
|
|
15
15
|
otherProps = _objectWithoutProperties(_ref, _excluded);
|
|
@@ -103,7 +103,7 @@ var MediaInlineCardLoader = /*#__PURE__*/function (_React$PureComponent) {
|
|
|
103
103
|
ErrorBoundary = _this$state.ErrorBoundary;
|
|
104
104
|
var analyticsContext = {
|
|
105
105
|
packageVersion: "@atlaskit/media-card",
|
|
106
|
-
packageName: "77.10.
|
|
106
|
+
packageName: "77.10.6",
|
|
107
107
|
componentName: 'mediaInlineCard',
|
|
108
108
|
component: 'mediaInlineCard'
|
|
109
109
|
};
|
|
@@ -7,7 +7,7 @@ import { extractErrorInfo, getRenderErrorRequestMetadata } from './analytics';
|
|
|
7
7
|
import { MediaCardError } from '../errors';
|
|
8
8
|
import { getMediaEnvironment, getMediaRegion } from '@atlaskit/media-client';
|
|
9
9
|
var packageName = "@atlaskit/media-card";
|
|
10
|
-
var packageVersion = "77.10.
|
|
10
|
+
var packageVersion = "77.10.6";
|
|
11
11
|
var concurrentExperience;
|
|
12
12
|
var getExperience = function getExperience(id) {
|
|
13
13
|
if (!concurrentExperience) {
|
|
@@ -1,7 +1,2 @@
|
|
|
1
1
|
export declare const tickBoxClassName = "media-card-tickbox";
|
|
2
2
|
export declare const tickboxFixedStyles: string;
|
|
3
|
-
export declare const getSelectedStyles: (selected?: boolean) => string;
|
|
4
|
-
export declare const wrapperStyles: {
|
|
5
|
-
(selected?: boolean): import("@emotion/react").SerializedStyles;
|
|
6
|
-
displayName: string;
|
|
7
|
-
};
|
|
@@ -1,7 +1,2 @@
|
|
|
1
1
|
export declare const tickBoxClassName = "media-card-tickbox";
|
|
2
2
|
export declare const tickboxFixedStyles: string;
|
|
3
|
-
export declare const getSelectedStyles: (selected?: boolean) => string;
|
|
4
|
-
export declare const wrapperStyles: {
|
|
5
|
-
(selected?: boolean): import("@emotion/react").SerializedStyles;
|
|
6
|
-
displayName: string;
|
|
7
|
-
};
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@atlaskit/media-card",
|
|
3
|
-
"version": "77.10.
|
|
3
|
+
"version": "77.10.6",
|
|
4
4
|
"description": "Includes all media card related components, CardView, CardViewSmall, Card...",
|
|
5
5
|
"publishConfig": {
|
|
6
6
|
"registry": "https://registry.npmjs.org/"
|
|
@@ -47,6 +47,7 @@
|
|
|
47
47
|
"@atlaskit/media-ui": "^25.4.0",
|
|
48
48
|
"@atlaskit/media-viewer": "^48.3.0",
|
|
49
49
|
"@atlaskit/platform-feature-flags": "^0.2.2",
|
|
50
|
+
"@atlaskit/primitives": "^4.0.0",
|
|
50
51
|
"@atlaskit/spinner": "^16.0.0",
|
|
51
52
|
"@atlaskit/theme": "^12.6.0",
|
|
52
53
|
"@atlaskit/tokens": "^1.39.0",
|
|
@@ -114,4 +115,4 @@
|
|
|
114
115
|
}
|
|
115
116
|
},
|
|
116
117
|
"prettier": "@atlassian/atlassian-frontend-prettier-config-1.0.1"
|
|
117
|
-
}
|
|
118
|
+
}
|
|
@@ -1,22 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
|
|
3
|
-
var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefault");
|
|
4
|
-
Object.defineProperty(exports, "__esModule", {
|
|
5
|
-
value: true
|
|
6
|
-
});
|
|
7
|
-
exports.iconMessageWrapperStyles = void 0;
|
|
8
|
-
var _taggedTemplateLiteral2 = _interopRequireDefault(require("@babel/runtime/helpers/taggedTemplateLiteral"));
|
|
9
|
-
var _react = require("@emotion/react");
|
|
10
|
-
var _colors = require("@atlaskit/theme/colors");
|
|
11
|
-
var _templateObject, _templateObject2, _templateObject3, _templateObject4;
|
|
12
|
-
var breatheAnimation = (0, _react.keyframes)(_templateObject || (_templateObject = (0, _taggedTemplateLiteral2.default)(["\n 0% { opacity: 1}\n 50% { opacity: 0.3 }\n 100% { opacity: 1; }"])));
|
|
13
|
-
var animatedStyles = (0, _react.css)(_templateObject2 || (_templateObject2 = (0, _taggedTemplateLiteral2.default)(["\n animation-name: ", ";\n animation-duration: 3.5s;\n animation-timing-function: ease-in-out;\n animation-iteration-count: infinite;\n"])), breatheAnimation);
|
|
14
|
-
var getStylesBasedOnProps = function getStylesBasedOnProps(_ref) {
|
|
15
|
-
var animated = _ref.animated,
|
|
16
|
-
reducedFont = _ref.reducedFont;
|
|
17
|
-
return (0, _react.css)(_templateObject3 || (_templateObject3 = (0, _taggedTemplateLiteral2.default)(["\n overflow: hidden;\n opacity: 1;\n font-weight: 450;\n ", "\n color: ", ";\n text-align: center;\n ", "\n margin-bottom: -1em;\n padding: 3px 10px;\n"])), reducedFont ? 'font-size: 0.7em;' : '', "var(--ds-text-subtlest, ".concat(_colors.N300, ")"), animated ? animatedStyles : '');
|
|
18
|
-
};
|
|
19
|
-
var iconMessageWrapperStyles = exports.iconMessageWrapperStyles = function iconMessageWrapperStyles(props) {
|
|
20
|
-
return (0, _react.css)(_templateObject4 || (_templateObject4 = (0, _taggedTemplateLiteral2.default)(["\n ", "\n"])), getStylesBasedOnProps(props));
|
|
21
|
-
};
|
|
22
|
-
iconMessageWrapperStyles.displayName = 'IconMessageWrapper';
|
|
@@ -1,30 +0,0 @@
|
|
|
1
|
-
import { css, keyframes } from '@emotion/react';
|
|
2
|
-
import { N300 } from '@atlaskit/theme/colors';
|
|
3
|
-
const breatheAnimation = keyframes`
|
|
4
|
-
0% { opacity: 1}
|
|
5
|
-
50% { opacity: 0.3 }
|
|
6
|
-
100% { opacity: 1; }`;
|
|
7
|
-
const animatedStyles = css`
|
|
8
|
-
animation-name: ${breatheAnimation};
|
|
9
|
-
animation-duration: 3.5s;
|
|
10
|
-
animation-timing-function: ease-in-out;
|
|
11
|
-
animation-iteration-count: infinite;
|
|
12
|
-
`;
|
|
13
|
-
const getStylesBasedOnProps = ({
|
|
14
|
-
animated,
|
|
15
|
-
reducedFont
|
|
16
|
-
}) => css`
|
|
17
|
-
overflow: hidden;
|
|
18
|
-
opacity: 1;
|
|
19
|
-
font-weight: 450;
|
|
20
|
-
${reducedFont ? 'font-size: 0.7em;' : ''}
|
|
21
|
-
color: ${`var(--ds-text-subtlest, ${N300})`};
|
|
22
|
-
text-align: center;
|
|
23
|
-
${animated ? animatedStyles : ''}
|
|
24
|
-
margin-bottom: -1em;
|
|
25
|
-
padding: 3px 10px;
|
|
26
|
-
`;
|
|
27
|
-
export const iconMessageWrapperStyles = props => css`
|
|
28
|
-
${getStylesBasedOnProps(props)}
|
|
29
|
-
`;
|
|
30
|
-
iconMessageWrapperStyles.displayName = 'IconMessageWrapper';
|
|
@@ -1,15 +0,0 @@
|
|
|
1
|
-
import _taggedTemplateLiteral from "@babel/runtime/helpers/taggedTemplateLiteral";
|
|
2
|
-
var _templateObject, _templateObject2, _templateObject3, _templateObject4;
|
|
3
|
-
import { css, keyframes } from '@emotion/react';
|
|
4
|
-
import { N300 } from '@atlaskit/theme/colors';
|
|
5
|
-
var breatheAnimation = keyframes(_templateObject || (_templateObject = _taggedTemplateLiteral(["\n 0% { opacity: 1}\n 50% { opacity: 0.3 }\n 100% { opacity: 1; }"])));
|
|
6
|
-
var animatedStyles = css(_templateObject2 || (_templateObject2 = _taggedTemplateLiteral(["\n animation-name: ", ";\n animation-duration: 3.5s;\n animation-timing-function: ease-in-out;\n animation-iteration-count: infinite;\n"])), breatheAnimation);
|
|
7
|
-
var getStylesBasedOnProps = function getStylesBasedOnProps(_ref) {
|
|
8
|
-
var animated = _ref.animated,
|
|
9
|
-
reducedFont = _ref.reducedFont;
|
|
10
|
-
return css(_templateObject3 || (_templateObject3 = _taggedTemplateLiteral(["\n overflow: hidden;\n opacity: 1;\n font-weight: 450;\n ", "\n color: ", ";\n text-align: center;\n ", "\n margin-bottom: -1em;\n padding: 3px 10px;\n"])), reducedFont ? 'font-size: 0.7em;' : '', "var(--ds-text-subtlest, ".concat(N300, ")"), animated ? animatedStyles : '');
|
|
11
|
-
};
|
|
12
|
-
export var iconMessageWrapperStyles = function iconMessageWrapperStyles(props) {
|
|
13
|
-
return css(_templateObject4 || (_templateObject4 = _taggedTemplateLiteral(["\n ", "\n"])), getStylesBasedOnProps(props));
|
|
14
|
-
};
|
|
15
|
-
iconMessageWrapperStyles.displayName = 'IconMessageWrapper';
|