@ctlyst.id/internal-ui 5.7.2 → 5.7.3

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.mjs CHANGED
@@ -6135,6 +6135,7 @@ var Uploader = ({
6135
6135
  maxFileSize,
6136
6136
  customValidation,
6137
6137
  value,
6138
+ minDimension,
6138
6139
  isShowCloseButton = true,
6139
6140
  testId,
6140
6141
  isError: propIsError,
@@ -6204,13 +6205,16 @@ var Uploader = ({
6204
6205
  if (dimension && (imgWidth !== dimension.validate[0] || imgheight !== dimension.validate[1])) {
6205
6206
  return handleRejection(dimension.message, file, img);
6206
6207
  }
6208
+ if (minDimension && (imgWidth < minDimension.validate[0] || imgheight < minDimension.validate[1])) {
6209
+ return handleRejection(minDimension.message, file, img, error_code_default.FileInvalidDimension);
6210
+ }
6207
6211
  onHandleUploadFile == null ? void 0 : onHandleUploadFile(file, img);
6208
6212
  setFilePreview(URL.createObjectURL(file));
6209
6213
  return null;
6210
6214
  };
6211
6215
  return null;
6212
6216
  },
6213
- [customValidation, dimension, handleRejection, onHandleUploadFile, acceptFileType]
6217
+ [customValidation, dimension, handleRejection, onHandleUploadFile, acceptFileType, minDimension]
6214
6218
  );
6215
6219
  const onDropRejected = useCallback4((fileRejections) => {
6216
6220
  defaultOnHandleRejections(fileRejections, { acceptFormat, maxFileSize }, handleRejection);