@atlaskit/smart-card 34.1.1 → 34.2.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 (70) hide show
  1. package/CHANGELOG.md +8 -0
  2. package/dist/cjs/utils/analytics/analytics.js +1 -1
  3. package/dist/cjs/view/EmbedCard/components/IFrame.js +6 -3
  4. package/dist/cjs/view/EmbedModal/components/embed-content/index.compiled.css +2 -0
  5. package/dist/cjs/view/EmbedModal/components/embed-content/index.js +23 -14
  6. package/dist/cjs/view/EmbedModal/components/embed-content/indexOld.js +37 -0
  7. package/dist/cjs/view/EmbedModal/components/link-info/index.compiled.css +35 -0
  8. package/dist/cjs/view/EmbedModal/components/link-info/index.js +58 -49
  9. package/dist/cjs/view/EmbedModal/components/link-info/indexOld.js +131 -0
  10. package/dist/cjs/view/FlexibleCard/components/container/index.compiled.css +38 -0
  11. package/dist/cjs/view/FlexibleCard/components/container/index.js +94 -87
  12. package/dist/cjs/view/FlexibleCard/components/container/indexOld.js +226 -0
  13. package/dist/cjs/view/FlexibleCard/components/container/layered-link/LayeredLinkOld.js +75 -0
  14. package/dist/cjs/view/FlexibleCard/components/container/layered-link/index.compiled.css +11 -0
  15. package/dist/cjs/view/FlexibleCard/components/container/layered-link/index.js +20 -46
  16. package/dist/cjs/view/LinkUrl/index.js +1 -1
  17. package/dist/es2019/utils/analytics/analytics.js +1 -1
  18. package/dist/es2019/view/EmbedCard/components/IFrame.js +5 -2
  19. package/dist/es2019/view/EmbedModal/components/embed-content/index.compiled.css +2 -0
  20. package/dist/es2019/view/EmbedModal/components/embed-content/index.js +19 -13
  21. package/dist/es2019/view/EmbedModal/components/embed-content/indexOld.js +31 -0
  22. package/dist/es2019/view/EmbedModal/components/link-info/index.compiled.css +35 -0
  23. package/dist/es2019/view/EmbedModal/components/link-info/index.js +59 -49
  24. package/dist/es2019/view/EmbedModal/components/link-info/indexOld.js +122 -0
  25. package/dist/es2019/view/FlexibleCard/components/container/index.compiled.css +38 -0
  26. package/dist/es2019/view/FlexibleCard/components/container/index.js +88 -105
  27. package/dist/es2019/view/FlexibleCard/components/container/indexOld.js +229 -0
  28. package/dist/es2019/view/FlexibleCard/components/container/layered-link/LayeredLinkOld.js +69 -0
  29. package/dist/es2019/view/FlexibleCard/components/container/layered-link/index.compiled.css +11 -0
  30. package/dist/es2019/view/FlexibleCard/components/container/layered-link/index.js +16 -45
  31. package/dist/es2019/view/LinkUrl/index.js +1 -1
  32. package/dist/esm/utils/analytics/analytics.js +1 -1
  33. package/dist/esm/view/EmbedCard/components/IFrame.js +6 -3
  34. package/dist/esm/view/EmbedModal/components/embed-content/index.compiled.css +2 -0
  35. package/dist/esm/view/EmbedModal/components/embed-content/index.js +19 -13
  36. package/dist/esm/view/EmbedModal/components/embed-content/indexOld.js +30 -0
  37. package/dist/esm/view/EmbedModal/components/link-info/index.compiled.css +35 -0
  38. package/dist/esm/view/EmbedModal/components/link-info/index.js +59 -49
  39. package/dist/esm/view/EmbedModal/components/link-info/indexOld.js +120 -0
  40. package/dist/esm/view/FlexibleCard/components/container/index.compiled.css +38 -0
  41. package/dist/esm/view/FlexibleCard/components/container/index.js +88 -87
  42. package/dist/esm/view/FlexibleCard/components/container/indexOld.js +217 -0
  43. package/dist/esm/view/FlexibleCard/components/container/layered-link/LayeredLinkOld.js +68 -0
  44. package/dist/esm/view/FlexibleCard/components/container/layered-link/index.compiled.css +11 -0
  45. package/dist/esm/view/FlexibleCard/components/container/layered-link/index.js +16 -45
  46. package/dist/esm/view/LinkUrl/index.js +1 -1
  47. package/dist/types/view/EmbedCard/components/IFrame.d.ts +2 -1
  48. package/dist/types/view/EmbedModal/components/embed-content/index.d.ts +3 -7
  49. package/dist/types/view/EmbedModal/components/embed-content/indexOld.d.ts +8 -0
  50. package/dist/types/view/EmbedModal/components/link-info/index.d.ts +3 -3
  51. package/dist/types/view/EmbedModal/components/link-info/indexOld.d.ts +4 -0
  52. package/dist/types/view/FlexibleCard/components/container/index.d.ts +10 -10
  53. package/dist/types/view/FlexibleCard/components/container/indexOld.d.ts +24 -0
  54. package/dist/types/view/FlexibleCard/components/container/layered-link/LayeredLinkOld.d.ts +13 -0
  55. package/dist/types/view/FlexibleCard/components/container/layered-link/index.d.ts +2 -11
  56. package/dist/types-ts4.5/view/EmbedCard/components/IFrame.d.ts +2 -1
  57. package/dist/types-ts4.5/view/EmbedModal/components/embed-content/index.d.ts +3 -7
  58. package/dist/types-ts4.5/view/EmbedModal/components/embed-content/indexOld.d.ts +8 -0
  59. package/dist/types-ts4.5/view/EmbedModal/components/link-info/index.d.ts +3 -3
  60. package/dist/types-ts4.5/view/EmbedModal/components/link-info/indexOld.d.ts +4 -0
  61. package/dist/types-ts4.5/view/FlexibleCard/components/container/index.d.ts +10 -10
  62. package/dist/types-ts4.5/view/FlexibleCard/components/container/indexOld.d.ts +24 -0
  63. package/dist/types-ts4.5/view/FlexibleCard/components/container/layered-link/LayeredLinkOld.d.ts +13 -0
  64. package/dist/types-ts4.5/view/FlexibleCard/components/container/layered-link/index.d.ts +2 -11
  65. package/package.json +1 -1
  66. /package/dist/cjs/view/EmbedModal/components/link-info/{styled.js → styledOld.js} +0 -0
  67. /package/dist/es2019/view/EmbedModal/components/link-info/{styled.js → styledOld.js} +0 -0
  68. /package/dist/esm/view/EmbedModal/components/link-info/{styled.js → styledOld.js} +0 -0
  69. /package/dist/types/view/EmbedModal/components/link-info/{styled.d.ts → styledOld.d.ts} +0 -0
  70. /package/dist/types-ts4.5/view/EmbedModal/components/link-info/{styled.d.ts → styledOld.d.ts} +0 -0
