@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,5 +1,7 @@
1
1
  # Change Log
2
2
 
3
+ ## 5.2.0-canary.3
4
+
3
5
  ## 5.2.0-canary.2
4
6
 
5
7
  ## 5.2.0-canary.1
@@ -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
- <PageLink href={`/${catProps?.url_path ?? ''}`} passHref>
21
- <Button
22
- fullWidth
23
- variant='pill'
24
- className={classes.root}
25
- disableElevation
26
- endIcon={<IconSvg src={iconChevronRight} size='small' />}
27
- sx={[
28
- (theme) => ({
29
- background: theme.palette.background.default,
30
- padding: `${theme.spacings.xs} 18px ${theme.spacings.xs} 14px`,
31
- display: 'flex',
32
- justifyContent: 'space-between',
33
- minWidth: '100%',
34
- maxWidth: 'unset',
35
- borderRadius: '0',
36
- '&:not(&:last-of-type)': {
37
- borderBottom: `1px solid ${theme.palette.divider}`,
38
- },
39
- '&:focus': {
40
- boxShadow: 'none',
41
- },
42
- '&:hover': {
43
- background: theme.palette.background.paper,
44
- },
45
- }),
46
- ...(Array.isArray(sx) ? sx : [sx]),
47
- ]}
48
- >
49
- <div>
50
- {catProps?.breadcrumbs?.map((breadcrumb) => (
51
- <React.Fragment key={breadcrumb?.category_url_path}>
52
- <Highlight
53
- key={breadcrumb?.category_url_path}
54
- text={breadcrumb?.category_name ?? ''}
55
- highlight={search}
56
- />
57
- {' / '}
58
- </React.Fragment>
59
- ))}
60
- <Highlight text={catProps?.name ?? ''} highlight={search} />
61
- </div>
62
- </Button>
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.2",
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.2",
16
- "@graphcommerce/prettier-config-pwa": "5.2.0-canary.2",
17
- "@graphcommerce/typescript-config-pwa": "5.2.0-canary.2"
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.2",
21
- "@graphcommerce/image": "5.2.0-canary.2",
22
- "@graphcommerce/next-ui": "5.2.0-canary.2",
23
- "@graphcommerce/react-hook-form": "5.2.0-canary.2"
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": "^12.1.2",
29
+ "next": "^13.1.1",
30
30
  "react": "^18.2.0",
31
31
  "react-dom": "^18.2.0"
32
32
  }