Compare commits

...

105 Commits

Author SHA1 Message Date
lijianan
d9edfbf381 Merge branch 'master' into test-eslint 2026-02-08 23:35:43 +08:00
lijianan
d27b99a381 update 2026-02-08 23:34:20 +08:00
lijianan
cd869ffb2d test: update Chinese detected test case 2026-02-08 23:32:47 +08:00
lijianan
5a8351b142 test: update 2026-02-08 21:42:00 +08:00
lijianan
f09e41ec8d demo: fix Radio demo style (#56903)
* demo: fix Radio demo style

* update snap
2026-02-08 20:23:52 +08:00
thinkasany
cee829816a fix: add drawer styles.content / classNames.content warning (#56898) 2026-02-08 15:44:06 +08:00
renovate[bot]
19d7bfb1d5 chore(deps): update dependency @types/node 25.2.2 (#56822)
* chore(deps): update dependency @types/react to v19.2.10

* Update package.json

Signed-off-by: thinkasany <480968828@qq.com>

* bump @types/node

---------

Signed-off-by: thinkasany <480968828@qq.com>
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
Co-authored-by: thinkasany <480968828@qq.com>
2026-02-08 14:27:13 +08:00
renovate[bot]
38be7055d1 chore(deps): update dependency @eslint-react/eslint-plugin to v2.12.2 (#56897)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
Co-authored-by: thinkasany <480968828@qq.com>
2026-02-08 13:33:32 +08:00
lijianan
8e7ff042cd Revert "site(a11y): apply prefers-reduced-motion handling for transitions (#5…" (#56896)
This reverts commit 191db91774.
2026-02-08 13:32:54 +08:00
thinkasany
7cb9ca9336 chore: bump @antfu/eslint-config 7.3.0 (#56895) 2026-02-07 22:53:24 +08:00
lijianan
72c0b2c8ae refactor(cssinjs): simplify transition style generation (#56894)
* refactor(cssinjs): simplify transition style generation

* refactor(cssinjs): simplify transition style generation
2026-02-07 16:31:57 +08:00
thinkasany
c9e3977d63 chore: bump eslint@10.0.0 (#56893) 2026-02-07 15:17:12 +08:00
thinkasany
efb64f513f fix: Allow skip demo image (#56890)
Co-authored-by: lijianan <574980606@qq.com>
2026-02-07 11:51:29 +08:00
github-actions[bot]
776aa384e8 chore: upgrade deps (#56891)
Co-authored-by: afc163 <507615+afc163@users.noreply.github.com>
2026-02-07 02:37:10 +08:00
dependabot[bot]
827be4cceb chore: bump antd-img-crop from 4.27.0 to 4.28.0 in the dev-dependencies group (#56878)
* bump antd-img-crop

* refactor accessibilityDemoTest

* fix

---------

Co-authored-by: thinkasany <480968828@qq.com>
2026-02-06 23:36:54 +08:00
dependabot[bot]
1b36dafadc chore: bump @eslint-react/eslint-plugin from 2.9.4 to 2.11.0 (#56879)
* chore: bump @eslint-react/eslint-plugin from 2.9.4 to 2.11.0

Bumps [@eslint-react/eslint-plugin](https://github.com/Rel1cx/eslint-react/tree/HEAD/packages/plugins/eslint-plugin) from 2.9.4 to 2.11.0.
- [Release notes](https://github.com/Rel1cx/eslint-react/releases)
- [Changelog](https://github.com/Rel1cx/eslint-react/blob/main/CHANGELOG.md)
- [Commits](https://github.com/Rel1cx/eslint-react/commits/v2.11.0/packages/plugins/eslint-plugin)

---
updated-dependencies:
- dependency-name: "@eslint-react/eslint-plugin"
  dependency-version: 2.11.0
  dependency-type: direct:development
  update-type: version-update:semver-minor
...

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

* turn off react/no-implicit-key

---------

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Co-authored-by: thinkasany <480968828@qq.com>
2026-02-06 21:11:17 +08:00
二货爱吃白萝卜
2950b7da98 fix(tooltip): rename arrow-offset-horizontal to arrow-offset-x CSS variable to fix transformOrigin (#56887)
The variable name was inconsistent and caused transformOrigin to not properly reference
the arrow position for animations.

Co-authored-by: Claude Opus 4.6 <noreply@anthropic.com>
2026-02-06 14:37:55 +08:00
github-actions[bot]
8a16c49f5c chore: upgrade deps (#56877)
Co-authored-by: afc163 <507615+afc163@users.noreply.github.com>
Co-authored-by: thinkasany <480968828@qq.com>
2026-02-06 13:36:50 +08:00
二货爱吃白萝卜
bbb0683ab6 fix(button): add theme-aware preset color hover/active tokens (#56872)
* fix(button): add theme-aware preset color hover/active tokens

Add ${colorKey}Hover and ${colorKey}Active tokens that swap values based on dark/light mode for improved contrast and user experience.

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>

* fix: add preset color hover/active tokens for consistent button interaction

- Add xxxHover and xxxActive tokens for preset colors in genColorMapToken
- Override these tokens in dark mode to swap hover/active values
- Update ButtonToken type to include PresetColorHoverActiveMap
- Update button variant styles to use new hover/active tokens
- Fix #56656: button hover/active state inconsistency in dark mode

* test: add @csstools to compileModules

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>

* test: support .mjs files in Jest configuration

- Updated .jest.js transform pattern to include .mjs files
- Simplified .jest.node.js transform patterns
- Added jest-mjs-transformer.js for babel-jest mjs handling

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>

* test: remove unused jest-mjs-transformer.js

- Removed jest-mjs-transformer.js as it's no longer used
- .mjs files are now handled by the updated transform patterns in Jest configs

* test: add .mjs support to .jest.image.js

- Updated .jest.image.js transform pattern to include .mjs files
- fixes image test failures due to ES module parsing errors

---------

Co-authored-by: Claude Opus 4.5 <noreply@anthropic.com>
2026-02-06 11:10:41 +08:00
二货爱吃白萝卜
99eb877828 test(modal): add mouseDown event before click in test (#56874)
* test(modal): add mouseDown event before click in test

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>

* test(modal): add mouseDown event before click in confirm test

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>

* test(modal): improve confirm test event firing and timer management

- Add mouseDown event before click for mask interaction
- Use fireEvent consistently instead of direct click()
- Properly setup and cleanup fake timers

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>

---------

Co-authored-by: Claude Opus 4.5 <noreply@anthropic.com>
2026-02-05 22:13:14 +08:00
二货爱吃白萝卜
9673185fbf chore: lock antd-img-crop to ~4.27.0 (#56869)
Co-authored-by: Claude Opus 4.5 <noreply@anthropic.com>
2026-02-05 15:20:44 +08:00
Wanpan
d2d124d305 fix(upload): add height to picture card style (#56864) 2026-02-05 09:55:48 +08:00
二货爱吃白萝卜
6e91b7f8af docs: Use direct dumi code demo instead of sandpack (#56862)
* docs(replace): replace sandpack demos with code blocks in customize-theme.en-US.md

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>

* docs: update demo paths in theme customization docs

* docs: add first example demo and update documentation

* docs(demo): add Radio component to disable-motion example

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>

* fix(demo): initialize timerRef with null for proper typing

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>

---------

Co-authored-by: Claude Opus 4.5 <noreply@anthropic.com>
2026-02-04 20:37:02 +08:00
Tarek BAZINE
d442e3e1a6 fix: Update reference URL in font specification (#56859)
* fix: Update reference URL in font specification

Signed-off-by: Tarek BAZINE <et_bazine@esi.dz>

* Update docs/spec/font.en-US.md

Co-authored-by: gemini-code-assist[bot] <176961590+gemini-code-assist[bot]@users.noreply.github.com>
Signed-off-by: 二货爱吃白萝卜 <smith3816@gmail.com>

* Update references in font specification document

Signed-off-by: 二货爱吃白萝卜 <smith3816@gmail.com>

---------

Signed-off-by: Tarek BAZINE <et_bazine@esi.dz>
Signed-off-by: 二货爱吃白萝卜 <smith3816@gmail.com>
Co-authored-by: 二货爱吃白萝卜 <smith3816@gmail.com>
Co-authored-by: gemini-code-assist[bot] <176961590+gemini-code-assist[bot]@users.noreply.github.com>
2026-02-04 17:46:35 +08:00
lijianan
1a789f1e5b refactor(cssinjs): simplify transition style generation (#56826)
* chore: code optimization

* update
2026-02-04 14:54:08 +08:00
dependabot[bot]
45d8f9a2d4 chore: bump @eslint-react/eslint-plugin from 2.9.3 to 2.9.4 (#56850)
Bumps [@eslint-react/eslint-plugin](https://github.com/Rel1cx/eslint-react/tree/HEAD/packages/plugins/eslint-plugin) from 2.9.3 to 2.9.4.
- [Release notes](https://github.com/Rel1cx/eslint-react/releases)
- [Changelog](https://github.com/Rel1cx/eslint-react/blob/main/CHANGELOG.md)
- [Commits](https://github.com/Rel1cx/eslint-react/commits/v2.9.4/packages/plugins/eslint-plugin)

---
updated-dependencies:
- dependency-name: "@eslint-react/eslint-plugin"
  dependency-version: 2.9.4
  dependency-type: direct:development
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2026-02-04 09:11:56 +08:00
高艳兵
3810d1dc6a fix(button): make tokens take effect (#56842)
* refactor(button): rework component-token demo

* fix(button): linkHoverBg token not work

* fix(button): enable ghostBg for outlined and dashed ghost

* fix(button): make defaultBgDisabled take effect

* fix(button): apply paddingBlock tokens to vertical padding

* fix(button): apply contentLineHeight tokens to button line-height

* fix: token.defaultBgDisabled

* revert(button): drop contentLineHeight and paddingBlock changes

* chore(button): remove unused tokens from component-token demo
2026-02-03 14:18:27 +08:00
dependabot[bot]
ef32250465 chore: bump @eslint-react/eslint-plugin from 2.8.4 to 2.9.3 (#56843)
Bumps [@eslint-react/eslint-plugin](https://github.com/Rel1cx/eslint-react/tree/HEAD/packages/plugins/eslint-plugin) from 2.8.4 to 2.9.3.
- [Release notes](https://github.com/Rel1cx/eslint-react/releases)
- [Changelog](https://github.com/Rel1cx/eslint-react/blob/main/CHANGELOG.md)
- [Commits](https://github.com/Rel1cx/eslint-react/commits/v2.9.3/packages/plugins/eslint-plugin)

---
updated-dependencies:
- dependency-name: "@eslint-react/eslint-plugin"
  dependency-version: 2.9.3
  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>
Co-authored-by: thinkasany <480968828@qq.com>
2026-02-03 11:25:31 +08:00
thinkasany
d71e9ffb0d chore: rm overrides deps (#56840)
* test

* test

* fix

* turn off ESLINT_CACHE

* rm
2026-02-03 10:55:29 +08:00
lijianan
955afb14f4 chore: update date (#56837)
* chore: update date

* update

* Update package.json

Signed-off-by: thinkasany <480968828@qq.com>

---------

Signed-off-by: thinkasany <480968828@qq.com>
Co-authored-by: thinkasany <480968828@qq.com>
2026-02-02 23:05:22 +08:00
thinkasany
443abf2ebe chore: ci failed (#56838)
Co-authored-by: 遇见同学 <1875694521@qq.com>
2026-02-02 23:04:44 +08:00
thinkasany
1931606b97 chore: bump jsdom@28 (#56835)
* chore: bump jsdom@28

* Update tests/setup.ts

Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
Signed-off-by: thinkasany <480968828@qq.com>

---------

Signed-off-by: thinkasany <480968828@qq.com>
Signed-off-by: meet-student <1875694521@qq.com>
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
2026-02-02 22:54:16 +08:00
thinkasany
ceddbda113 chore: lock @eslint-react/eslint-plugin 2.8.4 (#56836)
* chore: lock @eslint-react/eslint-plugin 2.9.1

* update

* fix

---------

Co-authored-by: 遇见同学 <1875694521@qq.com>
2026-02-02 22:38:07 +08:00
huangkevin-apr
41a5b2fe9e chore(a11y): add title element to search bar icon for screen readers (#56521)
* fix(a11y): add title element to search bar icon for screen readers

* Revert "fix(a10y): add title element to search bar icon for screen readers"

This reverts commit 9caf0bbc4e.

* fix: the svg elements has no accessible name

---------

Co-authored-by: thinkasany <480968828@qq.com>
2026-02-02 21:35:51 +08:00
二货爱吃白萝卜
08f23516a0 fix: antd umd build (#56830)
* chore: debug of ci

* chore: debug of ci

* chore: clean up

* use ut

---------

Co-authored-by: thinkasany <480968828@qq.com>
2026-02-02 21:04:19 +08:00
dependabot[bot]
5a0f141ddc chore: bump dawidd6/action-download-artifact from 13 to 14 (#56834)
Bumps [dawidd6/action-download-artifact](https://github.com/dawidd6/action-download-artifact) from 13 to 14.
- [Release notes](https://github.com/dawidd6/action-download-artifact/releases)
- [Commits](https://github.com/dawidd6/action-download-artifact/compare/v13...v14)

---
updated-dependencies:
- dependency-name: dawidd6/action-download-artifact
  dependency-version: '14'
  dependency-type: direct:production
  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>
2026-02-02 20:52:33 +08:00
afc163
20f8a9a9ed chore: bump version to 6.2.3 (#56813)
* chore: bump version to 6.2.3

* docs: update AGENTS.md with comprehensive development guidelines

* Update CHANGELOG.zh-CN.md

Co-authored-by: lijianan <574980606@qq.com>
Signed-off-by: afc163 <afc163@gmail.com>

* Update CHANGELOG.en-US.md

Signed-off-by: afc163 <afc163@gmail.com>

* Update CHANGELOG.zh-CN.md

Signed-off-by: afc163 <afc163@gmail.com>

---------

Signed-off-by: afc163 <afc163@gmail.com>
Co-authored-by: lijianan <574980606@qq.com>
2026-02-02 14:57:45 +08:00
dependabot[bot]
f20a3d6fba chore: bump eslint-plugin-react-refresh from 0.4.26 to 0.5.0 (#56828)
Bumps [eslint-plugin-react-refresh](https://github.com/ArnaudBarre/eslint-plugin-react-refresh) from 0.4.26 to 0.5.0.
- [Release notes](https://github.com/ArnaudBarre/eslint-plugin-react-refresh/releases)
- [Changelog](https://github.com/ArnaudBarre/eslint-plugin-react-refresh/blob/main/CHANGELOG.md)
- [Commits](https://github.com/ArnaudBarre/eslint-plugin-react-refresh/compare/v0.4.26...v0.5.0)

---
updated-dependencies:
- dependency-name: eslint-plugin-react-refresh
  dependency-version: 0.5.0
  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>
2026-02-02 09:15:08 +08:00
lijianan
191db91774 site(a11y): apply prefers-reduced-motion handling for transitions (#56823)
* site(a11y): apply prefers-reduced-motion handling for transitions

* site(a11y): apply prefers-reduced-motion handling for transitions
2026-02-01 17:52:13 +08:00
renovate[bot]
a28f8aa863 chore(deps): update dependency @types/react to v19.2.9 (#56819)
* chore(deps): update dependency @types/react to v19.2.10

* improve type

* update

---------

Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
Co-authored-by: thinkasany <480968828@qq.com>
2026-02-01 10:26:09 +08:00
renovate[bot]
4ab4a826c9 chore(deps): update dawidd6/action-download-artifact action to v13 (#56820)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2026-02-01 09:44:45 +08:00
Rain120
ffbf6e3024 docs: style issues in site design tabs (#56810)
Co-authored-by: 遇见同学 <1875694521@qq.com>
2026-01-30 17:27:22 +08:00
高艳兵
4b9085624b chore: merge duplicate debug demos (#56809)
* chore(Button): remove debug demo

* feat: update snap
2026-01-30 15:34:38 +08:00
ug
7dd385bb43 fix(Button): defaultBg, defaultColor, defaultHoverColor and defaultActiveColor token does not work (#56238)
* fix(Button): token does not work

* Update components/button/style/variant.ts

Co-authored-by: gemini-code-assist[bot] <176961590+gemini-code-assist[bot]@users.noreply.github.com>
Signed-off-by: ug <62086147+ug-hero@users.noreply.github.com>

* update

* fix

* Update components/button/demo/component-token.tsx

Co-authored-by:  高艳兵 <66234749+QDyanbing@users.noreply.github.com>
Signed-off-by: thinkasany <480968828@qq.com>

* format

* Update components/button/style/variant.ts

Co-authored-by:  高艳兵 <66234749+QDyanbing@users.noreply.github.com>
Signed-off-by: thinkasany <480968828@qq.com>

* Update components/button/style/variant.ts

Co-authored-by:  高艳兵 <66234749+QDyanbing@users.noreply.github.com>
Signed-off-by: thinkasany <480968828@qq.com>

---------

Signed-off-by: ug <62086147+ug-hero@users.noreply.github.com>
Signed-off-by: thinkasany <480968828@qq.com>
Co-authored-by: liuqiang <qiang.liu@xinjifamily.com>
Co-authored-by: gemini-code-assist[bot] <176961590+gemini-code-assist[bot]@users.noreply.github.com>
Co-authored-by: 遇见同学 <1875694521@qq.com>
Co-authored-by: thinkasany <480968828@qq.com>
Co-authored-by: 高艳兵 <66234749+QDyanbing@users.noreply.github.com>
2026-01-30 14:44:38 +08:00
二货爱吃白萝卜
44a4161dd8 fix: Textarea ref miss nativeElement (#56803)
* fix: Textarea miss nativeElement

* chore: update snap

---------

Co-authored-by: 遇见同学 <1875694521@qq.com>
2026-01-30 09:56:00 +08:00
github-actions[bot]
10e43e1405 chore: upgrade deps (#56805)
Co-authored-by: afc163 <507615+afc163@users.noreply.github.com>
2026-01-30 07:00:34 +08:00
高艳兵
93fb6c35e2 chore(test): merge semantic tests into jest and drop dedicated config (#56795)
* chore(test): merge semantic tests into jest and drop dedicated config

* chore(test): simplify SKIP_SEMANTIC env check
2026-01-29 15:30:07 +08:00
thinkasany
3073cf188d docs: Why can't the Segmented be disabled? (#56786)
* docs: add Why can't Segmented be disabled

* Update components/form/index.en-US.md

Signed-off-by: thinkasany <480968828@qq.com>

* Update components/form/index.en-US.md

Signed-off-by: thinkasany <480968828@qq.com>

* Apply suggestion from @meet-student

Signed-off-by: 遇见同学 <1875694521@qq.com>

* Apply suggestion from @meet-student

Signed-off-by: 遇见同学 <1875694521@qq.com>

* docs: update faq

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

Co-authored-by: gemini-code-assist[bot] <176961590+gemini-code-assist[bot]@users.noreply.github.com>
Signed-off-by: 二货爱吃白萝卜 <smith3816@gmail.com>

---------

Signed-off-by: thinkasany <480968828@qq.com>
Signed-off-by: 遇见同学 <1875694521@qq.com>
Signed-off-by: 二货爱吃白萝卜 <smith3816@gmail.com>
Co-authored-by: 遇见同学 <1875694521@qq.com>
Co-authored-by: 二货机器人 <smith3816@gmail.com>
Co-authored-by: gemini-code-assist[bot] <176961590+gemini-code-assist[bot]@users.noreply.github.com>
2026-01-29 12:09:01 +08:00
Yingtao Mo
f78e800519 fix(Flex): default align when use orientation (#55950)
Co-authored-by: thinkasany <480968828@qq.com>
2026-01-29 11:14:33 +08:00
thinkasany
ebc17059de chore(test): turn off no-nested-component-definitions (#56793)
Co-authored-by: 遇见同学 <1875694521@qq.com>
2026-01-29 10:39:51 +08:00
github-actions[bot]
a93b4122ff chore: upgrade deps (#56791)
Co-authored-by: afc163 <507615+afc163@users.noreply.github.com>
2026-01-29 08:09:09 +08:00
unknowntocka
ead5840d90 fix(Button): default button token (#56719)
* fix(Button): default button token

* feat(Button): add default button token with custom colors in debug demo

---------

Co-authored-by: lijianan <574980606@qq.com>
2026-01-28 17:57:18 +08:00
高艳兵
166e9c88e5 fix(Typography): lower link selector specificity (#56759)
* fix(Typography): lower link selector specificity and add danger debug demo

* fix(Typography): scope link styles and raise type color priority

* chore: update snap

* chore: update snap

* fix(Typography): scope link styles and ensure type colors win

---------

Co-authored-by: 遇见同学 <1875694521@qq.com>
2026-01-28 16:01:51 +08:00
Junbeom Park
b2d14dd478 fix(ColorPicker): restrict HEX input to valid hex characters (#56752)
* fix(color-picker): restrict HEX input to valid hex characters

* test(ColorPicker): add test invalid input like ff_00_gg

* Update components/color-picker/__tests__/components.test.tsx

Co-authored-by: gemini-code-assist[bot] <176961590+gemini-code-assist[bot]@users.noreply.github.com>
Signed-off-by: 二货爱吃白萝卜 <smith3816@gmail.com>

---------

Signed-off-by: 二货爱吃白萝卜 <smith3816@gmail.com>
Co-authored-by: 二货爱吃白萝卜 <smith3816@gmail.com>
Co-authored-by: gemini-code-assist[bot] <176961590+gemini-code-assist[bot]@users.noreply.github.com>
2026-01-28 15:38:43 +08:00
github-actions[bot]
076c84b181 chore: upgrade deps (#56773)
Co-authored-by: afc163 <507615+afc163@users.noreply.github.com>
2026-01-28 08:49:49 +08:00
thinkasany
50a3f30a72 chore: lock @types/react 19.2.7 (#56770) 2026-01-27 22:53:59 +08:00
afc163
5629062ba1 docs: remove community link from resources docs (#56760)
Co-authored-by: 遇见同学 <1875694521@qq.com>
2026-01-27 20:35:29 +08:00
遇见同学
63e4d29760 docs: fix token table title style issue (#56766) 2026-01-27 18:30:58 +08:00
遇见同学
94fe19feef chore: fix ci update snap (#56761)
* chore: fix ci update snap

* up

* chore up
2026-01-27 17:24:56 +08:00
Anton Cherniavskyi
9df0d7656f fix(Button): solid variant borders inside Space Compact (#56486)
* fix(Button): solid variant borders inside Space Compact

* refactor(Button): use genCssVar hook to generate CSS variables

* chore: adjust logic of compact

* test: update demo

---------

Co-authored-by: 遇见同学 <1875694521@qq.com>
Co-authored-by: afc163 <afc163@gmail.com>
Co-authored-by: 二货机器人 <smith3816@gmail.com>
2026-01-27 14:29:34 +08:00
lijianan
dc8acf547d type: TypeScript definition improvement (#56753) 2026-01-27 10:30:14 +08:00
Amumu
c880c2e806 chore: bunp x (#56747) 2026-01-26 20:50:04 +08:00
xrkffgg
58c5fc4625 docs: add changelog 6.2.2 (#56742)
* docs: add changelog 6.2.2

* Update CHANGELOG.en-US.md

Co-authored-by: gemini-code-assist[bot] <176961590+gemini-code-assist[bot]@users.noreply.github.com>
Signed-off-by: xrkffgg <xrkffgg@vip.qq.com>

* Update CHANGELOG.en-US.md

Co-authored-by: gemini-code-assist[bot] <176961590+gemini-code-assist[bot]@users.noreply.github.com>
Signed-off-by: xrkffgg <xrkffgg@vip.qq.com>

* Update CHANGELOG.en-US.md

Co-authored-by: gemini-code-assist[bot] <176961590+gemini-code-assist[bot]@users.noreply.github.com>
Signed-off-by: xrkffgg <xrkffgg@vip.qq.com>

* docs: update

* docs: update

---------

Signed-off-by: xrkffgg <xrkffgg@vip.qq.com>
Co-authored-by: gemini-code-assist[bot] <176961590+gemini-code-assist[bot]@users.noreply.github.com>
Co-authored-by: afc163 <afc163@gmail.com>
2026-01-26 19:11:00 +08:00
二货爱吃白萝卜
250597ea0c test: update snapshot (#56745) 2026-01-26 18:15:37 +08:00
𝑾𝒖𝒙𝒉
3034888500 fix(Propover): Isolate Form.Item status from popup-type components (#56728)
* 🧪 add unit test

* fix(Propover): Isolate `Form.Item` status from popup-type components
2026-01-26 14:49:03 +08:00
thinkasany
705c3642d3 chore: add deprecated comments (#56733) 2026-01-26 13:04:55 +08:00
renovate[bot]
fbe7864e10 chore(deps): update dependency env-paths to v4 (#56736)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2026-01-25 10:47:11 +08:00
afc163
2f6548209d test: fix test case skip logic (#56701)
* test: fix test case skip logic

* fix

* fix

* test: add snapshot tests for splitter and table demos

* test: remove skip options from splitter tests

* test: add snapshot for size-mix demo in splitter component
2026-01-23 13:02:04 +08:00
高艳兵
6f90801861 fix(Button): text variant tokens not working (#56291)
* fix(Button): text variant tokens not working

* test(Button): add debug demo for text variant component tokens

* test: update button debug color variant snapshots

* fix: getCssVar to varName

---------

Co-authored-by: 遇见同学 <1875694521@qq.com>
Co-authored-by: thinkasany <480968828@qq.com>
2026-01-23 09:49:48 +08:00
高艳兵
b5b735a490 fix: align pagination container items vertically (#56715)
* fix: align pagination container items vertically

* fix: quick-jumper center
2026-01-23 09:08:44 +08:00
QdabuliuQ
8bebba7af8 docs(Drawer): add maxSize prop documentation to Drawer (#56704)
* fix: replace insetInline properties with left/right in drawer style

* docu: add maxSize prop documentation to Drawer

Documented the new `maxSize` property for the Drawer component in both English and Chinese docs, describing its purpose and usage when the Drawer is resizable.

* chore: update drawer markdown

* fix: resolve file content conflict

* doc: modify the order of maxSize property in markdown

* docs: improve drawer api table

* docs: improve drawer api table

* fix: update Drawer 'open' prop default value in docs

* fix: deprecate headerStyle prop in Drawer documentation

* Update components/drawer/index.en-US.md

Signed-off-by: thinkasany <480968828@qq.com>

* Update components/drawer/index.zh-CN.md

Signed-off-by: thinkasany <480968828@qq.com>

---------

Signed-off-by: thinkasany <480968828@qq.com>
Co-authored-by: thinkasany <480968828@qq.com>
2026-01-22 22:39:22 +08:00
ug
3ac1fc78e7 perf(Empty/Skeleton): Reduce the size of the SVG (#56682)
* optimize(Empty): Reduce the size of the SVG.

* update

* update

* update

---------

Co-authored-by: liuqiang <qiang.liu@xinjifamily.com>
Co-authored-by: afc163 <afc163@gmail.com>
2026-01-21 23:59:13 +08:00
Copilot
f091c1e01b test: skip table sticky demo from visual regression (#56698)
* Initial plan

* test: skip table-sticky demo from UI comparison

Co-authored-by: afc163 <507615+afc163@users.noreply.github.com>

---------

Co-authored-by: copilot-swe-agent[bot] <198982749+Copilot@users.noreply.github.com>
Co-authored-by: afc163 <507615+afc163@users.noreply.github.com>
2026-01-21 23:43:47 +08:00
thinkasany
acc11dfccb chore(eslint): add fetch to polyfills configuration (#56697) 2026-01-21 23:05:52 +08:00
QdabuliuQ
964eb9d9d5 fix: replace insetInline properties with left/right in drawer style (#56693)
Co-authored-by: thinkasany <480968828@qq.com>
2026-01-21 21:01:32 +08:00
thinkasany
3ee9ff0811 chore: rm useless type (#56695) 2026-01-21 20:54:24 +08:00
QdabuliuQ
092e37861a fix(Typography): button with href wrapped by Typography showing incorrect color and flickering outline on hover (#56619)
* style: The typography component is showing styling issues, including with the button component

* style: refactor link styles for Button consistency

* style: modify mixins.ts file

* fix: reset border styles for Typography links

* fix: link style conflicts with ant-btn in typography component

* fix: link styles to avoid conflicts with Button component

---------

Co-authored-by: 遇见同学 <1875694521@qq.com>
2026-01-21 18:45:12 +08:00
lijianan
01fdc86b39 chore: update test script to include semantic snap (#56679)
* chore: update test script to include semantic snap

* update

* Update package.json

Co-authored-by: thinkasany <480968828@qq.com>
Signed-off-by: lijianan <574980606@qq.com>

---------

Signed-off-by: lijianan <574980606@qq.com>
Co-authored-by: thinkasany <480968828@qq.com>
2026-01-21 09:29:06 +08:00
lijianan
a3dcbdfae4 chore: remove unnecessary unit in style (#56677) 2026-01-21 09:02:36 +08:00
github-actions[bot]
d5b3409660 chore: upgrade deps (#56675)
Co-authored-by: afc163 <507615+afc163@users.noreply.github.com>
2026-01-21 03:49:10 +08:00
Peach
8b4235a53b docs: changelog for 6.2.1 (#56667)
* docs: changelog for 6.2.1

* chore: bump version to 6.2.1

* refactor: update changelog

* docs: update changelog
2026-01-20 14:59:30 +08:00
高艳兵
c46ce7fb86 fix: pagination size docs (#56668) 2026-01-20 14:59:26 +08:00
高艳兵
8574b941a7 feat: add semantic ci (#56670)
* feat: add semantic ci

* fix: version

* ci: move version step into test:semantic and run in test workflow
2026-01-20 14:30:35 +08:00
lijianan
edf65d3eeb chore: remove unnecessary brackets in style (#56665)
* refactor: remove unnecessary brackets in style

* update
2026-01-20 09:48:00 +08:00
高艳兵
c5e5ac7c3f feat: add semantic snap (#56600)
* feat: add semantic.md generation plugin for components

* refactor: extract locales from SelectSemanticTemplate to component props

* fix: remove unuse locales

* feat: multipleProps add defaultValue

* feat: update select snap

* feat: update table snap

* feat: tour add snap

* feat: delete semantic-md plugin

* feat: add sematic snap

* refactor: replace hardcoded button clicks with configurable postRenderFn in semantic demo test

* revert: locales

* fix: maxTagCount responsive

* fix: test  maxTagCount set 1

* feat: add test:semantic script

* fix: ci add collectCoverageFrom

---------

Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
Co-authored-by: thinkasany <480968828@qq.com>
2026-01-19 22:10:33 +08:00
ug
937f5d0738 fix(card): Fixed the overflow issue in the Card component body (#56653)
* fix(card): Fixed the overflow issue in the Card component body

* update

---------

Co-authored-by: liuqiang <qiang.liu@xinjifamily.com>
2026-01-19 15:13:02 +08:00
Wanpan
3848b6bb82 docs: fix SemanticPreview not work (#56650) 2026-01-19 09:49:54 +08:00
thinkasany
bb5642f90b chore: improve tree DirectoryTree (#56648)
* chore: improve tree DirectoryTree

* fix
2026-01-18 18:16:19 +08:00
thinkasany
60442f9d44 chore: improve tooltip (#56645) 2026-01-18 16:16:03 +08:00
renovate[bot]
c8e79dda70 chore(deps): update dependency @eslint-react/eslint-plugin to v2.7.2 (#56643)
* chore(deps): update dependency @eslint-react/eslint-plugin to v2.7.2

* Update package.json

Signed-off-by: lijianan <574980606@qq.com>

---------

Signed-off-by: lijianan <574980606@qq.com>
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
Co-authored-by: lijianan <574980606@qq.com>
2026-01-18 09:15:18 +08:00
renovate[bot]
2389eb8731 chore(deps): update dependency @eslint-react/eslint-plugin to v2.7.1 (#56641)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2026-01-18 09:02:13 +08:00
renovate[bot]
b9d23a1d96 chore(deps): update dependency jquery to v4 (#56642)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2026-01-18 09:01:28 +08:00
沈鸿飞
3eecc366bb fix: import individual icons from antd-icons (#56640) 2026-01-17 23:38:37 +08:00
hu
fecb9a04f6 refactor: replace SuffixIcon with useSuffixIcon in date-picker for prevent suffix icon rendering when user set suffixIcon to null or false (#56637)
Co-authored-by: thinkasany <480968828@qq.com>
2026-01-17 23:08:28 +08:00
高艳兵
77f0f1a9fe fix(table): border radius not work (#56478)
* fix(table): border radius  not work

* fix(table): apply border radius to shadow pseudo elements
2026-01-17 22:57:06 +08:00
沈鸿飞
aeff7cab63 fix: import a single DownOutlined icon from antd-icons (#56639)
* fix: import a single DownOutlined icon from antd-icons

Signed-off-by: 沈鸿飞 <shen.hongfei@outlook.com>

* Update components/breadcrumb/Breadcrumb.tsx

Co-authored-by: gemini-code-assist[bot] <176961590+gemini-code-assist[bot]@users.noreply.github.com>
Signed-off-by: 沈鸿飞 <shen.hongfei@outlook.com>

---------

Signed-off-by: 沈鸿飞 <shen.hongfei@outlook.com>
Co-authored-by: gemini-code-assist[bot] <176961590+gemini-code-assist[bot]@users.noreply.github.com>
2026-01-17 22:55:02 +08:00
lijianan
5df2c59516 refactor(Grid): use genCssVar hook to generate CSS variables (#56635) 2026-01-17 10:44:40 +08:00
lijianan
247c41c79b fix: should skip appendStyle when value is null or undefined (#56636) 2026-01-17 10:42:45 +08:00
QdabuliuQ
4dc35000b1 docs: improve site locale detection (#56618)
* fix(Site): improve changelog header styles and locale detection

* style: fix link and button style conflicts in typography

* style: modify style file

* style: reset typography mixins.ts file

---------

Co-authored-by: 遇见同学 <1875694521@qq.com>
2026-01-16 09:37:26 +08:00
dependabot[bot]
a9e9c04cbc chore: bump @eslint-react/eslint-plugin from 2.6.2 to 2.6.4 (#56627)
Bumps [@eslint-react/eslint-plugin](https://github.com/Rel1cx/eslint-react/tree/HEAD/packages/plugins/eslint-plugin) from 2.6.2 to 2.6.4.
- [Release notes](https://github.com/Rel1cx/eslint-react/releases)
- [Changelog](https://github.com/Rel1cx/eslint-react/blob/main/CHANGELOG.md)
- [Commits](https://github.com/Rel1cx/eslint-react/commits/v2.6.4/packages/plugins/eslint-plugin)

---
updated-dependencies:
- dependency-name: "@eslint-react/eslint-plugin"
  dependency-version: 2.6.4
  dependency-type: direct:development
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2026-01-16 06:44:49 +08:00
github-actions[bot]
4f61124be4 chore: upgrade deps (#56625)
Co-authored-by: afc163 <507615+afc163@users.noreply.github.com>
2026-01-16 04:20:32 +08:00
thinkasany
fccc092154 chore: improve collapse cloneElement (#56622)
Co-authored-by: 遇见同学 <1875694521@qq.com>
2026-01-15 23:21:30 +08:00
二货爱吃白萝卜
a680d84865 test: fix test case (#56620)
* test: fix test case

* chore: fix lint
2026-01-15 18:15:27 +08:00
lijianan
f7446f3f1f refactor(css): replace background transition with background-color (#56598)
* fix(css): replace background transition with background-color

* chore: update

---------

Co-authored-by: thinkasany <480968828@qq.com>
2026-01-15 11:04:33 +08:00
lijianan
28d674445b fix: replace disabled with mergedDisabled (#56613)
* fix: replace disable with mergedDisabled

* update

* update

---------

Co-authored-by: 遇见同学 <1875694521@qq.com>
2026-01-15 10:49:44 +08:00
360 changed files with 55028 additions and 3228 deletions

View File

@@ -7,7 +7,6 @@ const isNumber = (value: any): value is number => {
};
const fetcher = async (url: string): Promise<number> => {
// eslint-disable-next-line compat/compat
const res = await fetch(url, { headers: { Accept: 'application/vnd.github+json' } });
const data = await res.json();
const totalCount = isNumber(data?.total_count) ? data.total_count : 0;

View File

@@ -1,4 +1,3 @@
/* eslint-disable compat/compat */
import { css } from 'antd-style';
import useSWR from 'swr';

View File

@@ -1,7 +1,7 @@
import React, { useMemo, useState } from 'react';
import { LinkOutlined, QuestionCircleOutlined, RightOutlined } from '@ant-design/icons';
import { ConfigProvider, Flex, Popover, Table, Typography } from 'antd';
import { createStaticStyles, css, useTheme } from 'antd-style';
import { createStyles, css, useTheme } from 'antd-style';
import { getDesignToken } from 'antd-token-previewer';
import tokenMeta from 'antd/es/version/token-meta.json';
import tokenData from 'antd/es/version/token.json';
@@ -53,7 +53,7 @@ const locales = {
},
};
const styles = createStaticStyles(({ cssVar }) => ({
const useStyle = createStyles(({ cssVar }) => ({
tableTitle: css`
cursor: pointer;
position: relative;
@@ -104,6 +104,8 @@ const SubTokenTable: React.FC<SubTokenTableProps> = (props) => {
const [open, setOpen] = useState<boolean>(defaultOpen ?? process.env.NODE_ENV !== 'production');
const { styles } = useStyle();
if (!tokens.length) {
return null;
}

View File

@@ -27,7 +27,7 @@ const styles = createStaticStyles(({ cssVar, css }) => ({
position: relative;
border: 1px solid ${cssVar.colorBorderSecondary};
border-radius: ${cssVar.borderRadius};
padding: ${cssVar.paddingMD} ${cssVar.paddingLG} ${cssVar.paddingMD * 2};
padding: ${cssVar.paddingMD} ${cssVar.paddingLG} calc(${cssVar.paddingMD} * 2);
margin-bottom: ${cssVar.marginLG};
`,
title: css`
@@ -67,7 +67,7 @@ const styles = createStaticStyles(({ cssVar, css }) => ({
`,
tip: css`
color: ${cssVar.colorTextTertiary};
margin-top: ${cssVar.marginMD * 2};
margin-top: calc(${cssVar.marginMD} * 2);
`,
}));

View File

@@ -72,6 +72,7 @@ const useStyle = createStyles(({ cssVar, token, css }) => ({
font-weight: 600;
font-size: 20px;
margin: 0 !important;
padding: 0;
`,
versionTag: css`
user-select: none;

View File

@@ -1,8 +1,8 @@
import * as React from 'react';
import { createStaticStyles } from 'antd-style';
import { createStyles, css } from 'antd-style';
import { clsx } from 'clsx';
const styles = createStaticStyles(({ cssVar, css, cx }) => {
const useStyle = createStyles(({ cssVar, cx }) => {
const duration = cssVar.motionDurationSlow;
const marker = css`
@@ -55,6 +55,8 @@ export interface MarkerProps {
}
const Marker = React.memo<MarkerProps>((props) => {
const { styles } = useStyle();
const { rect, primary, ...restProps } = props;
const rectRef = React.useRef(rect);

View File

@@ -67,11 +67,14 @@ const Block: React.FC<BlockProps> = ({
...props
}) => {
const divRef = React.useRef<HTMLDivElement>(null);
const [value, setValue] = React.useState(defaultValue);
// 多选模式下,优先使用 multipleProps 中的 defaultValue
const multipleDefaultValue = (multipleProps as any)?.defaultValue;
const initialValue = mode === 'single' ? defaultValue : multipleDefaultValue;
const [value, setValue] = React.useState(initialValue);
React.useEffect(() => {
setValue(defaultValue);
}, [mode]);
setValue(mode === 'single' ? defaultValue : multipleDefaultValue);
}, [mode, defaultValue, multipleDefaultValue]);
return (
<Flex
@@ -101,7 +104,7 @@ const Block: React.FC<BlockProps> = ({
options={options}
{...(mode === 'multiple' ? multipleProps : {})}
styles={{ popup: { zIndex: 1 } }}
maxTagCount="responsive"
maxTagCount={process.env.NODE_ENV === 'test' ? 1 : 'responsive'}
placeholder="Please select"
allowClear
/>

View File

@@ -1,5 +1,4 @@
import React, { useRef, useState } from 'react';
import { StyleProvider } from '@ant-design/cssinjs';
import { AntDesignOutlined, UserOutlined } from '@ant-design/icons';
import { Bubble, Sender } from '@ant-design/x';
import type { SenderRef } from '@ant-design/x/es/sender';
@@ -100,21 +99,16 @@ const PromptDrawer: React.FC<PromptDrawerProps> = ({ open, onClose, onThemeChang
afterOpenChange={handleAfterOpenChange}
>
<Flex vertical style={{ height: '100%' }}>
{/* Workaround for layer incompat between site `StyleProvider layer` and `@ant-design/x`.
* See: https://github.com/ant-design/x/issues/1588
*/}
<StyleProvider layer={false}>
<Bubble.List style={{ flex: 1, overflow: 'auto' }} items={items} />
<Sender
ref={senderRef}
style={{ flex: 0 }}
value={inputValue}
onChange={setInputValue}
onSubmit={handleSubmit}
loading={loading}
onCancel={cancelRequest}
/>
</StyleProvider>
<Bubble.List style={{ flex: 1, overflow: 'auto' }} items={items} />
<Sender
ref={senderRef}
style={{ flex: 0 }}
value={inputValue}
onChange={setInputValue}
onSubmit={handleSubmit}
loading={loading}
onCancel={cancelRequest}
/>
</Flex>
</Drawer>
);

View File

@@ -1,4 +1,3 @@
/* eslint-disable compat/compat */
import { useRef, useState } from 'react';
import { XStream } from '@ant-design/x-sdk';

View File

@@ -61,11 +61,14 @@ const Block: React.FC<BlockProps> = ({
...props
}) => {
const divRef = React.useRef<HTMLDivElement>(null);
const [value, setValue] = React.useState(defaultValue);
// 多选模式下,优先使用 multipleProps 中的 defaultValue
const multipleDefaultValue = (multipleProps as any)?.defaultValue;
const initialValue = mode === 'single' ? defaultValue : multipleDefaultValue;
const [value, setValue] = React.useState(initialValue);
React.useEffect(() => {
setValue(defaultValue);
}, [mode]);
setValue(mode === 'single' ? defaultValue : multipleDefaultValue);
}, [mode, defaultValue, multipleDefaultValue]);
return (
<Flex
@@ -93,7 +96,7 @@ const Block: React.FC<BlockProps> = ({
treeData={treeData}
{...(mode === 'multiple' ? multipleProps : {})}
styles={{ popup: { zIndex: 1 } }}
maxTagCount="responsive"
maxTagCount={process.env.NODE_ENV === 'test' ? 1 : 'responsive'}
placeholder="Please select"
/>
</Flex>

View File

@@ -159,7 +159,6 @@ interface VersionItem {
}
const fetcher = (...args: Parameters<typeof fetch>) => {
// eslint-disable-next-line compat/compat
return fetch(...args).then((res) => res.json());
};

View File

@@ -160,18 +160,27 @@ export default defineConfig({
}
// 首页无视链接里面的语言设置 https://github.com/ant-design/ant-design/issues/4552
if (pathname === '/' || pathname === '/index-cn') {
const lang =
(window.localStorage && localStorage.getItem('locale')) ||
((navigator.language || navigator.browserLanguage).toLowerCase() === 'zh-cn'
const normalizedPathname = pathname || '/';
if (normalizedPathname === '/' || normalizedPathname === '/index-cn') {
let lang;
if (window.localStorage) {
const antLocale = localStorage.getItem('ANT_LOCAL_TYPE_KEY');
// 尝试解析 JSON因为可能是被序列化后存储的 "en-US" / en-US https://github.com/ant-design/ant-design/issues/56606
try {
lang = antLocale ? JSON.parse(antLocale) : localStorage.getItem('locale');
} catch (e) {
lang = antLocale ? antLocale : localStorage.getItem('locale');
}
}
lang = lang || ((navigator.language || navigator.browserLanguage).toLowerCase() === 'zh-cn'
? 'zh-CN'
: 'en-US');
// safari is 'zh-cn', while other browser is 'zh-CN';
if ((lang === 'zh-CN') !== isZhCN(pathname)) {
location.pathname = getLocalizedPathname(pathname, lang === 'zh-CN');
if ((lang === 'zh-CN') !== isZhCN(normalizedPathname)) {
location.pathname = getLocalizedPathname(normalizedPathname, lang === 'zh-CN');
}
}
document.documentElement.className += isZhCN(pathname) ? 'zh-cn' : 'en-us';
document.documentElement.className += isZhCN(normalizedPathname) ? 'zh-cn' : 'en-us';
})();
`,
],

View File

@@ -63,7 +63,7 @@ jobs:
steps:
# We need get PR id first
- name: download pr artifact
uses: dawidd6/action-download-artifact@v12
uses: dawidd6/action-download-artifact@v14
with:
workflow: ${{ github.event.workflow_run.workflow_id }}
run_id: ${{ github.event.workflow_run.id }}
@@ -83,7 +83,7 @@ jobs:
# Download site artifact
- name: download site artifact
if: ${{ fromJSON(needs.upstream-workflow-summary.outputs.build-success) }}
uses: dawidd6/action-download-artifact@v12
uses: dawidd6/action-download-artifact@v14
with:
workflow: ${{ github.event.workflow_run.workflow_id }}
run_id: ${{ github.event.workflow_run.id }}

View File

@@ -17,12 +17,12 @@ jobs:
steps:
- uses: actions/checkout@v6
- uses: oven-sh/setup-bun@v2
- uses: utooland/setup-utoo@v1
- name: size-limit
uses: ant-design/size-limit-action@master
with:
github_token: ${{ secrets.GITHUB_TOKEN }}
package_manager: bun
package_manager: ut
build_script: dist
env:
NODE_OPTIONS: --max_old_space_size=4096

View File

@@ -34,6 +34,7 @@ jobs:
shard: [1/2, 2/2]
env:
REACT: ${{ matrix.react }}
SKIP_SEMANTIC: '1'
runs-on: blacksmith-4vcpu-ubuntu-2404
steps:
- uses: actions/checkout@v6

View File

@@ -70,7 +70,7 @@ jobs:
# We need get persist-index first
- name: download image snapshot artifact
uses: dawidd6/action-download-artifact@v12
uses: dawidd6/action-download-artifact@v14
with:
workflow: ${{ github.event.workflow_run.workflow_id }}
run_id: ${{ github.event.workflow_run.id }}
@@ -92,7 +92,7 @@ jobs:
- name: download report artifact
id: download_report
if: ${{ needs.upstream-workflow-summary.outputs.build-status == 'success' || needs.upstream-workflow-summary.outputs.build-status == 'failure' }}
uses: dawidd6/action-download-artifact@v12
uses: dawidd6/action-download-artifact@v14
with:
workflow: ${{ github.event.workflow_run.workflow_id }}
run_id: ${{ github.event.workflow_run.id }}

View File

@@ -67,7 +67,7 @@ jobs:
# We need get persist key first
- name: Download Visual Regression Ref
uses: dawidd6/action-download-artifact@v12
uses: dawidd6/action-download-artifact@v14
with:
workflow: ${{ github.event.workflow_run.workflow_id }}
run_id: ${{ github.event.workflow_run.id }}
@@ -81,7 +81,7 @@ jobs:
- name: Download Visual-Regression Artifact
if: ${{ fromJSON(needs.upstream-workflow-summary.outputs.build-success) }}
uses: dawidd6/action-download-artifact@v12
uses: dawidd6/action-download-artifact@v14
with:
workflow: ${{ github.event.workflow_run.workflow_id }}
run_id: ${{ github.event.workflow_run.id }}

View File

@@ -1,13 +1,11 @@
const { moduleNameMapper, transformIgnorePatterns } = require('./.jest');
// jest config for image snapshots
module.exports = {
setupFiles: ['./tests/setup.ts'],
moduleFileExtensions: ['ts', 'tsx', 'js', 'md'],
moduleNameMapper,
transform: {
'\\.tsx?$': './node_modules/@ant-design/tools/lib/jest/codePreprocessor',
'\\.js$': './node_modules/@ant-design/tools/lib/jest/codePreprocessor',
'^.+\\.(ts|tsx|js|mjs)$': './node_modules/@ant-design/tools/lib/jest/codePreprocessor',
'\\.md$': './node_modules/@ant-design/tools/lib/jest/demoPreprocessor',
'\\.(jpg|png|gif|svg)$': './node_modules/@ant-design/tools/lib/jest/imagePreprocessor',
},

View File

@@ -11,6 +11,7 @@ const compileModules = [
'parse5',
'@exodus',
'jsdom',
'@csstools',
];
// cnpm use `_` as prefix
@@ -34,6 +35,10 @@ function getTestRegex(libDir) {
return '.*\\.test\\.(j|t)sx?$';
}
const shouldIgnoreSemantic =
['dist', 'lib', 'es', 'dist-min'].includes(process.env.LIB_DIR) ||
['1', 'true'].includes(process.env.SKIP_SEMANTIC);
module.exports = {
verbose: true,
testEnvironment: 'jsdom',
@@ -48,10 +53,17 @@ module.exports = {
'^antd/lib/(.*)$': '<rootDir>/components/$1',
'^antd/locale/(.*)$': '<rootDir>/components/locale/$1',
},
testPathIgnorePatterns: ['/node_modules/', 'dekko', 'node', 'image.test.js', 'image.test.ts'],
testPathIgnorePatterns: [
'/node_modules/',
'dekko',
'node',
'image.test.js',
'image.test.ts',
...(shouldIgnoreSemantic ? ['demo-semantic.test'] : []),
],
transform: {
'\\.tsx?$': './node_modules/@ant-design/tools/lib/jest/codePreprocessor',
'\\.(m?)js$': './node_modules/@ant-design/tools/lib/jest/codePreprocessor',
'\\.(m?)js(m)?$': './node_modules/@ant-design/tools/lib/jest/codePreprocessor',
'\\.md$': './node_modules/@ant-design/tools/lib/jest/demoPreprocessor',
'\\.(jpg|png|gif|svg)$': './node_modules/@ant-design/tools/lib/jest/imagePreprocessor',
},
@@ -64,6 +76,7 @@ module.exports = {
'!components/*/__tests__/type.test.tsx',
'!components/**/*/interface.{ts,tsx}',
'!components/*/__tests__/image.test.{ts,tsx}',
'!components/*/__tests__/demo-semantic.test.tsx',
'!components/__tests__/node.test.tsx',
'!components/*/demo/*.tsx',
'!components/*/design/**',

View File

@@ -1,14 +1,12 @@
const { moduleNameMapper, transformIgnorePatterns } = require('./.jest');
// jest config for server render environment
module.exports = {
setupFiles: ['./tests/setup.ts'],
setupFilesAfterEnv: ['./tests/setupAfterEnv.ts'],
moduleFileExtensions: ['ts', 'tsx', 'js', 'md'],
moduleNameMapper,
transform: {
'\\.tsx?$': './node_modules/@ant-design/tools/lib/jest/codePreprocessor',
'\\.js$': './node_modules/@ant-design/tools/lib/jest/codePreprocessor',
'^.+\\.(ts|tsx|js|mjs)$': './node_modules/@ant-design/tools/lib/jest/codePreprocessor',
'\\.md$': './node_modules/@ant-design/tools/lib/jest/demoPreprocessor',
'\\.(jpg|png|gif|svg)$': './node_modules/@ant-design/tools/lib/jest/imagePreprocessor',
},

645
AGENTS.md
View File

@@ -1,92 +1,166 @@
# AGENTS.md
> Ant Design 项目开发指南 - 为 AI 编程助手提供项目上下文和开发规范
## 📑 目录
- [项目背景](#项目背景)
- [快速开始](#快速开始)
- [代码规范](#代码规范)
- [基本编码规范](#基本编码规范)
- [命名规范](#命名规范)
- [TypeScript 规范](#typescript-规范)
- [样式规范](#样式规范)
- [开发指南](#开发指南)
- [测试指南](#测试指南)
- [演示代码规范](#演示代码规范)
- [国际化规范](#国际化规范)
- [文档和 Changelog](#文档和-changelog-规范)
- [Git 和 Pull Request](#git-和-pull-request-规范)
- [质量保证](#质量保证)
- [工具链和环境](#工具链和环境)
---
## 项目背景
这是 ant-design/ant-designantd的源代码仓库是一个 React 组件库,发布为 npm 包 antd。
这是 [ant-design/ant-design](https://github.com/ant-design/ant-design)antd的源代码仓库是一个 React 组件库,发布为 npm 包 `antd`
### 核心特性
- 使用 TypeScript 和 React 开发
- 兼容 React 18 ~ 19 版本
- 组件库设计精美,功能完善,广泛应用于企业级中后台产品
- 遵循 Ant Design 设计规范
- 支持国际化
- 支持国际化i18n
- 支持主题定制和暗色模式
- 支持 RTL从右到左布局
## 安装和设置
---
## 快速开始
### 开发环境要求
- Node.js 版本 >= 16
- 推荐使用 npm 或 yarn
- Chrome 80+ 浏览器兼容性
- **Node.js**: >= 16
- **包管理器**: npm 或 utoo
- **浏览器兼容性**: Chrome 80+
- **编辑器**: VS Code推荐或其他支持 TypeScript 的编辑器
### 安装依赖
```bash
npm install
# 或
yarn install
utoo install
```
### 开发命令
### 常用开发命令
```bash
npm start # 启动开发服务器
npm run build # 构建项目
npm test # 运行测试
npm run lint # 代码检查
# 启动开发服务器(访问 http://127.0.0.1:8001
npm start
# 编译 TypeScript 代码到 lib 和 es 目录
npm run compile
# 构建 UMD 格式的构建产物
npm run build
# 运行所有测试
npm test
# 监听模式运行测试
npm test -- --watch
# 生成测试覆盖率报告
npm run test:coverage
# 代码检查(包括 TypeScript、ESLint、Biome、Markdown、Changelog
npm run lint
# 格式化代码
npm run format
# 生成 Changelog交互式
npm run changelog
# 清理构建产物
npm run clean
```
## 代码风格指南
### 项目结构
```
ant-design/
├── components/ # 组件源代码
│ └── [component]/ # 单个组件目录
│ ├── demo/ # 演示代码
│ ├── style/ # 样式文件
│ ├── index.tsx # 组件入口
│ └── index.zh-CN.md # 组件文档
├── scripts/ # 构建和工具脚本
├── tests/ # 测试文件
├── CHANGELOG.zh-CN.md # 中文更新日志
├── CHANGELOG.en-US.md # 英文更新日志
└── package.json # 项目配置
```
---
## 代码规范
### 基本编码规范
- 使用 TypeScript 和 React 书写
- 使用函数式组件和 hooks避免类组件
- 使用提前返回early returns提高代码可读性
- 避免引入新依赖,严控打包体积
- 兼容 Chrome 80+ 浏览器
- 支持服务端渲染
- 保持向下兼容,避免 breaking change
- 组件名使用大驼峰PascalCase
- 属性名使用小驼峰camelCase
- 合理使用 React.memouseMemo 和 useCallback 优化性能
### 命名规范
Antd 命名要求使用**完整名称**而非缩写。
- 使用 TypeScript 和 React 书写
- 使用函数式组件和 Hooks**避免类组件**
- 使用提前返回early returns提高代码可读性
- 避免引入新依赖,严控打包体积
- 兼容 Chrome 80+ 浏览器
- 支持服务端渲染SSR
- 保持向下兼容,避免 breaking change
- 组件名使用大驼峰PascalCase,如 `Button``DatePicker`
- 属性名使用小驼峰camelCase,如 `onClick``defaultValue`
- 合理使用 `React.memo``useMemo``useCallback` 优化性能
#### Props 命名
- 初始化属性:`default` + `PropName`
- 强制渲染:`forceRender`
- 子组件强制渲染:`force` + `Sub Component Name` + `Render`
- 子组件渲染:`Sub Component Name` + `Render`
- 数据源:`dataSource`
- 面板开启:使用 `open`,避免使用 `visible`
- 显示相关:`show` + `PropName`
- 功能性:`PropName` + `able`
- 禁用:`disabled`
- 额外内容:`extra`
- 图标:`icon`
- 触发器:`trigger`
- 类名:`className`
| 用途 | 命名规则 | 示例 |
| -------------- | --------------------------------------- | ----------------------------- |
| 初始化属性 | `default` + `PropName` | `defaultValue``defaultOpen` |
| 强制渲染 | `forceRender` | `forceRender` |
| 子组件强制渲染 | `force` + `SubComponentName` + `Render` | `forcePanelRender` |
| 子组件渲染 | `SubComponentName` + `Render` | `titleRender``footerRender` |
| 数据源 | `dataSource` | `dataSource` |
| 面板开启 | 使用 `open`,避免使用 `visible` | `open``defaultOpen` |
| 显示相关 | `show` + `PropName` | `showSearch``showHeader` |
| 功能性 | `PropName` + `able` | `disabled``readable` |
| 禁用 | `disabled` | `disabled` |
| 额外内容 | `extra` | `extra` |
| 图标 | `icon` | `icon``prefixIcon` |
| 触发器 | `trigger` | `trigger` |
| 类名 | `className` | `className` |
#### 事件命名
- 触发事件:`on` + `EventName`
- 子组件事件:`on` + `SubComponentName` + `EventName`
- 前置事件:`before` + `EventName`
- 后置事件:`after` + `EventName`
- 连续动作完成:`on` + `EventName` + `Complete`
| 类型 | 命名规则 | 示例 |
| ------------ | --------------------------------------- | --------------------- |
| 触发事件 | `on` + `EventName` | `onClick``onChange` |
| 子组件事件 | `on` + `SubComponentName` + `EventName` | `onPanelChange` |
| 前置事件 | `before` + `EventName` | `beforeUpload` |
| 后置事件 | `after` + `EventName` | `afterClose` |
| 连续动作完成 | `on` + `EventName` + `Complete` | `onUploadComplete` |
#### 组件引用
#### 组件引用Ref
组件应提供 `ref` 属性,结构如下:
```tsx
ComponentRef {
interface ComponentRef {
nativeElement: HTMLElement;
focus: VoidFunction;
// 其他函数
blur: VoidFunction;
// 其他方法...
}
```
@@ -94,54 +168,99 @@ ComponentRef {
格式:`variant (optional)` + `semantic part` + `semantic part variant (optional)` + `css property` + `size/disabled (optional)`
示例:
- `buttonPrimaryColor` - Button 主色
- `inputPaddingBlock` - Input 垂直内边距
- `menuItemActiveBg` - Menu 激活项背景色
### API 文档规范
| Property | Description | Type | Default |
| --------- | ----------- | ---------------------------- | ------------ |
| htmlType | xxx | string | `button ` |
| type | xxx | `horizontal ` \| `vertical ` | `horizontal` |
| disabled | xxx | boolean | false |
| minLength | xxx | number | 0 |
| style | xxx | CSSProperties | - |
#### API 表格格式
| Property | Description | Type | Default |
| --------- | --------------- | ------------------------------------------------------ | --------- |
| htmlType | Button 原生类型 | string | `button` |
| type | 按钮类型 | `primary` \| `default` \| `dashed` \| `link` \| `text` | `default` |
| disabled | 是否禁用 | boolean | false |
| minLength | 最小长度 | number | 0 |
| style | 自定义样式 | CSSProperties | - |
#### API 文档要求
- 字符串类型的默认值使用反引号
- 布尔类型直接使用 true 或 false
- 数字类型直接使用数字
- 函数类型使用箭头函数表达式
- 无默认值使用 `-`
- 描述首字母大写,结尾无句号
- API 按字母顺序排列
- 字符串类型的默认值使用反引号包裹,如 `` `button` ``
- 布尔类型直接使用 `true``false`
- 数字类型直接使用数字,如 `0``100`
- 函数类型使用箭头函数表达式,如 `(e: Event) => void`
- 无默认值使用 `-`
- 描述首字母大写,结尾无句号
- API 按字母顺序排列
---
## TypeScript 规范
### 基本原则
- 所有组件和函数必须提供准确的类型定义
- 避免使用 `any` 类型,尽可能精确地定义类型
- 使用接口而非类型别名定义对象结构
- 导出所有公共接口类型,方便用户使用
- 严格遵循 TypeScript 类型设计原则,确保类型安全
- 确保编译无任何类型错误或警告
- 所有组件和函数必须提供准确的类型定义
- 避免使用 `any` 类型,尽可能精确地定义类型
- 使用接口interface而非类型别名type定义对象结构
- 导出所有公共接口类型,方便用户使用
- 严格遵循 TypeScript 类型设计原则,确保类型安全
- 确保编译无任何类型错误或警告
### 组件类型定义
- 组件 props 应使用 interface 定义,便于扩展
- 组件 props 接口命名应为 `ComponentNameProps`
- 为组件状态定义专门的接口,如 `ComponentNameState`
- 复杂的数据结构应拆分为多个接口定义
- 组件的 ref 类型应该明确定义,使用 `React.ForwardRefRenderFunction`
- 所有回调函数类型应明确定义参数和返回值
```tsx
// ✅ 正确:使用 interface 定义 Props
interface ButtonProps {
type?: 'primary' | 'default' | 'dashed';
onClick?: (e: React.MouseEvent) => void;
}
// ❌ 错误:避免使用 type 定义对象结构
type ButtonProps = {
type?: 'primary' | 'default';
};
// ✅ 正确:组件 Props 接口命名
interface ComponentNameProps {
// ...
}
// ✅ 正确:组件状态接口命名
interface ComponentNameState {
// ...
}
// ✅ 正确:使用 ForwardRefRenderFunction 定义 ref
const Component = React.forwardRef<ComponentRef, ComponentProps>((props, ref) => {
// ...
});
```
### 类型使用最佳实践
- 适当使用泛型增强类型灵活性
- 使用交叉类型(&)合并多个类型
- 使用字面量联合类型定义有限的选项集合
- 避免使用 `enum`,优先使用联合类型和 `as const`
- 尽可能依赖 TypeScript 的类型推断
- 只在必要时使用类型断言(as
- 适当使用泛型增强类型灵活性
- 使用交叉类型(&)合并多个类型
- 使用字面量联合类型定义有限的选项集合
- 避免使用 `enum`,优先使用联合类型和 `as const`
- 尽可能依赖 TypeScript 的类型推断
- 只在必要时使用类型断言(`as`
```tsx
// ✅ 推荐:使用联合类型和 as const
const ButtonTypes = ['primary', 'default', 'dashed'] as const;
type ButtonType = (typeof ButtonTypes)[number];
// ❌ 不推荐:使用 enum
enum ButtonType {
Primary = 'primary',
Default = 'default',
}
```
---
## 样式规范
@@ -165,17 +284,17 @@ ComponentRef {
### 响应式和主题支持
- 组件应支持在不同屏幕尺寸下良好展示
- 所有组件必须支持暗色模式
- 组件应支持从右到左RTL的阅读方向
- 使用 CSS 逻辑属性(如 margin-inline-start替代方向性属性如 margin-left
- 支持通过 ConfigProvider 进行主题定制
- 组件应支持在不同屏幕尺寸下良好展示
- 所有组件必须支持暗色模式
- 组件应支持从右到左RTL的阅读方向
- 使用 CSS 逻辑属性(如 `margin-inline-start`)替代方向性属性(如 `margin-left`
- 支持通过 `ConfigProvider` 进行主题定制
### 动画效果
- 使用 CSS 过渡实现简单动画
- 复杂动画使用 @rc-component/motion 实现
- 尊重用户的减少动画设置prefers-reduced-motion
- 复杂动画使用 `@rc-component/motion` 实现
- 尊重用户的减少动画设置(`prefers-reduced-motion`
- 动画时长和缓动函数应保持一致性
- 动画不应干扰用户的操作和阅读体验
@@ -188,67 +307,108 @@ ComponentRef {
- 支持用户放大页面至 200% 时的正常布局
- 避免使用会导致闪烁的动画
## 测试指南
---
### 测试框架和工具
## 开发指南
### 测试指南
#### 测试框架和工具
- 使用 Jest 和 React Testing Library 编写单元测试
- 对 UI 组件使用快照测试 (Snapshot Testing)
- 测试覆盖率要求 100%
- 测试文件放在 **tests** 目录命名格式为index.test.tsx 或 xxx.test.tsx
- 对 UI 组件使用快照测试Snapshot Testing
- 测试覆盖率要求 **100%**
- 测试文件放在 `tests/` 目录,命名格式为:`index.test.tsx``xxx.test.tsx`
### 运行测试
#### 运行测试
```bash
npm test # 运行所有测试
npm test -- --watch # 监听模式
npm run test:coverage # 生成覆盖率报告
npm test -- --watch # 监听模式
npm run test:coverage # 生成覆盖率报告
npm run test:image # UI 快照测试(需要 Docker
```
## 演示代码规范
#### 测试最佳实践
### Demo 基本要求
- ✅ 测试用户行为而非实现细节
- ✅ 使用有意义的测试描述
- ✅ 每个测试用例应该独立,不依赖其他测试
- ✅ 测试边界情况和错误处理
- demo 代码尽可能简洁
- 避免冗余代码,方便用户复制到项目直接使用
- 每个 demo 聚焦展示一个功能点
- 提供中英文两个版本的说明
- 遵循展示优先原则,确保视觉效果良好
- 展示组件的主要使用场景
- 按照由简到繁的顺序排列 demo
### 演示代码规范
### 文件组织
#### Demo 基本要求
- ✅ demo 代码尽可能简洁
- ✅ 避免冗余代码,方便用户复制到项目直接使用
- ✅ 每个 demo 聚焦展示一个功能点
- ✅ 提供中英文两个版本的说明
- ✅ 遵循展示优先原则,确保视觉效果良好
- ✅ 展示组件的主要使用场景
- ✅ 按照由简到繁的顺序排列 demo
#### 文件组织
- 每个组件演示包含 `.md`(说明文档)和 `.tsx`(实际代码)两个文件
- 位置:组件目录下的 `demo` 子目录,如 `components/button/demo/`
- 命名:短横线连接的小写英文单词,如 `basic.tsx``custom-filter.tsx`
- 文件名应简洁地描述示例内容
### TSX 代码规范
#### TSX 代码规范
```tsx
// ✅ 正确的导入顺序
import React, { useState } from 'react';
import { Button, Space } from 'antd';
import type { ButtonProps } from 'antd';
import './custom.css';
// ✅ 使用函数式组件和 Hooks
const Demo: React.FC = () => {
const [loading, setLoading] = useState(false);
const handleClick = () => {
setLoading(true);
// ...
};
return (
<Space>
<Button loading={loading} onClick={handleClick}>
Click me
</Button>
</Space>
);
};
export default Demo;
```
**规范要点**
- 导入顺序React → 依赖库 → 组件库 → 自定义组件 → 类型 → 样式
- 类型:为复杂数据定义清晰接口,避免 `any`
- 使用函数式组件和 Hooks
- 2空格缩进箭头函数驼峰命名
- 2 空格缩进,箭头函数,驼峰命名
- 优先使用 antd 内置组件,减少外部依赖
- 性能优化:适当使用 `useMemo`/`useCallback`,清理副作用
## 国际化规范
### 国际化规范
### 类型定义
#### 类型定义
antd 的本地化配置的类型定义的入口文件是 `components/locale/index.tsx`,当需要添加新的本地化配置时,需要检查对应组件或全局配置的类型是否存在,如果不存在,则需要增加相应的类型描述。
### 本地化配置
#### 本地化配置
- 本地化配置文件命名规则:`*_*.ts`,如:`zh_CN.ts`
- 通常在为 antd 添加修改某一项本地化配置时,如无特殊说明,需要同时修改所有语言的本地化配置
- 本地化配置文件命名规则:`*_*.ts`,如:`zh_CN.ts``en_US.ts`
- 通常在为 antd 添加修改某一项本地化配置时,如无特殊说明,需要同时修改所有语言的本地化配置
- 本地化配置的内容通常是纯字符串
- 带有 `${}` 的变量将在实际使用的地方被实时替换成对应的变量内容
### 使用本地化
使用 `components/locale/index.tsx` 文件中导出的 `useLocale` 获取全局上下文中配置的本地化:
#### 使用本地化
```tsx
import { useLocale } from '../locale';
@@ -256,7 +416,7 @@ import enUS from '../locale/en_US';
export function TestComp(props) {
const { locale: propLocale } = props;
const [contextLocale] = useLocale('TestComp', enUs);
const [contextLocale] = useLocale('TestComp', enUS);
const locale = { ...contextLocale, ...propLocale };
@@ -264,162 +424,105 @@ export function TestComp(props) {
}
```
---
## 文档和 Changelog 规范
### 基本要求
- 提供中英文两个版本
- 新的属性需要声明可用的版本号
- 属性命名符合 antd 的 API 命名规则
- 提供中英文两个版本
- 新的属性需要声明可用的版本号
- 属性命名符合 antd 的 API 命名规则
### 文档锚点 ID 规范
- 针对 Markdown 文件中的标题(# 到 ######)自动生成锚点 ID
- 所有中文标题H1-H6必须手动指定一个简洁、有意义的英文锚点
- 格式: ## 中文标题 {#english-anchor-id}
- 英文标题通常不需要手动指定锚点,但如果需要,可以使用相同的格式
- 锚点 ID 必须符合正则表达式 `^[a-zA-Z][\w-:\.]*$`, 且长度不应超过 32 个字符
- 用于演示demo且包含 `-demo-` 的 id 不受前面的长度限制
- FAQ 章节下的所有标题锚点必须以 `faq-` 作为前缀
- 为确保在不同语言间切换时锚点依然有效,同一问题的中英文锚点应保持完全一致
- 例如:
- 中文标题:`### 如何使用组件 {#how-to-use-component}`
- 英文标题:`### How to Use the Component {#how-to-use-component}`
- 所有中文标题H1-H6必须手动指定一个简洁、有意义的英文锚点
- 格式: `## 中文标题 {#english-anchor-id}`
- 英文标题通常不需要手动指定锚点,但如果需要,可以使用相同的格式
- 锚点 ID 必须符合正则表达式 `^[a-zA-Z][\w-:\.]*$`且长度不应超过 32 个字符
- 用于演示demo且包含 `-demo-` 的 id 不受前面的长度限制
- FAQ 章节下的所有标题锚点必须以 `faq-` 作为前缀
- 为确保在不同语言间切换时锚点依然有效,同一问题的中英文锚点应保持完全一致
**示例**
- 中文标题:`### 如何使用组件 {#how-to-use-component}`
- 英文标题:`### How to Use the Component {#how-to-use-component}`
### Changelog 规范
- 在 CHANGELOG.en-US.md 和 CHANGELOG.zh-CN.md 书写每个版本的变更
- 对用户使用上无感知的改动建议不要提及,保持 CHANGELOG 的内容有效性
- 用面向开发者的角度和叙述方式撰写 CHANGELOG
- 描述用户的原始问题,而非解决方式
- 尽量给出原始的 PR 链接,社区提交的 PR 改动加上提交者的链接
#### 🎯 核心原则
### 🎯 核心原则
1. **文件位置**:在 `CHANGELOG.en-US.md``CHANGELOG.zh-CN.md` 书写每个版本的变更
- 有效性过滤:忽略用户无感知的改动(如文档网站改进、纯测试用例更新、内部重构、工具链优化等),除非其对开发者有直接影响。
- 开发者视角:描述“用户的原始问题”和“对开发者的影响”,而非“具体的解决代码”。
- ❌ 修复 Typography 的 DOM 结构问题。
- ✅ Typography: 💄 重构并简化了 Typography 的 DOM 结构,修复了内容空格丢失的问题。
- 版本与命名:
- 新增属性必须符合 antd API 命名规则。
- 新增属性建议在描述中暗示或明确声明可用版本号。
- 双语输出:每次处理必须同时提供 **中文版****英文版**
2. **有效性过滤**:忽略用户无感知的改动(如文档网站改进、纯测试用例更新、内部重构、工具链优化等),除非其对开发者有直接影响。保持 CHANGELOG 的内容有效性。
### 🎨 格式与结构规范
3. **开发者视角**:用面向开发者的角度和叙述方式撰写 CHANGELOG描述"用户的原始问题"和"对开发者的影响",而非"具体的解决代码"。
- ❌ 修复 Typography 的 DOM 结构问题。
- ✅ Typography: 💄 重构并简化了 Typography 的 DOM 结构,修复了内容空格丢失的问题。
- 单条条目结构:`组件名称: 图标 描述内容 [#PR号](链接) [@贡献者]`
- 组件名\*需加粗,后接英文冒号和空格。
- 分组逻辑:
- 多项改动:同一组件有 2 条及以上改动时,使用 `- 组件名` 作为分类标题(不加粗),具体条目缩进排列。
- 单项改动:直接编写单行条目,不设分类标题。
- 文本细节:
- 代码包裹所有属性名、方法名、API、`role`/`aria` 属性必须使用反引号 ` ` 包裹。
- 中英空格:中文与英文、数字、链接、`@` 用户名之间必须保留 **一个空格**
4. **版本与命名**
- 新增属性必须符合 antd API 命名规则
- 新增属性建议在描述中暗示或明确声明可用版本号
### 🏷️ Emoji 规范 (严格执行)
5. **双语输出**:每次处理必须同时提供 **中文版****英文版**
- 🐞 修复 Bug
- 💄 样式更新或 token 更新
- 🆕 新增特性 / 新增属性
- 🔥 极其值得关注的新增特性
- 🇺🇸🇨🇳🇬🇧 国际化改动
- 📖 📝 文档或网站改进
- ✅ 新增或更新测试用例
- 🛎 更新警告/提示信息
- ⌨️ ♿ 可访问性增强
- 🗑 废弃或移除
- 🛠 重构或工具链优化
- ⚡️ 性能提升
6. **PR 链接**:尽量给出原始的 PR 链接,社区提交的 PR 改动加上提交者的链接
---
#### 🎨 格式与结构规范
### 💡 输出示例参考
```md
#### 中文
- 🐞 Drawer: 修复 Drawer.PurePanel 无法响应鼠标交互的问题。[#56387](https://github.com/ant-design/ant-design/pull/56387) [@wanpan11](https://github.com/wanpan11)
- 🐞 Select: 修复 Select options 属性透传至原生 DOM 导致 React 未知属性警告的问题。[#56341](https://github.com/ant-design/ant-design/pull/56341) [@afc163](https://github.com/afc163)
#### English
- 🐞 Drawer: Fix Drawer.PurePanel failing to respond to mouse interactions. [#56387](https://github.com/ant-design/ant-design/pull/56387) [@wanpan11](https://github.com/wanpan11)
- 🐞 Select: Fix Select `options` props leaking to DOM elements and causing React unknown-prop warnings. [#56341](https://github.com/ant-design/ant-design/pull/56341) [@afc163](https://github.com/afc163)
```
### 提示词
```md
### 🤖 角色定义
你是一位 Ant Design 核心维护者,负责编写 `CHANGELOG.zh-CN.md``CHANGELOG.en-US.md`。你需要将原始 PR 列表转化为专业、简洁、面向开发者的发布日志。
### 🎯 核心原则
1. **有效性过滤**:忽略用户无感知的改动(如文档网站改进、纯测试用例更新、内部重构、工具链优化等),除非其对开发者有直接影响。
2. **开发者视角**:描述“用户的原始问题”和“对开发者的影响”,而非“具体的解决代码”。
- ❌ 修复 Typography 的 DOM 结构问题。
- ✅ Typography: 💄 重构并简化了 Typography 的 DOM 结构,修复了内容空格丢失的问题。
3. **版本与命名**
- 新增属性必须符合 antd API 命名规则。
- 新增属性建议在描述中暗示或明确声明可用版本号。
### 🎨 格式与结构规范
1. **单条条目结构**`组件名称: 图标 描述内容 [#PR号](链接) [@贡献者]`
- 组件名**无需加粗**,后接英文冒号和空格。
1. **单条条目结构**`组件名称: 图标 描述内容 [#PR号](链接) [@贡献者]`
- 组件名**无需加粗**,后接英文冒号和空格
2. **分组逻辑**
- **项改动**同一组件有 2 条及以上改动时,使用 `- 组件名` 作为分类标题(不加粗),具体条目缩进排列。
- **单项改动**:直接编写单行条目,不设分类标题。
- **多项改动**:同一组件有 2 条及以上改动时,使用 `- 组件名` 作为分类标题(不加粗),具体条目缩进排列
- **项改动**直接编写单行条目,不设分类标题
3. **文本细节**
- **代码包裹**所有属性名、方法名、API、`role`/`aria` 属性必须使用反引号 `` ` `` 包裹
- **中英空格**:中文与英文、数字、链接、`@` 用户名之间必须保留 **一个空格**
- **代码包裹**所有属性名、方法名、API、`role`/`aria` 属性必须使用反引号 ` ` 包裹。
- **中英空格**:中文与英文、数字、链接、`@` 用户名之间必须保留 **一个空格**
#### 🏷️ Emoji 规范(严格执行)
### 🏷️ Emoji 规范 (严格执行)
| Emoji | 用途 |
| ------ | ---------------------- |
| 🐞 | 修复 Bug |
| 💄 | 样式更新或 token 更新 |
| 🆕 | 新增特性 / 新增属性 |
| 🔥 | 极其值得关注的新增特性 |
| 🇺🇸🇨🇳🇬🇧 | 国际化改动 |
| 📖 📝 | 文档或网站改进 |
| ✅ | 新增或更新测试用例 |
| 🛎 | 更新警告/提示信息 |
| ⌨️ ♿ | 可访问性增强 |
| 🗑 | 废弃或移除 |
| 🛠 | 重构或工具链优化 |
| ⚡️ | 性能提升 |
- 🐞 修复 Bug
- 💄 样式更新或 token 更新
- 🆕 新增特性 / 新增属性
- 🔥 极其值得关注的新增特性
- 🇺🇸🇨🇳🇬🇧 国际化改动
- 📖 📝 文档或网站改进
- ✅ 新增或更新测试用例
- 🛎 更新警告/提示信息
- ⌨️ ♿ 可访问性增强
- 🗑 废弃或移除
- 🛠 重构或工具链优化
- ⚡️ 性能提升
#### 💡 输出示例参考
---
### 🏗️ 任务执行:请处理以下 PR 数据
#### 💡 输出示例参考:
**中文版:**
**中文版**
```markdown
- 🐞 Drawer: 修复 Drawer.PurePanel 无法响应鼠标交互的问题。[#56387](https://github.com/ant-design/ant-design/pull/56387) [@wanpan11](https://github.com/wanpan11)
- 🐞 Select: 修复 Select options 属性透传至原生 DOM 导致 React 未知属性警告的问题。[#56341](https://github.com/ant-design/ant-design/pull/56341) [@afc163](https://github.com/afc163)
- 🐞 Select: 修复 Select `options` 属性透传至原生 DOM 导致 React 未知属性警告的问题。[#56341](https://github.com/ant-design/ant-design/pull/56341) [@afc163](https://github.com/afc163)
```
**English Version:**
**English Version**
```markdown
- 🐞 Drawer: Fix Drawer.PurePanel failing to respond to mouse interactions. [#56387](https://github.com/ant-design/ant-design/pull/56387) [@wanpan11](https://github.com/wanpan11)
- 🐞 Select: Fix Select `options` props leaking to DOM elements and causing React unknown-prop warnings. [#56341](https://github.com/ant-design/ant-design/pull/56341) [@afc163](https://github.com/afc163)
```
---
## Git 和 Pull Request 规范
### 分支管理
禁止直接提交到以下保护分支:
**禁止直接提交到以下保护分支**
- `master`:主分支,用于发布
- `feature`:特性分支,用于开发新版本
@@ -435,18 +538,20 @@ export function TestComp(props) {
### 分支命名规范
- 功能开发:`feat/description-of-feature`
- 问题修复:`fix/issue-number-or-description`
- 文档更新:`docs/what-is-changed`
- 代码重构:`refactor/what-is-changed`
- 样式修改:`style/what-is-changed`
- 测试相关:`test/what-is-changed`
- 构建相关:`build/what-is-changed`
- 持续集成:`ci/what-is-changed`
- 性能优化:`perf/what-is-changed`
- 依赖升级:`deps/package-name-version`
| 类型 | 格式 | 示例 |
| -------- | --------------------------------- | ----------------------------- |
| 功能开发 | `feat/description-of-feature` | `feat/add-dark-mode` |
| 问题修复 | `fix/issue-number-or-description` | `fix/button-style-issue` |
| 文档更新 | `docs/what-is-changed` | `docs/update-api-docs` |
| 代码重构 | `refactor/what-is-changed` | `refactor/button-component` |
| 样式修改 | `style/what-is-changed` | `style/fix-button-padding` |
| 测试相关 | `test/what-is-changed` | `test/add-button-tests` |
| 构建相关 | `build/what-is-changed` | `build/update-webpack-config` |
| 持续集成 | `ci/what-is-changed` | `ci/add-github-actions` |
| 性能优化 | `perf/what-is-changed` | `perf/optimize-render` |
| 依赖升级 | `deps/package-name-version` | `deps/upgrade-react-19` |
### 分支命名注意事项
**分支命名注意事项**
1. 使用小写字母
2. 使用连字符(-)分隔单词
@@ -460,8 +565,9 @@ export function TestComp(props) {
- PR 标题始终使用英文
- 遵循格式:`类型: 简短描述`
- 例如:`fix: fix button style issues in Safari browser`
- 例如:`feat: add dark mode support`
- 示例:
- `fix: fix button style issues in Safari browser`
- `feat: add dark mode support`
#### PR 内容
@@ -473,8 +579,8 @@ export function TestComp(props) {
提交 PR 时请使用项目中提供的模板:
- 英文模板推荐PULL_REQUEST_TEMPLATE.md
- 中文模板PULL_REQUEST_TEMPLATE_CN.md
- 英文模板(推荐):`PULL_REQUEST_TEMPLATE.md`
- 中文模板:`PULL_REQUEST_TEMPLATE_CN.md`
#### PR 提交注意事项
@@ -496,7 +602,7 @@ export function TestComp(props) {
4. **工具标注**
- 如果是用 Cursor 提交的代码,请在 PR body 末尾进行标注:`> Submitted by Cursor`
### PR 改动类型
#### PR 改动类型
- 🆕 新特性提交
- 🐞 Bug 修复
@@ -508,31 +614,35 @@ export function TestComp(props) {
- ⚡️ 性能优化
- 🌐 国际化改进
---
## 质量保证
### 代码质量要求
- 确保代码运行正常,无控制台错误
- 适配常见浏览器
- 避免过时 API及时更新到新推荐用法
- 测试覆盖率达到 100%
- 通过所有 ESLint 和 TypeScript 检查
- 确保代码运行正常,无控制台错误
- 适配常见浏览器
- 避免过时 API及时更新到新推荐用法
- 测试覆盖率达到 100%
- 通过所有 ESLint 和 TypeScript 检查
### 性能要求
- 避免不必要的重新渲染
- 合理使用 React.memouseMemo 和 useCallback
- 样式计算应当高效,避免重复计算
- 图片和资源应当优化
- 支持 Tree Shaking
- 避免不必要的重新渲染
- 合理使用 `React.memo``useMemo``useCallback`
- 样式计算应当高效,避免重复计算
- 图片和资源应当优化
- 支持 Tree Shaking
### 兼容性要求
- 支持 React 18 ~ 19 版本
- 兼容 Chrome 80+ 浏览器
- 支持服务端渲染
- 保持向下兼容,避免 breaking change
- 支持 TypeScript 4.0+
- 支持 React 18 ~ 19 版本
- 兼容 Chrome 80+ 浏览器
- 支持服务端渲染SSR
- 保持向下兼容,避免 breaking change
- 支持 TypeScript 4.0+
---
## 工具链和环境
@@ -557,12 +667,11 @@ export function TestComp(props) {
- 自动化发布流程
- 支持多环境部署
---
## 参考资料
- [API Naming Rules](https://github.com/ant-design/ant-design/wiki/API-Naming-rules)
- [#16048](https://github.com/ant-design/ant-design/issues/16048) - Current listing api & Chinese version
- [#25066](https://github.com/ant-design/ant-design/issues/25066) - API standard in the document
## 特别说明
如果使用 AI 编程助手(如 Cursor进行开发请在提交 PR 时在末尾标注:`> Submitted by Cursor`
- [Development Guide](https://github.com/ant-design/ant-design/wiki/Development)

View File

@@ -15,6 +15,44 @@ tag: vVERSION
---
## 6.2.3
`2026-02-02`
- Button
- 🐞 Fix Button `defaultBg`, `defaultColor`, `defaultHoverColor` and `defaultActiveColor` tokens not taking effect. [#56238](https://github.com/ant-design/ant-design/pull/56238) [@ug-hero](https://github.com/ug-hero)
- 🐞 Fix Button default tokens not taking effect. [#56719](https://github.com/ant-design/ant-design/pull/56719) [@unknowntocka](https://github.com/unknowntocka)
- 🐞 Fix Button `variant="solid"` borders displaying incorrectly inside Space.Compact. [#56486](https://github.com/ant-design/ant-design/pull/56486) [@Pareder](https://github.com/Pareder)
- 🐞 Fix Input.TextArea ref missing `nativeElement` property. [#56803](https://github.com/ant-design/ant-design/pull/56803) [@smith3816](https://github.com/smith3816)
- 🐞 Fix Flex default `align` not taking effect when using `orientation`. [#55950](https://github.com/ant-design/ant-design/pull/55950) [@YingtaoMo](https://github.com/YingtaoMo)
- 🐞 Fix Typography link selector specificity being too low causing styles to be overridden. [#56759](https://github.com/ant-design/ant-design/pull/56759) [@QDyanbing](https://github.com/QDyanbing)
- 🐞 Fix ColorPicker HEX input allowing invalid characters. [#56752](https://github.com/ant-design/ant-design/pull/56752) [@treephesians](https://github.com/treephesians)
## 6.2.2
`2026-01-26`
- 🐞 Fix Button with href wrapped by Typography showing incorrect color and flickering outline on hover. [#56619](https://github.com/ant-design/ant-design/pull/56619) [@QdabuliuQ](https://github.com/QdabuliuQ)
- 🐞 Fix component token not taking effect for Button with `type="text"`. [#56291](https://github.com/ant-design/ant-design/pull/56291) [@QDyanbing](https://github.com/QDyanbing)
- 🐞 Fix where components within the Popover were affected by the state association with Form.Item. [#56728](https://github.com/ant-design/ant-design/pull/56728)
- 🐞 Fix the placeholders displayed incorrectly when selecting multiple items in Select. [#56675](https://github.com/ant-design/ant-design/pull/56675)
- 💄 Fix misaligned elements in Pagination when the global `fontSize` is increased. [#56715](https://github.com/ant-design/ant-design/pull/56715) [@QDyanbing](https://github.com/QDyanbing)
- 💄 Fix incorrect Drawer dragger position in RTL mode. [#56693](https://github.com/ant-design/ant-design/pull/56693) [@QdabuliuQ](https://github.com/QdabuliuQ)
## 6.2.1
`2026-01-20`
- 🐞 Fix Button child element's `className` be cleared if it contains two Chinese characters. [#56593](https://github.com/ant-design/ant-design/pull/56593) [@QdabuliuQ](https://github.com/QdabuliuQ)
- 🐞 Fix DatePicker DOM not updated bug after update `suffixIcon` as `null`. [#56637](https://github.com/ant-design/ant-design/pull/56637) [@AlanQtten](https://github.com/AlanQtten)
- 🐞 Fix Table content area border radius when set border radius for container. [#56478](https://github.com/ant-design/ant-design/pull/56478) [@QDyanbing](https://github.com/QDyanbing)
- 💄 Fix Card unexpected border radius for Body area. [#56653](https://github.com/ant-design/ant-design/pull/56653) [@ug-hero](https://github.com/ug-hero)
- 💄 MISC: Fix unexpected `undefined` and `null` in the injected styles. [#56636](https://github.com/ant-design/ant-design/pull/56636) [@li-jia-nan](https://github.com/li-jia-nan)
- 💄 MISC: Improve `background` transition to `background-color` for all components. [#56598](https://github.com/ant-design/ant-design/pull/56598) [@li-jia-nan](https://github.com/li-jia-nan)
- 🛠 Improve Grid use `genCssVar` method to generate more stable CSS variable names. [#56635](https://github.com/ant-design/ant-design/pull/56635) [@li-jia-nan](https://github.com/li-jia-nan)
- 🛠 Improve @ant-design/icons usage to avoid depend on full package since externals. [#56639](https://github.com/ant-design/ant-design/pull/56639) [@ShenHongFei](https://github.com/ShenHongFei)
## 6.2.0
`2026-01-13`

View File

@@ -15,6 +15,43 @@ tag: vVERSION
---
## 6.2.3
`2026-02-02`
- Button
- 🐞 修复 Button `defaultBg``defaultColor``defaultHoverColor``defaultActiveColor` token 不生效的问题。[#56238](https://github.com/ant-design/ant-design/pull/56238) [@ug-hero](https://github.com/ug-hero)
- 🐞 修复 Button 默认 token 不生效的问题。[#56719](https://github.com/ant-design/ant-design/pull/56719) [@unknowntocka](https://github.com/unknowntocka)
- 🐞 修复 Button `variant="solid"` 在 Space.Compact 中边框显示异常的问题。[#56486](https://github.com/ant-design/ant-design/pull/56486) [@Pareder](https://github.com/Pareder)
- 🐞 修复 Input.TextArea ref 缺少 `nativeElement` 属性的问题。[#56803](https://github.com/ant-design/ant-design/pull/56803) [@smith3816](https://github.com/smith3816)
- 🐞 修复 Flex 使用 `orientation` 时默认 `align` 不生效的问题。[#55950](https://github.com/ant-design/ant-design/pull/55950) [@YingtaoMo](https://github.com/YingtaoMo)
- 🐞 修复 Typography 链接选择器特异性过低导致样式被覆盖的问题。[#56759](https://github.com/ant-design/ant-design/pull/56759) [@QDyanbing](https://github.com/QDyanbing)
- 🐞 修复 ColorPicker HEX 输入框可以输入无效字符的问题。[#56752](https://github.com/ant-design/ant-design/pull/56752) [@treephesians](https://github.com/treephesians)
## 6.2.2
`2026-01-26`
- 🐞 修复被 Typography 包裹的带 href 的 Button 显示错误颜色和 hover 时 outline 闪烁的问题。[#56619](https://github.com/ant-design/ant-design/pull/56619) [@QdabuliuQ](https://github.com/QdabuliuQ)
- 🐞 修复 Button `type="text"` 时组件 Token 不生效的问题。[#56291](https://github.com/ant-design/ant-design/pull/56291) [@QDyanbing](https://github.com/QDyanbing)
- 🐞 修复 Popover 内组件被 Form.Item 状态关联影响的问题。[#56728](https://github.com/ant-design/ant-design/pull/56728)
- 🐞 修复 Select 多选时占位符显示异常的问题。[#56675](https://github.com/ant-design/ant-design/pull/56675)
- 💄 修复 Pagination 全局 `fontSize` 变大时各元素上下错位的问题。[#56715](https://github.com/ant-design/ant-design/pull/56715) [@QDyanbing](https://github.com/QDyanbing)
- 💄 修复 Drawer 在 rtl 模式下 dragger 位置错误的样式问题。[#56693](https://github.com/ant-design/ant-design/pull/56693) [@QdabuliuQ](https://github.com/QdabuliuQ)
## 6.2.1
`2026-01-20`
- 🐞 修复 Button 子元素为包含两个中文字符的标签时,原有 `className` 被清空的问题。[#56593](https://github.com/ant-design/ant-design/pull/56593) [@QdabuliuQ](https://github.com/QdabuliuQ)
- 🐞 修复 DatePicker 在设置 `suffixIcon``null` 后不会更新 DOM 的问题。[#56637](https://github.com/ant-design/ant-design/pull/56637) [@AlanQtten](https://github.com/AlanQtten)
- 🐞 修复 Table 容器设置圆角时,内部内容区域圆角不一致的问题。[#56478](https://github.com/ant-design/ant-design/pull/56478) [@QDyanbing](https://github.com/QDyanbing)
- 💄 修复 Card Body 区域有非预期圆角值的问题。[#56653](https://github.com/ant-design/ant-design/pull/56653) [@ug-hero](https://github.com/ug-hero)
- 💄 杂项:修复 `undefined``null` 值被注入到 CSS 的问题。[#56636](https://github.com/ant-design/ant-design/pull/56636) [@li-jia-nan](https://github.com/li-jia-nan)
- 💄 杂项:优化所有组件中的 `background` 过渡为 `background-color`。[#56598](https://github.com/ant-design/ant-design/pull/56598) [@li-jia-nan](https://github.com/li-jia-nan)
- 🛠 优化 Grid 使用 `genCssVar` 方法以生成更加稳定的 CSS 变量名。[#56635](https://github.com/ant-design/ant-design/pull/56635) [@li-jia-nan](https://github.com/li-jia-nan)
- 🛠 优化 @ant-design/icons 引入方式为独立图标引入,避免被 externals 增加前置依赖。[#56639](https://github.com/ant-design/ant-design/pull/56639) [@ShenHongFei](https://github.com/ShenHongFei)
## 6.2.0
`2026-01-13`

View File

@@ -1,35 +1,24 @@
const fs = require('fs');
import fs from 'node:fs';
import path from 'node:path';
const path = require('path');
const blogDir = path.join(__dirname, '../../docs/blog');
const blogList = [
'check-conduct',
'contributor-development-maintenance-guide',
'css-in-js',
'extract-ssr',
'getContainer',
'github-actions-workflow',
'issue-helper',
'mock-project-build',
'modal-hook-order',
'testing-migrate',
'render-times',
'to-be-collaborator',
'tooltip-align',
'tree-shaking',
'why-not-static',
].map((blogName) => path.join(__dirname, `../../docs/blog/${blogName}.en-US.md`));
const blogList = fs
.readdirSync(blogDir, { withFileTypes: true })
.filter((entry) => entry.isFile())
.map((entry) => entry.name)
.filter((file) => file.endsWith('.en-US.md'))
.map((file) => path.join(blogDir, file));
describe('blog', () => {
describe('Chinese detected in en-US blog', () => {
it('should not include Chinese in en-US blog', () => {
blogList.forEach((blog) => {
fs.readFile(blog, (err: NodeJS.ErrnoException | null, data: Buffer) => {
if (err) {
return;
}
const includeChinese = /[\u4E00-\u9FA5]/.test(data.toString());
expect(includeChinese).toBe(false);
});
});
for (const blog of blogList) {
const data = fs.readFileSync(blog, 'utf-8');
const includeChinese = /[\u4E00-\u9FA5]/.test(data);
if (includeChinese) {
console.error('❌ 检测到中文:', blog);
}
expect(includeChinese).toBe(false);
}
});
});

View File

@@ -26,7 +26,7 @@ import {
import type { ZIndexConsumer, ZIndexContainer } from '../hooks/useZIndex';
import { consumerBaseZIndexOffset, containerBaseZIndexOffset, useZIndex } from '../hooks/useZIndex';
import { resetWarned } from '../warning';
import zIndexContext from '../zindexContext';
import ZIndexContext from '../zindexContext';
// TODO: Remove this. Mock for React 19
jest.mock('react-dom', () => {
@@ -45,7 +45,7 @@ const WrapWithProvider: React.FC<PropsWithChildren<{ container: ZIndexContainer
container,
}) => {
const [, contextZIndex] = useZIndex(container);
return <zIndexContext.Provider value={contextZIndex}>{children}</zIndexContext.Provider>;
return <ZIndexContext.Provider value={contextZIndex}>{children}</ZIndexContext.Provider>;
};
const containerComponent: Partial<
@@ -130,10 +130,10 @@ const items: MenuProps['items'] = [
];
const consumerComponent: Partial<
Record<ZIndexConsumer, React.FC<Readonly<{ rootClassName: string }>>>
Record<ZIndexConsumer, React.FC<Readonly<{ rootClassName: string; ref?: React.Ref<any> }>>>
> = {
SelectLike: ({ rootClassName, ...props }) => (
<>
SelectLike: ({ rootClassName, ref, ...props }) => (
<div ref={ref}>
<Select
{...props}
rootClassName={`${rootClassName} comp-item comp-Select`}
@@ -159,7 +159,7 @@ const consumerComponent: Partial<
open
/>
<ColorPicker {...props} open rootClassName={`${rootClassName} comp-item comp-ColorPicker`} />
</>
</div>
),
Dropdown: (props) => (
<Dropdown
@@ -175,15 +175,15 @@ const consumerComponent: Partial<
<button type="button">test</button>
</Dropdown>
),
DatePicker: ({ rootClassName, ...props }) => (
<>
DatePicker: ({ rootClassName, ref, ...props }) => (
<div ref={ref}>
<DatePicker {...props} rootClassName={`${rootClassName} comp-item comp-DatePicker`} open />
<DatePicker.TimePicker
{...props}
rootClassName={`${rootClassName} comp-item comp-TimePicker`}
open
/>
</>
</div>
),
Menu: (props) => <Menu {...props} items={items} defaultOpenKeys={['SubMenu']} />,
ImagePreview: ({ rootClassName }: ImageProps) => (

View File

@@ -2,7 +2,7 @@ import React from 'react';
import useToken from '../../theme/useToken';
import { devUseWarning } from '../warning';
import zIndexContext from '../zindexContext';
import ZIndexContext from '../zindexContext';
export type ZIndexContainer =
| 'Modal'
@@ -61,7 +61,7 @@ export const useZIndex = (
customZIndex?: number,
): ReturnResult => {
const [, token] = useToken();
const parentZIndex = React.useContext(zIndexContext);
const parentZIndex = React.useContext(ZIndexContext);
const isContainer = isContainerType(componentType);
let result: ReturnResult;

View File

@@ -8,7 +8,14 @@ export interface ComponentToken {}
export interface WaveToken extends FullToken<'Wave'> {}
const genWaveStyle: GenerateStyle<WaveToken> = (token) => {
const { componentCls, colorPrimary, antCls } = token;
const {
componentCls,
colorPrimary,
motionDurationSlow,
motionEaseInOut,
motionEaseOutCirc,
antCls,
} = token;
const [, varRef] = genCssVar(antCls, 'wave');
return {
[componentCls]: {
@@ -22,20 +29,18 @@ const genWaveStyle: GenerateStyle<WaveToken> = (token) => {
// =================== Motion ===================
'&.wave-motion-appear': {
transition: [
`box-shadow 0.4s ${token.motionEaseOutCirc}`,
`opacity 2s ${token.motionEaseOutCirc}`,
].join(','),
transition: [`box-shadow 0.4s`, `opacity 2s`]
.map((prop) => `${prop} ${motionEaseOutCirc}`)
.join(','),
'&-active': {
boxShadow: `0 0 0 6px currentcolor`,
opacity: 0,
},
'&.wave-quick': {
transition: [
`box-shadow ${token.motionDurationSlow} ${token.motionEaseInOut}`,
`opacity ${token.motionDurationSlow} ${token.motionEaseInOut}`,
].join(','),
transition: [`box-shadow`, `opacity`]
.map((prop) => `${prop} ${motionDurationSlow} ${motionEaseInOut}`)
.join(','),
},
},
},

View File

@@ -1,9 +1,9 @@
import React from 'react';
const zIndexContext = React.createContext<number | undefined>(undefined);
const ZIndexContext = React.createContext<number | undefined>(undefined);
if (process.env.NODE_ENV !== 'production') {
zIndexContext.displayName = 'zIndexContext';
ZIndexContext.displayName = 'ZIndexContext';
}
export default zIndexContext;
export default ZIndexContext;

View File

@@ -0,0 +1,811 @@
// Jest Snapshot v1, https://jestjs.io/docs/snapshot-testing
exports[`renders components/alert/demo/_semantic.tsx correctly 1`] = `
<div
class="acss-1ucck97"
>
<div
class="ant-row css-var-test-id"
>
<div
class="ant-col ant-col-16 acss-my3sst css-var-test-id"
>
<div
class="ant-alert ant-alert-info ant-alert-with-description semantic-mark-root css-var-test-id"
data-show="true"
role="alert"
>
<span
class="ant-alert-icon semantic-mark-icon"
>
<span
aria-label="info-circle"
class="anticon anticon-info-circle"
role="img"
>
<svg
aria-hidden="true"
data-icon="info-circle"
fill="currentColor"
focusable="false"
height="1em"
viewBox="64 64 896 896"
width="1em"
>
<path
d="M512 64C264.6 64 64 264.6 64 512s200.6 448 448 448 448-200.6 448-448S759.4 64 512 64zm32 664c0 4.4-3.6 8-8 8h-48c-4.4 0-8-3.6-8-8V456c0-4.4 3.6-8 8-8h48c4.4 0 8 3.6 8 8v272zm-32-344a48.01 48.01 0 010-96 48.01 48.01 0 010 96z"
/>
</svg>
</span>
</span>
<div
class="ant-alert-section semantic-mark-section"
>
<div
class="ant-alert-title semantic-mark-title"
>
Info Text
</div>
<div
class="ant-alert-description semantic-mark-description"
>
Info Description Info Description Info Description Info Description
</div>
</div>
<div
class="ant-alert-actions semantic-mark-actions"
>
<div
class="ant-space ant-space-vertical ant-space-gap-row-small ant-space-gap-col-small css-var-test-id"
>
<div
class="ant-space-item"
>
<button
class="ant-btn css-var-test-id ant-btn-primary ant-btn-color-primary ant-btn-variant-solid ant-btn-sm"
type="button"
>
<span>
Accept
</span>
</button>
</div>
<div
class="ant-space-item"
>
<button
class="ant-btn css-var-test-id ant-btn-default ant-btn-dangerous ant-btn-color-dangerous ant-btn-variant-outlined ant-btn-sm ant-btn-background-ghost"
type="button"
>
<span>
Decline
</span>
</button>
</div>
</div>
</div>
<button
class="ant-alert-close-icon semantic-mark-close"
tabindex="0"
type="button"
>
<span
aria-label="close"
class="anticon anticon-close"
role="img"
>
<svg
aria-hidden="true"
data-icon="close"
fill="currentColor"
fill-rule="evenodd"
focusable="false"
height="1em"
viewBox="64 64 896 896"
width="1em"
>
<path
d="M799.86 166.31c.02 0 .04.02.08.06l57.69 57.7c.04.03.05.05.06.08a.12.12 0 010 .06c0 .03-.02.05-.06.09L569.93 512l287.7 287.7c.04.04.05.06.06.09a.12.12 0 010 .07c0 .02-.02.04-.06.08l-57.7 57.69c-.03.04-.05.05-.07.06a.12.12 0 01-.07 0c-.03 0-.05-.02-.09-.06L512 569.93l-287.7 287.7c-.04.04-.06.05-.09.06a.12.12 0 01-.07 0c-.02 0-.04-.02-.08-.06l-57.69-57.7c-.04-.03-.05-.05-.06-.07a.12.12 0 010-.07c0-.03.02-.05.06-.09L454.07 512l-287.7-287.7c-.04-.04-.05-.06-.06-.09a.12.12 0 010-.07c0-.02.02-.04.06-.08l57.7-57.69c.03-.04.05-.05.07-.06a.12.12 0 01.07 0c.03 0 .05.02.09.06L512 454.07l287.7-287.7c.04-.04.06-.05.09-.06a.12.12 0 01.07 0z"
/>
</svg>
</span>
</button>
</div>
</div>
<div
class="ant-col ant-col-8 css-var-test-id"
>
<ul
class="acss-1ry21g5"
>
<li
class="acss-1ehfz5v"
>
<div
class="ant-flex css-var-test-id ant-flex-align-stretch ant-flex-gap-small ant-flex-vertical"
>
<div
class="ant-flex css-var-test-id ant-flex-align-center ant-flex-justify-space-between ant-flex-gap-small"
>
<div
class="ant-flex css-var-test-id ant-flex-align-center ant-flex-gap-small"
>
<h5
class="ant-typography css-var-test-id"
style="margin: 0px;"
>
root
</h5>
<span
class="ant-tag ant-tag-filled ant-tag-blue css-var-test-id"
>
6.0.0
</span>
</div>
<div
class="ant-flex css-var-test-id ant-flex-align-center ant-flex-gap-small"
>
<button
aria-hidden="true"
class="ant-btn css-var-test-id ant-btn-default ant-btn-color-default ant-btn-variant-text ant-btn-sm ant-btn-icon-only"
type="button"
>
<span
class="ant-btn-icon"
>
<span
aria-label="pushpin"
class="anticon anticon-pushpin"
role="img"
>
<svg
aria-hidden="true"
data-icon="pushpin"
fill="currentColor"
focusable="false"
height="1em"
viewBox="64 64 896 896"
width="1em"
>
<path
d="M878.3 392.1L631.9 145.7c-6.5-6.5-15-9.7-23.5-9.7s-17 3.2-23.5 9.7L423.8 306.9c-12.2-1.4-24.5-2-36.8-2-73.2 0-146.4 24.1-206.5 72.3a33.23 33.23 0 00-2.7 49.4l181.7 181.7-215.4 215.2a15.8 15.8 0 00-4.6 9.8l-3.4 37.2c-.9 9.4 6.6 17.4 15.9 17.4.5 0 1 0 1.5-.1l37.2-3.4c3.7-.3 7.2-2 9.8-4.6l215.4-215.4 181.7 181.7c6.5 6.5 15 9.7 23.5 9.7 9.7 0 19.3-4.2 25.9-12.4 56.3-70.3 79.7-158.3 70.2-243.4l161.1-161.1c12.9-12.8 12.9-33.8 0-46.8zM666.2 549.3l-24.5 24.5 3.8 34.4a259.92 259.92 0 01-30.4 153.9L262 408.8c12.9-7.1 26.3-13.1 40.3-17.9 27.2-9.4 55.7-14.1 84.7-14.1 9.6 0 19.3.5 28.9 1.6l34.4 3.8 24.5-24.5L608.5 224 800 415.5 666.2 549.3z"
/>
</svg>
</span>
</span>
</button>
<button
aria-hidden="true"
class="ant-btn css-var-test-id ant-btn-text ant-btn-color-default ant-btn-variant-text ant-btn-sm ant-btn-icon-only"
type="button"
>
<span
class="ant-btn-icon"
>
<span
aria-label="info-circle"
class="anticon anticon-info-circle"
role="img"
>
<svg
aria-hidden="true"
data-icon="info-circle"
fill="currentColor"
focusable="false"
height="1em"
viewBox="64 64 896 896"
width="1em"
>
<path
d="M512 64C264.6 64 64 264.6 64 512s200.6 448 448 448 448-200.6 448-448S759.4 64 512 64zm0 820c-205.4 0-372-166.6-372-372s166.6-372 372-372 372 166.6 372 372-166.6 372-372 372z"
/>
<path
d="M464 336a48 48 0 1096 0 48 48 0 10-96 0zm72 112h-48c-4.4 0-8 3.6-8 8v272c0 4.4 3.6 8 8 8h48c4.4 0 8-3.6 8-8V456c0-4.4-3.6-8-8-8z"
/>
</svg>
</span>
</span>
</button>
</div>
</div>
<div
class="ant-typography css-var-test-id"
style="margin: 0px; font-size: 12px;"
>
根元素,包含边框、背景色、内边距、圆角、位置布局等警告提示框的基础样式
</div>
</div>
</li>
<li
class="acss-1ehfz5v"
>
<div
class="ant-flex css-var-test-id ant-flex-align-stretch ant-flex-gap-small ant-flex-vertical"
>
<div
class="ant-flex css-var-test-id ant-flex-align-center ant-flex-justify-space-between ant-flex-gap-small"
>
<div
class="ant-flex css-var-test-id ant-flex-align-center ant-flex-gap-small"
>
<h5
class="ant-typography css-var-test-id"
style="margin: 0px;"
>
icon
</h5>
<span
class="ant-tag ant-tag-filled ant-tag-blue css-var-test-id"
>
6.0.0
</span>
</div>
<div
class="ant-flex css-var-test-id ant-flex-align-center ant-flex-gap-small"
>
<button
aria-hidden="true"
class="ant-btn css-var-test-id ant-btn-default ant-btn-color-default ant-btn-variant-text ant-btn-sm ant-btn-icon-only"
type="button"
>
<span
class="ant-btn-icon"
>
<span
aria-label="pushpin"
class="anticon anticon-pushpin"
role="img"
>
<svg
aria-hidden="true"
data-icon="pushpin"
fill="currentColor"
focusable="false"
height="1em"
viewBox="64 64 896 896"
width="1em"
>
<path
d="M878.3 392.1L631.9 145.7c-6.5-6.5-15-9.7-23.5-9.7s-17 3.2-23.5 9.7L423.8 306.9c-12.2-1.4-24.5-2-36.8-2-73.2 0-146.4 24.1-206.5 72.3a33.23 33.23 0 00-2.7 49.4l181.7 181.7-215.4 215.2a15.8 15.8 0 00-4.6 9.8l-3.4 37.2c-.9 9.4 6.6 17.4 15.9 17.4.5 0 1 0 1.5-.1l37.2-3.4c3.7-.3 7.2-2 9.8-4.6l215.4-215.4 181.7 181.7c6.5 6.5 15 9.7 23.5 9.7 9.7 0 19.3-4.2 25.9-12.4 56.3-70.3 79.7-158.3 70.2-243.4l161.1-161.1c12.9-12.8 12.9-33.8 0-46.8zM666.2 549.3l-24.5 24.5 3.8 34.4a259.92 259.92 0 01-30.4 153.9L262 408.8c12.9-7.1 26.3-13.1 40.3-17.9 27.2-9.4 55.7-14.1 84.7-14.1 9.6 0 19.3.5 28.9 1.6l34.4 3.8 24.5-24.5L608.5 224 800 415.5 666.2 549.3z"
/>
</svg>
</span>
</span>
</button>
<button
aria-hidden="true"
class="ant-btn css-var-test-id ant-btn-text ant-btn-color-default ant-btn-variant-text ant-btn-sm ant-btn-icon-only"
type="button"
>
<span
class="ant-btn-icon"
>
<span
aria-label="info-circle"
class="anticon anticon-info-circle"
role="img"
>
<svg
aria-hidden="true"
data-icon="info-circle"
fill="currentColor"
focusable="false"
height="1em"
viewBox="64 64 896 896"
width="1em"
>
<path
d="M512 64C264.6 64 64 264.6 64 512s200.6 448 448 448 448-200.6 448-448S759.4 64 512 64zm0 820c-205.4 0-372-166.6-372-372s166.6-372 372-372 372 166.6 372 372-166.6 372-372 372z"
/>
<path
d="M464 336a48 48 0 1096 0 48 48 0 10-96 0zm72 112h-48c-4.4 0-8 3.6-8 8v272c0 4.4 3.6 8 8 8h48c4.4 0 8-3.6 8-8V456c0-4.4-3.6-8-8-8z"
/>
</svg>
</span>
</span>
</button>
</div>
</div>
<div
class="ant-typography css-var-test-id"
style="margin: 0px; font-size: 12px;"
>
图标元素,包含图标的颜色、行高、外边距等样式,支持不同类型的状态图标
</div>
</div>
</li>
<li
class="acss-1ehfz5v"
>
<div
class="ant-flex css-var-test-id ant-flex-align-stretch ant-flex-gap-small ant-flex-vertical"
>
<div
class="ant-flex css-var-test-id ant-flex-align-center ant-flex-justify-space-between ant-flex-gap-small"
>
<div
class="ant-flex css-var-test-id ant-flex-align-center ant-flex-gap-small"
>
<h5
class="ant-typography css-var-test-id"
style="margin: 0px;"
>
section
</h5>
<span
class="ant-tag ant-tag-filled ant-tag-blue css-var-test-id"
>
6.0.0
</span>
</div>
<div
class="ant-flex css-var-test-id ant-flex-align-center ant-flex-gap-small"
>
<button
aria-hidden="true"
class="ant-btn css-var-test-id ant-btn-default ant-btn-color-default ant-btn-variant-text ant-btn-sm ant-btn-icon-only"
type="button"
>
<span
class="ant-btn-icon"
>
<span
aria-label="pushpin"
class="anticon anticon-pushpin"
role="img"
>
<svg
aria-hidden="true"
data-icon="pushpin"
fill="currentColor"
focusable="false"
height="1em"
viewBox="64 64 896 896"
width="1em"
>
<path
d="M878.3 392.1L631.9 145.7c-6.5-6.5-15-9.7-23.5-9.7s-17 3.2-23.5 9.7L423.8 306.9c-12.2-1.4-24.5-2-36.8-2-73.2 0-146.4 24.1-206.5 72.3a33.23 33.23 0 00-2.7 49.4l181.7 181.7-215.4 215.2a15.8 15.8 0 00-4.6 9.8l-3.4 37.2c-.9 9.4 6.6 17.4 15.9 17.4.5 0 1 0 1.5-.1l37.2-3.4c3.7-.3 7.2-2 9.8-4.6l215.4-215.4 181.7 181.7c6.5 6.5 15 9.7 23.5 9.7 9.7 0 19.3-4.2 25.9-12.4 56.3-70.3 79.7-158.3 70.2-243.4l161.1-161.1c12.9-12.8 12.9-33.8 0-46.8zM666.2 549.3l-24.5 24.5 3.8 34.4a259.92 259.92 0 01-30.4 153.9L262 408.8c12.9-7.1 26.3-13.1 40.3-17.9 27.2-9.4 55.7-14.1 84.7-14.1 9.6 0 19.3.5 28.9 1.6l34.4 3.8 24.5-24.5L608.5 224 800 415.5 666.2 549.3z"
/>
</svg>
</span>
</span>
</button>
<button
aria-hidden="true"
class="ant-btn css-var-test-id ant-btn-text ant-btn-color-default ant-btn-variant-text ant-btn-sm ant-btn-icon-only"
type="button"
>
<span
class="ant-btn-icon"
>
<span
aria-label="info-circle"
class="anticon anticon-info-circle"
role="img"
>
<svg
aria-hidden="true"
data-icon="info-circle"
fill="currentColor"
focusable="false"
height="1em"
viewBox="64 64 896 896"
width="1em"
>
<path
d="M512 64C264.6 64 64 264.6 64 512s200.6 448 448 448 448-200.6 448-448S759.4 64 512 64zm0 820c-205.4 0-372-166.6-372-372s166.6-372 372-372 372 166.6 372 372-166.6 372-372 372z"
/>
<path
d="M464 336a48 48 0 1096 0 48 48 0 10-96 0zm72 112h-48c-4.4 0-8 3.6-8 8v272c0 4.4 3.6 8 8 8h48c4.4 0 8-3.6 8-8V456c0-4.4-3.6-8-8-8z"
/>
</svg>
</span>
</span>
</button>
</div>
</div>
<div
class="ant-typography css-var-test-id"
style="margin: 0px; font-size: 12px;"
>
内容元素,采用 flex 布局控制内容区域的排版和最小宽度
</div>
</div>
</li>
<li
class="acss-1ehfz5v"
>
<div
class="ant-flex css-var-test-id ant-flex-align-stretch ant-flex-gap-small ant-flex-vertical"
>
<div
class="ant-flex css-var-test-id ant-flex-align-center ant-flex-justify-space-between ant-flex-gap-small"
>
<div
class="ant-flex css-var-test-id ant-flex-align-center ant-flex-gap-small"
>
<h5
class="ant-typography css-var-test-id"
style="margin: 0px;"
>
title
</h5>
<span
class="ant-tag ant-tag-filled ant-tag-blue css-var-test-id"
>
6.0.0
</span>
</div>
<div
class="ant-flex css-var-test-id ant-flex-align-center ant-flex-gap-small"
>
<button
aria-hidden="true"
class="ant-btn css-var-test-id ant-btn-default ant-btn-color-default ant-btn-variant-text ant-btn-sm ant-btn-icon-only"
type="button"
>
<span
class="ant-btn-icon"
>
<span
aria-label="pushpin"
class="anticon anticon-pushpin"
role="img"
>
<svg
aria-hidden="true"
data-icon="pushpin"
fill="currentColor"
focusable="false"
height="1em"
viewBox="64 64 896 896"
width="1em"
>
<path
d="M878.3 392.1L631.9 145.7c-6.5-6.5-15-9.7-23.5-9.7s-17 3.2-23.5 9.7L423.8 306.9c-12.2-1.4-24.5-2-36.8-2-73.2 0-146.4 24.1-206.5 72.3a33.23 33.23 0 00-2.7 49.4l181.7 181.7-215.4 215.2a15.8 15.8 0 00-4.6 9.8l-3.4 37.2c-.9 9.4 6.6 17.4 15.9 17.4.5 0 1 0 1.5-.1l37.2-3.4c3.7-.3 7.2-2 9.8-4.6l215.4-215.4 181.7 181.7c6.5 6.5 15 9.7 23.5 9.7 9.7 0 19.3-4.2 25.9-12.4 56.3-70.3 79.7-158.3 70.2-243.4l161.1-161.1c12.9-12.8 12.9-33.8 0-46.8zM666.2 549.3l-24.5 24.5 3.8 34.4a259.92 259.92 0 01-30.4 153.9L262 408.8c12.9-7.1 26.3-13.1 40.3-17.9 27.2-9.4 55.7-14.1 84.7-14.1 9.6 0 19.3.5 28.9 1.6l34.4 3.8 24.5-24.5L608.5 224 800 415.5 666.2 549.3z"
/>
</svg>
</span>
</span>
</button>
<button
aria-hidden="true"
class="ant-btn css-var-test-id ant-btn-text ant-btn-color-default ant-btn-variant-text ant-btn-sm ant-btn-icon-only"
type="button"
>
<span
class="ant-btn-icon"
>
<span
aria-label="info-circle"
class="anticon anticon-info-circle"
role="img"
>
<svg
aria-hidden="true"
data-icon="info-circle"
fill="currentColor"
focusable="false"
height="1em"
viewBox="64 64 896 896"
width="1em"
>
<path
d="M512 64C264.6 64 64 264.6 64 512s200.6 448 448 448 448-200.6 448-448S759.4 64 512 64zm0 820c-205.4 0-372-166.6-372-372s166.6-372 372-372 372 166.6 372 372-166.6 372-372 372z"
/>
<path
d="M464 336a48 48 0 1096 0 48 48 0 10-96 0zm72 112h-48c-4.4 0-8 3.6-8 8v272c0 4.4 3.6 8 8 8h48c4.4 0 8-3.6 8-8V456c0-4.4-3.6-8-8-8z"
/>
</svg>
</span>
</span>
</button>
</div>
</div>
<div
class="ant-typography css-var-test-id"
style="margin: 0px; font-size: 12px;"
>
标题元素,包含标题文字的颜色、字体等样式
</div>
</div>
</li>
<li
class="acss-1ehfz5v"
>
<div
class="ant-flex css-var-test-id ant-flex-align-stretch ant-flex-gap-small ant-flex-vertical"
>
<div
class="ant-flex css-var-test-id ant-flex-align-center ant-flex-justify-space-between ant-flex-gap-small"
>
<div
class="ant-flex css-var-test-id ant-flex-align-center ant-flex-gap-small"
>
<h5
class="ant-typography css-var-test-id"
style="margin: 0px;"
>
description
</h5>
<span
class="ant-tag ant-tag-filled ant-tag-blue css-var-test-id"
>
6.0.0
</span>
</div>
<div
class="ant-flex css-var-test-id ant-flex-align-center ant-flex-gap-small"
>
<button
aria-hidden="true"
class="ant-btn css-var-test-id ant-btn-default ant-btn-color-default ant-btn-variant-text ant-btn-sm ant-btn-icon-only"
type="button"
>
<span
class="ant-btn-icon"
>
<span
aria-label="pushpin"
class="anticon anticon-pushpin"
role="img"
>
<svg
aria-hidden="true"
data-icon="pushpin"
fill="currentColor"
focusable="false"
height="1em"
viewBox="64 64 896 896"
width="1em"
>
<path
d="M878.3 392.1L631.9 145.7c-6.5-6.5-15-9.7-23.5-9.7s-17 3.2-23.5 9.7L423.8 306.9c-12.2-1.4-24.5-2-36.8-2-73.2 0-146.4 24.1-206.5 72.3a33.23 33.23 0 00-2.7 49.4l181.7 181.7-215.4 215.2a15.8 15.8 0 00-4.6 9.8l-3.4 37.2c-.9 9.4 6.6 17.4 15.9 17.4.5 0 1 0 1.5-.1l37.2-3.4c3.7-.3 7.2-2 9.8-4.6l215.4-215.4 181.7 181.7c6.5 6.5 15 9.7 23.5 9.7 9.7 0 19.3-4.2 25.9-12.4 56.3-70.3 79.7-158.3 70.2-243.4l161.1-161.1c12.9-12.8 12.9-33.8 0-46.8zM666.2 549.3l-24.5 24.5 3.8 34.4a259.92 259.92 0 01-30.4 153.9L262 408.8c12.9-7.1 26.3-13.1 40.3-17.9 27.2-9.4 55.7-14.1 84.7-14.1 9.6 0 19.3.5 28.9 1.6l34.4 3.8 24.5-24.5L608.5 224 800 415.5 666.2 549.3z"
/>
</svg>
</span>
</span>
</button>
<button
aria-hidden="true"
class="ant-btn css-var-test-id ant-btn-text ant-btn-color-default ant-btn-variant-text ant-btn-sm ant-btn-icon-only"
type="button"
>
<span
class="ant-btn-icon"
>
<span
aria-label="info-circle"
class="anticon anticon-info-circle"
role="img"
>
<svg
aria-hidden="true"
data-icon="info-circle"
fill="currentColor"
focusable="false"
height="1em"
viewBox="64 64 896 896"
width="1em"
>
<path
d="M512 64C264.6 64 64 264.6 64 512s200.6 448 448 448 448-200.6 448-448S759.4 64 512 64zm0 820c-205.4 0-372-166.6-372-372s166.6-372 372-372 372 166.6 372 372-166.6 372-372 372z"
/>
<path
d="M464 336a48 48 0 1096 0 48 48 0 10-96 0zm72 112h-48c-4.4 0-8 3.6-8 8v272c0 4.4 3.6 8 8 8h48c4.4 0 8-3.6 8-8V456c0-4.4-3.6-8-8-8z"
/>
</svg>
</span>
</span>
</button>
</div>
</div>
<div
class="ant-typography css-var-test-id"
style="margin: 0px; font-size: 12px;"
>
描述元素,包含描述文字的字体大小、行高等排版样式
</div>
</div>
</li>
<li
class="acss-1ehfz5v"
>
<div
class="ant-flex css-var-test-id ant-flex-align-stretch ant-flex-gap-small ant-flex-vertical"
>
<div
class="ant-flex css-var-test-id ant-flex-align-center ant-flex-justify-space-between ant-flex-gap-small"
>
<div
class="ant-flex css-var-test-id ant-flex-align-center ant-flex-gap-small"
>
<h5
class="ant-typography css-var-test-id"
style="margin: 0px;"
>
actions
</h5>
<span
class="ant-tag ant-tag-filled ant-tag-blue css-var-test-id"
>
6.0.0
</span>
</div>
<div
class="ant-flex css-var-test-id ant-flex-align-center ant-flex-gap-small"
>
<button
aria-hidden="true"
class="ant-btn css-var-test-id ant-btn-default ant-btn-color-default ant-btn-variant-text ant-btn-sm ant-btn-icon-only"
type="button"
>
<span
class="ant-btn-icon"
>
<span
aria-label="pushpin"
class="anticon anticon-pushpin"
role="img"
>
<svg
aria-hidden="true"
data-icon="pushpin"
fill="currentColor"
focusable="false"
height="1em"
viewBox="64 64 896 896"
width="1em"
>
<path
d="M878.3 392.1L631.9 145.7c-6.5-6.5-15-9.7-23.5-9.7s-17 3.2-23.5 9.7L423.8 306.9c-12.2-1.4-24.5-2-36.8-2-73.2 0-146.4 24.1-206.5 72.3a33.23 33.23 0 00-2.7 49.4l181.7 181.7-215.4 215.2a15.8 15.8 0 00-4.6 9.8l-3.4 37.2c-.9 9.4 6.6 17.4 15.9 17.4.5 0 1 0 1.5-.1l37.2-3.4c3.7-.3 7.2-2 9.8-4.6l215.4-215.4 181.7 181.7c6.5 6.5 15 9.7 23.5 9.7 9.7 0 19.3-4.2 25.9-12.4 56.3-70.3 79.7-158.3 70.2-243.4l161.1-161.1c12.9-12.8 12.9-33.8 0-46.8zM666.2 549.3l-24.5 24.5 3.8 34.4a259.92 259.92 0 01-30.4 153.9L262 408.8c12.9-7.1 26.3-13.1 40.3-17.9 27.2-9.4 55.7-14.1 84.7-14.1 9.6 0 19.3.5 28.9 1.6l34.4 3.8 24.5-24.5L608.5 224 800 415.5 666.2 549.3z"
/>
</svg>
</span>
</span>
</button>
<button
aria-hidden="true"
class="ant-btn css-var-test-id ant-btn-text ant-btn-color-default ant-btn-variant-text ant-btn-sm ant-btn-icon-only"
type="button"
>
<span
class="ant-btn-icon"
>
<span
aria-label="info-circle"
class="anticon anticon-info-circle"
role="img"
>
<svg
aria-hidden="true"
data-icon="info-circle"
fill="currentColor"
focusable="false"
height="1em"
viewBox="64 64 896 896"
width="1em"
>
<path
d="M512 64C264.6 64 64 264.6 64 512s200.6 448 448 448 448-200.6 448-448S759.4 64 512 64zm0 820c-205.4 0-372-166.6-372-372s166.6-372 372-372 372 166.6 372 372-166.6 372-372 372z"
/>
<path
d="M464 336a48 48 0 1096 0 48 48 0 10-96 0zm72 112h-48c-4.4 0-8 3.6-8 8v272c0 4.4 3.6 8 8 8h48c4.4 0 8-3.6 8-8V456c0-4.4-3.6-8-8-8z"
/>
</svg>
</span>
</span>
</button>
</div>
</div>
<div
class="ant-typography css-var-test-id"
style="margin: 0px; font-size: 12px;"
>
操作组元素,包含操作按钮的布局和间距样式
</div>
</div>
</li>
<li
class="acss-1ehfz5v"
>
<div
class="ant-flex css-var-test-id ant-flex-align-stretch ant-flex-gap-small ant-flex-vertical"
>
<div
class="ant-flex css-var-test-id ant-flex-align-center ant-flex-justify-space-between ant-flex-gap-small"
>
<div
class="ant-flex css-var-test-id ant-flex-align-center ant-flex-gap-small"
>
<h5
class="ant-typography css-var-test-id"
style="margin: 0px;"
>
close
</h5>
<span
class="ant-tag ant-tag-filled ant-tag-blue css-var-test-id"
>
6.1.0
</span>
</div>
<div
class="ant-flex css-var-test-id ant-flex-align-center ant-flex-gap-small"
>
<button
aria-hidden="true"
class="ant-btn css-var-test-id ant-btn-default ant-btn-color-default ant-btn-variant-text ant-btn-sm ant-btn-icon-only"
type="button"
>
<span
class="ant-btn-icon"
>
<span
aria-label="pushpin"
class="anticon anticon-pushpin"
role="img"
>
<svg
aria-hidden="true"
data-icon="pushpin"
fill="currentColor"
focusable="false"
height="1em"
viewBox="64 64 896 896"
width="1em"
>
<path
d="M878.3 392.1L631.9 145.7c-6.5-6.5-15-9.7-23.5-9.7s-17 3.2-23.5 9.7L423.8 306.9c-12.2-1.4-24.5-2-36.8-2-73.2 0-146.4 24.1-206.5 72.3a33.23 33.23 0 00-2.7 49.4l181.7 181.7-215.4 215.2a15.8 15.8 0 00-4.6 9.8l-3.4 37.2c-.9 9.4 6.6 17.4 15.9 17.4.5 0 1 0 1.5-.1l37.2-3.4c3.7-.3 7.2-2 9.8-4.6l215.4-215.4 181.7 181.7c6.5 6.5 15 9.7 23.5 9.7 9.7 0 19.3-4.2 25.9-12.4 56.3-70.3 79.7-158.3 70.2-243.4l161.1-161.1c12.9-12.8 12.9-33.8 0-46.8zM666.2 549.3l-24.5 24.5 3.8 34.4a259.92 259.92 0 01-30.4 153.9L262 408.8c12.9-7.1 26.3-13.1 40.3-17.9 27.2-9.4 55.7-14.1 84.7-14.1 9.6 0 19.3.5 28.9 1.6l34.4 3.8 24.5-24.5L608.5 224 800 415.5 666.2 549.3z"
/>
</svg>
</span>
</span>
</button>
<button
aria-hidden="true"
class="ant-btn css-var-test-id ant-btn-text ant-btn-color-default ant-btn-variant-text ant-btn-sm ant-btn-icon-only"
type="button"
>
<span
class="ant-btn-icon"
>
<span
aria-label="info-circle"
class="anticon anticon-info-circle"
role="img"
>
<svg
aria-hidden="true"
data-icon="info-circle"
fill="currentColor"
focusable="false"
height="1em"
viewBox="64 64 896 896"
width="1em"
>
<path
d="M512 64C264.6 64 64 264.6 64 512s200.6 448 448 448 448-200.6 448-448S759.4 64 512 64zm0 820c-205.4 0-372-166.6-372-372s166.6-372 372-372 372 166.6 372 372-166.6 372-372 372z"
/>
<path
d="M464 336a48 48 0 1096 0 48 48 0 10-96 0zm72 112h-48c-4.4 0-8 3.6-8 8v272c0 4.4 3.6 8 8 8h48c4.4 0 8-3.6 8-8V456c0-4.4-3.6-8-8-8z"
/>
</svg>
</span>
</span>
</button>
</div>
</div>
<div
class="ant-typography css-var-test-id"
style="margin: 0px; font-size: 12px;"
>
关闭按钮元素,包含按钮的基础样式
</div>
</div>
</li>
</ul>
</div>
</div>
</div>
`;

View File

@@ -0,0 +1,3 @@
import { semanticDemoTest } from '../../../tests/shared/demoTest';
semanticDemoTest('alert');

View File

@@ -98,9 +98,9 @@ export const genBaseStyle: GenerateStyle<AlertToken> = (token: AlertToken): CSSO
[`&${componentCls}-motion-leave`]: {
overflow: 'hidden',
opacity: 1,
transition: `max-height ${duration} ${motionEaseInOutCirc}, opacity ${duration} ${motionEaseInOutCirc},
padding-top ${duration} ${motionEaseInOutCirc}, padding-bottom ${duration} ${motionEaseInOutCirc},
margin-bottom ${duration} ${motionEaseInOutCirc}`,
transition: [`max-height`, `opacity`, `padding-top`, `padding-bottom`, `margin-bottom`]
.map((prop) => `${prop} ${duration} ${motionEaseInOutCirc}`)
.join(', '),
},
[`&${componentCls}-motion-leave-active`]: {

View File

@@ -0,0 +1,483 @@
// Jest Snapshot v1, https://jestjs.io/docs/snapshot-testing
exports[`renders components/anchor/demo/_semantic.tsx correctly 1`] = `
<div
class="acss-1ucck97"
>
<div
class="ant-row css-var-test-id"
>
<div
class="ant-col ant-col-16 acss-my3sst css-var-test-id"
>
<div
class="css-var-test-id ant-anchor-css-var ant-anchor-wrapper semantic-mark-root"
style="max-height: 100vh;"
>
<div
class="ant-anchor ant-anchor-fixed"
>
<span
class="ant-anchor-ink semantic-mark-indicator"
/>
<div
class="ant-anchor-link semantic-mark-item"
>
<a
class="ant-anchor-link-title semantic-mark-itemTitle"
href="#api"
title="API"
>
API
</a>
<div
class="ant-anchor-link semantic-mark-item"
>
<a
class="ant-anchor-link-title semantic-mark-itemTitle"
href="#anchor-props"
title="Anchor Props"
>
Anchor Props
</a>
</div>
<div
class="ant-anchor-link semantic-mark-item"
>
<a
class="ant-anchor-link-title semantic-mark-itemTitle"
href="#link-props"
title="Link Props"
>
Link Props
</a>
</div>
</div>
<div
class="ant-anchor-link semantic-mark-item"
>
<a
class="ant-anchor-link-title semantic-mark-itemTitle"
href="#anchor-demo-basic"
title="Basic demo"
>
Basic demo
</a>
</div>
<div
class="ant-anchor-link semantic-mark-item"
>
<a
class="ant-anchor-link-title semantic-mark-itemTitle"
href="#anchor-demo-static"
title="Static demo"
>
Static demo
</a>
</div>
</div>
</div>
</div>
<div
class="ant-col ant-col-8 css-var-test-id"
>
<ul
class="acss-1ry21g5"
>
<li
class="acss-1ehfz5v"
>
<div
class="ant-flex css-var-test-id ant-flex-align-stretch ant-flex-gap-small ant-flex-vertical"
>
<div
class="ant-flex css-var-test-id ant-flex-align-center ant-flex-justify-space-between ant-flex-gap-small"
>
<div
class="ant-flex css-var-test-id ant-flex-align-center ant-flex-gap-small"
>
<h5
class="ant-typography css-var-test-id"
style="margin: 0px;"
>
root
</h5>
<span
class="ant-tag ant-tag-filled ant-tag-blue css-var-test-id"
>
6.0.0
</span>
</div>
<div
class="ant-flex css-var-test-id ant-flex-align-center ant-flex-gap-small"
>
<button
aria-hidden="true"
class="ant-btn css-var-test-id ant-btn-default ant-btn-color-default ant-btn-variant-text ant-btn-sm ant-btn-icon-only"
type="button"
>
<span
class="ant-btn-icon"
>
<span
aria-label="pushpin"
class="anticon anticon-pushpin"
role="img"
>
<svg
aria-hidden="true"
data-icon="pushpin"
fill="currentColor"
focusable="false"
height="1em"
viewBox="64 64 896 896"
width="1em"
>
<path
d="M878.3 392.1L631.9 145.7c-6.5-6.5-15-9.7-23.5-9.7s-17 3.2-23.5 9.7L423.8 306.9c-12.2-1.4-24.5-2-36.8-2-73.2 0-146.4 24.1-206.5 72.3a33.23 33.23 0 00-2.7 49.4l181.7 181.7-215.4 215.2a15.8 15.8 0 00-4.6 9.8l-3.4 37.2c-.9 9.4 6.6 17.4 15.9 17.4.5 0 1 0 1.5-.1l37.2-3.4c3.7-.3 7.2-2 9.8-4.6l215.4-215.4 181.7 181.7c6.5 6.5 15 9.7 23.5 9.7 9.7 0 19.3-4.2 25.9-12.4 56.3-70.3 79.7-158.3 70.2-243.4l161.1-161.1c12.9-12.8 12.9-33.8 0-46.8zM666.2 549.3l-24.5 24.5 3.8 34.4a259.92 259.92 0 01-30.4 153.9L262 408.8c12.9-7.1 26.3-13.1 40.3-17.9 27.2-9.4 55.7-14.1 84.7-14.1 9.6 0 19.3.5 28.9 1.6l34.4 3.8 24.5-24.5L608.5 224 800 415.5 666.2 549.3z"
/>
</svg>
</span>
</span>
</button>
<button
aria-hidden="true"
class="ant-btn css-var-test-id ant-btn-text ant-btn-color-default ant-btn-variant-text ant-btn-sm ant-btn-icon-only"
type="button"
>
<span
class="ant-btn-icon"
>
<span
aria-label="info-circle"
class="anticon anticon-info-circle"
role="img"
>
<svg
aria-hidden="true"
data-icon="info-circle"
fill="currentColor"
focusable="false"
height="1em"
viewBox="64 64 896 896"
width="1em"
>
<path
d="M512 64C264.6 64 64 264.6 64 512s200.6 448 448 448 448-200.6 448-448S759.4 64 512 64zm0 820c-205.4 0-372-166.6-372-372s166.6-372 372-372 372 166.6 372 372-166.6 372-372 372z"
/>
<path
d="M464 336a48 48 0 1096 0 48 48 0 10-96 0zm72 112h-48c-4.4 0-8 3.6-8 8v272c0 4.4 3.6 8 8 8h48c4.4 0 8-3.6 8-8V456c0-4.4-3.6-8-8-8z"
/>
</svg>
</span>
</span>
</button>
</div>
</div>
<div
class="ant-typography css-var-test-id"
style="margin: 0px; font-size: 12px;"
>
根元素,包含布局定位、内边距、边距、背景色等基础样式
</div>
</div>
</li>
<li
class="acss-1ehfz5v"
>
<div
class="ant-flex css-var-test-id ant-flex-align-stretch ant-flex-gap-small ant-flex-vertical"
>
<div
class="ant-flex css-var-test-id ant-flex-align-center ant-flex-justify-space-between ant-flex-gap-small"
>
<div
class="ant-flex css-var-test-id ant-flex-align-center ant-flex-gap-small"
>
<h5
class="ant-typography css-var-test-id"
style="margin: 0px;"
>
item
</h5>
<span
class="ant-tag ant-tag-filled ant-tag-blue css-var-test-id"
>
6.0.0
</span>
</div>
<div
class="ant-flex css-var-test-id ant-flex-align-center ant-flex-gap-small"
>
<button
aria-hidden="true"
class="ant-btn css-var-test-id ant-btn-default ant-btn-color-default ant-btn-variant-text ant-btn-sm ant-btn-icon-only"
type="button"
>
<span
class="ant-btn-icon"
>
<span
aria-label="pushpin"
class="anticon anticon-pushpin"
role="img"
>
<svg
aria-hidden="true"
data-icon="pushpin"
fill="currentColor"
focusable="false"
height="1em"
viewBox="64 64 896 896"
width="1em"
>
<path
d="M878.3 392.1L631.9 145.7c-6.5-6.5-15-9.7-23.5-9.7s-17 3.2-23.5 9.7L423.8 306.9c-12.2-1.4-24.5-2-36.8-2-73.2 0-146.4 24.1-206.5 72.3a33.23 33.23 0 00-2.7 49.4l181.7 181.7-215.4 215.2a15.8 15.8 0 00-4.6 9.8l-3.4 37.2c-.9 9.4 6.6 17.4 15.9 17.4.5 0 1 0 1.5-.1l37.2-3.4c3.7-.3 7.2-2 9.8-4.6l215.4-215.4 181.7 181.7c6.5 6.5 15 9.7 23.5 9.7 9.7 0 19.3-4.2 25.9-12.4 56.3-70.3 79.7-158.3 70.2-243.4l161.1-161.1c12.9-12.8 12.9-33.8 0-46.8zM666.2 549.3l-24.5 24.5 3.8 34.4a259.92 259.92 0 01-30.4 153.9L262 408.8c12.9-7.1 26.3-13.1 40.3-17.9 27.2-9.4 55.7-14.1 84.7-14.1 9.6 0 19.3.5 28.9 1.6l34.4 3.8 24.5-24.5L608.5 224 800 415.5 666.2 549.3z"
/>
</svg>
</span>
</span>
</button>
<button
aria-hidden="true"
class="ant-btn css-var-test-id ant-btn-text ant-btn-color-default ant-btn-variant-text ant-btn-sm ant-btn-icon-only"
type="button"
>
<span
class="ant-btn-icon"
>
<span
aria-label="info-circle"
class="anticon anticon-info-circle"
role="img"
>
<svg
aria-hidden="true"
data-icon="info-circle"
fill="currentColor"
focusable="false"
height="1em"
viewBox="64 64 896 896"
width="1em"
>
<path
d="M512 64C264.6 64 64 264.6 64 512s200.6 448 448 448 448-200.6 448-448S759.4 64 512 64zm0 820c-205.4 0-372-166.6-372-372s166.6-372 372-372 372 166.6 372 372-166.6 372-372 372z"
/>
<path
d="M464 336a48 48 0 1096 0 48 48 0 10-96 0zm72 112h-48c-4.4 0-8 3.6-8 8v272c0 4.4 3.6 8 8 8h48c4.4 0 8-3.6 8-8V456c0-4.4-3.6-8-8-8z"
/>
</svg>
</span>
</span>
</button>
</div>
</div>
<div
class="ant-typography css-var-test-id"
style="margin: 0px; font-size: 12px;"
>
链接项元素,包含内边距、文字颜色、悬停状态、过渡动画等样式
</div>
</div>
</li>
<li
class="acss-1ehfz5v"
>
<div
class="ant-flex css-var-test-id ant-flex-align-stretch ant-flex-gap-small ant-flex-vertical"
>
<div
class="ant-flex css-var-test-id ant-flex-align-center ant-flex-justify-space-between ant-flex-gap-small"
>
<div
class="ant-flex css-var-test-id ant-flex-align-center ant-flex-gap-small"
>
<h5
class="ant-typography css-var-test-id"
style="margin: 0px;"
>
itemTitle
</h5>
<span
class="ant-tag ant-tag-filled ant-tag-blue css-var-test-id"
>
6.0.0
</span>
</div>
<div
class="ant-flex css-var-test-id ant-flex-align-center ant-flex-gap-small"
>
<button
aria-hidden="true"
class="ant-btn css-var-test-id ant-btn-default ant-btn-color-default ant-btn-variant-text ant-btn-sm ant-btn-icon-only"
type="button"
>
<span
class="ant-btn-icon"
>
<span
aria-label="pushpin"
class="anticon anticon-pushpin"
role="img"
>
<svg
aria-hidden="true"
data-icon="pushpin"
fill="currentColor"
focusable="false"
height="1em"
viewBox="64 64 896 896"
width="1em"
>
<path
d="M878.3 392.1L631.9 145.7c-6.5-6.5-15-9.7-23.5-9.7s-17 3.2-23.5 9.7L423.8 306.9c-12.2-1.4-24.5-2-36.8-2-73.2 0-146.4 24.1-206.5 72.3a33.23 33.23 0 00-2.7 49.4l181.7 181.7-215.4 215.2a15.8 15.8 0 00-4.6 9.8l-3.4 37.2c-.9 9.4 6.6 17.4 15.9 17.4.5 0 1 0 1.5-.1l37.2-3.4c3.7-.3 7.2-2 9.8-4.6l215.4-215.4 181.7 181.7c6.5 6.5 15 9.7 23.5 9.7 9.7 0 19.3-4.2 25.9-12.4 56.3-70.3 79.7-158.3 70.2-243.4l161.1-161.1c12.9-12.8 12.9-33.8 0-46.8zM666.2 549.3l-24.5 24.5 3.8 34.4a259.92 259.92 0 01-30.4 153.9L262 408.8c12.9-7.1 26.3-13.1 40.3-17.9 27.2-9.4 55.7-14.1 84.7-14.1 9.6 0 19.3.5 28.9 1.6l34.4 3.8 24.5-24.5L608.5 224 800 415.5 666.2 549.3z"
/>
</svg>
</span>
</span>
</button>
<button
aria-hidden="true"
class="ant-btn css-var-test-id ant-btn-text ant-btn-color-default ant-btn-variant-text ant-btn-sm ant-btn-icon-only"
type="button"
>
<span
class="ant-btn-icon"
>
<span
aria-label="info-circle"
class="anticon anticon-info-circle"
role="img"
>
<svg
aria-hidden="true"
data-icon="info-circle"
fill="currentColor"
focusable="false"
height="1em"
viewBox="64 64 896 896"
width="1em"
>
<path
d="M512 64C264.6 64 64 264.6 64 512s200.6 448 448 448 448-200.6 448-448S759.4 64 512 64zm0 820c-205.4 0-372-166.6-372-372s166.6-372 372-372 372 166.6 372 372-166.6 372-372 372z"
/>
<path
d="M464 336a48 48 0 1096 0 48 48 0 10-96 0zm72 112h-48c-4.4 0-8 3.6-8 8v272c0 4.4 3.6 8 8 8h48c4.4 0 8-3.6 8-8V456c0-4.4-3.6-8-8-8z"
/>
</svg>
</span>
</span>
</button>
</div>
</div>
<div
class="ant-typography css-var-test-id"
style="margin: 0px; font-size: 12px;"
>
标题文字元素,包含字体样式、颜色变化、文本装饰、过渡效果等样式
</div>
</div>
</li>
<li
class="acss-1ehfz5v"
>
<div
class="ant-flex css-var-test-id ant-flex-align-stretch ant-flex-gap-small ant-flex-vertical"
>
<div
class="ant-flex css-var-test-id ant-flex-align-center ant-flex-justify-space-between ant-flex-gap-small"
>
<div
class="ant-flex css-var-test-id ant-flex-align-center ant-flex-gap-small"
>
<h5
class="ant-typography css-var-test-id"
style="margin: 0px;"
>
indicator
</h5>
<span
class="ant-tag ant-tag-filled ant-tag-blue css-var-test-id"
>
6.0.0
</span>
</div>
<div
class="ant-flex css-var-test-id ant-flex-align-center ant-flex-gap-small"
>
<button
aria-hidden="true"
class="ant-btn css-var-test-id ant-btn-default ant-btn-color-default ant-btn-variant-text ant-btn-sm ant-btn-icon-only"
type="button"
>
<span
class="ant-btn-icon"
>
<span
aria-label="pushpin"
class="anticon anticon-pushpin"
role="img"
>
<svg
aria-hidden="true"
data-icon="pushpin"
fill="currentColor"
focusable="false"
height="1em"
viewBox="64 64 896 896"
width="1em"
>
<path
d="M878.3 392.1L631.9 145.7c-6.5-6.5-15-9.7-23.5-9.7s-17 3.2-23.5 9.7L423.8 306.9c-12.2-1.4-24.5-2-36.8-2-73.2 0-146.4 24.1-206.5 72.3a33.23 33.23 0 00-2.7 49.4l181.7 181.7-215.4 215.2a15.8 15.8 0 00-4.6 9.8l-3.4 37.2c-.9 9.4 6.6 17.4 15.9 17.4.5 0 1 0 1.5-.1l37.2-3.4c3.7-.3 7.2-2 9.8-4.6l215.4-215.4 181.7 181.7c6.5 6.5 15 9.7 23.5 9.7 9.7 0 19.3-4.2 25.9-12.4 56.3-70.3 79.7-158.3 70.2-243.4l161.1-161.1c12.9-12.8 12.9-33.8 0-46.8zM666.2 549.3l-24.5 24.5 3.8 34.4a259.92 259.92 0 01-30.4 153.9L262 408.8c12.9-7.1 26.3-13.1 40.3-17.9 27.2-9.4 55.7-14.1 84.7-14.1 9.6 0 19.3.5 28.9 1.6l34.4 3.8 24.5-24.5L608.5 224 800 415.5 666.2 549.3z"
/>
</svg>
</span>
</span>
</button>
<button
aria-hidden="true"
class="ant-btn css-var-test-id ant-btn-text ant-btn-color-default ant-btn-variant-text ant-btn-sm ant-btn-icon-only"
type="button"
>
<span
class="ant-btn-icon"
>
<span
aria-label="info-circle"
class="anticon anticon-info-circle"
role="img"
>
<svg
aria-hidden="true"
data-icon="info-circle"
fill="currentColor"
focusable="false"
height="1em"
viewBox="64 64 896 896"
width="1em"
>
<path
d="M512 64C264.6 64 64 264.6 64 512s200.6 448 448 448 448-200.6 448-448S759.4 64 512 64zm0 820c-205.4 0-372-166.6-372-372s166.6-372 372-372 372 166.6 372 372-166.6 372-372 372z"
/>
<path
d="M464 336a48 48 0 1096 0 48 48 0 10-96 0zm72 112h-48c-4.4 0-8 3.6-8 8v272c0 4.4 3.6 8 8 8h48c4.4 0 8-3.6 8-8V456c0-4.4-3.6-8-8-8z"
/>
</svg>
</span>
</span>
</button>
</div>
</div>
<div
class="ant-typography css-var-test-id"
style="margin: 0px; font-size: 12px;"
>
指示器元素,包含宽度、高度、背景色、位置变化、过渡动画等样式
</div>
</div>
</li>
</ul>
</div>
</div>
</div>
`;

View File

@@ -0,0 +1,3 @@
import { semanticDemoTest } from '../../../tests/shared/demoTest';
semanticDemoTest('anchor');

View File

@@ -170,7 +170,9 @@ const genSharedAnchorHorizontalStyle: GenerateStyle<AnchorToken> = (token) => {
[`${componentCls}-ink`]: {
position: 'absolute',
bottom: 0,
transition: `left ${motionDurationSlow} ease-in-out, width ${motionDurationSlow} ease-in-out`,
transition: [`left`, `width`]
.map((prop) => `${prop} ${motionDurationSlow} ease-in-out`)
.join(', '),
height: lineWidthBold,
backgroundColor: colorPrimary,
},

View File

@@ -100,10 +100,10 @@ exports[`renders components/auto-complete/demo/AutoComplete-and-Select.tsx exten
stroke="#d9d9d9"
>
<path
d="M55 12.76L44.854 1.258C44.367.474 43.656 0 42.907 0H21.093c-.749 0-1.46.474-1.947 1.257L9 12.761V22h46v-9.24z"
d="M55 12.8 44.9 1.3Q44 0 42.9 0H21.1q-1.2 0-2 1.3L9 12.8V22h46z"
/>
<path
d="M41.613 15.931c0-1.605.994-2.93 2.227-2.931H55v18.137C55 33.26 53.68 35 52.05 35h-40.1C10.32 35 9 33.259 9 31.137V13h11.16c1.233 0 2.227 1.323 2.227 2.928v.022c0 1.605 1.005 2.901 2.237 2.901h14.752c1.232 0 2.237-1.308 2.237-2.913v-.007z"
d="M41.6 16c0-1.7 1-3 2.2-3H55v18.1c0 2.2-1.3 3.9-3 3.9H12c-1.7 0-3-1.7-3-3.9V13h11.2c1.2 0 2.2 1.3 2.2 3s1 2.9 2.2 2.9h14.8c1.2 0 2.2-1.4 2.2-3"
fill="#fafafa"
/>
</g>
@@ -254,10 +254,10 @@ exports[`renders components/auto-complete/demo/AutoComplete-and-Select.tsx exten
stroke="#d9d9d9"
>
<path
d="M55 12.76L44.854 1.258C44.367.474 43.656 0 42.907 0H21.093c-.749 0-1.46.474-1.947 1.257L9 12.761V22h46v-9.24z"
d="M55 12.8 44.9 1.3Q44 0 42.9 0H21.1q-1.2 0-2 1.3L9 12.8V22h46z"
/>
<path
d="M41.613 15.931c0-1.605.994-2.93 2.227-2.931H55v18.137C55 33.26 53.68 35 52.05 35h-40.1C10.32 35 9 33.259 9 31.137V13h11.16c1.233 0 2.227 1.323 2.227 2.928v.022c0 1.605 1.005 2.901 2.237 2.901h14.752c1.232 0 2.237-1.308 2.237-2.913v-.007z"
d="M41.6 16c0-1.7 1-3 2.2-3H55v18.1c0 2.2-1.3 3.9-3 3.9H12c-1.7 0-3-1.7-3-3.9V13h11.2c1.2 0 2.2 1.3 2.2 3s1 2.9 2.2 2.9h14.8c1.2 0 2.2-1.4 2.2-3"
fill="#fafafa"
/>
</g>
@@ -408,10 +408,10 @@ exports[`renders components/auto-complete/demo/AutoComplete-and-Select.tsx exten
stroke="#d9d9d9"
>
<path
d="M55 12.76L44.854 1.258C44.367.474 43.656 0 42.907 0H21.093c-.749 0-1.46.474-1.947 1.257L9 12.761V22h46v-9.24z"
d="M55 12.8 44.9 1.3Q44 0 42.9 0H21.1q-1.2 0-2 1.3L9 12.8V22h46z"
/>
<path
d="M41.613 15.931c0-1.605.994-2.93 2.227-2.931H55v18.137C55 33.26 53.68 35 52.05 35h-40.1C10.32 35 9 33.259 9 31.137V13h11.16c1.233 0 2.227 1.323 2.227 2.928v.022c0 1.605 1.005 2.901 2.237 2.901h14.752c1.232 0 2.237-1.308 2.237-2.913v-.007z"
d="M41.6 16c0-1.7 1-3 2.2-3H55v18.1c0 2.2-1.3 3.9-3 3.9H12c-1.7 0-3-1.7-3-3.9V13h11.2c1.2 0 2.2 1.3 2.2 3s1 2.9 2.2 2.9h14.8c1.2 0 2.2-1.4 2.2-3"
fill="#fafafa"
/>
</g>
@@ -1221,10 +1221,10 @@ exports[`renders components/auto-complete/demo/form-debug.tsx extend context cor
stroke="#d9d9d9"
>
<path
d="M55 12.76L44.854 1.258C44.367.474 43.656 0 42.907 0H21.093c-.749 0-1.46.474-1.947 1.257L9 12.761V22h46v-9.24z"
d="M55 12.8 44.9 1.3Q44 0 42.9 0H21.1q-1.2 0-2 1.3L9 12.8V22h46z"
/>
<path
d="M41.613 15.931c0-1.605.994-2.93 2.227-2.931H55v18.137C55 33.26 53.68 35 52.05 35h-40.1C10.32 35 9 33.259 9 31.137V13h11.16c1.233 0 2.227 1.323 2.227 2.928v.022c0 1.605 1.005 2.901 2.237 2.901h14.752c1.232 0 2.237-1.308 2.237-2.913v-.007z"
d="M41.6 16c0-1.7 1-3 2.2-3H55v18.1c0 2.2-1.3 3.9-3 3.9H12c-1.7 0-3-1.7-3-3.9V13h11.2c1.2 0 2.2 1.3 2.2 3s1 2.9 2.2 2.9h14.8c1.2 0 2.2-1.4 2.2-3"
fill="#fafafa"
/>
</g>
@@ -1362,10 +1362,10 @@ exports[`renders components/auto-complete/demo/form-debug.tsx extend context cor
stroke="#d9d9d9"
>
<path
d="M55 12.76L44.854 1.258C44.367.474 43.656 0 42.907 0H21.093c-.749 0-1.46.474-1.947 1.257L9 12.761V22h46v-9.24z"
d="M55 12.8 44.9 1.3Q44 0 42.9 0H21.1q-1.2 0-2 1.3L9 12.8V22h46z"
/>
<path
d="M41.613 15.931c0-1.605.994-2.93 2.227-2.931H55v18.137C55 33.26 53.68 35 52.05 35h-40.1C10.32 35 9 33.259 9 31.137V13h11.16c1.233 0 2.227 1.323 2.227 2.928v.022c0 1.605 1.005 2.901 2.237 2.901h14.752c1.232 0 2.237-1.308 2.237-2.913v-.007z"
d="M41.6 16c0-1.7 1-3 2.2-3H55v18.1c0 2.2-1.3 3.9-3 3.9H12c-1.7 0-3-1.7-3-3.9V13h11.2c1.2 0 2.2 1.3 2.2 3s1 2.9 2.2 2.9h14.8c1.2 0 2.2-1.4 2.2-3"
fill="#fafafa"
/>
</g>
@@ -1631,10 +1631,10 @@ exports[`renders components/auto-complete/demo/form-debug.tsx extend context cor
stroke="#d9d9d9"
>
<path
d="M55 12.76L44.854 1.258C44.367.474 43.656 0 42.907 0H21.093c-.749 0-1.46.474-1.947 1.257L9 12.761V22h46v-9.24z"
d="M55 12.8 44.9 1.3Q44 0 42.9 0H21.1q-1.2 0-2 1.3L9 12.8V22h46z"
/>
<path
d="M41.613 15.931c0-1.605.994-2.93 2.227-2.931H55v18.137C55 33.26 53.68 35 52.05 35h-40.1C10.32 35 9 33.259 9 31.137V13h11.16c1.233 0 2.227 1.323 2.227 2.928v.022c0 1.605 1.005 2.901 2.237 2.901h14.752c1.232 0 2.237-1.308 2.237-2.913v-.007z"
d="M41.6 16c0-1.7 1-3 2.2-3H55v18.1c0 2.2-1.3 3.9-3 3.9H12c-1.7 0-3-1.7-3-3.9V13h11.2c1.2 0 2.2 1.3 2.2 3s1 2.9 2.2 2.9h14.8c1.2 0 2.2-1.4 2.2-3"
fill="#fafafa"
/>
</g>
@@ -1835,10 +1835,10 @@ exports[`renders components/auto-complete/demo/form-debug.tsx extend context cor
stroke="#d9d9d9"
>
<path
d="M55 12.76L44.854 1.258C44.367.474 43.656 0 42.907 0H21.093c-.749 0-1.46.474-1.947 1.257L9 12.761V22h46v-9.24z"
d="M55 12.8 44.9 1.3Q44 0 42.9 0H21.1q-1.2 0-2 1.3L9 12.8V22h46z"
/>
<path
d="M41.613 15.931c0-1.605.994-2.93 2.227-2.931H55v18.137C55 33.26 53.68 35 52.05 35h-40.1C10.32 35 9 33.259 9 31.137V13h11.16c1.233 0 2.227 1.323 2.227 2.928v.022c0 1.605 1.005 2.901 2.237 2.901h14.752c1.232 0 2.237-1.308 2.237-2.913v-.007z"
d="M41.6 16c0-1.7 1-3 2.2-3H55v18.1c0 2.2-1.3 3.9-3 3.9H12c-1.7 0-3-1.7-3-3.9V13h11.2c1.2 0 2.2 1.3 2.2 3s1 2.9 2.2 2.9h14.8c1.2 0 2.2-1.4 2.2-3"
fill="#fafafa"
/>
</g>
@@ -2044,10 +2044,10 @@ exports[`renders components/auto-complete/demo/form-debug.tsx extend context cor
stroke="#d9d9d9"
>
<path
d="M55 12.76L44.854 1.258C44.367.474 43.656 0 42.907 0H21.093c-.749 0-1.46.474-1.947 1.257L9 12.761V22h46v-9.24z"
d="M55 12.8 44.9 1.3Q44 0 42.9 0H21.1q-1.2 0-2 1.3L9 12.8V22h46z"
/>
<path
d="M41.613 15.931c0-1.605.994-2.93 2.227-2.931H55v18.137C55 33.26 53.68 35 52.05 35h-40.1C10.32 35 9 33.259 9 31.137V13h11.16c1.233 0 2.227 1.323 2.227 2.928v.022c0 1.605 1.005 2.901 2.237 2.901h14.752c1.232 0 2.237-1.308 2.237-2.913v-.007z"
d="M41.6 16c0-1.7 1-3 2.2-3H55v18.1c0 2.2-1.3 3.9-3 3.9H12c-1.7 0-3-1.7-3-3.9V13h11.2c1.2 0 2.2 1.3 2.2 3s1 2.9 2.2 2.9h14.8c1.2 0 2.2-1.4 2.2-3"
fill="#fafafa"
/>
</g>

View File

@@ -0,0 +1,987 @@
// Jest Snapshot v1, https://jestjs.io/docs/snapshot-testing
exports[`renders components/auto-complete/demo/_semantic.tsx correctly 1`] = `
<div
class="acss-1ucck97"
>
<div
class="ant-row css-var-test-id"
>
<div
class="ant-col ant-col-16 acss-my3sst css-var-test-id"
style="align-items: flex-start;"
>
<div
class="ant-flex css-var-test-id ant-flex-align-center ant-flex-gap-middle ant-flex-vertical"
style="position: absolute; margin-bottom: 80px;"
>
<div
class="ant-select ant-select-outlined ant-select-auto-complete semantic-mark-root css-var-test-id ant-select-css-var ant-select-single ant-select-open ant-select-show-search"
style="width: 200px;"
>
<div
class="ant-select-prefix semantic-mark-prefix"
>
prefix
</div>
<div
class="ant-select-content semantic-mark-content"
>
<div
class="ant-select-placeholder semantic-mark-placeholder"
style="visibility: visible;"
>
Please select
</div>
<input
aria-activedescendant="test-id_list_-1"
aria-autocomplete="list"
aria-controls="test-id_list"
aria-expanded="true"
aria-haspopup="listbox"
aria-owns="test-id_list"
autocomplete="off"
class="ant-select-input semantic-mark-input"
id="test-id"
role="combobox"
type="text"
value=""
/>
</div>
</div>
<div
class="ant-select-dropdown ant-slide-up-appear ant-slide-up-appear-prepare ant-slide-up semantic-mark-popup-root css-var-test-id ant-select-css-var ant-select-dropdown-placement-bottomLeft"
style="--arrow-x: 0px; --arrow-y: 0px; left: -1000vw; top: -1000vh; right: auto; bottom: auto; box-sizing: border-box;"
>
<div>
<div
id="test-id_list"
role="listbox"
style="height: 0px; width: 0px; overflow: hidden;"
>
<div
aria-label="aojunhao123"
aria-selected="false"
id="test-id_list_0"
role="option"
>
aojunhao123
</div>
</div>
<div
class="rc-virtual-list semantic-mark-popup-list"
style="position: relative;"
>
<div
class="rc-virtual-list-holder"
style="max-height: 256px; overflow-y: auto; overflow-anchor: none;"
>
<div>
<div
class="rc-virtual-list-holder-inner"
style="display: flex; flex-direction: column;"
>
<div
class="ant-select-item ant-select-item-option semantic-mark-popup-listItem"
title="aojunhao123"
>
<div
class="ant-select-item-option-content"
>
aojunhao123
</div>
<span
aria-hidden="true"
class="ant-select-item-option-state"
style="user-select: none;"
unselectable="on"
/>
</div>
<div
class="ant-select-item ant-select-item-option semantic-mark-popup-listItem"
title="thinkasany"
>
<div
class="ant-select-item-option-content"
>
thinkasany
</div>
<span
aria-hidden="true"
class="ant-select-item-option-state"
style="user-select: none;"
unselectable="on"
/>
</div>
<div
class="ant-select-item ant-select-item-option semantic-mark-popup-listItem"
title="meet-student"
>
<div
class="ant-select-item-option-content"
>
meet-student
</div>
<span
aria-hidden="true"
class="ant-select-item-option-state"
style="user-select: none;"
unselectable="on"
/>
</div>
</div>
</div>
</div>
</div>
</div>
</div>
</div>
</div>
<div
class="ant-col ant-col-8 css-var-test-id"
>
<ul
class="acss-1ry21g5"
>
<li
class="acss-1ehfz5v"
>
<div
class="ant-flex css-var-test-id ant-flex-align-stretch ant-flex-gap-small ant-flex-vertical"
>
<div
class="ant-flex css-var-test-id ant-flex-align-center ant-flex-justify-space-between ant-flex-gap-small"
>
<div
class="ant-flex css-var-test-id ant-flex-align-center ant-flex-gap-small"
>
<h5
class="ant-typography css-var-test-id"
style="margin: 0px;"
>
root
</h5>
</div>
<div
class="ant-flex css-var-test-id ant-flex-align-center ant-flex-gap-small"
>
<button
aria-hidden="true"
class="ant-btn css-var-test-id ant-btn-default ant-btn-color-default ant-btn-variant-text ant-btn-sm ant-btn-icon-only"
type="button"
>
<span
class="ant-btn-icon"
>
<span
aria-label="pushpin"
class="anticon anticon-pushpin"
role="img"
>
<svg
aria-hidden="true"
data-icon="pushpin"
fill="currentColor"
focusable="false"
height="1em"
viewBox="64 64 896 896"
width="1em"
>
<path
d="M878.3 392.1L631.9 145.7c-6.5-6.5-15-9.7-23.5-9.7s-17 3.2-23.5 9.7L423.8 306.9c-12.2-1.4-24.5-2-36.8-2-73.2 0-146.4 24.1-206.5 72.3a33.23 33.23 0 00-2.7 49.4l181.7 181.7-215.4 215.2a15.8 15.8 0 00-4.6 9.8l-3.4 37.2c-.9 9.4 6.6 17.4 15.9 17.4.5 0 1 0 1.5-.1l37.2-3.4c3.7-.3 7.2-2 9.8-4.6l215.4-215.4 181.7 181.7c6.5 6.5 15 9.7 23.5 9.7 9.7 0 19.3-4.2 25.9-12.4 56.3-70.3 79.7-158.3 70.2-243.4l161.1-161.1c12.9-12.8 12.9-33.8 0-46.8zM666.2 549.3l-24.5 24.5 3.8 34.4a259.92 259.92 0 01-30.4 153.9L262 408.8c12.9-7.1 26.3-13.1 40.3-17.9 27.2-9.4 55.7-14.1 84.7-14.1 9.6 0 19.3.5 28.9 1.6l34.4 3.8 24.5-24.5L608.5 224 800 415.5 666.2 549.3z"
/>
</svg>
</span>
</span>
</button>
<button
aria-hidden="true"
class="ant-btn css-var-test-id ant-btn-text ant-btn-color-default ant-btn-variant-text ant-btn-sm ant-btn-icon-only"
type="button"
>
<span
class="ant-btn-icon"
>
<span
aria-label="info-circle"
class="anticon anticon-info-circle"
role="img"
>
<svg
aria-hidden="true"
data-icon="info-circle"
fill="currentColor"
focusable="false"
height="1em"
viewBox="64 64 896 896"
width="1em"
>
<path
d="M512 64C264.6 64 64 264.6 64 512s200.6 448 448 448 448-200.6 448-448S759.4 64 512 64zm0 820c-205.4 0-372-166.6-372-372s166.6-372 372-372 372 166.6 372 372-166.6 372-372 372z"
/>
<path
d="M464 336a48 48 0 1096 0 48 48 0 10-96 0zm72 112h-48c-4.4 0-8 3.6-8 8v272c0 4.4 3.6 8 8 8h48c4.4 0 8-3.6 8-8V456c0-4.4-3.6-8-8-8z"
/>
</svg>
</span>
</span>
</button>
</div>
</div>
<div
class="ant-typography css-var-test-id"
style="margin: 0px; font-size: 12px;"
>
根元素,包含相对定位、行内 flex 布局、光标样式、过渡动画、边框等选择器容器的基础样式
</div>
</div>
</li>
<li
class="acss-1ehfz5v"
>
<div
class="ant-flex css-var-test-id ant-flex-align-stretch ant-flex-gap-small ant-flex-vertical"
>
<div
class="ant-flex css-var-test-id ant-flex-align-center ant-flex-justify-space-between ant-flex-gap-small"
>
<div
class="ant-flex css-var-test-id ant-flex-align-center ant-flex-gap-small"
>
<h5
class="ant-typography css-var-test-id"
style="margin: 0px;"
>
prefix
</h5>
</div>
<div
class="ant-flex css-var-test-id ant-flex-align-center ant-flex-gap-small"
>
<button
aria-hidden="true"
class="ant-btn css-var-test-id ant-btn-default ant-btn-color-default ant-btn-variant-text ant-btn-sm ant-btn-icon-only"
type="button"
>
<span
class="ant-btn-icon"
>
<span
aria-label="pushpin"
class="anticon anticon-pushpin"
role="img"
>
<svg
aria-hidden="true"
data-icon="pushpin"
fill="currentColor"
focusable="false"
height="1em"
viewBox="64 64 896 896"
width="1em"
>
<path
d="M878.3 392.1L631.9 145.7c-6.5-6.5-15-9.7-23.5-9.7s-17 3.2-23.5 9.7L423.8 306.9c-12.2-1.4-24.5-2-36.8-2-73.2 0-146.4 24.1-206.5 72.3a33.23 33.23 0 00-2.7 49.4l181.7 181.7-215.4 215.2a15.8 15.8 0 00-4.6 9.8l-3.4 37.2c-.9 9.4 6.6 17.4 15.9 17.4.5 0 1 0 1.5-.1l37.2-3.4c3.7-.3 7.2-2 9.8-4.6l215.4-215.4 181.7 181.7c6.5 6.5 15 9.7 23.5 9.7 9.7 0 19.3-4.2 25.9-12.4 56.3-70.3 79.7-158.3 70.2-243.4l161.1-161.1c12.9-12.8 12.9-33.8 0-46.8zM666.2 549.3l-24.5 24.5 3.8 34.4a259.92 259.92 0 01-30.4 153.9L262 408.8c12.9-7.1 26.3-13.1 40.3-17.9 27.2-9.4 55.7-14.1 84.7-14.1 9.6 0 19.3.5 28.9 1.6l34.4 3.8 24.5-24.5L608.5 224 800 415.5 666.2 549.3z"
/>
</svg>
</span>
</span>
</button>
<button
aria-hidden="true"
class="ant-btn css-var-test-id ant-btn-text ant-btn-color-default ant-btn-variant-text ant-btn-sm ant-btn-icon-only"
type="button"
>
<span
class="ant-btn-icon"
>
<span
aria-label="info-circle"
class="anticon anticon-info-circle"
role="img"
>
<svg
aria-hidden="true"
data-icon="info-circle"
fill="currentColor"
focusable="false"
height="1em"
viewBox="64 64 896 896"
width="1em"
>
<path
d="M512 64C264.6 64 64 264.6 64 512s200.6 448 448 448 448-200.6 448-448S759.4 64 512 64zm0 820c-205.4 0-372-166.6-372-372s166.6-372 372-372 372 166.6 372 372-166.6 372-372 372z"
/>
<path
d="M464 336a48 48 0 1096 0 48 48 0 10-96 0zm72 112h-48c-4.4 0-8 3.6-8 8v272c0 4.4 3.6 8 8 8h48c4.4 0 8-3.6 8-8V456c0-4.4-3.6-8-8-8z"
/>
</svg>
</span>
</span>
</button>
</div>
</div>
<div
class="ant-typography css-var-test-id"
style="margin: 0px; font-size: 12px;"
>
前缀元素,包含前缀内容的布局和样式
</div>
</div>
</li>
<li
class="acss-1ehfz5v"
>
<div
class="ant-flex css-var-test-id ant-flex-align-stretch ant-flex-gap-small ant-flex-vertical"
>
<div
class="ant-flex css-var-test-id ant-flex-align-center ant-flex-justify-space-between ant-flex-gap-small"
>
<div
class="ant-flex css-var-test-id ant-flex-align-center ant-flex-gap-small"
>
<h5
class="ant-typography css-var-test-id"
style="margin: 0px;"
>
content
</h5>
</div>
<div
class="ant-flex css-var-test-id ant-flex-align-center ant-flex-gap-small"
>
<button
aria-hidden="true"
class="ant-btn css-var-test-id ant-btn-default ant-btn-color-default ant-btn-variant-text ant-btn-sm ant-btn-icon-only"
type="button"
>
<span
class="ant-btn-icon"
>
<span
aria-label="pushpin"
class="anticon anticon-pushpin"
role="img"
>
<svg
aria-hidden="true"
data-icon="pushpin"
fill="currentColor"
focusable="false"
height="1em"
viewBox="64 64 896 896"
width="1em"
>
<path
d="M878.3 392.1L631.9 145.7c-6.5-6.5-15-9.7-23.5-9.7s-17 3.2-23.5 9.7L423.8 306.9c-12.2-1.4-24.5-2-36.8-2-73.2 0-146.4 24.1-206.5 72.3a33.23 33.23 0 00-2.7 49.4l181.7 181.7-215.4 215.2a15.8 15.8 0 00-4.6 9.8l-3.4 37.2c-.9 9.4 6.6 17.4 15.9 17.4.5 0 1 0 1.5-.1l37.2-3.4c3.7-.3 7.2-2 9.8-4.6l215.4-215.4 181.7 181.7c6.5 6.5 15 9.7 23.5 9.7 9.7 0 19.3-4.2 25.9-12.4 56.3-70.3 79.7-158.3 70.2-243.4l161.1-161.1c12.9-12.8 12.9-33.8 0-46.8zM666.2 549.3l-24.5 24.5 3.8 34.4a259.92 259.92 0 01-30.4 153.9L262 408.8c12.9-7.1 26.3-13.1 40.3-17.9 27.2-9.4 55.7-14.1 84.7-14.1 9.6 0 19.3.5 28.9 1.6l34.4 3.8 24.5-24.5L608.5 224 800 415.5 666.2 549.3z"
/>
</svg>
</span>
</span>
</button>
<button
aria-hidden="true"
class="ant-btn css-var-test-id ant-btn-text ant-btn-color-default ant-btn-variant-text ant-btn-sm ant-btn-icon-only"
type="button"
>
<span
class="ant-btn-icon"
>
<span
aria-label="info-circle"
class="anticon anticon-info-circle"
role="img"
>
<svg
aria-hidden="true"
data-icon="info-circle"
fill="currentColor"
focusable="false"
height="1em"
viewBox="64 64 896 896"
width="1em"
>
<path
d="M512 64C264.6 64 64 264.6 64 512s200.6 448 448 448 448-200.6 448-448S759.4 64 512 64zm0 820c-205.4 0-372-166.6-372-372s166.6-372 372-372 372 166.6 372 372-166.6 372-372 372z"
/>
<path
d="M464 336a48 48 0 1096 0 48 48 0 10-96 0zm72 112h-48c-4.4 0-8 3.6-8 8v272c0 4.4 3.6 8 8 8h48c4.4 0 8-3.6 8-8V456c0-4.4-3.6-8-8-8z"
/>
</svg>
</span>
</span>
</button>
</div>
</div>
<div
class="ant-typography css-var-test-id"
style="margin: 0px; font-size: 12px;"
>
多选容器,包含已选项的布局、间距、换行相关样式
</div>
</div>
</li>
<li
class="acss-1ehfz5v"
>
<div
class="ant-flex css-var-test-id ant-flex-align-stretch ant-flex-gap-small ant-flex-vertical"
>
<div
class="ant-flex css-var-test-id ant-flex-align-center ant-flex-justify-space-between ant-flex-gap-small"
>
<div
class="ant-flex css-var-test-id ant-flex-align-center ant-flex-gap-small"
>
<h5
class="ant-typography css-var-test-id"
style="margin: 0px;"
>
placeholder
</h5>
</div>
<div
class="ant-flex css-var-test-id ant-flex-align-center ant-flex-gap-small"
>
<button
aria-hidden="true"
class="ant-btn css-var-test-id ant-btn-default ant-btn-color-default ant-btn-variant-text ant-btn-sm ant-btn-icon-only"
type="button"
>
<span
class="ant-btn-icon"
>
<span
aria-label="pushpin"
class="anticon anticon-pushpin"
role="img"
>
<svg
aria-hidden="true"
data-icon="pushpin"
fill="currentColor"
focusable="false"
height="1em"
viewBox="64 64 896 896"
width="1em"
>
<path
d="M878.3 392.1L631.9 145.7c-6.5-6.5-15-9.7-23.5-9.7s-17 3.2-23.5 9.7L423.8 306.9c-12.2-1.4-24.5-2-36.8-2-73.2 0-146.4 24.1-206.5 72.3a33.23 33.23 0 00-2.7 49.4l181.7 181.7-215.4 215.2a15.8 15.8 0 00-4.6 9.8l-3.4 37.2c-.9 9.4 6.6 17.4 15.9 17.4.5 0 1 0 1.5-.1l37.2-3.4c3.7-.3 7.2-2 9.8-4.6l215.4-215.4 181.7 181.7c6.5 6.5 15 9.7 23.5 9.7 9.7 0 19.3-4.2 25.9-12.4 56.3-70.3 79.7-158.3 70.2-243.4l161.1-161.1c12.9-12.8 12.9-33.8 0-46.8zM666.2 549.3l-24.5 24.5 3.8 34.4a259.92 259.92 0 01-30.4 153.9L262 408.8c12.9-7.1 26.3-13.1 40.3-17.9 27.2-9.4 55.7-14.1 84.7-14.1 9.6 0 19.3.5 28.9 1.6l34.4 3.8 24.5-24.5L608.5 224 800 415.5 666.2 549.3z"
/>
</svg>
</span>
</span>
</button>
<button
aria-hidden="true"
class="ant-btn css-var-test-id ant-btn-text ant-btn-color-default ant-btn-variant-text ant-btn-sm ant-btn-icon-only"
type="button"
>
<span
class="ant-btn-icon"
>
<span
aria-label="info-circle"
class="anticon anticon-info-circle"
role="img"
>
<svg
aria-hidden="true"
data-icon="info-circle"
fill="currentColor"
focusable="false"
height="1em"
viewBox="64 64 896 896"
width="1em"
>
<path
d="M512 64C264.6 64 64 264.6 64 512s200.6 448 448 448 448-200.6 448-448S759.4 64 512 64zm0 820c-205.4 0-372-166.6-372-372s166.6-372 372-372 372 166.6 372 372-166.6 372-372 372z"
/>
<path
d="M464 336a48 48 0 1096 0 48 48 0 10-96 0zm72 112h-48c-4.4 0-8 3.6-8 8v272c0 4.4 3.6 8 8 8h48c4.4 0 8-3.6 8-8V456c0-4.4-3.6-8-8-8z"
/>
</svg>
</span>
</span>
</button>
</div>
</div>
<div
class="ant-typography css-var-test-id"
style="margin: 0px; font-size: 12px;"
>
占位符元素,包含占位符文本的字体样式和颜色
</div>
</div>
</li>
<li
class="acss-1ehfz5v"
>
<div
class="ant-flex css-var-test-id ant-flex-align-stretch ant-flex-gap-small ant-flex-vertical"
>
<div
class="ant-flex css-var-test-id ant-flex-align-center ant-flex-justify-space-between ant-flex-gap-small"
>
<div
class="ant-flex css-var-test-id ant-flex-align-center ant-flex-gap-small"
>
<h5
class="ant-typography css-var-test-id"
style="margin: 0px;"
>
clear
</h5>
</div>
<div
class="ant-flex css-var-test-id ant-flex-align-center ant-flex-gap-small"
>
<button
aria-hidden="true"
class="ant-btn css-var-test-id ant-btn-default ant-btn-color-default ant-btn-variant-text ant-btn-sm ant-btn-icon-only"
type="button"
>
<span
class="ant-btn-icon"
>
<span
aria-label="pushpin"
class="anticon anticon-pushpin"
role="img"
>
<svg
aria-hidden="true"
data-icon="pushpin"
fill="currentColor"
focusable="false"
height="1em"
viewBox="64 64 896 896"
width="1em"
>
<path
d="M878.3 392.1L631.9 145.7c-6.5-6.5-15-9.7-23.5-9.7s-17 3.2-23.5 9.7L423.8 306.9c-12.2-1.4-24.5-2-36.8-2-73.2 0-146.4 24.1-206.5 72.3a33.23 33.23 0 00-2.7 49.4l181.7 181.7-215.4 215.2a15.8 15.8 0 00-4.6 9.8l-3.4 37.2c-.9 9.4 6.6 17.4 15.9 17.4.5 0 1 0 1.5-.1l37.2-3.4c3.7-.3 7.2-2 9.8-4.6l215.4-215.4 181.7 181.7c6.5 6.5 15 9.7 23.5 9.7 9.7 0 19.3-4.2 25.9-12.4 56.3-70.3 79.7-158.3 70.2-243.4l161.1-161.1c12.9-12.8 12.9-33.8 0-46.8zM666.2 549.3l-24.5 24.5 3.8 34.4a259.92 259.92 0 01-30.4 153.9L262 408.8c12.9-7.1 26.3-13.1 40.3-17.9 27.2-9.4 55.7-14.1 84.7-14.1 9.6 0 19.3.5 28.9 1.6l34.4 3.8 24.5-24.5L608.5 224 800 415.5 666.2 549.3z"
/>
</svg>
</span>
</span>
</button>
<button
aria-hidden="true"
class="ant-btn css-var-test-id ant-btn-text ant-btn-color-default ant-btn-variant-text ant-btn-sm ant-btn-icon-only"
type="button"
>
<span
class="ant-btn-icon"
>
<span
aria-label="info-circle"
class="anticon anticon-info-circle"
role="img"
>
<svg
aria-hidden="true"
data-icon="info-circle"
fill="currentColor"
focusable="false"
height="1em"
viewBox="64 64 896 896"
width="1em"
>
<path
d="M512 64C264.6 64 64 264.6 64 512s200.6 448 448 448 448-200.6 448-448S759.4 64 512 64zm0 820c-205.4 0-372-166.6-372-372s166.6-372 372-372 372 166.6 372 372-166.6 372-372 372z"
/>
<path
d="M464 336a48 48 0 1096 0 48 48 0 10-96 0zm72 112h-48c-4.4 0-8 3.6-8 8v272c0 4.4 3.6 8 8 8h48c4.4 0 8-3.6 8-8V456c0-4.4-3.6-8-8-8z"
/>
</svg>
</span>
</span>
</button>
</div>
</div>
<div
class="ant-typography css-var-test-id"
style="margin: 0px; font-size: 12px;"
>
清除按钮元素,包含清除按钮的布局、样式和交互效果
</div>
</div>
</li>
<li
class="acss-1ehfz5v"
>
<div
class="ant-flex css-var-test-id ant-flex-align-stretch ant-flex-gap-small ant-flex-vertical"
>
<div
class="ant-flex css-var-test-id ant-flex-align-center ant-flex-justify-space-between ant-flex-gap-small"
>
<div
class="ant-flex css-var-test-id ant-flex-align-center ant-flex-gap-small"
>
<h5
class="ant-typography css-var-test-id"
style="margin: 0px;"
>
input
</h5>
</div>
<div
class="ant-flex css-var-test-id ant-flex-align-center ant-flex-gap-small"
>
<button
aria-hidden="true"
class="ant-btn css-var-test-id ant-btn-default ant-btn-color-default ant-btn-variant-text ant-btn-sm ant-btn-icon-only"
type="button"
>
<span
class="ant-btn-icon"
>
<span
aria-label="pushpin"
class="anticon anticon-pushpin"
role="img"
>
<svg
aria-hidden="true"
data-icon="pushpin"
fill="currentColor"
focusable="false"
height="1em"
viewBox="64 64 896 896"
width="1em"
>
<path
d="M878.3 392.1L631.9 145.7c-6.5-6.5-15-9.7-23.5-9.7s-17 3.2-23.5 9.7L423.8 306.9c-12.2-1.4-24.5-2-36.8-2-73.2 0-146.4 24.1-206.5 72.3a33.23 33.23 0 00-2.7 49.4l181.7 181.7-215.4 215.2a15.8 15.8 0 00-4.6 9.8l-3.4 37.2c-.9 9.4 6.6 17.4 15.9 17.4.5 0 1 0 1.5-.1l37.2-3.4c3.7-.3 7.2-2 9.8-4.6l215.4-215.4 181.7 181.7c6.5 6.5 15 9.7 23.5 9.7 9.7 0 19.3-4.2 25.9-12.4 56.3-70.3 79.7-158.3 70.2-243.4l161.1-161.1c12.9-12.8 12.9-33.8 0-46.8zM666.2 549.3l-24.5 24.5 3.8 34.4a259.92 259.92 0 01-30.4 153.9L262 408.8c12.9-7.1 26.3-13.1 40.3-17.9 27.2-9.4 55.7-14.1 84.7-14.1 9.6 0 19.3.5 28.9 1.6l34.4 3.8 24.5-24.5L608.5 224 800 415.5 666.2 549.3z"
/>
</svg>
</span>
</span>
</button>
<button
aria-hidden="true"
class="ant-btn css-var-test-id ant-btn-text ant-btn-color-default ant-btn-variant-text ant-btn-sm ant-btn-icon-only"
type="button"
>
<span
class="ant-btn-icon"
>
<span
aria-label="info-circle"
class="anticon anticon-info-circle"
role="img"
>
<svg
aria-hidden="true"
data-icon="info-circle"
fill="currentColor"
focusable="false"
height="1em"
viewBox="64 64 896 896"
width="1em"
>
<path
d="M512 64C264.6 64 64 264.6 64 512s200.6 448 448 448 448-200.6 448-448S759.4 64 512 64zm0 820c-205.4 0-372-166.6-372-372s166.6-372 372-372 372 166.6 372 372-166.6 372-372 372z"
/>
<path
d="M464 336a48 48 0 1096 0 48 48 0 10-96 0zm72 112h-48c-4.4 0-8 3.6-8 8v272c0 4.4 3.6 8 8 8h48c4.4 0 8-3.6 8-8V456c0-4.4-3.6-8-8-8z"
/>
</svg>
</span>
</span>
</button>
</div>
</div>
<div
class="ant-typography css-var-test-id"
style="margin: 0px; font-size: 12px;"
>
输入框元素,包含搜索输入框的样式、光标控制、字体继承等搜索相关样式,去除了边框样式
</div>
</div>
</li>
<li
class="acss-1ehfz5v"
>
<div
class="ant-flex css-var-test-id ant-flex-align-stretch ant-flex-gap-small ant-flex-vertical"
>
<div
class="ant-flex css-var-test-id ant-flex-align-center ant-flex-justify-space-between ant-flex-gap-small"
>
<div
class="ant-flex css-var-test-id ant-flex-align-center ant-flex-gap-small"
>
<h5
class="ant-typography css-var-test-id"
style="margin: 0px;"
>
popup.root
</h5>
</div>
<div
class="ant-flex css-var-test-id ant-flex-align-center ant-flex-gap-small"
>
<button
aria-hidden="true"
class="ant-btn css-var-test-id ant-btn-default ant-btn-color-default ant-btn-variant-text ant-btn-sm ant-btn-icon-only"
type="button"
>
<span
class="ant-btn-icon"
>
<span
aria-label="pushpin"
class="anticon anticon-pushpin"
role="img"
>
<svg
aria-hidden="true"
data-icon="pushpin"
fill="currentColor"
focusable="false"
height="1em"
viewBox="64 64 896 896"
width="1em"
>
<path
d="M878.3 392.1L631.9 145.7c-6.5-6.5-15-9.7-23.5-9.7s-17 3.2-23.5 9.7L423.8 306.9c-12.2-1.4-24.5-2-36.8-2-73.2 0-146.4 24.1-206.5 72.3a33.23 33.23 0 00-2.7 49.4l181.7 181.7-215.4 215.2a15.8 15.8 0 00-4.6 9.8l-3.4 37.2c-.9 9.4 6.6 17.4 15.9 17.4.5 0 1 0 1.5-.1l37.2-3.4c3.7-.3 7.2-2 9.8-4.6l215.4-215.4 181.7 181.7c6.5 6.5 15 9.7 23.5 9.7 9.7 0 19.3-4.2 25.9-12.4 56.3-70.3 79.7-158.3 70.2-243.4l161.1-161.1c12.9-12.8 12.9-33.8 0-46.8zM666.2 549.3l-24.5 24.5 3.8 34.4a259.92 259.92 0 01-30.4 153.9L262 408.8c12.9-7.1 26.3-13.1 40.3-17.9 27.2-9.4 55.7-14.1 84.7-14.1 9.6 0 19.3.5 28.9 1.6l34.4 3.8 24.5-24.5L608.5 224 800 415.5 666.2 549.3z"
/>
</svg>
</span>
</span>
</button>
<button
aria-hidden="true"
class="ant-btn css-var-test-id ant-btn-text ant-btn-color-default ant-btn-variant-text ant-btn-sm ant-btn-icon-only"
type="button"
>
<span
class="ant-btn-icon"
>
<span
aria-label="info-circle"
class="anticon anticon-info-circle"
role="img"
>
<svg
aria-hidden="true"
data-icon="info-circle"
fill="currentColor"
focusable="false"
height="1em"
viewBox="64 64 896 896"
width="1em"
>
<path
d="M512 64C264.6 64 64 264.6 64 512s200.6 448 448 448 448-200.6 448-448S759.4 64 512 64zm0 820c-205.4 0-372-166.6-372-372s166.6-372 372-372 372 166.6 372 372-166.6 372-372 372z"
/>
<path
d="M464 336a48 48 0 1096 0 48 48 0 10-96 0zm72 112h-48c-4.4 0-8 3.6-8 8v272c0 4.4 3.6 8 8 8h48c4.4 0 8-3.6 8-8V456c0-4.4-3.6-8-8-8z"
/>
</svg>
</span>
</span>
</button>
</div>
</div>
<div
class="ant-typography css-var-test-id"
style="margin: 0px; font-size: 12px;"
>
弹出菜单元素,包含弹出层的定位、层级、背景、边框、阴影等弹出容器样式
</div>
</div>
</li>
<li
class="acss-1ehfz5v"
>
<div
class="ant-flex css-var-test-id ant-flex-align-stretch ant-flex-gap-small ant-flex-vertical"
>
<div
class="ant-flex css-var-test-id ant-flex-align-center ant-flex-justify-space-between ant-flex-gap-small"
>
<div
class="ant-flex css-var-test-id ant-flex-align-center ant-flex-gap-small"
>
<h5
class="ant-typography css-var-test-id"
style="margin: 0px;"
>
popup.list
</h5>
</div>
<div
class="ant-flex css-var-test-id ant-flex-align-center ant-flex-gap-small"
>
<button
aria-hidden="true"
class="ant-btn css-var-test-id ant-btn-default ant-btn-color-default ant-btn-variant-text ant-btn-sm ant-btn-icon-only"
type="button"
>
<span
class="ant-btn-icon"
>
<span
aria-label="pushpin"
class="anticon anticon-pushpin"
role="img"
>
<svg
aria-hidden="true"
data-icon="pushpin"
fill="currentColor"
focusable="false"
height="1em"
viewBox="64 64 896 896"
width="1em"
>
<path
d="M878.3 392.1L631.9 145.7c-6.5-6.5-15-9.7-23.5-9.7s-17 3.2-23.5 9.7L423.8 306.9c-12.2-1.4-24.5-2-36.8-2-73.2 0-146.4 24.1-206.5 72.3a33.23 33.23 0 00-2.7 49.4l181.7 181.7-215.4 215.2a15.8 15.8 0 00-4.6 9.8l-3.4 37.2c-.9 9.4 6.6 17.4 15.9 17.4.5 0 1 0 1.5-.1l37.2-3.4c3.7-.3 7.2-2 9.8-4.6l215.4-215.4 181.7 181.7c6.5 6.5 15 9.7 23.5 9.7 9.7 0 19.3-4.2 25.9-12.4 56.3-70.3 79.7-158.3 70.2-243.4l161.1-161.1c12.9-12.8 12.9-33.8 0-46.8zM666.2 549.3l-24.5 24.5 3.8 34.4a259.92 259.92 0 01-30.4 153.9L262 408.8c12.9-7.1 26.3-13.1 40.3-17.9 27.2-9.4 55.7-14.1 84.7-14.1 9.6 0 19.3.5 28.9 1.6l34.4 3.8 24.5-24.5L608.5 224 800 415.5 666.2 549.3z"
/>
</svg>
</span>
</span>
</button>
<button
aria-hidden="true"
class="ant-btn css-var-test-id ant-btn-text ant-btn-color-default ant-btn-variant-text ant-btn-sm ant-btn-icon-only"
type="button"
>
<span
class="ant-btn-icon"
>
<span
aria-label="info-circle"
class="anticon anticon-info-circle"
role="img"
>
<svg
aria-hidden="true"
data-icon="info-circle"
fill="currentColor"
focusable="false"
height="1em"
viewBox="64 64 896 896"
width="1em"
>
<path
d="M512 64C264.6 64 64 264.6 64 512s200.6 448 448 448 448-200.6 448-448S759.4 64 512 64zm0 820c-205.4 0-372-166.6-372-372s166.6-372 372-372 372 166.6 372 372-166.6 372-372 372z"
/>
<path
d="M464 336a48 48 0 1096 0 48 48 0 10-96 0zm72 112h-48c-4.4 0-8 3.6-8 8v272c0 4.4 3.6 8 8 8h48c4.4 0 8-3.6 8-8V456c0-4.4-3.6-8-8-8z"
/>
</svg>
</span>
</span>
</button>
</div>
</div>
<div
class="ant-typography css-var-test-id"
style="margin: 0px; font-size: 12px;"
>
弹出菜单列表元素,包含选项列表的布局、滚动、最大高度等列表容器样式
</div>
</div>
</li>
<li
class="acss-1ehfz5v"
>
<div
class="ant-flex css-var-test-id ant-flex-align-stretch ant-flex-gap-small ant-flex-vertical"
>
<div
class="ant-flex css-var-test-id ant-flex-align-center ant-flex-justify-space-between ant-flex-gap-small"
>
<div
class="ant-flex css-var-test-id ant-flex-align-center ant-flex-gap-small"
>
<h5
class="ant-typography css-var-test-id"
style="margin: 0px;"
>
popup.listItem
</h5>
</div>
<div
class="ant-flex css-var-test-id ant-flex-align-center ant-flex-gap-small"
>
<button
aria-hidden="true"
class="ant-btn css-var-test-id ant-btn-default ant-btn-color-default ant-btn-variant-text ant-btn-sm ant-btn-icon-only"
type="button"
>
<span
class="ant-btn-icon"
>
<span
aria-label="pushpin"
class="anticon anticon-pushpin"
role="img"
>
<svg
aria-hidden="true"
data-icon="pushpin"
fill="currentColor"
focusable="false"
height="1em"
viewBox="64 64 896 896"
width="1em"
>
<path
d="M878.3 392.1L631.9 145.7c-6.5-6.5-15-9.7-23.5-9.7s-17 3.2-23.5 9.7L423.8 306.9c-12.2-1.4-24.5-2-36.8-2-73.2 0-146.4 24.1-206.5 72.3a33.23 33.23 0 00-2.7 49.4l181.7 181.7-215.4 215.2a15.8 15.8 0 00-4.6 9.8l-3.4 37.2c-.9 9.4 6.6 17.4 15.9 17.4.5 0 1 0 1.5-.1l37.2-3.4c3.7-.3 7.2-2 9.8-4.6l215.4-215.4 181.7 181.7c6.5 6.5 15 9.7 23.5 9.7 9.7 0 19.3-4.2 25.9-12.4 56.3-70.3 79.7-158.3 70.2-243.4l161.1-161.1c12.9-12.8 12.9-33.8 0-46.8zM666.2 549.3l-24.5 24.5 3.8 34.4a259.92 259.92 0 01-30.4 153.9L262 408.8c12.9-7.1 26.3-13.1 40.3-17.9 27.2-9.4 55.7-14.1 84.7-14.1 9.6 0 19.3.5 28.9 1.6l34.4 3.8 24.5-24.5L608.5 224 800 415.5 666.2 549.3z"
/>
</svg>
</span>
</span>
</button>
<button
aria-hidden="true"
class="ant-btn css-var-test-id ant-btn-text ant-btn-color-default ant-btn-variant-text ant-btn-sm ant-btn-icon-only"
type="button"
>
<span
class="ant-btn-icon"
>
<span
aria-label="info-circle"
class="anticon anticon-info-circle"
role="img"
>
<svg
aria-hidden="true"
data-icon="info-circle"
fill="currentColor"
focusable="false"
height="1em"
viewBox="64 64 896 896"
width="1em"
>
<path
d="M512 64C264.6 64 64 264.6 64 512s200.6 448 448 448 448-200.6 448-448S759.4 64 512 64zm0 820c-205.4 0-372-166.6-372-372s166.6-372 372-372 372 166.6 372 372-166.6 372-372 372z"
/>
<path
d="M464 336a48 48 0 1096 0 48 48 0 10-96 0zm72 112h-48c-4.4 0-8 3.6-8 8v272c0 4.4 3.6 8 8 8h48c4.4 0 8-3.6 8-8V456c0-4.4-3.6-8-8-8z"
/>
</svg>
</span>
</span>
</button>
</div>
</div>
<div
class="ant-typography css-var-test-id"
style="margin: 0px; font-size: 12px;"
>
弹出菜单条目元素,包含选项项的内边距、悬浮效果、选中状态、禁用状态等选项交互样式
</div>
</div>
</li>
</ul>
</div>
</div>
</div>
`;

View File

@@ -0,0 +1,3 @@
import { semanticDemoTest } from '../../../tests/shared/demoTest';
semanticDemoTest('auto-complete');

View File

@@ -20,6 +20,7 @@ const PurePanel = genPurePanel(RefAutoComplete, 'popupAlign', (props: any) =>
);
type CompoundedComponent = typeof RefAutoComplete & {
/** @deprecated Please use `options` instead. */
Option: typeof Option;
_InternalPanelDoNotUseOrYouWillBeFired: typeof PurePanel;
};

View File

@@ -0,0 +1,609 @@
// Jest Snapshot v1, https://jestjs.io/docs/snapshot-testing
exports[`renders components/badge/demo/_semantic.tsx correctly 1`] = `
<div
class="acss-1ucck97"
>
<div
class="ant-row css-var-test-id"
>
<div
class="ant-col ant-col-16 acss-my3sst css-var-test-id"
>
<span
class="ant-badge semantic-mark-root css-var-test-id"
>
<span
class="ant-avatar ant-avatar-lg ant-avatar-square css-var-test-id ant-avatar-css-var"
>
<span
class="ant-avatar-string"
style="-webkit-transform: scale(1); transform: scale(1);"
/>
</span>
<sup
class="ant-scroll-number semantic-mark-indicator ant-badge-count"
data-show="true"
title="5"
>
<bdi>
<span
class="ant-scroll-number-only"
style="transition: none;"
>
<span
class="ant-scroll-number-only-unit current"
>
5
</span>
</span>
</bdi>
</sup>
</span>
</div>
<div
class="ant-col ant-col-8 css-var-test-id"
>
<ul
class="acss-1ry21g5"
>
<li
class="acss-1ehfz5v"
>
<div
class="ant-flex css-var-test-id ant-flex-align-stretch ant-flex-gap-small ant-flex-vertical"
>
<div
class="ant-flex css-var-test-id ant-flex-align-center ant-flex-justify-space-between ant-flex-gap-small"
>
<div
class="ant-flex css-var-test-id ant-flex-align-center ant-flex-gap-small"
>
<h5
class="ant-typography css-var-test-id"
style="margin: 0px;"
>
root
</h5>
<span
class="ant-tag ant-tag-filled ant-tag-blue css-var-test-id"
>
5.7.0
</span>
</div>
<div
class="ant-flex css-var-test-id ant-flex-align-center ant-flex-gap-small"
>
<button
aria-hidden="true"
class="ant-btn css-var-test-id ant-btn-default ant-btn-color-default ant-btn-variant-text ant-btn-sm ant-btn-icon-only"
type="button"
>
<span
class="ant-btn-icon"
>
<span
aria-label="pushpin"
class="anticon anticon-pushpin"
role="img"
>
<svg
aria-hidden="true"
data-icon="pushpin"
fill="currentColor"
focusable="false"
height="1em"
viewBox="64 64 896 896"
width="1em"
>
<path
d="M878.3 392.1L631.9 145.7c-6.5-6.5-15-9.7-23.5-9.7s-17 3.2-23.5 9.7L423.8 306.9c-12.2-1.4-24.5-2-36.8-2-73.2 0-146.4 24.1-206.5 72.3a33.23 33.23 0 00-2.7 49.4l181.7 181.7-215.4 215.2a15.8 15.8 0 00-4.6 9.8l-3.4 37.2c-.9 9.4 6.6 17.4 15.9 17.4.5 0 1 0 1.5-.1l37.2-3.4c3.7-.3 7.2-2 9.8-4.6l215.4-215.4 181.7 181.7c6.5 6.5 15 9.7 23.5 9.7 9.7 0 19.3-4.2 25.9-12.4 56.3-70.3 79.7-158.3 70.2-243.4l161.1-161.1c12.9-12.8 12.9-33.8 0-46.8zM666.2 549.3l-24.5 24.5 3.8 34.4a259.92 259.92 0 01-30.4 153.9L262 408.8c12.9-7.1 26.3-13.1 40.3-17.9 27.2-9.4 55.7-14.1 84.7-14.1 9.6 0 19.3.5 28.9 1.6l34.4 3.8 24.5-24.5L608.5 224 800 415.5 666.2 549.3z"
/>
</svg>
</span>
</span>
</button>
<button
aria-hidden="true"
class="ant-btn css-var-test-id ant-btn-text ant-btn-color-default ant-btn-variant-text ant-btn-sm ant-btn-icon-only"
type="button"
>
<span
class="ant-btn-icon"
>
<span
aria-label="info-circle"
class="anticon anticon-info-circle"
role="img"
>
<svg
aria-hidden="true"
data-icon="info-circle"
fill="currentColor"
focusable="false"
height="1em"
viewBox="64 64 896 896"
width="1em"
>
<path
d="M512 64C264.6 64 64 264.6 64 512s200.6 448 448 448 448-200.6 448-448S759.4 64 512 64zm0 820c-205.4 0-372-166.6-372-372s166.6-372 372-372 372 166.6 372 372-166.6 372-372 372z"
/>
<path
d="M464 336a48 48 0 1096 0 48 48 0 10-96 0zm72 112h-48c-4.4 0-8 3.6-8 8v272c0 4.4 3.6 8 8 8h48c4.4 0 8-3.6 8-8V456c0-4.4-3.6-8-8-8z"
/>
</svg>
</span>
</span>
</button>
</div>
</div>
<div
class="ant-typography css-var-test-id"
style="margin: 0px; font-size: 12px;"
>
根元素,包含相对定位、行内块布局、适应内容宽度等基础布局样式
</div>
</div>
</li>
<li
class="acss-1ehfz5v"
>
<div
class="ant-flex css-var-test-id ant-flex-align-stretch ant-flex-gap-small ant-flex-vertical"
>
<div
class="ant-flex css-var-test-id ant-flex-align-center ant-flex-justify-space-between ant-flex-gap-small"
>
<div
class="ant-flex css-var-test-id ant-flex-align-center ant-flex-gap-small"
>
<h5
class="ant-typography css-var-test-id"
style="margin: 0px;"
>
indicator
</h5>
<span
class="ant-tag ant-tag-filled ant-tag-blue css-var-test-id"
>
5.7.0
</span>
</div>
<div
class="ant-flex css-var-test-id ant-flex-align-center ant-flex-gap-small"
>
<button
aria-hidden="true"
class="ant-btn css-var-test-id ant-btn-default ant-btn-color-default ant-btn-variant-text ant-btn-sm ant-btn-icon-only"
type="button"
>
<span
class="ant-btn-icon"
>
<span
aria-label="pushpin"
class="anticon anticon-pushpin"
role="img"
>
<svg
aria-hidden="true"
data-icon="pushpin"
fill="currentColor"
focusable="false"
height="1em"
viewBox="64 64 896 896"
width="1em"
>
<path
d="M878.3 392.1L631.9 145.7c-6.5-6.5-15-9.7-23.5-9.7s-17 3.2-23.5 9.7L423.8 306.9c-12.2-1.4-24.5-2-36.8-2-73.2 0-146.4 24.1-206.5 72.3a33.23 33.23 0 00-2.7 49.4l181.7 181.7-215.4 215.2a15.8 15.8 0 00-4.6 9.8l-3.4 37.2c-.9 9.4 6.6 17.4 15.9 17.4.5 0 1 0 1.5-.1l37.2-3.4c3.7-.3 7.2-2 9.8-4.6l215.4-215.4 181.7 181.7c6.5 6.5 15 9.7 23.5 9.7 9.7 0 19.3-4.2 25.9-12.4 56.3-70.3 79.7-158.3 70.2-243.4l161.1-161.1c12.9-12.8 12.9-33.8 0-46.8zM666.2 549.3l-24.5 24.5 3.8 34.4a259.92 259.92 0 01-30.4 153.9L262 408.8c12.9-7.1 26.3-13.1 40.3-17.9 27.2-9.4 55.7-14.1 84.7-14.1 9.6 0 19.3.5 28.9 1.6l34.4 3.8 24.5-24.5L608.5 224 800 415.5 666.2 549.3z"
/>
</svg>
</span>
</span>
</button>
<button
aria-hidden="true"
class="ant-btn css-var-test-id ant-btn-text ant-btn-color-default ant-btn-variant-text ant-btn-sm ant-btn-icon-only"
type="button"
>
<span
class="ant-btn-icon"
>
<span
aria-label="info-circle"
class="anticon anticon-info-circle"
role="img"
>
<svg
aria-hidden="true"
data-icon="info-circle"
fill="currentColor"
focusable="false"
height="1em"
viewBox="64 64 896 896"
width="1em"
>
<path
d="M512 64C264.6 64 64 264.6 64 512s200.6 448 448 448 448-200.6 448-448S759.4 64 512 64zm0 820c-205.4 0-372-166.6-372-372s166.6-372 372-372 372 166.6 372 372-166.6 372-372 372z"
/>
<path
d="M464 336a48 48 0 1096 0 48 48 0 10-96 0zm72 112h-48c-4.4 0-8 3.6-8 8v272c0 4.4 3.6 8 8 8h48c4.4 0 8-3.6 8-8V456c0-4.4-3.6-8-8-8z"
/>
</svg>
</span>
</span>
</button>
</div>
</div>
<div
class="ant-typography css-var-test-id"
style="margin: 0px; font-size: 12px;"
>
指示器元素,包含定位、层级、尺寸、颜色、字体、文本对齐、背景、圆角、阴影、过渡动画等完整的徽标样式
</div>
</div>
</li>
</ul>
</div>
</div>
</div>
`;
exports[`renders components/badge/demo/_semantic_ribbon.tsx correctly 1`] = `
<div
class="acss-1ucck97"
>
<div
class="ant-row css-var-test-id"
>
<div
class="ant-col ant-col-16 acss-my3sst css-var-test-id"
>
<div
style="width: 100%;"
>
<div
class="ant-ribbon-wrapper css-var-test-id semantic-mark-root"
>
<div
class="ant-card ant-card-bordered ant-card-small css-var-test-id"
>
<div
class="ant-card-head"
>
<div
class="ant-card-head-wrapper"
>
<div
class="ant-card-head-title"
>
Pushes open the window
</div>
</div>
</div>
<div
class="ant-card-body"
>
and raises the spyglass.
</div>
</div>
<div
class="ant-ribbon ant-ribbon-placement-end ant-ribbon-color-pink semantic-mark-indicator"
>
<span
class="ant-ribbon-content semantic-mark-content"
>
Hippies
</span>
<div
class="ant-ribbon-corner"
/>
</div>
</div>
</div>
</div>
<div
class="ant-col ant-col-8 css-var-test-id"
>
<ul
class="acss-1ry21g5"
>
<li
class="acss-1ehfz5v"
>
<div
class="ant-flex css-var-test-id ant-flex-align-stretch ant-flex-gap-small ant-flex-vertical"
>
<div
class="ant-flex css-var-test-id ant-flex-align-center ant-flex-justify-space-between ant-flex-gap-small"
>
<div
class="ant-flex css-var-test-id ant-flex-align-center ant-flex-gap-small"
>
<h5
class="ant-typography css-var-test-id"
style="margin: 0px;"
>
root
</h5>
<span
class="ant-tag ant-tag-filled ant-tag-blue css-var-test-id"
>
6.0.0
</span>
</div>
<div
class="ant-flex css-var-test-id ant-flex-align-center ant-flex-gap-small"
>
<button
aria-hidden="true"
class="ant-btn css-var-test-id ant-btn-default ant-btn-color-default ant-btn-variant-text ant-btn-sm ant-btn-icon-only"
type="button"
>
<span
class="ant-btn-icon"
>
<span
aria-label="pushpin"
class="anticon anticon-pushpin"
role="img"
>
<svg
aria-hidden="true"
data-icon="pushpin"
fill="currentColor"
focusable="false"
height="1em"
viewBox="64 64 896 896"
width="1em"
>
<path
d="M878.3 392.1L631.9 145.7c-6.5-6.5-15-9.7-23.5-9.7s-17 3.2-23.5 9.7L423.8 306.9c-12.2-1.4-24.5-2-36.8-2-73.2 0-146.4 24.1-206.5 72.3a33.23 33.23 0 00-2.7 49.4l181.7 181.7-215.4 215.2a15.8 15.8 0 00-4.6 9.8l-3.4 37.2c-.9 9.4 6.6 17.4 15.9 17.4.5 0 1 0 1.5-.1l37.2-3.4c3.7-.3 7.2-2 9.8-4.6l215.4-215.4 181.7 181.7c6.5 6.5 15 9.7 23.5 9.7 9.7 0 19.3-4.2 25.9-12.4 56.3-70.3 79.7-158.3 70.2-243.4l161.1-161.1c12.9-12.8 12.9-33.8 0-46.8zM666.2 549.3l-24.5 24.5 3.8 34.4a259.92 259.92 0 01-30.4 153.9L262 408.8c12.9-7.1 26.3-13.1 40.3-17.9 27.2-9.4 55.7-14.1 84.7-14.1 9.6 0 19.3.5 28.9 1.6l34.4 3.8 24.5-24.5L608.5 224 800 415.5 666.2 549.3z"
/>
</svg>
</span>
</span>
</button>
<button
aria-hidden="true"
class="ant-btn css-var-test-id ant-btn-text ant-btn-color-default ant-btn-variant-text ant-btn-sm ant-btn-icon-only"
type="button"
>
<span
class="ant-btn-icon"
>
<span
aria-label="info-circle"
class="anticon anticon-info-circle"
role="img"
>
<svg
aria-hidden="true"
data-icon="info-circle"
fill="currentColor"
focusable="false"
height="1em"
viewBox="64 64 896 896"
width="1em"
>
<path
d="M512 64C264.6 64 64 264.6 64 512s200.6 448 448 448 448-200.6 448-448S759.4 64 512 64zm0 820c-205.4 0-372-166.6-372-372s166.6-372 372-372 372 166.6 372 372-166.6 372-372 372z"
/>
<path
d="M464 336a48 48 0 1096 0 48 48 0 10-96 0zm72 112h-48c-4.4 0-8 3.6-8 8v272c0 4.4 3.6 8 8 8h48c4.4 0 8-3.6 8-8V456c0-4.4-3.6-8-8-8z"
/>
</svg>
</span>
</span>
</button>
</div>
</div>
<div
class="ant-typography css-var-test-id"
style="margin: 0px; font-size: 12px;"
>
根元素,设置相对定位和包装容器样式
</div>
</div>
</li>
<li
class="acss-1ehfz5v"
>
<div
class="ant-flex css-var-test-id ant-flex-align-stretch ant-flex-gap-small ant-flex-vertical"
>
<div
class="ant-flex css-var-test-id ant-flex-align-center ant-flex-justify-space-between ant-flex-gap-small"
>
<div
class="ant-flex css-var-test-id ant-flex-align-center ant-flex-gap-small"
>
<h5
class="ant-typography css-var-test-id"
style="margin: 0px;"
>
indicator
</h5>
<span
class="ant-tag ant-tag-filled ant-tag-blue css-var-test-id"
>
6.0.0
</span>
</div>
<div
class="ant-flex css-var-test-id ant-flex-align-center ant-flex-gap-small"
>
<button
aria-hidden="true"
class="ant-btn css-var-test-id ant-btn-default ant-btn-color-default ant-btn-variant-text ant-btn-sm ant-btn-icon-only"
type="button"
>
<span
class="ant-btn-icon"
>
<span
aria-label="pushpin"
class="anticon anticon-pushpin"
role="img"
>
<svg
aria-hidden="true"
data-icon="pushpin"
fill="currentColor"
focusable="false"
height="1em"
viewBox="64 64 896 896"
width="1em"
>
<path
d="M878.3 392.1L631.9 145.7c-6.5-6.5-15-9.7-23.5-9.7s-17 3.2-23.5 9.7L423.8 306.9c-12.2-1.4-24.5-2-36.8-2-73.2 0-146.4 24.1-206.5 72.3a33.23 33.23 0 00-2.7 49.4l181.7 181.7-215.4 215.2a15.8 15.8 0 00-4.6 9.8l-3.4 37.2c-.9 9.4 6.6 17.4 15.9 17.4.5 0 1 0 1.5-.1l37.2-3.4c3.7-.3 7.2-2 9.8-4.6l215.4-215.4 181.7 181.7c6.5 6.5 15 9.7 23.5 9.7 9.7 0 19.3-4.2 25.9-12.4 56.3-70.3 79.7-158.3 70.2-243.4l161.1-161.1c12.9-12.8 12.9-33.8 0-46.8zM666.2 549.3l-24.5 24.5 3.8 34.4a259.92 259.92 0 01-30.4 153.9L262 408.8c12.9-7.1 26.3-13.1 40.3-17.9 27.2-9.4 55.7-14.1 84.7-14.1 9.6 0 19.3.5 28.9 1.6l34.4 3.8 24.5-24.5L608.5 224 800 415.5 666.2 549.3z"
/>
</svg>
</span>
</span>
</button>
<button
aria-hidden="true"
class="ant-btn css-var-test-id ant-btn-text ant-btn-color-default ant-btn-variant-text ant-btn-sm ant-btn-icon-only"
type="button"
>
<span
class="ant-btn-icon"
>
<span
aria-label="info-circle"
class="anticon anticon-info-circle"
role="img"
>
<svg
aria-hidden="true"
data-icon="info-circle"
fill="currentColor"
focusable="false"
height="1em"
viewBox="64 64 896 896"
width="1em"
>
<path
d="M512 64C264.6 64 64 264.6 64 512s200.6 448 448 448 448-200.6 448-448S759.4 64 512 64zm0 820c-205.4 0-372-166.6-372-372s166.6-372 372-372 372 166.6 372 372-166.6 372-372 372z"
/>
<path
d="M464 336a48 48 0 1096 0 48 48 0 10-96 0zm72 112h-48c-4.4 0-8 3.6-8 8v272c0 4.4 3.6 8 8 8h48c4.4 0 8-3.6 8-8V456c0-4.4-3.6-8-8-8z"
/>
</svg>
</span>
</span>
</button>
</div>
</div>
<div
class="ant-typography css-var-test-id"
style="margin: 0px; font-size: 12px;"
>
指示器元素,设置绝对定位、内边距、背景色、圆角和缎带样式
</div>
</div>
</li>
<li
class="acss-1ehfz5v"
>
<div
class="ant-flex css-var-test-id ant-flex-align-stretch ant-flex-gap-small ant-flex-vertical"
>
<div
class="ant-flex css-var-test-id ant-flex-align-center ant-flex-justify-space-between ant-flex-gap-small"
>
<div
class="ant-flex css-var-test-id ant-flex-align-center ant-flex-gap-small"
>
<h5
class="ant-typography css-var-test-id"
style="margin: 0px;"
>
content
</h5>
<span
class="ant-tag ant-tag-filled ant-tag-blue css-var-test-id"
>
6.0.0
</span>
</div>
<div
class="ant-flex css-var-test-id ant-flex-align-center ant-flex-gap-small"
>
<button
aria-hidden="true"
class="ant-btn css-var-test-id ant-btn-default ant-btn-color-default ant-btn-variant-text ant-btn-sm ant-btn-icon-only"
type="button"
>
<span
class="ant-btn-icon"
>
<span
aria-label="pushpin"
class="anticon anticon-pushpin"
role="img"
>
<svg
aria-hidden="true"
data-icon="pushpin"
fill="currentColor"
focusable="false"
height="1em"
viewBox="64 64 896 896"
width="1em"
>
<path
d="M878.3 392.1L631.9 145.7c-6.5-6.5-15-9.7-23.5-9.7s-17 3.2-23.5 9.7L423.8 306.9c-12.2-1.4-24.5-2-36.8-2-73.2 0-146.4 24.1-206.5 72.3a33.23 33.23 0 00-2.7 49.4l181.7 181.7-215.4 215.2a15.8 15.8 0 00-4.6 9.8l-3.4 37.2c-.9 9.4 6.6 17.4 15.9 17.4.5 0 1 0 1.5-.1l37.2-3.4c3.7-.3 7.2-2 9.8-4.6l215.4-215.4 181.7 181.7c6.5 6.5 15 9.7 23.5 9.7 9.7 0 19.3-4.2 25.9-12.4 56.3-70.3 79.7-158.3 70.2-243.4l161.1-161.1c12.9-12.8 12.9-33.8 0-46.8zM666.2 549.3l-24.5 24.5 3.8 34.4a259.92 259.92 0 01-30.4 153.9L262 408.8c12.9-7.1 26.3-13.1 40.3-17.9 27.2-9.4 55.7-14.1 84.7-14.1 9.6 0 19.3.5 28.9 1.6l34.4 3.8 24.5-24.5L608.5 224 800 415.5 666.2 549.3z"
/>
</svg>
</span>
</span>
</button>
<button
aria-hidden="true"
class="ant-btn css-var-test-id ant-btn-text ant-btn-color-default ant-btn-variant-text ant-btn-sm ant-btn-icon-only"
type="button"
>
<span
class="ant-btn-icon"
>
<span
aria-label="info-circle"
class="anticon anticon-info-circle"
role="img"
>
<svg
aria-hidden="true"
data-icon="info-circle"
fill="currentColor"
focusable="false"
height="1em"
viewBox="64 64 896 896"
width="1em"
>
<path
d="M512 64C264.6 64 64 264.6 64 512s200.6 448 448 448 448-200.6 448-448S759.4 64 512 64zm0 820c-205.4 0-372-166.6-372-372s166.6-372 372-372 372 166.6 372 372-166.6 372-372 372z"
/>
<path
d="M464 336a48 48 0 1096 0 48 48 0 10-96 0zm72 112h-48c-4.4 0-8 3.6-8 8v272c0 4.4 3.6 8 8 8h48c4.4 0 8-3.6 8-8V456c0-4.4-3.6-8-8-8z"
/>
</svg>
</span>
</span>
</button>
</div>
</div>
<div
class="ant-typography css-var-test-id"
style="margin: 0px; font-size: 12px;"
>
文本元素,设置文本颜色和缎带内容显示样式
</div>
</div>
</li>
</ul>
</div>
</div>
</div>
`;

View File

@@ -0,0 +1,3 @@
import { semanticDemoTest } from '../../../tests/shared/demoTest';
semanticDemoTest('badge');

View File

@@ -192,7 +192,7 @@ const genSharedBadgeStyle: GenerateStyle<BadgeToken> = (token) => {
background: token.badgeColor,
borderRadius: calc(indicatorHeight).div(2).equal(),
boxShadow: `0 0 0 ${unit(badgeShadowSize)} ${token.badgeShadowColor}`,
transition: `background ${token.motionDurationMid}`,
transition: `background-color ${token.motionDurationMid}`,
a: {
color: token.badgeTextColor,

View File

@@ -1,5 +1,5 @@
import * as React from 'react';
import { DownOutlined } from '@ant-design/icons';
import DownOutlined from '@ant-design/icons/DownOutlined';
import { toArray } from '@rc-component/util';
import pickAttrs from '@rc-component/util/lib/pickAttrs';
import { clsx } from 'clsx';

View File

@@ -0,0 +1,404 @@
// Jest Snapshot v1, https://jestjs.io/docs/snapshot-testing
exports[`renders components/breadcrumb/demo/_semantic.tsx correctly 1`] = `
<div
class="acss-1ucck97"
>
<div
class="ant-row css-var-test-id"
>
<div
class="ant-col ant-col-16 acss-my3sst css-var-test-id"
>
<nav
class="ant-breadcrumb semantic-mark-root css-var-test-id"
>
<ol>
<li
class="ant-breadcrumb-item semantic-mark-item"
>
<a
class="ant-breadcrumb-link"
href=""
>
<span
aria-label="home"
class="anticon anticon-home"
role="img"
>
<svg
aria-hidden="true"
data-icon="home"
fill="currentColor"
focusable="false"
height="1em"
viewBox="64 64 896 896"
width="1em"
>
<path
d="M946.5 505L560.1 118.8l-25.9-25.9a31.5 31.5 0 00-44.4 0L77.5 505a63.9 63.9 0 00-18.8 46c.4 35.2 29.7 63.3 64.9 63.3h42.5V940h691.8V614.3h43.4c17.1 0 33.2-6.7 45.3-18.8a63.6 63.6 0 0018.7-45.3c0-17-6.7-33.1-18.8-45.2zM568 868H456V664h112v204zm217.9-325.7V868H632V640c0-22.1-17.9-40-40-40H432c-22.1 0-40 17.9-40 40v228H238.1V542.3h-96l370-369.7 23.1 23.1L882 542.3h-96.1z"
/>
</svg>
</span>
</a>
</li>
<li
aria-hidden="true"
class="ant-breadcrumb-separator semantic-mark-separator"
>
/
</li>
<li
class="ant-breadcrumb-item semantic-mark-item"
>
<a
class="ant-breadcrumb-link"
href=""
>
<span
aria-label="user"
class="anticon anticon-user"
role="img"
>
<svg
aria-hidden="true"
data-icon="user"
fill="currentColor"
focusable="false"
height="1em"
viewBox="64 64 896 896"
width="1em"
>
<path
d="M858.5 763.6a374 374 0 00-80.6-119.5 375.63 375.63 0 00-119.5-80.6c-.4-.2-.8-.3-1.2-.5C719.5 518 760 444.7 760 362c0-137-111-248-248-248S264 225 264 362c0 82.7 40.5 156 102.8 201.1-.4.2-.8.3-1.2.5-44.8 18.9-85 46-119.5 80.6a375.63 375.63 0 00-80.6 119.5A371.7 371.7 0 00136 901.8a8 8 0 008 8.2h60c4.4 0 7.9-3.5 8-7.8 2-77.2 33-149.5 87.8-204.3 56.7-56.7 132-87.9 212.2-87.9s155.5 31.2 212.2 87.9C779 752.7 810 825 812 902.2c.1 4.4 3.6 7.8 8 7.8h60a8 8 0 008-8.2c-1-47.8-10.9-94.3-29.5-138.2zM512 534c-45.9 0-89.1-17.9-121.6-50.4S340 407.9 340 362c0-45.9 17.9-89.1 50.4-121.6S466.1 190 512 190s89.1 17.9 121.6 50.4S684 316.1 684 362c0 45.9-17.9 89.1-50.4 121.6S557.9 534 512 534z"
/>
</svg>
</span>
<span>
Application List
</span>
</a>
</li>
<li
aria-hidden="true"
class="ant-breadcrumb-separator semantic-mark-separator"
>
/
</li>
<li
class="ant-breadcrumb-item semantic-mark-item"
>
<span
class="ant-breadcrumb-link"
>
Application
</span>
</li>
</ol>
</nav>
</div>
<div
class="ant-col ant-col-8 css-var-test-id"
>
<ul
class="acss-1ry21g5"
>
<li
class="acss-1ehfz5v"
>
<div
class="ant-flex css-var-test-id ant-flex-align-stretch ant-flex-gap-small ant-flex-vertical"
>
<div
class="ant-flex css-var-test-id ant-flex-align-center ant-flex-justify-space-between ant-flex-gap-small"
>
<div
class="ant-flex css-var-test-id ant-flex-align-center ant-flex-gap-small"
>
<h5
class="ant-typography css-var-test-id"
style="margin: 0px;"
>
root
</h5>
<span
class="ant-tag ant-tag-filled ant-tag-blue css-var-test-id"
>
6.0.0
</span>
</div>
<div
class="ant-flex css-var-test-id ant-flex-align-center ant-flex-gap-small"
>
<button
aria-hidden="true"
class="ant-btn css-var-test-id ant-btn-default ant-btn-color-default ant-btn-variant-text ant-btn-sm ant-btn-icon-only"
type="button"
>
<span
class="ant-btn-icon"
>
<span
aria-label="pushpin"
class="anticon anticon-pushpin"
role="img"
>
<svg
aria-hidden="true"
data-icon="pushpin"
fill="currentColor"
focusable="false"
height="1em"
viewBox="64 64 896 896"
width="1em"
>
<path
d="M878.3 392.1L631.9 145.7c-6.5-6.5-15-9.7-23.5-9.7s-17 3.2-23.5 9.7L423.8 306.9c-12.2-1.4-24.5-2-36.8-2-73.2 0-146.4 24.1-206.5 72.3a33.23 33.23 0 00-2.7 49.4l181.7 181.7-215.4 215.2a15.8 15.8 0 00-4.6 9.8l-3.4 37.2c-.9 9.4 6.6 17.4 15.9 17.4.5 0 1 0 1.5-.1l37.2-3.4c3.7-.3 7.2-2 9.8-4.6l215.4-215.4 181.7 181.7c6.5 6.5 15 9.7 23.5 9.7 9.7 0 19.3-4.2 25.9-12.4 56.3-70.3 79.7-158.3 70.2-243.4l161.1-161.1c12.9-12.8 12.9-33.8 0-46.8zM666.2 549.3l-24.5 24.5 3.8 34.4a259.92 259.92 0 01-30.4 153.9L262 408.8c12.9-7.1 26.3-13.1 40.3-17.9 27.2-9.4 55.7-14.1 84.7-14.1 9.6 0 19.3.5 28.9 1.6l34.4 3.8 24.5-24.5L608.5 224 800 415.5 666.2 549.3z"
/>
</svg>
</span>
</span>
</button>
<button
aria-hidden="true"
class="ant-btn css-var-test-id ant-btn-text ant-btn-color-default ant-btn-variant-text ant-btn-sm ant-btn-icon-only"
type="button"
>
<span
class="ant-btn-icon"
>
<span
aria-label="info-circle"
class="anticon anticon-info-circle"
role="img"
>
<svg
aria-hidden="true"
data-icon="info-circle"
fill="currentColor"
focusable="false"
height="1em"
viewBox="64 64 896 896"
width="1em"
>
<path
d="M512 64C264.6 64 64 264.6 64 512s200.6 448 448 448 448-200.6 448-448S759.4 64 512 64zm0 820c-205.4 0-372-166.6-372-372s166.6-372 372-372 372 166.6 372 372-166.6 372-372 372z"
/>
<path
d="M464 336a48 48 0 1096 0 48 48 0 10-96 0zm72 112h-48c-4.4 0-8 3.6-8 8v272c0 4.4 3.6 8 8 8h48c4.4 0 8-3.6 8-8V456c0-4.4-3.6-8-8-8z"
/>
</svg>
</span>
</span>
</button>
</div>
</div>
<div
class="ant-typography css-var-test-id"
style="margin: 0px; font-size: 12px;"
>
根元素,包含文字颜色、字体大小、图标尺寸等基础样式,内部使用 flex 布局的有序列表
</div>
</div>
</li>
<li
class="acss-1ehfz5v"
>
<div
class="ant-flex css-var-test-id ant-flex-align-stretch ant-flex-gap-small ant-flex-vertical"
>
<div
class="ant-flex css-var-test-id ant-flex-align-center ant-flex-justify-space-between ant-flex-gap-small"
>
<div
class="ant-flex css-var-test-id ant-flex-align-center ant-flex-gap-small"
>
<h5
class="ant-typography css-var-test-id"
style="margin: 0px;"
>
item
</h5>
<span
class="ant-tag ant-tag-filled ant-tag-blue css-var-test-id"
>
6.0.0
</span>
</div>
<div
class="ant-flex css-var-test-id ant-flex-align-center ant-flex-gap-small"
>
<button
aria-hidden="true"
class="ant-btn css-var-test-id ant-btn-default ant-btn-color-default ant-btn-variant-text ant-btn-sm ant-btn-icon-only"
type="button"
>
<span
class="ant-btn-icon"
>
<span
aria-label="pushpin"
class="anticon anticon-pushpin"
role="img"
>
<svg
aria-hidden="true"
data-icon="pushpin"
fill="currentColor"
focusable="false"
height="1em"
viewBox="64 64 896 896"
width="1em"
>
<path
d="M878.3 392.1L631.9 145.7c-6.5-6.5-15-9.7-23.5-9.7s-17 3.2-23.5 9.7L423.8 306.9c-12.2-1.4-24.5-2-36.8-2-73.2 0-146.4 24.1-206.5 72.3a33.23 33.23 0 00-2.7 49.4l181.7 181.7-215.4 215.2a15.8 15.8 0 00-4.6 9.8l-3.4 37.2c-.9 9.4 6.6 17.4 15.9 17.4.5 0 1 0 1.5-.1l37.2-3.4c3.7-.3 7.2-2 9.8-4.6l215.4-215.4 181.7 181.7c6.5 6.5 15 9.7 23.5 9.7 9.7 0 19.3-4.2 25.9-12.4 56.3-70.3 79.7-158.3 70.2-243.4l161.1-161.1c12.9-12.8 12.9-33.8 0-46.8zM666.2 549.3l-24.5 24.5 3.8 34.4a259.92 259.92 0 01-30.4 153.9L262 408.8c12.9-7.1 26.3-13.1 40.3-17.9 27.2-9.4 55.7-14.1 84.7-14.1 9.6 0 19.3.5 28.9 1.6l34.4 3.8 24.5-24.5L608.5 224 800 415.5 666.2 549.3z"
/>
</svg>
</span>
</span>
</button>
<button
aria-hidden="true"
class="ant-btn css-var-test-id ant-btn-text ant-btn-color-default ant-btn-variant-text ant-btn-sm ant-btn-icon-only"
type="button"
>
<span
class="ant-btn-icon"
>
<span
aria-label="info-circle"
class="anticon anticon-info-circle"
role="img"
>
<svg
aria-hidden="true"
data-icon="info-circle"
fill="currentColor"
focusable="false"
height="1em"
viewBox="64 64 896 896"
width="1em"
>
<path
d="M512 64C264.6 64 64 264.6 64 512s200.6 448 448 448 448-200.6 448-448S759.4 64 512 64zm0 820c-205.4 0-372-166.6-372-372s166.6-372 372-372 372 166.6 372 372-166.6 372-372 372z"
/>
<path
d="M464 336a48 48 0 1096 0 48 48 0 10-96 0zm72 112h-48c-4.4 0-8 3.6-8 8v272c0 4.4 3.6 8 8 8h48c4.4 0 8-3.6 8-8V456c0-4.4-3.6-8-8-8z"
/>
</svg>
</span>
</span>
</button>
</div>
</div>
<div
class="ant-typography css-var-test-id"
style="margin: 0px; font-size: 12px;"
>
Item 元素,包含文字颜色、链接的颜色变化、悬浮效果、内边距、圆角、高度、外边距等样式
</div>
</div>
</li>
<li
class="acss-1ehfz5v"
>
<div
class="ant-flex css-var-test-id ant-flex-align-stretch ant-flex-gap-small ant-flex-vertical"
>
<div
class="ant-flex css-var-test-id ant-flex-align-center ant-flex-justify-space-between ant-flex-gap-small"
>
<div
class="ant-flex css-var-test-id ant-flex-align-center ant-flex-gap-small"
>
<h5
class="ant-typography css-var-test-id"
style="margin: 0px;"
>
separator
</h5>
<span
class="ant-tag ant-tag-filled ant-tag-blue css-var-test-id"
>
6.0.0
</span>
</div>
<div
class="ant-flex css-var-test-id ant-flex-align-center ant-flex-gap-small"
>
<button
aria-hidden="true"
class="ant-btn css-var-test-id ant-btn-default ant-btn-color-default ant-btn-variant-text ant-btn-sm ant-btn-icon-only"
type="button"
>
<span
class="ant-btn-icon"
>
<span
aria-label="pushpin"
class="anticon anticon-pushpin"
role="img"
>
<svg
aria-hidden="true"
data-icon="pushpin"
fill="currentColor"
focusable="false"
height="1em"
viewBox="64 64 896 896"
width="1em"
>
<path
d="M878.3 392.1L631.9 145.7c-6.5-6.5-15-9.7-23.5-9.7s-17 3.2-23.5 9.7L423.8 306.9c-12.2-1.4-24.5-2-36.8-2-73.2 0-146.4 24.1-206.5 72.3a33.23 33.23 0 00-2.7 49.4l181.7 181.7-215.4 215.2a15.8 15.8 0 00-4.6 9.8l-3.4 37.2c-.9 9.4 6.6 17.4 15.9 17.4.5 0 1 0 1.5-.1l37.2-3.4c3.7-.3 7.2-2 9.8-4.6l215.4-215.4 181.7 181.7c6.5 6.5 15 9.7 23.5 9.7 9.7 0 19.3-4.2 25.9-12.4 56.3-70.3 79.7-158.3 70.2-243.4l161.1-161.1c12.9-12.8 12.9-33.8 0-46.8zM666.2 549.3l-24.5 24.5 3.8 34.4a259.92 259.92 0 01-30.4 153.9L262 408.8c12.9-7.1 26.3-13.1 40.3-17.9 27.2-9.4 55.7-14.1 84.7-14.1 9.6 0 19.3.5 28.9 1.6l34.4 3.8 24.5-24.5L608.5 224 800 415.5 666.2 549.3z"
/>
</svg>
</span>
</span>
</button>
<button
aria-hidden="true"
class="ant-btn css-var-test-id ant-btn-text ant-btn-color-default ant-btn-variant-text ant-btn-sm ant-btn-icon-only"
type="button"
>
<span
class="ant-btn-icon"
>
<span
aria-label="info-circle"
class="anticon anticon-info-circle"
role="img"
>
<svg
aria-hidden="true"
data-icon="info-circle"
fill="currentColor"
focusable="false"
height="1em"
viewBox="64 64 896 896"
width="1em"
>
<path
d="M512 64C264.6 64 64 264.6 64 512s200.6 448 448 448 448-200.6 448-448S759.4 64 512 64zm0 820c-205.4 0-372-166.6-372-372s166.6-372 372-372 372 166.6 372 372-166.6 372-372 372z"
/>
<path
d="M464 336a48 48 0 1096 0 48 48 0 10-96 0zm72 112h-48c-4.4 0-8 3.6-8 8v272c0 4.4 3.6 8 8 8h48c4.4 0 8-3.6 8-8V456c0-4.4-3.6-8-8-8z"
/>
</svg>
</span>
</span>
</button>
</div>
</div>
<div
class="ant-typography css-var-test-id"
style="margin: 0px; font-size: 12px;"
>
分隔符元素,包含分隔符的外边距和颜色样式
</div>
</div>
</li>
</ul>
</div>
</div>
</div>
`;

View File

@@ -0,0 +1,3 @@
import { semanticDemoTest } from '../../../tests/shared/demoTest';
semanticDemoTest('breadcrumb');

View File

@@ -11,7 +11,9 @@ export type {
export type { BreadcrumbItemProps, SeparatorType } from './BreadcrumbItem';
type CompoundedComponent = typeof InternalBreadcrumb & {
/** @deprecated Please use `items` instead. */
Item: typeof BreadcrumbItem;
/** @deprecated Please use `separator` instead. */
Separator: typeof BreadcrumbSeparator;
};

View File

@@ -0,0 +1,351 @@
// Jest Snapshot v1, https://jestjs.io/docs/snapshot-testing
exports[`renders components/button/demo/_semantic.tsx correctly 1`] = `
<div
class="acss-1ucck97"
>
<div
class="ant-row css-var-test-id"
>
<div
class="ant-col ant-col-16 acss-my3sst css-var-test-id"
>
<button
class="ant-btn css-var-test-id ant-btn-primary ant-btn-color-primary ant-btn-variant-solid semantic-mark-root"
type="button"
>
<span
class="ant-btn-icon semantic-mark-icon"
>
<span
aria-label="ant-design"
class="anticon anticon-ant-design"
role="img"
>
<svg
aria-hidden="true"
data-icon="ant-design"
fill="currentColor"
focusable="false"
height="1em"
viewBox="64 64 896 896"
width="1em"
>
<path
d="M716.3 313.8c19-18.9 19-49.7 0-68.6l-69.9-69.9.1.1c-18.5-18.5-50.3-50.3-95.3-95.2-21.2-20.7-55.5-20.5-76.5.5L80.9 474.2a53.84 53.84 0 000 76.4L474.6 944a54.14 54.14 0 0076.5 0l165.1-165c19-18.9 19-49.7 0-68.6a48.7 48.7 0 00-68.7 0l-125 125.2c-5.2 5.2-13.3 5.2-18.5 0L189.5 521.4c-5.2-5.2-5.2-13.3 0-18.5l314.4-314.2c.4-.4.9-.7 1.3-1.1 5.2-4.1 12.4-3.7 17.2 1.1l125.2 125.1c19 19 49.8 19 68.7 0zM408.6 514.4a106.3 106.2 0 10212.6 0 106.3 106.2 0 10-212.6 0zm536.2-38.6L821.9 353.5c-19-18.9-49.8-18.9-68.7.1a48.4 48.4 0 000 68.6l83 82.9c5.2 5.2 5.2 13.3 0 18.5l-81.8 81.7a48.4 48.4 0 000 68.6 48.7 48.7 0 0068.7 0l121.8-121.7a53.93 53.93 0 00-.1-76.4z"
/>
</svg>
</span>
</span>
<span
class="semantic-mark-content"
>
Ant Design
</span>
</button>
</div>
<div
class="ant-col ant-col-8 css-var-test-id"
>
<ul
class="acss-1ry21g5"
>
<li
class="acss-1ehfz5v"
>
<div
class="ant-flex css-var-test-id ant-flex-align-stretch ant-flex-gap-small ant-flex-vertical"
>
<div
class="ant-flex css-var-test-id ant-flex-align-center ant-flex-justify-space-between ant-flex-gap-small"
>
<div
class="ant-flex css-var-test-id ant-flex-align-center ant-flex-gap-small"
>
<h5
class="ant-typography css-var-test-id"
style="margin: 0px;"
>
root
</h5>
<span
class="ant-tag ant-tag-filled ant-tag-blue css-var-test-id"
>
6.0.0
</span>
</div>
<div
class="ant-flex css-var-test-id ant-flex-align-center ant-flex-gap-small"
>
<button
aria-hidden="true"
class="ant-btn css-var-test-id ant-btn-default ant-btn-color-default ant-btn-variant-text ant-btn-sm ant-btn-icon-only"
type="button"
>
<span
class="ant-btn-icon"
>
<span
aria-label="pushpin"
class="anticon anticon-pushpin"
role="img"
>
<svg
aria-hidden="true"
data-icon="pushpin"
fill="currentColor"
focusable="false"
height="1em"
viewBox="64 64 896 896"
width="1em"
>
<path
d="M878.3 392.1L631.9 145.7c-6.5-6.5-15-9.7-23.5-9.7s-17 3.2-23.5 9.7L423.8 306.9c-12.2-1.4-24.5-2-36.8-2-73.2 0-146.4 24.1-206.5 72.3a33.23 33.23 0 00-2.7 49.4l181.7 181.7-215.4 215.2a15.8 15.8 0 00-4.6 9.8l-3.4 37.2c-.9 9.4 6.6 17.4 15.9 17.4.5 0 1 0 1.5-.1l37.2-3.4c3.7-.3 7.2-2 9.8-4.6l215.4-215.4 181.7 181.7c6.5 6.5 15 9.7 23.5 9.7 9.7 0 19.3-4.2 25.9-12.4 56.3-70.3 79.7-158.3 70.2-243.4l161.1-161.1c12.9-12.8 12.9-33.8 0-46.8zM666.2 549.3l-24.5 24.5 3.8 34.4a259.92 259.92 0 01-30.4 153.9L262 408.8c12.9-7.1 26.3-13.1 40.3-17.9 27.2-9.4 55.7-14.1 84.7-14.1 9.6 0 19.3.5 28.9 1.6l34.4 3.8 24.5-24.5L608.5 224 800 415.5 666.2 549.3z"
/>
</svg>
</span>
</span>
</button>
<button
aria-hidden="true"
class="ant-btn css-var-test-id ant-btn-text ant-btn-color-default ant-btn-variant-text ant-btn-sm ant-btn-icon-only"
type="button"
>
<span
class="ant-btn-icon"
>
<span
aria-label="info-circle"
class="anticon anticon-info-circle"
role="img"
>
<svg
aria-hidden="true"
data-icon="info-circle"
fill="currentColor"
focusable="false"
height="1em"
viewBox="64 64 896 896"
width="1em"
>
<path
d="M512 64C264.6 64 64 264.6 64 512s200.6 448 448 448 448-200.6 448-448S759.4 64 512 64zm0 820c-205.4 0-372-166.6-372-372s166.6-372 372-372 372 166.6 372 372-166.6 372-372 372z"
/>
<path
d="M464 336a48 48 0 1096 0 48 48 0 10-96 0zm72 112h-48c-4.4 0-8 3.6-8 8v272c0 4.4 3.6 8 8 8h48c4.4 0 8-3.6 8-8V456c0-4.4-3.6-8-8-8z"
/>
</svg>
</span>
</span>
</button>
</div>
</div>
<div
class="ant-typography css-var-test-id"
style="margin: 0px; font-size: 12px;"
>
根元素,包含边框样式、背景色、内边距、圆角、阴影效果、过渡动画、光标样式、文字权重、对齐方式等完整的按钮外观样式
</div>
</div>
</li>
<li
class="acss-1ehfz5v"
>
<div
class="ant-flex css-var-test-id ant-flex-align-stretch ant-flex-gap-small ant-flex-vertical"
>
<div
class="ant-flex css-var-test-id ant-flex-align-center ant-flex-justify-space-between ant-flex-gap-small"
>
<div
class="ant-flex css-var-test-id ant-flex-align-center ant-flex-gap-small"
>
<h5
class="ant-typography css-var-test-id"
style="margin: 0px;"
>
icon
</h5>
<span
class="ant-tag ant-tag-filled ant-tag-blue css-var-test-id"
>
5.5.0
</span>
</div>
<div
class="ant-flex css-var-test-id ant-flex-align-center ant-flex-gap-small"
>
<button
aria-hidden="true"
class="ant-btn css-var-test-id ant-btn-default ant-btn-color-default ant-btn-variant-text ant-btn-sm ant-btn-icon-only"
type="button"
>
<span
class="ant-btn-icon"
>
<span
aria-label="pushpin"
class="anticon anticon-pushpin"
role="img"
>
<svg
aria-hidden="true"
data-icon="pushpin"
fill="currentColor"
focusable="false"
height="1em"
viewBox="64 64 896 896"
width="1em"
>
<path
d="M878.3 392.1L631.9 145.7c-6.5-6.5-15-9.7-23.5-9.7s-17 3.2-23.5 9.7L423.8 306.9c-12.2-1.4-24.5-2-36.8-2-73.2 0-146.4 24.1-206.5 72.3a33.23 33.23 0 00-2.7 49.4l181.7 181.7-215.4 215.2a15.8 15.8 0 00-4.6 9.8l-3.4 37.2c-.9 9.4 6.6 17.4 15.9 17.4.5 0 1 0 1.5-.1l37.2-3.4c3.7-.3 7.2-2 9.8-4.6l215.4-215.4 181.7 181.7c6.5 6.5 15 9.7 23.5 9.7 9.7 0 19.3-4.2 25.9-12.4 56.3-70.3 79.7-158.3 70.2-243.4l161.1-161.1c12.9-12.8 12.9-33.8 0-46.8zM666.2 549.3l-24.5 24.5 3.8 34.4a259.92 259.92 0 01-30.4 153.9L262 408.8c12.9-7.1 26.3-13.1 40.3-17.9 27.2-9.4 55.7-14.1 84.7-14.1 9.6 0 19.3.5 28.9 1.6l34.4 3.8 24.5-24.5L608.5 224 800 415.5 666.2 549.3z"
/>
</svg>
</span>
</span>
</button>
<button
aria-hidden="true"
class="ant-btn css-var-test-id ant-btn-text ant-btn-color-default ant-btn-variant-text ant-btn-sm ant-btn-icon-only"
type="button"
>
<span
class="ant-btn-icon"
>
<span
aria-label="info-circle"
class="anticon anticon-info-circle"
role="img"
>
<svg
aria-hidden="true"
data-icon="info-circle"
fill="currentColor"
focusable="false"
height="1em"
viewBox="64 64 896 896"
width="1em"
>
<path
d="M512 64C264.6 64 64 264.6 64 512s200.6 448 448 448 448-200.6 448-448S759.4 64 512 64zm0 820c-205.4 0-372-166.6-372-372s166.6-372 372-372 372 166.6 372 372-166.6 372-372 372z"
/>
<path
d="M464 336a48 48 0 1096 0 48 48 0 10-96 0zm72 112h-48c-4.4 0-8 3.6-8 8v272c0 4.4 3.6 8 8 8h48c4.4 0 8-3.6 8-8V456c0-4.4-3.6-8-8-8z"
/>
</svg>
</span>
</span>
</button>
</div>
</div>
<div
class="ant-typography css-var-test-id"
style="margin: 0px; font-size: 12px;"
>
图标元素包含图标的字体大小、颜色继承、SVG 样式重置等图标显示相关样式
</div>
</div>
</li>
<li
class="acss-1ehfz5v"
>
<div
class="ant-flex css-var-test-id ant-flex-align-stretch ant-flex-gap-small ant-flex-vertical"
>
<div
class="ant-flex css-var-test-id ant-flex-align-center ant-flex-justify-space-between ant-flex-gap-small"
>
<div
class="ant-flex css-var-test-id ant-flex-align-center ant-flex-gap-small"
>
<h5
class="ant-typography css-var-test-id"
style="margin: 0px;"
>
content
</h5>
<span
class="ant-tag ant-tag-filled ant-tag-blue css-var-test-id"
>
6.0.0
</span>
</div>
<div
class="ant-flex css-var-test-id ant-flex-align-center ant-flex-gap-small"
>
<button
aria-hidden="true"
class="ant-btn css-var-test-id ant-btn-default ant-btn-color-default ant-btn-variant-text ant-btn-sm ant-btn-icon-only"
type="button"
>
<span
class="ant-btn-icon"
>
<span
aria-label="pushpin"
class="anticon anticon-pushpin"
role="img"
>
<svg
aria-hidden="true"
data-icon="pushpin"
fill="currentColor"
focusable="false"
height="1em"
viewBox="64 64 896 896"
width="1em"
>
<path
d="M878.3 392.1L631.9 145.7c-6.5-6.5-15-9.7-23.5-9.7s-17 3.2-23.5 9.7L423.8 306.9c-12.2-1.4-24.5-2-36.8-2-73.2 0-146.4 24.1-206.5 72.3a33.23 33.23 0 00-2.7 49.4l181.7 181.7-215.4 215.2a15.8 15.8 0 00-4.6 9.8l-3.4 37.2c-.9 9.4 6.6 17.4 15.9 17.4.5 0 1 0 1.5-.1l37.2-3.4c3.7-.3 7.2-2 9.8-4.6l215.4-215.4 181.7 181.7c6.5 6.5 15 9.7 23.5 9.7 9.7 0 19.3-4.2 25.9-12.4 56.3-70.3 79.7-158.3 70.2-243.4l161.1-161.1c12.9-12.8 12.9-33.8 0-46.8zM666.2 549.3l-24.5 24.5 3.8 34.4a259.92 259.92 0 01-30.4 153.9L262 408.8c12.9-7.1 26.3-13.1 40.3-17.9 27.2-9.4 55.7-14.1 84.7-14.1 9.6 0 19.3.5 28.9 1.6l34.4 3.8 24.5-24.5L608.5 224 800 415.5 666.2 549.3z"
/>
</svg>
</span>
</span>
</button>
<button
aria-hidden="true"
class="ant-btn css-var-test-id ant-btn-text ant-btn-color-default ant-btn-variant-text ant-btn-sm ant-btn-icon-only"
type="button"
>
<span
class="ant-btn-icon"
>
<span
aria-label="info-circle"
class="anticon anticon-info-circle"
role="img"
>
<svg
aria-hidden="true"
data-icon="info-circle"
fill="currentColor"
focusable="false"
height="1em"
viewBox="64 64 896 896"
width="1em"
>
<path
d="M512 64C264.6 64 64 264.6 64 512s200.6 448 448 448 448-200.6 448-448S759.4 64 512 64zm0 820c-205.4 0-372-166.6-372-372s166.6-372 372-372 372 166.6 372 372-166.6 372-372 372z"
/>
<path
d="M464 336a48 48 0 1096 0 48 48 0 10-96 0zm72 112h-48c-4.4 0-8 3.6-8 8v272c0 4.4 3.6 8 8 8h48c4.4 0 8-3.6 8-8V456c0-4.4-3.6-8-8-8z"
/>
</svg>
</span>
</span>
</button>
</div>
</div>
<div
class="ant-typography css-var-test-id"
style="margin: 0px; font-size: 12px;"
>
内容元素,包装按钮文本内容,控制文本的不换行显示、居中对齐、中文字符间距优化等文本排版样式
</div>
</div>
</li>
</ul>
</div>
</div>
</div>
`;

View File

@@ -0,0 +1,3 @@
import { semanticDemoTest } from '../../../tests/shared/demoTest';
semanticDemoTest('button');

View File

@@ -1,5 +1,5 @@
import { imageDemoTest } from '../../../tests/shared/imageTest';
describe('Button image', () => {
imageDemoTest('button', { skip: ['loading.tsx'] });
imageDemoTest('button', { skip: ['loading.tsx', 'chinese-chars-loading.tsx'] });
});

View File

@@ -1,8 +1,222 @@
import React from 'react';
import { SearchOutlined } from '@ant-design/icons';
import { Button, ConfigProvider, Flex } from 'antd';
const App: React.FC = () => (
<Flex gap="small" vertical>
<div>Component Token</div>
<ConfigProvider
theme={{
components: {
Button: {
fontWeight: '900',
contentFontSizeSM: 20,
contentFontSize: 30,
contentFontSizeLG: 40,
paddingInlineSM: 20,
paddingInline: 30,
paddingInlineLG: 40,
},
},
}}
>
<Flex gap="small" align="center">
<Button size="small">Small</Button>
<Button>Default</Button>
<Button size="large">Large</Button>
</Flex>
</ConfigProvider>
<ConfigProvider
theme={{
components: {
Button: {
dangerColor: 'green',
dangerShadow: 'yellow',
},
},
}}
>
<Flex gap="small" align="center">
<Button danger>Default</Button>
<Button danger type="primary">
Primary
</Button>
<Button danger type="dashed">
Dashed
</Button>
<Button danger type="text">
Text
</Button>
<Button danger type="link">
Link
</Button>
</Flex>
</ConfigProvider>
<ConfigProvider
theme={{
components: {
Button: {
dashedBgDisabled: 'red',
},
},
}}
>
<Button type="dashed" disabled>
Dashed Disabled
</Button>
</ConfigProvider>
<ConfigProvider
theme={{
components: {
Button: {
defaultColor: 'red',
defaultBg: 'blue',
defaultBorderColor: 'green',
defaultShadow: 'yellow',
defaultBgDisabled: 'pink',
defaultHoverColor: 'brown',
defaultHoverBg: 'orange',
defaultHoverBorderColor: 'purple',
defaultActiveColor: 'fuchsia',
defaultActiveBg: 'aqua',
defaultActiveBorderColor: 'lime',
},
},
}}
>
<Flex gap="small" align="start">
<Button>Default</Button>
<Button type="dashed">Dashed</Button>
<Button type="text">Text</Button>
<Button disabled>Disabled</Button>
</Flex>
</ConfigProvider>
<ConfigProvider
theme={{
components: {
Button: {
ghostBg: 'red',
defaultGhostColor: 'yellow',
defaultGhostBorderColor: 'green',
},
},
}}
>
<Flex gap="small" align="start">
<Button ghost>Default</Button>
<Button ghost type="dashed">
Dashed
</Button>
<Button ghost type="text">
Text
</Button>
<Button ghost type="link">
Link
</Button>
<Button ghost type="primary">
Primary
</Button>
</Flex>
</ConfigProvider>
<ConfigProvider
theme={{
components: {
Button: {
iconGap: 40,
},
},
}}
>
<Button icon={<SearchOutlined />}>icon gap 40</Button>
</ConfigProvider>
<ConfigProvider
theme={{
components: {
Button: {
linkHoverBg: 'red',
},
},
}}
>
<Flex gap="small" align="center">
<Button type="link" href="https://ant.design">
Link
</Button>
<Button disabled type="link" href="https://ant.design">
Link(disabled)
</Button>
</Flex>
</ConfigProvider>
<ConfigProvider
theme={{
components: {
Button: {
onlyIconSizeSM: 20,
onlyIconSize: 30,
onlyIconSizeLG: 40,
},
},
}}
>
<Flex gap="small" align="center">
<Button size="small" icon={<SearchOutlined />} />
<Button icon={<SearchOutlined />} />
<Button size="large" icon={<SearchOutlined />} />
</Flex>
</ConfigProvider>
<ConfigProvider
theme={{
components: {
Button: {
primaryColor: 'red',
primaryShadow: 'yellow',
},
},
}}
>
<Button type="primary">Primary</Button>
</ConfigProvider>
<ConfigProvider
theme={{
components: {
Button: {
solidTextColor: 'red',
},
},
}}
>
<Button variant="solid" color="default">
Solid
</Button>
</ConfigProvider>
<ConfigProvider
theme={{
components: {
Button: {
textTextColor: 'red',
textHoverBg: 'yellow',
textTextHoverColor: 'blue',
textTextActiveColor: 'green',
},
},
}}
>
<Flex gap="small" align="start">
<Button type="text">Text</Button>
<Button variant="text" color="default">
Default Text
</Button>
<Button variant="text" color="primary">
Primary Text
</Button>
<Button variant="text" color="danger">
Danger Text
</Button>
</Flex>
</ConfigProvider>
<div>Global Token</div>
<ConfigProvider
theme={{
components: {
@@ -85,24 +299,6 @@ const App: React.FC = () => (
</Button>
</Flex>
</ConfigProvider>
<ConfigProvider
theme={{
components: { Button: { paddingInline: 100, paddingInlineLG: 150, paddingInlineSM: 50 } },
}}
>
<Flex gap="small" vertical align="start">
<Button>Default Button</Button>
<Button shape="round">Default Button</Button>
<Button size="large">Default Button</Button>
<Button shape="round" size="large">
Default Button
</Button>
<Button size="small">Default Button</Button>
<Button shape="round" size="small">
Default Button
</Button>
</Flex>
</ConfigProvider>
</Flex>
);

View File

@@ -5,38 +5,67 @@ import { genCompactItemStyle } from '../../style/compact-item';
import { genCompactItemVerticalStyle } from '../../style/compact-item-vertical';
import type { GenerateStyle } from '../../theme/internal';
import { genSubStyleComponent } from '../../theme/internal';
import { genCssVar } from '../../theme/util/genStyleUtils';
import type { ButtonToken } from './token';
import { prepareComponentToken, prepareToken } from './token';
const genButtonCompactStyle: GenerateStyle<ButtonToken> = (token) => {
const { componentCls, colorPrimaryHover, lineWidth, calc } = token;
const { antCls, componentCls, lineWidth, calc, colorBgContainer } = token;
const solidSelector = `${componentCls}-variant-solid:not([disabled])`;
const insetOffset = calc(lineWidth).mul(-1).equal();
const getCompactBorderStyle = (vertical?: boolean) => {
const [varName, varRef] = genCssVar(antCls, 'btn');
const getCompactBorderStyle = (vertical?: boolean): CSSObject => {
const itemCls = `${componentCls}-compact${vertical ? '-vertical' : ''}-item`;
const selector = `${itemCls}${componentCls}-primary:not([disabled])`;
return {
// TODO: Border color transition should be not cover when has color.
[itemCls]: {
transition: `none`,
},
[varName('compact-connect-border-color')]: varRef('bg-color-hover'),
[`${selector} + ${selector}::before`]: {
position: 'absolute',
top: vertical ? insetOffset : 0,
insetInlineStart: vertical ? 0 : insetOffset,
backgroundColor: colorPrimaryHover,
content: '""',
width: vertical ? '100%' : lineWidth,
height: vertical ? lineWidth : '100%',
} as CSSObject,
[`&${solidSelector}`]: {
transition: `none`,
[`& + ${solidSelector}:before`]: [
{
position: 'absolute',
backgroundColor: varRef('compact-connect-border-color'),
content: '""',
},
vertical
? {
top: insetOffset,
insetInline: insetOffset,
height: lineWidth,
}
: {
insetBlock: insetOffset,
insetInlineStart: insetOffset,
width: lineWidth,
},
],
'&:hover:before': {
display: 'none',
},
},
},
};
};
// Special styles for Primary Button
return {
...getCompactBorderStyle(),
...getCompactBorderStyle(true),
};
// Special styles for solid Button
return [
getCompactBorderStyle(),
getCompactBorderStyle(true),
{
[`${solidSelector}${componentCls}-color-default`]: {
[varName('compact-connect-border-color')]:
`color-mix(in srgb, ${varRef('bg-color-hover')} 75%, ${colorBgContainer})`,
},
},
];
};
// ============================== Export ==============================

View File

@@ -4,9 +4,9 @@ import { unit } from '@ant-design/cssinjs';
import { AggregationColor } from '../../color-picker/color';
import { isBright } from '../../color-picker/components/ColorPresets';
import { PresetColors } from '../../theme/interface';
import type { FullToken, GenStyleFn, GetDefaultToken, PresetColorKey } from '../../theme/internal';
import { getLineHeight, mergeToken } from '../../theme/internal';
import { PresetColors } from '../../theme/interface';
import getAlphaColor from '../../theme/util/getAlphaColor';
/** Component only token. Which will handle additional calculation of alias token */
@@ -154,16 +154,19 @@ export interface ComponentToken {
/**
* @desc 按钮纵向内间距
* @descEN Vertical padding of button
* @deprecated not used
*/
paddingBlock: CSSProperties['paddingBlock'];
/**
* @desc 大号按钮纵向内间距
* @descEN Vertical padding of large button
* @deprecated not used
*/
paddingBlockLG: CSSProperties['paddingBlock'];
/**
* @desc 小号按钮纵向内间距
* @descEN Vertical padding of small button
* @deprecated not used
*/
paddingBlockSM: CSSProperties['paddingBlock'];
/**
@@ -209,16 +212,19 @@ export interface ComponentToken {
/**
* @desc 按钮内容字体行高
* @descEN Line height of button content
* @deprecated not used
*/
contentLineHeight: number;
/**
* @desc 大号按钮内容字体行高
* @descEN Line height of large button content
* @deprecated not used
*/
contentLineHeightLG: number;
/**
* @desc 小号按钮内容字体行高
* @descEN Line height of small button content
* @deprecated not used
*/
contentLineHeightSM: number;
/**
@@ -241,6 +247,10 @@ type ShadowColorMap = {
[Key in `${PresetColorKey}ShadowColor`]: string;
};
type PresetColorHoverActiveMap = {
[Key in `${PresetColorKey}Hover` | `${PresetColorKey}Active`]: string;
};
type GroupToken = {
/**
* @desc 按钮组边框颜色
@@ -251,7 +261,11 @@ type GroupToken = {
groupBorderColor: string;
};
export interface ButtonToken extends FullToken<'Button'>, ShadowColorMap, GroupToken {
export interface ButtonToken
extends FullToken<'Button'>,
ShadowColorMap,
PresetColorHoverActiveMap,
GroupToken {
/**
* @desc 按钮横向内边距
* @descEN Horizontal padding of button

View File

@@ -165,6 +165,7 @@ const genVariantStyle: GenerateStyle<ButtonToken> = (token) => {
[varName('color-base')]: token.colorLink,
[varName('color-hover')]: token.colorLinkHover,
[varName('color-active')]: token.colorLinkActive,
[varName('bg-color-hover')]: token.linkHoverBg,
},
// ======================== Compatible ========================
@@ -218,11 +219,15 @@ const genVariantStyle: GenerateStyle<ButtonToken> = (token) => {
[varName('color-light-hover')]: token.colorFillSecondary,
[varName('color-light-active')]: token.colorFill,
[varName('text-color')]: token.colorText,
[varName('text-color-hover')]: token.defaultHoverBorderColor,
[varName('text-color-active')]: token.defaultActiveBorderColor,
[varName('text-color')]: token.defaultColor,
[varName('text-color-hover')]: token.defaultHoverColor,
[varName('text-color-active')]: token.defaultActiveColor,
[varName('shadow')]: token.defaultShadow,
[`&${componentCls}-variant-outlined`]: {
[varName('bg-color-disabled')]: token.defaultBgDisabled,
},
[`&${componentCls}-variant-solid`]: {
[varName('text-color')]: token.solidTextColor,
[varName('text-color-hover')]: varRef('text-color'),
@@ -235,10 +240,21 @@ const genVariantStyle: GenerateStyle<ButtonToken> = (token) => {
},
[`&${componentCls}-variant-outlined, &${componentCls}-variant-dashed`]: {
[varName('text-color')]: token.defaultColor,
[varName('text-color-hover')]: token.defaultHoverColor,
[varName('text-color-active')]: token.defaultActiveColor,
[varName('bg-color-container')]: token.defaultBg,
[varName('bg-color-hover')]: token.defaultHoverBg,
[varName('bg-color-active')]: token.defaultActiveBg,
},
[`&${componentCls}-variant-text`]: {
[varName('text-color')]: token.textTextColor,
[varName('text-color-hover')]: token.textTextHoverColor,
[varName('text-color-active')]: token.textTextActiveColor,
[varName('bg-color-hover')]: token.textHoverBg,
},
[`&${componentCls}-background-ghost`]: {
[`&${componentCls}-variant-outlined, &${componentCls}-variant-dashed`]: {
[varName('text-color')]: token.defaultGhostColor,
@@ -252,10 +268,10 @@ const genVariantStyle: GenerateStyle<ButtonToken> = (token) => {
PresetColors.map((colorKey) => {
const darkColor = token[`${colorKey}6`];
const lightColor = token[`${colorKey}1`];
const hoverColor = token[`${colorKey}5`];
const hoverColor = token[`${colorKey}Hover`];
const lightHoverColor = token[`${colorKey}2`];
const lightActiveColor = token[`${colorKey}3`];
const activeColor = token[`${colorKey}7`];
const activeColor = token[`${colorKey}Active`];
const shadowColor = token[`${colorKey}ShadowColor`];
@@ -292,8 +308,15 @@ const genVariantStyle: GenerateStyle<ButtonToken> = (token) => {
{
// Ghost
[`&${componentCls}-background-ghost`]: {
[varName('bg-color')]: 'transparent',
[varName('bg-color')]: token.ghostBg,
[varName('bg-color-hover')]: token.ghostBg,
[varName('bg-color-active')]: token.ghostBg,
[varName('shadow')]: 'none',
[`&${componentCls}-variant-outlined, &${componentCls}-variant-dashed`]: {
[varName('bg-color-hover')]: token.ghostBg,
[varName('bg-color-active')]: token.ghostBg,
},
},
},
],

View File

@@ -72,7 +72,7 @@ function YearSelect<DateType>(props: SharedProps<DateType>) {
onChange(newDate);
}}
getPopupContainer={() => divRef!.current!}
getPopupContainer={() => divRef.current}
/>
);
}
@@ -114,7 +114,7 @@ function MonthSelect<DateType>(props: SharedProps<DateType>) {
onChange={(newMonth) => {
onChange(generateConfig.setMonth(value, newMonth));
}}
getPopupContainer={() => divRef!.current!}
getPopupContainer={() => divRef.current}
/>
);
}

View File

@@ -15,7 +15,6 @@ exports[`renders components/calendar/demo/basic.tsx extend context correctly 1`]
>
<div
class="ant-select-content-value"
style="visibility: visible;"
title="2016"
>
2016
@@ -431,7 +430,6 @@ exports[`renders components/calendar/demo/basic.tsx extend context correctly 1`]
>
<div
class="ant-select-content-value"
style="visibility: visible;"
title="Nov"
>
Nov
@@ -1555,7 +1553,6 @@ exports[`renders components/calendar/demo/card.tsx extend context correctly 1`]
>
<div
class="ant-select-content-value"
style="visibility: visible;"
title="2016"
>
2016
@@ -1971,7 +1968,6 @@ exports[`renders components/calendar/demo/card.tsx extend context correctly 1`]
>
<div
class="ant-select-content-value"
style="visibility: visible;"
title="Nov"
>
Nov
@@ -3094,7 +3090,6 @@ Array [
>
<div
class="ant-select-content-value"
style="visibility: visible;"
title="2016"
>
2016
@@ -3510,7 +3505,6 @@ Array [
>
<div
class="ant-select-content-value"
style="visibility: visible;"
title="Nov"
>
Nov
@@ -4627,7 +4621,6 @@ Array [
>
<div
class="ant-select-content-value"
style="visibility: visible;"
title="2016"
>
2016
@@ -5043,7 +5036,6 @@ Array [
>
<div
class="ant-select-content-value"
style="visibility: visible;"
title="Nov"
>
Nov
@@ -6227,7 +6219,6 @@ exports[`renders components/calendar/demo/customize-header.tsx extend context co
>
<div
class="ant-select-content-value"
style="visibility: visible;"
title="2016"
>
2016
@@ -6683,7 +6674,6 @@ exports[`renders components/calendar/demo/customize-header.tsx extend context co
>
<div
class="ant-select-content-value"
style="visibility: visible;"
title="Nov"
>
Nov
@@ -7772,7 +7762,6 @@ exports[`renders components/calendar/demo/notice-calendar.tsx extend context cor
>
<div
class="ant-select-content-value"
style="visibility: visible;"
title="2016"
>
2016
@@ -8188,7 +8177,6 @@ exports[`renders components/calendar/demo/notice-calendar.tsx extend context cor
>
<div
class="ant-select-content-value"
style="visibility: visible;"
title="Nov"
>
Nov
@@ -9722,7 +9710,6 @@ Array [
>
<div
class="ant-select-content-value"
style="visibility: visible;"
title="2017"
>
2017
@@ -10138,7 +10125,6 @@ Array [
>
<div
class="ant-select-content-value"
style="visibility: visible;"
title="Jan"
>
Jan
@@ -11264,7 +11250,6 @@ exports[`renders components/calendar/demo/style-class.tsx extend context correct
>
<div
class="ant-select-content-value"
style="visibility: visible;"
title="2016"
>
2016
@@ -11680,7 +11665,6 @@ exports[`renders components/calendar/demo/style-class.tsx extend context correct
>
<div
class="ant-select-content-value"
style="visibility: visible;"
title="Nov"
>
Nov
@@ -12797,7 +12781,6 @@ exports[`renders components/calendar/demo/style-class.tsx extend context correct
>
<div
class="ant-select-content-value"
style="visibility: visible;"
title="2016"
>
2016
@@ -13213,7 +13196,6 @@ exports[`renders components/calendar/demo/style-class.tsx extend context correct
>
<div
class="ant-select-content-value"
style="visibility: visible;"
title="Nov"
>
Nov
@@ -14336,7 +14318,6 @@ Array [
>
<div
class="ant-select-content-value"
style="visibility: visible;"
title="2016"
>
2016
@@ -14752,7 +14733,6 @@ Array [
>
<div
class="ant-select-content-value"
style="visibility: visible;"
title="Nov"
>
Nov
@@ -15930,7 +15910,6 @@ Array [
>
<div
class="ant-select-content-value"
style="visibility: visible;"
title="2016"
>
2016
@@ -16346,7 +16325,6 @@ Array [
>
<div
class="ant-select-content-value"
style="visibility: visible;"
title="Nov"
>
Nov

File diff suppressed because it is too large Load Diff

View File

@@ -15,7 +15,6 @@ exports[`renders components/calendar/demo/basic.tsx correctly 1`] = `
>
<div
class="ant-select-content-value"
style="visibility:visible"
title="2016"
>
2016
@@ -65,7 +64,6 @@ exports[`renders components/calendar/demo/basic.tsx correctly 1`] = `
>
<div
class="ant-select-content-value"
style="visibility:visible"
title="Nov"
>
Nov
@@ -949,7 +947,6 @@ exports[`renders components/calendar/demo/card.tsx correctly 1`] = `
>
<div
class="ant-select-content-value"
style="visibility:visible"
title="2016"
>
2016
@@ -999,7 +996,6 @@ exports[`renders components/calendar/demo/card.tsx correctly 1`] = `
>
<div
class="ant-select-content-value"
style="visibility:visible"
title="Nov"
>
Nov
@@ -1882,7 +1878,6 @@ Array [
>
<div
class="ant-select-content-value"
style="visibility:visible"
title="2016"
>
2016
@@ -1932,7 +1927,6 @@ Array [
>
<div
class="ant-select-content-value"
style="visibility:visible"
title="Nov"
>
Nov
@@ -2811,7 +2805,6 @@ Array [
>
<div
class="ant-select-content-value"
style="visibility:visible"
title="2016"
>
2016
@@ -2861,7 +2854,6 @@ Array [
>
<div
class="ant-select-content-value"
style="visibility:visible"
title="Nov"
>
Nov
@@ -3805,7 +3797,6 @@ exports[`renders components/calendar/demo/customize-header.tsx correctly 1`] = `
>
<div
class="ant-select-content-value"
style="visibility:visible"
title="2016"
>
2016
@@ -3855,7 +3846,6 @@ exports[`renders components/calendar/demo/customize-header.tsx correctly 1`] = `
>
<div
class="ant-select-content-value"
style="visibility:visible"
title="Nov"
>
Nov
@@ -4688,7 +4678,6 @@ exports[`renders components/calendar/demo/notice-calendar.tsx correctly 1`] = `
>
<div
class="ant-select-content-value"
style="visibility:visible"
title="2016"
>
2016
@@ -4738,7 +4727,6 @@ exports[`renders components/calendar/demo/notice-calendar.tsx correctly 1`] = `
>
<div
class="ant-select-content-value"
style="visibility:visible"
title="Nov"
>
Nov
@@ -6032,7 +6020,6 @@ Array [
>
<div
class="ant-select-content-value"
style="visibility:visible"
title="2017"
>
2017
@@ -6082,7 +6069,6 @@ Array [
>
<div
class="ant-select-content-value"
style="visibility:visible"
title="Jan"
>
Jan
@@ -6968,7 +6954,6 @@ exports[`renders components/calendar/demo/style-class.tsx correctly 1`] = `
>
<div
class="ant-select-content-value"
style="visibility:visible"
title="2016"
>
2016
@@ -7018,7 +7003,6 @@ exports[`renders components/calendar/demo/style-class.tsx correctly 1`] = `
>
<div
class="ant-select-content-value"
style="visibility:visible"
title="Nov"
>
Nov
@@ -7897,7 +7881,6 @@ exports[`renders components/calendar/demo/style-class.tsx correctly 1`] = `
>
<div
class="ant-select-content-value"
style="visibility:visible"
title="2016"
>
2016
@@ -7947,7 +7930,6 @@ exports[`renders components/calendar/demo/style-class.tsx correctly 1`] = `
>
<div
class="ant-select-content-value"
style="visibility:visible"
title="Nov"
>
Nov
@@ -8830,7 +8812,6 @@ Array [
>
<div
class="ant-select-content-value"
style="visibility:visible"
title="2016"
>
2016
@@ -8880,7 +8861,6 @@ Array [
>
<div
class="ant-select-content-value"
style="visibility:visible"
title="Nov"
>
Nov
@@ -9820,7 +9800,6 @@ Array [
>
<div
class="ant-select-content-value"
style="visibility:visible"
title="2016"
>
2016
@@ -9870,7 +9849,6 @@ Array [
>
<div
class="ant-select-content-value"
style="visibility:visible"
title="Nov"
>
Nov

View File

@@ -15,7 +15,6 @@ exports[`Calendar Calendar MonthSelect should display correct label 1`] = `
>
<div
class="ant-select-content-value"
style="visibility: visible;"
title="2019"
>
2019
@@ -65,7 +64,6 @@ exports[`Calendar Calendar MonthSelect should display correct label 1`] = `
>
<div
class="ant-select-content-value"
style="visibility: visible;"
title="Jan"
>
Jan
@@ -946,7 +944,6 @@ exports[`Calendar Calendar should support locale 1`] = `
>
<div
class="ant-select-content-value"
style="visibility: visible;"
title="2018年"
>
2018年
@@ -996,7 +993,6 @@ exports[`Calendar Calendar should support locale 1`] = `
>
<div
class="ant-select-content-value"
style="visibility: visible;"
title="10月"
>
10月
@@ -1877,7 +1873,6 @@ exports[`Calendar rtl render component should be rendered correctly in RTL direc
>
<div
class="ant-select-content-value"
style="visibility: visible;"
title="2000"
>
2000
@@ -1927,7 +1922,6 @@ exports[`Calendar rtl render component should be rendered correctly in RTL direc
>
<div
class="ant-select-content-value"
style="visibility: visible;"
title="Sep"
>
Sep
@@ -2808,7 +2802,6 @@ exports[`Calendar support Calendar.generateCalendar 1`] = `
>
<div
class="ant-select-content-value"
style="visibility: visible;"
title="2000"
>
2000
@@ -2858,7 +2851,6 @@ exports[`Calendar support Calendar.generateCalendar 1`] = `
>
<div
class="ant-select-content-value"
style="visibility: visible;"
title="Jan"
>
Jan

View File

@@ -0,0 +1,3 @@
import { semanticDemoTest } from '../../../tests/shared/demoTest';
semanticDemoTest('calendar');

View File

@@ -196,7 +196,7 @@ export const genCalendarStyles = (token: CalendarToken): CSSObject => {
border: 0,
borderTop: `${unit(token.lineWidthBold)} ${token.lineType} ${token.colorSplit}`,
borderRadius: 0,
transition: `background ${token.motionDurationSlow}`,
transition: `background-color ${token.motionDurationSlow}`,
'&-value': {
lineHeight: unit(token.dateValueHeight),
transition: `color ${token.motionDurationSlow}`,

File diff suppressed because it is too large Load Diff

View File

@@ -0,0 +1,3 @@
import { semanticDemoTest } from '../../../tests/shared/demoTest';
semanticDemoTest('card');

View File

@@ -315,6 +315,7 @@ const genCardStyle: GenerateStyle<CardToken> = (token): CSSObject => {
boxShadowTertiary,
bodyPadding,
extraColor,
motionDurationMid,
} = token;
return {
@@ -342,6 +343,14 @@ const genCardStyle: GenerateStyle<CardToken> = (token): CSSObject => {
[`${componentCls}-body`]: {
padding: bodyPadding,
borderRadius: `0 0 ${unit(token.borderRadiusLG)} ${unit(token.borderRadiusLG)}`,
'&:first-child': {
borderStartStartRadius: token.borderRadiusLG,
borderStartEndRadius: token.borderRadiusLG,
},
'&:not(:last-child)': {
borderEndStartRadius: 0,
borderEndEndRadius: 0,
},
},
[`${componentCls}-grid`]: genCardGridStyle(token),
@@ -371,7 +380,9 @@ const genCardStyle: GenerateStyle<CardToken> = (token): CSSObject => {
[`${componentCls}-hoverable`]: {
cursor: 'pointer',
transition: `box-shadow ${token.motionDurationMid}, border-color ${token.motionDurationMid}`,
transition: [`box-shadow`, `border-color`]
.map((prop) => `${prop} ${motionDurationMid}`)
.join(', '),
'&:hover': {
borderColor: 'transparent',

View File

@@ -601,7 +601,6 @@ Array [
>
<div
class="ant-select-content-value"
style="visibility: visible;"
>
<span>
Zhejiang /
@@ -880,7 +879,6 @@ Array [
>
<div
class="ant-select-content-value"
style="visibility: visible;"
title="Zhejiang / Hangzhou / West Lake"
>
Zhejiang / Hangzhou / West Lake
@@ -2025,10 +2023,10 @@ exports[`renders components/cascader/demo/panel.tsx extend context correctly 1`]
stroke="#d9d9d9"
>
<path
d="M55 12.76L44.854 1.258C44.367.474 43.656 0 42.907 0H21.093c-.749 0-1.46.474-1.947 1.257L9 12.761V22h46v-9.24z"
d="M55 12.8 44.9 1.3Q44 0 42.9 0H21.1q-1.2 0-2 1.3L9 12.8V22h46z"
/>
<path
d="M41.613 15.931c0-1.605.994-2.93 2.227-2.931H55v18.137C55 33.26 53.68 35 52.05 35h-40.1C10.32 35 9 33.259 9 31.137V13h11.16c1.233 0 2.227 1.323 2.227 2.928v.022c0 1.605 1.005 2.901 2.237 2.901h14.752c1.232 0 2.237-1.308 2.237-2.913v-.007z"
d="M41.6 16c0-1.7 1-3 2.2-3H55v18.1c0 2.2-1.3 3.9-3 3.9H12c-1.7 0-3-1.7-3-3.9V13h11.2c1.2 0 2.2 1.3 2.2 3s1 2.9 2.2 2.9h14.8c1.2 0 2.2-1.4 2.2-3"
fill="#fafafa"
/>
</g>
@@ -3499,10 +3497,10 @@ exports[`renders components/cascader/demo/status.tsx extend context correctly 1`
stroke="#d9d9d9"
>
<path
d="M55 12.76L44.854 1.258C44.367.474 43.656 0 42.907 0H21.093c-.749 0-1.46.474-1.947 1.257L9 12.761V22h46v-9.24z"
d="M55 12.8 44.9 1.3Q44 0 42.9 0H21.1q-1.2 0-2 1.3L9 12.8V22h46z"
/>
<path
d="M41.613 15.931c0-1.605.994-2.93 2.227-2.931H55v18.137C55 33.26 53.68 35 52.05 35h-40.1C10.32 35 9 33.259 9 31.137V13h11.16c1.233 0 2.227 1.323 2.227 2.928v.022c0 1.605 1.005 2.901 2.237 2.901h14.752c1.232 0 2.237-1.308 2.237-2.913v-.007z"
d="M41.6 16c0-1.7 1-3 2.2-3H55v18.1c0 2.2-1.3 3.9-3 3.9H12c-1.7 0-3-1.7-3-3.9V13h11.2c1.2 0 2.2 1.3 2.2 3s1 2.9 2.2 2.9h14.8c1.2 0 2.2-1.4 2.2-3"
fill="#fafafa"
/>
</g>
@@ -3638,10 +3636,10 @@ exports[`renders components/cascader/demo/status.tsx extend context correctly 1`
stroke="#d9d9d9"
>
<path
d="M55 12.76L44.854 1.258C44.367.474 43.656 0 42.907 0H21.093c-.749 0-1.46.474-1.947 1.257L9 12.761V22h46v-9.24z"
d="M55 12.8 44.9 1.3Q44 0 42.9 0H21.1q-1.2 0-2 1.3L9 12.8V22h46z"
/>
<path
d="M41.613 15.931c0-1.605.994-2.93 2.227-2.931H55v18.137C55 33.26 53.68 35 52.05 35h-40.1C10.32 35 9 33.259 9 31.137V13h11.16c1.233 0 2.227 1.323 2.227 2.928v.022c0 1.605 1.005 2.901 2.237 2.901h14.752c1.232 0 2.237-1.308 2.237-2.913v-.007z"
d="M41.6 16c0-1.7 1-3 2.2-3H55v18.1c0 2.2-1.3 3.9-3 3.9H12c-1.7 0-3-1.7-3-3.9V13h11.2c1.2 0 2.2 1.3 2.2 3s1 2.9 2.2 2.9h14.8c1.2 0 2.2-1.4 2.2-3"
fill="#fafafa"
/>
</g>
@@ -4740,10 +4738,10 @@ exports[`renders components/cascader/demo/variant.tsx extend context correctly 1
stroke="#d9d9d9"
>
<path
d="M55 12.76L44.854 1.258C44.367.474 43.656 0 42.907 0H21.093c-.749 0-1.46.474-1.947 1.257L9 12.761V22h46v-9.24z"
d="M55 12.8 44.9 1.3Q44 0 42.9 0H21.1q-1.2 0-2 1.3L9 12.8V22h46z"
/>
<path
d="M41.613 15.931c0-1.605.994-2.93 2.227-2.931H55v18.137C55 33.26 53.68 35 52.05 35h-40.1C10.32 35 9 33.259 9 31.137V13h11.16c1.233 0 2.227 1.323 2.227 2.928v.022c0 1.605 1.005 2.901 2.237 2.901h14.752c1.232 0 2.237-1.308 2.237-2.913v-.007z"
d="M41.6 16c0-1.7 1-3 2.2-3H55v18.1c0 2.2-1.3 3.9-3 3.9H12c-1.7 0-3-1.7-3-3.9V13h11.2c1.2 0 2.2 1.3 2.2 3s1 2.9 2.2 2.9h14.8c1.2 0 2.2-1.4 2.2-3"
fill="#fafafa"
/>
</g>
@@ -4864,10 +4862,10 @@ exports[`renders components/cascader/demo/variant.tsx extend context correctly 1
stroke="#d9d9d9"
>
<path
d="M55 12.76L44.854 1.258C44.367.474 43.656 0 42.907 0H21.093c-.749 0-1.46.474-1.947 1.257L9 12.761V22h46v-9.24z"
d="M55 12.8 44.9 1.3Q44 0 42.9 0H21.1q-1.2 0-2 1.3L9 12.8V22h46z"
/>
<path
d="M41.613 15.931c0-1.605.994-2.93 2.227-2.931H55v18.137C55 33.26 53.68 35 52.05 35h-40.1C10.32 35 9 33.259 9 31.137V13h11.16c1.233 0 2.227 1.323 2.227 2.928v.022c0 1.605 1.005 2.901 2.237 2.901h14.752c1.232 0 2.237-1.308 2.237-2.913v-.007z"
d="M41.6 16c0-1.7 1-3 2.2-3H55v18.1c0 2.2-1.3 3.9-3 3.9H12c-1.7 0-3-1.7-3-3.9V13h11.2c1.2 0 2.2 1.3 2.2 3s1 2.9 2.2 2.9h14.8c1.2 0 2.2-1.4 2.2-3"
fill="#fafafa"
/>
</g>
@@ -4988,10 +4986,10 @@ exports[`renders components/cascader/demo/variant.tsx extend context correctly 1
stroke="#d9d9d9"
>
<path
d="M55 12.76L44.854 1.258C44.367.474 43.656 0 42.907 0H21.093c-.749 0-1.46.474-1.947 1.257L9 12.761V22h46v-9.24z"
d="M55 12.8 44.9 1.3Q44 0 42.9 0H21.1q-1.2 0-2 1.3L9 12.8V22h46z"
/>
<path
d="M41.613 15.931c0-1.605.994-2.93 2.227-2.931H55v18.137C55 33.26 53.68 35 52.05 35h-40.1C10.32 35 9 33.259 9 31.137V13h11.16c1.233 0 2.227 1.323 2.227 2.928v.022c0 1.605 1.005 2.901 2.237 2.901h14.752c1.232 0 2.237-1.308 2.237-2.913v-.007z"
d="M41.6 16c0-1.7 1-3 2.2-3H55v18.1c0 2.2-1.3 3.9-3 3.9H12c-1.7 0-3-1.7-3-3.9V13h11.2c1.2 0 2.2 1.3 2.2 3s1 2.9 2.2 2.9h14.8c1.2 0 2.2-1.4 2.2-3"
fill="#fafafa"
/>
</g>
@@ -5112,10 +5110,10 @@ exports[`renders components/cascader/demo/variant.tsx extend context correctly 1
stroke="#d9d9d9"
>
<path
d="M55 12.76L44.854 1.258C44.367.474 43.656 0 42.907 0H21.093c-.749 0-1.46.474-1.947 1.257L9 12.761V22h46v-9.24z"
d="M55 12.8 44.9 1.3Q44 0 42.9 0H21.1q-1.2 0-2 1.3L9 12.8V22h46z"
/>
<path
d="M41.613 15.931c0-1.605.994-2.93 2.227-2.931H55v18.137C55 33.26 53.68 35 52.05 35h-40.1C10.32 35 9 33.259 9 31.137V13h11.16c1.233 0 2.227 1.323 2.227 2.928v.022c0 1.605 1.005 2.901 2.237 2.901h14.752c1.232 0 2.237-1.308 2.237-2.913v-.007z"
d="M41.6 16c0-1.7 1-3 2.2-3H55v18.1c0 2.2-1.3 3.9-3 3.9H12c-1.7 0-3-1.7-3-3.9V13h11.2c1.2 0 2.2 1.3 2.2 3s1 2.9 2.2 2.9h14.8c1.2 0 2.2-1.4 2.2-3"
fill="#fafafa"
/>
</g>

File diff suppressed because it is too large Load Diff

View File

@@ -216,7 +216,6 @@ exports[`renders components/cascader/demo/custom-render.tsx correctly 1`] = `
>
<div
class="ant-select-content-value"
style="visibility:visible"
>
<span>
Zhejiang
@@ -320,7 +319,6 @@ exports[`renders components/cascader/demo/default-value.tsx correctly 1`] = `
>
<div
class="ant-select-content-value"
style="visibility:visible"
title="Zhejiang / Hangzhou / West Lake"
>
Zhejiang / Hangzhou / West Lake
@@ -899,10 +897,10 @@ exports[`renders components/cascader/demo/panel.tsx correctly 1`] = `
stroke="#d9d9d9"
>
<path
d="M55 12.76L44.854 1.258C44.367.474 43.656 0 42.907 0H21.093c-.749 0-1.46.474-1.947 1.257L9 12.761V22h46v-9.24z"
d="M55 12.8 44.9 1.3Q44 0 42.9 0H21.1q-1.2 0-2 1.3L9 12.8V22h46z"
/>
<path
d="M41.613 15.931c0-1.605.994-2.93 2.227-2.931H55v18.137C55 33.26 53.68 35 52.05 35h-40.1C10.32 35 9 33.259 9 31.137V13h11.16c1.233 0 2.227 1.323 2.227 2.928v.022c0 1.605 1.005 2.901 2.237 2.901h14.752c1.232 0 2.237-1.308 2.237-2.913v-.007z"
d="M41.6 16c0-1.7 1-3 2.2-3H55v18.1c0 2.2-1.3 3.9-3 3.9H12c-1.7 0-3-1.7-3-3.9V13h11.2c1.2 0 2.2 1.3 2.2 3s1 2.9 2.2 2.9h14.8c1.2 0 2.2-1.4 2.2-3"
fill="#fafafa"
/>
</g>

View File

@@ -1165,7 +1165,6 @@ exports[`Cascader popup correctly with defaultValue RTL 1`] = `
>
<div
class="ant-select-content-value"
style="visibility: visible;"
title="Zhejiang / Hangzhou"
>
Zhejiang / Hangzhou
@@ -1343,10 +1342,10 @@ exports[`Cascader should render not found content 1`] = `
stroke="#d9d9d9"
>
<path
d="M55 12.76L44.854 1.258C44.367.474 43.656 0 42.907 0H21.093c-.749 0-1.46.474-1.947 1.257L9 12.761V22h46v-9.24z"
d="M55 12.8 44.9 1.3Q44 0 42.9 0H21.1q-1.2 0-2 1.3L9 12.8V22h46z"
/>
<path
d="M41.613 15.931c0-1.605.994-2.93 2.227-2.931H55v18.137C55 33.26 53.68 35 52.05 35h-40.1C10.32 35 9 33.259 9 31.137V13h11.16c1.233 0 2.227 1.323 2.227 2.928v.022c0 1.605 1.005 2.901 2.237 2.901h14.752c1.232 0 2.237-1.308 2.237-2.913v-.007z"
d="M41.6 16c0-1.7 1-3 2.2-3H55v18.1c0 2.2-1.3 3.9-3 3.9H12c-1.7 0-3-1.7-3-3.9V13h11.2c1.2 0 2.2 1.3 2.2 3s1 2.9 2.2 2.9h14.8c1.2 0 2.2-1.4 2.2-3"
fill="#fafafa"
/>
</g>
@@ -1421,10 +1420,10 @@ exports[`Cascader should show not found content when options.length is 0 1`] = `
stroke="#d9d9d9"
>
<path
d="M55 12.76L44.854 1.258C44.367.474 43.656 0 42.907 0H21.093c-.749 0-1.46.474-1.947 1.257L9 12.761V22h46v-9.24z"
d="M55 12.8 44.9 1.3Q44 0 42.9 0H21.1q-1.2 0-2 1.3L9 12.8V22h46z"
/>
<path
d="M41.613 15.931c0-1.605.994-2.93 2.227-2.931H55v18.137C55 33.26 53.68 35 52.05 35h-40.1C10.32 35 9 33.259 9 31.137V13h11.16c1.233 0 2.227 1.323 2.227 2.928v.022c0 1.605 1.005 2.901 2.237 2.901h14.752c1.232 0 2.237-1.308 2.237-2.913v-.007z"
d="M41.6 16c0-1.7 1-3 2.2-3H55v18.1c0 2.2-1.3 3.9-3 3.9H12c-1.7 0-3-1.7-3-3.9V13h11.2c1.2 0 2.2 1.3 2.2 3s1 2.9 2.2 2.9h14.8c1.2 0 2.2-1.4 2.2-3"
fill="#fafafa"
/>
</g>
@@ -1454,7 +1453,6 @@ exports[`Cascader support controlled mode 1`] = `
>
<div
class="ant-select-content-value"
style="visibility: visible;"
title="Zhejiang / Hangzhou / West Lake"
>
Zhejiang / Hangzhou / West Lake

View File

@@ -0,0 +1,3 @@
import { createPostFn, semanticDemoTest } from '../../../tests/shared/demoTest';
semanticDemoTest('cascader', { postRenderFn: createPostFn(['Multiple']) });

View File

@@ -40,7 +40,10 @@ const App: React.FC = () => {
prefix="prefix"
style={{ width: 200 }}
options={options}
multipleProps={{ multiple: true }}
multipleProps={{
multiple: true,
defaultValue: [['contributors', 'thinkasany']],
}}
/>
);
};

View File

@@ -0,0 +1,338 @@
// Jest Snapshot v1, https://jestjs.io/docs/snapshot-testing
exports[`renders components/checkbox/demo/_semantic.tsx correctly 1`] = `
<div
class="acss-1ucck97"
>
<div
class="ant-row css-var-test-id"
>
<div
class="ant-col ant-col-16 acss-my3sst css-var-test-id"
>
<label
class="ant-checkbox-wrapper semantic-mark-root css-var-test-id ant-checkbox-css-var"
>
<span
class="ant-checkbox semantic-mark-icon ant-wave-target"
>
<input
class="ant-checkbox-input"
type="checkbox"
/>
<span
class="ant-checkbox-inner"
/>
</span>
<span
class="ant-checkbox-label semantic-mark-label"
>
Checkbox
</span>
</label>
</div>
<div
class="ant-col ant-col-8 css-var-test-id"
>
<ul
class="acss-1ry21g5"
>
<li
class="acss-1ehfz5v"
>
<div
class="ant-flex css-var-test-id ant-flex-align-stretch ant-flex-gap-small ant-flex-vertical"
>
<div
class="ant-flex css-var-test-id ant-flex-align-center ant-flex-justify-space-between ant-flex-gap-small"
>
<div
class="ant-flex css-var-test-id ant-flex-align-center ant-flex-gap-small"
>
<h5
class="ant-typography css-var-test-id"
style="margin: 0px;"
>
root
</h5>
<span
class="ant-tag ant-tag-filled ant-tag-blue css-var-test-id"
>
6.0.0
</span>
</div>
<div
class="ant-flex css-var-test-id ant-flex-align-center ant-flex-gap-small"
>
<button
aria-hidden="true"
class="ant-btn css-var-test-id ant-btn-default ant-btn-color-default ant-btn-variant-text ant-btn-sm ant-btn-icon-only"
type="button"
>
<span
class="ant-btn-icon"
>
<span
aria-label="pushpin"
class="anticon anticon-pushpin"
role="img"
>
<svg
aria-hidden="true"
data-icon="pushpin"
fill="currentColor"
focusable="false"
height="1em"
viewBox="64 64 896 896"
width="1em"
>
<path
d="M878.3 392.1L631.9 145.7c-6.5-6.5-15-9.7-23.5-9.7s-17 3.2-23.5 9.7L423.8 306.9c-12.2-1.4-24.5-2-36.8-2-73.2 0-146.4 24.1-206.5 72.3a33.23 33.23 0 00-2.7 49.4l181.7 181.7-215.4 215.2a15.8 15.8 0 00-4.6 9.8l-3.4 37.2c-.9 9.4 6.6 17.4 15.9 17.4.5 0 1 0 1.5-.1l37.2-3.4c3.7-.3 7.2-2 9.8-4.6l215.4-215.4 181.7 181.7c6.5 6.5 15 9.7 23.5 9.7 9.7 0 19.3-4.2 25.9-12.4 56.3-70.3 79.7-158.3 70.2-243.4l161.1-161.1c12.9-12.8 12.9-33.8 0-46.8zM666.2 549.3l-24.5 24.5 3.8 34.4a259.92 259.92 0 01-30.4 153.9L262 408.8c12.9-7.1 26.3-13.1 40.3-17.9 27.2-9.4 55.7-14.1 84.7-14.1 9.6 0 19.3.5 28.9 1.6l34.4 3.8 24.5-24.5L608.5 224 800 415.5 666.2 549.3z"
/>
</svg>
</span>
</span>
</button>
<button
aria-hidden="true"
class="ant-btn css-var-test-id ant-btn-text ant-btn-color-default ant-btn-variant-text ant-btn-sm ant-btn-icon-only"
type="button"
>
<span
class="ant-btn-icon"
>
<span
aria-label="info-circle"
class="anticon anticon-info-circle"
role="img"
>
<svg
aria-hidden="true"
data-icon="info-circle"
fill="currentColor"
focusable="false"
height="1em"
viewBox="64 64 896 896"
width="1em"
>
<path
d="M512 64C264.6 64 64 264.6 64 512s200.6 448 448 448 448-200.6 448-448S759.4 64 512 64zm0 820c-205.4 0-372-166.6-372-372s166.6-372 372-372 372 166.6 372 372-166.6 372-372 372z"
/>
<path
d="M464 336a48 48 0 1096 0 48 48 0 10-96 0zm72 112h-48c-4.4 0-8 3.6-8 8v272c0 4.4 3.6 8 8 8h48c4.4 0 8-3.6 8-8V456c0-4.4-3.6-8-8-8z"
/>
</svg>
</span>
</span>
</button>
</div>
</div>
<div
class="ant-typography css-var-test-id"
style="margin: 0px; font-size: 12px;"
>
根元素,包含行内 flex 布局、基线对齐、光标样式、重置样式等复选框容器的基础样式
</div>
</div>
</li>
<li
class="acss-1ehfz5v"
>
<div
class="ant-flex css-var-test-id ant-flex-align-stretch ant-flex-gap-small ant-flex-vertical"
>
<div
class="ant-flex css-var-test-id ant-flex-align-center ant-flex-justify-space-between ant-flex-gap-small"
>
<div
class="ant-flex css-var-test-id ant-flex-align-center ant-flex-gap-small"
>
<h5
class="ant-typography css-var-test-id"
style="margin: 0px;"
>
icon
</h5>
<span
class="ant-tag ant-tag-filled ant-tag-blue css-var-test-id"
>
6.0.0
</span>
</div>
<div
class="ant-flex css-var-test-id ant-flex-align-center ant-flex-gap-small"
>
<button
aria-hidden="true"
class="ant-btn css-var-test-id ant-btn-default ant-btn-color-default ant-btn-variant-text ant-btn-sm ant-btn-icon-only"
type="button"
>
<span
class="ant-btn-icon"
>
<span
aria-label="pushpin"
class="anticon anticon-pushpin"
role="img"
>
<svg
aria-hidden="true"
data-icon="pushpin"
fill="currentColor"
focusable="false"
height="1em"
viewBox="64 64 896 896"
width="1em"
>
<path
d="M878.3 392.1L631.9 145.7c-6.5-6.5-15-9.7-23.5-9.7s-17 3.2-23.5 9.7L423.8 306.9c-12.2-1.4-24.5-2-36.8-2-73.2 0-146.4 24.1-206.5 72.3a33.23 33.23 0 00-2.7 49.4l181.7 181.7-215.4 215.2a15.8 15.8 0 00-4.6 9.8l-3.4 37.2c-.9 9.4 6.6 17.4 15.9 17.4.5 0 1 0 1.5-.1l37.2-3.4c3.7-.3 7.2-2 9.8-4.6l215.4-215.4 181.7 181.7c6.5 6.5 15 9.7 23.5 9.7 9.7 0 19.3-4.2 25.9-12.4 56.3-70.3 79.7-158.3 70.2-243.4l161.1-161.1c12.9-12.8 12.9-33.8 0-46.8zM666.2 549.3l-24.5 24.5 3.8 34.4a259.92 259.92 0 01-30.4 153.9L262 408.8c12.9-7.1 26.3-13.1 40.3-17.9 27.2-9.4 55.7-14.1 84.7-14.1 9.6 0 19.3.5 28.9 1.6l34.4 3.8 24.5-24.5L608.5 224 800 415.5 666.2 549.3z"
/>
</svg>
</span>
</span>
</button>
<button
aria-hidden="true"
class="ant-btn css-var-test-id ant-btn-text ant-btn-color-default ant-btn-variant-text ant-btn-sm ant-btn-icon-only"
type="button"
>
<span
class="ant-btn-icon"
>
<span
aria-label="info-circle"
class="anticon anticon-info-circle"
role="img"
>
<svg
aria-hidden="true"
data-icon="info-circle"
fill="currentColor"
focusable="false"
height="1em"
viewBox="64 64 896 896"
width="1em"
>
<path
d="M512 64C264.6 64 64 264.6 64 512s200.6 448 448 448 448-200.6 448-448S759.4 64 512 64zm0 820c-205.4 0-372-166.6-372-372s166.6-372 372-372 372 166.6 372 372-166.6 372-372 372z"
/>
<path
d="M464 336a48 48 0 1096 0 48 48 0 10-96 0zm72 112h-48c-4.4 0-8 3.6-8 8v272c0 4.4 3.6 8 8 8h48c4.4 0 8-3.6 8-8V456c0-4.4-3.6-8-8-8z"
/>
</svg>
</span>
</span>
</button>
</div>
</div>
<div
class="ant-typography css-var-test-id"
style="margin: 0px; font-size: 12px;"
>
选中框元素,包含尺寸、方向、背景色、边框、圆角、过渡动画,以及选中状态的勾选标记样式
</div>
</div>
</li>
<li
class="acss-1ehfz5v"
>
<div
class="ant-flex css-var-test-id ant-flex-align-stretch ant-flex-gap-small ant-flex-vertical"
>
<div
class="ant-flex css-var-test-id ant-flex-align-center ant-flex-justify-space-between ant-flex-gap-small"
>
<div
class="ant-flex css-var-test-id ant-flex-align-center ant-flex-gap-small"
>
<h5
class="ant-typography css-var-test-id"
style="margin: 0px;"
>
label
</h5>
<span
class="ant-tag ant-tag-filled ant-tag-blue css-var-test-id"
>
6.0.0
</span>
</div>
<div
class="ant-flex css-var-test-id ant-flex-align-center ant-flex-gap-small"
>
<button
aria-hidden="true"
class="ant-btn css-var-test-id ant-btn-default ant-btn-color-default ant-btn-variant-text ant-btn-sm ant-btn-icon-only"
type="button"
>
<span
class="ant-btn-icon"
>
<span
aria-label="pushpin"
class="anticon anticon-pushpin"
role="img"
>
<svg
aria-hidden="true"
data-icon="pushpin"
fill="currentColor"
focusable="false"
height="1em"
viewBox="64 64 896 896"
width="1em"
>
<path
d="M878.3 392.1L631.9 145.7c-6.5-6.5-15-9.7-23.5-9.7s-17 3.2-23.5 9.7L423.8 306.9c-12.2-1.4-24.5-2-36.8-2-73.2 0-146.4 24.1-206.5 72.3a33.23 33.23 0 00-2.7 49.4l181.7 181.7-215.4 215.2a15.8 15.8 0 00-4.6 9.8l-3.4 37.2c-.9 9.4 6.6 17.4 15.9 17.4.5 0 1 0 1.5-.1l37.2-3.4c3.7-.3 7.2-2 9.8-4.6l215.4-215.4 181.7 181.7c6.5 6.5 15 9.7 23.5 9.7 9.7 0 19.3-4.2 25.9-12.4 56.3-70.3 79.7-158.3 70.2-243.4l161.1-161.1c12.9-12.8 12.9-33.8 0-46.8zM666.2 549.3l-24.5 24.5 3.8 34.4a259.92 259.92 0 01-30.4 153.9L262 408.8c12.9-7.1 26.3-13.1 40.3-17.9 27.2-9.4 55.7-14.1 84.7-14.1 9.6 0 19.3.5 28.9 1.6l34.4 3.8 24.5-24.5L608.5 224 800 415.5 666.2 549.3z"
/>
</svg>
</span>
</span>
</button>
<button
aria-hidden="true"
class="ant-btn css-var-test-id ant-btn-text ant-btn-color-default ant-btn-variant-text ant-btn-sm ant-btn-icon-only"
type="button"
>
<span
class="ant-btn-icon"
>
<span
aria-label="info-circle"
class="anticon anticon-info-circle"
role="img"
>
<svg
aria-hidden="true"
data-icon="info-circle"
fill="currentColor"
focusable="false"
height="1em"
viewBox="64 64 896 896"
width="1em"
>
<path
d="M512 64C264.6 64 64 264.6 64 512s200.6 448 448 448 448-200.6 448-448S759.4 64 512 64zm0 820c-205.4 0-372-166.6-372-372s166.6-372 372-372 372 166.6 372 372-166.6 372-372 372z"
/>
<path
d="M464 336a48 48 0 1096 0 48 48 0 10-96 0zm72 112h-48c-4.4 0-8 3.6-8 8v272c0 4.4 3.6 8 8 8h48c4.4 0 8-3.6 8-8V456c0-4.4-3.6-8-8-8z"
/>
</svg>
</span>
</span>
</button>
</div>
</div>
<div
class="ant-typography css-var-test-id"
style="margin: 0px; font-size: 12px;"
>
文本元素,包含文本的内边距和与复选框的间距样式
</div>
</div>
</li>
</ul>
</div>
</div>
</div>
`;

View File

@@ -0,0 +1,3 @@
import { semanticDemoTest } from '../../../tests/shared/demoTest';
semanticDemoTest('checkbox');

View File

@@ -164,11 +164,8 @@ const Collapse = React.forwardRef<HTMLDivElement, CollapseProps>((props, ref) =>
aria-label={panelProps.isActive ? 'expanded' : 'collapsed'}
/>
);
return cloneElement(icon, () => ({
className: clsx(
(icon as React.ReactElement<{ className?: string }>)?.props?.className,
`${prefixCls}-arrow`,
),
return cloneElement(icon, (oriProps) => ({
className: clsx(oriProps.className, `${prefixCls}-arrow`),
}));
},
[mergedExpandIcon, prefixCls, direction],

View File

@@ -1102,7 +1102,6 @@ Array [
>
<div
class="ant-select-content-value"
style="visibility: visible;"
title="start"
>
start

View File

@@ -0,0 +1,574 @@
// Jest Snapshot v1, https://jestjs.io/docs/snapshot-testing
exports[`renders components/collapse/demo/_semantic.tsx correctly 1`] = `
<div
class="acss-1ucck97"
>
<div
class="ant-row css-var-test-id"
>
<div
class="ant-col ant-col-16 acss-my3sst css-var-test-id"
>
<div
style="position: absolute; inset: 0; margin: 32px;"
>
<div
class="ant-collapse ant-collapse-icon-placement-start css-var-test-id semantic-mark-root"
>
<div
class="ant-collapse-item ant-collapse-item-active"
>
<div
aria-disabled="false"
aria-expanded="true"
class="ant-collapse-header semantic-mark-header"
role="button"
tabindex="0"
>
<div
class="ant-collapse-expand-icon semantic-mark-icon"
>
<span
aria-label="expanded"
class="anticon anticon-right ant-collapse-arrow"
role="img"
>
<svg
aria-hidden="true"
data-icon="right"
fill="currentColor"
focusable="false"
height="1em"
style="transform: rotate(90deg);"
viewBox="64 64 896 896"
width="1em"
>
<path
d="M765.7 486.8L314.9 134.7A7.97 7.97 0 00302 141v77.3c0 4.9 2.3 9.6 6.1 12.6l360 281.1-360 281.1c-3.9 3-6.1 7.7-6.1 12.6V883c0 6.7 7.7 10.4 12.9 6.3l450.8-352.1a31.96 31.96 0 000-50.4z"
/>
</svg>
</span>
</div>
<span
class="ant-collapse-title semantic-mark-title"
>
This is panel header
</span>
</div>
<div
class="ant-collapse-panel ant-collapse-panel-active"
>
<div
class="ant-collapse-body semantic-mark-body"
>
<p>
This is panel body
</p>
</div>
</div>
</div>
</div>
</div>
</div>
<div
class="ant-col ant-col-8 css-var-test-id"
>
<ul
class="acss-1ry21g5"
>
<li
class="acss-1ehfz5v"
>
<div
class="ant-flex css-var-test-id ant-flex-align-stretch ant-flex-gap-small ant-flex-vertical"
>
<div
class="ant-flex css-var-test-id ant-flex-align-center ant-flex-justify-space-between ant-flex-gap-small"
>
<div
class="ant-flex css-var-test-id ant-flex-align-center ant-flex-gap-small"
>
<h5
class="ant-typography css-var-test-id"
style="margin: 0px;"
>
root
</h5>
<span
class="ant-tag ant-tag-filled ant-tag-blue css-var-test-id"
>
6.0.0
</span>
</div>
<div
class="ant-flex css-var-test-id ant-flex-align-center ant-flex-gap-small"
>
<button
aria-hidden="true"
class="ant-btn css-var-test-id ant-btn-default ant-btn-color-default ant-btn-variant-text ant-btn-sm ant-btn-icon-only"
type="button"
>
<span
class="ant-btn-icon"
>
<span
aria-label="pushpin"
class="anticon anticon-pushpin"
role="img"
>
<svg
aria-hidden="true"
data-icon="pushpin"
fill="currentColor"
focusable="false"
height="1em"
viewBox="64 64 896 896"
width="1em"
>
<path
d="M878.3 392.1L631.9 145.7c-6.5-6.5-15-9.7-23.5-9.7s-17 3.2-23.5 9.7L423.8 306.9c-12.2-1.4-24.5-2-36.8-2-73.2 0-146.4 24.1-206.5 72.3a33.23 33.23 0 00-2.7 49.4l181.7 181.7-215.4 215.2a15.8 15.8 0 00-4.6 9.8l-3.4 37.2c-.9 9.4 6.6 17.4 15.9 17.4.5 0 1 0 1.5-.1l37.2-3.4c3.7-.3 7.2-2 9.8-4.6l215.4-215.4 181.7 181.7c6.5 6.5 15 9.7 23.5 9.7 9.7 0 19.3-4.2 25.9-12.4 56.3-70.3 79.7-158.3 70.2-243.4l161.1-161.1c12.9-12.8 12.9-33.8 0-46.8zM666.2 549.3l-24.5 24.5 3.8 34.4a259.92 259.92 0 01-30.4 153.9L262 408.8c12.9-7.1 26.3-13.1 40.3-17.9 27.2-9.4 55.7-14.1 84.7-14.1 9.6 0 19.3.5 28.9 1.6l34.4 3.8 24.5-24.5L608.5 224 800 415.5 666.2 549.3z"
/>
</svg>
</span>
</span>
</button>
<button
aria-hidden="true"
class="ant-btn css-var-test-id ant-btn-text ant-btn-color-default ant-btn-variant-text ant-btn-sm ant-btn-icon-only"
type="button"
>
<span
class="ant-btn-icon"
>
<span
aria-label="info-circle"
class="anticon anticon-info-circle"
role="img"
>
<svg
aria-hidden="true"
data-icon="info-circle"
fill="currentColor"
focusable="false"
height="1em"
viewBox="64 64 896 896"
width="1em"
>
<path
d="M512 64C264.6 64 64 264.6 64 512s200.6 448 448 448 448-200.6 448-448S759.4 64 512 64zm0 820c-205.4 0-372-166.6-372-372s166.6-372 372-372 372 166.6 372 372-166.6 372-372 372z"
/>
<path
d="M464 336a48 48 0 1096 0 48 48 0 10-96 0zm72 112h-48c-4.4 0-8 3.6-8 8v272c0 4.4 3.6 8 8 8h48c4.4 0 8-3.6 8-8V456c0-4.4-3.6-8-8-8z"
/>
</svg>
</span>
</span>
</button>
</div>
</div>
<div
class="ant-typography css-var-test-id"
style="margin: 0px; font-size: 12px;"
>
根元素,包含折叠面板的边框、圆角、背景色等容器样式,控制面板的整体布局和外观
</div>
</div>
</li>
<li
class="acss-1ehfz5v"
>
<div
class="ant-flex css-var-test-id ant-flex-align-stretch ant-flex-gap-small ant-flex-vertical"
>
<div
class="ant-flex css-var-test-id ant-flex-align-center ant-flex-justify-space-between ant-flex-gap-small"
>
<div
class="ant-flex css-var-test-id ant-flex-align-center ant-flex-gap-small"
>
<h5
class="ant-typography css-var-test-id"
style="margin: 0px;"
>
header
</h5>
<span
class="ant-tag ant-tag-filled ant-tag-blue css-var-test-id"
>
5.21.0
</span>
</div>
<div
class="ant-flex css-var-test-id ant-flex-align-center ant-flex-gap-small"
>
<button
aria-hidden="true"
class="ant-btn css-var-test-id ant-btn-default ant-btn-color-default ant-btn-variant-text ant-btn-sm ant-btn-icon-only"
type="button"
>
<span
class="ant-btn-icon"
>
<span
aria-label="pushpin"
class="anticon anticon-pushpin"
role="img"
>
<svg
aria-hidden="true"
data-icon="pushpin"
fill="currentColor"
focusable="false"
height="1em"
viewBox="64 64 896 896"
width="1em"
>
<path
d="M878.3 392.1L631.9 145.7c-6.5-6.5-15-9.7-23.5-9.7s-17 3.2-23.5 9.7L423.8 306.9c-12.2-1.4-24.5-2-36.8-2-73.2 0-146.4 24.1-206.5 72.3a33.23 33.23 0 00-2.7 49.4l181.7 181.7-215.4 215.2a15.8 15.8 0 00-4.6 9.8l-3.4 37.2c-.9 9.4 6.6 17.4 15.9 17.4.5 0 1 0 1.5-.1l37.2-3.4c3.7-.3 7.2-2 9.8-4.6l215.4-215.4 181.7 181.7c6.5 6.5 15 9.7 23.5 9.7 9.7 0 19.3-4.2 25.9-12.4 56.3-70.3 79.7-158.3 70.2-243.4l161.1-161.1c12.9-12.8 12.9-33.8 0-46.8zM666.2 549.3l-24.5 24.5 3.8 34.4a259.92 259.92 0 01-30.4 153.9L262 408.8c12.9-7.1 26.3-13.1 40.3-17.9 27.2-9.4 55.7-14.1 84.7-14.1 9.6 0 19.3.5 28.9 1.6l34.4 3.8 24.5-24.5L608.5 224 800 415.5 666.2 549.3z"
/>
</svg>
</span>
</span>
</button>
<button
aria-hidden="true"
class="ant-btn css-var-test-id ant-btn-text ant-btn-color-default ant-btn-variant-text ant-btn-sm ant-btn-icon-only"
type="button"
>
<span
class="ant-btn-icon"
>
<span
aria-label="info-circle"
class="anticon anticon-info-circle"
role="img"
>
<svg
aria-hidden="true"
data-icon="info-circle"
fill="currentColor"
focusable="false"
height="1em"
viewBox="64 64 896 896"
width="1em"
>
<path
d="M512 64C264.6 64 64 264.6 64 512s200.6 448 448 448 448-200.6 448-448S759.4 64 512 64zm0 820c-205.4 0-372-166.6-372-372s166.6-372 372-372 372 166.6 372 372-166.6 372-372 372z"
/>
<path
d="M464 336a48 48 0 1096 0 48 48 0 10-96 0zm72 112h-48c-4.4 0-8 3.6-8 8v272c0 4.4 3.6 8 8 8h48c4.4 0 8-3.6 8-8V456c0-4.4-3.6-8-8-8z"
/>
</svg>
</span>
</span>
</button>
</div>
</div>
<div
class="ant-typography css-var-test-id"
style="margin: 0px; font-size: 12px;"
>
头部元素包含flex布局、内边距、颜色、行高、光标样式、过渡动画等面板头部的交互和样式
</div>
</div>
</li>
<li
class="acss-1ehfz5v"
>
<div
class="ant-flex css-var-test-id ant-flex-align-stretch ant-flex-gap-small ant-flex-vertical"
>
<div
class="ant-flex css-var-test-id ant-flex-align-center ant-flex-justify-space-between ant-flex-gap-small"
>
<div
class="ant-flex css-var-test-id ant-flex-align-center ant-flex-gap-small"
>
<h5
class="ant-typography css-var-test-id"
style="margin: 0px;"
>
icon
</h5>
<span
class="ant-tag ant-tag-filled ant-tag-blue css-var-test-id"
>
6.0.0
</span>
</div>
<div
class="ant-flex css-var-test-id ant-flex-align-center ant-flex-gap-small"
>
<button
aria-hidden="true"
class="ant-btn css-var-test-id ant-btn-default ant-btn-color-default ant-btn-variant-text ant-btn-sm ant-btn-icon-only"
type="button"
>
<span
class="ant-btn-icon"
>
<span
aria-label="pushpin"
class="anticon anticon-pushpin"
role="img"
>
<svg
aria-hidden="true"
data-icon="pushpin"
fill="currentColor"
focusable="false"
height="1em"
viewBox="64 64 896 896"
width="1em"
>
<path
d="M878.3 392.1L631.9 145.7c-6.5-6.5-15-9.7-23.5-9.7s-17 3.2-23.5 9.7L423.8 306.9c-12.2-1.4-24.5-2-36.8-2-73.2 0-146.4 24.1-206.5 72.3a33.23 33.23 0 00-2.7 49.4l181.7 181.7-215.4 215.2a15.8 15.8 0 00-4.6 9.8l-3.4 37.2c-.9 9.4 6.6 17.4 15.9 17.4.5 0 1 0 1.5-.1l37.2-3.4c3.7-.3 7.2-2 9.8-4.6l215.4-215.4 181.7 181.7c6.5 6.5 15 9.7 23.5 9.7 9.7 0 19.3-4.2 25.9-12.4 56.3-70.3 79.7-158.3 70.2-243.4l161.1-161.1c12.9-12.8 12.9-33.8 0-46.8zM666.2 549.3l-24.5 24.5 3.8 34.4a259.92 259.92 0 01-30.4 153.9L262 408.8c12.9-7.1 26.3-13.1 40.3-17.9 27.2-9.4 55.7-14.1 84.7-14.1 9.6 0 19.3.5 28.9 1.6l34.4 3.8 24.5-24.5L608.5 224 800 415.5 666.2 549.3z"
/>
</svg>
</span>
</span>
</button>
<button
aria-hidden="true"
class="ant-btn css-var-test-id ant-btn-text ant-btn-color-default ant-btn-variant-text ant-btn-sm ant-btn-icon-only"
type="button"
>
<span
class="ant-btn-icon"
>
<span
aria-label="info-circle"
class="anticon anticon-info-circle"
role="img"
>
<svg
aria-hidden="true"
data-icon="info-circle"
fill="currentColor"
focusable="false"
height="1em"
viewBox="64 64 896 896"
width="1em"
>
<path
d="M512 64C264.6 64 64 264.6 64 512s200.6 448 448 448 448-200.6 448-448S759.4 64 512 64zm0 820c-205.4 0-372-166.6-372-372s166.6-372 372-372 372 166.6 372 372-166.6 372-372 372z"
/>
<path
d="M464 336a48 48 0 1096 0 48 48 0 10-96 0zm72 112h-48c-4.4 0-8 3.6-8 8v272c0 4.4 3.6 8 8 8h48c4.4 0 8-3.6 8-8V456c0-4.4-3.6-8-8-8z"
/>
</svg>
</span>
</span>
</button>
</div>
</div>
<div
class="ant-typography css-var-test-id"
style="margin: 0px; font-size: 12px;"
>
图标元素,包含字体大小、过渡动画、旋转变换等展开收起箭头的样式和动效
</div>
</div>
</li>
<li
class="acss-1ehfz5v"
>
<div
class="ant-flex css-var-test-id ant-flex-align-stretch ant-flex-gap-small ant-flex-vertical"
>
<div
class="ant-flex css-var-test-id ant-flex-align-center ant-flex-justify-space-between ant-flex-gap-small"
>
<div
class="ant-flex css-var-test-id ant-flex-align-center ant-flex-gap-small"
>
<h5
class="ant-typography css-var-test-id"
style="margin: 0px;"
>
title
</h5>
<span
class="ant-tag ant-tag-filled ant-tag-blue css-var-test-id"
>
6.0.0
</span>
</div>
<div
class="ant-flex css-var-test-id ant-flex-align-center ant-flex-gap-small"
>
<button
aria-hidden="true"
class="ant-btn css-var-test-id ant-btn-default ant-btn-color-default ant-btn-variant-text ant-btn-sm ant-btn-icon-only"
type="button"
>
<span
class="ant-btn-icon"
>
<span
aria-label="pushpin"
class="anticon anticon-pushpin"
role="img"
>
<svg
aria-hidden="true"
data-icon="pushpin"
fill="currentColor"
focusable="false"
height="1em"
viewBox="64 64 896 896"
width="1em"
>
<path
d="M878.3 392.1L631.9 145.7c-6.5-6.5-15-9.7-23.5-9.7s-17 3.2-23.5 9.7L423.8 306.9c-12.2-1.4-24.5-2-36.8-2-73.2 0-146.4 24.1-206.5 72.3a33.23 33.23 0 00-2.7 49.4l181.7 181.7-215.4 215.2a15.8 15.8 0 00-4.6 9.8l-3.4 37.2c-.9 9.4 6.6 17.4 15.9 17.4.5 0 1 0 1.5-.1l37.2-3.4c3.7-.3 7.2-2 9.8-4.6l215.4-215.4 181.7 181.7c6.5 6.5 15 9.7 23.5 9.7 9.7 0 19.3-4.2 25.9-12.4 56.3-70.3 79.7-158.3 70.2-243.4l161.1-161.1c12.9-12.8 12.9-33.8 0-46.8zM666.2 549.3l-24.5 24.5 3.8 34.4a259.92 259.92 0 01-30.4 153.9L262 408.8c12.9-7.1 26.3-13.1 40.3-17.9 27.2-9.4 55.7-14.1 84.7-14.1 9.6 0 19.3.5 28.9 1.6l34.4 3.8 24.5-24.5L608.5 224 800 415.5 666.2 549.3z"
/>
</svg>
</span>
</span>
</button>
<button
aria-hidden="true"
class="ant-btn css-var-test-id ant-btn-text ant-btn-color-default ant-btn-variant-text ant-btn-sm ant-btn-icon-only"
type="button"
>
<span
class="ant-btn-icon"
>
<span
aria-label="info-circle"
class="anticon anticon-info-circle"
role="img"
>
<svg
aria-hidden="true"
data-icon="info-circle"
fill="currentColor"
focusable="false"
height="1em"
viewBox="64 64 896 896"
width="1em"
>
<path
d="M512 64C264.6 64 64 264.6 64 512s200.6 448 448 448 448-200.6 448-448S759.4 64 512 64zm0 820c-205.4 0-372-166.6-372-372s166.6-372 372-372 372 166.6 372 372-166.6 372-372 372z"
/>
<path
d="M464 336a48 48 0 1096 0 48 48 0 10-96 0zm72 112h-48c-4.4 0-8 3.6-8 8v272c0 4.4 3.6 8 8 8h48c4.4 0 8-3.6 8-8V456c0-4.4-3.6-8-8-8z"
/>
</svg>
</span>
</span>
</button>
</div>
</div>
<div
class="ant-typography css-var-test-id"
style="margin: 0px; font-size: 12px;"
>
标题元素包含flex自适应布局、右边距等标题文字的布局和排版样式
</div>
</div>
</li>
<li
class="acss-1ehfz5v"
>
<div
class="ant-flex css-var-test-id ant-flex-align-stretch ant-flex-gap-small ant-flex-vertical"
>
<div
class="ant-flex css-var-test-id ant-flex-align-center ant-flex-justify-space-between ant-flex-gap-small"
>
<div
class="ant-flex css-var-test-id ant-flex-align-center ant-flex-gap-small"
>
<h5
class="ant-typography css-var-test-id"
style="margin: 0px;"
>
body
</h5>
<span
class="ant-tag ant-tag-filled ant-tag-blue css-var-test-id"
>
5.21.0
</span>
</div>
<div
class="ant-flex css-var-test-id ant-flex-align-center ant-flex-gap-small"
>
<button
aria-hidden="true"
class="ant-btn css-var-test-id ant-btn-default ant-btn-color-default ant-btn-variant-text ant-btn-sm ant-btn-icon-only"
type="button"
>
<span
class="ant-btn-icon"
>
<span
aria-label="pushpin"
class="anticon anticon-pushpin"
role="img"
>
<svg
aria-hidden="true"
data-icon="pushpin"
fill="currentColor"
focusable="false"
height="1em"
viewBox="64 64 896 896"
width="1em"
>
<path
d="M878.3 392.1L631.9 145.7c-6.5-6.5-15-9.7-23.5-9.7s-17 3.2-23.5 9.7L423.8 306.9c-12.2-1.4-24.5-2-36.8-2-73.2 0-146.4 24.1-206.5 72.3a33.23 33.23 0 00-2.7 49.4l181.7 181.7-215.4 215.2a15.8 15.8 0 00-4.6 9.8l-3.4 37.2c-.9 9.4 6.6 17.4 15.9 17.4.5 0 1 0 1.5-.1l37.2-3.4c3.7-.3 7.2-2 9.8-4.6l215.4-215.4 181.7 181.7c6.5 6.5 15 9.7 23.5 9.7 9.7 0 19.3-4.2 25.9-12.4 56.3-70.3 79.7-158.3 70.2-243.4l161.1-161.1c12.9-12.8 12.9-33.8 0-46.8zM666.2 549.3l-24.5 24.5 3.8 34.4a259.92 259.92 0 01-30.4 153.9L262 408.8c12.9-7.1 26.3-13.1 40.3-17.9 27.2-9.4 55.7-14.1 84.7-14.1 9.6 0 19.3.5 28.9 1.6l34.4 3.8 24.5-24.5L608.5 224 800 415.5 666.2 549.3z"
/>
</svg>
</span>
</span>
</button>
<button
aria-hidden="true"
class="ant-btn css-var-test-id ant-btn-text ant-btn-color-default ant-btn-variant-text ant-btn-sm ant-btn-icon-only"
type="button"
>
<span
class="ant-btn-icon"
>
<span
aria-label="info-circle"
class="anticon anticon-info-circle"
role="img"
>
<svg
aria-hidden="true"
data-icon="info-circle"
fill="currentColor"
focusable="false"
height="1em"
viewBox="64 64 896 896"
width="1em"
>
<path
d="M512 64C264.6 64 64 264.6 64 512s200.6 448 448 448 448-200.6 448-448S759.4 64 512 64zm0 820c-205.4 0-372-166.6-372-372s166.6-372 372-372 372 166.6 372 372-166.6 372-372 372z"
/>
<path
d="M464 336a48 48 0 1096 0 48 48 0 10-96 0zm72 112h-48c-4.4 0-8 3.6-8 8v272c0 4.4 3.6 8 8 8h48c4.4 0 8-3.6 8-8V456c0-4.4-3.6-8-8-8z"
/>
</svg>
</span>
</span>
</button>
</div>
</div>
<div
class="ant-typography css-var-test-id"
style="margin: 0px; font-size: 12px;"
>
内容元素,包含内边距、颜色、背景色等面板内容区域的展示样式
</div>
</div>
</li>
</ul>
</div>
</div>
</div>
`;

View File

@@ -1090,7 +1090,6 @@ Array [
>
<div
class="ant-select-content-value"
style="visibility:visible"
title="start"
>
start

View File

@@ -0,0 +1,3 @@
import { semanticDemoTest } from '../../../tests/shared/demoTest';
semanticDemoTest('collapse');

View File

@@ -144,7 +144,6 @@ Array [
>
<div
class="ant-select-content-value"
style="visibility: visible;"
title="HEX"
>
HEX
@@ -518,7 +517,6 @@ Array [
>
<div
class="ant-select-content-value"
style="visibility: visible;"
title="HEX"
>
HEX
@@ -897,7 +895,6 @@ exports[`renders components/color-picker/demo/controlled.tsx extend context corr
>
<div
class="ant-select-content-value"
style="visibility: visible;"
title="HEX"
>
HEX
@@ -1268,7 +1265,6 @@ exports[`renders components/color-picker/demo/controlled.tsx extend context corr
>
<div
class="ant-select-content-value"
style="visibility: visible;"
title="HEX"
>
HEX
@@ -1648,7 +1644,6 @@ Array [
>
<div
class="ant-select-content-value"
style="visibility: visible;"
title="HEX"
>
HEX
@@ -2000,7 +1995,6 @@ Array [
>
<div
class="ant-select-content-value"
style="visibility: visible;"
title="HEX"
>
HEX
@@ -2314,7 +2308,6 @@ exports[`renders components/color-picker/demo/format.tsx extend context correctl
>
<div
class="ant-select-content-value"
style="visibility: visible;"
title="HEX"
>
HEX
@@ -2700,7 +2693,6 @@ exports[`renders components/color-picker/demo/format.tsx extend context correctl
>
<div
class="ant-select-content-value"
style="visibility: visible;"
title="HSB"
>
HSB
@@ -3292,7 +3284,6 @@ exports[`renders components/color-picker/demo/format.tsx extend context correctl
>
<div
class="ant-select-content-value"
style="visibility: visible;"
title="RGB"
>
RGB
@@ -3984,7 +3975,6 @@ exports[`renders components/color-picker/demo/line-gradient.tsx extend context c
>
<div
class="ant-select-content-value"
style="visibility: visible;"
title="HEX"
>
HEX
@@ -4409,7 +4399,6 @@ exports[`renders components/color-picker/demo/line-gradient.tsx extend context c
>
<div
class="ant-select-content-value"
style="visibility: visible;"
title="HEX"
>
HEX
@@ -4810,7 +4799,6 @@ exports[`renders components/color-picker/demo/panel-render.tsx extend context co
>
<div
class="ant-select-content-value"
style="visibility: visible;"
title="HEX"
>
HEX
@@ -5767,7 +5755,6 @@ exports[`renders components/color-picker/demo/panel-render.tsx extend context co
>
<div
class="ant-select-content-value"
style="visibility: visible;"
title="HEX"
>
HEX
@@ -6145,7 +6132,6 @@ Array [
>
<div
class="ant-select-content-value"
style="visibility: visible;"
title="HEX"
>
HEX
@@ -6948,7 +6934,6 @@ exports[`renders components/color-picker/demo/pure-panel.tsx extend context corr
>
<div
class="ant-select-content-value"
style="visibility: visible;"
title="HEX"
>
HEX
@@ -7334,7 +7319,6 @@ exports[`renders components/color-picker/demo/size.tsx extend context correctly
>
<div
class="ant-select-content-value"
style="visibility: visible;"
title="HEX"
>
HEX
@@ -7705,7 +7689,6 @@ exports[`renders components/color-picker/demo/size.tsx extend context correctly
>
<div
class="ant-select-content-value"
style="visibility: visible;"
title="HEX"
>
HEX
@@ -8076,7 +8059,6 @@ exports[`renders components/color-picker/demo/size.tsx extend context correctly
>
<div
class="ant-select-content-value"
style="visibility: visible;"
title="HEX"
>
HEX
@@ -8460,7 +8442,6 @@ exports[`renders components/color-picker/demo/size.tsx extend context correctly
>
<div
class="ant-select-content-value"
style="visibility: visible;"
title="HEX"
>
HEX
@@ -8836,7 +8817,6 @@ exports[`renders components/color-picker/demo/size.tsx extend context correctly
>
<div
class="ant-select-content-value"
style="visibility: visible;"
title="HEX"
>
HEX
@@ -9212,7 +9192,6 @@ exports[`renders components/color-picker/demo/size.tsx extend context correctly
>
<div
class="ant-select-content-value"
style="visibility: visible;"
title="HEX"
>
HEX
@@ -9590,7 +9569,6 @@ exports[`renders components/color-picker/demo/style-class.tsx extend context cor
>
<div
class="ant-select-content-value"
style="visibility: visible;"
title="HEX"
>
HEX
@@ -9957,7 +9935,6 @@ exports[`renders components/color-picker/demo/style-class.tsx extend context cor
>
<div
class="ant-select-content-value"
style="visibility: visible;"
title="HEX"
>
HEX
@@ -10350,7 +10327,6 @@ exports[`renders components/color-picker/demo/text-render.tsx extend context cor
>
<div
class="ant-select-content-value"
style="visibility: visible;"
title="HEX"
>
HEX
@@ -10728,7 +10704,6 @@ exports[`renders components/color-picker/demo/text-render.tsx extend context cor
>
<div
class="ant-select-content-value"
style="visibility: visible;"
title="HEX"
>
HEX
@@ -11123,7 +11098,6 @@ exports[`renders components/color-picker/demo/text-render.tsx extend context cor
>
<div
class="ant-select-content-value"
style="visibility: visible;"
title="HEX"
>
HEX
@@ -11495,7 +11469,6 @@ Array [
>
<div
class="ant-select-content-value"
style="visibility: visible;"
title="HEX"
>
HEX
@@ -11869,7 +11842,6 @@ Array [
>
<div
class="ant-select-content-value"
style="visibility: visible;"
title="HEX"
>
HEX

View File

@@ -0,0 +1,486 @@
// Jest Snapshot v1, https://jestjs.io/docs/snapshot-testing
exports[`renders components/color-picker/demo/_semantic.tsx correctly 1`] = `
<div
class="acss-1ucck97"
>
<div
class="ant-row css-var-test-id"
>
<div
class="ant-col ant-col-16 acss-my3sst css-var-test-id"
>
<div
style="height: 300px;"
>
<div
aria-describedby="test-id"
class="ant-color-picker-trigger semantic-mark-root css-var-test-id ant-color-picker-css-var ant-popover-open ant-color-picker-trigger-active"
>
<div
class="ant-color-picker-color-block"
>
<div
class="ant-color-picker-color-block-inner"
style="background: rgb(22, 119, 255);"
/>
</div>
</div>
<div
class="ant-popover ant-zoom-big-appear ant-zoom-big-appear-prepare ant-zoom-big ant-popover-css-var css-var-test-id css-var-test-id ant-color-picker semantic-mark-root css-var-test-id ant-color-picker-css-var semantic-mark-popup-root ant-popover-placement-bottomLeft"
style="--arrow-x: 0px; --arrow-y: 0px; left: -1000vw; top: -1000vh; right: auto; bottom: auto; box-sizing: border-box; z-index: 1;"
>
<div
class="ant-popover-arrow"
style="position: absolute;"
>
<span
class="ant-popover-arrow-content"
/>
</div>
<div
class="ant-popover-container"
id="test-id"
role="tooltip"
>
<div
class="ant-popover-content"
>
<div
class="ant-color-picker-inner"
>
<div
class="ant-color-picker-inner-content"
>
<div
class="ant-color-picker-panel"
>
<div
class="ant-color-picker-select"
>
<div
class="ant-color-picker-palette"
style="position: relative;"
>
<div
style="position: absolute; left: 91.37254901960785%; top: 0%; z-index: 1; transform: translate(-50%, -50%);"
>
<div
class="ant-color-picker-handler"
style="background-color: rgb(22, 119, 255);"
/>
</div>
<div
class="ant-color-picker-saturation"
style="background-color: rgb(0, 106, 255); background-image: linear-gradient(0deg, #000, transparent), linear-gradient(90deg, #fff, hsla(0, 0%, 100%, 0));"
/>
</div>
</div>
<div
class="ant-color-picker-slider-container"
>
<div
class="ant-color-picker-slider-group"
>
<div
class="ant-slider ant-color-picker-slider css-var-test-id ant-slider-horizontal"
>
<div
class="ant-slider-rail ant-color-picker-slider-rail"
style="background: linear-gradient(90deg, rgb(255, 0, 0) 0%, rgb(255, 255, 0) 17%, rgb(0, 255, 0) 33%, rgb(0, 255, 255) 50%, rgb(0, 0, 255) 67%, rgb(255, 0, 255) 83%, rgb(255, 0, 0) 100%);"
/>
<div
class="ant-slider-step"
/>
<div
aria-disabled="false"
aria-orientation="horizontal"
aria-valuemax="359"
aria-valuemin="0"
aria-valuenow="215"
class="ant-slider-handle ant-slider-handle-1 ant-color-picker-slider-handle"
role="slider"
style="left: 59.888579387186624%; transform: translateX(-50%); background: rgb(0, 106, 255);"
tabindex="0"
/>
</div>
<div
class="ant-slider ant-color-picker-slider css-var-test-id ant-slider-horizontal"
>
<div
class="ant-slider-rail ant-color-picker-slider-rail"
style="background: linear-gradient(90deg, rgba(255, 0, 4, 0) 0%, rgb(22,119,255) 100%);"
/>
<div
class="ant-slider-step"
/>
<div
aria-disabled="false"
aria-orientation="horizontal"
aria-valuemax="100"
aria-valuemin="0"
aria-valuenow="100"
class="ant-slider-handle ant-slider-handle-1 ant-color-picker-slider-handle"
role="slider"
style="left: 100%; transform: translateX(-50%); background: rgb(22, 119, 255);"
tabindex="0"
/>
</div>
</div>
<div
class="ant-color-picker-color-block"
>
<div
class="ant-color-picker-color-block-inner"
style="background: rgb(22, 119, 255);"
/>
</div>
</div>
</div>
<div
class="ant-color-picker-input-container"
>
<div
class="ant-select ant-select-sm ant-select-borderless ant-color-picker-format-select css-var-test-id ant-select-css-var ant-select-single ant-select-show-arrow"
>
<div
class="ant-select-content"
>
<div
class="ant-select-content-value"
title="HEX"
>
HEX
</div>
<input
aria-autocomplete="list"
aria-expanded="false"
aria-haspopup="listbox"
autocomplete="off"
class="ant-select-input"
id="test-id"
readonly=""
role="combobox"
type="search"
value=""
/>
</div>
<div
class="ant-select-suffix"
>
<span
aria-label="down"
class="anticon anticon-down"
role="img"
>
<svg
aria-hidden="true"
data-icon="down"
fill="currentColor"
focusable="false"
height="1em"
viewBox="64 64 896 896"
width="1em"
>
<path
d="M884 256h-75c-5.1 0-9.9 2.5-12.9 6.6L512 654.2 227.9 262.6c-3-4.1-7.8-6.6-12.9-6.6h-75c-6.5 0-10.3 7.4-6.5 12.7l352.6 486.1c12.8 17.6 39 17.6 51.7 0l352.6-486.1c3.9-5.3.1-12.7-6.4-12.7z"
/>
</svg>
</span>
</div>
</div>
<div
class="ant-color-picker-input"
>
<span
class="ant-input-affix-wrapper ant-input-affix-wrapper-sm ant-input-outlined ant-color-picker-hex-input css-var-test-id ant-input-css-var"
>
<span
class="ant-input-prefix"
>
#
</span>
<input
class="ant-input ant-input-sm"
type="text"
value="1677ff"
/>
</span>
</div>
<div
class="ant-input-number ant-input-number-mode-input css-var-test-id ant-input-number-css-var ant-color-picker-steppers ant-color-picker-alpha-input ant-input-number-outlined ant-input-number-sm"
>
<input
aria-valuemax="100"
aria-valuemin="0"
aria-valuenow="100"
autocomplete="off"
class="ant-input-number-input"
role="spinbutton"
step="1"
value="100%"
/>
<div
class="ant-input-number-actions"
>
<span
aria-disabled="true"
aria-label="Increase Value"
class="ant-input-number-action ant-input-number-action-up ant-input-number-action-up-disabled"
role="button"
unselectable="on"
>
<span
aria-label="up"
class="anticon anticon-up"
role="img"
>
<svg
aria-hidden="true"
data-icon="up"
fill="currentColor"
focusable="false"
height="1em"
viewBox="64 64 896 896"
width="1em"
>
<path
d="M890.5 755.3L537.9 269.2c-12.8-17.6-39-17.6-51.7 0L133.5 755.3A8 8 0 00140 768h75c5.1 0 9.9-2.5 12.9-6.6L512 369.8l284.1 391.6c3 4.1 7.8 6.6 12.9 6.6h75c6.5 0 10.3-7.4 6.5-12.7z"
/>
</svg>
</span>
</span>
<span
aria-disabled="false"
aria-label="Decrease Value"
class="ant-input-number-action ant-input-number-action-down"
role="button"
unselectable="on"
>
<span
aria-label="down"
class="anticon anticon-down"
role="img"
>
<svg
aria-hidden="true"
data-icon="down"
fill="currentColor"
focusable="false"
height="1em"
viewBox="64 64 896 896"
width="1em"
>
<path
d="M884 256h-75c-5.1 0-9.9 2.5-12.9 6.6L512 654.2 227.9 262.6c-3-4.1-7.8-6.6-12.9-6.6h-75c-6.5 0-10.3 7.4-6.5 12.7l352.6 486.1c12.8 17.6 39 17.6 51.7 0l352.6-486.1c3.9-5.3.1-12.7-6.4-12.7z"
/>
</svg>
</span>
</span>
</div>
</div>
</div>
</div>
</div>
</div>
</div>
</div>
</div>
</div>
<div
class="ant-col ant-col-8 css-var-test-id"
>
<ul
class="acss-1ry21g5"
>
<li
class="acss-1ehfz5v"
>
<div
class="ant-flex css-var-test-id ant-flex-align-stretch ant-flex-gap-small ant-flex-vertical"
>
<div
class="ant-flex css-var-test-id ant-flex-align-center ant-flex-justify-space-between ant-flex-gap-small"
>
<div
class="ant-flex css-var-test-id ant-flex-align-center ant-flex-gap-small"
>
<h5
class="ant-typography css-var-test-id"
style="margin: 0px;"
>
root
</h5>
</div>
<div
class="ant-flex css-var-test-id ant-flex-align-center ant-flex-gap-small"
>
<button
aria-hidden="true"
class="ant-btn css-var-test-id ant-btn-default ant-btn-color-default ant-btn-variant-text ant-btn-sm ant-btn-icon-only"
type="button"
>
<span
class="ant-btn-icon"
>
<span
aria-label="pushpin"
class="anticon anticon-pushpin"
role="img"
>
<svg
aria-hidden="true"
data-icon="pushpin"
fill="currentColor"
focusable="false"
height="1em"
viewBox="64 64 896 896"
width="1em"
>
<path
d="M878.3 392.1L631.9 145.7c-6.5-6.5-15-9.7-23.5-9.7s-17 3.2-23.5 9.7L423.8 306.9c-12.2-1.4-24.5-2-36.8-2-73.2 0-146.4 24.1-206.5 72.3a33.23 33.23 0 00-2.7 49.4l181.7 181.7-215.4 215.2a15.8 15.8 0 00-4.6 9.8l-3.4 37.2c-.9 9.4 6.6 17.4 15.9 17.4.5 0 1 0 1.5-.1l37.2-3.4c3.7-.3 7.2-2 9.8-4.6l215.4-215.4 181.7 181.7c6.5 6.5 15 9.7 23.5 9.7 9.7 0 19.3-4.2 25.9-12.4 56.3-70.3 79.7-158.3 70.2-243.4l161.1-161.1c12.9-12.8 12.9-33.8 0-46.8zM666.2 549.3l-24.5 24.5 3.8 34.4a259.92 259.92 0 01-30.4 153.9L262 408.8c12.9-7.1 26.3-13.1 40.3-17.9 27.2-9.4 55.7-14.1 84.7-14.1 9.6 0 19.3.5 28.9 1.6l34.4 3.8 24.5-24.5L608.5 224 800 415.5 666.2 549.3z"
/>
</svg>
</span>
</span>
</button>
<button
aria-hidden="true"
class="ant-btn css-var-test-id ant-btn-text ant-btn-color-default ant-btn-variant-text ant-btn-sm ant-btn-icon-only"
type="button"
>
<span
class="ant-btn-icon"
>
<span
aria-label="info-circle"
class="anticon anticon-info-circle"
role="img"
>
<svg
aria-hidden="true"
data-icon="info-circle"
fill="currentColor"
focusable="false"
height="1em"
viewBox="64 64 896 896"
width="1em"
>
<path
d="M512 64C264.6 64 64 264.6 64 512s200.6 448 448 448 448-200.6 448-448S759.4 64 512 64zm0 820c-205.4 0-372-166.6-372-372s166.6-372 372-372 372 166.6 372 372-166.6 372-372 372z"
/>
<path
d="M464 336a48 48 0 1096 0 48 48 0 10-96 0zm72 112h-48c-4.4 0-8 3.6-8 8v272c0 4.4 3.6 8 8 8h48c4.4 0 8-3.6 8-8V456c0-4.4-3.6-8-8-8z"
/>
</svg>
</span>
</span>
</button>
</div>
</div>
<div
class="ant-typography css-var-test-id"
style="margin: 0px; font-size: 12px;"
>
触发器容器,包含边框样式、过渡动画、尺寸控制等样式,显示颜色块和文本内容
</div>
</div>
</li>
<li
class="acss-1ehfz5v"
>
<div
class="ant-flex css-var-test-id ant-flex-align-stretch ant-flex-gap-small ant-flex-vertical"
>
<div
class="ant-flex css-var-test-id ant-flex-align-center ant-flex-justify-space-between ant-flex-gap-small"
>
<div
class="ant-flex css-var-test-id ant-flex-align-center ant-flex-gap-small"
>
<h5
class="ant-typography css-var-test-id"
style="margin: 0px;"
>
popup.root
</h5>
</div>
<div
class="ant-flex css-var-test-id ant-flex-align-center ant-flex-gap-small"
>
<button
aria-hidden="true"
class="ant-btn css-var-test-id ant-btn-default ant-btn-color-default ant-btn-variant-text ant-btn-sm ant-btn-icon-only"
type="button"
>
<span
class="ant-btn-icon"
>
<span
aria-label="pushpin"
class="anticon anticon-pushpin"
role="img"
>
<svg
aria-hidden="true"
data-icon="pushpin"
fill="currentColor"
focusable="false"
height="1em"
viewBox="64 64 896 896"
width="1em"
>
<path
d="M878.3 392.1L631.9 145.7c-6.5-6.5-15-9.7-23.5-9.7s-17 3.2-23.5 9.7L423.8 306.9c-12.2-1.4-24.5-2-36.8-2-73.2 0-146.4 24.1-206.5 72.3a33.23 33.23 0 00-2.7 49.4l181.7 181.7-215.4 215.2a15.8 15.8 0 00-4.6 9.8l-3.4 37.2c-.9 9.4 6.6 17.4 15.9 17.4.5 0 1 0 1.5-.1l37.2-3.4c3.7-.3 7.2-2 9.8-4.6l215.4-215.4 181.7 181.7c6.5 6.5 15 9.7 23.5 9.7 9.7 0 19.3-4.2 25.9-12.4 56.3-70.3 79.7-158.3 70.2-243.4l161.1-161.1c12.9-12.8 12.9-33.8 0-46.8zM666.2 549.3l-24.5 24.5 3.8 34.4a259.92 259.92 0 01-30.4 153.9L262 408.8c12.9-7.1 26.3-13.1 40.3-17.9 27.2-9.4 55.7-14.1 84.7-14.1 9.6 0 19.3.5 28.9 1.6l34.4 3.8 24.5-24.5L608.5 224 800 415.5 666.2 549.3z"
/>
</svg>
</span>
</span>
</button>
<button
aria-hidden="true"
class="ant-btn css-var-test-id ant-btn-text ant-btn-color-default ant-btn-variant-text ant-btn-sm ant-btn-icon-only"
type="button"
>
<span
class="ant-btn-icon"
>
<span
aria-label="info-circle"
class="anticon anticon-info-circle"
role="img"
>
<svg
aria-hidden="true"
data-icon="info-circle"
fill="currentColor"
focusable="false"
height="1em"
viewBox="64 64 896 896"
width="1em"
>
<path
d="M512 64C264.6 64 64 264.6 64 512s200.6 448 448 448 448-200.6 448-448S759.4 64 512 64zm0 820c-205.4 0-372-166.6-372-372s166.6-372 372-372 372 166.6 372 372-166.6 372-372 372z"
/>
<path
d="M464 336a48 48 0 1096 0 48 48 0 10-96 0zm72 112h-48c-4.4 0-8 3.6-8 8v272c0 4.4 3.6 8 8 8h48c4.4 0 8-3.6 8-8V456c0-4.4-3.6-8-8-8z"
/>
</svg>
</span>
</span>
</button>
</div>
</div>
<div
class="ant-typography css-var-test-id"
style="margin: 0px; font-size: 12px;"
>
弹出面板根容器,包含背景色、阴影效果、色彩选择面板、滑块控制和预设颜色等样式
</div>
</div>
</li>
</ul>
</div>
</div>
</div>
`;

View File

@@ -147,7 +147,6 @@ exports[`ColorPicker Should panelRender work 1`] = `
>
<div
class="ant-select-content-value"
style="visibility: visible;"
title="HEX"
>
HEX
@@ -421,7 +420,6 @@ exports[`ColorPicker Should panelRender work 2`] = `
>
<div
class="ant-select-content-value"
style="visibility: visible;"
title="HEX"
>
HEX

View File

@@ -149,9 +149,15 @@ describe('ColorPicker Components test', () => {
fireEvent.change(input, { target: { value: 'xyz' } });
// Verify input value has been updated but formatted as valid hex format
expect(input.getAttribute('value')).toEqual('xyz');
expect(input.getAttribute('value')).toEqual('');
// onChange should not be called because the input is invalid
// Simulate another invalid input
fireEvent.change(input, { target: { value: 'ff_00_gg' } });
// Verify input value is filtered
expect(input.getAttribute('value')).toEqual('ff00');
// onChange should not be called for invalid inputs
expect(onChange).toHaveBeenCalledTimes(1);
});
});

View File

@@ -0,0 +1,3 @@
import { semanticDemoTest } from '../../../tests/shared/demoTest';
semanticDemoTest('color-picker');

View File

@@ -3,7 +3,7 @@ import { Color as RcColor } from '@rc-component/color-picker';
import type { ColorGenInput, Colors } from './interface';
export const toHexFormat = (value?: string, alpha?: boolean) =>
value?.replace(/[^\w/]/g, '').slice(0, alpha ? 8 : 6) || '';
value?.replace(/[^0-9a-f]/gi, '').slice(0, alpha ? 8 : 6) || '';
export const getHex = (value?: string, alpha?: boolean) => (value ? toHexFormat(value, alpha) : '');

View File

@@ -2,8 +2,8 @@ import React from 'react';
import type { ColorPickerProps } from 'antd';
import { ColorPicker } from 'antd';
import SemanticPreview from '../../../.dumi/theme/common/SemanticPreview';
import useLocale from '../../../.dumi/hooks/useLocale';
import SemanticPreview from '../../../.dumi/theme/common/SemanticPreview';
const locales = {
cn: {
@@ -25,7 +25,7 @@ const Block: React.FC<Readonly<ColorPickerProps>> = (props) => {
defaultValue="#1677ff"
open
{...props}
getPopupContainer={() => divRef!.current!}
getPopupContainer={() => divRef.current || document.body}
styles={{
popup: {
root: { zIndex: 1 },

View File

@@ -33,10 +33,10 @@ exports[`renderEmpty should render Cascader empty 1`] = `
stroke="#d9d9d9"
>
<path
d="M55 12.76L44.854 1.258C44.367.474 43.656 0 42.907 0H21.093c-.749 0-1.46.474-1.947 1.257L9 12.761V22h46v-9.24z"
d="M55 12.8 44.9 1.3Q44 0 42.9 0H21.1q-1.2 0-2 1.3L9 12.8V22h46z"
/>
<path
d="M41.613 15.931c0-1.605.994-2.93 2.227-2.931H55v18.137C55 33.26 53.68 35 52.05 35h-40.1C10.32 35 9 33.259 9 31.137V13h11.16c1.233 0 2.227 1.323 2.227 2.928v.022c0 1.605 1.005 2.901 2.237 2.901h14.752c1.232 0 2.237-1.308 2.237-2.913v-.007z"
d="M41.6 16c0-1.7 1-3 2.2-3H55v18.1c0 2.2-1.3 3.9-3 3.9H12c-1.7 0-3-1.7-3-3.9V13h11.2c1.2 0 2.2 1.3 2.2 3s1 2.9 2.2 2.9h14.8c1.2 0 2.2-1.4 2.2-3"
fill="#fafafa"
/>
</g>
@@ -84,10 +84,10 @@ exports[`renderEmpty should render List empty 1`] = `
stroke="#d9d9d9"
>
<path
d="M55 12.76L44.854 1.258C44.367.474 43.656 0 42.907 0H21.093c-.749 0-1.46.474-1.947 1.257L9 12.761V22h46v-9.24z"
d="M55 12.8 44.9 1.3Q44 0 42.9 0H21.1q-1.2 0-2 1.3L9 12.8V22h46z"
/>
<path
d="M41.613 15.931c0-1.605.994-2.93 2.227-2.931H55v18.137C55 33.26 53.68 35 52.05 35h-40.1C10.32 35 9 33.259 9 31.137V13h11.16c1.233 0 2.227 1.323 2.227 2.928v.022c0 1.605 1.005 2.901 2.237 2.901h14.752c1.232 0 2.237-1.308 2.237-2.913v-.007z"
d="M41.6 16c0-1.7 1-3 2.2-3H55v18.1c0 2.2-1.3 3.9-3 3.9H12c-1.7 0-3-1.7-3-3.9V13h11.2c1.2 0 2.2 1.3 2.2 3s1 2.9 2.2 2.9h14.8c1.2 0 2.2-1.4 2.2-3"
fill="#fafafa"
/>
</g>
@@ -135,10 +135,10 @@ exports[`renderEmpty should render Mentions empty 1`] = `
stroke="#d9d9d9"
>
<path
d="M55 12.76L44.854 1.258C44.367.474 43.656 0 42.907 0H21.093c-.749 0-1.46.474-1.947 1.257L9 12.761V22h46v-9.24z"
d="M55 12.8 44.9 1.3Q44 0 42.9 0H21.1q-1.2 0-2 1.3L9 12.8V22h46z"
/>
<path
d="M41.613 15.931c0-1.605.994-2.93 2.227-2.931H55v18.137C55 33.26 53.68 35 52.05 35h-40.1C10.32 35 9 33.259 9 31.137V13h11.16c1.233 0 2.227 1.323 2.227 2.928v.022c0 1.605 1.005 2.901 2.237 2.901h14.752c1.232 0 2.237-1.308 2.237-2.913v-.007z"
d="M41.6 16c0-1.7 1-3 2.2-3H55v18.1c0 2.2-1.3 3.9-3 3.9H12c-1.7 0-3-1.7-3-3.9V13h11.2c1.2 0 2.2 1.3 2.2 3s1 2.9 2.2 2.9h14.8c1.2 0 2.2-1.4 2.2-3"
fill="#fafafa"
/>
</g>
@@ -186,10 +186,10 @@ exports[`renderEmpty should render Select empty 1`] = `
stroke="#d9d9d9"
>
<path
d="M55 12.76L44.854 1.258C44.367.474 43.656 0 42.907 0H21.093c-.749 0-1.46.474-1.947 1.257L9 12.761V22h46v-9.24z"
d="M55 12.8 44.9 1.3Q44 0 42.9 0H21.1q-1.2 0-2 1.3L9 12.8V22h46z"
/>
<path
d="M41.613 15.931c0-1.605.994-2.93 2.227-2.931H55v18.137C55 33.26 53.68 35 52.05 35h-40.1C10.32 35 9 33.259 9 31.137V13h11.16c1.233 0 2.227 1.323 2.227 2.928v.022c0 1.605 1.005 2.901 2.237 2.901h14.752c1.232 0 2.237-1.308 2.237-2.913v-.007z"
d="M41.6 16c0-1.7 1-3 2.2-3H55v18.1c0 2.2-1.3 3.9-3 3.9H12c-1.7 0-3-1.7-3-3.9V13h11.2c1.2 0 2.2 1.3 2.2 3s1 2.9 2.2 2.9h14.8c1.2 0 2.2-1.4 2.2-3"
fill="#fafafa"
/>
</g>
@@ -237,10 +237,10 @@ exports[`renderEmpty should render Table empty 1`] = `
stroke="#d9d9d9"
>
<path
d="M55 12.76L44.854 1.258C44.367.474 43.656 0 42.907 0H21.093c-.749 0-1.46.474-1.947 1.257L9 12.761V22h46v-9.24z"
d="M55 12.8 44.9 1.3Q44 0 42.9 0H21.1q-1.2 0-2 1.3L9 12.8V22h46z"
/>
<path
d="M41.613 15.931c0-1.605.994-2.93 2.227-2.931H55v18.137C55 33.26 53.68 35 52.05 35h-40.1C10.32 35 9 33.259 9 31.137V13h11.16c1.233 0 2.227 1.323 2.227 2.928v.022c0 1.605 1.005 2.901 2.237 2.901h14.752c1.232 0 2.237-1.308 2.237-2.913v-.007z"
d="M41.6 16c0-1.7 1-3 2.2-3H55v18.1c0 2.2-1.3 3.9-3 3.9H12c-1.7 0-3-1.7-3-3.9V13h11.2c1.2 0 2.2 1.3 2.2 3s1 2.9 2.2 2.9h14.8c1.2 0 2.2-1.4 2.2-3"
fill="#fafafa"
/>
</g>
@@ -290,10 +290,10 @@ exports[`renderEmpty should render Transfer empty 1`] = `
stroke="#d9d9d9"
>
<path
d="M55 12.76L44.854 1.258C44.367.474 43.656 0 42.907 0H21.093c-.749 0-1.46.474-1.947 1.257L9 12.761V22h46v-9.24z"
d="M55 12.8 44.9 1.3Q44 0 42.9 0H21.1q-1.2 0-2 1.3L9 12.8V22h46z"
/>
<path
d="M41.613 15.931c0-1.605.994-2.93 2.227-2.931H55v18.137C55 33.26 53.68 35 52.05 35h-40.1C10.32 35 9 33.259 9 31.137V13h11.16c1.233 0 2.227 1.323 2.227 2.928v.022c0 1.605 1.005 2.901 2.237 2.901h14.752c1.232 0 2.237-1.308 2.237-2.913v-.007z"
d="M41.6 16c0-1.7 1-3 2.2-3H55v18.1c0 2.2-1.3 3.9-3 3.9H12c-1.7 0-3-1.7-3-3.9V13h11.2c1.2 0 2.2 1.3 2.2 3s1 2.9 2.2 2.9h14.8c1.2 0 2.2-1.4 2.2-3"
fill="#fafafa"
/>
</g>
@@ -341,10 +341,10 @@ exports[`renderEmpty should render TreeSelect empty 1`] = `
stroke="#d9d9d9"
>
<path
d="M55 12.76L44.854 1.258C44.367.474 43.656 0 42.907 0H21.093c-.749 0-1.46.474-1.947 1.257L9 12.761V22h46v-9.24z"
d="M55 12.8 44.9 1.3Q44 0 42.9 0H21.1q-1.2 0-2 1.3L9 12.8V22h46z"
/>
<path
d="M41.613 15.931c0-1.605.994-2.93 2.227-2.931H55v18.137C55 33.26 53.68 35 52.05 35h-40.1C10.32 35 9 33.259 9 31.137V13h11.16c1.233 0 2.227 1.323 2.227 2.928v.022c0 1.605 1.005 2.901 2.237 2.901h14.752c1.232 0 2.237-1.308 2.237-2.913v-.007z"
d="M41.6 16c0-1.7 1-3 2.2-3H55v18.1c0 2.2-1.3 3.9-3 3.9H12c-1.7 0-3-1.7-3-3.9V13h11.2c1.2 0 2.2 1.3 2.2 3s1 2.9 2.2 2.9h14.8c1.2 0 2.2-1.4 2.2-3"
fill="#fafafa"
/>
</g>
@@ -380,50 +380,44 @@ exports[`renderEmpty should return empty when componentName is not matched 1`] =
fill-rule="evenodd"
>
<g
transform="translate(24 31.67)"
transform="translate(24 31.7)"
>
<ellipse
cx="67.797"
cy="106.89"
cx="67.8"
cy="106.9"
fill="#F5F5F7"
fill-opacity=".8"
rx="67.797"
ry="12.668"
rx="67.8"
ry="12.7"
/>
<path
d="M122.034 69.674L98.109 40.229c-1.148-1.386-2.826-2.225-4.593-2.225h-51.44c-1.766 0-3.444.839-4.592 2.225L13.56 69.674v15.383h108.475V69.674z"
fill="#AEB8C2"
d="M122 69.7 98.1 40.2a6 6 0 0 0-4.6-2.2H42.1a6 6 0 0 0-4.6 2.2l-24 29.5V85H122z"
fill="#aeb8c2"
/>
<path
d="M101.537 86.214L80.63 61.102c-1.001-1.207-2.507-1.867-4.048-1.867H31.724c-1.54 0-3.047.66-4.048 1.867L6.769 86.214v13.792h94.768V86.214z"
fill="url(#linearGradient-1)"
transform="translate(13.56)"
d="M33.8 0h68a4 4 0 0 1 4 4v93.3a4 4 0 0 1-4 4h-68a4 4 0 0 1-4-4V4a4 4 0 0 1 4-4"
fill="#f5f5f7"
/>
<path
d="M33.83 0h67.933a4 4 0 0 1 4 4v93.344a4 4 0 0 1-4 4H33.83a4 4 0 0 1-4-4V4a4 4 0 0 1 4-4z"
fill="#F5F5F7"
/>
<path
d="M42.678 9.953h50.237a2 2 0 0 1 2 2V36.91a2 2 0 0 1-2 2H42.678a2 2 0 0 1-2-2V11.953a2 2 0 0 1 2-2zM42.94 49.767h49.713a2.262 2.262 0 1 1 0 4.524H42.94a2.262 2.262 0 0 1 0-4.524zM42.94 61.53h49.713a2.262 2.262 0 1 1 0 4.525H42.94a2.262 2.262 0 0 1 0-4.525zM121.813 105.032c-.775 3.071-3.497 5.36-6.735 5.36H20.515c-3.238 0-5.96-2.29-6.734-5.36a7.309 7.309 0 0 1-.222-1.79V69.675h26.318c2.907 0 5.25 2.448 5.25 5.42v.04c0 2.971 2.37 5.37 5.277 5.37h34.785c2.907 0 5.277-2.421 5.277-5.393V75.1c0-2.972 2.343-5.426 5.25-5.426h26.318v33.569c0 .617-.077 1.216-.221 1.789z"
fill="#DCE0E6"
d="M42.7 10h50.2a2 2 0 0 1 2 2v25a2 2 0 0 1-2 2H42.7a2 2 0 0 1-2-2V12a2 2 0 0 1 2-2m.2 39.8h49.8a2.3 2.3 0 1 1 0 4.5H42.9a2.3 2.3 0 0 1 0-4.5m0 11.7h49.8a2.3 2.3 0 1 1 0 4.6H42.9a2.3 2.3 0 0 1 0-4.6m79 43.5a7 7 0 0 1-6.8 5.4H20.5a7 7 0 0 1-6.7-5.4l-.2-1.8V69.7h26.3c2.9 0 5.2 2.4 5.2 5.4s2.4 5.4 5.3 5.4h34.8c2.9 0 5.3-2.4 5.3-5.4s2.3-5.4 5.2-5.4H122v33.5q0 1-.2 1.8"
fill="#dce0e6"
/>
</g>
<path
d="M149.121 33.292l-6.83 2.65a1 1 0 0 1-1.317-1.23l1.937-6.207c-2.589-2.944-4.109-6.534-4.109-10.408C138.802 8.102 148.92 0 161.402 0 173.881 0 184 8.102 184 18.097c0 9.995-10.118 18.097-22.599 18.097-4.528 0-8.744-1.066-12.28-2.902z"
fill="#DCE0E6"
d="m149.1 33.3-6.8 2.6a1 1 0 0 1-1.3-1.2l2-6.2q-4.1-4.5-4.2-10.4c0-10 10.1-18.1 22.6-18.1S184 8.1 184 18.1s-10.1 18-22.6 18q-6.8 0-12.3-2.8"
fill="#dce0e6"
/>
<g
fill="#FFF"
transform="translate(149.65 15.383)"
fill="#fff"
transform="translate(149.7 15.4)"
>
<ellipse
cx="20.654"
cy="3.167"
rx="2.849"
ry="2.815"
<circle
cx="20.7"
cy="3.2"
r="2.8"
/>
<path
d="M5.698 5.63H0L2.898.704zM9.259.704h4.985V5.63H9.259z"
d="M5.7 5.6H0L2.9.7zM9.3.7h5v5h-5z"
/>
</g>
</g>

View File

@@ -309,7 +309,10 @@ export type FloatButtonGroupConfig = ComponentStyleConfig &
Pick<FloatButtonGroupProps, 'closeIcon' | 'classNames' | 'styles'>;
export type PaginationConfig = ComponentStyleConfig &
Pick<PaginationProps, 'showSizeChanger' | 'totalBoundaryShowSizeChanger' | 'classNames' | 'styles'>;
Pick<
PaginationProps,
'showSizeChanger' | 'totalBoundaryShowSizeChanger' | 'classNames' | 'styles'
>;
export type ProgressConfig = ComponentStyleConfig & Pick<ProgressProps, 'classNames' | 'styles'>;

View File

@@ -491,10 +491,10 @@ describe('DatePicker', () => {
expect(container.querySelector('.ant-picker-suffix')!.children.length).toBeTruthy();
rerender(<DatePicker suffixIcon={false} />);
expect(container.querySelector('.ant-picker-suffix')!.children.length).toBeFalsy();
expect(container.querySelector('.ant-picker-suffix')).toBeFalsy();
rerender(<DatePicker suffixIcon={null} />);
expect(container.querySelector('.ant-picker-suffix')!.children.length).toBeFalsy();
expect(container.querySelector('.ant-picker-suffix')).toBeFalsy();
rerender(<DatePicker suffixIcon={'123'} />);
expect(container.querySelector('.ant-picker-suffix')?.textContent).toBe('123');

View File

@@ -85686,9 +85686,6 @@ exports[`renders components/date-picker/demo/suffixIcon-debug.tsx extend context
size="12"
value=""
/>
<span
class="ant-picker-suffix"
/>
</div>
</div>
<div
@@ -86900,9 +86897,6 @@ exports[`renders components/date-picker/demo/suffixIcon-debug.tsx extend context
size="12"
value=""
/>
<span
class="ant-picker-suffix"
/>
</div>
</div>
<div
@@ -88100,7 +88094,6 @@ exports[`renders components/date-picker/demo/switchable.tsx extend context corre
>
<div
class="ant-select-content-value"
style="visibility: visible;"
title="Time"
>
Time

File diff suppressed because it is too large Load Diff

View File

@@ -7564,9 +7564,6 @@ exports[`renders components/date-picker/demo/suffixIcon-debug.tsx correctly 1`]
size="12"
value=""
/>
<span
class="ant-picker-suffix"
/>
</div>
</div>
</div>
@@ -7628,9 +7625,6 @@ exports[`renders components/date-picker/demo/suffixIcon-debug.tsx correctly 1`]
size="12"
value=""
/>
<span
class="ant-picker-suffix"
/>
</div>
</div>
</div>
@@ -7676,7 +7670,6 @@ exports[`renders components/date-picker/demo/switchable.tsx correctly 1`] = `
>
<div
class="ant-select-content-value"
style="visibility:visible"
title="Time"
>
Time

View File

@@ -0,0 +1,3 @@
import { createPostFn, semanticDemoTest } from '../../../tests/shared/demoTest';
semanticDemoTest('date-picker', { postRenderFn: createPostFn(['Multiple']) });

View File

@@ -26,7 +26,7 @@ import useStyle from '../style';
import { getRangePlaceholder, useIcons } from '../util';
import { TIME } from './constant';
import type { PickerLocale, RangePickerProps } from './interface';
import SuffixIcon from './SuffixIcon';
import useSuffixIcon from './useSuffixIcon';
import useComponents from './useComponents';
const generateRangePicker = <DateType extends AnyObject = AnyObject>(
@@ -113,7 +113,7 @@ const generateRangePicker = <DateType extends AnyObject = AnyObject>(
// ===================== FormItemInput =====================
const formItemContext = useContext(FormItemInputContext);
const { hasFeedback, status: contextStatus, feedbackIcon } = formItemContext;
const mergedSuffixIcon = <SuffixIcon {...{ picker, hasFeedback, feedbackIcon, suffixIcon }} />;
const mergedSuffixIcon = useSuffixIcon({ picker, hasFeedback, feedbackIcon, suffixIcon });
useImperativeHandle(ref, () => innerRef.current!);
const [contextLocale] = useLocale('Calendar', enUS);

View File

@@ -42,7 +42,7 @@ import type {
PickerProps,
PickerPropsWithMultiple,
} from './interface';
import SuffixIcon from './SuffixIcon';
import useSuffixIcon from './useSuffixIcon';
import useComponents from './useComponents';
const generatePicker = <DateType extends AnyObject = AnyObject>(
@@ -178,9 +178,12 @@ const generatePicker = <DateType extends AnyObject = AnyObject>(
const formItemContext = useContext(FormItemInputContext);
const { hasFeedback, status: contextStatus, feedbackIcon } = formItemContext;
const mergedSuffixIcon = (
<SuffixIcon {...{ picker: mergedPicker, hasFeedback, feedbackIcon, suffixIcon }} />
);
const mergedSuffixIcon = useSuffixIcon({
picker: mergedPicker,
hasFeedback,
feedbackIcon,
suffixIcon,
});
const [contextLocale] = useLocale('DatePicker', enUS);
const locale = merge(contextLocale, (props.locale || {}) as PickerLocale);

View File

@@ -3,21 +3,16 @@ import CalendarOutlined from '@ant-design/icons/CalendarOutlined';
import ClockCircleOutlined from '@ant-design/icons/ClockCircleOutlined';
import type { PickerMode } from '@rc-component/picker/interface';
import { TIME } from '../generatePicker/constant';
import { TIME } from './constant';
interface SuffixIconProps {
interface UseSuffixIconProps {
picker?: PickerMode;
hasFeedback?: boolean;
feedbackIcon?: React.ReactNode;
suffixIcon?: React.ReactNode;
}
const SuffixIcon: React.FC<SuffixIconProps> = ({
picker,
hasFeedback,
feedbackIcon,
suffixIcon,
}) => {
const useSuffixIcon = ({ picker, hasFeedback, feedbackIcon, suffixIcon }: UseSuffixIconProps) => {
if (suffixIcon === null || suffixIcon === false) {
return null;
}
@@ -33,4 +28,4 @@ const SuffixIcon: React.FC<SuffixIconProps> = ({
return suffixIcon;
};
export default SuffixIcon;
export default useSuffixIcon;

View File

@@ -101,7 +101,9 @@ const genPickerStyle: GenerateStyle<PickerToken> = (token) => {
alignItems: 'center',
lineHeight: 1,
borderRadius,
transition: `border ${motionDurationMid}, box-shadow ${motionDurationMid}, background ${motionDurationMid}`,
transition: [`border`, `box-shadow`, `background-color`]
.map((prop) => `${prop} ${motionDurationMid}`)
.join(', '),
[`${componentCls}-prefix`]: {
flex: '0 0 auto',
@@ -180,7 +182,7 @@ const genPickerStyle: GenerateStyle<PickerToken> = (token) => {
color: colorTextQuaternary,
lineHeight: 1,
pointerEvents: 'none',
transition: `opacity ${motionDurationMid}, color ${motionDurationMid}`,
transition: ['opacity', 'color'].map((prop) => `${prop} ${motionDurationMid}`).join(', '),
'> *': {
verticalAlign: 'top',
@@ -200,7 +202,7 @@ const genPickerStyle: GenerateStyle<PickerToken> = (token) => {
transform: 'translateY(-50%)',
cursor: 'pointer',
opacity: 0,
transition: `opacity ${motionDurationMid}, color ${motionDurationMid}`,
transition: ['opacity', 'color'].map((prop) => `${prop} ${motionDurationMid}`).join(', '),
'> *': {
verticalAlign: 'top',

View File

@@ -45,7 +45,7 @@ const genPickerCellInnerStyle = (token: SharedPickerToken): CSSObject => {
height: cellHeight,
lineHeight: unit(cellHeight),
borderRadius: borderRadiusSM,
transition: `background ${motionDurationMid}`,
transition: `background-color ${motionDurationMid}`,
},
// >>> Hover
@@ -446,7 +446,7 @@ export const genPanelStyle = (token: SharedPickerToken): CSSObject => {
'&-week-panel-row': {
td: {
'&:before': {
transition: `background ${motionDurationMid}`,
transition: `background-color ${motionDurationMid}`,
},
'&:first-child:before': {
@@ -542,7 +542,7 @@ export const genPanelStyle = (token: SharedPickerToken): CSSObject => {
overflowY: 'hidden',
textAlign: 'start',
listStyle: 'none',
transition: `background ${motionDurationMid}`,
transition: `background-color ${motionDurationMid}`,
overflowX: 'hidden',
'&::-webkit-scrollbar': {
@@ -597,7 +597,7 @@ export const genPanelStyle = (token: SharedPickerToken): CSSObject => {
lineHeight: unit(timeCellHeight),
borderRadius: borderRadiusSM,
cursor: 'pointer',
transition: `background ${motionDurationMid}`,
transition: `background-color ${motionDurationMid}`,
'&:hover': {
background: cellHoverBg,

View File

@@ -116,7 +116,9 @@ export const genOverflowStyle = (
marginBlock: INTERNAL_FIXED_ITEM_MARGIN,
borderRadius: borderRadiusSM,
cursor: 'default',
transition: `font-size ${motionDurationSlow}, line-height ${motionDurationSlow}, height ${motionDurationSlow}`,
transition: [`font-size`, `line-height`, `height`]
.map((prop) => `${prop} ${motionDurationSlow}`)
.join(', '),
marginInlineEnd: token.calc(INTERNAL_FIXED_ITEM_MARGIN).mul(2).equal(),
paddingInlineStart: paddingXS,
paddingInlineEnd: token.calc(paddingXS).div(2).equal(),

View File

@@ -0,0 +1,697 @@
// Jest Snapshot v1, https://jestjs.io/docs/snapshot-testing
exports[`renders components/descriptions/demo/_semantic.tsx correctly 1`] = `
<div
class="acss-1ucck97"
>
<div
class="ant-row css-var-test-id"
>
<div
class="ant-col ant-col-16 acss-my3sst css-var-test-id"
>
<div
style="width: 100%; height: 100%;"
>
<button
aria-checked="false"
class="ant-switch css-var-test-id"
role="switch"
type="button"
>
<div
class="ant-switch-handle"
/>
<span
class="ant-switch-inner"
>
<span
class="ant-switch-inner-checked"
/>
<span
class="ant-switch-inner-unchecked"
/>
</span>
</button>
Toggle Border
<div
class="ant-divider css-var-test-id ant-divider-horizontal ant-divider-rail"
role="separator"
/>
<div
class="ant-descriptions semantic-mark-root css-var-test-id"
>
<div
class="ant-descriptions-header semantic-mark-header"
>
<div
class="ant-descriptions-title semantic-mark-title"
>
User Info
</div>
<div
class="ant-descriptions-extra semantic-mark-extra"
>
<button
class="ant-btn css-var-test-id ant-btn-primary ant-btn-color-primary ant-btn-variant-solid"
type="button"
>
<span>
Edit
</span>
</button>
</div>
</div>
<div
class="ant-descriptions-view"
>
<table>
<tbody>
<tr
class="ant-descriptions-row"
>
<td
class="ant-descriptions-item"
colspan="1"
>
<div
class="ant-descriptions-item-container"
>
<span
class="ant-descriptions-item-label semantic-mark-label"
>
Telephone
</span>
<span
class="ant-descriptions-item-content semantic-mark-content"
>
1810000000
</span>
</div>
</td>
</tr>
</tbody>
</table>
</div>
</div>
</div>
</div>
<div
class="ant-col ant-col-8 css-var-test-id"
>
<ul
class="acss-1ry21g5"
>
<li
class="acss-1ehfz5v"
>
<div
class="ant-flex css-var-test-id ant-flex-align-stretch ant-flex-gap-small ant-flex-vertical"
>
<div
class="ant-flex css-var-test-id ant-flex-align-center ant-flex-justify-space-between ant-flex-gap-small"
>
<div
class="ant-flex css-var-test-id ant-flex-align-center ant-flex-gap-small"
>
<h5
class="ant-typography css-var-test-id"
style="margin: 0px;"
>
root
</h5>
<span
class="ant-tag ant-tag-filled ant-tag-blue css-var-test-id"
>
5.23.0
</span>
</div>
<div
class="ant-flex css-var-test-id ant-flex-align-center ant-flex-gap-small"
>
<button
aria-hidden="true"
class="ant-btn css-var-test-id ant-btn-default ant-btn-color-default ant-btn-variant-text ant-btn-sm ant-btn-icon-only"
type="button"
>
<span
class="ant-btn-icon"
>
<span
aria-label="pushpin"
class="anticon anticon-pushpin"
role="img"
>
<svg
aria-hidden="true"
data-icon="pushpin"
fill="currentColor"
focusable="false"
height="1em"
viewBox="64 64 896 896"
width="1em"
>
<path
d="M878.3 392.1L631.9 145.7c-6.5-6.5-15-9.7-23.5-9.7s-17 3.2-23.5 9.7L423.8 306.9c-12.2-1.4-24.5-2-36.8-2-73.2 0-146.4 24.1-206.5 72.3a33.23 33.23 0 00-2.7 49.4l181.7 181.7-215.4 215.2a15.8 15.8 0 00-4.6 9.8l-3.4 37.2c-.9 9.4 6.6 17.4 15.9 17.4.5 0 1 0 1.5-.1l37.2-3.4c3.7-.3 7.2-2 9.8-4.6l215.4-215.4 181.7 181.7c6.5 6.5 15 9.7 23.5 9.7 9.7 0 19.3-4.2 25.9-12.4 56.3-70.3 79.7-158.3 70.2-243.4l161.1-161.1c12.9-12.8 12.9-33.8 0-46.8zM666.2 549.3l-24.5 24.5 3.8 34.4a259.92 259.92 0 01-30.4 153.9L262 408.8c12.9-7.1 26.3-13.1 40.3-17.9 27.2-9.4 55.7-14.1 84.7-14.1 9.6 0 19.3.5 28.9 1.6l34.4 3.8 24.5-24.5L608.5 224 800 415.5 666.2 549.3z"
/>
</svg>
</span>
</span>
</button>
<button
aria-hidden="true"
class="ant-btn css-var-test-id ant-btn-text ant-btn-color-default ant-btn-variant-text ant-btn-sm ant-btn-icon-only"
type="button"
>
<span
class="ant-btn-icon"
>
<span
aria-label="info-circle"
class="anticon anticon-info-circle"
role="img"
>
<svg
aria-hidden="true"
data-icon="info-circle"
fill="currentColor"
focusable="false"
height="1em"
viewBox="64 64 896 896"
width="1em"
>
<path
d="M512 64C264.6 64 64 264.6 64 512s200.6 448 448 448 448-200.6 448-448S759.4 64 512 64zm0 820c-205.4 0-372-166.6-372-372s166.6-372 372-372 372 166.6 372 372-166.6 372-372 372z"
/>
<path
d="M464 336a48 48 0 1096 0 48 48 0 10-96 0zm72 112h-48c-4.4 0-8 3.6-8 8v272c0 4.4 3.6 8 8 8h48c4.4 0 8-3.6 8-8V456c0-4.4-3.6-8-8-8z"
/>
</svg>
</span>
</span>
</button>
</div>
</div>
<div
class="ant-typography css-var-test-id"
style="margin: 0px; font-size: 12px;"
>
根元素,包含描述列表容器的基础样式、重置样式、边框样式、布局方向等整体样式
</div>
</div>
</li>
<li
class="acss-1ehfz5v"
>
<div
class="ant-flex css-var-test-id ant-flex-align-stretch ant-flex-gap-small ant-flex-vertical"
>
<div
class="ant-flex css-var-test-id ant-flex-align-center ant-flex-justify-space-between ant-flex-gap-small"
>
<div
class="ant-flex css-var-test-id ant-flex-align-center ant-flex-gap-small"
>
<h5
class="ant-typography css-var-test-id"
style="margin: 0px;"
>
header
</h5>
<span
class="ant-tag ant-tag-filled ant-tag-blue css-var-test-id"
>
5.23.0
</span>
</div>
<div
class="ant-flex css-var-test-id ant-flex-align-center ant-flex-gap-small"
>
<button
aria-hidden="true"
class="ant-btn css-var-test-id ant-btn-default ant-btn-color-default ant-btn-variant-text ant-btn-sm ant-btn-icon-only"
type="button"
>
<span
class="ant-btn-icon"
>
<span
aria-label="pushpin"
class="anticon anticon-pushpin"
role="img"
>
<svg
aria-hidden="true"
data-icon="pushpin"
fill="currentColor"
focusable="false"
height="1em"
viewBox="64 64 896 896"
width="1em"
>
<path
d="M878.3 392.1L631.9 145.7c-6.5-6.5-15-9.7-23.5-9.7s-17 3.2-23.5 9.7L423.8 306.9c-12.2-1.4-24.5-2-36.8-2-73.2 0-146.4 24.1-206.5 72.3a33.23 33.23 0 00-2.7 49.4l181.7 181.7-215.4 215.2a15.8 15.8 0 00-4.6 9.8l-3.4 37.2c-.9 9.4 6.6 17.4 15.9 17.4.5 0 1 0 1.5-.1l37.2-3.4c3.7-.3 7.2-2 9.8-4.6l215.4-215.4 181.7 181.7c6.5 6.5 15 9.7 23.5 9.7 9.7 0 19.3-4.2 25.9-12.4 56.3-70.3 79.7-158.3 70.2-243.4l161.1-161.1c12.9-12.8 12.9-33.8 0-46.8zM666.2 549.3l-24.5 24.5 3.8 34.4a259.92 259.92 0 01-30.4 153.9L262 408.8c12.9-7.1 26.3-13.1 40.3-17.9 27.2-9.4 55.7-14.1 84.7-14.1 9.6 0 19.3.5 28.9 1.6l34.4 3.8 24.5-24.5L608.5 224 800 415.5 666.2 549.3z"
/>
</svg>
</span>
</span>
</button>
<button
aria-hidden="true"
class="ant-btn css-var-test-id ant-btn-text ant-btn-color-default ant-btn-variant-text ant-btn-sm ant-btn-icon-only"
type="button"
>
<span
class="ant-btn-icon"
>
<span
aria-label="info-circle"
class="anticon anticon-info-circle"
role="img"
>
<svg
aria-hidden="true"
data-icon="info-circle"
fill="currentColor"
focusable="false"
height="1em"
viewBox="64 64 896 896"
width="1em"
>
<path
d="M512 64C264.6 64 64 264.6 64 512s200.6 448 448 448 448-200.6 448-448S759.4 64 512 64zm0 820c-205.4 0-372-166.6-372-372s166.6-372 372-372 372 166.6 372 372-166.6 372-372 372z"
/>
<path
d="M464 336a48 48 0 1096 0 48 48 0 10-96 0zm72 112h-48c-4.4 0-8 3.6-8 8v272c0 4.4 3.6 8 8 8h48c4.4 0 8-3.6 8-8V456c0-4.4-3.6-8-8-8z"
/>
</svg>
</span>
</span>
</button>
</div>
</div>
<div
class="ant-typography css-var-test-id"
style="margin: 0px; font-size: 12px;"
>
头部元素包含flex布局、对齐方式、下边距等头部区域的布局和样式控制
</div>
</div>
</li>
<li
class="acss-1ehfz5v"
>
<div
class="ant-flex css-var-test-id ant-flex-align-stretch ant-flex-gap-small ant-flex-vertical"
>
<div
class="ant-flex css-var-test-id ant-flex-align-center ant-flex-justify-space-between ant-flex-gap-small"
>
<div
class="ant-flex css-var-test-id ant-flex-align-center ant-flex-gap-small"
>
<h5
class="ant-typography css-var-test-id"
style="margin: 0px;"
>
title
</h5>
<span
class="ant-tag ant-tag-filled ant-tag-blue css-var-test-id"
>
5.23.0
</span>
</div>
<div
class="ant-flex css-var-test-id ant-flex-align-center ant-flex-gap-small"
>
<button
aria-hidden="true"
class="ant-btn css-var-test-id ant-btn-default ant-btn-color-default ant-btn-variant-text ant-btn-sm ant-btn-icon-only"
type="button"
>
<span
class="ant-btn-icon"
>
<span
aria-label="pushpin"
class="anticon anticon-pushpin"
role="img"
>
<svg
aria-hidden="true"
data-icon="pushpin"
fill="currentColor"
focusable="false"
height="1em"
viewBox="64 64 896 896"
width="1em"
>
<path
d="M878.3 392.1L631.9 145.7c-6.5-6.5-15-9.7-23.5-9.7s-17 3.2-23.5 9.7L423.8 306.9c-12.2-1.4-24.5-2-36.8-2-73.2 0-146.4 24.1-206.5 72.3a33.23 33.23 0 00-2.7 49.4l181.7 181.7-215.4 215.2a15.8 15.8 0 00-4.6 9.8l-3.4 37.2c-.9 9.4 6.6 17.4 15.9 17.4.5 0 1 0 1.5-.1l37.2-3.4c3.7-.3 7.2-2 9.8-4.6l215.4-215.4 181.7 181.7c6.5 6.5 15 9.7 23.5 9.7 9.7 0 19.3-4.2 25.9-12.4 56.3-70.3 79.7-158.3 70.2-243.4l161.1-161.1c12.9-12.8 12.9-33.8 0-46.8zM666.2 549.3l-24.5 24.5 3.8 34.4a259.92 259.92 0 01-30.4 153.9L262 408.8c12.9-7.1 26.3-13.1 40.3-17.9 27.2-9.4 55.7-14.1 84.7-14.1 9.6 0 19.3.5 28.9 1.6l34.4 3.8 24.5-24.5L608.5 224 800 415.5 666.2 549.3z"
/>
</svg>
</span>
</span>
</button>
<button
aria-hidden="true"
class="ant-btn css-var-test-id ant-btn-text ant-btn-color-default ant-btn-variant-text ant-btn-sm ant-btn-icon-only"
type="button"
>
<span
class="ant-btn-icon"
>
<span
aria-label="info-circle"
class="anticon anticon-info-circle"
role="img"
>
<svg
aria-hidden="true"
data-icon="info-circle"
fill="currentColor"
focusable="false"
height="1em"
viewBox="64 64 896 896"
width="1em"
>
<path
d="M512 64C264.6 64 64 264.6 64 512s200.6 448 448 448 448-200.6 448-448S759.4 64 512 64zm0 820c-205.4 0-372-166.6-372-372s166.6-372 372-372 372 166.6 372 372-166.6 372-372 372z"
/>
<path
d="M464 336a48 48 0 1096 0 48 48 0 10-96 0zm72 112h-48c-4.4 0-8 3.6-8 8v272c0 4.4 3.6 8 8 8h48c4.4 0 8-3.6 8-8V456c0-4.4-3.6-8-8-8z"
/>
</svg>
</span>
</span>
</button>
</div>
</div>
<div
class="ant-typography css-var-test-id"
style="margin: 0px; font-size: 12px;"
>
标题元素包含文本省略、flex占比、颜色、字体权重、字体大小、行高等标题文字样式
</div>
</div>
</li>
<li
class="acss-1ehfz5v"
>
<div
class="ant-flex css-var-test-id ant-flex-align-stretch ant-flex-gap-small ant-flex-vertical"
>
<div
class="ant-flex css-var-test-id ant-flex-align-center ant-flex-justify-space-between ant-flex-gap-small"
>
<div
class="ant-flex css-var-test-id ant-flex-align-center ant-flex-gap-small"
>
<h5
class="ant-typography css-var-test-id"
style="margin: 0px;"
>
extra
</h5>
<span
class="ant-tag ant-tag-filled ant-tag-blue css-var-test-id"
>
5.23.0
</span>
</div>
<div
class="ant-flex css-var-test-id ant-flex-align-center ant-flex-gap-small"
>
<button
aria-hidden="true"
class="ant-btn css-var-test-id ant-btn-default ant-btn-color-default ant-btn-variant-text ant-btn-sm ant-btn-icon-only"
type="button"
>
<span
class="ant-btn-icon"
>
<span
aria-label="pushpin"
class="anticon anticon-pushpin"
role="img"
>
<svg
aria-hidden="true"
data-icon="pushpin"
fill="currentColor"
focusable="false"
height="1em"
viewBox="64 64 896 896"
width="1em"
>
<path
d="M878.3 392.1L631.9 145.7c-6.5-6.5-15-9.7-23.5-9.7s-17 3.2-23.5 9.7L423.8 306.9c-12.2-1.4-24.5-2-36.8-2-73.2 0-146.4 24.1-206.5 72.3a33.23 33.23 0 00-2.7 49.4l181.7 181.7-215.4 215.2a15.8 15.8 0 00-4.6 9.8l-3.4 37.2c-.9 9.4 6.6 17.4 15.9 17.4.5 0 1 0 1.5-.1l37.2-3.4c3.7-.3 7.2-2 9.8-4.6l215.4-215.4 181.7 181.7c6.5 6.5 15 9.7 23.5 9.7 9.7 0 19.3-4.2 25.9-12.4 56.3-70.3 79.7-158.3 70.2-243.4l161.1-161.1c12.9-12.8 12.9-33.8 0-46.8zM666.2 549.3l-24.5 24.5 3.8 34.4a259.92 259.92 0 01-30.4 153.9L262 408.8c12.9-7.1 26.3-13.1 40.3-17.9 27.2-9.4 55.7-14.1 84.7-14.1 9.6 0 19.3.5 28.9 1.6l34.4 3.8 24.5-24.5L608.5 224 800 415.5 666.2 549.3z"
/>
</svg>
</span>
</span>
</button>
<button
aria-hidden="true"
class="ant-btn css-var-test-id ant-btn-text ant-btn-color-default ant-btn-variant-text ant-btn-sm ant-btn-icon-only"
type="button"
>
<span
class="ant-btn-icon"
>
<span
aria-label="info-circle"
class="anticon anticon-info-circle"
role="img"
>
<svg
aria-hidden="true"
data-icon="info-circle"
fill="currentColor"
focusable="false"
height="1em"
viewBox="64 64 896 896"
width="1em"
>
<path
d="M512 64C264.6 64 64 264.6 64 512s200.6 448 448 448 448-200.6 448-448S759.4 64 512 64zm0 820c-205.4 0-372-166.6-372-372s166.6-372 372-372 372 166.6 372 372-166.6 372-372 372z"
/>
<path
d="M464 336a48 48 0 1096 0 48 48 0 10-96 0zm72 112h-48c-4.4 0-8 3.6-8 8v272c0 4.4 3.6 8 8 8h48c4.4 0 8-3.6 8-8V456c0-4.4-3.6-8-8-8z"
/>
</svg>
</span>
</span>
</button>
</div>
</div>
<div
class="ant-typography css-var-test-id"
style="margin: 0px; font-size: 12px;"
>
额外内容元素,包含左边距、颜色、字体大小等额外操作区域的样式
</div>
</div>
</li>
<li
class="acss-1ehfz5v"
>
<div
class="ant-flex css-var-test-id ant-flex-align-stretch ant-flex-gap-small ant-flex-vertical"
>
<div
class="ant-flex css-var-test-id ant-flex-align-center ant-flex-justify-space-between ant-flex-gap-small"
>
<div
class="ant-flex css-var-test-id ant-flex-align-center ant-flex-gap-small"
>
<h5
class="ant-typography css-var-test-id"
style="margin: 0px;"
>
label
</h5>
<span
class="ant-tag ant-tag-filled ant-tag-blue css-var-test-id"
>
5.23.0
</span>
</div>
<div
class="ant-flex css-var-test-id ant-flex-align-center ant-flex-gap-small"
>
<button
aria-hidden="true"
class="ant-btn css-var-test-id ant-btn-default ant-btn-color-default ant-btn-variant-text ant-btn-sm ant-btn-icon-only"
type="button"
>
<span
class="ant-btn-icon"
>
<span
aria-label="pushpin"
class="anticon anticon-pushpin"
role="img"
>
<svg
aria-hidden="true"
data-icon="pushpin"
fill="currentColor"
focusable="false"
height="1em"
viewBox="64 64 896 896"
width="1em"
>
<path
d="M878.3 392.1L631.9 145.7c-6.5-6.5-15-9.7-23.5-9.7s-17 3.2-23.5 9.7L423.8 306.9c-12.2-1.4-24.5-2-36.8-2-73.2 0-146.4 24.1-206.5 72.3a33.23 33.23 0 00-2.7 49.4l181.7 181.7-215.4 215.2a15.8 15.8 0 00-4.6 9.8l-3.4 37.2c-.9 9.4 6.6 17.4 15.9 17.4.5 0 1 0 1.5-.1l37.2-3.4c3.7-.3 7.2-2 9.8-4.6l215.4-215.4 181.7 181.7c6.5 6.5 15 9.7 23.5 9.7 9.7 0 19.3-4.2 25.9-12.4 56.3-70.3 79.7-158.3 70.2-243.4l161.1-161.1c12.9-12.8 12.9-33.8 0-46.8zM666.2 549.3l-24.5 24.5 3.8 34.4a259.92 259.92 0 01-30.4 153.9L262 408.8c12.9-7.1 26.3-13.1 40.3-17.9 27.2-9.4 55.7-14.1 84.7-14.1 9.6 0 19.3.5 28.9 1.6l34.4 3.8 24.5-24.5L608.5 224 800 415.5 666.2 549.3z"
/>
</svg>
</span>
</span>
</button>
<button
aria-hidden="true"
class="ant-btn css-var-test-id ant-btn-text ant-btn-color-default ant-btn-variant-text ant-btn-sm ant-btn-icon-only"
type="button"
>
<span
class="ant-btn-icon"
>
<span
aria-label="info-circle"
class="anticon anticon-info-circle"
role="img"
>
<svg
aria-hidden="true"
data-icon="info-circle"
fill="currentColor"
focusable="false"
height="1em"
viewBox="64 64 896 896"
width="1em"
>
<path
d="M512 64C264.6 64 64 264.6 64 512s200.6 448 448 448 448-200.6 448-448S759.4 64 512 64zm0 820c-205.4 0-372-166.6-372-372s166.6-372 372-372 372 166.6 372 372-166.6 372-372 372z"
/>
<path
d="M464 336a48 48 0 1096 0 48 48 0 10-96 0zm72 112h-48c-4.4 0-8 3.6-8 8v272c0 4.4 3.6 8 8 8h48c4.4 0 8-3.6 8-8V456c0-4.4-3.6-8-8-8z"
/>
</svg>
</span>
</span>
</button>
</div>
</div>
<div
class="ant-typography css-var-test-id"
style="margin: 0px; font-size: 12px;"
>
标签元素,包含颜色、字体权重、字体大小、行高、文本对齐、冒号样式等标签文字的样式
</div>
</div>
</li>
<li
class="acss-1ehfz5v"
>
<div
class="ant-flex css-var-test-id ant-flex-align-stretch ant-flex-gap-small ant-flex-vertical"
>
<div
class="ant-flex css-var-test-id ant-flex-align-center ant-flex-justify-space-between ant-flex-gap-small"
>
<div
class="ant-flex css-var-test-id ant-flex-align-center ant-flex-gap-small"
>
<h5
class="ant-typography css-var-test-id"
style="margin: 0px;"
>
content
</h5>
<span
class="ant-tag ant-tag-filled ant-tag-blue css-var-test-id"
>
5.23.0
</span>
</div>
<div
class="ant-flex css-var-test-id ant-flex-align-center ant-flex-gap-small"
>
<button
aria-hidden="true"
class="ant-btn css-var-test-id ant-btn-default ant-btn-color-default ant-btn-variant-text ant-btn-sm ant-btn-icon-only"
type="button"
>
<span
class="ant-btn-icon"
>
<span
aria-label="pushpin"
class="anticon anticon-pushpin"
role="img"
>
<svg
aria-hidden="true"
data-icon="pushpin"
fill="currentColor"
focusable="false"
height="1em"
viewBox="64 64 896 896"
width="1em"
>
<path
d="M878.3 392.1L631.9 145.7c-6.5-6.5-15-9.7-23.5-9.7s-17 3.2-23.5 9.7L423.8 306.9c-12.2-1.4-24.5-2-36.8-2-73.2 0-146.4 24.1-206.5 72.3a33.23 33.23 0 00-2.7 49.4l181.7 181.7-215.4 215.2a15.8 15.8 0 00-4.6 9.8l-3.4 37.2c-.9 9.4 6.6 17.4 15.9 17.4.5 0 1 0 1.5-.1l37.2-3.4c3.7-.3 7.2-2 9.8-4.6l215.4-215.4 181.7 181.7c6.5 6.5 15 9.7 23.5 9.7 9.7 0 19.3-4.2 25.9-12.4 56.3-70.3 79.7-158.3 70.2-243.4l161.1-161.1c12.9-12.8 12.9-33.8 0-46.8zM666.2 549.3l-24.5 24.5 3.8 34.4a259.92 259.92 0 01-30.4 153.9L262 408.8c12.9-7.1 26.3-13.1 40.3-17.9 27.2-9.4 55.7-14.1 84.7-14.1 9.6 0 19.3.5 28.9 1.6l34.4 3.8 24.5-24.5L608.5 224 800 415.5 666.2 549.3z"
/>
</svg>
</span>
</span>
</button>
<button
aria-hidden="true"
class="ant-btn css-var-test-id ant-btn-text ant-btn-color-default ant-btn-variant-text ant-btn-sm ant-btn-icon-only"
type="button"
>
<span
class="ant-btn-icon"
>
<span
aria-label="info-circle"
class="anticon anticon-info-circle"
role="img"
>
<svg
aria-hidden="true"
data-icon="info-circle"
fill="currentColor"
focusable="false"
height="1em"
viewBox="64 64 896 896"
width="1em"
>
<path
d="M512 64C264.6 64 64 264.6 64 512s200.6 448 448 448 448-200.6 448-448S759.4 64 512 64zm0 820c-205.4 0-372-166.6-372-372s166.6-372 372-372 372 166.6 372 372-166.6 372-372 372z"
/>
<path
d="M464 336a48 48 0 1096 0 48 48 0 10-96 0zm72 112h-48c-4.4 0-8 3.6-8 8v272c0 4.4 3.6 8 8 8h48c4.4 0 8-3.6 8-8V456c0-4.4-3.6-8-8-8z"
/>
</svg>
</span>
</span>
</button>
</div>
</div>
<div
class="ant-typography css-var-test-id"
style="margin: 0px; font-size: 12px;"
>
内容元素,包含表格单元格布局、颜色、字体大小、行高、文字换行等内容展示样式
</div>
</div>
</li>
</ul>
</div>
</div>
</div>
`;

View File

@@ -0,0 +1,3 @@
import { semanticDemoTest } from '../../../tests/shared/demoTest';
semanticDemoTest('descriptions');

View File

@@ -0,0 +1,385 @@
// Jest Snapshot v1, https://jestjs.io/docs/snapshot-testing
exports[`renders components/divider/demo/_semantic.tsx correctly 1`] = `
<div
class="acss-1ucck97"
>
<div
class="ant-row css-var-test-id"
>
<div
class="ant-col ant-col-16 acss-my3sst css-var-test-id"
>
<div>
<p>
Lorem ipsum dolor sit amet, consectetur adipiscing elit. Sed nonne merninisti licere mihi ista probare, quae sunt a te dicta? Refert tamen, quo modo.
</p>
<div
class="ant-divider css-var-test-id ant-divider-horizontal ant-divider-rail semantic-mark-rail semantic-mark-root"
role="separator"
/>
<p>
Lorem ipsum dolor sit amet, consectetur adipiscing elit. Sed nonne merninisti licere mihi ista probare, quae sunt a te dicta? Refert tamen, quo modo.
</p>
<div
class="ant-divider css-var-test-id ant-divider-horizontal ant-divider-with-text ant-divider-with-text-center semantic-mark-root"
role="separator"
>
<div
class="ant-divider-rail ant-divider-rail-start semantic-mark-rail"
/>
<span
class="ant-divider-inner-text semantic-mark-content"
>
Solid
</span>
<div
class="ant-divider-rail ant-divider-rail-end semantic-mark-rail"
/>
</div>
<p>
Lorem ipsum dolor sit amet, consectetur adipiscing elit. Sed nonne merninisti licere mihi ista probare, quae sunt a te dicta? Refert tamen, quo modo.
</p>
<div
class="ant-divider css-var-test-id ant-divider-horizontal ant-divider-with-text ant-divider-with-text-start ant-divider-dotted semantic-mark-root"
role="separator"
>
<div
class="ant-divider-rail ant-divider-rail-start semantic-mark-rail"
/>
<span
class="ant-divider-inner-text semantic-mark-content"
>
Dotted
</span>
<div
class="ant-divider-rail ant-divider-rail-end semantic-mark-rail"
/>
</div>
<p>
Lorem ipsum dolor sit amet, consectetur adipiscing elit. Sed nonne merninisti licere mihi ista probare, quae sunt a te dicta? Refert tamen, quo modo.
</p>
<div
class="ant-divider css-var-test-id ant-divider-horizontal ant-divider-with-text ant-divider-with-text-end ant-divider-dashed semantic-mark-root"
role="separator"
>
<div
class="ant-divider-rail ant-divider-rail-start semantic-mark-rail"
/>
<span
class="ant-divider-inner-text semantic-mark-content"
>
Dashed
</span>
<div
class="ant-divider-rail ant-divider-rail-end semantic-mark-rail"
/>
</div>
These
<div
class="ant-divider css-var-test-id ant-divider-vertical ant-divider-rail semantic-mark-rail semantic-mark-root"
role="separator"
/>
are
<div
class="ant-divider css-var-test-id ant-divider-vertical ant-divider-rail semantic-mark-rail semantic-mark-root"
role="separator"
/>
vertical
<div
class="ant-divider css-var-test-id ant-divider-vertical ant-divider-rail semantic-mark-rail semantic-mark-root"
role="separator"
/>
Dividers
</div>
</div>
<div
class="ant-col ant-col-8 css-var-test-id"
>
<ul
class="acss-1ry21g5"
>
<li
class="acss-1ehfz5v"
>
<div
class="ant-flex css-var-test-id ant-flex-align-stretch ant-flex-gap-small ant-flex-vertical"
>
<div
class="ant-flex css-var-test-id ant-flex-align-center ant-flex-justify-space-between ant-flex-gap-small"
>
<div
class="ant-flex css-var-test-id ant-flex-align-center ant-flex-gap-small"
>
<h5
class="ant-typography css-var-test-id"
style="margin: 0px;"
>
root
</h5>
</div>
<div
class="ant-flex css-var-test-id ant-flex-align-center ant-flex-gap-small"
>
<button
aria-hidden="true"
class="ant-btn css-var-test-id ant-btn-default ant-btn-color-default ant-btn-variant-text ant-btn-sm ant-btn-icon-only"
type="button"
>
<span
class="ant-btn-icon"
>
<span
aria-label="pushpin"
class="anticon anticon-pushpin"
role="img"
>
<svg
aria-hidden="true"
data-icon="pushpin"
fill="currentColor"
focusable="false"
height="1em"
viewBox="64 64 896 896"
width="1em"
>
<path
d="M878.3 392.1L631.9 145.7c-6.5-6.5-15-9.7-23.5-9.7s-17 3.2-23.5 9.7L423.8 306.9c-12.2-1.4-24.5-2-36.8-2-73.2 0-146.4 24.1-206.5 72.3a33.23 33.23 0 00-2.7 49.4l181.7 181.7-215.4 215.2a15.8 15.8 0 00-4.6 9.8l-3.4 37.2c-.9 9.4 6.6 17.4 15.9 17.4.5 0 1 0 1.5-.1l37.2-3.4c3.7-.3 7.2-2 9.8-4.6l215.4-215.4 181.7 181.7c6.5 6.5 15 9.7 23.5 9.7 9.7 0 19.3-4.2 25.9-12.4 56.3-70.3 79.7-158.3 70.2-243.4l161.1-161.1c12.9-12.8 12.9-33.8 0-46.8zM666.2 549.3l-24.5 24.5 3.8 34.4a259.92 259.92 0 01-30.4 153.9L262 408.8c12.9-7.1 26.3-13.1 40.3-17.9 27.2-9.4 55.7-14.1 84.7-14.1 9.6 0 19.3.5 28.9 1.6l34.4 3.8 24.5-24.5L608.5 224 800 415.5 666.2 549.3z"
/>
</svg>
</span>
</span>
</button>
<button
aria-hidden="true"
class="ant-btn css-var-test-id ant-btn-text ant-btn-color-default ant-btn-variant-text ant-btn-sm ant-btn-icon-only"
type="button"
>
<span
class="ant-btn-icon"
>
<span
aria-label="info-circle"
class="anticon anticon-info-circle"
role="img"
>
<svg
aria-hidden="true"
data-icon="info-circle"
fill="currentColor"
focusable="false"
height="1em"
viewBox="64 64 896 896"
width="1em"
>
<path
d="M512 64C264.6 64 64 264.6 64 512s200.6 448 448 448 448-200.6 448-448S759.4 64 512 64zm0 820c-205.4 0-372-166.6-372-372s166.6-372 372-372 372 166.6 372 372-166.6 372-372 372z"
/>
<path
d="M464 336a48 48 0 1096 0 48 48 0 10-96 0zm72 112h-48c-4.4 0-8 3.6-8 8v272c0 4.4 3.6 8 8 8h48c4.4 0 8-3.6 8-8V456c0-4.4-3.6-8-8-8z"
/>
</svg>
</span>
</span>
</button>
</div>
</div>
<div
class="ant-typography css-var-test-id"
style="margin: 0px; font-size: 12px;"
>
根元素,包含边框顶部样式、分隔线样式等分割线容器的基础样式
</div>
</div>
</li>
<li
class="acss-1ehfz5v"
>
<div
class="ant-flex css-var-test-id ant-flex-align-stretch ant-flex-gap-small ant-flex-vertical"
>
<div
class="ant-flex css-var-test-id ant-flex-align-center ant-flex-justify-space-between ant-flex-gap-small"
>
<div
class="ant-flex css-var-test-id ant-flex-align-center ant-flex-gap-small"
>
<h5
class="ant-typography css-var-test-id"
style="margin: 0px;"
>
rail
</h5>
</div>
<div
class="ant-flex css-var-test-id ant-flex-align-center ant-flex-gap-small"
>
<button
aria-hidden="true"
class="ant-btn css-var-test-id ant-btn-default ant-btn-color-default ant-btn-variant-text ant-btn-sm ant-btn-icon-only"
type="button"
>
<span
class="ant-btn-icon"
>
<span
aria-label="pushpin"
class="anticon anticon-pushpin"
role="img"
>
<svg
aria-hidden="true"
data-icon="pushpin"
fill="currentColor"
focusable="false"
height="1em"
viewBox="64 64 896 896"
width="1em"
>
<path
d="M878.3 392.1L631.9 145.7c-6.5-6.5-15-9.7-23.5-9.7s-17 3.2-23.5 9.7L423.8 306.9c-12.2-1.4-24.5-2-36.8-2-73.2 0-146.4 24.1-206.5 72.3a33.23 33.23 0 00-2.7 49.4l181.7 181.7-215.4 215.2a15.8 15.8 0 00-4.6 9.8l-3.4 37.2c-.9 9.4 6.6 17.4 15.9 17.4.5 0 1 0 1.5-.1l37.2-3.4c3.7-.3 7.2-2 9.8-4.6l215.4-215.4 181.7 181.7c6.5 6.5 15 9.7 23.5 9.7 9.7 0 19.3-4.2 25.9-12.4 56.3-70.3 79.7-158.3 70.2-243.4l161.1-161.1c12.9-12.8 12.9-33.8 0-46.8zM666.2 549.3l-24.5 24.5 3.8 34.4a259.92 259.92 0 01-30.4 153.9L262 408.8c12.9-7.1 26.3-13.1 40.3-17.9 27.2-9.4 55.7-14.1 84.7-14.1 9.6 0 19.3.5 28.9 1.6l34.4 3.8 24.5-24.5L608.5 224 800 415.5 666.2 549.3z"
/>
</svg>
</span>
</span>
</button>
<button
aria-hidden="true"
class="ant-btn css-var-test-id ant-btn-text ant-btn-color-default ant-btn-variant-text ant-btn-sm ant-btn-icon-only"
type="button"
>
<span
class="ant-btn-icon"
>
<span
aria-label="info-circle"
class="anticon anticon-info-circle"
role="img"
>
<svg
aria-hidden="true"
data-icon="info-circle"
fill="currentColor"
focusable="false"
height="1em"
viewBox="64 64 896 896"
width="1em"
>
<path
d="M512 64C264.6 64 64 264.6 64 512s200.6 448 448 448 448-200.6 448-448S759.4 64 512 64zm0 820c-205.4 0-372-166.6-372-372s166.6-372 372-372 372 166.6 372 372-166.6 372-372 372z"
/>
<path
d="M464 336a48 48 0 1096 0 48 48 0 10-96 0zm72 112h-48c-4.4 0-8 3.6-8 8v272c0 4.4 3.6 8 8 8h48c4.4 0 8-3.6 8-8V456c0-4.4-3.6-8-8-8z"
/>
</svg>
</span>
</span>
</button>
</div>
</div>
<div
class="ant-typography css-var-test-id"
style="margin: 0px; font-size: 12px;"
>
背景条元素,包含边框顶部样式等分割线连接条的样式
</div>
</div>
</li>
<li
class="acss-1ehfz5v"
>
<div
class="ant-flex css-var-test-id ant-flex-align-stretch ant-flex-gap-small ant-flex-vertical"
>
<div
class="ant-flex css-var-test-id ant-flex-align-center ant-flex-justify-space-between ant-flex-gap-small"
>
<div
class="ant-flex css-var-test-id ant-flex-align-center ant-flex-gap-small"
>
<h5
class="ant-typography css-var-test-id"
style="margin: 0px;"
>
content
</h5>
</div>
<div
class="ant-flex css-var-test-id ant-flex-align-center ant-flex-gap-small"
>
<button
aria-hidden="true"
class="ant-btn css-var-test-id ant-btn-default ant-btn-color-default ant-btn-variant-text ant-btn-sm ant-btn-icon-only"
type="button"
>
<span
class="ant-btn-icon"
>
<span
aria-label="pushpin"
class="anticon anticon-pushpin"
role="img"
>
<svg
aria-hidden="true"
data-icon="pushpin"
fill="currentColor"
focusable="false"
height="1em"
viewBox="64 64 896 896"
width="1em"
>
<path
d="M878.3 392.1L631.9 145.7c-6.5-6.5-15-9.7-23.5-9.7s-17 3.2-23.5 9.7L423.8 306.9c-12.2-1.4-24.5-2-36.8-2-73.2 0-146.4 24.1-206.5 72.3a33.23 33.23 0 00-2.7 49.4l181.7 181.7-215.4 215.2a15.8 15.8 0 00-4.6 9.8l-3.4 37.2c-.9 9.4 6.6 17.4 15.9 17.4.5 0 1 0 1.5-.1l37.2-3.4c3.7-.3 7.2-2 9.8-4.6l215.4-215.4 181.7 181.7c6.5 6.5 15 9.7 23.5 9.7 9.7 0 19.3-4.2 25.9-12.4 56.3-70.3 79.7-158.3 70.2-243.4l161.1-161.1c12.9-12.8 12.9-33.8 0-46.8zM666.2 549.3l-24.5 24.5 3.8 34.4a259.92 259.92 0 01-30.4 153.9L262 408.8c12.9-7.1 26.3-13.1 40.3-17.9 27.2-9.4 55.7-14.1 84.7-14.1 9.6 0 19.3.5 28.9 1.6l34.4 3.8 24.5-24.5L608.5 224 800 415.5 666.2 549.3z"
/>
</svg>
</span>
</span>
</button>
<button
aria-hidden="true"
class="ant-btn css-var-test-id ant-btn-text ant-btn-color-default ant-btn-variant-text ant-btn-sm ant-btn-icon-only"
type="button"
>
<span
class="ant-btn-icon"
>
<span
aria-label="info-circle"
class="anticon anticon-info-circle"
role="img"
>
<svg
aria-hidden="true"
data-icon="info-circle"
fill="currentColor"
focusable="false"
height="1em"
viewBox="64 64 896 896"
width="1em"
>
<path
d="M512 64C264.6 64 64 264.6 64 512s200.6 448 448 448 448-200.6 448-448S759.4 64 512 64zm0 820c-205.4 0-372-166.6-372-372s166.6-372 372-372 372 166.6 372 372-166.6 372-372 372z"
/>
<path
d="M464 336a48 48 0 1096 0 48 48 0 10-96 0zm72 112h-48c-4.4 0-8 3.6-8 8v272c0 4.4 3.6 8 8 8h48c4.4 0 8-3.6 8-8V456c0-4.4-3.6-8-8-8z"
/>
</svg>
</span>
</span>
</button>
</div>
</div>
<div
class="ant-typography css-var-test-id"
style="margin: 0px; font-size: 12px;"
>
内容元素,包含行内块显示、内边距等分割线文本内容的样式
</div>
</div>
</li>
</ul>
</div>
</div>
</div>
`;

View File

@@ -0,0 +1,3 @@
import { semanticDemoTest } from '../../../tests/shared/demoTest';
semanticDemoTest('divider');

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