Skip to content

Commit dadcb30

Browse files
authored
feat: bump to React 18.3 (#602)
1 parent 8335e79 commit dadcb30

35 files changed

+4344
-3868
lines changed

package.json

Lines changed: 8 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -87,7 +87,8 @@
8787
"@storybook/react-vite": "7.6.5",
8888
"@storybook/testing-library": "0.2.2",
8989
"@testing-library/jest-dom": "5.17.0",
90-
"@types/react-dom": "18.2.17",
90+
"@types/react": "^18.3.3",
91+
"@types/react-dom": "^18.3.0",
9192
"@types/react-transition-group": "4.4.10",
9293
"@types/styled-components": "5.1.30",
9394
"@typescript-eslint/eslint-plugin": "6.14.0",
@@ -116,13 +117,13 @@
116117
"lint-staged": "15.2.0",
117118
"npm-run-all": "4.1.5",
118119
"prettier": "3.0.3",
119-
"react": "18.2.0",
120-
"react-dom": "18.2.0",
120+
"react": "^18.3.1",
121+
"react-dom": "^18.3.1",
121122
"react-transition-group": "4.4.5",
122123
"rimraf": "5.0.5",
123124
"storybook": "7.6.5",
124125
"styled-components": "5.3.11",
125-
"typescript": "5.3.3",
126+
"typescript": "^5.4.5",
126127
"vite": "5.0.10",
127128
"vitest": "1.0.4"
128129
},
@@ -131,8 +132,8 @@
131132
"@emotion/styled": ">=11.11.0",
132133
"honorable": ">=1.0.0-beta.17",
133134
"honorable-theme-default": ">=1.0.0-beta.5",
134-
"react": ">=18.2.0",
135-
"react-dom": ">=18.2.0",
135+
"react": ">=18.3.1",
136+
"react-dom": ">=18.3.1",
136137
"react-transition-group": ">=4.4.5",
137138
"styled-components": ">=5.3.11"
138139
},
@@ -146,4 +147,4 @@
146147
"eslint --fix --ext ts,tsx,js,jsx"
147148
]
148149
}
149-
}
150+
}

src/components/AppIcon.tsx

