@hanzo/commerce 4.9.0 → 5.0.0
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/components/add-to-cart-widget.tsx +0 -1
- package/components/{checkout-panel/cart-accordian.tsx → cart-accordian.tsx} +18 -9
- package/components/cart-panel/cart-line-item.tsx +22 -28
- package/components/cart-panel/index.tsx +57 -33
- package/components/index.ts +4 -1
- package/components/item-carousel.tsx +80 -0
- package/components/{checkout-panel/steps/payment/cards/index.tsx → payment-step-form/card-icon-row.tsx} +6 -6
- package/components/{checkout-panel/steps/payment → payment-step-form}/cc-button.tsx +1 -1
- package/components/payment-step-form/contact-form.tsx +49 -0
- package/components/{checkout-panel/steps/payment → payment-step-form}/index.tsx +27 -54
- package/components/{checkout-panel/steps/payment/pay-with-bank-transfer.tsx → payment-step-form/methods/bank-transfer.tsx} +17 -17
- package/components/{checkout-panel/steps/payment/pay-with-card.tsx → payment-step-form/methods/card.tsx} +8 -20
- package/components/{checkout-panel/steps/payment/pay-with-crypto.tsx → payment-step-form/methods/crypto.tsx} +8 -22
- package/components/payment-step-form/methods/index.ts +23 -0
- package/components/{checkout-panel/steps/shipping-info.tsx → shipping-step-form.tsx} +6 -8
- package/package.json +2 -2
- package/types/checkout.ts +43 -1
- package/types/index.ts +1 -1
- package/components/cart-panel/products-carousel.tsx +0 -60
- package/components/checkout-panel/_confirm-order.tsx_unused +0 -143
- package/components/checkout-panel/close-button.tsx +0 -24
- package/components/checkout-panel/desktop.tsx +0 -46
- package/components/checkout-panel/icons/bag-icon.tsx +0 -10
- package/components/checkout-panel/index.tsx +0 -108
- package/components/checkout-panel/mobile.tsx +0 -41
- package/components/checkout-panel/steps/payment/contact-info.tsx +0 -56
- package/components/checkout-panel/steps/thank-you.tsx +0 -18
- package/components/checkout-panel/steps/types.ts +0 -14
- /package/components/{checkout-panel/steps/payment/cards → payment-step-form/card-icons}/amex.tsx +0 -0
- /package/components/{checkout-panel/steps/payment/cards → payment-step-form/card-icons}/diners-club.tsx +0 -0
- /package/components/{checkout-panel/steps/payment/cards → payment-step-form/card-icons}/discover.tsx +0 -0
- /package/components/{checkout-panel/steps/payment/cards → payment-step-form/card-icons}/jcb.tsx +0 -0
- /package/components/{checkout-panel/steps/payment/cards → payment-step-form/card-icons}/mastercard.tsx +0 -0
- /package/components/{checkout-panel/steps/payment/cards → payment-step-form/card-icons}/visa.tsx +0 -0
- /package/components/{checkout-panel/icons → payment-step-form/crypto-icons}/btc.tsx +0 -0
- /package/components/{checkout-panel/icons → payment-step-form/crypto-icons}/eth.tsx +0 -0
- /package/components/{checkout-panel/icons → payment-step-form/crypto-icons}/usdt.tsx +0 -0
|
@@ -1,56 +0,0 @@
|
|
|
1
|
-
import {
|
|
2
|
-
Form,
|
|
3
|
-
FormControl,
|
|
4
|
-
FormField,
|
|
5
|
-
FormItem,
|
|
6
|
-
FormMessage,
|
|
7
|
-
} from '@hanzo/ui/primitives/form'
|
|
8
|
-
import { Input } from '@hanzo/ui/primitives'
|
|
9
|
-
import type { UseFormReturn } from 'react-hook-form'
|
|
10
|
-
|
|
11
|
-
const ContactInfo: React.FC<{
|
|
12
|
-
form: UseFormReturn<{
|
|
13
|
-
name: string
|
|
14
|
-
email: string
|
|
15
|
-
}, any, {
|
|
16
|
-
name: string
|
|
17
|
-
email: string
|
|
18
|
-
}>,
|
|
19
|
-
}> = ({
|
|
20
|
-
form,
|
|
21
|
-
}) => {
|
|
22
|
-
return (
|
|
23
|
-
<Form {...form}>
|
|
24
|
-
<form className='text-left'>
|
|
25
|
-
<div className='flex flex-col gap-1 sm:gap-2'>
|
|
26
|
-
<FormField
|
|
27
|
-
control={form.control}
|
|
28
|
-
name='name'
|
|
29
|
-
render={({ field }) => (
|
|
30
|
-
<FormItem className='w-full'>
|
|
31
|
-
<FormControl>
|
|
32
|
-
<Input {...field} className='border-muted-4' placeholder='Full name'/>
|
|
33
|
-
</FormControl>
|
|
34
|
-
<FormMessage className='py-0 space-y-0 !m-0'/>
|
|
35
|
-
</FormItem>
|
|
36
|
-
)}
|
|
37
|
-
/>
|
|
38
|
-
<FormField
|
|
39
|
-
control={form.control}
|
|
40
|
-
name='email'
|
|
41
|
-
render={({ field }) => (
|
|
42
|
-
<FormItem className='w-full'>
|
|
43
|
-
<FormControl>
|
|
44
|
-
<Input {...field} className='border-muted-4' placeholder='Email'/>
|
|
45
|
-
</FormControl>
|
|
46
|
-
<FormMessage className='py-0 space-y-0 !m-0'/>
|
|
47
|
-
</FormItem>
|
|
48
|
-
)}
|
|
49
|
-
/>
|
|
50
|
-
</div>
|
|
51
|
-
</form>
|
|
52
|
-
</Form>
|
|
53
|
-
)
|
|
54
|
-
}
|
|
55
|
-
|
|
56
|
-
export default ContactInfo
|
|
@@ -1,18 +0,0 @@
|
|
|
1
|
-
import React from 'react'
|
|
2
|
-
import Link from 'next/link'
|
|
3
|
-
|
|
4
|
-
import { ApplyTypography } from '@hanzo/ui/primitives'
|
|
5
|
-
|
|
6
|
-
import type { StepComponentProps } from './types'
|
|
7
|
-
|
|
8
|
-
const ThankYou: React.FC<StepComponentProps> = ({}) => (
|
|
9
|
-
<ApplyTypography className='flex flex-col gap-4 text-center mt-10'>
|
|
10
|
-
<h3>Thank you for your order!</h3>
|
|
11
|
-
<h6>Once your payment has been confirmed we will send additional information to your email.</h6>
|
|
12
|
-
<p>
|
|
13
|
-
While you wait, we cordially invite you to join the <Link href='https://warpcast.com/~/channel/lux'>Lux Channel</Link> on <Link href='https://warpcast.com/~/invite-page/227706?id=fbc9ca91'>Warpcast</Link>.
|
|
14
|
-
</p>
|
|
15
|
-
</ApplyTypography>
|
|
16
|
-
)
|
|
17
|
-
|
|
18
|
-
export default ThankYou
|
|
@@ -1,14 +0,0 @@
|
|
|
1
|
-
import type { ComponentType } from 'react'
|
|
2
|
-
|
|
3
|
-
export interface StepComponentProps {
|
|
4
|
-
onDone: () => void
|
|
5
|
-
orderId: string | undefined
|
|
6
|
-
setOrderId: (orderId: string | undefined) => void
|
|
7
|
-
}
|
|
8
|
-
|
|
9
|
-
export interface CheckoutStep {
|
|
10
|
-
name: string
|
|
11
|
-
label?: string
|
|
12
|
-
Comp: ComponentType<StepComponentProps>
|
|
13
|
-
}
|
|
14
|
-
|
/package/components/{checkout-panel/steps/payment/cards → payment-step-form/card-icons}/amex.tsx
RENAMED
|
File without changes
|
|
File without changes
|
/package/components/{checkout-panel/steps/payment/cards → payment-step-form/card-icons}/discover.tsx
RENAMED
|
File without changes
|
/package/components/{checkout-panel/steps/payment/cards → payment-step-form/card-icons}/jcb.tsx
RENAMED
|
File without changes
|
|
File without changes
|
/package/components/{checkout-panel/steps/payment/cards → payment-step-form/card-icons}/visa.tsx
RENAMED
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|