@riosst100/pwa-marketplace 1.8.1 → 1.8.2
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/i18n/id_ID.json +508 -508
- package/package.json +1 -2
- package/src/components/CustomSubCategory/subCategory.js +0 -14
- package/src/components/FilterTop/FilterBlockList/filterTopItemGroup.module.css +1 -1
- package/src/components/FilterTop/filterTop.js +2 -2
- package/src/components/FilterTop/filterTop.module.css +1 -1
- package/src/components/FilterTopBackup/CustomFilters/customFilter.js +83 -83
- package/src/components/FilterTopBackup/CustomFilters/customFilter.module.css +21 -21
- package/src/components/FilterTopBackup/CustomFilters/customFilters.js +131 -131
- package/src/components/FilterTopBackup/CustomFilters/customFilters.module.css +22 -22
- package/src/components/FilterTopBackup/CustomFilters/index.js +1 -1
- package/src/components/FilterTopBackup/filterTop.js +14 -14
- package/src/components/FilterTopBackup/filterTop.module.css +22 -22
- package/src/components/FilterTopBackup/filterTop.shimmer.js +24 -24
- package/src/components/FilterTopBackup/index.js +2 -2
- package/src/components/Header/websiteSwitcher.shimmer.js +6 -6
- package/src/components/Header/websiteSwitcherItem.js +47 -47
- package/src/components/Header/websiteSwitcherItem.module.css +20 -20
- package/src/components/PhoneTextInput/index.js +1 -1
- package/src/components/PhoneTextInput/phoneTextInput.js +62 -62
- package/src/components/ProductListTab/index.js +4 -4
- package/src/components/ProductListTab/productListTab.module.css +64 -64
- package/src/components/ProductListTab/productListTab.shimmer.js +24 -24
- package/src/components/SellerCountry/index.js +1 -1
- package/src/components/SellerCountry/sellerCountry.js +71 -71
- package/src/components/SellerCountry/sellerCountry.module.css +3 -3
- package/src/components/ShopByCategory/index.js +2 -2
- package/src/components/ShopByCategory/shopByCategory.js +69 -69
- package/src/components/ShopByCategory/shopByCategory.module.css +58 -58
- package/src/components/ShopByCategory/shopByCategory.shimmer.js +24 -24
- package/src/components/SubCategory/subCategory.js +1 -1
- package/src/components/WebsiteSwitcher/websiteSwitcher.shimmer.js +6 -6
- package/src/components/WebsiteSwitcher/websiteSwitcherItem.js +47 -47
- package/src/components/WebsiteSwitcher/websiteSwitcherItem.module.css +20 -20
- package/src/overwrites/peregrine/lib/talons/MegaMenu/megaMenu.gql.js +96 -96
- package/src/overwrites/peregrine/lib/talons/MegaMenu/useMegaMenu.js +199 -199
- package/src/overwrites/peregrine/lib/talons/MegaMenu/useMegaMenuItem.js +66 -66
- package/src/overwrites/peregrine/lib/talons/MegaMenu/useSubMenu.js +20 -20
- package/src/overwrites/peregrine/lib/talons/ProductFullDetail/useProductFullDetail.js +642 -642
- package/src/overwrites/peregrine/lib/talons/RootComponents/Category/category.gql.js +49 -49
- package/src/overwrites/peregrine/lib/talons/RootComponents/Category/useCategory.js +227 -227
- package/src/overwrites/peregrine/lib/talons/RootComponents/Product/product.gql.js +31 -31
- package/src/overwrites/peregrine/lib/talons/RootComponents/Product/productDetailFragment.gql.js +235 -235
- package/src/overwrites/venia-ui/lib/components/Header/cartTrigger.module.css +47 -47
- package/src/overwrites/venia-ui/lib/components/RadioGroup/radio.js +60 -60
- package/src/overwrites/venia-ui/lib/components/RadioGroup/radio.module.css +70 -70
- package/src/talons/AttributesBlock/attributesBlock.gql.js +15 -15
- package/src/talons/CustomFilters/customFilters.gql.js +45 -45
- package/src/talons/CustomFilters/useCustomFilters.js +5 -2
- package/src/talons/FilterTop/filterTop.gql.js +45 -45
- package/src/talons/FilterTop/index.js +1 -1
- package/src/talons/FilterTop/useFilterTop.js +5 -4
- package/src/talons/Header/websiteSwitcher.gql.js +45 -45
- package/src/talons/SellerReview/sellerReview.gql.js +53 -53
- package/src/talons/ShopByCategory/index.js +1 -1
- package/src/talons/ShopByCategory/shopByCategory.gql.js +38 -38
- package/src/talons/ShopByCategory/useShopByCategory.js +69 -69
- package/src/talons/SubCategory/subCategory.gql.js +15 -15
- package/src/talons/SubCategory/useSubCategory.js +3 -3
- package/src/talons/WebsiteSwitcher/websiteSwitcher.gql.js +45 -45
|
@@ -1,71 +1,71 @@
|
|
|
1
|
-
import React from 'react';
|
|
2
|
-
import { useIntl } from 'react-intl';
|
|
3
|
-
import { func, shape, string } from 'prop-types';
|
|
4
|
-
import { useSellerCountry } from '@riosst100/pwa-marketplace/src/talons/SellerCountry/useSellerCountry';
|
|
5
|
-
|
|
6
|
-
import { useStyle } from '@magento/venia-ui/lib/classify';
|
|
7
|
-
import Field from '@magento/venia-ui/lib/components/Field';
|
|
8
|
-
import Select from '@magento/venia-ui/lib/components/Select';
|
|
9
|
-
import defaultClasses from './sellerCountry.module.css';
|
|
10
|
-
import { GET_SELLER_COUNTRIES_QUERY } from './sellerCountry.gql';
|
|
11
|
-
import { BrowserPersistence } from '@magento/peregrine/lib/util';
|
|
12
|
-
|
|
13
|
-
const storage = new BrowserPersistence();
|
|
14
|
-
|
|
15
|
-
const SellerCountry = props => {
|
|
16
|
-
const talonProps = useSellerCountry({
|
|
17
|
-
queries: {
|
|
18
|
-
getSellerCountriesQuery: GET_SELLER_COUNTRIES_QUERY
|
|
19
|
-
}
|
|
20
|
-
});
|
|
21
|
-
const { countries, loading } = talonProps;
|
|
22
|
-
const {
|
|
23
|
-
classes: propClasses,
|
|
24
|
-
field,
|
|
25
|
-
label,
|
|
26
|
-
translationId,
|
|
27
|
-
...inputProps
|
|
28
|
-
} = props;
|
|
29
|
-
const { formatMessage } = useIntl();
|
|
30
|
-
|
|
31
|
-
const classes = useStyle(defaultClasses, propClasses);
|
|
32
|
-
const websiteCode = storage.getItem('website_code') || null;
|
|
33
|
-
const currentWebsiteCountry = websiteCode && websiteCode != "base" ? websiteCode.toUpperCase() : DEFAULT_COUNTRY_CODE;
|
|
34
|
-
const selectProps = {
|
|
35
|
-
classes,
|
|
36
|
-
disabled: loading,
|
|
37
|
-
field,
|
|
38
|
-
items: countries,
|
|
39
|
-
initialValue: currentWebsiteCountry,
|
|
40
|
-
...inputProps
|
|
41
|
-
};
|
|
42
|
-
|
|
43
|
-
return (
|
|
44
|
-
<Field
|
|
45
|
-
id={classes.root}
|
|
46
|
-
label={formatMessage({ id: translationId, defaultMessage: label })}
|
|
47
|
-
classes={{ root: classes.root }}
|
|
48
|
-
>
|
|
49
|
-
<Select {...selectProps} id={classes.root} />
|
|
50
|
-
</Field>
|
|
51
|
-
);
|
|
52
|
-
};
|
|
53
|
-
|
|
54
|
-
export default SellerCountry;
|
|
55
|
-
|
|
56
|
-
SellerCountry.defaultProps = {
|
|
57
|
-
field: 'country',
|
|
58
|
-
label: 'Country',
|
|
59
|
-
translationId: 'country.label'
|
|
60
|
-
};
|
|
61
|
-
|
|
62
|
-
SellerCountry.propTypes = {
|
|
63
|
-
classes: shape({
|
|
64
|
-
root: string
|
|
65
|
-
}),
|
|
66
|
-
field: string,
|
|
67
|
-
label: string,
|
|
68
|
-
translationId: string,
|
|
69
|
-
validate: func,
|
|
70
|
-
initialValue: string
|
|
71
|
-
};
|
|
1
|
+
import React from 'react';
|
|
2
|
+
import { useIntl } from 'react-intl';
|
|
3
|
+
import { func, shape, string } from 'prop-types';
|
|
4
|
+
import { useSellerCountry } from '@riosst100/pwa-marketplace/src/talons/SellerCountry/useSellerCountry';
|
|
5
|
+
|
|
6
|
+
import { useStyle } from '@magento/venia-ui/lib/classify';
|
|
7
|
+
import Field from '@magento/venia-ui/lib/components/Field';
|
|
8
|
+
import Select from '@magento/venia-ui/lib/components/Select';
|
|
9
|
+
import defaultClasses from './sellerCountry.module.css';
|
|
10
|
+
import { GET_SELLER_COUNTRIES_QUERY } from './sellerCountry.gql';
|
|
11
|
+
import { BrowserPersistence } from '@magento/peregrine/lib/util';
|
|
12
|
+
|
|
13
|
+
const storage = new BrowserPersistence();
|
|
14
|
+
|
|
15
|
+
const SellerCountry = props => {
|
|
16
|
+
const talonProps = useSellerCountry({
|
|
17
|
+
queries: {
|
|
18
|
+
getSellerCountriesQuery: GET_SELLER_COUNTRIES_QUERY
|
|
19
|
+
}
|
|
20
|
+
});
|
|
21
|
+
const { countries, loading } = talonProps;
|
|
22
|
+
const {
|
|
23
|
+
classes: propClasses,
|
|
24
|
+
field,
|
|
25
|
+
label,
|
|
26
|
+
translationId,
|
|
27
|
+
...inputProps
|
|
28
|
+
} = props;
|
|
29
|
+
const { formatMessage } = useIntl();
|
|
30
|
+
|
|
31
|
+
const classes = useStyle(defaultClasses, propClasses);
|
|
32
|
+
const websiteCode = storage.getItem('website_code') || null;
|
|
33
|
+
const currentWebsiteCountry = websiteCode && websiteCode != "base" ? websiteCode.toUpperCase() : DEFAULT_COUNTRY_CODE;
|
|
34
|
+
const selectProps = {
|
|
35
|
+
classes,
|
|
36
|
+
disabled: loading,
|
|
37
|
+
field,
|
|
38
|
+
items: countries,
|
|
39
|
+
initialValue: currentWebsiteCountry,
|
|
40
|
+
...inputProps
|
|
41
|
+
};
|
|
42
|
+
|
|
43
|
+
return (
|
|
44
|
+
<Field
|
|
45
|
+
id={classes.root}
|
|
46
|
+
label={formatMessage({ id: translationId, defaultMessage: label })}
|
|
47
|
+
classes={{ root: classes.root }}
|
|
48
|
+
>
|
|
49
|
+
<Select {...selectProps} id={classes.root} />
|
|
50
|
+
</Field>
|
|
51
|
+
);
|
|
52
|
+
};
|
|
53
|
+
|
|
54
|
+
export default SellerCountry;
|
|
55
|
+
|
|
56
|
+
SellerCountry.defaultProps = {
|
|
57
|
+
field: 'country',
|
|
58
|
+
label: 'Country',
|
|
59
|
+
translationId: 'country.label'
|
|
60
|
+
};
|
|
61
|
+
|
|
62
|
+
SellerCountry.propTypes = {
|
|
63
|
+
classes: shape({
|
|
64
|
+
root: string
|
|
65
|
+
}),
|
|
66
|
+
field: string,
|
|
67
|
+
label: string,
|
|
68
|
+
translationId: string,
|
|
69
|
+
validate: func,
|
|
70
|
+
initialValue: string
|
|
71
|
+
};
|
|
@@ -1,3 +1,3 @@
|
|
|
1
|
-
.root {
|
|
2
|
-
grid-area: country;
|
|
3
|
-
}
|
|
1
|
+
.root {
|
|
2
|
+
grid-area: country;
|
|
3
|
+
}
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
export { default } from './shopByCategory';
|
|
2
|
-
export { default as ShopByCategoryShimmer } from './shopByCategory.shimmer';
|
|
1
|
+
export { default } from './shopByCategory';
|
|
2
|
+
export { default as ShopByCategoryShimmer } from './shopByCategory.shimmer';
|
|
@@ -1,69 +1,69 @@
|
|
|
1
|
-
import React from 'react';
|
|
2
|
-
|
|
3
|
-
import { useStyle } from '@magento/venia-ui/lib/classify';
|
|
4
|
-
import defaultClasses from './shopByCategory.module.css';
|
|
5
|
-
import { useShopByCategory } from '@riosst100/pwa-marketplace/src/talons/ShopByCategory';
|
|
6
|
-
import { Link } from 'react-router-dom';
|
|
7
|
-
import resourceUrl from '@magento/peregrine/lib/util/makeUrl';
|
|
8
|
-
|
|
9
|
-
const ShopByCategory = props => {
|
|
10
|
-
const { categoryName, children, parent } = props;
|
|
11
|
-
|
|
12
|
-
const talonProps = useShopByCategory({ children, parent });
|
|
13
|
-
|
|
14
|
-
const {
|
|
15
|
-
childrenNormalizedData,
|
|
16
|
-
parentNormalizedData
|
|
17
|
-
} = talonProps;
|
|
18
|
-
|
|
19
|
-
const classes = useStyle(defaultClasses, props.classes);
|
|
20
|
-
|
|
21
|
-
const childrenList = [];
|
|
22
|
-
|
|
23
|
-
childrenList.push(
|
|
24
|
-
<span><b>{categoryName}</b></span>
|
|
25
|
-
);
|
|
26
|
-
|
|
27
|
-
childrenNormalizedData ? childrenNormalizedData.map(({ text, path }) => {
|
|
28
|
-
childrenList.push(
|
|
29
|
-
<Link
|
|
30
|
-
to={resourceUrl(path)}
|
|
31
|
-
>
|
|
32
|
-
<div>{text}</div>
|
|
33
|
-
</Link>
|
|
34
|
-
)
|
|
35
|
-
}) : ''
|
|
36
|
-
|
|
37
|
-
const parentList = [];
|
|
38
|
-
parentNormalizedData ? parentNormalizedData.map(({ text, path }) => {
|
|
39
|
-
parentList.push(
|
|
40
|
-
<Link
|
|
41
|
-
to={resourceUrl(path)}
|
|
42
|
-
>
|
|
43
|
-
<div>{text}</div>
|
|
44
|
-
</Link>
|
|
45
|
-
)
|
|
46
|
-
}) : ''
|
|
47
|
-
|
|
48
|
-
return (
|
|
49
|
-
<aside
|
|
50
|
-
className={classes.root}
|
|
51
|
-
data-cy="ShopByCategory-root"
|
|
52
|
-
aria-busy="false"
|
|
53
|
-
>
|
|
54
|
-
<br />
|
|
55
|
-
<br />
|
|
56
|
-
{/* <div className={classes.body}> */}
|
|
57
|
-
{/* <ul> */}
|
|
58
|
-
<li>
|
|
59
|
-
<div><b>Shop By Category</b></div>
|
|
60
|
-
{parentList}
|
|
61
|
-
<ul className={classes.blocks}>{childrenList}</ul>
|
|
62
|
-
</li>
|
|
63
|
-
{/* </ul> */}
|
|
64
|
-
{/* </div> */}
|
|
65
|
-
</aside>
|
|
66
|
-
);
|
|
67
|
-
};
|
|
68
|
-
|
|
69
|
-
export default ShopByCategory;
|
|
1
|
+
import React from 'react';
|
|
2
|
+
|
|
3
|
+
import { useStyle } from '@magento/venia-ui/lib/classify';
|
|
4
|
+
import defaultClasses from './shopByCategory.module.css';
|
|
5
|
+
import { useShopByCategory } from '@riosst100/pwa-marketplace/src/talons/ShopByCategory';
|
|
6
|
+
import { Link } from 'react-router-dom';
|
|
7
|
+
import resourceUrl from '@magento/peregrine/lib/util/makeUrl';
|
|
8
|
+
|
|
9
|
+
const ShopByCategory = props => {
|
|
10
|
+
const { categoryName, children, parent } = props;
|
|
11
|
+
|
|
12
|
+
const talonProps = useShopByCategory({ children, parent });
|
|
13
|
+
|
|
14
|
+
const {
|
|
15
|
+
childrenNormalizedData,
|
|
16
|
+
parentNormalizedData
|
|
17
|
+
} = talonProps;
|
|
18
|
+
|
|
19
|
+
const classes = useStyle(defaultClasses, props.classes);
|
|
20
|
+
|
|
21
|
+
const childrenList = [];
|
|
22
|
+
|
|
23
|
+
childrenList.push(
|
|
24
|
+
<span><b>{categoryName}</b></span>
|
|
25
|
+
);
|
|
26
|
+
|
|
27
|
+
childrenNormalizedData ? childrenNormalizedData.map(({ text, path }) => {
|
|
28
|
+
childrenList.push(
|
|
29
|
+
<Link
|
|
30
|
+
to={resourceUrl(path)}
|
|
31
|
+
>
|
|
32
|
+
<div>{text}</div>
|
|
33
|
+
</Link>
|
|
34
|
+
)
|
|
35
|
+
}) : ''
|
|
36
|
+
|
|
37
|
+
const parentList = [];
|
|
38
|
+
parentNormalizedData ? parentNormalizedData.map(({ text, path }) => {
|
|
39
|
+
parentList.push(
|
|
40
|
+
<Link
|
|
41
|
+
to={resourceUrl(path)}
|
|
42
|
+
>
|
|
43
|
+
<div>{text}</div>
|
|
44
|
+
</Link>
|
|
45
|
+
)
|
|
46
|
+
}) : ''
|
|
47
|
+
|
|
48
|
+
return (
|
|
49
|
+
<aside
|
|
50
|
+
className={classes.root}
|
|
51
|
+
data-cy="ShopByCategory-root"
|
|
52
|
+
aria-busy="false"
|
|
53
|
+
>
|
|
54
|
+
<br />
|
|
55
|
+
<br />
|
|
56
|
+
{/* <div className={classes.body}> */}
|
|
57
|
+
{/* <ul> */}
|
|
58
|
+
<li>
|
|
59
|
+
<div><b>Shop By Category</b></div>
|
|
60
|
+
{parentList}
|
|
61
|
+
<ul className={classes.blocks}>{childrenList}</ul>
|
|
62
|
+
</li>
|
|
63
|
+
{/* </ul> */}
|
|
64
|
+
{/* </div> */}
|
|
65
|
+
</aside>
|
|
66
|
+
);
|
|
67
|
+
};
|
|
68
|
+
|
|
69
|
+
export default ShopByCategory;
|
|
@@ -1,58 +1,58 @@
|
|
|
1
|
-
.root {
|
|
2
|
-
composes: bg-white from global;
|
|
3
|
-
composes: bottom-0 from global;
|
|
4
|
-
composes: hidden from global;
|
|
5
|
-
composes: max-w-modal from global;
|
|
6
|
-
composes: w-full from global;
|
|
7
|
-
composes: z-foreground from global;
|
|
8
|
-
grid-template-rows: 1fr 7rem;
|
|
9
|
-
|
|
10
|
-
composes: lg_grid from global;
|
|
11
|
-
}
|
|
12
|
-
|
|
13
|
-
.body {
|
|
14
|
-
composes: overflow-auto from global;
|
|
15
|
-
}
|
|
16
|
-
|
|
17
|
-
.header {
|
|
18
|
-
composes: flex from global;
|
|
19
|
-
composes: justify-between from global;
|
|
20
|
-
composes: pb-0 from global;
|
|
21
|
-
composes: pt-5 from global;
|
|
22
|
-
composes: px-5 from global;
|
|
23
|
-
}
|
|
24
|
-
|
|
25
|
-
.headerTitle {
|
|
26
|
-
composes: flex from global;
|
|
27
|
-
composes: items-center from global;
|
|
28
|
-
composes: leading-none from global;
|
|
29
|
-
composes: text-lg from global;
|
|
30
|
-
}
|
|
31
|
-
|
|
32
|
-
.action {
|
|
33
|
-
composes: pb-0 from global;
|
|
34
|
-
composes: pt-xs from global;
|
|
35
|
-
composes: px-xs from global;
|
|
36
|
-
}
|
|
37
|
-
|
|
38
|
-
/* TODO @TW: cannot compose */
|
|
39
|
-
.action button {
|
|
40
|
-
/* composes: text-base from global; */
|
|
41
|
-
font-size: 0.875rem;
|
|
42
|
-
/* composes: no-underline from global; */
|
|
43
|
-
text-decoration: none;
|
|
44
|
-
}
|
|
45
|
-
|
|
46
|
-
.blocks {
|
|
47
|
-
composes: pb-0 from global;
|
|
48
|
-
composes: pt-xs from global;
|
|
49
|
-
composes: px-xs from global;
|
|
50
|
-
}
|
|
51
|
-
|
|
52
|
-
/* TODO @TW: cannot compose */
|
|
53
|
-
.blocks > li:last-child {
|
|
54
|
-
/* composes: border-b-2 from global; */
|
|
55
|
-
/* composes: border-solid from global; */
|
|
56
|
-
/* composes: border-subtle from global; */
|
|
57
|
-
border-bottom: 2px solid rgb(var(--venia-global-color-border));
|
|
58
|
-
}
|
|
1
|
+
.root {
|
|
2
|
+
composes: bg-white from global;
|
|
3
|
+
composes: bottom-0 from global;
|
|
4
|
+
composes: hidden from global;
|
|
5
|
+
composes: max-w-modal from global;
|
|
6
|
+
composes: w-full from global;
|
|
7
|
+
composes: z-foreground from global;
|
|
8
|
+
grid-template-rows: 1fr 7rem;
|
|
9
|
+
|
|
10
|
+
composes: lg_grid from global;
|
|
11
|
+
}
|
|
12
|
+
|
|
13
|
+
.body {
|
|
14
|
+
composes: overflow-auto from global;
|
|
15
|
+
}
|
|
16
|
+
|
|
17
|
+
.header {
|
|
18
|
+
composes: flex from global;
|
|
19
|
+
composes: justify-between from global;
|
|
20
|
+
composes: pb-0 from global;
|
|
21
|
+
composes: pt-5 from global;
|
|
22
|
+
composes: px-5 from global;
|
|
23
|
+
}
|
|
24
|
+
|
|
25
|
+
.headerTitle {
|
|
26
|
+
composes: flex from global;
|
|
27
|
+
composes: items-center from global;
|
|
28
|
+
composes: leading-none from global;
|
|
29
|
+
composes: text-lg from global;
|
|
30
|
+
}
|
|
31
|
+
|
|
32
|
+
.action {
|
|
33
|
+
composes: pb-0 from global;
|
|
34
|
+
composes: pt-xs from global;
|
|
35
|
+
composes: px-xs from global;
|
|
36
|
+
}
|
|
37
|
+
|
|
38
|
+
/* TODO @TW: cannot compose */
|
|
39
|
+
.action button {
|
|
40
|
+
/* composes: text-base from global; */
|
|
41
|
+
font-size: 0.875rem;
|
|
42
|
+
/* composes: no-underline from global; */
|
|
43
|
+
text-decoration: none;
|
|
44
|
+
}
|
|
45
|
+
|
|
46
|
+
.blocks {
|
|
47
|
+
composes: pb-0 from global;
|
|
48
|
+
composes: pt-xs from global;
|
|
49
|
+
composes: px-xs from global;
|
|
50
|
+
}
|
|
51
|
+
|
|
52
|
+
/* TODO @TW: cannot compose */
|
|
53
|
+
.blocks > li:last-child {
|
|
54
|
+
/* composes: border-b-2 from global; */
|
|
55
|
+
/* composes: border-solid from global; */
|
|
56
|
+
/* composes: border-subtle from global; */
|
|
57
|
+
border-bottom: 2px solid rgb(var(--venia-global-color-border));
|
|
58
|
+
}
|
|
@@ -1,24 +1,24 @@
|
|
|
1
|
-
import React from 'react';
|
|
2
|
-
import { shape, string } from 'prop-types';
|
|
3
|
-
import { useStyle } from '@magento/venia-ui/lib/classify';
|
|
4
|
-
|
|
5
|
-
import Shimmer from '@magento/venia-ui/lib/components/Shimmer';
|
|
6
|
-
import defaultClasses from './shopByCategory.module.css';
|
|
7
|
-
|
|
8
|
-
const ShopByCategory = props => {
|
|
9
|
-
const classes = useStyle(defaultClasses, props.classes);
|
|
10
|
-
|
|
11
|
-
return (
|
|
12
|
-
<aside className={classes.root} aria-live="polite" aria-busy="true">
|
|
13
|
-
<Shimmer width="95%" height="70vh" style={{ marginBottom: 25 }} />
|
|
14
|
-
</aside>
|
|
15
|
-
);
|
|
16
|
-
};
|
|
17
|
-
|
|
18
|
-
ShopByCategory.propTypes = {
|
|
19
|
-
classes: shape({
|
|
20
|
-
root: string
|
|
21
|
-
})
|
|
22
|
-
};
|
|
23
|
-
|
|
24
|
-
export default ShopByCategory;
|
|
1
|
+
import React from 'react';
|
|
2
|
+
import { shape, string } from 'prop-types';
|
|
3
|
+
import { useStyle } from '@magento/venia-ui/lib/classify';
|
|
4
|
+
|
|
5
|
+
import Shimmer from '@magento/venia-ui/lib/components/Shimmer';
|
|
6
|
+
import defaultClasses from './shopByCategory.module.css';
|
|
7
|
+
|
|
8
|
+
const ShopByCategory = props => {
|
|
9
|
+
const classes = useStyle(defaultClasses, props.classes);
|
|
10
|
+
|
|
11
|
+
return (
|
|
12
|
+
<aside className={classes.root} aria-live="polite" aria-busy="true">
|
|
13
|
+
<Shimmer width="95%" height="70vh" style={{ marginBottom: 25 }} />
|
|
14
|
+
</aside>
|
|
15
|
+
);
|
|
16
|
+
};
|
|
17
|
+
|
|
18
|
+
ShopByCategory.propTypes = {
|
|
19
|
+
classes: shape({
|
|
20
|
+
root: string
|
|
21
|
+
})
|
|
22
|
+
};
|
|
23
|
+
|
|
24
|
+
export default ShopByCategory;
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import React from 'react';
|
|
2
|
-
import Shimmer from '@magento/venia-ui/lib/components/Shimmer';
|
|
3
|
-
|
|
4
|
-
export default () => {
|
|
5
|
-
return <Shimmer width={6} height={2.25} />;
|
|
6
|
-
};
|
|
1
|
+
import React from 'react';
|
|
2
|
+
import Shimmer from '@magento/venia-ui/lib/components/Shimmer';
|
|
3
|
+
|
|
4
|
+
export default () => {
|
|
5
|
+
return <Shimmer width={6} height={2.25} />;
|
|
6
|
+
};
|
|
@@ -1,47 +1,47 @@
|
|
|
1
|
-
import React, { useCallback } from 'react';
|
|
2
|
-
import { Check } from 'react-feather';
|
|
3
|
-
import { bool, func, shape, string } from 'prop-types';
|
|
4
|
-
|
|
5
|
-
import { useStyle } from '@magento/venia-ui/lib/classify';
|
|
6
|
-
import Icon from '@magento/venia-ui/lib/components/Icon/icon';
|
|
7
|
-
import defaultClasses from './websiteSwitcherItem.module.css';
|
|
8
|
-
|
|
9
|
-
const WebsiteSwitcherItem = props => {
|
|
10
|
-
const { active, onClick, option, option2, children } = props;
|
|
11
|
-
const classes = useStyle(defaultClasses, props.classes);
|
|
12
|
-
|
|
13
|
-
const handleClick = useCallback(() => {
|
|
14
|
-
onClick(option, option2);
|
|
15
|
-
}, [option, option2, onClick]);
|
|
16
|
-
|
|
17
|
-
const activeIcon = active ? (
|
|
18
|
-
<Icon data-cy="WebsiteSwitcherItem-activeIcon" size={20} src={Check} />
|
|
19
|
-
) : null;
|
|
20
|
-
|
|
21
|
-
return (
|
|
22
|
-
<button
|
|
23
|
-
data-cy="WebsiteSwitcherItem-button"
|
|
24
|
-
className={classes.root}
|
|
25
|
-
disabled={active}
|
|
26
|
-
onClick={handleClick}
|
|
27
|
-
>
|
|
28
|
-
<span className={classes.content}>
|
|
29
|
-
<span className={classes.text}>{children}</span>
|
|
30
|
-
{activeIcon}
|
|
31
|
-
</span>
|
|
32
|
-
</button>
|
|
33
|
-
);
|
|
34
|
-
};
|
|
35
|
-
|
|
36
|
-
WebsiteSwitcherItem.propTypes = {
|
|
37
|
-
active: bool,
|
|
38
|
-
classes: shape({
|
|
39
|
-
content: string,
|
|
40
|
-
root: string,
|
|
41
|
-
text: string
|
|
42
|
-
}),
|
|
43
|
-
onClick: func,
|
|
44
|
-
option: string
|
|
45
|
-
};
|
|
46
|
-
|
|
47
|
-
export default WebsiteSwitcherItem;
|
|
1
|
+
import React, { useCallback } from 'react';
|
|
2
|
+
import { Check } from 'react-feather';
|
|
3
|
+
import { bool, func, shape, string } from 'prop-types';
|
|
4
|
+
|
|
5
|
+
import { useStyle } from '@magento/venia-ui/lib/classify';
|
|
6
|
+
import Icon from '@magento/venia-ui/lib/components/Icon/icon';
|
|
7
|
+
import defaultClasses from './websiteSwitcherItem.module.css';
|
|
8
|
+
|
|
9
|
+
const WebsiteSwitcherItem = props => {
|
|
10
|
+
const { active, onClick, option, option2, children } = props;
|
|
11
|
+
const classes = useStyle(defaultClasses, props.classes);
|
|
12
|
+
|
|
13
|
+
const handleClick = useCallback(() => {
|
|
14
|
+
onClick(option, option2);
|
|
15
|
+
}, [option, option2, onClick]);
|
|
16
|
+
|
|
17
|
+
const activeIcon = active ? (
|
|
18
|
+
<Icon data-cy="WebsiteSwitcherItem-activeIcon" size={20} src={Check} />
|
|
19
|
+
) : null;
|
|
20
|
+
|
|
21
|
+
return (
|
|
22
|
+
<button
|
|
23
|
+
data-cy="WebsiteSwitcherItem-button"
|
|
24
|
+
className={classes.root}
|
|
25
|
+
disabled={active}
|
|
26
|
+
onClick={handleClick}
|
|
27
|
+
>
|
|
28
|
+
<span className={classes.content}>
|
|
29
|
+
<span className={classes.text}>{children}</span>
|
|
30
|
+
{activeIcon}
|
|
31
|
+
</span>
|
|
32
|
+
</button>
|
|
33
|
+
);
|
|
34
|
+
};
|
|
35
|
+
|
|
36
|
+
WebsiteSwitcherItem.propTypes = {
|
|
37
|
+
active: bool,
|
|
38
|
+
classes: shape({
|
|
39
|
+
content: string,
|
|
40
|
+
root: string,
|
|
41
|
+
text: string
|
|
42
|
+
}),
|
|
43
|
+
onClick: func,
|
|
44
|
+
option: string
|
|
45
|
+
};
|
|
46
|
+
|
|
47
|
+
export default WebsiteSwitcherItem;
|
|
@@ -1,20 +1,20 @@
|
|
|
1
|
-
.root {
|
|
2
|
-
composes: flex from global;
|
|
3
|
-
composes: items-center from global;
|
|
4
|
-
composes: w-full from global;
|
|
5
|
-
}
|
|
6
|
-
|
|
7
|
-
.content {
|
|
8
|
-
composes: gap-3 from global;
|
|
9
|
-
composes: grid from global;
|
|
10
|
-
composes: grid-cols-[1fr] from global;
|
|
11
|
-
composes: grid-flow-col from global;
|
|
12
|
-
composes: items-center from global;
|
|
13
|
-
composes: px-xs from global;
|
|
14
|
-
composes: py-2xs from global;
|
|
15
|
-
composes: w-full from global;
|
|
16
|
-
}
|
|
17
|
-
|
|
18
|
-
.text {
|
|
19
|
-
composes: text-left from global;
|
|
20
|
-
}
|
|
1
|
+
.root {
|
|
2
|
+
composes: flex from global;
|
|
3
|
+
composes: items-center from global;
|
|
4
|
+
composes: w-full from global;
|
|
5
|
+
}
|
|
6
|
+
|
|
7
|
+
.content {
|
|
8
|
+
composes: gap-3 from global;
|
|
9
|
+
composes: grid from global;
|
|
10
|
+
composes: grid-cols-[1fr] from global;
|
|
11
|
+
composes: grid-flow-col from global;
|
|
12
|
+
composes: items-center from global;
|
|
13
|
+
composes: px-xs from global;
|
|
14
|
+
composes: py-2xs from global;
|
|
15
|
+
composes: w-full from global;
|
|
16
|
+
}
|
|
17
|
+
|
|
18
|
+
.text {
|
|
19
|
+
composes: text-left from global;
|
|
20
|
+
}
|