Skip to content
This repository has been archived by the owner on Jul 29, 2020. It is now read-only.

Commit

Permalink
Finishing touches on Emotion 10 migration
Browse files Browse the repository at this point in the history
  • Loading branch information
jaredLunde committed Jan 27, 2019
1 parent 91d832b commit 3c8d45a
Show file tree
Hide file tree
Showing 11 changed files with 27 additions and 60 deletions.
6 changes: 3 additions & 3 deletions .babelrc
Original file line number Diff line number Diff line change
@@ -1,10 +1,10 @@
{
"presets": [
["@stellar-apps/react", {"removePropTypes": false}]
["@stellar-apps/react", {"removePropTypes": false}],
["@emotion/css-prop", {"sourceMap": false, "hoist": true, "autoLabel": false}]
],
"plugins": [
"polished",
["emotion", {"sourceMap": false, "hoist": true, "autoLabel": false}]
"polished"
],
"env": {
"cjs": {
Expand Down
6 changes: 3 additions & 3 deletions package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "curls",
"version": "2.0.0-dev.1",
"version": "2.0.2",
"main": "dist/cjs/index.js",
"module": "dist/es/index.js",
"jsnext:main": "dist/es/index.js",
Expand All @@ -11,16 +11,15 @@
"private": false,
"sideEffects": false,
"devDependencies": {
"@emotion/babel-preset-css-prop": "^10.0.6",
"@stellar-apps/babel-preset-es": "^1.0.0",
"@stellar-apps/babel-preset-react": "^1.0.0",
"babel-plugin-emotion": "^10.0.6",
"babel-plugin-polished": "^1.1.0",
"polished": "^2.3.3",
"prettier": "^1.10.2"
},
"dependencies": {
"@babel/runtime-corejs2": "^7.3.1",
"@emotion/core": "^10.0.6",
"@render-props/image-props": "^0.1.12",
"@render-props/rect": "^0.1.18",
"@render-props/throttle": "^0.1.12",
Expand All @@ -46,6 +45,7 @@
"publish:next": "yarn publish --tag next"
},
"peerDependencies": {
"@emotion/core": "^10.0.6",
"prop-types": ">= 15.6.0",
"react": ">= 16.3.0",
"react-dom": ">= 16.3.0",
Expand Down
1 change: 0 additions & 1 deletion src/Button/Button.js
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,6 @@ import createComponent, {renderNode} from '../createComponent'
import propTypes from './propTypes'
import * as CSS from './CSS'
import * as defaultTheme from './defaultTheme'
import './global.css'


const as = 'button'
Expand Down
3 changes: 1 addition & 2 deletions src/CheckBox/CheckBox.js
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
// @jsx jsx
import {jsx, css} from '@emotion/core'
import {css} from '@emotion/core'
import React from 'react'
import Toggle from '@render-props/toggle'
import {d} from '../Box/CSS'
Expand Down
1 change: 0 additions & 1 deletion src/Input/Input.js
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,6 @@ import Type from '../Type'
import propTypes from './propTypes'
import * as CSS from './CSS'
import * as defaultTheme from './defaultTheme'
import './global.css'


const as = 'input'
Expand Down
1 change: 0 additions & 1 deletion src/Link/A.js
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,6 @@ import Type from '../Type'
import propTypes from './propTypes'
import * as CSS from './CSS'
import * as defaultTheme from './defaultTheme'
import './global.css'


const as = 'a'
Expand Down
4 changes: 2 additions & 2 deletions src/Link/global.css.js
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
import {injectGlobal} from 'emotion'
import {css} from '@emotion/core'


export default injectGlobal`
export default css`
a {
cursor: pointer;
text-decoration: none;
Expand Down
1 change: 0 additions & 1 deletion src/TextArea/TextArea.js
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,6 @@ import Type from '../Type'
import propTypes from './propTypes'
import * as CSS from './CSS'
import * as defaultTheme from './defaultTheme'
import './global.css'


const SFC = createComponent({
Expand Down
3 changes: 2 additions & 1 deletion src/ThemeProvider/ThemeProvider.js
Original file line number Diff line number Diff line change
Expand Up @@ -6,12 +6,13 @@ import {ThemeContext, Global} from '@emotion/core'
import injectTheme, {replaceTheme, baseTheme} from '../theming/injectTheme'
import ButtonGlobals from '../Button/global.css'
import InputGlobals from '../Input/global.css'
import LinkGlobals from '../Link/global.css'
import TextAreaGlobals from '../TextArea/global.css'
import TypeGlobals from '../Type/global.css'


export const CurlsContext = ThemeContext
const globalStyles = [TypeGlobals, ButtonGlobals, InputGlobals, TextAreaGlobals]
const globalStyles = [TypeGlobals, ButtonGlobals, LinkGlobals, InputGlobals, TextAreaGlobals]

export default class ThemeProvider extends React.Component {
static propTypes = {
Expand Down
1 change: 0 additions & 1 deletion src/Type/Type.js
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,6 @@ import createComponent, {renderNode} from '../createComponent'
import propTypes from './propTypes'
import * as CSS from './CSS'
import * as defaultTheme from './defaultTheme'
import './global.css'


/**
Expand Down
60 changes: 16 additions & 44 deletions yarn.lock
Original file line number Diff line number Diff line change
Expand Up @@ -635,7 +635,7 @@
"@babel/helper-plugin-utils" "^7.0.0"
"@babel/plugin-syntax-jsx" "^7.2.0"

"@babel/plugin-transform-react-jsx@^7.0.0":
"@babel/plugin-transform-react-jsx@^7.0.0", "@babel/plugin-transform-react-jsx@^7.1.6":
version "7.3.0"
resolved "https://registry.yarnpkg.com/@babel/plugin-transform-react-jsx/-/plugin-transform-react-jsx-7.3.0.tgz#f2cab99026631c767e2745a5368b331cfe8f5290"
integrity sha512-a/+aRb7R06WcKvQLOu4/TpjKOdvVEKRLWFpKcNuHhiREPgGRB4TQJxq07+EZLS8LFVYpfq1a5lDUnuMdcCpBKg==
Expand Down Expand Up @@ -815,35 +815,15 @@
lodash "^4.17.10"
to-fast-properties "^2.0.0"

"@emotion/cache@10.0.0":
version "10.0.0"
resolved "https://registry.yarnpkg.com/@emotion/cache/-/cache-10.0.0.tgz#e22eadcb770de4131ec707c84207e9e1ce210413"
integrity sha512-1/sT6GNyvWmxCtJek8ZDV+b+a+NMDx8/61UTnnF3rqrTY7bLTjw+fmXO7WgUIH0owuWKxza/J/FfAWC/RU4G7A==
dependencies:
"@emotion/sheet" "0.9.2"
"@emotion/stylis" "0.8.3"
"@emotion/utils" "0.11.1"
"@emotion/weak-memoize" "0.2.2"

"@emotion/core@^10.0.6":
"@emotion/babel-preset-css-prop@^10.0.6":
version "10.0.6"
resolved "https://registry.yarnpkg.com/@emotion/core/-/core-10.0.6.tgz#c10d7884a525728f05589b31da1c804a5d7449fa"
integrity sha512-S5KkrodTKby1S6pKZnH8LzjzlebHvjactujfVzzu/mYYdVdKYegJuJdrAz3m9zhIeizzeQGD8xWF490ioGpUtw==
resolved "https://registry.yarnpkg.com/@emotion/babel-preset-css-prop/-/babel-preset-css-prop-10.0.6.tgz#97d2c5a9e5236ff889141c79bca9b51a80f6724c"
integrity sha512-sQTakjOx0DEN8TaMpvIrseXnfAVaLf9Xz+vHzO4eqLxc6NLDkANK93rtRcPc818mdUY0SvCEQvXac8jWpS5gJw==
dependencies:
"@emotion/cache" "10.0.0"
"@emotion/css" "^10.0.6"
"@emotion/serialize" "^0.11.3"
"@emotion/sheet" "0.9.2"
"@emotion/utils" "0.11.1"

"@emotion/css@^10.0.6":
version "10.0.6"
resolved "https://registry.yarnpkg.com/@emotion/css/-/css-10.0.6.tgz#50b325e6ee18f0ca791036149a985e3b40a9354b"
integrity sha512-/suYOvP0zeKC3UNoIeN/3zvr/ghUKgfWx0Pht5ZY9qgHis68fB+V45OjonzMbdOw4mGX0vjZzJhINk9JbRWVrg==
dependencies:
"@emotion/serialize" "^0.11.3"
"@emotion/utils" "0.11.1"
"@babel/plugin-transform-react-jsx" "^7.1.6"
babel-plugin-emotion "^10.0.6"
babel-plugin-jsx-pragmatic "^1.0.2"
object-assign "^4.1.1"

"@emotion/hash@0.7.1":
version "0.7.1"
Expand All @@ -866,16 +846,6 @@
"@emotion/utils" "0.11.1"
csstype "^2.5.7"

"@emotion/sheet@0.9.2":
version "0.9.2"
resolved "https://registry.yarnpkg.com/@emotion/sheet/-/sheet-0.9.2.tgz#74e5c6b5e489a1ba30ab246ab5eedd96916487c4"
integrity sha512-pVBLzIbC/QCHDKJF2E82V2H/W/B004mDFQZiyo/MSR+VC4pV5JLG0TF/zgQDFvP3fZL/5RTPGEmXlYJBMUuJ+A==

"@emotion/stylis@0.8.3":
version "0.8.3"
resolved "https://registry.yarnpkg.com/@emotion/stylis/-/stylis-0.8.3.tgz#3ca7e9bcb31b3cb4afbaeb66156d86ee85e23246"
integrity sha512-M3nMfJ6ndJMYloSIbYEBq6G3eqoYD41BpDOxreE8j0cb4fzz/5qvmqU9Mb2hzsXcCnIlGlWhS03PCzVGvTAe0Q==

"@emotion/unitless@0.7.3":
version "0.7.3"
resolved "https://registry.yarnpkg.com/@emotion/unitless/-/unitless-0.7.3.tgz#6310a047f12d21a1036fb031317219892440416f"
Expand All @@ -886,11 +856,6 @@
resolved "https://registry.yarnpkg.com/@emotion/utils/-/utils-0.11.1.tgz#8529b7412a6eb4b48bdf6e720cc1b8e6e1e17628"
integrity sha512-8M3VN0hetwhsJ8dH8VkVy7xo5/1VoBsDOk/T4SJOeXwTO1c4uIqVNx2qyecLFnnUWD5vvUqHQ1gASSeUN6zcTg==

"@emotion/weak-memoize@0.2.2":
version "0.2.2"
resolved "https://registry.yarnpkg.com/@emotion/weak-memoize/-/weak-memoize-0.2.2.tgz#63985d3d8b02530e0869962f4da09142ee8e200e"
integrity sha512-n/VQ4mbfr81aqkx/XmVicOLjviMuy02eenSdJY33SVA7S2J42EU0P1H0mOogfYedb3wXA0d/LVtBrgTSm04WEA==

"@render-props/events@^0.1.2":
version "0.1.11"
resolved "https://registry.yarnpkg.com/@render-props/events/-/events-0.1.11.tgz#97ddec36f2a31604d9f1da27bda8cac1a21dbff8"
Expand Down Expand Up @@ -1147,6 +1112,13 @@ babel-plugin-emotion@^10.0.6:
find-root "^1.1.0"
source-map "^0.5.7"

babel-plugin-jsx-pragmatic@^1.0.2:
version "1.0.2"
resolved "https://registry.yarnpkg.com/babel-plugin-jsx-pragmatic/-/babel-plugin-jsx-pragmatic-1.0.2.tgz#41e2beb8642235f34b2a7ab12ca39e07201b8e59"
integrity sha1-QeK+uGQiNfNLKnqxLKOeByAbjlk=
dependencies:
babel-plugin-syntax-jsx "^6.0.0"

babel-plugin-macros@^2.0.0, babel-plugin-macros@^2.4.5:
version "2.4.5"
resolved "https://registry.yarnpkg.com/babel-plugin-macros/-/babel-plugin-macros-2.4.5.tgz#7000a9b1f72d19ceee19a5804f1d23d6daf38c13"
Expand All @@ -1162,7 +1134,7 @@ babel-plugin-polished@^1.1.0:
dependencies:
polished "^1.0.0"

babel-plugin-syntax-jsx@^6.18.0:
babel-plugin-syntax-jsx@^6.0.0, babel-plugin-syntax-jsx@^6.18.0:
version "6.18.0"
resolved "https://registry.yarnpkg.com/babel-plugin-syntax-jsx/-/babel-plugin-syntax-jsx-6.18.0.tgz#0af32a9a6e13ca7a3fd5069e62d7b0f58d0d8946"
integrity sha1-CvMqmm4Tyno/1QaeYtew9Y0NiUY=
Expand Down Expand Up @@ -2495,7 +2467,7 @@ object-assign@^2.0.0:
resolved "https://registry.yarnpkg.com/object-assign/-/object-assign-2.1.1.tgz#43c36e5d569ff8e4816c4efa8be02d26967c18aa"
integrity sha1-Q8NuXVaf+OSBbE76i+AtJpZ8GKo=

object-assign@^4.1.0:
object-assign@^4.1.0, object-assign@^4.1.1:
version "4.1.1"
resolved "https://registry.yarnpkg.com/object-assign/-/object-assign-4.1.1.tgz#2109adc7965887cfc05cbbd442cac8bfbb360863"
integrity sha1-IQmtx5ZYh8/AXLvUQsrIv7s2CGM=
Expand Down

0 comments on commit 3c8d45a

Please sign in to comment.