@@ -1,4 +1,4 @@
1
- import { jsx } from '@emotion/react';
1
+ /// <reference types="react" />
2
2
  import { type LinkInfoProps } from './types';
3
- declare const LinkInfo: ({ icon, providerName, onDownloadButtonClick, onResizeButtonClick, onViewButtonClick, size, testId, title, }: LinkInfoProps) => jsx.JSX.Element;
4
- export default LinkInfo;
3
+ declare const Exported: (props: LinkInfoProps) => JSX.Element;
4
+ export default Exported;
@@ -0,0 +1,4 @@
1
+ import { jsx } from '@emotion/react';
2
+ import { type LinkInfoProps } from './types';
3
+ declare const LinkInfo: ({ icon, providerName, onDownloadButtonClick, onResizeButtonClick, onViewButtonClick, size, testId, title, }: LinkInfoProps) => jsx.JSX.Element;
4
+ export default LinkInfo;
@@ -1,14 +1,14 @@
1
- import { jsx, type SerializedStyles } from '@emotion/react';
2
- import { SmartLinkSize } from '../../../../constants';
1
+ /**
2
+ * @jsxRuntime classic
3
+ * @jsx jsx
4
+ */
5
+ import React from 'react';
6
+ import { type FlexibleUiDataContext } from '../../../../state/flexible-ui-context/types';
3
7
  import { type ChildrenOptions, type ContainerProps } from './types';
