Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
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
60 changes: 25 additions & 35 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

4 changes: 2 additions & 2 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -34,8 +34,8 @@
"@types/chai-as-promised": "^8.0.1",
"@types/chai-dom": "^1.11.3",
"@types/node": "^22.15.17",
"@types/react": "18.3.18",
"@types/react-dom": "^18.3.3",
"@types/react": "^19.1.13",
"@types/react-dom": "^19.1.9",
"@types/sinon": "^17.0.3",
"@vitejs/plugin-react": "^4.3.4",
"@vitest/browser": "^3.1.3",
Expand Down
8 changes: 4 additions & 4 deletions packages/react-components-pro/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -38,10 +38,10 @@
"author": "Vaadin Ltd.",
"license": "SEE LICENSE IN LICENSE",
"peerDependencies": {
"@types/react": "^18.2.37 || ^19",
"@types/react-dom": "^18.2.15 || ^19",
"react": "^18.2.0 || ^19",
"react-dom": "^18.2.0 || ^19"
"@types/react": "^19.0.0",
"@types/react-dom": "^19.0.0",
"react": "^19.0.0",
"react-dom": "^19.0.0"
},
"peerDependenciesMeta": {
"@types/react": {
Expand Down
8 changes: 4 additions & 4 deletions packages/react-components/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -91,10 +91,10 @@
"author": "Vaadin Ltd.",
"license": "Apache-2.0",
"peerDependencies": {
"@types/react": "^18.2.37 || ^19",
"@types/react-dom": "^18.2.15 || ^19",
"react": "^18.2.0 || ^19",
"react-dom": "^18.2.0 || ^19"
"@types/react": "^19.0.0",
"@types/react-dom": "^19.0.0",
"react": "^19.0.0",
"react-dom": "^19.0.0"
},
"peerDependenciesMeta": {
"@types/react": {
Expand Down
2 changes: 1 addition & 1 deletion packages/react-components/src/Select.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ function Select(props: SelectProps, ref: ForwardedRef<SelectElement>): ReactElem

// Components with slot attribute should stay in light DOM.
const slottedChildren = children.filter((child): child is ReactNode => {
return isValidElement(child) && child.props.slot;
return isValidElement(child) && (child.props as any).slot;
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Related to this change:

The props of React elements now default to unknown instead of any if the element is typed as ReactElement.

See DefinitelyTyped/DefinitelyTyped#69022 - "Changes to Type Parameters" - "ReactElement"

});

// Component without slot attribute should go to the overlay.
Expand Down
2 changes: 1 addition & 1 deletion packages/react-components/src/renderers/useRenderer.ts
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,7 @@ export function useRenderer<P extends {}, W extends WebComponentRenderer>(
convert?: (props: Slice<Parameters<W>, 1>) => PropsWithChildren<P>,
config?: RendererConfig<W>,
): UseRendererResult<W> {
const [map, update] = useReducer<typeof rendererReducer<W>>(rendererReducer, initialState);
const [map, update] = useReducer(rendererReducer, initialState);
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Related to this change:

The new best practice is not to pass type arguments to useReducer.

See DefinitelyTyped/DefinitelyTyped#69022 - "Changes to Type Parameters" - "useReducer"

const renderer = useCallback(
((...args: Parameters<W>) => {
if (config?.renderMode === 'microtask') {
Expand Down
2 changes: 1 addition & 1 deletion test/typings/api.ts
Original file line number Diff line number Diff line change
Expand Up @@ -53,7 +53,7 @@ type TextFieldProps = typeof textFieldProps;

type PartialTextFieldElement = Omit<
Partial<TextFieldElement>,
'draggable' | 'style' | 'translate' | 'children' | 'contentEditable'
'draggable' | 'style' | 'translate' | 'children' | 'contentEditable' | 'part'
>;

assertType<PartialTextFieldElement>(textFieldProps);
Expand Down