sprint-asia-custom-component 0.1.165 → 0.1.167
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/dist/index.js
CHANGED
|
@@ -26028,7 +26028,7 @@
|
|
|
26028
26028
|
if (file.errors[0]?.code === "file-too-large") {
|
|
26029
26029
|
setErrorMessage("Your file is too large. Max file size is 5 MB");
|
|
26030
26030
|
} else if (file.errors[0]?.code === "file-invalid-type") {
|
|
26031
|
-
setErrorMessage(excelAcceptedFiles ? "File format not supported. Please try again with XLSX,
|
|
26031
|
+
setErrorMessage(excelAcceptedFiles ? "File format not supported. Please try again with XLSX, CSV, or TXT file" : "File format not supported. Please try again with PNG, JPEG, JPG, or PDF file");
|
|
26032
26032
|
}
|
|
26033
26033
|
};
|
|
26034
26034
|
|
|
@@ -26039,12 +26039,12 @@
|
|
|
26039
26039
|
"application/pdf": [".pdf"]
|
|
26040
26040
|
};
|
|
26041
26041
|
|
|
26042
|
-
// Additional file types
|
|
26042
|
+
// Additional file types (updated: remove .tsv, add .txt)
|
|
26043
26043
|
const excelAcceptedFiles = {
|
|
26044
26044
|
"application/vnd.openxmlformats-officedocument.spreadsheetml.sheet": [".xlsx"],
|
|
26045
26045
|
"application/vnd.ms-excel": [".xls"],
|
|
26046
26046
|
"text/csv": [".csv"],
|
|
26047
|
-
"text/
|
|
26047
|
+
"text/plain": [".txt"] // ✅ ganti dari .tsv ke .txt
|
|
26048
26048
|
};
|
|
26049
26049
|
const {
|
|
26050
26050
|
getRootProps,
|
|
@@ -29204,6 +29204,7 @@
|
|
|
29204
29204
|
${value && mode === "default" && "bg-neutral20 border-black focus:outline-2 outline-primary500"}
|
|
29205
29205
|
${isFocused && mode === "default" && "bg-neutral20 border-primary500"}
|
|
29206
29206
|
${mode === "disable" && "bg-neutral30 border-neutral50"}
|
|
29207
|
+
${mode === "white" && "bg-white border-neutral50"}
|
|
29207
29208
|
${mode === "danger" && "bg-danger50 border-danger500 focus:outline-2 outline-danger500"}
|
|
29208
29209
|
${leftIcon || leftAdornment ? "pl-8" : "pl-3"}
|
|
29209
29210
|
${leftIcon && leftAdornment ? "pl-16" : "pl-3"}
|
package/package.json
CHANGED
|
@@ -23,8 +23,8 @@ const DropzoneUploadFile = ({
|
|
|
23
23
|
} else if (file.errors[0]?.code === "file-invalid-type") {
|
|
24
24
|
setErrorMessage(
|
|
25
25
|
excelAcceptedFiles
|
|
26
|
-
? "File format not supported. Please try again with XLSX,
|
|
27
|
-
: "File format not supported. Please try again with PNG, JPEG, JPG, or PDF file
|
|
26
|
+
? "File format not supported. Please try again with XLSX, CSV, or TXT file"
|
|
27
|
+
: "File format not supported. Please try again with PNG, JPEG, JPG, or PDF file"
|
|
28
28
|
);
|
|
29
29
|
}
|
|
30
30
|
};
|
|
@@ -36,12 +36,12 @@ const DropzoneUploadFile = ({
|
|
|
36
36
|
"application/pdf": [".pdf"],
|
|
37
37
|
};
|
|
38
38
|
|
|
39
|
-
// Additional file types
|
|
39
|
+
// Additional file types (updated: remove .tsv, add .txt)
|
|
40
40
|
const excelAcceptedFiles = {
|
|
41
41
|
"application/vnd.openxmlformats-officedocument.spreadsheetml.sheet": [".xlsx"],
|
|
42
42
|
"application/vnd.ms-excel": [".xls"],
|
|
43
43
|
"text/csv": [".csv"],
|
|
44
|
-
"text/
|
|
44
|
+
"text/plain": [".txt"], // ✅ ganti dari .tsv ke .txt
|
|
45
45
|
};
|
|
46
46
|
|
|
47
47
|
const { getRootProps, getInputProps } = useDropzone({
|
|
@@ -75,7 +75,9 @@ const DropzoneUploadFile = ({
|
|
|
75
75
|
<div className="flex justify-center">
|
|
76
76
|
<PiFileArrowUpDuotone size={16} className="text-neutral300" />
|
|
77
77
|
</div>
|
|
78
|
-
<p className="text-sm text-neutral300 mt-2">
|
|
78
|
+
<p className="text-sm text-neutral300 mt-2">
|
|
79
|
+
Drag & Drop File Here or Chose File
|
|
80
|
+
</p>
|
|
79
81
|
{errorMessage && <p className="text-xs text-danger500">{errorMessage}</p>}
|
|
80
82
|
</>
|
|
81
83
|
) : (
|
|
@@ -96,4 +98,4 @@ const DropzoneUploadFile = ({
|
|
|
96
98
|
);
|
|
97
99
|
};
|
|
98
100
|
|
|
99
|
-
export default DropzoneUploadFile;
|
|
101
|
+
export default DropzoneUploadFile;
|
|
@@ -73,6 +73,7 @@ const TextInput = ({
|
|
|
73
73
|
${value && mode === "default" && "bg-neutral20 border-black focus:outline-2 outline-primary500"}
|
|
74
74
|
${isFocused && mode === "default" && "bg-neutral20 border-primary500"}
|
|
75
75
|
${mode === "disable" && "bg-neutral30 border-neutral50"}
|
|
76
|
+
${mode === "white" && "bg-white border-neutral50"}
|
|
76
77
|
${mode === "danger" && "bg-danger50 border-danger500 focus:outline-2 outline-danger500"}
|
|
77
78
|
${leftIcon || leftAdornment ? "pl-8" : "pl-3"}
|
|
78
79
|
${leftIcon && leftAdornment ? "pl-16" : "pl-3"}
|