@atlaskit/smart-card 43.20.8 → 43.22.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.
Files changed (102) hide show
  1. package/CHANGELOG.md +29 -0
  2. package/dist/cjs/__tests__/vr-tests/__snapshots__/action-lozenge/action-trigger--default--platform-navx-sl-lozenge-max-width-true.png +3 -0
  3. package/dist/cjs/__tests__/vr-tests/__snapshots__/flex-ui-elements/flex-ui-atlaskit-badge-view--default.png +2 -2
  4. package/dist/cjs/__tests__/vr-tests/__snapshots__/flexible-card/flexible-ui-element-badge--default--navx-1895-new-logo-design-false.png +2 -2
  5. package/dist/cjs/__tests__/vr-tests/__snapshots__/flexible-card/flexible-ui-element-badge--default--navx-1895-new-logo-design-true.png +2 -2
  6. package/dist/cjs/__tests__/vr-tests/__snapshots__/flexible-card/flexibleuielementlozenge--light-mode--platform-navx-sl-lozenge-max-width-false.png +3 -0
  7. package/dist/cjs/__tests__/vr-tests/__snapshots__/flexible-card/flexibleuielementlozenge--light-mode--platform-navx-sl-lozenge-max-width-true.png +3 -0
  8. package/dist/cjs/__tests__/vr-tests/__snapshots__/inline-card/inline-card-error-view--default.png +2 -2
  9. package/dist/cjs/__tests__/vr-tests/__snapshots__/inline-card/inline-card-error-view-renders-correctly-when-hovering-over-url-in-errored-view--default.png +2 -2
  10. package/dist/cjs/__tests__/vr-tests/__snapshots__/inline-card/inline-card-error-view-with-truncation--default.png +2 -2
  11. package/dist/cjs/extractors/flexible/icon/extract-document-type-icon.js +8 -41
  12. package/dist/cjs/extractors/flexible/icon/extract-file-formatIcon.js +22 -111
  13. package/dist/cjs/extractors/flexible/icon/extract-jsonld-data-icon.js +6 -31
  14. package/dist/cjs/utils/analytics/analytics.js +1 -1
  15. package/dist/cjs/utils/index.js +4 -6
  16. package/dist/cjs/view/EmbedModal/components/link-info/index.js +4 -4
  17. package/dist/cjs/view/EmbedModal/components/link-info/link-info-button/index.js +3 -6
  18. package/dist/cjs/view/FlexibleCard/components/container/layered-link/index.js +1 -5
  19. package/dist/cjs/view/FlexibleCard/components/elements/common/base-lozenge-element/index.js +12 -6
  20. package/dist/cjs/view/FlexibleCard/components/elements/common/base-lozenge-element/lozenge-action/index.js +6 -2
  21. package/dist/cjs/view/FlexibleCard/components/elements/common/base-lozenge-element/lozenge-action/lozenge-action-trigger/index.compiled.css +2 -0
  22. package/dist/cjs/view/FlexibleCard/components/elements/common/base-lozenge-element/lozenge-action/lozenge-action-trigger/index.js +16 -7
  23. package/dist/cjs/view/FlexibleCard/external.js +5 -2
  24. package/dist/cjs/view/InlineCard/Frame/styled.compiled.css +1 -0
  25. package/dist/cjs/view/InlineCard/Frame/styled.js +4 -4
  26. package/dist/cjs/view/InlineCard/index.js +4 -2
  27. package/dist/cjs/view/LinkUrl/index.js +1 -1
  28. package/dist/es2019/__tests__/vr-tests/__snapshots__/action-lozenge/action-trigger--default--platform-navx-sl-lozenge-max-width-true.png +3 -0
  29. package/dist/es2019/__tests__/vr-tests/__snapshots__/flex-ui-elements/flex-ui-atlaskit-badge-view--default.png +2 -2
  30. package/dist/es2019/__tests__/vr-tests/__snapshots__/flexible-card/flexible-ui-element-badge--default--navx-1895-new-logo-design-false.png +2 -2
  31. package/dist/es2019/__tests__/vr-tests/__snapshots__/flexible-card/flexible-ui-element-badge--default--navx-1895-new-logo-design-true.png +2 -2
  32. package/dist/es2019/__tests__/vr-tests/__snapshots__/flexible-card/flexibleuielementlozenge--light-mode--platform-navx-sl-lozenge-max-width-false.png +3 -0
  33. package/dist/es2019/__tests__/vr-tests/__snapshots__/flexible-card/flexibleuielementlozenge--light-mode--platform-navx-sl-lozenge-max-width-true.png +3 -0
  34. package/dist/es2019/__tests__/vr-tests/__snapshots__/inline-card/inline-card-error-view--default.png +2 -2
  35. package/dist/es2019/__tests__/vr-tests/__snapshots__/inline-card/inline-card-error-view-renders-correctly-when-hovering-over-url-in-errored-view--default.png +2 -2
  36. package/dist/es2019/__tests__/vr-tests/__snapshots__/inline-card/inline-card-error-view-with-truncation--default.png +2 -2
  37. package/dist/es2019/extractors/flexible/icon/extract-document-type-icon.js +8 -41
  38. package/dist/es2019/extractors/flexible/icon/extract-file-formatIcon.js +22 -111
  39. package/dist/es2019/extractors/flexible/icon/extract-jsonld-data-icon.js +6 -31
  40. package/dist/es2019/utils/analytics/analytics.js +1 -1
  41. package/dist/es2019/utils/index.js +3 -4
  42. package/dist/es2019/view/EmbedModal/components/link-info/index.js +4 -4
  43. package/dist/es2019/view/EmbedModal/components/link-info/link-info-button/index.js +4 -7
  44. package/dist/es2019/view/FlexibleCard/components/container/layered-link/index.js +1 -5
  45. package/dist/es2019/view/FlexibleCard/components/elements/common/base-lozenge-element/index.js +12 -6
  46. package/dist/es2019/view/FlexibleCard/components/elements/common/base-lozenge-element/lozenge-action/index.js +6 -2
  47. package/dist/es2019/view/FlexibleCard/components/elements/common/base-lozenge-element/lozenge-action/lozenge-action-trigger/index.compiled.css +2 -0
  48. package/dist/es2019/view/FlexibleCard/components/elements/common/base-lozenge-element/lozenge-action/lozenge-action-trigger/index.js +15 -6
  49. package/dist/es2019/view/FlexibleCard/external.js +4 -1
  50. package/dist/es2019/view/InlineCard/Frame/styled.compiled.css +1 -0
  51. package/dist/es2019/view/InlineCard/Frame/styled.js +3 -3
  52. package/dist/es2019/view/InlineCard/index.js +4 -2
  53. package/dist/es2019/view/LinkUrl/index.js +1 -1
  54. package/dist/esm/__tests__/vr-tests/__snapshots__/action-lozenge/action-trigger--default--platform-navx-sl-lozenge-max-width-true.png +3 -0
  55. package/dist/esm/__tests__/vr-tests/__snapshots__/flex-ui-elements/flex-ui-atlaskit-badge-view--default.png +2 -2
  56. package/dist/esm/__tests__/vr-tests/__snapshots__/flexible-card/flexible-ui-element-badge--default--navx-1895-new-logo-design-false.png +2 -2
  57. package/dist/esm/__tests__/vr-tests/__snapshots__/flexible-card/flexible-ui-element-badge--default--navx-1895-new-logo-design-true.png +2 -2
  58. package/dist/esm/__tests__/vr-tests/__snapshots__/flexible-card/flexibleuielementlozenge--light-mode--platform-navx-sl-lozenge-max-width-false.png +3 -0
  59. package/dist/esm/__tests__/vr-tests/__snapshots__/flexible-card/flexibleuielementlozenge--light-mode--platform-navx-sl-lozenge-max-width-true.png +3 -0
  60. package/dist/esm/__tests__/vr-tests/__snapshots__/inline-card/inline-card-error-view--default.png +2 -2
  61. package/dist/esm/__tests__/vr-tests/__snapshots__/inline-card/inline-card-error-view-renders-correctly-when-hovering-over-url-in-errored-view--default.png +2 -2
  62. package/dist/esm/__tests__/vr-tests/__snapshots__/inline-card/inline-card-error-view-with-truncation--default.png +2 -2
  63. package/dist/esm/extractors/flexible/icon/extract-document-type-icon.js +8 -41
  64. package/dist/esm/extractors/flexible/icon/extract-file-formatIcon.js +22 -111
  65. package/dist/esm/extractors/flexible/icon/extract-jsonld-data-icon.js +6 -31
  66. package/dist/esm/utils/analytics/analytics.js +1 -1
  67. package/dist/esm/utils/index.js +4 -6
  68. package/dist/esm/view/EmbedModal/components/link-info/index.js +4 -4
  69. package/dist/esm/view/EmbedModal/components/link-info/link-info-button/index.js +3 -6
  70. package/dist/esm/view/FlexibleCard/components/container/layered-link/index.js +1 -5
  71. package/dist/esm/view/FlexibleCard/components/elements/common/base-lozenge-element/index.js +12 -6
  72. package/dist/esm/view/FlexibleCard/components/elements/common/base-lozenge-element/lozenge-action/index.js +6 -2
  73. package/dist/esm/view/FlexibleCard/components/elements/common/base-lozenge-element/lozenge-action/lozenge-action-trigger/index.compiled.css +2 -0
  74. package/dist/esm/view/FlexibleCard/components/elements/common/base-lozenge-element/lozenge-action/lozenge-action-trigger/index.js +16 -7
  75. package/dist/esm/view/FlexibleCard/external.js +5 -2
  76. package/dist/esm/view/InlineCard/Frame/styled.compiled.css +1 -0
  77. package/dist/esm/view/InlineCard/Frame/styled.js +4 -4
  78. package/dist/esm/view/InlineCard/index.js +4 -2
  79. package/dist/esm/view/LinkUrl/index.js +1 -1
  80. package/dist/types/view/FlexibleCard/components/blocks/types.d.ts +2 -1
  81. package/dist/types/view/FlexibleCard/components/elements/common/base-lozenge-element/index.d.ts +2 -6
  82. package/dist/types/view/FlexibleCard/components/elements/common/base-lozenge-element/lozenge-action/lozenge-action-trigger/index.d.ts +1 -1
  83. package/dist/types/view/FlexibleCard/components/elements/common/base-lozenge-element/lozenge-action/lozenge-action-trigger/type.d.ts +2 -2
  84. package/dist/types/view/FlexibleCard/components/elements/common/base-lozenge-element/lozenge-action/types.d.ts +2 -2
  85. package/dist/types/view/FlexibleCard/external.d.ts +3 -2
  86. package/dist/types/view/InlineCard/Frame/index.d.ts +2 -1
  87. package/dist/types/view/InlineCard/Frame/styled.d.ts +2 -1
  88. package/dist/types-ts4.5/view/FlexibleCard/components/blocks/types.d.ts +2 -1
  89. package/dist/types-ts4.5/view/FlexibleCard/components/elements/common/base-lozenge-element/index.d.ts +2 -6
  90. package/dist/types-ts4.5/view/FlexibleCard/components/elements/common/base-lozenge-element/lozenge-action/lozenge-action-trigger/index.d.ts +1 -1
  91. package/dist/types-ts4.5/view/FlexibleCard/components/elements/common/base-lozenge-element/lozenge-action/lozenge-action-trigger/type.d.ts +2 -2
  92. package/dist/types-ts4.5/view/FlexibleCard/components/elements/common/base-lozenge-element/lozenge-action/types.d.ts +2 -2
  93. package/dist/types-ts4.5/view/FlexibleCard/external.d.ts +3 -2
  94. package/dist/types-ts4.5/view/InlineCard/Frame/index.d.ts +2 -1
  95. package/dist/types-ts4.5/view/InlineCard/Frame/styled.d.ts +2 -1
  96. package/package.json +9 -12
  97. package/dist/cjs/__tests__/vr-tests/__snapshots__/flexible-card/flexibleuielementlozenge--light-mode.png +0 -3
  98. package/dist/es2019/__tests__/vr-tests/__snapshots__/flexible-card/flexibleuielementlozenge--light-mode.png +0 -3
  99. package/dist/esm/__tests__/vr-tests/__snapshots__/flexible-card/flexibleuielementlozenge--light-mode.png +0 -3
  100. /package/dist/cjs/__tests__/vr-tests/__snapshots__/action-lozenge/{action-trigger--default.png → action-trigger--default--platform-navx-sl-lozenge-max-width-false.png} +0 -0
  101. /package/dist/es2019/__tests__/vr-tests/__snapshots__/action-lozenge/{action-trigger--default.png → action-trigger--default--platform-navx-sl-lozenge-max-width-false.png} +0 -0
  102. /package/dist/esm/__tests__/vr-tests/__snapshots__/action-lozenge/{action-trigger--default.png → action-trigger--default--platform-navx-sl-lozenge-max-width-false.png} +0 -0
