Browse Source

Merge branch 'master' into feature-merge-master

pull/42193/head
yoyo837 2 years ago
parent
commit
7f5042c4fe
  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
      .dumirc.ts
  24. 12
      CHANGELOG.en-US.md
  25. 12
      CHANGELOG.zh-CN.md
  26. 2
      components/__tests__/node.test.tsx
  27. 2
      components/__tests__/setup.test.tsx
  28. 2
      components/_util/ActionButton.tsx
  29. 2
      components/_util/PurePanel.tsx
  30. 2
      components/_util/hooks/useFlexGapSupport.ts
  31. 2
      components/_util/hooks/useForceUpdate.ts
  32. 2
      components/_util/hooks/usePatchElement.tsx
  33. 2
      components/_util/hooks/useSyncState.ts
  34. 2
      components/_util/reactNode.ts
  35. 2
      components/_util/transButton.tsx
  36. 2
      components/_util/wave/WaveEffect.tsx
  37. 2
      components/affix/__tests__/demo.test.tsx
  38. 2
      components/alert/ErrorBoundary.tsx
  39. 2
      components/alert/index.tsx
  40. 2
      components/anchor/Anchor.tsx
  41. 2
      components/anchor/AnchorLink.tsx
  42. 2
      components/anchor/__tests__/demo.test.tsx
  43. 2
      components/anchor/context.ts
  44. 2
      components/auto-complete/index.tsx
  45. 2
      components/avatar/SizeContext.tsx
  46. 2
      components/avatar/__tests__/demo.test.tsx
  47. 2
      components/avatar/avatar.tsx
  48. 2
      components/avatar/group.tsx
  49. 6
      components/back-top/index.tsx
  50. 6
      components/badge/Ribbon.tsx
  51. 4
      components/badge/ScrollNumber.tsx
  52. 2
      components/badge/SingleNumber.tsx
  53. 7
      components/badge/index.tsx
  54. 2
      components/breadcrumb/Breadcrumb.tsx
  55. 2
      components/breadcrumb/BreadcrumbItem.tsx
  56. 2
      components/breadcrumb/BreadcrumbSeparator.tsx
  57. 2
      components/breadcrumb/useItemRender.tsx
  58. 2
      components/button/button-group.tsx
  59. 3
      components/calendar/Header.tsx
  60. 2
      components/calendar/generateCalendar.tsx
  61. 2
      components/card/Card.tsx
  62. 2
      components/card/Grid.tsx
  63. 2
      components/card/Meta.tsx
  64. 2
      components/card/__tests__/type.test.tsx
  65. 2
      components/carousel/index.tsx
  66. 2
      components/cascader/__tests__/demo.test.tsx
  67. 2
      components/cascader/__tests__/type.test.tsx
  68. 2
      components/cascader/index.tsx
  69. 2
      components/checkbox/Checkbox.tsx
  70. 2
      components/checkbox/Group.tsx
  71. 2
      components/checkbox/__tests__/demo.test.tsx
  72. 2
      components/checkbox/__tests__/type.test.tsx
  73. 2
      components/collapse/Collapse.tsx
  74. 2
      components/collapse/CollapsePanel.tsx
  75. 2
      components/config-provider/DisabledContext.tsx
  76. 2
      components/config-provider/SizeContext.tsx
  77. 2
      components/config-provider/__tests__/cssinjs.test.tsx
  78. 2
      components/config-provider/context.ts
  79. 2
      components/config-provider/index.tsx
  80. 2
      components/date-picker/PickerButton.tsx
  81. 2
      components/date-picker/__tests__/demo.test.tsx
  82. 2
      components/date-picker/__tests__/type.test.tsx
  83. 7
      components/date-picker/generatePicker/generateRangePicker.tsx
  84. 9
      components/date-picker/generatePicker/generateSinglePicker.tsx
  85. 2
      components/descriptions/Cell.tsx
  86. 2
      components/descriptions/Row.tsx
  87. 2
      components/descriptions/index.tsx
  88. 2
      components/divider/__tests__/index.test.tsx
  89. 2
      components/divider/index.tsx
  90. 2
      components/drawer/DrawerPanel.tsx
  91. 2
      components/drawer/__tests__/demo-extend.test.tsx
  92. 2
      components/drawer/__tests__/type.test.tsx
  93. 2
      components/drawer/index.tsx
  94. 2
      components/dropdown/__tests__/demo.test.tsx
  95. 2
      components/dropdown/dropdown-button.tsx
  96. 2
      components/dropdown/dropdown.tsx
  97. 2
      components/empty/empty.tsx
  98. 2
      components/empty/index.tsx
  99. 3
      components/empty/simple.tsx
  100. 2
      components/float-button/PurePanel.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
