@graphcommerce/magento-search 4.1.5 → 4.1.8

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,37 @@
1
1
  # Change Log
2
2
 
3
+ ## 4.1.8
4
+
5
+ ### Patch Changes
6
+
7
+ - Updated dependencies [[`f3d06dd83`](https://github.com/graphcommerce-org/graphcommerce/commit/f3d06dd836c9a76412b419d4d2c79bbd0ee92e04)]:
8
+ - @graphcommerce/next-ui@4.7.0
9
+
10
+ ## 4.1.7
11
+
12
+ ### Patch Changes
13
+
14
+ - Updated dependencies [[`100f4c38c`](https://github.com/graphcommerce-org/graphcommerce/commit/100f4c38c8fcda4bc6e0425e38028b550b60adc2)]:
15
+ - @graphcommerce/graphql@3.1.1
16
+ - @graphcommerce/next-ui@4.6.2
17
+ - @graphcommerce/react-hook-form@3.1.2
18
+
19
+ ## 4.1.6
20
+
21
+ ### Patch Changes
22
+
23
+ - [#1399](https://github.com/graphcommerce-org/graphcommerce/pull/1399) [`fb277d8e1`](https://github.com/graphcommerce-org/graphcommerce/commit/fb277d8e1e3612c5e9cf890a30d19cfd1ff70542) Thanks [@paales](https://github.com/paales)! - Now using [@graphql-yoga](https://github.com/dotansimha/graphql-yoga) for GraphQL which has full support for [envelop](https://www.envelop.dev/) plugins.
24
+
25
+ * [#1399](https://github.com/graphcommerce-org/graphcommerce/pull/1399) [`fb277d8e1`](https://github.com/graphcommerce-org/graphcommerce/commit/fb277d8e1e3612c5e9cf890a30d19cfd1ff70542) Thanks [@paales](https://github.com/paales)! - Added a new @graphcommerce/cli package to generate the mesh so it can be generated _inside_ the @graphcommerce/graphql-mesh package to allow for better future extensibility.
26
+
27
+ - [#1399](https://github.com/graphcommerce-org/graphcommerce/pull/1399) [`da0ae7d02`](https://github.com/graphcommerce-org/graphcommerce/commit/da0ae7d0236e4908ba0bf0fa16656be516e841d4) Thanks [@paales](https://github.com/paales)! - Updated dependencies
28
+
29
+ - Updated dependencies [[`fb277d8e1`](https://github.com/graphcommerce-org/graphcommerce/commit/fb277d8e1e3612c5e9cf890a30d19cfd1ff70542), [`fb277d8e1`](https://github.com/graphcommerce-org/graphcommerce/commit/fb277d8e1e3612c5e9cf890a30d19cfd1ff70542), [`da0ae7d02`](https://github.com/graphcommerce-org/graphcommerce/commit/da0ae7d0236e4908ba0bf0fa16656be516e841d4)]:
30
+ - @graphcommerce/graphql@3.1.0
31
+ - @graphcommerce/next-ui@4.6.1
32
+ - @graphcommerce/react-hook-form@3.1.1
33
+ - @graphcommerce/image@3.1.5
34
+
3
35
  ## 4.1.5
4
36
 
5
37
  ### Patch Changes
@@ -7,7 +7,8 @@ import {
7
7
  } from '@graphcommerce/next-ui'
8
8
  import { Link, LinkProps } from '@mui/material'
9
9
  import PageLink from 'next/link'
10
- import { SetRequired } from 'type-fest'
10
+ import { useRouter } from 'next/router'
11
+ import type { SetRequired } from 'type-fest'
11
12
 
12
13
  export type SearchLinkProps = SetRequired<Pick<LinkProps, 'href' | 'sx' | 'children'>, 'href'>
13
14
 
@@ -24,46 +25,50 @@ const { classes } = extendableComponent(name, parts)
24
25
  */
25
26
  export function SearchLink(props: SearchLinkProps) {
26
27
  const { href, sx = [], children, ...linkProps } = props
28
+ const router = useRouter()
27
29
 
28
30
  const fabSize = useFabSize('responsive')
29
31
 
30
32
  return (
31
- <PageLink href={href} passHref>
32
- <Link
33
- className={classes.root}
34
- underline='none'
35
- sx={[
36
- (theme) => ({
37
- justifySelf: 'center',
38
- // @todo make abstract, this is the size of a responsive Fab minus the icon size, divided by 2.
39
- marginRight: `calc(${fabSize} / 4)`,
40
- width: responsiveVal(64, 172),
41
- borderRadius: 2,
42
- typography: 'body2',
43
- display: 'flex',
44
- alignItems: 'center',
45
- justifyContent: 'space-between',
46
- gap: theme.spacings.xs,
47
- color: 'text.secondary',
48
- border: 1,
49
- borderColor: 'divider',
50
- py: 1,
51
- px: 1.5,
52
- '&:hover': {
53
- borderColor: 'text.secondary',
54
- },
55
- }),
56
- ...(Array.isArray(sx) ? sx : [sx]),
57
- ]}
58
- {...linkProps}
59
- >
60
- <div className={classes.text}>{children ?? <>&nbsp;</>}</div>
61
- <IconSvg
62
- src={iconSearch}
63
- className={classes.svg}
64
- sx={{ color: 'text.primary', fontSize: '1.4em' }}
65
- />
66
- </Link>
67
- </PageLink>
33
+ <Link
34
+ component='button'
35
+ className={classes.root}
36
+ underline='none'
37
+ onClick={(e) => {
38
+ e.preventDefault()
39
+ return router.push(href)
40
+ }}
41
+ sx={[
42
+ (theme) => ({
43
+ justifySelf: 'center',
44
+ // @todo make abstract, this is the size of a responsive Fab minus the icon size, divided by 2.
45
+ marginRight: `calc(${fabSize} / 4)`,
46
+ width: responsiveVal(64, 172),
47
+ borderRadius: 2,
48
+ typography: 'body2',
49
+ display: 'flex',
50
+ alignItems: 'center',
51
+ justifyContent: 'space-between',
52
+ gap: theme.spacings.xs,
53
+ color: 'text.secondary',
54
+ border: 1,
55
+ borderColor: 'divider',
56
+ py: 1,
57
+ px: 1.5,
58
+ '&:hover': {
59
+ borderColor: 'text.secondary',
60
+ },
61
+ }),
62
+ ...(Array.isArray(sx) ? sx : [sx]),
63
+ ]}
64
+ {...linkProps}
65
+ >
66
+ <div className={classes.text}>{children ?? <>&nbsp;</>}</div>
67
+ <IconSvg
68
+ src={iconSearch}
69
+ className={classes.svg}
70
+ sx={{ color: 'text.primary', fontSize: '1.4em' }}
71
+ />
72
+ </Link>
68
73
  )
69
74
  }
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": "4.1.5",
5
+ "version": "4.1.8",
6
6
  "sideEffects": false,
7
7
  "prettier": "@graphcommerce/prettier-config-pwa",
8
8
  "eslintConfig": {
@@ -12,17 +12,17 @@
12
12
  }
13
13
  },
14
14
  "devDependencies": {
15
- "@graphcommerce/eslint-config-pwa": "^4.1.4",
16
- "@graphcommerce/prettier-config-pwa": "^4.0.5",
15
+ "@graphcommerce/eslint-config-pwa": "^4.1.6",
16
+ "@graphcommerce/prettier-config-pwa": "^4.0.6",
17
17
  "@graphcommerce/typescript-config-pwa": "^4.0.2",
18
- "@playwright/test": "^1.20.1",
19
- "type-fest": "2.12.1"
18
+ "@playwright/test": "^1.21.1",
19
+ "type-fest": "^2.12.2"
20
20
  },
21
21
  "dependencies": {
22
- "@graphcommerce/graphql": "3.0.7",
23
- "@graphcommerce/image": "3.1.4",
24
- "@graphcommerce/next-ui": "4.6.0",
25
- "@graphcommerce/react-hook-form": "3.1.0"
22
+ "@graphcommerce/graphql": "3.1.1",
23
+ "@graphcommerce/image": "3.1.5",
24
+ "@graphcommerce/next-ui": "4.7.0",
25
+ "@graphcommerce/react-hook-form": "3.1.2"
26
26
  },
27
27
  "peerDependencies": {
28
28
  "@lingui/macro": "^3.13.2",