@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.d.mts CHANGED
@@ -857,6 +857,16 @@ type UploaderProps = FlexProps & {
857
857
  validate: [number, number];
858
858
  message: string;
859
859
  };
860
+ /**
861
+ * validate minimum width x height dimension
862
+ */
863
+ minDimension?: {
864
+ /**
865
+ * [minimum width, minimum height]
866
+ */
867
+ validate: [number, number];
868
+ message: string;
869
+ };
860
870
  /**
861
871
  * validate max file size
862
872
  */
package/dist/index.d.ts CHANGED
@@ -857,6 +857,16 @@ type UploaderProps = FlexProps & {
857
857
  validate: [number, number];
858
858
  message: string;
859
859
  };
860
+ /**
861
+ * validate minimum width x height dimension
862
+ */
863
+ minDimension?: {
864
+ /**
865
+ * [minimum width, minimum height]
866
+ */
867
+ validate: [number, number];
868
+ message: string;
869
+ };
860
870
  /**
861
871
  * validate max file size
862
872
  */
package/dist/index.js CHANGED
@@ -6274,6 +6274,7 @@ var Uploader = ({
6274
6274
  maxFileSize,
6275
6275
  customValidation,
6276
6276
  value,
6277
+ minDimension,
6277
6278
  isShowCloseButton = true,
6278
6279
  testId,
6279
6280
  isError: propIsError,
@@ -6343,13 +6344,16 @@ var Uploader = ({
6343
6344
  if (dimension && (imgWidth !== dimension.validate[0] || imgheight !== dimension.validate[1])) {
6344
6345
  return handleRejection(dimension.message, file, img);
6345
6346
  }
6347
+ if (minDimension && (imgWidth < minDimension.validate[0] || imgheight < minDimension.validate[1])) {
6348
+ return handleRejection(minDimension.message, file, img, error_code_default.FileInvalidDimension);
6349
+ }
6346
6350
  onHandleUploadFile == null ? void 0 : onHandleUploadFile(file, img);
6347
6351
  setFilePreview(URL.createObjectURL(file));
6348
6352
  return null;
6349
6353
  };
6350
6354
  return null;
6351
6355
  },
6352
- [customValidation, dimension, handleRejection, onHandleUploadFile, acceptFileType]
6356
+ [customValidation, dimension, handleRejection, onHandleUploadFile, acceptFileType, minDimension]
6353
6357
  );
6354
6358
  const onDropRejected = (0, import_react98.useCallback)((fileRejections) => {
6355
6359
  defaultOnHandleRejections(fileRejections, { acceptFormat, maxFileSize }, handleRejection);