Skip to content

Commit

Permalink
Partially fixed JSX namespace
Browse files Browse the repository at this point in the history
  • Loading branch information
r100-stack committed Jan 17, 2025
1 parent 3d87685 commit 816d405
Show file tree
Hide file tree
Showing 36 changed files with 36 additions and 1 deletion.
2 changes: 1 addition & 1 deletion apps/react-workshop/src/Table.stories.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
* Copyright (c) Bentley Systems, Incorporated. All rights reserved.
* See LICENSE.md in the project root for license terms and full copyright notice.
*--------------------------------------------------------------------------------------------*/
import React, { useCallback } from 'react';
import React, { useCallback, type JSX } from 'react';
import type {
CellProps,
CellRendererProps,
Expand Down
1 change: 1 addition & 0 deletions packages/itwinui-react/src/core/Avatar/Avatar.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@
*--------------------------------------------------------------------------------------------*/
import cx from 'classnames';
import * as React from 'react';
import type { JSX } from 'react';
import { Box, SoftBackgrounds, isSoftBackground } from '../../utils/index.js';
import type {
AnyString,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@
* See LICENSE.md in the project root for license terms and full copyright notice.
*--------------------------------------------------------------------------------------------*/
import * as React from 'react';
import type { JSX } from 'react';
import cx from 'classnames';
import { Box } from '../../utils/index.js';
import type { PolymorphicForwardRefComponent } from '../../utils/index.js';
Expand Down
1 change: 1 addition & 0 deletions packages/itwinui-react/src/core/Buttons/Button.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@
*--------------------------------------------------------------------------------------------*/
import cx from 'classnames';
import * as React from 'react';
import type { JSX } from 'react';

import { Box, ButtonBase } from '../../utils/index.js';
import type { PolymorphicForwardRefComponent } from '../../utils/index.js';
Expand Down
1 change: 1 addition & 0 deletions packages/itwinui-react/src/core/Buttons/DropdownButton.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@
* See LICENSE.md in the project root for license terms and full copyright notice.
*--------------------------------------------------------------------------------------------*/
import * as React from 'react';
import type { JSX } from 'react';
import cx from 'classnames';
import { Button } from './Button.js';
import type { ButtonProps } from './Button.js';
Expand Down
1 change: 1 addition & 0 deletions packages/itwinui-react/src/core/Buttons/SplitButton.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@
*--------------------------------------------------------------------------------------------*/
import cx from 'classnames';
import * as React from 'react';
import type { JSX } from 'react';
import { Button } from './Button.js';
import type { ButtonProps } from './Button.js';
import { IconButton } from './IconButton.js';
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@
* See LICENSE.md in the project root for license terms and full copyright notice.
*--------------------------------------------------------------------------------------------*/
import * as React from 'react';
import type { JSX } from 'react';
import cx from 'classnames';
import { CarouselContext } from './CarouselContext.js';
import {
Expand Down
1 change: 1 addition & 0 deletions packages/itwinui-react/src/core/ComboBox/ComboBox.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@
* See LICENSE.md in the project root for license terms and full copyright notice.
*--------------------------------------------------------------------------------------------*/
import * as React from 'react';
import type { JSX } from 'react';
import { MenuExtraContent } from '../Menu/MenuExtraContent.js';
import type { SelectOption } from '../Select/Select.js';
import { SelectTag } from '../Select/SelectTag.js';
Expand Down
1 change: 1 addition & 0 deletions packages/itwinui-react/src/core/ComboBox/ComboBoxInput.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@
* See LICENSE.md in the project root for license terms and full copyright notice.
*--------------------------------------------------------------------------------------------*/
import * as React from 'react';
import type { JSX } from 'react';
import { Input } from '../Input/Input.js';
import {
useSafeContext,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@
* See LICENSE.md in the project root for license terms and full copyright notice.
*--------------------------------------------------------------------------------------------*/
import * as React from 'react';
import type { JSX } from 'react';
import { StatusMessage } from '../StatusMessage/StatusMessage.js';
import {
InputContainer,
Expand Down
1 change: 1 addition & 0 deletions packages/itwinui-react/src/core/ComboBox/ComboBoxMenu.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@
* See LICENSE.md in the project root for license terms and full copyright notice.
*--------------------------------------------------------------------------------------------*/
import * as React from 'react';
import type { JSX } from 'react';
import cx from 'classnames';
import { Menu } from '../Menu/Menu.js';
import {
Expand Down
1 change: 1 addition & 0 deletions packages/itwinui-react/src/core/ComboBox/helpers.ts
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@
* See LICENSE.md in the project root for license terms and full copyright notice.
*--------------------------------------------------------------------------------------------*/
import * as React from 'react';
import type { JSX } from 'react';
import type { SelectOption } from '../Select/Select.js';
import type { usePopover } from '../Popover/Popover.js';

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@
* See LICENSE.md in the project root for license terms and full copyright notice.
*--------------------------------------------------------------------------------------------*/
import * as React from 'react';
import type { JSX } from 'react';
import { mergeEventHandlers, useControlledState } from '../../utils/index.js';
import type {
PolymorphicForwardRefComponent,
Expand Down
1 change: 1 addition & 0 deletions packages/itwinui-react/src/core/Fieldset/Fieldset.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@
* See LICENSE.md in the project root for license terms and full copyright notice.
*--------------------------------------------------------------------------------------------*/
import * as React from 'react';
import type { JSX } from 'react';
import { FieldsetBase } from '../../utils/index.js';
import type { PolymorphicForwardRefComponent } from '../../utils/index.js';

Expand Down
1 change: 1 addition & 0 deletions packages/itwinui-react/src/core/Header/Header.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@
*--------------------------------------------------------------------------------------------*/
import cx from 'classnames';
import * as React from 'react';
import type { JSX } from 'react';
import { IconButton } from '../Buttons/IconButton.js';

import { SvgMoreVertical, Box } from '../../utils/index.js';
Expand Down
1 change: 1 addition & 0 deletions packages/itwinui-react/src/core/Header/HeaderLogo.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@

import cx from 'classnames';
import * as React from 'react';
import type { JSX } from 'react';

import { Box } from '../../utils/index.js';
import type { PolymorphicForwardRefComponent } from '../../utils/index.js';
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@
* See LICENSE.md in the project root for license terms and full copyright notice.
*--------------------------------------------------------------------------------------------*/
import * as React from 'react';
import type { JSX } from 'react';
import { Input } from '../Input/Input.js';
import { InputWithIcon, StatusIconMap } from '../../utils/index.js';
import type { PolymorphicForwardRefComponent } from '../../utils/index.js';
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@
* See LICENSE.md in the project root for license terms and full copyright notice.
*--------------------------------------------------------------------------------------------*/
import * as React from 'react';
import type { JSX } from 'react';

import { Select } from '../Select/Select.js';
import type { SelectProps } from '../Select/Select.js';
Expand Down
1 change: 1 addition & 0 deletions packages/itwinui-react/src/core/Menu/MenuItem.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@
* See LICENSE.md in the project root for license terms and full copyright notice.
*--------------------------------------------------------------------------------------------*/
import * as React from 'react';
import type { JSX } from 'react';
import {
SvgCaretRightSmall,
useMergedRefs,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@
* Copyright (c) Bentley Systems, Incorporated. All rights reserved.
* See LICENSE.md in the project root for license terms and full copyright notice.
*--------------------------------------------------------------------------------------------*/
import type { JSX } from 'react';
import { render, screen, waitFor } from '@testing-library/react';
import { ErrorPage, type ErrorPageType } from './ErrorPage.js';
import {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@
* See LICENSE.md in the project root for license terms and full copyright notice.
*--------------------------------------------------------------------------------------------*/
import * as React from 'react';
import type { JSX } from 'react';
import { Button } from '../Buttons/Button.js';
import { NonIdealState } from './NonIdealState.js';
import { ProgressRadial } from '../ProgressIndicators/ProgressRadial.js';
Expand Down
1 change: 1 addition & 0 deletions packages/itwinui-react/src/core/RadioTiles/RadioTile.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@
*--------------------------------------------------------------------------------------------*/
import cx from 'classnames';
import * as React from 'react';
import type { JSX } from 'react';
import { useMergedRefs, Box } from '../../utils/index.js';
import type { PolymorphicForwardRefComponent } from '../../utils/index.js';

Expand Down
1 change: 1 addition & 0 deletions packages/itwinui-react/src/core/Select/Select.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@
* See LICENSE.md in the project root for license terms and full copyright notice.
*--------------------------------------------------------------------------------------------*/
import * as React from 'react';
import type { JSX } from 'react';
import cx from 'classnames';
import { MenuItem } from '../Menu/MenuItem.js';
import type { MenuItemProps } from '../Menu/MenuItem.js';
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@
* See LICENSE.md in the project root for license terms and full copyright notice.
*--------------------------------------------------------------------------------------------*/
import * as React from 'react';
import type { JSX } from 'react';
import cx from 'classnames';
import { SvgChevronRight, Box, useControlledState } from '../../utils/index.js';
import type { PolymorphicForwardRefComponent } from '../../utils/index.js';
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@
* See LICENSE.md in the project root for license terms and full copyright notice.
*--------------------------------------------------------------------------------------------*/
import * as React from 'react';
import type { JSX } from 'react';
import { Box, StatusIconMap } from '../../utils/index.js';
import type { PolymorphicForwardRefComponent } from '../../utils/index.js';
import cx from 'classnames';
Expand Down
1 change: 1 addition & 0 deletions packages/itwinui-react/src/core/Table/Table.test.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@ import {
waitFor,
} from '@testing-library/react';
import * as React from 'react';
import type { JSX } from 'react';
import { Table, type TableProps } from './Table.js';
import * as IntersectionHooks from '../../utils/hooks/useIntersection.js';
import {
Expand Down
1 change: 1 addition & 0 deletions packages/itwinui-react/src/core/Table/Table.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@
* See LICENSE.md in the project root for license terms and full copyright notice.
*--------------------------------------------------------------------------------------------*/
import * as React from 'react';
import type { JSX } from 'react';
import cx from 'classnames';
import {
actions as TableActions,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@
* See LICENSE.md in the project root for license terms and full copyright notice.
*--------------------------------------------------------------------------------------------*/
import * as React from 'react';
import type { JSX } from 'react';
import { defaultColumn } from 'react-table';
import type { CellRendererProps } from '../../../react-table/react-table.js';
import cx from 'classnames';
Expand Down
1 change: 1 addition & 0 deletions packages/itwinui-react/src/core/TimePicker/TimePicker.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@
*--------------------------------------------------------------------------------------------*/
import cx from 'classnames';
import * as React from 'react';
import type { JSX } from 'react';
import { Box } from '../../utils/index.js';
import type { PolymorphicForwardRefComponent } from '../../utils/index.js';

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@
* See LICENSE.md in the project root for license terms and full copyright notice.
*--------------------------------------------------------------------------------------------*/
import * as React from 'react';
import type { JSX } from 'react';
import cx from 'classnames';
import { Box, SvgCheckmark } from '../../utils/index.js';
import type { PolymorphicForwardRefComponent } from '../../utils/index.js';
Expand Down
1 change: 1 addition & 0 deletions packages/itwinui-react/src/core/Tree/Tree.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@
* See LICENSE.md in the project root for license terms and full copyright notice.
*--------------------------------------------------------------------------------------------*/
import * as React from 'react';
import type { JSX } from 'react';
import {
getFocusableElements,
polymorphic,
Expand Down
1 change: 1 addition & 0 deletions packages/itwinui-react/src/core/Tree/TreeNode.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@
* See LICENSE.md in the project root for license terms and full copyright notice.
*--------------------------------------------------------------------------------------------*/
import * as React from 'react';
import type { JSX } from 'react';
import {
getFocusableElements,
Box,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@
* See LICENSE.md in the project root for license terms and full copyright notice.
*--------------------------------------------------------------------------------------------*/
import * as React from 'react';
import type { JSX } from 'react';
import cx from 'classnames';
import { Box } from './Box.js';
import { Label } from '../../core/Label/Label.js';
Expand Down
1 change: 1 addition & 0 deletions packages/itwinui-react/src/utils/functions/polymorphic.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@
* See LICENSE.md in the project root for license terms and full copyright notice.
*--------------------------------------------------------------------------------------------*/
import * as React from 'react';
import type { JSX } from 'react';
import cx from 'classnames';
import type { PolymorphicForwardRefComponent } from '../props.js';
import { useGlobals } from '../hooks/useGlobals.js';
Expand Down
1 change: 1 addition & 0 deletions packages/itwinui-react/src/utils/functions/react.ts
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@
* See LICENSE.md in the project root for license terms and full copyright notice.
*--------------------------------------------------------------------------------------------*/
import * as React from 'react';
import type { JSX } from 'react';
import { mergeRefs } from '../hooks/useMergedRefs.js';

/**
Expand Down
1 change: 1 addition & 0 deletions packages/itwinui-react/src/utils/props.ts
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@
* See LICENSE.md in the project root for license terms and full copyright notice.
*--------------------------------------------------------------------------------------------*/
import type * as React from 'react';
import type { JSX } from 'react';

// TODO: remove this once it's not used anywhere
export type CommonProps = {
Expand Down

0 comments on commit 816d405

Please sign in to comment.