@akinon/projectzero 2.0.0-beta.5 → 2.0.0-beta.7
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/CHANGELOG.md +8 -0
- package/app-template/.env.example +3 -0
- package/app-template/CHANGELOG.md +50 -0
- package/app-template/package.json +23 -21
- package/app-template/postcss.config.mjs +8 -0
- package/app-template/public/locales/en/common.json +4 -0
- package/app-template/public/locales/tr/common.json +4 -0
- package/app-template/src/app/[commerce]/[locale]/[currency]/account/orders/[id]/cancellation/page.tsx +93 -4
- package/app-template/src/app/[commerce]/[locale]/[currency]/account/orders/[id]/page.tsx +1 -1
- package/app-template/src/app/[commerce]/[locale]/[currency]/account/page.tsx +1 -1
- package/app-template/src/app/[commerce]/[locale]/[currency]/address/stores/page.tsx +2 -2
- package/app-template/src/app/[commerce]/[locale]/[currency]/auth/page.tsx +1 -1
- package/app-template/src/app/[commerce]/[locale]/[currency]/basket/page.tsx +2 -2
- package/app-template/src/app/[commerce]/[locale]/[currency]/forms/[pk]/generate/page.tsx +1 -1
- package/app-template/src/app/[commerce]/[locale]/[currency]/orders/checkout/page.tsx +7 -4
- package/app-template/src/assets/globals.scss +162 -34
- package/app-template/src/components/__tests__/badge.test.tsx +2 -2
- package/app-template/src/components/accordion.tsx +1 -1
- package/app-template/src/components/button.tsx +50 -35
- package/app-template/src/components/file-input.tsx +44 -2
- package/app-template/src/components/input.tsx +3 -3
- package/app-template/src/components/modal.tsx +1 -1
- package/app-template/src/components/select.tsx +1 -1
- package/app-template/src/components/shimmer.tsx +1 -1
- package/app-template/src/components/types/index.ts +4 -1
- package/app-template/src/middleware.ts +1 -0
- package/app-template/src/plugins.js +2 -1
- package/app-template/src/views/account/contact-form.tsx +3 -8
- package/app-template/src/views/account/content-header.tsx +2 -3
- package/app-template/src/views/account/order.tsx +1 -1
- package/app-template/src/views/account/orders/order-cancellation-item.tsx +24 -4
- package/app-template/src/views/anonymous-tracking/order-detail/index.tsx +1 -1
- package/app-template/src/views/category/category-header.tsx +11 -5
- package/app-template/src/views/category/category-info.tsx +1 -1
- package/app-template/src/views/checkout/auth.tsx +1 -1
- package/app-template/src/views/checkout/layout/header.tsx +1 -1
- package/app-template/src/views/checkout/steps/payment/options/credit-card/index.tsx +1 -1
- package/app-template/src/views/checkout/steps/payment/payment-option-buttons.tsx +4 -4
- package/app-template/src/views/checkout/steps/shipping/address-box.tsx +3 -3
- package/app-template/src/views/checkout/steps/shipping/addresses.tsx +1 -1
- package/app-template/src/views/checkout/summary.tsx +2 -2
- package/app-template/src/views/header/band.tsx +2 -2
- package/app-template/src/views/header/mini-basket.tsx +2 -2
- package/app-template/src/views/header/mobile-menu.tsx +6 -6
- package/app-template/src/views/header/navbar.tsx +1 -1
- package/app-template/src/views/header/pwa-back-button.tsx +1 -1
- package/app-template/src/views/header/search/index.tsx +16 -4
- package/app-template/src/views/header/search/results.tsx +1 -1
- package/app-template/src/views/header/user-menu.tsx +3 -1
- package/app-template/src/views/login/index.tsx +30 -6
- package/app-template/src/views/product/product-info.tsx +2 -2
- package/app-template/src/views/product/slider.tsx +1 -1
- package/app-template/src/views/product-pointer-banner-item.tsx +1 -1
- package/app-template/src/views/register/index.tsx +29 -4
- package/app-template/src/views/sales-contract-modal/index.tsx +17 -17
- package/app-template/src/widgets/footer-info.tsx +1 -1
- package/app-template/src/widgets/footer-menu.tsx +1 -1
- package/app-template/src/widgets/footer-subscription/index.tsx +1 -1
- package/app-template/src/widgets/home-stories-eng.tsx +1 -1
- package/app-template/tailwind.config.js +1 -137
- package/commands/plugins.ts +4 -0
- package/dist/commands/plugins.js +4 -0
- package/package.json +1 -1
- package/app-template/postcss.config.js +0 -6
|
@@ -5,7 +5,7 @@ describe('Badge Component', () => {
|
|
|
5
5
|
let badge;
|
|
6
6
|
|
|
7
7
|
beforeEach(() => {
|
|
8
|
-
render(<Badge className="text-md rounded-
|
|
8
|
+
render(<Badge className="text-md rounded-xs">%90 off</Badge>);
|
|
9
9
|
|
|
10
10
|
badge = screen.getByText('%90 off');
|
|
11
11
|
});
|
|
@@ -15,6 +15,6 @@ describe('Badge Component', () => {
|
|
|
15
15
|
});
|
|
16
16
|
|
|
17
17
|
it('should be classname checked', () => {
|
|
18
|
-
expect(badge).toHaveClass('text-md rounded-
|
|
18
|
+
expect(badge).toHaveClass('text-md rounded-xs');
|
|
19
19
|
});
|
|
20
20
|
});
|
|
@@ -1,46 +1,61 @@
|
|
|
1
1
|
'use client';
|
|
2
2
|
|
|
3
|
+
import { Link } from '@theme/components';
|
|
3
4
|
import { ButtonProps } from '@theme/components/types';
|
|
4
5
|
import clsx from 'clsx';
|
|
5
6
|
import { twMerge } from 'tailwind-merge';
|
|
6
7
|
|
|
7
8
|
export const Button = (props: ButtonProps) => {
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
9
|
+
const {
|
|
10
|
+
appearance = 'filled',
|
|
11
|
+
size = 'md',
|
|
12
|
+
href,
|
|
13
|
+
target,
|
|
14
|
+
children,
|
|
15
|
+
className,
|
|
16
|
+
...rest
|
|
17
|
+
} = props;
|
|
18
|
+
|
|
19
|
+
const variants = {
|
|
20
|
+
filled:
|
|
21
|
+
'bg-primary text-primary-foreground border border-primary hover:bg-white hover:border-primary hover:text-primary',
|
|
22
|
+
outlined:
|
|
23
|
+
'bg-transparent text-primary hover:bg-primary hover:text-primary-foreground',
|
|
24
|
+
ghost:
|
|
25
|
+
'bg-transparent border-transparent text-primary hover:bg-primary hover:text-primary-foreground',
|
|
26
|
+
link: 'px-0 h-auto underline underline-offset-2'
|
|
27
|
+
};
|
|
28
|
+
|
|
29
|
+
const sizes = {
|
|
30
|
+
sm: 'h-8',
|
|
31
|
+
md: 'h-10',
|
|
32
|
+
lg: 'h-12',
|
|
33
|
+
xl: 'h-14'
|
|
34
|
+
};
|
|
35
|
+
|
|
36
|
+
const buttonClasses = twMerge(
|
|
37
|
+
clsx(
|
|
38
|
+
'px-4 text-xs transition-all duration-200',
|
|
39
|
+
'inline-flex gap-2 justify-center items-center',
|
|
40
|
+
variants[appearance],
|
|
41
|
+
sizes[size],
|
|
42
|
+
className
|
|
43
|
+
),
|
|
44
|
+
className
|
|
45
|
+
);
|
|
46
|
+
|
|
47
|
+
return props.href ? (
|
|
48
|
+
<Link
|
|
49
|
+
prefetch={false}
|
|
50
|
+
target={target}
|
|
51
|
+
href={href}
|
|
52
|
+
className={buttonClasses}
|
|
42
53
|
>
|
|
43
|
-
{
|
|
54
|
+
{children}
|
|
55
|
+
</Link>
|
|
56
|
+
) : (
|
|
57
|
+
<button {...rest} className={buttonClasses}>
|
|
58
|
+
{children}
|
|
44
59
|
</button>
|
|
45
60
|
);
|
|
46
61
|
};
|
|
@@ -1,8 +1,50 @@
|
|
|
1
|
+
import { useState } from 'react';
|
|
1
2
|
import { forwardRef } from 'react';
|
|
2
3
|
import { FileInputProps } from '@theme/components/types';
|
|
4
|
+
import clsx from 'clsx';
|
|
5
|
+
import { useLocalization } from '@akinon/next/hooks';
|
|
3
6
|
|
|
4
7
|
export const FileInput = forwardRef<HTMLInputElement, FileInputProps>(
|
|
5
|
-
function
|
|
6
|
-
|
|
8
|
+
function FileInput({ className, onChange, ...props }, ref) {
|
|
9
|
+
const { t } = useLocalization();
|
|
10
|
+
const [fileNames, setFileNames] = useState<string[]>([]);
|
|
11
|
+
|
|
12
|
+
const handleFileChange = (event: React.ChangeEvent<HTMLInputElement>) => {
|
|
13
|
+
const files = Array.from(event.target.files || []);
|
|
14
|
+
setFileNames(files.map((file) => file.name));
|
|
15
|
+
|
|
16
|
+
if (onChange) {
|
|
17
|
+
onChange(event);
|
|
18
|
+
}
|
|
19
|
+
};
|
|
20
|
+
|
|
21
|
+
return (
|
|
22
|
+
<div className="relative">
|
|
23
|
+
<input
|
|
24
|
+
type="file"
|
|
25
|
+
{...props}
|
|
26
|
+
ref={ref}
|
|
27
|
+
className="absolute inset-0 w-full h-full opacity-0 cursor-pointer"
|
|
28
|
+
onChange={handleFileChange}
|
|
29
|
+
/>
|
|
30
|
+
<button
|
|
31
|
+
type="button"
|
|
32
|
+
className={clsx('bg-primary text-white py-2 px-4 text-sm', className)}
|
|
33
|
+
>
|
|
34
|
+
{t('common.file_input.select_file')}
|
|
35
|
+
</button>
|
|
36
|
+
<div className="mt-1 text-gray-500">
|
|
37
|
+
{fileNames.length > 0 ? (
|
|
38
|
+
<ul className="list-disc pl-4 text-xs">
|
|
39
|
+
{fileNames.map((name, index) => (
|
|
40
|
+
<li key={index}>{name}</li>
|
|
41
|
+
))}
|
|
42
|
+
</ul>
|
|
43
|
+
) : (
|
|
44
|
+
<span className="text-xs">{t('common.file_input.no_file')}</span>
|
|
45
|
+
)}
|
|
46
|
+
</div>
|
|
47
|
+
</div>
|
|
48
|
+
);
|
|
7
49
|
}
|
|
8
50
|
);
|
|
@@ -39,8 +39,8 @@ export const Input = forwardRef<
|
|
|
39
39
|
const hasFloatingLabel = label && labelStyle === 'floating';
|
|
40
40
|
const inputClass = twMerge(
|
|
41
41
|
clsx(
|
|
42
|
-
'text-xs border px-2.5 h-10 placeholder:text-gray-600 peer',
|
|
43
|
-
'focus-visible:outline-
|
|
42
|
+
'text-xs border px-2.5 h-10 placeholder:text-gray-600 peer disabled:bg-gray-50',
|
|
43
|
+
'focus-visible:outline-hidden', // disable outline on focus
|
|
44
44
|
error
|
|
45
45
|
? 'border-error focus:border-error'
|
|
46
46
|
: 'border-gray-500 hover:border-black focus:border-black'
|
|
@@ -68,7 +68,7 @@ export const Input = forwardRef<
|
|
|
68
68
|
className={twMerge(
|
|
69
69
|
'text-xs text-gray-800 transition-all',
|
|
70
70
|
clsx({
|
|
71
|
-
'absolute left-2.5 pointer-events-none transform flex items-center h-full
|
|
71
|
+
'absolute left-2.5 pointer-events-none transform flex items-center h-full top-0! peer-placeholder-shown:-translate-y-2 peer-placeholder-shown:bg-white peer-placeholder-shown:inline-flex peer-placeholder-shown:h-auto':
|
|
72
72
|
hasFloatingLabel,
|
|
73
73
|
'mb-2': !hasFloatingLabel,
|
|
74
74
|
'-translate-y-2 bg-white inline-flex h-auto':
|
|
@@ -38,7 +38,7 @@ export const Modal = (props: ModalProps) => {
|
|
|
38
38
|
|
|
39
39
|
return (
|
|
40
40
|
<ReactPortal wrapperId={portalId}>
|
|
41
|
-
<div className="fixed top-0 left-0 w-screen h-screen bg-primary
|
|
41
|
+
<div className="fixed top-0 left-0 w-screen h-screen bg-primary/60 z-50" />
|
|
42
42
|
<section
|
|
43
43
|
className={twMerge(
|
|
44
44
|
'fixed top-1/2 left-1/2 -translate-x-1/2 -translate-y-1/2 z-50 bg-white',
|
|
@@ -41,7 +41,7 @@ const Select = forwardRef<HTMLSelectElement, SelectProps>((props, ref) => {
|
|
|
41
41
|
ref={ref}
|
|
42
42
|
className={twMerge(
|
|
43
43
|
clsx(
|
|
44
|
-
'cursor-pointer truncate h-10 w-40 px-2.5 shrink-0 outline-
|
|
44
|
+
'cursor-pointer truncate h-10 w-40 px-2.5 shrink-0 outline-hidden',
|
|
45
45
|
!borderless &&
|
|
46
46
|
'border border-gray-200 transition-all duration-150 hover:border-primary'
|
|
47
47
|
),
|
|
@@ -12,7 +12,7 @@ export const Shimmer: React.FC<ShimmerProps> = ({ className }) => {
|
|
|
12
12
|
>
|
|
13
13
|
<div
|
|
14
14
|
className={twMerge(
|
|
15
|
-
'w-full h-full bg-black
|
|
15
|
+
'w-full h-full bg-black/20 shadow-[0 0 30px 30px rgba(255,255,255,0.2)]',
|
|
16
16
|
className
|
|
17
17
|
)}
|
|
18
18
|
></div>
|
|
@@ -4,7 +4,10 @@ import { UsePaginationType } from '@akinon/next/hooks/use-pagination';
|
|
|
4
4
|
|
|
5
5
|
export interface ButtonProps
|
|
6
6
|
extends React.ButtonHTMLAttributes<HTMLButtonElement> {
|
|
7
|
-
appearance?: 'filled' | 'outlined' | 'ghost';
|
|
7
|
+
appearance?: 'filled' | 'outlined' | 'ghost' | 'link' | string;
|
|
8
|
+
size?: 'sm' | 'md' | 'lg' | 'xl';
|
|
9
|
+
href?: string;
|
|
10
|
+
target?: '_blank' | '_self' | '_parent' | '_top';
|
|
8
11
|
}
|
|
9
12
|
|
|
10
13
|
export interface PaginationProps {
|
|
@@ -9,6 +9,7 @@ import { NextMiddleware, NextResponse } from 'next/server';
|
|
|
9
9
|
*/
|
|
10
10
|
|
|
11
11
|
export const config = {
|
|
12
|
+
// For .xml.gz type sitemap urls, update '/(.*sitemap\\.xml)' with this regex '/(.*sitemap\\.xml|sitemap/.*.xml(?:.gz)?)/',
|
|
12
13
|
matcher: [
|
|
13
14
|
'/((?!api|_next|[\\w-\\/*]+\\.\\w+).*)',
|
|
14
15
|
'/(.*sitemap\\.xml)',
|
|
@@ -242,7 +242,7 @@ const ContactForm = () => {
|
|
|
242
242
|
<span className="text-secondary">*</span>
|
|
243
243
|
</label>
|
|
244
244
|
<textarea
|
|
245
|
-
className="border-gray-500 border w-full text-xs p-2.5 focus-visible:outline-
|
|
245
|
+
className="border-gray-500 border w-full text-xs p-2.5 focus-visible:outline-hidden focus:border-black hover:border-black"
|
|
246
246
|
rows={7}
|
|
247
247
|
name="message"
|
|
248
248
|
// eslint-disable-next-line @typescript-eslint/ban-ts-comment
|
|
@@ -255,13 +255,8 @@ const ContactForm = () => {
|
|
|
255
255
|
<label className="text-xs text-gray-800 mb-2 block">
|
|
256
256
|
{t('account.contact.form.file.title')}
|
|
257
257
|
</label>
|
|
258
|
-
<FileInput
|
|
259
|
-
|
|
260
|
-
title="file"
|
|
261
|
-
className="w-full mb-5"
|
|
262
|
-
{...register('file')}
|
|
263
|
-
/>
|
|
264
|
-
<Button type="submit" className="w-full font-medium">
|
|
258
|
+
<FileInput name="file" title="file" {...register('file')} />
|
|
259
|
+
<Button type="submit" className="w-full font-medium mt-4">
|
|
265
260
|
{t('account.contact.form.submit_button')}
|
|
266
261
|
</Button>
|
|
267
262
|
</form>
|
|
@@ -31,15 +31,14 @@ export const ContentHeader = (props: Props) => {
|
|
|
31
31
|
</h3>
|
|
32
32
|
<Select
|
|
33
33
|
onChange={handleChange}
|
|
34
|
-
className="w-full mb-4 md:mb-0 md:w-56 md:mr-4 text-xs"
|
|
34
|
+
className="w-full mb-4 bg-white md:mb-0 md:w-56 md:mr-4 text-xs"
|
|
35
35
|
options={orders}
|
|
36
36
|
data-testid="account-orders-header-select"
|
|
37
37
|
></Select>
|
|
38
38
|
<Button
|
|
39
39
|
className={clsx(
|
|
40
40
|
'w-full md:w-56',
|
|
41
|
-
isButtonDisabled &&
|
|
42
|
-
'hover:bg-black hover:text-white disabled:opacity-75'
|
|
41
|
+
isButtonDisabled && 'hover:bg-black/75 hover:text-white'
|
|
43
42
|
)}
|
|
44
43
|
onClick={handleClick}
|
|
45
44
|
data-testid="account-orders-header-button"
|
|
@@ -60,7 +60,7 @@ export const Order = (props) => {
|
|
|
60
60
|
<ul className="flex flex-wrap gap-3.5 mb-6 items-center md:mb-0">
|
|
61
61
|
{props.orderitem_set.slice(0, 3).map((item, index) => (
|
|
62
62
|
// TODO: Static image will change (TR)
|
|
63
|
-
<li className="
|
|
63
|
+
<li className="shrink-0" key={index}>
|
|
64
64
|
<Image
|
|
65
65
|
src={item.product.image ? item.product.image : '/noimage.jpg'}
|
|
66
66
|
alt={item.product.name}
|
|
@@ -8,7 +8,8 @@ export const OrderCancellationItem = ({
|
|
|
8
8
|
item,
|
|
9
9
|
value,
|
|
10
10
|
onChange,
|
|
11
|
-
selectOption
|
|
11
|
+
selectOption,
|
|
12
|
+
fileInput
|
|
12
13
|
}) => {
|
|
13
14
|
const { t } = useLocalization();
|
|
14
15
|
const checkboxStatus =
|
|
@@ -38,14 +39,13 @@ export const OrderCancellationItem = ({
|
|
|
38
39
|
<div className="flex flex-wrap justify-between border-gray border-b mb-4 pb-3">
|
|
39
40
|
<div className="flex gap-3 mb-5 lg:mb-0">
|
|
40
41
|
{checkboxStatus && (
|
|
41
|
-
// TODO: Static image will change (TR)
|
|
42
42
|
<Checkbox
|
|
43
43
|
className="m-auto"
|
|
44
44
|
data-testid="account-orders-return-checkbox"
|
|
45
45
|
onClick={handleClick}
|
|
46
46
|
/>
|
|
47
47
|
)}
|
|
48
|
-
<div className="
|
|
48
|
+
<div className="shrink-0">
|
|
49
49
|
<Link href={item.product.absolute_url}>
|
|
50
50
|
<Image
|
|
51
51
|
src={item.product.image ? item.product.image : '/noimage.jpg'}
|
|
@@ -80,7 +80,7 @@ export const OrderCancellationItem = ({
|
|
|
80
80
|
</div>
|
|
81
81
|
</div>
|
|
82
82
|
</div>
|
|
83
|
-
<div className="flex flex-wrap justify-between w-full items-start lg:items-center lg:w-
|
|
83
|
+
<div className="flex flex-wrap justify-between w-full items-start lg:items-center lg:w-80 gap-4">
|
|
84
84
|
<div className="w-full flex flex-col lg:items-center lg:flex-row">
|
|
85
85
|
{item.active_cancellation_request?.easy_return?.code && (
|
|
86
86
|
<div className="flex items-center">
|
|
@@ -93,6 +93,26 @@ export const OrderCancellationItem = ({
|
|
|
93
93
|
|
|
94
94
|
{selectOption}
|
|
95
95
|
</div>
|
|
96
|
+
<div>{fileInput}</div>
|
|
97
|
+
{item.active_cancellation_request?.cancellation_request_image_set && (
|
|
98
|
+
<div className="flex flex-wrap gap-2">
|
|
99
|
+
{item.active_cancellation_request?.cancellation_request_image_set?.map(
|
|
100
|
+
(item) => {
|
|
101
|
+
return (
|
|
102
|
+
<div className="relative w-16 h-16" key={item.id}>
|
|
103
|
+
<Image
|
|
104
|
+
src={item.image}
|
|
105
|
+
alt={item.description}
|
|
106
|
+
aspectRatio={1}
|
|
107
|
+
sizes="64px"
|
|
108
|
+
fill
|
|
109
|
+
/>
|
|
110
|
+
</div>
|
|
111
|
+
);
|
|
112
|
+
}
|
|
113
|
+
)}
|
|
114
|
+
</div>
|
|
115
|
+
)}
|
|
96
116
|
</div>
|
|
97
117
|
</div>
|
|
98
118
|
);
|
|
@@ -135,7 +135,7 @@ export const AnonymousTrackingOrderDetail = ({ order }) => {
|
|
|
135
135
|
key={index}
|
|
136
136
|
>
|
|
137
137
|
<div className="flex gap-3 mb-5 lg:mb-0">
|
|
138
|
-
<div className="
|
|
138
|
+
<div className="shrink-0">
|
|
139
139
|
<Link
|
|
140
140
|
className="block"
|
|
141
141
|
href={item.product.absolute_url}
|
|
@@ -91,12 +91,18 @@ export const CategoryHeader = (props: Props) => {
|
|
|
91
91
|
value: String(value)
|
|
92
92
|
});
|
|
93
93
|
}}
|
|
94
|
-
className=
|
|
95
|
-
'cursor-pointer',
|
|
96
|
-
Number(layoutSize) === value ? 'fill-black' : 'fill-gray-500'
|
|
97
|
-
)}
|
|
94
|
+
className="cursor-pointer"
|
|
98
95
|
>
|
|
99
|
-
<Icon
|
|
96
|
+
<Icon
|
|
97
|
+
key={value}
|
|
98
|
+
name={icon}
|
|
99
|
+
size={16}
|
|
100
|
+
className={
|
|
101
|
+
Number(layoutSize) === value
|
|
102
|
+
? 'text-black'
|
|
103
|
+
: 'text-gray-500'
|
|
104
|
+
}
|
|
105
|
+
/>
|
|
100
106
|
</a>
|
|
101
107
|
))}
|
|
102
108
|
</div>
|
|
@@ -79,7 +79,7 @@ export default function ListPage(props: ListPageProps) {
|
|
|
79
79
|
className={clsx(
|
|
80
80
|
'transition-opacity duration-300 ease-linear lg:hidden',
|
|
81
81
|
isMenuOpen
|
|
82
|
-
? 'fixed bg-black
|
|
82
|
+
? 'fixed bg-black/60 inset-0 z-10 opacity-100'
|
|
83
83
|
: 'opacity-0'
|
|
84
84
|
)}
|
|
85
85
|
></div>
|
|
@@ -24,7 +24,7 @@ const CheckoutAuth = () => {
|
|
|
24
24
|
|
|
25
25
|
return (
|
|
26
26
|
<div className="flex flex-col w-full my-5 lg:flex-row">
|
|
27
|
-
<div className="flex-1
|
|
27
|
+
<div className="flex-1 shrink-0">
|
|
28
28
|
<Login />
|
|
29
29
|
<div className="text-center text-sm text-gray-600 uppercase mt-5">
|
|
30
30
|
<span>
|
|
@@ -6,7 +6,7 @@ import { Image } from '@akinon/next/components/image';
|
|
|
6
6
|
|
|
7
7
|
const CheckoutHeader = () => {
|
|
8
8
|
return (
|
|
9
|
-
<div className="relative border-b border-gray-100 shadow">
|
|
9
|
+
<div className="relative border-b border-gray-100 shadow-sm">
|
|
10
10
|
<header
|
|
11
11
|
className={clsx(['py-8', 'px-4', 'mx-auto', 'container', 'md:px-0'])}
|
|
12
12
|
>
|
|
@@ -319,7 +319,7 @@ const CheckoutCreditCard = () => {
|
|
|
319
319
|
size={16}
|
|
320
320
|
className="leading-none ml-2"
|
|
321
321
|
/>
|
|
322
|
-
<div className="hidden group-hover:block absolute right-0 bottom-5 w-[11rem] lg:w-[21rem] lg:left-auto lg:right-auto border-2">
|
|
322
|
+
<div className="hidden group-hover:block absolute right-0 bottom-5 w-[11rem] lg:w-[21rem] lg:left-auto lg:right-auto border-2 border-gray-200">
|
|
323
323
|
{/* TODO: Fix this */}
|
|
324
324
|
<Image
|
|
325
325
|
src="/cvv.jpg"
|
|
@@ -44,7 +44,7 @@ const PaymentOptionButtons = () => {
|
|
|
44
44
|
{displayedPaymentOptions.map((option) => (
|
|
45
45
|
<label
|
|
46
46
|
key={`payment-option-${option.pk}`}
|
|
47
|
-
className="border px-4 py-3 mt-3 flex h-12"
|
|
47
|
+
className="border border-gray-200 px-4 py-3 mt-3 flex h-12"
|
|
48
48
|
onClick={scrollToTop}
|
|
49
49
|
>
|
|
50
50
|
<Radio
|
|
@@ -69,10 +69,10 @@ const PaymentOptionButtons = () => {
|
|
|
69
69
|
onClick={() => onClickHandler(option)}
|
|
70
70
|
className={clsx(
|
|
71
71
|
'flex items-center justify-center border-r border-b border-solid',
|
|
72
|
-
'border-gray-400 text-xs uppercase text-black-800 font-medium',
|
|
73
|
-
'
|
|
72
|
+
'border-gray-400 text-xs uppercase text-black-800/60 font-medium',
|
|
73
|
+
'bg-white h-11 px-5 transition-colors sm:h-15 sm:px-8 sm:py-8 hover:text-secondary',
|
|
74
74
|
{
|
|
75
|
-
'text-
|
|
75
|
+
'text-black-800/100 border-b-transparent':
|
|
76
76
|
preOrder?.payment_option?.pk === option.pk
|
|
77
77
|
}
|
|
78
78
|
)}
|
|
@@ -130,7 +130,7 @@ const AddressBox = ({
|
|
|
130
130
|
onClick={() => handleAddressClick(addressType, address)}
|
|
131
131
|
key={address.pk}
|
|
132
132
|
className={clsx(
|
|
133
|
-
'cursor-pointer relative w-full border shadow p-4 min-h-[8rem]',
|
|
133
|
+
'cursor-pointer relative w-full border border-gray-200 shadow-sm p-4 min-h-[8rem]',
|
|
134
134
|
"hover:after:content-[''] hover:after:border-4 hover:after:opacity-30 hover:after:transition-opacity",
|
|
135
135
|
'after:border-secondary-400 after:absolute after:inset-0 after:duration-150 after:-z-10',
|
|
136
136
|
{
|
|
@@ -167,7 +167,7 @@ const AddressBox = ({
|
|
|
167
167
|
<div className="text-xs flex justify-between">
|
|
168
168
|
<Button
|
|
169
169
|
appearance="ghost"
|
|
170
|
-
className="italic underline hover:text-secondary-500 hover
|
|
170
|
+
className="italic underline hover:text-secondary-500 hover:bg-white! hover:border-white! p-0 h-auto"
|
|
171
171
|
onClick={() => setIsEditAddressModalOpen(true)}
|
|
172
172
|
data-testid="checkout-address-edit"
|
|
173
173
|
>
|
|
@@ -193,7 +193,7 @@ const AddressBox = ({
|
|
|
193
193
|
</Modal>
|
|
194
194
|
<Button
|
|
195
195
|
appearance="ghost"
|
|
196
|
-
className="italic underline hover:text-secondary-500 hover
|
|
196
|
+
className="italic underline hover:text-secondary-500 hover:bg-white! hover:border-white! p-0 h-auto"
|
|
197
197
|
onClick={() => setRemoveAddressModalOpen(true)}
|
|
198
198
|
data-testid="checkout-address-remove"
|
|
199
199
|
>
|
|
@@ -153,7 +153,7 @@ const Addresses = () => {
|
|
|
153
153
|
role="button"
|
|
154
154
|
onClick={() => setIsModalOpen(true)}
|
|
155
155
|
className={clsx(
|
|
156
|
-
'relative cursor-pointer w-full min-h-[8rem] border shadow p-4',
|
|
156
|
+
'relative cursor-pointer w-full min-h-[8rem] border border-gray-200 shadow-sm p-4',
|
|
157
157
|
"hover:after:content-[''] hover:after:border-4 hover:after:opacity-30 hover:after:transition-opacity",
|
|
158
158
|
'after:border-secondary-400 after:absolute after:inset-0 after:opacity-0 after:duration-150 after:-z-10',
|
|
159
159
|
{
|
|
@@ -149,7 +149,7 @@ export const Summary = () => {
|
|
|
149
149
|
</div>
|
|
150
150
|
</div>
|
|
151
151
|
<div className="flex flex-col py-4 px-4 text-black-800 text-xs sm:px-5">
|
|
152
|
-
<div className="w-full overflow-hidden
|
|
152
|
+
<div className="w-full overflow-hidden text-ellipsis mb-1 last:mb-0">
|
|
153
153
|
<Trans
|
|
154
154
|
i18nKey="checkout.summary.info"
|
|
155
155
|
components={{
|
|
@@ -162,7 +162,7 @@ export const Summary = () => {
|
|
|
162
162
|
}}
|
|
163
163
|
/>
|
|
164
164
|
</div>
|
|
165
|
-
<div className="w-full overflow-hidden
|
|
165
|
+
<div className="w-full overflow-hidden text-ellipsis mb-1 last:mb-0">
|
|
166
166
|
{preOrder.shipping_address?.line}{' '}
|
|
167
167
|
{preOrder.shipping_address?.postcode}{' '}
|
|
168
168
|
{preOrder.shipping_address?.district && (
|
|
@@ -16,13 +16,13 @@ export default function HeaderBand() {
|
|
|
16
16
|
</div>
|
|
17
17
|
|
|
18
18
|
<div className="header-grid-area-nav bg-gray-100 h-auto p-3 sm:header-grid-area-band-m sm:h-9 sm:py-0">
|
|
19
|
-
<div className="text-center
|
|
19
|
+
<div className="text-center text-ellipsis line-clamp-2 h-full flex items-center justify-center">
|
|
20
20
|
<HeaderBandText />
|
|
21
21
|
</div>
|
|
22
22
|
</div>
|
|
23
23
|
|
|
24
24
|
<div className="header-grid-area-main-r h-full pr-4 sm:header-grid-area-band-r sm:pr-0">
|
|
25
|
-
<div className="flex items-center justify-end h-full">
|
|
25
|
+
<div className="flex items-center justify-end h-full gap-10">
|
|
26
26
|
<UserMenu isMobile={false} />
|
|
27
27
|
<ActionMenu />
|
|
28
28
|
</div>
|
|
@@ -192,7 +192,7 @@ export default function MiniBasket() {
|
|
|
192
192
|
miniBasketOpen
|
|
193
193
|
? 'opacity-100 visible lg:invisible'
|
|
194
194
|
: 'opacity-0 invisible',
|
|
195
|
-
'fixed top-0 left-0 z-50 w-screen h-screen bg-black
|
|
195
|
+
'fixed top-0 left-0 z-50 w-screen h-screen bg-black/80 transition-all duration-300'
|
|
196
196
|
)}
|
|
197
197
|
onClick={() => {
|
|
198
198
|
dispatch(closeMiniBasket());
|
|
@@ -206,7 +206,7 @@ export default function MiniBasket() {
|
|
|
206
206
|
'fixed lg:absolute bottom-0 lg:-bottom-1 right-0 w-80 h-screen lg:h-auto bg-white lg:border-l lg:border-t lg:border-r-2 lg:border-b-2 lg:border-gray-500 p-5 z-50 transition-all duration-300'
|
|
207
207
|
)}
|
|
208
208
|
>
|
|
209
|
-
<header className="flex items-center gap-2 pb-3 border-b">
|
|
209
|
+
<header className="flex items-center gap-2 pb-3 border-b border-gray-200">
|
|
210
210
|
<h3 className="text-xl font-bold">
|
|
211
211
|
{t('basket.mini_basket.my_bag')}
|
|
212
212
|
</h3>
|
|
@@ -58,9 +58,9 @@ export default function MobileMenu(props: MobileMenuProps) {
|
|
|
58
58
|
<>
|
|
59
59
|
<div
|
|
60
60
|
className={clsx(
|
|
61
|
-
'fixed top-0 left-0 z-30 w-screen h-screen invisible opacity-0 bg-black
|
|
61
|
+
'fixed top-0 left-0 z-30 w-screen h-screen invisible opacity-0 bg-black/80 transition duration-500',
|
|
62
62
|
{
|
|
63
|
-
'!
|
|
63
|
+
'visible! opacity-100! scroll-lock': isMobileMenuOpen
|
|
64
64
|
}
|
|
65
65
|
)}
|
|
66
66
|
/>
|
|
@@ -70,7 +70,7 @@ export default function MobileMenu(props: MobileMenuProps) {
|
|
|
70
70
|
className={clsx(
|
|
71
71
|
'fixed top-0 left-0 z-50 flex flex-col bg-white w-72 pt-4 h-screen invisible opacity-0 transition duration-500 transform -translate-x-72',
|
|
72
72
|
{
|
|
73
|
-
'!
|
|
73
|
+
'visible! opacity-100! translate-x-0': isMobileMenuOpen
|
|
74
74
|
}
|
|
75
75
|
)}
|
|
76
76
|
>
|
|
@@ -106,15 +106,15 @@ export default function MobileMenu(props: MobileMenuProps) {
|
|
|
106
106
|
className={clsx(
|
|
107
107
|
'absolute top-0 left-0 right-0 px-8 bg-white invisible opacity-0 transition duration-500 transform translate-x-full',
|
|
108
108
|
{
|
|
109
|
-
'!
|
|
109
|
+
'visible! opacity-100! translate-x-0!': selectedSubMenu
|
|
110
110
|
}
|
|
111
111
|
)}
|
|
112
112
|
>
|
|
113
|
-
<header className="flex items-center justify-between border-b h-[61px] py-4 mb-4">
|
|
113
|
+
<header className="flex items-center justify-between border-b border-gray-200 h-[61px] py-4 mb-4">
|
|
114
114
|
<Button
|
|
115
115
|
appearance="ghost"
|
|
116
116
|
onClick={() => setSelectedSubMenu(null)}
|
|
117
|
-
className="underline text-xs font-semibold flex items-center gap-2
|
|
117
|
+
className="underline text-xs font-semibold flex items-center gap-2 p-0!"
|
|
118
118
|
>
|
|
119
119
|
<Icon name="chevron-start" size={12} className="shrink-0" />
|
|
120
120
|
{t('common.mobile_menu.back')}
|
|
@@ -34,7 +34,7 @@ export const PwaBackButton = () => {
|
|
|
34
34
|
return (
|
|
35
35
|
<div className="relative z-10 md:top-0 md:left-0 md:fixed">
|
|
36
36
|
<button
|
|
37
|
-
className="bg-secondary-600 text-white flex items-center justify-center
|
|
37
|
+
className="bg-secondary-600 text-white flex items-center justify-center shrink-0 w-12 h-12 md:w-10 md:h-9 active:bg-secondary-700"
|
|
38
38
|
onClick={() => router.back()}
|
|
39
39
|
>
|
|
40
40
|
<svg
|