Skip to content
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

Element: Ensure that the package uses the up to date React types #37365

Merged
merged 2 commits into from
Dec 15, 2021
Merged
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Fix TypeScript errors encountered in @wordpress/components
gziolo committed Dec 15, 2021
commit bbb957ce38826eb5c311cf406116f0e14998c880
348 changes: 224 additions & 124 deletions package-lock.json
3 changes: 2 additions & 1 deletion packages/components/CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -21,7 +21,8 @@
- Replaced hardcoded blue in `ColorPicker` with UI theme color ([#36153](https://github.com/WordPress/gutenberg/pull/36153)).
- Fixed empty `ToolsPanel` height by correcting menu button line-height ([#36895](https://github.com/WordPress/gutenberg/pull/36895)).
- Normalized label line-height and spacing within the `ToolsPanel` ([36387](https://github.com/WordPress/gutenberg/pull/36387))
- Remove unused `reakit-utils` from peer dependencies.
- Remove unused `reakit-utils` from peer dependencies ([#37369](https://github.com/WordPress/gutenberg/pull/37369)).
- Update all Emotion dependencies to the latest version to ensure they work correctly with React types ([#37365](https://github.com/WordPress/gutenberg/pull/37365)).

### Enhancements

9 changes: 5 additions & 4 deletions packages/components/package.json
Original file line number Diff line number Diff line change
@@ -30,10 +30,11 @@
],
"dependencies": {
"@babel/runtime": "^7.16.0",
"@emotion/cache": "^11.4.0",
"@emotion/css": "^11.1.3",
"@emotion/react": "^11.4.1",
"@emotion/styled": "^11.3.0",
"@emotion/cache": "^11.7.1",
"@emotion/css": "^11.7.1",
"@emotion/react": "^11.7.1",
"@emotion/serialize": "^1.0.2",
gziolo marked this conversation as resolved.
Show resolved Hide resolved
"@emotion/styled": "^11.6.0",
"@emotion/utils": "1.0.0",
"@wordpress/a11y": "file:../a11y",
"@wordpress/compose": "file:../compose",
Original file line number Diff line number Diff line change
@@ -173,6 +173,7 @@ exports[`ColorPalette should render a dynamic toolbar of colors 1`] = `
data-wp-component="VStack"
isColumn={true}
>
<Noop />
<div
className="components-flex components-h-stack components-v-stack emotion-4 emotion-5"
data-wp-c16t={true}
6 changes: 4 additions & 2 deletions packages/components/src/flyout/styles.ts
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
/**
* External dependencies
*/
import styled from '@emotion/styled';
import styled, { StyledComponent } from '@emotion/styled';
// eslint-disable-next-line no-restricted-imports
import { Popover as ReakitPopover } from 'reakit';

@@ -12,7 +12,9 @@ import { Card, CardBody } from '../card';
import * as ZIndex from '../utils/z-index';
import CONFIG from '../utils/config-values';

export const FlyoutContentView = styled( ReakitPopover )`
export const FlyoutContentView: StyledComponent<
React.ComponentPropsWithoutRef< typeof ReakitPopover >
> = styled( ReakitPopover )`
z-index: ${ ZIndex.Flyout };
box-sizing: border-box;
opacity: 0;