@graphcommerce/magento-search 5.2.0-canary.2 → 5.2.0-canary.3
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
CHANGED
|
@@ -1,6 +1,5 @@
|
|
|
1
1
|
import { Highlight, iconChevronRight, IconSvg, extendableComponent } from '@graphcommerce/next-ui'
|
|
2
2
|
import { Button, SxProps, Theme } from '@mui/material'
|
|
3
|
-
import PageLink from 'next/link'
|
|
4
3
|
import React from 'react'
|
|
5
4
|
import { CategorySearchResultFragment } from './CategorySearchResult.gql'
|
|
6
5
|
|
|
@@ -17,49 +16,48 @@ export function CategorySearchResult(props: CategorySearchResultProps) {
|
|
|
17
16
|
const { search = '', sx = [], ...catProps } = props
|
|
18
17
|
|
|
19
18
|
return (
|
|
20
|
-
<
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
</PageLink>
|
|
19
|
+
<Button
|
|
20
|
+
href={`/${catProps?.url_path ?? ''}`}
|
|
21
|
+
fullWidth
|
|
22
|
+
variant='pill'
|
|
23
|
+
className={classes.root}
|
|
24
|
+
disableElevation
|
|
25
|
+
endIcon={<IconSvg src={iconChevronRight} size='small' />}
|
|
26
|
+
sx={[
|
|
27
|
+
(theme) => ({
|
|
28
|
+
background: theme.palette.background.default,
|
|
29
|
+
padding: `${theme.spacings.xs} 18px ${theme.spacings.xs} 14px`,
|
|
30
|
+
display: 'flex',
|
|
31
|
+
justifyContent: 'space-between',
|
|
32
|
+
minWidth: '100%',
|
|
33
|
+
maxWidth: 'unset',
|
|
34
|
+
borderRadius: '0',
|
|
35
|
+
'&:not(&:last-of-type)': {
|
|
36
|
+
borderBottom: `1px solid ${theme.palette.divider}`,
|
|
37
|
+
},
|
|
38
|
+
'&:focus': {
|
|
39
|
+
boxShadow: 'none',
|
|
40
|
+
},
|
|
41
|
+
'&:hover': {
|
|
42
|
+
background: theme.palette.background.paper,
|
|
43
|
+
},
|
|
44
|
+
}),
|
|
45
|
+
...(Array.isArray(sx) ? sx : [sx]),
|
|
46
|
+
]}
|
|
47
|
+
>
|
|
48
|
+
<div>
|
|
49
|
+
{catProps?.breadcrumbs?.map((breadcrumb) => (
|
|
50
|
+
<React.Fragment key={breadcrumb?.category_url_path}>
|
|
51
|
+
<Highlight
|
|
52
|
+
key={breadcrumb?.category_url_path}
|
|
53
|
+
text={breadcrumb?.category_name ?? ''}
|
|
54
|
+
highlight={search}
|
|
55
|
+
/>
|
|
56
|
+
{' / '}
|
|
57
|
+
</React.Fragment>
|
|
58
|
+
))}
|
|
59
|
+
<Highlight text={catProps?.name ?? ''} highlight={search} />
|
|
60
|
+
</div>
|
|
61
|
+
</Button>
|
|
64
62
|
)
|
|
65
63
|
}
|
package/package.json
CHANGED
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
"name": "@graphcommerce/magento-search",
|
|
3
3
|
"homepage": "https://www.graphcommerce.org/",
|
|
4
4
|
"repository": "github:graphcommerce-org/graphcommerce",
|
|
5
|
-
"version": "5.2.0-canary.
|
|
5
|
+
"version": "5.2.0-canary.3",
|
|
6
6
|
"sideEffects": false,
|
|
7
7
|
"prettier": "@graphcommerce/prettier-config-pwa",
|
|
8
8
|
"eslintConfig": {
|
|
@@ -12,21 +12,21 @@
|
|
|
12
12
|
}
|
|
13
13
|
},
|
|
14
14
|
"devDependencies": {
|
|
15
|
-
"@graphcommerce/eslint-config-pwa": "5.2.0-canary.
|
|
16
|
-
"@graphcommerce/prettier-config-pwa": "5.2.0-canary.
|
|
17
|
-
"@graphcommerce/typescript-config-pwa": "5.2.0-canary.
|
|
15
|
+
"@graphcommerce/eslint-config-pwa": "5.2.0-canary.3",
|
|
16
|
+
"@graphcommerce/prettier-config-pwa": "5.2.0-canary.3",
|
|
17
|
+
"@graphcommerce/typescript-config-pwa": "5.2.0-canary.3"
|
|
18
18
|
},
|
|
19
19
|
"dependencies": {
|
|
20
|
-
"@graphcommerce/graphql": "5.2.0-canary.
|
|
21
|
-
"@graphcommerce/image": "5.2.0-canary.
|
|
22
|
-
"@graphcommerce/next-ui": "5.2.0-canary.
|
|
23
|
-
"@graphcommerce/react-hook-form": "5.2.0-canary.
|
|
20
|
+
"@graphcommerce/graphql": "5.2.0-canary.3",
|
|
21
|
+
"@graphcommerce/image": "5.2.0-canary.3",
|
|
22
|
+
"@graphcommerce/next-ui": "5.2.0-canary.3",
|
|
23
|
+
"@graphcommerce/react-hook-form": "5.2.0-canary.3"
|
|
24
24
|
},
|
|
25
25
|
"peerDependencies": {
|
|
26
26
|
"@lingui/react": "^3.13.2",
|
|
27
27
|
"@lingui/core": "^3.13.2",
|
|
28
28
|
"@mui/material": "^5.10.16",
|
|
29
|
-
"next": "^
|
|
29
|
+
"next": "^13.1.1",
|
|
30
30
|
"react": "^18.2.0",
|
|
31
31
|
"react-dom": "^18.2.0"
|
|
32
32
|
}
|