-
-
Notifications
You must be signed in to change notification settings - Fork 1.1k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
v11 #1600
Conversation
|
… avoid double labels and such (#1602)
* Match rules in declarations with component used as a selector * Take specificity into account when matching styles * add changesets * fix flow errors
…ompilation (#1501) * Restructured types to greatly reduce number of types created during compilation BREAKING CHANGE: There are a few breaking changes, see below * withTheme now infers types properly and may require removing the manually specified generic parameter * The Theme generic parameter has been removed from a number of types exported from `@emotion/styled` and `@emotion/styled-base`. * Introduced new CreateThemedStyled type which is exported from emotion-theming, use type to create your own themed `styled` export. See updated docs * WithTheme should be imported from emotion-theming * CreateStyledComponentExtrinsic, CreateStyledComponentIntrinsic and CreateStyledComponentBase all have been replaced with CreateStyledComponent * Fixing tests * Fixed a bunch of tests and improved TypeScript docs * Updated a bunch of the TypeScript docs * Removed WithTheme type, not sure it's usage and there is no tests * Few small cleanups around styled-base * Fixed tests in a few more packages * Fixed serialise tests after changes in #1236 * Removed failing redundant test in sheet typescript tests. It is failing with the same compilation error as the previous line, but formatting is causing the test failure * Removed line with expected error, I am not sure the reason it should be failing. * Need to bump the typescript version for styled-base for the union type test * TypeScript tests passing * Upgrade build image version to get newer version of yarn * fix: styled component with static API * Added changes in https://github.com/JakeGinnivan/emotion/pull/1/files to other functions with similar signatures * fix: type issue where styled component passed in * Add some additional tests around theming and fix them * Restrict css function to css interpolation * Fixed emotion-theming linting issue * Reversed some incorrect type changes, withComponent has to include the previous components props otherwise styles on the original component may fail at runtime * Fixed some accidently formatted package.json files * Allowed theming of CreateStyled and StyledTags * Restructured generic type params to make it explicit about what component props should transfer with withComponent and which shouldn't Added tests * Cleaned up some tests and added additional assertions * Default the type of SpecificComponentProps in StyledComponent * Reverted changes around ThemeProvider and added tests * Added changeset * Fixed ThemeProvider after revert * Update tslint rules to fix error * Fixed linting issues * Fixed import path for css and clarified docs * Added comment about fragment shorthand without babel being a typescript limitation * Removed breaking change around some of the internal types It's implementation detail user doesn't need to know * Reverted changes around removing function interpolation from the return types of function interpolation * Renamed Omit to DistributiveOmit To make it clear it's different to the inbuilt Omit * Removed duplicate intersected type * Renamed all usages of SFC to FC * Fixed poor grammar * Ignore lint rule rather than exporting type * Updated generic constraints * Reverted TypeScript version bump in create-emotion types * Sync docs and test code * Constrained Theme to extend {} * Add tests for broken examples in #1298 * Fix typo * Add test which verifies #1226 is fixed by type changes
* chore: tell Prettier we are using Flow this gets rid of a lot of warnings and wrong auto formatting * fix: make CreateStyled callable function polymorphic This makes it possible to type styled functional components and enables a workaround for lack of tagged templates support of Flow * chore: update type annotation to use new style * fix: wrong formatting * style: fix prettier issues * chore: changeset * fix: just import the @emotion/sheet type * style: make prettier happy * docs: added Flow types documentation page * Update flow.mdx * refactor: rename P to Props # Conflicts: # packages/styled-base/src/utils.js
This pull request is automatically built and testable in CodeSandbox. To see build info of the built libraries, click here or the icon next to each commit SHA. Latest deployment of this branch, based on commit b99c44c:
|
* Tests are broken :( but it works * Add displayName * Use ref * Remove stuff * Update react-test-renderer * Use useContext in more places * Fix a Global insertion order bug * Add a test * Fix typo * Remove passing the theme to the css prop, Global and ClassNames * stuff * stuff * changes * Add a test back * Fix a thing * Update stuff * Update things * Drop support for innerRef entirely * Set correct peerDeps on react + upgrade react-related devDeps * Fix tests * Fix linting error * Remove custom useContext flow types * Fix flow error * Fix layour effect input array to include serialized.name instead of whole serialized * Add a changeset * Add another changeset
…ging error to the console. (#1611)
This reverts commit ddf30f0.
* Add missing #__PURE__ annotations * Update nine-mugs-care.md
* Add stuff to babel plugin readme * Refactor styled macro * Refactor other macros * WIP more refactoring * Fix stuff * WIP * stuff * WIP stuff * More WIP stuff * WIP * Add a changeset * Remove instances option and other things * Fix some stuff * A bunch of FlowFixMes * Finish implementation and add a changeset * Update more things * Words * Remove obselete snapshots * Fix stuff * Fix docs * Fix things * Fix a bug
* Change @emotion/styled-base to @emotion/styled/base * Fix some stuff * Fix some stuff * Fix another thing * Remove styled-base from CodeSandbox CI config * Make @emotion/styled/base TS types working * Restore flowtype tests for @emotion/styled/base * Fix last reference to @emotion/styled-base * fix some flow errors * Brought back @emotion/styled-base, but throw a deprecation error at runtime * fix styled Flow tests (#1615) * fix flow type error * Add changeset * Update spotty-llamas-mate.md * Update index.js * Remove @emotion/styled-base from some changesets
…er dependencies (#2043)
* Upgrade chalk and escape-string-regexp jest uses the new version of chalk without escape-string-regexp * Remove changesets Co-authored-by: Mateusz Burzyński <mateuszburzynski@gmail.com>
* Add support for the `as` prop in React Native related packages * Do not forward the `as` prop by default * Add changeset Co-authored-by: Mateusz Burzyński <mateuszburzynski@gmail.com>
# Conflicts: # .circleci/config.yml # babel.config.js # docs/css-prop.mdx # package.json # packages/babel-preset-css-prop/CHANGELOG.md # packages/babel-preset-css-prop/README.md # packages/babel-preset-css-prop/__tests__/__snapshots__/index.js.snap # packages/babel-preset-css-prop/__tests__/__snapshots__/options-are-used.js.snap # packages/babel-preset-css-prop/package.json # packages/babel-preset-css-prop/src/index.js # packages/core/CHANGELOG.md # packages/core/package.json # packages/core/src/index.js # packages/css/test/no-babel/index.test.js # packages/emotion-theming/package.json # packages/native/package.json # packages/primitives-core/package.json # packages/primitives/package.json # packages/primitives/test/emotion-primitives.test.js # packages/react/__tests__/automatic-dev-runtime.js # packages/react/__tests__/automatic-runtime.js # packages/react/__tests__/css.js # packages/react/__tests__/warnings.js # packages/react/jsx-dev-runtime/package.json # packages/react/jsx-runtime/package.json # packages/react/src/emotion-element.js # packages/react/src/jsx-dev-runtime.js # packages/react/src/jsx-runtime.js # packages/react/src/jsx.js # packages/styled-base/package.json # packages/styled/package.json # playgrounds/cra/package.json # playgrounds/razzle/package.json # removed-packages/jest-emotion/package.json # scripts/benchmarks/package.json # site/package.json # yarn.lock
# Conflicts: # docs/css-prop.mdx # packages/babel-plugin/README.md
… `@emotion/react` import presence) (#2080)
# Conflicts: # packages/babel-preset-css-prop/CHANGELOG.md # packages/babel-preset-css-prop/package.json # packages/babel-preset-css-prop/src/index.js
* Use experimental entrypoints in preconstruct * Use newDistFilenames in preconstruct
* Use `StyleSheet.create` in React Native * Flatten the styles before passing them to `StyleSheet.create` * Fix primitives tests * Update snapshots * Fix flow errors * Add changeset Co-authored-by: Mateusz Burzyński <mateuszburzynski@gmail.com>
* Emotion 11 post * Apply suggestions from code review * Update docs/emotion-11.mdx * Fix docs build * update changeset file * Align changeset files to latest changes in the Emotion 11 post Co-authored-by: Mitchell Hamilton <mitchell@hamil.town>
* Version Packages * Reorder changelog entries Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com> Co-authored-by: Mateusz Burzyński <mateuszburzynski@gmail.com>
IMPORTANT NOTE: This PR should not be merged right now.
Any PRs that should be in v11 should be based against this PR(the
next
branch). Once a PR is merged into thenext
branch, the Changesets release action will open PRs as it does for master doing prereleases which can be merged into this branch and will then be published to thenext
tag on npm.closes #1606