@atlaskit/smart-card 26.48.2 → 26.48.4

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 (88) hide show
  1. package/CHANGELOG.md +12 -0
  2. package/dist/cjs/state/hooks/use-ai-summary/ai-summary-service/index.js +79 -33
  3. package/dist/cjs/state/hooks/use-ai-summary/index.js +41 -16
  4. package/dist/cjs/utils/analytics/analytics.js +1 -1
  5. package/dist/cjs/utils/index.js +15 -2
  6. package/dist/cjs/view/CardWithUrl/component.js +2 -2
  7. package/dist/cjs/view/EmbedCard/components/ExpandedFrame.js +6 -11
  8. package/dist/cjs/view/EmbedCard/index.js +4 -3
  9. package/dist/cjs/view/EmbedCard/views/ResolvedView.js +0 -2
  10. package/dist/cjs/view/EmbedCard/views/unresolved-view/index.js +10 -2
  11. package/dist/cjs/view/FlexibleCard/components/actions/action/preview-action/index.js +1 -4
  12. package/dist/cjs/view/FlexibleCard/components/blocks/title-block/errored/index.js +2 -3
  13. package/dist/cjs/view/FlexibleCard/components/container/index.js +1 -2
  14. package/dist/cjs/view/FlexibleCard/components/elements/badge/index.js +2 -3
  15. package/dist/cjs/view/FlexibleCard/components/elements/date-time/index.js +1 -2
  16. package/dist/cjs/view/FlexibleCard/components/elements/link/index.js +2 -3
  17. package/dist/cjs/view/FlexibleCard/components/elements/text/index.js +1 -2
  18. package/dist/cjs/view/HoverCard/utils.js +1 -1
  19. package/dist/cjs/view/LinkUrl/index.js +1 -1
  20. package/dist/es2019/state/hooks/use-ai-summary/ai-summary-service/index.js +17 -8
  21. package/dist/es2019/state/hooks/use-ai-summary/index.js +38 -17
  22. package/dist/es2019/utils/analytics/analytics.js +1 -1
  23. package/dist/es2019/utils/index.js +13 -0
  24. package/dist/es2019/view/CardWithUrl/component.js +3 -3
  25. package/dist/es2019/view/EmbedCard/components/ExpandedFrame.js +4 -6
  26. package/dist/es2019/view/EmbedCard/index.js +4 -3
  27. package/dist/es2019/view/EmbedCard/views/ResolvedView.js +0 -2
  28. package/dist/es2019/view/EmbedCard/views/unresolved-view/index.js +10 -2
  29. package/dist/es2019/view/FlexibleCard/components/actions/action/preview-action/index.js +1 -4
  30. package/dist/es2019/view/FlexibleCard/components/blocks/title-block/errored/index.js +3 -4
  31. package/dist/es2019/view/FlexibleCard/components/container/index.js +1 -2
  32. package/dist/es2019/view/FlexibleCard/components/elements/badge/index.js +2 -3
  33. package/dist/es2019/view/FlexibleCard/components/elements/date-time/index.js +1 -2
  34. package/dist/es2019/view/FlexibleCard/components/elements/link/index.js +6 -7
  35. package/dist/es2019/view/FlexibleCard/components/elements/text/index.js +1 -2
  36. package/dist/es2019/view/HoverCard/utils.js +1 -1
  37. package/dist/es2019/view/LinkUrl/index.js +1 -1
  38. package/dist/esm/state/hooks/use-ai-summary/ai-summary-service/index.js +79 -33
  39. package/dist/esm/state/hooks/use-ai-summary/index.js +42 -17
  40. package/dist/esm/utils/analytics/analytics.js +1 -1
  41. package/dist/esm/utils/index.js +14 -1
  42. package/dist/esm/view/CardWithUrl/component.js +3 -3
  43. package/dist/esm/view/EmbedCard/components/ExpandedFrame.js +5 -8
  44. package/dist/esm/view/EmbedCard/index.js +4 -3
  45. package/dist/esm/view/EmbedCard/views/ResolvedView.js +0 -2
  46. package/dist/esm/view/EmbedCard/views/unresolved-view/index.js +10 -2
  47. package/dist/esm/view/FlexibleCard/components/actions/action/preview-action/index.js +1 -4
  48. package/dist/esm/view/FlexibleCard/components/blocks/title-block/errored/index.js +2 -3
  49. package/dist/esm/view/FlexibleCard/components/container/index.js +1 -2
  50. package/dist/esm/view/FlexibleCard/components/elements/badge/index.js +2 -3
  51. package/dist/esm/view/FlexibleCard/components/elements/date-time/index.js +1 -2
  52. package/dist/esm/view/FlexibleCard/components/elements/link/index.js +2 -3
  53. package/dist/esm/view/FlexibleCard/components/elements/text/index.js +1 -2
  54. package/dist/esm/view/HoverCard/utils.js +1 -1
  55. package/dist/esm/view/LinkUrl/index.js +1 -1
  56. package/dist/types/state/hooks/use-ai-summary/ai-summary-service/index.d.ts +2 -2
  57. package/dist/types/state/hooks/use-ai-summary/ai-summary-service/types.d.ts +1 -1
  58. package/dist/types/state/hooks/use-ai-summary/index.d.ts +1 -1
  59. package/dist/types/utils/index.d.ts +7 -1
  60. package/dist/types/view/EmbedCard/components/ExpandedFrame.d.ts +0 -2
  61. package/dist/types/view/EmbedCard/types.d.ts +0 -1
  62. package/dist/types/view/EmbedCard/views/ResolvedView.d.ts +0 -2
  63. package/dist/types/view/EmbedCard/views/forbidden-view/types.d.ts +4 -4
  64. package/dist/types/view/EmbedCard/views/not-found-view/types.d.ts +4 -4
  65. package/dist/types/view/EmbedCard/views/unauthorized-view/types.d.ts +3 -3
  66. package/dist/types/view/EmbedCard/views/unresolved-view/types.d.ts +5 -12
  67. package/dist/types-ts4.5/state/hooks/use-ai-summary/ai-summary-service/index.d.ts +2 -2
  68. package/dist/types-ts4.5/state/hooks/use-ai-summary/ai-summary-service/types.d.ts +1 -1
  69. package/dist/types-ts4.5/state/hooks/use-ai-summary/index.d.ts +1 -1
  70. package/dist/types-ts4.5/utils/index.d.ts +7 -1
  71. package/dist/types-ts4.5/view/EmbedCard/components/ExpandedFrame.d.ts +0 -2
  72. package/dist/types-ts4.5/view/EmbedCard/types.d.ts +0 -1
  73. package/dist/types-ts4.5/view/EmbedCard/views/ResolvedView.d.ts +0 -2
  74. package/dist/types-ts4.5/view/EmbedCard/views/forbidden-view/types.d.ts +4 -4
  75. package/dist/types-ts4.5/view/EmbedCard/views/not-found-view/types.d.ts +4 -4
  76. package/dist/types-ts4.5/view/EmbedCard/views/unauthorized-view/types.d.ts +3 -3
  77. package/dist/types-ts4.5/view/EmbedCard/views/unresolved-view/types.d.ts +5 -12
  78. package/package.json +2 -2
  79. package/dist/cjs/utils/token.js +0 -27
  80. package/dist/cjs/view/EmbedCard/views/UnresolvedView.js +0 -82
  81. package/dist/es2019/utils/token.js +0 -21
  82. package/dist/es2019/view/EmbedCard/views/UnresolvedView.js +0 -75
  83. package/dist/esm/utils/token.js +0 -21
  84. package/dist/esm/view/EmbedCard/views/UnresolvedView.js +0 -74
  85. package/dist/types/utils/token.d.ts +0 -21
  86. package/dist/types/view/EmbedCard/views/UnresolvedView.d.ts +0 -22
  87. package/dist/types-ts4.5/utils/token.d.ts +0 -21
  88. package/dist/types-ts4.5/view/EmbedCard/views/UnresolvedView.d.ts +0 -22
