@ctlyst.id/internal-ui 5.7.2 → 5.7.4
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 +12 -0
- package/dist/index.d.ts +12 -0
- package/dist/index.js +6 -3
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +6 -3
- package/dist/index.mjs.map +1 -1
- package/package.json +3 -3
package/dist/index.mjs
CHANGED
|
@@ -4132,7 +4132,7 @@ var pagination_button_trigger_default = PaginationButtonTrigger;
|
|
|
4132
4132
|
|
|
4133
4133
|
// src/components/pagination/components/pagination.tsx
|
|
4134
4134
|
import { jsx as jsx47, jsxs as jsxs21 } from "react/jsx-runtime";
|
|
4135
|
-
var Pagination = ({ className, current, total, onSelect }) => {
|
|
4135
|
+
var Pagination = ({ className, current, total, maxButtons = 5, onSelect }) => {
|
|
4136
4136
|
const btnColorDisabled = useColorModeValue5("secondary.100", "primary.500");
|
|
4137
4137
|
const btnColor = useColorModeValue5("primary.500", "secondary.100");
|
|
4138
4138
|
const disabledPrevious = current === 1;
|
|
@@ -4145,7 +4145,6 @@ var Pagination = ({ className, current, total, onSelect }) => {
|
|
|
4145
4145
|
}
|
|
4146
4146
|
};
|
|
4147
4147
|
const generatePages = () => {
|
|
4148
|
-
const maxButtons = 5;
|
|
4149
4148
|
const pageButtons = [];
|
|
4150
4149
|
let startPage;
|
|
4151
4150
|
let endPage;
|
|
@@ -6135,6 +6134,7 @@ var Uploader = ({
|
|
|
6135
6134
|
maxFileSize,
|
|
6136
6135
|
customValidation,
|
|
6137
6136
|
value,
|
|
6137
|
+
minDimension,
|
|
6138
6138
|
isShowCloseButton = true,
|
|
6139
6139
|
testId,
|
|
6140
6140
|
isError: propIsError,
|
|
@@ -6204,13 +6204,16 @@ var Uploader = ({
|
|
|
6204
6204
|
if (dimension && (imgWidth !== dimension.validate[0] || imgheight !== dimension.validate[1])) {
|
|
6205
6205
|
return handleRejection(dimension.message, file, img);
|
|
6206
6206
|
}
|
|
6207
|
+
if (minDimension && (imgWidth < minDimension.validate[0] || imgheight < minDimension.validate[1])) {
|
|
6208
|
+
return handleRejection(minDimension.message, file, img, error_code_default.FileInvalidDimension);
|
|
6209
|
+
}
|
|
6207
6210
|
onHandleUploadFile == null ? void 0 : onHandleUploadFile(file, img);
|
|
6208
6211
|
setFilePreview(URL.createObjectURL(file));
|
|
6209
6212
|
return null;
|
|
6210
6213
|
};
|
|
6211
6214
|
return null;
|
|
6212
6215
|
},
|
|
6213
|
-
[customValidation, dimension, handleRejection, onHandleUploadFile, acceptFileType]
|
|
6216
|
+
[customValidation, dimension, handleRejection, onHandleUploadFile, acceptFileType, minDimension]
|
|
6214
6217
|
);
|
|
6215
6218
|
const onDropRejected = useCallback4((fileRejections) => {
|
|
6216
6219
|
defaultOnHandleRejections(fileRejections, { acceptFormat, maxFileSize }, handleRejection);
|