@graphcommerce/next-ui 5.1.0-canary.8 → 5.1.0
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 +43 -0
- package/Form/Form.tsx +1 -2
- package/Overlay/components/OverlayBase.tsx +18 -12
- package/Theme/MuiChip.ts +23 -21
- package/Theme/themeDefaults.ts +1 -3
- package/package.json +9 -9
- package/types.d.ts +2 -2
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,48 @@
|
|
|
1
1
|
# Change Log
|
|
2
2
|
|
|
3
|
+
## 5.1.0
|
|
4
|
+
|
|
5
|
+
### Patch Changes
|
|
6
|
+
|
|
7
|
+
- [#1755](https://github.com/graphcommerce-org/graphcommerce/pull/1755) [`0025ad80f`](https://github.com/graphcommerce-org/graphcommerce/commit/0025ad80fb82d5d1e6c786bb8b5f39b2456c0932) - Renamed clientSizeCssVar.y/x to dvh(100) and dvw(100) ([@paales](https://github.com/paales))
|
|
8
|
+
|
|
9
|
+
- [#1760](https://github.com/graphcommerce-org/graphcommerce/pull/1760) [`06a81e661`](https://github.com/graphcommerce-org/graphcommerce/commit/06a81e66144b4d94a1e318c2e26cac8d13aa0eb7) - When you navigate back to an overlay (cart, etc.), it can no longer be closed by dragging or clicking on the backdrop. ([@paales](https://github.com/paales))
|
|
10
|
+
|
|
11
|
+
- [#1750](https://github.com/graphcommerce-org/graphcommerce/pull/1750) [`3479bc1e2`](https://github.com/graphcommerce-org/graphcommerce/commit/3479bc1e24da0e8a751ee301c59fa5f9755c8559) - Show globe icon instead of shopping bag icon for store/language-switcher ([@FrankHarland](https://github.com/FrankHarland))
|
|
12
|
+
|
|
13
|
+
- [#1755](https://github.com/graphcommerce-org/graphcommerce/pull/1755) [`3fcb03b79`](https://github.com/graphcommerce-org/graphcommerce/commit/3fcb03b79ce634650fd982dc36a112dccd37282f) - New props added to LayoutOverlay and Overlay components: `widthSm` and `widthMd` to control the width of the overlay.
|
|
14
|
+
|
|
15
|
+
Defaults to `widthSm = 'max(300px, 80vw)', widthMd = 'max(800px, 50vw)'` ([@paales](https://github.com/paales))
|
|
16
|
+
|
|
17
|
+
- [#1745](https://github.com/graphcommerce-org/graphcommerce/pull/1745) [`b1444b933`](https://github.com/graphcommerce-org/graphcommerce/commit/b1444b9336107d3ac111563f9b62a884f1b26a8d) - Bring password reset page more in line with standard forms, add missing translations. ([@github-actions](https://github.com/apps/github-actions))
|
|
18
|
+
|
|
19
|
+
- [#1752](https://github.com/graphcommerce-org/graphcommerce/pull/1752) [`2a6a4d9ec`](https://github.com/graphcommerce-org/graphcommerce/commit/2a6a4d9ecfa1b58a66ba9b9d00016d6feda9aa95) - Updated dependencies to latest versions, except for nextjs; Solve tons of peer dependency issues.
|
|
20
|
+
|
|
21
|
+
- Updated the @mui/material package
|
|
22
|
+
- Removed dependencies on react-hook-form-mui and @playwright/test
|
|
23
|
+
- Upgraded dependencies including type-fest and graphql-mesh
|
|
24
|
+
- Solved peer dependency issues ([@paales](https://github.com/paales))
|
|
25
|
+
|
|
26
|
+
- [#1760](https://github.com/graphcommerce-org/graphcommerce/pull/1760) [`f1ebaa2ae`](https://github.com/graphcommerce-org/graphcommerce/commit/f1ebaa2aea68fe395fddb1b7dd91624251b1d501) - Navigation received focus making the menu visible while it shouldn't ([@paales](https://github.com/paales))
|
|
27
|
+
|
|
28
|
+
- [#1755](https://github.com/graphcommerce-org/graphcommerce/pull/1755) [`f44a05a6c`](https://github.com/graphcommerce-org/graphcommerce/commit/f44a05a6cedadc17e44c87f53cad5f462bc52aba) - Use a singlular useElementScroll and provide ther scroll from the useScrollerContext ([@paales](https://github.com/paales))
|
|
29
|
+
|
|
30
|
+
- [#1745](https://github.com/graphcommerce-org/graphcommerce/pull/1745) [`c7dc855af`](https://github.com/graphcommerce-org/graphcommerce/commit/c7dc855af5e096a53e17f3b2980b210642270fd5) - Added a spreadVal utility to replace responsiveVal and breakpointVal ([@github-actions](https://github.com/apps/github-actions))
|
|
31
|
+
|
|
32
|
+
- [#1755](https://github.com/graphcommerce-org/graphcommerce/pull/1755) [`9de7c6960`](https://github.com/graphcommerce-org/graphcommerce/commit/9de7c6960c7ec7d6d28a670f71ac678c5d3c838f) - The scrollbar was hidden for bottom sheets, while that wasn't necessary ([@paales](https://github.com/paales))
|
|
33
|
+
|
|
34
|
+
## 5.1.0-canary.11
|
|
35
|
+
|
|
36
|
+
## 5.1.0-canary.10
|
|
37
|
+
|
|
38
|
+
### Patch Changes
|
|
39
|
+
|
|
40
|
+
- [#1760](https://github.com/graphcommerce-org/graphcommerce/pull/1760) [`06a81e661`](https://github.com/graphcommerce-org/graphcommerce/commit/06a81e66144b4d94a1e318c2e26cac8d13aa0eb7) - When you navigate back to an overlay (cart, etc.), it can no longer be closed by dragging or clicking on the backdrop. ([@paales](https://github.com/paales))
|
|
41
|
+
|
|
42
|
+
- [#1760](https://github.com/graphcommerce-org/graphcommerce/pull/1760) [`f1ebaa2ae`](https://github.com/graphcommerce-org/graphcommerce/commit/f1ebaa2aea68fe395fddb1b7dd91624251b1d501) - Navigation received focus making the menu visible while it shouldn't ([@paales](https://github.com/paales))
|
|
43
|
+
|
|
44
|
+
## 5.1.0-canary.9
|
|
45
|
+
|
|
3
46
|
## 5.1.0-canary.8
|
|
4
47
|
|
|
5
48
|
## 5.1.0-canary.7
|
package/Form/Form.tsx
CHANGED
|
@@ -1,6 +1,5 @@
|
|
|
1
1
|
import { darken, lighten, styled, Theme } from '@mui/material'
|
|
2
2
|
import { breakpointVal } from '../Styles/breakpointVal'
|
|
3
|
-
import { sx } from '../Theme/themeDefaults'
|
|
4
3
|
|
|
5
4
|
type FormStyleProps = {
|
|
6
5
|
contained?: boolean
|
|
@@ -8,7 +7,7 @@ type FormStyleProps = {
|
|
|
8
7
|
}
|
|
9
8
|
|
|
10
9
|
const styles = ({ theme, contained = false, background }: { theme: Theme } & FormStyleProps) =>
|
|
11
|
-
|
|
10
|
+
theme.unstable_sx([
|
|
12
11
|
{
|
|
13
12
|
display: 'grid',
|
|
14
13
|
alignItems: 'center',
|
|
@@ -123,22 +123,26 @@ export function OverlayBase(incommingProps: LayoutOverlayBaseProps) {
|
|
|
123
123
|
|
|
124
124
|
document.body.style.overflow = 'hidden'
|
|
125
125
|
|
|
126
|
-
if (
|
|
127
|
-
|
|
128
|
-
|
|
129
|
-
|
|
130
|
-
|
|
131
|
-
|
|
132
|
-
|
|
126
|
+
if (position.get() !== OverlayPosition.OPENED) {
|
|
127
|
+
if (direction === 1) {
|
|
128
|
+
scroller.scrollLeft = positions.closed.x.get()
|
|
129
|
+
scroller.scrollTop = positions.closed.y.get()
|
|
130
|
+
// eslint-disable-next-line @typescript-eslint/no-floating-promises
|
|
131
|
+
scrollTo(open).then(() => {
|
|
132
|
+
scroller.scrollLeft = positions.open.x.get()
|
|
133
|
+
scroller.scrollTop = positions.open.y.get()
|
|
134
|
+
position.set(OverlayPosition.OPENED)
|
|
135
|
+
})
|
|
136
|
+
} else {
|
|
137
|
+
scroller.scrollLeft = open.x
|
|
138
|
+
scroller.scrollTop = open.y
|
|
133
139
|
position.set(OverlayPosition.OPENED)
|
|
134
|
-
|
|
135
|
-
|
|
136
|
-
scroller.scrollLeft = open.x
|
|
137
|
-
scroller.scrollTop = open.y
|
|
140
|
+
snap.set(true)
|
|
141
|
+
}
|
|
138
142
|
}
|
|
139
143
|
|
|
140
144
|
return clearScrollLock
|
|
141
|
-
}, [direction, isPresent, position, positions, scrollTo, scrollerRef])
|
|
145
|
+
}, [direction, isPresent, position, positions, scrollTo, scrollerRef, snap])
|
|
142
146
|
|
|
143
147
|
// Make sure the overlay stays open when resizing the window.
|
|
144
148
|
useEffect(() => {
|
|
@@ -230,6 +234,7 @@ export function OverlayBase(incommingProps: LayoutOverlayBaseProps) {
|
|
|
230
234
|
return (
|
|
231
235
|
<>
|
|
232
236
|
<MotionDiv
|
|
237
|
+
inert={active ? undefined : 'true'}
|
|
233
238
|
className={classes.backdrop}
|
|
234
239
|
style={{ opacity: positions.open.visible }}
|
|
235
240
|
sx={[
|
|
@@ -251,6 +256,7 @@ export function OverlayBase(incommingProps: LayoutOverlayBaseProps) {
|
|
|
251
256
|
]}
|
|
252
257
|
/>
|
|
253
258
|
<Scroller
|
|
259
|
+
inert={active ? undefined : 'true'}
|
|
254
260
|
className={`${classes.scroller} ${className ?? ''}`}
|
|
255
261
|
grid={false}
|
|
256
262
|
onClick={onClickAway}
|
package/Theme/MuiChip.ts
CHANGED
|
@@ -1,6 +1,5 @@
|
|
|
1
1
|
import { ComponentsVariants, darken } from '@mui/material'
|
|
2
2
|
import { responsiveVal } from '../Styles'
|
|
3
|
-
import { sx } from './themeDefaults'
|
|
4
3
|
|
|
5
4
|
declare module '@mui/material/Chip/Chip' {
|
|
6
5
|
interface ChipPropsSizeOverrides {
|
|
@@ -21,32 +20,35 @@ export const MuiChip: ChipVariants = [
|
|
|
21
20
|
},
|
|
22
21
|
{
|
|
23
22
|
props: { size: 'small' },
|
|
24
|
-
style:
|
|
25
|
-
|
|
26
|
-
|
|
23
|
+
style: ({ theme }) =>
|
|
24
|
+
theme.unstable_sx({
|
|
25
|
+
typography: 'caption',
|
|
26
|
+
}),
|
|
27
27
|
},
|
|
28
28
|
{
|
|
29
29
|
props: { size: 'medium' },
|
|
30
|
-
style:
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
30
|
+
style: ({ theme }) =>
|
|
31
|
+
theme.unstable_sx({
|
|
32
|
+
height: responsiveVal(26, 30),
|
|
33
|
+
paddingLeft: responsiveVal(3, 6),
|
|
34
|
+
paddingRight: responsiveVal(3, 6),
|
|
35
|
+
typography: 'caption',
|
|
36
|
+
}),
|
|
36
37
|
},
|
|
37
38
|
{
|
|
38
39
|
props: { size: 'responsive' },
|
|
39
|
-
style:
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
40
|
+
style: ({ theme }) =>
|
|
41
|
+
theme.unstable_sx({
|
|
42
|
+
height: responsiveVal(32, 40),
|
|
43
|
+
paddingLeft: responsiveVal(4, 8),
|
|
44
|
+
paddingRight: responsiveVal(4, 8),
|
|
45
|
+
borderRadius: '99em',
|
|
46
|
+
typography: 'body2',
|
|
47
|
+
'& .MuiChip-label': {
|
|
48
|
+
paddingLeft: responsiveVal(6, 10),
|
|
49
|
+
paddingRight: responsiveVal(6, 10),
|
|
50
|
+
},
|
|
51
|
+
}),
|
|
50
52
|
},
|
|
51
53
|
{
|
|
52
54
|
props: { variant: 'outlined' },
|
package/Theme/themeDefaults.ts
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { SxProps, Theme } from '@mui/material'
|
|
2
2
|
import { Shadows } from '@mui/material/styles/shadows'
|
|
3
3
|
import { spreadVal } from '../Styles/spreadVal'
|
|
4
4
|
import { breakpoints } from './breakpoints'
|
|
@@ -38,5 +38,3 @@ export const themeBaseDefaults = {
|
|
|
38
38
|
spreadVal,
|
|
39
39
|
shadows,
|
|
40
40
|
}
|
|
41
|
-
|
|
42
|
-
export const sx = (props: SxProps<Theme>) => experimental_sx<Theme>(props)
|
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": "5.1.0
|
|
5
|
+
"version": "5.1.0",
|
|
6
6
|
"author": "",
|
|
7
7
|
"license": "MIT",
|
|
8
8
|
"sideEffects": false,
|
|
@@ -18,21 +18,21 @@
|
|
|
18
18
|
"@emotion/react": "^11.10.5",
|
|
19
19
|
"@emotion/server": "^11.4.0",
|
|
20
20
|
"@emotion/styled": "^11.10.5",
|
|
21
|
-
"@graphcommerce/framer-next-pages": "5.1.0
|
|
22
|
-
"@graphcommerce/framer-scroller": "5.1.0
|
|
23
|
-
"@graphcommerce/framer-utils": "5.1.0
|
|
24
|
-
"@graphcommerce/image": "5.1.0
|
|
21
|
+
"@graphcommerce/framer-next-pages": "5.1.0",
|
|
22
|
+
"@graphcommerce/framer-scroller": "5.1.0",
|
|
23
|
+
"@graphcommerce/framer-utils": "5.1.0",
|
|
24
|
+
"@graphcommerce/image": "5.1.0",
|
|
25
25
|
"cookie": "^0.5.0",
|
|
26
26
|
"react-is": "^18.2.0",
|
|
27
27
|
"schema-dts": "^1.1.0"
|
|
28
28
|
},
|
|
29
29
|
"devDependencies": {
|
|
30
|
-
"@graphcommerce/eslint-config-pwa": "5.1.0
|
|
31
|
-
"@graphcommerce/prettier-config-pwa": "5.1.0
|
|
32
|
-
"@graphcommerce/typescript-config-pwa": "5.1.0
|
|
30
|
+
"@graphcommerce/eslint-config-pwa": "5.1.0",
|
|
31
|
+
"@graphcommerce/prettier-config-pwa": "5.1.0",
|
|
32
|
+
"@graphcommerce/typescript-config-pwa": "5.1.0",
|
|
33
33
|
"@types/cookie": "^0.5.1",
|
|
34
34
|
"@types/react-is": "^17.0.3",
|
|
35
|
-
"typescript": "4.9.
|
|
35
|
+
"typescript": "4.9.4"
|
|
36
36
|
},
|
|
37
37
|
"peerDependencies": {
|
|
38
38
|
"@lingui/core": "^3.13.2",
|
package/types.d.ts
CHANGED
|
@@ -7,8 +7,8 @@ import './Theme/createTheme'
|
|
|
7
7
|
import 'react'
|
|
8
8
|
|
|
9
9
|
declare module 'react' {
|
|
10
|
-
interface
|
|
11
|
-
|
|
10
|
+
interface HTMLAttributes<T> extends AriaAttributes, DOMAttributes<T> {
|
|
11
|
+
inert?: 'true'
|
|
12
12
|
}
|
|
13
13
|
}
|
|
14
14
|
|