@graphcommerce/next-ui 4.2.0 → 4.2.1

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,25 @@
1
1
  # Change Log
2
2
 
3
+ ## 4.2.1
4
+
5
+ ### Patch Changes
6
+
7
+ - [#1294](https://github.com/ho-nl/m2-pwa/pull/1294)
8
+ [`19f33e0aa`](https://github.com/ho-nl/m2-pwa/commit/19f33e0aaf4e3121edd444926d08b6459d3ef400)
9
+ Thanks [@paales](https://github.com/paales)! - Make sure the minHeight of overlays always have the
10
+ correct height, even if the content changes size
11
+
12
+ * [#1294](https://github.com/ho-nl/m2-pwa/pull/1294)
13
+ [`aea787542`](https://github.com/ho-nl/m2-pwa/commit/aea787542484a0480a48031fcc4a9a5566c6bfc7)
14
+ Thanks [@paales](https://github.com/paales)! - Make sure the labels of LayoutHeaderBack/Close
15
+ aren’t rendered on mobile
16
+
17
+ * Updated dependencies
18
+ [[`4e28c8afd`](https://github.com/ho-nl/m2-pwa/commit/4e28c8afd9cead3577dd0eff97b5c44ba4c1c862),
19
+ [`afb993244`](https://github.com/ho-nl/m2-pwa/commit/afb993244aabc8135ce54a79743cbf63bc5677d3)]:
20
+ - @graphcommerce/framer-scroller@2.0.5
21
+ - @graphcommerce/framer-next-pages@3.1.1
22
+
3
23
  ## 4.2.0
4
24
 
5
25
  ### Minor Changes
@@ -1,5 +1,6 @@
1
1
  import { useUp, usePrevUp, usePageContext } from '@graphcommerce/framer-next-pages'
2
2
  import { t } from '@lingui/macro'
3
+ import { Box } from '@mui/material'
3
4
  import PageLink from 'next/link'
4
5
  import { useRouter } from 'next/router'
5
6
  import { LinkOrButton, LinkOrButtonProps } from '../../Button/LinkOrButton'
@@ -45,7 +46,9 @@ export default function LayoutHeaderBack(props: BackProps) {
45
46
  aria-label={label}
46
47
  {...props}
47
48
  >
48
- {label}
49
+ <Box component='span' sx={{ display: { xs: 'none', md: 'inline' } }}>
50
+ {label}
51
+ </Box>
49
52
  </LinkOrButton>
50
53
  )
51
54
  }
@@ -60,7 +63,9 @@ export default function LayoutHeaderBack(props: BackProps) {
60
63
  color='inherit'
61
64
  {...props}
62
65
  >
63
- {up.title}
66
+ <Box component='span' sx={{ display: { xs: 'none', md: 'inline' } }}>
67
+ {up.title}
68
+ </Box>
64
69
  </LinkOrButton>
65
70
  </PageLink>
66
71
  )
@@ -1,5 +1,6 @@
1
1
  import { useGo, usePageContext } from '@graphcommerce/framer-next-pages'
2
2
  import { Trans } from '@lingui/macro'
3
+ import { Box } from '@mui/material'
3
4
  import { LinkOrButton } from '../../Button/LinkOrButton'
4
5
  import { IconSvg } from '../../IconSvg'
5
6
  import { iconClose } from '../../icons'
@@ -19,10 +20,12 @@ export default function LayoutHeaderClose() {
19
20
  color='inherit'
20
21
  onClick={onClick}
21
22
  aria-label='Close'
22
- startIcon={<IconSvg src={iconClose} />}
23
+ startIcon={<IconSvg src={iconClose} size='medium' />}
23
24
  // className={classes.close}
24
25
  >
25
- <Trans>Close</Trans>
26
+ <Box component='span' sx={{ display: { xs: 'none', md: 'inline' } }}>
27
+ <Trans>Close</Trans>
28
+ </Box>
26
29
  </LinkOrButton>
27
30
  )
28
31
  }
@@ -86,7 +86,7 @@ export function LayoutDefault(props: LayoutDefaultProps) {
86
86
  >
87
87
  {header}
88
88
  </Box>
89
- {(menuFab || cartFab) && (
89
+ {menuFab || cartFab ? (
90
90
  <Box
91
91
  className={classes.fabs}
92
92
  sx={(theme) => ({
@@ -115,6 +115,8 @@ export function LayoutDefault(props: LayoutDefaultProps) {
115
115
  {menuFab}
116
116
  {cartFab}
117
117
  </Box>
118
+ ) : (
119
+ <div />
118
120
  )}
119
121
  <div className={classes.children}>{children}</div>
120
122
  <div className={classes.footer}>{footer}</div>
@@ -342,7 +342,9 @@ export function LayoutOverlayBase(props: LayoutOverlayBaseProps) {
342
342
  * can't change this value with JS as that causes much jank
343
343
  */
344
344
  '&.sizeSmFull, &.sizeSmMinimal': { paddingBottom: 56 },
345
- '&.variantSmBottom.sizeSmFull': { minHeight: 'calc(100vh - 56px)' },
345
+ '&.variantSmBottom.sizeSmFull': {
346
+ minHeight: `calc(100vh - ${theme.appShell.headerHeightSm} * 0.5)`,
347
+ },
346
348
 
347
349
  '&.variantSmBottom': {
348
350
  borderTopLeftRadius: `${theme.shape.borderRadius * 4}px`,
@@ -373,7 +375,7 @@ export function LayoutOverlayBase(props: LayoutOverlayBaseProps) {
373
375
  },
374
376
 
375
377
  '&.sizeMdFull.variantMdBottom': {
376
- minHeight: `calc(100vh - ${theme.appShell.headerHeightMd})`,
378
+ minHeight: `calc(100vh + ${theme.appShell.headerHeightMd} - (${theme.appShell.appBarHeightMd} - ${theme.appShell.appBarInnerHeightMd}) * 0.5)`,
377
379
  },
378
380
  '&.sizeMdFull.variantMdLeft': {
379
381
  paddingBottom: '1px',
package/package.json CHANGED
@@ -2,7 +2,7 @@
2
2
  "name": "@graphcommerce/next-ui",
3
3
  "homepage": "https://www.graphcommerce.org/",
4
4
  "repository": "github:graphcommerce-org/graphcommerce",
5
- "version": "4.2.0",
5
+ "version": "4.2.1",
6
6
  "author": "",
7
7
  "license": "MIT",
8
8
  "sideEffects": false,
@@ -19,8 +19,8 @@
19
19
  "@emotion/react": "^11.7.1",
20
20
  "@emotion/server": "^11.4.0",
21
21
  "@emotion/styled": "^11.6.0",
22
- "@graphcommerce/framer-next-pages": "^3.1.0",
23
- "@graphcommerce/framer-scroller": "^2.0.4",
22
+ "@graphcommerce/framer-next-pages": "^3.1.1",
23
+ "@graphcommerce/framer-scroller": "^2.0.5",
24
24
  "@graphcommerce/framer-utils": "^3.0.3",
25
25
  "@graphcommerce/image": "^3.1.0",
26
26
  "react-is": "^17.0.2",