@atlaskit/smart-card 41.0.2 → 41.0.3
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 +10 -0
- package/dist/cjs/view/EmbedModal/components/link-info/index.js +3 -1
- package/dist/cjs/view/RelatedLinksModal/components/RelatedLinksBaseModal.js +3 -7
- package/dist/es2019/view/EmbedModal/components/link-info/index.js +5 -2
- package/dist/es2019/view/RelatedLinksModal/components/RelatedLinksBaseModal.js +3 -7
- package/dist/esm/view/EmbedModal/components/link-info/index.js +4 -2
- package/dist/esm/view/RelatedLinksModal/components/RelatedLinksBaseModal.js +3 -7
- package/package.json +6 -17
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,15 @@
|
|
|
1
1
|
# @atlaskit/smart-card
|
|
2
2
|
|
|
3
|
+
## 41.0.3
|
|
4
|
+
|
|
5
|
+
### Patch Changes
|
|
6
|
+
|
|
7
|
+
- [`335984a76875c`](https://bitbucket.org/atlassian/atlassian-frontend-monorepo/commits/335984a76875c) -
|
|
8
|
+
NAVX-1895 fixing error in home with embed modal close button label
|
|
9
|
+
- [`5ad76e50d561a`](https://bitbucket.org/atlassian/atlassian-frontend-monorepo/commits/5ad76e50d561a) -
|
|
10
|
+
NAVX-1851 cleaning up navx-1304-related-links-remove-false-autofocus
|
|
11
|
+
- Updated dependencies
|
|
12
|
+
|
|
3
13
|
## 41.0.2
|
|
4
14
|
|
|
5
15
|
### Patch Changes
|
|
@@ -47,6 +47,8 @@ var LinkInfo = function LinkInfo(_ref) {
|
|
|
47
47
|
title = _ref.title;
|
|
48
48
|
var _useModal = (0, _modalDialog.useModal)(),
|
|
49
49
|
onClose = _useModal.onClose;
|
|
50
|
+
var _useIntl = (0, _reactIntlNext.useIntl)(),
|
|
51
|
+
formatMessage = _useIntl.formatMessage;
|
|
50
52
|
var downloadButton = (0, _react.useMemo)(function () {
|
|
51
53
|
if (onDownloadButtonClick) {
|
|
52
54
|
return /*#__PURE__*/_react.default.createElement(_linkInfoButton.default, {
|
|
@@ -136,7 +138,7 @@ var LinkInfo = function LinkInfo(_ref) {
|
|
|
136
138
|
testId: "".concat(testId, "-close-tooltip")
|
|
137
139
|
}, /*#__PURE__*/_react.default.createElement(_modalDialog.CloseButton, {
|
|
138
140
|
onClick: onClose,
|
|
139
|
-
label: _messages.messages.preview_close
|
|
141
|
+
label: formatMessage(_messages.messages.preview_close),
|
|
140
142
|
testId: "".concat(testId, "-close-button")
|
|
141
143
|
})) : /*#__PURE__*/_react.default.createElement(_linkInfoButton.default, {
|
|
142
144
|
content: /*#__PURE__*/_react.default.createElement(_reactIntlNext.FormattedMessage, _messages.messages.preview_close),
|
|
@@ -10,7 +10,6 @@ exports.default = void 0;
|
|
|
10
10
|
var _react = _interopRequireWildcard(require("react"));
|
|
11
11
|
var React = _react;
|
|
12
12
|
var _runtime = require("@compiled/react/runtime");
|
|
13
|
-
var _extends2 = _interopRequireDefault(require("@babel/runtime/helpers/extends"));
|
|
14
13
|
var _reactIntlNext = require("react-intl-next");
|
|
15
14
|
var _new = _interopRequireDefault(require("@atlaskit/button/new"));
|
|
16
15
|
var _modalDialog = _interopRequireWildcard(require("@atlaskit/modal-dialog"));
|
|
@@ -38,17 +37,14 @@ var RelatedLinksBaseModal = function RelatedLinksBaseModal(_ref) {
|
|
|
38
37
|
});
|
|
39
38
|
onClose === null || onClose === void 0 || onClose();
|
|
40
39
|
}, [fireEvent, onClose]);
|
|
41
|
-
return /*#__PURE__*/React.createElement(_modalDialog.ModalTransition, null, showModal && /*#__PURE__*/React.createElement(_modalDialog.default,
|
|
40
|
+
return /*#__PURE__*/React.createElement(_modalDialog.ModalTransition, null, showModal && /*#__PURE__*/React.createElement(_modalDialog.default, {
|
|
42
41
|
testId: "related-links-modal",
|
|
43
42
|
onClose: closeHandler,
|
|
44
|
-
width: fixedWidth
|
|
45
|
-
}, (0, _platformFeatureFlags.fg)('navx-1304-related-links-remove-false-autofocus') ? {} : {
|
|
46
|
-
autoFocus: false
|
|
47
|
-
}, {
|
|
43
|
+
width: fixedWidth,
|
|
48
44
|
shouldReturnFocus: false,
|
|
49
45
|
onOpenComplete: openCompleteHandler,
|
|
50
46
|
height: '504px'
|
|
51
|
-
}
|
|
47
|
+
}, /*#__PURE__*/React.createElement(_modalDialog.ModalHeader, {
|
|
52
48
|
hasCloseButton: (0, _platformFeatureFlags.fg)('navx-1483-a11y-close-button-in-modal-updates')
|
|
53
49
|
}, /*#__PURE__*/React.createElement(_modalDialog.ModalTitle, null, /*#__PURE__*/React.createElement(_reactIntlNext.FormattedMessage, _messages.messages.related_links_modal_title))), /*#__PURE__*/React.createElement(_modalDialog.ModalBody, null, children), /*#__PURE__*/React.createElement(_modalDialog.ModalFooter, null, /*#__PURE__*/React.createElement(_new.default, {
|
|
54
50
|
appearance: "primary",
|
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
import "./index.compiled.css";
|
|
3
3
|
import { ax, ix } from "@compiled/react/runtime";
|
|
4
4
|
import React, { useMemo } from 'react';
|
|
5
|
-
import { FormattedMessage } from 'react-intl-next';
|
|
5
|
+
import { FormattedMessage, useIntl } from 'react-intl-next';
|
|
6
6
|
import Heading from '@atlaskit/heading';
|
|
7
7
|
import DownloadIcon from '@atlaskit/icon/core/download';
|
|
8
8
|
import FullscreenExitIcon from '@atlaskit/icon/core/fullscreen-exit';
|
|
@@ -40,6 +40,9 @@ const LinkInfo = ({
|
|
|
40
40
|
const {
|
|
41
41
|
onClose
|
|
42
42
|
} = useModal();
|
|
43
|
+
const {
|
|
44
|
+
formatMessage
|
|
45
|
+
} = useIntl();
|
|
43
46
|
const downloadButton = useMemo(() => {
|
|
44
47
|
if (onDownloadButtonClick) {
|
|
45
48
|
return /*#__PURE__*/React.createElement(LinkInfoButton, {
|
|
@@ -123,7 +126,7 @@ const LinkInfo = ({
|
|
|
123
126
|
testId: `${testId}-close-tooltip`
|
|
124
127
|
}, /*#__PURE__*/React.createElement(CloseButton, {
|
|
125
128
|
onClick: onClose,
|
|
126
|
-
label: messages.preview_close
|
|
129
|
+
label: formatMessage(messages.preview_close),
|
|
127
130
|
testId: `${testId}-close-button`
|
|
128
131
|
})) : /*#__PURE__*/React.createElement(LinkInfoButton, {
|
|
129
132
|
content: /*#__PURE__*/React.createElement(FormattedMessage, messages.preview_close),
|
|
@@ -1,5 +1,4 @@
|
|
|
1
1
|
/* RelatedLinksBaseModal.tsx generated by @compiled/babel-plugin v0.36.1 */
|
|
2
|
-
import _extends from "@babel/runtime/helpers/extends";
|
|
3
2
|
import * as React from 'react';
|
|
4
3
|
import { ax, ix } from "@compiled/react/runtime";
|
|
5
4
|
import { useCallback, useRef } from 'react';
|
|
@@ -31,17 +30,14 @@ const RelatedLinksBaseModal = ({
|
|
|
31
30
|
});
|
|
32
31
|
onClose === null || onClose === void 0 ? void 0 : onClose();
|
|
33
32
|
}, [fireEvent, onClose]);
|
|
34
|
-
return /*#__PURE__*/React.createElement(ModalTransition, null, showModal && /*#__PURE__*/React.createElement(Modal,
|
|
33
|
+
return /*#__PURE__*/React.createElement(ModalTransition, null, showModal && /*#__PURE__*/React.createElement(Modal, {
|
|
35
34
|
testId: "related-links-modal",
|
|
36
35
|
onClose: closeHandler,
|
|
37
|
-
width: fixedWidth
|
|
38
|
-
}, fg('navx-1304-related-links-remove-false-autofocus') ? {} : {
|
|
39
|
-
autoFocus: false
|
|
40
|
-
}, {
|
|
36
|
+
width: fixedWidth,
|
|
41
37
|
shouldReturnFocus: false,
|
|
42
38
|
onOpenComplete: openCompleteHandler,
|
|
43
39
|
height: '504px'
|
|
44
|
-
}
|
|
40
|
+
}, /*#__PURE__*/React.createElement(ModalHeader, {
|
|
45
41
|
hasCloseButton: fg('navx-1483-a11y-close-button-in-modal-updates')
|
|
46
42
|
}, /*#__PURE__*/React.createElement(ModalTitle, null, /*#__PURE__*/React.createElement(FormattedMessage, messages.related_links_modal_title))), /*#__PURE__*/React.createElement(ModalBody, null, children), /*#__PURE__*/React.createElement(ModalFooter, null, /*#__PURE__*/React.createElement(Button, {
|
|
47
43
|
appearance: "primary",
|
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
import "./index.compiled.css";
|
|
3
3
|
import { ax, ix } from "@compiled/react/runtime";
|
|
4
4
|
import React, { useMemo } from 'react';
|
|
5
|
-
import { FormattedMessage } from 'react-intl-next';
|
|
5
|
+
import { FormattedMessage, useIntl } from 'react-intl-next';
|
|
6
6
|
import Heading from '@atlaskit/heading';
|
|
7
7
|
import DownloadIcon from '@atlaskit/icon/core/download';
|
|
8
8
|
import FullscreenExitIcon from '@atlaskit/icon/core/fullscreen-exit';
|
|
@@ -38,6 +38,8 @@ var LinkInfo = function LinkInfo(_ref) {
|
|
|
38
38
|
title = _ref.title;
|
|
39
39
|
var _useModal = useModal(),
|
|
40
40
|
onClose = _useModal.onClose;
|
|
41
|
+
var _useIntl = useIntl(),
|
|
42
|
+
formatMessage = _useIntl.formatMessage;
|
|
41
43
|
var downloadButton = useMemo(function () {
|
|
42
44
|
if (onDownloadButtonClick) {
|
|
43
45
|
return /*#__PURE__*/React.createElement(LinkInfoButton, {
|
|
@@ -127,7 +129,7 @@ var LinkInfo = function LinkInfo(_ref) {
|
|
|
127
129
|
testId: "".concat(testId, "-close-tooltip")
|
|
128
130
|
}, /*#__PURE__*/React.createElement(CloseButton, {
|
|
129
131
|
onClick: onClose,
|
|
130
|
-
label: messages.preview_close
|
|
132
|
+
label: formatMessage(messages.preview_close),
|
|
131
133
|
testId: "".concat(testId, "-close-button")
|
|
132
134
|
})) : /*#__PURE__*/React.createElement(LinkInfoButton, {
|
|
133
135
|
content: /*#__PURE__*/React.createElement(FormattedMessage, messages.preview_close),
|
|
@@ -1,5 +1,4 @@
|
|
|
1
1
|
/* RelatedLinksBaseModal.tsx generated by @compiled/babel-plugin v0.36.1 */
|
|
2
|
-
import _extends from "@babel/runtime/helpers/extends";
|
|
3
2
|
import * as React from 'react';
|
|
4
3
|
import { ax, ix } from "@compiled/react/runtime";
|
|
5
4
|
import { useCallback, useRef } from 'react';
|
|
@@ -29,17 +28,14 @@ var RelatedLinksBaseModal = function RelatedLinksBaseModal(_ref) {
|
|
|
29
28
|
});
|
|
30
29
|
onClose === null || onClose === void 0 || onClose();
|
|
31
30
|
}, [fireEvent, onClose]);
|
|
32
|
-
return /*#__PURE__*/React.createElement(ModalTransition, null, showModal && /*#__PURE__*/React.createElement(Modal,
|
|
31
|
+
return /*#__PURE__*/React.createElement(ModalTransition, null, showModal && /*#__PURE__*/React.createElement(Modal, {
|
|
33
32
|
testId: "related-links-modal",
|
|
34
33
|
onClose: closeHandler,
|
|
35
|
-
width: fixedWidth
|
|
36
|
-
}, fg('navx-1304-related-links-remove-false-autofocus') ? {} : {
|
|
37
|
-
autoFocus: false
|
|
38
|
-
}, {
|
|
34
|
+
width: fixedWidth,
|
|
39
35
|
shouldReturnFocus: false,
|
|
40
36
|
onOpenComplete: openCompleteHandler,
|
|
41
37
|
height: '504px'
|
|
42
|
-
}
|
|
38
|
+
}, /*#__PURE__*/React.createElement(ModalHeader, {
|
|
43
39
|
hasCloseButton: fg('navx-1483-a11y-close-button-in-modal-updates')
|
|
44
40
|
}, /*#__PURE__*/React.createElement(ModalTitle, null, /*#__PURE__*/React.createElement(FormattedMessage, messages.related_links_modal_title))), /*#__PURE__*/React.createElement(ModalBody, null, children), /*#__PURE__*/React.createElement(ModalFooter, null, /*#__PURE__*/React.createElement(Button, {
|
|
45
41
|
appearance: "primary",
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@atlaskit/smart-card",
|
|
3
|
-
"version": "41.0.
|
|
3
|
+
"version": "41.0.3",
|
|
4
4
|
"description": "Smart card component",
|
|
5
5
|
"publishConfig": {
|
|
6
6
|
"registry": "https://registry.npmjs.org/"
|
|
@@ -40,7 +40,7 @@
|
|
|
40
40
|
"@atlaskit/form": "^12.6.0",
|
|
41
41
|
"@atlaskit/frontend-utilities": "^3.1.0",
|
|
42
42
|
"@atlaskit/heading": "^5.2.0",
|
|
43
|
-
"@atlaskit/icon": "^28.
|
|
43
|
+
"@atlaskit/icon": "^28.2.0",
|
|
44
44
|
"@atlaskit/icon-file-type": "^7.0.0",
|
|
45
45
|
"@atlaskit/icon-lab": "^5.7.0",
|
|
46
46
|
"@atlaskit/icon-object": "^7.2.0",
|
|
@@ -53,7 +53,7 @@
|
|
|
53
53
|
"@atlaskit/link-client-extension": "^6.0.0",
|
|
54
54
|
"@atlaskit/link-extractors": "^2.4.0",
|
|
55
55
|
"@atlaskit/link-test-helpers": "^8.3.0",
|
|
56
|
-
"@atlaskit/linking-common": "^9.
|
|
56
|
+
"@atlaskit/linking-common": "^9.6.0",
|
|
57
57
|
"@atlaskit/linking-types": "^14.0.0",
|
|
58
58
|
"@atlaskit/logo": "^19.7.0",
|
|
59
59
|
"@atlaskit/lozenge": "^13.0.0",
|
|
@@ -61,15 +61,15 @@
|
|
|
61
61
|
"@atlaskit/modal-dialog": "^14.3.0",
|
|
62
62
|
"@atlaskit/outbound-auth-flow-client": "^3.4.0",
|
|
63
63
|
"@atlaskit/platform-feature-flags": "^1.1.0",
|
|
64
|
-
"@atlaskit/popup": "^4.
|
|
64
|
+
"@atlaskit/popup": "^4.4.0",
|
|
65
65
|
"@atlaskit/primitives": "^14.14.0",
|
|
66
66
|
"@atlaskit/section-message": "^8.7.0",
|
|
67
|
-
"@atlaskit/select": "^21.
|
|
67
|
+
"@atlaskit/select": "^21.3.0",
|
|
68
68
|
"@atlaskit/spinner": "^19.0.0",
|
|
69
69
|
"@atlaskit/textarea": "^8.0.0",
|
|
70
70
|
"@atlaskit/textfield": "^8.0.0",
|
|
71
71
|
"@atlaskit/theme": "^21.0.0",
|
|
72
|
-
"@atlaskit/tmp-editor-statsig": "^12.
|
|
72
|
+
"@atlaskit/tmp-editor-statsig": "^12.22.0",
|
|
73
73
|
"@atlaskit/tokens": "^6.3.0",
|
|
74
74
|
"@atlaskit/tooltip": "^20.4.0",
|
|
75
75
|
"@atlaskit/ufo": "^0.4.0",
|
|
@@ -158,14 +158,6 @@
|
|
|
158
158
|
]
|
|
159
159
|
}
|
|
160
160
|
},
|
|
161
|
-
"af:exports": {
|
|
162
|
-
"./ssr": "./src/ssr.tsx",
|
|
163
|
-
"./types": "./src/types.ts",
|
|
164
|
-
"./hooks": "./src/hooks.ts",
|
|
165
|
-
"./hover-card": "./src/hoverCard.ts",
|
|
166
|
-
"./link-url": "./src/linkUrl.ts",
|
|
167
|
-
".": "./src/index.ts"
|
|
168
|
-
},
|
|
169
161
|
"platform-feature-flags": {
|
|
170
162
|
"platform_linking_enable_card_preview_action_size": {
|
|
171
163
|
"type": "boolean"
|
|
@@ -215,9 +207,6 @@
|
|
|
215
207
|
"platform_editor_inline_card_selected_state_fix": {
|
|
216
208
|
"type": "boolean"
|
|
217
209
|
},
|
|
218
|
-
"navx-1304-related-links-remove-false-autofocus": {
|
|
219
|
-
"type": "boolean"
|
|
220
|
-
},
|
|
221
210
|
"platform_smartlink_3pclick_analytics": {
|
|
222
211
|
"type": "boolean"
|
|
223
212
|
},
|