@atlaskit/smart-card 25.0.7 → 25.1.1
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/version.json +1 -1
- package/dist/cjs/view/FlexibleCard/components/blocks/action-group/index.js +1 -2
- package/dist/cjs/view/FlexibleCard/components/elements/text/index.js +1 -1
- package/dist/es2019/version.json +1 -1
- package/dist/es2019/view/FlexibleCard/components/blocks/action-group/index.js +2 -3
- package/dist/es2019/view/FlexibleCard/components/elements/text/index.js +1 -0
- package/dist/esm/version.json +1 -1
- package/dist/esm/view/FlexibleCard/components/blocks/action-group/index.js +1 -2
- package/dist/esm/view/FlexibleCard/components/elements/text/index.js +1 -1
- package/dist/types/view/Card/index.d.ts +1 -1
- package/dist/types/view/Card/types.d.ts +10 -0
- package/package.json +4 -4
- package/report.api.md +2 -1
- package/tmp/api-report-tmp.d.ts +2 -2
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,22 @@
|
|
|
1
1
|
# @atlaskit/smart-card
|
|
2
2
|
|
|
3
|
+
## 25.1.1
|
|
4
|
+
|
|
5
|
+
### Patch Changes
|
|
6
|
+
|
|
7
|
+
- [`a3b9ef40d09`](https://bitbucket.org/atlassian/atlassian-frontend/commits/a3b9ef40d09) - [ux] Adds white-space style to FlexUI text element
|
|
8
|
+
|
|
9
|
+
## 25.1.0
|
|
10
|
+
|
|
11
|
+
### Minor Changes
|
|
12
|
+
|
|
13
|
+
- [`b811f263575`](https://bitbucket.org/atlassian/atlassian-frontend/commits/b811f263575) - Add new "showServerActions" prop to SmartCard to show available server actions on inline and block Smart Links. This will be used in conjunction with feature flags on the duration of the experiment.
|
|
14
|
+
|
|
15
|
+
### Patch Changes
|
|
16
|
+
|
|
17
|
+
- [`32b4bcce640`](https://bitbucket.org/atlassian/atlassian-frontend/commits/32b4bcce640) - Replace box-shadow based focus to instead apply outline.
|
|
18
|
+
- Updated dependencies
|
|
19
|
+
|
|
3
20
|
## 25.0.7
|
|
4
21
|
|
|
5
22
|
### Patch Changes
|
package/dist/cjs/version.json
CHANGED
|
@@ -19,13 +19,12 @@ var _constants = require("../../../../../constants");
|
|
|
19
19
|
var _standardButton = _interopRequireDefault(require("@atlaskit/button/standard-button"));
|
|
20
20
|
var _more = _interopRequireDefault(require("@atlaskit/icon/glyph/more"));
|
|
21
21
|
var _utils = require("../../utils");
|
|
22
|
-
var _token = require("../../../../../utils/token");
|
|
23
22
|
var _messages = require("../../../../../messages");
|
|
24
23
|
var _flexibleUiContext = require("../../../../../state/flexible-ui-context");
|
|
25
24
|
var _actionGroupItem = _interopRequireDefault(require("./action-group-item"));
|
|
26
25
|
var _excluded = ["triggerRef"];
|
|
27
26
|
var _templateObject;
|
|
28
|
-
var styles = (0, _react2.css)(_templateObject || (_templateObject = (0, _taggedTemplateLiteral2.default)(["\n display: inline-flex;\n line-height: 1rem;\n > div {\n align-items: center;\n button:focus {\n // AK button removes the default browser outline on focus and apply\n // box-shadow styling to create the outline appearance.\n // Due to our container elements (Container/Block/ElementGroup) has\n // overflow hidden to prevent the metadata element from leaking outside\n // of its container, the box-shadow doesn't show properly.\n // Invert the AK box-shadow styling.\n
|
|
27
|
+
var styles = (0, _react2.css)(_templateObject || (_templateObject = (0, _taggedTemplateLiteral2.default)(["\n display: inline-flex;\n line-height: 1rem;\n > div {\n align-items: center;\n button:focus-visible {\n // AK button removes the default browser outline on focus and apply\n // box-shadow styling to create the outline appearance.\n // Due to our container elements (Container/Block/ElementGroup) has\n // overflow hidden to prevent the metadata element from leaking outside\n // of its container, the box-shadow doesn't show properly.\n // Invert the AK box-shadow styling.\n outline-offset: -2px;\n }\n }\n"])));
|
|
29
28
|
var renderActionItems = function renderActionItems() {
|
|
30
29
|
var items = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : [];
|
|
31
30
|
var size = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : _constants.SmartLinkSize.Medium;
|
|
@@ -12,7 +12,7 @@ var _utils = require("../../utils");
|
|
|
12
12
|
var _token = require("../../../../../utils/token");
|
|
13
13
|
var _templateObject;
|
|
14
14
|
var getStyles = function getStyles(maxLines) {
|
|
15
|
-
return (0, _react2.css)(_templateObject || (_templateObject = (0, _taggedTemplateLiteral2.default)(["\n color: ", ";\n font-size: 0.75rem;\n line-height: 1rem;\n ", "\n"])), _token.tokens.text, (0, _utils.getTruncateStyles)(maxLines));
|
|
15
|
+
return (0, _react2.css)(_templateObject || (_templateObject = (0, _taggedTemplateLiteral2.default)(["\n color: ", ";\n font-size: 0.75rem;\n line-height: 1rem;\n white-space: normal;\n ", "\n"])), _token.tokens.text, (0, _utils.getTruncateStyles)(maxLines));
|
|
16
16
|
};
|
|
17
17
|
|
|
18
18
|
/**
|
package/dist/es2019/version.json
CHANGED
|
@@ -10,7 +10,6 @@ import { ActionName, SmartLinkSize } from '../../../../../constants';
|
|
|
10
10
|
import Button from '@atlaskit/button/standard-button';
|
|
11
11
|
import MoreIcon from '@atlaskit/icon/glyph/more';
|
|
12
12
|
import { sizeToButtonSpacing } from '../../utils';
|
|
13
|
-
import { tokens } from '../../../../../utils/token';
|
|
14
13
|
import { messages } from '../../../../../messages';
|
|
15
14
|
import { useFlexibleUiContext } from '../../../../../state/flexible-ui-context';
|
|
16
15
|
import ActionGroupItem from './action-group-item';
|
|
@@ -19,14 +18,14 @@ const styles = css`
|
|
|
19
18
|
line-height: 1rem;
|
|
20
19
|
> div {
|
|
21
20
|
align-items: center;
|
|
22
|
-
button:focus {
|
|
21
|
+
button:focus-visible {
|
|
23
22
|
// AK button removes the default browser outline on focus and apply
|
|
24
23
|
// box-shadow styling to create the outline appearance.
|
|
25
24
|
// Due to our container elements (Container/Block/ElementGroup) has
|
|
26
25
|
// overflow hidden to prevent the metadata element from leaking outside
|
|
27
26
|
// of its container, the box-shadow doesn't show properly.
|
|
28
27
|
// Invert the AK box-shadow styling.
|
|
29
|
-
|
|
28
|
+
outline-offset: -2px;
|
|
30
29
|
}
|
|
31
30
|
}
|
|
32
31
|
`;
|
package/dist/esm/version.json
CHANGED
|
@@ -15,11 +15,10 @@ import { ActionName, SmartLinkSize } from '../../../../../constants';
|
|
|
15
15
|
import Button from '@atlaskit/button/standard-button';
|
|
16
16
|
import MoreIcon from '@atlaskit/icon/glyph/more';
|
|
17
17
|
import { sizeToButtonSpacing } from '../../utils';
|
|
18
|
-
import { tokens } from '../../../../../utils/token';
|
|
19
18
|
import { messages } from '../../../../../messages';
|
|
20
19
|
import { useFlexibleUiContext } from '../../../../../state/flexible-ui-context';
|
|
21
20
|
import ActionGroupItem from './action-group-item';
|
|
22
|
-
var styles = css(_templateObject || (_templateObject = _taggedTemplateLiteral(["\n display: inline-flex;\n line-height: 1rem;\n > div {\n align-items: center;\n button:focus {\n // AK button removes the default browser outline on focus and apply\n // box-shadow styling to create the outline appearance.\n // Due to our container elements (Container/Block/ElementGroup) has\n // overflow hidden to prevent the metadata element from leaking outside\n // of its container, the box-shadow doesn't show properly.\n // Invert the AK box-shadow styling.\n
|
|
21
|
+
var styles = css(_templateObject || (_templateObject = _taggedTemplateLiteral(["\n display: inline-flex;\n line-height: 1rem;\n > div {\n align-items: center;\n button:focus-visible {\n // AK button removes the default browser outline on focus and apply\n // box-shadow styling to create the outline appearance.\n // Due to our container elements (Container/Block/ElementGroup) has\n // overflow hidden to prevent the metadata element from leaking outside\n // of its container, the box-shadow doesn't show properly.\n // Invert the AK box-shadow styling.\n outline-offset: -2px;\n }\n }\n"])));
|
|
23
22
|
var renderActionItems = function renderActionItems() {
|
|
24
23
|
var items = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : [];
|
|
25
24
|
var size = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : SmartLinkSize.Medium;
|
|
@@ -6,7 +6,7 @@ import { css, jsx } from '@emotion/react';
|
|
|
6
6
|
import { getFormattedMessage, getTruncateStyles } from '../../utils';
|
|
7
7
|
import { tokens } from '../../../../../utils/token';
|
|
8
8
|
var getStyles = function getStyles(maxLines) {
|
|
9
|
-
return css(_templateObject || (_templateObject = _taggedTemplateLiteral(["\n color: ", ";\n font-size: 0.75rem;\n line-height: 1rem;\n ", "\n"])), tokens.text, getTruncateStyles(maxLines));
|
|
9
|
+
return css(_templateObject || (_templateObject = _taggedTemplateLiteral(["\n color: ", ";\n font-size: 0.75rem;\n line-height: 1rem;\n white-space: normal;\n ", "\n"])), tokens.text, getTruncateStyles(maxLines));
|
|
10
10
|
};
|
|
11
11
|
|
|
12
12
|
/**
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
2
|
import { CardAppearance, CardPlatform, CardProps } from './types';
|
|
3
3
|
import { WrappedComponentProps } from 'react-intl-next';
|
|
4
|
-
export declare const Card: React.ForwardRefExoticComponent<Pick<Omit<React.PropsWithChildren<import("react-intl-next").WithIntlProps<CardProps & WrappedComponentProps<"intl">>>, keyof import("@atlaskit/analytics-next").WithAnalyticsEventsProps> & React.RefAttributes<any> & import("@atlaskit/analytics-next").WithContextProps, "url" | "children" | "data" | "key" | "id" | "placeholder" | "onError" | "onClick" | "appearance" | "testId" | "analyticsContext" | "isSelected" | "inheritDimensions" | "ui" | "showActions" | "showHoverPreview" | "onResolve" | "platform" | "showAuthTooltip" | "frameStyle" | "embedIframeRef" | "inlinePreloaderStyle" | "isFrameVisible" | "importer" | "container" | "analyticsEvents" | "forwardedRef"> & React.RefAttributes<any>>;
|
|
4
|
+
export declare const Card: React.ForwardRefExoticComponent<Pick<Omit<React.PropsWithChildren<import("react-intl-next").WithIntlProps<CardProps & WrappedComponentProps<"intl">>>, keyof import("@atlaskit/analytics-next").WithAnalyticsEventsProps> & React.RefAttributes<any> & import("@atlaskit/analytics-next").WithContextProps, "url" | "children" | "data" | "key" | "id" | "placeholder" | "onError" | "onClick" | "appearance" | "testId" | "analyticsContext" | "isSelected" | "inheritDimensions" | "ui" | "showActions" | "showHoverPreview" | "onResolve" | "platform" | "showAuthTooltip" | "frameStyle" | "embedIframeRef" | "inlinePreloaderStyle" | "isFrameVisible" | "importer" | "container" | "showServerActions" | "analyticsEvents" | "forwardedRef"> & React.RefAttributes<any>>;
|
|
5
5
|
export type { CardAppearance, CardProps, CardPlatform };
|
|
@@ -30,7 +30,17 @@ export interface CardProps extends WithAnalyticsEventsProps {
|
|
|
30
30
|
data?: any;
|
|
31
31
|
url?: string;
|
|
32
32
|
testId?: string;
|
|
33
|
+
/**
|
|
34
|
+
* Show client actions, e.g. preview, download, etc.
|
|
35
|
+
* These actions do not change the link resource.
|
|
36
|
+
*/
|
|
33
37
|
showActions?: boolean;
|
|
38
|
+
/**
|
|
39
|
+
* @todo This is an experiment prop and the development is in-progress.
|
|
40
|
+
* @see ATLAS-13099
|
|
41
|
+
* Show server actions that change the link resource, e.g. update status.
|
|
42
|
+
*/
|
|
43
|
+
showServerActions?: boolean;
|
|
34
44
|
onResolve?: OnResolveCallback;
|
|
35
45
|
onError?: OnErrorCallback;
|
|
36
46
|
/** This props determines if dimensions of an embed card are to be inherited from the parent.
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@atlaskit/smart-card",
|
|
3
|
-
"version": "25.
|
|
3
|
+
"version": "25.1.1",
|
|
4
4
|
"description": "Smart card component",
|
|
5
5
|
"publishConfig": {
|
|
6
6
|
"registry": "https://registry.npmjs.org/"
|
|
@@ -26,7 +26,7 @@
|
|
|
26
26
|
"@atlaskit/analytics-next": "^9.0.0",
|
|
27
27
|
"@atlaskit/avatar": "^21.2.0",
|
|
28
28
|
"@atlaskit/avatar-group": "^9.2.0",
|
|
29
|
-
"@atlaskit/button": "^16.
|
|
29
|
+
"@atlaskit/button": "^16.6.0",
|
|
30
30
|
"@atlaskit/dropdown-menu": "^11.7.0",
|
|
31
31
|
"@atlaskit/icon": "^21.11.0",
|
|
32
32
|
"@atlaskit/icon-file-type": "^6.3.0",
|
|
@@ -36,7 +36,7 @@
|
|
|
36
36
|
"@atlaskit/linking-common": "^2.2.0",
|
|
37
37
|
"@atlaskit/logo": "^13.11.0",
|
|
38
38
|
"@atlaskit/lozenge": "^11.3.0",
|
|
39
|
-
"@atlaskit/media-common": "^
|
|
39
|
+
"@atlaskit/media-common": "^4.0.0",
|
|
40
40
|
"@atlaskit/modal-dialog": "^12.4.0",
|
|
41
41
|
"@atlaskit/outbound-auth-flow-client": "^3.3.0",
|
|
42
42
|
"@atlaskit/popup": "^1.5.0",
|
|
@@ -75,7 +75,7 @@
|
|
|
75
75
|
"@atlaskit/link-test-helpers": "^2.2.0",
|
|
76
76
|
"@atlaskit/lozenge": "^11.3.0",
|
|
77
77
|
"@atlaskit/media-integration-test-helpers": "^2.6.0",
|
|
78
|
-
"@atlaskit/media-test-helpers": "^
|
|
78
|
+
"@atlaskit/media-test-helpers": "^31.0.0",
|
|
79
79
|
"@atlaskit/page": "^12.2.0",
|
|
80
80
|
"@atlaskit/radio": "^5.4.0",
|
|
81
81
|
"@atlaskit/range": "^7.0.0",
|
package/report.api.md
CHANGED
|
@@ -257,6 +257,7 @@ export const Card: React_2.ForwardRefExoticComponent<
|
|
|
257
257
|
| 'showActions'
|
|
258
258
|
| 'showAuthTooltip'
|
|
259
259
|
| 'showHoverPreview'
|
|
260
|
+
| 'showServerActions'
|
|
260
261
|
| 'testId'
|
|
261
262
|
| 'ui'
|
|
262
263
|
| 'url'
|
|
@@ -315,12 +316,12 @@ export interface CardProps extends WithAnalyticsEventsProps {
|
|
|
315
316
|
placeholder?: string;
|
|
316
317
|
// (undocumented)
|
|
317
318
|
platform?: CardPlatform;
|
|
318
|
-
// (undocumented)
|
|
319
319
|
showActions?: boolean;
|
|
320
320
|
// (undocumented)
|
|
321
321
|
showAuthTooltip?: boolean;
|
|
322
322
|
// (undocumented)
|
|
323
323
|
showHoverPreview?: boolean;
|
|
324
|
+
showServerActions?: boolean;
|
|
324
325
|
// (undocumented)
|
|
325
326
|
testId?: string;
|
|
326
327
|
// (undocumented)
|
package/tmp/api-report-tmp.d.ts
CHANGED
|
@@ -178,7 +178,7 @@ type BlockProps = {
|
|
|
178
178
|
};
|
|
179
179
|
|
|
180
180
|
// @public (undocumented)
|
|
181
|
-
export const Card: React_2.ForwardRefExoticComponent<Pick<Omit<React_2.PropsWithChildren<WithIntlProps<CardProps & WrappedComponentProps<"intl">>>, keyof WithAnalyticsEventsProps> & React_2.RefAttributes<any> & WithContextProps, "analyticsContext" | "analyticsEvents" | "appearance" | "children" | "container" | "data" | "embedIframeRef" | "forwardedRef" | "frameStyle" | "id" | "importer" | "inheritDimensions" | "inlinePreloaderStyle" | "isFrameVisible" | "isSelected" | "key" | "onClick" | "onError" | "onResolve" | "placeholder" | "platform" | "showActions" | "showAuthTooltip" | "showHoverPreview" | "testId" | "ui" | "url"> & React_2.RefAttributes<any>>;
|
|
181
|
+
export const Card: React_2.ForwardRefExoticComponent<Pick<Omit<React_2.PropsWithChildren<WithIntlProps<CardProps & WrappedComponentProps<"intl">>>, keyof WithAnalyticsEventsProps> & React_2.RefAttributes<any> & WithContextProps, "analyticsContext" | "analyticsEvents" | "appearance" | "children" | "container" | "data" | "embedIframeRef" | "forwardedRef" | "frameStyle" | "id" | "importer" | "inheritDimensions" | "inlinePreloaderStyle" | "isFrameVisible" | "isSelected" | "key" | "onClick" | "onError" | "onResolve" | "placeholder" | "platform" | "showActions" | "showAuthTooltip" | "showHoverPreview" | "showServerActions" | "testId" | "ui" | "url"> & React_2.RefAttributes<any>>;
|
|
182
182
|
|
|
183
183
|
export { CardAdf }
|
|
184
184
|
|
|
@@ -227,12 +227,12 @@ export interface CardProps extends WithAnalyticsEventsProps {
|
|
|
227
227
|
placeholder?: string;
|
|
228
228
|
// (undocumented)
|
|
229
229
|
platform?: CardPlatform;
|
|
230
|
-
// (undocumented)
|
|
231
230
|
showActions?: boolean;
|
|
232
231
|
// (undocumented)
|
|
233
232
|
showAuthTooltip?: boolean;
|
|
234
233
|
// (undocumented)
|
|
235
234
|
showHoverPreview?: boolean;
|
|
235
|
+
showServerActions?: boolean;
|
|
236
236
|
// (undocumented)
|
|
237
237
|
testId?: string;
|
|
238
238
|
// (undocumented)
|