.dumirc.ts

@ -35,7 +35,7 @@ export default defineConfig({
},
extraRehypePlugins: [rehypeAntd],
extraRemarkPlugins: [remarkAntd],
extraBabelPresets: ['@emotion/babel-preset-css-prop'],
extraBabelPresets: [require.resolve('@emotion/babel-preset-css-prop')],
mfsu: false,
metas: [{ name: 'theme-color', content: '#1677ff' }],
analytics: {

12
CHANGELOG.en-US.md

@ -15,6 +15,18 @@ timeline: true
---
## 5.4.7
`2023-05-06`
- 🐞 Fix Menu different margin between Menu.Item and Menu.Submenu in vertical and inline mode. [#42160](https://github.com/ant-design/ant-design/pull/42160)
- 🐞 Fix Breadcrumb using `itemRender` with `path` render additional a element. [#42049](https://github.com/ant-design/ant-design/pull/42049)
- 🐞 Fix Transfer in control mode throw React nest state update warning. [#42033](https://github.com/ant-design/ant-design/pull/42033)
- 🐞 Fix Upload logic of disable state. [#42102](https://github.com/ant-design/ant-design/pull/42102) [@Wxh16144](https://github.com/Wxh16144)
- 💄 Fix Spin height is inconsistent with its icon children. [#42162](https://github.com/ant-design/ant-design/pull/42162) [@cheapCoder](https://github.com/cheapCoder)
- ⚡️ Improve Affix logic when it does not need to update. [#42015](https://github.com/ant-design/ant-design/pull/42015) [@Simon-He95](https://github.com/Simon-He95)
- ⚡️ Improve Anchor logic when it does not need to scroll. [#42018](https://github.com/ant-design/ant-design/pull/42018) [@Simon-He95](https://github.com/Simon-He95)
## 5.4.6
`2023-04-26`

12
CHANGELOG.zh-CN.md

@ -15,6 +15,18 @@ timeline: true
---
## 5.4.7
`2023-05-06`
- 🐞 修复 Menu.Item 与 Submenu 之间间距不统一的问题。[#42160](https://github.com/ant-design/ant-design/pull/42160)
- 🐞 修复 Breadcrumb 使用 `itemRender` 并且配置 `path` 时,渲染元素会额外包一层 a 元素的问题。[#42049](https://github.com/ant-design/ant-design/pull/42049)
- 🐞 修复 Transfer 在受控模式下报 React 状态嵌套更新错误信息。[#42033](https://github.com/ant-design/ant-design/pull/42033)
- 🐞 修复 Upload 禁用状态的逻辑。[#42102](https://github.com/ant-design/ant-design/pull/42102) [@Wxh16144](https://github.com/Wxh16144)
- 💄 修复 Spin 与其 icon 子元素高度不一致的问题。[#42162](https://github.com/ant-design/ant-design/pull/42162) [@cheapCoder](https://github.com/cheapCoder)
- ⚡️ 优化 Affix 组件在无需更新时计算逻辑。[#42015](https://github.com/ant-design/ant-design/pull/42015) [@Simon-He95](https://github.com/Simon-He95)
- ⚡️ 优化 Anchor 组件在无需跳转时计算逻辑。[#42018](https://github.com/ant-design/ant-design/pull/42018) [@Simon-He95](https://github.com/Simon-He95)
## 5.4.6
`2023-04-26`

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 genPurePanel from '../_util/PurePanel';
import { isValidElement } from '../_util/reactNode';
import type { InputStatus } from '../_util/statusUtils';

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 warning from '../_util/warning';
import type { RequiredMark } from '../form/Form';

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';

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

Loading…
Cancel
Save