Skip to content

Commit

Permalink
Bump @types/react to v18.3.6 (#43555)
Browse files Browse the repository at this point in the history
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
Co-authored-by: Jan Potoms <2109932+Janpot@users.noreply.github.com>
Co-authored-by: Aarón García Hervás <aaron@mui.com>
Co-authored-by: DiegoAndai <diego@mui.com>
  • Loading branch information
4 people authored Oct 2, 2024
1 parent 16097c7 commit c77bd84
Show file tree
Hide file tree
Showing 49 changed files with 631 additions and 503 deletions.
2 changes: 1 addition & 1 deletion apps/pigment-css-next-app/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@
"devDependencies": {
"@pigment-css/nextjs-plugin": "0.0.23",
"@types/node": "^20.16.5",
"@types/react": "^18.3.4",
"@types/react": "^18.3.6",
"@types/react-dom": "^18.3.0",
"eslint": "^8.57.1",
"typescript": "^5.6.2"
Expand Down
2 changes: 1 addition & 1 deletion apps/pigment-css-vite-app/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@
"@babel/preset-react": "^7.24.7",
"@babel/preset-typescript": "^7.24.7",
"@pigment-css/vite-plugin": "0.0.23",
"@types/react": "^18.3.4",
"@types/react": "^18.3.6",
"@types/react-dom": "^18.3.0",
"@types/webfontloader": "^1.6.38",
"@vitejs/plugin-react": "^4.3.1",
Expand Down
3 changes: 2 additions & 1 deletion docs/next.config.mjs
Original file line number Diff line number Diff line change
Expand Up @@ -56,7 +56,8 @@ export default withDocsInfra({
// We only care about Node runtime at this point.
(options.nextRuntime === undefined || options.nextRuntime === 'nodejs')
) {
const [nextExternals, ...externals] = config.externals;
const externals = config.externals.slice(0, -1);
const nextExternals = config.externals.at(-1);

config.externals = [
// @ts-ignore
Expand Down
2 changes: 1 addition & 1 deletion docs/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -126,7 +126,7 @@
"@types/json2mq": "^0.2.2",
"@types/node": "^20.16.5",
"@types/prop-types": "^15.7.13",
"@types/react": "^18.3.4",
"@types/react": "^18.3.6",
"@types/react-dom": "^18.3.0",
"@types/react-swipeable-views": "^0.13.5",
"@types/react-transition-group": "^4.4.11",
Expand Down
4 changes: 2 additions & 2 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -133,7 +133,7 @@
"@types/lodash": "^4.17.9",
"@types/mocha": "^10.0.8",
"@types/node": "^20.16.5",
"@types/react": "^18.3.4",
"@types/react": "^18.3.6",
"@types/yargs": "^17.0.33",
"@typescript-eslint/eslint-plugin": "^7.18.0",
"@typescript-eslint/parser": "^7.18.0",
Expand Down Expand Up @@ -216,7 +216,7 @@
"@definitelytyped/typescript-versions": "^0.1.4",
"@definitelytyped/utils": "^0.1.7",
"@types/node": "^20.16.5",
"@types/react": "^18.3.4",
"@types/react": "^18.3.6",
"@types/react-dom": "18.3.0",
"cross-fetch": "^4.0.0",
"@pigment-css/react": "0.0.23",
Expand Down
2 changes: 1 addition & 1 deletion packages-internal/scripts/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,7 @@
"@types/doctrine": "^0.0.9",
"@types/lodash": "^4.17.9",
"@types/node": "^20.16.5",
"@types/react": "^18.3.4",
"@types/react": "^18.3.6",
"@types/uuid": "^9.0.8",
"chai": "^4.5.0",
"fast-glob": "^3.3.2",
Expand Down
2 changes: 1 addition & 1 deletion packages-internal/test-utils/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -57,7 +57,7 @@
"@types/chai-dom": "^1.11.3",
"@types/format-util": "^1.0.4",
"@types/prop-types": "^15.7.13",
"@types/react": "^18.3.4",
"@types/react": "^18.3.6",
"@types/react-dom": "^18.3.0",
"@types/sinon": "^17.0.3",
"typescript": "^5.6.2"
Expand Down
2 changes: 1 addition & 1 deletion packages/mui-base/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -56,7 +56,7 @@
"@testing-library/user-event": "^14.5.2",
"@types/chai": "^4.3.20",
"@types/prop-types": "^15.7.13",
"@types/react": "18.3.4",
"@types/react": "18.3.6",
"@types/react-dom": "18.3.0",
"@types/sinon": "^17.0.3",
"chai": "^4.5.0",
Expand Down
2 changes: 1 addition & 1 deletion packages/mui-base/src/Badge/Badge.types.ts
Original file line number Diff line number Diff line change
Expand Up @@ -83,7 +83,7 @@ export type BadgeRootSlotProps = {
children?: React.ReactNode;
className?: string;
ownerState: BadgeOwnerState;
ref: React.Ref<HTMLSpanElement>;
ref?: React.Ref<HTMLSpanElement>;
};

export type BadgeBadgeSlotProps = {
Expand Down
2 changes: 1 addition & 1 deletion packages/mui-base/src/Input/Input.types.ts
Original file line number Diff line number Diff line change
Expand Up @@ -190,7 +190,7 @@ export type InputInputSlotProps = Simplify<
ownerState: InputOwnerState;
placeholder: string | undefined;
readOnly: boolean | undefined;
ref: React.Ref<HTMLInputElement>;
ref?: React.Ref<HTMLInputElement>;
type: React.HTMLInputTypeAttribute | undefined;
}
>;
2 changes: 1 addition & 1 deletion packages/mui-base/src/MenuItem/MenuItem.types.ts
Original file line number Diff line number Diff line change
Expand Up @@ -77,7 +77,7 @@ export type MenuItemRootSlotProps = Simplify<
UseMenuItemRootSlotProps & {
children?: React.ReactNode;
className: string;
ref: React.Ref<HTMLElement>;
ref?: React.Ref<HTMLElement>;
ownerState: MenuItemOwnerState;
}
>;
7 changes: 3 additions & 4 deletions packages/mui-base/src/Modal/Modal.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -44,10 +44,9 @@ const useUtilityClasses = (ownerState: ModalOwnerState) => {
*
* - [Modal API](https://mui.com/base-ui/react-modal/components-api/#modal)
*/
const Modal = React.forwardRef(function Modal<RootComponentType extends React.ElementType>(
props: ModalProps<RootComponentType>,
forwardedRef: React.ForwardedRef<HTMLElement>,
) {
const Modal = React.forwardRef<HTMLElement, ModalProps>(function Modal<
RootComponentType extends React.ElementType,
>(props: ModalProps<RootComponentType>, forwardedRef: React.ForwardedRef<HTMLElement>) {
const {
children,
closeAfterTransition = false,
Expand Down
8 changes: 4 additions & 4 deletions packages/mui-base/src/Option/Option.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -21,10 +21,10 @@ function useUtilityClasses<OptionValue>(ownerState: OptionOwnerState<OptionValue
}

const InnerOption = React.memo(
React.forwardRef(function Option<OptionValue, RootComponentType extends React.ElementType>(
props: OptionProps<OptionValue, RootComponentType>,
forwardedRef: React.ForwardedRef<Element>,
) {
React.forwardRef<Element, OptionProps<unknown>>(function Option<
OptionValue,
RootComponentType extends React.ElementType,
>(props: OptionProps<OptionValue, RootComponentType>, forwardedRef: React.ForwardedRef<Element>) {
const {
children,
disabled = false,
Expand Down
2 changes: 1 addition & 1 deletion packages/mui-base/src/Option/Option.types.ts
Original file line number Diff line number Diff line change
Expand Up @@ -82,7 +82,7 @@ export type OptionRootSlotProps<OptionValue> = Simplify<
UseOptionRootSlotProps & {
children?: React.ReactNode;
className: string;
ref: React.Ref<HTMLElement>;
ref?: React.Ref<HTMLElement>;
ownerState: OptionOwnerState<OptionValue>;
}
>;
2 changes: 1 addition & 1 deletion packages/mui-base/src/OptionGroup/OptionGroup.types.ts
Original file line number Diff line number Diff line change
Expand Up @@ -70,7 +70,7 @@ export type OptionGroupRootSlotProps = {
children?: React.ReactNode;
className?: string;
ownerState: OptionGroupOwnerState;
ref: React.Ref<HTMLLIElement>;
ref?: React.Ref<HTMLLIElement>;
};

export type OptionGroupLabelSlotProps = {
Expand Down
9 changes: 4 additions & 5 deletions packages/mui-base/src/Popper/Popper.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -75,7 +75,7 @@ const useUtilityClasses = () => {

const defaultPopperOptions = {};

const PopperTooltip = React.forwardRef(function PopperTooltip<
const PopperTooltip = React.forwardRef<HTMLDivElement, PopperTooltipProps>(function PopperTooltip<
RootComponentType extends React.ElementType,
>(props: PopperTooltipProps<RootComponentType>, forwardedRef: React.ForwardedRef<HTMLDivElement>) {
const {
Expand Down Expand Up @@ -245,10 +245,9 @@ const PopperTooltip = React.forwardRef(function PopperTooltip<
*
* - [Popper API](https://mui.com/base-ui/react-popper/components-api/#popper)
*/
const Popper = React.forwardRef(function Popper<RootComponentType extends React.ElementType>(
props: PopperProps<RootComponentType>,
forwardedRef: React.ForwardedRef<HTMLDivElement>,
) {
const Popper = React.forwardRef<HTMLDivElement, PopperProps>(function Popper<
RootComponentType extends React.ElementType,
>(props: PopperProps<RootComponentType>, forwardedRef: React.ForwardedRef<HTMLDivElement>) {
const {
anchorEl,
children,
Expand Down
2 changes: 1 addition & 1 deletion packages/mui-base/src/Snackbar/Snackbar.types.ts
Original file line number Diff line number Diff line change
Expand Up @@ -59,7 +59,7 @@ export type SnackbarRootSlotProps = {
ownerState: SnackbarOwnerState;
className?: string;
children?: React.ReactNode;
ref: React.Ref<any>;
ref?: React.Ref<any>;
};

export interface SnackbarClickAwayListenerSlotProps extends ClickAwayListenerProps {
Expand Down
2 changes: 1 addition & 1 deletion packages/mui-base/src/Tab/Tab.types.ts
Original file line number Diff line number Diff line change
Expand Up @@ -62,7 +62,7 @@ export type TabOwnerState = Simplify<
export type TabRootSlotProps = Simplify<
UseTabRootSlotProps & {
className?: string;
ref: React.Ref<any>;
ref?: React.Ref<any>;
ownerState: TabOwnerState;
}
>;
2 changes: 1 addition & 1 deletion packages/mui-base/src/TablePagination/TablePagination.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -59,7 +59,7 @@ const useUtilityClasses = () => {
*
* - [TablePagination API](https://mui.com/base-ui/react-table-pagination/components-api/#table-pagination)
*/
const TablePagination = React.forwardRef(function TablePagination<
const TablePagination = React.forwardRef<Element, TablePaginationProps>(function TablePagination<
RootComponentType extends React.ElementType,
>(props: TablePaginationProps<RootComponentType>, forwardedRef: React.ForwardedRef<Element>) {
const {
Expand Down
Loading

0 comments on commit c77bd84

Please sign in to comment.