mirror of
https://github.com/carbon-design-system/carbon-components-svelte.git
synced 2025-09-15 18:31:06 +00:00
refactor(types): shorten ref, id JSDocs, use CarbonIcon type, export component props
This commit is contained in:
parent
d38e6d8be6
commit
75d4b4cf03
219 changed files with 5168 additions and 5259 deletions
139
types/FileUploader/FileUploader.d.ts
vendored
139
types/FileUploader/FileUploader.d.ts
vendored
|
@ -2,76 +2,77 @@
|
|||
|
||||
type Files = string[];
|
||||
|
||||
export interface FileUploaderProps extends svelte.JSX.HTMLAttributes<HTMLElementTagNameMap["div"]> {
|
||||
/**
|
||||
* Specify the file uploader status
|
||||
* @default "uploading"
|
||||
*/
|
||||
status?: "uploading" | "edit" | "complete";
|
||||
|
||||
/**
|
||||
* Specify the accepted file types
|
||||
* @default []
|
||||
*/
|
||||
accept?: Files;
|
||||
|
||||
/**
|
||||
* Obtain the uploaded file names
|
||||
* @default []
|
||||
*/
|
||||
files?: Files;
|
||||
|
||||
/**
|
||||
* Set to `true` to allow multiple files
|
||||
* @default false
|
||||
*/
|
||||
multiple?: boolean;
|
||||
|
||||
/**
|
||||
* Override the default behavior of clearing the array of uploaded files
|
||||
* @constant
|
||||
* @default () => { files = []; }
|
||||
*/
|
||||
clearFiles?: () => void;
|
||||
|
||||
/**
|
||||
* Specify the label description
|
||||
* @default ""
|
||||
*/
|
||||
labelDescription?: string;
|
||||
|
||||
/**
|
||||
* Specify the label title
|
||||
* @default ""
|
||||
*/
|
||||
labelTitle?: string;
|
||||
|
||||
/**
|
||||
* Specify the kind of file uploader button
|
||||
* @default "primary"
|
||||
*/
|
||||
kind?: "primary" | "secondary" | "tertiary" | "ghost" | "danger";
|
||||
|
||||
/**
|
||||
* Specify the button label
|
||||
* @default ""
|
||||
*/
|
||||
buttonLabel?: string;
|
||||
|
||||
/**
|
||||
* Specify the ARIA label used for the status icons
|
||||
* @default "Provide icon description"
|
||||
*/
|
||||
iconDescription?: string;
|
||||
|
||||
/**
|
||||
* Specify a name attribute for the file button uploader input
|
||||
* @default ""
|
||||
*/
|
||||
name?: string;
|
||||
}
|
||||
|
||||
export default class FileUploader {
|
||||
$$prop_def: svelte.JSX.HTMLAttributes<HTMLElementTagNameMap["div"]> & {
|
||||
/**
|
||||
* Specify the file uploader status
|
||||
* @default "uploading"
|
||||
*/
|
||||
status?: "uploading" | "edit" | "complete";
|
||||
|
||||
/**
|
||||
* Specify the accepted file types
|
||||
* @default []
|
||||
*/
|
||||
accept?: Files;
|
||||
|
||||
/**
|
||||
* Obtain the uploaded file names
|
||||
* @default []
|
||||
*/
|
||||
files?: Files;
|
||||
|
||||
/**
|
||||
* Set to `true` to allow multiple files
|
||||
* @default false
|
||||
*/
|
||||
multiple?: boolean;
|
||||
|
||||
/**
|
||||
* Override the default behavior of clearing the array of uploaded files
|
||||
* @constant
|
||||
* @default () => { files = []; }
|
||||
*/
|
||||
clearFiles?: () => void;
|
||||
|
||||
/**
|
||||
* Specify the label description
|
||||
* @default ""
|
||||
*/
|
||||
labelDescription?: string;
|
||||
|
||||
/**
|
||||
* Specify the label title
|
||||
* @default ""
|
||||
*/
|
||||
labelTitle?: string;
|
||||
|
||||
/**
|
||||
* Specify the kind of file uploader button
|
||||
* @default "primary"
|
||||
*/
|
||||
kind?: "primary" | "secondary" | "tertiary" | "ghost" | "danger";
|
||||
|
||||
/**
|
||||
* Specify the button label
|
||||
* @default ""
|
||||
*/
|
||||
buttonLabel?: string;
|
||||
|
||||
/**
|
||||
* Specify the ARIA label used for the status icons
|
||||
* @default "Provide icon description"
|
||||
*/
|
||||
iconDescription?: string;
|
||||
|
||||
/**
|
||||
* Specify a name attribute for the file button uploader input
|
||||
* @default ""
|
||||
*/
|
||||
name?: string;
|
||||
};
|
||||
|
||||
$$prop_def: FileUploaderProps;
|
||||
$$slot_def: {};
|
||||
|
||||
$on(eventname: "add", cb: (event: CustomEvent<Files>) => void): () => void;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue