Skip to content

Commit 6c8cc38

Browse files
committed
⬆️ Update pss 3.0 → 4.0
1 parent 59d3788 commit 6c8cc38

File tree

7 files changed

+23
-29
lines changed

7 files changed

+23
-29
lines changed

package.json

+1-1
Original file line numberDiff line numberDiff line change
@@ -124,7 +124,7 @@
124124
"@emotion/styled": "^10.0.5",
125125
"@exah/utils": "^2.0.0",
126126
"emotion-theming": "^10.0.5",
127-
"pss": "^3.0.1",
127+
"pss": "^4.0.0",
128128
"react-styled-base": "^2.0.1"
129129
}
130130
}

src/flex-box/index.js

+2-10
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,6 @@ import styled from '@emotion/styled'
33
import { Box } from '../box'
44

55
const FlexBox = styled(Box)({ display: 'flex' }, flex, flexItem)
6-
const FlexBoxItem = styled(Box)(flexItem)
76

87
FlexBox.displayName = 'FlexBox'
98

@@ -12,15 +11,8 @@ FlexBox.propTypes = {
1211
...flex.propTypes
1312
}
1413

15-
FlexBox.Item = FlexBoxItem
16-
FlexBox.Item.displayName = 'FlexGrid.Item'
17-
18-
FlexBox.Item.propTypes = {
19-
...Box.propTypes,
20-
...flexItem.propTypes
21-
}
14+
FlexBox.Item = Box // COMPAT
2215

2316
export {
24-
FlexBox,
25-
FlexBoxItem
17+
FlexBox
2618
}

src/image/index.js

+2-2
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@ import styled from '@emotion/styled'
22
import { createBase } from '../base'
33

44
import {
5-
combine,
5+
combineStyles,
66
cursor,
77
display,
88
flexItem,
@@ -15,7 +15,7 @@ import {
1515
transform
1616
} from 'pss'
1717

18-
const image = combine(
18+
const image = combineStyles(
1919
cursor,
2020
display,
2121
flexItem,

src/layout/index.js

+6-5
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
11
import { compose } from '@exah/utils'
22
import { defaultProps, withDisplayName, withPropTypes } from '../utils'
3-
import { FlexBox, FlexBoxItem } from '../flex-box'
3+
import { FlexBox } from '../flex-box'
4+
import { Box } from '../box'
45

56
const withLayoutProps = defaultProps({
67
flexDirection: 'column',
@@ -19,9 +20,9 @@ const Layout = compose(
1920

2021
const LayoutContent = compose(
2122
withDisplayName('Layout.Content'),
22-
withPropTypes(FlexBoxItem),
23+
withPropTypes(Box),
2324
withLayoutContentProps
24-
)(FlexBoxItem)
25+
)(Box)
2526

2627
const LayoutBody = compose(
2728
withDisplayName('Layout.Body'),
@@ -31,13 +32,13 @@ const LayoutBody = compose(
3132

3233
Object.assign(Layout, {
3334
Content: LayoutContent,
34-
Item: FlexBoxItem,
35+
Item: Box,
3536
Body: LayoutBody
3637
})
3738

3839
export {
3940
Layout,
40-
FlexBoxItem as LayoutItem,
41+
Box as LayoutItem,
4142
LayoutContent,
4243
LayoutBody
4344
}

src/media-object/index.js

+6-5
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
11
import { compose } from '@exah/utils'
22
import { defaultProps, withDisplayName, withPropTypes } from '../utils'
3-
import { FlexBox, FlexBoxItem } from '../flex-box'
3+
import { FlexBox } from '../flex-box'
4+
import { Box } from '../box'
45

56
const MediaObject = compose(
67
withDisplayName('MediaObject'),
@@ -10,15 +11,15 @@ const MediaObject = compose(
1011

1112
const MediaObjectSide = compose(
1213
withDisplayName('MediaObject.Side'),
13-
withPropTypes(FlexBoxItem),
14+
withPropTypes(Box),
1415
defaultProps({ flex: '0 0' })
15-
)(FlexBoxItem)
16+
)(Box)
1617

1718
const MediaObjectContent = compose(
1819
withDisplayName('MediaObject.Content'),
19-
withPropTypes(FlexBoxItem),
20+
withPropTypes(Box),
2021
defaultProps({ flex: '1', minWidth: 0 })
21-
)(FlexBoxItem)
22+
)(Box)
2223

2324
Object.assign(MediaObject, {
2425
Side: MediaObjectSide,

test/__snapshots__/index.js.snap

+2-2
Original file line numberDiff line numberDiff line change
@@ -3,9 +3,9 @@
33
exports[`Box 1`] = `
44
.emotion-0 {
55
box-sizing: border-box;
6+
height: 300px;
67
margin-left: auto;
78
margin-right: auto;
8-
height: 300px;
99
background-color: #000;
1010
color: #fff;
1111
}
@@ -674,10 +674,10 @@ exports[`MediaObject 1`] = `
674674
675675
.emotion-2 {
676676
box-sizing: border-box;
677-
min-width: 0;
678677
-webkit-flex: 1;
679678
-ms-flex: 1;
680679
flex: 1;
680+
min-width: 0;
681681
}
682682
683683
<div

yarn.lock

+4-4
Original file line numberDiff line numberDiff line change
@@ -8768,10 +8768,10 @@ psl@^1.1.24, psl@^1.1.28:
87688768
resolved "https://registry.yarnpkg.com/psl/-/psl-1.1.31.tgz#e9aa86d0101b5b105cbe93ac6b784cd547276184"
87698769
integrity sha512-/6pt4+C+T+wZUieKR620OpzN/LlnNKuWjy1iFLQ/UG35JqHlR/89MP1d96dUfkf6Dne3TuLQzOYEYshJ+Hx8mw==
87708770

8771-
pss@^3.0.1:
8772-
version "3.0.1"
8773-
resolved "https://registry.yarnpkg.com/pss/-/pss-3.0.1.tgz#dcf171304d0b163a80c44ff76450da20aa9cbc9c"
8774-
integrity sha512-go39tpJy3dONz3+6iYoFtTNhMHdoGdGyWQVG+5ctaJvpvwxO037CWdMgXUlBNmiHA7HydCrXEuIPKbvOhXaZbA==
8771+
pss@^4.0.0:
8772+
version "4.0.0"
8773+
resolved "https://registry.yarnpkg.com/pss/-/pss-4.0.0.tgz#38d9523b04aea11281117a5b295b34f1a290bdde"
8774+
integrity sha512-Q3gXkvT+6tBySOHmKir90q+nejz7fp+X0vMqf8y5OPyGw6NUTz/gtaERJ4BRraAbbFwfqrperm8JlTiFelr2MA==
87758775
dependencies:
87768776
"@exah/utils" "^2.0.0"
87778777
prop-types "^15.6.2"

0 commit comments

Comments
 (0)