@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.d.mts
CHANGED
package/dist/index.d.ts
CHANGED
package/dist/index.js
CHANGED
@@ -6144,6 +6144,7 @@ var Uploader = ({
|
|
6144
6144
|
isShowReupload = true,
|
6145
6145
|
size: size2 = "lg",
|
6146
6146
|
validatorExt,
|
6147
|
+
buttonChangeText = "Ubah Foto",
|
6147
6148
|
...props
|
6148
6149
|
}) => {
|
6149
6150
|
const [filePreview, setFilePreview] = (0, import_react94.useState)();
|
@@ -6255,6 +6256,10 @@ var Uploader = ({
|
|
6255
6256
|
setFilePreview(value.name);
|
6256
6257
|
return;
|
6257
6258
|
}
|
6259
|
+
if (acceptFileType == null ? void 0 : acceptFileType.some((type) => type === value.type)) {
|
6260
|
+
setFilePreview(value.name);
|
6261
|
+
return;
|
6262
|
+
}
|
6258
6263
|
setFilePreview(URL.createObjectURL(value));
|
6259
6264
|
}
|
6260
6265
|
} else {
|
@@ -6317,7 +6322,7 @@ var Uploader = ({
|
|
6317
6322
|
"data-test-id": `CT_component_base-image-uploader_image-preview${testId ? `_${testId}` : ""}`,
|
6318
6323
|
justify: "center",
|
6319
6324
|
align: "center",
|
6320
|
-
children: filePreview.includes("blob") ? /* @__PURE__ */ (0, import_jsx_runtime66.jsx)(
|
6325
|
+
children: filePreview.includes("blob") && !acceptFile.some(([type]) => typeof type === "string" && type.includes("image/")) ? /* @__PURE__ */ (0, import_jsx_runtime66.jsx)(
|
6321
6326
|
import_react93.Image,
|
6322
6327
|
{
|
6323
6328
|
h: size2 === "lg" ? "120" : "100",
|
@@ -6362,7 +6367,7 @@ var Uploader = ({
|
|
6362
6367
|
size: "sm",
|
6363
6368
|
variant: "outline",
|
6364
6369
|
onClick: open,
|
6365
|
-
children:
|
6370
|
+
children: buttonChangeText
|
6366
6371
|
}
|
6367
6372
|
) }),
|
6368
6373
|
renderErrorText(errorText),
|