Skip to content

Commit

Permalink
Zl/v4.21.0 sync (#70)
Browse files Browse the repository at this point in the history
* fix: upload circle ref (ant-design#34379)

Co-authored-by: kanweiwei <[email protected]>

* feat(Typography): copyable text  support format (ant-design#35219)

Co-authored-by: kanweiwei <[email protected]>

* 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: [email protected] <[email protected]>

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

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

* test: fix upload test case

* refactor: replace float with flex of Card (ant-design#35236)

* 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 <[email protected]>

* 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 <[email protected]>

* 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)

* feat: Form disabled (ant-design#35210)

* feat: add form disabled

* feat: add form disabled

* feat: add radio disabled

* feat: update snap

* feat: add test case

* 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 <[email protected]>

* 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

* feat: Dropdown support autoFocus (ant-design#35391)

* feat: Dropdown support autoFocus

* chore: add bundle size

* 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

* refactor: Progress rebuild as function component (ant-design#35393)

* refactor: Progress rebuild as function component

* refactor: Progress rebuild as function component

* refactor: Progress rebuild as function component

* refactor: Progress rebuild as function component

* refactor: Progress rebuild as function component

* refactor: Progress rebuild as function component

* refactor: Progress rebuild as function component

* 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

* feat: focus menu item automaticly when focusing menu (ant-design#35407)

* feat: focus menu item automaticly when focusing menu

* chore: update mentions

* test: fix test case

* chore: decrease bundle size

* chore: increase bundle size

* 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

* chore: update snapshot

* 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

* refactor: Progress type="circle" for some issues (ant-design#35433)

* refactor: Progress type="circle" for some issues

close ant-design#17706
close ant-design#35009
close ant-design#35352

* test: update progress snapshot

* docs: update linecap.md

* Update components/progress/demo/linecap.md

* test: update progress snapshot

* fix: rc-progress@~3.3.1

* fix: rc-progress@~3.3.2

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

* docs: add 4.20.3 changelog

* Update CHANGELOG.zh-CN.md

Co-authored-by: afc163 <[email protected]>

* fix typo

* Update CHANGELOG.zh-CN.md

Co-authored-by: afc163 <[email protected]>

* Update CHANGELOG.en-US.md

Co-authored-by: afc163 <[email protected]>

* Update CHANGELOG.zh-CN.md

Co-authored-by: afc163 <[email protected]>

* fix typo

* fix typo

* fix typo

* fix typo

Co-authored-by: afc163 <[email protected]>

* feat: edit date-picker to hook (ant-design#35425)

* 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] <[email protected]>

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 <[email protected]>

* 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

* test: update snapshot

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

* test: Update snapshot

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

* refactor: Card loading (ant-design#35525)

* feat: card loading with skeleton

* test: update snapshot

* test: add style deps

* chore: import

* docs: update work with us part

* refactor: modal confirm button style (ant-design#35530)

* fix: modal rtl style

* fix: cannot use logic css

* chore: change css writing order

* feat: update changelog

* test: moving to testing-library in `Segmented` (ant-design#35538)

* test(Segmented): moving to testing-library

* chore: cleanup

* fix: test

* test: use click instead of change to fire event

* Update index.test.tsx

* fix: Picker focus & blur not working (ant-design#35552)

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

* 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

* docs(drawer): replace class component with hooks

* docs(dropdown): replace class component with hooks

* docs(dropdown): replace class component with hooks

* docs(empty): replace class component with hooks

* docs(grid): replace class component with hooks

* docs(input): replace class component with hooks

* docs(input-number): replace class component with hooks

* docs(demo): fix lint error

* chore: deprecated rowSelection.onSelectNone and onSelectMultiple (ant-design#35545)

* chore: del unused package && downgrade some packages which related webpack@5 (ant-design#35551)

* docs: changelog 4.20.5 (ant-design#35560)

* chore: Update github action release helper release title

* fix: drawer close speed (ant-design#35339)

* fix: drawer close speed

* chroe: snap

* chroe: test

* chroe: test

* feat: remove file

* feat: 重新整理

* feat: forceRender

* feat: snap

* chroe: test

* chroe: test

* chroe: test

* feat: create event

* feat: diff code

* feat: forceRender

* chore: test (ant-design#35364)

* Update components/drawer/index.tsx

Co-authored-by: afc163 <[email protected]>

* feat: remove load state

* feat: test

* fix: destroyOnClose

* feat: add load

* fix: update snap

* fix: update snap

* feat: reset test

* feat: docs

* feat: test

* feat: test

Co-authored-by: afc163 <[email protected]>

* docs: fix 4.20.5 changelog typo (ant-design#35567)

* refactor: reduce empty cycling deps (ant-design#35570)

* chore: rm in root

* chore: fix ts

* test: Update snapshot

* chore: ignore part

* chore: delete extra spaces (ant-design#35582)

Co-authored-by: hezhaoshun <[email protected]>

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

* 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

* docs(drawer): replace class component with hooks

* docs(dropdown): replace class component with hooks

* docs(dropdown): replace class component with hooks

* docs(empty): replace class component with hooks

* docs(grid): replace class component with hooks

* docs(input): replace class component with hooks

* docs(input-number): replace class component with hooks

* docs(demo): fix lint error

* docs(layout): replace class component with hooks

* docs(list): replace class component with hooks

* docs(mentions): replace class component with hooks

* docs: fix code review issue

* chore: bump tools version (ant-design#35594)

* style: fix Table header border when has rowSpan (ant-design#35591)

close ant-design#35577

* docs: Update CHANGELOG.zh-CN.md (ant-design#35604)

* feat: add a new locale tk_TK (ant-design#35605)

* feat: add a new locale tk_TK

* fix: fix moment locale

* feat: table rowSelection.onChange support type (ant-design#35598)

* feat: table rowSelection onChange support method

* docs: update

* chore: rename param

* test: update

* test: update

* Update rebase.yml

* docs: Fix DatePicker throw demo

* style: anchor text is overwritten (ant-design#35612)

Co-authored-by: hezhaoshun <[email protected]>

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

* 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

* docs(drawer): replace class component with hooks

* docs(dropdown): replace class component with hooks

* docs(dropdown): replace class component with hooks

* docs(empty): replace class component with hooks

* docs(grid): replace class component with hooks

* docs(input): replace class component with hooks

* docs(input-number): replace class component with hooks

* docs(demo): fix lint error

* docs(layout): replace class component with hooks

* docs(list): replace class component with hooks

* docs(mentions): replace class component with hooks

* docs: fix code review issue

* docs(modal): replace class component with hooks

* docs: feat components TS demo (ant-design#34742)

* docs: add general components TS demo

* docs: add layout components TS demo

* docs: add navigation components TS demo

* docs: add data entry components TS demo

* chore(deps): add types for qs

* docs: add data display TS demo

* docs: add feedback components TS demo

* docs: add other components TS demo

* chore(deps): add types

* docs: unified demo code style

* docs: fix lint error

* docs: add demo TS type

* docs: fix demo TS type

* test: update snapshot

* docs: fix TS demo

* feat: update Rate character type

* docs: fix lint error

* feat: update Rate character type

* feat: update Rate character type

* fix: Remove Grid row and cell aria roles (ant-design#35616)

close ant-design#35549

* test: move test cases to `@testing/library` for Result (ant-design#35621)

* fix: incorrect position of picker popup (ant-design#35620)

Co-authored-by: yangpj17 <[email protected]>

close ant-design#35590

* feat: add-testing-lib (ant-design#35626)

* docs: Convert part demo to ts version (ant-design#35641)

* 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

* docs(drawer): replace class component with hooks

* docs(dropdown): replace class component with hooks

* docs(dropdown): replace class component with hooks

* docs(empty): replace class component with hooks

* docs(grid): replace class component with hooks

* docs(input): replace class component with hooks

* docs(input-number): replace class component with hooks

* docs(demo): fix lint error

* docs(layout): replace class component with hooks

* docs(list): replace class component with hooks

* docs(mentions): replace class component with hooks

* docs: fix code review issue

* docs(modal): replace class component with hooks

* docs(pagination): replace class component with hooks

* docs(popconfirm): replace class component with hooks

* docs(popover): replace class component with hooks

* docs(progress): replace class component with hooks

* docs(rate): replace class component with hooks

* docs(radio): replace class component with hooks

* docs: jsx to TS demo

* test: improve Select test case (ant-design#35633)

* docs(mentions): fix debounce demo bug (ant-design#35653)

* chore(deps-dev): bump @types/react-resizable from 1.7.4 to 3.0.0 (ant-design#35658)

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

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

Signed-off-by: dependabot[bot] <[email protected]>

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

* test: refactor test cases of Timeline with testing library (ant-design#35654)

* test: refactor test cases of TimeLine

* fix: lint errors

* chore(deps-dev): bump react-intl from 5.25.1 to 6.0.1 (ant-design#35659)

Bumps [react-intl](https://github.com/formatjs/formatjs) from 5.25.1 to 6.0.1.
- [Release notes](https://github.com/formatjs/formatjs/releases)
- [Commits](https://github.com/formatjs/formatjs/compare/[email protected]@6.0.1)

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

Signed-off-by: dependabot[bot] <[email protected]>

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

* chore: fix cheerio for enzyme fix (ant-design#35666)

* docs: 4.20.6 changelog (ant-design#35671)

* docs: 4.20.6 changelog

* docs: fix build

* test: Update snapshot

* refactor: align with popover (ant-design#35676)

* chore: short auto merge time

* chore: update issue check mirror (ant-design#35680)

* fix: division in less for Segmented (ant-design#35701)

* fix: division in less for Segmented

* fix: update

* chore: increase bundle size (ant-design#35709)

* docs: fix mistype (ant-design#35714)

* docs: update demo code (ant-design#35695)

* docs: update demo code

* chore: increase bundle size

* Revert "chore: increase bundle size"

This reverts commit 1c75e5a.

* fix: drawer can not ref form instance when open (ant-design#35706)

* fix: drawer can not ref form instance when open

* fix: test

* feat: div ref

* feat: test

* feat: test

* feat: test

* feat: test

* chore: lock stylelint (ant-design#35725)

* fix: Popover arrow style (ant-design#35717)

* feat: config provider support componentDisabled (ant-design#35718)

* feat: config provider support componentDisable

* test: update snapshot

* docs: update

* chore: code

* docs: componentDisabled version (ant-design#35730)

* test: Replace alert part test with testing lib (ant-design#35736)

Co-authored-by: chenkan1 <[email protected]>

* chore(deps-dev): bump typescript from 4.6.4 to 4.7.2 (ant-design#35737)

Bumps [typescript](https://github.com/Microsoft/TypeScript) from 4.6.4 to 4.7.2.
- [Release notes](https://github.com/Microsoft/TypeScript/releases)
- [Commits](microsoft/TypeScript@v4.6.4...v4.7.2)

---
updated-dependencies:
- dependency-name: typescript
  dependency-type: direct:development
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <[email protected]>

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

* docs(select): fix type  (ant-design#35726)

* fix: demo ts type

* mend

* Update select-users.md

* chore: move `@types/qs` from deps to devDeps (ant-design#35747)

* feat: Config provider pagination showSizeChanger (ant-design#35750)

* feat: support showSizeChanger

* test: test case

* fix: the ts wrong of card inteface (ant-design#35753)

* fix: the ts wrong of card inteface

* fix: add export cardproprs

* feat: add card type test

* docs(👍): update recommendation (ant-design#35758)

* docs: update recommendation

* Update recommendation.en-US.md

* docs: fix skeleton demo (ant-design#35760)

* refactor: Collapse replace expandIconPosition with logical position (ant-design#35770)

* refactor: change collapse to logic position

* test: Update snapshot

* chore: force trigger CI

* ci: use jest shard (ant-design#35622)

* refactor: bump rc-collapse to stable dom (ant-design#35781)

* chore: bump rc-collapse to stable dom

* chore: clean up

* test: Replace card component test with testing lib (ant-design#35751)

* test: Replace card component test with testing lib

* test: update the snapshot

* docs: add note to custom BackTop demo (ant-design#35625)

* docs: add note to custom BackTop demo

* Apply suggestions from code review

Co-authored-by: afc163 <[email protected]>

* test: lock eslint-plugin-jest version for false positive

jest-community/eslint-plugin-jest#1128

* test: move test cases to @testing/library for Tabs (ant-design#35796)

* chore(deps): update dependency eslint-plugin-jest to ~26.4.0 (ant-design#35801)

* chore(deps): update dependency eslint-plugin-jest to ~26.4.0

* Update package.json

Co-authored-by: Renovate Bot <[email protected]>
Co-authored-by: afc163 <[email protected]>

* feat: change the changelog of 4.20.6 version

* test: move test cases to @testing/library for Image (ant-design#35806)

* docs: changelog for 4.20.7 (ant-design#35804)

* docs: changelog for 4.20.7

* chore: bump version to 4.20.7

* docs: update changelog

* refactor: Fix Dropdown nesting menu injection logic (ant-design#35810)

* refactor: Dependency Inversion

* test: update snapshot

* test: Update snapshot

* test: more

* fix: table dropdown logic

* fix: menu lint

* chore: upgrade to jest-image-snapshot 5.x (ant-design#35818)

* test: move test cases to @testing/library for Modal (ant-design#35785)

* test: move test cases to @testing/library for Modal

* update

* fix: test

* test: add test case for mouse position

* chore: revert

* fix: Progress type="line" strokeLinecap (ant-design#35822)

* docs: fix typo of Menu items code example (ant-design#35832)

* test: move test cases to @testing/library for Drawer (ant-design#35839)

* perf: active skeleton animated with transform (ant-design#35836)

* active skeleton animated with transform

* properties order fixed

* properties order fixed

* properties order fixed

Co-authored-by: afc163 <[email protected]>

* style: tweak Skeleton margin top style (ant-design#35848)

* docs: update FAQ titles

* test: move test cases to @testing/library for List (ant-design#35850)

* chore: bump rc-dialog & update snapshot

* fix: set jest shard to 2 (ant-design#35831)

* fix: drawer close twice children is undefined (ant-design#35853)

* fix: drawer close twice children is undefined

* fix: drawer close twice children is undefined

* chore: code

* fix: test

* test: update snapshot

* fix: remove extraneous space from rc-segmented version (ant-design#35863)

The extra spaces confuses third-party tooling

* feat: Progress steps support custom strokeColor for each step (ant-design#35855)

* feat: <Progress steps /> could accept string[] as strokeColor

close ant-design#35852
close ant-design#26858

* fix: tsx demo

* docs: add version column

* chore: stlye patch of statistic (ant-design#35874)

* chore: stlye patch of statistic

* test: Udpate snapshot

* test: replace Input part test with test lib (ant-design#35754)

* test: replace Input part test with test lib

* test: test input case

* test: update textarea case

Co-authored-by: z1399 <[email protected]>
Co-authored-by: afc163 <[email protected]>

* refactor: pagination mini className (ant-design#35881)

* refactor: pagination mini cls

* test: update snapshot

* test: update snapshot

* chore: code clean

* chore: code clean

* test: update snapshot

* test: update snapshot

* refactor: Wave in React 18 StrictMode (ant-design#35889)

* feat: tabs support popupClassName (ant-design#35892)

* feat: tabs support popupClassName

* docs: update

* fix:border-style for inputNumber addon when rtl (ant-design#35876)

* chore(deps): update dependency @types/jest to v28 (ant-design#35907)

Co-authored-by: Renovate Bot <[email protected]>

* ci: fix typo

* fix: 类型“FormListFieldData”上不存在属性“fieldKey”。(ant-design#35883) (ant-design#35884)

* fix: 类型“FormListFieldData”上不存在属性“fieldKey”。(ant-design#35883)

* add deprecated tag to fieldKey

* add changelog

* Revert "add changelog"

This reverts commit 2cc174f.

* chore: update changelog script (ant-design#35916)

* docs: add typography format version

* fix: remove important in radio style (ant-design#35920)

* fix: remove important in radio style

* chore: code clean

* docs: correct types (ant-design#35919)

* docs: correct types

* ++

Co-authored-by: afc163 <[email protected]>

* test: migrate part of Button tests (ant-design#35869)

* test: migrate part of Affix tests (ant-design#35860)

* docs: add changelog 4.21.0 (ant-design#35915)

* docs: add changelog 4.21.0

* Update CHANGELOG.en-US.md

Co-authored-by: Amumu <[email protected]>

* Update CHANGELOG.zh-CN.md

Co-authored-by: Amumu <[email protected]>

* docs: add

* Update CHANGELOG.en-US.md

* docs: fix

* docs: add

* docs: update

* docs: fix

* docs: remove 35407

Co-authored-by: Amumu <[email protected]>

* Feat: support 'treeExpandAction' prop for TreeSelect (ant-design#35618)

* Feat: support 'treeExpandAction' prop for TreeSelect

* chore: bump rc-tree

* chore: fix lint

* fix: fix directory tree duplicate expandAction

* fix: fix directory tree duplicate expandAction

* fix: fix directory tree duplicate expandAction

* chore: add docs

Co-authored-by: zombiej <[email protected]>
Co-authored-by: afc163 <[email protected]>

* chore: bump bundle size of babel runtime

* docs: Update 4.21.0 changelog

* docs: fix tree demo (ant-design#35927)

* fix: Form.Item noStyle should not be affected by parent Form.Item (ant-design#35849)

* fix: Form.Item noStyle should not be affected by parent Form.Item

* test: update snapshot

* fix: status

* chore: code clean

* fix: modal and drawer

* test: fix lint

* chore: code clean

* refactor: noFormStyle

* chore: code clean

* revert: revert change in Form.Item

* chore: code clean

* test: replace test case with test library (ant-design#35925)

* test: replace test case with test library

* test: replace test case with test library

* test: update snapshots

* docs: clean up useless space

* test: refactor tree with testing lib (ant-design#35937)

* test: tree test

* test: clean up

* chore: bump rc-tree

* test: Update snapshot

* test: Update for react 18

* test: move test cases to testing lib (ant-design#35909)

* test: move test cases to testing lib (ant-design#35900)

* fix: menu items typings (ant-design#35790)

* Fix menu items typings

* add test case for menu item type checking

* fix: cubic-bezier should be animation-timing-function (ant-design#35943)

* fix: modify 'antd' to 'infrad' in loop-banner.md of alert

* fix: modify line-height value to @line-height-base of descriptions component

Co-authored-by: Camol <[email protected]>
Co-authored-by: kanweiwei <[email protected]>
Co-authored-by: zombiej <[email protected]>
Co-authored-by: afc163 <[email protected]>
Co-authored-by: qyzzzz <[email protected]>
Co-authored-by: [email protected] <[email protected]>
Co-authored-by: MadCcc <[email protected]>
Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
Co-authored-by: miracles1919 <[email protected]>
Co-authored-by: zhang lay <[email protected]>
Co-authored-by: Sukka <[email protected]>
Co-authored-by: Katsiaryna Pustakhod <[email protected]>
Co-authored-by: vagusX <[email protected]>
Co-authored-by: agarciaguillo <[email protected]>
Co-authored-by: Jesús Gallego Irles <[email protected]>
Co-authored-by: Dunqing <[email protected]>
Co-authored-by: Amumu <[email protected]>
Co-authored-by: Zack Chang <[email protected]>
Co-authored-by: 黑雨 <[email protected]>
Co-authored-by: lalalazero <[email protected]>
Co-authored-by: Dreamcreative <[email protected]>
Co-authored-by: Walid Cherhane <[email protected]>
Co-authored-by: PCCCCCCC <[email protected]>
Co-authored-by: linqiqi077 <[email protected]>
Co-authored-by: TrickyPi <[email protected]>
Co-authored-by: haipeng <[email protected]>
Co-authored-by: Yanlin Jiang <[email protected]>
Co-authored-by: Cooper Veysey <[email protected]>
Co-authored-by: shuaijiumei <[email protected]>
Co-authored-by: Karott Schu <[email protected]>
Co-authored-by: parabolazz <[email protected]>
Co-authored-by: Tom Xu <[email protected]>
Co-authored-by: Mykyta Velykanov <[email protected]>
Co-authored-by: 陈帅 <[email protected]>
Co-authored-by: Yanming Deng <[email protected]>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Co-authored-by: Ron Šmeral <[email protected]>
Co-authored-by: Ron Smeral <[email protected]>
Co-authored-by: dingkang <[email protected]>
Co-authored-by: Tony Wu <[email protected]>
Co-authored-by: limingxin <[email protected]>
Co-authored-by: ty888 <[email protected]>
Co-authored-by: Yuki Zhang <[email protected]>
Co-authored-by: 叶枫 <[email protected]>
Co-authored-by: joson <[email protected]>
Co-authored-by: hezhaoshun <[email protected]>
Co-authored-by: 周晨阳 <[email protected]>
Co-authored-by: 章鱼 <[email protected]>
Co-authored-by: Bart Piotrowski <[email protected]>
Co-authored-by: yykoypj <[email protected]>
Co-authored-by: Niyaz Akhmetov <[email protected]>
Co-authored-by: 社长长 <[email protected]>
Co-authored-by: chenkan1 <[email protected]>
Co-authored-by: zhao-huo-long <[email protected]>
Co-authored-by: Cong Zhang <[email protected]>
Co-authored-by: Long Hao (龙濠) <[email protected]>
Co-authored-by: Gabriel Haruki <[email protected]>
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
Co-authored-by: Renovate Bot <[email protected]>
Co-authored-by: Peach <[email protected]>
Co-authored-by: MrHadEnough <[email protected]>
Co-authored-by: slotDumpling <[email protected]>
Co-authored-by: Mehdi Salem Naraghi <[email protected]>
Co-authored-by: 郑国庆 <[email protected]>
Co-authored-by: z1399 <[email protected]>
Co-authored-by: Luobo Zhang <[email protected]>
Co-authored-by: xrkffgg <[email protected]>
Co-authored-by: chenxiang <[email protected]>
Co-authored-by: 元凛 <[email protected]>
Co-authored-by: kalykun <[email protected]>
Co-authored-by: Shang Song <[email protected]>
Co-authored-by: Heaven <[email protected]>
Co-authored-by: MasaoBlue <[email protected]>
  • Loading branch information
Show file tree
Hide file tree
Showing 841 changed files with 24,301 additions and 8,990 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/pr-check-ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -28,4 +28,4 @@ jobs:
success-review: true
success-merge: true
merge-method: 'merge'
merge-title: 'chore: auto merge branchs (#${number})'
merge-title: 'chore: auto merge branches (#${number})'
11 changes: 6 additions & 5 deletions .github/workflows/test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -138,7 +138,7 @@ jobs:
key: dist-${{ github.sha }}

- name: dist
run: npm run dist
run: CI=1 npm run dist
env:
NODE_OPTIONS: --max_old_space_size=4096
needs: setup
Expand Down Expand Up @@ -236,6 +236,7 @@ jobs:
matrix:
react: ['16', '17', '18']
module: ['dom', 'node', 'dist']
shard: ['1/2', '2/2']
env:
REACT: ${{ matrix.react }}
runs-on: ubuntu-latest
Expand Down Expand Up @@ -288,12 +289,11 @@ jobs:
# dom test
- name: dom test
if: ${{ matrix.module == 'dom' }}
run: npm test -- -w 1 --coverage
run: npm test -- --maxWorkers=2 --shard=${{matrix.shard}} --coverage

# > 17 only
- name: coverage
uses: codecov/codecov-action@v3
if: ${{ matrix.module == 'dom' && matrix.react == '17' }}
run: bash <(curl -s https://codecov.io/bash)

# node test
- name: node test
Expand Down Expand Up @@ -353,6 +353,7 @@ jobs:
matrix:
react: ['16', '17', '18']
module: [lib, es]
shard: ['1/2', '2/2']
env:
REACT: ${{ matrix.react }}
steps:
Expand Down Expand Up @@ -400,7 +401,7 @@ jobs:
- name: test
# lib only run in master branch not in pull request
if: ${{ github.event_name != 'pull_request' || matrix.module != 'lib' }}
run: npm test
run: npm test -- --maxWorkers=2 --shard=${{matrix.shard}}
env:
LIB_DIR: ${{ matrix.module }}
needs: compile
58 changes: 57 additions & 1 deletion CHANGELOG.en-US.md
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ timeline: true

| infrad version | antd version | update content | time |
| --- | --- | --- | --- |
| 4.20.6 | 4.20.6 | Synchronize the update of antd 4.20.6 version | 2022-05-30 |
| 4.21.0 | 4.21.0 | 1.Synchronize the update of antd 4.21.0 version<br/> 2.Modify a part of UI of table header | 2022-06-09 |
| 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 |
Expand All @@ -34,6 +34,62 @@ if you have some problem, welcome to connect `[email protected]` or `lay.z

---

## 4.21.0

`2022-06-06`

- 🔥 Add Form level control input component `disabled`. [#35210](https://github.com/ant-design/ant-design/pull/35210) [@heiyu4585](https://github.com/heiyu4585)
- 🆕 Tabs support `popupClassName` for more Dropdown. [#35892](https://github.com/ant-design/ant-design/pull/35892)
- 🆕 Table `rowSelection.onChange` support `info.type` param. [#35598](https://github.com/ant-design/ant-design/pull/35598)
- 🆕 The `copyable` prop of Typography.Paragraph supports to reset the mime type of the clipboardData by the `format`. [#35219](https://github.com/ant-design/ant-design/pull/35219) [@kanweiwei](https://github.com/kanweiwei)
- 🆕 TreeSelect support `treeExpandAction`. [#35618](https://github.com/ant-design/ant-design/pull/35618) [@NE-SmallTown](https://github.com/NE-SmallTown)
- ConfigProvider
- 🆕 ConfigProvider support config Pagination `showSizeChanger`. [#35750](https://github.com/ant-design/ant-design/pull/35750)
- 🆕 ConfigProvider support `componentDisabled` to config components `disabled` status. [#35718](https://github.com/ant-design/ant-design/pull/35718)
- 🛠 Refactor ConfigProvider removing default `renderEmpty` to resolve dist circle deps. [#35570](https://github.com/ant-design/ant-design/pull/35570)
- Collapse
- 🛠 Refactor Collapse to keep stable dom structure with header content. [#35781](https://github.com/ant-design/ant-design/pull/35781)
- 🛠 Refactor Collapse `expandIconPosition` with logical position `start` or `end` to resolve RTL style issue. [#35770](https://github.com/ant-design/ant-design/pull/35770)
- Progress
- 🆕 Progress steps support custom strokeColor for each step. [#35855](https://github.com/ant-design/ant-design/pull/35855)
- 🛠 Refactor Progress `type="circle"` and `type="dashboard"` for simpler dom structure and better rendering. [#35433](https://github.com/ant-design/ant-design/pull/35433)
- 🛠 Refactor Progress to React hooks. [#35393](https://github.com/ant-design/ant-design/pull/35393) [@shuaijiumei](https://github.com/shuaijiumei)
- 🐞 Fix Progress percent accuracy issue when near 100%. [#35433](https://github.com/ant-design/ant-design/pull/35433)
- 🐞 Fix Progress `gapDegree` displayed with wrong degree when `type="dashboard"`. [#35433](https://github.com/ant-design/ant-design/pull/35433)
- 💄 Fix Progress border radius style when `type="line"` and `strokeLinecap="butt"`. [#35822](https://github.com/ant-design/ant-design/pull/35822)
- Dropdown
- 🆕 Dropdown support `autoFocus` to focus elements in `overlay` automaticly when opened. [#35391](https://github.com/ant-design/ant-design/pull/35391)
- 🛠 Fix Dropdown nesting menu injection logic. [#35810](https://github.com/ant-design/ant-design/pull/35810)
- Card
- 🛠 Refactor Card `loading` with Skeleton. [#35525](https://github.com/ant-design/ant-design/pull/35525)
- 🛠 Refactor Card style to use flex instead of float. [#35236](https://github.com/ant-design/ant-design/pull/35236) [@miracles1919](https://github.com/miracles1919)
- 🛠 DatePicker refactored to React hooks. [#35425](https://github.com/ant-design/ant-design/pull/35425) [@heiyu4585](https://github.com/heiyu4585)
- 🛠 Rename className of Pagination `mini` mode with `ant-pagination-mini`. [#35881](https://github.com/ant-design/ant-design/pull/35881)
- 🛠 Refactor Popconfirm internal realize with Popover component. [#35676](https://github.com/ant-design/ant-design/pull/35676)
- 🛠 Change the implementation of the bottom button layout of the Modal confirm component. [#35530](https://github.com/ant-design/ant-design/pull/35530) [@foryuki](https://github.com/foryuki)
- 🐞 Fix the Wave effect does not work in React 18 strict mode. [#35889](https://github.com/ant-design/ant-design/pull/35889) [@Carrotzpc](https://github.com/Carrotzpc)
- 🐞 Fix Drawer close twice `children` will undefined. [#35853](https://github.com/ant-design/ant-design/pull/35853) [@crazyair](https://github.com/crazyair)
- Skeleton
- 💄 Remove Skeleton default `margin-top` style. [#35848](https://github.com/ant-design/ant-design/pull/35848)
- 💄 Optimize Skeleton `active` animation perfermance. [#35836](https://github.com/ant-design/ant-design/pull/35836) [@slotDumpling](https://github.com/slotDumpling)
- 💄 Remove `!important` in Radio style with `disabled`. [#35920](https://github.com/ant-design/ant-design/pull/35920)
- TypeScript
- 🤖 Fix Form.List type `FormListFieldData` missing property `fieldKey`. [#35884](https://github.com/ant-design/ant-design/pull/35884) [@nanianlisao](https://github.com/nanianlisao)
- 🌐 Localization
- 🇹🇲 Add a new locale `tk_TK`. [#35605](https://github.com/ant-design/ant-design/pull/35605)
- RTL
- 💄 Fix the wrong direction of `border` and `border-radius` for InputNumber and Input in RTL mode. [#35876](https://github.com/ant-design/ant-design/pull/35876) [@yykoypj](https://github.com/yykoypj)

## 4.20.7

`2022-05-30`

- 🐞 Fix Drawer form instance lost bug when opened. [#35706](https://github.com/ant-design/ant-design/pull/35706) [@crazyair](https://github.com/crazyair)
- 🐞 Fix Segmented options invalid space between icon and text when using the icon prop. [#35701](https://github.com/ant-design/ant-design/pull/35701)
- 💄 Optimize Popover arrow style. [#35717](https://github.com/ant-design/ant-design/pull/35717)
- TypeScript
- 🤖 Fix Card type hints problem. [#35753](https://github.com/ant-design/ant-design/pull/35753)

## 4.20.6

`2022-05-22`
Expand Down
57 changes: 57 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.21.0 | 4.21.0 | 1.同步 antd 4.21.0 版本的更新<br/>2.修改 table 表头部分 UI | 2022-06-09 |
| 4.20.6 | 4.20.6 | 同步 antd 4.20.6 版本的更新 | 2022-05-30 |
| 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 |
Expand All @@ -34,6 +35,62 @@ timeline: true

---

## 4.21.0

`2022-06-06`

- 🔥 新增 Form 级别控制输入组件 `disabled`[#35210](https://github.com/ant-design/ant-design/pull/35210) [@heiyu4585](https://github.com/heiyu4585)
- 🆕 Tabs 组件支持 `popupClassName` 用于更多菜单。[#35892](https://github.com/ant-design/ant-design/pull/35892)
- 🆕 Table 组件 `rowSelection.onChange` 新增 `info.type` 参数。[#35598](https://github.com/ant-design/ant-design/pull/35598)
- 🆕 Typography.Paragraph 的 `copyable` 属性支持 `format` 以重置剪切板数据的 Mime Type。[#35219](https://github.com/ant-design/ant-design/pull/35219) [@kanweiwei](https://github.com/kanweiwei)
- 🆕 TreeSelect 支持 `treeExpandAction` 定义展开操作。[#35618](https://github.com/ant-design/ant-design/pull/35618) [@NE-SmallTown](https://github.com/NE-SmallTown)
- ConfigProvider
- 🆕 ConfigProvider 支持全局配置 Pagination `showSizeChanger` 属性。[#35750](https://github.com/ant-design/ant-design/pull/35750)
- 🆕 ConfigProvider 支持 `componentDisabled` 来配置组件禁用状态。[#35718](https://github.com/ant-design/ant-design/pull/35718)
- 🛠 重构 ConfigProvider 移除默认的 `renderEmpty` 方法以解决打包循环依赖的问题。[#35570](https://github.com/ant-design/ant-design/pull/35570)
- Collapse
- 🛠 重构 Collapse 标题部分以确保其稳定的 DOM 结构易于样式选择。[#35781](https://github.com/ant-design/ant-design/pull/35781)
- 🛠 重构 Collapse `expandIconPosition` 为逻辑位置 `start``end` 以解决 RTL 下的样式问题。[#35770](https://github.com/ant-design/ant-design/pull/35770)
- Progress
- 🆕 Progress 分步进度条支持单独自定义色彩。[#35855](https://github.com/ant-design/ant-design/pull/35855)
- 🛠 重构 Progress `type="circle"``type="dashboard"` 以简化 dom 结构和带来更好的渲染效果。[#35433](https://github.com/ant-design/ant-design/pull/35433)
- 🛠 重构 Progress 成 React hooks。[#35393](https://github.com/ant-design/ant-design/pull/35393) [@shuaijiumei](https://github.com/shuaijiumei)
- 🐞 修复 Progress 进度接近 100% 间距几乎消失的问题。[#35433](https://github.com/ant-design/ant-design/pull/35433)
- 🐞 修复 Progress `type="dashboard"``gapDegree` 角度不准确的问题。[#35433](https://github.com/ant-design/ant-design/pull/35433)
- 💄 修复 Progress `type="line"``strokeLinecap="butt"` 时的圆角样式。[#35822](https://github.com/ant-design/ant-design/pull/35822)
- Dropdown
- 🆕 Dropdown 支持 `autoFocus` 属性,打开时自动聚焦下拉单。[#35391](https://github.com/ant-design/ant-design/pull/35391)
- 🛠 修复 Dropdown 嵌套菜单注入逻辑。[#35810](https://github.com/ant-design/ant-design/pull/35810)
- Card
- 🛠 使用 Skeleton 重构 Card `loading` 属性。[#35525](https://github.com/ant-design/ant-design/pull/35525)
- 🛠 重构 Card 样式用 flex 代替 float。[#35236](https://github.com/ant-design/ant-design/pull/35236) [@miracles1919](https://github.com/miracles1919)
- 🛠 DatePicker 重构成 React hooks。[#35425](https://github.com/ant-design/ant-design/pull/35425) [@heiyu4585](https://github.com/heiyu4585)
- 🛠 将 Pagination `mini` 模式的 className 重命名为 `ant-pagination-mini`[#35881](https://github.com/ant-design/ant-design/pull/35881)
- 🛠 重构 Popconfirm 内部实现为 Popover 组件。[#35676](https://github.com/ant-design/ant-design/pull/35676)
- 🛠 改变 Modal confirm 组件底部按钮布局实现方式。[#35530](https://github.com/ant-design/ant-design/pull/35530) [@foryuki](https://github.com/foryuki)
- 🐞 修复波浪效果在 React 18 严格模式不生效的问题。[#35889](https://github.com/ant-design/ant-design/pull/35889) [@Carrotzpc](https://github.com/Carrotzpc)
- 🐞 修复 Drawer 关闭 2 次后 `children` 为 undefined 的问题。[#35853](https://github.com/ant-design/ant-design/pull/35853) [@crazyair](https://github.com/crazyair)
- Skeleton
- 💄 移除 Skeleton 默认的 `margin-top` 以便在默认情况下更对称。[#35848](https://github.com/ant-design/ant-design/pull/35848)
- 💄 优化 Skeleton `active` 的动画性能。[#35836](https://github.com/ant-design/ant-design/pull/35836) [@slotDumpling](https://github.com/slotDumpling)
- 💄 移除 Radio 禁用状态时样式中的 `!important`[#35920](https://github.com/ant-design/ant-design/pull/35920)
- TypeScript
- 🤖 修复 Form.List 类型 `FormListFieldData` 缺失属性 `fieldKey`[#35884](https://github.com/ant-design/ant-design/pull/35884) [@nanianlisao](https://github.com/nanianlisao)
- 🌐 国际化
- 🇹🇲 添加土库曼语国际化。[#35605](https://github.com/ant-design/ant-design/pull/35605)
- RTL
- 💄 修正 Input 和 InputNumber 的 `border``border-radius` 在 RTL 模式下的方向问题。[#35876](https://github.com/ant-design/ant-design/pull/35876) [@yykoypj](https://github.com/yykoypj)

## 4.20.7

`2022-05-30`

- 🐞 修复 Drawer 打开时 form 实例为 null 的问题。[#35706](https://github.com/ant-design/ant-design/pull/35706) [@crazyair](https://github.com/crazyair)
- 🐞 修复 Segmented 组件中选项使用 icon 属性时图标与文字之间的间距失效问题。[#35701](https://github.com/ant-design/ant-design/pull/35701)
- 💄 优化 Popover 的箭头效果。[#35717](https://github.com/ant-design/ant-design/pull/35717)
- TypeScript
- 🤖 修复 Card 组件的类型提示。[#35753](https://github.com/ant-design/ant-design/pull/35753)

## 4.20.6

`2022-05-22`
Expand Down
7 changes: 4 additions & 3 deletions components/_util/wave.tsx
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
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 { composeRef, supportRef } from 'rc-util/lib/ref';
import * as React from 'react';
import type { ConfigConsumerProps, CSPConfig } from '../config-provider';
import { ConfigConsumer, ConfigContext } from '../config-provider';
import raf from './raf';
import { cloneElement } from './reactNode';

let styleForPseudo: HTMLStyleElement | null;
Expand Down Expand Up @@ -55,6 +55,7 @@ export default class Wave extends React.Component<WaveProps> {
context: ConfigConsumerProps;

componentDidMount() {
this.destroyed = false;
const node = this.containerRef.current as HTMLDivElement;
if (!node || node.nodeType !== 1) {
return;
Expand Down
50 changes: 34 additions & 16 deletions components/affix/__tests__/Affix.test.tsx
Original file line number Diff line number Diff line change
@@ -1,13 +1,13 @@
import React from 'react';
import type { ReactWrapper } from 'enzyme';
import { mount } from 'enzyme';
import type { AffixProps, AffixState } from '..';
import React from 'react';
import type { AffixProps, AffixState, InternalAffixClass } from '..';
import Affix from '..';
import { getObserverEntities } from '../utils';
import Button from '../../button';
import rtlTest from '../../../tests/shared/rtlTest';
import accessibilityTest from '../../../tests/shared/accessibilityTest';
import { sleep, render } from '../../../tests/utils';
import rtlTest from '../../../tests/shared/rtlTest';
import { render, sleep } from '../../../tests/utils';
import Button from '../../button';
import { getObserverEntities } from '../utils';

const events: Partial<Record<keyof HTMLElementEventMap, (ev: Partial<Event>) => void>> = {};

Expand Down Expand Up @@ -60,7 +60,6 @@ describe('Affix Render', () => {

const domMock = jest.spyOn(HTMLElement.prototype, 'getBoundingClientRect');
let affixMounterWrapper: ReactWrapper<unknown, unknown, AffixMounter>;
let affixWrapper: ReactWrapper<AffixProps, AffixState, React.Component<AffixProps, AffixState>>;

const classRect: Record<string, DOMRect> = {
container: {
Expand Down Expand Up @@ -143,15 +142,35 @@ describe('Affix Render', () => {
});

describe('updatePosition when target changed', () => {
it('function change', () => {
it('function change', async () => {
document.body.innerHTML = '<div id="mounter" />';
const container = document.querySelector('#id') as HTMLDivElement;
const getTarget = () => container;
affixWrapper = mount(<Affix target={getTarget}>{null}</Affix>);
affixWrapper.setProps({ target: () => null });
expect(affixWrapper.find('Affix').last().state().status).toBe(0);
expect(affixWrapper.find('Affix').last().state().affixStyle).toBe(undefined);
expect(affixWrapper.find('Affix').last().state().placeholderStyle).toBe(undefined);
let affixInstance: InternalAffixClass;
const { rerender } = render(
<Affix
ref={node => {
affixInstance = node as InternalAffixClass;
}}
target={getTarget}
>
{null}
</Affix>,
);
rerender(
<Affix
ref={node => {
affixInstance = node as InternalAffixClass;
}}
target={() => null}
>
{null}
</Affix>,
);
expect(affixInstance!.state.status).toBe(0);
expect(affixInstance!.state.affixStyle).toBe(undefined);
expect(affixInstance!.state.placeholderStyle).toBe(undefined);
await sleep(100);
});

it('instance change', async () => {
Expand All @@ -163,13 +182,12 @@ describe('Affix Render', () => {

const originLength = getObserverLength();
const getTarget = () => target;
affixWrapper = mount(<Affix target={getTarget}>{null}</Affix>);
const { rerender } = render(<Affix target={getTarget}>{null}</Affix>);
await sleep(100);

expect(getObserverLength()).toBe(originLength + 1);
target = null;
affixWrapper.setProps({});
affixWrapper.update();
rerender(<Affix>{null}</Affix>);
await sleep(100);
expect(getObserverLength()).toBe(originLength);
});
Expand Down
2 changes: 1 addition & 1 deletion components/affix/demo/basic.md
Original file line number Diff line number Diff line change
Expand Up @@ -14,8 +14,8 @@ title:
The simplest usage.

```tsx
import React, { useState } from 'react';
import { Affix, Button } from 'infrad';
import React, { useState } from 'react';

const App: React.FC = () => {
const [top, setTop] = useState(10);
Expand Down
2 changes: 1 addition & 1 deletion components/affix/demo/debug.md
Original file line number Diff line number Diff line change
Expand Up @@ -15,8 +15,8 @@ DEBUG
DEBUG

```tsx
import React, { useState } from 'react';
import { Affix, Button } from 'infrad';
import React, { useState } from 'react';

const App: React.FC = () => {
const [top, setTop] = useState(10);
Expand Down
2 changes: 1 addition & 1 deletion components/affix/demo/on-change.md
Original file line number Diff line number Diff line change
Expand Up @@ -14,8 +14,8 @@ title:
Callback with affixed state.

```tsx
import React from 'react';
import { Affix, Button } from 'infrad';
import React from 'react';

const App: React.FC = () => (
<Affix offsetTop={120} onChange={affixed => console.log(affixed)}>
Expand Down
2 changes: 1 addition & 1 deletion components/affix/demo/target.md
Original file line number Diff line number Diff line change
Expand Up @@ -14,8 +14,8 @@ title:
Set a `target` for 'Affix', which is listen to scroll event of target element (default is `window`).

```tsx
import React, { useState } from 'react';
import { Affix, Button } from 'infrad';
import React, { useState } from 'react';

const App: React.FC = () => {
const [container, setContainer] = useState<HTMLDivElement | null>(null);
Expand Down
12 changes: 7 additions & 5 deletions components/affix/index.tsx
Original file line number Diff line number Diff line change
@@ -1,17 +1,17 @@
import * as React from 'react';
import classNames from 'classnames';
import omit from 'rc-util/lib/omit';
import ResizeObserver from 'rc-resize-observer';
import omit from 'rc-util/lib/omit';
import * as React from 'react';
import type { ConfigConsumerProps } from '../config-provider';
import { ConfigContext } from '../config-provider';
import { throttleByAnimationFrameDecorator } from '../_util/throttleByAnimationFrame';

import {
addObserveTarget,
removeObserveTarget,
getTargetRect,
getFixedTop,
getFixedBottom,
getFixedTop,
getTargetRect,
removeObserveTarget,
} from './utils';

function getDefaultTarget() {
Expand Down Expand Up @@ -296,6 +296,8 @@ class Affix extends React.Component<InternalAffixProps, AffixState> {
);
}
}
// just use in test
export type InternalAffixClass = Affix;

const AffixFC = React.forwardRef<Affix, AffixProps>((props, ref) => {
const { prefixCls: customizePrefixCls } = props;
Expand Down
Loading

0 comments on commit 4a6cef3

Please sign in to comment.