First Commit

This commit is contained in:
cesnimda
2026-03-21 11:55:27 +01:00
commit 2e8a29b4d0
1757 changed files with 166084 additions and 0 deletions
@@ -0,0 +1,6 @@
/*************************** COMMON - FOCUS STYLE ***************************/
export const generateFocusVisibleStyles = (color) => ({
outline: `2px solid ${color}`,
outlineOffset: 2
});
@@ -0,0 +1,7 @@
'use client';
/*************************** COMMON - IMAGE PATH ***************************/
export default function GetImagePath(image) {
return image;
}
+55
View File
@@ -0,0 +1,55 @@
'use client';
// @mui
import { useTheme } from '@mui/material/styles';
export default function Loader() {
const theme = useTheme();
return `<!doctype html>
<html lang="en">
<head>
<meta charset="UTF-8" />
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
<title>Linear Progress Loader</title>
<style>
body {
margin: 0;
}
.progress-bar-container {
width: 100%;
background-color: ${theme.vars.palette.primary.lighter}; /* This is the background for the progress bar */
border-radius: 4px;
overflow: hidden;
}
.progress-bar {
height: 4px; /* Thickness of the progress bar */
width: 0; /* Set this to 0 initially */
background-color: ${theme.vars.palette.primary.main};
animation: load 1.5s linear infinite;
}
@keyframes load {
0% {
width: 30%;
}
50% {
margin-left: 40%;
width: 50%;
}
100% {
width: 30%;
margin-left: 100%;
}
}
</style>
</head>
<body>
<div class="progress-bar-container">
<div class="progress-bar"></div>
</div>
</body>
</html>
`;
}
@@ -0,0 +1,66 @@
// material-ui
import { alpha } from '@mui/material/styles';
/**
* Converts a hex color string to an RGB channel string ("r g b").
*
* @param hex - The hex color string (e.g. "#C8FAD6", "#FFF", "#FF00FFAA").
* @returns The RGB channel string (e.g. "200 250 214").
* @throws {Error} If the input is not a valid hex color.
*/
export function hexToRgbChannel(hex) {
let cleaned = hex.replace(/^#/, '');
if (cleaned.length === 3) {
cleaned = cleaned
.split('')
.map((c) => c + c)
.join('');
}
if (cleaned.length === 4) {
cleaned = cleaned
.split('')
.map((c) => c + c)
.join('');
}
if (cleaned.length !== 6 && cleaned.length !== 8) {
throw new Error(`Invalid hex color: ${hex}`);
}
const r = parseInt(cleaned.substring(0, 2), 16);
const g = parseInt(cleaned.substring(2, 4), 16);
const b = parseInt(cleaned.substring(4, 6), 16);
return `${r} ${g} ${b}`;
}
export function extendPaletteWithChannels(palette) {
const result = { ...palette };
Object.entries(palette).forEach(([k, v]) => {
if (typeof v === 'string' && v.startsWith('#')) {
result[`${k}Channel`] = hexToRgbChannel(v);
} else if (typeof v === 'object' && v !== null) {
result[k] = extendPaletteWithChannels(v);
}
});
return result;
}
export function withAlpha(color, opacity) {
// Case 1: normal color (hex, rgb, hsl…)
if (/^#|rgb|hsl|color/i.test(color)) {
return alpha(color, opacity);
}
// Case 2: CSS Var: var(--mui-palette-xxx) or var(--palette-xxx, #hex)
if (color.startsWith('var(')) {
// inject "Channel" *before the closing parenthesis of the var name only*
return color.replace(/(--[a-zA-Z0-9-]+)(.*)\)/, `$1Channel$2)`).replace(/^var\((.+)\)$/, `rgba(var($1) / ${opacity})`);
}
// Fallback
return color;
}
@@ -0,0 +1,368 @@
import { BUY_NOW_URL } from '@/path';
export const SECTION_COMMON_PY = { xs: 4, sm: 5, md: 6 };
export const FIGMA_LINK = {
about: {
link: BUY_NOW_URL,
variant: {
about1: BUY_NOW_URL,
about2: BUY_NOW_URL,
about3: BUY_NOW_URL
}
},
auth: {
login: {
link: BUY_NOW_URL,
variant: {
login1: BUY_NOW_URL,
login2: BUY_NOW_URL,
login3: BUY_NOW_URL,
login4: BUY_NOW_URL,
login5: BUY_NOW_URL
}
},
register: {
link: BUY_NOW_URL
},
forgotPassword: {
link: BUY_NOW_URL
},
newPassword: {
link: BUY_NOW_URL
},
otpVerification: {
link: BUY_NOW_URL
}
},
metrics: {
link: BUY_NOW_URL,
variant: {
metrics1: BUY_NOW_URL,
metrics2: BUY_NOW_URL,
metrics3: BUY_NOW_URL,
metrics4: BUY_NOW_URL,
metrics5: BUY_NOW_URL,
metrics6: BUY_NOW_URL,
metrics7: BUY_NOW_URL,
metrics8: BUY_NOW_URL,
metrics9: BUY_NOW_URL,
metrics10: BUY_NOW_URL
}
},
blog: {
link: BUY_NOW_URL,
variant: {
blog1: BUY_NOW_URL,
blog2: BUY_NOW_URL,
blog3: BUY_NOW_URL,
blog4: BUY_NOW_URL,
blog5: BUY_NOW_URL,
blog6: BUY_NOW_URL,
blog7: BUY_NOW_URL,
blog8: BUY_NOW_URL,
blog9: BUY_NOW_URL,
blog10: BUY_NOW_URL
}
},
blogDetails: { link: BUY_NOW_URL },
clientele: {
link: BUY_NOW_URL,
variant: {
clientele1: BUY_NOW_URL,
clientele2: BUY_NOW_URL,
clientele3: BUY_NOW_URL,
clientele4: BUY_NOW_URL,
clientele5: BUY_NOW_URL,
clientele6: BUY_NOW_URL,
clientele7: BUY_NOW_URL,
clientele8: BUY_NOW_URL
}
},
color: {
link: BUY_NOW_URL
},
cta: {
link: BUY_NOW_URL,
variant: {
cta1: BUY_NOW_URL,
cta2: BUY_NOW_URL,
cta3: BUY_NOW_URL,
cta4: BUY_NOW_URL,
cta5: BUY_NOW_URL,
cta6: BUY_NOW_URL,
cta7: BUY_NOW_URL,
cta8: BUY_NOW_URL,
cta9: BUY_NOW_URL,
cta10: BUY_NOW_URL,
cta11: BUY_NOW_URL,
cta12: BUY_NOW_URL,
cta13: BUY_NOW_URL,
cta14: BUY_NOW_URL
}
},
cookie: {
link: BUY_NOW_URL,
variant: {
cookie1: BUY_NOW_URL,
cookie2: BUY_NOW_URL,
cookie3: BUY_NOW_URL
}
},
comingSoon: { link: BUY_NOW_URL },
contactUs: {
link: BUY_NOW_URL,
variant: {
contactUs1: BUY_NOW_URL,
contactUs2: BUY_NOW_URL,
contactUs3: BUY_NOW_URL,
contactUs4: BUY_NOW_URL,
contactUs5: BUY_NOW_URL,
contactUs6: BUY_NOW_URL
}
},
error404: {
link: BUY_NOW_URL
},
error500: {
link: BUY_NOW_URL
},
earlyAccess: { link: BUY_NOW_URL },
faq: {
link: BUY_NOW_URL,
variant: {
faq1: BUY_NOW_URL,
faq2: BUY_NOW_URL,
faq3: BUY_NOW_URL,
faq4: BUY_NOW_URL,
faq5: BUY_NOW_URL,
faq6: BUY_NOW_URL,
faq7: BUY_NOW_URL,
faq8: BUY_NOW_URL
}
},
feature: {
link: BUY_NOW_URL,
variant: {
feature1: BUY_NOW_URL,
feature2: BUY_NOW_URL,
feature3: BUY_NOW_URL,
feature4: BUY_NOW_URL,
feature5: BUY_NOW_URL,
feature6: BUY_NOW_URL,
feature7: BUY_NOW_URL,
feature8: BUY_NOW_URL,
feature9: BUY_NOW_URL,
feature10: BUY_NOW_URL,
feature11: BUY_NOW_URL,
feature12: BUY_NOW_URL,
feature13: BUY_NOW_URL,
feature14: BUY_NOW_URL,
feature15: BUY_NOW_URL,
feature16: BUY_NOW_URL,
feature17: BUY_NOW_URL,
feature18: BUY_NOW_URL,
feature19: BUY_NOW_URL,
feature20: BUY_NOW_URL,
feature21: BUY_NOW_URL,
feature22: BUY_NOW_URL,
feature23: BUY_NOW_URL,
feature24: BUY_NOW_URL,
feature25: BUY_NOW_URL,
feature26: BUY_NOW_URL,
feature27: BUY_NOW_URL
}
},
footer: {
link: BUY_NOW_URL,
variant: {
footer1: BUY_NOW_URL,
footer2: BUY_NOW_URL,
footer3: BUY_NOW_URL,
footer4: BUY_NOW_URL,
footer5: BUY_NOW_URL,
footer6: BUY_NOW_URL,
footer7: BUY_NOW_URL
}
},
gallery: {
link: BUY_NOW_URL,
variant: {
gallery1: BUY_NOW_URL,
gallery2: BUY_NOW_URL,
gallery3: BUY_NOW_URL,
gallery4: BUY_NOW_URL
}
},
hero: {
link: BUY_NOW_URL,
variant: {
hero1: BUY_NOW_URL,
hero2: BUY_NOW_URL,
hero3: BUY_NOW_URL,
hero4: BUY_NOW_URL,
hero5: BUY_NOW_URL,
hero6: BUY_NOW_URL,
hero7: BUY_NOW_URL,
hero8: BUY_NOW_URL,
hero9: BUY_NOW_URL,
hero10: BUY_NOW_URL,
hero11: BUY_NOW_URL,
hero12: BUY_NOW_URL,
hero13: BUY_NOW_URL,
hero14: BUY_NOW_URL,
hero15: BUY_NOW_URL,
hero16: BUY_NOW_URL,
hero17: BUY_NOW_URL,
hero18: BUY_NOW_URL,
hero19: BUY_NOW_URL
}
},
icon: {
link: BUY_NOW_URL
},
integration: {
link: BUY_NOW_URL,
variant: {
integration1: BUY_NOW_URL,
integration2: BUY_NOW_URL,
integration3: BUY_NOW_URL,
integration4: BUY_NOW_URL,
integration5: BUY_NOW_URL,
integration6: BUY_NOW_URL,
integration7: BUY_NOW_URL,
integration8: BUY_NOW_URL,
integration9: BUY_NOW_URL
}
},
megamenu: {
link: BUY_NOW_URL,
variant: {
megamenu1: BUY_NOW_URL,
megamenu2: BUY_NOW_URL,
megamenu3: BUY_NOW_URL,
megamenu4: BUY_NOW_URL,
megamenu5: BUY_NOW_URL
}
},
navbar: {
link: BUY_NOW_URL,
variant: {
navbar1: BUY_NOW_URL,
navbar2: BUY_NOW_URL,
navbar3: BUY_NOW_URL,
navbar4: BUY_NOW_URL,
navbar5: BUY_NOW_URL,
navbar6: BUY_NOW_URL,
navbar7: BUY_NOW_URL,
navbar8: BUY_NOW_URL,
navbar9: BUY_NOW_URL,
navbar10: BUY_NOW_URL
}
},
onboard: { link: BUY_NOW_URL },
other: {
link: BUY_NOW_URL,
variant: {
other1: BUY_NOW_URL,
other2: BUY_NOW_URL,
other3: BUY_NOW_URL
}
},
pricing: {
link: BUY_NOW_URL,
variant: {
pricing1: BUY_NOW_URL,
pricing2: BUY_NOW_URL,
pricing3: BUY_NOW_URL,
pricing4: BUY_NOW_URL,
pricing5: BUY_NOW_URL,
pricing6: BUY_NOW_URL,
pricing7: BUY_NOW_URL,
pricing8: BUY_NOW_URL,
pricing9: BUY_NOW_URL,
pricing10: BUY_NOW_URL
}
},
process: {
link: BUY_NOW_URL,
variant: {
process1: BUY_NOW_URL,
process2: BUY_NOW_URL,
process3: BUY_NOW_URL,
process4: BUY_NOW_URL,
process5: BUY_NOW_URL,
process6: BUY_NOW_URL,
process7: BUY_NOW_URL,
process8: BUY_NOW_URL
}
},
privacyPolicy: {
link: BUY_NOW_URL,
variant: {
privacyPolicy1: BUY_NOW_URL,
privacyPolicy2: BUY_NOW_URL
}
},
smallHero: {
link: BUY_NOW_URL,
variant: {
smallHero1: BUY_NOW_URL,
smallHero2: BUY_NOW_URL,
smallHero3: BUY_NOW_URL,
smallHero4: BUY_NOW_URL,
smallHero5: BUY_NOW_URL,
smallHero6: BUY_NOW_URL,
smallHero7: BUY_NOW_URL,
smallHero8: BUY_NOW_URL
}
},
team: {
link: BUY_NOW_URL,
variant: {
team1: BUY_NOW_URL,
team2: BUY_NOW_URL,
team3: BUY_NOW_URL,
team4: BUY_NOW_URL,
team5: BUY_NOW_URL,
team6: BUY_NOW_URL,
team7: BUY_NOW_URL,
team8: BUY_NOW_URL
}
},
testimonial: {
link: BUY_NOW_URL,
variant: {
testimonial1: BUY_NOW_URL,
testimonial2: BUY_NOW_URL,
testimonial3: BUY_NOW_URL,
testimonial4: BUY_NOW_URL,
testimonial5: BUY_NOW_URL,
testimonial6: BUY_NOW_URL,
testimonial7: BUY_NOW_URL,
testimonial8: BUY_NOW_URL,
testimonial9: BUY_NOW_URL,
testimonial10: BUY_NOW_URL,
testimonial11: BUY_NOW_URL,
testimonial12: BUY_NOW_URL,
testimonial13: BUY_NOW_URL
}
},
termsCondition: { link: BUY_NOW_URL },
topOffer: {
link: BUY_NOW_URL,
variant: {
topOffer1: BUY_NOW_URL,
topOffer2: BUY_NOW_URL,
topOffer3: BUY_NOW_URL,
topOffer4: BUY_NOW_URL,
topOffer5: BUY_NOW_URL
}
},
typography: {
link: BUY_NOW_URL
},
underMaintenance: {
link: BUY_NOW_URL
}
};
@@ -0,0 +1,7 @@
export function getBackgroundDots(fill = 'gray', dotSize = 2, spacing = 30) {
return {
backgroundImage: `radial-gradient(circle ${dotSize}px, ${fill} ${dotSize}px, transparent 0)`,
backgroundSize: `${spacing}px ${spacing}px`,
backgroundRepeat: 'repeat'
};
}
@@ -0,0 +1,29 @@
export const emailSchema = {
required: 'Email is required',
pattern: { value: /^[A-Z0-9._%+-]+@[A-Z0-9.-]+\.[A-Z]{2,}$/i, message: 'Invalid email address' }
};
export const passwordSchema = {
required: 'Password is required',
minLength: { value: 8, message: 'Password must be at least 8 characters' }
};
export const firstNameSchema = {
required: 'First name is required',
pattern: { value: /^[a-zA-Z\s]+$/, message: 'Invalid first name' }
};
export const lastNameSchema = {
required: 'Last name is required',
pattern: { value: /^[a-zA-Z\s]+$/, message: 'Invalid last name' }
};
export const phoneSchema = {
required: 'Phone number is required',
pattern: { value: /^[0-9()-.\s]{7,15}$/, message: 'Invalid phone number' }
};
export const otpSchema = {
required: 'OTP is required',
minLength: { value: 6, message: 'OTP must be exactly 6 characters' }
};