@atlaskit/forge-react-types 0.45.0 → 0.46.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.
- package/CHANGELOG.md +14 -0
- package/dist/cjs/components/__generated__/FileCardProps.codegen.js +1 -0
- package/dist/es2019/components/__generated__/FileCardProps.codegen.js +0 -0
- package/dist/esm/components/__generated__/FileCardProps.codegen.js +0 -0
- package/dist/types/components/__generated__/FileCardProps.codegen.d.ts +61 -0
- package/dist/types/components/__generated__/FilePickerProps.codegen.d.ts +17 -4
- package/dist/types/components/__generated__/index.d.ts +1 -0
- package/dist/types/index.d.ts +1 -1
- package/dist/types-ts4.5/components/__generated__/FileCardProps.codegen.d.ts +61 -0
- package/dist/types-ts4.5/components/__generated__/FilePickerProps.codegen.d.ts +17 -4
- package/dist/types-ts4.5/components/__generated__/index.d.ts +1 -0
- package/dist/types-ts4.5/index.d.ts +1 -1
- package/package.json +4 -4
- package/src/components/__generated__/FileCardProps.codegen.tsx +74 -0
- package/src/components/__generated__/FilePickerProps.codegen.tsx +22 -9
- package/src/components/__generated__/index.ts +1 -0
- package/src/index.ts +2 -1
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,19 @@
|
|
|
1
1
|
# @atlaskit/forge-react-types
|
|
2
2
|
|
|
3
|
+
## 0.46.1
|
|
4
|
+
|
|
5
|
+
### Patch Changes
|
|
6
|
+
|
|
7
|
+
- [`5424277535660`](https://bitbucket.org/atlassian/atlassian-frontend-monorepo/commits/5424277535660) -
|
|
8
|
+
Adds tests and testId prop to UI Kit FilePicker component
|
|
9
|
+
|
|
10
|
+
## 0.46.0
|
|
11
|
+
|
|
12
|
+
### Minor Changes
|
|
13
|
+
|
|
14
|
+
- [`0cfb7e145638f`](https://bitbucket.org/atlassian/atlassian-frontend-monorepo/commits/0cfb7e145638f) -
|
|
15
|
+
Add file card component
|
|
16
|
+
|
|
3
17
|
## 0.45.0
|
|
4
18
|
|
|
5
19
|
### Minor Changes
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
"use strict";
|
|
File without changes
|
|
File without changes
|
|
@@ -0,0 +1,61 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* THIS FILE WAS CREATED VIA CODEGEN DO NOT MODIFY {@see http://go/af-codegen}
|
|
3
|
+
*
|
|
4
|
+
* Extract component prop types from UIKit 2 components - FileCardProps
|
|
5
|
+
*
|
|
6
|
+
* @codegen <<SignedSource::af96c6a081656867f4e2dd38c809d9f1>>
|
|
7
|
+
* @codegenCommand yarn workspace @atlaskit/forge-react-types codegen
|
|
8
|
+
* @codegenDependency ../../../../forge-ui/src/components/UIKit/filecard/index.tsx <<SignedSource::5481c3e5d6de45321d69da39b0175d00>>
|
|
9
|
+
*/
|
|
10
|
+
export type FileCardProps = {
|
|
11
|
+
/**
|
|
12
|
+
* Whether the file can be deleted
|
|
13
|
+
*/
|
|
14
|
+
canDelete?: boolean;
|
|
15
|
+
/**
|
|
16
|
+
* Whether the file can be downloaded
|
|
17
|
+
*/
|
|
18
|
+
canDownload?: boolean;
|
|
19
|
+
/**
|
|
20
|
+
* Error message to display if there's an error
|
|
21
|
+
*/
|
|
22
|
+
error?: string;
|
|
23
|
+
/**
|
|
24
|
+
* The name of the file to display
|
|
25
|
+
*/
|
|
26
|
+
fileName: string;
|
|
27
|
+
/**
|
|
28
|
+
* The size of the file in bytes
|
|
29
|
+
*/
|
|
30
|
+
fileSize?: number;
|
|
31
|
+
/**
|
|
32
|
+
* The MIME type of the file
|
|
33
|
+
*/
|
|
34
|
+
fileType?: string;
|
|
35
|
+
/**
|
|
36
|
+
* Whether the file is currently being uploaded
|
|
37
|
+
*/
|
|
38
|
+
isUploading?: boolean;
|
|
39
|
+
/**
|
|
40
|
+
* Callback when the file is deleted
|
|
41
|
+
*/
|
|
42
|
+
onDelete?: () => void;
|
|
43
|
+
/**
|
|
44
|
+
* Callback when the file is downloaded
|
|
45
|
+
*/
|
|
46
|
+
onDownload?: () => void;
|
|
47
|
+
/**
|
|
48
|
+
* Test ID for testing
|
|
49
|
+
*/
|
|
50
|
+
testId?: string;
|
|
51
|
+
/**
|
|
52
|
+
* Upload progress (0-100) when isUploading is true
|
|
53
|
+
*/
|
|
54
|
+
uploadProgress?: number;
|
|
55
|
+
};
|
|
56
|
+
/**
|
|
57
|
+
* A file card component that displays file information with actions
|
|
58
|
+
*
|
|
59
|
+
* @see [FileCard](https://developer.atlassian.com/platform/forge/ui-kit/components/file-card/) in UI Kit documentation for more information
|
|
60
|
+
*/
|
|
61
|
+
export type TFileCard<T> = (props: FileCardProps) => T;
|
|
@@ -3,19 +3,32 @@
|
|
|
3
3
|
*
|
|
4
4
|
* Extract component prop types from UIKit 2 components - FilePickerProps
|
|
5
5
|
*
|
|
6
|
-
* @codegen <<SignedSource::
|
|
6
|
+
* @codegen <<SignedSource::5d73fae2f947d6bb42aa42c89624ad67>>
|
|
7
7
|
* @codegenCommand yarn workspace @atlaskit/forge-react-types codegen
|
|
8
|
-
* @codegenDependency ../../../../forge-ui/src/components/UIKit/filepicker/index.tsx <<SignedSource::
|
|
8
|
+
* @codegenDependency ../../../../forge-ui/src/components/UIKit/filepicker/index.tsx <<SignedSource::47d9000bc6265446cc40547ca8d46787>>
|
|
9
9
|
*/
|
|
10
10
|
type SerializedFile = {
|
|
11
|
+
data: string;
|
|
11
12
|
name: string;
|
|
12
|
-
type: string;
|
|
13
13
|
size: number;
|
|
14
|
-
|
|
14
|
+
type: string;
|
|
15
15
|
};
|
|
16
16
|
export type FilePickerProps = {
|
|
17
|
+
/**
|
|
18
|
+
* Description of the file picker to be used for file requirements
|
|
19
|
+
*/
|
|
17
20
|
description?: string;
|
|
21
|
+
/**
|
|
22
|
+
* Label of the file picker
|
|
23
|
+
*/
|
|
18
24
|
label?: string;
|
|
25
|
+
/**
|
|
26
|
+
* Test ID for testing
|
|
27
|
+
*/
|
|
28
|
+
testId?: string;
|
|
29
|
+
/**
|
|
30
|
+
* Callback function to be called when the files are changed
|
|
31
|
+
*/
|
|
19
32
|
onChange?: (files: SerializedFile[]) => void | undefined;
|
|
20
33
|
};
|
|
21
34
|
export type TFilePicker<T> = (props: FilePickerProps) => T;
|
|
@@ -12,6 +12,7 @@ export type { DatePickerProps, TDatePicker } from './DatePickerProps.codegen';
|
|
|
12
12
|
export type { DynamicTableProps, TDynamicTable } from './DynamicTableProps.codegen';
|
|
13
13
|
export type { EmptyStateProps, TEmptyState } from './EmptyStateProps.codegen';
|
|
14
14
|
export type { ErrorMessageProps, TErrorMessage } from './ErrorMessageProps.codegen';
|
|
15
|
+
export type { FileCardProps, TFileCard } from './FileCardProps.codegen';
|
|
15
16
|
export type { FlexProps, TFlex } from './FlexProps.codegen';
|
|
16
17
|
export type { FormFooterProps, TFormFooter } from './FormFooterProps.codegen';
|
|
17
18
|
export type { FormHeaderProps, TFormHeader } from './FormHeaderProps.codegen';
|
package/dist/types/index.d.ts
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
export type { AdfRendererProps, BadgeProps, BoxProps, ButtonGroupProps, ButtonProps, CalendarProps, CheckboxProps, CheckboxGroupProps, CodeBlockProps, CodeProps, CommentProps, DatePickerProps, DynamicTableProps, EmptyStateProps, ErrorMessageProps, FlexProps, FormFooterProps, FormHeaderProps, FormProps, FormSectionProps, GridProps, HeadingProps, HelperMessageProps, IconProps, InlineProps, LabelProps, LinkButtonProps, ListProps, ListItemProps, LoadingButtonProps, LozengeProps, ModalBodyProps, ModalFooterProps, ModalHeaderProps, ModalProps, ModalTitleProps, ModalTransitionProps, ProgressBarProps, ProgressTrackerProps, RadioGroupProps, RadioProps, RangeProps, SectionMessageActionProps, SectionMessageProps, SelectProps, SpinnerProps, StackProps, TabListProps, TabPanelProps, TabProps, TabsProps, TagGroupProps, TagProps, TextProps, TextAreaProps, TextfieldProps, ToggleProps, TooltipProps, TimePickerProps, ValidMessageProps, PopupProps, InlineEditProps, PressableProps, TBadge, TBox, TButtonGroup, TButton, TCalendar, TCheckbox, TCheckboxGroup, TCodeBlock, TCode, TComment, TDatePicker, TDynamicTable, TEmptyState, TErrorMessage, TFlex, TFormFooter, TFormHeader, TForm, TFormSection, TGrid, THeading, THelperMessage, TIcon, TInline, TInlineEdit, TLabel, TLinkButton, TList, TListItem, TLoadingButton, TLozenge, TModalBody, TModalFooter, TModalHeader, TModal, TModalTitle, TModalTransition, TProgressBar, TProgressTracker, TRadioGroup, TRadio, TRange, TSectionMessageAction, TSectionMessage, TSelect, TSpinner, TStack, TTabList, TTabPanel, TTab, TTabs, TTagGroup, TTag, TTextArea, TTextfield, TTimePicker, TToggle, TTooltip, TValidMessage, TPopup, TAdfRenderer, TText, TPressable, TFilePicker, } from './components/__generated__';
|
|
1
|
+
export type { AdfRendererProps, BadgeProps, BoxProps, ButtonGroupProps, ButtonProps, CalendarProps, CheckboxProps, CheckboxGroupProps, CodeBlockProps, CodeProps, CommentProps, DatePickerProps, DynamicTableProps, EmptyStateProps, ErrorMessageProps, FlexProps, FormFooterProps, FormHeaderProps, FormProps, FormSectionProps, GridProps, HeadingProps, HelperMessageProps, IconProps, InlineProps, LabelProps, LinkButtonProps, ListProps, ListItemProps, LoadingButtonProps, LozengeProps, ModalBodyProps, ModalFooterProps, ModalHeaderProps, ModalProps, ModalTitleProps, ModalTransitionProps, ProgressBarProps, ProgressTrackerProps, RadioGroupProps, RadioProps, RangeProps, SectionMessageActionProps, SectionMessageProps, SelectProps, SpinnerProps, StackProps, TabListProps, TabPanelProps, TabProps, TabsProps, TagGroupProps, TagProps, TextProps, TextAreaProps, TextfieldProps, ToggleProps, TooltipProps, TimePickerProps, ValidMessageProps, PopupProps, InlineEditProps, PressableProps, TBadge, TBox, TButtonGroup, TButton, TCalendar, TCheckbox, TCheckboxGroup, TCodeBlock, TCode, TComment, TDatePicker, TDynamicTable, TEmptyState, TErrorMessage, TFileCard, TFlex, TFormFooter, TFormHeader, TForm, TFormSection, TGrid, THeading, THelperMessage, TIcon, TInline, TInlineEdit, TLabel, TLinkButton, TList, TListItem, TLoadingButton, TLozenge, TModalBody, TModalFooter, TModalHeader, TModal, TModalTitle, TModalTransition, TProgressBar, TProgressTracker, TRadioGroup, TRadio, TRange, TSectionMessageAction, TSectionMessage, TSelect, TSpinner, TStack, TTabList, TTabPanel, TTab, TTabs, TTagGroup, TTag, TTextArea, TTextfield, TTimePicker, TToggle, TTooltip, TValidMessage, TPopup, TAdfRenderer, TText, TPressable, TFilePicker, } from './components/__generated__';
|
|
2
2
|
export type { BarChartProps, StackBarChartProps, HorizontalStackBarChartProps, HorizontalBarChartProps, LineChartProps, DonutChartProps, PieChartProps, TBarChart, TStackBarChart, THorizontalStackBarChart, THorizontalBarChart, TLineChart, TDonutChart, TPieChart, } from './components/charts';
|
|
3
3
|
export type { ChromelessEditorProps, CommentEditorProps, TChromelessEditor, TCommentEditor, } from './components/editor';
|
|
4
4
|
export type { ChartColorTokens } from './types';
|
|
@@ -0,0 +1,61 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* THIS FILE WAS CREATED VIA CODEGEN DO NOT MODIFY {@see http://go/af-codegen}
|
|
3
|
+
*
|
|
4
|
+
* Extract component prop types from UIKit 2 components - FileCardProps
|
|
5
|
+
*
|
|
6
|
+
* @codegen <<SignedSource::af96c6a081656867f4e2dd38c809d9f1>>
|
|
7
|
+
* @codegenCommand yarn workspace @atlaskit/forge-react-types codegen
|
|
8
|
+
* @codegenDependency ../../../../forge-ui/src/components/UIKit/filecard/index.tsx <<SignedSource::5481c3e5d6de45321d69da39b0175d00>>
|
|
9
|
+
*/
|
|
10
|
+
export type FileCardProps = {
|
|
11
|
+
/**
|
|
12
|
+
* Whether the file can be deleted
|
|
13
|
+
*/
|
|
14
|
+
canDelete?: boolean;
|
|
15
|
+
/**
|
|
16
|
+
* Whether the file can be downloaded
|
|
17
|
+
*/
|
|
18
|
+
canDownload?: boolean;
|
|
19
|
+
/**
|
|
20
|
+
* Error message to display if there's an error
|
|
21
|
+
*/
|
|
22
|
+
error?: string;
|
|
23
|
+
/**
|
|
24
|
+
* The name of the file to display
|
|
25
|
+
*/
|
|
26
|
+
fileName: string;
|
|
27
|
+
/**
|
|
28
|
+
* The size of the file in bytes
|
|
29
|
+
*/
|
|
30
|
+
fileSize?: number;
|
|
31
|
+
/**
|
|
32
|
+
* The MIME type of the file
|
|
33
|
+
*/
|
|
34
|
+
fileType?: string;
|
|
35
|
+
/**
|
|
36
|
+
* Whether the file is currently being uploaded
|
|
37
|
+
*/
|
|
38
|
+
isUploading?: boolean;
|
|
39
|
+
/**
|
|
40
|
+
* Callback when the file is deleted
|
|
41
|
+
*/
|
|
42
|
+
onDelete?: () => void;
|
|
43
|
+
/**
|
|
44
|
+
* Callback when the file is downloaded
|
|
45
|
+
*/
|
|
46
|
+
onDownload?: () => void;
|
|
47
|
+
/**
|
|
48
|
+
* Test ID for testing
|
|
49
|
+
*/
|
|
50
|
+
testId?: string;
|
|
51
|
+
/**
|
|
52
|
+
* Upload progress (0-100) when isUploading is true
|
|
53
|
+
*/
|
|
54
|
+
uploadProgress?: number;
|
|
55
|
+
};
|
|
56
|
+
/**
|
|
57
|
+
* A file card component that displays file information with actions
|
|
58
|
+
*
|
|
59
|
+
* @see [FileCard](https://developer.atlassian.com/platform/forge/ui-kit/components/file-card/) in UI Kit documentation for more information
|
|
60
|
+
*/
|
|
61
|
+
export type TFileCard<T> = (props: FileCardProps) => T;
|
|
@@ -3,19 +3,32 @@
|
|
|
3
3
|
*
|
|
4
4
|
* Extract component prop types from UIKit 2 components - FilePickerProps
|
|
5
5
|
*
|
|
6
|
-
* @codegen <<SignedSource::
|
|
6
|
+
* @codegen <<SignedSource::5d73fae2f947d6bb42aa42c89624ad67>>
|
|
7
7
|
* @codegenCommand yarn workspace @atlaskit/forge-react-types codegen
|
|
8
|
-
* @codegenDependency ../../../../forge-ui/src/components/UIKit/filepicker/index.tsx <<SignedSource::
|
|
8
|
+
* @codegenDependency ../../../../forge-ui/src/components/UIKit/filepicker/index.tsx <<SignedSource::47d9000bc6265446cc40547ca8d46787>>
|
|
9
9
|
*/
|
|
10
10
|
type SerializedFile = {
|
|
11
|
+
data: string;
|
|
11
12
|
name: string;
|
|
12
|
-
type: string;
|
|
13
13
|
size: number;
|
|
14
|
-
|
|
14
|
+
type: string;
|
|
15
15
|
};
|
|
16
16
|
export type FilePickerProps = {
|
|
17
|
+
/**
|
|
18
|
+
* Description of the file picker to be used for file requirements
|
|
19
|
+
*/
|
|
17
20
|
description?: string;
|
|
21
|
+
/**
|
|
22
|
+
* Label of the file picker
|
|
23
|
+
*/
|
|
18
24
|
label?: string;
|
|
25
|
+
/**
|
|
26
|
+
* Test ID for testing
|
|
27
|
+
*/
|
|
28
|
+
testId?: string;
|
|
29
|
+
/**
|
|
30
|
+
* Callback function to be called when the files are changed
|
|
31
|
+
*/
|
|
19
32
|
onChange?: (files: SerializedFile[]) => void | undefined;
|
|
20
33
|
};
|
|
21
34
|
export type TFilePicker<T> = (props: FilePickerProps) => T;
|
|
@@ -12,6 +12,7 @@ export type { DatePickerProps, TDatePicker } from './DatePickerProps.codegen';
|
|
|
12
12
|
export type { DynamicTableProps, TDynamicTable } from './DynamicTableProps.codegen';
|
|
13
13
|
export type { EmptyStateProps, TEmptyState } from './EmptyStateProps.codegen';
|
|
14
14
|
export type { ErrorMessageProps, TErrorMessage } from './ErrorMessageProps.codegen';
|
|
15
|
+
export type { FileCardProps, TFileCard } from './FileCardProps.codegen';
|
|
15
16
|
export type { FlexProps, TFlex } from './FlexProps.codegen';
|
|
16
17
|
export type { FormFooterProps, TFormFooter } from './FormFooterProps.codegen';
|
|
17
18
|
export type { FormHeaderProps, TFormHeader } from './FormHeaderProps.codegen';
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
export type { AdfRendererProps, BadgeProps, BoxProps, ButtonGroupProps, ButtonProps, CalendarProps, CheckboxProps, CheckboxGroupProps, CodeBlockProps, CodeProps, CommentProps, DatePickerProps, DynamicTableProps, EmptyStateProps, ErrorMessageProps, FlexProps, FormFooterProps, FormHeaderProps, FormProps, FormSectionProps, GridProps, HeadingProps, HelperMessageProps, IconProps, InlineProps, LabelProps, LinkButtonProps, ListProps, ListItemProps, LoadingButtonProps, LozengeProps, ModalBodyProps, ModalFooterProps, ModalHeaderProps, ModalProps, ModalTitleProps, ModalTransitionProps, ProgressBarProps, ProgressTrackerProps, RadioGroupProps, RadioProps, RangeProps, SectionMessageActionProps, SectionMessageProps, SelectProps, SpinnerProps, StackProps, TabListProps, TabPanelProps, TabProps, TabsProps, TagGroupProps, TagProps, TextProps, TextAreaProps, TextfieldProps, ToggleProps, TooltipProps, TimePickerProps, ValidMessageProps, PopupProps, InlineEditProps, PressableProps, TBadge, TBox, TButtonGroup, TButton, TCalendar, TCheckbox, TCheckboxGroup, TCodeBlock, TCode, TComment, TDatePicker, TDynamicTable, TEmptyState, TErrorMessage, TFlex, TFormFooter, TFormHeader, TForm, TFormSection, TGrid, THeading, THelperMessage, TIcon, TInline, TInlineEdit, TLabel, TLinkButton, TList, TListItem, TLoadingButton, TLozenge, TModalBody, TModalFooter, TModalHeader, TModal, TModalTitle, TModalTransition, TProgressBar, TProgressTracker, TRadioGroup, TRadio, TRange, TSectionMessageAction, TSectionMessage, TSelect, TSpinner, TStack, TTabList, TTabPanel, TTab, TTabs, TTagGroup, TTag, TTextArea, TTextfield, TTimePicker, TToggle, TTooltip, TValidMessage, TPopup, TAdfRenderer, TText, TPressable, TFilePicker, } from './components/__generated__';
|
|
1
|
+
export type { AdfRendererProps, BadgeProps, BoxProps, ButtonGroupProps, ButtonProps, CalendarProps, CheckboxProps, CheckboxGroupProps, CodeBlockProps, CodeProps, CommentProps, DatePickerProps, DynamicTableProps, EmptyStateProps, ErrorMessageProps, FlexProps, FormFooterProps, FormHeaderProps, FormProps, FormSectionProps, GridProps, HeadingProps, HelperMessageProps, IconProps, InlineProps, LabelProps, LinkButtonProps, ListProps, ListItemProps, LoadingButtonProps, LozengeProps, ModalBodyProps, ModalFooterProps, ModalHeaderProps, ModalProps, ModalTitleProps, ModalTransitionProps, ProgressBarProps, ProgressTrackerProps, RadioGroupProps, RadioProps, RangeProps, SectionMessageActionProps, SectionMessageProps, SelectProps, SpinnerProps, StackProps, TabListProps, TabPanelProps, TabProps, TabsProps, TagGroupProps, TagProps, TextProps, TextAreaProps, TextfieldProps, ToggleProps, TooltipProps, TimePickerProps, ValidMessageProps, PopupProps, InlineEditProps, PressableProps, TBadge, TBox, TButtonGroup, TButton, TCalendar, TCheckbox, TCheckboxGroup, TCodeBlock, TCode, TComment, TDatePicker, TDynamicTable, TEmptyState, TErrorMessage, TFileCard, TFlex, TFormFooter, TFormHeader, TForm, TFormSection, TGrid, THeading, THelperMessage, TIcon, TInline, TInlineEdit, TLabel, TLinkButton, TList, TListItem, TLoadingButton, TLozenge, TModalBody, TModalFooter, TModalHeader, TModal, TModalTitle, TModalTransition, TProgressBar, TProgressTracker, TRadioGroup, TRadio, TRange, TSectionMessageAction, TSectionMessage, TSelect, TSpinner, TStack, TTabList, TTabPanel, TTab, TTabs, TTagGroup, TTag, TTextArea, TTextfield, TTimePicker, TToggle, TTooltip, TValidMessage, TPopup, TAdfRenderer, TText, TPressable, TFilePicker, } from './components/__generated__';
|
|
2
2
|
export type { BarChartProps, StackBarChartProps, HorizontalStackBarChartProps, HorizontalBarChartProps, LineChartProps, DonutChartProps, PieChartProps, TBarChart, TStackBarChart, THorizontalStackBarChart, THorizontalBarChart, TLineChart, TDonutChart, TPieChart, } from './components/charts';
|
|
3
3
|
export type { ChromelessEditorProps, CommentEditorProps, TChromelessEditor, TCommentEditor, } from './components/editor';
|
|
4
4
|
export type { ChartColorTokens } from './types';
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@atlaskit/forge-react-types",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.46.1",
|
|
4
4
|
"description": "Component types for Forge UI Kit React components",
|
|
5
5
|
"publishConfig": {
|
|
6
6
|
"registry": "https://registry.npmjs.org/"
|
|
@@ -27,8 +27,8 @@
|
|
|
27
27
|
"@atlaskit/dynamic-table": "^18.3.0",
|
|
28
28
|
"@atlaskit/form": "^14.2.0",
|
|
29
29
|
"@atlaskit/inline-edit": "^15.3.0",
|
|
30
|
-
"@atlaskit/modal-dialog": "^14.
|
|
31
|
-
"@atlaskit/navigation-system": "^4.
|
|
30
|
+
"@atlaskit/modal-dialog": "^14.6.0",
|
|
31
|
+
"@atlaskit/navigation-system": "^4.5.0",
|
|
32
32
|
"@atlaskit/popup": "^4.4.0",
|
|
33
33
|
"@atlaskit/primitives": "^16.0.0",
|
|
34
34
|
"@atlaskit/progress-bar": "^4.0.0",
|
|
@@ -52,7 +52,7 @@
|
|
|
52
52
|
},
|
|
53
53
|
"devDependencies": {
|
|
54
54
|
"@atlassian/codegen": "^0.1.0",
|
|
55
|
-
"@atlassian/forge-ui": "^32.
|
|
55
|
+
"@atlassian/forge-ui": "^32.43.0",
|
|
56
56
|
"@types/node": "~22.17.1",
|
|
57
57
|
"lodash": "^4.17.21",
|
|
58
58
|
"react": "^18.2.0",
|
|
@@ -0,0 +1,74 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* THIS FILE WAS CREATED VIA CODEGEN DO NOT MODIFY {@see http://go/af-codegen}
|
|
3
|
+
*
|
|
4
|
+
* Extract component prop types from UIKit 2 components - FileCardProps
|
|
5
|
+
*
|
|
6
|
+
* @codegen <<SignedSource::af96c6a081656867f4e2dd38c809d9f1>>
|
|
7
|
+
* @codegenCommand yarn workspace @atlaskit/forge-react-types codegen
|
|
8
|
+
* @codegenDependency ../../../../forge-ui/src/components/UIKit/filecard/index.tsx <<SignedSource::5481c3e5d6de45321d69da39b0175d00>>
|
|
9
|
+
*/
|
|
10
|
+
/* eslint @repo/internal/codegen/signed-source-integrity: "warn" */
|
|
11
|
+
|
|
12
|
+
export type FileCardProps = {
|
|
13
|
+
/**
|
|
14
|
+
* Whether the file can be deleted
|
|
15
|
+
*/
|
|
16
|
+
canDelete?: boolean;
|
|
17
|
+
|
|
18
|
+
/**
|
|
19
|
+
* Whether the file can be downloaded
|
|
20
|
+
*/
|
|
21
|
+
canDownload?: boolean;
|
|
22
|
+
|
|
23
|
+
/**
|
|
24
|
+
* Error message to display if there's an error
|
|
25
|
+
*/
|
|
26
|
+
error?: string;
|
|
27
|
+
|
|
28
|
+
/**
|
|
29
|
+
* The name of the file to display
|
|
30
|
+
*/
|
|
31
|
+
fileName: string;
|
|
32
|
+
|
|
33
|
+
/**
|
|
34
|
+
* The size of the file in bytes
|
|
35
|
+
*/
|
|
36
|
+
fileSize?: number;
|
|
37
|
+
|
|
38
|
+
/**
|
|
39
|
+
* The MIME type of the file
|
|
40
|
+
*/
|
|
41
|
+
fileType?: string;
|
|
42
|
+
|
|
43
|
+
/**
|
|
44
|
+
* Whether the file is currently being uploaded
|
|
45
|
+
*/
|
|
46
|
+
isUploading?: boolean;
|
|
47
|
+
|
|
48
|
+
/**
|
|
49
|
+
* Callback when the file is deleted
|
|
50
|
+
*/
|
|
51
|
+
onDelete?: () => void;
|
|
52
|
+
|
|
53
|
+
/**
|
|
54
|
+
* Callback when the file is downloaded
|
|
55
|
+
*/
|
|
56
|
+
onDownload?: () => void;
|
|
57
|
+
|
|
58
|
+
/**
|
|
59
|
+
* Test ID for testing
|
|
60
|
+
*/
|
|
61
|
+
testId?: string;
|
|
62
|
+
|
|
63
|
+
/**
|
|
64
|
+
* Upload progress (0-100) when isUploading is true
|
|
65
|
+
*/
|
|
66
|
+
uploadProgress?: number;
|
|
67
|
+
};
|
|
68
|
+
|
|
69
|
+
/**
|
|
70
|
+
* A file card component that displays file information with actions
|
|
71
|
+
*
|
|
72
|
+
* @see [FileCard](https://developer.atlassian.com/platform/forge/ui-kit/components/file-card/) in UI Kit documentation for more information
|
|
73
|
+
*/
|
|
74
|
+
export type TFileCard<T> = (props: FileCardProps) => T;
|
|
@@ -3,23 +3,36 @@
|
|
|
3
3
|
*
|
|
4
4
|
* Extract component prop types from UIKit 2 components - FilePickerProps
|
|
5
5
|
*
|
|
6
|
-
* @codegen <<SignedSource::
|
|
6
|
+
* @codegen <<SignedSource::5d73fae2f947d6bb42aa42c89624ad67>>
|
|
7
7
|
* @codegenCommand yarn workspace @atlaskit/forge-react-types codegen
|
|
8
|
-
* @codegenDependency ../../../../forge-ui/src/components/UIKit/filepicker/index.tsx <<SignedSource::
|
|
8
|
+
* @codegenDependency ../../../../forge-ui/src/components/UIKit/filepicker/index.tsx <<SignedSource::47d9000bc6265446cc40547ca8d46787>>
|
|
9
9
|
*/
|
|
10
10
|
/* eslint @repo/internal/codegen/signed-source-integrity: "warn" */
|
|
11
11
|
|
|
12
12
|
type SerializedFile = {
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
13
|
+
data: string;
|
|
14
|
+
name: string;
|
|
15
|
+
size: number;
|
|
16
|
+
type: string;
|
|
17
17
|
};
|
|
18
18
|
|
|
19
19
|
export type FilePickerProps = {
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
20
|
+
/**
|
|
21
|
+
* Description of the file picker to be used for file requirements
|
|
22
|
+
*/
|
|
23
|
+
description?: string;
|
|
24
|
+
/**
|
|
25
|
+
* Label of the file picker
|
|
26
|
+
*/
|
|
27
|
+
label?: string;
|
|
28
|
+
/**
|
|
29
|
+
* Test ID for testing
|
|
30
|
+
*/
|
|
31
|
+
testId?: string;
|
|
32
|
+
/**
|
|
33
|
+
* Callback function to be called when the files are changed
|
|
34
|
+
*/
|
|
35
|
+
onChange?: (files: SerializedFile[]) => void | undefined;
|
|
23
36
|
};
|
|
24
37
|
|
|
25
38
|
export type TFilePicker<T> = (props: FilePickerProps) => T;
|
|
@@ -12,6 +12,7 @@ export type { DatePickerProps, TDatePicker } from './DatePickerProps.codegen';
|
|
|
12
12
|
export type { DynamicTableProps, TDynamicTable } from './DynamicTableProps.codegen';
|
|
13
13
|
export type { EmptyStateProps, TEmptyState } from './EmptyStateProps.codegen';
|
|
14
14
|
export type { ErrorMessageProps, TErrorMessage } from './ErrorMessageProps.codegen';
|
|
15
|
+
export type { FileCardProps, TFileCard } from './FileCardProps.codegen';
|
|
15
16
|
export type { FlexProps, TFlex } from './FlexProps.codegen';
|
|
16
17
|
export type { FormFooterProps, TFormFooter } from './FormFooterProps.codegen';
|
|
17
18
|
export type { FormHeaderProps, TFormHeader } from './FormHeaderProps.codegen';
|
package/src/index.ts
CHANGED
|
@@ -76,6 +76,7 @@ export type {
|
|
|
76
76
|
TDynamicTable,
|
|
77
77
|
TEmptyState,
|
|
78
78
|
TErrorMessage,
|
|
79
|
+
TFileCard,
|
|
79
80
|
TFlex,
|
|
80
81
|
TFormFooter,
|
|
81
82
|
TFormHeader,
|
|
@@ -143,7 +144,7 @@ export type {
|
|
|
143
144
|
TLineChart,
|
|
144
145
|
TDonutChart,
|
|
145
146
|
TPieChart,
|
|
146
|
-
} from './components/charts'
|
|
147
|
+
} from './components/charts';
|
|
147
148
|
|
|
148
149
|
export type {
|
|
149
150
|
ChromelessEditorProps,
|