@atlaskit/smart-card 26.35.3 → 26.37.0
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 +12 -0
- package/dist/cjs/utils/analytics/analytics.js +1 -1
- package/dist/cjs/view/FlexibleCard/components/blocks/title-block/resolved/index.js +4 -2
- package/dist/cjs/view/FlexibleCard/components/container/index.js +2 -1
- package/dist/cjs/view/LinkUrl/index.js +1 -1
- package/dist/es2019/utils/analytics/analytics.js +1 -1
- package/dist/es2019/view/FlexibleCard/components/blocks/title-block/resolved/index.js +2 -1
- package/dist/es2019/view/FlexibleCard/components/container/index.js +3 -3
- package/dist/es2019/view/LinkUrl/index.js +1 -1
- package/dist/esm/utils/analytics/analytics.js +1 -1
- package/dist/esm/view/FlexibleCard/components/blocks/title-block/resolved/index.js +4 -2
- package/dist/esm/view/FlexibleCard/components/container/index.js +2 -1
- package/dist/esm/view/LinkUrl/index.js +1 -1
- package/dist/types/view/FlexibleCard/components/blocks/title-block/types.d.ts +4 -0
- package/dist/types-ts4.5/view/FlexibleCard/components/blocks/title-block/types.d.ts +4 -0
- package/package.json +1 -1
- package/report.api.md +1 -0
- package/tmp/api-report-tmp.d.ts +1 -0
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,17 @@
|
|
|
1
1
|
# @atlaskit/smart-card
|
|
2
2
|
|
|
3
|
+
## 26.37.0
|
|
4
|
+
|
|
5
|
+
### Minor Changes
|
|
6
|
+
|
|
7
|
+
- [#41792](https://bitbucket.org/atlassian/atlassian-frontend/pull-requests/41792) [`1ebd05a89e6`](https://bitbucket.org/atlassian/atlassian-frontend/commits/1ebd05a89e6) - [ux] Flexible Smart Links: Update elevation style
|
|
8
|
+
|
|
9
|
+
## 26.36.0
|
|
10
|
+
|
|
11
|
+
### Minor Changes
|
|
12
|
+
|
|
13
|
+
- [#41842](https://bitbucket.org/atlassian/atlassian-frontend/pull-requests/41842) [`228a14ec749`](https://bitbucket.org/atlassian/atlassian-frontend/commits/228a14ec749) - [ux] Add hideIcon param which allows us to hide the Link Icon in Title Block
|
|
14
|
+
|
|
3
15
|
## 26.35.3
|
|
4
16
|
|
|
5
17
|
### Patch Changes
|
|
@@ -22,7 +22,7 @@ var ANALYTICS_CHANNEL = exports.ANALYTICS_CHANNEL = 'media';
|
|
|
22
22
|
var context = exports.context = {
|
|
23
23
|
componentName: 'smart-cards',
|
|
24
24
|
packageName: "@atlaskit/smart-card",
|
|
25
|
-
packageVersion: "26.
|
|
25
|
+
packageVersion: "26.37.0"
|
|
26
26
|
};
|
|
27
27
|
var TrackQuickActionType = exports.TrackQuickActionType = /*#__PURE__*/function (TrackQuickActionType) {
|
|
28
28
|
TrackQuickActionType["StatusUpdate"] = "StatusUpdate";
|
|
@@ -16,7 +16,7 @@ var _elementGroup = _interopRequireDefault(require("../../element-group"));
|
|
|
16
16
|
var _constants = require("../../../../../../constants");
|
|
17
17
|
var _utils = require("../../utils");
|
|
18
18
|
var _templateObject;
|
|
19
|
-
var _excluded = ["actionGroup", "metadata", "position", "subtitle", "testId", "text", "title", "metadataPosition"];
|
|
19
|
+
var _excluded = ["actionGroup", "metadata", "position", "subtitle", "testId", "text", "title", "metadataPosition", "hideIcon"];
|
|
20
20
|
/**
|
|
21
21
|
* This renders a fully resolved TitleBlock.
|
|
22
22
|
* This should render when a Smart Link returns a valid response.
|
|
@@ -33,12 +33,14 @@ var TitleBlockResolvedView = function TitleBlockResolvedView(_ref) {
|
|
|
33
33
|
text = _ref.text,
|
|
34
34
|
title = _ref.title,
|
|
35
35
|
metadataPosition = _ref.metadataPosition,
|
|
36
|
+
_ref$hideIcon = _ref.hideIcon,
|
|
37
|
+
hideIcon = _ref$hideIcon === void 0 ? false : _ref$hideIcon,
|
|
36
38
|
blockProps = (0, _objectWithoutProperties2.default)(_ref, _excluded);
|
|
37
39
|
var metadataElements = (0, _utils.renderElementItems)(metadata);
|
|
38
40
|
var subtitleElements = (0, _utils.renderElementItems)(subtitle);
|
|
39
41
|
return /*#__PURE__*/_react.default.createElement(_block.default, (0, _extends2.default)({}, blockProps, {
|
|
40
42
|
testId: "".concat(testId, "-resolved-view")
|
|
41
|
-
}), /*#__PURE__*/_react.default.createElement(_elements.LinkIcon, {
|
|
43
|
+
}), !hideIcon && /*#__PURE__*/_react.default.createElement(_elements.LinkIcon, {
|
|
42
44
|
position: position
|
|
43
45
|
}), /*#__PURE__*/_react.default.createElement(_elementGroup.default, {
|
|
44
46
|
direction: _constants.SmartLinkDirection.Vertical,
|
|
@@ -16,11 +16,12 @@ var _flexibleUiContext = require("../../../../state/flexible-ui-context");
|
|
|
16
16
|
var _layeredLink = _interopRequireDefault(require("./layered-link"));
|
|
17
17
|
var _hoverCardControl = _interopRequireDefault(require("./hover-card-control"));
|
|
18
18
|
var _utils = require("../../../../state/flexible-ui-context/utils");
|
|
19
|
+
var _colors = require("@atlaskit/theme/colors");
|
|
19
20
|
var _templateObject, _templateObject2, _templateObject3, _templateObject4;
|
|
20
21
|
/** @jsx jsx */
|
|
21
22
|
function _getRequireWildcardCache(nodeInterop) { if (typeof WeakMap !== "function") return null; var cacheBabelInterop = new WeakMap(); var cacheNodeInterop = new WeakMap(); return (_getRequireWildcardCache = function _getRequireWildcardCache(nodeInterop) { return nodeInterop ? cacheNodeInterop : cacheBabelInterop; })(nodeInterop); }
|
|
22
23
|
function _interopRequireWildcard(obj, nodeInterop) { if (!nodeInterop && obj && obj.__esModule) { return obj; } if (obj === null || _typeof(obj) !== "object" && typeof obj !== "function") { return { default: obj }; } var cache = _getRequireWildcardCache(nodeInterop); if (cache && cache.has(obj)) { return cache.get(obj); } var newObj = {}; var hasPropertyDescriptor = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var key in obj) { if (key !== "default" && Object.prototype.hasOwnProperty.call(obj, key)) { var desc = hasPropertyDescriptor ? Object.getOwnPropertyDescriptor(obj, key) : null; if (desc && (desc.get || desc.set)) { Object.defineProperty(newObj, key, desc); } else { newObj[key] = obj[key]; } } } newObj.default = obj; if (cache) { cache.set(obj, newObj); } return newObj; }
|
|
23
|
-
var elevationStyles = (0, _react2.css)(_templateObject || (_templateObject = (0, _taggedTemplateLiteral2.default)(["\n border: 1px solid
|
|
24
|
+
var elevationStyles = (0, _react2.css)(_templateObject || (_templateObject = (0, _taggedTemplateLiteral2.default)(["\n border: 1px solid ", ";\n border-radius: ", ";\n margin: ", ";\n"])), "var(--ds-border, ".concat(_colors.N40, ")"), "var(--ds-border-radius-200, 8px)", "var(--ds-space-025, 2px)");
|
|
24
25
|
var getGap = function getGap(size) {
|
|
25
26
|
switch (size) {
|
|
26
27
|
case _constants.SmartLinkSize.XLarge:
|
|
@@ -18,7 +18,7 @@ var _excluded = ["href", "children", "checkSafety", "onClick", "testId"],
|
|
|
18
18
|
_excluded2 = ["isLinkSafe", "showSafetyWarningModal"];
|
|
19
19
|
var PACKAGE_DATA = {
|
|
20
20
|
packageName: "@atlaskit/smart-card",
|
|
21
|
-
packageVersion: "26.
|
|
21
|
+
packageVersion: "26.37.0",
|
|
22
22
|
componentName: 'linkUrl'
|
|
23
23
|
};
|
|
24
24
|
var Link = (0, _click.withLinkClickedEvent)('a');
|
|
@@ -4,7 +4,7 @@ export const ANALYTICS_CHANNEL = 'media';
|
|
|
4
4
|
export const context = {
|
|
5
5
|
componentName: 'smart-cards',
|
|
6
6
|
packageName: "@atlaskit/smart-card",
|
|
7
|
-
packageVersion: "26.
|
|
7
|
+
packageVersion: "26.37.0"
|
|
8
8
|
};
|
|
9
9
|
export let TrackQuickActionType = /*#__PURE__*/function (TrackQuickActionType) {
|
|
10
10
|
TrackQuickActionType["StatusUpdate"] = "StatusUpdate";
|
|
@@ -21,13 +21,14 @@ const TitleBlockResolvedView = ({
|
|
|
21
21
|
text,
|
|
22
22
|
title,
|
|
23
23
|
metadataPosition,
|
|
24
|
+
hideIcon = false,
|
|
24
25
|
...blockProps
|
|
25
26
|
}) => {
|
|
26
27
|
const metadataElements = renderElementItems(metadata);
|
|
27
28
|
const subtitleElements = renderElementItems(subtitle);
|
|
28
29
|
return /*#__PURE__*/React.createElement(Block, _extends({}, blockProps, {
|
|
29
30
|
testId: `${testId}-resolved-view`
|
|
30
|
-
}), /*#__PURE__*/React.createElement(LinkIcon, {
|
|
31
|
+
}), !hideIcon && /*#__PURE__*/React.createElement(LinkIcon, {
|
|
31
32
|
position: position
|
|
32
33
|
}), /*#__PURE__*/React.createElement(ElementGroup, {
|
|
33
34
|
direction: SmartLinkDirection.Vertical,
|
|
@@ -8,10 +8,10 @@ import { FlexibleUiContext } from '../../../../state/flexible-ui-context';
|
|
|
8
8
|
import LayeredLink from './layered-link';
|
|
9
9
|
import HoverCardControl from './hover-card-control';
|
|
10
10
|
import { isFlexUiPreviewPresent } from '../../../../state/flexible-ui-context/utils';
|
|
11
|
+
import { N40 } from '@atlaskit/theme/colors';
|
|
11
12
|
const elevationStyles = css`
|
|
12
|
-
border: 1px solid
|
|
13
|
-
border-radius:
|
|
14
|
-
box-shadow: ${tokens.elevation};
|
|
13
|
+
border: 1px solid ${`var(--ds-border, ${N40})`};
|
|
14
|
+
border-radius: ${"var(--ds-border-radius-200, 8px)"};
|
|
15
15
|
margin: ${"var(--ds-space-025, 2px)"};
|
|
16
16
|
`;
|
|
17
17
|
const getGap = size => {
|
|
@@ -8,7 +8,7 @@ import LinkWarningModal from './LinkWarningModal';
|
|
|
8
8
|
import { getBooleanFF } from '@atlaskit/platform-feature-flags';
|
|
9
9
|
const PACKAGE_DATA = {
|
|
10
10
|
packageName: "@atlaskit/smart-card",
|
|
11
|
-
packageVersion: "26.
|
|
11
|
+
packageVersion: "26.37.0",
|
|
12
12
|
componentName: 'linkUrl'
|
|
13
13
|
};
|
|
14
14
|
const Link = withLinkClickedEvent('a');
|
|
@@ -15,7 +15,7 @@ export var ANALYTICS_CHANNEL = 'media';
|
|
|
15
15
|
export var context = {
|
|
16
16
|
componentName: 'smart-cards',
|
|
17
17
|
packageName: "@atlaskit/smart-card",
|
|
18
|
-
packageVersion: "26.
|
|
18
|
+
packageVersion: "26.37.0"
|
|
19
19
|
};
|
|
20
20
|
export var TrackQuickActionType = /*#__PURE__*/function (TrackQuickActionType) {
|
|
21
21
|
TrackQuickActionType["StatusUpdate"] = "StatusUpdate";
|
|
@@ -2,7 +2,7 @@ import _extends from "@babel/runtime/helpers/extends";
|
|
|
2
2
|
import _taggedTemplateLiteral from "@babel/runtime/helpers/taggedTemplateLiteral";
|
|
3
3
|
import _objectWithoutProperties from "@babel/runtime/helpers/objectWithoutProperties";
|
|
4
4
|
var _templateObject;
|
|
5
|
-
var _excluded = ["actionGroup", "metadata", "position", "subtitle", "testId", "text", "title", "metadataPosition"];
|
|
5
|
+
var _excluded = ["actionGroup", "metadata", "position", "subtitle", "testId", "text", "title", "metadataPosition", "hideIcon"];
|
|
6
6
|
import React from 'react';
|
|
7
7
|
import { css } from '@emotion/react';
|
|
8
8
|
import { LinkIcon } from '../../../elements';
|
|
@@ -27,12 +27,14 @@ var TitleBlockResolvedView = function TitleBlockResolvedView(_ref) {
|
|
|
27
27
|
text = _ref.text,
|
|
28
28
|
title = _ref.title,
|
|
29
29
|
metadataPosition = _ref.metadataPosition,
|
|
30
|
+
_ref$hideIcon = _ref.hideIcon,
|
|
31
|
+
hideIcon = _ref$hideIcon === void 0 ? false : _ref$hideIcon,
|
|
30
32
|
blockProps = _objectWithoutProperties(_ref, _excluded);
|
|
31
33
|
var metadataElements = renderElementItems(metadata);
|
|
32
34
|
var subtitleElements = renderElementItems(subtitle);
|
|
33
35
|
return /*#__PURE__*/React.createElement(Block, _extends({}, blockProps, {
|
|
34
36
|
testId: "".concat(testId, "-resolved-view")
|
|
35
|
-
}), /*#__PURE__*/React.createElement(LinkIcon, {
|
|
37
|
+
}), !hideIcon && /*#__PURE__*/React.createElement(LinkIcon, {
|
|
36
38
|
position: position
|
|
37
39
|
}), /*#__PURE__*/React.createElement(ElementGroup, {
|
|
38
40
|
direction: SmartLinkDirection.Vertical,
|
|
@@ -10,7 +10,8 @@ import { FlexibleUiContext } from '../../../../state/flexible-ui-context';
|
|
|
10
10
|
import LayeredLink from './layered-link';
|
|
11
11
|
import HoverCardControl from './hover-card-control';
|
|
12
12
|
import { isFlexUiPreviewPresent } from '../../../../state/flexible-ui-context/utils';
|
|
13
|
-
|
|
13
|
+
import { N40 } from '@atlaskit/theme/colors';
|
|
14
|
+
var elevationStyles = css(_templateObject || (_templateObject = _taggedTemplateLiteral(["\n border: 1px solid ", ";\n border-radius: ", ";\n margin: ", ";\n"])), "var(--ds-border, ".concat(N40, ")"), "var(--ds-border-radius-200, 8px)", "var(--ds-space-025, 2px)");
|
|
14
15
|
var getGap = function getGap(size) {
|
|
15
16
|
switch (size) {
|
|
16
17
|
case SmartLinkSize.XLarge:
|
|
@@ -11,7 +11,7 @@ import LinkWarningModal from './LinkWarningModal';
|
|
|
11
11
|
import { getBooleanFF } from '@atlaskit/platform-feature-flags';
|
|
12
12
|
var PACKAGE_DATA = {
|
|
13
13
|
packageName: "@atlaskit/smart-card",
|
|
14
|
-
packageVersion: "26.
|
|
14
|
+
packageVersion: "26.37.0",
|
|
15
15
|
componentName: 'linkUrl'
|
|
16
16
|
};
|
|
17
17
|
var Link = withLinkClickedEvent('a');
|
|
@@ -90,6 +90,10 @@ export type TitleBlockProps = {
|
|
|
90
90
|
* @internal
|
|
91
91
|
*/
|
|
92
92
|
metadataPosition?: SmartLinkPosition;
|
|
93
|
+
/**
|
|
94
|
+
* Determines whether TitleBlock will hide the Link Icon.
|
|
95
|
+
*/
|
|
96
|
+
hideIcon?: boolean;
|
|
93
97
|
} & BlockProps;
|
|
94
98
|
export type TitleBlockViewProps = TitleBlockProps & {
|
|
95
99
|
actionGroup?: React.ReactNode;
|
|
@@ -90,6 +90,10 @@ export type TitleBlockProps = {
|
|
|
90
90
|
* @internal
|
|
91
91
|
*/
|
|
92
92
|
metadataPosition?: SmartLinkPosition;
|
|
93
|
+
/**
|
|
94
|
+
* Determines whether TitleBlock will hide the Link Icon.
|
|
95
|
+
*/
|
|
96
|
+
hideIcon?: boolean;
|
|
93
97
|
} & BlockProps;
|
|
94
98
|
export type TitleBlockViewProps = TitleBlockProps & {
|
|
95
99
|
actionGroup?: React.ReactNode;
|
package/package.json
CHANGED
package/report.api.md
CHANGED