@atlaskit/smart-card 36.0.4 → 36.2.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 +17 -0
- package/dist/cjs/utils/analytics/analytics.js +1 -1
- package/dist/cjs/view/FlexibleCard/components/elements/badge/index.js +4 -6
- package/dist/cjs/view/HoverCard/components/HoverCardComponent.js +4 -1
- package/dist/cjs/view/LinkUrl/index.js +1 -1
- package/dist/cjs/view/common/UnauthorisedViewContent.js +5 -0
- package/dist/es2019/utils/analytics/analytics.js +1 -1
- package/dist/es2019/view/FlexibleCard/components/elements/badge/index.js +5 -7
- package/dist/es2019/view/HoverCard/components/HoverCardComponent.js +4 -1
- package/dist/es2019/view/LinkUrl/index.js +1 -1
- package/dist/es2019/view/common/UnauthorisedViewContent.js +5 -0
- package/dist/esm/utils/analytics/analytics.js +1 -1
- package/dist/esm/view/FlexibleCard/components/elements/badge/index.js +5 -7
- package/dist/esm/view/HoverCard/components/HoverCardComponent.js +4 -1
- package/dist/esm/view/LinkUrl/index.js +1 -1
- package/dist/esm/view/common/UnauthorisedViewContent.js +5 -0
- package/package.json +7 -4
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,22 @@
|
|
|
1
1
|
# @atlaskit/smart-card
|
|
2
2
|
|
|
3
|
+
## 36.2.0
|
|
4
|
+
|
|
5
|
+
### Minor Changes
|
|
6
|
+
|
|
7
|
+
- [#129557](https://bitbucket.org/atlassian/atlassian-frontend-monorepo/pull-requests/129557)
|
|
8
|
+
[`d9a93c1c21746`](https://bitbucket.org/atlassian/atlassian-frontend-monorepo/commits/d9a93c1c21746) -
|
|
9
|
+
[ux] EDM-11945 fixing color contrast a11y violations in smart-card by updating examples and text
|
|
10
|
+
color for pending state
|
|
11
|
+
|
|
12
|
+
## 36.1.0
|
|
13
|
+
|
|
14
|
+
### Minor Changes
|
|
15
|
+
|
|
16
|
+
- [#129342](https://bitbucket.org/atlassian/atlassian-frontend-monorepo/pull-requests/129342)
|
|
17
|
+
[`047d66b55d480`](https://bitbucket.org/atlassian/atlassian-frontend-monorepo/commits/047d66b55d480) -
|
|
18
|
+
Fix bug with Inline not applying data-smart-element-badge
|
|
19
|
+
|
|
3
20
|
## 36.0.4
|
|
4
21
|
|
|
5
22
|
### Patch Changes
|
|
@@ -11,7 +11,7 @@ var ANALYTICS_CHANNEL = exports.ANALYTICS_CHANNEL = 'media';
|
|
|
11
11
|
var context = exports.context = {
|
|
12
12
|
componentName: 'smart-cards',
|
|
13
13
|
packageName: "@atlaskit/smart-card",
|
|
14
|
-
packageVersion: "36.0
|
|
14
|
+
packageVersion: "36.2.0"
|
|
15
15
|
};
|
|
16
16
|
var TrackQuickActionType = exports.TrackQuickActionType = /*#__PURE__*/function (TrackQuickActionType) {
|
|
17
17
|
TrackQuickActionType["StatusUpdate"] = "StatusUpdate";
|
|
@@ -12,7 +12,6 @@ var _runtime = require("@compiled/react/runtime");
|
|
|
12
12
|
var _extends2 = _interopRequireDefault(require("@babel/runtime/helpers/extends"));
|
|
13
13
|
var _defineProperty2 = _interopRequireDefault(require("@babel/runtime/helpers/defineProperty"));
|
|
14
14
|
var _react = _interopRequireWildcard(require("react"));
|
|
15
|
-
var _react2 = require("@compiled/react");
|
|
16
15
|
var _platformFeatureFlags = require("@atlaskit/platform-feature-flags");
|
|
17
16
|
var _compiled = require("@atlaskit/primitives/compiled");
|
|
18
17
|
var _constants = require("../../../../../constants");
|
|
@@ -97,13 +96,12 @@ var BadgeRefreshNew = /*#__PURE__*/(0, _react.forwardRef)(function (_ref, ref) {
|
|
|
97
96
|
if (!formattedMessageOrLabel || !badgeIcon) {
|
|
98
97
|
return null;
|
|
99
98
|
}
|
|
100
|
-
return /*#__PURE__*/_react.default.createElement(
|
|
101
|
-
as: "span",
|
|
99
|
+
return /*#__PURE__*/_react.default.createElement("span", {
|
|
102
100
|
"data-smart-element": name,
|
|
103
101
|
"data-smart-element-badge": true,
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
|
|
102
|
+
"data-testid": testId,
|
|
103
|
+
ref: ref,
|
|
104
|
+
className: (0, _runtime.ax)([styles.container, colorMap[appearance]])
|
|
107
105
|
}, !hideIcon && /*#__PURE__*/_react.default.createElement(_compiled.Box, {
|
|
108
106
|
as: "span",
|
|
109
107
|
xcss: styles.icon
|
|
@@ -11,6 +11,7 @@ var _objectWithoutProperties2 = _interopRequireDefault(require("@babel/runtime/h
|
|
|
11
11
|
var _slicedToArray2 = _interopRequireDefault(require("@babel/runtime/helpers/slicedToArray"));
|
|
12
12
|
var _react = _interopRequireWildcard(require("react"));
|
|
13
13
|
var _reactIntlNext = require("react-intl-next");
|
|
14
|
+
var _platformFeatureFlags = require("@atlaskit/platform-feature-flags");
|
|
14
15
|
var _popup = _interopRequireDefault(require("@atlaskit/popup"));
|
|
15
16
|
var _constants = require("../../../constants");
|
|
16
17
|
var _messages = require("../../../messages");
|
|
@@ -219,7 +220,9 @@ var HoverCardComponent = exports.HoverCardComponent = function HoverCardComponen
|
|
|
219
220
|
onContextMenu: onContextMenuClick,
|
|
220
221
|
"data-testid": "hover-card-trigger-wrapper",
|
|
221
222
|
"aria-label": formatMessage(_messages.messages.more_information_about_this_work_item)
|
|
222
|
-
}
|
|
223
|
+
}, (0, _platformFeatureFlags.fg)('fix_a11y_violation_in_hover_card_trigger') ? {
|
|
224
|
+
role: 'button'
|
|
225
|
+
} : {}), children));
|
|
223
226
|
}, [children, initHideCard, initShowCard, onChildClick, onContextMenuClick, setMousePosition, formatMessage]);
|
|
224
227
|
return /*#__PURE__*/_react.default.createElement(_popup.default, {
|
|
225
228
|
testId: "hover-card",
|
|
@@ -20,7 +20,7 @@ var _excluded = ["href", "children", "checkSafety", "onClick", "testId", "isLink
|
|
|
20
20
|
_excluded2 = ["isLinkSafe", "showSafetyWarningModal"];
|
|
21
21
|
var PACKAGE_DATA = {
|
|
22
22
|
packageName: "@atlaskit/smart-card",
|
|
23
|
-
packageVersion: "36.0
|
|
23
|
+
packageVersion: "36.2.0",
|
|
24
24
|
componentName: 'linkUrl'
|
|
25
25
|
};
|
|
26
26
|
var Anchor = (0, _click.withLinkClickedEvent)('a');
|
|
@@ -45,6 +45,11 @@ var UnauthorisedViewContent = function UnauthorisedViewContent(_ref) {
|
|
|
45
45
|
target: "_blank",
|
|
46
46
|
"data-testid": "".concat(testId, "-learn-more"),
|
|
47
47
|
onClick: handleLearnMoreClick
|
|
48
|
+
// eslint-disable-next-line @atlaskit/ui-styling-standard/enforce-style-prop
|
|
49
|
+
,
|
|
50
|
+
style: {
|
|
51
|
+
textDecoration: 'underline'
|
|
52
|
+
}
|
|
48
53
|
}, /*#__PURE__*/_react.default.createElement(_reactIntlNext.FormattedMessage, learnMoreMessage)));
|
|
49
54
|
};
|
|
50
55
|
var _default = exports.default = UnauthorisedViewContent;
|
|
@@ -2,7 +2,7 @@ export const ANALYTICS_CHANNEL = 'media';
|
|
|
2
2
|
export const context = {
|
|
3
3
|
componentName: 'smart-cards',
|
|
4
4
|
packageName: "@atlaskit/smart-card",
|
|
5
|
-
packageVersion: "36.0
|
|
5
|
+
packageVersion: "36.2.0"
|
|
6
6
|
};
|
|
7
7
|
export let TrackQuickActionType = /*#__PURE__*/function (TrackQuickActionType) {
|
|
8
8
|
TrackQuickActionType["StatusUpdate"] = "StatusUpdate";
|
|
@@ -5,9 +5,8 @@ import { ax, ix } from "@compiled/react/runtime";
|
|
|
5
5
|
/* eslint-disable @atlaskit/design-system/use-tokens-typography */
|
|
6
6
|
|
|
7
7
|
import React, { forwardRef } from 'react';
|
|
8
|
-
import { cx } from '@compiled/react';
|
|
9
8
|
import { fg } from '@atlaskit/platform-feature-flags';
|
|
10
|
-
import { Box
|
|
9
|
+
import { Box } from '@atlaskit/primitives/compiled';
|
|
11
10
|
import { IconType } from '../../../../../constants';
|
|
12
11
|
import { messages } from '../../../../../messages';
|
|
13
12
|
import AtlaskitIcon from '../../common/atlaskit-icon';
|
|
@@ -96,13 +95,12 @@ const BadgeRefreshNew = /*#__PURE__*/forwardRef(({
|
|
|
96
95
|
if (!formattedMessageOrLabel || !badgeIcon) {
|
|
97
96
|
return null;
|
|
98
97
|
}
|
|
99
|
-
return /*#__PURE__*/React.createElement(
|
|
100
|
-
as: "span",
|
|
98
|
+
return /*#__PURE__*/React.createElement("span", {
|
|
101
99
|
"data-smart-element": name,
|
|
102
100
|
"data-smart-element-badge": true,
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
|
|
101
|
+
"data-testid": testId,
|
|
102
|
+
ref: ref,
|
|
103
|
+
className: ax([styles.container, colorMap[appearance]])
|
|
106
104
|
}, !hideIcon && /*#__PURE__*/React.createElement(Box, {
|
|
107
105
|
as: "span",
|
|
108
106
|
xcss: styles.icon
|
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
import _extends from "@babel/runtime/helpers/extends";
|
|
2
2
|
import React, { useCallback, useEffect, useRef } from 'react';
|
|
3
3
|
import { useIntl } from 'react-intl-next';
|
|
4
|
+
import { fg } from '@atlaskit/platform-feature-flags';
|
|
4
5
|
import Popup from '@atlaskit/popup';
|
|
5
6
|
import { ActionName, CardDisplay } from '../../../constants';
|
|
6
7
|
import { messages } from '../../../messages';
|
|
@@ -196,7 +197,9 @@ export const HoverCardComponent = ({
|
|
|
196
197
|
onContextMenu: onContextMenuClick,
|
|
197
198
|
"data-testid": "hover-card-trigger-wrapper",
|
|
198
199
|
"aria-label": formatMessage(messages.more_information_about_this_work_item)
|
|
199
|
-
}
|
|
200
|
+
}, fg('fix_a11y_violation_in_hover_card_trigger') ? {
|
|
201
|
+
role: 'button'
|
|
202
|
+
} : {}), children)), [children, initHideCard, initShowCard, onChildClick, onContextMenuClick, setMousePosition, formatMessage]);
|
|
200
203
|
return /*#__PURE__*/React.createElement(Popup, {
|
|
201
204
|
testId: "hover-card",
|
|
202
205
|
isOpen: isOpen && canOpen,
|
|
@@ -10,7 +10,7 @@ import LinkWarningModal from './LinkWarningModal';
|
|
|
10
10
|
import { useLinkWarningModal } from './LinkWarningModal/hooks/use-link-warning-modal';
|
|
11
11
|
const PACKAGE_DATA = {
|
|
12
12
|
packageName: "@atlaskit/smart-card",
|
|
13
|
-
packageVersion: "36.0
|
|
13
|
+
packageVersion: "36.2.0",
|
|
14
14
|
componentName: 'linkUrl'
|
|
15
15
|
};
|
|
16
16
|
const Anchor = withLinkClickedEvent('a');
|
|
@@ -36,6 +36,11 @@ const UnauthorisedViewContent = ({
|
|
|
36
36
|
target: "_blank",
|
|
37
37
|
"data-testid": `${testId}-learn-more`,
|
|
38
38
|
onClick: handleLearnMoreClick
|
|
39
|
+
// eslint-disable-next-line @atlaskit/ui-styling-standard/enforce-style-prop
|
|
40
|
+
,
|
|
41
|
+
style: {
|
|
42
|
+
textDecoration: 'underline'
|
|
43
|
+
}
|
|
39
44
|
}, /*#__PURE__*/React.createElement(FormattedMessage, learnMoreMessage)));
|
|
40
45
|
};
|
|
41
46
|
export default UnauthorisedViewContent;
|
|
@@ -4,7 +4,7 @@ export var ANALYTICS_CHANNEL = 'media';
|
|
|
4
4
|
export var context = {
|
|
5
5
|
componentName: 'smart-cards',
|
|
6
6
|
packageName: "@atlaskit/smart-card",
|
|
7
|
-
packageVersion: "36.0
|
|
7
|
+
packageVersion: "36.2.0"
|
|
8
8
|
};
|
|
9
9
|
export var TrackQuickActionType = /*#__PURE__*/function (TrackQuickActionType) {
|
|
10
10
|
TrackQuickActionType["StatusUpdate"] = "StatusUpdate";
|
|
@@ -7,9 +7,8 @@ import { ax, ix } from "@compiled/react/runtime";
|
|
|
7
7
|
/* eslint-disable @atlaskit/design-system/use-tokens-typography */
|
|
8
8
|
|
|
9
9
|
import React, { forwardRef } from 'react';
|
|
10
|
-
import { cx } from '@compiled/react';
|
|
11
10
|
import { fg } from '@atlaskit/platform-feature-flags';
|
|
12
|
-
import { Box
|
|
11
|
+
import { Box } from '@atlaskit/primitives/compiled';
|
|
13
12
|
import { IconType } from '../../../../../constants';
|
|
14
13
|
import { messages } from '../../../../../messages';
|
|
15
14
|
import AtlaskitIcon from '../../common/atlaskit-icon';
|
|
@@ -88,13 +87,12 @@ var BadgeRefreshNew = /*#__PURE__*/forwardRef(function (_ref, ref) {
|
|
|
88
87
|
if (!formattedMessageOrLabel || !badgeIcon) {
|
|
89
88
|
return null;
|
|
90
89
|
}
|
|
91
|
-
return /*#__PURE__*/React.createElement(
|
|
92
|
-
as: "span",
|
|
90
|
+
return /*#__PURE__*/React.createElement("span", {
|
|
93
91
|
"data-smart-element": name,
|
|
94
92
|
"data-smart-element-badge": true,
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
|
|
93
|
+
"data-testid": testId,
|
|
94
|
+
ref: ref,
|
|
95
|
+
className: ax([styles.container, colorMap[appearance]])
|
|
98
96
|
}, !hideIcon && /*#__PURE__*/React.createElement(Box, {
|
|
99
97
|
as: "span",
|
|
100
98
|
xcss: styles.icon
|
|
@@ -4,6 +4,7 @@ import _slicedToArray from "@babel/runtime/helpers/slicedToArray";
|
|
|
4
4
|
var _excluded = ["aria-haspopup", "aria-expanded"];
|
|
5
5
|
import React, { useCallback, useEffect, useRef } from 'react';
|
|
6
6
|
import { useIntl } from 'react-intl-next';
|
|
7
|
+
import { fg } from '@atlaskit/platform-feature-flags';
|
|
7
8
|
import Popup from '@atlaskit/popup';
|
|
8
9
|
import { ActionName, CardDisplay } from '../../../constants';
|
|
9
10
|
import { messages } from '../../../messages';
|
|
@@ -209,7 +210,9 @@ export var HoverCardComponent = function HoverCardComponent(_ref) {
|
|
|
209
210
|
onContextMenu: onContextMenuClick,
|
|
210
211
|
"data-testid": "hover-card-trigger-wrapper",
|
|
211
212
|
"aria-label": formatMessage(messages.more_information_about_this_work_item)
|
|
212
|
-
}
|
|
213
|
+
}, fg('fix_a11y_violation_in_hover_card_trigger') ? {
|
|
214
|
+
role: 'button'
|
|
215
|
+
} : {}), children));
|
|
213
216
|
}, [children, initHideCard, initShowCard, onChildClick, onContextMenuClick, setMousePosition, formatMessage]);
|
|
214
217
|
return /*#__PURE__*/React.createElement(Popup, {
|
|
215
218
|
testId: "hover-card",
|
|
@@ -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: "36.0
|
|
16
|
+
packageVersion: "36.2.0",
|
|
17
17
|
componentName: 'linkUrl'
|
|
18
18
|
};
|
|
19
19
|
var Anchor = withLinkClickedEvent('a');
|
|
@@ -35,6 +35,11 @@ var UnauthorisedViewContent = function UnauthorisedViewContent(_ref) {
|
|
|
35
35
|
target: "_blank",
|
|
36
36
|
"data-testid": "".concat(testId, "-learn-more"),
|
|
37
37
|
onClick: handleLearnMoreClick
|
|
38
|
+
// eslint-disable-next-line @atlaskit/ui-styling-standard/enforce-style-prop
|
|
39
|
+
,
|
|
40
|
+
style: {
|
|
41
|
+
textDecoration: 'underline'
|
|
42
|
+
}
|
|
38
43
|
}, /*#__PURE__*/React.createElement(FormattedMessage, learnMoreMessage)));
|
|
39
44
|
};
|
|
40
45
|
export default UnauthorisedViewContent;
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@atlaskit/smart-card",
|
|
3
|
-
"version": "36.0
|
|
3
|
+
"version": "36.2.0",
|
|
4
4
|
"description": "Smart card component",
|
|
5
5
|
"publishConfig": {
|
|
6
6
|
"registry": "https://registry.npmjs.org/"
|
|
@@ -39,9 +39,9 @@
|
|
|
39
39
|
"@atlaskit/form": "^12.0.0",
|
|
40
40
|
"@atlaskit/frontend-utilities": "^3.0.0",
|
|
41
41
|
"@atlaskit/heading": "^5.1.0",
|
|
42
|
-
"@atlaskit/icon": "^25.
|
|
42
|
+
"@atlaskit/icon": "^25.1.0",
|
|
43
43
|
"@atlaskit/icon-file-type": "^7.0.0",
|
|
44
|
-
"@atlaskit/icon-lab": "^4.
|
|
44
|
+
"@atlaskit/icon-lab": "^4.4.0",
|
|
45
45
|
"@atlaskit/icon-object": "^7.0.0",
|
|
46
46
|
"@atlaskit/icon-priority": "^6.3.0",
|
|
47
47
|
"@atlaskit/legacy-custom-icons": "^0.22.0",
|
|
@@ -101,7 +101,7 @@
|
|
|
101
101
|
"@atlaskit/visual-regression": "^0.10.0",
|
|
102
102
|
"@atlassian/analytics-tooling": "^0.5.0",
|
|
103
103
|
"@atlassian/feature-flags-test-utils": "^0.3.0",
|
|
104
|
-
"@atlassian/gemini": "^1.
|
|
104
|
+
"@atlassian/gemini": "^1.17.0",
|
|
105
105
|
"@testing-library/dom": "^10.1.0",
|
|
106
106
|
"@testing-library/jest-dom": "^6.4.5",
|
|
107
107
|
"@testing-library/react": "^13.4.0",
|
|
@@ -204,6 +204,9 @@
|
|
|
204
204
|
},
|
|
205
205
|
"confluence-issue-terminology-refresh": {
|
|
206
206
|
"type": "boolean"
|
|
207
|
+
},
|
|
208
|
+
"fix_a11y_violation_in_hover_card_trigger": {
|
|
209
|
+
"type": "boolean"
|
|
207
210
|
}
|
|
208
211
|
}
|
|
209
212
|
}
|