4
- export declare const getContainerStyles: (size: SmartLinkSize, hideBackground: boolean, hideElevation: boolean, hidePadding: boolean, clickableContainer: boolean, childrenOptions: ChildrenOptions) => SerializedStyles;
5
8
  /**
6
- * A container is a hidden component that build the Flexible Smart Link.
7
- * All the Flexible UI components are wrapped inside the container.
8
- * It inherits the ui props from Card component and applies the custom styling
9
- * accordingly.
10
- * @internal
11
- * @see Block
9
+ * Eventually these exports should be removed on FF clean up bandicoots-compiled-migration-smartcard
12
10
  */
13
- declare const Container: ({ children, clickableContainer, hideBackground, hideElevation, hidePadding, onClick, retry, showHoverPreview, hoverPreviewOptions, actionOptions, size, status, testId, theme, }: ContainerProps) => jsx.JSX.Element;
11
+ export { getContainerStyles } from './indexOld';
12
+ export declare const getChildrenOptions: (children: React.ReactNode, context?: FlexibleUiDataContext) => ChildrenOptions;
13
+ declare const Container: (props: ContainerProps) => JSX.Element;
14
14
  export default Container;
@@ -0,0 +1,24 @@
1
+ /**
2
+ * @jsxRuntime classic
3
+ * @jsx jsx
4
+ */
5
+ import React from 'react';
6
+ import { jsx, type SerializedStyles } from '@emotion/react';
7
+ import { SmartLinkSize } from '../../../../constants';
8
+ import { type FlexibleUiDataContext } from '../../../../state/flexible-ui-context/types';
9
+ import { type ChildrenOptions, type ContainerProps } from './types';
10
+ /**
11
+ * @deprecated consider removing on FF bandicoots-compiled-migration-smartcard
12
+ */
13
+ export declare const getContainerStyles: (size: SmartLinkSize, hideBackground: boolean, hideElevation: boolean, hidePadding: boolean, clickableContainer: boolean, childrenOptions: ChildrenOptions) => SerializedStyles;
14
+ export declare const getChildrenOptions: (children: React.ReactNode, context?: FlexibleUiDataContext) => ChildrenOptions;
15
+ /**
16
+ * A container is a hidden component that build the Flexible Smart Link.
17
+ * All the Flexible UI components are wrapped inside the container.
18
+ * It inherits the ui props from Card component and applies the custom styling
19
+ * accordingly.
20
+ * @internal
21
+ * @see Block
22
+ */
23
+ declare const ContainerOld: ({ children, clickableContainer, hideBackground, hideElevation, hidePadding, onClick, retry, showHoverPreview, hoverPreviewOptions, actionOptions, size, status, testId, theme, }: ContainerProps) => jsx.JSX.Element;
24
+ export default ContainerOld;
@@ -0,0 +1,13 @@
1
+ /**
2
+ * @jsxRuntime classic
3
+ * @jsx jsx
4
+ */
5
+ import { jsx } from '@emotion/react';
6
+ import { type LayeredLinkProps } from './types';
7
+ /**
8
+ * An anchor component to cover the entire container creating a clickable area.
9
+ * @internal
10
+ * @see `clickableContainer`
11
+ */
12
+ declare const LayeredLinkOld: ({ onClick, target, testId, text, url }: LayeredLinkProps) => jsx.JSX.Element;
13
+ export default LayeredLinkOld;
@@ -1,13 +1,4 @@
1
- /**
2
- * @jsxRuntime classic
3
- * @jsx jsx
4
- */
5
- import { jsx } from '@emotion/react';
1
+ /// <reference types="react" />
6
2
  import { type LayeredLinkProps } from './types';
