@atlaskit/smart-card 38.10.1 → 38.10.2

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.
package/CHANGELOG.md CHANGED
@@ -1,5 +1,14 @@
1
1
  # @atlaskit/smart-card
2
2
 
3
+ ## 38.10.2
4
+
5
+ ### Patch Changes
6
+
7
+ - [#172989](https://bitbucket.org/atlassian/atlassian-frontend-monorepo/pull-requests/172989)
8
+ [`41bb7602f58e3`](https://bitbucket.org/atlassian/atlassian-frontend-monorepo/commits/41bb7602f58e3) -
9
+ Refactor and clean up types for external elements
10
+ - Updated dependencies
11
+
3
12
  ## 38.10.1
4
13
 
5
14
  ### Patch Changes
@@ -20,7 +20,7 @@ var _elements = require("./components/elements");
20
20
  * DO NOT add a new prop to these components until we are ready to support it externally.
21
21
  */
22
22
 
23
- // ---- EXPORTED METADATA COMPONENT ---- //
23
+ // ---- EXPORTED METADATA COMPONENTS ---- //
24
24
  var AssignedToElement = exports.AssignedToElement = function AssignedToElement() {
25
25
  return /*#__PURE__*/_react.default.createElement(_elements.AssignedTo, null);
26
26
  };
@@ -128,8 +128,8 @@ var SentOnElement = exports.SentOnElement = function SentOnElement() {
128
128
  };
129
129
  var SnippetElement = exports.SnippetElement = function SnippetElement(props) {
130
130
  return /*#__PURE__*/_react.default.createElement(_elements.Snippet, {
131
- maxLines: props.maxLines,
132
- content: props.text
131
+ maxLines: props === null || props === void 0 ? void 0 : props.maxLines,
132
+ content: props === null || props === void 0 ? void 0 : props.text
133
133
  });
134
134
  };
135
135
  var SourceBranchElement = exports.SourceBranchElement = function SourceBranchElement() {
@@ -180,8 +180,8 @@ var CopyLinkAction = exports.CopyLinkAction = function CopyLinkAction(props) {
180
180
  };
181
181
  var CustomAction = exports.CustomAction = function CustomAction(props) {
182
182
  return /*#__PURE__*/_react.default.createElement(_actions.CustomAction, (0, _extends2.default)({}, toActionProps(props), {
183
- content: props === null || props === void 0 ? void 0 : props.children,
184
- onClick: props === null || props === void 0 ? void 0 : props.onClick
183
+ content: props.children,
184
+ onClick: props.onClick
185
185
  }));
186
186
  };
187
187
  var DownloadAction = exports.DownloadAction = function DownloadAction(props) {
@@ -12,7 +12,8 @@ import { fg } from '@atlaskit/platform-feature-flags';
12
12
  import { SmartLinkSize } from '../../constants';
13
13
  import { CopyLinkAction as CopyLinkActionComponent, CustomAction as CustomActionComponent, DownloadAction as DownloadActionComponent, FollowAction as FollowActionComponent, PreviewAction as PreviewActionComponent, UnresolvedAction as UnresolvedActionComponent } from './components/actions';
14
14
  import { AssignedTo, AssignedToGroup, AttachmentCount, AuthorGroup, ChecklistProgress, CollaboratorGroup, CommentCount, CreatedBy, CreatedOn, DueOn, LatestCommit, LinkIcon, Location, ModifiedBy, ModifiedOn, OwnedBy, OwnedByGroup, Preview, Priority, ProgrammingLanguage, Provider, ReactCount, ReadTime, SentOn, Snippet, SourceBranch, State, StoryPoints, SubscriberCount, SubTasksProgress, TargetBranch, Title, ViewCount, VoteCount } from './components/elements';
15
- // ---- EXPORTED METADATA COMPONENT ---- //
15
+
16
+ // ---- EXPORTED METADATA COMPONENTS ---- //
16
17
  export const AssignedToElement = () => /*#__PURE__*/React.createElement(AssignedTo, null);
17
18
  export const AssignedToGroupElement = () => /*#__PURE__*/React.createElement(AssignedToGroup, null);
18
19
  export const AttachmentCountElement = () => /*#__PURE__*/React.createElement(AttachmentCount, null);
@@ -83,8 +84,8 @@ export const ReactCountElement = props => {
83
84
  export const ReadTimeElement = () => /*#__PURE__*/React.createElement(ReadTime, null);
84
85
  export const SentOnElement = () => /*#__PURE__*/React.createElement(SentOn, null);
85
86
  export const SnippetElement = props => /*#__PURE__*/React.createElement(Snippet, {
86
- maxLines: props.maxLines,
87
- content: props.text
87
+ maxLines: props === null || props === void 0 ? void 0 : props.maxLines,
88
+ content: props === null || props === void 0 ? void 0 : props.text
88
89
  });
89
90
  export const SourceBranchElement = () => /*#__PURE__*/React.createElement(SourceBranch, null);
90
91
  export const StateElement = () => /*#__PURE__*/React.createElement(State, null);
@@ -113,8 +114,8 @@ export const toActionProps = props => {
113
114
  };
114
115
  export const CopyLinkAction = props => /*#__PURE__*/React.createElement(CopyLinkActionComponent, toActionProps(props));
115
116
  export const CustomAction = props => /*#__PURE__*/React.createElement(CustomActionComponent, _extends({}, toActionProps(props), {
116
- content: props === null || props === void 0 ? void 0 : props.children,
117
- onClick: props === null || props === void 0 ? void 0 : props.onClick
117
+ content: props.children,
118
+ onClick: props.onClick
118
119
  }));
119
120
  export const DownloadAction = props => /*#__PURE__*/React.createElement(DownloadActionComponent, toActionProps(props));
120
121
  export const FollowAction = props => /*#__PURE__*/React.createElement(FollowActionComponent, toActionProps(props));
@@ -12,7 +12,8 @@ import { fg } from '@atlaskit/platform-feature-flags';
12
12
  import { SmartLinkSize } from '../../constants';
13
13
  import { CopyLinkAction as CopyLinkActionComponent, CustomAction as CustomActionComponent, DownloadAction as DownloadActionComponent, FollowAction as FollowActionComponent, PreviewAction as PreviewActionComponent, UnresolvedAction as UnresolvedActionComponent } from './components/actions';
14
14
  import { AssignedTo, AssignedToGroup, AttachmentCount, AuthorGroup, ChecklistProgress, CollaboratorGroup, CommentCount, CreatedBy, CreatedOn, DueOn, LatestCommit, LinkIcon, Location, ModifiedBy, ModifiedOn, OwnedBy, OwnedByGroup, Preview, Priority, ProgrammingLanguage, Provider, ReactCount, ReadTime, SentOn, Snippet, SourceBranch, State, StoryPoints, SubscriberCount, SubTasksProgress, TargetBranch, Title, ViewCount, VoteCount } from './components/elements';
15
- // ---- EXPORTED METADATA COMPONENT ---- //
15
+
16
+ // ---- EXPORTED METADATA COMPONENTS ---- //
16
17
  export var AssignedToElement = function AssignedToElement() {
17
18
  return /*#__PURE__*/React.createElement(AssignedTo, null);
18
19
  };
@@ -120,8 +121,8 @@ export var SentOnElement = function SentOnElement() {
120
121
  };
121
122
  export var SnippetElement = function SnippetElement(props) {
122
123
  return /*#__PURE__*/React.createElement(Snippet, {
123
- maxLines: props.maxLines,
124
- content: props.text
124
+ maxLines: props === null || props === void 0 ? void 0 : props.maxLines,
125
+ content: props === null || props === void 0 ? void 0 : props.text
125
126
  });
126
127
  };
127
128
  export var SourceBranchElement = function SourceBranchElement() {
@@ -172,8 +173,8 @@ export var CopyLinkAction = function CopyLinkAction(props) {
172
173
  };
173
174
  export var CustomAction = function CustomAction(props) {
174
175
  return /*#__PURE__*/React.createElement(CustomActionComponent, _extends({}, toActionProps(props), {
175
- content: props === null || props === void 0 ? void 0 : props.children,
176
- onClick: props === null || props === void 0 ? void 0 : props.onClick
176
+ content: props.children,
177
+ onClick: props.onClick
177
178
  }));
178
179
  };
179
180
  export var DownloadAction = function DownloadAction(props) {
@@ -7,53 +7,54 @@
7
7
  * DO NOT add a new prop to these components until we are ready to support it externally.
8
8
  */
9
9
  import React from 'react';
10
- import type { BaseBadgeElementProps, BaseDateTimeElementProps, BaseIconElementProps, BaseLinkElementProps, BaseTextElementProps } from './components/elements/common';
11
- import type { PreviewElementProps } from './components/elements/preview-element';
10
+ import { Prettify } from '@atlaskit/linking-common';
11
+ import { CommentCount, LinkIcon, ModifiedOn, OwnedBy, Preview, ReactCount, Snippet, Title } from './components/elements';
12
12
  export declare const AssignedToElement: () => React.JSX.Element;
13
13
  export declare const AssignedToGroupElement: () => React.JSX.Element;
14
14
  export declare const AttachmentCountElement: () => React.JSX.Element;
15
15
  export declare const AuthorGroupElement: () => React.JSX.Element;
16
16
  export declare const ChecklistProgressElement: () => React.JSX.Element;
17
17
  export declare const CollaboratorGroupElement: () => React.JSX.Element;
18
- type CommentCountElementProps = Pick<BaseBadgeElementProps, 'color'>;
18
+ type CommentCountElementProps = Pick<React.ComponentProps<typeof CommentCount>, 'color'>;
19
19
  export declare const CommentCountElement: (props?: CommentCountElementProps) => React.JSX.Element;
20
20
  export declare const CreatedOnElement: () => React.JSX.Element;
21
21
  export declare const CreatedByElement: () => React.JSX.Element;
22
22
  export declare const DueOnElement: () => React.JSX.Element;
23
23
  export declare const LatestCommitElement: () => React.JSX.Element;
24
- type LinkIconElementProps = Pick<BaseIconElementProps, 'render'> & {
24
+ type LinkIconElementProps = Prettify<Pick<React.ComponentProps<typeof LinkIcon>, 'render'> & {
25
25
  iconTileSize?: 16 | 24;
26
- };
26
+ }>;
27
27
  export declare const LinkIconElement: (props?: LinkIconElementProps) => React.JSX.Element;
28
28
  export declare const LocationElement: () => React.JSX.Element;
29
29
  export declare const ModifiedByElement: () => React.JSX.Element;
30
- type ModifiedOnElementProps = Pick<BaseDateTimeElementProps, 'hideDatePrefix' | 'color'>;
30
+ type ModifiedOnElementProps = Pick<React.ComponentProps<typeof ModifiedOn>, 'hideDatePrefix' | 'color'>;
31
31
  export declare const ModifiedOnElement: (props?: ModifiedOnElementProps) => React.JSX.Element;
32
- type OwnedByElementProps = Pick<BaseTextElementProps, 'hideFormat' | 'color'>;
32
+ type OwnedByElementProps = Pick<React.ComponentProps<typeof OwnedBy>, 'hideFormat' | 'color'>;
33
33
  export declare const OwnedByElement: (props?: OwnedByElementProps) => React.JSX.Element;
34
34
  export declare const OwnedByGroupElement: () => React.JSX.Element;
35
- export declare const PreviewElement: (props: Omit<PreviewElementProps, 'overrideUrl'> & {
36
- url?: PreviewElementProps['overrideUrl'];
37
- }) => React.JSX.Element;
35
+ type PreviewElementProps = {
36
+ url?: React.ComponentProps<typeof Preview>['overrideUrl'];
37
+ };
38
+ export declare const PreviewElement: (props?: PreviewElementProps) => React.JSX.Element;
38
39
  export declare const PriorityElement: () => React.JSX.Element;
39
40
  export declare const ProgrammingLanguageElement: () => React.JSX.Element;
40
41
  export declare const ProviderElement: () => React.JSX.Element;
41
- type ReactCountElementProps = Pick<BaseBadgeElementProps, 'color'>;
42
+ type ReactCountElementProps = Pick<React.ComponentProps<typeof ReactCount>, 'color'>;
42
43
  export declare const ReactCountElement: (props?: ReactCountElementProps) => React.JSX.Element;
43
44
  export declare const ReadTimeElement: () => React.JSX.Element;
44
45
  export declare const SentOnElement: () => React.JSX.Element;
45
- export type SnippetElementProps = Pick<BaseTextElementProps, 'maxLines'> & {
46
- text?: BaseTextElementProps['content'];
47
- };
48
- export declare const SnippetElement: (props: SnippetElementProps) => React.JSX.Element;
46
+ export type SnippetElementProps = Prettify<Pick<React.ComponentProps<typeof Snippet>, 'maxLines'> & {
47
+ text?: React.ComponentProps<typeof Snippet>['content'];
48
+ }>;
49
+ export declare const SnippetElement: (props?: SnippetElementProps) => React.JSX.Element;
49
50
  export declare const SourceBranchElement: () => React.JSX.Element;
50
51
  export declare const StateElement: () => React.JSX.Element;
51
52
  export declare const StoryPointsElement: () => React.JSX.Element;
52
53
  export declare const SubscriberCountElement: () => React.JSX.Element;
53
54
  export declare const SubTasksProgressElement: () => React.JSX.Element;
54
55
  export declare const TargetBranchElement: () => React.JSX.Element;
55
- export type TitleElementProps = Pick<BaseLinkElementProps, 'hideTooltip' | 'maxLines' | 'target' | 'text'>;
56
- export declare const TitleElement: (props: TitleElementProps) => React.JSX.Element;
56
+ export type TitleElementProps = Pick<React.ComponentProps<typeof Title>, 'hideTooltip' | 'maxLines' | 'target' | 'text'>;
57
+ export declare const TitleElement: (props?: TitleElementProps) => React.JSX.Element;
57
58
  export declare const ViewCountElement: () => React.JSX.Element;
58
59
  export declare const VoteCountElement: () => React.JSX.Element;
59
60
  type BaseActionProps = {
@@ -65,10 +66,10 @@ export declare const toActionProps: (props?: BaseActionProps) => {
65
66
  };
66
67
  export type CopyLinkActionProps = BaseActionProps;
67
68
  export declare const CopyLinkAction: (props: CopyLinkActionProps) => React.JSX.Element;
68
- export type CustomActionProps = BaseActionProps & {
69
+ export type CustomActionProps = Prettify<BaseActionProps & {
69
70
  children: React.ReactNode;
70
71
  onClick: () => void;
71
- };
72
+ }>;
72
73
  export declare const CustomAction: (props: CustomActionProps) => React.JSX.Element;
73
74
  export type DownloadActionProps = BaseActionProps;
74
75
  export declare const DownloadAction: (props: DownloadActionProps) => React.JSX.Element;
@@ -7,53 +7,54 @@
7
7
  * DO NOT add a new prop to these components until we are ready to support it externally.
8
8
  */
9
9
  import React from 'react';
10
- import type { BaseBadgeElementProps, BaseDateTimeElementProps, BaseIconElementProps, BaseLinkElementProps, BaseTextElementProps } from './components/elements/common';
11
- import type { PreviewElementProps } from './components/elements/preview-element';
10
+ import { Prettify } from '@atlaskit/linking-common';
11
+ import { CommentCount, LinkIcon, ModifiedOn, OwnedBy, Preview, ReactCount, Snippet, Title } from './components/elements';
12
12
  export declare const AssignedToElement: () => React.JSX.Element;
13
13
  export declare const AssignedToGroupElement: () => React.JSX.Element;
14
14
  export declare const AttachmentCountElement: () => React.JSX.Element;
15
15
  export declare const AuthorGroupElement: () => React.JSX.Element;
16
16
  export declare const ChecklistProgressElement: () => React.JSX.Element;
17
17
  export declare const CollaboratorGroupElement: () => React.JSX.Element;
18
- type CommentCountElementProps = Pick<BaseBadgeElementProps, 'color'>;
18
+ type CommentCountElementProps = Pick<React.ComponentProps<typeof CommentCount>, 'color'>;
19
19
  export declare const CommentCountElement: (props?: CommentCountElementProps) => React.JSX.Element;
20
20
  export declare const CreatedOnElement: () => React.JSX.Element;
21
21
  export declare const CreatedByElement: () => React.JSX.Element;
22
22
  export declare const DueOnElement: () => React.JSX.Element;
23
23
  export declare const LatestCommitElement: () => React.JSX.Element;
24
- type LinkIconElementProps = Pick<BaseIconElementProps, 'render'> & {
24
+ type LinkIconElementProps = Prettify<Pick<React.ComponentProps<typeof LinkIcon>, 'render'> & {
25
25
  iconTileSize?: 16 | 24;
26
- };
26
+ }>;
27
27
  export declare const LinkIconElement: (props?: LinkIconElementProps) => React.JSX.Element;
28
28
  export declare const LocationElement: () => React.JSX.Element;
29
29
  export declare const ModifiedByElement: () => React.JSX.Element;
30
- type ModifiedOnElementProps = Pick<BaseDateTimeElementProps, 'hideDatePrefix' | 'color'>;
30
+ type ModifiedOnElementProps = Pick<React.ComponentProps<typeof ModifiedOn>, 'hideDatePrefix' | 'color'>;
31
31
  export declare const ModifiedOnElement: (props?: ModifiedOnElementProps) => React.JSX.Element;
32
- type OwnedByElementProps = Pick<BaseTextElementProps, 'hideFormat' | 'color'>;
32
+ type OwnedByElementProps = Pick<React.ComponentProps<typeof OwnedBy>, 'hideFormat' | 'color'>;
33
33
  export declare const OwnedByElement: (props?: OwnedByElementProps) => React.JSX.Element;
34
34
  export declare const OwnedByGroupElement: () => React.JSX.Element;
35
- export declare const PreviewElement: (props: Omit<PreviewElementProps, 'overrideUrl'> & {
36
- url?: PreviewElementProps['overrideUrl'];
37
- }) => React.JSX.Element;
35
+ type PreviewElementProps = {
36
+ url?: React.ComponentProps<typeof Preview>['overrideUrl'];
37
+ };
38
+ export declare const PreviewElement: (props?: PreviewElementProps) => React.JSX.Element;
38
39
  export declare const PriorityElement: () => React.JSX.Element;
39
40
  export declare const ProgrammingLanguageElement: () => React.JSX.Element;
40
41
  export declare const ProviderElement: () => React.JSX.Element;
41
- type ReactCountElementProps = Pick<BaseBadgeElementProps, 'color'>;
42
+ type ReactCountElementProps = Pick<React.ComponentProps<typeof ReactCount>, 'color'>;
42
43
  export declare const ReactCountElement: (props?: ReactCountElementProps) => React.JSX.Element;
43
44
  export declare const ReadTimeElement: () => React.JSX.Element;
44
45
  export declare const SentOnElement: () => React.JSX.Element;
45
- export type SnippetElementProps = Pick<BaseTextElementProps, 'maxLines'> & {
46
- text?: BaseTextElementProps['content'];
47
- };
48
- export declare const SnippetElement: (props: SnippetElementProps) => React.JSX.Element;
46
+ export type SnippetElementProps = Prettify<Pick<React.ComponentProps<typeof Snippet>, 'maxLines'> & {
47
+ text?: React.ComponentProps<typeof Snippet>['content'];
48
+ }>;
49
+ export declare const SnippetElement: (props?: SnippetElementProps) => React.JSX.Element;
49
50
  export declare const SourceBranchElement: () => React.JSX.Element;
50
51
  export declare const StateElement: () => React.JSX.Element;
51
52
  export declare const StoryPointsElement: () => React.JSX.Element;
52
53
  export declare const SubscriberCountElement: () => React.JSX.Element;
53
54
  export declare const SubTasksProgressElement: () => React.JSX.Element;
54
55
  export declare const TargetBranchElement: () => React.JSX.Element;
55
- export type TitleElementProps = Pick<BaseLinkElementProps, 'hideTooltip' | 'maxLines' | 'target' | 'text'>;
56
- export declare const TitleElement: (props: TitleElementProps) => React.JSX.Element;
56
+ export type TitleElementProps = Pick<React.ComponentProps<typeof Title>, 'hideTooltip' | 'maxLines' | 'target' | 'text'>;
57
+ export declare const TitleElement: (props?: TitleElementProps) => React.JSX.Element;
57
58
  export declare const ViewCountElement: () => React.JSX.Element;
58
59
  export declare const VoteCountElement: () => React.JSX.Element;
59
60
  type BaseActionProps = {
@@ -65,10 +66,10 @@ export declare const toActionProps: (props?: BaseActionProps) => {
65
66
  };
66
67
  export type CopyLinkActionProps = BaseActionProps;
67
68
  export declare const CopyLinkAction: (props: CopyLinkActionProps) => React.JSX.Element;
68
- export type CustomActionProps = BaseActionProps & {
69
+ export type CustomActionProps = Prettify<BaseActionProps & {
69
70
  children: React.ReactNode;
70
71
  onClick: () => void;
71
- };
72
+ }>;
72
73
  export declare const CustomAction: (props: CustomActionProps) => React.JSX.Element;
73
74
  export type DownloadActionProps = BaseActionProps;
74
75
  export declare const DownloadAction: (props: DownloadActionProps) => React.JSX.Element;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@atlaskit/smart-card",
3
- "version": "38.10.1",
3
+ "version": "38.10.2",
4
4
  "description": "Smart card component",
5
5
  "publishConfig": {
6
6
  "registry": "https://registry.npmjs.org/"
@@ -34,7 +34,7 @@
34
34
  "@atlaskit/badge": "^18.1.0",
35
35
  "@atlaskit/button": "^23.2.0",
36
36
  "@atlaskit/checkbox": "^17.1.0",
37
- "@atlaskit/css": "^0.10.0",
37
+ "@atlaskit/css": "^0.11.0",
38
38
  "@atlaskit/dropdown-menu": "^16.1.0",
39
39
  "@atlaskit/form": "^12.0.0",
40
40
  "@atlaskit/frontend-utilities": "^3.0.0",
@@ -51,7 +51,7 @@
51
51
  "@atlaskit/link-analytics": "^10.0.0",
52
52
  "@atlaskit/link-client-extension": "^5.0.0",
53
53
  "@atlaskit/link-extractors": "^2.3.0",
54
- "@atlaskit/linking-common": "^9.0.0",
54
+ "@atlaskit/linking-common": "^9.1.0",
55
55
  "@atlaskit/linking-types": "^12.0.0",
56
56
  "@atlaskit/logo": "^19.1.0",
57
57
  "@atlaskit/lozenge": "^13.0.0",
@@ -60,14 +60,14 @@
60
60
  "@atlaskit/outbound-auth-flow-client": "^3.4.0",
61
61
  "@atlaskit/platform-feature-flags": "^1.1.0",
62
62
  "@atlaskit/popup": "^4.3.0",
63
- "@atlaskit/primitives": "^14.8.0",
63
+ "@atlaskit/primitives": "^14.9.0",
64
64
  "@atlaskit/section-message": "^8.2.0",
65
65
  "@atlaskit/select": "^20.7.0",
66
66
  "@atlaskit/spinner": "^18.0.0",
67
67
  "@atlaskit/textarea": "^8.0.0",
68
68
  "@atlaskit/textfield": "^8.0.0",
69
69
  "@atlaskit/theme": "^18.0.0",
70
- "@atlaskit/tokens": "^5.2.0",
70
+ "@atlaskit/tokens": "^5.3.0",
71
71
  "@atlaskit/tooltip": "^20.3.0",
72
72
  "@atlaskit/ufo": "^0.4.0",
73
73
  "@babel/runtime": "^7.0.0",
@@ -96,7 +96,7 @@
96
96
  "@atlaskit/analytics-listeners": "^9.0.0",
97
97
  "@atlaskit/css-reset": "^7.3.0",
98
98
  "@atlaskit/link-test-helpers": "^8.0.0",
99
- "@atlaskit/media-test-helpers": "^36.1.0",
99
+ "@atlaskit/media-test-helpers": "^37.0.0",
100
100
  "@atlaskit/react-ufo": "^3.13.0",
101
101
  "@atlaskit/ssr": "workspace:^",
102
102
  "@atlaskit/visual-regression": "workspace:^",