Skip to content

Commit e937e4f

Browse files
committed
[FEAT]: alwaysActive prop for FileItem. Also improvements on styles and size for Dropzone and FileItemContainer
1 parent 3fb3340 commit e937e4f

File tree

27 files changed

+499
-251
lines changed

27 files changed

+499
-251
lines changed

README.md

Lines changed: 11 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,13 +1,13 @@
11
:rocket: [Spanish](./README_ES.md)
22

33
# Dropzone UI
4+
45
The best and most complete file upload library for [React](https://reactjs.org/) apps.
56

67
<p align="center">
78
<h1 align="center"><img src="https://user-images.githubusercontent.com/43678736/132112022-0ca409ae-cca2-43c8-be89-110376260a3f.png" alt="dropone-ui-logo" width="172" height="172" align="center"> Dropzone UI</h1>
89
</p>
910

10-
1111
[![license](https://img.shields.io/badge/license-MIT-blue.svg)](https://github.com/dropzone-ui/react/blob/HEAD/LICENSE)
1212
[![npm latest package](https://img.shields.io/npm/v/@dropzone-ui/react.svg?logo=npm&logoColor=fff&label=NPM+package&color=limegreen)](https://www.npmjs.com/package/@dropzone-ui/react)
1313
[![Rate on Openbase](https://badges.openbase.com/js/rating/@dropzone-ui/react.svg)](https://openbase.com/js/@dropzone-ui/react?utm_source=embedded&utm_medium=badge&utm_campaign=rate-badge)
@@ -21,8 +21,6 @@ The best and most complete file upload library for [React](https://reactjs.org/)
2121
[![PRs Welcome](https://img.shields.io/badge/PRs-welcome-brightgreen.svg?style=flat-square)](http://makeapullrequest.com)
2222
[![GitHub Repo stars](https://img.shields.io/github/stars/dropzone-ui/react?label=Star%20me%20please%20:D&style=social)](https://github.com/dropzone-ui/react)
2323

24-
25-
2624
## Sample result:
2725

2826
On `Drag`, `Drop`, `Upload` and full screen `preview`. (also changing view mode from `grid` to `list`).
@@ -38,14 +36,22 @@ Did you like the project? Please don't forget to give us a :star: star on :octoc
3836

3937
## Main Content
4038

39+
Ordered by use:
40+
4141
- :books: [\<Full Documentation\>](#dropzone-ui-react-components-api)
4242

4343
- :performing_arts: [\<Examples and use cases\>](#Usage-and-examples)
4444

4545
- :computer: [\<Server side implementation/>](#uploading)
46-
46+
4747
- :earth_americas: [\<Localization\>](#localization)
4848

49+
- [Code generator](#code-generator)
50+
51+
## Code generator
52+
53+
Want to generate the code that fits your needs? Just interact with the code generator [here](http://dropzone-ui.com/).
54+
4955
## Installation
5056

5157
@dropzone-ui/react is available as an [npm package](https://www.npmjs.com/package/@dropzone-ui/react).
@@ -344,4 +350,4 @@ export interface CustomValidateFileResponse {
344350
This project is licensed under the terms of the
345351
[MIT license](/LICENSE).
346352

347-
Did you like the project? Please don't forget to give us a :star: star on :octocat: [github](https://github.com/dropzone-ui/dropzone-ui) :D
353+
Did you like the project? Please don't forget to give us a :star: star on :octocat: [github](https://github.com/dropzone-ui/dropzone-ui) :D

build/components/dropzone/components/Dropzone/DropzoneProps.d.ts

Lines changed: 11 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -5,11 +5,12 @@ import { FileDuiResponse } from "../utils/dropzone-ui.upload.utils";
55
import { CustomValidateFileResponse, FileValidated } from "../utils/validation.utils";
66
export interface DropzoneProps extends OverridableProps {
77
/**
8-
* This event is triggered when files are dropped or selected. Returns as first parameter the list of FileValidate files dropped or selected.
8+
* This event is triggered when files are dropped or selected.
9+
* Returns as first parameter the list of FileValidate files dropped or selected.
910
*/
1011
onDrop?: (filesDropped: FileValidated[]) => void;
1112
/**
12-
* Upload Url or endpoint
13+
* server Url or endpoint to upload the files
1314
*/
1415
url?: string;
1516
/**
@@ -18,7 +19,14 @@ export interface DropzoneProps extends OverridableProps {
1819
method?: "POST" | "PUT" | "PATCH";
1920
/**
2021
* Extra configuration for uploading
21-
* e.g. headers or token bearer
22+
* e.g. headers or bearer token
23+
* default:
24+
* config = {
25+
* headers: {
26+
* "content-type": "multipart/form-data",
27+
* },
28+
* }
29+
*
2230
*/
2331
config?: Object;
2432
/**

build/components/dropzone/components/DropzoneHeader/DropzoneHeader.d.ts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -18,6 +18,7 @@ export interface DropzoneHeaderProps {
1818
* only English and Spanish is supported
1919
*/
2020
localization?: Localization;
21+
hideViewIcon?: boolean;
2122
}
2223
declare const DropzoneHeader: FC<DropzoneHeaderProps>;
2324
export default DropzoneHeader;

build/components/file-item/components/FileItem/FileItemProps.d.ts

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -100,6 +100,16 @@ export interface FileItemProps extends PaperProps {
100100
* only English and Spanish is supported
101101
*/
102102
localization?: Localization;
103+
/**
104+
* The elevation or shadow of container
105+
* range of shadows is from 0 to 4,
106+
* other number o values are considered as 0
107+
*/
108+
elevation?: "1" | "2" | "3" | "4" | 1 | 2 | 3 | 4 | false;
109+
/**
110+
* Flag that determines whether actions are visible always, or only on hover event
111+
*/
112+
alwaysActive?: boolean;
103113
}
104114
/**
105115
* Base default props

build/components/file-item/components/FileItemMainLayer/FileItemMainLayer.d.ts

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ export interface FileItemMainLayerProps {
44
showInfo: boolean;
55
onOpenInfo: Function;
66
onOpenImage: Function | undefined;
7-
onDelete: Function;
7+
onDelete: Function | undefined;
88
fileName: string;
99
info: boolean;
1010
valid: boolean;
@@ -26,6 +26,7 @@ export interface FileItemMainLayerProps {
2626
* only English and Spanish is supported
2727
*/
2828
localization?: Localization;
29+
hovering?: boolean;
2930
}
3031
declare const FileItemMainLayer: FC<FileItemMainLayerProps>;
3132
export default FileItemMainLayer;

build/index.es.js

Lines changed: 4 additions & 4 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

build/index.es.js.map

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

build/index.js

Lines changed: 3 additions & 3 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

build/index.js.map

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

0 commit comments

Comments
 (0)