@akinon/pz-b2b 2.0.0-beta.5 → 2.0.0-beta.6
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 +6 -0
- package/package.json +1 -1
- package/src/basket-b2b/index.tsx +4 -4
- package/src/hook/use-b2b.tsx +1 -1
- package/src/views/basket-b2b/basket-item.tsx +11 -11
- package/src/views/basket-b2b/request-quote-modal.tsx +1 -1
- package/src/views/basket-b2b/save-cart-modal.tsx +1 -1
- package/src/views/basket-b2b/upload-modal.tsx +1 -1
- package/src/views/product/store-modal.tsx +2 -2
package/CHANGELOG.md
CHANGED
package/package.json
CHANGED
package/src/basket-b2b/index.tsx
CHANGED
|
@@ -184,7 +184,7 @@ export function BasketB2b({ translations }: BasketB2bProps) {
|
|
|
184
184
|
|
|
185
185
|
return (
|
|
186
186
|
<>
|
|
187
|
-
<div className="max-w-
|
|
187
|
+
<div className="max-w-(--breakpoint-xl) p-4 flex flex-col text-primary-800 lg:p-8 xl:flex-row xl:mx-auto">
|
|
188
188
|
{isLoading && (
|
|
189
189
|
<div className="flex justify-center w-full">
|
|
190
190
|
<LoaderSpinner />
|
|
@@ -232,7 +232,7 @@ export function BasketB2b({ translations }: BasketB2bProps) {
|
|
|
232
232
|
</div>
|
|
233
233
|
|
|
234
234
|
<div className="w-full overflow-x-auto">
|
|
235
|
-
<table className="border table-fixed overflow-scroll align-middle lg:w-full">
|
|
235
|
+
<table className="border border-gray-200 table-fixed overflow-scroll align-middle lg:w-full">
|
|
236
236
|
<thead className="bg-[#eff1f8]">
|
|
237
237
|
<tr>
|
|
238
238
|
<th className="w-7 border border-[#d5dadb]"></th>
|
|
@@ -313,7 +313,7 @@ export function BasketB2b({ translations }: BasketB2bProps) {
|
|
|
313
313
|
</div>
|
|
314
314
|
) : (
|
|
315
315
|
<div
|
|
316
|
-
className="flex flex-col items-center container max-w-
|
|
316
|
+
className="flex flex-col items-center container max-w-(--breakpoint-sm) py-4 px-4 xs:py-6 xs:px-6 sm:py-8 sm:px-8 lg:max-w-(--breakpoint-xl)
|
|
317
317
|
shadow-[0_0_4px_0_rgba(194,194,194,0.5)]"
|
|
318
318
|
>
|
|
319
319
|
<div className="w-full text-sm text-black-800 text-center my-4 mb-2 sm:text-base">
|
|
@@ -331,7 +331,7 @@ export function BasketB2b({ translations }: BasketB2bProps) {
|
|
|
331
331
|
<i className="pz-icon-chevron-down absolute right-4 top-1/2 -translate-y-1/2 pointer-events-none"></i>
|
|
332
332
|
<select
|
|
333
333
|
onChange={(e) => setSelectedDraft(e.target.value)}
|
|
334
|
-
className="w-[230px] h-[40px] mb-1 border border-[#d4d4d4] px-4 appearance-none text-sm outline-
|
|
334
|
+
className="w-[230px] h-[40px] mb-1 border border-[#d4d4d4] px-4 appearance-none text-sm outline-hidden cursor-pointer"
|
|
335
335
|
>
|
|
336
336
|
<option value="">
|
|
337
337
|
{_translations.empty.choose_cart_placeholder}
|
package/src/hook/use-b2b.tsx
CHANGED
|
@@ -29,7 +29,7 @@ const B2bButton = useCallback(({buttonText}) => {
|
|
|
29
29
|
return isVisible ? (
|
|
30
30
|
<Button
|
|
31
31
|
className={twMerge(
|
|
32
|
-
'fixed bottom-0 right-0 w-1/2 h-14 z-
|
|
32
|
+
'fixed bottom-0 right-0 w-1/2 h-14 z-20 flex items-center justify-center fill-primary-foreground hover:fill-primary sm:relative sm:w-full sm:mt-3 sm:font-semibold',
|
|
33
33
|
divisionLoading && 'bg-black/50'
|
|
34
34
|
)}
|
|
35
35
|
onClick={() => setOpenSelectStoreModal(true)}
|
|
@@ -50,7 +50,7 @@ export const BasketItem = (props: Props) => {
|
|
|
50
50
|
<tr>
|
|
51
51
|
<td>
|
|
52
52
|
<div className="h-[183px] w-full flex flex-col justify-between items-center text-xs">
|
|
53
|
-
<div className="w-full flex items-center justify-center py-3 mb-3 border-b">
|
|
53
|
+
<div className="w-full flex items-center justify-center py-3 mb-3 border-b border-gray-200">
|
|
54
54
|
<Icon name="chevron-down" size={10} />
|
|
55
55
|
</div>
|
|
56
56
|
|
|
@@ -74,7 +74,7 @@ export const BasketItem = (props: Props) => {
|
|
|
74
74
|
onClick={() => {
|
|
75
75
|
setProductToBeDeleted(basketItem), setRemoveProduct(true);
|
|
76
76
|
}}
|
|
77
|
-
className="py-1.5 border-t w-full flex items-center justify-center"
|
|
77
|
+
className="py-1.5 border-t border-gray-200 w-full flex items-center justify-center"
|
|
78
78
|
style={{ writingMode: 'vertical-rl', textOrientation: 'mixed' }}
|
|
79
79
|
>
|
|
80
80
|
{deleteText}
|
|
@@ -82,7 +82,7 @@ export const BasketItem = (props: Props) => {
|
|
|
82
82
|
</div>
|
|
83
83
|
</td>
|
|
84
84
|
|
|
85
|
-
<td className="border text-center">
|
|
85
|
+
<td className="border border-gray-200 text-center">
|
|
86
86
|
<div className="min-w-[80px] w-full h-full flex items-center justify-center">
|
|
87
87
|
<Image
|
|
88
88
|
src={basketItem.product.product_image}
|
|
@@ -93,26 +93,26 @@ export const BasketItem = (props: Props) => {
|
|
|
93
93
|
</div>
|
|
94
94
|
</td>
|
|
95
95
|
|
|
96
|
-
<td className="min-w-[181px] text-sm border text-[#3f4b5c] leading-normal">
|
|
96
|
+
<td className="min-w-[181px] text-sm border border-gray-200 text-[#3f4b5c] leading-normal">
|
|
97
97
|
<div className="px-4">
|
|
98
98
|
<div className="break-words">{basketItem.product.name}</div>
|
|
99
99
|
<div className="break-words">SKU: {basketItem.product.sku}</div>
|
|
100
100
|
</div>
|
|
101
101
|
</td>
|
|
102
102
|
|
|
103
|
-
<td className="text-sm border text-[#3f4b5c] leading-normal text-right px-3">
|
|
103
|
+
<td className="text-sm border border-gray-200 text-[#3f4b5c] leading-normal text-right px-3">
|
|
104
104
|
<Price value={basketItem.price} className="w-max block" />
|
|
105
105
|
</td>
|
|
106
106
|
|
|
107
|
-
<td className="text-sm border text-[#3f4b5c] leading-normal text-center">
|
|
107
|
+
<td className="text-sm border border-gray-200 text-[#3f4b5c] leading-normal text-center">
|
|
108
108
|
<div className="min-w-[90px]">{basketItem.quantity}</div>
|
|
109
109
|
</td>
|
|
110
110
|
|
|
111
|
-
<td className="border">
|
|
111
|
+
<td className="border border-gray-200">
|
|
112
112
|
<div className="min-w-[140px]">
|
|
113
113
|
{basketItem.divisions.map((division) => (
|
|
114
114
|
<div
|
|
115
|
-
className="py-5 px-1 border-b last:border-0 text-center flex items-center justify-center gap-x-1"
|
|
115
|
+
className="py-5 px-1 border-b border-gray-200 last:border-0 text-center flex items-center justify-center gap-x-1"
|
|
116
116
|
key={division.name}
|
|
117
117
|
>
|
|
118
118
|
<Icon name="b2b-info" size={18} className="text-[#293245]" />
|
|
@@ -133,7 +133,7 @@ export const BasketItem = (props: Props) => {
|
|
|
133
133
|
</div>
|
|
134
134
|
</td>
|
|
135
135
|
|
|
136
|
-
<td className="border">
|
|
136
|
+
<td className="border border-gray-200">
|
|
137
137
|
<div className="min-w-[120px]">
|
|
138
138
|
{basketItem.divisions.map((division, index) => (
|
|
139
139
|
<div
|
|
@@ -141,7 +141,7 @@ export const BasketItem = (props: Props) => {
|
|
|
141
141
|
key={`division-${division.id}`}
|
|
142
142
|
>
|
|
143
143
|
<Input
|
|
144
|
-
className="appearance-none outline-
|
|
144
|
+
className="appearance-none outline-hidden w-20 h-6 px-2 py-0 border border-[#c8daec] rounded-sm text-right"
|
|
145
145
|
type="number"
|
|
146
146
|
value={division.quantity}
|
|
147
147
|
onChange={(e) => handleChange(division.id, e, index)}
|
|
@@ -159,7 +159,7 @@ export const BasketItem = (props: Props) => {
|
|
|
159
159
|
</div>
|
|
160
160
|
</td>
|
|
161
161
|
|
|
162
|
-
<td className="text-sm border text-[#3f4b5c] leading-normal text-right px-6">
|
|
162
|
+
<td className="text-sm border border-gray-200 text-[#3f4b5c] leading-normal text-right px-6">
|
|
163
163
|
<Price value={basketItem.total_amount} className="w-max block" />
|
|
164
164
|
</td>
|
|
165
165
|
</tr>
|
|
@@ -69,7 +69,7 @@ export const RequestQuoteModal = ({
|
|
|
69
69
|
id="cart-name-input"
|
|
70
70
|
name="name"
|
|
71
71
|
type="text"
|
|
72
|
-
className="h-8 border border-[#eeeeee] text-sm mb-2.5 outline-
|
|
72
|
+
className="h-8 border border-[#eeeeee] text-sm mb-2.5 outline-hidden px-2 w-full"
|
|
73
73
|
onChange={(e) => setCartName(e.target.value)}
|
|
74
74
|
/>
|
|
75
75
|
|
|
@@ -60,7 +60,7 @@ export const SaveCartModal = ({
|
|
|
60
60
|
id="cart-name-input"
|
|
61
61
|
name="name"
|
|
62
62
|
type="text"
|
|
63
|
-
className="h-8 border border-[#eeeeee] text-sm mb-2.5 outline-
|
|
63
|
+
className="h-8 border border-[#eeeeee] text-sm mb-2.5 outline-hidden px-2 w-full"
|
|
64
64
|
onChange={(e) => setCartName(e.target.value)}
|
|
65
65
|
/>
|
|
66
66
|
<button
|
|
@@ -70,7 +70,7 @@ export const UploadModal = ({
|
|
|
70
70
|
onChange={handleFileChange}
|
|
71
71
|
className="opacity-0 w-full absolute left-0 top-0 h-full text-[0px] cursor-pointer"
|
|
72
72
|
/>
|
|
73
|
-
<Button className="pointer-events-none h-9 text-white border rounded mb-1">
|
|
73
|
+
<Button className="pointer-events-none h-9 text-white border border-gray-200 rounded-sm mb-1">
|
|
74
74
|
{t('basket.b2b.upload_file_modal.select_file')}
|
|
75
75
|
</Button>
|
|
76
76
|
|
|
@@ -129,7 +129,7 @@ export function StoreModal({
|
|
|
129
129
|
</header>
|
|
130
130
|
<div className="p-[15px] md:p-[30px]">
|
|
131
131
|
<table className="w-full flex flex-col h-full md:h-auto md:table md:w-[540px]">
|
|
132
|
-
<thead className="w-full
|
|
132
|
+
<thead className="w-full grow-0 shrink-0 basis-auto table">
|
|
133
133
|
<tr className="border border-[#d7d7d7] bg-[#fafafa]">
|
|
134
134
|
<th className="w-[43px] border-r border-[#d7d7d7]"></th>
|
|
135
135
|
<th className="w-[190px] md:w-auto text-[11px] text-[#99999d] py-[18px] px-4 border-r border-[#d7d7d7] text-left font-normal">
|
|
@@ -162,7 +162,7 @@ export function StoreModal({
|
|
|
162
162
|
<td className="text-right pr-6 md:pr-[37px] max-w-[111px] w-[111px] md:w-[180px] md:max-w-[180px]">
|
|
163
163
|
<input
|
|
164
164
|
type="number"
|
|
165
|
-
className="w-[64px] md:w-[84px] h-[31px] border border-[#d7d7d7] outline-
|
|
165
|
+
className="w-[64px] md:w-[84px] h-[31px] border border-[#d7d7d7] outline-hidden text-xs text-right pr-1 appearance-none"
|
|
166
166
|
onChange={(e) => handleQuantityChange(store.id, e)}
|
|
167
167
|
ref={(ref) => {
|
|
168
168
|
inputRefs[store.id] = ref;
|