@codezee/sixtify-brahma 0.2.179 → 0.2.180
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 +1 -1
- package/packages/shared-components/dist/FormFields/ImageUpload/ImageUploadView.d.ts +3 -1
- package/packages/shared-components/dist/FormFields/ImageUpload/ImageUploadView.d.ts.map +1 -1
- package/packages/shared-components/dist/FormFields/ImageUpload/ImageUploadView.js +44 -12
- package/packages/shared-components/dist/Svgs/HomePage/CalendarSvg.d.ts +3 -0
- package/packages/shared-components/dist/Svgs/HomePage/CalendarSvg.d.ts.map +1 -0
- package/packages/shared-components/dist/Svgs/HomePage/CalendarSvg.js +8 -0
- package/packages/shared-components/dist/Svgs/HomePage/HolidayCalendarSvg.d.ts +5 -1
- package/packages/shared-components/dist/Svgs/HomePage/HolidayCalendarSvg.d.ts.map +1 -1
- package/packages/shared-components/dist/Svgs/HomePage/HolidayCalendarSvg.js +2 -2
- package/packages/shared-components/dist/Svgs/HomePage/index.d.ts +1 -0
- package/packages/shared-components/dist/Svgs/HomePage/index.d.ts.map +1 -1
- package/packages/shared-components/dist/Svgs/HomePage/index.js +1 -0
package/package.json
CHANGED
|
@@ -3,6 +3,8 @@ export type ImageUploadViewProps = Readonly<{
|
|
|
3
3
|
defaultValue?: string;
|
|
4
4
|
variant: string;
|
|
5
5
|
sx?: SxProps;
|
|
6
|
+
borderProgress?: number;
|
|
7
|
+
borderSide?: "left" | "right";
|
|
6
8
|
}>;
|
|
7
|
-
export declare function ImageUploadView({ defaultValue, variant, sx, }: ImageUploadViewProps): import("react/jsx-runtime").JSX.Element;
|
|
9
|
+
export declare function ImageUploadView({ defaultValue, variant, sx, borderProgress, borderSide, }: ImageUploadViewProps): import("react/jsx-runtime").JSX.Element;
|
|
8
10
|
//# 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;
|
|
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"}
|
|
@@ -5,30 +5,62 @@ 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, }) {
|
|
8
|
+
function ImageUploadView({ defaultValue, variant, sx, borderProgress, borderSide = "right", }) {
|
|
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
12
|
const imageSize = { xs: "100px", md: "120px" };
|
|
13
|
+
const isCircle = variant === "circle";
|
|
14
|
+
const borderRadius = isCircle ? "50%" : "10px";
|
|
15
|
+
const getBorderClipPath = () => {
|
|
16
|
+
if (borderProgress === undefined) {
|
|
17
|
+
return undefined;
|
|
18
|
+
}
|
|
19
|
+
const progress = Math.max(0, Math.min(180, borderProgress));
|
|
20
|
+
const percentage = (progress / 180) * 100;
|
|
21
|
+
if (isCircle) {
|
|
22
|
+
if (borderSide === "right") {
|
|
23
|
+
return `inset(0 ${100 - percentage}% 0 50%)`;
|
|
24
|
+
}
|
|
25
|
+
return `inset(0 50% 0 ${100 - percentage}%)`;
|
|
26
|
+
}
|
|
27
|
+
const startX = 50;
|
|
28
|
+
const endX = 50 + percentage / 2;
|
|
29
|
+
if (borderSide === "right") {
|
|
30
|
+
return `polygon(${startX}% 0%, ${endX}% 0%, ${endX}% 100%, ${startX}% 100%)`;
|
|
31
|
+
}
|
|
32
|
+
const leftEndX = 50 - percentage / 2;
|
|
33
|
+
return `polygon(${leftEndX}% 0%, ${startX}% 0%, ${startX}% 100%, ${leftEndX}% 100%)`;
|
|
34
|
+
};
|
|
35
|
+
const borderClipPath = getBorderClipPath();
|
|
13
36
|
return ((0, jsx_runtime_1.jsx)(material_1.Box, { sx: {
|
|
14
37
|
width: "100%",
|
|
15
38
|
minWidth: imageSize,
|
|
16
39
|
maxWidth: imageSize,
|
|
17
40
|
height: imageSize,
|
|
18
41
|
overflow: "hidden",
|
|
19
|
-
|
|
20
|
-
borderRadius
|
|
21
|
-
|
|
22
|
-
borderRadius: "10px",
|
|
23
|
-
},
|
|
24
|
-
...(variant === "circle"
|
|
42
|
+
position: "relative",
|
|
43
|
+
borderRadius,
|
|
44
|
+
...(borderProgress === undefined
|
|
25
45
|
? {
|
|
26
|
-
|
|
27
|
-
"& img": {
|
|
28
|
-
borderRadius: "50%",
|
|
29
|
-
},
|
|
46
|
+
border: `2px solid ${butterflyBlue[900]}`,
|
|
30
47
|
}
|
|
31
|
-
: {
|
|
48
|
+
: {
|
|
49
|
+
border: "none",
|
|
50
|
+
"&::before": {
|
|
51
|
+
// eslint-disable-next-line quotes
|
|
52
|
+
content: '""',
|
|
53
|
+
position: "absolute",
|
|
54
|
+
inset: 0,
|
|
55
|
+
borderRadius,
|
|
56
|
+
border: `2px solid ${butterflyBlue[900]}`,
|
|
57
|
+
clipPath: borderClipPath,
|
|
58
|
+
pointerEvents: "none",
|
|
59
|
+
},
|
|
60
|
+
}),
|
|
61
|
+
"& img": {
|
|
62
|
+
borderRadius,
|
|
63
|
+
},
|
|
32
64
|
...sx,
|
|
33
65
|
}, children: defaultValue && !hasError ? ((0, jsx_runtime_1.jsx)(PadBox_1.PadBox, { padding: { padding: "2px" }, children: (0, jsx_runtime_1.jsx)("img", { alt: "", src: defaultValue, onError: () => setHasError(true), style: {
|
|
34
66
|
width: "100%",
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"CalendarSvg.d.ts","sourceRoot":"","sources":["../../../src/Svgs/HomePage/CalendarSvg.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,QAAQ,EAAE,MAAM,OAAO,CAAC;AAEtC,eAAO,MAAM,WAAW,GAAI,OAAO,QAAQ,CAAC,aAAa,CAAC,4CAgBzD,CAAC"}
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.CalendarSvg = void 0;
|
|
4
|
+
const jsx_runtime_1 = require("react/jsx-runtime");
|
|
5
|
+
const CalendarSvg = (props) => {
|
|
6
|
+
return ((0, jsx_runtime_1.jsx)("svg", { width: "20", height: "20", viewBox: "0 0 20 20", fill: "none", xmlns: "http://www.w3.org/2000/svg", ...props, children: (0, jsx_runtime_1.jsx)("path", { d: "M14.6667 4.66667H13.9333C13.7786 3.91428 13.3692 3.23823 12.7742 2.75248C12.1791 2.26673 11.4348 2.00097 10.6667 2L9.33333 2C8.5652 2.00097 7.82088 2.26673 7.22583 2.75248C6.63079 3.23823 6.2214 3.91428 6.06667 4.66667H5.33333C4.4496 4.66773 3.60237 5.01925 2.97748 5.64415C2.35259 6.26904 2.00106 7.11627 2 8L2 14.6667C2.00106 15.5504 2.35259 16.3976 2.97748 17.0225C3.60237 17.6474 4.4496 17.9989 5.33333 18H14.6667C15.5504 17.9989 16.3976 17.6474 17.0225 17.0225C17.6474 16.3976 17.9989 15.5504 18 14.6667V8C17.9989 7.11627 17.6474 6.26904 17.0225 5.64415C16.3976 5.01925 15.5504 4.66773 14.6667 4.66667ZM9.33333 3.33333H10.6667C11.0788 3.33504 11.4804 3.46406 11.8165 3.70273C12.1525 3.94139 12.4066 4.27806 12.544 4.66667H7.456C7.59339 4.27806 7.84749 3.94139 8.18353 3.70273C8.51958 3.46406 8.92116 3.33504 9.33333 3.33333ZM5.33333 6H14.6667C15.1971 6 15.7058 6.21071 16.0809 6.58579C16.456 6.96086 16.6667 7.46957 16.6667 8V10H3.33333V8C3.33333 7.46957 3.54405 6.96086 3.91912 6.58579C4.29419 6.21071 4.8029 6 5.33333 6ZM14.6667 16.6667H5.33333C4.8029 16.6667 4.29419 16.456 3.91912 16.0809C3.54405 15.7058 3.33333 15.1971 3.33333 14.6667V11.3333H9.33333V12C9.33333 12.1768 9.40357 12.3464 9.5286 12.4714C9.65362 12.5964 9.82319 12.6667 10 12.6667C10.1768 12.6667 10.3464 12.5964 10.4714 12.4714C10.5964 12.3464 10.6667 12.1768 10.6667 12V11.3333H16.6667V14.6667C16.6667 15.1971 16.456 15.7058 16.0809 16.0809C15.7058 16.456 15.1971 16.6667 14.6667 16.6667Z", fill: "black" }) }));
|
|
7
|
+
};
|
|
8
|
+
exports.CalendarSvg = CalendarSvg;
|
|
@@ -1,3 +1,7 @@
|
|
|
1
1
|
import type { SVGProps } from "react";
|
|
2
|
-
|
|
2
|
+
type HolidayCalendarSvgProps = SVGProps<SVGSVGElement> & {
|
|
3
|
+
color?: string;
|
|
4
|
+
};
|
|
5
|
+
export declare const HolidayCalendarSvg: ({ color, ...props }: HolidayCalendarSvgProps) => import("react/jsx-runtime").JSX.Element;
|
|
6
|
+
export {};
|
|
3
7
|
//# sourceMappingURL=HolidayCalendarSvg.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"HolidayCalendarSvg.d.ts","sourceRoot":"","sources":["../../../src/Svgs/HomePage/HolidayCalendarSvg.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,QAAQ,EAAE,MAAM,OAAO,CAAC;AAEtC,
|
|
1
|
+
{"version":3,"file":"HolidayCalendarSvg.d.ts","sourceRoot":"","sources":["../../../src/Svgs/HomePage/HolidayCalendarSvg.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,QAAQ,EAAE,MAAM,OAAO,CAAC;AAEtC,KAAK,uBAAuB,GAAG,QAAQ,CAAC,aAAa,CAAC,GAAG;IACvD,KAAK,CAAC,EAAE,MAAM,CAAC;CAChB,CAAC;AAEF,eAAO,MAAM,kBAAkB,GAAI,qBAGhC,uBAAuB,4CAmHzB,CAAC"}
|
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
3
|
exports.HolidayCalendarSvg = void 0;
|
|
4
4
|
const jsx_runtime_1 = require("react/jsx-runtime");
|
|
5
|
-
const HolidayCalendarSvg = (props) => {
|
|
6
|
-
return ((0, jsx_runtime_1.jsxs)("svg", { width: "
|
|
5
|
+
const HolidayCalendarSvg = ({ color, ...props }) => {
|
|
6
|
+
return ((0, jsx_runtime_1.jsxs)("svg", { width: "58", height: "58", viewBox: "0 0 58 58", fill: "none", xmlns: "http://www.w3.org/2000/svg", ...props, children: [(0, jsx_runtime_1.jsx)("mask", { id: "mask0_11_286", style: { maskType: "luminance" }, maskUnits: "userSpaceOnUse", x: "0", y: "0", width: "58", height: "58", children: (0, jsx_runtime_1.jsx)("path", { d: "M58 0H0V58H58V0Z", fill: "white" }) }), (0, jsx_runtime_1.jsxs)("g", { mask: "url(#mask0_11_286)", children: [(0, jsx_runtime_1.jsx)("g", { opacity: "0.08", children: (0, jsx_runtime_1.jsx)("path", { d: "M14.6181 58.0021C6.17867 58.0021 0.507812 52.3314 0.507812 43.8918V17.165C0.507812 8.72555 6.17856 3.05469 14.6181 3.05469H43.38C51.8195 3.05469 57.4903 8.72543 57.4903 17.165V43.8918C57.4903 52.3312 51.8196 58.0021 43.38 58.0021H14.6181Z", fill: "black" }) }), (0, jsx_runtime_1.jsx)("path", { d: "M14.6181 56.9787C6.17867 56.9787 0.507812 51.3079 0.507812 42.8683V16.1416C0.507812 7.70211 6.17856 2.03125 14.6181 2.03125H43.38C51.8195 2.03125 57.4903 7.702 57.4903 16.1416V42.8683C57.4903 51.3078 51.8196 56.9787 43.38 56.9787H14.6181Z", fill: "url(#paint0_linear_11_286)" }), (0, jsx_runtime_1.jsx)("path", { d: "M0.507812 16.2769V16.1416C0.507812 7.70211 6.17856 2.03125 14.6181 2.03125H43.38C51.8195 2.03125 57.4903 7.702 57.4903 16.1416V16.2769H0.507812Z", fill: color ?? "#007BFF" }), (0, jsx_runtime_1.jsx)("g", { opacity: "0.16", children: (0, jsx_runtime_1.jsx)("path", { d: "M43.38 2.03125H14.6181C6.17867 2.03125 0.507812 7.702 0.507812 16.1416V42.8683C0.507812 51.3078 6.17856 56.9787 14.6181 56.9787H43.38C51.8195 56.9787 57.4903 51.3079 57.4903 42.8683V16.1416C57.4903 7.702 51.8196 2.03125 43.38 2.03125ZM55.4552 42.8683C55.4552 50.2039 50.7155 54.9436 43.38 54.9436H14.6181C7.2826 54.9436 2.54291 50.2039 2.54291 42.8683V16.1416C2.54291 8.80604 7.2826 4.06635 14.6181 4.06635H43.38C50.7155 4.06635 55.4552 8.80604 55.4552 16.1416V42.8683Z", fill: "url(#paint1_linear_11_286)" }) }), (0, jsx_runtime_1.jsx)("path", { opacity: "0.24", d: "M13.7401 12.2067C15.426 12.2067 16.7927 10.8401 16.7927 9.15415C16.7927 7.46825 15.426 6.10156 13.7401 6.10156C12.0542 6.10156 10.6875 7.46825 10.6875 9.15415C10.6875 10.8401 12.0542 12.2067 13.7401 12.2067Z", fill: "black" }), (0, jsx_runtime_1.jsx)("path", { opacity: "0.24", d: "M44.2635 12.2067C45.9494 12.2067 47.3161 10.8401 47.3161 9.15415C47.3161 7.46825 45.9494 6.10156 44.2635 6.10156C42.5776 6.10156 41.2109 7.46825 41.2109 9.15415C41.2109 10.8401 42.5776 12.2067 44.2635 12.2067Z", fill: "black" }), (0, jsx_runtime_1.jsx)("g", { opacity: "0.16", children: (0, jsx_runtime_1.jsx)("path", { d: "M43.38 2.03125H14.6181C6.17867 2.03125 0.507812 7.702 0.507812 16.1416V42.8683C0.507812 51.3078 6.17856 56.9787 14.6181 56.9787H43.38C51.8195 56.9787 57.4903 51.3079 57.4903 42.8683V16.1416C57.4903 7.702 51.8196 2.03125 43.38 2.03125ZM56.4727 42.8683C56.4727 50.6994 51.211 55.9611 43.38 55.9611H14.6181C6.78711 55.9611 1.52542 50.6994 1.52542 42.8683V16.1416C1.52542 8.31054 6.78711 3.04886 14.6181 3.04886H43.38C51.211 3.04886 56.4727 8.31054 56.4727 16.1416V42.8683Z", fill: "black" }) }), (0, jsx_runtime_1.jsx)("path", { d: "M13.7362 10.1755C13.1746 10.1755 12.7188 9.71964 12.7188 9.158V1.01749C12.7188 0.455844 13.1746 0 13.7362 0C14.2979 0 14.7537 0.455844 14.7537 1.01749V9.15788C14.7538 9.71953 14.2979 10.1755 13.7362 10.1755Z", fill: "url(#paint2_linear_11_286)" }), (0, jsx_runtime_1.jsx)("path", { d: "M44.2597 10.1755C43.698 10.1755 43.2422 9.71964 43.2422 9.158V1.01749C43.2422 0.455844 43.698 0 44.2597 0C44.8213 0 45.2772 0.455844 45.2772 1.01749V9.15788C45.2772 9.71953 44.8213 10.1755 44.2597 10.1755Z", fill: "url(#paint3_linear_11_286)" })] }), (0, jsx_runtime_1.jsxs)("defs", { children: [(0, jsx_runtime_1.jsxs)("linearGradient", { id: "paint0_linear_11_286", x1: "28.999", y1: "56.9757", x2: "28.999", y2: "2.02808", gradientUnits: "userSpaceOnUse", children: [(0, jsx_runtime_1.jsx)("stop", { stopColor: "#ECECEC" }), (0, jsx_runtime_1.jsx)("stop", { offset: "1", stopColor: "white" })] }), (0, jsx_runtime_1.jsxs)("linearGradient", { id: "paint1_linear_11_286", x1: "28.999", y1: "56.9757", x2: "28.999", y2: "2.02808", gradientUnits: "userSpaceOnUse", children: [(0, jsx_runtime_1.jsx)("stop", {}), (0, jsx_runtime_1.jsx)("stop", { offset: "0.06", stopOpacity: "0" })] }), (0, jsx_runtime_1.jsxs)("linearGradient", { id: "paint2_linear_11_286", x1: "13.7361", y1: "10.1723", x2: "13.7361", y2: "-0.00317263", gradientUnits: "userSpaceOnUse", children: [(0, jsx_runtime_1.jsx)("stop", { stopColor: "white" }), (0, jsx_runtime_1.jsx)("stop", { offset: "1", stopColor: "#DCDCDC" })] }), (0, jsx_runtime_1.jsxs)("linearGradient", { id: "paint3_linear_11_286", x1: "44.2597", y1: "10.1723", x2: "44.2597", y2: "-0.00317263", gradientUnits: "userSpaceOnUse", children: [(0, jsx_runtime_1.jsx)("stop", { stopColor: "white" }), (0, jsx_runtime_1.jsx)("stop", { offset: "1", stopColor: "#DCDCDC" })] })] })] }));
|
|
7
7
|
};
|
|
8
8
|
exports.HolidayCalendarSvg = HolidayCalendarSvg;
|
|
@@ -5,6 +5,7 @@ export * from "./BulkOperationsDarkSvg";
|
|
|
5
5
|
export * from "./HolidayCalendarSvg";
|
|
6
6
|
export * from "./ChartIconSvg";
|
|
7
7
|
export * from "./ClockSvg";
|
|
8
|
+
export * from "./CalendarSvg";
|
|
8
9
|
export * from "./DashboardIconSvg";
|
|
9
10
|
export * from "./EmployeeManagementDarkSvg";
|
|
10
11
|
export * from "./EmployeeReportsDarkSvg";
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/Svgs/HomePage/index.ts"],"names":[],"mappings":"AAAA,cAAc,+BAA+B,CAAC;AAC9C,cAAc,2BAA2B,CAAC;AAC1C,cAAc,gBAAgB,CAAC;AAC/B,cAAc,yBAAyB,CAAC;AACxC,cAAc,sBAAsB,CAAC;AACrC,cAAc,gBAAgB,CAAC;AAC/B,cAAc,YAAY,CAAC;AAC3B,cAAc,oBAAoB,CAAC;AACnC,cAAc,6BAA6B,CAAC;AAC5C,cAAc,0BAA0B,CAAC;AACzC,cAAc,kBAAkB,CAAC;AACjC,cAAc,kCAAkC,CAAC;AACjD,cAAc,4BAA4B,CAAC;AAC3C,cAAc,wBAAwB,CAAC"}
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/Svgs/HomePage/index.ts"],"names":[],"mappings":"AAAA,cAAc,+BAA+B,CAAC;AAC9C,cAAc,2BAA2B,CAAC;AAC1C,cAAc,gBAAgB,CAAC;AAC/B,cAAc,yBAAyB,CAAC;AACxC,cAAc,sBAAsB,CAAC;AACrC,cAAc,gBAAgB,CAAC;AAC/B,cAAc,YAAY,CAAC;AAC3B,cAAc,eAAe,CAAC;AAC9B,cAAc,oBAAoB,CAAC;AACnC,cAAc,6BAA6B,CAAC;AAC5C,cAAc,0BAA0B,CAAC;AACzC,cAAc,kBAAkB,CAAC;AACjC,cAAc,kCAAkC,CAAC;AACjD,cAAc,4BAA4B,CAAC;AAC3C,cAAc,wBAAwB,CAAC"}
|
|
@@ -21,6 +21,7 @@ __exportStar(require("./BulkOperationsDarkSvg"), exports);
|
|
|
21
21
|
__exportStar(require("./HolidayCalendarSvg"), exports);
|
|
22
22
|
__exportStar(require("./ChartIconSvg"), exports);
|
|
23
23
|
__exportStar(require("./ClockSvg"), exports);
|
|
24
|
+
__exportStar(require("./CalendarSvg"), exports);
|
|
24
25
|
__exportStar(require("./DashboardIconSvg"), exports);
|
|
25
26
|
__exportStar(require("./EmployeeManagementDarkSvg"), exports);
|
|
26
27
|
__exportStar(require("./EmployeeReportsDarkSvg"), exports);
|