Skip to content

Commit

Permalink
Update build settings (#83)
Browse files Browse the repository at this point in the history
  • Loading branch information
johndatserakis authored Sep 2, 2024
1 parent 4de28f2 commit 4880ce7
Show file tree
Hide file tree
Showing 52 changed files with 973 additions and 7,084 deletions.
34 changes: 0 additions & 34 deletions dist/file-upload-with-preview.cjs

This file was deleted.

107 changes: 1 addition & 106 deletions dist/file-upload-with-preview.d.ts
Original file line number Diff line number Diff line change
@@ -1,109 +1,4 @@
export interface Text {
/**
* Browse button text
*
* @default "Browse"
*/
browse?: string;
/**
* Placeholder text
*
* @default "Choose file..."
*/
chooseFile?: string;
/**
* Main input label text
*
* @default "Upload"
*/
label?: string;
/**
* Count descriptor text. Defaults to `${ n } files selected`.
*
* @default "files selected"
*/
selectedCount?: string;
}
export interface Images {
/**
* Background image for image grid
*
* @default DEFAULT_BACKGROUND_IMAGE
*/
backgroundImage?: string;
/**
* Placeholder image
*
* @default DEFAULT_BASE_IMAGE
*/
baseImage?: string;
/**
* Alternate file upload image
*
* @default DEFAULT_SUCCESS_FILE_ALT_IMAGE
*/
successFileAltImage?: string;
/**
* PDF upload image
*
* @default DEFAULT_SUCCESS_PDF_IMAGE
*/
successPdfImage?: string;
/**
* Video upload image
*
* @default DEFAULT_SUCCESS_VIDEO_IMAGE
*/
successVideoImage?: string;
}
export type PresetFiles = string[];
/**
* Options to customize the library
*/
export interface Options {
/**
* Type of files to accept in your input
*
* @default '*'
*/
accept?: HTMLInputElement['accept'];
/**
* Configurable images for the library
*/
images?: Images;
/**
* Set a maximum number of files you'd like the component to deal with. Must be `> 0` if set. By default there is no limit.
*
* @default 0
*/
maxFileCount?: number;
/**
* Set to `true` if you want to allow the user to selected multiple images. Will use grid view in the image preview if set.
*
* @default false
*/
multiple?: boolean;
/**
* Provide an array of image paths to be automatically uploaded and displayed on page load (can be images hosted on server or URLs)
*
* @default []
*/
presetFiles?: PresetFiles;
/**
* Show a delete button on images in the grid
*
* @default true
*/
showDeleteButtonOnImages?: boolean;
/**
* Configurable text for the library
*/
text?: Text;
}
export type RequiredOptions = Required<Options> & {
images: Required<Images>;
text: Required<Text>;
};
import { Options, PresetFiles, RequiredOptions } from './types/options';
export declare class FileUploadWithPreview {
/**
* Currently selected files
Expand Down
2 changes: 1 addition & 1 deletion dist/file-upload-with-preview.d.ts.map

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

34 changes: 0 additions & 34 deletions dist/file-upload-with-preview.iife.js

This file was deleted.

34 changes: 34 additions & 0 deletions dist/index.cjs

Large diffs are not rendered by default.

6 changes: 5 additions & 1 deletion dist/index.d.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,9 @@
export * from './constants/events';
export * from './constants/file';
export * from './constants/images';
export * from './file-upload-with-preview';
export * from './constants/style';
export * from './constants/text';
export * from './types/events';
export * from './types/options';
export * from './file-upload-with-preview';
//# sourceMappingURL=index.d.ts.map
2 changes: 1 addition & 1 deletion dist/index.d.ts.map

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

34 changes: 34 additions & 0 deletions dist/index.iife.js

Large diffs are not rendered by default.

10 changes: 8 additions & 2 deletions dist/file-upload-with-preview.js → dist/index.js

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion dist/style.css

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

107 changes: 107 additions & 0 deletions dist/types/options.d.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,107 @@
export interface Text {
/**
* Browse button text
*
* @default "Browse"
*/
browse?: string;
/**
* Placeholder text
*
* @default "Choose file..."
*/
chooseFile?: string;
/**
* Main input label text
*
* @default "Upload"
*/
label?: string;
/**
* Count descriptor text. Defaults to `${ n } files selected`.
*
* @default "files selected"
*/
selectedCount?: string;
}
export interface Images {
/**
* Background image for image grid
*
* @default DEFAULT_BACKGROUND_IMAGE
*/
backgroundImage?: string;
/**
* Placeholder image
*
* @default DEFAULT_BASE_IMAGE
*/
baseImage?: string;
/**
* Alternate file upload image
*
* @default DEFAULT_SUCCESS_FILE_ALT_IMAGE
*/
successFileAltImage?: string;
/**
* PDF upload image
*
* @default DEFAULT_SUCCESS_PDF_IMAGE
*/
successPdfImage?: string;
/**
* Video upload image
*
* @default DEFAULT_SUCCESS_VIDEO_IMAGE
*/
successVideoImage?: string;
}
export type PresetFiles = string[];
/**
* Options to customize the library
*/
export interface Options {
/**
* Type of files to accept in your input
*
* @default '*'
*/
accept?: HTMLInputElement['accept'];
/**
* Configurable images for the library
*/
images?: Images;
/**
* Set a maximum number of files you'd like the component to deal with. Must be `> 0` if set. By default there is no limit.
*
* @default 0
*/
maxFileCount?: number;
/**
* Set to `true` if you want to allow the user to selected multiple images. Will use grid view in the image preview if set.
*
* @default false
*/
multiple?: boolean;
/**
* Provide an array of image paths to be automatically uploaded and displayed on page load (can be images hosted on server or URLs)
*
* @default []
*/
presetFiles?: PresetFiles;
/**
* Show a delete button on images in the grid
*
* @default true
*/
showDeleteButtonOnImages?: boolean;
/**
* Configurable text for the library
*/
text?: Text;
}
export type RequiredOptions = Required<Options> & {
images: Required<Images>;
text: Required<Text>;
};
//# sourceMappingURL=options.d.ts.map
1 change: 1 addition & 0 deletions dist/types/options.d.ts.map

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Loading

0 comments on commit 4880ce7

Please sign in to comment.