mirror of
https://github.com/ant-design/ant-design.git
synced 2024-12-04 00:49:39 +08:00
chore: unified import method (#42149)
* chore: unified import method * fix lint
This commit is contained in:
parent
1401541813
commit
ea8ed28209
@ -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) {
|
||||
|
@ -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';
|
||||
|
@ -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 = () => {
|
||||
|
@ -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';
|
||||
|
||||
|
@ -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;
|
||||
|
@ -1,4 +1,4 @@
|
||||
import * as React from 'react';
|
||||
import React from 'react';
|
||||
|
||||
export interface SiteContextProps {
|
||||
isMobile: boolean;
|
||||
|
@ -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();
|
||||
|
@ -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';
|
||||
|
||||
|
@ -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;
|
||||
|
||||
|
@ -1,4 +1,4 @@
|
||||
import * as React from 'react';
|
||||
import React from 'react';
|
||||
import { css } from '@emotion/react';
|
||||
|
||||
export interface Author {
|
||||
|
@ -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';
|
||||
|
@ -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';
|
||||
|
@ -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';
|
||||
|
@ -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<
|
||||
|
@ -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';
|
||||
|
@ -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';
|
||||
|
@ -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 {
|
||||
|
@ -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';
|
||||
|
||||
|
@ -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';
|
||||
|
@ -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';
|
||||
|
||||
|
@ -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';
|
||||
|
@ -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';
|
||||
|
||||
|
@ -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';
|
||||
|
||||
|
@ -1,4 +1,4 @@
|
||||
import * as React from 'react';
|
||||
import React from 'react';
|
||||
import { render } from '../../tests/utils';
|
||||
|
||||
describe('SetUp.Test', () => {
|
||||
|
@ -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';
|
||||
|
@ -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 {
|
||||
|
@ -1,4 +1,4 @@
|
||||
import * as React from 'react';
|
||||
import React from 'react';
|
||||
import { detectFlexGapSupported } from '../styleChecker';
|
||||
|
||||
export default () => {
|
||||
|
@ -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);
|
||||
|
@ -1,4 +1,4 @@
|
||||
import * as React from 'react';
|
||||
import React from 'react';
|
||||
|
||||
export default function usePatchElement(): [
|
||||
React.ReactElement[],
|
||||
|
@ -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];
|
||||
|
@ -1,4 +1,4 @@
|
||||
import * as React from 'react';
|
||||
import React from 'react';
|
||||
|
||||
export const { isValidElement } = React;
|
||||
|
||||
|
@ -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;
|
||||
|
@ -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) {
|
||||
|
@ -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', {
|
||||
|
@ -1,4 +1,4 @@
|
||||
import * as React from 'react';
|
||||
import React from 'react';
|
||||
import Alert from '.';
|
||||
|
||||
interface ErrorBoundaryProps {
|
||||
|
@ -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';
|
||||
|
@ -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';
|
||||
|
@ -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';
|
||||
|
@ -1,4 +1,4 @@
|
||||
import * as React from 'react';
|
||||
import React from 'react';
|
||||
import demoTest, { rootPropsTest } from '../../../tests/shared/demoTest';
|
||||
|
||||
demoTest('anchor', {
|
||||
|
@ -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);
|
||||
|
@ -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 {
|
||||
|
@ -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;
|
||||
|
@ -1,4 +1,4 @@
|
||||
import * as React from 'react';
|
||||
import React from 'react';
|
||||
import demoTest, { rootPropsTest } from '../../../tests/shared/demoTest';
|
||||
|
||||
demoTest('avatar');
|
||||
|
@ -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';
|
||||
|
@ -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';
|
||||
|
@ -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 {
|
||||
|
@ -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';
|
||||
|
||||
|
@ -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 {
|
||||
|
@ -1,5 +1,5 @@
|
||||
import classNames from 'classnames';
|
||||
import * as React from 'react';
|
||||
import React from 'react';
|
||||
|
||||
export interface UnitNumberProps {
|
||||
prefixCls: string;
|
||||
|
@ -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';
|
||||
|
@ -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';
|
||||
|
@ -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';
|
||||
|
@ -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 }> & {
|
||||
|
@ -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]> = (
|
||||
|
@ -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';
|
||||
|
@ -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';
|
||||
|
@ -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';
|
||||
|
@ -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';
|
||||
|
@ -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';
|
||||
|
||||
|
@ -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';
|
||||
|
||||
|
@ -1,4 +1,4 @@
|
||||
import * as React from 'react';
|
||||
import React from 'react';
|
||||
import Card from '../index';
|
||||
|
||||
describe('Card.typescript', () => {
|
||||
|
@ -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';
|
||||
|
||||
|
@ -1,4 +1,4 @@
|
||||
import * as React from 'react';
|
||||
import React from 'react';
|
||||
import demoTest, { rootPropsTest } from '../../../tests/shared/demoTest';
|
||||
|
||||
demoTest('cascader', {
|
||||
|
@ -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';
|
||||
|
@ -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';
|
||||
|
@ -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';
|
||||
|
@ -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';
|
||||
|
@ -1,4 +1,4 @@
|
||||
import * as React from 'react';
|
||||
import React from 'react';
|
||||
import demoTest, { rootPropsTest } from '../../../tests/shared/demoTest';
|
||||
|
||||
demoTest('checkbox');
|
||||
|
@ -1,4 +1,4 @@
|
||||
import * as React from 'react';
|
||||
import React from 'react';
|
||||
import Checkbox from '..';
|
||||
import Input from '../../input';
|
||||
|
||||
|
@ -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';
|
||||
|
@ -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';
|
||||
|
||||
|
@ -1,4 +1,4 @@
|
||||
import * as React from 'react';
|
||||
import React from 'react';
|
||||
|
||||
export type DisabledType = boolean | undefined;
|
||||
|
||||
|
@ -1,4 +1,4 @@
|
||||
import * as React from 'react';
|
||||
import React from 'react';
|
||||
|
||||
export type SizeType = 'small' | 'middle' | 'large' | undefined;
|
||||
|
||||
|
@ -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';
|
||||
|
@ -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';
|
||||
|
@ -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';
|
||||
|
@ -1,4 +1,4 @@
|
||||
import * as React from 'react';
|
||||
import React from 'react';
|
||||
import type { ButtonProps } from '../button';
|
||||
import Button from '../button';
|
||||
|
||||
|
@ -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 });
|
||||
|
@ -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';
|
||||
|
||||
|
@ -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';
|
||||
|
@ -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';
|
||||
|
@ -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;
|
||||
|
@ -1,4 +1,4 @@
|
||||
import * as React from 'react';
|
||||
import React from 'react';
|
||||
import type { DescriptionsContextProps } from '.';
|
||||
import { DescriptionsContext } from '.';
|
||||
import Cell from './Cell';
|
||||
|
@ -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';
|
||||
|
@ -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';
|
||||
|
@ -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';
|
||||
|
||||
|
@ -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;
|
||||
|
@ -1,4 +1,4 @@
|
||||
import * as React from 'react';
|
||||
import React from 'react';
|
||||
import { extendTest } from '../../../tests/shared/demoTest';
|
||||
|
||||
jest.mock('rc-drawer', () => {
|
||||
|
@ -1,4 +1,4 @@
|
||||
import * as React from 'react';
|
||||
import React from 'react';
|
||||
import Drawer from '..';
|
||||
|
||||
describe('Drawer.typescript', () => {
|
||||
|
@ -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';
|
||||
|
@ -1,4 +1,4 @@
|
||||
import * as React from 'react';
|
||||
import React from 'react';
|
||||
import demoTest, { rootPropsTest } from '../../../tests/shared/demoTest';
|
||||
|
||||
demoTest('dropdown', {
|
||||
|
@ -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';
|
||||
|
@ -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';
|
||||
|
@ -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 = () => {
|
||||
|
@ -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';
|
||||
|
@ -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 = () => {
|
||||
|
@ -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';
|
||||
|
@ -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';
|
||||
|
@ -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';
|
||||
|
@ -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
Loading…
Reference in New Issue
Block a user