@@ -1,5 +1,4 @@
1
1
  import { extractTitle } from '@atlaskit/link-extractors';
2
- import { fg } from '@atlaskit/platform-feature-flags';
3
2
  import { IconType } from '../../../constants';
4
3
  import { prioritiseIcon } from '../../common/icon';
5
4
  import { extractorPriorityMap as priorityMap } from '../../common/icon/priority';
@@ -62,58 +61,34 @@ function typeToIconDescriptor({
62
61
  }) {
63
62
  switch (type) {
64
63
  case 'atlassian:Goal':
65
- return fg('navx-2827-eslint-object-translation-smart-links') ? {
64
+ return {
66
65
  icon: IconType.Task,
67
66
  label
68
- } : {
69
- icon: IconType.Task,
70
- // eslint-disable-next-line @atlassian/i18n/no-literal-string-in-object
71
- label: label || 'Goal'
72
67
  };
73
68
  case 'atlassian:Project':
74
- return fg('navx-2827-eslint-object-translation-smart-links') ? {
69
+ return {
75
70
  icon: IconType.Project,
76
71
  label
77
- } : {
78
- icon: IconType.Project,
79
- // eslint-disable-next-line @atlassian/i18n/no-literal-string-in-object
80
- label: label || 'Project'
81
72
  };
82
73
  case 'atlassian:SourceCodeCommit':
83
- return fg('navx-2827-eslint-object-translation-smart-links') ? {
74
+ return {
84
75
  icon: IconType.Commit,
85
76
  label
86
- } : {
87
- icon: IconType.Commit,
88
- // eslint-disable-next-line @atlassian/i18n/no-literal-string-in-object
89
- label: label || 'Commit'
90
77
  };
91
78
  case 'atlassian:SourceCodePullRequest':
92
- return fg('navx-2827-eslint-object-translation-smart-links') ? {
79
+ return {
93
80
  icon: IconType.PullRequest,
94
81
  label
95
- } : {
96
- icon: IconType.PullRequest,
97
- // eslint-disable-next-line @atlassian/i18n/no-literal-string-in-object
98
- label: label || 'Pull request'
99
82
  };
100
83
  case 'atlassian:SourceCodeReference':
101
- return fg('navx-2827-eslint-object-translation-smart-links') ? {
84
+ return {
102
85
  icon: IconType.Branch,
103
86
  label
104
- } : {
105
- icon: IconType.Branch,
106
- // eslint-disable-next-line @atlassian/i18n/no-literal-string-in-object
107
- label: label || 'Reference'
108
87
  };
109
88
  case 'atlassian:SourceCodeRepository':
110
- return fg('navx-2827-eslint-object-translation-smart-links') ? {
89
+ return {
111
90
  icon: IconType.Repo,
112
91
  label
113
- } : {
114
- icon: IconType.Repo,
115
- // eslint-disable-next-line @atlassian/i18n/no-literal-string-in-object
116
- label: label || 'Repository'
117
92
  };
118
93
  case 'atlassian:Task':
119
94
  const taskLabel = label || 'Task';
@@ -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: "43.20.7"
5
+ packageVersion: "43.21.0"
6
6
  };
7
7
  export let TrackQuickActionType = /*#__PURE__*/function (TrackQuickActionType) {
8
8
  TrackQuickActionType["StatusUpdate"] = "StatusUpdate";
@@ -30,7 +30,7 @@ export const getIconForFileType = fileMimeType => {
30
30
  if (!icon) {
31
31
  return;
32
32
  }
33
- const [label, importCb] = icon;
33
+ const [importCb] = icon;
34
34
  if (!importCb) {
35
35
  return;
36
36
  }
@@ -40,7 +40,6 @@ export const getIconForFileType = fileMimeType => {
40
40
  }); // because we're using dynamic loading here, TS will not be able to infer the type
41
41
 
42
42
  return /*#__PURE__*/React.createElement(Icon, {
43
- label: label,
44
43
  testId: "document-file-format-icon"
45
44
  });
46
45
  };
@@ -286,11 +285,11 @@ export const getLazyIcons = () => {
286
285
  const getTypeToIconMap = fileFormat => {
287
286
  var _lazyIcons$iconDescri;
288
287
  const iconDescriptor = extractFileFormatIcon(fileFormat);
289
- if (!(iconDescriptor !== null && iconDescriptor !== void 0 && iconDescriptor.icon) || !iconDescriptor.label) {
288
+ if (!(iconDescriptor !== null && iconDescriptor !== void 0 && iconDescriptor.icon)) {
290
289
  return null;
291
290
  }
292
291
  const lazyIcons = getLazyIcons();
293
- return [iconDescriptor.label, (_lazyIcons$iconDescri = lazyIcons[iconDescriptor.icon]) === null || _lazyIcons$iconDescri === void 0 ? void 0 : _lazyIcons$iconDescri.default];
292
+ return [(_lazyIcons$iconDescri = lazyIcons[iconDescriptor.icon]) === null || _lazyIcons$iconDescri === void 0 ? void 0 : _lazyIcons$iconDescri.default];
294
293
  };
295
294
  export const getIframeSandboxAttribute = isTrusted => {
296
295
  if (isTrusted) {
@@ -72,8 +72,8 @@ const LinkInfo = ({
72
72
  label: messages.viewOriginal,
73
73
  onClick: onViewButtonClick,
74
74
  testId: `${testId}-url`,
75
- role: fg('navx-2185-smart-link-preview-modal-icon-role') ? 'link' : '',
76
- "aria-label": fg('navx-2185-smart-link-preview-modal-icon-role') ? messages.viewOriginal : ''
75
+ role: 'link',
76
+ "aria-label": messages.viewOriginal
77
77
  });
78
78
  }
79
79
  }, [onViewButtonClick, providerName, testId]);
@@ -172,8 +172,8 @@ const LinkInfoNew = ({
172
172
  label: messages.viewOriginal,
173
173
  onClick: onViewButtonClick,
174
174
  testId: `${testId}-url`,
175
- role: fg('navx-2185-smart-link-preview-modal-icon-role') ? 'link' : '',
176
- "aria-label": fg('navx-2185-smart-link-preview-modal-icon-role') ? messages.viewOriginal : ''
175
+ role: 'link',
176
+ "aria-label": messages.viewOriginal
177
177
  });
178
178
  }
179
179
  }, [onViewButtonClick, providerName, testId]);
@@ -1,8 +1,6 @@
1
- import _extends from "@babel/runtime/helpers/extends";
2
1
  import React from 'react';
3
2
  import { useIntl } from 'react-intl-next';
4
3
  import { IconButton } from '@atlaskit/button/new';
5
- import { fg } from '@atlaskit/platform-feature-flags';
6
4
  import Tooltip from '@atlaskit/tooltip';
7
5
  import { useMouseDownEvent } from '../../../../../state/analytics/useLinkClicked';
8
6
  const LinkInfoButton = ({
@@ -22,15 +20,14 @@ const LinkInfoButton = ({
22
20
  hideTooltipOnClick: true,
23
21
  tag: "span",
24
22
  testId: `${testId}-tooltip`
25
- }, /*#__PURE__*/React.createElement(IconButton, _extends({
23
+ }, /*#__PURE__*/React.createElement(IconButton, {
26
24
  appearance: "subtle",
27
25
  icon: icon,
28
26
  label: formatMessage(label),
29
27
  onClick: onClick,
30
28
  onMouseDown: onMouseDown,
31
- testId: `${testId}-button`
32
- }, fg('navx-2185-smart-link-preview-modal-icon-role') ? {
33
- role
34
- } : {})));
29
+ testId: `${testId}-button`,
30
+ role: role
31
+ }));
35
32
  };
36
33
  export default LinkInfoButton;
@@ -2,7 +2,6 @@
2
2
  import "./index.compiled.css";
3
3
  import * as React from 'react';
4
4
  import { ax, ix } from "@compiled/react/runtime";
5
- import { fg } from '@atlaskit/platform-feature-flags';
6
5
  import { useMouseDownEvent } from '../../../../../state/analytics/useLinkClicked';
7
6
  const styles = null;
8
7
 
@@ -26,10 +25,7 @@ const LayeredLink = ({
26
25
  href: url,
27
26
  onClick: onClick,
28
27
  onMouseDown: onMouseDown,
29
- target: target,
30
- tabIndex: fg('platform-linking-smart-card-layered-link-a11y') ? undefined : -1 // Hide tab index and let the title link be the link.
31
- ,
32
- "aria-hidden": fg('platform-linking-smart-card-layered-link-a11y') ? undefined : true // This is to avoid screen readers reading out the link twice.
28
+ target: target
33
29
  }, text);
34
30
  };
35
31
  export default LayeredLink;
@@ -18,28 +18,34 @@ const styles = null;
18
18
  const BaseLozengeElement = ({
19
19
  action,
20
20
  appearance = 'default',
21
- name,
22
21
  className,
22
+ maxWidth,
23
+ name,
24
+ onAfterChanged,
23
25
  style,
24
26
  text,
25
- testId = 'smart-element-lozenge',
26
- onAfterChanged
27
+ testId = 'smart-element-lozenge'
27
28
  }) => {
28
29
  const ui = useFlexibleUiOptionContext();
29
30
  if (!text) {
30
31
  return null;
31
32
  }
32
- const lozenge = action ? /*#__PURE__*/React.createElement(LozengeAction, {
33
+ const lozenge = action ? /*#__PURE__*/React.createElement(LozengeAction, _extends({
33
34
  action: action,
34
- appearance: appearance,
35
+ appearance: appearance
36
+ }, fg('platform_navx_sl_lozenge_max_width') ? {
37
+ maxWidth
38
+ } : undefined, {
35
39
  testId: testId,
36
40
  text: text,
37
41
  zIndex: ui === null || ui === void 0 ? void 0 : ui.zIndex,
38
42
  onAfterChanged: onAfterChanged
39
- }) : /*#__PURE__*/React.createElement(AtlaskitLozenge, _extends({
43
+ })) : /*#__PURE__*/React.createElement(AtlaskitLozenge, _extends({
40
44
  appearance: appearance
41
45
  }, fg('platform-component-visual-refresh') ? {
42
46
  isBold: true
47
+ } : undefined, fg('platform_navx_sl_lozenge_max_width') ? {
48
+ maxWidth
43
49
  } : undefined, {
44
50
  // eslint-disable-next-line @atlaskit/ui-styling-standard/enforce-style-prop -- Ignored via go/DSP-18766
45
51
  style: style,
@@ -21,6 +21,7 @@ const validateItems = (items = [], text) => {
21
21
  const LozengeAction = ({
22
22
  action,
23
23
  appearance,
24
+ maxWidth,
24
25
  testId = 'smart-element-lozenge-action',
25
26
  text,
26
27
  zIndex,
@@ -86,10 +87,13 @@ const LozengeAction = ({
86
87
  }, [action.read, invoke, isLoaded, text, fireEvent]);
87
88
  const trigger = useCallback(props => /*#__PURE__*/React.createElement(LozengeActionTrigger, _extends({}, props, {
88
89
  appearance: selected.appearance,
89
- isOpen: isOpen,
90
+ isOpen: isOpen
91
+ }, fg('platform_navx_sl_lozenge_max_width') ? {
92
+ maxWidth
93
+ } : undefined, {
90
94
  testId: testId,
91
95
  text: selected.text
92
- })), [selected.appearance, selected.text, isOpen, testId]);
96
+ })), [selected.appearance, selected.text, isOpen, maxWidth, testId]);
93
97
  const handleItemClick = useCallback(async (id, text, appearance) => {
94
98
  try {
95
99
  fireEvent('ui.button.clicked.smartLinkStatusListItem', {});
@@ -13,6 +13,7 @@
13
13
  ._18u0v77o{margin-left:var(--ds-space-025,2px)}
14
14
  ._19bvidpf{padding-left:0}
15
15
  ._19pkv77o{margin-top:var(--ds-space-025,2px)}
16
+ ._1bto1l2s{text-overflow:ellipsis}
16
17
  ._1e0c1txw{display:flex}
17
18
  ._1p1dn7od{text-transform:unset}
18
19
  ._1q2vglyw[aria-expanded=true]{outline-style:none}
@@ -29,6 +30,7 @@
29
30
  ._j8b81o36[aria-expanded=true]{outline-width:medium}
30
31
  ._k48pn7od{font-weight:unset}
31
32
  ._n3tdidpf{padding-bottom:0}
33
+ ._o5721q9c{white-space:nowrap}
32
34
  ._otyrv77o{margin-bottom:var(--ds-space-025,2px)}
33
35
  ._p8tl1r31[aria-expanded=true]{outline-color:currentColor}
34
36
  ._syazn7od{color:unset}
@@ -18,11 +18,13 @@ const styles = {
18
18
  lozengeContainer: "_kkk2n7od _2rko12b0 _1dqonqa1 _189ee4h9 _1h6d1j28 _bfhk1j28 _1e0c1txw _4cvr1h6o _4t3i7vkz",
19
19
  lozengeContainerSelected: "_1reo15vq _18m915vq _1h6d1v1w"
20
20
  };
21
+ const textStyles = null;
21
22
  const triggerLozengeStyles = null;
22
23
  const triggerButtonStyles = null;
23
24
  const LozengeActionTrigger = ({
24
25
  appearance,
25
26
  isOpen,
27
+ maxWidth,
26
28
  testId,
27
29
  text,
28
30
  triggerRef,
@@ -57,18 +59,22 @@ const LozengeActionTrigger = ({
57
59
  return /*#__PURE__*/React.createElement(Box, {
58
60
  xcss: cx(styles.lozengeContainer, (isOpen || isPressing) && styles.lozengeContainerSelected),
59
61
  as: "span"
60
- }, /*#__PURE__*/React.createElement(Lozenge, {
62
+ }, /*#__PURE__*/React.createElement(Lozenge, _extends({
61
63
  appearance: appearance,
62
64
  isBold: fg('platform-component-visual-refresh') ? true : isHovering
65
+ }, fg('platform_navx_sl_lozenge_max_width') ? {
66
+ maxWidth
67
+ } : undefined, {
63
68
  // eslint-disable-next-line @atlaskit/ui-styling-standard/enforce-style-prop
64
- ,
65
69
  style: {
66
70
  backgroundColor: lozengeBackgroundColor,
67
71
  color: lozengeForegroundColor
68
72
  }
69
- }, /*#__PURE__*/React.createElement("span", {
73
+ }), /*#__PURE__*/React.createElement("span", {
70
74
  className: ax(["_4cvr1h6o _1e0c1txw"])
71
- }, /*#__PURE__*/React.createElement("span", null, text), /*#__PURE__*/React.createElement(Box, {
75
+ }, /*#__PURE__*/React.createElement("span", {
76
+ className: ax([fg('platform_navx_sl_lozenge_max_width') && "_1reo15vq _18m915vq _1bto1l2s _o5721q9c"])
77
+ }, text), /*#__PURE__*/React.createElement(Box, {
72
78
  as: "span",
73
79
  xcss: styles.chevronDown
74
80
  }, /*#__PURE__*/React.createElement(ChevronDownIcon, {
@@ -77,12 +83,15 @@ const LozengeActionTrigger = ({
77
83
  size: "small",
78
84
  "aria-hidden": true
79
85
  })))));
80
- }, [appearance, isHovering, isPressing, text, isOpen, lozengeBackgroundColor, lozengeForegroundColor]);
86
+ }, [appearance, isHovering, isPressing, text, isOpen, lozengeBackgroundColor, lozengeForegroundColor, maxWidth]);
81
87
  return /*#__PURE__*/React.createElement("button", _extends({
82
88
  type: "button"
83
89
  }, props, {
84
90
  "data-action-open": isOpen,
85
- "data-testid": `${testId}--trigger`
91
+ "data-testid": `${testId}--trigger`,
92
+ style: {
93
+ maxWidth: fg('platform_navx_sl_lozenge_max_width') ? maxWidth : undefined
94
+ }
86
95
  // eslint-disable-next-line @atlassian/a11y/mouse-events-have-key-events
87
96
  ,
88
97
  onMouseEnter: onMouseEnter
@@ -8,6 +8,7 @@ import _extends from "@babel/runtime/helpers/extends";
8
8
  * DO NOT add a new prop to these components until we are ready to support it externally.
9
9
  */
10
10
  import React from 'react';
11
+ import { fg } from '@atlaskit/platform-feature-flags';
11
12
  import { SmartLinkSize } from '../../constants';
12
13
  import { CopyLinkAction as CopyLinkActionComponent, CustomAction as CustomActionComponent, DownloadAction as DownloadActionComponent, FollowAction as FollowActionComponent, PreviewAction as PreviewActionComponent, UnresolvedAction as UnresolvedActionComponent } from './components/actions';
13
14
  import { AssignedTo, AssignedToGroup, AttachmentCount, AuthorGroup, ChecklistProgress, CollaboratorGroup, CommentCount, CreatedBy, CreatedOn, DueOn, LatestCommit, LinkIcon, Location, ModifiedBy, ModifiedOn, OwnedBy, OwnedByGroup, Preview, Priority, ProgrammingLanguage, Provider, ReactCount, ReadTime, SentOn, Snippet, SourceBranch, State, StoryPoints, SubscriberCount, SubTasksProgress, TargetBranch, Title, ViewCount, VoteCount } from './components/elements';
@@ -80,7 +81,9 @@ export const SnippetElement = props => /*#__PURE__*/React.createElement(Snippet,
80
81
  content: props === null || props === void 0 ? void 0 : props.text
81
82
  });
82
83
  export const SourceBranchElement = () => /*#__PURE__*/React.createElement(SourceBranch, null);
83
- export const StateElement = () => /*#__PURE__*/React.createElement(State, null);
84
+ export const StateElement = props => /*#__PURE__*/React.createElement(State, fg('platform_navx_sl_lozenge_max_width') ? {
85
+ maxWidth: props === null || props === void 0 ? void 0 : props.maxWidth
86
+ } : undefined);
84
87
  export const StoryPointsElement = () => /*#__PURE__*/React.createElement(StoryPoints, null);
85
88
  export const SubscriberCountElement = () => /*#__PURE__*/React.createElement(SubscriberCount, null);
86
89
  export const SubTasksProgressElement = () => /*#__PURE__*/React.createElement(SubTasksProgress, null);
@@ -13,6 +13,7 @@
13
13
  ._1bto1l2s{text-overflow:ellipsis}
14
14
  ._1e0c1abx{display:-webkit-inline-box}
15
15
  ._1e0c1nu9{display:inline}
16
+ ._1hms8stv{text-decoration-line:underline}
16
17
  ._1hmsglyw{text-decoration-line:none}
17
18
  ._1nmz9jpi{word-break:break-all}
18
19
  ._1qu2glyw{outline-style:none}
@@ -3,15 +3,14 @@ import _extends from "@babel/runtime/helpers/extends";
3
3
  import "./styled.compiled.css";
4
4
  import { ax, ix } from "@compiled/react/runtime";
5
5
  import React, { forwardRef } from 'react';
6
+ import { fg } from '@atlaskit/platform-feature-flags';
6
7
  import { B100, B200, B400, B50, N40 } from '@atlaskit/theme/colors';
7
8
  import { expVal } from '@atlaskit/tmp-editor-statsig/expVal';
8
9
  export const WrapperSpan = /*#__PURE__*/forwardRef(({
9
10
  truncateInline,
10
11
  withoutBackground,
11
12
  isHovered,
12
- isInteractive,
13
13
  isSelected,
14
- href,
15
14
  viewType,
16
15
  ...props
17
16
  }, ref) => {
@@ -37,7 +36,7 @@ export const WrapperAnchor = /*#__PURE__*/forwardRef(({
37
36
  href: href,
38
37
  ref: ref
39
38
  }, props, {
40
- className: ax(["_1yt4x7n9 _2rko12b0 _v56415x0 _1e0c1nu9 _16d9qvcn _syaz1y58 _1rkwglyw _4cvxmr28", truncateInline && "_1reo15vq _18m915vq _ca0qidpf _u5f3idpf _n3tdidpf _19bvidpf _1bto1l2s _1nmz9jpi _1e0c1abx _1yyjkb7n _sudp1e54 _nr8z1o8l _1voyv77o _3kwxidpf _jqg5v77o _6vwiidpf", truncateInline && experimentValue !== 'control' && "_syaz15cr", withoutBackground ? "_19bvidpf _18u01i6y" : "_19it1x13 _bfhkhp5a _1a3b1r31 _4fprglyw _5goinqa1 _9oik1r31 _1bnxglyw _jf4cnqa1 _1nrm1r31 _c2waglyw _1iohnqa1", isHovered && "_1h6dmr28", isHovered && !withoutBackground && "_4bfu1r31 _1hmsglyw _ajmmnqa1", isSelected ? "_12ji1r31 _1qu2glyw _12y31o36 _80omtlke _16qscw00 _uiztglyw _1a3b1r31 _4fprglyw _5goinqa1 _9oik1r31 _1bnxglyw _jf4cnqa1 _bfw71x13 _1nrm1r31 _c2waglyw _1iohnqa1" : "_uizt1kdv", isInteractive && "_nt751r31 _49pcglyw _1hvw1o36 _1372tlke _7ehicw00 _1j5pglyw _1di629zg"])
39
+ className: ax(["_1yt4x7n9 _2rko12b0 _v56415x0 _1e0c1nu9 _16d9qvcn _syaz1y58 _1rkwglyw _4cvxmr28", truncateInline && "_1reo15vq _18m915vq _ca0qidpf _u5f3idpf _n3tdidpf _19bvidpf _1bto1l2s _1nmz9jpi _1e0c1abx _1yyjkb7n _sudp1e54 _nr8z1o8l _1voyv77o _3kwxidpf _jqg5v77o _6vwiidpf", truncateInline && experimentValue !== 'control' && "_syaz15cr", withoutBackground ? "_19bvidpf _18u01i6y" : "_19it1x13 _bfhkhp5a _1a3b1r31 _4fprglyw _5goinqa1 _9oik1r31 _1bnxglyw _jf4cnqa1 _1nrm1r31 _c2waglyw _1iohnqa1", isHovered && "_1h6dmr28", isHovered && !withoutBackground && "_4bfu1r31 _1hmsglyw _ajmmnqa1", isSelected ? "_12ji1r31 _1qu2glyw _12y31o36 _80omtlke _16qscw00 _uiztglyw _1a3b1r31 _4fprglyw _5goinqa1 _9oik1r31 _1bnxglyw _jf4cnqa1 _bfw71x13 _1nrm1r31 _c2waglyw _1iohnqa1" : "_uizt1kdv", isInteractive && "_nt751r31 _49pcglyw _1hvw1o36 _1372tlke _7ehicw00 _1j5pglyw _1di629zg", viewType === 'errored' && fg('navx-2565-inline-card-error-state-underline') && "_4bfu1r31 _1hms8stv _ajmmnqa1 _9oik1r31 _1bnxglyw _jf4cnqa1"])
41
40
  }), props.children);
42
41
  });
43
42
  const baseWrapperStyles = null;
@@ -46,6 +45,7 @@ const baseWrapperStyles = null;
46
45
  const interactiveStyles = null;
47
46
  const hoveredStyles = null;
48
47
  const hoveredWithBackgroundStyles = null;
48
+ const errorViewTypeStyles = null;
49
49
  const withoutBackgroundStyles = null;
50
50
  const withBackgroundStyles = null;
51
51
  const truncateStyles = null;
@@ -156,12 +156,14 @@ export const InlineCard = ({
156
156
  case 'fallback':
157
157
  case 'errored':
158
158
  default:
159
- return /*#__PURE__*/React.createElement(CardLinkView, {
159
+ return /*#__PURE__*/React.createElement(CardLinkView, _extends({
160
160
  link: url,
161
161
  isSelected: isSelected,
162
162
  onClick: handleFrameClick,
163
163
  testId: testIdWithStatus || 'inline-card-errored-view',
164
164
  truncateInline: truncateInline
165
- });
165
+ }, fg('navx-2565-inline-card-error-state-underline') ? {
166
+ viewType: 'errored'
167
+ } : {}));
166
168
  }
167
169
  };
@@ -12,7 +12,7 @@ import LinkWarningModal from './LinkWarningModal';
12
12
  import { useLinkWarningModal } from './LinkWarningModal/hooks/use-link-warning-modal';
13
13
  const PACKAGE_DATA = {
14
14
  packageName: "@atlaskit/smart-card",
15
- packageVersion: "43.20.7",
15
+ packageVersion: "43.21.0",
16
16
  componentName: 'linkUrl'
17
17
  };
18
18
  const Anchor = withLinkClickedEvent('a');
@@ -0,0 +1,3 @@
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:a54da48270d4ee29edca083b504ad489927ec4ff1161b652ad4360fe471ae5e0
3
+ size 1921
@@ -1,3 +1,3 @@
1
1
  version https://git-lfs.github.com/spec/v1
2
- oid sha256:48fb56e2f9587b60f4d0f612c2a7461db21693797621e0d8d62e8456c62535f8
3
- size 5010
2
+ oid sha256:4febc55bef67ab94fd67fbe34afb8efbe728b81605ec537fb8b97cc66f78780e
3
+ size 8404
@@ -1,3 +1,3 @@
1
1
  version https://git-lfs.github.com/spec/v1
2
- oid sha256:1bf5409f5143a160b5bb5269da8d7f6e3575c174b1edb207fb584842d7695716
3
- size 72911
2
+ oid sha256:fd4ce1e874bb5cef90c294ea4d3c15691e816b1077d7309a1cbebd588cbc838b
3
+ size 69991
@@ -1,3 +1,3 @@
1
1
  version https://git-lfs.github.com/spec/v1
2
- oid sha256:0c112eb8de1d2c9606a8a45b6e53a30dff607faef1110f483084e53480a82cf8
3
- size 73353
2
+ oid sha256:37e1a1a35f2fa0001447c300169b583c490e89a4d27f6b1e605ec516889b8deb
3
+ size 70441
@@ -0,0 +1,3 @@
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:eb6de90a1630f1cabfedf29c6abd8bf24bafb5f82597bac022bcd2e9aa4ff176
3
+ size 26308
@@ -0,0 +1,3 @@
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:8e3096d4d354e004dd2a15fd3bda5fd8ebcc79a367e15289ba57b1d7597508ca
3
+ size 26864
@@ -1,3 +1,3 @@
1
1
  version https://git-lfs.github.com/spec/v1
2
- oid sha256:1468f38bb5f4a548b6234872a842329d0292a9e5f8f02f63845e4bfb5ac03866
3
- size 2300
2
+ oid sha256:ac3cb4d7414bc39e617615146ecf45fec6233b9dc4dbfc44b4159fd1b15ff064
3
+ size 2237
@@ -1,3 +1,3 @@
1
1
  version https://git-lfs.github.com/spec/v1
2
- oid sha256:54ff0dc6712d82312ae41bb20d935420965efe758657193a42a7344546671f35
3
- size 2328
2
+ oid sha256:10a91775c476b53cb155078f29f8877f33d6deced7773c24cee25290bb9c0533
3
+ size 2205
@@ -1,3 +1,3 @@
1
1
  version https://git-lfs.github.com/spec/v1
2
- oid sha256:4ff73e38c2b10439230bd09b7b597cc14f659ffd905d611f9eac13ef5b997513
3
- size 1522
2
+ oid sha256:78f131b89db0ba674b76b3417b107aac92d0cdb05b7d29d472a50cc9d3a0bbb6
3
+ size 1499
@@ -1,5 +1,4 @@
1
1
  import { isConfluenceGenerator } from '@atlaskit/link-extractors';
2
- import { fg } from '@atlaskit/platform-feature-flags';
3
2
  import { IconType } from '../../../constants';
4
3
  /**
5
4
  * Computes the relevant icon for a document type.
@@ -19,78 +18,46 @@ import { IconType } from '../../../constants';
19
18
  var extractDocumentTypeIcon = function extractDocumentTypeIcon(documentType, label, providerId) {
20
19
  switch (documentType) {
21
20
  case 'schema:BlogPosting':
22
- return fg('navx-2827-eslint-object-translation-smart-links') ? {
21
+ return {
23
22
  icon: IconType.Blog,
24
23
  label: label
25
- } : {
26
- icon: IconType.Blog,
27
- // eslint-disable-next-line @atlassian/i18n/no-literal-string-in-object
28
- label: label || 'Blog'
29
24
  };
30
25
  case 'schema:DigitalDocument':
31
26
  if (providerId && isConfluenceGenerator(providerId)) {
32
- return fg('navx-2827-eslint-object-translation-smart-links') ? {
27
+ return {
33
28
  icon: IconType.LiveDocument,
34
29
  label: label
35
- } : {
36
- icon: IconType.LiveDocument,
37
- // eslint-disable-next-line @atlassian/i18n/no-literal-string-in-object
38
- label: label || 'Live Document'
39
30
  };
40
31
  } else {
41
- return fg('navx-2827-eslint-object-translation-smart-links') ? {
32
+ return {
42
33
  icon: IconType.File,
43
34
  label: label
44
- } : {
45
- icon: IconType.File,
46
- // eslint-disable-next-line @atlassian/i18n/no-literal-string-in-object
47
- label: label || 'File'
48
35
  };
49
36
  }
50
37
  case 'schema:TextDigitalDocument':
51
- return fg('navx-2827-eslint-object-translation-smart-links') ? {
38
+ return {
52
39
  icon: IconType.Document,
53
40
  label: label
54
- } : {
55
- icon: IconType.Document,
56
- // eslint-disable-next-line @atlassian/i18n/no-literal-string-in-object
57
- label: label || 'Document'
58
41
  };
59
42
  case 'schema:PresentationDigitalDocument':
60
- return fg('navx-2827-eslint-object-translation-smart-links') ? {
43
+ return {
61
44
  icon: IconType.Presentation,
62
45
  label: label
63
- } : {
64
- icon: IconType.Presentation,
65
- // eslint-disable-next-line @atlassian/i18n/no-literal-string-in-object
66
- label: label || 'Presentation'
67
46
  };
68
47
  case 'schema:SpreadsheetDigitalDocument':
69
- return fg('navx-2827-eslint-object-translation-smart-links') ? {
48
+ return {
70
49
  icon: IconType.Spreadsheet,
71
50
  label: label
72
- } : {
73
- icon: IconType.Spreadsheet,
74
- // eslint-disable-next-line @atlassian/i18n/no-literal-string-in-object
75
- label: label || 'Spreadsheet'
76
51
  };
77
52
  case 'atlassian:Template':
78
- return fg('navx-2827-eslint-object-translation-smart-links') ? {
53
+ return {
79
54
  icon: IconType.Template,
80
55
  label: label
81
- } : {
82
- icon: IconType.Template,
83
- // eslint-disable-next-line @atlassian/i18n/no-literal-string-in-object
84
- label: label || 'Template'
85
56
  };
86
57
  case 'atlassian:UndefinedLink':
87
- return fg('navx-2827-eslint-object-translation-smart-links') ? {
58
+ return {
88
59
  icon: IconType.Document,
89
60
  label: label
90
- } : {
91
- icon: IconType.Document,
92
- // eslint-disable-next-line @atlassian/i18n/no-literal-string-in-object
93
- label: label || 'Undefined link'
94
61
  };
95
62
  default:
96
63
  return undefined;