Lines changed: 0 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,3 @@
1-
import PropTypes from 'prop-types'
21
import {
32
type ComponentProps,
43
type ReactElement,
@@ -45,16 +44,6 @@ type AppIconProps = {
4544
onClose?: () => void
4645
}
4746

48-
const propTypes = {
49-
size: PropTypes.oneOf(SIZES),
50-
spacing: PropTypes.oneOf(SPACINGS),
51-
hue: PropTypes.oneOf(HUES),
52-
clickable: PropTypes.bool,
53-
url: PropTypes.string,
54-
IconComponent: PropTypes.elementType,
55-
alt: PropTypes.string,
56-
} as const
57-
5847
const parentFillLevelToHue = {
5948
0: 'default',
6049
1: 'lighter',
@@ -227,7 +216,5 @@ function AppIconRef(
227216

228217
const AppIcon = forwardRef(AppIconRef)
229218

230-
AppIcon.propTypes = propTypes
231-
232219
export default AppIcon
233220
export type { AppIconProps }

src/components/Banner.tsx

Lines changed: 0 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,5 @@
11
import { type ReactNode, type Ref, forwardRef } from 'react'
22
import { Div, Flex, type FlexProps, Span, type SpanProps } from 'honorable'
3-
import PropTypes from 'prop-types'
43
import styled from 'styled-components'
54

65
import { type ColorKey, type SeverityExt, sanitizeSeverity } from '../types'
@@ -177,9 +176,4 @@ function BannerRef(
177176

178177
const Banner = forwardRef(BannerRef)
179178

180-
Banner.propTypes = {
181-
severity: PropTypes.oneOf(BANNER_SEVERITIES),
182-
onClose: PropTypes.func,
183-
}
184-
185179
export default Banner

src/components/Callout.tsx

Lines changed: 0 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,4 @@
11
import classNames from 'classnames'
2-
import PropTypes from 'prop-types'
32
import { type Dispatch, type PropsWithChildren, forwardRef, useId } from 'react'
43
import styled, { useTheme } from 'styled-components'
54

@@ -375,12 +374,4 @@ const CalloutSC = styled.div<{
375374
: {}),
376375
}))
377376

378-
Callout.propTypes = {
379-
severity: PropTypes.oneOf(CALLOUT_SEVERITIES),
380-
title: PropTypes.string,
381-
size: PropTypes.oneOf(['compact', 'full']),
382-
fillLevel: PropTypes.oneOf([0, 1, 2, 3]),
383-
className: PropTypes.string,
384-
}
385-
386377
export default Callout

src/components/Carousel.tsx

Lines changed: 0 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,6 @@ import {
99
} from 'react'
1010
import { CSSTransition } from 'react-transition-group'
1111
import { keyframes } from '@emotion/react'
12-
import PropTypes from 'prop-types'
1312

1413
type DotProps = DivProps & {
1514
active?: boolean
@@ -20,10 +19,6 @@ export type CarouselProps = DivProps & {
2019
autoAdvanceTime?: number
2120
}
2221

23-
const propTypes = {
24-
autoAdvanceTime: PropTypes.number,
25-
}
26-
2722
const dotAnimationIn = keyframes`
2823
0% {
2924
transform: scale(1)
@@ -172,6 +167,4 @@ function CarouselRef(
172167

173168
const Carousel = forwardRef(CarouselRef)
174169

175-
Carousel.propTypes = propTypes
176-
177170
export default Carousel

src/components/Codeline.tsx

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -11,8 +11,6 @@ type CodelineProps = FlexProps & {
1111
onCopyClick?: (text: string) => Promise<void>
1212
}
1313

14-
const propTypes = {}
15-
1614
function CodelineRef(
1715
{ children, displayText, onCopyClick, ...props }: CodelineProps,
1816
ref: Ref<any>
@@ -110,6 +108,4 @@ function CodelineRef(
110108

111109
const Codeline = forwardRef(CodelineRef)
112110

113-
Codeline.propTypes = propTypes
114-
115111
export default Codeline

src/components/ComboBox.tsx

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,6 @@ import { isEmpty, isUndefined, omit, pick } from 'lodash-es'
33
import {
44
type ComponentProps,
55
type HTMLAttributes,
6-
type Key,
76
type KeyboardEvent,
87
type KeyboardEventHandler,
98
type MouseEventHandler,
@@ -25,6 +24,8 @@ import {
2524
} from 'react-stately'
2625
import styled, { useTheme } from 'styled-components'
2726

27+
import { type Key } from '@react-types/shared'
28+
2829
import { useFloatingDropdown } from '../hooks/useFloatingDropdown'
2930

3031
import DropdownArrowIcon from './icons/DropdownArrowIcon'

src/components/Divider.tsx

Lines changed: 0 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,17 +1,12 @@
11
import { type Ref, forwardRef } from 'react'
22
import { Div, Flex, type FlexProps, P } from 'honorable'
3-
import PropTypes from 'prop-types'
43

54
type DividerProps = FlexProps & {
65
text?: string
76
color?: string
87
backgroundColor?: string
98
}
109

11-
const propTypes = {
12-
text: PropTypes.string,
13-
}
14-
1510
function DividerRef(
1611
{
1712
text,
@@ -55,6 +50,4 @@ function DividerRef(
5550

5651
const Divider = forwardRef(DividerRef)
5752

58-
Divider.propTypes = propTypes
59-
6053
export default Divider

src/components/EmptyState.tsx

Lines changed: 0 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,6 @@ import {
44
type Ref,
55
forwardRef,
66
} from 'react'
7-
import PropTypes from 'prop-types'
87
import styled from 'styled-components'
98

109
type EmptyStateProps = ComponentProps<typeof EmptyStateSC> & {
@@ -13,12 +12,6 @@ type EmptyStateProps = ComponentProps<typeof EmptyStateSC> & {
1312
icon?: ReactElement
1413
}
1514

16-
const propTypes = {
17-
message: PropTypes.string.isRequired,
18-
description: PropTypes.string,
19-
icon: PropTypes.element,
20-
}
21-
2215
const EmptyStateSC = styled.div(({ theme }) => ({
2316
padding: theme.spacing.xxlarge,
2417
gap: theme.spacing.medium,
@@ -60,6 +53,4 @@ function EmptyStateRef(
6053

6154
const EmptyState = forwardRef(EmptyStateRef)
6255

63-
EmptyState.propTypes = propTypes
64-
6556
export default EmptyState

src/components/Flyover.tsx

Lines changed: 0 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,4 @@
11
import { type ReactNode, type Ref, forwardRef, useEffect } from 'react'
2-
import PropTypes from 'prop-types'
32

43
import styled, { type StyledComponentPropsWithRef } from 'styled-components'
54

@@ -23,15 +22,6 @@ type FlyoverPropsType = Omit<ModalProps, 'size'> & {
2322
[x: string]: unknown
2423
}
2524

26-
const propTypes = {
27-
header: PropTypes.node,
28-
lockBody: PropTypes.bool,
29-
scrollable: PropTypes.bool,
30-
asForm: PropTypes.bool,
31-
width: PropTypes.string,
32-
minWidth: PropTypes.number,
33-
} as const
34-
3525
const FlyoverSC = styled.div(({ theme }) => ({
3626
position: 'relative',
3727
backgroundColor: theme.colors['fill-zero'],
@@ -151,6 +141,4 @@ function FlyoverRef(
151141

152142
const Flyover = forwardRef(FlyoverRef)
153143

154-
Flyover.propTypes = propTypes
155-
156144
export default Flyover

0 commit comments

Comments
 (0)