@atlaskit/smart-card 36.11.0 → 36.12.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 (106) hide show
  1. package/CHANGELOG.md +22 -0
  2. package/dist/cjs/extractors/embed/index.js +8 -4
  3. package/dist/cjs/extractors/flexible/index.js +11 -4
  4. package/dist/cjs/extractors/inline/index.js +12 -4
  5. package/dist/cjs/utils/analytics/analytics.js +1 -1
  6. package/dist/cjs/utils/index.js +4 -1
  7. package/dist/cjs/view/EmbedCard/components/ImageIcon.compiled.css +1 -0
  8. package/dist/cjs/view/EmbedCard/components/ImageIcon.js +11 -2
  9. package/dist/cjs/view/EmbedCard/views/ErroredView.js +7 -1
  10. package/dist/cjs/view/EmbedCard/views/ResolvedView.js +10 -4
  11. package/dist/cjs/view/EmbedCard/views/forbidden-view/index.js +4 -1
  12. package/dist/cjs/view/EmbedCard/views/unauthorized-view/index.js +4 -1
  13. package/dist/cjs/view/EmbedModal/components/link-info/index.js +52 -6
  14. package/dist/cjs/view/EmbedModal/components/link-info/link-info-button/index.js +8 -8
  15. package/dist/cjs/view/EmbedModal/components/link-info/link-info-button/old.js +40 -0
  16. package/dist/cjs/view/EmbedModal/components/link-info/link-info-button/types.js +5 -1
  17. package/dist/cjs/view/FlexibleCard/components/actions/automation-action/automation-manual-triggers/manual-triggers-modal/sub-components/empty-state/main.js +17 -1
  18. package/dist/cjs/view/FlexibleCard/components/actions/automation-action/automation-manual-triggers/manual-triggers-modal/sub-components/footer/main.js +18 -4
  19. package/dist/cjs/view/FlexibleCard/components/common/image-icon/index.compiled.css +1 -0
  20. package/dist/cjs/view/FlexibleCard/components/common/image-icon/index.js +18 -5
  21. package/dist/cjs/view/FlexibleCard/components/elements/icon/index.js +8 -3
  22. package/dist/cjs/view/FlexibleCard/components/elements/utils.js +21 -0
  23. package/dist/cjs/view/HoverCard/components/views/forbidden/index.js +3 -1
  24. package/dist/cjs/view/InlineCard/IconAndTitleLayout/index.compiled.css +1 -0
  25. package/dist/cjs/view/InlineCard/IconAndTitleLayout/index.js +15 -11
  26. package/dist/cjs/view/InlineCard/ResolvedView/index.js +7 -3
  27. package/dist/cjs/view/LinkUrl/index.js +1 -1
  28. package/dist/es2019/extractors/embed/index.js +9 -3
  29. package/dist/es2019/extractors/flexible/index.js +9 -3
  30. package/dist/es2019/extractors/inline/index.js +9 -3
  31. package/dist/es2019/utils/analytics/analytics.js +1 -1
  32. package/dist/es2019/utils/index.js +2 -1
  33. package/dist/es2019/view/EmbedCard/components/ImageIcon.compiled.css +1 -0
  34. package/dist/es2019/view/EmbedCard/components/ImageIcon.js +10 -2
  35. package/dist/es2019/view/EmbedCard/views/ErroredView.js +8 -2
  36. package/dist/es2019/view/EmbedCard/views/ResolvedView.js +11 -5
  37. package/dist/es2019/view/EmbedCard/views/forbidden-view/index.js +5 -2
  38. package/dist/es2019/view/EmbedCard/views/unauthorized-view/index.js +5 -2
  39. package/dist/es2019/view/EmbedModal/components/link-info/index.js +42 -4
  40. package/dist/es2019/view/EmbedModal/components/link-info/link-info-button/index.js +9 -8
  41. package/dist/es2019/view/EmbedModal/components/link-info/link-info-button/old.js +34 -0
  42. package/dist/es2019/view/EmbedModal/components/link-info/link-info-button/types.js +1 -0
  43. package/dist/es2019/view/FlexibleCard/components/actions/automation-action/automation-manual-triggers/manual-triggers-modal/sub-components/empty-state/main.js +18 -2
  44. package/dist/es2019/view/FlexibleCard/components/actions/automation-action/automation-manual-triggers/manual-triggers-modal/sub-components/footer/main.js +16 -5
  45. package/dist/es2019/view/FlexibleCard/components/common/image-icon/index.compiled.css +1 -0
  46. package/dist/es2019/view/FlexibleCard/components/common/image-icon/index.js +11 -2
  47. package/dist/es2019/view/FlexibleCard/components/elements/icon/index.js +7 -4
  48. package/dist/es2019/view/FlexibleCard/components/elements/utils.js +20 -0
  49. package/dist/es2019/view/HoverCard/components/views/forbidden/index.js +4 -2
  50. package/dist/es2019/view/InlineCard/IconAndTitleLayout/index.compiled.css +1 -0
  51. package/dist/es2019/view/InlineCard/IconAndTitleLayout/index.js +15 -11
  52. package/dist/es2019/view/InlineCard/ResolvedView/index.js +7 -3
  53. package/dist/es2019/view/LinkUrl/index.js +1 -1
  54. package/dist/esm/extractors/embed/index.js +9 -5
  55. package/dist/esm/extractors/flexible/index.js +12 -5
  56. package/dist/esm/extractors/inline/index.js +12 -5
  57. package/dist/esm/utils/analytics/analytics.js +1 -1
  58. package/dist/esm/utils/index.js +3 -0
  59. package/dist/esm/view/EmbedCard/components/ImageIcon.compiled.css +1 -0
  60. package/dist/esm/view/EmbedCard/components/ImageIcon.js +11 -2
  61. package/dist/esm/view/EmbedCard/views/ErroredView.js +8 -2
  62. package/dist/esm/view/EmbedCard/views/ResolvedView.js +11 -5
  63. package/dist/esm/view/EmbedCard/views/forbidden-view/index.js +5 -2
  64. package/dist/esm/view/EmbedCard/views/unauthorized-view/index.js +5 -2
  65. package/dist/esm/view/EmbedModal/components/link-info/index.js +52 -6
  66. package/dist/esm/view/EmbedModal/components/link-info/link-info-button/index.js +8 -8
  67. package/dist/esm/view/EmbedModal/components/link-info/link-info-button/old.js +33 -0
  68. package/dist/esm/view/EmbedModal/components/link-info/link-info-button/types.js +1 -0
  69. package/dist/esm/view/FlexibleCard/components/actions/automation-action/automation-manual-triggers/manual-triggers-modal/sub-components/empty-state/main.js +18 -2
  70. package/dist/esm/view/FlexibleCard/components/actions/automation-action/automation-manual-triggers/manual-triggers-modal/sub-components/footer/main.js +16 -5
  71. package/dist/esm/view/FlexibleCard/components/common/image-icon/index.compiled.css +1 -0
  72. package/dist/esm/view/FlexibleCard/components/common/image-icon/index.js +12 -2
  73. package/dist/esm/view/FlexibleCard/components/elements/icon/index.js +8 -3
  74. package/dist/esm/view/FlexibleCard/components/elements/utils.js +21 -0
  75. package/dist/esm/view/HoverCard/components/views/forbidden/index.js +4 -2
  76. package/dist/esm/view/InlineCard/IconAndTitleLayout/index.compiled.css +1 -0
  77. package/dist/esm/view/InlineCard/IconAndTitleLayout/index.js +15 -11
  78. package/dist/esm/view/InlineCard/ResolvedView/index.js +7 -3
  79. package/dist/esm/view/LinkUrl/index.js +1 -1
  80. package/dist/types/state/flexible-ui-context/types.d.ts +5 -0
  81. package/dist/types/utils/index.d.ts +1 -0
  82. package/dist/types/view/EmbedCard/components/ImageIcon.d.ts +6 -1
  83. package/dist/types/view/EmbedCard/views/ResolvedView.d.ts +2 -0
  84. package/dist/types/view/EmbedModal/components/link-info/link-info-button/index.d.ts +1 -1
  85. package/dist/types/view/EmbedModal/components/link-info/link-info-button/old.d.ts +8 -0
  86. package/dist/types/view/EmbedModal/components/link-info/link-info-button/types.d.ts +10 -1
  87. package/dist/types/view/FlexibleCard/components/common/image-icon/index.d.ts +6 -2
  88. package/dist/types/view/FlexibleCard/components/common/image-icon/types.d.ts +1 -0
  89. package/dist/types/view/FlexibleCard/components/elements/icon/index.d.ts +1 -1
  90. package/dist/types/view/FlexibleCard/components/elements/icon/types.d.ts +4 -0
  91. package/dist/types/view/InlineCard/IconAndTitleLayout/index.d.ts +2 -1
  92. package/dist/types/view/InlineCard/ResolvedView/index.d.ts +2 -0
  93. package/dist/types-ts4.5/state/flexible-ui-context/types.d.ts +5 -0
  94. package/dist/types-ts4.5/utils/index.d.ts +1 -0
  95. package/dist/types-ts4.5/view/EmbedCard/components/ImageIcon.d.ts +6 -1
  96. package/dist/types-ts4.5/view/EmbedCard/views/ResolvedView.d.ts +2 -0
  97. package/dist/types-ts4.5/view/EmbedModal/components/link-info/link-info-button/index.d.ts +1 -1
  98. package/dist/types-ts4.5/view/EmbedModal/components/link-info/link-info-button/old.d.ts +8 -0
  99. package/dist/types-ts4.5/view/EmbedModal/components/link-info/link-info-button/types.d.ts +10 -1
  100. package/dist/types-ts4.5/view/FlexibleCard/components/common/image-icon/index.d.ts +6 -2
  101. package/dist/types-ts4.5/view/FlexibleCard/components/common/image-icon/types.d.ts +1 -0
  102. package/dist/types-ts4.5/view/FlexibleCard/components/elements/icon/index.d.ts +1 -1
  103. package/dist/types-ts4.5/view/FlexibleCard/components/elements/icon/types.d.ts +4 -0
  104. package/dist/types-ts4.5/view/InlineCard/IconAndTitleLayout/index.d.ts +2 -1
  105. package/dist/types-ts4.5/view/InlineCard/ResolvedView/index.d.ts +2 -0
  106. package/package.json +8 -4
