@ctlyst.id/internal-ui 5.7.1 → 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
@@ -4342,8 +4342,8 @@ var PaginationButton = (0, import_react63.forwardRef)(({ className, style, isAct
4342
4342
  px: 3,
4343
4343
  py: 2,
4344
4344
  h: 8,
4345
- minW: "auto",
4346
- width: 8,
4345
+ minW: 8,
4346
+ width: "auto",
4347
4347
  background: isActive ? "primary.500" : btnBg,
4348
4348
  color: isActive ? "white" : btnColor,
4349
4349
  _hover: !isActive ? {
@@ -4448,13 +4448,26 @@ var Pagination = ({ className, current, total, onSelect }) => {
4448
4448
  }
4449
4449
  ),
4450
4450
  generatePages().map((page) => {
4451
+ const isActive = page === current;
4451
4452
  return /* @__PURE__ */ (0, import_jsx_runtime47.jsx)(
4452
4453
  pagination_button_default,
4453
4454
  {
4454
4455
  "data-test-id": "Pagination-Button",
4455
- isActive: page === current,
4456
+ isActive,
4456
4457
  onClick: () => typeof page === "number" ? handleSelectPage(page) : null,
4457
- children: /* @__PURE__ */ (0, import_jsx_runtime47.jsx)(import_react65.Text, { scale: 300, fontSize: "text.sm", lineHeight: 18, fontWeight: 500, children: page })
4458
+ children: /* @__PURE__ */ (0, import_jsx_runtime47.jsx)(
4459
+ import_react65.Text,
4460
+ {
4461
+ scale: 300,
4462
+ fontSize: "text.sm",
4463
+ lineHeight: 18,
4464
+ fontWeight: 500,
4465
+ maxW: !isActive ? 8 : void 0,
4466
+ textOverflow: !isActive ? "ellipsis" : void 0,
4467
+ overflow: !isActive ? "hidden" : void 0,
4468
+ children: page
4469
+ }
4470
+ )
4458
4471
  },
4459
4472
  page
4460
4473
  );
@@ -6261,6 +6274,7 @@ var Uploader = ({
6261
6274
  maxFileSize,
6262
6275
  customValidation,
6263
6276
  value,
6277
+ minDimension,
6264
6278
  isShowCloseButton = true,
6265
6279
  testId,
6266
6280
  isError: propIsError,
@@ -6330,13 +6344,16 @@ var Uploader = ({
6330
6344
  if (dimension && (imgWidth !== dimension.validate[0] || imgheight !== dimension.validate[1])) {
6331
6345
  return handleRejection(dimension.message, file, img);
6332
6346
  }
6347
+ if (minDimension && (imgWidth < minDimension.validate[0] || imgheight < minDimension.validate[1])) {
6348
+ return handleRejection(minDimension.message, file, img, error_code_default.FileInvalidDimension);
6349
+ }
6333
6350
  onHandleUploadFile == null ? void 0 : onHandleUploadFile(file, img);
6334
6351
  setFilePreview(URL.createObjectURL(file));
6335
6352
  return null;
6336
6353
  };
6337
6354
  return null;
6338
6355
  },
6339
- [customValidation, dimension, handleRejection, onHandleUploadFile, acceptFileType]
6356
+ [customValidation, dimension, handleRejection, onHandleUploadFile, acceptFileType, minDimension]
6340
6357
  );
6341
6358
  const onDropRejected = (0, import_react98.useCallback)((fileRejections) => {
6342
6359
  defaultOnHandleRejections(fileRejections, { acceptFormat, maxFileSize }, handleRejection);