@mamrp/components 1.7.67 → 1.7.69
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 +2 -2
- package/dist/index.d.ts +2 -2
- package/dist/index.js +8 -15
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +8 -15
- package/dist/index.mjs.map +1 -1
- package/package.json +1 -1
package/dist/index.d.mts
CHANGED
|
@@ -515,9 +515,9 @@ type UploadImageProps$1<T extends FieldValues> = {
|
|
|
515
515
|
setValue: UseFormSetValue<T>;
|
|
516
516
|
height?: string;
|
|
517
517
|
allowGallery?: boolean;
|
|
518
|
-
|
|
518
|
+
disableRemove?: boolean;
|
|
519
519
|
};
|
|
520
|
-
declare const UploadImage$1: <T extends FieldValues>({ placeholder, name, selectedImage, setSelectedImage, control, errors, setValue, height, allowGallery,
|
|
520
|
+
declare const UploadImage$1: <T extends FieldValues>({ placeholder, name, selectedImage, setSelectedImage, control, errors, setValue, height, allowGallery, disableRemove, }: UploadImageProps$1<T>) => React__default.JSX.Element;
|
|
521
521
|
|
|
522
522
|
declare function imgViewer({ open, handleClose, src, isLoading, title, noResetBtn, noRotate, noZoom, unoptimized, }: {
|
|
523
523
|
open: boolean;
|
package/dist/index.d.ts
CHANGED
|
@@ -515,9 +515,9 @@ type UploadImageProps$1<T extends FieldValues> = {
|
|
|
515
515
|
setValue: UseFormSetValue<T>;
|
|
516
516
|
height?: string;
|
|
517
517
|
allowGallery?: boolean;
|
|
518
|
-
|
|
518
|
+
disableRemove?: boolean;
|
|
519
519
|
};
|
|
520
|
-
declare const UploadImage$1: <T extends FieldValues>({ placeholder, name, selectedImage, setSelectedImage, control, errors, setValue, height, allowGallery,
|
|
520
|
+
declare const UploadImage$1: <T extends FieldValues>({ placeholder, name, selectedImage, setSelectedImage, control, errors, setValue, height, allowGallery, disableRemove, }: UploadImageProps$1<T>) => React__default.JSX.Element;
|
|
521
521
|
|
|
522
522
|
declare function imgViewer({ open, handleClose, src, isLoading, title, noResetBtn, noRotate, noZoom, unoptimized, }: {
|
|
523
523
|
open: boolean;
|
package/dist/index.js
CHANGED
|
@@ -3782,7 +3782,7 @@ var UploadImage = ({
|
|
|
3782
3782
|
setValue,
|
|
3783
3783
|
height = "280px",
|
|
3784
3784
|
allowGallery = false,
|
|
3785
|
-
|
|
3785
|
+
disableRemove
|
|
3786
3786
|
}) => {
|
|
3787
3787
|
const [viewerOpen, setViewerOpen] = (0, import_react19.useState)(false);
|
|
3788
3788
|
const [viewerSrc, setViewerSrc] = (0, import_react19.useState)("");
|
|
@@ -3899,13 +3899,14 @@ var UploadImage = ({
|
|
|
3899
3899
|
overflow: "hidden"
|
|
3900
3900
|
}
|
|
3901
3901
|
},
|
|
3902
|
-
/* @__PURE__ */ import_react19.default.createElement(import_material20.Fade, { in: !!selectedImage, timeout: 400 }, /* @__PURE__ */ import_react19.default.createElement(import_material20.Tooltip, { title: "\u062D\u0630\u0641" }, /* @__PURE__ */ import_react19.default.createElement(
|
|
3902
|
+
!disableRemove && /* @__PURE__ */ import_react19.default.createElement(import_material20.Fade, { in: !!selectedImage, timeout: 400 }, /* @__PURE__ */ import_react19.default.createElement(import_material20.Tooltip, { title: "\u062D\u0630\u0641" }, /* @__PURE__ */ import_react19.default.createElement(
|
|
3903
3903
|
import_material20.IconButton,
|
|
3904
3904
|
{
|
|
3905
3905
|
onClick: (e) => {
|
|
3906
3906
|
e.preventDefault();
|
|
3907
3907
|
e.stopPropagation();
|
|
3908
|
-
if (selectedImage)
|
|
3908
|
+
if (selectedImage)
|
|
3909
|
+
URL.revokeObjectURL(selectedImage);
|
|
3909
3910
|
handleRemoveImage();
|
|
3910
3911
|
},
|
|
3911
3912
|
sx: {
|
|
@@ -3913,7 +3914,10 @@ var UploadImage = ({
|
|
|
3913
3914
|
top: 12,
|
|
3914
3915
|
right: 12,
|
|
3915
3916
|
zIndex: 10,
|
|
3916
|
-
backgroundColor: (0, import_material20.alpha)(
|
|
3917
|
+
backgroundColor: (0, import_material20.alpha)(
|
|
3918
|
+
import_theme.default.palette.error.main,
|
|
3919
|
+
0.9
|
|
3920
|
+
),
|
|
3917
3921
|
color: "#fff",
|
|
3918
3922
|
width: 44,
|
|
3919
3923
|
height: 44,
|
|
@@ -4002,17 +4006,6 @@ var UploadImage = ({
|
|
|
4002
4006
|
}
|
|
4003
4007
|
},
|
|
4004
4008
|
placeholder
|
|
4005
|
-
), /* @__PURE__ */ import_react19.default.createElement(
|
|
4006
|
-
import_material20.Typography,
|
|
4007
|
-
{
|
|
4008
|
-
variant: "body2",
|
|
4009
|
-
sx: {
|
|
4010
|
-
color: import_theme.default.palette.text.secondary,
|
|
4011
|
-
textAlign: "center",
|
|
4012
|
-
fontSize: "0.875rem"
|
|
4013
|
-
}
|
|
4014
|
-
},
|
|
4015
|
-
"PNG, JPG \u06CC\u0627 WEBP \u067E\u0634\u062A\u06CC\u0628\u0627\u0646\u06CC \u0645\u06CC\u200C\u0634\u0648\u062F"
|
|
4016
4009
|
)),
|
|
4017
4010
|
allowGallery && /* @__PURE__ */ import_react19.default.createElement(import_material20.Stack, { direction: "row", spacing: 2 }, /* @__PURE__ */ import_react19.default.createElement(
|
|
4018
4011
|
import_material20.Button,
|