Skip to content

Commit

Permalink
integrate react@19
Browse files Browse the repository at this point in the history
  • Loading branch information
calebpollman committed Dec 6, 2024
1 parent c5f93ac commit efc4bfc
Show file tree
Hide file tree
Showing 227 changed files with 368 additions and 331 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ function SignOutButton() {
return <Button title="Sign Out" onPress={signOut} />;
}

function App(): JSX.Element {
function App(): React.JSX.Element {
return (
<>
<Authenticator.Provider>
Expand Down
2 changes: 1 addition & 1 deletion docs/__tests__/__snapshots__/props-table.test.ts.snap
Original file line number Diff line number Diff line change
Expand Up @@ -2970,7 +2970,7 @@ exports[`Props Table 1`] = `
},
"children": {
"name": "children",
"type": "(item: Item, index: number) => JSX.Element",
"type": "(item: Item, index: number) => React.JSX.Element",
"description": "The component to be repeated\\nSame interface as Array.prototype.map",
"category": "CollectionChildren",
"isOptional": false
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ interface DesktopNavProps {
navLinksContainerRef: MutableRefObject<HTMLDivElement>;
navLinksRightRef: MutableRefObject<HTMLDivElement>;
hasSecondaryNav: boolean;
secondaryNavDesktop?: JSX.Element;
secondaryNavDesktop?: React.JSX.Element;
}

export function DesktopNav({
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ export function NavMenuLink({
setShowGlobalNav?: Dispatch<SetStateAction<boolean>>;
}) {
const label: string = navMenuItem.label;
const linkContent: JSX.Element =
const linkContent: React.JSX.Element =
navMenuItem.type === 'EXTERNAL' ? (
<ExternalLink>{label}</ExternalLink>
) : (
Expand Down
2 changes: 1 addition & 1 deletion docs/src/components/propsTable/PropsTableBody.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ import { Property } from '../../../scripts/types/catalog';
export const PropsTableBody = ([
propName,
{ name, type, description, isOptional },
]: [string, Property]): JSX.Element => {
]: [string, Property]): React.JSX.Element => {
return (
<TableRow key={name}>
<ResponsiveTableCell label="Name">
Expand Down
4 changes: 3 additions & 1 deletion docs/src/components/propsTable/PropsTableExpander.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,9 @@ export function PropsTableExpander({
}: {
propsSortedByCategory: SortedPropertiesByCategory;
}) {
const expanderItem = (categoryProperty: CategoryProperty): JSX.Element => {
const expanderItem = (
categoryProperty: CategoryProperty
): React.JSX.Element => {
const title = Object.keys(categoryProperty)[0];
return (
<Accordion.Item key={title} value={title}>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ export interface AlertPropControlsProps extends AlertProps {
}

interface AlertPropControlsInterface {
(props: AlertPropControlsProps): JSX.Element;
(props: AlertPropControlsProps): React.JSX.Element;
}

export const AlertPropControls: AlertPropControlsInterface = ({
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ export interface AutocompletePropControlsProps extends AutocompleteProps {
}

interface AutocompletePropControlsInterface {
(props: AutocompletePropControlsProps): JSX.Element;
(props: AutocompletePropControlsProps): React.JSX.Element;
}

export const AutocompletePropControls: AutocompletePropControlsInterface = ({
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ export interface AvatarPropControlsProps extends AvatarProps {
}

interface AvatarPropControlsInterface {
(props: AvatarPropControlsProps): JSX.Element;
(props: AvatarPropControlsProps): React.JSX.Element;
}

export const AvatarPropControls: AvatarPropControlsInterface = ({
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ export interface BadgePropControlsProps extends BadgeProps {
}

interface BadgePropControlsInterface {
(props: BadgePropControlsProps): JSX.Element;
(props: BadgePropControlsProps): React.JSX.Element;
}

export const BadgePropControls: BadgePropControlsInterface = ({
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ export interface CheckboxFieldPropControlsProps extends CheckboxFieldProps {
}

interface CheckboxFieldPropControlsInterface {
(props: CheckboxFieldPropControlsProps): JSX.Element;
(props: CheckboxFieldPropControlsProps): React.JSX.Element;
}

export const CheckboxFieldPropControls: CheckboxFieldPropControlsInterface = ({
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ export type CollectionPropControlsProps = Omit<
};

interface CollectionPropControlsInterface {
(props: CollectionPropControlsProps): JSX.Element;
(props: CollectionPropControlsProps): React.JSX.Element;
}

export const CollectionPropControls: CollectionPropControlsInterface = ({
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ export interface DividerPropControlsProps extends DividerOptions {
}

interface DividerPropControlsInterface {
(props: DividerPropControlsProps): JSX.Element;
(props: DividerPropControlsProps): React.JSX.Element;
}

export const DividerPropControls: DividerPropControlsInterface = ({
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ export interface FieldsetPropControlsProps extends FieldsetProps {
}

interface FieldsetPropControlsInterface {
(props: FieldsetPropControlsProps): JSX.Element;
(props: FieldsetPropControlsProps): React.JSX.Element;
}

export const FieldsetPropControls: FieldsetPropControlsInterface = ({
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ export interface FlexPropControlsProps extends FlexProps {
}

interface FlexPropControlsInterface {
(props: FlexPropControlsProps): JSX.Element;
(props: FlexPropControlsProps): React.JSX.Element;
}

export const FlexPropControls: FlexPropControlsInterface = ({
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ export interface GridContainerPropControlsProps
}

interface GridContainerPropControls {
(props: GridContainerPropControlsProps): JSX.Element;
(props: GridContainerPropControlsProps): React.JSX.Element;
}

export const GridContainerPropControls: GridContainerPropControls = ({
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ export interface GridItemPropControlsProps extends GridItemStyleProps {
}

interface GridItemPropControls {
(props: GridItemPropControlsProps): JSX.Element;
(props: GridItemPropControlsProps): React.JSX.Element;
}

export const GridItemPropControls: GridItemPropControls = ({
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ interface HeadingPropControlsProps extends HeadingProps {
}

interface HeadingPropControlsInterface {
(props: HeadingPropControlsProps): JSX.Element;
(props: HeadingPropControlsProps): React.JSX.Element;
}

export const HeadingPropControls: HeadingPropControlsInterface = ({
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ export interface HighlightMatchPropControlsProps extends HighlightMatchProps {
}

interface HighlightMatchPropControlsInterface {
(props: HighlightMatchPropControlsProps): JSX.Element;
(props: HighlightMatchPropControlsProps): React.JSX.Element;
}

export const HighlightMatchPropControls: HighlightMatchPropControlsInterface =
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ export interface IconPropControlsProps extends IconProps {
}

interface IconPropControlsInterface {
(props: IconPropControlsProps): JSX.Element;
(props: IconPropControlsProps): React.JSX.Element;
}

export const IconPropControls: IconPropControlsInterface = ({
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ export interface ImagePropControlsProps extends ImageOptions {
}

interface ImagePropControlsInterface {
(props: ImagePropControlsProps): JSX.Element;
(props: ImagePropControlsProps): React.JSX.Element;
}

export const ImagePropControls: ImagePropControlsInterface = ({
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ export interface InputPropControlsProps extends InputProps {
}

interface InputPropControlsInterface {
(props: InputPropControlsProps): JSX.Element;
(props: InputPropControlsProps): React.JSX.Element;
}

export const InputPropControls: InputPropControlsInterface = ({
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ export interface LinkPropControlsProps extends LinkProps {
}

interface LinkPropControlsInterface {
(props: LinkPropControlsProps): JSX.Element;
(props: LinkPropControlsProps): React.JSX.Element;
}

export const LinkPropControls: LinkPropControlsInterface = ({
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ export interface MenuPropControlsProps extends MenuProps {
}

interface MenuPropControlsInterface {
(props: MenuPropControlsProps): JSX.Element;
(props: MenuPropControlsProps): React.JSX.Element;
}

export const MenuPropControls: MenuPropControlsInterface = ({
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ export interface MessagePropControlsProps extends MessageProps {
}

interface MessagePropControlsInterface {
(props: MessagePropControlsProps): JSX.Element;
(props: MessagePropControlsProps): React.JSX.Element;
}

export const MessagePropControls: MessagePropControlsInterface = ({
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ export interface PaginationPropControlsProps extends PaginationProps {
}

interface PaginationPropControlsInterface {
(props: PaginationPropControlsProps): JSX.Element;
(props: PaginationPropControlsProps): React.JSX.Element;
}

export const PaginationPropControls: PaginationPropControlsInterface = ({
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,7 @@ export interface PasswordFieldControlsProps extends PasswordFieldProps {
}

interface PasswordFieldPropControlsInterface {
(props: PasswordFieldControlsProps): JSX.Element;
(props: PasswordFieldControlsProps): React.JSX.Element;
}

export const PasswordFieldPropControls: PasswordFieldPropControlsInterface = ({
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,7 @@ export type PhoneNumberFieldPropControlsProps = PhoneNumberFieldProps & {
};

interface PhoneNumberFieldPropControlsInterface {
(props: PhoneNumberFieldPropControlsProps): JSX.Element;
(props: PhoneNumberFieldPropControlsProps): React.JSX.Element;
}

export const PhoneNumberFieldPropControls: PhoneNumberFieldPropControlsInterface =
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ export interface RadioGroupFieldPropControlsProps extends RadioGroupFieldProps {
}

interface RadioGroupFieldPropControlsInterface {
(props: RadioGroupFieldPropControlsProps): JSX.Element;
(props: RadioGroupFieldPropControlsProps): React.JSX.Element;
}

export const RadioGroupFieldPropControls: RadioGroupFieldPropControlsInterface =
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ export interface RatingPropControlsProps extends RatingProps {
}

interface RatingPropControlsInterface {
(props: RatingPropControlsProps): JSX.Element;
(props: RatingPropControlsProps): React.JSX.Element;
}

export const RatingPropControls: RatingPropControlsInterface = ({
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ export interface SearchFieldPropControlsProps extends SearchFieldProps {
}

interface SearchFieldPropControlsInterface {
(props: SearchFieldPropControlsProps): JSX.Element;
(props: SearchFieldPropControlsProps): React.JSX.Element;
}

export const SearchFieldPropControls: SearchFieldPropControlsInterface = ({
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@ export interface SelectFieldPropControlsProps extends SelectFieldProps {
}

interface SelectFieldPropControlsInterface {
(props: SelectFieldPropControlsProps): JSX.Element;
(props: SelectFieldPropControlsProps): React.JSX.Element;
}

export const SelectFieldPropControls: SelectFieldPropControlsInterface = ({
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@ export interface StylePropControlsProps extends BaseStyleProps {
}

interface StylePropControlsInterface {
(props: StylePropControlsProps): JSX.Element;
(props: StylePropControlsProps): React.JSX.Element;
}

export const StylePropControls: StylePropControlsInterface = ({
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,7 @@ export interface SliderFieldPropControlsProps extends SliderFieldProps {
}

interface SliderFieldPropControlsInterface {
(props: SliderFieldPropControlsProps): JSX.Element;
(props: SliderFieldPropControlsProps): React.JSX.Element;
}

export const SliderFieldPropControls: SliderFieldPropControlsInterface = ({
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@ export interface SwitchPropControlsProps extends SwitchFieldProps {
}

interface SwitchPropControlsInterface {
(props: SwitchPropControlsProps): JSX.Element;
(props: SwitchPropControlsProps): React.JSX.Element;
}

export const SwitchPropControls: SwitchPropControlsInterface = ({
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ export interface TablePropControlsProps extends TableProps {
}

interface TablePropControlsInterface {
(props: TablePropControlsProps): JSX.Element;
(props: TablePropControlsProps): React.JSX.Element;
}

export const TablePropControls: TablePropControlsInterface = ({
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ export interface TabsPropControlsProps extends TabsProps {
}

interface TabsPropControlsInterface {
(props: TabsPropControlsProps): JSX.Element;
(props: TabsPropControlsProps): React.JSX.Element;
}

export const TabsPropControls: TabsPropControlsInterface = ({
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ export interface TextPropControlsProps extends TextProps {
}

interface TextPropControlsInterface {
(props: TextPropControlsProps): JSX.Element;
(props: TextPropControlsProps): React.JSX.Element;
}

export const TextPropControls: TextPropControlsInterface = ({
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,7 @@ export interface TextAreaFieldControlsProps extends BaseTextAreaFieldProps {
}

interface TextAreaFieldControlsInterface {
(props: TextAreaFieldControlsProps): JSX.Element;
(props: TextAreaFieldControlsProps): React.JSX.Element;
}

export const TextAreaFieldPropControls: TextAreaFieldControlsInterface = ({
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@ export interface TextFieldPropControlsProps extends TextFieldProps {
}

interface TextFieldPropControlsInterface {
(props: TextFieldPropControlsProps): JSX.Element;
(props: TextFieldPropControlsProps): React.JSX.Element;
}

export const TextFieldPropControls: TextFieldPropControlsInterface = ({
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ export interface ToggleButtonPropControlsProps extends ToggleButtonProps {
}

export interface ToggleButtonPropControlsInterface {
(props: ToggleButtonPropControlsProps): JSX.Element;
(props: ToggleButtonPropControlsProps): React.JSX.Element;
}

export const ToggleButtonPropControls: ToggleButtonPropControlsInterface = ({
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ export interface ViewPropControlsProps extends ViewProps {
}

export interface ViewPropControlsInterface {
(props: ViewPropControlsProps): JSX.Element;
(props: ViewPropControlsProps): React.JSX.Element;
}

export const ViewPropControls: ViewPropControlsInterface = ({
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ import { I18n } from 'aws-amplify/utils';
import * as React from 'react';

type ScreenProps = {
Component: JSX.Element;
Component: React.JSX.Element;
};

function Screen({ Component }: ScreenProps) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ export function CustomizationComponents() {
region={'us-east-1'}
onAnalysisComplete={async () => {}}
components={{
PhotosensitiveWarning: (): JSX.Element => {
PhotosensitiveWarning: (): React.JSX.Element => {
return (
<Alert
variation="warning"
Expand Down
Loading

0 comments on commit efc4bfc

Please sign in to comment.