@atlaskit/smart-card 17.0.0 → 17.0.1

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 (93) hide show
  1. package/CHANGELOG.md +10 -0
  2. package/dist/cjs/client/api.js +5 -3
  3. package/dist/cjs/client/errors.js +3 -1
  4. package/dist/cjs/constants.js +77 -0
  5. package/dist/cjs/extractors/block/index.js +2 -2
  6. package/dist/cjs/extractors/common/actions/extractActions.js +2 -2
  7. package/dist/cjs/extractors/common/actions/extractPreviewAction.js +2 -2
  8. package/dist/cjs/extractors/common/context/extractAccessContext.js +2 -2
  9. package/dist/cjs/extractors/embed/index.js +2 -2
  10. package/dist/cjs/extractors/flexible/index.js +22 -0
  11. package/dist/cjs/state/flexible-ui-context/index.js +17 -0
  12. package/dist/cjs/state/flexible-ui-context/types.js +5 -0
  13. package/dist/cjs/state/reducers/index.js +2 -2
  14. package/dist/cjs/utils/analytics/analytics.js +2 -2
  15. package/dist/cjs/utils/analytics/index.js +2 -2
  16. package/dist/cjs/version.json +1 -1
  17. package/dist/cjs/view/FlexibleCard/components/blocks/block/index.js +87 -0
  18. package/dist/cjs/view/FlexibleCard/components/blocks/types.js +5 -0
  19. package/dist/cjs/view/FlexibleCard/components/container/index.js +117 -0
  20. package/dist/cjs/view/FlexibleCard/components/container/types.js +5 -0
  21. package/dist/cjs/view/FlexibleCard/components/elements/icon/atlaskit-icon/index.js +244 -0
  22. package/dist/cjs/view/FlexibleCard/components/elements/icon/atlaskit-icon/types.js +5 -0
  23. package/dist/cjs/view/FlexibleCard/components/elements/icon/image-icon/index.js +32 -0
  24. package/dist/cjs/view/FlexibleCard/components/elements/icon/image-icon/types.js +5 -0
  25. package/dist/cjs/view/FlexibleCard/components/elements/icon/index.js +144 -0
  26. package/dist/cjs/view/FlexibleCard/components/elements/icon/types.js +5 -0
  27. package/dist/cjs/view/FlexibleCard/components/elements/link/index.js +135 -0
  28. package/dist/cjs/view/FlexibleCard/components/elements/link/types.js +5 -0
  29. package/dist/cjs/view/FlexibleCard/components/elements/types.js +5 -0
  30. package/dist/es2019/constants.js +67 -0
  31. package/dist/es2019/extractors/flexible/index.js +14 -0
  32. package/dist/es2019/state/flexible-ui-context/index.js +3 -0
  33. package/dist/es2019/state/flexible-ui-context/types.js +1 -0
  34. package/dist/es2019/version.json +1 -1
  35. package/dist/es2019/view/FlexibleCard/components/blocks/block/index.js +62 -0
  36. package/dist/es2019/view/FlexibleCard/components/blocks/types.js +1 -0
  37. package/dist/es2019/view/FlexibleCard/components/container/index.js +89 -0
  38. package/dist/es2019/view/FlexibleCard/components/container/types.js +1 -0
  39. package/dist/es2019/view/FlexibleCard/components/elements/icon/atlaskit-icon/index.js +175 -0
  40. package/dist/es2019/view/FlexibleCard/components/elements/icon/atlaskit-icon/types.js +1 -0
  41. package/dist/es2019/view/FlexibleCard/components/elements/icon/image-icon/index.js +19 -0
  42. package/dist/es2019/view/FlexibleCard/components/elements/icon/image-icon/types.js +1 -0
  43. package/dist/es2019/view/FlexibleCard/components/elements/icon/index.js +112 -0
  44. package/dist/es2019/view/FlexibleCard/components/elements/icon/types.js +1 -0
  45. package/dist/es2019/view/FlexibleCard/components/elements/link/index.js +118 -0
  46. package/dist/es2019/view/FlexibleCard/components/elements/link/types.js +1 -0
  47. package/dist/es2019/view/FlexibleCard/components/elements/types.js +1 -0
  48. package/dist/esm/client/api.js +4 -3
  49. package/dist/esm/client/errors.js +2 -1
  50. package/dist/esm/constants.js +67 -0
  51. package/dist/esm/extractors/block/index.js +2 -2
  52. package/dist/esm/extractors/common/actions/extractActions.js +2 -2
  53. package/dist/esm/extractors/common/actions/extractPreviewAction.js +2 -2
  54. package/dist/esm/extractors/common/context/extractAccessContext.js +2 -2
  55. package/dist/esm/extractors/embed/index.js +2 -2
  56. package/dist/esm/extractors/flexible/index.js +14 -0
  57. package/dist/esm/state/flexible-ui-context/index.js +5 -0
  58. package/dist/esm/state/flexible-ui-context/types.js +1 -0
  59. package/dist/esm/state/reducers/index.js +2 -2
  60. package/dist/esm/utils/analytics/analytics.js +2 -2
  61. package/dist/esm/utils/analytics/index.js +2 -2
  62. package/dist/esm/version.json +1 -1
  63. package/dist/esm/view/FlexibleCard/components/blocks/block/index.js +74 -0
  64. package/dist/esm/view/FlexibleCard/components/blocks/types.js +1 -0
  65. package/dist/esm/view/FlexibleCard/components/container/index.js +102 -0
  66. package/dist/esm/view/FlexibleCard/components/container/types.js +1 -0
  67. package/dist/esm/view/FlexibleCard/components/elements/icon/atlaskit-icon/index.js +224 -0
  68. package/dist/esm/view/FlexibleCard/components/elements/icon/atlaskit-icon/types.js +1 -0
  69. package/dist/esm/view/FlexibleCard/components/elements/icon/image-icon/index.js +20 -0
  70. package/dist/esm/view/FlexibleCard/components/elements/icon/image-icon/types.js +1 -0
  71. package/dist/esm/view/FlexibleCard/components/elements/icon/index.js +124 -0
  72. package/dist/esm/view/FlexibleCard/components/elements/icon/types.js +1 -0
  73. package/dist/esm/view/FlexibleCard/components/elements/link/index.js +120 -0
  74. package/dist/esm/view/FlexibleCard/components/elements/link/types.js +1 -0
  75. package/dist/esm/view/FlexibleCard/components/elements/types.js +1 -0
  76. package/dist/types/constants.d.ts +56 -0
  77. package/dist/types/extractors/flexible/index.d.ts +4 -0
  78. package/dist/types/state/flexible-ui-context/index.d.ts +4 -0
  79. package/dist/types/state/flexible-ui-context/types.d.ts +3 -0
  80. package/dist/types/view/FlexibleCard/components/blocks/block/index.d.ts +7 -0
  81. package/dist/types/view/FlexibleCard/components/blocks/types.d.ts +6 -0
  82. package/dist/types/view/FlexibleCard/components/container/index.d.ts +7 -0
  83. package/dist/types/view/FlexibleCard/components/container/types.d.ts +8 -0
  84. package/dist/types/view/FlexibleCard/components/elements/icon/atlaskit-icon/index.d.ts +4 -0
  85. package/dist/types/view/FlexibleCard/components/elements/icon/atlaskit-icon/types.d.ts +6 -0
  86. package/dist/types/view/FlexibleCard/components/elements/icon/image-icon/index.d.ts +5 -0
  87. package/dist/types/view/FlexibleCard/components/elements/icon/image-icon/types.d.ts +6 -0
  88. package/dist/types/view/FlexibleCard/components/elements/icon/index.d.ts +5 -0
  89. package/dist/types/view/FlexibleCard/components/elements/icon/types.d.ts +7 -0
  90. package/dist/types/view/FlexibleCard/components/elements/link/index.d.ts +5 -0
  91. package/dist/types/view/FlexibleCard/components/elements/link/types.d.ts +8 -0
  92. package/dist/types/view/FlexibleCard/components/elements/types.d.ts +5 -0
  93. package/package.json +10 -6