7
- /**
8
- * An anchor component to cover the entire container creating a clickable area.
9
- * @internal
10
- * @see `clickableContainer`
11
- */
12
- declare const LayeredLink: ({ onClick, target, testId, text, url }: LayeredLinkProps) => jsx.JSX.Element;
3
+ declare const LayeredLink: (props: LayeredLinkProps) => JSX.Element;
13
4
  export default LayeredLink;
@@ -1,9 +1,10 @@
1
1
  import React from 'react';
2
2
  interface IFrameProps {
3
+ className?: string;
3
4
  childRef?: React.Ref<HTMLIFrameElement>;
4
5
  }
5
6
  /**
6
7
  * Iframe element isolated for DI purposes
7
8
  */
8
- export declare const IFrame: ({ childRef, ...props }: React.ComponentProps<'iframe'> & IFrameProps) => JSX.Element;
9
+ export declare const IFrame: ({ childRef, className, ...props }: React.ComponentProps<'iframe'> & IFrameProps) => JSX.Element;
9
10
  export {};
@@ -1,8 +1,4 @@
1
- /**
2
- * @jsxRuntime classic
3
- * @jsx jsx
4
- */
5
- import { jsx } from '@emotion/react';
1
+ /// <reference types="react" />
6
2
  import { type EmbedProps } from './types';
7
- declare const EmbedContent: ({ isTrusted, name, src, testId }: EmbedProps) => jsx.JSX.Element;
8
- export default EmbedContent;
3
+ declare const Exported: (props: EmbedProps) => JSX.Element;
4
+ export default Exported;
@@ -0,0 +1,8 @@
1
+ /**
2
+ * @jsxRuntime classic
3
+ * @jsx jsx
4
+ */
5
+ import { jsx } from '@emotion/react';
6
+ import { type EmbedProps } from './types';
7
+ declare const EmbedContent: ({ isTrusted, name, src, testId }: EmbedProps) => jsx.JSX.Element;
8
+ export default EmbedContent;
@@ -1,4 +1,4 @@
1
- import { jsx } from '@emotion/react';
1
+ /// <reference types="react" />
2
2
  import { type LinkInfoProps } from './types';
3
- declare const LinkInfo: ({ icon, providerName, onDownloadButtonClick, onResizeButtonClick, onViewButtonClick, size, testId, title, }: LinkInfoProps) => jsx.JSX.Element;
4
- export default LinkInfo;
3
+ declare const Exported: (props: LinkInfoProps) => JSX.Element;
4
+ export default Exported;
@@ -0,0 +1,4 @@
1
+ import { jsx } from '@emotion/react';
2
+ import { type LinkInfoProps } from './types';
3
+ declare const LinkInfo: ({ icon, providerName, onDownloadButtonClick, onResizeButtonClick, onViewButtonClick, size, testId, title, }: LinkInfoProps) => jsx.JSX.Element;
4
+ export default LinkInfo;
@@ -1,14 +1,14 @@
1
- import { jsx, type SerializedStyles } from '@emotion/react';
2
- import { SmartLinkSize } from '../../../../constants';
1
+ /**
2
+ * @jsxRuntime classic
3
+ * @jsx jsx
4
+ */
5
+ import React from 'react';
6
+ import { type FlexibleUiDataContext } from '../../../../state/flexible-ui-context/types';
3
7
  import { type ChildrenOptions, type ContainerProps } from './types';
4
- export declare const getContainerStyles: (size: SmartLinkSize, hideBackground: boolean, hideElevation: boolean, hidePadding: boolean, clickableContainer: boolean, childrenOptions: ChildrenOptions) => SerializedStyles;
5
8
  /**
6
- * A container is a hidden component that build the Flexible Smart Link.
7
- * All the Flexible UI components are wrapped inside the container.
8
- * It inherits the ui props from Card component and applies the custom styling
9
- * accordingly.
10
- * @internal
11
- * @see Block
9
+ * Eventually these exports should be removed on FF clean up bandicoots-compiled-migration-smartcard
12
10
  */
