@ctlyst.id/internal-ui 5.4.8 → 5.4.9
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.d.mts +1 -0
- package/dist/index.d.ts +1 -0
- package/dist/index.js +7 -2
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +7 -2
- package/dist/index.mjs.map +1 -1
- package/package.json +3 -3
package/dist/index.mjs
CHANGED
@@ -6007,6 +6007,7 @@ var Uploader = ({
|
|
6007
6007
|
isShowReupload = true,
|
6008
6008
|
size: size2 = "lg",
|
6009
6009
|
validatorExt,
|
6010
|
+
buttonChangeText = "Ubah Foto",
|
6010
6011
|
...props
|
6011
6012
|
}) => {
|
6012
6013
|
const [filePreview, setFilePreview] = useState5();
|
@@ -6118,6 +6119,10 @@ var Uploader = ({
|
|
6118
6119
|
setFilePreview(value.name);
|
6119
6120
|
return;
|
6120
6121
|
}
|
6122
|
+
if (acceptFileType == null ? void 0 : acceptFileType.some((type) => type === value.type)) {
|
6123
|
+
setFilePreview(value.name);
|
6124
|
+
return;
|
6125
|
+
}
|
6121
6126
|
setFilePreview(URL.createObjectURL(value));
|
6122
6127
|
}
|
6123
6128
|
} else {
|
@@ -6180,7 +6185,7 @@ var Uploader = ({
|
|
6180
6185
|
"data-test-id": `CT_component_base-image-uploader_image-preview${testId ? `_${testId}` : ""}`,
|
6181
6186
|
justify: "center",
|
6182
6187
|
align: "center",
|
6183
|
-
children: filePreview.includes("blob") ? /* @__PURE__ */ jsx66(
|
6188
|
+
children: filePreview.includes("blob") && !acceptFile.some(([type]) => typeof type === "string" && type.includes("image/")) ? /* @__PURE__ */ jsx66(
|
6184
6189
|
ChakraImage,
|
6185
6190
|
{
|
6186
6191
|
h: size2 === "lg" ? "120" : "100",
|
@@ -6225,7 +6230,7 @@ var Uploader = ({
|
|
6225
6230
|
size: "sm",
|
6226
6231
|
variant: "outline",
|
6227
6232
|
onClick: open,
|
6228
|
-
children:
|
6233
|
+
children: buttonChangeText
|
6229
6234
|
}
|
6230
6235
|
) }),
|
6231
6236
|
renderErrorText(errorText),
|