@riosst100/pwa-marketplace 1.3.8 → 1.4.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/package.json +1 -1
- package/src/componentOverrideMapping.js +1 -0
- package/src/components/AttributesBlock/attributesBlock.js +54 -0
- package/src/components/AttributesBlock/attributesBlock.module.css +28 -0
- package/src/components/BecomeSeller/becomeSeller.module.css +1 -1
- package/src/components/BecomeSellerLink/becomeSellerLink.js +1 -1
- package/src/components/CurrencySwitcher/index.js +1 -1
- package/src/components/Filter/index.js +2 -2
- package/src/components/Pagination/index.js +4 -4
- package/src/components/ProductItem/index.js +1 -1
- package/src/components/ProductListTab/productListTab.module.css +1 -1
- package/src/components/SellerDetail/sellerDetail.js +2 -2
- package/src/components/SellerInformation/sellerInformation.js +9 -9
- package/src/components/SellerLocation/sellerLocationItem.js +3 -3
- package/src/components/SellerProducts/sellerProducts.js +2 -2
- package/src/components/SellerReview/sellerReview.js +11 -11
- package/src/components/SellerReviewItem/sellerReviewItem.js +6 -6
- package/src/components/SellerVerification/sellerVerification.module.css +1 -1
- package/src/components/ShopByCategory/shopByCategory.module.css +1 -1
- package/src/components/SortBy/index.js +2 -2
- package/src/components/SubCategory/subCategory.js +1 -1
- package/src/components/SubCategory/subCategory.module.css +1 -1
- package/src/components/WebsiteSwitcher/websiteSwitcher.js +5 -5
- package/src/components/commons/Tabs/index.js +2 -2
- package/src/overwrites/peregrine/lib/talons/MegaMenu/megaMenu.gql.js +2 -0
- package/src/overwrites/peregrine/lib/talons/RootComponents/Category/categoryContent.gql.js +8 -0
- package/src/overwrites/peregrine/lib/talons/RootComponents/Category/useCategoryContent.js +10 -1
- package/src/overwrites/venia-ui/lib/RootComponents/Category/category.module.css +2 -1
- package/src/overwrites/venia-ui/lib/RootComponents/Category/categoryContent.js +5 -1
- package/src/overwrites/venia-ui/lib/components/Breadcrumbs/breadcrumbs.module.css +4 -4
- package/src/overwrites/venia-ui/lib/components/Checkbox/checkbox.module.css +1 -1
- package/src/overwrites/venia-ui/lib/components/FilterModal/CurrentFilters/currentFilter.module.css +1 -1
- package/src/overwrites/venia-ui/lib/components/FilterModal/FilterList/filterList.js +2 -2
- package/src/overwrites/venia-ui/lib/components/FilterModal/FilterList/filterList.module.css +1 -1
- package/src/overwrites/venia-ui/lib/components/FilterModal/filterBlock.module.css +1 -1
- package/src/overwrites/venia-ui/lib/components/FilterModal/filterModal.module.css +1 -1
- package/src/overwrites/venia-ui/lib/components/FilterSidebar/filterSidebar.module.css +4 -3
- package/src/overwrites/venia-ui/lib/components/Gallery/item.module.css +3 -3
- package/src/overwrites/venia-ui/lib/components/Gallery/star.js +1 -1
- package/src/overwrites/venia-ui/lib/components/Header/accountTrigger.js +2 -2
- package/src/overwrites/venia-ui/lib/components/Header/cartTrigger.js +3 -3
- package/src/overwrites/venia-ui/lib/components/Header/cartTrigger.module.css +47 -0
- package/src/overwrites/venia-ui/lib/components/Header/header.js +2 -2
- package/src/overwrites/venia-ui/lib/components/Header/storeSwitcher.js +5 -5
- package/src/overwrites/venia-ui/lib/components/Header/wishlistTrigger.js +1 -1
- package/src/overwrites/venia-ui/lib/components/MegaMenu/megaMenuItem.js +1 -0
- package/src/overwrites/venia-ui/lib/components/MegaMenu/shopByColumn.js +70 -25
- package/src/overwrites/venia-ui/lib/components/MegaMenu/shopByColumn.module.css +2 -4
- package/src/overwrites/venia-ui/lib/components/MegaMenu/submenu.js +10 -7
- package/src/overwrites/venia-ui/lib/components/MegaMenu/submenu.module.css +14 -7
- package/src/overwrites/venia-ui/lib/components/MegaMenu/submenuColumn.js +4 -1
- package/src/overwrites/venia-ui/lib/components/MegaMenu/submenuColumn.module.css +3 -3
- package/src/overwrites/venia-ui/lib/components/ProductFullDetail/productFullDetail.js +2 -2
- package/src/overwrites/venia-ui/lib/components/ProductSort/productSort.module.css +1 -1
- package/src/overwrites/venia-ui/lib/components/ProductSort/sortItem.module.css +1 -1
- package/src/overwrites/venia-ui/lib/components/RadioGroup/radio.js +60 -0
- package/src/overwrites/venia-ui/lib/components/RadioGroup/radio.module.css +70 -0
- package/src/overwrites/venia-ui/lib/components/SearchBar/autocomplete.module.css +1 -1
- package/src/overwrites/venia-ui/lib/components/SearchBar/suggestions.module.css +1 -1
- package/src/overwrites/venia-ui/lib/components/TextInput/field.module.css +1 -1
- package/src/talons/AttributesBlock/attributesBlock.gql.js +15 -0
- package/src/talons/AttributesBlock/useAttributesBlock.js +37 -0
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
.submenuColumn {
|
|
2
2
|
composes: max-w-[235px] from global;
|
|
3
|
-
composes: p-
|
|
3
|
+
composes: p-2 from global;
|
|
4
4
|
}
|
|
5
5
|
|
|
6
6
|
.heading {
|
|
@@ -20,9 +20,9 @@
|
|
|
20
20
|
}
|
|
21
21
|
|
|
22
22
|
.submenuChild {
|
|
23
|
-
composes: mt-
|
|
23
|
+
composes: mt-0 from global;
|
|
24
24
|
}
|
|
25
25
|
|
|
26
26
|
.submenuChildItem {
|
|
27
|
-
composes: mb-
|
|
27
|
+
composes: mb-0 from global;
|
|
28
28
|
}
|
|
@@ -266,12 +266,12 @@ const ProductFullDetail = props => {
|
|
|
266
266
|
</h1>
|
|
267
267
|
<div className='product_review-container flex items-center gap-x-2'>
|
|
268
268
|
<div className='product_rating leading-[14px]'>
|
|
269
|
-
<span className='text-gray-200 text-
|
|
269
|
+
<span className='text-gray-200 text-base'>
|
|
270
270
|
{rating_value}
|
|
271
271
|
</span>
|
|
272
272
|
</div>
|
|
273
273
|
<div className='before_block before_w-[1px] before_bg-gray-200 before_h-full before_relative w-[1px] h-[14px]'></div>
|
|
274
|
-
<span className='review_count text-gray-200 text-
|
|
274
|
+
<span className='review_count text-gray-200 text-base leading-[14px]'>
|
|
275
275
|
{review_count} Reviews
|
|
276
276
|
</span>
|
|
277
277
|
</div>
|
|
@@ -0,0 +1,60 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
import { Circle } from 'react-feather';
|
|
3
|
+
import { node, shape, string } from 'prop-types';
|
|
4
|
+
import { Radio as InformedRadio } from 'informed';
|
|
5
|
+
|
|
6
|
+
import { useStyle } from '@magento/venia-ui/lib/classify';
|
|
7
|
+
import defaultClasses from './radio.module.css';
|
|
8
|
+
|
|
9
|
+
/* TODO: change lint config to use `label-has-associated-control` */
|
|
10
|
+
/* eslint-disable jsx-a11y/label-has-for */
|
|
11
|
+
|
|
12
|
+
const RadioOption = props => {
|
|
13
|
+
const {
|
|
14
|
+
ariaLabel,
|
|
15
|
+
classes: propClasses,
|
|
16
|
+
id,
|
|
17
|
+
label,
|
|
18
|
+
value,
|
|
19
|
+
...rest
|
|
20
|
+
} = props;
|
|
21
|
+
const classes = useStyle(defaultClasses, propClasses);
|
|
22
|
+
|
|
23
|
+
return (
|
|
24
|
+
<label
|
|
25
|
+
className={classes.root}
|
|
26
|
+
htmlFor={id}
|
|
27
|
+
aria-label={ariaLabel ? ariaLabel : ''}
|
|
28
|
+
>
|
|
29
|
+
<InformedRadio
|
|
30
|
+
{...rest}
|
|
31
|
+
className={classes.input}
|
|
32
|
+
id={id}
|
|
33
|
+
value={value}
|
|
34
|
+
/>
|
|
35
|
+
<span className={classes.icon}>
|
|
36
|
+
<Circle />
|
|
37
|
+
</span>
|
|
38
|
+
<span className={classes.label}>
|
|
39
|
+
{label || (value != null ? value : '')}
|
|
40
|
+
</span>
|
|
41
|
+
</label>
|
|
42
|
+
);
|
|
43
|
+
};
|
|
44
|
+
|
|
45
|
+
export default RadioOption;
|
|
46
|
+
|
|
47
|
+
RadioOption.propTypes = {
|
|
48
|
+
ariaLabel: string,
|
|
49
|
+
classes: shape({
|
|
50
|
+
icon: string,
|
|
51
|
+
input: string,
|
|
52
|
+
label: string,
|
|
53
|
+
root: string
|
|
54
|
+
}),
|
|
55
|
+
id: string.isRequired,
|
|
56
|
+
label: node.isRequired,
|
|
57
|
+
value: node.isRequired
|
|
58
|
+
};
|
|
59
|
+
|
|
60
|
+
/* eslint-enable jsx-a11y/label-has-for */
|
|
@@ -0,0 +1,70 @@
|
|
|
1
|
+
.root {
|
|
2
|
+
composes: gap-1 from global;
|
|
3
|
+
composes: grid from global;
|
|
4
|
+
composes: grid-flow-col from global;
|
|
5
|
+
composes: items-center from global;
|
|
6
|
+
composes: justify-items-center from global;
|
|
7
|
+
composes: leading-normal from global;
|
|
8
|
+
composes: m-0 from global;
|
|
9
|
+
composes: text-colorDefault from global;
|
|
10
|
+
grid-template-areas: 'input label';
|
|
11
|
+
grid-template-columns: min-content 1fr;
|
|
12
|
+
}
|
|
13
|
+
|
|
14
|
+
.input {
|
|
15
|
+
composes: appearance-none from global;
|
|
16
|
+
composes: bg-clip-content from global;
|
|
17
|
+
composes: bg-transparent from global;
|
|
18
|
+
composes: border-8 from global;
|
|
19
|
+
composes: border-solid from global;
|
|
20
|
+
composes: border-transparent from global;
|
|
21
|
+
composes: h-[1.5rem] from global;
|
|
22
|
+
composes: m-0 from global;
|
|
23
|
+
composes: rounded-full from global;
|
|
24
|
+
composes: w-[1.5rem] from global;
|
|
25
|
+
composes: z-foreground from global;
|
|
26
|
+
grid-area: input;
|
|
27
|
+
|
|
28
|
+
composes: active_outline-none from global;
|
|
29
|
+
/* composes: active_shadow-radioActive from global; */
|
|
30
|
+
|
|
31
|
+
composes: checked_bg-brand-dark from global;
|
|
32
|
+
|
|
33
|
+
composes: focus_outline-none from global;
|
|
34
|
+
/* composes: focus_shadow-radioFocus from global; */
|
|
35
|
+
}
|
|
36
|
+
|
|
37
|
+
.icon {
|
|
38
|
+
composes: h-[14px] from global;
|
|
39
|
+
composes: w-[14px] from global;
|
|
40
|
+
composes: z-surface from global;
|
|
41
|
+
grid-area: input;
|
|
42
|
+
}
|
|
43
|
+
|
|
44
|
+
/* TODO @TW: cannot compose */
|
|
45
|
+
.icon svg {
|
|
46
|
+
/* composes: stroke-gray-600 from global; */
|
|
47
|
+
stroke: rgb(var(--venia-global-color-gray-600));
|
|
48
|
+
width: 14px;
|
|
49
|
+
height: 14px;
|
|
50
|
+
}
|
|
51
|
+
|
|
52
|
+
.label {
|
|
53
|
+
composes: justify-self-start from global;
|
|
54
|
+
composes: text-base from global;
|
|
55
|
+
grid-area: label;
|
|
56
|
+
}
|
|
57
|
+
|
|
58
|
+
/* TODO @TW: cannot compose */
|
|
59
|
+
.input:checked + .icon svg {
|
|
60
|
+
/* composes: stroke-brand-base from global; */
|
|
61
|
+
stroke: rgb(var(--venia-brand-color-1-700));
|
|
62
|
+
}
|
|
63
|
+
|
|
64
|
+
.input_shimmer {
|
|
65
|
+
composes: h-[14px] from global;
|
|
66
|
+
composes: m-0 from global;
|
|
67
|
+
composes: rounded-full from global;
|
|
68
|
+
composes: w-[14px] from global;
|
|
69
|
+
composes: z-foreground from global;
|
|
70
|
+
}
|
|
@@ -13,7 +13,7 @@
|
|
|
13
13
|
composes: rounded-b-md from global;
|
|
14
14
|
composes: rounded-t-none from global;
|
|
15
15
|
composes: shadow-inputFocus from global;
|
|
16
|
-
composes: text-
|
|
16
|
+
composes: text-base from global;
|
|
17
17
|
composes: top-9 from global;
|
|
18
18
|
composes: z-menu from global;
|
|
19
19
|
transition-property: opacity, transform, visibility;
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
import { gql } from '@apollo/client';
|
|
2
|
+
|
|
3
|
+
export const GET_STORE_CONFIG_DATA = gql`
|
|
4
|
+
query GetStoreConfigForBreadcrumbs {
|
|
5
|
+
# eslint-disable-next-line @graphql-eslint/require-id-when-available
|
|
6
|
+
storeConfig {
|
|
7
|
+
store_code
|
|
8
|
+
category_url_suffix
|
|
9
|
+
}
|
|
10
|
+
}
|
|
11
|
+
`;
|
|
12
|
+
|
|
13
|
+
export default {
|
|
14
|
+
getStoreConfigQuery: GET_STORE_CONFIG_DATA
|
|
15
|
+
};
|
|
@@ -0,0 +1,37 @@
|
|
|
1
|
+
import { useMemo } from 'react';
|
|
2
|
+
import { useQuery } from '@apollo/client';
|
|
3
|
+
|
|
4
|
+
import mergeOperations from '@magento/peregrine/lib/util/shallowMerge';
|
|
5
|
+
|
|
6
|
+
import DEFAULT_OPERATIONS from './attributesBlock.gql';
|
|
7
|
+
|
|
8
|
+
const getPath = (path, suffix) => {
|
|
9
|
+
if (path) {
|
|
10
|
+
return `/${path}${suffix || ''}`;
|
|
11
|
+
}
|
|
12
|
+
|
|
13
|
+
// If there is no path this is just a dead link.
|
|
14
|
+
return '#';
|
|
15
|
+
};
|
|
16
|
+
|
|
17
|
+
export const useAttributesBlock = props => {
|
|
18
|
+
const { attributesBlock } = props;
|
|
19
|
+
|
|
20
|
+
const operations = mergeOperations(DEFAULT_OPERATIONS, props.operations);
|
|
21
|
+
const { getStoreConfigQuery } = operations;
|
|
22
|
+
|
|
23
|
+
const { data: storeConfigData } = useQuery(getStoreConfigQuery, {
|
|
24
|
+
fetchPolicy: 'cache-and-network'
|
|
25
|
+
});
|
|
26
|
+
|
|
27
|
+
const categoryUrlSuffix = useMemo(() => {
|
|
28
|
+
if (storeConfigData) {
|
|
29
|
+
return storeConfigData.storeConfig.category_url_suffix;
|
|
30
|
+
}
|
|
31
|
+
}, [storeConfigData]);
|
|
32
|
+
|
|
33
|
+
return {
|
|
34
|
+
categoryUrlSuffix,
|
|
35
|
+
getPath
|
|
36
|
+
};
|
|
37
|
+
};
|