Skip to content

Commit

Permalink
Zl/v4.20.4 sync (#68)
Browse files Browse the repository at this point in the history
* feat: Dropdown support switch options with arrow keys (ant-design#34738)

* feat: dropdown support auto-focus

* chore: code clean

* fix: skeleton cannot display children (ant-design#34751)

* fix: skeleton cannot display children

* fix: type error

* fix: add test case

Co-authored-by: dengqing <qing.deng@goldenpig.com.cn>

* chore: update rc-tabs version (ant-design#34757)

* test: Update snapshot (ant-design#34758)

* fix: ci fail rollback

* fix: ci fail rollback

* feat: Input.Group prevent components from getting style from Form.Item (ant-design#34764)

* feat: Input.Group provide isFormInput false

* test: update snapshot

* chore: code clean

* docs: replace grid design img (ant-design#34771)

* chore: replace grid design img

* fix: code error

* chore: comiple use matrix (ant-design#34770)

* chore: comiple use matrix

* chore: 16 deps

* chore: not install 16

* chore: update

* chore: to 16

* chore: install 16

* chore: install 16

* chore: install 16

* chore: install 16

* chore: concurrent

* chore: back all

* chore: fix lines

* chore: cancel if new comes

* chore: single dist speed up

* chore: fix

* chore: fix

* chore: update

* fix: deps

* test: update snapshot

* chore: React 18 test case (ant-design#34781)

* chore: add 18 test

* chore: update test flow

* chore: fail fast

* chore: foce ci

* chore: more if

* chore: test it

* chore: back of it

* chore: master only

* chore: fix spell

* chore: force install

* test: comment 16 tmp

* chore: use react 17

* chore: install 18

* chore: back of 16 & 17

* fix: Pagination should display middle size Select when ConfigProvider componentSize is large (ant-design#34756)

* fix: Pagination should display middle size Select
when ConfigProvider componentSize is large

close ant-design#34744

* fix snapshot

* fix: correct className (ant-design#34791)

* feat: Anchor supports `getCurrentAnchor(activeLink)` (ant-design#34799)

close ant-design#34784

* docs: update draggable demo with rtl mode (ant-design#34785)

* docs: update draggable demo with rtl mode

* test: update tabs demo snapshot

* Update faq.zh-CN.md

* docs: patch 4.19.3 change log (ant-design#34821)

* Patch 4.19.3 changelog

* docs: patch logs

* docs: fix author

* Update CHANGELOG.zh-CN.md

Co-authored-by: afc163 <afc163@gmail.com>

* emoji

* emoji

Co-authored-by: afc163 <afc163@gmail.com>

* chore: minify themes css (ant-design#34824)

* docs: Add faq (ant-design#34830)

* feat: Tree `switcherIcon` prop support render-prop (ant-design#34470)

* feat: Tree `switcherIcon` prop support render-prop

* add test for `switcherIcon` render-prop

* change the `switcherIcon` prop type of `TreeSelect`

* fix switcherIcon render-prop condition

* fix switcherIcon

* fix: Form unmount miss origin store value (ant-design#34845)

* docs: 4.19.5 changelog (ant-design#34851)

* docs: demo support react18 (ant-design#34843)

* docs: update demo

* chore: add script

* test: fix demo test

* docs: convert demos

* chore: move script

* test: remove react-dom import

* chore: update deps

* docs: update riddle js

* test: fix image test

* docs: fix riddle demo

* docs: add size property to progress (ant-design#34860)

* chore(deps-dev): bump eslint-plugin-unicorn from 41.0.1 to 42.0.0 (ant-design#34861)

Bumps [eslint-plugin-unicorn](https://github.com/sindresorhus/eslint-plugin-unicorn) from 41.0.1 to 42.0.0.
- [Release notes](https://github.com/sindresorhus/eslint-plugin-unicorn/releases)
- [Commits](sindresorhus/eslint-plugin-unicorn@v41.0.1...v42.0.0)

---
updated-dependencies:
- dependency-name: eslint-plugin-unicorn
  dependency-type: direct:development
  update-type: version-update:semver-major
...

Signed-off-by: dependabot[bot] <support@github.com>

Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>

* chore: Update de_DE.tsx (ant-design#34836)

* fix: set requestId to null after fn was cancelled (ant-design#34858)

* feat: Support ref for Title, Text, Paragraph (ant-design#34847)

* feat: Support ref for Title, Text, Paragraph

* feat: Add tests for Title, Paragraph and Text

* fix: add aria-checked prop to checkbox (ant-design#34862)

* fix: add aria-checked prop to checkbox

* fix: update snapshots

* fix: update aria-checked logic and snapshots

* refactor: change props order

Co-authored-by: afc163 <afc163@gmail.com>

Co-authored-by: Dzmitry Yarmoshkin <dzmitry_yarmoshkin@epam.com>
Co-authored-by: afc163 <afc163@gmail.com>

* chore(deps): update moment to 2.29.2 (ant-design#34867)

Co-authored-by: Michael Crenshaw <michael_crenshaw@intuit.com>

* fix: react 18 test fixing (ant-design#34787)

* fix: try fix

* chore: ci

* test: recover

* test: more test case

* test: more and mote

* test: btn test

* fix: react 18 compitable

* chore: more test

* test: all confirm test

* chore: tmp

* chore: test lib

* chore: tmp

* chore: tmp

* test: back of part

* test: back of menu index test

* test: more test

* test: form test

* test: rm IE11 test case

* chore: fix compatible

* chore: clean up

* chore: back of all test case

* test: ignore 18 lines

* chore: remove render test of enzyme in upload

* test: back of IE11 test case to fit 100% coverage

* chore: fix pkg deps

* docs: site wrap with strict mode (ant-design#34895)

* docs: site wrap with strict mode

* chore: bump bisheng

* fix: not warpper animation for badge RTL (ant-design#34899)

* fix: skeleton cannot dispaly without children and loading props : Skeleton(...) return nothing (ant-design#34872)

* fix: skeleton cannot dispaly without children

* [CodeFactor] Apply fixes to commit 0b4a968

[ci skip] [skip ci]

* fix: update skeleton

Co-authored-by: codefactor-io <support@codefactor.io>

* refactor: add optionType for Radio internally (ant-design#34849)

* refactor: add optionType for Radio internally

* fix: lint

* fix: update snapshot

* feat: remove useless condition for RadioGroupContext

* test: add test case for Radio.Button

* chore(deps-dev): bump @types/react-dom from 17.0.15 to 18.0.0 (ant-design#34943)

Bumps [@types/react-dom](https://github.com/DefinitelyTyped/DefinitelyTyped/tree/HEAD/types/react-dom) from 17.0.15 to 18.0.0.
- [Release notes](https://github.com/DefinitelyTyped/DefinitelyTyped/releases)
- [Commits](https://github.com/DefinitelyTyped/DefinitelyTyped/commits/HEAD/types/react-dom)

---
updated-dependencies:
- dependency-name: "@types/react-dom"
  dependency-type: direct:development
  update-type: version-update:semver-major
...

Signed-off-by: dependabot[bot] <support@github.com>

Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>

* chore: Compatible for @types/react@18 (ant-design#34937)

* chore: bump types def

* chore: part ts def

* chore: part ts def

* chore: part ts def

* chore: part ts def

* chore: part ts def

* chore: part ts def

* chore: part ts def

* chore: part ts def

* chore: part ts def

* chore: part ts def

* chore: free --legacy-peer-deps

* chore: ignore peer

* chore: fix ts logic

* chore: use fork docsearch

* chore: fix demo ts

* chore(deps): update dependency react-highlight-words to ^0.18.0 (ant-design#34954)

Co-authored-by: Renovate Bot <bot@renovateapp.com>

* feat: add new component `Segmented` (ant-design#34319)

* feat: basic implements in antd

* feat: use rc-segmented

* feat: add some demos

* feat: support dark theme

* docs: add more demos

* feat: support `icon` in segmented

* docs: format content

* test: add test cases

* docs: update docs

* chore: update

* fix: lint issues

* style: add border-radius for selected effect

* style: change border-radius-base

* chore: update gitignore

* feat: segmented support block

* chore: update gitignore

* feat: support block

* feat: add test case

* feat: support size

* docs: update demos

* chore: update

* chore: update

* test: update

* style: update colors

* style: hover and focus styles

* doc: add version mark in docs

* fix: style lint issue

* fix: some lint issues

* doc: add version in demo mds

* doc: add version mark before api details

* Revert "doc: add version in demo mds"

This reverts commit 2a9e86f.

* test: only test for thumb appear

* style: update color vars

* style: add transition

* style: text vertial align

* test: update snapshots

* feat: add preview svg and support dark theme

* fix: update test snapshot

* docs: update docs

* fix: remove useless z-index

* build: add 1kb for bundlesize of antd.variable.min.css

Co-authored-by: taian.lta <taian.lta@antgroup.com>

* ci: Add GitHub token permissions for workflows (ant-design#34946)

* fix: Form layout span 24 usage in responsive mode (ant-design#34907)

close ant-design#34903

* fix: small size of Table style problem (ant-design#34963)

close ant-design#34949

* test: back of coverage (ant-design#34964)

* test: fix coverage

* chore: bump bisheng

* chore: clean up

* chore: update deps

* chore: test coverage

* chore: test fix

* chore: fix ts

* chore: fix ts demo

* docs: Add faq about chrome with upload

* feat: crossorigin attribute of Upload (ant-design#34981)

* feat: Add crossOrigin prop to thumbnail image

* feat: Add test cases about crossOrigin prop of Upload component

* doc: Add a description about crossOrigin prop to Upload component manual

* Update components/upload/interface.tsx

Update type definition using React.ImgHTMLAttributes

Co-authored-by: afc163 <afc163@gmail.com>

Co-authored-by: hyunseok.kim <hyunseok.kim@42dot.ai>
Co-authored-by: afc163 <afc163@gmail.com>

* docs: update faq (ant-design#34984)

* test: Update snapshot

* feat: Image preview support keyboard switch (ant-design#34992)

* style: remove selected item style of AutoComplete (ant-design#34996)

close ant-design#34975

* chore(deps-dev): bump react-helmet-async from 1.2.3 to 1.3.0 (ant-design#34997)

Bumps [react-helmet-async](https://github.com/staylor/react-helmet-async) from 1.2.3 to 1.3.0.
- [Release notes](https://github.com/staylor/react-helmet-async/releases)
- [Commits](https://github.com/staylor/react-helmet-async/commits)

---
updated-dependencies:
- dependency-name: react-helmet-async
  dependency-type: direct:development
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>

Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>

* chore: use ~ instead of ^ for rc-segmented

* docs: recommend S2 and ProTable in table documentation (ant-design#34998)

* docs: recommend S2 and ProTable in table documentation

* Update index.en-US.md

* Update index.en-US.md

* docs: changelog for 4.20.0-alpha.0 (ant-design#34977)

* docs: changelog for 4.20.0

* chore: bump version to 4.20.0

* docs: update version date

* chore: update version to 4.20.0-alpha.0

* docs: remove react 18 compatible

* fix: arrow radius use fixed value (ant-design#34999)

* fix: Spin rotate deg number (ant-design#35005)

close ant-design#34866

* docs(input): use Intl.NumberFormat (ant-design#34985)

Co-authored-by: maxin <maxin@growingio.com>

* chore(deps-dev): bump glob from 7.2.0 to 8.0.1 (ant-design#35017)

Bumps [glob](https://github.com/isaacs/node-glob) from 7.2.0 to 8.0.1.
- [Release notes](https://github.com/isaacs/node-glob/releases)
- [Changelog](https://github.com/isaacs/node-glob/blob/main/changelog.md)
- [Commits](isaacs/node-glob@v7.2.0...v8.0.1)

---
updated-dependencies:
- dependency-name: glob
  dependency-type: direct:development
  update-type: version-update:semver-major
...

Signed-off-by: dependabot[bot] <support@github.com>

Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>

* fix(cascader): search result not fill the entire panel (ant-design#35019)

Co-authored-by: wanghao <wanghao.wong@bytedance.com>

* fix: Select and AutoComplete scroll behavior by keyboard (ant-design#35025)

fix ant-design#34898
fix ant-design#35022

* chore: clean up some project files (ant-design#35028)

* chore: remove unused Upload in form styles (ant-design#35033)

* chore: remove unused Upload in form styles

* Update Upload.tsx

* Update Upload.tsx

* test: update snapshot

* fix: Notification & message throw `createRoot` warning in React 18 (ant-design#35030)

* chore: bump notification version

* test: notification test case

* test: more test case

* test: part message test

* test: rest message test

* test: notification config test

* feat: Form support useWatch (ant-design#35036)

* feat: Support useWatch

* test: update test case

* chore: update snapshot

* feat: Image PreviewGroup Support top progress rendering (ant-design#35038)

* refactor: wrap picker with FC (ant-design#34994)

* refactor: wrap picker with FC

* chore: code clean

* feat: cast type

* test: fix test

* test: Update snapshot

* docs: More info about useWatch (ant-design#35039)

* docs: more about useWatch

* test: Update test case

* docs: more info

* docs: more & more

* feat: add useFormInstance

* chore: add version info

* docs: simplify demo code, ant-design#30853 (ant-design#35050)

* style: cleanup upload unused styles (ant-design#35052)

* fix: Upload pass UploadList prefixCls (ant-design#34944)

* fix: pass UploadList prefixCls

* test: <Upload /> should pass <UploadList /> prefixCls

Co-authored-by: chenshanwang <chenshanwang@lianfan.com>

* Update overview.en-US.md

* docs: fix overview content (ant-design#35055)

* docs: 修复中文文档没有与英文文档同步的问题

* Apply suggestions from code review

* Apply suggestions from code review

* Apply suggestions from code review

* Apply suggestions from code review

Co-authored-by: afc163 <afc163@gmail.com>

* test: fix jest snapshot

* test: update test cases to testing-lib (ant-design#35056)

* test: migrate some test case to testing-library (ant-design#35062)

* test: migrate some test case to testing-library

* chore: code clean

* test: fix stylelint

* test: test case

* ci: up version (ant-design#35067)

* ci: up version

* Update verify-files-modify.yml

* docs: Update useWatch docs

* docs: update docs version

* docs: add 4.20.0-alpha.1 changelog (ant-design#35070)

* docs: add 4.20.0-alpha.1 changelog

* docs: update

* docs: Update changelog missing useFormInstance

* chore: rc-dialog id unique sync (ant-design#35072)

* chore: Compatible for @types/react@18 (ant-design#35075)

* chore: Compatible for @types/react@18

* chore: Compatible for @types/react@18

* chore: 🤖 component Steps ts def for react18 (ant-design#35076)

✅ Closes: ant-design#35074

Co-authored-by: ronggui.shu <ronggui.shu@sci-inv.com>

* test: wrap React.StrictMode for test cases (ant-design#35026)

* test: React StrictMode

* test: fix Spin test

* chore: wrapper enzyme

* test: fix setState

* test: more test cover

* test: more test cover

* test: more test cover

* test: more test cover

* test: more test cover

* test: more test case

* test: more test case

* test: more test case

* test: more test case

* test: more test case

* test: more test case

* test: more test case

* test: more test case

* test: more test case

* test: more test case

* test: more test case

* test: more test case

* test: disable part of it

* test: fix test & add placeholder

* test: Use orign enzyme mount

Co-authored-by: zombiej <smith3816@gmail.com>

* test: Update snapshot

* fix: fixed arrow border radius variables (ant-design#35086)

* style: fix the problem of inconsistent styles in RTL mode (ant-design#35088)

* refactor: change anchor to fc for the cssinjs prepare (ant-design#35073)

* refactor: change anchor to fc for the cssinjs prepare

* fix: fix anchor test

* style: fix the style of progress rendering at the top of component Image PreviewGroup (ant-design#35092)

* style: fix the style of progress rendering at the top of component Image PreviewGroup

* style: add debug-demo for top progress countRender

* pref: upgrade rc-menu (ant-design#35071)

* pref: upgrade rc-menu

* Update package.json

Co-authored-by: afc163 <afc163@gmail.com>

* fix: Form in React 18 StrictMode (ant-design#35096)

* test: fix with react 18

* fix: Form in StrictMode

* test: clean up

* test: clean up

* chore: bump rc-motion version

* chore: fix test case logic

* test: back of it

* test: back missing test case

* docs: update Drawer overview image (ant-design#35099)

* docs: update Drawer overview image

* Update index.en-US.md

* chore: tweak upload style (ant-design#35097)

* chore: tweak upload style

* chore: update snapshot

* fix: cn menus doc (ant-design#35078)

* chore: update snapshot due to rc-trigger bumped (ant-design#35106)

* style: Switch background should not be transparent (ant-design#35103)

* docs: improve upload demos (ant-design#35104)

* docs: improve upload demos

* Update drag-sorting.md

* docs: add input showCount lose focus desc. close ant-design#35080

* chore: fix cirrus-actions/rebase

cirrus-actions/rebase#78

* fix(Typography): change less function to less variable in danger style (ant-design#35113)

* refactor: wrap Spin with FC (ant-design#35114)

* refactor: wrap Spin with FC

* chore: code clean

* fix: breadcrumb shows the number (ant-design#35123)

* docs: Add deprecated usage (ant-design#35128)

* docs: Update Menu demo sample

* docs: improve menu usage for items (ant-design#35131)

* docs: improve menu usage for items

* test: update snapshot

* docs: update menu title

* docs: update getContainer of Modal and Drawer (ant-design#35141)

close ant-design#35124

* chore: bump dropdown with inject mark (ant-design#35153)

* docs: Update Dropdown basic demo icon

* docs: Add dropdown menu missing keys

* chore: remove Breadcrumb Dropdown warning (ant-design#35162)

* fix: DropDownProps => DropdownProps (ant-design#35161)

* fix: DropDown => Dropdown

* chore: leave DropDownProps for compatibility

* docs: add Application Frameworks recommendation (ant-design#35168)

* docs: add Application Frameworks recommendation

* add Application Frameworks recommendation

* typo fix

* docs: segmented update (ant-design#35171)

* docs: segmented update

* test: fix lint

* docs: Update demo with Space (ant-design#35172)

* fix: small table selection dropdown margin issue

close ant-design#35167

* fix: small table selection dropdown margin issue (ant-design#35173)

close ant-design#35167

* docs: Update Dropdown demo

* fix: small/middle table selection dropdown margin issue (ant-design#35174)

* fix: small/middle table selection dropdown margin issue

* Update index.less

* refactor: Simplify Button Group Style (ant-design#35175)

* chore: refactor grp with context

* test: Update snapshot

* chore: clean up

* test: fix test case

* chore: clean up

* test: fix test

* docs: faq about modal. close ant-design#35177

* test: fix test in segmented (ant-design#35183)

* test(🏞): batch upload snapshots to argos-ci.com (ant-design#35181)

* fix: Upload interface generic type (ant-design#35158)

* fix:Uplooad组件UploadChangeParam fileList不使用范型

* feat:upload component interface generic test

* docs(🛡): update README badges (ant-design#35185)

* docs: update README-zh_CN.md

* Update README-uk_UA.md

* Update README-pt_BR.md

* chore: fix argos-ci upload BATCH_SIZE

* fix: code to use @html-selector variable (ant-design#35186)

* revert: batchCount of argos-ci

revert 2d654bf

* docs: add debug demo for segmented (ant-design#35176)

* docs: add debug demo for segmented

* chore: update

* chore: update

* style: `Segmented` supports rtl styles (ant-design#35188)

* perf: optimize calculation of filteredKeysIsAllControlled (ant-design#35064)

* perf: optimize calculation of filteredKeysIsAllControlled

* fix: ci failure

* fix: modify codes by suggestion

* chore: fix argos-ci check status in PR (ant-design#35193)

* chore: batch upload argos-ci snapshots

* test: added commit and branch back for ui-upload.yml

* feat: upgrade rc-segmented v2 (ant-design#35187)

* docs: add debug demo for segmented

* chore: update

* feat: upgrade rc-segmented v2

* Update components/segmented/__tests__/index.test.tsx

Co-authored-by: afc163 <afc163@gmail.com>

* Update components/segmented/demo/controlled-two.md

Co-authored-by: afc163 <afc163@gmail.com>

Co-authored-by: afc163 <afc163@gmail.com>

* site: tweak theme button margin of site footer (ant-design#35192)

* fix: remove Tabs overflow hidden style (ant-design#35195)

close ant-design#34021
close ant-design#35136

* docs: add demo link for Menu legacy usage (ant-design#35202)

* docs: add demo links for Menu legacy usage

* Update index.en-US.md

* chore: update ui.yml

* docs: 4.20.0 changelog (ant-design#35203)

* docs: init 4.20.0 changelog

* chore: merge

* Update CHANGELOG.zh-CN.md

Co-authored-by: afc163 <afc163@gmail.com>

* docs: Update changelog

* chore: bump react version

* chore: revert react version

* Update CHANGELOG.zh-CN.md

Co-authored-by: afc163 <afc163@gmail.com>

Co-authored-by: afc163 <afc163@gmail.com>

* docs: fix changelog date

* docs: Update Segmented changelog

* docs: Note for 18 known issue

* test: Replace transfer part test with testing lib (ant-design#35216)

* test: Replace transfer part test with testing lib

* chore: clean up

* fix: upload circle ref (ant-design#34379)

Co-authored-by: kanweiwei <kanweiwei@nutstore.net>

* chore: add useWatch test placeholder

* chore: run image snapshots on every branches

* style: fix Breadcrumb reset style (ant-design#35235)

close ant-design#35233

* fix: input onSearch trigger wrongly (ant-design#34844) (ant-design#35164)

Co-authored-by: zhangqingyang@mindlinker.com <zhangqingyang@mindlinker.com>

* docs(:sparkles:): release 4.20.1 (ant-design#35250)

* test: add menu focus test (ant-design#35252)

* test: fix upload test case

* test: skip uploadlist test for now

* docs: replace `git.io` link with the original URL (ant-design#35261)

* fix: Table columns sorter a11y experience (ant-design#35269)

* Make table sortable columns focusable and keyboard accessible.

* Fix typo.

* Change focus style for sortable table column header from broken outline to color text.

* Update snapshots.

* Change order to fix lint error.

* Add unit test to test sorting with keypress.

* Update components/table/hooks/useSorter.tsx

* chore: improve code style

* style: use focus-visible

* fix: test case

* test: update snapshot

Co-authored-by: Katsiaryna Pustakhod <Katsiaryna_Pustakhod@epam.com>

* feat: support icon only in segmented (ant-design#35256)

* feat: support icon only with segmented

* fix: lint issue

* chore: update

* test: fix

* test: update snapshot

* feat: dropdown auto-focus (ant-design#35307)

* feat: dropdown auto-focus

* chore: update rc-tabs

* docs: update space demos

* fix: Space duplicated key warning (ant-design#35311)

close ant-design#35305

* Added pending filter translations Table locale/es_ES (ant-design#35309)

Co-authored-by: Jesús Gallego Irles <jesusgallego@outlook.com>

* chore: Add code file owner

* chore: more owner files

* docs: fix form instance type error (ant-design#35320)

* feat: set proper height for Segmented (ant-design#35281)

* style: tweak BreadCrumb link hover color (ant-design#35324)

* chore: Aligning the CI description and its behavior (ant-design#35325)

* test: Rewrite mountTest with testing lib (ant-design#35326)

* docs: add instruction about tokenSeparators (ant-design#35329)

* test: replace Empty part test with test lib (ant-design#35289)

* test: replace Empty part test with test lib

* test: update snapshot case

* fix: Switch disabled color in dark theme (ant-design#35332)

* Revert "feat: dropdown auto-focus (ant-design#35307)" (ant-design#35337)

This reverts commit 1ff58d2.

* docs: update Tabs component  onEdit prop describe (ant-design#35271)

* docs: update Tabs component  onEdit prop describe

* docs: update Tabs component  onEdit prop describe

* Apply suggestions from code review

Co-authored-by: afc163 <afc163@gmail.com>

* docs: changelog for 4.20.2 (ant-design#35338)

* docs: add changelog for ant-design#35336

* style: fix Select tag remove icon position (ant-design#35336)

The icon is pushed down a bit

* test: update test case

* test: transfer part of tooltip test case to testing library (ant-design#35362)

* test: refactor test cases of Space (ant-design#35372)

* test: migrate part of anchor tests (ant-design#35371)

* test: migrate part of checkbox tests (ant-design#35354)

* fix: Carousel compatible with vertical property (ant-design#35349)

* chore: fix npm start error in Gitpod

close ant-design#33444

* Revert "chore: fix npm start error in Gitpod"

This reverts commit 978226f.

* fix: table column filter reset is not working (ant-design#35226) (ant-design#35386)

* fix: Respect user provided space item key (ant-design#35344)

* Resolve Ant Design Notification component TypeScript error via adding maxCount as an ArgsProps property (ant-design#35369)

* fix: use less variables for Segmented (ant-design#35387)

* docs: reverse React 18 demo

* test: replace textarea some test case with testing lib (ant-design#35398)

* test: replace textarea some test case with testing lib

* test: full process

* test: mv input test to input scope

* test: fix lint

* chore: rm useless console

* chore: rm CODEOWNER since this block github action

* test: transfer tooltip test case to testing library

* ci: trigger the pr check

* test: try to fix the pr check

* test: remove some test case

* test: foreach all placement

* fix(<Row/>): wipe out unnecessary prop (ant-design#35409)

* fix: wipe out unnecessary prop

* wipe out unnecessary prop(`row-gap: 0px`) on <Row />

* add test case

* chore: remove unnecessary import

* chore: add  prop to Row and Col

* chore: update snapshot (Form/Grid/Card)

* chore: update snapshot

* chore: move  location

* docs: explain Avatar fallback strategy (ant-design#35415)

The original description was unclear, incomplete, and confusing, requiring a look at the code to understand it, so I revised it to a more understandable version.

* fix: arrow style (ant-design#35401)

* fix: arrow style

* fix: raise arrow z-index

* fix: fix defualt arrow color

* fix: mix shadow

* chore: code clean

* chore: code clean

* fix: use fadeout instead

* test: fix style lint

* test: replace some slepp with jest.runAllTimers

* Revert "test: replace some slepp with jest.runAllTimers"

This reverts commit ad886d1.

* fix: List.Item ref (ant-design#35321)

* fix: list item ref

* add test

* improve

* fix: List.Item typescript (ant-design#35418)

* chore: eslint add consistent-type-imports (ant-design#35419)

* chore: eslint add consistent-type-imports

* fix avatar

* Update Item.tsx

* chore: change menu icon in site

* docs: update mirror link (ant-design#35424)

* docs: update mirror link

* feat: add modal

* feat: add icon

* chore: code clean

* feat: text

* fix: cancel btn

* chore: split chunks (ant-design#35222)

* chore: split chunks

* chore: update bisheng version

* chore: split @ant-design/icon

* chore: code clean

* chore: test

* chore: split moment

* chore: code clean

* fix: add missing localizations (ant-design#35430)

* Add missing localizations

* Update snapshot

* docs: add 4.20.3 changelog (ant-design#35435)

* docs: add 4.20.3 changelog

* Update CHANGELOG.zh-CN.md

Co-authored-by: afc163 <afc163@gmail.com>

* fix typo

* Update CHANGELOG.zh-CN.md

Co-authored-by: afc163 <afc163@gmail.com>

* Update CHANGELOG.en-US.md

Co-authored-by: afc163 <afc163@gmail.com>

* Update CHANGELOG.zh-CN.md

Co-authored-by: afc163 <afc163@gmail.com>

* fix typo

* fix typo

* fix typo

* fix typo

Co-authored-by: afc163 <afc163@gmail.com>

* docs: update demo template (ant-design#35440)

* docs: fix typo (ant-design#35439)

* chore: fixed typo

* chore: fixed typo+1

* chore(deps-dev): bump husky from 7.0.4 to 8.0.1 (ant-design#35451)

Bumps [husky](https://github.com/typicode/husky) from 7.0.4 to 8.0.1.
- [Release notes](https://github.com/typicode/husky/releases)
- [Commits](typicode/husky@v7.0.4...v8.0.1)

---
updated-dependencies:
- dependency-name: husky
  dependency-type: direct:development
  update-type: version-update:semver-major
...

Signed-off-by: dependabot[bot] <support@github.com>

Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>

* test: update snapshot (ant-design#35452)

* chore: optimze LGTM (ant-design#35443)

* chore: optimze LGTM

* chore: type

* fix: dev broken (ant-design#35453)

* chore(deps-dev): upgrade to jest 28 (ant-design#35334)

https://jestjs.io/zh-Hans/docs/upgrading-to-jest28

* fix: bad List.Item type (ant-design#35454) (ant-design#35455)

Co-authored-by: Ron Smeral <ron.smeral@merck.com>

* docs: replace class component with hooks (ant-design#35461)

* docs(badge): replace class component with hooks

* docs(button): replace class component with hooks

* docs(calendar): replace class component with hooks

* docs(card): replace class component with hooks

* docs(button): replace class component with hooks

* chore(deps): remove webpack devDependencies

* refactor: remove cascader displayRender warning (ant-design#35417)

* refactor: remove useless warning (ant-design#35291)

* refactor: remove useless test case

* docs: remove cascader tagRender

* perf: refactor devWarning for production code size (ant-design#35411)

* pref: better code style for production

* refactor `devWarning`

* don't use `useEffect` only wrap `devWarning`

* chore: add 'noop' to coverage

* chore: add test cases for devWarning

* chore: add test case

* chore: update test cases for devWarning

* chore: restore test script command

* fix: remove 'throw new Error'

* should not use `throw` for browser

* chore: update test case for AutoComplete

* perf: add prefix for `devWarning`

* update RegExp for UMD

* add prefix for ES and CJS

* chore: better code style

* perf:

* upgrade antd-tools

* remove `injectWarningCondition`

* rename `devWarning` to `warning`

* chore: better code style

* chore: better code style

* chore: restore hasValidName

* docs: replace class component with hooks (ant-design#35472)

* docs(badge): replace class component with hooks

* docs(button): replace class component with hooks

* docs(calendar): replace class component with hooks

* docs(card): replace class component with hooks

* docs(button): replace class component with hooks

* chore(deps): remove webpack devDependencies

* docs(cascader): replace class component with hooks

* docs(checkbox): replace class component with hooks

* docs(collapse): replace class component with hooks

* docs(comment): replace class component with hooks

* docs(descriptions): replace class component with hooks

* chore: fix LGTM

* docs: indicate that menu items require `key`s (ant-design#35474)

* docs: remove editable in table documentation

close
ant-design#35471 (comment)

* fix: tree checkbox margin in rtl mode (ant-design#35491)

* docs: Table QA about rowSelection renderCell (ant-design#35494)

* Update index.zh-CN.md

之前需要在 可选列的勾选框 中增加 Tooltip,没有在文档中找到相关的文档,通过搜索 issue,以为暂时不支持,看了源码才发现已经支持了。

所以想要完善一下文档,可以方便其他用户找到此内容。

* docs: Table QA about rowSelection renderCell

update US doc

* docs: changelog 4.20.4 (ant-design#35495)

* docs: changelog 4.20.4

* chore: emoji

* docs: replace class component with hooks (ant-design#35500)

* docs(badge): replace class component with hooks

* docs(button): replace class component with hooks

* docs(calendar): replace class component with hooks

* docs(card): replace class component with hooks

* docs(button): replace class component with hooks

* chore(deps): remove webpack devDependencies

* docs(cascader): replace class component with hooks

* docs(checkbox): replace class component with hooks

* docs(collapse): replace class component with hooks

* docs(comment): replace class component with hooks

* docs(descriptions): replace class component with hooks

* docs(config-provider): replace class component with hooks

* docs(date-picker): replace class component with hooks

* fix(statistic): ignore the decimal part when the precision is negative (ant-design#35520)

* test: Update snapshot

* test: Update snapshot (ant-design#35529)

* docs: update work with us part

* feat: update changelog

Co-authored-by: MadCcc <1075746765@qq.com>
Co-authored-by: dengqing <1247748612@qq.com>
Co-authored-by: dengqing <qing.deng@goldenpig.com.cn>
Co-authored-by: shuaijiumei <63175611+shuaijiumei@users.noreply.github.com>
Co-authored-by: 二货机器人 <smith3816@gmail.com>
Co-authored-by: afc163 <afc163@gmail.com>
Co-authored-by: Yunwoo Ji <unu12073@gmail.com>
Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
Co-authored-by: miracles1919 <516571350@qq.com>
Co-authored-by: Amumu <yoyo837@hotmail.com>
Co-authored-by: zqran <uuxnet@gmail.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Co-authored-by: Daniel Pfeffer <mail@danielpfeffer.de>
Co-authored-by: Tmk <i@tmk.im>
Co-authored-by: Minh Quy <sugiacupit@gmail.com>
Co-authored-by: Dzmitry Yarmoshkin <spanb4@gmail.com>
Co-authored-by: Dzmitry Yarmoshkin <dzmitry_yarmoshkin@epam.com>
Co-authored-by: Michael Crenshaw <michael@crenshaw.dev>
Co-authored-by: Michael Crenshaw <michael_crenshaw@intuit.com>
Co-authored-by: Hamed Mohammadzadeh <36853974+hmz22@users.noreply.github.com>
Co-authored-by: zhang lay <lay.zhang@shopee.com>
Co-authored-by: Albert Zhang <ziyuximing@163.com>
Co-authored-by: codefactor-io <support@codefactor.io>
Co-authored-by: vagusX <vagusX@users.noreply.github.com>
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
Co-authored-by: Renovate Bot <bot@renovateapp.com>
Co-authored-by: taian.lta <taian.lta@antgroup.com>
Co-authored-by: Varun Sharma <varunsh@stepsecurity.io>
Co-authored-by: Hyunseok.Kim <dragmove@gmail.com>
Co-authored-by: hyunseok.kim <hyunseok.kim@42dot.ai>
Co-authored-by: PCCCCCCC <zpc.excel@foxmail.com>
Co-authored-by: Peach <scdzwyxst@gmail.com>
Co-authored-by: maxin <48519459+nnmax@users.noreply.github.com>
Co-authored-by: maxin <maxin@growingio.com>
Co-authored-by: 王浩 <boomler@hotmail.com>
Co-authored-by: wanghao <wanghao.wong@bytedance.com>
Co-authored-by: chensw <swchenforgetful@hotmail.com>
Co-authored-by: chenshanwang <chenshanwang@lianfan.com>
Co-authored-by: c0dedance <38075730+c0dedance@users.noreply.github.com>
Co-authored-by: xrkffgg <xrkffgg@gmail.com>
Co-authored-by: AliRezaBeigy <AliRezaBeigyKhu@gmail.com>
Co-authored-by: littledian <1197434548@qq.com>
Co-authored-by: ronggui.shu <ronggui.shu@sci-inv.com>
Co-authored-by: Long Hao (龙濠) <45565100+LongHaoo@users.noreply.github.com>
Co-authored-by: Karott Schu <karott7@gmail.com>
Co-authored-by: nuintun <nuintun@gmail.com>
Co-authored-by: TrickyPi <33021497+TrickyPi@users.noreply.github.com>
Co-authored-by: Ömer Faruk APLAK <omer@pankod.com>
Co-authored-by: rendaoer <rendaoer@outlook.com>
Co-authored-by: Jefferson Rafael Kozerski <jeff.drumgod@gmail.com>
Co-authored-by: Yuyao Nie <nieyuyao0826@hotmail.com>
Co-authored-by: Camol <kwwnjujlc@sina.com>
Co-authored-by: kanweiwei <kanweiwei@nutstore.net>
Co-authored-by: qyzzzz <43691324+qyzzzz@users.noreply.github.com>
Co-authored-by: zhangqingyang@mindlinker.com <zhangqingyang@mindlinker.com>
Co-authored-by: Sukka <isukkaw@gmail.com>
Co-authored-by: Katsiaryna Pustakhod <Katsiaryna_Pustakhod@epam.com>
Co-authored-by: agarciaguillo <albertogarciaelx@gmail.com>
Co-authored-by: Jesús Gallego Irles <jesusgallego@outlook.com>
Co-authored-by: Zack Chang <73225408+jrr997@users.noreply.github.com>
Co-authored-by: lalalazero <zzzero520@hotmail.com>
Co-authored-by: Dreamcreative <m543438924@163.com>
Co-authored-by: Walid Cherhane <56094829+walidcherhane@users.noreply.github.com>
Co-authored-by: linqiqi077 <865530219@qq.com>
Co-authored-by: haipeng <firemmet@gmail.com>
Co-authored-by: Yanlin Jiang <cncolder@gmail.com>
Co-authored-by: Cooper Veysey <cwveysey@gmail.com>
Co-authored-by: parabolazz <parebolayh@outlook.com>
Co-authored-by: Tom Xu <ycxzhkx@gmail.com>
Co-authored-by: Mykyta Velykanov <nikitavelykanov@gmail.com>
Co-authored-by: 陈帅 <qixian.cs@outlook.com>
Co-authored-by: Yanming Deng <cisolarix@gmail.com>
Co-authored-by: Ron Šmeral <ron.smeral@gmail.com>
Co-authored-by: Ron Smeral <ron.smeral@merck.com>
Co-authored-by: dingkang <dingkang0458@gmail.com>
Co-authored-by: Tony Wu <93302820+tonywu6@users.noreply.github.com>
Co-authored-by: limingxin <906529775@qq.com>
Co-authored-by: ty888 <1506125048@qq.com>
  • Loading branch information
Show file tree
Hide file tree
Showing 579 changed files with 8,314 additions and 4,692 deletions.
1 change: 1 addition & 0 deletions .eslintrc.js
Original file line number Diff line number Diff line change
Expand Up @@ -42,6 +42,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
2 changes: 1 addition & 1 deletion .github/workflows/preview-build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ jobs:
key: lock-${{ github.sha }}

- name: create package-lock.json
run: npm i --package-lock-only --ignore-scripts
run: npm i --package-lock-only --ignore-scripts --legacy-peer-deps

- name: hack for single file
run: |
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/site-deploy.yml
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ jobs:
key: lock-${{ github.sha }}

- name: create package-lock.json
run: npm i --package-lock-only --ignore-scripts
run: npm i --package-lock-only --ignore-scripts --legacy-peer-deps

- name: hack for single file
run: |
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ jobs:
key: lock-${{ github.sha }}

- name: create package-lock.json
run: npm i --package-lock-only --ignore-scripts
run: npm i --package-lock-only --ignore-scripts --legacy-peer-deps

- name: hack for single file
run: |
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/ui.yml
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ jobs:
node-version: '16'

- name: create package-lock.json
run: npm i --package-lock-only --ignore-scripts
run: npm i --package-lock-only --ignore-scripts --legacy-peer-deps

- name: hack for single file
run: |
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/verify-files-modify.yml
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ jobs:
assignees: 'afc163, zombieJ, xrkffgg, MadCcc'
comment-mark: 'version'
comment: |
Hi @${{ github.event.pull_request.user.login }}. Thanks for your contribution. The path `.github/` or `scripts/` and `CHANGELOG` `package.json` is only maintained by team members. This current PR will be closed and team members will help on this.
Hi @${{ github.event.pull_request.user.login }}. Thanks for your contribution. The path `.github/` or `scripts/` and `CHANGELOG` is only maintained by team members. This current PR will be closed and team members will help on this.
close: true
set-failed: false

Expand Down
18 changes: 10 additions & 8 deletions .jest.js
Original file line number Diff line number Diff line change
Expand Up @@ -20,13 +20,13 @@ module.exports = {
moduleFileExtensions: ['ts', 'tsx', 'js', 'jsx', 'json', 'md'],
modulePathIgnorePatterns: ['/_site/'],
moduleNameMapper: {
'^dnd-core$': 'dnd-core/dist/cjs',
'^react-dnd$': 'react-dnd/dist/cjs',
'^react-dnd-html5-backend$': 'react-dnd-html5-backend/dist/cjs',
'^react-dnd-touch-backend$': 'react-dnd-touch-backend/dist/cjs',
'^react-dnd-test-backend$': 'react-dnd-test-backend/dist/cjs',
'^react-dnd-test-utils$': 'react-dnd-test-utils/dist/cjs',
'\\.(css|less)$': 'identity-obj-proxy',
'/^dnd-core$/': 'dnd-core/dist/cjs',
'/^react-dnd$/': 'react-dnd/dist/cjs',
'/^react-dnd-html5-backend$/': 'react-dnd-html5-backend/dist/cjs',
'/^react-dnd-touch-backend$/': 'react-dnd-touch-backend/dist/cjs',
'/^react-dnd-test-backend$/': 'react-dnd-test-backend/dist/cjs',
'/^react-dnd-test-utils$/': 'react-dnd-test-utils/dist/cjs',
'/\\.(css|less)$/': 'identity-obj-proxy',
infrad: '<rootDir>/components',
},
testPathIgnorePatterns: ['/node_modules/', 'dekko', 'node', 'image.test.js', 'image.test.ts'],
Expand All @@ -53,5 +53,7 @@ module.exports = {
tsConfig: './tsconfig.test.json',
},
},
testURL: 'http://localhost',
testEnvironmentOptions: {
url: 'http://localhost',
},
};
1 change: 1 addition & 0 deletions .stylelintrc.json
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,7 @@
{
"ignoreFunctions": [
"fade",
"fadeout",
"tint",
"darken",
"ceil",
Expand Down
45 changes: 45 additions & 0 deletions CHANGELOG.en-US.md
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@ timeline: true

| infrad version | antd version | update content | time |
| --- | --- | --- | --- |
| 4.20.4 | 4.20.4 | Synchronize the update of antd 4.20.4 version | 2022-05-13 |
| 4.20.0 | 4.20.0 | Synchronize the update of antd 4.20.0 version | 2022-04-26 |
| 4.19.5 | 4.19.5 | Synchronize the update of antd 4.19.5 version | 2022-04-07 |
| 4.19.3 | 4.19.3 | Synchronize the update of antd 4.19.3 version | 2022-03-22 |
Expand All @@ -32,6 +33,50 @@ if you have some problem, welcome to connect `taofeng.yang@shopee.com` or `lay.z

---

## 4.20.4

`2022-05-11`

- 🐞 Fix broken List.Item type definition. [#35455](https://github.com/ant-design/ant-design/pull/35455) [@rsmeral](https://github.com/rsmeral)
- 🐞 Fix Checkbox margin in Tree RTL mode. [#35491](https://github.com/ant-design/ant-design/pull/35491) [@miracles1919](https://github.com/miracles1919)
- 🗑 Remove Cascader `displayRender` warning. [#35417](https://github.com/ant-design/ant-design/pull/35417) [@lalalazero](https://github.com/lalalazero)

## 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`

- Segmented
- 🐞 Fix Segmented inconsisit height with other controls. [#35281](https://github.com/ant-design/ant-design/pull/35281)
- 🐞 Fix Segmented animation not working correct in StrictMode mode. [#35281](https://github.com/ant-design/ant-design/pull/35281)
- 🆕 Segmented `options` now supports `icon` property. [#35256](https://github.com/ant-design/ant-design/pull/35256)
- Table
- ⌨️ Improve Table columns sorter a11y experience. [#35269](https://github.com/ant-design/ant-design/pull/35269)
- 🇪🇸 Added Table filter localization for es_ES. [#35309](https://github.com/ant-design/ant-design/pull/35309) [@agarciaguillo](https://github.com/agarciaguillo)
- 💄 Fix Switch color in dark theme. [#35332](https://github.com/ant-design/ant-design/pull/35332)
- 💄 Tweak Breadcrumb link hover color. [#35324](https://github.com/ant-design/ant-design/pull/35324)
- 🐞 Fix Space throws `Encountered two children with the same key` warning in some cases. [#35311](https://github.com/ant-design/ant-design/pull/35311)
- 🐞 Fix Select tag remove icon position issue. [#35336](https://github.com/ant-design/ant-design/pull/35336) [@walidcherhane](https://github.com/walidcherhane)

## 4.20.1

`2022-04-26`

- 🐞 Fix Breadcrumb extra padding and margin style. [#35235](https://github.com/ant-design/ant-design/pull/35235)
- 🐞 Fix Input.Seach inconsistent behavior of triggering `onSearch` when press enter using Chinese inputting method. [#35164](https://github.com/ant-design/ant-design/pull/35164) [@qyzzzz](https://github.com/qyzzzz)
- 🐞 Fix circle reference between Upload and Dragger. [#34379](https://github.com/ant-design/ant-design/pull/34379) [@kanweiwei](https://github.com/kanweiwei)

## 4.20.0

`2022-04-24`
Expand Down
46 changes: 46 additions & 0 deletions CHANGELOG.zh-CN.md
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@ timeline: true

| infrad 版本号 | 对应 antd 版本号 | 更新内容 | 时间 |
| --- | --- | --- | --- |
| 4.20.4 | 4.20.4 | 同步 antd 4.20.4 版本的更新 | 2022-05-13 |
| 4.20.0 | 4.20.0 | 同步 antd 4.20.0 版本的更新 | 2022-04-26 |
| 4.19.5 | 4.19.5 | 同步 antd 4.19.5 版本的更新 | 2022-04-07 |
| 4.19.3 | 4.19.3 | 同步 antd 4.19.3 版本的更新 | 2022-03-22 |
Expand All @@ -32,6 +33,51 @@ timeline: true

---

## 4.20.4

`2022-05-11`

- 🐞 修复 List.Item 类型错误。[#35455](https://github.com/ant-design/ant-design/pull/35455) [@rsmeral](https://github.com/rsmeral)
- 🐞 修复 Tree 组件 RTL 模式下 Checkbox 的间距。[#35491](https://github.com/ant-design/ant-design/pull/35491) [@miracles1919](https://github.com/miracles1919)
- 🗑 删除 Cascader `displayRender` 警告。[#35417](https://github.com/ant-design/ant-design/pull/35417) [@lalalazero](https://github.com/lalalazero)

## 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`

- Segmented
- 🐞 修复 Segmented 组件高度和其他控件不一致的问题。[#35281](https://github.com/ant-design/ant-design/pull/35281)
- 🐞 修复 React StrictMode 下 Segmented 动画丢失的问题。[#35281](https://github.com/ant-design/ant-design/pull/35281)
- 🆕 Segmented `options` 支持设置 `icon` 属性。[#35256](https://github.com/ant-design/ant-design/pull/35256)
- Table
- ⌨️ 优化 Table 排序按钮的键盘可访问性。[#35269](https://github.com/ant-design/ant-design/pull/35269)
- 🇪🇸 补充 Table 西班牙语筛选文案。[#35309](https://github.com/ant-design/ant-design/pull/35309) [@agarciaguillo](https://github.com/agarciaguillo)
- 🐞 修复 Switch 在暗黑主题下关闭时的颜色问题。[#35332](https://github.com/ant-design/ant-design/pull/35332)
- 💄 微调 Breadcrumb 链接 hover 色为中性色。[#35324](https://github.com/ant-design/ant-design/pull/35324)
- 🐞 修复 Space 在某些情况下抛出 `Encountered two children with the same key` 警告的问题。[#35311](https://github.com/ant-design/ant-design/pull/35311)
- 🐞 修复 Select 多选标签移除图标位置偏下的问题。[#35336](https://github.com/ant-design/ant-design/pull/35336) [@walidcherhane](https://github.com/walidcherhane)

## 4.20.1

`2022-04-26`

- 🐞 修复 Breadcrumb 多余的 `padding``margin` 样式。[#35235](https://github.com/ant-design/ant-design/pull/35235)
- 🐞 修复 Input.Search 在中文输入法下回车键触发 `onSearch` 的行为不一致的问题。[#35164](https://github.com/ant-design/ant-design/pull/35164) [@qyzzzz](https://github.com/qyzzzz)
- 🐞 修复 Upload 和 Upload.Dragger 之间循环依赖的问题。[#34379](https://github.com/ant-design/ant-design/pull/34379) [@kanweiwei](https://github.com/kanweiwei)

## 4.20.0

`2022-04-24`
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
65 changes: 65 additions & 0 deletions components/_util/__tests__/warning.test.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,65 @@
describe('Test warning', () => {
let spy: jest.SpyInstance;

beforeAll(() => {
spy = jest.spyOn(console, 'error');
});

afterAll(() => {
spy.mockRestore();
});

beforeEach(() => {
jest.resetModules();
});

afterEach(() => {
spy.mockReset();
});

it('Test noop', async () => {
const { noop } = await import('../warning');
const value = noop();

expect(value).toBe(undefined);
expect(spy).not.toHaveBeenCalled();
expect(() => {
noop();
}).not.toThrow();
});

describe('process.env.NODE_ENV !== "production"', () => {
it('If `false`, exec `console.error`', async () => {
const warning = (await import('../warning')).default;
warning(false, 'error');

expect(spy).toHaveBeenCalled();
});

it('If `true`, do not exec `console.error`', async () => {
const warning = (await import('../warning')).default;
warning(true, 'error message');

expect(spy).not.toHaveBeenCalled();
});
});

describe('process.env.NODE_ENV === "production"', () => {
it('Whether `true` or `false`, do not exec `console.error`', async () => {
const prevEnv = process.env.NODE_ENV;
process.env.NODE_ENV = 'production';

const { default: warning, noop } = await import('../warning');

expect(warning).toEqual(noop);

warning(false, 'error message');
expect(spy).not.toHaveBeenCalled();

warning(true, 'error message');
expect(spy).not.toHaveBeenCalled();

process.env.NODE_ENV = prevEnv;
});
});
});
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
12 changes: 0 additions & 12 deletions components/_util/devWarning.ts

This file was deleted.

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
21 changes: 21 additions & 0 deletions components/_util/warning.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
import rcWarning, { resetWarned } from 'rc-util/lib/warning';

export { resetWarned };
export function noop() {}

type Warning = (valid: boolean, component: string, message: string) => void;

// eslint-disable-next-line import/no-mutable-exports
let warning: Warning = noop;
if (process.env.NODE_ENV !== 'production') {
warning = (valid, component, message) => {
rcWarning(valid, `[antd: ${component}] ${message}`);

// StrictMode will inject console which will not throw warning in React 17.
if (process.env.NODE_ENV === 'test') {
resetWarned();
}
};
}

export default warning;
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
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

0 comments on commit 5b13f7f

Please sign in to comment.