Skip to content

Commit

Permalink
chore(*): set allowSyntheticDefaultImports = true
Browse files Browse the repository at this point in the history
  • Loading branch information
YSMJ1994 committed Jan 3, 2024
1 parent 866a385 commit 25f8daf
Show file tree
Hide file tree
Showing 682 changed files with 1,310 additions and 1,320 deletions.
4 changes: 2 additions & 2 deletions components/affix/__docs__/demo/absolute-position/index.tsx
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import * as React from 'react';
import * as ReactDOM from 'react-dom';
import React from 'react';
import ReactDOM from 'react-dom';
import { Affix, Button } from '@alifd/next';

class Demo extends React.Component {
Expand Down
4 changes: 2 additions & 2 deletions components/affix/__docs__/demo/basic/index.tsx
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import * as React from 'react';
import * as ReactDOM from 'react-dom';
import React from 'react';
import ReactDOM from 'react-dom';
import { Affix, Button } from '@alifd/next';

ReactDOM.render(
Expand Down
4 changes: 2 additions & 2 deletions components/affix/__docs__/demo/custom-container/index.tsx
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import * as React from 'react';
import * as ReactDOM from 'react-dom';
import React from 'react';
import ReactDOM from 'react-dom';
import { Affix, Button } from '@alifd/next';

class Demo extends React.Component {
Expand Down
4 changes: 2 additions & 2 deletions components/affix/__docs__/demo/custom-offset/index.tsx
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import * as React from 'react';
import * as ReactDOM from 'react-dom';
import React from 'react';
import ReactDOM from 'react-dom';
import { Affix, Button } from '@alifd/next';

ReactDOM.render(
Expand Down
4 changes: 2 additions & 2 deletions components/affix/__docs__/demo/on-affix/index.tsx
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import * as React from 'react';
import * as ReactDOM from 'react-dom';
import React from 'react';
import ReactDOM from 'react-dom';
import { Affix, Button } from '@alifd/next';

class Demo extends React.Component<unknown, { affixed: boolean }> {
Expand Down
2 changes: 1 addition & 1 deletion components/affix/__tests__/index-spec.tsx
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import * as React from 'react';
import React from 'react';
import Button from '../../button';
import Affix from '../index';

Expand Down
7 changes: 3 additions & 4 deletions components/affix/index.tsx
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
import * as React from 'react';
import { Component } from 'react';
import * as PropTypes from 'prop-types';
import * as classnames from 'classnames';
import React, { Component } from 'react';
import PropTypes from 'prop-types';
import classnames from 'classnames';
import ResizeObserver from 'resize-observer-polyfill';
import { polyfill } from 'react-lifecycles-compat';

Expand Down
2 changes: 1 addition & 1 deletion components/affix/types.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import * as React from 'react';
import React from 'react';
import { CommonProps } from '../util';

export interface AffixMode {
Expand Down
4 changes: 2 additions & 2 deletions components/animate/__docs__/demo/basic/index.tsx
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import * as React from 'react';
import * as ReactDOM from 'react-dom';
import React from 'react';
import ReactDOM from 'react-dom';
import { Animate } from '@alifd/next';

class Demo extends React.Component {
Expand Down
4 changes: 2 additions & 2 deletions components/animate/__docs__/demo/expand/index.tsx
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import * as React from 'react';
import * as ReactDOM from 'react-dom';
import React from 'react';
import ReactDOM from 'react-dom';
import { Animate } from '@alifd/next';

class Demo extends React.Component {
Expand Down
4 changes: 2 additions & 2 deletions components/animate/__docs__/demo/multiple/index.tsx
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import * as React from 'react';
import * as ReactDOM from 'react-dom';
import React from 'react';
import ReactDOM from 'react-dom';
import { Animate } from '@alifd/next';

class TodoList extends React.Component {
Expand Down
2 changes: 1 addition & 1 deletion components/animate/index.d.ts
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
/// <reference types="react" />

import * as React from 'react';
import React from 'react';
import { CommonProps } from '../util';
import { TransitionProps } from 'react-transition-group/Transition';
import { TransitionGroupProps } from 'react-transition-group/TransitionGroup';
Expand Down
2 changes: 1 addition & 1 deletion components/avatar/__docs__/adaptor/index.tsx
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import * as React from 'react';
import React from 'react';
import { Avatar } from '@alifd/next';
import { Types } from '@alifd/adaptor-helper';

Expand Down
4 changes: 2 additions & 2 deletions components/avatar/__docs__/demo/basic/index.tsx
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import * as React from 'react';
import * as ReactDOM from 'react-dom';
import React from 'react';
import ReactDOM from 'react-dom';
import { Avatar } from '@alifd/next';

ReactDOM.render(
Expand Down
4 changes: 2 additions & 2 deletions components/avatar/__docs__/demo/type/index.tsx
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import * as React from 'react';
import * as ReactDOM from 'react-dom';
import React from 'react';
import ReactDOM from 'react-dom';
import { Avatar, Icon } from '@alifd/next';

ReactDOM.render(
Expand Down
4 changes: 2 additions & 2 deletions components/avatar/__docs__/demo/with-badge/index.tsx
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import * as React from 'react';
import * as ReactDOM from 'react-dom';
import React from 'react';
import ReactDOM from 'react-dom';
import { Avatar, Badge } from '@alifd/next';

ReactDOM.render(
Expand Down
4 changes: 2 additions & 2 deletions components/avatar/__docs__/theme/index.tsx
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import * as React from 'react';
import * as ReactDOM from 'react-dom';
import React from 'react';
import ReactDOM from 'react-dom';
import '../../../demo-helper/style';
import {
Demo,
Expand Down
2 changes: 1 addition & 1 deletion components/avatar/__tests__/a11y-spec.tsx
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import * as React from 'react';
import React from 'react';
import Avatar from '../index';
import '../style';
import { testReact } from '../../util/__tests__/a11y/validate';
Expand Down
2 changes: 1 addition & 1 deletion components/avatar/__tests__/index-spec.tsx
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import * as React from 'react';
import React from 'react';
import Avatar from '../index';
import Icon from '../../icon';
import '../style';
Expand Down
7 changes: 3 additions & 4 deletions components/avatar/index.tsx
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
import { Component } from 'react';
import * as React from 'react';
import * as PropTypes from 'prop-types';
import * as classNames from 'classnames';
import React, { Component } from 'react';
import PropTypes from 'prop-types';
import classNames from 'classnames';
import ConfigProvider from '../config-provider';
import Icon from '../icon';
import { obj } from '../util';
Expand Down
2 changes: 1 addition & 1 deletion components/avatar/types.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import * as React from 'react';
import React from 'react';
import { CommonProps } from '../util';

/**
Expand Down
2 changes: 1 addition & 1 deletion components/badge/__docs__/adaptor/index.tsx
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import * as React from 'react';
import React from 'react';
import { Badge } from '@alifd/next';
import { Types } from '@alifd/adaptor-helper';

Expand Down
4 changes: 2 additions & 2 deletions components/badge/__docs__/demo/accessibility/index.tsx
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import * as React from 'react';
import * as ReactDOM from 'react-dom';
import React from 'react';
import ReactDOM from 'react-dom';
import { Badge } from '@alifd/next';

ReactDOM.render(
Expand Down
4 changes: 2 additions & 2 deletions components/badge/__docs__/demo/basic/index.tsx
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import * as React from 'react';
import * as ReactDOM from 'react-dom';
import React from 'react';
import ReactDOM from 'react-dom';
import { Badge } from '@alifd/next';

ReactDOM.render(
Expand Down
4 changes: 2 additions & 2 deletions components/badge/__docs__/demo/clickable/index.tsx
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import * as React from 'react';
import * as ReactDOM from 'react-dom';
import React from 'react';
import ReactDOM from 'react-dom';
import { Badge } from '@alifd/next';

ReactDOM.render(
Expand Down
4 changes: 2 additions & 2 deletions components/badge/__docs__/demo/content/index.tsx
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import * as React from 'react';
import * as ReactDOM from 'react-dom';
import React from 'react';
import ReactDOM from 'react-dom';
import { Badge, Icon } from '@alifd/next';

ReactDOM.render(
Expand Down
4 changes: 2 additions & 2 deletions components/badge/__docs__/demo/dot/index.tsx
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import * as React from 'react';
import * as ReactDOM from 'react-dom';
import React from 'react';
import ReactDOM from 'react-dom';
import { Badge, Icon } from '@alifd/next';

ReactDOM.render(
Expand Down
4 changes: 2 additions & 2 deletions components/badge/__docs__/demo/dynamic-content/index.tsx
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import * as React from 'react';
import * as ReactDOM from 'react-dom';
import React from 'react';
import ReactDOM from 'react-dom';
import { Badge, Button, Icon } from '@alifd/next';

const ButtonGroup = Button.Group;
Expand Down
4 changes: 2 additions & 2 deletions components/badge/__docs__/demo/no-wrapper/index.tsx
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import * as React from 'react';
import * as ReactDOM from 'react-dom';
import React from 'react';
import ReactDOM from 'react-dom';
import { Badge } from '@alifd/next';

ReactDOM.render(
Expand Down
4 changes: 2 additions & 2 deletions components/badge/__docs__/demo/overflowCount/index.tsx
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import * as React from 'react';
import * as ReactDOM from 'react-dom';
import React from 'react';
import ReactDOM from 'react-dom';
import { Badge } from '@alifd/next';

ReactDOM.render(
Expand Down
4 changes: 2 additions & 2 deletions components/badge/__docs__/theme/index.tsx
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import * as React from 'react';
import * as ReactDOM from 'react-dom';
import React from 'react';
import ReactDOM from 'react-dom';
import '../../../demo-helper/style';
import { Demo, DemoGroup, initDemo } from '../../../demo-helper';
import ConfigProvider from '../../../config-provider';
Expand Down
2 changes: 1 addition & 1 deletion components/badge/__tests__/a11y-spec.tsx
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import * as React from 'react';
import React from 'react';
import Badge from '../../badge/index';
import '../../badge/style';
import { testReact } from '../../util/__tests__/a11y/validate';
Expand Down
3 changes: 1 addition & 2 deletions components/badge/__tests__/index-spec.tsx
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
import * as React from 'react';
import { ChangeEventHandler } from 'react';
import React, { ChangeEventHandler } from 'react';
import { support } from '../../util';
import Badge from '../index';
import '../style';
Expand Down
7 changes: 3 additions & 4 deletions components/badge/index.tsx
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
import { Component } from 'react';
import * as React from 'react';
import * as PropTypes from 'prop-types';
import * as classNames from 'classnames';
import React, { Component } from 'react';
import PropTypes from 'prop-types';
import classNames from 'classnames';
import ConfigProvider from '../config-provider';
import { obj } from '../util';
import Sup from './sup';
Expand Down
11 changes: 5 additions & 6 deletions components/badge/sup.tsx
Original file line number Diff line number Diff line change
@@ -1,8 +1,7 @@
import { Component } from 'react';
import * as React from 'react';
import * as PropTypes from 'prop-types';
import React, { Component } from 'react';
import PropTypes from 'prop-types';
import { polyfill } from 'react-lifecycles-compat';
import * as classNames from 'classnames';
import classNames from 'classnames';
import Animate from '../animate';
import { support, dom } from '../util';
import type { BadgeSubProps, BadgeSubState } from './types';
Expand Down Expand Up @@ -41,7 +40,7 @@ class Sup extends Component<BadgeSubProps, BadgeSubState> {

// 单排可滚动的数字列表
static renderDigit(prefix: string, digit: number, key: string | number) {
const children = [];
const children: Array<React.ReactElement> = [];
for (let i = 0; i < 30; i++) {
children.push(<span key={i}>{i % 10}</span>);
}
Expand Down Expand Up @@ -185,7 +184,7 @@ class Sup extends Component<BadgeSubProps, BadgeSubState> {
[`${prefix}badge-custom`]: !!content,
});

let children = null;
let children: React.ReactNode = null;
const show = dot || (count as number) > 0 || (count === 0 && showZero) || content;

if ((count as number) > 0 || (count === 0 && showZero)) {
Expand Down
2 changes: 1 addition & 1 deletion components/badge/types.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import * as React from 'react';
import React from 'react';
import { CommonProps } from '../util';

/**
Expand Down
4 changes: 2 additions & 2 deletions components/balloon/__docs__/demo/accessibility/index.tsx
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import * as React from 'react';
import * as ReactDOM from 'react-dom';
import React from 'react';
import ReactDOM from 'react-dom';

import { Button, Balloon, Input } from '@alifd/next';
import moment from 'moment';
Expand Down
4 changes: 2 additions & 2 deletions components/balloon/__docs__/demo/alignment/index.tsx
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import * as React from 'react';
import * as ReactDOM from 'react-dom';
import React from 'react';
import ReactDOM from 'react-dom';
import { Button, Balloon } from '@alifd/next';

const top = (
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import * as React from 'react';
import * as ReactDOM from 'react-dom';
import React from 'react';
import ReactDOM from 'react-dom';
import { Button, Balloon } from '@alifd/next';

const Tooltip = Balloon.Tooltip;
Expand Down
4 changes: 2 additions & 2 deletions components/balloon/__docs__/demo/basic/index.tsx
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import * as React from 'react';
import * as ReactDOM from 'react-dom';
import React from 'react';
import ReactDOM from 'react-dom';
import { Button, Balloon } from '@alifd/next';

const Demo = () => (
Expand Down
4 changes: 2 additions & 2 deletions components/balloon/__docs__/demo/control/index.tsx
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import * as React from 'react';
import * as ReactDOM from 'react-dom';
import React from 'react';
import ReactDOM from 'react-dom';
import { Button, Balloon } from '@alifd/next';

class App extends React.Component {
Expand Down
4 changes: 2 additions & 2 deletions components/balloon/__docs__/demo/nested/index.tsx
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import * as React from 'react';
import * as ReactDOM from 'react-dom';
import React from 'react';
import ReactDOM from 'react-dom';
import { Button, Balloon, DatePicker, Select } from '@alifd/next';
import moment from 'moment';

Expand Down
4 changes: 2 additions & 2 deletions components/balloon/__docs__/demo/onCloseClick/index.tsx
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import * as React from 'react';
import * as ReactDOM from 'react-dom';
import React from 'react';
import ReactDOM from 'react-dom';
import { Button, Balloon } from '@alifd/next';

class App extends React.Component {
Expand Down
4 changes: 2 additions & 2 deletions components/balloon/__docs__/demo/tooltip-dir/index.tsx
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import * as React from 'react';
import * as ReactDOM from 'react-dom';
import React from 'react';
import ReactDOM from 'react-dom';
import { Button, Balloon } from '@alifd/next';

const Tooltip = Balloon.Tooltip;
Expand Down
4 changes: 2 additions & 2 deletions components/balloon/__docs__/demo/tooltip/index.tsx
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import * as React from 'react';
import * as ReactDOM from 'react-dom';
import React from 'react';
import ReactDOM from 'react-dom';
import { Button, Balloon, Table } from '@alifd/next';

const Tooltip = Balloon.Tooltip;
Expand Down
4 changes: 2 additions & 2 deletions components/balloon/__docs__/demo/triggerType/index.tsx
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import * as React from 'react';
import * as ReactDOM from 'react-dom';
import React from 'react';
import ReactDOM from 'react-dom';
import { Button, Balloon, Input } from '@alifd/next';

const content = <div>content content content content content</div>;
Expand Down
2 changes: 1 addition & 1 deletion components/balloon/index.d.ts
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
/// <reference types="react" />

import * as React from 'react';
import React from 'react';
import { CommonProps } from '../util';
import { PopupProps } from '../overlay';

Expand Down
4 changes: 2 additions & 2 deletions components/box/__docs__/demo/align&justify/index.tsx
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import * as React from 'react';
import * as ReactDOM from 'react-dom';
import React from 'react';
import ReactDOM from 'react-dom';
import { Box } from '@alifd/next';

class BoxDemo extends React.Component {
Expand Down
Loading

0 comments on commit 25f8daf

Please sign in to comment.