Skip to content

Commit b377c79

Browse files
committed
Merge branch 'master' into next-core-mdx
2 parents fc8f24c + 9163f48 commit b377c79

File tree

32 files changed

+1020
-2261
lines changed

32 files changed

+1020
-2261
lines changed

CHANGELOG.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -18,6 +18,7 @@
1818
- The `@theme-ui/editor` API has changed significantly. See the README.md for more information.
1919

2020
- `@theme-ui/components`: on Grid component, allow custom `columns` definitions via strings #541
21+
- `@theme-ui/gatsby-theme-style-guide`: add docs on shadowing #558
2122
- Adds `@theme-ui/preset-polaris` #567
2223
- Adjusts default font stack in presets #568
2324

examples/gatsby-plugin/package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,7 @@
2424
"@testing-library/react": "^9.1.3",
2525
"husky": ">=4.0.7",
2626
"jest": "^24.8.0",
27-
"lint-staged": "9",
27+
"lint-staged": "10",
2828
"react-test-renderer": "^16.8.6"
2929
}
3030
}

lint-staged.config.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,3 @@
11
module.exports = {
2-
'*.{js,json}': ['prettier --write', 'git add'],
2+
'*.{js,json}': ['prettier --write'],
33
}

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -31,7 +31,7 @@
3131
"jest-emotion": "^10.0.11",
3232
"jest-mock-console": "^1.0.0",
3333
"lerna": "^3.14.1",
34-
"lint-staged": "9",
34+
"lint-staged": "10",
3535
"microbundle": "^0.11.0",
3636
"prettier": "^1.18.2",
3737
"react-test-renderer": "^16.8.6"

packages/color/package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@
88
"watch": "microbundle watch --no-compress"
99
},
1010
"dependencies": {
11-
"@styled-system/css": "^5.0.23",
11+
"@theme-ui/css": "^0.3.0-alpha.6",
1212
"polished": "^3.4.1"
1313
},
1414
"publishConfig": {

packages/color/src/index.js

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,10 @@
11
import * as P from 'polished'
2-
import { get } from '@styled-system/css'
2+
import { get } from '@theme-ui/css'
33

4-
const g = (t, c) => get(t, `colors.${c}`, c).replace(/^var\(--(\w+)(.*?), /,'').replace(/\)/,'')
4+
const g = (t, c) =>
5+
get(t, `colors.${c}`, c)
6+
.replace(/^var\(--(\w+)(.*?), /, '')
7+
.replace(/\)/, '')
58

69
export const darken = (c, n) => t => P.darken(n, g(t, c))
710
export const lighten = (c, n) => t => P.lighten(n, g(t, c))

packages/components/package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@
1212
"@emotion/core": "^10.0.0",
1313
"@emotion/styled": "^10.0.0",
1414
"@styled-system/color": "^5.1.2",
15-
"@styled-system/css": "^5.0.23",
15+
"@theme-ui/css": "^0.3.0-alpha.6",
1616
"@styled-system/should-forward-prop": "^5.1.2",
1717
"@styled-system/space": "^5.1.2"
1818
},

packages/components/src/AspectImage.js

Lines changed: 2 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -2,12 +2,8 @@ import React from 'react'
22
import { AspectRatio } from './AspectRatio'
33
import { Image } from './Image'
44

5-
export const AspectImage = React.forwardRef(({
6-
ratio,
7-
...props
8-
}, ref) => (
9-
<AspectRatio
10-
ratio={ratio}>
5+
export const AspectImage = React.forwardRef(({ ratio, ...props }, ref) => (
6+
<AspectRatio ratio={ratio}>
117
<Image
128
ref={ref}
139
{...props}
Lines changed: 25 additions & 27 deletions
Original file line numberDiff line numberDiff line change
@@ -1,34 +1,32 @@
11
import React from 'react'
22
import Box from './Box'
33

4-
export const AspectRatio = React.forwardRef(({
5-
ratio = 4/3,
6-
children,
7-
...props
8-
}, ref) => (
9-
<Box
10-
ref={ref}
11-
sx={{
12-
position: 'relative',
13-
overflow: 'hidden',
14-
}}>
4+
export const AspectRatio = React.forwardRef(
5+
({ ratio = 4 / 3, children, ...props }, ref) => (
156
<Box
7+
ref={ref}
168
sx={{
17-
width: '100%',
18-
height: 0,
19-
paddingBottom: (100 / ratio) + '%',
20-
}}
21-
/>
22-
<Box
23-
{...props}
24-
__css={{
25-
position: 'absolute',
26-
top: 0,
27-
right: 0,
28-
bottom: 0,
29-
left: 0,
9+
position: 'relative',
10+
overflow: 'hidden',
3011
}}>
31-
{children}
12+
<Box
13+
sx={{
14+
width: '100%',
15+
height: 0,
16+
paddingBottom: 100 / ratio + '%',
17+
}}
18+
/>
19+
<Box
20+
{...props}
21+
__css={{
22+
position: 'absolute',
23+
top: 0,
24+
right: 0,
25+
bottom: 0,
26+
left: 0,
27+
}}>
28+
{children}
29+
</Box>
3230
</Box>
33-
</Box>
34-
))
31+
)
32+
)

packages/components/src/Avatar.js

Lines changed: 2 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,15 +1,12 @@
11
import React from 'react'
22
import { Image } from './Image'
33

4-
export const Avatar = React.forwardRef(({
5-
size = 48,
6-
...props
7-
}, ref) => (
4+
export const Avatar = React.forwardRef(({ size = 48, ...props }, ref) => (
85
<Image
96
ref={ref}
107
width={size}
118
height={size}
12-
variant='avatar'
9+
variant="avatar"
1310
{...props}
1411
__css={{
1512
borderRadius: 9999,

0 commit comments

Comments
 (0)