Skip to content

Commit

Permalink
Remove unused React imports from packages/design (#50200) (#50206)
Browse files Browse the repository at this point in the history
(cherry picked from commit 77035ef)
  • Loading branch information
gzdunek authored Dec 13, 2024
1 parent 4cc272e commit 8c8326d
Show file tree
Hide file tree
Showing 272 changed files with 18 additions and 523 deletions.
2 changes: 0 additions & 2 deletions web/packages/design/src/Alert/Alert.story.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -16,8 +16,6 @@
* along with this program. If not, see <http://www.gnu.org/licenses/>.
*/

import React from 'react';

import { Restore } from 'design/Icon';

import { Box } from '..';
Expand Down
2 changes: 0 additions & 2 deletions web/packages/design/src/Alert/Alert.test.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -16,8 +16,6 @@
* along with this program. If not, see <http://www.gnu.org/licenses/>.
*/

import React from 'react';

import { render, screen, theme, userEvent } from 'design/utils/testing';

import { Alert, Banner } from '.';
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -16,8 +16,6 @@
* along with this program. If not, see <http://www.gnu.org/licenses/>.
*/

import React from 'react';

import { AnimatedProgressBar as Component } from './AnimatedProgressBar';

export default {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,6 @@
* along with this program. If not, see <http://www.gnu.org/licenses/>.
*/

import React from 'react';
import styled from 'styled-components';

import Flex from '../Flex';
Expand Down
2 changes: 0 additions & 2 deletions web/packages/design/src/Box/Box.story.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -16,8 +16,6 @@
* along with this program. If not, see <http://www.gnu.org/licenses/>.
*/

import React from 'react';

import styled from 'styled-components';

import Box from './Box';
Expand Down
6 changes: 3 additions & 3 deletions web/packages/design/src/Button/buttons.story.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@
* along with this program. If not, see <http://www.gnu.org/licenses/>.
*/

import React from 'react';
import { Fragment } from 'react';

import styled from 'styled-components';

Expand Down Expand Up @@ -66,7 +66,7 @@ export const Buttons = () => {
</thead>
<tbody>
{fills.map(fill => (
<React.Fragment key={fill}>
<Fragment key={fill}>
<tr>
<th rowSpan={4}>{fill}</th>
<th>neutral</th>
Expand All @@ -84,7 +84,7 @@ export const Buttons = () => {
<th>success</th>
<ButtonTableCells fill={fill} intent="success" />
</tr>
</React.Fragment>
</Fragment>
))}
</tbody>
</Table>{' '}
Expand Down
1 change: 0 additions & 1 deletion web/packages/design/src/ButtonIcon/ButtonIcon.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,6 @@
* along with this program. If not, see <http://www.gnu.org/licenses/>.
*/

import React from 'react';
import styled from 'styled-components';

import { space, color, alignSelf } from 'design/system';
Expand Down
2 changes: 0 additions & 2 deletions web/packages/design/src/ButtonIcon/ButtonIcon.test.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -16,8 +16,6 @@
* along with this program. If not, see <http://www.gnu.org/licenses/>.
*/

import React from 'react';

import { render } from 'design/utils/testing';

import ButtonIcon from './index';
Expand Down
2 changes: 0 additions & 2 deletions web/packages/design/src/ButtonLink/ButtonLink.test.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -16,8 +16,6 @@
* along with this program. If not, see <http://www.gnu.org/licenses/>.
*/

import React from 'react';

import { render } from 'design/utils/testing';

import ButtonLink from './index';
Expand Down
1 change: 0 additions & 1 deletion web/packages/design/src/ButtonLink/ButtonLink.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,6 @@
* along with this program. If not, see <http://www.gnu.org/licenses/>.
*/

import React from 'react';
import styled from 'styled-components';

import { Button, ButtonProps } from 'design/Button';
Expand Down
2 changes: 0 additions & 2 deletions web/packages/design/src/Card/Card.story.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -16,8 +16,6 @@
* along with this program. If not, see <http://www.gnu.org/licenses/>.
*/

import React from 'react';

import { Flex, Text } from '..';

import Card from '.';
Expand Down
1 change: 0 additions & 1 deletion web/packages/design/src/CardError/CardError.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,6 @@
* along with this program. If not, see <http://www.gnu.org/licenses/>.
*/

import React from 'react';
import PropTypes from 'prop-types';
import styled from 'styled-components';

Expand Down
2 changes: 0 additions & 2 deletions web/packages/design/src/CardError/CardError.story.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -16,8 +16,6 @@
* along with this program. If not, see <http://www.gnu.org/licenses/>.
*/

import React from 'react';

import * as CardError from './CardError';

const message = 'some error message';
Expand Down
2 changes: 0 additions & 2 deletions web/packages/design/src/CardIcon/CardIcon.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -16,8 +16,6 @@
* along with this program. If not, see <http://www.gnu.org/licenses/>.
*/

import React from 'react';

import Card from 'design/Card';
import { H1 } from 'design';

Expand Down
2 changes: 0 additions & 2 deletions web/packages/design/src/CardIcon/CardIcon.story.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -16,8 +16,6 @@
* along with this program. If not, see <http://www.gnu.org/licenses/>.
*/

import React from 'react';

import { Apple } from '../Icon';

import CardIcon from './index';
Expand Down
2 changes: 0 additions & 2 deletions web/packages/design/src/CardSuccess/CardSuccess.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -16,8 +16,6 @@
* along with this program. If not, see <http://www.gnu.org/licenses/>.
*/

import React from 'react';

import CardIcon from 'design/CardIcon';
import { CircleCheck } from 'design/Icon';

Expand Down
2 changes: 0 additions & 2 deletions web/packages/design/src/CardSuccess/CardSuccess.story.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -16,8 +16,6 @@
* along with this program. If not, see <http://www.gnu.org/licenses/>.
*/

import React from 'react';

import CardSuccess, { CardSuccessLogin } from './index';

export default {
Expand Down
2 changes: 0 additions & 2 deletions web/packages/design/src/Checkbox/Checkbox.story.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -16,8 +16,6 @@
* along with this program. If not, see <http://www.gnu.org/licenses/>.
*/

import React from 'react';

import styled from 'styled-components';

import { Flex } from '..';
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@
* along with this program. If not, see <http://www.gnu.org/licenses/>.
*/

import React, { JSX, FormEvent } from 'react';
import { JSX, FormEvent } from 'react';
import styled from 'styled-components';

import {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -16,8 +16,6 @@
* along with this program. If not, see <http://www.gnu.org/licenses/>.
*/

import React from 'react';

import { Flex } from 'design';
import { CircleArrowLeft, CircleArrowRight } from 'design/Icon';
import { PageIndicatorText } from 'design/DataTable/Pager/PageIndicatorText';
Expand Down
2 changes: 0 additions & 2 deletions web/packages/design/src/DataTable/Pager/PageIndicatorText.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -16,8 +16,6 @@
* along with this program. If not, see <http://www.gnu.org/licenses/>.
*/

import React from 'react';

import { Text } from 'design';

export function PageIndicatorText({
Expand Down
2 changes: 0 additions & 2 deletions web/packages/design/src/DataTable/Pager/ServerSidePager.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -16,8 +16,6 @@
* along with this program. If not, see <http://www.gnu.org/licenses/>.
*/

import React from 'react';

import { Flex } from 'design';
import { CircleArrowLeft, CircleArrowRight } from 'design/Icon';

Expand Down
1 change: 0 additions & 1 deletion web/packages/design/src/DataTable/Table.test.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,6 @@
* along with this program. If not, see <http://www.gnu.org/licenses/>.
*/

import React from 'react';
import { within } from '@testing-library/react';
import userEvent from '@testing-library/user-event';

Expand Down
2 changes: 0 additions & 2 deletions web/packages/design/src/Dialog/Dialog.story.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -16,8 +16,6 @@
* along with this program. If not, see <http://www.gnu.org/licenses/>.
*/

import React from 'react';

import { ButtonPrimary, Input, LabelInput } from './..';

import Dialog, {
Expand Down
2 changes: 0 additions & 2 deletions web/packages/design/src/Dialog/DialogHeader.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -16,8 +16,6 @@
* along with this program. If not, see <http://www.gnu.org/licenses/>.
*/

import React from 'react';

import styled from 'styled-components';

import { typography } from 'design/system';
Expand Down
2 changes: 0 additions & 2 deletions web/packages/design/src/Dialog/DialogTitle.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -16,8 +16,6 @@
* along with this program. If not, see <http://www.gnu.org/licenses/>.
*/

import React from 'react';

import { H2 } from 'design';

export default function DialogTitle(props) {
Expand Down
2 changes: 0 additions & 2 deletions web/packages/design/src/Flex/Flex.story.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -16,8 +16,6 @@
* along with this program. If not, see <http://www.gnu.org/licenses/>.
*/

import React from 'react';

import styled from 'styled-components';

import Box from '../Box';
Expand Down
2 changes: 0 additions & 2 deletions web/packages/design/src/Icon/Icons/Add.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -40,8 +40,6 @@ SOFTWARE.
*/

import React from 'react';

import { Icon, IconProps } from '../Icon';

/*
Expand Down
2 changes: 0 additions & 2 deletions web/packages/design/src/Icon/Icons/AddCircle.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -40,8 +40,6 @@ SOFTWARE.
*/

import React from 'react';

import { Icon, IconProps } from '../Icon';

/*
Expand Down
2 changes: 0 additions & 2 deletions web/packages/design/src/Icon/Icons/AddUsers.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -40,8 +40,6 @@ SOFTWARE.
*/

import React from 'react';

import { Icon, IconProps } from '../Icon';

/*
Expand Down
2 changes: 0 additions & 2 deletions web/packages/design/src/Icon/Icons/AlarmRing.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -40,8 +40,6 @@ SOFTWARE.
*/

import React from 'react';

import { Icon, IconProps } from '../Icon';

/*
Expand Down
2 changes: 0 additions & 2 deletions web/packages/design/src/Icon/Icons/AmazonAws.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -40,8 +40,6 @@ SOFTWARE.
*/

import React from 'react';

import { Icon, IconProps } from '../Icon';

/*
Expand Down
2 changes: 0 additions & 2 deletions web/packages/design/src/Icon/Icons/Apartment.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -40,8 +40,6 @@ SOFTWARE.
*/

import React from 'react';

import { Icon, IconProps } from '../Icon';

/*
Expand Down
2 changes: 0 additions & 2 deletions web/packages/design/src/Icon/Icons/Apple.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -40,8 +40,6 @@ SOFTWARE.
*/

import React from 'react';

import { Icon, IconProps } from '../Icon';

/*
Expand Down
2 changes: 0 additions & 2 deletions web/packages/design/src/Icon/Icons/Application.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -40,8 +40,6 @@ SOFTWARE.
*/

import React from 'react';

import { Icon, IconProps } from '../Icon';

/*
Expand Down
2 changes: 0 additions & 2 deletions web/packages/design/src/Icon/Icons/Archive.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -40,8 +40,6 @@ SOFTWARE.
*/

import React from 'react';

import { Icon, IconProps } from '../Icon';

/*
Expand Down
2 changes: 0 additions & 2 deletions web/packages/design/src/Icon/Icons/ArrowBack.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -40,8 +40,6 @@ SOFTWARE.
*/

import React from 'react';

import { Icon, IconProps } from '../Icon';

/*
Expand Down
2 changes: 0 additions & 2 deletions web/packages/design/src/Icon/Icons/ArrowDown.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -40,8 +40,6 @@ SOFTWARE.
*/

import React from 'react';

import { Icon, IconProps } from '../Icon';

/*
Expand Down
2 changes: 0 additions & 2 deletions web/packages/design/src/Icon/Icons/ArrowFatLinesUp.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -40,8 +40,6 @@ SOFTWARE.
*/

import React from 'react';

import { Icon, IconProps } from '../Icon';

/*
Expand Down
2 changes: 0 additions & 2 deletions web/packages/design/src/Icon/Icons/ArrowForward.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -40,8 +40,6 @@ SOFTWARE.
*/

import React from 'react';

import { Icon, IconProps } from '../Icon';

/*
Expand Down
2 changes: 0 additions & 2 deletions web/packages/design/src/Icon/Icons/ArrowLeft.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -40,8 +40,6 @@ SOFTWARE.
*/

import React from 'react';

import { Icon, IconProps } from '../Icon';

/*
Expand Down
2 changes: 0 additions & 2 deletions web/packages/design/src/Icon/Icons/ArrowLineLeft.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -40,8 +40,6 @@ SOFTWARE.
*/

import React from 'react';

import { Icon, IconProps } from '../Icon';

/*
Expand Down
2 changes: 0 additions & 2 deletions web/packages/design/src/Icon/Icons/ArrowRight.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -40,8 +40,6 @@ SOFTWARE.
*/

import React from 'react';

import { Icon, IconProps } from '../Icon';

/*
Expand Down
Loading

0 comments on commit 8c8326d

Please sign in to comment.