@graphcommerce/magento-search 8.0.0-canary.73 → 8.0.0-canary.75

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,17 @@
1
1
  # Change Log
2
2
 
3
+ ## 8.0.0-canary.75
4
+
5
+ ### Patch Changes
6
+
7
+ - [#2160](https://github.com/graphcommerce-org/graphcommerce/pull/2160) [`9091dbb`](https://github.com/graphcommerce-org/graphcommerce/commit/9091dbb01a47aa6ba40932a66ed055b7f07c1cec) - Make sure the search link in the header is a nextjs navigation
8
+ ([@paales](https://github.com/paales))
9
+
10
+ - [#2160](https://github.com/graphcommerce-org/graphcommerce/pull/2160) [`fe37229`](https://github.com/graphcommerce-org/graphcommerce/commit/fe372294d6a42b1108e0fcef306b297baed5eb71) - Take the per_page configuration in account for the search results
11
+ ([@paales](https://github.com/paales))
12
+
13
+ ## 8.0.0-canary.74
14
+
3
15
  ## 8.0.0-canary.73
4
16
 
5
17
  ## 8.0.0-canary.72
@@ -4,6 +4,7 @@ import {
4
4
  IconSvg,
5
5
  extendableComponent,
6
6
  useFabSize,
7
+ useIconSvgSize,
7
8
  } from '@graphcommerce/next-ui'
8
9
  import { Breakpoint, Fab, FabProps, Link, LinkProps } from '@mui/material'
9
10
  import { useRouter } from 'next/router'
@@ -28,28 +29,21 @@ const { classes } = extendableComponent(name, parts)
28
29
  */
29
30
  export function SearchLink(props: SearchLinkProps) {
30
31
  const { href, sx = [], children, breakpoint, fab, onClick, ...linkProps } = props
31
- const router = useRouter()
32
32
  const fabSize = useFabSize('responsive')
33
+ const iconSize = useIconSvgSize('large')
33
34
  const { sx: fabSx = [], size, color, ...fabProps } = fab ?? {}
34
35
 
35
- const handleClick: MouseEventHandler<HTMLAnchorElement> = (e) => {
36
- e.preventDefault()
37
- onClick?.(e)
38
- return router.push(href)
39
- }
40
-
41
36
  return (
42
37
  <>
43
38
  <Link
44
- component='a'
39
+ href={href}
40
+ rel='noindex'
45
41
  className={classes.root}
46
42
  underline='none'
47
- onClick={handleClick}
48
43
  sx={[
49
44
  (theme) => ({
50
45
  justifySelf: 'center',
51
- // @todo make abstract, this is the size of a responsive Fab minus the icon size, divided by 2.
52
- marginRight: `calc(${fabSize} / 4)`,
46
+ marginRight: `calc((${fabSize} - ${iconSize}) / 2)`,
53
47
  width: responsiveVal(64, 172),
54
48
  borderRadius: 2,
55
49
  typography: 'body2',
@@ -79,8 +73,8 @@ export function SearchLink(props: SearchLinkProps) {
79
73
  </Link>
80
74
  {breakpoint && (
81
75
  <Fab
82
- component='a'
83
76
  href={href}
77
+ rel='noindex'
84
78
  size={size ?? 'large'}
85
79
  color={color ?? 'inherit'}
86
80
  sx={[
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": "8.0.0-canary.73",
5
+ "version": "8.0.0-canary.75",
6
6
  "sideEffects": false,
7
7
  "prettier": "@graphcommerce/prettier-config-pwa",
8
8
  "eslintConfig": {
@@ -12,15 +12,15 @@
12
12
  }
13
13
  },
14
14
  "peerDependencies": {
15
- "@graphcommerce/ecommerce-ui": "^8.0.0-canary.73",
16
- "@graphcommerce/eslint-config-pwa": "^8.0.0-canary.73",
17
- "@graphcommerce/graphql": "^8.0.0-canary.73",
18
- "@graphcommerce/image": "^8.0.0-canary.73",
19
- "@graphcommerce/magento-product": "^8.0.0-canary.73",
20
- "@graphcommerce/next-ui": "^8.0.0-canary.73",
21
- "@graphcommerce/prettier-config-pwa": "^8.0.0-canary.73",
22
- "@graphcommerce/react-hook-form": "^8.0.0-canary.73",
23
- "@graphcommerce/typescript-config-pwa": "^8.0.0-canary.73",
15
+ "@graphcommerce/ecommerce-ui": "^8.0.0-canary.75",
16
+ "@graphcommerce/eslint-config-pwa": "^8.0.0-canary.75",
17
+ "@graphcommerce/graphql": "^8.0.0-canary.75",
18
+ "@graphcommerce/image": "^8.0.0-canary.75",
19
+ "@graphcommerce/magento-product": "^8.0.0-canary.75",
20
+ "@graphcommerce/next-ui": "^8.0.0-canary.75",
21
+ "@graphcommerce/prettier-config-pwa": "^8.0.0-canary.75",
22
+ "@graphcommerce/react-hook-form": "^8.0.0-canary.75",
23
+ "@graphcommerce/typescript-config-pwa": "^8.0.0-canary.75",
24
24
  "@lingui/core": "^4.2.1",
25
25
  "@lingui/macro": "^4.2.1",
26
26
  "@lingui/react": "^4.2.1",