@photoroom/ui 0.1.770 → 0.1.771
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/components/input/DropZone/DropZone.d.ts +5 -12
- package/components/input/DropZone/DropZone.d.ts.map +1 -1
- package/components/input/DropZone/DropZoneButton.d.ts +19 -0
- package/components/input/DropZone/DropZoneButton.d.ts.map +1 -0
- package/components/input/DropZone/index.d.ts +1 -0
- package/components/input/DropZone/index.d.ts.map +1 -1
- package/components/input/TextInput/TextInput.d.ts.map +1 -1
- package/index.css +1 -1
- package/index.mjs +10091 -10064
- package/package.json +1 -1
|
@@ -1,24 +1,14 @@
|
|
|
1
1
|
import { ReactNode } from "react";
|
|
2
2
|
import type { FolderImport } from "../../unsorted/FileUploader";
|
|
3
3
|
export type DropZoneProps = Readonly<({
|
|
4
|
-
density?: "compact";
|
|
5
|
-
ctaLabel?: never;
|
|
6
|
-
allowFolders?: never;
|
|
7
|
-
folderCtaLabel?: never;
|
|
8
|
-
} | {
|
|
9
|
-
density: "regular";
|
|
10
|
-
ctaLabel: string;
|
|
11
4
|
allowFolders?: false;
|
|
12
5
|
folderCtaLabel?: never;
|
|
13
6
|
}
|
|
14
7
|
/**
|
|
15
8
|
* Folder mode: a second CTA opens the OS folder picker and dropped directories
|
|
16
|
-
* are traversed.
|
|
17
|
-
* it owns its content, so `children` is unavailable.
|
|
9
|
+
* are traversed. It owns its content, so `children` is unavailable.
|
|
18
10
|
*/
|
|
19
11
|
| {
|
|
20
|
-
density: "regular";
|
|
21
|
-
ctaLabel: string;
|
|
22
12
|
allowFolders: true;
|
|
23
13
|
folderCtaLabel: string;
|
|
24
14
|
children?: never;
|
|
@@ -32,15 +22,18 @@ export type DropZoneProps = Readonly<({
|
|
|
32
22
|
onClick?: () => void;
|
|
33
23
|
/** Side-effect hook fired right before the picker opens; does not replace it. Ignored when `onClick` is set. */
|
|
34
24
|
onOpenFilePicker?: () => void;
|
|
25
|
+
ctaLabel: string;
|
|
35
26
|
multiple?: boolean;
|
|
36
27
|
/** MIME types the file picker offers; defaults to the supported image formats. */
|
|
37
28
|
accept?: string[];
|
|
29
|
+
/** Shown above the CTA in place of `title`, e.g. a preview of the picked file. */
|
|
38
30
|
children?: ReactNode;
|
|
39
31
|
title?: ReactNode;
|
|
40
32
|
dropTitle?: ReactNode;
|
|
41
33
|
className?: string;
|
|
42
34
|
testId?: string;
|
|
43
35
|
autoFocus?: boolean;
|
|
36
|
+
disabled?: boolean;
|
|
44
37
|
}>;
|
|
45
|
-
export declare const DropZone: ({ onFileChange, onClick, onOpenFilePicker, multiple, accept, children, title, dropTitle,
|
|
38
|
+
export declare const DropZone: ({ onFileChange, onClick, onOpenFilePicker, multiple, accept, children, title, dropTitle, ctaLabel, allowFolders, folderCtaLabel, className, testId, autoFocus, disabled, }: DropZoneProps) => import("react").JSX.Element;
|
|
46
39
|
//# sourceMappingURL=DropZone.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"DropZone.d.ts","sourceRoot":"","sources":["../../../../src/components/input/DropZone/DropZone.tsx"],"names":[],"mappings":"AAEA,OAAO,EAAE,SAAS,
|
|
1
|
+
{"version":3,"file":"DropZone.d.ts","sourceRoot":"","sources":["../../../../src/components/input/DropZone/DropZone.tsx"],"names":[],"mappings":"AAEA,OAAO,EAAE,SAAS,EAAsB,MAAM,OAAO,CAAC;AAItD,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,6BAA6B,CAAC;AAGhE,MAAM,MAAM,aAAa,GAAG,QAAQ,CAClC,CACI;IAAE,YAAY,CAAC,EAAE,KAAK,CAAC;IAAC,cAAc,CAAC,EAAE,KAAK,CAAA;CAAE;AAClD;;;GAGG;GACD;IAAE,YAAY,EAAE,IAAI,CAAC;IAAC,cAAc,EAAE,MAAM,CAAC;IAAC,QAAQ,CAAC,EAAE,KAAK,CAAA;CAAE,CACnE,GAAG;IACF;;;;OAIG;IACH,YAAY,EAAE,CACZ,KAAK,EAAE,QAAQ,EACf,cAAc,CAAC,EAAE,OAAO,EACxB,QAAQ,CAAC,EAAE,OAAO,EAClB,YAAY,CAAC,EAAE,YAAY,KACxB,IAAI,CAAC;IACV,OAAO,CAAC,EAAE,MAAM,IAAI,CAAC;IACrB,gHAAgH;IAChH,gBAAgB,CAAC,EAAE,MAAM,IAAI,CAAC;IAC9B,QAAQ,EAAE,MAAM,CAAC;IACjB,QAAQ,CAAC,EAAE,OAAO,CAAC;IACnB,kFAAkF;IAClF,MAAM,CAAC,EAAE,MAAM,EAAE,CAAC;IAClB,kFAAkF;IAClF,QAAQ,CAAC,EAAE,SAAS,CAAC;IACrB,KAAK,CAAC,EAAE,SAAS,CAAC;IAClB,SAAS,CAAC,EAAE,SAAS,CAAC;IACtB,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,MAAM,CAAC,EAAE,MAAM,CAAC;IAChB,SAAS,CAAC,EAAE,OAAO,CAAC;IACpB,QAAQ,CAAC,EAAE,OAAO,CAAC;CACpB,CACF,CAAC;AAKF,eAAO,MAAM,QAAQ,+KAgBlB,aAAa,gCAoHf,CAAC"}
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
import { ReactNode } from "react";
|
|
2
|
+
export type DropZoneButtonProps = Readonly<{
|
|
3
|
+
onFileChange: (files: FileList, isShiftPressed?: boolean) => void;
|
|
4
|
+
onClick?: () => void;
|
|
5
|
+
/** Side-effect hook fired right before the picker opens; does not replace it. Ignored when `onClick` is set. */
|
|
6
|
+
onOpenFilePicker?: () => void;
|
|
7
|
+
multiple?: boolean;
|
|
8
|
+
/** MIME types the file picker offers; defaults to the supported image formats. */
|
|
9
|
+
accept?: string[];
|
|
10
|
+
children?: ReactNode;
|
|
11
|
+
title?: ReactNode;
|
|
12
|
+
dropTitle?: ReactNode;
|
|
13
|
+
className?: string;
|
|
14
|
+
testId?: string;
|
|
15
|
+
autoFocus?: boolean;
|
|
16
|
+
disabled?: boolean;
|
|
17
|
+
}>;
|
|
18
|
+
export declare const DropZoneButton: ({ onFileChange, onClick, onOpenFilePicker, multiple, accept, children, title, dropTitle, className, testId, autoFocus, disabled, }: DropZoneButtonProps) => import("react").JSX.Element;
|
|
19
|
+
//# sourceMappingURL=DropZoneButton.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"DropZoneButton.d.ts","sourceRoot":"","sources":["../../../../src/components/input/DropZone/DropZoneButton.tsx"],"names":[],"mappings":"AAEA,OAAO,EAAE,SAAS,EAAe,MAAM,OAAO,CAAC;AAK/C,MAAM,MAAM,mBAAmB,GAAG,QAAQ,CAAC;IACzC,YAAY,EAAE,CAAC,KAAK,EAAE,QAAQ,EAAE,cAAc,CAAC,EAAE,OAAO,KAAK,IAAI,CAAC;IAClE,OAAO,CAAC,EAAE,MAAM,IAAI,CAAC;IACrB,gHAAgH;IAChH,gBAAgB,CAAC,EAAE,MAAM,IAAI,CAAC;IAC9B,QAAQ,CAAC,EAAE,OAAO,CAAC;IACnB,kFAAkF;IAClF,MAAM,CAAC,EAAE,MAAM,EAAE,CAAC;IAClB,QAAQ,CAAC,EAAE,SAAS,CAAC;IACrB,KAAK,CAAC,EAAE,SAAS,CAAC;IAClB,SAAS,CAAC,EAAE,SAAS,CAAC;IACtB,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,MAAM,CAAC,EAAE,MAAM,CAAC;IAChB,SAAS,CAAC,EAAE,OAAO,CAAC;IACpB,QAAQ,CAAC,EAAE,OAAO,CAAC;CACpB,CAAC,CAAC;AAEH,eAAO,MAAM,cAAc,uIAaxB,mBAAmB,gCAwErB,CAAC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/components/input/DropZone/index.tsx"],"names":[],"mappings":"AAAA,cAAc,YAAY,CAAC"}
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/components/input/DropZone/index.tsx"],"names":[],"mappings":"AAAA,cAAc,YAAY,CAAC;AAC3B,cAAc,kBAAkB,CAAC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"TextInput.d.ts","sourceRoot":"","sources":["../../../../src/components/input/TextInput/TextInput.tsx"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"TextInput.d.ts","sourceRoot":"","sources":["../../../../src/components/input/TextInput/TextInput.tsx"],"names":[],"mappings":"AAQA,MAAM,MAAM,cAAc,GAAG;IAC3B;;OAEG;IACH,OAAO,CAAC,EAAE,OAAO,CAAC;IAClB;;OAEG;IACH,IAAI,CAAC,EAAE,OAAO,GAAG,UAAU,GAAG,QAAQ,GAAG,KAAK,GAAG,MAAM,GAAG,KAAK,GAAG,QAAQ,CAAC;IAC3E;;OAEG;IACH,UAAU,CAAC,EAAE,OAAO,CAAC;IACrB;;OAEG;IACH,UAAU,CAAC,EAAE,OAAO,CAAC;IACrB;;OAEG;IACH,OAAO,CAAC,EAAE,SAAS,GAAG,SAAS,GAAG,OAAO,CAAC;IAC1C;;OAEG;IACH,QAAQ,CAAC,EAAE,OAAO,CAAC;IACnB;;OAEG;IACH,OAAO,CAAC,EAAE,MAAM,IAAI,CAAC;IACrB;;OAEG;IACH,UAAU,CAAC,EAAE,MAAM,CAAC;IACpB;;OAEG;IACH,WAAW,CAAC,EAAE,KAAK,CAAC,aAAa,CAAC,KAAK,CAAC,wBAAwB,CAAC,KAAK,CAAC,CAAC,CAAC;IACzE,gBAAgB,CAAC,EAAE,MAAM,CAAC;CAC3B,GAAG,KAAK,CAAC,qBAAqB,CAAC,OAAO,CAAC,CAAC;kCA0Df,EACxB,OAAe,EACf,IAAa,EACb,UAAkB,EAClB,UAAkB,EAClB,OAAmB,EACnB,WAAW,EAAE,WAAW,EACxB,OAAO,EACP,UAAU,EACV,gBAAgB,EAChB,GAAG,EACH,GAAG,IAAI,EACR,EAAE,cAAc"}
|