@@ -2,7 +2,7 @@
2
2
  export interface AISummaryServiceInt {
3
3
  summariseUrl: () => Promise<void>;
4
4
  state: AISummaryState;
5
- subscribe: (stateSetter: StateSetter) => void;
5
+ subscribe: (stateSetter: StateSetter) => () => void;
6
6
  }
7
7
  export type AISummaryServiceProps = {
8
8
  baseUrl?: string;
@@ -1,6 +1,6 @@
1
1
  import type { AISummaryServiceProps, AISummaryStatus } from './ai-summary-service/types';
2
2
  export declare const useAISummary: (props: AISummaryServiceProps) => {
3
- isSummarised: boolean;
3
+ isSummarisedOnMount: boolean;
4
4
  summariseUrl: () => Promise<void> | undefined;
5
5
  state: {
6
6
  status: AISummaryStatus;
@@ -1,5 +1,6 @@
1
1
  import React from 'react';
2
- import { CardProps } from '../view/Card';
2
+ import type { CardProps } from '../view/Card';
3
+ import { FrameStyle } from '../view/EmbedCard/types';
3
4
  export declare const isCardWithData: (props: CardProps) => boolean;
4
5
  export declare const isSpecialEvent: (evt: React.MouseEvent | React.KeyboardEvent) => boolean;
5
6
  export declare const isIframe: () => boolean;
@@ -23,3 +24,8 @@ export declare const sleep: (ms: number) => Promise<void>;
23
24
  export declare const importWithRetry: <T>(importFn: () => Promise<T>, retries?: number, interval?: number) => Promise<T>;
24
25
  export declare const downloadUrl: (url?: string) => Promise<void>;
25
26
  export declare const openUrl: (url?: string) => Promise<void>;
27
+ /**
28
+ * Migrate internal usages of the deprecated isFrameVisible to frameStyle
29
+ * This function is to be removed on deprecation of isFrameVisible.
30
+ */
31
+ export declare const combineFrameStyle: (frameStyle?: CardProps['frameStyle'], isFrameVisible?: CardProps['isFrameVisible']) => FrameStyle | undefined;
@@ -10,8 +10,6 @@ export interface ExpandedFrameProps {
10
10
  children?: React.ReactNode;
11
11
  /** A flag that determines whether the card is selected in edit mode. */
12
12
  isSelected?: boolean;
13
- /** @deprecated use frameStyle prop */
14
- isFrameVisible?: boolean;
15
13
  /** A prop that determines the style of a frame: whether to show it, hide it or only show it when a user hovers over embed */
16
14
  frameStyle?: FrameStyle;
17
15
  /** The optional click handler */
@@ -16,7 +16,6 @@ export type EmbedCardProps = {
16
16
  handleInvoke: InvokeHandler;
17
17
  id?: string;
18
18
  isSelected?: boolean;
19
- isFrameVisible?: boolean;
20
19
  frameStyle?: FrameStyle;
21
20
  platform?: CardPlatform;
22
21
  onResolve?: OnResolveCallback;
@@ -9,8 +9,6 @@ export interface EmbedCardResolvedViewProps {
9
9
  link: string;
10
10
  /** A flag that determines whether the card is selected in edit mode. */
11
11
  isSelected?: boolean;
12
- /** will show the frame regardless of user interaction */
13
- isFrameVisible?: boolean;
14
12
  /** A prop that determines the style of a frame: whether to show it, hide it or only show it when a user hovers over embed */
15
13
  frameStyle?: FrameStyle;
16
14
  /** The src to be used for the `iframe` */
@@ -1,7 +1,7 @@
1
- import { RequestAccessContextProps } from '../../../types';
2
- import { ContextViewModel } from '../../types';
3
- import { UnresolvedViewProps } from '../unresolved-view/types';
4
- export type ForbiddenViewProps = Pick<UnresolvedViewProps, 'inheritDimensions' | 'isSelected' | 'onClick' | 'testId' | 'url'> & {
1
+ import type { RequestAccessContextProps } from '../../../types';
2
+ import type { ContextViewModel } from '../../types';
3
+ import type { UnresolvedViewCardProps } from '../unresolved-view/types';
4
+ export type ForbiddenViewProps = UnresolvedViewCardProps & {
5
5
  context?: ContextViewModel;
6
6
  onAuthorize?: () => void;
7
7
  accessContext: RequestAccessContextProps;
@@ -1,7 +1,7 @@
1
- import { RequestAccessContextProps } from '../../../types';
2
- import { ContextViewModel } from '../../types';
3
- import { UnresolvedViewProps } from '../unresolved-view/types';
4
- export type NotFoundViewProps = Pick<UnresolvedViewProps, 'inheritDimensions' | 'isSelected' | 'onClick' | 'testId' | 'url'> & {
1
+ import type { RequestAccessContextProps } from '../../../types';
2
+ import type { ContextViewModel } from '../../types';
3
+ import type { UnresolvedViewCardProps } from '../unresolved-view/types';
4
+ export type NotFoundViewProps = UnresolvedViewCardProps & {
5
5
  context?: ContextViewModel;
6
6
  accessContext?: RequestAccessContextProps;
7
7
  };
@@ -1,7 +1,7 @@
1
1
  import type { AnalyticsFacade } from '../../../../state/analytics';
2
- import { ContextViewModel } from '../../types';
3
- import { UnresolvedViewProps } from '../unresolved-view/types';
4
- export type UnauthorizedViewProps = Pick<UnresolvedViewProps, 'inheritDimensions' | 'isSelected' | 'onClick' | 'testId' | 'url'> & {
2
+ import type { ContextViewModel } from '../../types';
3
+ import type { UnresolvedViewCardProps } from '../unresolved-view/types';
4
+ export type UnauthorizedViewProps = UnresolvedViewCardProps & {
5
5
  analytics: AnalyticsFacade;
6
6
  context?: ContextViewModel;
7
7
  extensionKey?: string;
@@ -1,5 +1,8 @@
1
- import type { MouseEvent, ReactNode } from 'react';
2
- export type UnresolvedViewProps = {
1
+ import type { ReactNode } from 'react';
2
+ import type { CardProps } from '../../../Card/types';
3
+ /** Props derived from <Card /> for base embed functionalities */
4
+ export type UnresolvedViewCardProps = Pick<CardProps, 'frameStyle' | 'inheritDimensions' | 'isSelected' | 'onClick' | 'testId' | 'url'>;
5
+ export type UnresolvedViewProps = UnresolvedViewCardProps & {
3
6
  /** An action button */
4
7
  button?: ReactNode;
5
8
  /** A detail and instruction of the unresolved link */
@@ -8,18 +11,8 @@ export type UnresolvedViewProps = {
8
11
  icon: string | ReactNode;
9
12
  /** A provider or visual aids for the unresolved link */
10
13
  image: string;
11
- /** A flag whether the embed frame should inherit parent dimension */
12
- inheritDimensions?: boolean;
13
- /** A flag whether the embed frame is selected */
14
- isSelected?: boolean;
15
- /** An action when a link text is clicked */
16
- onClick?: (evt: MouseEvent) => void;
17
14
  /** A link text displayed on embed frame */
18
15
  text?: string;
19
- /** A `testId` prop is provided for specified elements, which is a unique string that appears as a data attribute `data-testid` in the rendered code, serving as a hook for automated tests */
20
- testId?: string;
21
16
  /** A title for the unresolved link */
22
17
  title: ReactNode;
23
- /** A link url */
24
- url: string;
25
18
  };
@@ -3,9 +3,9 @@ export declare class AISummaryService implements AISummaryServiceInt {
3
3
  state: AISummaryState;
4
4
  private config;
5
5
  private url;
6
- private subscribedStateSetter;
6
+ private subscribedStateSetters;
7
7
  constructor(props: AISummaryServiceProps);
8
8
  private fetchStream;
9
9
  summariseUrl(summaryStyle?: SummaryStyle): Promise<void>;
10
- subscribe(stateSetter: StateSetter): void;
10
+ subscribe(stateSetter: StateSetter): () => void;
11
11
  }
@@ -2,7 +2,7 @@
2
2
  export interface AISummaryServiceInt {
3
3
  summariseUrl: () => Promise<void>;
4
4
  state: AISummaryState;
5
- subscribe: (stateSetter: StateSetter) => void;
5
+ subscribe: (stateSetter: StateSetter) => () => void;
6
6
  }
7
7
  export type AISummaryServiceProps = {
8
8
  baseUrl?: string;
@@ -1,6 +1,6 @@
1
1
  import type { AISummaryServiceProps, AISummaryStatus } from './ai-summary-service/types';
2
2
  export declare const useAISummary: (props: AISummaryServiceProps) => {
3
- isSummarised: boolean;
3
+ isSummarisedOnMount: boolean;
4
4
  summariseUrl: () => Promise<void> | undefined;
5
5
  state: {
6
6
  status: AISummaryStatus;
@@ -1,5 +1,6 @@
1
1
  import React from 'react';
2
- import { CardProps } from '../view/Card';
2
+ import type { CardProps } from '../view/Card';
3
+ import { FrameStyle } from '../view/EmbedCard/types';
3
4
  export declare const isCardWithData: (props: CardProps) => boolean;
4
5
  export declare const isSpecialEvent: (evt: React.MouseEvent | React.KeyboardEvent) => boolean;
5
6
  export declare const isIframe: () => boolean;
@@ -23,3 +24,8 @@ export declare const sleep: (ms: number) => Promise<void>;
23
24
  export declare const importWithRetry: <T>(importFn: () => Promise<T>, retries?: number, interval?: number) => Promise<T>;
24
25
  export declare const downloadUrl: (url?: string) => Promise<void>;
25
26
  export declare const openUrl: (url?: string) => Promise<void>;
27
+ /**
28
+ * Migrate internal usages of the deprecated isFrameVisible to frameStyle
29
+ * This function is to be removed on deprecation of isFrameVisible.
30
+ */
31
+ export declare const combineFrameStyle: (frameStyle?: CardProps['frameStyle'], isFrameVisible?: CardProps['isFrameVisible']) => FrameStyle | undefined;
@@ -10,8 +10,6 @@ export interface ExpandedFrameProps {
10
10
  children?: React.ReactNode;
11
11
  /** A flag that determines whether the card is selected in edit mode. */
12
12
  isSelected?: boolean;
13
- /** @deprecated use frameStyle prop */
14
- isFrameVisible?: boolean;
15
13
  /** A prop that determines the style of a frame: whether to show it, hide it or only show it when a user hovers over embed */
16
14
  frameStyle?: FrameStyle;
17
15
  /** The optional click handler */
@@ -16,7 +16,6 @@ export type EmbedCardProps = {
16
16
  handleInvoke: InvokeHandler;
17
17
  id?: string;
18
18
  isSelected?: boolean;
19
- isFrameVisible?: boolean;
20
19
  frameStyle?: FrameStyle;
21
20
  platform?: CardPlatform;
22
21
  onResolve?: OnResolveCallback;
@@ -9,8 +9,6 @@ export interface EmbedCardResolvedViewProps {
9
9
  link: string;
10
10
  /** A flag that determines whether the card is selected in edit mode. */
11
11
  isSelected?: boolean;
12
- /** will show the frame regardless of user interaction */
13
- isFrameVisible?: boolean;
14
12
  /** A prop that determines the style of a frame: whether to show it, hide it or only show it when a user hovers over embed */
15
13
  frameStyle?: FrameStyle;
16
14
  /** The src to be used for the `iframe` */
@@ -1,7 +1,7 @@
1
- import { RequestAccessContextProps } from '../../../types';
2
- import { ContextViewModel } from '../../types';
3
- import { UnresolvedViewProps } from '../unresolved-view/types';
4
- export type ForbiddenViewProps = Pick<UnresolvedViewProps, 'inheritDimensions' | 'isSelected' | 'onClick' | 'testId' | 'url'> & {
1
+ import type { RequestAccessContextProps } from '../../../types';
2
+ import type { ContextViewModel } from '../../types';
3
+ import type { UnresolvedViewCardProps } from '../unresolved-view/types';
4
+ export type ForbiddenViewProps = UnresolvedViewCardProps & {
5
5
  context?: ContextViewModel;
6
6
  onAuthorize?: () => void;
7
7
  accessContext: RequestAccessContextProps;
@@ -1,7 +1,7 @@
1
- import { RequestAccessContextProps } from '../../../types';
2
- import { ContextViewModel } from '../../types';
3
- import { UnresolvedViewProps } from '../unresolved-view/types';
4
- export type NotFoundViewProps = Pick<UnresolvedViewProps, 'inheritDimensions' | 'isSelected' | 'onClick' | 'testId' | 'url'> & {
1
+ import type { RequestAccessContextProps } from '../../../types';
2
+ import type { ContextViewModel } from '../../types';
3
+ import type { UnresolvedViewCardProps } from '../unresolved-view/types';
4
+ export type NotFoundViewProps = UnresolvedViewCardProps & {
5
5
  context?: ContextViewModel;
6
6
  accessContext?: RequestAccessContextProps;
7
7
  };
@@ -1,7 +1,7 @@
1
1
  import type { AnalyticsFacade } from '../../../../state/analytics';
2
- import { ContextViewModel } from '../../types';
3
- import { UnresolvedViewProps } from '../unresolved-view/types';
4
- export type UnauthorizedViewProps = Pick<UnresolvedViewProps, 'inheritDimensions' | 'isSelected' | 'onClick' | 'testId' | 'url'> & {
2
+ import type { ContextViewModel } from '../../types';
3
+ import type { UnresolvedViewCardProps } from '../unresolved-view/types';
4
+ export type UnauthorizedViewProps = UnresolvedViewCardProps & {
5
5
  analytics: AnalyticsFacade;
6
6
  context?: ContextViewModel;
7
7
  extensionKey?: string;
@@ -1,5 +1,8 @@
1
- import type { MouseEvent, ReactNode } from 'react';
2
- export type UnresolvedViewProps = {
1
+ import type { ReactNode } from 'react';
2
+ import type { CardProps } from '../../../Card/types';
3
+ /** Props derived from <Card /> for base embed functionalities */
4
+ export type UnresolvedViewCardProps = Pick<CardProps, 'frameStyle' | 'inheritDimensions' | 'isSelected' | 'onClick' | 'testId' | 'url'>;
5
+ export type UnresolvedViewProps = UnresolvedViewCardProps & {
3
6
  /** An action button */
4
7
  button?: ReactNode;
5
8
  /** A detail and instruction of the unresolved link */
@@ -8,18 +11,8 @@ export type UnresolvedViewProps = {
8
11
  icon: string | ReactNode;
9
12
  /** A provider or visual aids for the unresolved link */
10
13
  image: string;
11
- /** A flag whether the embed frame should inherit parent dimension */
12
- inheritDimensions?: boolean;
13
- /** A flag whether the embed frame is selected */
14
- isSelected?: boolean;
15
- /** An action when a link text is clicked */
16
- onClick?: (evt: MouseEvent) => void;
17
14
  /** A link text displayed on embed frame */
18
15
  text?: string;
19
- /** A `testId` prop is provided for specified elements, which is a unique string that appears as a data attribute `data-testid` in the rendered code, serving as a hook for automated tests */
20
- testId?: string;
21
16
  /** A title for the unresolved link */
22
17
  title: ReactNode;
23
- /** A link url */
24
- url: string;
25
18
  };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@atlaskit/smart-card",
3
- "version": "26.48.2",
3
+ "version": "26.48.4",
4
4
  "description": "Smart card component",
5
5
  "publishConfig": {
6
6
  "registry": "https://registry.npmjs.org/"
@@ -48,7 +48,7 @@
48
48
  "@atlaskit/outbound-auth-flow-client": "^3.4.0",
49
49
  "@atlaskit/platform-feature-flags": "^0.2.1",
50
50
  "@atlaskit/popup": "^1.12.0",
51
- "@atlaskit/primitives": "^3.0.0",
51
+ "@atlaskit/primitives": "^3.1.0",
52
52
  "@atlaskit/spinner": "^16.0.0",
53
53
  "@atlaskit/theme": "^12.6.0",
54
54
  "@atlaskit/tokens": "^1.38.0",
@@ -1,27 +0,0 @@
1
- "use strict";
2
-
3
- Object.defineProperty(exports, "__esModule", {
4
- value: true
5
- });
6
- exports.tokens = void 0;
7
- /**
8
- * @private
9
- * @deprecated {@link https://product-fabric.atlassian.net/browse/EDM-8175 Internal documentation for deprecation (no external access)}\
10
- * @deprecated Use the token directly in the file
11
- */
12
- var tokens = exports.tokens = {
13
- actionIcon: "var(--ds-icon, #44546F)",
14
- background: "var(--ds-surface-raised, #FFFFFF)",
15
- badgeIcon: "var(--ds-icon-subtle, #626F86)",
16
- badgeText: "var(--ds-text-subtlest, #626F86)",
17
- blackLink: "var(--ds-text-subtle, #44546F)",
18
- blackLinkPressed: "var(--ds-text, #172B4D)",
19
- blueLink: "var(--ds-link, #0C66E4)",
20
- blueLinkPressed: "var(--ds-link-pressed, #0055CC)",
21
- elevation: "var(--ds-shadow-raised, 0px 1px 1px #091E4240, 0px 0px 1px #091E424F)",
22
- errorMessage: "var(--ds-text-disabled, #6B778C)",
23
- errorMessageHover: "var(--ds-text-subtle, #8993A4)",
24
- focus: "var(--ds-border-focused, #388BFF)",
25
- snippet: "var(--ds-text, #172B4D)",
26
- text: "var(--ds-text-subtlest, #626F86)"
27
- };
@@ -1,82 +0,0 @@
1
- "use strict";
2
-
3
- var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefault");
4
- Object.defineProperty(exports, "__esModule", {
5
- value: true
6
- });
7
- exports.EmbedCardUnresolvedView = void 0;
8
- var _extends2 = _interopRequireDefault(require("@babel/runtime/helpers/extends"));
9
- var _react = require("@emotion/react");
10
- var _customThemeButton = _interopRequireDefault(require("@atlaskit/button/custom-theme-button"));
11
- var _constants = require("@atlaskit/theme/constants");
12
- var _reactIntlNext = require("react-intl-next");
13
- var _messages = require("../../../messages");
14
- var _utils = require("../../common/utils");
15
- /* eslint-disable @atlaskit/design-system/ensure-design-token-usage */
16
- /** @jsx jsx */
17
-
18
- /**
19
- * @deprecated {@link https://product-fabric.atlassian.net/browse/EDM-7977 Internal documentation for deprecation (no external access)}\
20
- * @deprecated Replaced by unresolved-view
21
- */
22
- var EmbedCardUnresolvedView = exports.EmbedCardUnresolvedView = function EmbedCardUnresolvedView(_ref) {
23
- var image = _ref.image,
24
- title = _ref.title,
25
- description = _ref.description,
26
- button = _ref.button,
27
- context = _ref.context,
28
- onClick = _ref.onClick,
29
- testId = _ref.testId,
30
- children = _ref.children;
31
- return (0, _react.jsx)("div", {
32
- css: {
33
- display: 'flex',
34
- flexDirection: 'column',
35
- alignItems: 'center',
36
- justifyContent: 'center',
37
- paddingTop: (0, _utils.gs)(4.5),
38
- paddingBottom: (0, _utils.gs)(6)
39
- },
40
- "data-testid": "".concat(testId, "-unresolved-container")
41
- }, (0, _react.jsx)("img", {
42
- src: image,
43
- css: {
44
- height: (0, _utils.gs)(14),
45
- marginBottom: (0, _utils.gs)(4)
46
- },
47
- "data-testid": "".concat(testId, "-unresolved-image")
48
- }), (0, _react.jsx)("span", {
49
- css: {
50
- fontSize: (0, _utils.gs)(2.5),
51
- marginBottom: (0, _utils.gs)(1.5),
52
- maxWidth: (0, _utils.gs)(50),
53
- textAlign: 'center'
54
- },
55
- "data-testid": "".concat(testId, "-unresolved-title")
56
- }, (0, _react.jsx)(_reactIntlNext.FormattedMessage, (0, _extends2.default)({}, _messages.messages[title], {
57
- values: {
58
- context: context
59
- }
60
- }))), (0, _react.jsx)("span", {
61
- css: {
62
- fontSize: (0, _constants.fontSize)(),
63
- marginBottom: (0, _utils.gs)(2.5),
64
- textAlign: 'center',
65
- maxWidth: (0, _utils.gs)(50),
66
- lineHeight: (0, _utils.gs)(3)
67
- },
68
- "data-testid": "".concat(testId, "-unresolved-description")
69
- }, children !== null && children !== void 0 ? children : (0, _react.jsx)(_reactIntlNext.FormattedMessage, (0, _extends2.default)({}, _messages.messages[description], {
70
- values: {
71
- context: context
72
- }
73
- }))), button && (0, _react.jsx)(_customThemeButton.default, {
74
- testId: "button-".concat(button.testId || testId),
75
- appearance: button.appearance,
76
- onClick: onClick
77
- }, (0, _react.jsx)(_reactIntlNext.FormattedMessage, (0, _extends2.default)({}, _messages.messages[button.text], {
78
- values: {
79
- context: context
80
- }
81
- }))));
82
- };
@@ -1,21 +0,0 @@
1
- /**
2
- * @private
3
- * @deprecated {@link https://product-fabric.atlassian.net/browse/EDM-8175 Internal documentation for deprecation (no external access)}\
4
- * @deprecated Use the token directly in the file
5
- */
6
- export const tokens = {
7
- actionIcon: "var(--ds-icon, #44546F)",
8
- background: "var(--ds-surface-raised, #FFFFFF)",
9
- badgeIcon: "var(--ds-icon-subtle, #626F86)",
10
- badgeText: "var(--ds-text-subtlest, #626F86)",
11
- blackLink: "var(--ds-text-subtle, #44546F)",
12
- blackLinkPressed: "var(--ds-text, #172B4D)",
13
- blueLink: "var(--ds-link, #0C66E4)",
14
- blueLinkPressed: "var(--ds-link-pressed, #0055CC)",
15
- elevation: "var(--ds-shadow-raised, 0px 1px 1px #091E4240, 0px 0px 1px #091E424F)",
16
- errorMessage: "var(--ds-text-disabled, #6B778C)",
17
- errorMessageHover: "var(--ds-text-subtle, #8993A4)",
18
- focus: "var(--ds-border-focused, #388BFF)",
19
- snippet: "var(--ds-text, #172B4D)",
20
- text: "var(--ds-text-subtlest, #626F86)"
21
- };
@@ -1,75 +0,0 @@
1
- import _extends from "@babel/runtime/helpers/extends";
2
- /* eslint-disable @atlaskit/design-system/ensure-design-token-usage */
3
- /** @jsx jsx */
4
- import { jsx } from '@emotion/react';
5
- import Button from '@atlaskit/button/custom-theme-button';
6
- import { fontSize } from '@atlaskit/theme/constants';
7
- import { FormattedMessage } from 'react-intl-next';
8
- import { messages } from '../../../messages';
9
- import { gs as gridSize } from '../../common/utils';
10
- /**
11
- * @deprecated {@link https://product-fabric.atlassian.net/browse/EDM-7977 Internal documentation for deprecation (no external access)}\
12
- * @deprecated Replaced by unresolved-view
13
- */
14
- export const EmbedCardUnresolvedView = ({
15
- image,
16
- title,
17
- description,
18
- button,
19
- context,
20
- onClick,
21
- testId,
22
- children
23
- }) => {
24
- return jsx("div", {
25
- css: {
26
- display: 'flex',
27
- flexDirection: 'column',
28
- alignItems: 'center',
29
- justifyContent: 'center',
30
- paddingTop: gridSize(4.5),
31
- paddingBottom: gridSize(6)
32
- },
33
- "data-testid": `${testId}-unresolved-container`
34
- }, jsx("img", {
35
- src: image,
36
- css: {
37
- height: gridSize(14),
38
- marginBottom: gridSize(4)
39
- },
40
- "data-testid": `${testId}-unresolved-image`
41
- }), jsx("span", {
42
- css: {
43
- fontSize: gridSize(2.5),
44
- marginBottom: gridSize(1.5),
45
- maxWidth: gridSize(50),
46
- textAlign: 'center'
47
- },
48
- "data-testid": `${testId}-unresolved-title`
49
- }, jsx(FormattedMessage, _extends({}, messages[title], {
50
- values: {
51
- context
52
- }
53
- }))), jsx("span", {
54
- css: {
55
- fontSize: fontSize(),
56
- marginBottom: gridSize(2.5),
57
- textAlign: 'center',
58
- maxWidth: gridSize(50),
59
- lineHeight: gridSize(3)
60
- },
61
- "data-testid": `${testId}-unresolved-description`
62
- }, children !== null && children !== void 0 ? children : jsx(FormattedMessage, _extends({}, messages[description], {
63
- values: {
64
- context
65
- }
66
- }))), button && jsx(Button, {
67
- testId: `button-${button.testId || testId}`,
68
- appearance: button.appearance,
69
- onClick: onClick
70
- }, jsx(FormattedMessage, _extends({}, messages[button.text], {
71
- values: {
72
- context
73
- }
74
- }))));
75
- };
@@ -1,21 +0,0 @@
1
- /**
2
- * @private
3
- * @deprecated {@link https://product-fabric.atlassian.net/browse/EDM-8175 Internal documentation for deprecation (no external access)}\
4
- * @deprecated Use the token directly in the file
5
- */
6
- export var tokens = {
7
- actionIcon: "var(--ds-icon, #44546F)",
8
- background: "var(--ds-surface-raised, #FFFFFF)",
9
- badgeIcon: "var(--ds-icon-subtle, #626F86)",
10
- badgeText: "var(--ds-text-subtlest, #626F86)",
11
- blackLink: "var(--ds-text-subtle, #44546F)",
12
- blackLinkPressed: "var(--ds-text, #172B4D)",
13
- blueLink: "var(--ds-link, #0C66E4)",
14
- blueLinkPressed: "var(--ds-link-pressed, #0055CC)",
15
- elevation: "var(--ds-shadow-raised, 0px 1px 1px #091E4240, 0px 0px 1px #091E424F)",
16
- errorMessage: "var(--ds-text-disabled, #6B778C)",
17
- errorMessageHover: "var(--ds-text-subtle, #8993A4)",
18
- focus: "var(--ds-border-focused, #388BFF)",
19
- snippet: "var(--ds-text, #172B4D)",
20
- text: "var(--ds-text-subtlest, #626F86)"
21
- };
@@ -1,74 +0,0 @@
1
- import _extends from "@babel/runtime/helpers/extends";
2
- /* eslint-disable @atlaskit/design-system/ensure-design-token-usage */
3
- /** @jsx jsx */
4
- import { jsx } from '@emotion/react';
5
- import Button from '@atlaskit/button/custom-theme-button';
6
- import { fontSize } from '@atlaskit/theme/constants';
7
- import { FormattedMessage } from 'react-intl-next';
8
- import { messages } from '../../../messages';
9
- import { gs as gridSize } from '../../common/utils';
10
- /**
11
- * @deprecated {@link https://product-fabric.atlassian.net/browse/EDM-7977 Internal documentation for deprecation (no external access)}\
12
- * @deprecated Replaced by unresolved-view
13
- */
14
- export var EmbedCardUnresolvedView = function EmbedCardUnresolvedView(_ref) {
15
- var image = _ref.image,
16
- title = _ref.title,
17
- description = _ref.description,
18
- button = _ref.button,
19
- context = _ref.context,
20
- onClick = _ref.onClick,
21
- testId = _ref.testId,
22
- children = _ref.children;
23
- return jsx("div", {
24
- css: {
25
- display: 'flex',
26
- flexDirection: 'column',
27
- alignItems: 'center',
28
- justifyContent: 'center',
29
- paddingTop: gridSize(4.5),
30
- paddingBottom: gridSize(6)
31
- },
32
- "data-testid": "".concat(testId, "-unresolved-container")
33
- }, jsx("img", {
34
- src: image,
35
- css: {
36
- height: gridSize(14),
37
- marginBottom: gridSize(4)
38
- },
39
- "data-testid": "".concat(testId, "-unresolved-image")
40
- }), jsx("span", {
41
- css: {
42
- fontSize: gridSize(2.5),
43
- marginBottom: gridSize(1.5),
44
- maxWidth: gridSize(50),
45
- textAlign: 'center'
46
- },
47
- "data-testid": "".concat(testId, "-unresolved-title")
48
- }, jsx(FormattedMessage, _extends({}, messages[title], {
49
- values: {
50
- context: context
51
- }
52
- }))), jsx("span", {
53
- css: {
54
- fontSize: fontSize(),
55
- marginBottom: gridSize(2.5),
56
- textAlign: 'center',
57
- maxWidth: gridSize(50),
58
- lineHeight: gridSize(3)
59
- },
60
- "data-testid": "".concat(testId, "-unresolved-description")
61
- }, children !== null && children !== void 0 ? children : jsx(FormattedMessage, _extends({}, messages[description], {
62
- values: {
63
- context: context
64
- }
65
- }))), button && jsx(Button, {
66
- testId: "button-".concat(button.testId || testId),
67
- appearance: button.appearance,
68
- onClick: onClick
69
- }, jsx(FormattedMessage, _extends({}, messages[button.text], {
70
- values: {
71
- context: context
72
- }
73
- }))));
74
- };
@@ -1,21 +0,0 @@
1
- /**
2
- * @private
3
- * @deprecated {@link https://product-fabric.atlassian.net/browse/EDM-8175 Internal documentation for deprecation (no external access)}\
4
- * @deprecated Use the token directly in the file
5
- */
6
- export declare const tokens: {
7
- actionIcon: "var(--ds-icon)";
8
- background: "var(--ds-surface-raised)";
9
- badgeIcon: "var(--ds-icon-subtle)";
10
- badgeText: "var(--ds-text-subtlest)";
11
- blackLink: "var(--ds-text-subtle)";
12
- blackLinkPressed: "var(--ds-text)";
13
- blueLink: "var(--ds-link)";
14
- blueLinkPressed: "var(--ds-link-pressed)";
15
- elevation: "var(--ds-shadow-raised)";
16
- errorMessage: "var(--ds-text-disabled)";
17
- errorMessageHover: "var(--ds-text-subtle)";
18
- focus: "var(--ds-border-focused)";
19
- snippet: "var(--ds-text)";
20
- text: "var(--ds-text-subtlest)";
21
- };