@@ -15,6 +15,7 @@ import LinkIcon from '@atlaskit/icon/core/migration/link';
15
15
  import { fg } from '@atlaskit/platform-feature-flags';
16
16
  import { Box } from '@atlaskit/primitives/compiled';
17
17
  import { B400, N200 } from '@atlaskit/theme/colors';
18
+ import { isProfileType } from '../../../utils';
18
19
  import { Icon, Shimmer } from '../Icon';
19
20
  import { EmojiWrapperOldVisualRefresh, IconEmptyWrapperOldVisualRefresh, IconPositionWrapperOldVisualRefresh, IconWrapperOldVisualRefresh, TitleWrapperClassNameOldVisualRefresh } from './styled';
20
21
  var iconWrapperStyle = null;
@@ -24,7 +25,8 @@ var styles = {
24
25
  iconOuterWrapperStyle: "_1e0c1o8l _2hwx1b66 _kqswh2mm",
25
26
  iconTitleWrapperStyle: "_o5721jtm _1nmz9jpi _16d9qvcn _ca0qv77o _u5f31b66 _n3tdv77o _19bv1b66",
26
27
  linkStyle: "_2rkogqwt",
27
- noLinkAppearanceStyle: "_syaz131l _18u01b66"
28
+ noLinkAppearanceStyle: "_syaz131l _18u01b66",
29
+ roundImageStyle: "_2rko14q2"
28
30
  };
