@codezee/sixtify-brahma 0.2.180 → 0.2.181

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/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@codezee/sixtify-brahma",
3
- "version": "0.2.180",
3
+ "version": "0.2.181",
4
4
  "repository": {
5
5
  "type": "git",
6
6
  "url": "git+https://github.com/hardikranpariya/sixtify-brahma.git"
@@ -5,6 +5,14 @@ export type ImageUploadViewProps = Readonly<{
5
5
  sx?: SxProps;
6
6
  borderProgress?: number;
7
7
  borderSide?: "left" | "right";
8
+ width?: string | number | {
9
+ xs?: string | number;
10
+ md?: string | number;
11
+ };
12
+ height?: string | number | {
13
+ xs?: string | number;
14
+ md?: string | number;
15
+ };
8
16
  }>;
9
- export declare function ImageUploadView({ defaultValue, variant, sx, borderProgress, borderSide, }: ImageUploadViewProps): import("react/jsx-runtime").JSX.Element;
17
+ export declare function ImageUploadView({ defaultValue, variant, sx, borderProgress, borderSide, width, height, }: ImageUploadViewProps): import("react/jsx-runtime").JSX.Element;
10
18
  //# sourceMappingURL=ImageUploadView.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"ImageUploadView.d.ts","sourceRoot":"","sources":["../../../src/FormFields/ImageUpload/ImageUploadView.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAsB,KAAK,OAAO,EAAY,MAAM,eAAe,CAAC;AAI3E,MAAM,MAAM,oBAAoB,GAAG,QAAQ,CAAC;IAC1C,YAAY,CAAC,EAAE,MAAM,CAAC;IACtB,OAAO,EAAE,MAAM,CAAC;IAChB,EAAE,CAAC,EAAE,OAAO,CAAC;IACb,cAAc,CAAC,EAAE,MAAM,CAAC;IACxB,UAAU,CAAC,EAAE,MAAM,GAAG,OAAO,CAAC;CAC/B,CAAC,CAAC;AACH,wBAAgB,eAAe,CAAC,EAC9B,YAAY,EACZ,OAAO,EACP,EAAE,EACF,cAAc,EACd,UAAoB,GACrB,EAAE,oBAAoB,2CAsGtB"}
1
+ {"version":3,"file":"ImageUploadView.d.ts","sourceRoot":"","sources":["../../../src/FormFields/ImageUpload/ImageUploadView.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAsB,KAAK,OAAO,EAAY,MAAM,eAAe,CAAC;AAI3E,MAAM,MAAM,oBAAoB,GAAG,QAAQ,CAAC;IAC1C,YAAY,CAAC,EAAE,MAAM,CAAC;IACtB,OAAO,EAAE,MAAM,CAAC;IAChB,EAAE,CAAC,EAAE,OAAO,CAAC;IACb,cAAc,CAAC,EAAE,MAAM,CAAC;IACxB,UAAU,CAAC,EAAE,MAAM,GAAG,OAAO,CAAC;IAC9B,KAAK,CAAC,EAAE,MAAM,GAAG,MAAM,GAAG;QAAE,EAAE,CAAC,EAAE,MAAM,GAAG,MAAM,CAAC;QAAC,EAAE,CAAC,EAAE,MAAM,GAAG,MAAM,CAAA;KAAE,CAAC;IACzE,MAAM,CAAC,EAAE,MAAM,GAAG,MAAM,GAAG;QAAE,EAAE,CAAC,EAAE,MAAM,GAAG,MAAM,CAAC;QAAC,EAAE,CAAC,EAAE,MAAM,GAAG,MAAM,CAAA;KAAE,CAAC;CAC3E,CAAC,CAAC;AACH,wBAAgB,eAAe,CAAC,EAC9B,YAAY,EACZ,OAAO,EACP,EAAE,EACF,cAAc,EACd,UAAoB,EACpB,KAAK,EACL,MAAM,GACP,EAAE,oBAAoB,2CA0GtB"}
@@ -5,11 +5,13 @@ const jsx_runtime_1 = require("react/jsx-runtime");
5
5
  const material_1 = require("@mui/material");
6
6
  const react_1 = require("react");
7
7
  const PadBox_1 = require("../../PadBox");
8
- function ImageUploadView({ defaultValue, variant, sx, borderProgress, borderSide = "right", }) {
8
+ function ImageUploadView({ defaultValue, variant, sx, borderProgress, borderSide = "right", width, height, }) {
9
9
  const theme = (0, material_1.useTheme)();
10
10
  const { butterflyBlue } = theme.palette.app.color;
11
11
  const [hasError, setHasError] = (0, react_1.useState)(false);
12
- const imageSize = { xs: "100px", md: "120px" };
12
+ const defaultImageSize = { xs: "100px", md: "120px" };
13
+ const imageWidth = width ?? defaultImageSize;
14
+ const imageHeight = height ?? defaultImageSize;
13
15
  const isCircle = variant === "circle";
14
16
  const borderRadius = isCircle ? "50%" : "10px";
15
17
  const getBorderClipPath = () => {
@@ -35,9 +37,9 @@ function ImageUploadView({ defaultValue, variant, sx, borderProgress, borderSide
35
37
  const borderClipPath = getBorderClipPath();
36
38
  return ((0, jsx_runtime_1.jsx)(material_1.Box, { sx: {
37
39
  width: "100%",
38
- minWidth: imageSize,
39
- maxWidth: imageSize,
40
- height: imageSize,
40
+ minWidth: imageWidth,
41
+ maxWidth: imageWidth,
42
+ height: imageHeight,
41
43
  overflow: "hidden",
42
44
  position: "relative",
43
45
  borderRadius,