@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 +10 -0
- package/dist/index.d.ts +10 -0
- package/dist/index.js +22 -5
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +22 -5
- package/dist/index.mjs.map +1 -1
- package/package.json +3 -3
package/dist/index.mjs
CHANGED
|
@@ -4080,8 +4080,8 @@ var PaginationButton = forwardRef9(({ className, style, isActive, children, ...r
|
|
|
4080
4080
|
px: 3,
|
|
4081
4081
|
py: 2,
|
|
4082
4082
|
h: 8,
|
|
4083
|
-
minW:
|
|
4084
|
-
width:
|
|
4083
|
+
minW: 8,
|
|
4084
|
+
width: "auto",
|
|
4085
4085
|
background: isActive ? "primary.500" : btnBg,
|
|
4086
4086
|
color: isActive ? "white" : btnColor,
|
|
4087
4087
|
_hover: !isActive ? {
|
|
@@ -4186,13 +4186,26 @@ var Pagination = ({ className, current, total, onSelect }) => {
|
|
|
4186
4186
|
}
|
|
4187
4187
|
),
|
|
4188
4188
|
generatePages().map((page) => {
|
|
4189
|
+
const isActive = page === current;
|
|
4189
4190
|
return /* @__PURE__ */ jsx47(
|
|
4190
4191
|
pagination_button_default,
|
|
4191
4192
|
{
|
|
4192
4193
|
"data-test-id": "Pagination-Button",
|
|
4193
|
-
isActive
|
|
4194
|
+
isActive,
|
|
4194
4195
|
onClick: () => typeof page === "number" ? handleSelectPage(page) : null,
|
|
4195
|
-
children: /* @__PURE__ */ jsx47(
|
|
4196
|
+
children: /* @__PURE__ */ jsx47(
|
|
4197
|
+
Text10,
|
|
4198
|
+
{
|
|
4199
|
+
scale: 300,
|
|
4200
|
+
fontSize: "text.sm",
|
|
4201
|
+
lineHeight: 18,
|
|
4202
|
+
fontWeight: 500,
|
|
4203
|
+
maxW: !isActive ? 8 : void 0,
|
|
4204
|
+
textOverflow: !isActive ? "ellipsis" : void 0,
|
|
4205
|
+
overflow: !isActive ? "hidden" : void 0,
|
|
4206
|
+
children: page
|
|
4207
|
+
}
|
|
4208
|
+
)
|
|
4196
4209
|
},
|
|
4197
4210
|
page
|
|
4198
4211
|
);
|
|
@@ -6122,6 +6135,7 @@ var Uploader = ({
|
|
|
6122
6135
|
maxFileSize,
|
|
6123
6136
|
customValidation,
|
|
6124
6137
|
value,
|
|
6138
|
+
minDimension,
|
|
6125
6139
|
isShowCloseButton = true,
|
|
6126
6140
|
testId,
|
|
6127
6141
|
isError: propIsError,
|
|
@@ -6191,13 +6205,16 @@ var Uploader = ({
|
|
|
6191
6205
|
if (dimension && (imgWidth !== dimension.validate[0] || imgheight !== dimension.validate[1])) {
|
|
6192
6206
|
return handleRejection(dimension.message, file, img);
|
|
6193
6207
|
}
|
|
6208
|
+
if (minDimension && (imgWidth < minDimension.validate[0] || imgheight < minDimension.validate[1])) {
|
|
6209
|
+
return handleRejection(minDimension.message, file, img, error_code_default.FileInvalidDimension);
|
|
6210
|
+
}
|
|
6194
6211
|
onHandleUploadFile == null ? void 0 : onHandleUploadFile(file, img);
|
|
6195
6212
|
setFilePreview(URL.createObjectURL(file));
|
|
6196
6213
|
return null;
|
|
6197
6214
|
};
|
|
6198
6215
|
return null;
|
|
6199
6216
|
},
|
|
6200
|
-
[customValidation, dimension, handleRejection, onHandleUploadFile, acceptFileType]
|
|
6217
|
+
[customValidation, dimension, handleRejection, onHandleUploadFile, acceptFileType, minDimension]
|
|
6201
6218
|
);
|
|
6202
6219
|
const onDropRejected = useCallback4((fileRejections) => {
|
|
6203
6220
|
defaultOnHandleRejections(fileRejections, { acceptFormat, maxFileSize }, handleRejection);
|