@graphcommerce/graphcms-ui 2.105.4 → 2.106.3
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,26 @@
|
|
|
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
|
+
# [2.106.0](https://github.com/ho-nl/m2-pwa/compare/@graphcommerce/graphcms-ui@2.105.4...@graphcommerce/graphcms-ui@2.106.0) (2021-12-01)
|
|
7
|
+
|
|
8
|
+
|
|
9
|
+
### Bug Fixes
|
|
10
|
+
|
|
11
|
+
* build ([72d9353](https://github.com/ho-nl/m2-pwa/commit/72d935376a1967cc976c20b984ef15a862e5d0f4))
|
|
12
|
+
* fontWeights ([7172527](https://github.com/ho-nl/m2-pwa/commit/71725272fe9f0b854d918ae357a668f641bfe8e5))
|
|
13
|
+
* hero text spacing ([79dd6aa](https://github.com/ho-nl/m2-pwa/commit/79dd6aa2fe576104ebbbdd092f6b415d319dec48))
|
|
14
|
+
* render bug stroke variable fonts ([582de18](https://github.com/ho-nl/m2-pwa/commit/582de187800ee9c53718bf43a39ca77398d21b91)), closes [/github.com/rsms/inter/issues/292#issuecomment-674993644](https://github.com//github.com/rsms/inter/issues/292/issues/issuecomment-674993644)
|
|
15
|
+
|
|
16
|
+
|
|
17
|
+
### Features
|
|
18
|
+
|
|
19
|
+
* breakpointVal ([0294503](https://github.com/ho-nl/m2-pwa/commit/029450343051cf6995babad9f9b42c7e6ad1094e))
|
|
20
|
+
* responsiveTyp ([6108b61](https://github.com/ho-nl/m2-pwa/commit/6108b6148e76ddbbe2db1614f10aaf88423db5ca))
|
|
21
|
+
|
|
22
|
+
|
|
23
|
+
|
|
24
|
+
|
|
25
|
+
|
|
6
26
|
# [2.105.0](https://github.com/ho-nl/m2-pwa/compare/@graphcommerce/graphcms-ui@2.104.29...@graphcommerce/graphcms-ui@2.105.0) (2021-11-12)
|
|
7
27
|
|
|
8
28
|
|
|
@@ -1,23 +1,21 @@
|
|
|
1
|
+
import { breakpointVal } from '@graphcommerce/next-ui'
|
|
1
2
|
import { Theme, withStyles } from '@material-ui/core'
|
|
2
3
|
import RichText from '.'
|
|
3
4
|
|
|
4
5
|
const RichTextHeadingStrongStroked = withStyles((theme: Theme) => ({
|
|
5
6
|
h2: {
|
|
6
7
|
...theme.typography.h1,
|
|
7
|
-
fontSize: `calc(${theme.typography.h1.fontSize}*1.1)`,
|
|
8
8
|
textTransform: 'uppercase',
|
|
9
9
|
color: theme.palette.text.primary,
|
|
10
10
|
[theme.breakpoints.up('sm')]: {
|
|
11
|
-
fontSize
|
|
11
|
+
...breakpointVal('fontSize', 36, 82, theme.breakpoints.values),
|
|
12
12
|
},
|
|
13
|
-
WebkitTextStroke: `0.9px ${theme.palette.text.primary}`,
|
|
14
13
|
'& strong': {
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
[theme.breakpoints.up('md')]: {
|
|
19
|
-
WebkitTextStroke: `1.2x ${theme.palette.text.primary}`,
|
|
14
|
+
// https://github.com/rsms/inter/issues/292#issuecomment-674993644
|
|
15
|
+
color: theme.palette.background.default,
|
|
16
|
+
textShadow: `1.2px 0 0 ${theme.palette.text.primary},0 1.2px 0 ${theme.palette.text.primary},-1.2px 0 0 ${theme.palette.text.primary},0 -1.2px 0 ${theme.palette.text.primary}`,
|
|
20
17
|
},
|
|
18
|
+
[theme.breakpoints.up('md')]: {},
|
|
21
19
|
},
|
|
22
20
|
}))(RichText)
|
|
23
21
|
|
|
@@ -1,16 +1,17 @@
|
|
|
1
|
+
import { breakpointVal } from '@graphcommerce/next-ui'
|
|
1
2
|
import { Theme, withStyles } from '@material-ui/core'
|
|
2
3
|
import RichText from '.'
|
|
3
4
|
|
|
4
5
|
const RichTextHero = withStyles((theme: Theme) => ({
|
|
5
6
|
h1: {
|
|
6
7
|
...theme.typography.h1,
|
|
7
|
-
fontSize: `calc(${theme.typography.h1.fontSize}*1.1)`,
|
|
8
8
|
textTransform: 'uppercase',
|
|
9
9
|
maxWidth: '70%',
|
|
10
10
|
textAlign: 'center',
|
|
11
|
+
margin: 0,
|
|
11
12
|
marginBottom: theme.spacings.md,
|
|
12
13
|
[theme.breakpoints.up('sm')]: {
|
|
13
|
-
fontSize
|
|
14
|
+
...breakpointVal('fontSize', 36, 82, theme.breakpoints.values),
|
|
14
15
|
},
|
|
15
16
|
[theme.breakpoints.up('md')]: {
|
|
16
17
|
textAlign: 'left',
|
|
@@ -5,6 +5,9 @@ const RichTextQuote = withStyles((theme: Theme) => ({
|
|
|
5
5
|
paragraph: {
|
|
6
6
|
...theme.typography.h4,
|
|
7
7
|
fontWeight: 600,
|
|
8
|
+
'@supports (font-variation-settings: normal)': {
|
|
9
|
+
fontVariationSettings: "'wght' 620",
|
|
10
|
+
},
|
|
8
11
|
textTransform: 'uppercase',
|
|
9
12
|
maxWidth: '60%',
|
|
10
13
|
textAlign: 'center',
|
|
@@ -2,9 +2,19 @@ import { UseStyles, responsiveVal } from '@graphcommerce/next-ui'
|
|
|
2
2
|
import { makeStyles, Theme } from '@material-ui/core'
|
|
3
3
|
|
|
4
4
|
const useRichTextStyles = makeStyles(
|
|
5
|
-
(
|
|
6
|
-
root: {
|
|
7
|
-
|
|
5
|
+
(theme: Theme) => ({
|
|
6
|
+
root: {
|
|
7
|
+
'&:empty': {
|
|
8
|
+
display: 'none',
|
|
9
|
+
},
|
|
10
|
+
'&:last-child': {
|
|
11
|
+
marginBottom: 0,
|
|
12
|
+
},
|
|
13
|
+
},
|
|
14
|
+
paragraph: {
|
|
15
|
+
marginBottom: '1em',
|
|
16
|
+
wordBreak: 'break-word',
|
|
17
|
+
},
|
|
8
18
|
h1: {
|
|
9
19
|
marginTop: '0.5em',
|
|
10
20
|
marginBottom: '0.5em',
|
|
@@ -29,56 +39,53 @@ const useRichTextStyles = makeStyles(
|
|
|
29
39
|
marginBottom: responsiveVal(7, 20),
|
|
30
40
|
'&:first-child': { marginTop: 0 },
|
|
31
41
|
},
|
|
32
|
-
h6: {
|
|
33
|
-
|
|
42
|
+
h6: {
|
|
43
|
+
'&:first-of-type': {
|
|
44
|
+
marginTop: 0,
|
|
45
|
+
},
|
|
46
|
+
},
|
|
47
|
+
asset: {
|
|
48
|
+
width: '100%',
|
|
49
|
+
height: 'auto',
|
|
50
|
+
},
|
|
34
51
|
blockQuote: {
|
|
35
|
-
paddingLeft: spacings.sm,
|
|
36
|
-
margin: `${spacings.md} 0`,
|
|
52
|
+
paddingLeft: theme.spacings.sm,
|
|
53
|
+
margin: `${theme.spacings.md} 0`,
|
|
54
|
+
},
|
|
55
|
+
ol: {
|
|
56
|
+
marginBottom: '1em',
|
|
57
|
+
},
|
|
58
|
+
ul: {
|
|
59
|
+
marginBottom: '1em',
|
|
37
60
|
},
|
|
38
|
-
ol: { marginBottom: '1em' },
|
|
39
|
-
ul: { marginBottom: '1em' },
|
|
40
61
|
strong: {},
|
|
41
62
|
italic: {},
|
|
42
63
|
underlined: {},
|
|
43
64
|
code: {
|
|
44
65
|
width: 'fit-content',
|
|
45
66
|
maxWidth: '100%',
|
|
46
|
-
background: '#d8d8d8',
|
|
47
67
|
padding: 5,
|
|
48
68
|
overflow: 'scroll',
|
|
49
69
|
},
|
|
50
|
-
aspectContainer: {
|
|
51
|
-
position: 'relative',
|
|
52
|
-
paddingTop: 'calc(100% / 16 * 9)',
|
|
53
|
-
marginBottom: spacings.md,
|
|
54
|
-
'& > *': {
|
|
55
|
-
width: '100%',
|
|
56
|
-
height: '100%',
|
|
57
|
-
position: 'absolute',
|
|
58
|
-
top: 0,
|
|
59
|
-
left: 0,
|
|
60
|
-
},
|
|
61
|
-
},
|
|
62
70
|
iframe: {},
|
|
71
|
+
aspectContainer: {},
|
|
63
72
|
table: {
|
|
64
73
|
display: 'table',
|
|
65
74
|
width: '100%',
|
|
66
75
|
borderSpacing: '2px',
|
|
67
76
|
borderCollapse: 'collapse',
|
|
68
|
-
marginTop: spacings.md,
|
|
69
|
-
marginBottom: spacings.sm,
|
|
70
|
-
|
|
77
|
+
marginTop: theme.spacings.md,
|
|
78
|
+
marginBottom: theme.spacings.sm,
|
|
71
79
|
'& thead, tbody': {
|
|
72
80
|
'& td': {
|
|
73
81
|
padding: '10px 20px',
|
|
74
82
|
},
|
|
75
83
|
},
|
|
76
|
-
|
|
77
84
|
'& thead': {
|
|
78
85
|
'& tr': {
|
|
79
86
|
'& td': {
|
|
80
87
|
'& p': {
|
|
81
|
-
fontWeight: typography.fontWeightBold,
|
|
88
|
+
fontWeight: theme.typography.fontWeightBold,
|
|
82
89
|
},
|
|
83
90
|
},
|
|
84
91
|
},
|
|
@@ -87,23 +94,22 @@ const useRichTextStyles = makeStyles(
|
|
|
87
94
|
display: 'table-row-group',
|
|
88
95
|
verticalAlign: 'center',
|
|
89
96
|
borderColor: 'inherit',
|
|
90
|
-
|
|
91
97
|
'& tr': {
|
|
92
98
|
'&:nth-child(odd)': {
|
|
93
|
-
background: palette.background.paper,
|
|
99
|
+
background: theme.palette.background.paper,
|
|
94
100
|
},
|
|
95
101
|
},
|
|
96
|
-
|
|
97
102
|
'& td': {
|
|
98
|
-
[breakpoints.up('sm')]: {
|
|
103
|
+
[theme.breakpoints.up('sm')]: {
|
|
99
104
|
minWidth: '150px',
|
|
100
105
|
},
|
|
101
|
-
|
|
102
106
|
'& p': {},
|
|
103
107
|
},
|
|
104
108
|
},
|
|
105
109
|
},
|
|
106
|
-
link: {
|
|
110
|
+
link: {
|
|
111
|
+
wordBreak: 'break-word',
|
|
112
|
+
},
|
|
107
113
|
}),
|
|
108
114
|
{ name: 'RichText' },
|
|
109
115
|
)
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@graphcommerce/graphcms-ui",
|
|
3
|
-
"version": "2.
|
|
3
|
+
"version": "2.106.3",
|
|
4
4
|
"sideEffects": false,
|
|
5
5
|
"prettier": "@graphcommerce/prettier-config-pwa",
|
|
6
6
|
"browserslist": [
|
|
@@ -14,15 +14,15 @@
|
|
|
14
14
|
},
|
|
15
15
|
"devDependencies": {
|
|
16
16
|
"@graphcommerce/browserslist-config-pwa": "^3.0.2",
|
|
17
|
-
"@graphcommerce/eslint-config-pwa": "^3.1.
|
|
17
|
+
"@graphcommerce/eslint-config-pwa": "^3.1.6",
|
|
18
18
|
"@graphcommerce/prettier-config-pwa": "^3.0.4",
|
|
19
19
|
"@graphcommerce/typescript-config-pwa": "^3.1.1",
|
|
20
20
|
"@playwright/test": "^1.16.2"
|
|
21
21
|
},
|
|
22
22
|
"dependencies": {
|
|
23
23
|
"@apollo/client": "^3.4.16",
|
|
24
|
-
"@graphcommerce/image": "^2.105.
|
|
25
|
-
"@graphcommerce/next-ui": "^3.
|
|
24
|
+
"@graphcommerce/image": "^2.105.5",
|
|
25
|
+
"@graphcommerce/next-ui": "^3.20.1",
|
|
26
26
|
"@material-ui/core": "^4.12.3",
|
|
27
27
|
"@material-ui/lab": "^4.0.0-alpha.60",
|
|
28
28
|
"next": "^12.0.3",
|
|
@@ -30,5 +30,5 @@
|
|
|
30
30
|
"react-dom": "^17.0.2",
|
|
31
31
|
"type-fest": "^2.5.1"
|
|
32
32
|
},
|
|
33
|
-
"gitHead": "
|
|
33
|
+
"gitHead": "b4bdc1cd365ebdd0bad8e1ed6afd374123bb2908"
|
|
34
34
|
}
|