@graphcommerce/next-ui 3.20.1 → 3.20.5

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
@@ -3,6 +3,40 @@
3
3
  All notable changes to this project will be documented in this file.
4
4
  See [Conventional Commits](https://conventionalcommits.org) for commit guidelines.
5
5
 
6
+ ## [3.20.5](https://github.com/ho-nl/m2-pwa/compare/@graphcommerce/next-ui@3.20.4...@graphcommerce/next-ui@3.20.5) (2021-12-06)
7
+
8
+
9
+ ### Bug Fixes
10
+
11
+ * Accessibility, SEO ([a258837](https://github.com/ho-nl/m2-pwa/commit/a258837476d94d20d33e13a4c4f950fff57f7dca))
12
+
13
+
14
+
15
+
16
+
17
+ ## [3.20.4](https://github.com/ho-nl/m2-pwa/compare/@graphcommerce/next-ui@3.20.3...@graphcommerce/next-ui@3.20.4) (2021-12-06)
18
+
19
+
20
+ ### Bug Fixes
21
+
22
+ * use Locale to set storeSwitcher icons ([65ea397](https://github.com/ho-nl/m2-pwa/commit/65ea397ec53aa27f545b43feda8e35227e119ebe))
23
+
24
+
25
+
26
+
27
+
28
+ ## [3.20.2](https://github.com/ho-nl/m2-pwa/compare/@graphcommerce/next-ui@3.20.1...@graphcommerce/next-ui@3.20.2) (2021-12-03)
29
+
30
+
31
+ ### Bug Fixes
32
+
33
+ * aria-labels missing ([16570d1](https://github.com/ho-nl/m2-pwa/commit/16570d11efcb264eba6c620c5508c9616c2d0a2a))
34
+ * make sure the overlay can be clicked away ([5b43e2f](https://github.com/ho-nl/m2-pwa/commit/5b43e2f0568c2587be63b74271409123fc0a44e2))
35
+
36
+
37
+
38
+
39
+
6
40
  ## [3.20.1](https://github.com/ho-nl/m2-pwa/compare/@graphcommerce/next-ui@3.20.0...@graphcommerce/next-ui@3.20.1) (2021-12-03)
7
41
 
8
42
 
@@ -20,7 +20,7 @@ export default function FlagAvatar(props: FlagAvatarProps) {
20
20
  classes={classes}
21
21
  imgProps={{ loading: 'lazy' }}
22
22
  alt={country}
23
- src={`https://cdnjs.cloudflare.com/ajax/libs/flag-icon-css/3.4.3/flags/4x3/${country}.svg`}
23
+ src={`https://cdnjs.cloudflare.com/ajax/libs/flag-icon-css/3.4.3/flags/1x1/${country}.svg`}
24
24
  >
25
25
  {country.toLocaleUpperCase()}
26
26
  </Avatar>
@@ -159,7 +159,8 @@ const useStyles = makeStyles(
159
159
  top: `calc(50% - 28px)`,
160
160
  },
161
161
  dots: {
162
- background: alpha(theme.palette.background.paper, 0.7),
162
+ background: alpha(theme.palette.background.paper, 1),
163
+ boxShadow: theme.shadows[6],
163
164
  },
164
165
  }),
165
166
  { name: 'SidebarGallery' },
@@ -258,6 +259,7 @@ export default function SidebarGallery(props: SidebarGalleryProps) {
258
259
  0: '100vw',
259
260
  [theme.breakpoints.values.md]: zoomed ? '100vw' : '60vw',
260
261
  }}
262
+ alt={image.alt || `Product Image ${idx}` || undefined}
261
263
  dontReportWronglySizedImages
262
264
  />
263
265
  </CenterSlide>
@@ -1,5 +1,5 @@
1
1
  import { usePageRouter, useUp, usePrevUp, usePageContext } from '@graphcommerce/framer-next-pages'
2
- import { Trans } from '@lingui/macro'
2
+ import { t } from '@lingui/macro'
3
3
  import PageLink from 'next/link'
4
4
  import React from 'react'
5
5
  import Button, { ButtonProps } from '../../Button'
@@ -30,17 +30,25 @@ export default function LayoutHeaderBack(props: BackProps) {
30
30
  const backIcon = <SvgImageSimple src={iconChevronLeft} />
31
31
  const canClickBack = backSteps > 0 && router.asPath !== prevUp?.href
32
32
 
33
- if (canClickBack)
33
+ if (canClickBack) {
34
+ const label = up?.href === router.asPath ? up.title : t`Back`
34
35
  return (
35
- <Button onClick={() => router.back()} variant='pill-link' startIcon={backIcon} {...props}>
36
- {up?.href === router.asPath ? up.title : <Trans>Back</Trans>}
36
+ <Button
37
+ onClick={() => router.back()}
38
+ variant='pill-link'
39
+ startIcon={backIcon}
40
+ aria-label={label}
41
+ {...props}
42
+ >
43
+ {label}
37
44
  </Button>
38
45
  )
46
+ }
39
47
 
40
48
  if (up?.href && up.href !== router.asPath)
41
49
  return (
42
50
  <PageLink href={up.href} passHref>
43
- <Button variant='pill-link' startIcon={backIcon} {...props}>
51
+ <Button variant='pill-link' startIcon={backIcon} aria-label={up.title} {...props}>
44
52
  {up.title}
45
53
  </Button>
46
54
  </PageLink>
@@ -17,6 +17,7 @@ const useStyles = makeStyles(
17
17
  left: 0,
18
18
  width: '100%',
19
19
  backgroundColor: theme.palette.background.default,
20
+ boxShadow: theme.shadows[2],
20
21
  opacity: 0,
21
22
  transition: `opacity ${time}`,
22
23
 
@@ -25,6 +26,9 @@ const useStyles = makeStyles(
25
26
  height: theme.appShell.appBarHeightMd,
26
27
  },
27
28
  },
29
+ bgDivider: {
30
+ boxShadow: 'unset',
31
+ },
28
32
  bgFloatingSm: {
29
33
  [theme.breakpoints.down('sm')]: {
30
34
  display: 'none',
@@ -112,14 +116,6 @@ const useStyles = makeStyles(
112
116
  bottom: 0,
113
117
  left: 0,
114
118
  right: 0,
115
- transition: `opacity ${time}`,
116
- opacity: 0,
117
- },
118
- dividerCustomDivider: {
119
- opacity: 1,
120
- },
121
- dividerScrolled: {
122
- opacity: 1,
123
119
  },
124
120
  dividerFloatingSm: {
125
121
  [theme.breakpoints.down('sm')]: {
@@ -165,7 +161,7 @@ export default function LayoutHeaderContent(props: ContentProps) {
165
161
  floatingSm,
166
162
  floatingMd,
167
163
  scrolled,
168
- customDivider: !!divider,
164
+ divider: !!divider,
169
165
  })
170
166
 
171
167
  return (
@@ -175,7 +171,7 @@ export default function LayoutHeaderContent(props: ContentProps) {
175
171
  <div {...className('left')}>{left}</div>
176
172
  <div {...className('center')}>{children}</div>
177
173
  <div {...className('right')}>{right}</div>
178
- <div {...className('divider')}>{divider ?? <Divider />}</div>
174
+ {divider && <div {...className('divider')}>{divider}</div>}
179
175
  </div>
180
176
  </>
181
177
  )
@@ -1,7 +1,7 @@
1
1
  import { usePageContext, usePageRouter, useScrollOffset } from '@graphcommerce/framer-next-pages'
2
2
  import { Scroller, useScrollerContext, useScrollTo } from '@graphcommerce/framer-scroller'
3
3
  import { useElementScroll, useIsomorphicLayoutEffect } from '@graphcommerce/framer-utils'
4
- import { makeStyles, Theme } from '@material-ui/core'
4
+ import { makeStyles, Theme, ClickAwayListener } from '@material-ui/core'
5
5
  import {
6
6
  m,
7
7
  MotionValue,
@@ -26,6 +26,14 @@ const useStyles = makeStyles(
26
26
  '@supports (-webkit-touch-callout: none)': {
27
27
  height: '-webkit-fill-available',
28
28
  },
29
+ [theme.breakpoints.down('sm')]: {
30
+ width: '100vw',
31
+ borderRadius: theme.shape.borderRadius * 3,
32
+ },
33
+ [theme.breakpoints.up('md')]: {
34
+ width: '100vw',
35
+ borderRadius: theme.shape.borderRadius * 4,
36
+ },
29
37
  },
30
38
  rootVariantSmLeft: {
31
39
  [theme.breakpoints.down('sm')]: {
@@ -152,13 +160,13 @@ const useStyles = makeStyles(
152
160
  overlayPaneVariantSmBottom: {
153
161
  [theme.breakpoints.down('sm')]: {
154
162
  width: '100vw',
155
- borderRadius: 10,
163
+ borderRadius: theme.shape.borderRadius * 3,
156
164
  },
157
165
  },
158
166
  overlayPaneVariantMdBottom: {
159
167
  [theme.breakpoints.up('md')]: {
160
168
  width: '100vw',
161
- borderRadius: 10,
169
+ borderRadius: theme.shape.borderRadius * 4,
162
170
  },
163
171
  },
164
172
  overlayPaneVariantSmLeft: {
@@ -339,11 +347,13 @@ export function LayoutOverlayBase(props: LayoutOverlayBaseProps) {
339
347
  <>
340
348
  <m.div {...className('backdrop')} style={{ opacity: positions.open.visible }} />
341
349
  <Scroller {...className('root')} grid={false} hideScrollbar>
342
- <div {...className('beforeOverlay')} onClick={closeOverlay} />
350
+ <div {...className('beforeOverlay')} />
343
351
  <div {...className('overlay')} ref={overlayRef}>
344
- <div {...className('overlayPane')}>
345
- <LayoutProvider scroll={scrollWithoffset}>{children}</LayoutProvider>
346
- </div>
352
+ <ClickAwayListener onClickAway={closeOverlay}>
353
+ <div {...className('overlayPane')}>
354
+ <LayoutProvider scroll={scrollWithoffset}>{children}</LayoutProvider>
355
+ </div>
356
+ </ClickAwayListener>
347
357
  </div>
348
358
  <div {...className('afterOverlay')} />
349
359
  </Scroller>
@@ -114,12 +114,15 @@ export default function TextInputNumber(props: TextInputNumberProps) {
114
114
  inputRef={forkRef}
115
115
  className={clsx(textFieldProps.className, classes.quantity)}
116
116
  autoComplete='off'
117
+ label={' '}
118
+ id='quantity-input'
119
+ InputLabelProps={{ shrink: false }}
117
120
  InputProps={{
118
121
  ...textFieldProps.InputProps,
119
122
  startAdornment: (
120
123
  <IconButton
121
124
  aria-label='step down'
122
- size='small'
125
+ size='medium'
123
126
  edge='start'
124
127
  onPointerDown={() => setDirection('down')}
125
128
  onPointerUp={stop}
@@ -135,7 +138,7 @@ export default function TextInputNumber(props: TextInputNumberProps) {
135
138
  endAdornment: (
136
139
  <IconButton
137
140
  aria-label='step up'
138
- size='small'
141
+ size='medium'
139
142
  edge='end'
140
143
  onPointerDown={() => setDirection('up')}
141
144
  onPointerUp={() => setDirection(null)}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@graphcommerce/next-ui",
3
- "version": "3.20.1",
3
+ "version": "3.20.5",
4
4
  "author": "",
5
5
  "license": "MIT",
6
6
  "scripts": {
@@ -11,7 +11,7 @@
11
11
  "dependencies": {
12
12
  "@apollo/client": "^3.4.16",
13
13
  "@graphcommerce/framer-next-pages": "^2.108.0",
14
- "@graphcommerce/framer-scroller": "^1.1.1",
14
+ "@graphcommerce/framer-scroller": "^1.1.5",
15
15
  "@graphcommerce/framer-utils": "^2.103.16",
16
16
  "@graphcommerce/graphql": "^2.105.6",
17
17
  "@graphcommerce/image": "^2.105.5",
@@ -52,5 +52,5 @@
52
52
  "project": "./tsconfig.json"
53
53
  }
54
54
  },
55
- "gitHead": "b4bdc1cd365ebdd0bad8e1ed6afd374123bb2908"
55
+ "gitHead": "9a8007742437e8d0d88e60376c3402a46f20908d"
56
56
  }