@atlaskit/smart-card 26.70.0 → 26.72.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 (71) hide show
  1. package/CHANGELOG.md +20 -0
  2. package/dist/cjs/state/hooks/use-ai-summary/ai-summary-service/index.js +2 -2
  3. package/dist/cjs/state/hooks/use-ai-summary/ai-summary-service/utils.js +31 -1
  4. package/dist/cjs/utils/analytics/analytics.js +1 -1
  5. package/dist/cjs/view/FlexibleCard/components/actions/action/action-stack-item/action-button.js +87 -0
  6. package/dist/cjs/view/FlexibleCard/components/actions/action/action-stack-item/index.js +14 -78
  7. package/dist/cjs/view/FlexibleCard/components/actions/action/index.js +3 -1
  8. package/dist/cjs/view/FlexibleCard/components/actions/ai-summary-action/ai-summary-action-component.js +8 -1
  9. package/dist/cjs/view/FlexibleCard/components/blocks/action-block/index.js +11 -2
  10. package/dist/cjs/view/FlexibleCard/components/blocks/title-block/errored/index.js +3 -1
  11. package/dist/cjs/view/FlexibleCard/components/blocks/title-block/index.js +4 -2
  12. package/dist/cjs/view/FlexibleCard/components/blocks/title-block/resolved/index.js +3 -1
  13. package/dist/cjs/view/FlexibleCard/components/elements/icon/index.js +3 -2
  14. package/dist/cjs/view/LinkUrl/index.js +1 -1
  15. package/dist/es2019/state/hooks/use-ai-summary/ai-summary-service/index.js +3 -3
  16. package/dist/es2019/state/hooks/use-ai-summary/ai-summary-service/utils.js +30 -0
  17. package/dist/es2019/utils/analytics/analytics.js +1 -1
  18. package/dist/es2019/view/FlexibleCard/components/actions/action/action-stack-item/action-button.js +79 -0
  19. package/dist/es2019/view/FlexibleCard/components/actions/action/action-stack-item/index.js +15 -80
  20. package/dist/es2019/view/FlexibleCard/components/actions/action/index.js +3 -1
  21. package/dist/es2019/view/FlexibleCard/components/actions/ai-summary-action/ai-summary-action-component.js +5 -1
  22. package/dist/es2019/view/FlexibleCard/components/blocks/action-block/index.js +8 -2
  23. package/dist/es2019/view/FlexibleCard/components/blocks/title-block/errored/index.js +2 -0
  24. package/dist/es2019/view/FlexibleCard/components/blocks/title-block/index.js +3 -1
  25. package/dist/es2019/view/FlexibleCard/components/blocks/title-block/resolved/index.js +2 -0
  26. package/dist/es2019/view/FlexibleCard/components/elements/icon/index.js +3 -2
  27. package/dist/es2019/view/LinkUrl/index.js +1 -1
  28. package/dist/esm/state/hooks/use-ai-summary/ai-summary-service/index.js +3 -3
  29. package/dist/esm/state/hooks/use-ai-summary/ai-summary-service/utils.js +30 -0
  30. package/dist/esm/utils/analytics/analytics.js +1 -1
  31. package/dist/esm/view/FlexibleCard/components/actions/action/action-stack-item/action-button.js +78 -0
  32. package/dist/esm/view/FlexibleCard/components/actions/action/action-stack-item/index.js +14 -75
  33. package/dist/esm/view/FlexibleCard/components/actions/action/index.js +3 -1
  34. package/dist/esm/view/FlexibleCard/components/actions/ai-summary-action/ai-summary-action-component.js +5 -1
  35. package/dist/esm/view/FlexibleCard/components/blocks/action-block/index.js +11 -2
  36. package/dist/esm/view/FlexibleCard/components/blocks/title-block/errored/index.js +3 -1
  37. package/dist/esm/view/FlexibleCard/components/blocks/title-block/index.js +4 -2
  38. package/dist/esm/view/FlexibleCard/components/blocks/title-block/resolved/index.js +3 -1
  39. package/dist/esm/view/FlexibleCard/components/elements/icon/index.js +3 -2
  40. package/dist/esm/view/LinkUrl/index.js +1 -1
  41. package/dist/types/state/hooks/use-ai-summary/ai-summary-service/utils.d.ts +7 -0
  42. package/dist/types/view/BlockCard/index.d.ts +2 -2
  43. package/dist/types/view/BlockCard/views/flexible/unresolved-view/index.d.ts +1 -1
  44. package/dist/types/view/FlexibleCard/components/actions/action/action-stack-item/action-button.d.ts +12 -0
  45. package/dist/types/view/FlexibleCard/components/actions/action/action-stack-item/index.d.ts +3 -3
  46. package/dist/types/view/FlexibleCard/components/actions/action/action-stack-item/types.d.ts +2 -5
  47. package/dist/types/view/FlexibleCard/components/actions/action/types.d.ts +5 -0
  48. package/dist/types/view/FlexibleCard/components/blocks/title-block/errored/index.d.ts +1 -1
  49. package/dist/types/view/FlexibleCard/components/blocks/title-block/index.d.ts +1 -1
  50. package/dist/types/view/FlexibleCard/components/blocks/title-block/resolved/index.d.ts +1 -1
  51. package/dist/types/view/FlexibleCard/components/blocks/title-block/types.d.ts +10 -5
  52. package/dist/types/view/FlexibleCard/components/elements/icon/index.d.ts +1 -1
  53. package/dist/types/view/FlexibleCard/components/elements/icon/types.d.ts +7 -2
  54. package/dist/types/view/FlexibleCard/components/elements/link/index.d.ts +1 -1
  55. package/dist/types/view/FlexibleCard/components/elements/link/types.d.ts +3 -3
  56. package/dist/types-ts4.5/state/hooks/use-ai-summary/ai-summary-service/utils.d.ts +7 -0
  57. package/dist/types-ts4.5/view/BlockCard/index.d.ts +2 -2
  58. package/dist/types-ts4.5/view/BlockCard/views/flexible/unresolved-view/index.d.ts +1 -1
  59. package/dist/types-ts4.5/view/FlexibleCard/components/actions/action/action-stack-item/action-button.d.ts +12 -0
  60. package/dist/types-ts4.5/view/FlexibleCard/components/actions/action/action-stack-item/index.d.ts +3 -3
  61. package/dist/types-ts4.5/view/FlexibleCard/components/actions/action/action-stack-item/types.d.ts +2 -5
  62. package/dist/types-ts4.5/view/FlexibleCard/components/actions/action/types.d.ts +5 -0
  63. package/dist/types-ts4.5/view/FlexibleCard/components/blocks/title-block/errored/index.d.ts +1 -1
  64. package/dist/types-ts4.5/view/FlexibleCard/components/blocks/title-block/index.d.ts +1 -1
  65. package/dist/types-ts4.5/view/FlexibleCard/components/blocks/title-block/resolved/index.d.ts +1 -1
  66. package/dist/types-ts4.5/view/FlexibleCard/components/blocks/title-block/types.d.ts +10 -5
  67. package/dist/types-ts4.5/view/FlexibleCard/components/elements/icon/index.d.ts +1 -1
  68. package/dist/types-ts4.5/view/FlexibleCard/components/elements/icon/types.d.ts +7 -2
  69. package/dist/types-ts4.5/view/FlexibleCard/components/elements/link/index.d.ts +1 -1
  70. package/dist/types-ts4.5/view/FlexibleCard/components/elements/link/types.d.ts +3 -3
  71. package/package.json +2 -2
