chore: unified import method (#42149)

* chore: unified import method

* fix lint
This commit is contained in:
lijianan 2023-05-05 20:52:44 +08:00 committed by GitHub
parent 1401541813
commit ea8ed28209
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
264 changed files with 330 additions and 348 deletions

View File

@ -1,5 +1,5 @@
import { useLocation as useDumiLocation } from 'dumi';
import * as React from 'react';
import React from 'react';
import useLocale from './useLocale';
function clearPath(path: string) {

View File

@ -1,7 +1,7 @@
import { css } from '@emotion/react';
import { Button, Space, Typography } from 'antd';
import { Link, useLocation } from 'dumi';
import * as React from 'react';
import React from 'react';
import useLocale from '../../../hooks/useLocale';
import useSiteToken from '../../../hooks/useSiteToken';
import SiteContext from '../../../theme/slots/SiteContext';

View File

@ -1,10 +1,10 @@
import * as React from 'react';
import { Typography, Skeleton, Carousel } from 'antd';
import type { SerializedStyles } from '@emotion/react';
import { css } from '@emotion/react';
import type { Extra, Icon } from './util';
import { Carousel, Skeleton, Typography } from 'antd';
import React from 'react';
import useSiteToken from '../../../hooks/useSiteToken';
import SiteContext from '../../../theme/slots/SiteContext';
import type { Extra, Icon } from './util';
import { useCarouselStyle } from './util';
const useStyle = () => {

View File

@ -1,6 +1,5 @@
import * as React from 'react';
import { useContext } from 'react';
import { Typography } from 'antd';
import React, { useContext } from 'react';
import useSiteToken from '../../../hooks/useSiteToken';
import SiteContext from '../../../theme/slots/SiteContext';

View File

@ -1,8 +1,8 @@
import * as React from 'react';
import { Row, Col, Typography } from 'antd';
import { css } from '@emotion/react';
import type { Recommendation } from './util';
import { Col, Row, Typography } from 'antd';
import React from 'react';
import useSiteToken from '../../../hooks/useSiteToken';
import type { Recommendation } from './util';
const useStyle = () => {
const { token } = useSiteToken();
@ -77,7 +77,7 @@ export interface RecommendsProps {
recommendations?: Recommendation[];
}
export default function Recommends({ recommendations = [] }: RecommendsProps) {
const Recommends: React.FC<RecommendsProps> = ({ recommendations = [] }) => {
const { token } = useSiteToken();
const style = useStyle();
@ -101,4 +101,6 @@ export default function Recommends({ recommendations = [] }: RecommendsProps) {
})}
</Row>
);
}
};
export default Recommends;

View File

@ -1,4 +1,4 @@
import * as React from 'react';
import React from 'react';
export interface SiteContextProps {
isMobile: boolean;

View File

@ -1,9 +1,8 @@
import * as React from 'react';
import { useState } from 'react';
import { css } from '@emotion/react';
import { Typography, Carousel } from 'antd';
import { useCarouselStyle } from '../util';
import { Carousel, Typography } from 'antd';
import React, { useState } from 'react';
import useSiteToken from '../../../../hooks/useSiteToken';
import { useCarouselStyle } from '../util';
const useStyle = () => {
const { carousel } = useCarouselStyle();

View File

@ -1,6 +1,6 @@
import { css } from '@emotion/react';
import { Space } from 'antd';
import * as React from 'react';
import React from 'react';
import useSiteToken from '../../../../hooks/useSiteToken';
import useLocale from '../../../../hooks/useLocale';

View File

@ -1,12 +1,11 @@
import * as React from 'react';
import { css } from '@emotion/react';
import { TinyColor } from '@ctrl/tinycolor';
import {
BellOutlined,
FolderOutlined,
HomeOutlined,
QuestionCircleOutlined,
} from '@ant-design/icons';
import { TinyColor } from '@ctrl/tinycolor';
import { css } from '@emotion/react';
import type { MenuProps } from 'antd';
import {
Breadcrumb,
@ -18,21 +17,22 @@ import {
Menu,
Radio,
Space,
theme,
Typography,
theme,
} from 'antd';
import React from 'react';
import useLocale from '../../../../hooks/useLocale';
import useSiteToken from '../../../../hooks/useSiteToken';
import SiteContext from '../../../../theme/slots/SiteContext';
import Group from '../Group';
import { useCarouselStyle } from '../util';
import BackgroundImage from './BackgroundImage';
import ColorPicker from './ColorPicker';
import MobileCarousel from './MobileCarousel';
import RadiusPicker from './RadiusPicker';
import type { THEME } from './ThemePicker';
import ThemePicker from './ThemePicker';
import ColorPicker from './ColorPicker';
import RadiusPicker from './RadiusPicker';
import Group from '../Group';
import BackgroundImage from './BackgroundImage';
import { DEFAULT_COLOR, getAvatarURL, getClosetColor, PINK_COLOR } from './colorUtil';
import SiteContext from '../../../../theme/slots/SiteContext';
import { useCarouselStyle } from '../util';
import MobileCarousel from './MobileCarousel';
import { DEFAULT_COLOR, PINK_COLOR, getAvatarURL, getClosetColor } from './colorUtil';
const { Header, Content, Sider } = Layout;

View File

@ -1,4 +1,4 @@
import * as React from 'react';
import React from 'react';
import { css } from '@emotion/react';
export interface Author {

View File

@ -1,4 +1,4 @@
import * as React from 'react';
import React from 'react';
import { TinyColor, type ColorInput } from '@ctrl/tinycolor';
import { css } from '@emotion/react';
import useSiteToken from '../../../hooks/useSiteToken';

View File

@ -1,4 +1,4 @@
import * as React from 'react';
import React from 'react';
import { message } from 'antd';
import { useIntl } from 'dumi';
import CopyableIcon from './CopyableIcon';

View File

@ -1,4 +1,4 @@
import * as React from 'react';
import React from 'react';
import CopyToClipboard from 'react-copy-to-clipboard';
import { Badge, message } from 'antd';
import classNames from 'classnames';

View File

@ -1,4 +1,4 @@
import * as React from 'react';
import React from 'react';
import type { CustomIconComponentProps } from '@ant-design/icons/es/components/Icon';
type CustomIconComponent = React.ComponentType<

View File

@ -1,5 +1,5 @@
/* eslint-disable react/no-array-index-key */
import * as React from 'react';
import React from 'react';
import dayjs from 'dayjs';
import { FormattedMessage, useIntl } from 'dumi';
import { Tabs, Skeleton, Avatar, Divider, Empty } from 'antd';

View File

@ -1,5 +1,5 @@
import type { FC } from 'react';
import * as React from 'react';
import React from 'react';
/* eslint import/no-unresolved: 0 */
import { css } from '@emotion/react';
import type { TableProps } from 'antd';

View File

@ -1,5 +1,5 @@
import * as React from 'react';
import { Helmet } from 'dumi';
import React from 'react';
type HelmetProps = Helmet['props'];
export interface WrapHelmetProps extends HelmetProps {

View File

@ -1,7 +1,7 @@
import { css } from '@emotion/react';
import { Tabs } from 'antd';
import throttle from 'lodash/throttle';
import * as React from 'react';
import React from 'react';
import scrollTo from '../../../../components/_util/scrollTo';
import useSiteToken from '../../../hooks/useSiteToken';

View File

@ -1,5 +1,5 @@
import { removeCSS, updateCSS } from 'rc-util/lib/Dom/dynamicCSS';
import * as React from 'react';
import React from 'react';
import useLocale from '../../../hooks/useLocale';
const whereCls = 'ant-where-checker';

View File

@ -1,6 +1,6 @@
import { css } from '@emotion/react';
import { Link, useLocation } from 'dumi';
import * as React from 'react';
import React from 'react';
import useSiteToken from '../../../hooks/useSiteToken';
import * as utils from '../../utils';

View File

@ -1,4 +1,4 @@
import * as React from 'react';
import React from 'react';
import { FormattedMessage, Link, useFullSidebarData, useLocation } from 'dumi';
import type { MenuProps } from 'antd';
import { Menu } from 'antd';

View File

@ -1,4 +1,4 @@
import * as React from 'react';
import React from 'react';
import type { DirectionType } from 'antd/es/config-provider';
import type { ThemeName } from '../common/ThemeSwitch';

View File

@ -1,5 +1,5 @@
import { globSync } from 'glob';
import * as React from 'react';
import React from 'react';
import { renderToString } from 'react-dom/server';
import type { Options } from '../../tests/shared/demoTest';

View File

@ -1,4 +1,4 @@
import * as React from 'react';
import React from 'react';
import { render } from '../../tests/utils';
describe('SetUp.Test', () => {

View File

@ -1,5 +1,5 @@
import useState from 'rc-util/lib/hooks/useState';
import * as React from 'react';
import React from 'react';
import Button from '../button';
import type { ButtonProps, LegacyButtonType } from '../button/button';
import { convertLegacyProps } from '../button/button';

View File

@ -1,5 +1,5 @@
import useMergedState from 'rc-util/lib/hooks/useMergedState';
import * as React from 'react';
import React from 'react';
import ConfigProvider, { ConfigContext } from '../config-provider';
export interface BaseProps {

View File

@ -1,4 +1,4 @@
import * as React from 'react';
import React from 'react';
import { detectFlexGapSupported } from '../styleChecker';
export default () => {

View File

@ -1,4 +1,4 @@
import * as React from 'react';
import React from 'react';
export default function useForceUpdate() {
const [, forceUpdate] = React.useReducer((x) => x + 1, 0);

View File

@ -1,4 +1,4 @@
import * as React from 'react';
import React from 'react';
export default function usePatchElement(): [
React.ReactElement[],

View File

@ -1,4 +1,4 @@
import * as React from 'react';
import React from 'react';
import useForceUpdate from './useForceUpdate';
type UseSyncStateProps<T> = readonly [() => T, (newValue: T) => void];

View File

@ -1,4 +1,4 @@
import * as React from 'react';
import React from 'react';
export const { isValidElement } = React;

View File

@ -4,7 +4,7 @@
* This helps accessibility reader to tread as a interactive button to operation.
*/
import KeyCode from 'rc-util/lib/KeyCode';
import * as React from 'react';
import React from 'react';
interface TransButtonProps extends React.HTMLAttributes<HTMLDivElement> {
onClick?: (e?: React.MouseEvent<HTMLDivElement>) => void;

View File

@ -2,7 +2,7 @@ import classNames from 'classnames';
import CSSMotion from 'rc-motion';
import { render, unmount } from 'rc-util/lib/React/render';
import raf from 'rc-util/lib/raf';
import * as React from 'react';
import React from 'react';
import { getTargetWaveColor } from './util';
function validateNum(value: number) {

View File

@ -1,5 +1,5 @@
import { spyElementPrototype } from 'rc-util/lib/test/domHook';
import * as React from 'react';
import React from 'react';
import demoTest, { rootPropsTest } from '../../../tests/shared/demoTest';
demoTest('affix', {

View File

@ -1,4 +1,4 @@
import * as React from 'react';
import React from 'react';
import Alert from '.';
interface ErrorBoundaryProps {

View File

@ -6,7 +6,7 @@ import InfoCircleFilled from '@ant-design/icons/InfoCircleFilled';
import classNames from 'classnames';
import CSSMotion from 'rc-motion';
import type { ReactElement } from 'react';
import * as React from 'react';
import React from 'react';
import { ConfigContext } from '../config-provider';
import getDataOrAriaProps from '../_util/getDataOrAriaProps';
import { replaceElement } from '../_util/reactNode';

View File

@ -1,6 +1,6 @@
import classNames from 'classnames';
import useEvent from 'rc-util/lib/hooks/useEvent';
import * as React from 'react';
import React from 'react';
import scrollIntoView from 'scroll-into-view-if-needed';
import Affix from '../affix';

View File

@ -1,5 +1,5 @@
import classNames from 'classnames';
import * as React from 'react';
import React from 'react';
import { ConfigContext } from '../config-provider';
import warning from '../_util/warning';
import type { AntAnchor } from './Anchor';

View File

@ -1,4 +1,4 @@
import * as React from 'react';
import React from 'react';
import demoTest, { rootPropsTest } from '../../../tests/shared/demoTest';
demoTest('anchor', {

View File

@ -1,4 +1,4 @@
import * as React from 'react';
import React from 'react';
import type { AntAnchor } from './Anchor';
const AnchorContext = React.createContext<AntAnchor | undefined>(undefined);

View File

@ -10,7 +10,7 @@ import classNames from 'classnames';
import type { BaseSelectRef } from 'rc-select';
import toArray from 'rc-util/lib/Children/toArray';
import omit from 'rc-util/lib/omit';
import * as React from 'react';
import React from 'react';
import type { ConfigConsumerProps } from '../config-provider';
import { ConfigContext } from '../config-provider';
import type {

View File

@ -1,4 +1,4 @@
import * as React from 'react';
import React from 'react';
import type { ScreenSizeMap } from '../_util/responsiveObserver';
export type AvatarSize = 'large' | 'small' | 'default' | number | ScreenSizeMap;

View File

@ -1,4 +1,4 @@
import * as React from 'react';
import React from 'react';
import demoTest, { rootPropsTest } from '../../../tests/shared/demoTest';
demoTest('avatar');

View File

@ -1,7 +1,7 @@
import classNames from 'classnames';
import ResizeObserver from 'rc-resize-observer';
import { composeRef } from 'rc-util/lib/ref';
import * as React from 'react';
import React from 'react';
import { ConfigContext } from '../config-provider';
import useBreakpoint from '../grid/hooks/useBreakpoint';
import type { Breakpoint } from '../_util/responsiveObserver';

View File

@ -1,6 +1,6 @@
import classNames from 'classnames';
import toArray from 'rc-util/lib/Children/toArray';
import * as React from 'react';
import React from 'react';
import { ConfigContext } from '../config-provider';
import Popover from '../popover';
import { cloneElement } from '../_util/reactNode';

View File

@ -2,14 +2,14 @@ import VerticalAlignTopOutlined from '@ant-design/icons/VerticalAlignTopOutlined
import classNames from 'classnames';
import CSSMotion from 'rc-motion';
import omit from 'rc-util/lib/omit';
import * as React from 'react';
import type { ConfigConsumerProps } from '../config-provider';
import { ConfigContext } from '../config-provider';
import React from 'react';
import getScroll from '../_util/getScroll';
import { cloneElement } from '../_util/reactNode';
import scrollTo from '../_util/scrollTo';
import throttleByAnimationFrame from '../_util/throttleByAnimationFrame';
import warning from '../_util/warning';
import type { ConfigConsumerProps } from '../config-provider';
import { ConfigContext } from '../config-provider';
import useStyle from './style';
export interface BackTopProps {

View File

@ -1,10 +1,10 @@
import classNames from 'classnames';
import * as React from 'react';
import { ConfigContext } from '../config-provider';
import React from 'react';
import type { PresetColorType } from '../_util/colors';
import type { LiteralUnion } from '../_util/type';
import useStyle from './style';
import { isPresetColor } from '../_util/colors';
import type { LiteralUnion } from '../_util/type';
import { ConfigContext } from '../config-provider';
import useStyle from './style';
type RibbonPlacement = 'start' | 'end';

View File

@ -1,7 +1,7 @@
import classNames from 'classnames';
import * as React from 'react';
import { ConfigContext } from '../config-provider';
import React from 'react';
import { cloneElement } from '../_util/reactNode';
import { ConfigContext } from '../config-provider';
import SingleNumber from './SingleNumber';
export interface ScrollNumberProps {

View File

@ -1,5 +1,5 @@
import classNames from 'classnames';
import * as React from 'react';
import React from 'react';
export interface UnitNumberProps {
prefixCls: string;

View File

@ -1,13 +1,12 @@
import classNames from 'classnames';
import CSSMotion from 'rc-motion';
import * as React from 'react';
import { useMemo, useRef } from 'react';
import { ConfigContext } from '../config-provider';
import type { PresetColorKey } from '../theme/internal';
import React, { useMemo, useRef } from 'react';
import type { PresetStatusColorType } from '../_util/colors';
import { isPresetColor } from '../_util/colors';
import { cloneElement } from '../_util/reactNode';
import type { LiteralUnion } from '../_util/type';
import { ConfigContext } from '../config-provider';
import type { PresetColorKey } from '../theme/internal';
import Ribbon from './Ribbon';
import ScrollNumber from './ScrollNumber';
import useStyle from './style';

View File

@ -1,7 +1,7 @@
import classNames from 'classnames';
import toArray from 'rc-util/lib/Children/toArray';
import pickAttrs from 'rc-util/lib/pickAttrs';
import * as React from 'react';
import React from 'react';
import { cloneElement } from '../_util/reactNode';
import warning from '../_util/warning';
import { ConfigContext } from '../config-provider';

View File

@ -1,5 +1,5 @@
import DownOutlined from '@ant-design/icons/DownOutlined';
import * as React from 'react';
import React from 'react';
import warning from '../_util/warning';
import { ConfigContext } from '../config-provider';
import type { DropdownProps } from '../dropdown/dropdown';

View File

@ -1,4 +1,4 @@
import * as React from 'react';
import React from 'react';
import { ConfigContext } from '../config-provider';
type CompoundedComponent = React.FC<{ children?: React.ReactNode }> & {

View File

@ -1,6 +1,6 @@
import classNames from 'classnames';
import pickAttrs from 'rc-util/lib/pickAttrs';
import * as React from 'react';
import React from 'react';
import type { BreadcrumbProps, InternalRouteType, ItemType } from './Breadcrumb';
type AddParameters<TFunction extends (...args: any) => any, TParameters extends [...args: any]> = (

View File

@ -1,5 +1,5 @@
import classNames from 'classnames';
import * as React from 'react';
import React from 'react';
import { ConfigContext } from '../config-provider';
import type { SizeType } from '../config-provider/SizeContext';
import { useToken } from '../theme/internal';

View File

@ -1,7 +1,6 @@
import type { GenerateConfig } from 'rc-picker/lib/generate';
import type { Locale } from 'rc-picker/lib/interface';
import * as React from 'react';
import { useContext, useMemo } from 'react';
import React, { useContext, useMemo } from 'react';
import { FormItemInputContext } from '../form/context';
import { Button, Group } from '../radio';
import Select from '../select';

View File

@ -8,7 +8,7 @@ import type {
PickerPanelTimeProps as RCPickerPanelTimeProps,
} from 'rc-picker/lib/PickerPanel';
import useMergedState from 'rc-util/lib/hooks/useMergedState';
import * as React from 'react';
import React from 'react';
import { ConfigContext } from '../config-provider';
import { useLocale } from '../locale';
import CalendarHeader from './Header';

View File

@ -1,6 +1,6 @@
import classNames from 'classnames';
import omit from 'rc-util/lib/omit';
import * as React from 'react';
import React from 'react';
import { ConfigContext } from '../config-provider';
import SizeContext from '../config-provider/SizeContext';
import Skeleton from '../skeleton';

View File

@ -1,5 +1,5 @@
import classNames from 'classnames';
import * as React from 'react';
import React from 'react';
import { ConfigContext } from '../config-provider';
import type { ConfigConsumerProps } from '../config-provider';

View File

@ -1,5 +1,5 @@
import classNames from 'classnames';
import * as React from 'react';
import React from 'react';
import type { ConfigConsumerProps } from '../config-provider';
import { ConfigContext } from '../config-provider';

View File

@ -1,4 +1,4 @@
import * as React from 'react';
import React from 'react';
import Card from '../index';
describe('Card.typescript', () => {

View File

@ -1,7 +1,7 @@
import type { Settings } from '@ant-design/react-slick';
import SlickCarousel from '@ant-design/react-slick';
import classNames from 'classnames';
import * as React from 'react';
import React from 'react';
import { ConfigContext } from '../config-provider';
import useStyle from './style';

View File

@ -1,4 +1,4 @@
import * as React from 'react';
import React from 'react';
import demoTest, { rootPropsTest } from '../../../tests/shared/demoTest';
demoTest('cascader', {

View File

@ -1,4 +1,4 @@
import * as React from 'react';
import React from 'react';
import type { BaseOptionType } from '..';
import Cascader from '..';
import { render } from '../../../tests/utils';

View File

@ -13,7 +13,7 @@ import type {
import RcCascader from 'rc-cascader';
import type { Placement } from 'rc-select/lib/BaseSelect';
import omit from 'rc-util/lib/omit';
import * as React from 'react';
import React from 'react';
import { ConfigContext } from '../config-provider';
import DisabledContext from '../config-provider/DisabledContext';
import type { SizeType } from '../config-provider/SizeContext';

View File

@ -1,7 +1,7 @@
import classNames from 'classnames';
import type { CheckboxRef } from 'rc-checkbox';
import RcCheckbox from 'rc-checkbox';
import * as React from 'react';
import React from 'react';
import { ConfigContext } from '../config-provider';
import { FormItemInputContext } from '../form/context';
import warning from '../_util/warning';

View File

@ -1,6 +1,6 @@
import classNames from 'classnames';
import omit from 'rc-util/lib/omit';
import * as React from 'react';
import React from 'react';
import { ConfigContext } from '../config-provider';
import type { CheckboxChangeEvent } from './Checkbox';
import Checkbox from './Checkbox';

View File

@ -1,4 +1,4 @@
import * as React from 'react';
import React from 'react';
import demoTest, { rootPropsTest } from '../../../tests/shared/demoTest';
demoTest('checkbox');

View File

@ -1,4 +1,4 @@
import * as React from 'react';
import React from 'react';
import Checkbox from '..';
import Input from '../../input';

View File

@ -2,7 +2,7 @@ import RightOutlined from '@ant-design/icons/RightOutlined';
import classNames from 'classnames';
import RcCollapse from 'rc-collapse';
import type { CSSMotionProps } from 'rc-motion';
import * as React from 'react';
import React from 'react';
import toArray from 'rc-util/lib/Children/toArray';
import omit from 'rc-util/lib/omit';

View File

@ -1,6 +1,6 @@
import classNames from 'classnames';
import RcCollapse from 'rc-collapse';
import * as React from 'react';
import React from 'react';
import { ConfigContext } from '../config-provider';
import warning from '../_util/warning';

View File

@ -1,4 +1,4 @@
import * as React from 'react';
import React from 'react';
export type DisabledType = boolean | undefined;

View File

@ -1,4 +1,4 @@
import * as React from 'react';
import React from 'react';
export type SizeType = 'small' | 'middle' | 'large' | undefined;

View File

@ -1,4 +1,4 @@
import * as React from 'react';
import React from 'react';
import { SmileOutlined } from '@ant-design/icons';
import ConfigProvider from '..';
import Button from '../../button';

View File

@ -1,4 +1,4 @@
import * as React from 'react';
import React from 'react';
import type { DerivativeFunc } from '@ant-design/cssinjs';
import type { Options } from 'scroll-into-view-if-needed';
import type { RequiredMark } from '../form/Form';

View File

@ -5,7 +5,7 @@ import type { ValidateMessages } from 'rc-field-form/lib/interface';
import { setValues } from 'rc-field-form/lib/utils/valueUtil';
import useMemo from 'rc-util/lib/hooks/useMemo';
import type { ReactElement } from 'react';
import * as React from 'react';
import React from 'react';
import type { Options } from 'scroll-into-view-if-needed';
import type { RequiredMark } from '../form/Form';
import type { Locale } from '../locale';

View File

@ -1,4 +1,4 @@
import * as React from 'react';
import React from 'react';
import type { ButtonProps } from '../button';
import Button from '../button';

View File

@ -1,5 +1,5 @@
import dayjs from 'dayjs';
import * as React from 'react';
import React from 'react';
import demoTest, { rootPropsTest } from '../../../tests/shared/demoTest';
demoTest('date-picker', { skip: ['locale.tsx'], testRootProps: false });

View File

@ -1,5 +1,5 @@
import type { Dayjs } from 'dayjs';
import * as React from 'react';
import React from 'react';
import DatePicker from '..';
import type { DatePickRef, RangePickerRef } from '../generatePicker/interface';

View File

@ -5,18 +5,17 @@ import SwapRightOutlined from '@ant-design/icons/SwapRightOutlined';
import classNames from 'classnames';
import { RangePicker as RCRangePicker } from 'rc-picker';
import type { GenerateConfig } from 'rc-picker/lib/generate/index';
import * as React from 'react';
import { forwardRef, useContext, useImperativeHandle } from 'react';
import React, { forwardRef, useContext, useImperativeHandle } from 'react';
import type { RangePickerProps } from '.';
import { Components, getTimeProps } from '.';
import { getMergedStatus, getStatusClassNames } from '../../_util/statusUtils';
import warning from '../../_util/warning';
import { ConfigContext } from '../../config-provider';
import DisabledContext from '../../config-provider/DisabledContext';
import SizeContext from '../../config-provider/SizeContext';
import { FormItemInputContext } from '../../form/context';
import { useLocale } from '../../locale';
import { useCompactItemContext } from '../../space/Compact';
import { getMergedStatus, getStatusClassNames } from '../../_util/statusUtils';
import warning from '../../_util/warning';
import enUS from '../locale/en_US';
import { getRangePlaceholder, transPlacement2DropdownAlign } from '../util';
import type { CommonPickerMethods, PickerComponentClass } from './interface';

View File

@ -5,19 +5,18 @@ import classNames from 'classnames';
import RCPicker from 'rc-picker';
import type { GenerateConfig } from 'rc-picker/lib/generate/index';
import type { PickerMode } from 'rc-picker/lib/interface';
import * as React from 'react';
import { forwardRef, useContext, useImperativeHandle } from 'react';
import React, { forwardRef, useContext, useImperativeHandle } from 'react';
import type { PickerProps, PickerTimeProps } from '.';
import { Components, getTimeProps } from '.';
import type { InputStatus } from '../../_util/statusUtils';
import { getMergedStatus, getStatusClassNames } from '../../_util/statusUtils';
import warning from '../../_util/warning';
import { ConfigContext } from '../../config-provider';
import DisabledContext from '../../config-provider/DisabledContext';
import SizeContext from '../../config-provider/SizeContext';
import { FormItemInputContext } from '../../form/context';
import { useLocale } from '../../locale';
import { useCompactItemContext } from '../../space/Compact';
import type { InputStatus } from '../../_util/statusUtils';
import { getMergedStatus, getStatusClassNames } from '../../_util/statusUtils';
import warning from '../../_util/warning';
import enUS from '../locale/en_US';
import { getPlaceholder, transPlacement2DropdownAlign } from '../util';
import type { CommonPickerMethods, DatePickRef, PickerComponentClass } from './interface';

View File

@ -1,5 +1,5 @@
import classNames from 'classnames';
import * as React from 'react';
import React from 'react';
function notEmpty(val: any) {
return val !== undefined && val !== null;

View File

@ -1,4 +1,4 @@
import * as React from 'react';
import React from 'react';
import type { DescriptionsContextProps } from '.';
import { DescriptionsContext } from '.';
import Cell from './Cell';

View File

@ -1,7 +1,7 @@
/* eslint-disable react/no-array-index-key */
import classNames from 'classnames';
import toArray from 'rc-util/lib/Children/toArray';
import * as React from 'react';
import React from 'react';
import { ConfigContext } from '../config-provider';
import { cloneElement } from '../_util/reactNode';
import type { Breakpoint, ScreenMap } from '../_util/responsiveObserver';

View File

@ -1,4 +1,4 @@
import * as React from 'react';
import React from 'react';
import { render } from '../../../tests/utils';
import Divider from '..';
import mountTest from '../../../tests/shared/mountTest';

View File

@ -1,5 +1,5 @@
import classNames from 'classnames';
import * as React from 'react';
import React from 'react';
import { ConfigContext } from '../config-provider';
import warning from '../_util/warning';

View File

@ -1,7 +1,7 @@
import CloseOutlined from '@ant-design/icons/CloseOutlined';
import classNames from 'classnames';
import type { DrawerProps as RCDrawerProps } from 'rc-drawer';
import * as React from 'react';
import React from 'react';
export interface DrawerPanelProps {
prefixCls: string;

View File

@ -1,4 +1,4 @@
import * as React from 'react';
import React from 'react';
import { extendTest } from '../../../tests/shared/demoTest';
jest.mock('rc-drawer', () => {

View File

@ -1,4 +1,4 @@
import * as React from 'react';
import React from 'react';
import Drawer from '..';
describe('Drawer.typescript', () => {

View File

@ -2,7 +2,7 @@ import classNames from 'classnames';
import RcDrawer from 'rc-drawer';
import type { DrawerProps as RcDrawerProps } from 'rc-drawer';
import type { CSSMotionProps } from 'rc-motion';
import * as React from 'react';
import React from 'react';
import { ConfigContext } from '../config-provider';
import { NoFormStyle } from '../form/context';
import { getTransitionName } from '../_util/motion';

View File

@ -1,4 +1,4 @@
import * as React from 'react';
import React from 'react';
import demoTest, { rootPropsTest } from '../../../tests/shared/demoTest';
demoTest('dropdown', {

View File

@ -1,5 +1,5 @@
import classNames from 'classnames';
import * as React from 'react';
import React from 'react';
import EllipsisOutlined from '@ant-design/icons/EllipsisOutlined';
import Button from '../button';
import { ConfigContext } from '../config-provider';

View File

@ -4,7 +4,7 @@ import RcDropdown from 'rc-dropdown';
import useEvent from 'rc-util/lib/hooks/useEvent';
import useMergedState from 'rc-util/lib/hooks/useMergedState';
import omit from 'rc-util/lib/omit';
import * as React from 'react';
import React from 'react';
import genPurePanel from '../_util/PurePanel';
import type { AdjustOverflow } from '../_util/placements';
import getPlacements from '../_util/placements';

View File

@ -1,5 +1,5 @@
import { TinyColor } from '@ctrl/tinycolor';
import * as React from 'react';
import React from 'react';
import { useToken } from '../theme/internal';
const Empty: React.FC = () => {

View File

@ -1,5 +1,5 @@
import classNames from 'classnames';
import * as React from 'react';
import React from 'react';
import { ConfigContext } from '../config-provider';
import { useLocale } from '../locale';
import DefaultEmptyImg from './empty';

View File

@ -1,6 +1,5 @@
import { TinyColor } from '@ctrl/tinycolor';
import * as React from 'react';
import { useMemo } from 'react';
import React, { useMemo } from 'react';
import { useToken } from '../theme/internal';
const Simple: React.FC = () => {

View File

@ -1,5 +1,5 @@
/* eslint-disable react/no-array-index-key */
import * as React from 'react';
import React from 'react';
import classNames from 'classnames';
import FloatButton, { floatButtonPrefixCls } from './FloatButton';
import FloatButtonGroup from './FloatButtonGroup';

View File

@ -1,10 +1,9 @@
import classNames from 'classnames';
import CSSMotion, { CSSMotionList } from 'rc-motion';
import * as React from 'react';
import { useMemo } from 'react';
import React, { useMemo } from 'react';
import initCollapseMotion from '../_util/motion';
import { FormItemPrefixContext } from './context';
import type { ValidateStatus } from './FormItem';
import { FormItemPrefixContext } from './context';
import useDebounce from './hooks/useDebounce';
import useStyle from './style';

View File

@ -2,8 +2,7 @@ import classNames from 'classnames';
import FieldForm, { List, useWatch } from 'rc-field-form';
import type { FormProps as RcFormProps } from 'rc-field-form/lib/Form';
import type { InternalNamePath, ValidateErrorEntity } from 'rc-field-form/lib/interface';
import * as React from 'react';
import { useMemo } from 'react';
import React, { useMemo } from 'react';
import type { Options } from 'scroll-into-view-if-needed';
import { ConfigContext } from '../config-provider';
import DisabledContext, { DisabledContextProvider } from '../config-provider/DisabledContext';

View File

@ -7,7 +7,7 @@ import type { Meta } from 'rc-field-form/lib/interface';
import useLayoutEffect from 'rc-util/lib/hooks/useLayoutEffect';
import isVisible from 'rc-util/lib/Dom/isVisible';
import omit from 'rc-util/lib/omit';
import * as React from 'react';
import React from 'react';
import type { FormItemProps, ValidateStatus } from '.';
import { Row } from '../../grid';
import FormItemInput from '../FormItemInput';

Some files were not shown because too many files have changed in this diff Show More