@atlaskit/smart-card 35.2.3 → 35.2.5

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 CHANGED
@@ -1,5 +1,20 @@
1
1
  # @atlaskit/smart-card
2
2
 
3
+ ## 35.2.5
4
+
5
+ ### Patch Changes
6
+
7
+ - Updated dependencies
8
+
9
+ ## 35.2.4
10
+
11
+ ### Patch Changes
12
+
13
+ - [#124093](https://bitbucket.org/atlassian/atlassian-frontend-monorepo/pull-requests/124093)
14
+ [`5c14a206462d8`](https://bitbucket.org/atlassian/atlassian-frontend-monorepo/commits/5c14a206462d8) -
15
+ Bugfix for AtlaskitIcon a11y issue
16
+ - Updated dependencies
17
+
3
18
  ## 35.2.3
4
19
 
5
20
  ### 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: "35.2.3"
14
+ packageVersion: "35.2.5"
15
15
  };
16
16
  var TrackQuickActionType = exports.TrackQuickActionType = /*#__PURE__*/function (TrackQuickActionType) {
17
17
  TrackQuickActionType["StatusUpdate"] = "StatusUpdate";
@@ -314,21 +314,21 @@ var AtlaskitIcon = function AtlaskitIcon(_ref3) {
314
314
  switch (icon) {
315
315
  case _constants.IconType.Document:
316
316
  return /*#__PURE__*/_react.default.createElement(DocumentIcon, (0, _extends2.default)({
317
- label: label || 'document',
317
+ label: label !== null && label !== void 0 ? label : 'document',
318
318
  testId: testId
319
319
  }, (0, _platformFeatureFlags.fg)('platform-smart-card-icon-migration') && {
320
320
  size: size
321
321
  }));
322
322
  case _constants.IconType.Blog:
323
323
  return /*#__PURE__*/_react.default.createElement(BlogIcon, (0, _extends2.default)({
324
- label: label || 'blog',
324
+ label: label !== null && label !== void 0 ? label : 'blog',
325
325
  testId: testId
326
326
  }, (0, _platformFeatureFlags.fg)('platform-smart-card-icon-migration') && {
327
327
  size: size
328
328
  }));
329
329
  case _constants.IconType.LiveDocument:
330
330
  return /*#__PURE__*/_react.default.createElement(_liveDocumentIcon.default, (0, _extends2.default)({
331
- label: label || 'live-doc',
331
+ label: label !== null && label !== void 0 ? label : 'live-doc',
332
332
  testId: testId
333
333
  }, (0, _platformFeatureFlags.fg)('platform-smart-card-icon-migration') && {
334
334
  size: size
@@ -57,7 +57,9 @@ var renderAtlaskitIcon = function renderAtlaskitIcon(icon, testId) {
57
57
  if (icon) {
58
58
  return /*#__PURE__*/React.createElement(_atlaskitIcon.default, (0, _extends2.default)({
59
59
  icon: icon,
60
- testId: "".concat(testId, "-icon")
60
+ testId: "".concat(testId, "-icon"),
61
+ "aria-hidden": "true",
62
+ label: "" // Since we already set aria-hidden="true", the label should be given an empty string
61
63
  }, (0, _platformFeatureFlags.fg)('platform-smart-card-icon-migration') && {
62
64
  size: size
63
65
  }));
@@ -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: "35.2.3",
23
+ packageVersion: "35.2.5",
24
24
  componentName: 'linkUrl'
25
25
  };
26
26
  var Anchor = (0, _click.withLinkClickedEvent)('a');
@@ -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: "35.2.3"
5
+ packageVersion: "35.2.5"
6
6
  };
7
7
  export let TrackQuickActionType = /*#__PURE__*/function (TrackQuickActionType) {
8
8
  TrackQuickActionType["StatusUpdate"] = "StatusUpdate";
@@ -117,21 +117,21 @@ const AtlaskitIcon = ({
117
117
  switch (icon) {
118
118
  case IconType.Document:
119
119
  return /*#__PURE__*/React.createElement(DocumentIcon, _extends({
120
- label: label || 'document',
120
+ label: label !== null && label !== void 0 ? label : 'document',
121
121
  testId: testId
122
122
  }, fg('platform-smart-card-icon-migration') && {
123
123
  size
124
124
  }));
125
125
  case IconType.Blog:
126
126
  return /*#__PURE__*/React.createElement(BlogIcon, _extends({
127
- label: label || 'blog',
127
+ label: label !== null && label !== void 0 ? label : 'blog',
128
128
  testId: testId
129
129
  }, fg('platform-smart-card-icon-migration') && {
130
130
  size
131
131
  }));
132
132
  case IconType.LiveDocument:
133
133
  return /*#__PURE__*/React.createElement(LiveDocumentIcon, _extends({
134
- label: label || 'live-doc',
134
+ label: label !== null && label !== void 0 ? label : 'live-doc',
135
135
  testId: testId
136
136
  }, fg('platform-smart-card-icon-migration') && {
137
137
  size
@@ -46,7 +46,9 @@ const renderAtlaskitIcon = (icon, testId, size = SmartLinkSize.Medium) => {
46
46
  if (icon) {
47
47
  return /*#__PURE__*/React.createElement(AtlaskitIcon, _extends({
48
48
  icon: icon,
49
- testId: `${testId}-icon`
49
+ testId: `${testId}-icon`,
50
+ "aria-hidden": "true",
51
+ label: "" // Since we already set aria-hidden="true", the label should be given an empty string
50
52
  }, fg('platform-smart-card-icon-migration') && {
51
53
  size
52
54
  }));
@@ -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: "35.2.3",
13
+ packageVersion: "35.2.5",
14
14
  componentName: 'linkUrl'
15
15
  };
16
16
  const Anchor = withLinkClickedEvent('a');
@@ -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: "35.2.3"
7
+ packageVersion: "35.2.5"
8
8
  };
9
9
  export var TrackQuickActionType = /*#__PURE__*/function (TrackQuickActionType) {
10
10
  TrackQuickActionType["StatusUpdate"] = "StatusUpdate";
@@ -182,21 +182,21 @@ var AtlaskitIcon = function AtlaskitIcon(_ref3) {
182
182
  switch (icon) {
183
183
  case IconType.Document:
184
184
  return /*#__PURE__*/React.createElement(DocumentIcon, _extends({
185
- label: label || 'document',
185
+ label: label !== null && label !== void 0 ? label : 'document',
186
186
  testId: testId
187
187
  }, fg('platform-smart-card-icon-migration') && {
188
188
  size: size
189
189
  }));
190
190
  case IconType.Blog:
191
191
  return /*#__PURE__*/React.createElement(BlogIcon, _extends({
192
- label: label || 'blog',
192
+ label: label !== null && label !== void 0 ? label : 'blog',
193
193
  testId: testId
194
194
  }, fg('platform-smart-card-icon-migration') && {
195
195
  size: size
196
196
  }));
197
197
  case IconType.LiveDocument:
198
198
  return /*#__PURE__*/React.createElement(LiveDocumentIcon, _extends({
199
- label: label || 'live-doc',
199
+ label: label !== null && label !== void 0 ? label : 'live-doc',
200
200
  testId: testId
201
201
  }, fg('platform-smart-card-icon-migration') && {
202
202
  size: size
@@ -48,7 +48,9 @@ var renderAtlaskitIcon = function renderAtlaskitIcon(icon, testId) {
48
48
  if (icon) {
49
49
  return /*#__PURE__*/React.createElement(AtlaskitIcon, _extends({
50
50
  icon: icon,
51
- testId: "".concat(testId, "-icon")
51
+ testId: "".concat(testId, "-icon"),
52
+ "aria-hidden": "true",
53
+ label: "" // Since we already set aria-hidden="true", the label should be given an empty string
52
54
  }, fg('platform-smart-card-icon-migration') && {
53
55
  size: size
54
56
  }));
@@ -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: "35.2.3",
16
+ packageVersion: "35.2.5",
17
17
  componentName: 'linkUrl'
18
18
  };
19
19
  var Anchor = withLinkClickedEvent('a');
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@atlaskit/smart-card",
3
- "version": "35.2.3",
3
+ "version": "35.2.5",
4
4
  "description": "Smart card component",
5
5
  "publishConfig": {
6
6
  "registry": "https://registry.npmjs.org/"
@@ -29,7 +29,7 @@
29
29
  "dependencies": {
30
30
  "@atlaskit/analytics-gas-types": "^5.1.0",
31
31
  "@atlaskit/analytics-next": "^11.0.0",
32
- "@atlaskit/avatar": "^24.0.0",
32
+ "@atlaskit/avatar": "^25.0.0",
33
33
  "@atlaskit/avatar-group": "^12.0.0",
34
34
  "@atlaskit/badge": "^18.1.0",
35
35
  "@atlaskit/button": "^21.1.0",
@@ -41,7 +41,7 @@
41
41
  "@atlaskit/heading": "^5.1.0",
42
42
  "@atlaskit/icon": "^24.1.0",
43
43
  "@atlaskit/icon-file-type": "^7.0.0",
44
- "@atlaskit/icon-lab": "^3.4.0",
44
+ "@atlaskit/icon-lab": "^3.5.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",
@@ -65,7 +65,7 @@
65
65
  "@atlaskit/textarea": "^8.0.0",
66
66
  "@atlaskit/textfield": "^8.0.0",
67
67
  "@atlaskit/theme": "^18.0.0",
68
- "@atlaskit/tokens": "^4.3.0",
68
+ "@atlaskit/tokens": "^4.4.0",
69
69
  "@atlaskit/tooltip": "^20.0.0",
70
70
  "@atlaskit/ufo": "^0.4.0",
71
71
  "@babel/runtime": "^7.0.0",
@@ -98,7 +98,7 @@
98
98
  "@atlaskit/css-reset": "^7.0.0",
99
99
  "@atlaskit/link-test-helpers": "^8.0.0",
100
100
  "@atlaskit/media-test-helpers": "^35.0.0",
101
- "@atlaskit/react-ufo": "^3.3.0",
101
+ "@atlaskit/react-ufo": "^3.4.0",
102
102
  "@atlaskit/ssr": "^0.4.0",
103
103
  "@atlaskit/visual-regression": "^0.10.0",
104
104
  "@atlassian/analytics-tooling": "^0.5.0",