@youversion/design-system-components 3.12.1 → 3.13.0
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.
|
@@ -28,9 +28,13 @@ export interface ImageUploadProps extends Omit<NativeInputProps, 'width' | 'heig
|
|
|
28
28
|
dismissCallback?: (src: string | undefined) => void;
|
|
29
29
|
/** Aria label for the dismiss image button. */
|
|
30
30
|
dismissImageAriaLabel?: string;
|
|
31
|
+
/** The hint shown under the button when `droppable` is set. */
|
|
32
|
+
dragAndDropLabel?: string;
|
|
33
|
+
/** Lets an image be dragged and dropped onto the block, in addition to choosing one. */
|
|
34
|
+
droppable?: boolean;
|
|
31
35
|
/** Adds error message to the botton of the component. */
|
|
32
36
|
error?: string;
|
|
33
|
-
/** Callback function invoked when an image is uploaded. */
|
|
37
|
+
/** Callback function invoked when an image is uploaded. A thrown error's message is shown as the error. */
|
|
34
38
|
fileCallback?: ((file: File, image: HTMLImageElement) => Promise<void>) | ((file: File, image: HTMLImageElement) => void);
|
|
35
39
|
/** Function to throw an error message when the image if larger than the maxByteSize allowed. */
|
|
36
40
|
fileMaxKbSizeError?: (fileName: string, maxKbSize: number) => string;
|
|
@@ -40,6 +44,8 @@ export interface ImageUploadProps extends Omit<NativeInputProps, 'width' | 'heig
|
|
|
40
44
|
fileMinSizeError?: (fileName: string) => string;
|
|
41
45
|
/** Function to throw an error message when the image is not the right ratio. */
|
|
42
46
|
fileRatioError?: (fileName: string) => string;
|
|
47
|
+
/** Function to throw an error message when the file is not an image the browser can read. */
|
|
48
|
+
fileTypeError?: (fileName: string) => string;
|
|
43
49
|
/** Boolean for hero image upload view. */
|
|
44
50
|
hero?: boolean;
|
|
45
51
|
/** Hides the dismiss icon when an image is uploaded. */
|
|
@@ -60,7 +66,7 @@ export interface ImageUploadProps extends Omit<NativeInputProps, 'width' | 'heig
|
|
|
60
66
|
name?: string;
|
|
61
67
|
/** Function to run on input on onBlur. */
|
|
62
68
|
onBlur?: FocusEventHandler<HTMLInputElement>;
|
|
63
|
-
/** Function that does any desired preProcessing of a file. */
|
|
69
|
+
/** Function that does any desired preProcessing of a file. A thrown error's message is shown as the error. */
|
|
64
70
|
preProcessing?: (file: File) => Promise<File>;
|
|
65
71
|
/** Determines the shape of the displayed image. */
|
|
66
72
|
shape?: ImageUploadShape;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ImageUpload.d.ts","sourceRoot":"","sources":["../../../src/ImageUpload/ImageUpload.tsx"],"names":[],"mappings":"AAIA,OAAO,EACL,iBAAiB,
|
|
1
|
+
{"version":3,"file":"ImageUpload.d.ts","sourceRoot":"","sources":["../../../src/ImageUpload/ImageUpload.tsx"],"names":[],"mappings":"AAIA,OAAO,EACL,iBAAiB,EAGjB,iBAAiB,EAOlB,MAAM,OAAO,CAAC;AAQf,KAAK,gBAAgB,GAAG,iBAAiB,CAAC,gBAAgB,CAAC,CAAC;AAE5D,KAAK,cAAc,GAAG,SAAS,MAAM,EAAE,CAAC;AAQxC,KAAK,gBAAgB,GAAG,QAAQ,GAAG,QAAQ,GAAG,OAAO,CAAC;AAEtD,KAAK,eAAe,GAAG;IACrB,SAAS,CAAC,EAAE,KAAK,CAAC,cAAc,CAAC,CAAC;IAClC,UAAU,CAAC,EAAE,GAAG,MAAM,IAAI,MAAM,EAAE,CAAC;IACnC,WAAW,CAAC,EAAE,MAAM,CAAC;IACrB,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,QAAQ,CAAC,EAAE,MAAM,CAAC;IAClB,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,QAAQ,CAAC,EAAE,MAAM,CAAC;CACnB,CAAC;AAEF,MAAM,WAAW,gBAAiB,SAAQ,IAAI,CAAC,gBAAgB,EAAE,OAAO,GAAG,QAAQ,GAAG,WAAW,CAAC;IAChG,0EAA0E;IAC1E,iBAAiB,CAAC,EAAE,KAAK,CAAC,cAAc,CAAC,CAAC;IAC1C,wMAAwM;IACxM,WAAW,CAAC,EAA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