Skip to content

Commit b981588

Browse files
authored
feat(version): testing react 19 (#11754)
1 parent 2358348 commit b981588

File tree

28 files changed

+81
-85
lines changed

28 files changed

+81
-85
lines changed

eslint.config.mjs

+1
Original file line numberDiff line numberDiff line change
@@ -19,6 +19,7 @@ export default [
1919
'packages/react-docs/coverage',
2020
'.history/*',
2121
'packages/react-docs/static',
22+
'packages/react-docs/public',
2223
'**/.cache'
2324
]
2425
},

package.json

+2-2
Original file line numberDiff line numberDiff line change
@@ -41,8 +41,8 @@
4141
"@testing-library/user-event": "^14.6.1",
4242
"@types/jest": "29.5.14",
4343
"@types/node": "^22.13.10",
44-
"@types/react": "^18.3.18",
45-
"@types/react-dom": "^18.3.5",
44+
"@types/react": "^19.1.0",
45+
"@types/react-dom": "^19.1.2",
4646
"babel-jest": "^29.7.0",
4747
"concurrently": "^9.1.2",
4848
"eslint": "^9.22.0",

packages/react-charts/package.json

+2-2
Original file line numberDiff line numberDiff line change
@@ -52,8 +52,8 @@
5252
},
5353
"peerDependencies": {
5454
"echarts": "^5.6.0",
55-
"react": "^17 || ^18",
56-
"react-dom": "^17 || ^18",
55+
"react": "^17 || ^18 || ^19",
56+
"react-dom": "^17 || ^18 || ^19",
5757
"victory-area": "^37.3.6",
5858
"victory-axis": "^37.3.6",
5959
"victory-bar": "^37.3.6",

packages/react-charts/src/echarts/components/Charts/Charts.tsx

+2-2
Original file line numberDiff line numberDiff line change
@@ -143,8 +143,8 @@ export const Charts: FunctionComponent<ChartsProps> = ({
143143
width,
144144
...rest
145145
}: ChartsProps) => {
146-
const containerRef = useRef<HTMLDivElement>();
147-
const echart = useRef<echarts.ECharts>();
146+
const containerRef = useRef<HTMLDivElement>(null);
147+
const echart = useRef<echarts.ECharts>(null);
148148
const [update, forceUpdate] = useReducer((x) => x + 1, 0);
149149

150150
const getSize = () => ({

packages/react-charts/src/victory/components/Chart/Chart.tsx

+1-1
Original file line numberDiff line numberDiff line change
@@ -609,7 +609,7 @@ export const Chart: React.FunctionComponent<ChartProps> = ({
609609
const renderChildren = () =>
610610
Children.toArray(children).map((child, index) => {
611611
if (isValidElement(child)) {
612-
const { ...childProps } = child.props;
612+
const { ...childProps } = child.props as any;
613613
return cloneElement(child, {
614614
colorScale,
615615
...(defaultPatternScale && { patternScale: defaultPatternScale }),

packages/react-charts/src/victory/components/ChartDonutUtilization/ChartDonutThreshold.tsx

+1-1
Original file line numberDiff line numberDiff line change
@@ -502,7 +502,7 @@ export const ChartDonutThreshold: React.FunctionComponent<ChartDonutThresholdPro
502502
const renderChildren = () =>
503503
Children.toArray(children).map((child, index) => {
504504
if (isValidElement(child)) {
505-
const { data: childData, ...childProps } = child.props;
505+
const { data: childData, ...childProps } = child.props as any;
506506
const datum = Data.formatData([childData], childProps, ['x', 'y']); // Format child data independently of this component's props
507507
const dynamicTheme = childProps.theme || getDonutThresholdDynamicTheme(childProps.themeColor || themeColor);
508508
return cloneElement(child, {

packages/react-charts/src/victory/components/ChartUtils/chart-patterns.tsx

+1-1
Original file line numberDiff line numberDiff line change
@@ -374,7 +374,7 @@ export const useDefaultPatternProps = ({
374374
export const renderChildrenWithPatterns = ({ children, patternScale, themeColor }: PatternPropsInterface) =>
375375
Children.toArray(children).map((child, index) => {
376376
if (isValidElement(child)) {
377-
const { ...childProps } = child.props;
377+
const { ...childProps } = child.props as any;
378378
const style = childProps.style ? { ...childProps.style } : {};
379379

380380
// Merge pattern IDs with `style.data.fill` property

packages/react-code-editor/package.json

+2-2
Original file line numberDiff line numberDiff line change
@@ -38,8 +38,8 @@
3838
"tslib": "^2.8.1"
3939
},
4040
"peerDependencies": {
41-
"react": "^17 || ^18",
42-
"react-dom": "^17 || ^18"
41+
"react": "^17 || ^18 || ^19",
42+
"react-dom": "^17 || ^18 || ^19"
4343
},
4444
"devDependencies": {
4545
"monaco-editor": "^0.52.2"

packages/react-core/package.json

+2-2
Original file line numberDiff line numberDiff line change
@@ -60,7 +60,7 @@
6060
"fs-extra": "^11.3.0"
6161
},
6262
"peerDependencies": {
63-
"react": "^17 || ^18",
64-
"react-dom": "^17 || ^18"
63+
"react": "^17 || ^18 || ^19",
64+
"react-dom": "^17 || ^18 || ^19"
6565
}
6666
}

packages/react-core/src/components/ExpandableSection/ExpandableSection.tsx

+1-1
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@ export enum ExpandableSectionVariant {
1515

1616
/** The main expandable section component. */
1717

18-
export interface ExpandableSectionProps extends React.HTMLProps<HTMLDivElement> {
18+
export interface ExpandableSectionProps extends Omit<React.HTMLProps<HTMLDivElement>, 'onToggle'> {
1919
/** Content rendered inside the expandable section. */
2020
children?: React.ReactNode;
2121
/** Additional classes added to the expandable section. */

packages/react-core/src/components/ExpandableSection/ExpandableSectionToggle.tsx

+1-1
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ import { Button } from '../Button';
77
* property passed in. Allows for more custom control over the expandable section's toggle.
88
*/
99

10-
export interface ExpandableSectionToggleProps extends React.HTMLProps<HTMLDivElement> {
10+
export interface ExpandableSectionToggleProps extends Omit<React.HTMLProps<HTMLDivElement>, 'onToggle'> {
1111
/** Content rendered inside the expandable toggle. */
1212
children?: React.ReactNode;
1313
/** Additional classes added to the expandable toggle. */

packages/react-core/src/components/Form/FormFieldGroup.tsx

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
import { InternalFormFieldGroup } from './InternalFormFieldGroup';
22

3-
export interface FormFieldGroupProps extends Omit<React.HTMLProps<HTMLDivElement>, 'label'> {
3+
export interface FormFieldGroupProps extends Omit<React.HTMLProps<HTMLDivElement>, 'label' | 'onToggle'> {
44
/** Anything that can be rendered as form field group content. */
55
children?: React.ReactNode;
66
/** Additional classes added to the form field group. */

packages/react-core/src/components/Form/FormFieldGroupExpandable.tsx

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
import { useState } from 'react';
22
import { InternalFormFieldGroup } from './InternalFormFieldGroup';
33

4-
export interface FormFieldGroupExpandableProps extends React.HTMLProps<HTMLDivElement> {
4+
export interface FormFieldGroupExpandableProps extends Omit<React.HTMLProps<HTMLDivElement>, 'onToggle'> {
55
/** Anything that can be rendered as form field group content. */
66
children?: React.ReactNode;
77
/** Additional classes added to the form field group. */

packages/react-core/src/components/Form/InternalFormFieldGroup.tsx

+1-1
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@ import { css } from '@patternfly/react-styles';
33
import { FormFieldGroupToggle } from './FormFieldGroupToggle';
44
import { GenerateId } from '../../helpers';
55

6-
export interface InternalFormFieldGroupProps extends Omit<React.HTMLProps<HTMLDivElement>, 'label'> {
6+
export interface InternalFormFieldGroupProps extends Omit<React.HTMLProps<HTMLDivElement>, 'label' | 'onToggle'> {
77
/** Anything that can be rendered as form field group content. */
88
children?: React.ReactNode;
99
/** Additional classes added to the form field group. */

packages/react-core/src/components/Nav/Nav.tsx

+1-1
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@ export type NavSelectClickHandler = (
1010
to: string
1111
) => void;
1212
export interface NavProps
13-
extends Omit<React.DetailedHTMLProps<React.HTMLAttributes<HTMLElement>, HTMLElement>, 'onSelect'>,
13+
extends Omit<React.DetailedHTMLProps<React.HTMLAttributes<HTMLElement>, HTMLElement>, 'onSelect' | 'onToggle'>,
1414
OUIAProps {
1515
/** Anything that can be rendered inside of the nav */
1616
children?: React.ReactNode;

packages/react-core/src/components/Tabs/Tabs.tsx

+3-1
Original file line numberDiff line numberDiff line change
@@ -31,7 +31,9 @@ export interface HorizontalOverflowObject {
3131
type TabElement = React.ReactElement<TabProps, React.JSXElementConstructor<TabProps>>;
3232
type TabsChild = TabElement | boolean | null | undefined;
3333

34-
export interface TabsProps extends Omit<React.HTMLProps<HTMLElement | HTMLDivElement>, 'onSelect'>, OUIAProps {
34+
export interface TabsProps
35+
extends Omit<React.HTMLProps<HTMLElement | HTMLDivElement>, 'onSelect' | 'onToggle'>,
36+
OUIAProps {
3537
/** Content rendered inside the tabs component. Only `Tab` components or expressions resulting in a falsy value are allowed here. */
3638
children: TabsChild | TabsChild[];
3739
/** Additional classes added to the tabs */

packages/react-core/src/components/Toolbar/ToolbarGroup.tsx

+1-1
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@ export enum ToolbarGroupVariant {
1212
'label-group' = 'label-group'
1313
}
1414

15-
export interface ToolbarGroupProps extends Omit<React.HTMLProps<HTMLDivElement>, 'ref'> {
15+
export interface ToolbarGroupProps extends Omit<React.HTMLProps<HTMLDivElement>, 'ref' | 'onToggle'> {
1616
/** Classes applied to root element of the data toolbar group */
1717
className?: string;
1818
/** A type modifier which modifies spacing specifically depending on the type of group */

packages/react-core/src/components/Wizard/WizardNavInternal.tsx

+1-1
Original file line numberDiff line numberDiff line change
@@ -96,7 +96,7 @@ export const WizardNavInternal = ({
9696
}
9797
});
9898
const hasEnabledChildren = Children.toArray(subNavItems).some(
99-
(child) => isValidElement(child) && !child.props.isDisabled
99+
(child) => isValidElement(child) && !(child.props as any).isDisabled
100100
);
101101

102102
if (!isProgressive || (isProgressive && step.index <= activeStep.index)) {

packages/react-drag-drop/package.json

+2-2
Original file line numberDiff line numberDiff line change
@@ -38,7 +38,7 @@
3838
"resize-observer-polyfill": "^1.5.1"
3939
},
4040
"peerDependencies": {
41-
"react": "^17 || ^18",
42-
"react-dom": "^17 || ^18"
41+
"react": "^17 || ^18 || ^19",
42+
"react-dom": "^17 || ^18 || ^19"
4343
}
4444
}

packages/react-icons/package.json

+2-2
Original file line numberDiff line numberDiff line change
@@ -38,7 +38,7 @@
3838
"tslib": "^2.8.1"
3939
},
4040
"peerDependencies": {
41-
"react": "^17 || ^18",
42-
"react-dom": "^17 || ^18"
41+
"react": "^17 || ^18 || ^19",
42+
"react-dom": "^17 || ^18 || ^19"
4343
}
4444
}

packages/react-table/package.json

+2-2
Original file line numberDiff line numberDiff line change
@@ -48,7 +48,7 @@
4848
"tslib": "^2.8.1"
4949
},
5050
"peerDependencies": {
51-
"react": "^17 || ^18",
52-
"react-dom": "^17 || ^18"
51+
"react": "^17 || ^18 || ^19",
52+
"react-dom": "^17 || ^18 || ^19"
5353
}
5454
}

packages/react-table/src/components/Table/EditableSelectInputCell.tsx

+2-1
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,8 @@ import inlineStyles from '@patternfly/react-styles/css/components/InlineEdit/inl
66
import formStyles from '@patternfly/react-styles/css/components/Form/form';
77
import { EditableSelectInputProps } from './base/types';
88

9-
export interface IEditableSelectInputCell extends Omit<React.HTMLProps<HTMLElement | HTMLDivElement>, 'onSelect'> {
9+
export interface IEditableSelectInputCell
10+
extends Omit<React.HTMLProps<HTMLElement | HTMLDivElement>, 'onSelect' | 'onToggle'> {
1011
/** Row index of this select input cell */
1112
rowIndex: number;
1213
/** Cell index of this select input cell */

packages/react-templates/src/components/Dropdown/SimpleDropdown.tsx

+1-1
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,7 @@ export interface SimpleDropdownItem extends Omit<DropdownItemProps, 'content'> {
2525
isDivider?: boolean;
2626
}
2727

28-
export interface SimpleDropdownProps extends Omit<DropdownProps, 'toggle'>, OUIAProps {
28+
export interface SimpleDropdownProps extends Omit<DropdownProps, 'toggle' | 'onToggle'>, OUIAProps {
2929
/** Initial items of the dropdown. */
3030
initialItems?: SimpleDropdownItem[];
3131
/** @hide Forwarded ref */

packages/react-templates/src/components/Select/CheckboxSelect.tsx

+1-1
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@ export interface CheckboxSelectOption extends Omit<SelectOptionProps, 'content'>
1616
value: string | number;
1717
}
1818

19-
export interface CheckboxSelectProps extends Omit<SelectProps, 'toggle'> {
19+
export interface CheckboxSelectProps extends Omit<SelectProps, 'toggle' | 'onToggle'> {
2020
/** @hide Forwarded ref */
2121
innerRef?: React.Ref<any>;
2222
/** Initial options of the select. */

packages/react-templates/src/components/Select/MultiTypeaheadSelect.tsx

+1-1
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,7 @@ export interface MultiTypeaheadSelectOption extends Omit<SelectOptionProps, 'con
2323
value: string | number;
2424
}
2525

26-
export interface MultiTypeaheadSelectProps extends Omit<SelectProps, 'toggle' | 'onSelect'> {
26+
export interface MultiTypeaheadSelectProps extends Omit<SelectProps, 'toggle' | 'onSelect' | 'onToggle'> {
2727
/** @hide Forwarded ref */
2828
innerRef?: React.Ref<any>;
2929
/** Initial options of the select. */

packages/react-templates/src/components/Select/SimpleSelect.tsx

+1-1
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@ export interface SimpleSelectOption extends Omit<SelectOptionProps, 'content'> {
1515
value: string | number;
1616
}
1717

18-
export interface SimpleSelectProps extends Omit<SelectProps, 'toggle'> {
18+
export interface SimpleSelectProps extends Omit<SelectProps, 'toggle' | 'onToggle'> {
1919
/** @hide Forwarded ref */
2020
innerRef?: React.Ref<any>;
2121
/** Initial options of the select. */

packages/react-templates/src/components/Select/TypeaheadSelect.tsx

+1-1
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@ export interface TypeaheadSelectOption extends Omit<SelectOptionProps, 'content'
2222
value: string | number;
2323
}
2424

25-
export interface TypeaheadSelectProps extends Omit<SelectProps, 'toggle' | 'onSelect'> {
25+
export interface TypeaheadSelectProps extends Omit<SelectProps, 'toggle' | 'onSelect' | 'onToggle'> {
2626
/** @hide Forwarded ref */
2727
innerRef?: React.Ref<any>;
2828
/** Initial options of the select. */

0 commit comments

Comments
 (0)