Skip to content

Commit

Permalink
fix: eslint issues
Browse files Browse the repository at this point in the history
  • Loading branch information
jorgemoya committed Nov 20, 2024
1 parent 4dfad8c commit bf5a15d
Show file tree
Hide file tree
Showing 17 changed files with 24 additions and 24 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -120,7 +120,7 @@ export const LoginForm = () => {
<SubmitButton />
</FormSubmit>
<Link
className="mx-auto my-5 inline-flex items-center justify-start px-8 py-3 font-semibold text-primary hover:text-secondary md:mx-0 md:my-0"
className="hover:text-secondary mx-auto my-5 inline-flex items-center justify-start px-8 py-3 font-semibold text-primary md:mx-0 md:my-0"
href="/login/forgot-password"
>
{t('Form.forgotPassword')}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -429,7 +429,7 @@ export const UpdateSettingsForm = ({
<Link href="/account">{t('cancel')}</Link>
</Button>
<Link
className="mt-2 w-fit font-semibold text-primary hover:text-secondary md:ms-auto md:mt-0"
className="hover:text-secondary mt-2 w-fit font-semibold text-primary md:ms-auto md:mt-0"
href="/account/settings/change-password"
>
{t('changePassword')}
Expand Down
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
export const ErrorMessage = ({ children }: { children: React.ReactNode }) => (
<p className="mt-2 text-xs font-normal text-error-secondary">{children}</p>
<p className="text-error-secondary mt-2 text-xs font-normal">{children}</p>
);
Original file line number Diff line number Diff line change
Expand Up @@ -79,7 +79,7 @@ export const ProductForm = ({ data: product }: Props) => {
cartItems: quantity,
cartLink: (chunks) => (
<Link
className="font-semibold text-primary hover:text-secondary"
className="hover:text-secondary font-semibold text-primary"
href="/cart"
prefetch="viewport"
prefetchKind="full"
Expand Down
2 changes: 1 addition & 1 deletion core/app/[locale]/maintenance/page.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -78,7 +78,7 @@ export default async function Maintenance({ params }: Props) {
<p className="flex items-center gap-2">
<Phone aria-hidden="true" />
<a
className="text-primary hover:text-secondary focus-visible:outline-none focus-visible:ring-4 focus-visible:ring-primary/20"
className="hover:text-secondary text-primary focus-visible:outline-none focus-visible:ring-4 focus-visible:ring-primary/20"
href={`tel:${contact.phone}`}
>
{contact.phone}
Expand Down
2 changes: 1 addition & 1 deletion core/components/ui/accordions/accordions.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ const Accordions = ({ accordions, ...props }: Props) => {
{accordions.map((accordion, i) => (
<AccordionPrimitive.Item key={i} value={accordion.title}>
<AccordionPrimitive.Header className="flex">
<AccordionPrimitive.Trigger className="flex flex-1 items-center justify-between py-[9.5px] text-lg font-bold outline-none transition-all hover:text-secondary focus-visible:text-secondary [&[data-state=open]>svg]:rotate-180">
<AccordionPrimitive.Trigger className="hover:text-secondary focus-visible:text-secondary flex flex-1 items-center justify-between py-[9.5px] text-lg font-bold outline-none transition-all [&[data-state=open]>svg]:rotate-180">
{accordion.title}
<ChevronDown className="h-6 w-6 shrink-0 transition-transform duration-200" />
</AccordionPrimitive.Trigger>
Expand Down
6 changes: 3 additions & 3 deletions core/components/ui/button/button.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -32,11 +32,11 @@ const Button = forwardRef<ElementRef<'button'>, Props>(
className={cn(
'relative flex w-full items-center justify-center border-2 border-primary px-[30px] py-2.5 text-base font-semibold leading-6 focus-visible:outline-none focus-visible:ring-4 focus-visible:ring-primary/20 disabled:border-gray-400',
variant === 'primary' &&
'bg-primary text-white hover:border-secondary hover:bg-secondary disabled:bg-gray-400 disabled:hover:border-gray-400 disabled:hover:bg-gray-400',
'hover:border-secondary hover:bg-secondary bg-primary text-white disabled:bg-gray-400 disabled:hover:border-gray-400 disabled:hover:bg-gray-400',
variant === 'secondary' &&
'bg-transparent text-primary hover:border-secondary hover:bg-secondary hover:bg-opacity-10 hover:text-secondary disabled:text-gray-400 disabled:hover:border-gray-400 disabled:hover:bg-transparent disabled:hover:text-gray-400',
'hover:border-secondary hover:bg-secondary hover:text-secondary bg-transparent text-primary hover:bg-opacity-10 disabled:text-gray-400 disabled:hover:border-gray-400 disabled:hover:bg-transparent disabled:hover:text-gray-400',
variant === 'subtle' &&
'border-none bg-transparent text-primary hover:bg-secondary hover:bg-opacity-10 hover:text-secondary disabled:text-gray-400 disabled:hover:bg-transparent disabled:hover:text-gray-400',
'hover:bg-secondary hover:text-secondary border-none bg-transparent text-primary hover:bg-opacity-10 disabled:text-gray-400 disabled:hover:bg-transparent disabled:hover:text-gray-400',
className,
)}
disabled={disabled || loading}
Expand Down
2 changes: 1 addition & 1 deletion core/components/ui/compare-drawer/compare-drawer.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -94,7 +94,7 @@ const CompareDrawer = () => {
<AccordionPrimitive.Root className="w-full md:hidden" collapsible type="single">
<AccordionPrimitive.Item value="compare">
<AccordionPrimitive.Header className="flex">
<AccordionPrimitive.Trigger className="flex flex-1 items-center justify-between py-[9.5px] text-lg font-bold outline-none transition-all hover:text-secondary focus-visible:text-secondary [&[data-state=open]>svg]:rotate-180">
<AccordionPrimitive.Trigger className="hover:text-secondary focus-visible:text-secondary flex flex-1 items-center justify-between py-[9.5px] text-lg font-bold outline-none transition-all [&[data-state=open]>svg]:rotate-180">
<CompareLink products={products} />
<ChevronDown className="h-6 w-6 shrink-0 transition-transform duration-200" />
</AccordionPrimitive.Trigger>
Expand Down
4 changes: 2 additions & 2 deletions core/components/ui/form/checkbox/checkbox.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -13,9 +13,9 @@ const Checkbox = forwardRef<ElementRef<typeof CheckboxPrimitive.Root>, Props>(
return (
<CheckboxPrimitive.Root
className={cn(
'block h-6 w-6 border-2 border-gray-200 hover:border-secondary focus-visible:border-primary focus-visible:outline-none focus-visible:ring-4 focus-visible:ring-primary/20 focus-visible:hover:border-secondary disabled:pointer-events-none disabled:bg-gray-100 radix-state-checked:border-primary radix-state-checked:bg-primary radix-state-checked:hover:border-secondary radix-state-checked:hover:bg-secondary radix-state-checked:disabled:border-gray-400 radix-state-checked:disabled:bg-gray-400',
'hover:border-secondary focus-visible:hover:border-secondary radix-state-checked:hover:border-secondary radix-state-checked:hover:bg-secondary block h-6 w-6 border-2 border-gray-200 focus-visible:border-primary focus-visible:outline-none focus-visible:ring-4 focus-visible:ring-primary/20 disabled:pointer-events-none disabled:bg-gray-100 radix-state-checked:border-primary radix-state-checked:bg-primary radix-state-checked:disabled:border-gray-400 radix-state-checked:disabled:bg-gray-400',
error &&
'border-error-secondary hover:border-error focus-visible:border-error-secondary focus-visible:ring-error-secondary/20 focus-visible:hover:border-error disabled:border-gray-200 radix-state-checked:border-error-secondary radix-state-checked:bg-error-secondary radix-state-checked:hover:border-error radix-state-checked:hover:bg-error',
'border-error-secondary focus-visible:border-error-secondary focus-visible:ring-error-secondary/20 radix-state-checked:border-error-secondary radix-state-checked:bg-error-secondary hover:border-error focus-visible:hover:border-error disabled:border-gray-200 radix-state-checked:hover:border-error radix-state-checked:hover:bg-error',
className,
)}
defaultChecked={defaultChecked}
Expand Down
2 changes: 1 addition & 1 deletion core/components/ui/form/counter/counter.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -135,7 +135,7 @@ const Counter = forwardRef<ElementRef<'input'>, Props>(
className={cn(
'peer/input w-full border-2 border-gray-200 px-12 py-2.5 text-center text-base placeholder:text-gray-500 hover:border-primary focus-visible:border-primary focus-visible:outline-none focus-visible:ring-4 focus-visible:ring-primary/20 disabled:bg-gray-100 disabled:hover:border-gray-200 peer-hover/down:border-primary peer-hover/up:border-primary peer-hover/down:disabled:border-gray-200 peer-hover/up:disabled:border-gray-200 [&::-webkit-inner-spin-button]:appearance-none',
error &&
'border-error-secondary hover:border-error focus-visible:border-error-secondary focus-visible:ring-error-secondary/20 disabled:border-gray-200 peer-hover/down:border-error peer-hover/up:border-error peer-hover/down:disabled:border-gray-200 peer-hover/up:disabled:border-gray-200',
'border-error-secondary focus-visible:border-error-secondary focus-visible:ring-error-secondary/20 hover:border-error disabled:border-gray-200 peer-hover/down:border-error peer-hover/up:border-error peer-hover/down:disabled:border-gray-200 peer-hover/up:disabled:border-gray-200',
)}
disabled={disabled}
max={max}
Expand Down
2 changes: 1 addition & 1 deletion core/components/ui/form/input/input.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ const Input = forwardRef<ElementRef<'input'>, Props>(
className={cn(
'peer w-full border-2 border-gray-200 px-4 py-2.5 text-base placeholder:text-gray-500 hover:border-primary focus-visible:border-primary focus-visible:outline-none focus-visible:ring-4 focus-visible:ring-primary/20 disabled:bg-gray-100 disabled:hover:border-gray-200',
error &&
'border-error-secondary pe-12 hover:border-error focus-visible:border-error-secondary focus-visible:ring-error-secondary/20 disabled:border-gray-200',
'border-error-secondary focus-visible:border-error-secondary focus-visible:ring-error-secondary/20 pe-12 hover:border-error disabled:border-gray-200',
)}
ref={ref}
type={type}
Expand Down
4 changes: 2 additions & 2 deletions core/components/ui/form/pick-list/pick-list.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -54,9 +54,9 @@ const PickList = forwardRef<ElementRef<typeof RadioGroupPrimitive.Root>, Props>(
<RadioGroupPrimitive.Item
{...itemProps}
className={cn(
'flex h-6 w-6 shrink-0 items-center justify-center rounded-full border-2 border-gray-200 hover:border-secondary focus-visible:border-primary focus-visible:outline-none focus-visible:ring-4 focus-visible:ring-primary/20 focus-visible:hover:border-secondary disabled:pointer-events-none disabled:bg-gray-100 radix-state-checked:border-primary radix-state-checked:bg-primary radix-state-checked:hover:border-secondary radix-state-checked:hover:bg-secondary radix-state-checked:disabled:border-gray-400 radix-state-checked:disabled:bg-gray-400',
'hover:border-secondary focus-visible:hover:border-secondary radix-state-checked:hover:border-secondary radix-state-checked:hover:bg-secondary flex h-6 w-6 shrink-0 items-center justify-center rounded-full border-2 border-gray-200 focus-visible:border-primary focus-visible:outline-none focus-visible:ring-4 focus-visible:ring-primary/20 disabled:pointer-events-none disabled:bg-gray-100 radix-state-checked:border-primary radix-state-checked:bg-primary radix-state-checked:disabled:border-gray-400 radix-state-checked:disabled:bg-gray-400',
error &&
'border-error-secondary hover:border-error focus-visible:border-error-secondary focus-visible:ring-error-secondary/20 focus-visible:hover:border-error disabled:border-gray-200 radix-state-checked:border-error-secondary radix-state-checked:bg-error-secondary radix-state-checked:hover:border-error radix-state-checked:hover:bg-error',
'border-error-secondary focus-visible:border-error-secondary focus-visible:ring-error-secondary/20 radix-state-checked:border-error-secondary radix-state-checked:bg-error-secondary hover:border-error focus-visible:hover:border-error disabled:border-gray-200 radix-state-checked:hover:border-error radix-state-checked:hover:bg-error',
)}
id={`${id}-${value}`}
value={value}
Expand Down
4 changes: 2 additions & 2 deletions core/components/ui/form/radio-group/radio-group.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -28,9 +28,9 @@ const RadioGroup = ({ children, className, error = false, items, ...props }: Pro
<RadioGroupPrimitive.Item
{...itemProps}
className={cn(
'flex h-6 w-6 items-center justify-center rounded-full border-2 border-gray-200 hover:border-secondary focus-visible:border-primary focus-visible:outline-none focus-visible:ring-4 focus-visible:ring-primary/20 focus-visible:hover:border-secondary disabled:pointer-events-none disabled:bg-gray-100 radix-state-checked:border-primary radix-state-checked:bg-primary radix-state-checked:hover:border-secondary radix-state-checked:hover:bg-secondary radix-state-checked:disabled:border-gray-400 radix-state-checked:disabled:bg-gray-400',
'hover:border-secondary focus-visible:hover:border-secondary radix-state-checked:hover:border-secondary radix-state-checked:hover:bg-secondary flex h-6 w-6 items-center justify-center rounded-full border-2 border-gray-200 focus-visible:border-primary focus-visible:outline-none focus-visible:ring-4 focus-visible:ring-primary/20 disabled:pointer-events-none disabled:bg-gray-100 radix-state-checked:border-primary radix-state-checked:bg-primary radix-state-checked:disabled:border-gray-400 radix-state-checked:disabled:bg-gray-400',
error &&
'border-error-secondary hover:border-error focus-visible:border-error-secondary focus-visible:ring-error-secondary/20 focus-visible:hover:border-error disabled:border-gray-200 radix-state-checked:border-error-secondary radix-state-checked:bg-error-secondary radix-state-checked:hover:border-error radix-state-checked:hover:bg-error',
'border-error-secondary focus-visible:border-error-secondary focus-visible:ring-error-secondary/20 radix-state-checked:border-error-secondary radix-state-checked:bg-error-secondary hover:border-error focus-visible:hover:border-error disabled:border-gray-200 radix-state-checked:hover:border-error radix-state-checked:hover:bg-error',
)}
id={`${id}-${value}`}
value={value}
Expand Down
2 changes: 1 addition & 1 deletion core/components/ui/form/rectangle-list/rectangle-list.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@ const RectangleList = forwardRef<ElementRef<typeof RadioGroupPrimitive.Root>, Pr
className={cn(
'border-2 px-6 py-2.5 font-semibold text-black hover:border-primary focus-visible:outline-none focus-visible:ring-4 focus-visible:ring-primary/20 disabled:border-gray-100 disabled:text-gray-400 disabled:hover:border-gray-100 data-[state=checked]:border-primary',
error &&
'border-error-secondary hover:border-error focus-visible:border-error-secondary focus-visible:ring-error/20 disabled:border-gray-200 data-[state=checked]:border-error-secondary',
'border-error-secondary focus-visible:border-error-secondary data-[state=checked]:border-error-secondary hover:border-error focus-visible:ring-error/20 disabled:border-gray-200',
)}
value={value}
>
Expand Down
4 changes: 2 additions & 2 deletions core/components/ui/form/select/select.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ const Select = forwardRef<ElementRef<typeof SelectPrimitive.Trigger>, Props>(
className={cn(
'group relative flex h-12 w-full items-center justify-between border-2 border-gray-200 px-4 py-3 text-base text-black hover:border-primary focus-visible:border-primary focus-visible:outline-none focus-visible:ring-4 focus-visible:ring-primary/20 disabled:bg-gray-100 disabled:hover:border-gray-200 data-[placeholder]:text-gray-500',
error &&
'border-error-secondary hover:border-error focus-visible:border-error-secondary focus-visible:ring-error-secondary/20 disabled:border-gray-200',
'border-error-secondary focus-visible:border-error-secondary focus-visible:ring-error-secondary/20 hover:border-error disabled:border-gray-200',
)}
id={triggerId}
ref={ref}
Expand All @@ -55,7 +55,7 @@ const Select = forwardRef<ElementRef<typeof SelectPrimitive.Trigger>, Props>(
<SelectPrimitive.Item
key={`${id}-${value}`}
{...optionProps}
className='relative flex w-full cursor-pointer select-none items-center justify-between overflow-visible px-4 py-2 outline-none hover:bg-secondary/10 hover:text-primary focus-visible:bg-secondary/10 data-[disabled]:pointer-events-none data-[state="checked"]:bg-secondary/10 data-[state="checked"]:text-primary data-[disabled]:opacity-50'
className='hover:bg-secondary/10 focus-visible:bg-secondary/10 data-[state="checked"]:bg-secondary/10 relative flex w-full cursor-pointer select-none items-center justify-between overflow-visible px-4 py-2 outline-none hover:text-primary data-[disabled]:pointer-events-none data-[state="checked"]:text-primary data-[disabled]:opacity-50'
value={value}
>
<SelectPrimitive.ItemText>{optionLabel}</SelectPrimitive.ItemText>
Expand Down
4 changes: 2 additions & 2 deletions core/components/ui/form/swatch/swatch.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@ const Swatch = forwardRef<ElementRef<typeof RadioGroupPrimitive.Root>, Props>(
className={cn(
'group h-12 w-12 border-2 bg-white p-1 hover:border-primary focus-visible:outline-none focus-visible:ring-4 focus-visible:ring-primary/20 disabled:border-gray-100 disabled:hover:border-gray-100 data-[state=checked]:border-primary',
error &&
'border-error-secondary hover:border-error focus-visible:border-error-secondary focus-visible:ring-error/20 disabled:border-gray-200 data-[state=checked]:border-error-secondary',
'border-error-secondary focus-visible:border-error-secondary data-[state=checked]:border-error-secondary hover:border-error focus-visible:ring-error/20 disabled:border-gray-200',
)}
title={label}
value={value}
Expand All @@ -50,7 +50,7 @@ const Swatch = forwardRef<ElementRef<typeof RadioGroupPrimitive.Root>, Props>(
/>
) : (
<span className="relative block h-9 w-9 overflow-hidden border border-gray-200 group-disabled:border-gray-100">
<span className="absolute -start-px -top-[2px] w-[51px] origin-top-left rotate-45 border-t-2 border-error-secondary group-disabled:opacity-30" />
<span className="border-error-secondary absolute -start-px -top-[2px] w-[51px] origin-top-left rotate-45 border-t-2 group-disabled:opacity-30" />
</span>
)}
</RadioGroupPrimitive.Item>
Expand Down
2 changes: 1 addition & 1 deletion core/components/ui/form/text-area/text-area.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ const TextArea = forwardRef<ElementRef<'textarea'>, Props>(
className={cn(
'h-[64px] w-full border-2 border-gray-200 px-4 py-2.5 hover:border-primary focus-visible:border-primary focus-visible:outline-none focus-visible:ring-4 focus-visible:ring-primary/20',
error &&
'!border-error-secondary pe-12 ring-error-secondary/20 hover:border-error-secondary focus-visible:border-error-secondary focus-visible:ring-error-secondary/20 disabled:border-gray-200',
'!border-error-secondary ring-error-secondary/20 hover:border-error-secondary focus-visible:border-error-secondary focus-visible:ring-error-secondary/20 pe-12 disabled:border-gray-200',
className,
)}
ref={ref}
Expand Down

0 comments on commit bf5a15d

Please sign in to comment.