13
- declare const Container: ({ children, clickableContainer, hideBackground, hideElevation, hidePadding, onClick, retry, showHoverPreview, hoverPreviewOptions, actionOptions, size, status, testId, theme, }: ContainerProps) => jsx.JSX.Element;
11
+ export { getContainerStyles } from './indexOld';
12
+ export declare const getChildrenOptions: (children: React.ReactNode, context?: FlexibleUiDataContext) => ChildrenOptions;
13
+ declare const Container: (props: ContainerProps) => JSX.Element;
14
14
  export default Container;
@@ -0,0 +1,24 @@
1
+ /**
2
+ * @jsxRuntime classic
3
+ * @jsx jsx
4
+ */
5
+ import React from 'react';
6
+ import { jsx, type SerializedStyles } from '@emotion/react';
7
+ import { SmartLinkSize } from '../../../../constants';
8
+ import { type FlexibleUiDataContext } from '../../../../state/flexible-ui-context/types';
9
+ import { type ChildrenOptions, type ContainerProps } from './types';
10
+ /**
11
+ * @deprecated consider removing on FF bandicoots-compiled-migration-smartcard
12
+ */
13
+ export declare const getContainerStyles: (size: SmartLinkSize, hideBackground: boolean, hideElevation: boolean, hidePadding: boolean, clickableContainer: boolean, childrenOptions: ChildrenOptions) => SerializedStyles;
14
+ export declare const getChildrenOptions: (children: React.ReactNode, context?: FlexibleUiDataContext) => ChildrenOptions;
15
+ /**
16
+ * A container is a hidden component that build the Flexible Smart Link.
17
+ * All the Flexible UI components are wrapped inside the container.
18
+ * It inherits the ui props from Card component and applies the custom styling
19
+ * accordingly.
20
+ * @internal
21
+ * @see Block
22
+ */
23
+ declare const ContainerOld: ({ children, clickableContainer, hideBackground, hideElevation, hidePadding, onClick, retry, showHoverPreview, hoverPreviewOptions, actionOptions, size, status, testId, theme, }: ContainerProps) => jsx.JSX.Element;
24
+ export default ContainerOld;
@@ -0,0 +1,13 @@
1
+ /**
2
+ * @jsxRuntime classic
3
+ * @jsx jsx
4
+ */
5
+ import { jsx } from '@emotion/react';
6
+ import { type LayeredLinkProps } from './types';
7
+ /**
8
+ * An anchor component to cover the entire container creating a clickable area.
9
+ * @internal
10
+ * @see `clickableContainer`
11
+ */
12
+ declare const LayeredLinkOld: ({ onClick, target, testId, text, url }: LayeredLinkProps) => jsx.JSX.Element;
13
+ export default LayeredLinkOld;
@@ -1,13 +1,4 @@
1
- /**
2
- * @jsxRuntime classic
3
- * @jsx jsx
4
- */
5
- import { jsx } from '@emotion/react';
1
+ /// <reference types="react" />
6
2
  import { type LayeredLinkProps } from './types';
7
- /**
8
- * An anchor component to cover the entire container creating a clickable area.
9
- * @internal
10
- * @see `clickableContainer`
11
- */
12
- declare const LayeredLink: ({ onClick, target, testId, text, url }: LayeredLinkProps) => jsx.JSX.Element;
3
+ declare const LayeredLink: (props: LayeredLinkProps) => JSX.Element;
13
4
  export default LayeredLink;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@atlaskit/smart-card",
3
- "version": "34.1.1",
3
+ "version": "34.2.0",
4
4
  "description": "Smart card component",
5
5
  "publishConfig": {
6
6
  "registry": "https://registry.npmjs.org/"