@@ -1,6 +1,6 @@
1
1
  import _extends from "@babel/runtime/helpers/extends";
2
2
  import _objectWithoutProperties from "@babel/runtime/helpers/objectWithoutProperties";
3
- var _excluded = ["actionGroup", "metadata", "position", "subtitle", "testId", "text", "title", "metadataPosition", "hideIcon"];
3
+ var _excluded = ["actionGroup", "metadata", "position", "subtitle", "testId", "text", "icon", "title", "metadataPosition", "hideIcon"];
4
4
  import React from 'react';
5
5
  import { css } from '@emotion/react';
6
6
  import { LinkIcon } from '../../../elements';
@@ -23,6 +23,7 @@ var TitleBlockResolvedView = function TitleBlockResolvedView(_ref) {
23
23
  subtitle = _ref$subtitle === void 0 ? [] : _ref$subtitle,
24
24
  testId = _ref.testId,
25
25
  text = _ref.text,
26
+ icon = _ref.icon,
26
27
  title = _ref.title,
27
28
  metadataPosition = _ref.metadataPosition,
28
29
  hideIcon = _ref.hideIcon,
@@ -32,6 +33,7 @@ var TitleBlockResolvedView = function TitleBlockResolvedView(_ref) {
32
33
  return /*#__PURE__*/React.createElement(Block, _extends({}, blockProps, {
33
34
  testId: "".concat(testId, "-resolved-view")
34
35
  }), !hideIcon && /*#__PURE__*/React.createElement(LinkIcon, {
36
+ overrideIcon: icon,
35
37
  position: position
36
38
  }), /*#__PURE__*/React.createElement(ElementGroup, {
37
39
  direction: SmartLinkDirection.Vertical,
@@ -70,6 +70,7 @@ var renderImageIcon = function renderImageIcon(defaultIcon, url, testId) {
70
70
  */
71
71
  var Icon = function Icon(_ref) {
72
72
  var icon = _ref.icon,
73
+ overrideIcon = _ref.overrideIcon,
73
74
  _ref$label = _ref.label,
74
75
  label = _ref$label === void 0 ? 'Link' : _ref$label,
75
76
  name = _ref.name,
@@ -84,8 +85,8 @@ var Icon = function Icon(_ref) {
84
85
  url = _ref.url;
85
86
  var element = useMemo(function () {
86
87
  var defaultIcon = renderDefaultIcon(label, testId);
87
- return (render === null || render === void 0 ? void 0 : render()) || renderImageIcon(defaultIcon, url, testId) || renderAtlaskitIcon(icon, label, testId) || defaultIcon;
88
- }, [icon, label, render, testId, url]);
88
+ return overrideIcon || (render === null || render === void 0 ? void 0 : render()) || renderImageIcon(defaultIcon, url, testId) || renderAtlaskitIcon(icon, label, testId) || defaultIcon;
89
+ }, [overrideIcon, icon, label, render, testId, url]);
89
90
  var width = getIconWidth(size);
90
91
  var styles = getIconStyles(position, width);
91
92
  var renderStyles = render ? getCustomRenderStyles(width) : undefined;
@@ -10,7 +10,7 @@ import { useLinkWarningModal } from './LinkWarningModal/hooks/use-link-warning-m
10
10
  import LinkWarningModal from './LinkWarningModal';
11
11
  var PACKAGE_DATA = {
12
12
  packageName: "@atlaskit/smart-card",
13
- packageVersion: "26.70.0",
13
+ packageVersion: "26.72.0",
14
14
  componentName: 'linkUrl'
15
15
  };
16
16
  var Link = withLinkClickedEvent('a');
@@ -1,2 +1,9 @@
1
+ import { type ProductType } from '@atlaskit/linking-common';
1
2
  export declare const getBufferReader: (response: Response) => ReadableStreamDefaultReader<string>;
2
3
  export declare const addPath: (baseUrl: string, path: string) => string;
4
+ /**
5
+ * Converts a `ProductType` to the expected `x-product` header value for AI Mate.
6
+ *
7
+ * @see https://developer.atlassian.com/platform/assistance-service/security/entitlements/#approach
8
+ */
9
+ export declare const getXProductHeaderValue: (product: ProductType | undefined) => "CONFLUENCE" | "ATLAS" | "BITBUCKET" | "TRELLO" | "JSM" | "JPD" | "ELEVATE" | "JIRA-SOFTWARE" | "JIRA-CORE" | undefined;
@@ -1,6 +1,6 @@
1
1
  /** @jsx jsx */
2
- import { FC } from 'react';
3
- import { BlockCardProps } from './types';
2
+ import { type FC } from 'react';
3
+ import { type BlockCardProps } from './types';
4
4
  import { AuthorizeAction } from './actions/AuthorizeAction';
5
5
  import { ForbiddenAction } from './actions/ForbiddenAction';
6
6
  import { ResolvedView as BlockCardResolvedView } from './views/ResolvedView';
@@ -1,4 +1,4 @@
1
1
  /// <reference types="react" />
2
- import { UnresolvedViewProps } from './types';
2
+ import { type UnresolvedViewProps } from './types';
3
3
  declare const UnresolvedView: ({ actions, cardState, children, onAuthorize, onClick, onError, showPreview, testId, title, url, }: UnresolvedViewProps) => JSX.Element;
4
4
  export default UnresolvedView;
@@ -0,0 +1,12 @@
1
+ /// <reference types="react" />
2
+ import type { ActionStackItemProps } from './types';
3
+ import type { TriggerProps } from '@atlaskit/tooltip';
4
+ declare const ActionButton: ({ content, icon: iconOption, isDisabled, isLoading, onClick: onClickCallback, size, space: spaceOption, testId, tooltipProps, xcss, }: import("../types").ActionProps & {
5
+ size: import("../../../../../..").SmartLinkSize;
6
+ space?: "space.0" | "space.025" | "space.050" | "space.075" | "space.100" | "space.150" | "space.200" | "space.250" | "space.300" | "space.400" | "space.500" | "space.600" | "space.800" | "space.1000" | undefined;
7
+ tooltipOnHide?: ((analyticsEvent: import("@atlaskit/analytics-next").UIAnalyticsEvent) => any) | undefined;
8
+ hideTooltipOnMouseDown?: boolean | undefined;
9
+ } & {
10
+ tooltipProps?: TriggerProps | undefined;
11
+ }) => JSX.Element;
12
+ export default ActionButton;
@@ -1,4 +1,4 @@
1
- import { type FC } from 'react';
2
- import { type ActionStackItemProps } from './types';
3
- declare const ActionStackItem: FC<ActionStackItemProps>;
1
+ /// <reference types="react" />
2
+ import type { ActionStackItemProps } from './types';
3
+ declare const ActionStackItem: ({ content, tooltipMessage, tooltipOnHide, hideTooltipOnMouseDown, hideTooltip, ...props }: ActionStackItemProps) => JSX.Element;
4
4
  export default ActionStackItem;
@@ -1,13 +1,10 @@
1
- import type { Space, XCSS } from '@atlaskit/primitives';
1
+ import type { Space } from '@atlaskit/primitives';
2
2
  import type { SmartLinkSize } from '../../../../../../constants';
3
3
  import type { ActionProps } from '../types';
4
- import { UIAnalyticsEvent } from '@atlaskit/analytics-next';
4
+ import type { UIAnalyticsEvent } from '@atlaskit/analytics-next';
5
5
  export type ActionStackItemProps = ActionProps & {
6
- isLoading?: boolean;
7
6
  size: SmartLinkSize;
8
- isDisabled?: boolean;
9
7
  space?: Space;
10
- xcss?: XCSS;
11
8
  tooltipOnHide?: (analyticsEvent: UIAnalyticsEvent) => any;
12
9
  hideTooltipOnMouseDown?: boolean;
13
10
  };
@@ -60,6 +60,10 @@ export type ActionProps = {
60
60
  * Determines the hideTooltipOnMouseDown behaviour of the Tooltip
61
61
  */
62
62
  hideTooltipOnMouseDown?: boolean;
63
+ /**
64
+ * Determines if the tooltip should be hidden
65
+ */
66
+ hideTooltip?: boolean;
63
67
  /**
64
68
  * @deprecated Use 'as' instead
65
69
  * Used to determine whether the Action is in a Dropdown.
@@ -102,4 +106,5 @@ export type ActionProps = {
102
106
  * Cleanup on https://product-fabric.atlassian.net/browse/EDM-9649
103
107
  */
104
108
  wrapper?: React.ElementType;
109
+ onLoadingChange?: (isLoading: boolean) => void;
105
110
  };
@@ -1,6 +1,6 @@
1
1
  /** @jsx jsx */
2
2
  import React from 'react';
3
- import { TitleBlockViewProps } from '../types';
3
+ import { type TitleBlockViewProps } from '../types';
4
4
  /**
5
5
  * Represents an Errored TitleBlock view.
6
6
  * This will render when a Smart Link did not successfully resolve.
@@ -1,5 +1,5 @@
1
1
  import React from 'react';
2
- import { TitleBlockProps } from './types';
2
+ import { type TitleBlockProps } from './types';
3
3
  /**
4
4
  * Represents a TitleBlock, which is the foundation of Flexible UI.
5
5
  * This contains an icon, the link, and any associated metadata and actions in one block.
@@ -1,5 +1,5 @@
1
1
  import React from 'react';
2
- import { TitleBlockViewProps } from '../types';
2
+ import { type TitleBlockViewProps } from '../types';
3
3
  /**
4
4
  * This renders a fully resolved TitleBlock.
5
5
  * This should render when a Smart Link returns a valid response.
@@ -1,8 +1,8 @@
1
- import React from 'react';
2
- import { ActionItem, BlockProps, ElementItem, OnActionMenuOpenChangeOptions } from '../types';
3
- import { SmartLinkPosition, SmartLinkTheme } from '../../../../../constants';
4
- import { RetryOptions } from '../../../types';
5
- import { AnchorTarget } from '../../types';
1
+ import type React from 'react';
2
+ import { type ActionItem, type BlockProps, type ElementItem, type OnActionMenuOpenChangeOptions } from '../types';
3
+ import { type SmartLinkPosition, type SmartLinkTheme } from '../../../../../constants';
4
+ import { type RetryOptions } from '../../../types';
5
+ import { type AnchorTarget } from '../../types';
6
6
  export type TitleBlockProps = {
7
7
  /**
8
8
  * An array of action items to be displayed after the title
@@ -80,6 +80,11 @@ export type TitleBlockProps = {
80
80
  * the Smart Link.
81
81
  */
82
82
  text?: string;
83
+ /**
84
+ * The icon to display in the title block. Overrides any icon that is retrieved from
85
+ * the Smart Link.
86
+ */
87
+ icon?: React.ReactNode;
83
88
  /**
84
89
  * The theme of the link text. Can be Black or Link (default URL blue)
85
90
  * @internal
@@ -1,6 +1,6 @@
1
1
  /** @jsx jsx */
2
2
  import React from 'react';
3
- import { IconProps } from './types';
3
+ import { type IconProps } from './types';
4
4
  /**
5
5
  * A base element that displays an Icon or favicon.
6
6
  * @internal
@@ -1,6 +1,6 @@
1
1
  /// <reference types="react" />
2
- import { ElementProps } from '../types';
3
- import { IconType, SmartLinkPosition } from '../../../../../constants';
2
+ import { type ElementProps } from '../types';
3
+ import { type IconType, type SmartLinkPosition } from '../../../../../constants';
4
4
  export type IconProps = ElementProps & {
5
5
  /**
6
6
  * If provided, Icon element will use this render function instead.
@@ -11,6 +11,11 @@ export type IconProps = ElementProps & {
11
11
  * will be used.
12
12
  */
13
13
  icon?: IconType;
14
+ /**
15
+ * If provided, overrideIcon will be rendered in the place of the provided icon or one that is
16
+ * supplied by the URL.
17
+ */
18
+ overrideIcon?: React.ReactNode;
14
19
  /**
15
20
  * The label provided to the Atlaskit Icon.
16
21
  */
@@ -1,6 +1,6 @@
1
1
  /** @jsx jsx */
2
2
  import React from 'react';
3
- import { LinkProps } from './types';
3
+ import { type LinkProps } from './types';
4
4
  /**
5
5
  * A base element that represent an anchor.
6
6
  * @internal
@@ -1,7 +1,7 @@
1
1
  /// <reference types="react" />
2
- import { ElementProps } from '../types';
3
- import { SmartLinkTheme } from '../../../../../constants';
4
- import { AnchorTarget } from '../../types';
2
+ import { type ElementProps } from '../types';
3
+ import { type SmartLinkTheme } from '../../../../../constants';
4
+ import { type AnchorTarget } from '../../types';
5
5
  export type LinkProps = ElementProps & {
6
6
  /**
7
7
  * Determines whether the link should display tooltip on hover.
@@ -1,2 +1,9 @@
1
+ import { type ProductType } from '@atlaskit/linking-common';
1
2
  export declare const getBufferReader: (response: Response) => ReadableStreamDefaultReader<string>;
2
3
  export declare const addPath: (baseUrl: string, path: string) => string;
4
+ /**
5
+ * Converts a `ProductType` to the expected `x-product` header value for AI Mate.
6
+ *
7
+ * @see https://developer.atlassian.com/platform/assistance-service/security/entitlements/#approach
8
+ */
9
+ export declare const getXProductHeaderValue: (product: ProductType | undefined) => "CONFLUENCE" | "ATLAS" | "BITBUCKET" | "TRELLO" | "JSM" | "JPD" | "ELEVATE" | "JIRA-SOFTWARE" | "JIRA-CORE" | undefined;
@@ -1,6 +1,6 @@
1
1
  /** @jsx jsx */
2
- import { FC } from 'react';
3
- import { BlockCardProps } from './types';
2
+ import { type FC } from 'react';
3
+ import { type BlockCardProps } from './types';
4
4
  import { AuthorizeAction } from './actions/AuthorizeAction';
5
5
  import { ForbiddenAction } from './actions/ForbiddenAction';
6
6
  import { ResolvedView as BlockCardResolvedView } from './views/ResolvedView';
@@ -1,4 +1,4 @@
1
1
  /// <reference types="react" />
2
- import { UnresolvedViewProps } from './types';
2
+ import { type UnresolvedViewProps } from './types';
3
3
  declare const UnresolvedView: ({ actions, cardState, children, onAuthorize, onClick, onError, showPreview, testId, title, url, }: UnresolvedViewProps) => JSX.Element;
4
4
  export default UnresolvedView;
@@ -0,0 +1,12 @@
1
+ /// <reference types="react" />
2
+ import type { ActionStackItemProps } from './types';
3
+ import type { TriggerProps } from '@atlaskit/tooltip';
4
+ declare const ActionButton: ({ content, icon: iconOption, isDisabled, isLoading, onClick: onClickCallback, size, space: spaceOption, testId, tooltipProps, xcss, }: import("../types").ActionProps & {
5
+ size: import("../../../../../..").SmartLinkSize;
6
+ space?: "space.0" | "space.025" | "space.050" | "space.075" | "space.100" | "space.150" | "space.200" | "space.250" | "space.300" | "space.400" | "space.500" | "space.600" | "space.800" | "space.1000" | undefined;
7
+ tooltipOnHide?: ((analyticsEvent: import("@atlaskit/analytics-next").UIAnalyticsEvent) => any) | undefined;
8
+ hideTooltipOnMouseDown?: boolean | undefined;
9
+ } & {
10
+ tooltipProps?: TriggerProps | undefined;
11
+ }) => JSX.Element;
12
+ export default ActionButton;
@@ -1,4 +1,4 @@
1
- import { type FC } from 'react';
2
- import { type ActionStackItemProps } from './types';
3
- declare const ActionStackItem: FC<ActionStackItemProps>;
1
+ /// <reference types="react" />
2
+ import type { ActionStackItemProps } from './types';
3
+ declare const ActionStackItem: ({ content, tooltipMessage, tooltipOnHide, hideTooltipOnMouseDown, hideTooltip, ...props }: ActionStackItemProps) => JSX.Element;
4
4
  export default ActionStackItem;
@@ -1,13 +1,10 @@
1
- import type { Space, XCSS } from '@atlaskit/primitives';
1
+ import type { Space } from '@atlaskit/primitives';
2
2
  import type { SmartLinkSize } from '../../../../../../constants';
3
3
  import type { ActionProps } from '../types';
4
- import { UIAnalyticsEvent } from '@atlaskit/analytics-next';
4
+ import type { UIAnalyticsEvent } from '@atlaskit/analytics-next';
5
5
  export type ActionStackItemProps = ActionProps & {
6
- isLoading?: boolean;
7
6
  size: SmartLinkSize;
8
- isDisabled?: boolean;
9
7
  space?: Space;
10
- xcss?: XCSS;
11
8
  tooltipOnHide?: (analyticsEvent: UIAnalyticsEvent) => any;
12
9
  hideTooltipOnMouseDown?: boolean;
13
10
  };
@@ -60,6 +60,10 @@ export type ActionProps = {
60
60
  * Determines the hideTooltipOnMouseDown behaviour of the Tooltip
61
61
  */
62
62
  hideTooltipOnMouseDown?: boolean;
63
+ /**
64
+ * Determines if the tooltip should be hidden
65
+ */
66
+ hideTooltip?: boolean;
63
67
  /**
64
68
  * @deprecated Use 'as' instead
65
69
  * Used to determine whether the Action is in a Dropdown.
@@ -102,4 +106,5 @@ export type ActionProps = {
102
106
  * Cleanup on https://product-fabric.atlassian.net/browse/EDM-9649
103
107
  */
104
108
  wrapper?: React.ElementType;
109
+ onLoadingChange?: (isLoading: boolean) => void;
105
110
  };
@@ -1,6 +1,6 @@
1
1
  /** @jsx jsx */
2
2
  import React from 'react';
3
- import { TitleBlockViewProps } from '../types';
3
+ import { type TitleBlockViewProps } from '../types';
4
4
  /**
5
5
  * Represents an Errored TitleBlock view.
6
6
  * This will render when a Smart Link did not successfully resolve.
@@ -1,5 +1,5 @@
1
1
  import React from 'react';
2
- import { TitleBlockProps } from './types';
2
+ import { type TitleBlockProps } from './types';
3
3
  /**
4
4
  * Represents a TitleBlock, which is the foundation of Flexible UI.
5
5
  * This contains an icon, the link, and any associated metadata and actions in one block.
@@ -1,5 +1,5 @@
1
1
  import React from 'react';
2
- import { TitleBlockViewProps } from '../types';
2
+ import { type TitleBlockViewProps } from '../types';
3
3
  /**
4
4
  * This renders a fully resolved TitleBlock.
5
5
  * This should render when a Smart Link returns a valid response.
@@ -1,8 +1,8 @@
1
- import React from 'react';
2
- import { ActionItem, BlockProps, ElementItem, OnActionMenuOpenChangeOptions } from '../types';
3
- import { SmartLinkPosition, SmartLinkTheme } from '../../../../../constants';
4
- import { RetryOptions } from '../../../types';
5
- import { AnchorTarget } from '../../types';
1
+ import type React from 'react';
2
+ import { type ActionItem, type BlockProps, type ElementItem, type OnActionMenuOpenChangeOptions } from '../types';
3
+ import { type SmartLinkPosition, type SmartLinkTheme } from '../../../../../constants';
4
+ import { type RetryOptions } from '../../../types';
5
+ import { type AnchorTarget } from '../../types';
6
6
  export type TitleBlockProps = {
7
7
  /**
8
8
  * An array of action items to be displayed after the title
@@ -80,6 +80,11 @@ export type TitleBlockProps = {
80
80
  * the Smart Link.
81
81
  */
82
82
  text?: string;
83
+ /**
84
+ * The icon to display in the title block. Overrides any icon that is retrieved from
85
+ * the Smart Link.
86
+ */
87
+ icon?: React.ReactNode;
83
88
  /**
84
89
  * The theme of the link text. Can be Black or Link (default URL blue)
85
90
  * @internal
@@ -1,6 +1,6 @@
1
1
  /** @jsx jsx */
2
2
  import React from 'react';
3
- import { IconProps } from './types';
3
+ import { type IconProps } from './types';
4
4
  /**
5
5
  * A base element that displays an Icon or favicon.
6
6
  * @internal
@@ -1,6 +1,6 @@
1
1
  /// <reference types="react" />
2
- import { ElementProps } from '../types';
3
- import { IconType, SmartLinkPosition } from '../../../../../constants';
2
+ import { type ElementProps } from '../types';
3
+ import { type IconType, type SmartLinkPosition } from '../../../../../constants';
4
4
  export type IconProps = ElementProps & {
5
5
  /**
6
6
  * If provided, Icon element will use this render function instead.
@@ -11,6 +11,11 @@ export type IconProps = ElementProps & {
11
11
  * will be used.
12
12
  */
13
13
  icon?: IconType;
14
+ /**
15
+ * If provided, overrideIcon will be rendered in the place of the provided icon or one that is
16
+ * supplied by the URL.
17
+ */
18
+ overrideIcon?: React.ReactNode;
14
19
  /**
15
20
  * The label provided to the Atlaskit Icon.
16
21
  */
@@ -1,6 +1,6 @@
1
1
  /** @jsx jsx */
2
2
  import React from 'react';
3
- import { LinkProps } from './types';
3
+ import { type LinkProps } from './types';
4
4
  /**
5
5
  * A base element that represent an anchor.
6
6
  * @internal
@@ -1,7 +1,7 @@
1
1
  /// <reference types="react" />
2
- import { ElementProps } from '../types';
3
- import { SmartLinkTheme } from '../../../../../constants';
4
- import { AnchorTarget } from '../../types';
2
+ import { type ElementProps } from '../types';
3
+ import { type SmartLinkTheme } from '../../../../../constants';
4
+ import { type AnchorTarget } from '../../types';
5
5
  export type LinkProps = ElementProps & {
6
6
  /**
7
7
  * Determines whether the link should display tooltip on hover.
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@atlaskit/smart-card",
3
- "version": "26.70.0",
3
+ "version": "26.72.0",
4
4
  "description": "Smart card component",
5
5
  "publishConfig": {
6
6
  "registry": "https://registry.npmjs.org/"
@@ -36,7 +36,7 @@
36
36
  "@atlaskit/button": "^17.15.0",
37
37
  "@atlaskit/checkbox": "^13.3.0",
38
38
  "@atlaskit/dropdown-menu": "^12.10.0",
39
- "@atlaskit/form": "^10.1.0",
39
+ "@atlaskit/form": "^10.2.0",
40
40
  "@atlaskit/frontend-utilities": "^2.7.0",
41
41
  "@atlaskit/heading": "^2.3.0",
42
42
  "@atlaskit/icon": "^22.3.0",