Skip to content
Closed
Show file tree
Hide file tree
Changes from 12 commits
Commits
Show all changes
52 commits
Select commit Hold shift + click to select a range
d22ee06
feat: button new variant
erfanmoghadasi Jan 4, 2025
e2fedcc
fix: delete test page
erfanmoghadasi Jan 4, 2025
c3ed4fa
Creating all buttons and all their variants, and designing the UI for…
ErfanKashef Jan 14, 2025
c1e5b6a
fix: get status color with default variant
erfanmoghadasi Jan 16, 2025
59d77c4
Fixing button imports and updating import paths.
ErfanKashef Jan 17, 2025
8033cb3
Fixing button imports and updating import paths.
ErfanKashef Jan 17, 2025
cecdf67
Merge branch 'feat/#151-button' of https://github.com/pixel-genius/pi…
ErfanKashef Jan 17, 2025
ae69835
Merge branch 'main' of https://github.com/pixel-genius/pixel-client i…
ErfanKashef Jan 17, 2025
2d9fb44
Fixing the login buttons and other related buttons.
ErfanKashef Jan 17, 2025
7b8dc97
Changing the file paths for achievements.
ErfanKashef Jan 17, 2025
a956a56
enhance otp page
ErfanKashef Jan 17, 2025
e831166
feat: add loading animation icon to button
erfanmoghadasi Jan 17, 2025
f03fc37
feat: prevent resizing in loading state
erfanmoghadasi Jan 17, 2025
6522d30
fix: delete test page
erfanmoghadasi Jan 17, 2025
f1dcebe
Update "PixelGenius Platform" from zeroheight (#189)
alikashef Jan 17, 2025
d49a2cb
Feat/#122 attachment component (#134)
PooriaKazemirad Jan 17, 2025
d06d933
Feat/#143 megamenu (#190)
ErfanKashef Jan 17, 2025
3bb3ee7
feat: add workflow for issues
mrbadri Jan 21, 2025
bbcd006
Feta/ #141 add to card (#167)
ErfanKashef Jan 22, 2025
7344308
Feat: handle input base on design (#197)
mrbadri Jan 24, 2025
0fd6f10
feat: handle Automating the Design System with Zero Height (#199)
mrbadri Jan 25, 2025
b0c18d0
feat: delete token
mrbadri Jan 25, 2025
c9d467a
Update "PixelGenius Platform" from zeroheight (#204)
alikashef Jan 25, 2025
825848e
Update "PixelGenius Platform" from zeroheight (#206)
alikashef Jan 25, 2025
bae6688
Update "PixelGenius Platform" from zeroheight (#208)
alikashef Jan 27, 2025
a1f5f6c
feat: add rebase script
Jan 27, 2025
16ff554
feat: button new variant
erfanmoghadasi Jan 4, 2025
30aa572
fix: delete test page
erfanmoghadasi Jan 4, 2025
97b6d2c
Changing the file paths for achievements.
ErfanKashef Jan 17, 2025
74783f6
enhance otp page
ErfanKashef Jan 17, 2025
9cad109
feat: add loading animation icon to button
erfanmoghadasi Jan 17, 2025
38010e5
feat: prevent resizing in loading state
erfanmoghadasi Jan 17, 2025
30f6191
fix: delete test page
erfanmoghadasi Jan 17, 2025
df82848
Merge branch 'feat/#151-button' of https://github.com/pixel-genius/pi…
Jan 27, 2025
2f41ccd
fix: issue on script palette
mrbadri Jan 28, 2025
f607791
feat: button new variant
erfanmoghadasi Jan 4, 2025
57ec970
fix: delete test page
erfanmoghadasi Jan 4, 2025
f9bdb31
Changing the file paths for achievements.
ErfanKashef Jan 17, 2025
1b760d6
enhance otp page
ErfanKashef Jan 17, 2025
6642a44
feat: add loading animation icon to button
erfanmoghadasi Jan 17, 2025
b98633d
feat: prevent resizing in loading state
erfanmoghadasi Jan 17, 2025
ca54379
fix: delete test page
erfanmoghadasi Jan 17, 2025
4ba1beb
feat: button new variant
erfanmoghadasi Jan 4, 2025
1565a62
fix: delete test page
erfanmoghadasi Jan 4, 2025
1d2092a
Fixing button imports and updating import paths.
ErfanKashef Jan 17, 2025
2f22f6c
Changing the file paths for achievements.
ErfanKashef Jan 17, 2025
73bc6c7
enhance otp page
ErfanKashef Jan 17, 2025
36f413b
feat: add loading animation icon to button
erfanmoghadasi Jan 17, 2025
e1f82ca
feat: prevent resizing in loading state
erfanmoghadasi Jan 17, 2025
b680e5c
fix: delete test page
erfanmoghadasi Jan 17, 2025
9450b33
Merge branch 'feat/#151-button' of https://github.com/pixel-genius/pi…
mrbadri Jan 28, 2025
e248704
refactor button
ErfanKashef Jan 28, 2025
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -50,3 +50,6 @@ const Searchbar = forwardRef<RefSearchHandle, SearchBarProps>((props, ref) => {
Searchbar.displayName = "SearchBar";

export default Searchbar;



Original file line number Diff line number Diff line change
Expand Up @@ -105,7 +105,7 @@ const AutherForm = () => {
<div>
<Button
type="submit"
variant="outline"
// variant="outline"
className="w-full bg-primary-600"
isLoading={mutation.isPending}
>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@ const CommentSection = () => {
</div>
<div className="">
<Button
variant="default"
// variant="default"
className="bg-primary-600 text-foreground w-40 text text-lg font-medium"
>
login{" "}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -48,13 +48,15 @@ const ProductFooter = () => {
{/* button */}
<div className=" flex gap-2 items-center">
<Button
variant="default"
// variant="default"
className="bg-primary-600 text-foreground py-4 "
>
Buy Now
<Shopingcartplusicon size={24} className=" ml-2" />
</Button>
<Button variant="default" className="py-4 ">
<Button
// variant="default"
className="py-4 ">
Preview
</Button>
</div>
Expand Down
6 changes: 4 additions & 2 deletions apps/core/app/(landing)/product/[id]/page.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -53,13 +53,15 @@ const OverLay = () => {

<div className="flex gap-2">
<Button
variant="default"
// variant="default"
className="bg-primary-600 hover:bg-primary-500 text-foreground h-auto py-4 w-36"
>
Buy Now <Shopingcartplusicon size={24} className="ml-2" />
</Button>

<Button variant="default" className="w-36 h-auto !py-4">
<Button
// variant="default"
className="w-36 h-auto !py-4">
Preview{" "}
</Button>

Expand Down
6 changes: 4 additions & 2 deletions apps/core/app/(landing)/product/test/page.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -53,13 +53,15 @@ const OverLay = () => {

<div className="flex gap-2">
<Button
variant="default"
// variant="default"
className="bg-primary-600 text-foreground h-auto py-4 w-36"
>
Buy Now <Shopingcartplusicon size={24} className="ml-2" />
</Button>

<Button variant="default" className="w-36 h-auto !py-4">
<Button
// variant="default"
className="w-36 h-auto !py-4">
Preview{" "}
</Button>

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -48,8 +48,8 @@ const ForgetPasswordForm = () => {
<Button
isLoading={mutation.isPending}
type="submit"
className="w-full mt-5 text-lg font-normal bg-primary-600 hover:bg-primary-500"
variant="secondary"
className="w-full mt-5 text-sm font-normal bg-primary text-foreground"
variant="primary"
>
Reset
</Button>
Expand Down
6 changes: 3 additions & 3 deletions apps/core/app/auth/login/_components/form/loginForm.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -78,11 +78,11 @@ const LoginForm = () => {
</div>
{/* Button */}
<Button
size="lg"
size="md"
isLoading={loginMutation.isPending}
type="submit"
className="flex w-[100%] text-lg font-bold bg-primary-600 hover:bg-primary-500"
variant="secondary"
className="flex w-[100%] text-base font-normal bg-primary text-foreground "
variant="primary"
>
Login
</Button>
Expand Down
19 changes: 11 additions & 8 deletions apps/core/app/auth/login/page.tsx
Original file line number Diff line number Diff line change
@@ -1,27 +1,30 @@
import Link from "next/link";

// import components
import { Button } from "@repo/ui/components/button";
import AuthCard from "../_components/auth-card";

// import icons
import GoogleIcon from "../../../../../packages/icons/src/components/google";
import LinkedinIcon from "../../../../../packages/icons/src/components/linkedin";
import { LoginForm } from "./_components/form/loginForm";

const LoginPage = () => {
return (
<AuthCard>
<p className="text-2xl font-bold">Log in to your account</p>
<div className="flex flex-col gap-1 items-center pb-5">
<p className="text-2xl font-bold">Log in to your account</p>
<p className="text-sm font-normal">
Log in to explore, manage, and enjoy all the features.
</p>
</div>

<LoginForm />
{/* line */}
<div className="flex items-center w-full gap-3">
{/* <div className="flex items-center w-full gap-3">
<div className="w-full h-[1px] bg-gray-700 rounded-full" />
<p className="text-base font-medium">OR</p>
<div className="w-full h-[1px] bg-gray-700 rounded-full" />
</div>
</div> */}
{/* login with google and linkedin */}
<div className="w-full flex flex-col items-center gap-3">
{/* <div className="w-full flex flex-col items-center gap-3">
<Button
className="w-full text-lg bg-[#181818]"
variant="secondary"
Expand All @@ -38,7 +41,7 @@ const LoginPage = () => {
<LinkedinIcon size={24} className="mr-2" />
Log in with linkedin
</Button>
</div>
</div> */}
{/* forgot password */}
<div className=" flex gap-2 pb-4 text-sm">
<p>Don’t have an account?</p>
Expand Down
25 changes: 14 additions & 11 deletions apps/core/app/auth/otp/page.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -12,22 +12,26 @@ import { REGEXP_ONLY_DIGITS_AND_CHARS } from "input-otp";
import AuthCard from "../_components/auth-card";
import { Countdown } from "@repo/ui/components/countdown";
import Link from "next/link";
import { AttachmentLanding } from "@repo/ui/components/attachment/attachmentLanding/attachmentLanding";
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

⚠️ Potential issue

Remove unused import

The AttachmentLanding component is imported but not used in this file.

-import { AttachmentLanding } from "@repo/ui/components/attachment/attachmentLanding/attachmentLanding";


const Otppage = () => {
return (
<AuthCard>
{/* logo */}
<div className=" pt-7 flex flex-col items-center gap-4">
<div className="flex flex-col items-center gap-4">
<div className="flex flex-col items-center gap-2">
<p className="text-center">
<p className="text-2xl font-bold">Email Verification</p>
<p className="text-center text-sm font-normal">
We've sent the code to{" "}
<span className="underline">example@pixel.design</span>
<span className="underline text-sm font-normal">
example@pixel.design
</span>
</p>
<p>check your email</p>
<p className="text-sm font-normal">check your email</p>
</div>
</div>
{/* otp input */}
<div>
<div className="pb-6">
<InputOTP maxLength={6} pattern={REGEXP_ONLY_DIGITS_AND_CHARS}>
<InputOTPGroup>
<InputOTPSlot index={0} />
Expand All @@ -38,20 +42,19 @@ const Otppage = () => {
<InputOTPSlot index={5} />
</InputOTPGroup>
</InputOTP>

</div>

{/* button */}
<div className="pb-7 w-full">
<div className=" w-full">
<Button
className="w-full text-lg font-bold bg-primary-600 hover:bg-primary-500"
variant="secondary"
className="w-full text-sm font-normal bg-primary text-foreground"
variant="primary"
>
Verify{" "}
</Button>
</div>
<div className="pb-7">
<p>
<div className="pb-4">
<p className="text-xs font-base text-foreground">
didnt recieved code yet? <Countdown date={Date.now() + 120000} />
</p>
</div>
Expand Down
104 changes: 55 additions & 49 deletions apps/core/app/auth/set-password/page.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -65,66 +65,72 @@ const Setpasswordpage = () => {
return (
<AuthCard>
{/* logo */}
<div className="pt-7 flex flex-col items-center gap-4">
<div className="flex flex-col items-center gap-4">
<div className="flex flex-col items-center gap-2">
<p className="text-center text-2xl font-bold">Set your Password</p>
<p className="text-center">
<p className="text-2xl font-bold">Set your Password</p>
<p className="text-center text-sm font-normal">
We've sent the code to{" "}
<span className="underline mr-1">{username}</span>
check your email
<span className="underline text-sm font-normal">
example@pixel.design
</span>
</p>
<p className="text-sm font-normal">check your email</p>
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

⚠️ Potential issue

Remove hardcoded email and implement proper email masking.

The email address is currently hardcoded and displayed in plain text, which has two issues:

  1. The TODO comment indicates that username should be retrieved from search parameters
  2. Displaying full email addresses poses a privacy risk

Apply this diff to implement proper email masking:

-          <p className="text-center text-sm font-normal">
-            We've sent the code to{" "}
-            <span className="underline text-sm font-normal">
-              example@pixel.design
-            </span>
-          </p>
+          <p className="text-center text-sm font-normal">
+            We've sent the code to{" "}
+            <span className="underline text-sm font-normal">
+              {username ? maskEmail(username) : ''}
+            </span>
+          </p>

Add this utility function at the top of the file:

const maskEmail = (email: string) => {
  const [name, domain] = email.split('@');
  return `${name[0]}${'*'.repeat(name.length - 2)}${name.slice(-1)}@${domain}`;
};

</div>
</div>
{/* otp input */}
<form
className="w-full flex flex-col items-center gap-4"
className="w-full flex flex-col items-center "
onSubmit={handleSubmit(handleSubmitForm)}
>
<InputOTP
maxLength={6}
pattern={REGEXP_ONLY_DIGITS_AND_CHARS}
name={otpRegister.name}
onChange={(value: string) => {
setValue("otp", value);
}}
>
<InputOTPGroup>
<InputOTPSlot index={0} />
<InputOTPSlot index={1} />
<InputOTPSlot index={2} />
<InputOTPSlot index={3} />
<InputOTPSlot index={4} />
<InputOTPSlot index={5} />
</InputOTPGroup>
</InputOTP>
<span className="text-xs text-error-400">{errors.otp?.message}</span>
<div className="pb-4">
<InputOTP
maxLength={6}
pattern={REGEXP_ONLY_DIGITS_AND_CHARS}
name={otpRegister.name}
onChange={(value: string) => {
setValue("otp", value);
}}
>
<InputOTPGroup>
<InputOTPSlot index={0} />
<InputOTPSlot index={1} />
<InputOTPSlot index={2} />
<InputOTPSlot index={3} />
<InputOTPSlot index={4} />
<InputOTPSlot index={5} />
</InputOTPGroup>
</InputOTP>
<span className="text-xs text-error-400">{errors.otp?.message}</span>
</div>

{/* input */}
<Input
label="Password"
type="password"
className="font-normal text-xs text-gray-500"
placeholder="********"
{...register("newPassword")}
error={errors.newPassword?.message}
/>
<Input
label="Confirm Password"
type="password"
className="font-normal text-xs text-gray-500"
placeholder="********"
{...register("confirmPassword")}
error={errors.confirmPassword?.message}
/>
{/* button reset */}
<div className="pb-7 w-full">
<Button
isLoading={mutation.isPending}
className="w-full text-lg font-bold bg-primary-600 hover:bg-primary-500"
variant="secondary"
>
Reset
</Button>
<div className="w-full flex flex-col gap-5">
<Input
label="Password"
type="password"
className="font-normal text-xs text-gray-500"
placeholder="********"
{...register("newPassword")}
error={errors.newPassword?.message}
/>
<Input
label="Confirm Password"
type="password"
className="font-normal text-xs text-gray-500"
placeholder="********"
{...register("confirmPassword")}
error={errors.confirmPassword?.message}
/>
{/* button reset */}
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🛠️ Refactor suggestion

Implement password strength validation.

The password fields lack visual feedback for password strength requirements.

Add password strength indicators and requirements:

  1. Minimum length
  2. Special characters
  3. Numbers
  4. Upper/lowercase letters

Example implementation:

const validatePassword = (password: string) => {
  const requirements = [
    { regex: /.{8,}/, message: "At least 8 characters" },
    { regex: /[0-9]/, message: "At least 1 number" },
    { regex: /[a-z]/, message: "At least 1 lowercase letter" },
    { regex: /[A-Z]/, message: "At least 1 uppercase letter" },
    { regex: /[^A-Za-z0-9]/, message: "At least 1 special character" }
  ];
  return requirements.map(req => ({
    met: req.regex.test(password),
    message: req.message
  }));
};

<div className="pb-7 w-full">
<Button
isLoading={mutation.isPending}
className="w-full text-sm font-bold bg-primary text-foreground"
variant="primary"
>
Reset
</Button>
</div>
</div>
</form>
</AuthCard>
Expand Down
10 changes: 5 additions & 5 deletions apps/core/app/auth/signup/otp/_components/signup-otp-form.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -2,9 +2,9 @@
"use client";
import { Button } from "@repo/ui/components/button";
import {
InputOTP,
InputOTPGroup,
InputOTPSlot,
InputOTP,
InputOTPGroup,
InputOTPSlot,
} from "@repo/ui/components/input-otp";
import { REGEXP_ONLY_DIGITS_AND_CHARS } from "input-otp";

Expand Down Expand Up @@ -96,15 +96,15 @@ export const SignupOtpForm = (props: SignupOtpFormProps) => {
<div className="pb-7 w-full">
<Button
className="w-full text-lg font-bold bg-primary-600 hover:bg-primary-500"
variant="secondary"
variant="primary"
isLoading={muutation.isPending}
>
Verify
</Button>
</div>
<div className="pb-7">
<p>
didnt recieved code yet? <Countdown date={Date.now() + 120000} />
didnt recieveddqqdqdqdqdqdqdqdqdq code yet? <Countdown date={Date.now() + 120000} />
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

⚠️ Potential issue

Fix the typo in the text.

There's a typo in the text that needs to be corrected.

- didnt recieveddqqdqdqdqdqdqdqdqdq code yet?
+ didn't receive code yet?
📝 Committable suggestion

‼️ IMPORTANT
Carefully review the code before committing. Ensure that it accurately replaces the highlighted code, contains no missing lines, and has no issues with indentation. Thoroughly test & benchmark the code to ensure it meets the requirements.

Suggested change
didnt recieveddqqdqdqdqdqdqdqdqdq code yet? <Countdown date={Date.now() + 120000} />
didn't receive code yet? <Countdown date={Date.now() + 120000} />

</p>
</div>
</form>
Expand Down
Loading