Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

chore: next merge master #35456

Merged
merged 25 commits into from
May 9, 2022
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
25 commits
Select commit Hold shift + click to select a range
8545647
test: transfer tooltip test case to testing library
zpc7 May 6, 2022
d9ce1ad
ci: trigger the pr check
zpc7 May 6, 2022
8ade7ab
test: try to fix the pr check
zpc7 May 6, 2022
55f9e29
test: remove some test case
zpc7 May 6, 2022
22b89ee
test: foreach all placement
zpc7 May 7, 2022
ad886d1
test: replace some slepp with jest.runAllTimers
zpc7 May 7, 2022
bd31a6a
Revert "test: replace some slepp with jest.runAllTimers"
zpc7 May 7, 2022
5d2475a
fix: List.Item ref (#35321)
hengkx May 7, 2022
d1f85d9
fix: List.Item typescript (#35418)
hengkx May 7, 2022
00fb822
Merge pull request #35396 from zpc7/test/transfer-tooltip-to-testing-…
zombieJ May 7, 2022
1719748
chore: eslint add consistent-type-imports (#35419)
hengkx May 7, 2022
9a59018
chore: change menu icon in site
afc163 May 7, 2022
11e2ce6
docs: update mirror link (#35424)
MadCcc May 7, 2022
8b682a5
chore: split chunks (#35222)
MadCcc May 8, 2022
fcf2afd
fix: add missing localizations (#35430)
velykanov May 8, 2022
be982e1
docs: add 4.20.3 changelog (#35435)
chenshuai2144 May 8, 2022
c897728
docs: update demo template (#35440)
MadCcc May 9, 2022
36ded1a
docs: fix typo (#35439)
cisolarix May 9, 2022
6e10020
chore(deps-dev): bump husky from 7.0.4 to 8.0.1 (#35451)
dependabot[bot] May 9, 2022
01ebb6a
test: update snapshot (#35452)
MadCcc May 9, 2022
b5699cc
chore: optimze LGTM (#35443)
MadCcc May 9, 2022
0f63293
fix: dev broken (#35453)
MadCcc May 9, 2022
1f5e271
Merge branch 'master' into next-merge-master
MadCcc May 9, 2022
24773d5
test: lint
MadCcc May 9, 2022
ed4d6c3
chore: increase bundle size
MadCcc May 9, 2022
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
The table of contents is too big for display.
Diff view
Diff view
  •  
  •  
  •  
1 change: 1 addition & 0 deletions .eslintrc.js
Original file line number Diff line number Diff line change
Expand Up @@ -31,6 +31,7 @@ module.exports = {
'@typescript-eslint/no-unused-vars': [2, { args: 'none' }],
'no-unused-expressions': 'off',
'@typescript-eslint/no-unused-expressions': 2,
'@typescript-eslint/consistent-type-imports': 2,
},
},
{
Expand Down
12 changes: 12 additions & 0 deletions CHANGELOG.en-US.md
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,18 @@ timeline: true

---

## 4.20.3

`2022-05-08`

- 🐞 Fix unnecessary `rowGap: 0` style attribute in Row. [#35409](https://github.com/ant-design/ant-design/pull/35409)
- 🐞 Fix List.Item `ref` no work problem. [#35321](https://github.com/ant-design/ant-design/pull/35321)
- 💄 Optimize the style of arrow in Tooltip. [#35401](https://github.com/ant-design/ant-design/pull/35401)
- 🐞 Fix Table column filter reset is not working. [#35386](https://github.com/ant-design/ant-design/pull/35386) [@lalalazero](https://github.com/lalalazero)
- 🌍 Add missing localizations for 🇬🇧 en_GB and 🇺🇦 uk_UA. [#35430](https://github.com/ant-design/ant-design/pull/35430) [@velykanov](https://github.com/velykanov)
- Typescript
- 🤖 Fixed an issue where notification `maxCount` attribute was missing. [#35369](https://github.com/ant-design/ant-design/pull/35369) [@cwveysey](https://github.com/cwveysey)

## 4.20.2

`2022-04-30`
Expand Down
13 changes: 13 additions & 0 deletions CHANGELOG.zh-CN.md
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,19 @@ timeline: true

---

## 4.20.3

`2022-05-08`

- 🔥 增加 [官方国内镜像](https://ant-design.antgroup.com/index-cn),享受飞一般的加载速度。
- 🐞 修复 Row 里不必要的 `rowGap: 0` 样式属性。[#35409](https://github.com/ant-design/ant-design/pull/35409)
- 🐞 修复 List.Item `ref` 不生效的问题。[#35321](https://github.com/ant-design/ant-design/pull/35321)
- 💄 优化 Tooltip 箭头的样式。[#35401](https://github.com/ant-design/ant-design/pull/35401)
- 🐞 修复 Table 筛选的重置功能不生效问题。[#35386](https://github.com/ant-design/ant-design/pull/35386) [@lalalazero](https://github.com/lalalazero)
- 🌍 为 🇬🇧 en_GB 和 🇺🇦 uk_UA 添加缺失的本地化文案。[#35430](https://github.com/ant-design/ant-design/pull/35430) [@velykanov](https://github.com/velykanov)
- TypeScript
- 🤖 修复 Notification 的 `maxCount` 属性缺失的问题。[#35369](https://github.com/ant-design/ant-design/pull/35369) [@cwveysey](https://github.com/cwveysey)

## 4.20.2

`2022-04-30`
Expand Down
3 changes: 2 additions & 1 deletion components/_util/ActionButton.tsx
Original file line number Diff line number Diff line change
@@ -1,7 +1,8 @@
import * as React from 'react';
import useState from 'rc-util/lib/hooks/useState';
import Button from '../button';
import { LegacyButtonType, ButtonProps, convertLegacyProps } from '../button/button';
import type { LegacyButtonType, ButtonProps } from '../button/button';
import { convertLegacyProps } from '../button/button';

export interface ActionButtonProps {
type?: LegacyButtonType;
Expand Down
3 changes: 2 additions & 1 deletion components/_util/colors.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
import { ElementOf, tuple } from './type';
import type { ElementOf } from './type';
import { tuple } from './type';

export const PresetStatusColorTypes = tuple('success', 'processing', 'error', 'default', 'warning');
// eslint-disable-next-line import/prefer-default-export
Expand Down
2 changes: 1 addition & 1 deletion components/_util/getRenderPropValue.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import * as React from 'react';
import type * as React from 'react';

export type RenderFunction = () => React.ReactNode;

Expand Down
4 changes: 2 additions & 2 deletions components/_util/motion.tsx
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import { CSSMotionProps, MotionEventHandler, MotionEndEventHandler } from 'rc-motion';
import { MotionEvent } from 'rc-motion/lib/interface';
import type { CSSMotionProps, MotionEventHandler, MotionEndEventHandler } from 'rc-motion';
import type { MotionEvent } from 'rc-motion/lib/interface';
import { tuple } from './type';

// ================== Collapse Motion ==================
Expand Down
2 changes: 1 addition & 1 deletion components/_util/placements.tsx
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import { placements } from 'rc-tooltip/lib/placements';
import { BuildInPlacements } from 'rc-trigger';
import type { BuildInPlacements } from 'rc-trigger';

const autoAdjustOverflowEnabled = {
adjustX: 1,
Expand Down
2 changes: 1 addition & 1 deletion components/_util/statusUtils.tsx
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import classNames from 'classnames';
import { ValidateStatus } from '../form/FormItem';
import type { ValidateStatus } from '../form/FormItem';
import { tuple } from './type';

const InputStatuses = tuple('warning', 'error', '');
Expand Down
6 changes: 4 additions & 2 deletions components/_util/theme/index.tsx
Original file line number Diff line number Diff line change
@@ -1,18 +1,20 @@
import React from 'react';
import { CSSInterpolation, Theme, useCacheToken, useStyleRegister } from '@ant-design/cssinjs';
import type { CSSInterpolation } from '@ant-design/cssinjs';
import { Theme, useCacheToken, useStyleRegister } from '@ant-design/cssinjs';
import genComponentStyleHook from './util/genComponentStyleHook';
import defaultSeedToken, { derivative as defaultDerivative } from './themes/default';
import version from '../../version';
import { resetComponent, resetIcon, clearFix, roundedArrow, operationUnit } from './util';
import formatToken from './util/alias';
import statisticToken, { merge as mergeToken, statistic } from './util/statistic';
import { GlobalToken, PresetColors } from './interface';
import { PresetColors } from './interface';
import type {
SeedToken,
DerivativeToken,
AliasToken,
OverrideToken,
PresetColorType,
GlobalToken,
} from './interface';
import type { FullToken } from './util/genComponentStyleHook';

Expand Down
8 changes: 5 additions & 3 deletions components/_util/theme/util/genComponentStyleHook.ts
Original file line number Diff line number Diff line change
@@ -1,8 +1,10 @@
/* eslint-disable no-redeclare */
import { CSSInterpolation, useStyleRegister } from '@ant-design/cssinjs';
import type { CSSInterpolation } from '@ant-design/cssinjs';
import { useStyleRegister } from '@ant-design/cssinjs';
import { useContext } from 'react';
import { GlobalToken, OverrideToken } from '../interface';
import { mergeToken, statisticToken, UseComponentStyleResult, useToken } from '../index';
import type { GlobalToken, OverrideToken } from '../interface';
import type { UseComponentStyleResult } from '../index';
import { mergeToken, statisticToken, useToken } from '../index';
import { ConfigContext } from '../../../config-provider';

export type OverrideTokenWithoutDerivative = Omit<OverrideToken, 'derivative'>;
Expand Down
2 changes: 1 addition & 1 deletion components/_util/theme/util/index.tsx
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/* eslint-disable import/prefer-default-export */
import { CSSObject } from '@ant-design/cssinjs';
import type { CSSObject } from '@ant-design/cssinjs';
import type { DerivativeToken } from '..';

export { operationUnit } from './operationUnit';
Expand Down
2 changes: 1 addition & 1 deletion components/_util/theme/util/operationUnit.tsx
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import type { CSSObject } from '@ant-design/cssinjs';
import { DerivativeToken } from '..';
import type { DerivativeToken } from '..';

// eslint-disable-next-line import/prefer-default-export
export const operationUnit = (token: DerivativeToken): CSSObject => ({
Expand Down
2 changes: 1 addition & 1 deletion components/_util/theme/util/roundedArrow.tsx
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/* eslint-disable import/prefer-default-export */
import { CSSObject } from '@ant-design/cssinjs';
import type { CSSObject } from '@ant-design/cssinjs';
import seedToken from '../themes/default';

export const roundedArrow = (width: number, outerRadius: number, bgColor: string): CSSObject => {
Expand Down
3 changes: 2 additions & 1 deletion components/_util/wave.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,8 @@ import * as React from 'react';
import { updateCSS } from 'rc-util/lib/Dom/dynamicCSS';
import { supportRef, composeRef } from 'rc-util/lib/ref';
import raf from './raf';
import { ConfigConsumer, ConfigConsumerProps, CSPConfig, ConfigContext } from '../config-provider';
import type { ConfigConsumerProps, CSPConfig } from '../config-provider';
import { ConfigConsumer, ConfigContext } from '../config-provider';
import { cloneElement } from './reactNode';

let styleForPseudo: HTMLStyleElement | null;
Expand Down
6 changes: 4 additions & 2 deletions components/affix/__tests__/Affix.test.tsx
Original file line number Diff line number Diff line change
@@ -1,6 +1,8 @@
import React from 'react';
import { mount, ReactWrapper } from 'enzyme';
import Affix, { AffixProps, AffixState } from '..';
import type { ReactWrapper } from 'enzyme';
import { mount } from 'enzyme';
import type { AffixProps, AffixState } from '..';
import Affix from '..';
import { getObserverEntities } from '../utils';
import Button from '../../button';
import rtlTest from '../../../tests/shared/rtlTest';
Expand Down
3 changes: 2 additions & 1 deletion components/affix/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,8 @@ import * as React from 'react';
import classNames from 'classnames';
import omit from 'rc-util/lib/omit';
import ResizeObserver from 'rc-resize-observer';
import { ConfigContext, ConfigConsumerProps } from '../config-provider';
import type { ConfigConsumerProps } from '../config-provider';
import { ConfigContext } from '../config-provider';
import { throttleByAnimationFrameDecorator } from '../_util/throttleByAnimationFrame';

import {
Expand Down
5 changes: 3 additions & 2 deletions components/affix/style/index.tsx
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
// deps-lint-skip-all
import { CSSObject } from '@ant-design/cssinjs';
import { GenerateStyle, genComponentStyleHook, FullToken, mergeToken } from '../../_util/theme';
import type { CSSObject } from '@ant-design/cssinjs';
import type { GenerateStyle, FullToken } from '../../_util/theme';
import { genComponentStyleHook, mergeToken } from '../../_util/theme';

interface AffixToken extends FullToken<'Affix'> {
zIndexAffix: number;
Expand Down
13 changes: 4 additions & 9 deletions components/alert/style/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -2,15 +2,10 @@
// import './index.less';

// deps-lint-skip-all
import { CSSInterpolation, CSSObject } from '@ant-design/cssinjs';

import {
resetComponent,
GenerateStyle,
FullToken,
genComponentStyleHook,
mergeToken,
} from '../../_util/theme';
import type { CSSInterpolation, CSSObject } from '@ant-design/cssinjs';

import type { GenerateStyle, FullToken } from '../../_util/theme';
import { resetComponent, genComponentStyleHook, mergeToken } from '../../_util/theme';

// FIXME: missing token
type AlertToken = FullToken<'Alert'> & {
Expand Down
3 changes: 2 additions & 1 deletion components/anchor/Anchor.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,8 @@ import classNames from 'classnames';
import memoizeOne from 'memoize-one';
import addEventListener from 'rc-util/lib/Dom/addEventListener';
import Affix from '../affix';
import { ConfigContext, ConfigConsumerProps } from '../config-provider';
import type { ConfigConsumerProps } from '../config-provider';
import { ConfigContext } from '../config-provider';
import scrollTo from '../_util/scrollTo';
import getScroll from '../_util/getScroll';
import AnchorContext from './context';
Expand Down
5 changes: 3 additions & 2 deletions components/anchor/AnchorLink.tsx
Original file line number Diff line number Diff line change
@@ -1,7 +1,8 @@
import * as React from 'react';
import classNames from 'classnames';
import { AntAnchor } from './Anchor';
import { ConfigConsumer, ConfigConsumerProps } from '../config-provider';
import type { AntAnchor } from './Anchor';
import type { ConfigConsumerProps } from '../config-provider';
import { ConfigConsumer } from '../config-provider';
import AnchorContext from './context';

export interface AnchorLinkProps {
Expand Down
2 changes: 1 addition & 1 deletion components/anchor/context.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import * as React from 'react';
import { AntAnchor } from './Anchor';
import type { AntAnchor } from './Anchor';

const AnchorContext = React.createContext<AntAnchor>(null as any);

Expand Down
2 changes: 1 addition & 1 deletion components/anchor/style/index.tsx
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
// deps-lint-skip-all
import { CSSObject } from '@ant-design/cssinjs';
import type { CSSObject } from '@ant-design/cssinjs';
import { genComponentStyleHook, mergeToken, resetComponent } from '../../_util/theme';
import type { GenerateStyle, FullToken } from '../../_util/theme';

Expand Down
2 changes: 1 addition & 1 deletion components/auto-complete/demo/uncertain-category.md
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ Demonstration of [Lookup Patterns: Uncertain Category](https://ant.design/docs/s
```tsx
import React, { useState } from 'react';
import { Input, AutoComplete } from 'antd';
import { SelectProps } from 'antd/es/select';
import type { SelectProps } from 'antd/es/select';

function getRandomInt(max: number, min: number = 0) {
return Math.floor(Math.random() * (max - min + 1)) + min; // eslint-disable-line no-mixed-operators
Expand Down
8 changes: 5 additions & 3 deletions components/auto-complete/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -11,16 +11,18 @@ import toArray from 'rc-util/lib/Children/toArray';
import classNames from 'classnames';
import omit from 'rc-util/lib/omit';
import type { BaseSelectRef } from 'rc-select';
import Select, {
import type {
BaseOptionType,
DefaultOptionType,
InternalSelectProps,
RefSelectProps,
} from '../select';
import { ConfigConsumer, ConfigConsumerProps } from '../config-provider';
import Select from '../select';
import type { ConfigConsumerProps } from '../config-provider';
import { ConfigConsumer } from '../config-provider';
import devWarning from '../_util/devWarning';
import { isValidElement } from '../_util/reactNode';
import { InputStatus } from '../_util/statusUtils';
import type { InputStatus } from '../_util/statusUtils';

const { Option } = Select;

Expand Down
2 changes: 1 addition & 1 deletion components/avatar/SizeContext.tsx
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import * as React from 'react';
import { ScreenSizeMap } from '../_util/responsiveObserve';
import type { ScreenSizeMap } from '../_util/responsiveObserve';

export type AvatarSize = 'large' | 'small' | 'default' | number | ScreenSizeMap;

Expand Down
6 changes: 4 additions & 2 deletions components/avatar/avatar.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -4,10 +4,12 @@ import ResizeObserver from 'rc-resize-observer';
import { composeRef } from 'rc-util/lib/ref';
import { ConfigContext } from '../config-provider';
import devWarning from '../_util/devWarning';
import { Breakpoint, responsiveArray } from '../_util/responsiveObserve';
import type { Breakpoint } from '../_util/responsiveObserve';
import { responsiveArray } from '../_util/responsiveObserve';
import useBreakpoint from '../grid/hooks/useBreakpoint';
import SizeContext, { AvatarSize } from './SizeContext';
import useStyle from './style';
import type { AvatarSize } from './SizeContext';
import SizeContext from './SizeContext';

export interface AvatarProps {
/** Shape of avatar, options: `circle`, `square` */
Expand Down
3 changes: 2 additions & 1 deletion components/avatar/group.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -5,8 +5,9 @@ import { cloneElement } from '../_util/reactNode';
import { ConfigContext } from '../config-provider';
import Avatar from './avatar';
import Popover from '../popover';
import { AvatarSize, SizeContextProvider } from './SizeContext';
import useStyle from './style';
import type { AvatarSize } from './SizeContext';
import { SizeContextProvider } from './SizeContext';

export interface GroupProps {
className?: string;
Expand Down
7 changes: 4 additions & 3 deletions components/avatar/index.tsx
Original file line number Diff line number Diff line change
@@ -1,12 +1,13 @@
import * as React from 'react';
import InternalAvatar, { AvatarProps } from './avatar';
import type { ForwardRefExoticComponent, RefAttributes } from 'react';
import type { AvatarProps } from './avatar';
import InternalAvatar from './avatar';
import Group from './group';

export { AvatarProps } from './avatar';
export { GroupProps } from './group';

interface CompoundedComponent
extends React.ForwardRefExoticComponent<AvatarProps & React.RefAttributes<HTMLElement>> {
extends ForwardRefExoticComponent<AvatarProps & RefAttributes<HTMLElement>> {
Group: typeof Group;
}

Expand Down
11 changes: 3 additions & 8 deletions components/avatar/style/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -6,14 +6,9 @@
// import '../../popover/style';

// deps-lint-skip-all
import { CSSObject } from '@ant-design/cssinjs';
import {
GenerateStyle,
resetComponent,
FullToken,
genComponentStyleHook,
mergeToken,
} from '../../_util/theme';
import type { CSSObject } from '@ant-design/cssinjs';
import type { GenerateStyle, FullToken } from '../../_util/theme';
import { resetComponent, genComponentStyleHook, mergeToken } from '../../_util/theme';

type AvatarToken = FullToken<'Avatar'> & {
avatarBg: string;
Expand Down
11 changes: 3 additions & 8 deletions components/back-top/style/index.tsx
Original file line number Diff line number Diff line change
@@ -1,12 +1,7 @@
// deps-lint-skip-all
import { CSSObject } from '@ant-design/cssinjs';
import {
resetComponent,
genComponentStyleHook,
GenerateStyle,
FullToken,
mergeToken,
} from '../../_util/theme';
import type { CSSObject } from '@ant-design/cssinjs';
import type { GenerateStyle, FullToken } from '../../_util/theme';
import { resetComponent, genComponentStyleHook, mergeToken } from '../../_util/theme';

/** Component only token. Which will handle additional calculation of alias token */
export interface ComponentToken {}
Expand Down
4 changes: 2 additions & 2 deletions components/badge/Ribbon.tsx
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
import * as React from 'react';
import classNames from 'classnames';
import { LiteralUnion } from '../_util/type';
import { PresetColorType } from '../_util/colors';
import type { LiteralUnion } from '../_util/type';
import type { PresetColorType } from '../_util/colors';
import { ConfigContext } from '../config-provider';
import { isPresetColor } from './utils';
import useStyle from './style';
Expand Down
4 changes: 2 additions & 2 deletions components/badge/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -4,9 +4,9 @@ import CSSMotion from 'rc-motion';
import classNames from 'classnames';
import ScrollNumber from './ScrollNumber';
import Ribbon from './Ribbon';
import { PresetColorType, PresetStatusColorType } from '../_util/colors';
import type { PresetColorType, PresetStatusColorType } from '../_util/colors';
import { ConfigContext } from '../config-provider';
import { LiteralUnion } from '../_util/type';
import type { LiteralUnion } from '../_util/type';
import { cloneElement } from '../_util/reactNode';
import { isPresetColor } from './utils';
import useStyle from './style';
Expand Down
Loading