29
31
  // eslint-disable-next-line @atlaskit/ui-styling-standard/no-styled -- Ignored via go/DSP-18766
30
32
  var NoLinkAppearanceOldVisualRefresh = forwardRef(function (_ref, __cmplr) {
@@ -69,7 +71,8 @@ export var IconAndTitleLayout = function IconAndTitleLayout(_ref3) {
69
71
  link = _ref3.link,
70
72
  rightSide = _ref3.rightSide,
71
73
  _ref3$testId = _ref3.testId,
72
- testId = _ref3$testId === void 0 ? 'inline-card-icon-and-title' : _ref3$testId;
74
+ testId = _ref3$testId === void 0 ? 'inline-card-icon-and-title' : _ref3$testId,
75
+ type = _ref3.type;
73
76
  var renderAtlaskitIcon = React.useCallback(function () {
74
77
  if (emoji) {
75
78
  if (fg('platform-linking-visual-refresh-v1')) {
@@ -85,6 +88,7 @@ export var IconAndTitleLayout = function IconAndTitleLayout(_ref3) {
85
88
  }
86
89
  return /*#__PURE__*/React.createElement(IconWrapperOldVisualRefresh, null, icon);
87
90
  }, [emoji, icon]);
91
+ var profileType = fg('platform-linking-visual-refresh-v2') ? isProfileType(type) : false;
88
92
  var renderImageIcon = React.useCallback(function (errored, testId) {
89
93
  if (!icon || typeof icon !== 'string') {
90
94
  return null;
@@ -96,7 +100,7 @@ export var IconAndTitleLayout = function IconAndTitleLayout(_ref3) {
96
100
  src: icon,
97
101
  "data-testid": "".concat(testId, "-image"),
98
102
  alt: "",
99
- className: ax(["_c71l7vkz _p12f7vkz _1bsb1osq"])
103
+ className: ax(["_c71l7vkz _p12f7vkz _1bsb1osq", profileType && styles.roundImageStyle])
100
104
  }),
101
105
  errored: errored,
102
106
  loading: /*#__PURE__*/React.createElement(Shimmer, {
@@ -104,23 +108,23 @@ export var IconAndTitleLayout = function IconAndTitleLayout(_ref3) {
104
108
  })
105
109
  });
106
110
  }
111
+ var removedProps = !fg('platform-linking-visual-refresh-v2') ? {
112
+ className: 'smart-link-icon'
113
+ } : {};
107
114
  return /*#__PURE__*/React.createElement(ImageLoader, {
108
115
  src: icon,
109
- loaded:
110
- /*#__PURE__*/
111
- // eslint-disable-next-line @atlaskit/ui-styling-standard/no-classname-prop
112
- React.createElement(Icon, {
113
- className: "smart-link-icon",
116
+ loaded: /*#__PURE__*/React.createElement(Icon, _extends({}, removedProps, {
114
117
  src: icon,
115
118
  "data-testid": "".concat(testId, "-image"),
116
- alt: ""
117
- }),
119
+ alt: "",
120
+ className: ax([profileType && styles.roundImageStyle])
121
+ })),
118
122
  errored: errored,
119
123
  loading: /*#__PURE__*/React.createElement(Shimmer, {
120
124
  testId: "".concat(testId, "-loading")
121
125
  })
122
126
  });
123
- }, [icon]);
127
+ }, [icon, profileType]);
124
128
  var renderIconPlaceholder = React.useCallback(function (testId) {
125
129
  if (fg('platform-linking-visual-refresh-v1')) {
126
130
  return defaultIcon || /*#__PURE__*/React.createElement(LinkIcon, {
@@ -1,3 +1,4 @@
1
+ import _extends from "@babel/runtime/helpers/extends";
1
2
  import _classCallCheck from "@babel/runtime/helpers/classCallCheck";
2
3
  import _createClass from "@babel/runtime/helpers/createClass";
3
4
  import _possibleConstructorReturn from "@babel/runtime/helpers/possibleConstructorReturn";
@@ -54,7 +55,8 @@ export var InlineCardResolvedView = /*#__PURE__*/function (_React$Component) {
54
55
  showHoverPreview = _this$props$showHover === void 0 ? false : _this$props$showHover,
55
56
  hoverPreviewOptions = _this$props.hoverPreviewOptions,
56
57
  actionOptions = _this$props.actionOptions,
57
- truncateInline = _this$props.truncateInline;
58
+ truncateInline = _this$props.truncateInline,
59
+ type = _this$props.type;
58
60
  var inlineCardResolvedView = /*#__PURE__*/React.createElement(Frame, {
59
61
  testId: testId,
60
62
  link: link,
@@ -62,12 +64,14 @@ export var InlineCardResolvedView = /*#__PURE__*/function (_React$Component) {
62
64
  isHovered: isHovered,
63
65
  onClick: onClick,
64
66
  truncateInline: truncateInline
65
- }, /*#__PURE__*/React.createElement(IconAndTitleLayout, {
67
+ }, /*#__PURE__*/React.createElement(IconAndTitleLayout, _extends({
66
68
  emoji: titlePrefix,
67
69
  icon: icon,
68
70
  title: title,
69
71
  titleTextColor: titleTextColor
70
- }), this.renderLozenge());
72
+ }, fg('platform-linking-visual-refresh-v2') && {
73
+ type: type
74
+ })), this.renderLozenge());
71
75
  if (showHoverPreview && link) {
72
76
  return /*#__PURE__*/React.createElement(HoverCard, {
73
77
  id: id,
@@ -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.11.0",
16
+ packageVersion: "36.12.0",
17
17
  componentName: 'linkUrl'
18
18
  };
19
19
  var Anchor = withLinkClickedEvent('a');
@@ -231,6 +231,11 @@ export type FlexibleUiDataContext = {
231
231
  * @see Location
232
232
  */
233
233
  location?: LinkLocation;
234
+ /**
235
+ * Contains the type provided by the link extractor.
236
+ * @type string
237
+ */
238
+ type?: string[];
234
239
  };
235
240
  export type Icon = {
236
241
  icon?: IconType;
@@ -36,3 +36,4 @@ export declare const openUrl: (url?: string) => Promise<void>;
36
36
  */
37
37
  export declare const getPreviewUrlWithTheme: (previewUrl: string, themeState: Partial<ActiveThemeState>) => string;
38
38
  export declare const isIconSizeLarge: (size?: SmartLinkSize) => boolean | undefined;
39
+ export declare const isProfileType: (type?: string[]) => boolean;
@@ -1,3 +1,7 @@
1
+ /**
2
+ * @jsxRuntime classic
3
+ * @jsx jsx
4
+ */
1
5
  import React from 'react';
2
6
  export interface ImageIconProps {
3
7
  alt?: string;
@@ -5,5 +9,6 @@ export interface ImageIconProps {
5
9
  src?: string;
6
10
  title?: string;
7
11
  default?: React.ReactElement;
12
+ appearance?: 'square' | 'round';
8
13
  }
9
- export declare const ImageIcon: ({ alt, src, size, title, default: defaultIcon, }: ImageIconProps) => React.JSX.Element | null;
14
+ export declare const ImageIcon: ({ alt, src, size, title, default: defaultIcon, appearance, }: ImageIconProps) => JSX.Element | null;
@@ -28,5 +28,7 @@ export interface EmbedCardResolvedViewProps {
28
28
  onIframeDwell?: (dwellTime: number, dwellPercentVisible: number) => void;
29
29
  /** Optional callback for when user navigates into an iframe - for analytics **/
30
30
  onIframeFocus?: () => void;
31
+ /** Type of the object */
32
+ type?: string[];
31
33
  }
32
34
  export declare const EmbedCardResolvedView: React.ForwardRefExoticComponent<EmbedCardResolvedViewProps & React.RefAttributes<HTMLIFrameElement>>;
@@ -1,4 +1,4 @@
1
1
  import React from 'react';
2
2
  import { type LinkInfoButtonProps } from './types';
3
- declare const LinkInfoButton: ({ content, href, icon, onClick, target, testId }: LinkInfoButtonProps) => React.JSX.Element;
3
+ declare const LinkInfoButton: ({ content, icon, label, onClick, testId }: LinkInfoButtonProps) => React.JSX.Element;
4
4
  export default LinkInfoButton;
@@ -0,0 +1,8 @@
1
+ import React from 'react';
2
+ import { type OldLinkInfoButtonProps } from './types';
3
+ /**
4
+ * @private
5
+ * @deprecated Remove when cleaning up fg `platform-smart-card-remove-legacy-button` - EDM-12433
6
+ */
7
+ declare const LinkInfoButton: ({ content, href, icon, onClick, target, testId, }: OldLinkInfoButtonProps) => React.JSX.Element;
8
+ export default LinkInfoButton;
@@ -1,5 +1,7 @@
1
1
  /// <reference types="react" />
2
- export type LinkInfoButtonProps = {
2
+ import { MessageDescriptor } from 'react-intl-next';
3
+ import { IconProp } from '@atlaskit/button/new';
4
+ export type OldLinkInfoButtonProps = {
3
5
  content: React.ReactNode;
4
6
  icon: React.ReactChild;
5
7
  onClick?: () => void;
@@ -7,3 +9,10 @@ export type LinkInfoButtonProps = {
7
9
  target?: string;
8
10
  testId?: string;
9
11
  };
12
+ export type LinkInfoButtonProps = {
13
+ content: React.ReactNode;
14
+ icon: IconProp;
15
+ label: MessageDescriptor;
16
+ onClick?: () => void;
17
+ testId?: string;
18
+ };
@@ -1,4 +1,8 @@
1
- import React from 'react';
1
+ /**
2
+ * @jsxRuntime classic
3
+ * @jsx jsx
4
+ */
5
+ /// <reference types="react" />
2
6
  import { type ImageIconProps } from './types';
3
- declare const ImageIcon: ({ defaultIcon, testId, url, width, height, onError, onLoad, }: ImageIconProps) => React.JSX.Element;
7
+ declare const ImageIcon: ({ defaultIcon, testId, url, width, height, appearance, onError, onLoad, }: ImageIconProps) => JSX.Element;
4
8
  export default ImageIcon;
@@ -7,4 +7,5 @@ export type ImageIconProps = {
7
7
  height?: string;
8
8
  onError?: () => void;
9
9
  onLoad?: () => void;
10
+ appearance?: 'square' | 'round';
10
11
  };
@@ -6,5 +6,5 @@ import { type IconProps } from './types';
6
6
  * @param {IconProps} IconProps - The props necessary for the Icon element.
7
7
  * @see LinkIcon
8
8
  */
9
- declare const Icon: ({ icon, overrideIcon, label, name, position, className, render, size, testId, url, }: IconProps) => JSX.Element;
9
+ declare const Icon: ({ icon, overrideIcon, label, name, position, className, render, size, testId, url, appearance, }: IconProps) => JSX.Element;
10
10
  export default Icon;
@@ -29,4 +29,8 @@ export type IconProps = ElementProps & {
29
29
  * The icon from this url will be used if no render function or Atlaskit Icon is provided.
30
30
  */
31
31
  url?: string;
32
+ /**
33
+ * Whether to display the icon as a square or round image.
34
+ */
35
+ appearance?: 'square' | 'round';
32
36
  };
@@ -19,7 +19,8 @@ export interface IconAndTitleLayoutProps {
19
19
  rightSide?: React.ReactNode;
20
20
  rightSideSpacer?: boolean;
21
21
  onClick?: React.EventHandler<React.MouseEvent | React.KeyboardEvent>;
22
+ type?: string[];
22
23
  }
23
- export declare const IconAndTitleLayout: ({ icon, emoji, defaultIcon, onClick, children, title, titleColor, titleTextColor, link, rightSide, testId, }: IconAndTitleLayoutProps) => JSX.Element;
24
+ export declare const IconAndTitleLayout: ({ icon, emoji, defaultIcon, onClick, children, title, titleColor, titleTextColor, link, rightSide, testId, type, }: IconAndTitleLayoutProps) => JSX.Element;
24
25
  export declare const IconTitleWrapper: (props: ComponentPropsWithoutRef<typeof Box>) => JSX.Element;
25
26
  export declare const LozengeWrapper: (props: ComponentPropsWithoutRef<typeof Box>) => JSX.Element;
@@ -32,6 +32,8 @@ export interface InlineCardResolvedViewProps {
32
32
  actionOptions?: CardActionOptions;
33
33
  /** Truncates the card to one line */
34
34
  truncateInline?: boolean;
35
+ /** Type of inline card */
36
+ type?: string[];
35
37
  }
36
38
  export declare class InlineCardResolvedView extends React.Component<InlineCardResolvedViewProps> {
37
39
  renderLozenge(): React.JSX.Element | null;
@@ -231,6 +231,11 @@ export type FlexibleUiDataContext = {
231
231
  * @see Location
232
232
  */
233
233
  location?: LinkLocation;
234
+ /**
235
+ * Contains the type provided by the link extractor.
236
+ * @type string
237
+ */
238
+ type?: string[];
234
239
  };
235
240
  export type Icon = {
236
241
  icon?: IconType;
@@ -36,3 +36,4 @@ export declare const openUrl: (url?: string) => Promise<void>;
36
36
  */
37
37
  export declare const getPreviewUrlWithTheme: (previewUrl: string, themeState: Partial<ActiveThemeState>) => string;
38
38
  export declare const isIconSizeLarge: (size?: SmartLinkSize) => boolean | undefined;
39
+ export declare const isProfileType: (type?: string[]) => boolean;
@@ -1,3 +1,7 @@
1
+ /**
2
+ * @jsxRuntime classic
3
+ * @jsx jsx
4
+ */
1
5
  import React from 'react';
2
6
  export interface ImageIconProps {
3
7
  alt?: string;
@@ -5,5 +9,6 @@ export interface ImageIconProps {
5
9
  src?: string;
6
10
  title?: string;
7
11
  default?: React.ReactElement;
12
+ appearance?: 'square' | 'round';
8
13
  }
9
- export declare const ImageIcon: ({ alt, src, size, title, default: defaultIcon, }: ImageIconProps) => React.JSX.Element | null;
14
+ export declare const ImageIcon: ({ alt, src, size, title, default: defaultIcon, appearance, }: ImageIconProps) => JSX.Element | null;
@@ -28,5 +28,7 @@ export interface EmbedCardResolvedViewProps {
28
28
  onIframeDwell?: (dwellTime: number, dwellPercentVisible: number) => void;
29
29
  /** Optional callback for when user navigates into an iframe - for analytics **/
30
30
  onIframeFocus?: () => void;
31
+ /** Type of the object */
32
+ type?: string[];
31
33
  }
32
34
  export declare const EmbedCardResolvedView: React.ForwardRefExoticComponent<EmbedCardResolvedViewProps & React.RefAttributes<HTMLIFrameElement>>;
@@ -1,4 +1,4 @@
1
1
  import React from 'react';
2
2
  import { type LinkInfoButtonProps } from './types';
3
- declare const LinkInfoButton: ({ content, href, icon, onClick, target, testId }: LinkInfoButtonProps) => React.JSX.Element;
3
+ declare const LinkInfoButton: ({ content, icon, label, onClick, testId }: LinkInfoButtonProps) => React.JSX.Element;
4
4
  export default LinkInfoButton;
@@ -0,0 +1,8 @@
1
+ import React from 'react';
2
+ import { type OldLinkInfoButtonProps } from './types';
3
+ /**
4
+ * @private
5
+ * @deprecated Remove when cleaning up fg `platform-smart-card-remove-legacy-button` - EDM-12433
6
+ */
7
+ declare const LinkInfoButton: ({ content, href, icon, onClick, target, testId, }: OldLinkInfoButtonProps) => React.JSX.Element;
8
+ export default LinkInfoButton;
@@ -1,5 +1,7 @@
1
1
  /// <reference types="react" />
2
- export type LinkInfoButtonProps = {
2
+ import { MessageDescriptor } from 'react-intl-next';
3
+ import { IconProp } from '@atlaskit/button/new';
4
+ export type OldLinkInfoButtonProps = {
3
5
  content: React.ReactNode;
4
6
  icon: React.ReactChild;
5
7
  onClick?: () => void;
@@ -7,3 +9,10 @@ export type LinkInfoButtonProps = {
7
9
  target?: string;
8
10
  testId?: string;
9
11
  };
12
+ export type LinkInfoButtonProps = {
13
+ content: React.ReactNode;
14
+ icon: IconProp;
15
+ label: MessageDescriptor;
16
+ onClick?: () => void;
17
+ testId?: string;
18
+ };
@@ -1,4 +1,8 @@
1
- import React from 'react';
1
+ /// <reference types="react" />
2
+ /**
3
+ * @jsxRuntime classic
4
+ * @jsx jsx
5
+ */
2
6
  import { type ImageIconProps } from './types';
3
- declare const ImageIcon: ({ defaultIcon, testId, url, width, height, onError, onLoad, }: ImageIconProps) => React.JSX.Element;
7
+ declare const ImageIcon: ({ defaultIcon, testId, url, width, height, appearance, onError, onLoad, }: ImageIconProps) => JSX.Element;
4
8
  export default ImageIcon;
@@ -7,4 +7,5 @@ export type ImageIconProps = {
7
7
  height?: string;
8
8
  onError?: () => void;
9
9
  onLoad?: () => void;
10
+ appearance?: 'square' | 'round';
10
11
  };
@@ -6,5 +6,5 @@ import { type IconProps } from './types';
6
6
  * @param {IconProps} IconProps - The props necessary for the Icon element.
7
7
  * @see LinkIcon
8
8
  */
9
- declare const Icon: ({ icon, overrideIcon, label, name, position, className, render, size, testId, url, }: IconProps) => JSX.Element;
9
+ declare const Icon: ({ icon, overrideIcon, label, name, position, className, render, size, testId, url, appearance, }: IconProps) => JSX.Element;
10
10
  export default Icon;
@@ -29,4 +29,8 @@ export type IconProps = ElementProps & {
29
29
  * The icon from this url will be used if no render function or Atlaskit Icon is provided.
30
30
  */
31
31
  url?: string;
32
+ /**
33
+ * Whether to display the icon as a square or round image.
34
+ */
35
+ appearance?: 'square' | 'round';
32
36
  };
@@ -19,7 +19,8 @@ export interface IconAndTitleLayoutProps {
19
19
  rightSide?: React.ReactNode;
20
20
  rightSideSpacer?: boolean;
21
21
  onClick?: React.EventHandler<React.MouseEvent | React.KeyboardEvent>;
22
+ type?: string[];
22
23
  }
23
- export declare const IconAndTitleLayout: ({ icon, emoji, defaultIcon, onClick, children, title, titleColor, titleTextColor, link, rightSide, testId, }: IconAndTitleLayoutProps) => JSX.Element;
24
+ export declare const IconAndTitleLayout: ({ icon, emoji, defaultIcon, onClick, children, title, titleColor, titleTextColor, link, rightSide, testId, type, }: IconAndTitleLayoutProps) => JSX.Element;
24
25
  export declare const IconTitleWrapper: (props: ComponentPropsWithoutRef<typeof Box>) => JSX.Element;
25
26
  export declare const LozengeWrapper: (props: ComponentPropsWithoutRef<typeof Box>) => JSX.Element;
@@ -32,6 +32,8 @@ export interface InlineCardResolvedViewProps {
32
32
  actionOptions?: CardActionOptions;
33
33
  /** Truncates the card to one line */
34
34
  truncateInline?: boolean;
35
+ /** Type of inline card */
36
+ type?: string[];
35
37
  }
36
38
  export declare class InlineCardResolvedView extends React.Component<InlineCardResolvedViewProps> {
37
39
  renderLozenge(): React.JSX.Element | null;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@atlaskit/smart-card",
3
- "version": "36.11.0",
3
+ "version": "36.12.0",
4
4
  "description": "Smart card component",
5
5
  "publishConfig": {
6
6
  "registry": "https://registry.npmjs.org/"
@@ -41,7 +41,7 @@
41
41
  "@atlaskit/heading": "^5.2.0",
42
42
  "@atlaskit/icon": "^25.6.0",
43
43
  "@atlaskit/icon-file-type": "^7.0.0",
44
- "@atlaskit/icon-lab": "^4.9.0",
44
+ "@atlaskit/icon-lab": "^4.10.0",
45
45
  "@atlaskit/icon-object": "^7.1.0",
46
46
  "@atlaskit/icon-priority": "^6.3.0",
47
47
  "@atlaskit/image": "^3.0.0",
@@ -55,7 +55,7 @@
55
55
  "@atlaskit/linking-types": "^9.10.0",
56
56
  "@atlaskit/logo": "^16.0.0",
57
57
  "@atlaskit/lozenge": "^12.2.0",
58
- "@atlaskit/menu": "^3.2.0",
58
+ "@atlaskit/menu": "^4.0.0",
59
59
  "@atlaskit/modal-dialog": "^14.1.0",
60
60
  "@atlaskit/outbound-auth-flow-client": "^3.4.0",
61
61
  "@atlaskit/platform-feature-flags": "^1.1.0",
@@ -97,7 +97,7 @@
97
97
  "@atlaskit/css-reset": "^7.2.0",
98
98
  "@atlaskit/link-test-helpers": "^8.0.0",
99
99
  "@atlaskit/media-test-helpers": "^35.0.0",
100
- "@atlaskit/react-ufo": "^3.8.0",
100
+ "@atlaskit/react-ufo": "^3.9.0",
101
101
  "@atlaskit/ssr": "workspace:^",
102
102
  "@atlaskit/visual-regression": "workspace:^",
103
103
  "@atlassian/analytics-tooling": "^0.5.0",
@@ -226,6 +226,10 @@
226
226
  },
227
227
  "smart_links_noun_support": {
228
228
  "type": "boolean"
229
+ },
230
+ "platform-smart-card-remove-legacy-button": {
231
+ "type": "boolean",
232
+ "showOnWebsiteForTransitiveDependencies": true
229
233
  }
230
234
  }
231
235
  }