@yamada-ui/dropzone 0.2.5 → 0.2.6

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.
@@ -0,0 +1,26 @@
1
+ declare const ACCEPT_TYPES: {
2
+ readonly png: "image/png";
3
+ readonly gif: "image/gif";
4
+ readonly jpeg: "image/jpeg";
5
+ readonly svg: "image/svg+xml";
6
+ readonly webp: "image/webp";
7
+ readonly mp4: "video/mp4";
8
+ readonly zip: "application/zip";
9
+ readonly csv: "text/csv";
10
+ readonly pdf: "application/pdf";
11
+ readonly doc: "application/msword";
12
+ readonly docx: "application/vnd.openxmlformats-officedocument.wordprocessingml.document";
13
+ readonly xls: "application/vnd.ms-excel";
14
+ readonly xlsx: "application/vnd.openxmlformats-officedocument.spreadsheetml.sheet";
15
+ readonly ppt: "application/vnd.ms-powerpoint";
16
+ readonly pptx: "application/vnd.openxmlformats-officedocument.presentationml.presentation";
17
+ readonly exe: "application/vnd.microsoft.portable-executable";
18
+ };
19
+ declare const IMAGE_ACCEPT_TYPE: ("image/png" | "image/gif" | "image/jpeg" | "image/svg+xml" | "image/webp")[];
20
+ declare const PDF_ACCEPT_TYPE: "application/pdf"[];
21
+ declare const MS_WORD_ACCEPT_TYPE: ("application/msword" | "application/vnd.openxmlformats-officedocument.wordprocessingml.document")[];
22
+ declare const MS_EXCEL_ACCEPT_TYPE: ("application/vnd.ms-excel" | "application/vnd.openxmlformats-officedocument.spreadsheetml.sheet")[];
23
+ declare const MS_POWERPOINT_ACCEPT_TYPE: ("application/vnd.ms-powerpoint" | "application/vnd.openxmlformats-officedocument.presentationml.presentation")[];
24
+ declare const EXE_ACCEPT_TYPE: "application/vnd.microsoft.portable-executable"[];
25
+
26
+ export { ACCEPT_TYPES, EXE_ACCEPT_TYPE, IMAGE_ACCEPT_TYPE, MS_EXCEL_ACCEPT_TYPE, MS_POWERPOINT_ACCEPT_TYPE, MS_WORD_ACCEPT_TYPE, PDF_ACCEPT_TYPE };
@@ -0,0 +1,47 @@
1
+ import * as _yamada_ui_core from '@yamada-ui/core';
2
+ import { HTMLUIProps, ThemeProps, CSSUIProps } from '@yamada-ui/core';
3
+ import { FormControlOptions } from '@yamada-ui/form-control';
4
+ import { LoadingProps } from '@yamada-ui/loading';
5
+ import { FadeProps } from '@yamada-ui/transitions';
6
+ import { FC, PropsWithChildren, ForwardedRef } from 'react';
7
+ import { DropzoneOptions as DropzoneOptions$1, Accept } from 'react-dropzone';
8
+
9
+ type DropzoneOptions = {
10
+ /**
11
+ * The border color when the input is focused.
12
+ */
13
+ focusBorderColor?: CSSUIProps<'unresponsive'>['borderColor'];
14
+ /**
15
+ * The border color when the input is invalid.
16
+ */
17
+ errorBorderColor?: CSSUIProps<'unresponsive'>['borderColor'];
18
+ /**
19
+ * If `true`, display the dropzone loading icon.
20
+ *
21
+ * @default false
22
+ */
23
+ isLoading?: boolean;
24
+ /**
25
+ * Props for dropzone overlay element.
26
+ */
27
+ overlayProps?: FadeProps;
28
+ /**
29
+ * Props for dropzone loading icon element.
30
+ */
31
+ loadingProps?: LoadingProps;
32
+ /**
33
+ * File types to accept.
34
+ */
35
+ accept?: Accept | string[];
36
+ /**
37
+ * Ref to a open function.
38
+ */
39
+ openRef?: ForwardedRef<() => void | undefined>;
40
+ };
41
+ type DropzoneProps = Omit<HTMLUIProps<'div'>, 'onDrop'> & ThemeProps<'Dropzone'> & DropzoneOptions & FormControlOptions & Omit<DropzoneOptions$1, 'accept'>;
42
+ declare const Dropzone: _yamada_ui_core.Component<"input", DropzoneProps>;
43
+ declare const DropzoneAccept: FC<PropsWithChildren>;
44
+ declare const DropzoneReject: FC<PropsWithChildren>;
45
+ declare const DropzoneIdle: FC<PropsWithChildren>;
46
+
47
+ export { Dropzone, DropzoneAccept, DropzoneIdle, DropzoneProps, DropzoneReject };
@@ -0,0 +1,8 @@
1
+ export { Dropzone, DropzoneAccept, DropzoneIdle, DropzoneProps, DropzoneReject } from './dropzone.mjs';
2
+ export { ACCEPT_TYPES, EXE_ACCEPT_TYPE, IMAGE_ACCEPT_TYPE, MS_EXCEL_ACCEPT_TYPE, MS_POWERPOINT_ACCEPT_TYPE, MS_WORD_ACCEPT_TYPE, PDF_ACCEPT_TYPE } from './accept-types.mjs';
3
+ import '@yamada-ui/core';
4
+ import '@yamada-ui/form-control';
5
+ import '@yamada-ui/loading';
6
+ import '@yamada-ui/transitions';
7
+ import 'react';
8
+ import 'react-dropzone';
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@yamada-ui/dropzone",
3
- "version": "0.2.5",
3
+ "version": "0.2.6",
4
4
  "description": "Yamada UI dropzone component",
5
5
  "keywords": [
6
6
  "yamada",
@@ -36,11 +36,11 @@
36
36
  },
37
37
  "dependencies": {
38
38
  "react-dropzone": "14.2.3",
39
- "@yamada-ui/core": "0.4.3",
40
- "@yamada-ui/utils": "0.1.2",
41
- "@yamada-ui/form-control": "0.2.4",
42
- "@yamada-ui/transitions": "0.2.5",
43
- "@yamada-ui/loading": "0.3.4"
39
+ "@yamada-ui/core": "0.5.0",
40
+ "@yamada-ui/utils": "0.1.3",
41
+ "@yamada-ui/form-control": "0.2.5",
42
+ "@yamada-ui/transitions": "0.2.6",
43
+ "@yamada-ui/loading": "0.3.5"
44
44
  },
45
45
  "devDependencies": {
46
46
  "react": "^18.0.0",