Browse Source

revert: "chore: unified import method (#42149)" (#42180)

This reverts commit ea8ed28209.
pull/42188/head
lijianan 2 years ago
committed by GitHub
parent
commit
ac5a06027e
No known key found for this signature in database GPG Key ID: 4AEE18F83AFDEB23
  1. 2
      .dumi/hooks/useLocation.ts
  2. 2
      .dumi/pages/index/components/Banner.tsx
  3. 6
      .dumi/pages/index/components/BannerRecommends.tsx
  4. 3
      .dumi/pages/index/components/Group.tsx
  5. 12
      .dumi/pages/index/components/RecommendsOld.tsx
  6. 2
      .dumi/pages/index/components/SiteContext.ts
  7. 7
      .dumi/pages/index/components/Theme/MobileCarousel.tsx
  8. 2
      .dumi/pages/index/components/Theme/ThemePicker.tsx
  9. 22
      .dumi/pages/index/components/Theme/index.tsx
  10. 2
      .dumi/pages/index/components/util.ts
  11. 2
      .dumi/theme/builtins/ColorChunk/index.tsx
  12. 2
      .dumi/theme/builtins/IconSearch/Category.tsx
  13. 2
      .dumi/theme/builtins/IconSearch/CopyableIcon.tsx
  14. 2
      .dumi/theme/builtins/IconSearch/themeIcons.tsx
  15. 2
      .dumi/theme/builtins/ResourceArticles/index.tsx
  16. 2
      .dumi/theme/builtins/TokenTable/index.tsx
  17. 2
      .dumi/theme/common/Helmet.tsx
  18. 2
      .dumi/theme/layouts/ResourceLayout/AffixTabs.tsx
  19. 2
      .dumi/theme/slots/Footer/AdditionalInfo.tsx
  20. 2
      .dumi/theme/slots/Header/Logo.tsx
  21. 2
      .dumi/theme/slots/Header/Navigation.tsx
  22. 2
      .dumi/theme/slots/SiteContext.ts
  23. 2
      components/__tests__/node.test.tsx
  24. 2
      components/__tests__/setup.test.tsx
  25. 2
      components/_util/ActionButton.tsx
  26. 2
      components/_util/PurePanel.tsx
  27. 2
      components/_util/hooks/useFlexGapSupport.ts
  28. 2
      components/_util/hooks/useForceUpdate.ts
  29. 2
      components/_util/hooks/usePatchElement.tsx
  30. 2
      components/_util/hooks/useSyncState.ts
  31. 2
      components/_util/reactNode.ts
  32. 2
      components/_util/transButton.tsx
  33. 2
      components/_util/wave/WaveEffect.tsx
  34. 2
      components/affix/__tests__/demo.test.tsx
  35. 2
      components/alert/ErrorBoundary.tsx
  36. 2
      components/alert/index.tsx
  37. 2
      components/anchor/Anchor.tsx
  38. 2
      components/anchor/AnchorLink.tsx
  39. 2
      components/anchor/__tests__/demo.test.tsx
  40. 2
      components/anchor/context.ts
  41. 2
      components/auto-complete/index.tsx
  42. 2
      components/avatar/SizeContext.tsx
  43. 2
      components/avatar/__tests__/demo.test.tsx
  44. 2
      components/avatar/avatar.tsx
  45. 2
      components/avatar/group.tsx
  46. 6
      components/back-top/index.tsx
  47. 6
      components/badge/Ribbon.tsx
  48. 4
      components/badge/ScrollNumber.tsx
  49. 2
      components/badge/SingleNumber.tsx
  50. 7
      components/badge/index.tsx
  51. 2
      components/breadcrumb/Breadcrumb.tsx
  52. 2
      components/breadcrumb/BreadcrumbItem.tsx
  53. 2
      components/breadcrumb/BreadcrumbSeparator.tsx
  54. 2
      components/breadcrumb/useItemRender.tsx
  55. 2
      components/button/button-group.tsx
  56. 3
      components/calendar/Header.tsx
  57. 2
      components/calendar/generateCalendar.tsx
  58. 2
      components/card/Card.tsx
  59. 2
      components/card/Grid.tsx
  60. 2
      components/card/Meta.tsx
  61. 2
      components/card/__tests__/type.test.tsx
  62. 2
      components/carousel/index.tsx
  63. 2
      components/cascader/__tests__/demo.test.tsx
  64. 2
      components/cascader/__tests__/type.test.tsx
  65. 2
      components/cascader/index.tsx
  66. 2
      components/checkbox/Checkbox.tsx
  67. 2
      components/checkbox/Group.tsx
  68. 2
      components/checkbox/__tests__/demo.test.tsx
  69. 2
      components/checkbox/__tests__/type.test.tsx
  70. 2
      components/collapse/Collapse.tsx
  71. 2
      components/collapse/CollapsePanel.tsx
  72. 2
      components/config-provider/DisabledContext.tsx
  73. 2
      components/config-provider/SizeContext.tsx
  74. 2
      components/config-provider/__tests__/cssinjs.test.tsx
  75. 2
      components/config-provider/context.ts
  76. 2
      components/config-provider/index.tsx
  77. 2
      components/date-picker/PickerButton.tsx
  78. 2
      components/date-picker/__tests__/demo.test.tsx
  79. 2
      components/date-picker/__tests__/type.test.tsx
  80. 7
      components/date-picker/generatePicker/generateRangePicker.tsx
  81. 9
      components/date-picker/generatePicker/generateSinglePicker.tsx
  82. 2
      components/descriptions/Cell.tsx
  83. 2
      components/descriptions/Row.tsx
  84. 2
      components/descriptions/index.tsx
  85. 2
      components/divider/__tests__/index.test.tsx
  86. 2
      components/divider/index.tsx
  87. 2
      components/drawer/DrawerPanel.tsx
  88. 2
      components/drawer/__tests__/demo-extend.test.tsx
  89. 2
      components/drawer/__tests__/type.test.tsx
  90. 2
      components/drawer/index.tsx
  91. 2
      components/dropdown/__tests__/demo.test.tsx
  92. 2
      components/dropdown/dropdown-button.tsx
  93. 2
      components/dropdown/dropdown.tsx
  94. 2
      components/empty/empty.tsx
  95. 2
      components/empty/index.tsx
  96. 3
      components/empty/simple.tsx
  97. 2
      components/float-button/PurePanel.tsx
  98. 5
      components/form/ErrorList.tsx
  99. 3
      components/form/Form.tsx
  100. 2
      components/form/FormItem/ItemHolder.tsx

2
.dumi/hooks/useLocation.ts

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

2
.dumi/pages/index/components/Banner.tsx

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

6
.dumi/pages/index/components/BannerRecommends.tsx

@ -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 { Carousel, Skeleton, Typography } from 'antd';
import React from 'react';
import type { Extra, Icon } from './util';
import useSiteToken from '../../../hooks/useSiteToken';
import SiteContext from '../../../theme/slots/SiteContext';
import type { Extra, Icon } from './util';
import { useCarouselStyle } from './util';
const useStyle = () => {

3
.dumi/pages/index/components/Group.tsx

@ -1,5 +1,6 @@
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';

12
.dumi/pages/index/components/RecommendsOld.tsx

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

2
.dumi/pages/index/components/SiteContext.ts

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

7
.dumi/pages/index/components/Theme/MobileCarousel.tsx

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

2
.dumi/pages/index/components/Theme/ThemePicker.tsx

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

22
.dumi/pages/index/components/Theme/index.tsx

@ -1,11 +1,12 @@
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,
@ -17,22 +18,21 @@ import {
Menu,
Radio,
Space,
Typography,
theme,
Typography,
} from 'antd';
import React from 'react';
import useLocale from '../../../../hooks/useLocale';
import useSiteToken from '../../../../hooks/useSiteToken';
import SiteContext from '../../../../theme/slots/SiteContext';
import type { THEME } from './ThemePicker';
import ThemePicker from './ThemePicker';
import ColorPicker from './ColorPicker';
import RadiusPicker from './RadiusPicker';
import Group from '../Group';
import { useCarouselStyle } from '../util';
import BackgroundImage from './BackgroundImage';
import ColorPicker from './ColorPicker';
import { DEFAULT_COLOR, getAvatarURL, getClosetColor, PINK_COLOR } from './colorUtil';
import SiteContext from '../../../../theme/slots/SiteContext';
import { useCarouselStyle } from '../util';
import MobileCarousel from './MobileCarousel';
import RadiusPicker from './RadiusPicker';
import type { THEME } from './ThemePicker';
import ThemePicker from './ThemePicker';
import { DEFAULT_COLOR, PINK_COLOR, getAvatarURL, getClosetColor } from './colorUtil';
const { Header, Content, Sider } = Layout;

2
.dumi/pages/index/components/util.ts

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

2
.dumi/theme/builtins/ColorChunk/index.tsx

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

2
.dumi/theme/builtins/IconSearch/Category.tsx

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

2
.dumi/theme/builtins/IconSearch/CopyableIcon.tsx

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

2
.dumi/theme/builtins/IconSearch/themeIcons.tsx

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

2
.dumi/theme/builtins/ResourceArticles/index.tsx

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

2
.dumi/theme/builtins/TokenTable/index.tsx

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

2
.dumi/theme/common/Helmet.tsx

@ -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 {

2
.dumi/theme/layouts/ResourceLayout/AffixTabs.tsx

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

2
.dumi/theme/slots/Footer/AdditionalInfo.tsx

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

2
.dumi/theme/slots/Header/Logo.tsx

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

2
.dumi/theme/slots/Header/Navigation.tsx

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

2
.dumi/theme/slots/SiteContext.ts

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

2
components/__tests__/node.test.tsx

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

2
components/__tests__/setup.test.tsx

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

2
components/_util/ActionButton.tsx

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

2
components/_util/PurePanel.tsx

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

2
components/_util/hooks/useFlexGapSupport.ts

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

2
components/_util/hooks/useForceUpdate.ts

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

2
components/_util/hooks/usePatchElement.tsx

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

2
components/_util/hooks/useSyncState.ts

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

2
components/_util/reactNode.ts

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

2
components/_util/transButton.tsx

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

2
components/_util/wave/WaveEffect.tsx

@ -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 React from 'react';
import * as React from 'react';
import { getTargetWaveColor } from './util';
function validateNum(value: number) {

2
components/affix/__tests__/demo.test.tsx

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

2
components/alert/ErrorBoundary.tsx

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

2
components/alert/index.tsx

@ -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 React from 'react';
import * as React from 'react';
import { ConfigContext } from '../config-provider';
import getDataOrAriaProps from '../_util/getDataOrAriaProps';
import { replaceElement } from '../_util/reactNode';

2
components/anchor/Anchor.tsx

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

2
components/anchor/AnchorLink.tsx

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

2
components/anchor/__tests__/demo.test.tsx

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

2
components/anchor/context.ts

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

2
components/auto-complete/index.tsx

@ -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 React from 'react';
import * as React from 'react';
import type { ConfigConsumerProps } from '../config-provider';
import { ConfigContext } from '../config-provider';
import type {

2
components/avatar/SizeContext.tsx

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

2
components/avatar/__tests__/demo.test.tsx

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

2
components/avatar/avatar.tsx

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

2
components/avatar/group.tsx

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

6
components/back-top/index.tsx

@ -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 React from 'react';
import * as React from 'react';
import type { ConfigConsumerProps } from '../config-provider';
import { ConfigContext } from '../config-provider';
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 {

6
components/badge/Ribbon.tsx

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

4
components/badge/ScrollNumber.tsx

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

2
components/badge/SingleNumber.tsx

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

7
components/badge/index.tsx

@ -1,12 +1,13 @@
import classNames from 'classnames';
import CSSMotion from 'rc-motion';
import React, { useMemo, useRef } from 'react';
import * as React from 'react';
import { useMemo, useRef } from 'react';
import { ConfigContext } from '../config-provider';
import type { PresetColorKey } from '../theme/internal';
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';

2
components/breadcrumb/Breadcrumb.tsx

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

2
components/breadcrumb/BreadcrumbItem.tsx

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

2
components/breadcrumb/BreadcrumbSeparator.tsx

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

2
components/breadcrumb/useItemRender.tsx

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

2
components/button/button-group.tsx

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

3
components/calendar/Header.tsx

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

2
components/calendar/generateCalendar.tsx

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

2
components/card/Card.tsx

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

2
components/card/Grid.tsx

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

2
components/card/Meta.tsx

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

2
components/card/__tests__/type.test.tsx

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

2
components/carousel/index.tsx

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

2
components/cascader/__tests__/demo.test.tsx

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

2
components/cascader/__tests__/type.test.tsx

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

2
components/cascader/index.tsx

@ -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 React from 'react';
import * as React from 'react';
import { ConfigContext } from '../config-provider';
import DisabledContext from '../config-provider/DisabledContext';
import type { SizeType } from '../config-provider/SizeContext';

2
components/checkbox/Checkbox.tsx

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

2
components/checkbox/Group.tsx

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

2
components/checkbox/__tests__/demo.test.tsx

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

2
components/checkbox/__tests__/type.test.tsx

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

2
components/collapse/Collapse.tsx

@ -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 React from 'react';
import * as React from 'react';
import toArray from 'rc-util/lib/Children/toArray';
import omit from 'rc-util/lib/omit';

2
components/collapse/CollapsePanel.tsx

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

2
components/config-provider/DisabledContext.tsx

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

2
components/config-provider/SizeContext.tsx

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

2
components/config-provider/__tests__/cssinjs.test.tsx

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

2
components/config-provider/context.ts

@ -1,4 +1,4 @@
import React from 'react';
import * as 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';

2
components/config-provider/index.tsx

@ -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 React from 'react';
import * as React from 'react';
import type { Options } from 'scroll-into-view-if-needed';
import type { RequiredMark } from '../form/Form';
import type { Locale } from '../locale';

2
components/date-picker/PickerButton.tsx

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

2
components/date-picker/__tests__/demo.test.tsx

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

2
components/date-picker/__tests__/type.test.tsx

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

7
components/date-picker/generatePicker/generateRangePicker.tsx

@ -5,17 +5,18 @@ 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 React, { forwardRef, useContext, useImperativeHandle } from 'react';
import * as React from 'react';
import { 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';

9
components/date-picker/generatePicker/generateSinglePicker.tsx

@ -5,18 +5,19 @@ 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 React, { forwardRef, useContext, useImperativeHandle } from 'react';
import * as React from 'react';
import { 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';

2
components/descriptions/Cell.tsx

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

2
components/descriptions/Row.tsx

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

2
components/descriptions/index.tsx

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

2
components/divider/__tests__/index.test.tsx

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

2
components/divider/index.tsx

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

2
components/drawer/DrawerPanel.tsx

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

2
components/drawer/__tests__/demo-extend.test.tsx

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

2
components/drawer/__tests__/type.test.tsx

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

2
components/drawer/index.tsx

@ -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 React from 'react';
import * as React from 'react';
import { ConfigContext } from '../config-provider';
import { NoFormStyle } from '../form/context';
import { getTransitionName } from '../_util/motion';

2
components/dropdown/__tests__/demo.test.tsx

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

2
components/dropdown/dropdown-button.tsx

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

2
components/dropdown/dropdown.tsx

@ -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 React from 'react';
import * as React from 'react';
import genPurePanel from '../_util/PurePanel';
import type { AdjustOverflow } from '../_util/placements';
import getPlacements from '../_util/placements';

2
components/empty/empty.tsx

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

2
components/empty/index.tsx

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

3
components/empty/simple.tsx

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

2
components/float-button/PurePanel.tsx

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

5
components/form/ErrorList.tsx

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

3
components/form/Form.tsx

@ -2,7 +2,8 @@ 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 React, { useMemo } from 'react';
import * as React from 'react';
import { useMemo } from 'react';
import type { Options } from 'scroll-into-view-if-needed';
import { ConfigContext } from '../config-provider';
import DisabledContext, { DisabledContextProvider } from '../config-provider/DisabledContext';

2
components/form/FormItem/ItemHolder.tsx

@ -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 React from 'react';
import * as 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 changed in this diff

Loading…
Cancel
Save