@@ -0,0 +1,124 @@
1
+ import _defineProperty from "@babel/runtime/helpers/defineProperty";
2
+
3
+ function ownKeys(object, enumerableOnly) { var keys = Object.keys(object); if (Object.getOwnPropertySymbols) { var symbols = Object.getOwnPropertySymbols(object); enumerableOnly && (symbols = symbols.filter(function (sym) { return Object.getOwnPropertyDescriptor(object, sym).enumerable; })), keys.push.apply(keys, symbols); } return keys; }
4
+
5
+ function _objectSpread(target) { for (var i = 1; i < arguments.length; i++) { var source = null != arguments[i] ? arguments[i] : {}; i % 2 ? ownKeys(Object(source), !0).forEach(function (key) { _defineProperty(target, key, source[key]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(target, Object.getOwnPropertyDescriptors(source)) : ownKeys(Object(source)).forEach(function (key) { Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key)); }); } return target; }
6
+
7
+ /** @jsx jsx */
8
+ import React, { useMemo } from 'react';
9
+ import LinkIcon from '@atlaskit/icon/glyph/link';
10
+ import { css, jsx } from '@emotion/core';
11
+ import { SmartLinkSize } from '../../../../../constants';
12
+ import AtlaskitIcon from './atlaskit-icon';
13
+ import ImageIcon from './image-icon';
14
+
15
+ var getDimensionStyles = function getDimensionStyles(value) {
16
+ return {
17
+ maxHeight: value,
18
+ maxWidth: value,
19
+ minHeight: value,
20
+ minWidth: value,
21
+ height: value,
22
+ width: value
23
+ };
24
+ };
25
+
26
+ var getSizeStyles = function getSizeStyles(size) {
27
+ switch (size) {
28
+ case SmartLinkSize.XLarge:
29
+ return getDimensionStyles('1.75rem');
30
+
31
+ case SmartLinkSize.Large:
32
+ return getDimensionStyles('1.5rem');
33
+
34
+ case SmartLinkSize.Medium:
35
+ return getDimensionStyles('1rem');
36
+
37
+ case SmartLinkSize.Small:
38
+ default:
39
+ return getDimensionStyles('.75rem');
40
+ }
41
+ };
42
+
43
+ var getMargin = function getMargin(size) {
44
+ switch (size) {
45
+ case SmartLinkSize.XLarge:
46
+ return '0.12em 0 0 0';
47
+
48
+ case SmartLinkSize.Large:
49
+ return '0';
50
+
51
+ case SmartLinkSize.Medium:
52
+ return '0';
53
+
54
+ case SmartLinkSize.Small:
55
+ default:
56
+ return '-.05em 0 0 0';
57
+ }
58
+ };
59
+
60
+ var getIconStyles = function getIconStyles(size) {
61
+ var styles = getSizeStyles(size);
62
+ return css(_objectSpread(_objectSpread({
63
+ flex: '0 0 auto',
64
+ alignSelf: 'flex-start',
65
+ margin: getMargin(size)
66
+ }, styles), {}, {
67
+ '[class$="-Icon"],[class$="-Wrapper"]': _objectSpread(_objectSpread({}, styles), {}, {
68
+ '> svg': _objectSpread(_objectSpread({}, styles), {}, {
69
+ padding: 0
70
+ })
71
+ }),
72
+ '& > img': styles
73
+ }));
74
+ };
75
+
76
+ var renderAtlaskitIcon = function renderAtlaskitIcon(icon, label, testId) {
77
+ if (icon) {
78
+ return jsx(AtlaskitIcon, {
79
+ icon: icon,
80
+ label: label,
81
+ testId: "".concat(testId, "-icon")
82
+ });
83
+ }
84
+ };
85
+
86
+ var renderDefaultIcon = function renderDefaultIcon(label, testId) {
87
+ return jsx(LinkIcon, {
88
+ label: label,
89
+ testId: "".concat(testId, "-default")
90
+ });
91
+ };
92
+
93
+ var renderImageIcon = function renderImageIcon(defaultIcon, icon, url, testId) {
94
+ if (url) {
95
+ return jsx(ImageIcon, {
96
+ defaultIcon: defaultIcon,
97
+ testId: testId,
98
+ url: url
99
+ });
100
+ }
101
+ };
102
+
103
+ var Icon = function Icon(_ref) {
104
+ var icon = _ref.icon,
105
+ _ref$label = _ref.label,
106
+ label = _ref$label === void 0 ? 'Link' : _ref$label,
107
+ _ref$size = _ref.size,
108
+ size = _ref$size === void 0 ? SmartLinkSize.Medium : _ref$size,
109
+ _ref$testId = _ref.testId,
110
+ testId = _ref$testId === void 0 ? 'smart-element-icon' : _ref$testId,
111
+ url = _ref.url;
112
+ var element = useMemo(function () {
113
+ var defaultIcon = renderDefaultIcon(label, testId);
114
+ return renderImageIcon(defaultIcon, icon, url, testId) || renderAtlaskitIcon(icon, label, testId) || defaultIcon;
115
+ }, [icon, label, testId, url]);
116
+ var styles = getIconStyles(size);
117
+ return jsx("div", {
118
+ css: styles,
119
+ "data-smart-element-icon": true,
120
+ "data-testid": testId
121
+ }, element);
122
+ };
123
+
124
+ export default Icon;
@@ -0,0 +1,120 @@
1
+ import _defineProperty from "@babel/runtime/helpers/defineProperty";
2
+
3
+ function ownKeys(object, enumerableOnly) { var keys = Object.keys(object); if (Object.getOwnPropertySymbols) { var symbols = Object.getOwnPropertySymbols(object); enumerableOnly && (symbols = symbols.filter(function (sym) { return Object.getOwnPropertyDescriptor(object, sym).enumerable; })), keys.push.apply(keys, symbols); } return keys; }
4
+
5
+ function _objectSpread(target) { for (var i = 1; i < arguments.length; i++) { var source = null != arguments[i] ? arguments[i] : {}; i % 2 ? ownKeys(Object(source), !0).forEach(function (key) { _defineProperty(target, key, source[key]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(target, Object.getOwnPropertyDescriptors(source)) : ownKeys(Object(source)).forEach(function (key) { Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key)); }); } return target; }
6
+
7
+ /** @jsx jsx */
8
+ import React from 'react';
9
+ import { B400, N800, N900, B500 } from '@atlaskit/theme/colors';
10
+ import { h200, h400, h600, h800 } from '@atlaskit/theme/typography';
11
+ import { token } from '@atlaskit/tokens';
12
+ import { css, jsx } from '@emotion/core';
13
+ import { SmartLinkSize, SmartLinkTheme } from '../../../../../constants';
14
+ var DEFAULT_MAX_LINES = 2;
15
+ var MAXIMUM_MAX_LINES = 2;
16
+ var MINIMUM_MAX_LINES = 1;
17
+
18
+ var getSizeStyles = function getSizeStyles(size) {
19
+ var overrides = {
20
+ marginTop: 'unset'
21
+ };
22
+
23
+ switch (size) {
24
+ case SmartLinkSize.XLarge:
25
+ return _objectSpread(_objectSpread({}, h800()), overrides);
26
+
27
+ case SmartLinkSize.Large:
28
+ return _objectSpread(_objectSpread({}, h600()), overrides);
29
+
30
+ case SmartLinkSize.Medium:
31
+ return _objectSpread(_objectSpread({}, h400()), overrides);
32
+
33
+ case SmartLinkSize.Small:
34
+ default:
35
+ return _objectSpread(_objectSpread({}, h200()), overrides);
36
+ }
37
+ };
38
+
39
+ var getThemeStyles = function getThemeStyles(theme) {
40
+ switch (theme) {
41
+ case SmartLinkTheme.Black:
42
+ return {
43
+ color: token('color.text.subtle', N800),
44
+ fontWeight: 500,
45
+ ':active': {
46
+ color: token('color.text', N900)
47
+ },
48
+ ':hover': {
49
+ color: token('color.text.subtle', N800),
50
+ textDecoration: 'underline'
51
+ }
52
+ };
53
+
54
+ case SmartLinkTheme.Link:
55
+ default:
56
+ return {
57
+ color: token('color.link', B400),
58
+ ':active': {
59
+ color: token('color.link.pressed', B500)
60
+ },
61
+ ':hover': {
62
+ color: token('color.link', B400),
63
+ textDecoration: 'underline'
64
+ }
65
+ };
66
+ }
67
+ };
68
+
69
+ var getTruncateStyles = function getTruncateStyles(maxLines) {
70
+ var lineHeight = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : 16;
71
+ return {
72
+ display: '-webkit-box',
73
+ flex: '1 1 auto',
74
+ overflow: 'hidden',
75
+ textOverflow: 'ellipsis',
76
+ wordBreak: 'break-word',
77
+ WebkitLineClamp: maxLines,
78
+ WebkitBoxOrient: 'vertical',
79
+ // Fallback options.
80
+ maxHeight: "".concat((maxLines * lineHeight).toFixed(3), "em")
81
+ };
82
+ };
83
+
84
+ var getStyles = function getStyles(size, theme, maxLines) {
85
+ var sizeStyles = getSizeStyles(size);
86
+ return css(_objectSpread(_objectSpread(_objectSpread({}, sizeStyles), getTruncateStyles(maxLines, sizeStyles === null || sizeStyles === void 0 ? void 0 : sizeStyles.lineHeight)), getThemeStyles(theme)));
87
+ };
88
+
89
+ var getMaxLines = function getMaxLines(maxLines) {
90
+ if (maxLines > MAXIMUM_MAX_LINES) {
91
+ return DEFAULT_MAX_LINES;
92
+ }
93
+
94
+ if (maxLines < MINIMUM_MAX_LINES) {
95
+ return MINIMUM_MAX_LINES;
96
+ }
97
+
98
+ return maxLines;
99
+ };
100
+
101
+ var Link = function Link(_ref) {
102
+ var _ref$maxLines = _ref.maxLines,
103
+ maxLines = _ref$maxLines === void 0 ? DEFAULT_MAX_LINES : _ref$maxLines,
104
+ _ref$size = _ref.size,
105
+ size = _ref$size === void 0 ? SmartLinkSize.Medium : _ref$size,
106
+ _ref$testId = _ref.testId,
107
+ testId = _ref$testId === void 0 ? 'smart-element-link' : _ref$testId,
108
+ text = _ref.text,
109
+ _ref$theme = _ref.theme,
110
+ theme = _ref$theme === void 0 ? SmartLinkTheme.Link : _ref$theme,
111
+ url = _ref.url;
112
+ return jsx("a", {
113
+ css: getStyles(size, theme, getMaxLines(maxLines)),
114
+ href: url,
115
+ "data-smart-element-link": true,
116
+ "data-testid": testId
117
+ }, text);
118
+ };
119
+
120
+ export default Link;
@@ -0,0 +1,56 @@
1
+ export declare enum SmartLinkDirection {
2
+ Horizontal = "Horizontal",
3
+ Vertical = "Vertical"
4
+ }
5
+ export declare enum SmartLinkSize {
6
+ XLarge = "xlarge",
7
+ Large = "large",
8
+ Medium = "medium",
9
+ Small = "small"
10
+ }
11
+ export declare enum SmartLinkTheme {
12
+ Black = "Black",
13
+ Link = "Link"
14
+ }
15
+ export declare enum IconType {
16
+ Archive = "FileType:Archive",
17
+ Audio = "FileType:Audio",
18
+ Blog = "FileType:Blog",
19
+ Code = "FileType:Code",
20
+ Document = "FileType:Document",
21
+ Executable = "FileType:Executable",
22
+ File = "FileType:File",
23
+ Folder = "FileType:Folder",
24
+ Generic = "FileType:Generic",
25
+ GIF = "FileType:GIF",
26
+ GoogleDocs = "FileType:GoogleDocs",
27
+ GoogleForms = "FileType:GoogleForms",
28
+ GoogleSheets = "FileType:GoogleSheets",
29
+ GoogleSlides = "FileType:GoogleSlides",
30
+ Image = "FileType.Image",
31
+ MSExcel = "FileType:Excel",
32
+ MSPowerpoint = "FileType:Powerpoint",
33
+ MSWord = "FileType:WordDocument",
34
+ PDF = "FileType:PDF",
35
+ Presentation = "FileType:Presentation",
36
+ Sketch = "FileType:Sketch",
37
+ Spreadsheet = "FileType:Spreadsheet",
38
+ Template = "FileType:Template",
39
+ Video = "FileType:Video",
40
+ Branch = "BitBucket:Branch",
41
+ Commit = "BitBucket:Commit",
42
+ Project = "BitBucket:Project",
43
+ PullRequest = "BitBucket:PullRequest",
44
+ Repo = "BitBucket:Repo",
45
+ Bug = "Jira:Bug",
46
+ Change = "Jira:Change",
47
+ Epic = "Jira:Epic",
48
+ Incident = "Jira:Incident",
49
+ Problem = "Jira:Problem",
50
+ ServiceRequest = "Jira:ServiceRequest",
51
+ Story = "Jira:Story",
52
+ SubTask = "Jira:SubTask",
53
+ Task = "Jira:Task",
54
+ Confluence = "Provider:Confluence",
55
+ Jira = "Provider:Jira"
56
+ }
@@ -0,0 +1,4 @@
1
+ import { JsonLd } from 'json-ld-types';
2
+ import { FlexibleUiDataContext } from '../../state/flexible-ui-context/types';
3
+ declare const extractFlexibleUiContext: (response?: JsonLd.Response<JsonLd.Data.BaseData> | undefined) => FlexibleUiDataContext | undefined;
4
+ export default extractFlexibleUiContext;
@@ -0,0 +1,4 @@
1
+ /// <reference types="react" />
2
+ import { FlexibleUiDataContext } from './types';
3
+ export declare const FlexibleUiContext: import("react").Context<FlexibleUiDataContext | undefined>;
4
+ export declare const useFlexibleUiContext: () => FlexibleUiDataContext | undefined;
@@ -0,0 +1,3 @@
1
+ export declare type FlexibleUiDataContext = {
2
+ title?: string;
3
+ };
@@ -0,0 +1,7 @@
1
+ /** @jsx jsx */
2
+ import React from 'react';
3
+ import { BlockProps } from '../types';
4
+ import { SmartLinkDirection, SmartLinkSize } from '../../../../../constants';
5
+ export declare const getBlockStyles: (direction: SmartLinkDirection, size: SmartLinkSize) => import("@emotion/core").SerializedStyles;
6
+ declare const Block: React.FC<BlockProps>;
7
+ export default Block;
@@ -0,0 +1,6 @@
1
+ import { SmartLinkDirection, SmartLinkSize } from '../../../../constants';
2
+ export declare type BlockProps = {
3
+ direction?: SmartLinkDirection;
4
+ size?: SmartLinkSize;
5
+ testId?: string;
6
+ };
@@ -0,0 +1,7 @@
1
+ /** @jsx jsx */
2
+ import React from 'react';
3
+ import { SmartLinkSize } from '../../../../constants';
4
+ import { ContainerProps } from './types';
5
+ export declare const getContainerStyles: (size: SmartLinkSize, hideBackground: boolean, hideElevation: boolean, hidePadding: boolean) => import("@emotion/core").SerializedStyles;
6
+ declare const Container: React.FC<ContainerProps>;
7
+ export default Container;
@@ -0,0 +1,8 @@
1
+ import { SmartLinkSize } from '../../../../constants';
2
+ export declare type ContainerProps = {
3
+ hideBackground?: boolean;
4
+ hideElevation?: boolean;
5
+ hidePadding?: boolean;
6
+ size?: SmartLinkSize;
7
+ testId?: string;
8
+ };
@@ -0,0 +1,4 @@
1
+ import React from 'react';
2
+ import { AtlaskitIconProps } from './types';
3
+ declare const AtlaskitIcon: React.FC<AtlaskitIconProps>;
4
+ export default AtlaskitIcon;
@@ -0,0 +1,6 @@
1
+ import { IconType } from '../../../../../../constants';
2
+ export declare type AtlaskitIconProps = {
3
+ icon: IconType;
4
+ label?: string;
5
+ testId?: string;
6
+ };
@@ -0,0 +1,5 @@
1
+ /** @jsx jsx */
2
+ import React from 'react';
3
+ import { ImageIconProps } from './types';
4
+ declare const ImageIcon: React.FC<ImageIconProps>;
5
+ export default ImageIcon;
@@ -0,0 +1,6 @@
1
+ /// <reference types="react" />
2
+ export declare type ImageIconProps = {
3
+ defaultIcon?: React.ReactNode;
4
+ testId?: string;
5
+ url: string;
6
+ };
@@ -0,0 +1,5 @@
1
+ /** @jsx jsx */
2
+ import React from 'react';
3
+ import { IconProps } from './types';
4
+ declare const Icon: React.FC<IconProps>;
5
+ export default Icon;
@@ -0,0 +1,7 @@
1
+ import { ElementProps } from '../types';
2
+ import { IconType } from '../../../../../constants';
3
+ export declare type IconProps = ElementProps & {
4
+ icon?: IconType;
5
+ label?: string;
6
+ url?: string;
7
+ };
@@ -0,0 +1,5 @@
1
+ /** @jsx jsx */
2
+ import React from 'react';
3
+ import { LinkProps } from './types';
4
+ declare const Link: React.FC<LinkProps>;
5
+ export default Link;
@@ -0,0 +1,8 @@
1
+ import { ElementProps } from '../types';
2
+ import { SmartLinkTheme } from '../../../../../constants';
3
+ export declare type LinkProps = ElementProps & {
4
+ maxLines?: number;
5
+ text: string;
6
+ theme?: SmartLinkTheme;
7
+ url: string;
8
+ };
@@ -0,0 +1,5 @@
1
+ import { SmartLinkSize } from '../../../../constants';
2
+ export declare type ElementProps = {
3
+ size?: SmartLinkSize;
4
+ testId?: string;
5
+ };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@atlaskit/smart-card",
3
- "version": "17.0.0",
3
+ "version": "17.0.1",
4
4
  "description": "Smart card component",
5
5
  "publishConfig": {
6
6
  "registry": "https://registry.npmjs.org/"
@@ -24,16 +24,18 @@
24
24
  "dependencies": {
25
25
  "@atlaskit/analytics-gas-types": "^5.0.0",
26
26
  "@atlaskit/analytics-next": "^8.2.0",
27
- "@atlaskit/icon": "^21.9.0",
27
+ "@atlaskit/icon": "^21.10.0",
28
28
  "@atlaskit/icon-file-type": "^6.3.0",
29
29
  "@atlaskit/icon-object": "^6.2.0",
30
30
  "@atlaskit/in-product-testing": "^0.1.0",
31
31
  "@atlaskit/logo": "^13.5.0",
32
- "@atlaskit/media-ui": "^18.0.0",
32
+ "@atlaskit/media-ui": "^18.1.0",
33
33
  "@atlaskit/outbound-auth-flow-client": "^3.3.0",
34
- "@atlaskit/theme": "^12.0.0",
34
+ "@atlaskit/theme": "^12.1.0",
35
+ "@atlaskit/tokens": "^0.6.0",
35
36
  "@atlaskit/ufo": "^0.0.6",
36
37
  "@babel/runtime": "^7.0.0",
38
+ "@emotion/core": "^10.0.9",
37
39
  "@formatjs/intl-utils": "^3.8.4",
38
40
  "async-retry": "^1.2.3",
39
41
  "dataloader": "^2.0.0",
@@ -42,6 +44,7 @@
42
44
  "react-error-boundary": "^3.1.3",
43
45
  "react-lazily-render": "^1.2.0",
44
46
  "react-loadable": "^5.1.0",
47
+ "react-render-image": "^1.1.3",
45
48
  "redux": "^3.7.2",
46
49
  "setimmediate": "^1.0.5",
47
50
  "uuid": "^3.1.0"
@@ -60,14 +63,15 @@
60
63
  "@atlaskit/inline-message": "^11.2.0",
61
64
  "@atlaskit/lozenge": "^11.1.0",
62
65
  "@atlaskit/media-test-helpers": "^29.0.0",
63
- "@atlaskit/page": "^12.0.0",
66
+ "@atlaskit/page": "^12.1.0",
64
67
  "@atlaskit/radio": "^5.3.0",
65
68
  "@atlaskit/select": "^15.2.0",
66
69
  "@atlaskit/spinner": "^15.1.0",
67
- "@atlaskit/table-tree": "^9.0.0",
70
+ "@atlaskit/table-tree": "^9.1.0",
68
71
  "@atlaskit/textarea": "^4.2.0",
69
72
  "@atlaskit/textfield": "^5.1.0",
70
73
  "@atlassian/atlassian-frontend-prettier-config-1.0.1": "npm:@atlassian/atlassian-frontend-prettier-config@1.0.1",
74
+ "@testing-library/jest-dom": "^4.1.0",
71
75
  "@testing-library/react": "^8.0.1",
72
76
  "@testing-library/react-hooks": "^1.0.4",
73
77
  "@types/async-retry": "^1.4.1",