333 Commits

Author SHA1 Message Date
二货爱吃白萝卜
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
高艳兵
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
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
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
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
高艳兵
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
lijianan
75ddcdfd00 refactor: 🛠 use genCssVar hook to generate CSS variables (#56546)
* refactor: 🛠 use genCssVar hook to generate CSS variables

* update

* update

* update

* update

* update

* Update components/tooltip/style/index.ts

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

* update

* fix: update

---------

Signed-off-by: lijianan <574980606@qq.com>
Co-authored-by: thinkasany <480968828@qq.com>
2026-01-09 22:24:19 +08:00
lijianan
ba47850fa0 refactor: 🛠 use genCssVar hook to generate CSS variables (#56529) 2026-01-09 13:40:44 +08:00
高艳兵
8393f59cd3 docs(Button): hide deprecated groupBorderColor from token table (#56297) 2025-12-22 11:37:53 +08:00
余晖
25a37ed20a fix(button): primaryColor and dangerColor tokens not working with sol… (#55934)
* fix(button): primaryColor and dangerColor tokens not working with solid variant

- Add text color override for primary solid variant
- Add text color override for danger solid variant
- Align implementation with default button pattern
- Add demo test case for token customization

* fix(button): primaryColor and dangerColor tokens not working with solid variant

- Add text color override for primary solid variant
- Add text color override for danger solid variant
- Align implementation with default button pattern
- Add demo test case for token customization

* fix(Button): fix tokens not working with solid, outlined and dashed variants

---------

Co-authored-by: 遇见同学 <1875694521@qq.com>
Co-authored-by: Amumu <yoyo837@hotmail.com>
2025-12-03 16:49:07 +08:00
Andrew
ef52e15a93 fix(Button): incorrect hover color for default solid button (#55825)
Co-authored-by: 遇见同学 <1875694521@qq.com>
2025-11-24 10:21:14 +08:00
thinkasany
6fc6ad1f4c chore: clean up unused style code (#55074) 2025-09-18 22:12:43 +08:00
thinkasany
bc259515bf chore: sync feature into next 2025-09-18 20:57:37 +08:00
Guo Yunhe
c172411eb4 fix(Button): icon-only button padding affected by theme (#54970) 2025-09-15 10:58:55 +08:00
二货机器人
7f01ee60b9 chore: merge master 2025-09-02 18:00:34 +08:00
Guo Yunhe
23a2b5ec96 fix(Button): round padding (#54845) 2025-09-02 17:55:40 +08:00
thinkasany
f8aef9a622 chore: sync feature into next 2025-09-01 19:32:59 +08:00
afc163
47307bec98 fix: Button token.paddingInline not working when shape="round" (#54787) 2025-08-28 23:04:10 +08:00
afc163
754d8bb058 Revert "fix(Button): paddingInline token not working (#54775)" (#54778)
This reverts commit 95730ba90f.

Co-authored-by: thinkasany <480968828@qq.com>
2025-08-28 14:22:41 +08:00
Guo Yunhe
95730ba90f fix(Button): paddingInline token not working (#54775) 2025-08-28 12:32:38 +08:00
thinkasany
d8224361a1 chore: sync feature into next 2025-08-11 21:34:00 +08:00
Guo Yunhe
c2ec447866 feat(Button): add iconGap design token (#54629) 2025-08-09 22:17:46 +08:00
Łukasz Komoszyński
0b5a36f330 fix: hover/active text color of filled button with href (#54614) 2025-08-07 21:34:48 +08:00
EmilyyyLiu
92c115e5a2 feat[Button]: Semantic Placement Naming Standardization (#54279)
* feat[Button]: "iconPosition" instead "iconPlacement"

* test: add test to iconPlacement

* docs: Modify the 'iconPosition' of other demo

* Update components/button/button.tsx

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

* docs: change docs (iconPosition)

* docs: change fileName (icon-position -> icon-placement)

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

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

* test: update snapshots

---------

Signed-off-by: EmilyyyLiu <100924403+EmilyyyLiu@users.noreply.github.com>
Co-authored-by: 刘欢 <lh01217311@antgroup.com>
Co-authored-by: thinkasany <480968828@qq.com>
2025-07-03 17:32:08 +08:00
二货爱吃白萝卜
9115c60baa feat: FloatButton support semantic structure & ConfigProvider support passing related props (#54145)
* chore: init

* chore: badge

* test: update test case

* chore: clean up part

* chore: fix lint

* docs: update doc

* docs: api in

* test: coverage

* docs: update doc

* chore: simplify

* test: fix test case

* chore: fix lint

* chore: fix lint

* chore: simplify

* chore: update comment
2025-06-20 16:18:46 +08:00
afc163
5f6ba68e7d chore: fix eslint errors and warnings in next branch 2025-06-19 22:18:10 +08:00
二货爱吃白萝卜
c7a7f474c6 refactor: Button use css var instead of for loop generate style (#54100)
* refactor: use css var

* test: update snapshot

* chore: fix style

* test: update snapshot

* chore: dynamic naming

* test: fix test case

* test: fix test case

* test: fix test case
2025-06-17 10:48:32 +08:00
Ryan
ec3b479076 feat: Customize background colors of default & dashed buttons in disabled state (#52839)
* feat: Supports customizing the background color of default type buttons in disabled state

* test: add corresponding test case

* feat: Supports customizing the background color of dashed type buttons in disabled state

* test: add corresponding test case

* chore: add custom disabled backgroundColor demo

* chore: add snapshot

* chore: add whitespace

* chore: Modify the variable name of the button token

* test: update test

* chore: update snapshot

* chore: update snapshot

* Update components/button/style/token.ts

docs: update comments

Co-authored-by: thinkasany <480968828@qq.com>
Signed-off-by: Ryan <55972954+yellowryan@users.noreply.github.com>

---------

Signed-off-by: Ryan <55972954+yellowryan@users.noreply.github.com>
Co-authored-by: thinkasany <480968828@qq.com>
2025-03-13 15:28:42 +08:00
二货机器人
f45cd8bfc4 chore: merge master 2025-02-18 19:56:12 +08:00
二货爱吃白萝卜
63cbe9e1f0 fix: Button missing primary style (#52812)
* fix: Button style of preset

* chore: add info of fix

* docs: update demo

* chore: fix lint

* test: update snapshot

* fix: color of link

* test: update snapshot

* test: update snapshot
2025-02-17 16:04:02 +08:00
thinkasany
bd2e46996d chore: sync feature into next 2025-02-10 21:17:12 +08:00
afc163
51a213873c fix: Button shadow color should be transparent (#52701) 2025-02-10 11:21:10 +08:00
thinkasany
1118d06a29 chore: sync feature into next 2025-01-21 19:11:51 +08:00
Jony J
c2e4f23f4c feat(design): [v6] add colorBorderDisabled token (#52421)
* feat(design-token): add colorBorderDisabled token

* fix: add token in dark mode

* fix: compatible with legacy token

* docs: improve demo

* fix: compatible with legacy token

* docs: update demo

* test: update snapshot

* docs: adjust demo & logic

---------

Co-authored-by: thinkasany <480968828@qq.com>
Co-authored-by: 二货机器人 <smith3816@gmail.com>
2025-01-21 18:12:24 +08:00
afc163
f50a8e6175 chore: remove warning of cssinjs in Space.Compact (#52489) 2025-01-20 15:09:49 +08:00
afc163
bd0d445668 style: tweak icon-only button font-size to align icon and text (#52353)
* style: tweak icon-only button font-size to align icon and text

* fix

* fix
2025-01-12 14:40:42 +08:00
二货爱吃白萝卜
ba415fcabc fix: Button color boxShadow missing (#52304)
* fix: Button color boxShadow missing

* chore: add comment
2025-01-08 20:28:19 +08:00
thinkasany
370ccc73da fix: resolved merge conflicts 2024-12-27 10:28:57 +08:00
afc163
fd31d300ed fix: Button icon align issue again (#52132)
* fix: Button icon align issue again

* fix align

* fix align

* fix

* fix

* buttonPaddingVertical => 0

* fix icon only vertical align
2024-12-26 17:00:23 +08:00
afc163
e034a33f22 chore: merge master to feature 2024-12-23 21:23:08 +08:00
afc163
6a0eda0f99 fix(Button): align buttons with and without icons consistently (#52070)
* fix(Button): align buttons with and without icons consistently

* test: update snapshot

* fix align

* fix align

* fix button align

* fix button align

* fix button align

* update snapshot
2024-12-23 17:09:07 +08:00
二货爱吃白萝卜
890a86bcc2 fix: Button with loading motion (#52059)
* fix: button loading icon motion

* test: update snapshot

* test: update snapshot

* test: update snapshot
2024-12-19 19:29:51 +08:00
github-actions[bot]
d20a07405f chore: auto merge branches (#52047)
chore: merge master into feature
2024-12-19 08:12:06 +00:00
DDDDD12138
7db7d52563 fix(button): ensure solid default button text remains visible on hover in dark mode (#52024) 2024-12-17 10:05:20 +08:00
Oyster Lee
6b98f84c62 feat(Button): support color from Antd's colors (#51550)
* feat(button): add antd preset colors

* chore(button): add colors to docs

* test(button): add tests for colors

* refactor: remove LiteralUnion

* test: add const to colors

* refactor(button): import from preset colors

* chore(button): update docs

* test(button): test with preset colors

* test(button): import from relative path

* fix(button): color

* fix(button): add missing box shadow

* test(button): merge preset colors and variants test case

* refactor(button): use light color as box shadow

* refactor(button): set hover color to 5

* docs(button): update doc

* docs(button): update doc

---------

Co-authored-by: ice <49827327+coding-ice@users.noreply.github.com>
Co-authored-by: lijianan <574980606@qq.com>
2024-12-09 14:27:07 +08:00
afc163
0d5f4ff95c chore: remove useless var (#51689) 2024-11-19 17:31:13 +08:00
afc163
e34a6a8c6f fix: Button custom icon is not align center (#51652) 2024-11-18 12:03:52 +08:00
afc163
a1bc111875 refactor: tweak button style code (#51646) 2024-11-18 10:27:12 +08:00
𝑾𝒖𝒙𝒉
7379233810 Revert "fix(icon-button): Button icon not vertically centered error" (#51588) 2024-11-12 13:49:12 +08:00
𝑾𝒖𝒙𝒉
c69e943eeb fix(icon-button): Button icon not vertically centered error (#51381) 2024-10-26 23:54:03 +08:00