@graphcommerce/magento-search 7.1.0-canary.8 → 8.0.0-canary.100

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,190 @@
1
1
  # Change Log
2
2
 
3
+ ## 8.0.0-canary.100
4
+
5
+ ## 8.0.0-canary.99
6
+
7
+ ## 8.0.0-canary.98
8
+
9
+ ## 8.0.0-canary.97
10
+
11
+ ## 8.0.0-canary.96
12
+
13
+ ## 8.0.0-canary.95
14
+
15
+ ## 8.0.0-canary.94
16
+
17
+ ## 8.0.0-canary.93
18
+
19
+ ## 8.0.0-canary.92
20
+
21
+ ## 8.0.0-canary.91
22
+
23
+ ## 8.0.0-canary.90
24
+
25
+ ## 8.0.0-canary.89
26
+
27
+ ## 8.0.0-canary.88
28
+
29
+ ## 8.0.0-canary.87
30
+
31
+ ## 8.0.0-canary.86
32
+
33
+ ## 8.0.0-canary.85
34
+
35
+ ## 8.0.0-canary.84
36
+
37
+ ## 8.0.0-canary.83
38
+
39
+ ## 8.0.0-canary.82
40
+
41
+ ## 8.0.0-canary.81
42
+
43
+ ## 8.0.0-canary.80
44
+
45
+ ## 8.0.0-canary.79
46
+
47
+ ## 8.0.0-canary.78
48
+
49
+ ## 8.0.0-canary.77
50
+
51
+ ### Patch Changes
52
+
53
+ - [`e33660f`](https://github.com/graphcommerce-org/graphcommerce/commit/e33660f172466dcfa0ab7262cee612d9a3e47776) - a11y improvements (see https://github.com/graphcommerce-org/graphcommerce/issues/1995 for more info)
54
+ ([@FrankHarland](https://github.com/FrankHarland))
55
+
56
+ ## 8.0.0-canary.76
57
+
58
+ ## 8.0.0-canary.75
59
+
60
+ ### Patch Changes
61
+
62
+ - [#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
63
+ ([@paales](https://github.com/paales))
64
+
65
+ - [#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
66
+ ([@paales](https://github.com/paales))
67
+
68
+ ## 8.0.0-canary.74
69
+
70
+ ## 8.0.0-canary.73
71
+
72
+ ## 8.0.0-canary.72
73
+
74
+ ## 8.0.0-canary.71
75
+
76
+ ## 8.0.0-canary.70
77
+
78
+ ## 8.0.0-canary.69
79
+
80
+ ## 7.1.0-canary.68
81
+
82
+ ## 7.1.0-canary.67
83
+
84
+ ## 7.1.0-canary.66
85
+
86
+ ## 7.1.0-canary.65
87
+
88
+ ## 7.1.0-canary.64
89
+
90
+ ## 7.1.0-canary.63
91
+
92
+ ## 7.1.0-canary.62
93
+
94
+ ## 7.1.0-canary.61
95
+
96
+ ## 7.1.0-canary.60
97
+
98
+ ## 7.1.0-canary.59
99
+
100
+ ## 7.1.0-canary.58
101
+
102
+ ## 7.1.0-canary.57
103
+
104
+ ## 7.1.0-canary.56
105
+
106
+ ## 7.1.0-canary.55
107
+
108
+ ## 7.1.0-canary.54
109
+
110
+ ## 7.1.0-canary.53
111
+
112
+ ## 7.1.0-canary.52
113
+
114
+ ## 7.1.0-canary.51
115
+
116
+ ## 7.1.0-canary.50
117
+
118
+ ## 7.1.0-canary.49
119
+
120
+ ## 7.1.0-canary.48
121
+
122
+ ## 7.1.0-canary.47
123
+
124
+ ## 7.1.0-canary.46
125
+
126
+ ## 7.1.0-canary.45
127
+
128
+ ## 7.1.0-canary.38
129
+
130
+ ## 7.1.0-canary.37
131
+
132
+ ## 7.1.0-canary.36
133
+
134
+ ## 7.1.0-canary.35
135
+
136
+ ## 7.1.0-canary.34
137
+
138
+ ## 7.1.0-canary.33
139
+
140
+ ## 7.1.0-canary.32
141
+
142
+ ## 7.1.0-canary.31
143
+
144
+ ## 7.1.0-canary.30
145
+
146
+ ## 7.1.0-canary.29
147
+
148
+ ## 7.1.0-canary.28
149
+
150
+ ## 7.1.0-canary.27
151
+
152
+ ## 7.1.0-canary.26
153
+
154
+ ## 7.1.0-canary.25
155
+
156
+ ## 7.1.0-canary.24
157
+
158
+ ## 7.1.0-canary.23
159
+
160
+ ## 7.1.0-canary.22
161
+
162
+ ## 7.1.0-canary.21
163
+
164
+ ## 7.1.0-canary.20
165
+
166
+ ## 7.1.0-canary.19
167
+
168
+ ## 7.1.0-canary.18
169
+
170
+ ## 7.1.0-canary.17
171
+
172
+ ## 7.1.0-canary.16
173
+
174
+ ## 7.1.0-canary.15
175
+
176
+ ## 7.1.0-canary.14
177
+
178
+ ## 7.1.0-canary.13
179
+
180
+ ## 7.1.0-canary.12
181
+
182
+ ## 7.1.0-canary.11
183
+
184
+ ## 7.1.0-canary.10
185
+
186
+ ## 7.1.0-canary.9
187
+
3
188
  ## 7.1.0-canary.8
4
189
 
5
190
  ## 7.0.2-canary.7
@@ -931,31 +1116,31 @@
931
1116
  All occurences of `<Trans>` and `t` need to be replaced:
932
1117
 
933
1118
  ```tsx
934
- import { Trans, t } from '@lingui/macro'
1119
+ import { Trans, t } from "@lingui/macro";
935
1120
 
936
1121
  function MyComponent() {
937
- const foo = 'bar'
1122
+ const foo = "bar";
938
1123
  return (
939
1124
  <div aria-label={t`Account ${foo}`}>
940
1125
  <Trans>My Translation {foo}</Trans>
941
1126
  </div>
942
- )
1127
+ );
943
1128
  }
944
1129
  ```
945
1130
 
946
1131
  Needs to be replaced with:
947
1132
 
948
1133
  ```tsx
949
- import { Trans } from '@lingui/react'
950
- import { i18n } from '@lingui/core'
1134
+ import { Trans } from "@lingui/react";
1135
+ import { i18n } from "@lingui/core";
951
1136
 
952
1137
  function MyComponent() {
953
- const foo = 'bar'
1138
+ const foo = "bar";
954
1139
  return (
955
1140
  <div aria-label={i18n._(/* i18n */ `Account {foo}`, { foo })}>
956
- <Trans key='My Translation {foo}' values={{ foo }}></Trans>
1141
+ <Trans key="My Translation {foo}" values={{ foo }}></Trans>
957
1142
  </div>
958
- )
1143
+ );
959
1144
  }
960
1145
  ```
961
1146
 
@@ -4,10 +4,11 @@ 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'
10
- import { MouseEventHandler } from 'react'
11
+ import { KeyboardEventHandler, MouseEventHandler } from 'react'
11
12
  import type { SetRequired } from 'type-fest'
12
13
 
13
14
  export type SearchLinkProps = {
@@ -30,6 +31,7 @@ export function SearchLink(props: SearchLinkProps) {
30
31
  const { href, sx = [], children, breakpoint, fab, onClick, ...linkProps } = props
31
32
  const router = useRouter()
32
33
  const fabSize = useFabSize('responsive')
34
+ const iconSize = useIconSvgSize('large')
33
35
  const { sx: fabSx = [], size, color, ...fabProps } = fab ?? {}
34
36
 
35
37
  const handleClick: MouseEventHandler<HTMLAnchorElement> = (e) => {
@@ -38,18 +40,28 @@ export function SearchLink(props: SearchLinkProps) {
38
40
  return router.push(href)
39
41
  }
40
42
 
43
+ const handleKeyDown: KeyboardEventHandler<HTMLAnchorElement> = (e) => {
44
+ if (e.key === 'Enter') {
45
+ e.preventDefault()
46
+ return router.push(href)
47
+ }
48
+ return undefined
49
+ }
50
+
41
51
  return (
42
52
  <>
43
53
  <Link
44
- component='a'
54
+ href={href}
55
+ rel='noindex'
45
56
  className={classes.root}
46
57
  underline='none'
47
58
  onClick={handleClick}
59
+ onKeyDown={handleKeyDown}
60
+ tabIndex={0}
48
61
  sx={[
49
62
  (theme) => ({
50
63
  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)`,
64
+ marginRight: `calc((${fabSize} - ${iconSize}) / 2)`,
53
65
  width: responsiveVal(64, 172),
54
66
  borderRadius: 2,
55
67
  typography: 'body2',
@@ -79,8 +91,8 @@ export function SearchLink(props: SearchLinkProps) {
79
91
  </Link>
80
92
  {breakpoint && (
81
93
  <Fab
82
- component='a'
83
94
  href={href}
95
+ rel='noindex'
84
96
  size={size ?? 'large'}
85
97
  color={color ?? 'inherit'}
86
98
  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": "7.1.0-canary.8",
5
+ "version": "8.0.0-canary.100",
6
6
  "sideEffects": false,
7
7
  "prettier": "@graphcommerce/prettier-config-pwa",
8
8
  "eslintConfig": {
@@ -11,25 +11,21 @@
11
11
  "project": "./tsconfig.json"
12
12
  }
13
13
  },
14
- "devDependencies": {
15
- "@graphcommerce/eslint-config-pwa": "7.1.0-canary.8",
16
- "@graphcommerce/prettier-config-pwa": "7.1.0-canary.8",
17
- "@graphcommerce/typescript-config-pwa": "7.1.0-canary.8"
18
- },
19
- "dependencies": {
20
- "@graphcommerce/ecommerce-ui": "7.1.0-canary.8",
21
- "@graphcommerce/graphql": "7.1.0-canary.8",
22
- "@graphcommerce/image": "7.1.0-canary.8",
23
- "@graphcommerce/magento-product": "7.1.0-canary.8",
24
- "@graphcommerce/next-ui": "7.1.0-canary.8",
25
- "@graphcommerce/react-hook-form": "7.1.0-canary.8"
26
- },
27
14
  "peerDependencies": {
28
- "@lingui/react": "^4.2.1",
15
+ "@graphcommerce/ecommerce-ui": "^8.0.0-canary.100",
16
+ "@graphcommerce/eslint-config-pwa": "^8.0.0-canary.100",
17
+ "@graphcommerce/graphql": "^8.0.0-canary.100",
18
+ "@graphcommerce/image": "^8.0.0-canary.100",
19
+ "@graphcommerce/magento-product": "^8.0.0-canary.100",
20
+ "@graphcommerce/next-ui": "^8.0.0-canary.100",
21
+ "@graphcommerce/prettier-config-pwa": "^8.0.0-canary.100",
22
+ "@graphcommerce/react-hook-form": "^8.0.0-canary.100",
23
+ "@graphcommerce/typescript-config-pwa": "^8.0.0-canary.100",
29
24
  "@lingui/core": "^4.2.1",
30
25
  "@lingui/macro": "^4.2.1",
26
+ "@lingui/react": "^4.2.1",
31
27
  "@mui/material": "^5.10.16",
32
- "next": "^13.2.0",
28
+ "next": "*",
33
29
  "react": "^18.2.0",
34
30
  "react-dom": "^18.2.0"
35
31
  }