Skip to content
New issue

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

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

Already on GitHub? Sign in to your account

[pull] master from ant-design:master #137

Closed
wants to merge 372 commits into from
Closed
Changes from 1 commit
Commits
Show all changes
372 commits
Select commit Hold shift + click to select a range
20d12f8
chore(deps-dev): bump typescript from 5.1.6 to 5.2.2 (#44430)
dependabot[bot] Aug 27, 2023
20593af
type: revert type import path (#44453)
li-jia-nan Aug 28, 2023
4ba36dc
chore: Update index.zh-CN.md (#44441)
afc163 Aug 28, 2023
3e171a9
feat: default add resetIcon Style (#41208)
Wxh16144 Aug 28, 2023
ef61160
doc: update token note (#44447)
poyiding Aug 28, 2023
e7c7601
feat: Modal footer support custom render function (#44318)
RedJue Aug 28, 2023
4a896e9
feat: Support source in the onSearch handler of Input.Search Componen…
kiner-tang Aug 28, 2023
74f6040
fix: carousel vertical drag issue (#44460)
RedJue Aug 28, 2023
bbbc3d9
docs: v5.8.5 (#44461)
vagusX Aug 28, 2023
6f2bddd
feat: Table support `virtual` (#44349)
zombieJ Aug 28, 2023
97b03dc
fix: rm useless ts def of upload (#44468)
zombieJ Aug 28, 2023
07056fa
docs: fix theme card style in Firefox (#44473)
afc163 Aug 28, 2023
4d1bac4
site: add code-hide Button for CodePreviewer (#44449)
li-jia-nan Aug 28, 2023
2d1d987
fix: color picker open popup when disabled (#44466)
RedJue Aug 28, 2023
a95662d
refactor: button default not use compact style (#44475)
zombieJ Aug 28, 2023
16f8228
chore: merge master
zombieJ Aug 28, 2023
345a3a0
fix: Form 与 Grid 样式冲突问题 (#44472)
crazyair Aug 28, 2023
fec423e
docs: Update definition for dashed button (#44481)
fulldecent Aug 29, 2023
bb8705a
chore: auto merge branches (#44479)
github-actions[bot] Aug 29, 2023
c70ba36
chore: disabled compat/compat in test files (#44496)
MadCcc Aug 29, 2023
fae1fef
fix: add role="button" props to div (#44494)
li-jia-nan Aug 29, 2023
457feb7
docs(select): fix incorrect link of AutoComplete (#44500)
xhofe Aug 29, 2023
7a66d46
refactor: Form style should always before Grid (#44485)
zombieJ Aug 29, 2023
d31a19a
chore: feature merge master
zombieJ Aug 29, 2023
230231a
chore: auto merge branches (#44502)
github-actions[bot] Aug 29, 2023
0f87c9d
fix: Watermark should not crash if content is empty (#44501)
MadCcc Aug 29, 2023
07c03d1
feat: Tabs support indicatorLength (#44406)
MadCcc Aug 29, 2023
9c494ab
fix: transfer label height (#44471)
kovsu Aug 29, 2023
8d7dd80
docs: Update batch of docs & demos (#44509)
zombieJ Aug 29, 2023
629efb7
perf: Notification style should be generated when shown (#44488)
MadCcc Aug 29, 2023
acdf115
refactor: Extract Tag unused style (#44512)
zombieJ Aug 29, 2023
620e168
chore: feature merge master
zombieJ Aug 29, 2023
64d7ac1
test: update snapshot
zombieJ Aug 29, 2023
64fd1cd
chore(deps-dev): bump @typescript-eslint/eslint-plugin from 5.62.0 to…
dependabot[bot] Aug 29, 2023
f5de020
Merge branch 'master' into feature-merge-master
li-jia-nan Aug 29, 2023
59cc096
test: fix test case
zombieJ Aug 29, 2023
0cd139e
Merge branch 'feature-merge-master' of https://github.com/ant-design/…
zombieJ Aug 29, 2023
6ebbdc9
feat✨(transfer):Add a new direction parameter for filterOption func…
Zian502 Aug 29, 2023
25e7641
chore: fix lint
zombieJ Aug 29, 2023
639c0c2
chore: auto merge branches (#44516)
github-actions[bot] Aug 29, 2023
7e1e6d8
chore: fix overview search (#44523)
crazyair Aug 30, 2023
e88581c
chore: migrate rome to biome (#44522)
fz6m Aug 30, 2023
659054e
docs: Blog virtual table (#44526)
zombieJ Aug 30, 2023
b0dd138
feat: ConfigProvider support Tabs `indicatorSize` (#44517)
MadCcc Aug 30, 2023
cbfb126
feat: Descriptions `items.span` support responsive config (#44534)
zombieJ Aug 30, 2023
3f148d9
docs: add help text for token customization
afc163 Aug 30, 2023
a265257
fix: record the completed length of the last calculation as the trans…
bbb169 Aug 30, 2023
d0cc758
fix: Form sm 24 not working (#44541)
zombieJ Aug 31, 2023
ae53a45
docs: add help text for token customization (#44540)
afc163 Aug 31, 2023
a608bfa
chore: fix form demo error (#44549)
li-jia-nan Aug 31, 2023
48ebf3a
site: fix a link flash jump (#44556)
poyiding Aug 31, 2023
d3c2f75
refactor: ConfirmModal layout to fix batch of bug (#44557)
zombieJ Aug 31, 2023
b0f0975
docs: update form docs description (#44548)
serene-ding Aug 31, 2023
b12d69c
chore: merge master into feature
li-jia-nan Aug 31, 2023
e19a808
chore: auto merge branches (#44567)
github-actions[bot] Aug 31, 2023
a3d8bf9
chore: update docs use with Next.js (#44569)
li-jia-nan Sep 1, 2023
e23cc69
feat: support hide expandIcon (#44554)
kiner-tang Sep 1, 2023
e689878
chore: Update happy-work.zh-CN.md (#44572)
afc163 Sep 1, 2023
41ef050
chore: typo (#44579)
kovsu Sep 1, 2023
9258dea
docs: add note regarding considerations for using getContainer (#44504)
Wxh16144 Sep 1, 2023
7198497
fix: hide arrow for last item in vertical Steps (#44582)
ohhoney1 Sep 1, 2023
edf907b
fix: slider track draggale range height/width error (#44503)
yoyo837 Sep 1, 2023
24c7b2e
site: optimize site scroll bar dark mode style (#44588)
KuangPF Sep 2, 2023
9a2ef0e
chore: update README (#44589)
poyiding Sep 2, 2023
9f8d68d
fix: fix CI fail (#44592)
li-jia-nan Sep 2, 2023
3f01f83
docs: remove READMEs but ENG and CHN (#44596)
afc163 Sep 2, 2023
27d8f62
chore(float-button): remove unused css code (#44587)
zbw-zbw Sep 2, 2023
5706f21
chore: skip husky install in ci environment (#44600)
afc163 Sep 2, 2023
8099247
docs(:sparkles:): release 5.8.6 (#44597)
afc163 Sep 2, 2023
ad46da1
Merge branch 'master' into feature-merge-master
yoyo837 Sep 2, 2023
9d162d3
docs: sort i18n table (#44603)
yoyo837 Sep 2, 2023
5a5af38
fix: CheckableTag miss CP tag (#44602)
zombieJ Sep 3, 2023
18af537
Merge branch 'master' into feature-merge-master
li-jia-nan Sep 3, 2023
c83c587
chore: auto merge branches (#44601)
github-actions[bot] Sep 3, 2023
0f843cf
chore: fix docs typo (#44604)
li-jia-nan Sep 4, 2023
0396899
fix: Form.Item `noStyle` support validation status (#44576)
zombieJ Sep 4, 2023
85dc67f
feature: add itemSelectedFontColor token in Segemented Component (#4…
xiaozisong Sep 4, 2023
c29e91d
docs: Blog of extends of ConfigProvider (#44606)
zombieJ Sep 4, 2023
c7a0928
docs: add faq about valuePropName (#44609)
zombieJ Sep 4, 2023
56724cd
fix(Upload): action buttons focus style leave after click it (#44594)
zbw-zbw Sep 4, 2023
b284648
refactor: fix compiling (#44616)
MadCcc Sep 4, 2023
54316f7
test: disable timeout for puppeteer waitForSelector (#44611)
afc163 Sep 4, 2023
f0c105d
feat: insert `use client` automatically at compilations instead of …
Dunqing Sep 4, 2023
4c91896
refactor: use token instead of constant in size (#44598)
li-jia-nan Sep 4, 2023
46341b1
feat: custom feedback icons (#43894)
gldio Sep 4, 2023
6a5e7de
refactor: remove Space & Grid IE compatible logic (#44620)
li-jia-nan Sep 5, 2023
ef4ccae
chore: migrate to actions/checkout@v4 (#44623)
MadCcc Sep 5, 2023
114ff39
Merge branch 'master' into feature-merge-master
MadCcc Sep 5, 2023
03fee8d
feat: export BasicDataNode type from tree (#44624)
kiner-tang Sep 5, 2023
caa71d4
chore: auto merge branches (#44629)
github-actions[bot] Sep 5, 2023
69c52b7
feat: ColorPicker support defaultFormat (#44487)
CYBYOB Sep 5, 2023
49e1efa
fix: fix date-picker footer style (#44642)
li-jia-nan Sep 5, 2023
ee8cf22
feat: Form validation support `validateDebounce` (#44633)
zombieJ Sep 5, 2023
1b61870
fix: Modal hooks press esc can not trigger await (#44646)
zombieJ Sep 5, 2023
002382c
chore: install using pnpm (#44639)
btea Sep 5, 2023
dff3c63
docs: fix wrong description about Avatar's Design Token (#44634)
yyxTheOracle Sep 5, 2023
70466b0
chore: merge master into feature
li-jia-nan Sep 5, 2023
bddcd17
chore: auto merge branches (#44648)
github-actions[bot] Sep 5, 2023
f0bf373
chore: change notification sound (#44661)
afc163 Sep 6, 2023
dab3cc9
fix: fix Input.Search style (#44660)
daledelv Sep 6, 2023
d266ca2
chore(deps-dev): bump size-limit from 8.2.6 to 9.0.0 (#44664)
dependabot[bot] Sep 6, 2023
875ef97
fix: Tag with Popover/Popconfirm should not affect style (#44663)
afc163 Sep 7, 2023
7344f5e
chore: replace useToken with useInternalToken (#44670)
li-jia-nan Sep 7, 2023
a873471
merge
chenshuai2144 Sep 7, 2023
0ef1cd1
change version
chenshuai2144 Sep 7, 2023
5905f33
Merge pull request #44679 from ant-design/fix-merge-conflicting
chenshuai2144 Sep 7, 2023
ff845fe
chore: lock @swc/core 1.3.82 (#44680)
li-jia-nan Sep 7, 2023
8ce23ea
chore: Delete pr-contributor-welcome action (#44685)
afc163 Sep 7, 2023
a41a756
chore: using `tsx` instead of `ts-node` (#44688)
Dunqing Sep 7, 2023
c28e1ff
docs: mark deprecated for date-picker defaultPickerValue prop (#43781)
zbw-zbw Sep 7, 2023
3b6b840
chore: missing @types/jsdom (#44689)
Dunqing Sep 7, 2023
5183e5d
chore: update authors list (#44694)
li-jia-nan Sep 7, 2023
59366da
docs: correct typos (#44705)
whalesink Sep 8, 2023
ec607dd
docs: add blog (#44698)
RedJue Sep 8, 2023
9a1fbad
chore: bump rc-* (#44709)
yoyo837 Sep 8, 2023
fa4c0c0
fix(float-button): marginBottom is invalid after the href is added (#…
Yuiai01 Sep 8, 2023
56b1b3f
chore: update ignore (#44710)
yoyo837 Sep 8, 2023
584326b
docs: add 5.9.0 changelog (#44692)
chenshuai2144 Sep 8, 2023
2cf22e8
docs: add theme toggle animation (#44655)
RedJue Sep 8, 2023
32d0a1f
docs: replace blog pic (#44717)
RedJue Sep 8, 2023
3cd4488
chore: fix windows path (#44734)
yoyo837 Sep 10, 2023
bdf8c43
chore(deps): update dependency @argos-ci/core to ^0.11.0 (#44736)
renovate[bot] Sep 10, 2023
4489eec
docs: add banner mouse effect animation (#44711)
afc163 Sep 10, 2023
5b75f3f
refactor: extract public methods (#44737)
li-jia-nan Sep 10, 2023
535a7da
chore: Migrate CJS to ESM (#44742)
li-jia-nan Sep 11, 2023
3e97fee
chore: Migrate CJS to ESM (#44744)
li-jia-nan Sep 11, 2023
b9dfb18
site: solve display exception when use happy work theme in dark mode …
kiner-tang Sep 11, 2023
61e8768
site: update space demo (#44738)
li-jia-nan Sep 11, 2023
fa5c983
docs: fix demo code copy function (#44751)
afc163 Sep 11, 2023
8d2473a
fix: Select alignment issue when label is Typography (#44756)
afc163 Sep 11, 2023
40032b1
docs: add coexist doc (#44758)
zombieJ Sep 11, 2023
0cb23a8
chore: try to fix pupppeteer screenshot (#44760)
MadCcc Sep 11, 2023
c11e184
docs: simplify select virtual demo (#44759)
afc163 Sep 11, 2023
b146830
fix: Select curbin align to top when enable maxTagCount (#44757)
afc163 Sep 11, 2023
092c79a
fix: Select align style broken with custom height (#44753)
afc163 Sep 11, 2023
3596c88
chore: ts script (#44761)
MadCcc Sep 11, 2023
5cc338e
refactor: All the warning set the warning type for future filter (#44…
zombieJ Sep 11, 2023
bfdc424
docs: merge demo (#44763)
crazyair Sep 11, 2023
4f7655c
docs: update Table docs (#44772)
li-jia-nan Sep 11, 2023
bcf7c92
type: fix typescript error (#44769)
li-jia-nan Sep 12, 2023
c9e94c2
refactor: convertLegacyProps function moved to buttonHelpers (#44777)
therealrinku Sep 12, 2023
242769e
fix: checkbox ref type (#44746)
LexiosAlex Sep 12, 2023
59d38ec
fix: radioButton ref type (#44747)
LexiosAlex Sep 12, 2023
c59a85a
demo: update Tag demo (#44771)
li-jia-nan Sep 12, 2023
2903552
fix: virtual table text align (#44786)
zombieJ Sep 12, 2023
9ec402c
docs: try to fix hydration error (#44797)
MadCcc Sep 13, 2023
ceae7de
fix: CardGrid style issue with left bottom corner (#44801)
Jason-huang66 Sep 13, 2023
b2b961e
docs: spelling and grammar fixes (#44807)
therealrinku Sep 13, 2023
58f7221
fix: tree checkbox should align top (#44827)
MadCcc Sep 13, 2023
5cf2a5d
fix: wrong style of Select in Input addon (#44825)
MadCcc Sep 13, 2023
2387091
fix: Table virtual with narrow columns (#44818)
zombieJ Sep 13, 2023
10c78d3
chore: dumi init (#44834)
crazyair Sep 13, 2023
72da267
site: remove legacy code for hash jump (#44836)
afc163 Sep 13, 2023
d5abbad
refactor: deprecatedWarning (#44791)
kiner-tang Sep 13, 2023
b888c2a
chore: upgrade github action node version to 18 (#44835)
afc163 Sep 13, 2023
f3c1871
chore: bump rc-picker (#44845)
Yuiai01 Sep 14, 2023
d346932
fix: rate star transform origin (#44855)
MadCcc Sep 14, 2023
afcdc3f
chore: try to fix screenshot (#44817)
MadCcc Sep 14, 2023
102c465
fix: select small height (#44859)
MadCcc Sep 14, 2023
553754b
fix: rate transform in mac screen (#44868)
MadCcc Sep 15, 2023
56fb617
demo: update demo (#44864)
li-jia-nan Sep 15, 2023
90bb521
demo(Table): add sticky offsetHeader (#44876)
linxianxi Sep 15, 2023
622e432
docs: changelog 5.9.1 (#44880)
MadCcc Sep 15, 2023
64b649e
docs: fix Upload mocky api in demo and test (#44883)
afc163 Sep 15, 2023
05e15c0
chore: update pupperteer and sharp npmmirror (#44727)
poyiding Sep 15, 2023
fa61f81
site: announce yuque welfare program (#44884)
chen201724 Sep 15, 2023
4d38144
site: optimize banner display (#44894)
chen201724 Sep 15, 2023
2627cae
fix: site style conflict (#44899)
chen201724 Sep 15, 2023
7eb93ad
type: to put the ts type into useMemo generics (#44904)
zqy1151215064 Sep 15, 2023
7f992b4
demo: simplify deletion operations (#44909)
leoyongyuan Sep 16, 2023
5ac472d
site: add LocalStorage caching for bannerVisible (#44910)
chen201724 Sep 16, 2023
b24cda1
docs: update FQA (#44902)
Wxh16144 Sep 17, 2023
62e338c
type: enable type prompt for .dumirc.ts (#44886)
afc163 Sep 17, 2023
de6232c
docs: remove useless dep of React.useMemo (#44914)
li-jia-nan Sep 17, 2023
a0699ea
type: fix .dumi type error (#44916)
li-jia-nan Sep 17, 2023
c8ff57d
chore(deps): move @types/jsdom to dev dependencies (#44917)
PeachScript Sep 18, 2023
b24a646
fix(notification): placement bottom animation should be correct (#44918)
linxianxi Sep 18, 2023
faefc8f
style: fix Select baseline align bug (#44927)
afc163 Sep 18, 2023
3215a7b
fix: extra pos logic (#44922)
zombieJ Sep 18, 2023
dfe6c2c
docs: Part of update (#44930)
zombieJ Sep 18, 2023
3bb3485
fix(Modal): custom footer render error (#44929)
Wxh16144 Sep 18, 2023
cf753f6
docs(:sparkles:): release 5.9.2 (#44933)
afc163 Sep 18, 2023
fb4751e
chore(deps-dev): bump @argos-ci/core from 0.11.1 to 0.12.0 (#44936)
dependabot[bot] Sep 18, 2023
76eade8
fix: Form hasFeedback should passed to children with noStyle (#44937)
MadCcc Sep 19, 2023
49846b8
docs: fix yuque banner style issue (#44940)
RedJue Sep 19, 2023
9455ebe
docs: update 5.9.2 changelog and lock @types/react (#44943)
afc163 Sep 19, 2023
eda546a
docs: replace blog pic (#44945)
RedJue Sep 19, 2023
2dcc2bf
docs: update 5.9.2 changelog
afc163 Sep 19, 2023
6939a2f
docs: fix hydration (#44952)
MadCcc Sep 19, 2023
89a646e
chore(deps-dev): bump remark from 14.0.3 to 15.0.1 (#44951)
dependabot[bot] Sep 19, 2023
5c99a5e
type: fix type errors of React.Key (#44938)
afc163 Sep 20, 2023
95974ae
docs: update feedbackIcons docs (#44966)
li-jia-nan Sep 20, 2023
d03977b
fix: dropdown should not block ref (#44971)
zombieJ Sep 20, 2023
e41026a
docs: fix site issues (#44970)
MadCcc Sep 20, 2023
a9d6422
docs: improve display of color block in docs (#44790)
Wxh16144 Sep 20, 2023
b53f8af
chore: bump select like rc (#44978)
zombieJ Sep 20, 2023
2329880
fix: Popover / Tooltip jump when height change (#44976)
zombieJ Sep 20, 2023
6901513
docs: timer-picker remove clearIcon from document (#44977)
kiner-tang Sep 21, 2023
65564fc
refactor: rm radiusBase (#44980)
zombieJ Sep 21, 2023
ef03563
test: update snapshot (#44989)
zombieJ Sep 21, 2023
3c1f099
docs: fix typos (#44998)
omahs Sep 21, 2023
1745594
doc: add alert token table (#45003)
Yuiai01 Sep 22, 2023
51fc8dc
refactor(tootip): delete the logic related to the disabled children (…
Yuiai01 Sep 22, 2023
dcfd1ae
chore: do not show mirror modal in preview (#45011)
MadCcc Sep 22, 2023
7e1ecf9
docs: add faq (#45016)
zombieJ Sep 22, 2023
3928ce9
fix: Popover shift (#45015)
MadCcc Sep 22, 2023
71d5784
docs: fix customize (#45022)
zombieJ Sep 22, 2023
4f643e7
chore(deps): update dependency @types/gtag.js to ^0.0.14 (#45037)
renovate[bot] Sep 24, 2023
eea27a4
chore(deps): update cimg/node docker tag to v18.18 (#45038)
renovate[bot] Sep 24, 2023
a40254e
chore: lock glob version to 10.3.6 (#45045)
kiner-tang Sep 25, 2023
3ffe70a
fix: table cellPaddingBlock token bug (#45040)
poyiding Sep 25, 2023
54a2df3
fix: input should have correct padding with controlHeight (#45048)
MadCcc Sep 25, 2023
2a3815d
fix: Typography When setting fontSize to an odd number bug (#45031)
poyiding Sep 25, 2023
966e5a7
demo: fix typescript undefined error on search.tsx (#45027)
isaacbatst Sep 25, 2023
6879774
docs: changelog of 5.9.3 (#45049)
zombieJ Sep 25, 2023
f915f2c
chore(deps): update peter-evans/commit-comment action to v3 (#45056)
renovate[bot] Sep 25, 2023
e43686d
docs: fix site issue (#45063)
MadCcc Sep 25, 2023
55190b6
docs: reorder (#45065)
zombieJ Sep 25, 2023
bfc5728
docs: add faq (#45050)
yoyo837 Sep 25, 2023
ba4c9a1
docs: update (#45068)
zombieJ Sep 25, 2023
3e70e31
docs(Dropdown): Add Docs the pop-up menu position will follow the rig…
HaixingOoO Sep 25, 2023
e850548
chore: enable resolvePackageJsonExports (#45085)
kiner-tang Sep 26, 2023
ef7c500
fix(Button): loading icon appearing when rendering (#45030)
Sep 26, 2023
29be72b
fix: Tour `step.type` should work (#45086)
MadCcc Sep 26, 2023
a6c91c5
fix: DatePicker fontFamily (#45088)
MadCcc Sep 26, 2023
735ae74
chore: bump dumi (#44877)
MadCcc Sep 26, 2023
d07ad8f
fix: rc-table error (#45090)
qpeela Sep 26, 2023
e91abf3
Revert "chore: enable resolvePackageJsonExports (#45085)" (#45092)
kiner-tang Sep 26, 2023
07eb5ba
docs: move copy button into code previewer (#45099)
afc163 Sep 26, 2023
7741957
feat: bump antd-tools (#45101)
afc163 Sep 26, 2023
051a038
docs: update docs about filter and sorter in table (#45108)
kiner-tang Sep 27, 2023
05cc5f1
docs: fix typos (#45116)
crazyair Sep 27, 2023
9f55e6c
fix: Button two Chinese chars (#45126)
MadCcc Sep 27, 2023
716dcf6
docs: changelog for 5.9.4 (#45129)
PeachScript Sep 28, 2023
80d6c3f
ci: add site test workflow (#45133)
Wxh16144 Sep 28, 2023
65975f2
docs: update docs link (#45121)
bubucuo Sep 29, 2023
5962e3a
chore: Trigger Argos with white-listed users (#45115)
kiner-tang Sep 29, 2023
2c83c30
ci: fix workflow artifact download path error (#45141)
Wxh16144 Sep 30, 2023
780a50b
types: export notification's ArgsProps type as NotificationArgsProps …
kiner-tang Sep 30, 2023
3586a7d
fix: update ko_KR lang (#45150)
owjs3901 Sep 30, 2023
a83a693
chore(deps): update dependency remark-cli to v12 (#45039)
renovate[bot] Sep 30, 2023
9cae343
chore(deps): update dependency @types/isomorphic-fetch to ^0.0.37 (#4…
renovate[bot] Oct 1, 2023
c4040ec
chore: fix docs comments (#45156)
therealrinku Oct 2, 2023
90d6377
fix: Avatar group responsive font not working (#34722)
laishiwen Oct 2, 2023
853ec97
fix: fix master CI FAIL (#45162)
li-jia-nan Oct 3, 2023
c3ea21a
fix: add missing Tour pl_PL locale (#45166)
antonisierakowski Oct 3, 2023
a4939fa
fix: CheckableTag support ref (#45164)
mingming-ma Oct 3, 2023
aaa9d7b
docs: fix shadow dom css link (#45169)
VdustR Oct 4, 2023
3524c68
chore: bump deps for 5.x (#45176)
yoyo837 Oct 4, 2023
9af09d5
docs(table): update pro-component link (#45118)
ajuner Oct 5, 2023
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
docs: add help text for token customization
  • Loading branch information
afc163 committed Aug 30, 2023
commit 3f148d9112c7d64c7f4a78b9871e06b74674350f
42 changes: 37 additions & 5 deletions .dumi/theme/builtins/ComponentTokenTable/index.tsx
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
import { RightOutlined } from '@ant-design/icons';
import { createStyles, css, useTheme } from 'antd-style';
import Link from '../../common/Link';
import { getDesignToken } from 'antd-token-previewer';
import React, { useMemo, useState } from 'react';
import tokenMeta from 'antd/es/version/token-meta.json';
@@ -18,6 +19,9 @@ const locales = {
value: '默认值',
componentToken: '组件 Token',
globalToken: '全局 Token',
help: '如何定制?',
customizeTokenLink: '/docs/react/customize-theme-cn#修改主题变量',
customizeComponentTokenLink: '/docs/react/customize-theme-cn#修改主题变量',
},
en: {
token: 'Token Name',
@@ -26,6 +30,9 @@ const locales = {
value: 'Default Value',
componentToken: 'Component Token',
globalToken: 'Global Token',
help: 'How to customize?',
customizeTokenLink: '/docs/react/customize-theme#customize-design-token',
customizeComponentTokenLink: 'docs/react/customize-theme#customize-component-token',
},
};

@@ -45,16 +52,32 @@ const useStyle = createStyles(() => ({
transition: all 0.3s;
}
`,
help: css`
margin-left: 6px;
font-size: 13px;
font-weight: normal;
color: #999;
a {
color: #999;
}
`,
}));

interface SubTokenTableProps {
defaultOpen?: boolean;
title: string;
help: React.ReactNode;
tokens: string[];
component?: string;
}

const SubTokenTable: React.FC<SubTokenTableProps> = ({ defaultOpen, tokens, title, component }) => {
const SubTokenTable: React.FC<SubTokenTableProps> = ({
defaultOpen,
help,
tokens,
title,
component,
}) => {
const [, lang] = useLocale(locales);
const token = useTheme();
const columns = useColumns();
@@ -105,10 +128,13 @@ const SubTokenTable: React.FC<SubTokenTableProps> = ({ defaultOpen, tokens, titl
.filter(Boolean);

return (
<div>
<>
<div className={styles.tableTitle} onClick={() => setOpen(!open)}>
<RightOutlined className={styles.arrowIcon} rotate={open ? 90 : 0} />
<h3>{title}</h3>
<h3>
{title}
<span className={styles.help}>({help})</span>
</h3>
</div>
{open && (
<ConfigProvider theme={{ token: { borderRadius: 0 } }}>
@@ -123,7 +149,7 @@ const SubTokenTable: React.FC<SubTokenTableProps> = ({ defaultOpen, tokens, titl
/>
</ConfigProvider>
)}
</div>
</>
);
};

@@ -152,11 +178,17 @@ const ComponentTokenTable: React.FC<ComponentTokenTableProps> = ({ component })
{tokenMeta.components[component] && (
<SubTokenTable
title={locale.componentToken}
help={<Link to={locale.customizeTokenLink}>{locale.help}</Link>}
tokens={tokenMeta.components[component].map((item) => item.token)}
component={component}
defaultOpen
/>
)}
<SubTokenTable title={locale.globalToken} tokens={mergedGlobalTokens} />
<SubTokenTable
title={locale.globalToken}
help={<Link to={locale.customizeComponentTokenLink}>{locale.help}</Link>}
tokens={mergedGlobalTokens}
/>
</>
);
};
2 changes: 1 addition & 1 deletion components/anchor/index.zh-CN.md
Original file line number Diff line number Diff line change
@@ -76,6 +76,6 @@ group:
| target | 该属性指定在何处显示链接的资源 | string | - | |
| title | 文字内容 | ReactNode | - | |

## Design Token
## 主题变量(Design Token

<ComponentTokenTable component="Anchor"></ComponentTokenTable>
7 changes: 4 additions & 3 deletions components/app/index.zh-CN.md
Original file line number Diff line number Diff line change
@@ -30,8 +30,8 @@ tag: New
App 组件通过 `Context` 提供上下文方法调用,因而 useApp 需要作为子组件才能使用,我们推荐在应用中顶层包裹 App。

```tsx
import { App } from 'antd';
import React from 'react';
import { App } from 'antd';

const MyPage: React.FC = () => {
const { message, notification, modal } = App.useApp();
@@ -103,8 +103,9 @@ export { message, notification, modal };

```tsx
// sub page
import { Button, Space } from 'antd';
import React from 'react';
import { Button, Space } from 'antd';

import { message } from './store';

export default () => {
@@ -133,6 +134,6 @@ export default () => {
| message | App 内 Message 的全局配置 | [MessageConfig](/components/message-cn/#messageconfig) | - | 5.3.0 |
| notification | App 内 Notification 的全局配置 | [NotificationConfig](/components/notification-cn/#notificationconfig) | - | 5.3.0 |

## Design Token
## 主题变量(Design Token

<ComponentTokenTable component="App"></ComponentTokenTable>
2 changes: 1 addition & 1 deletion components/auto-complete/index.zh-CN.md
Original file line number Diff line number Diff line change
@@ -79,7 +79,7 @@ demo:
| blur() | 移除焦点 | |
| focus() | 获取焦点 | |

## Design Token
## 主题变量(Design Token

<ComponentTokenTable component="Select"></ComponentTokenTable>

2 changes: 1 addition & 1 deletion components/avatar/index.zh-CN.md
Original file line number Diff line number Diff line change
@@ -62,6 +62,6 @@ group:
| size | 设置头像的大小 | number \| `large` \| `small` \| `default` \| { xs: number, sm: number, ...} | `default` | 4.8.0 |
| shape | 设置头像的形状 | `circle` \| `square` | `circle` | 5.8.0 |

## Design Token
## 主题变量(Design Token

<ComponentTokenTable component="Avatar"></ComponentTokenTable>
2 changes: 1 addition & 1 deletion components/badge/index.zh-CN.md
Original file line number Diff line number Diff line change
@@ -70,6 +70,6 @@ group: 数据展示
| root | 设置根元素 | 5.7.0 |
| indicator | 设置徽标元素 | 5.7.0 |

## Design Token
## 主题变量(Design Token

<ComponentTokenTable component="Badge"></ComponentTokenTable>
2 changes: 1 addition & 1 deletion components/breadcrumb/index.zh-CN.md
Original file line number Diff line number Diff line change
@@ -131,6 +131,6 @@ function itemRender(item, params, items, paths) {
return <Breadcrumb itemRender={itemRender} items={items} />;
```

## Design Token
## 主题变量(Design Token

<ComponentTokenTable component="Breadcrumb"></ComponentTokenTable>
2 changes: 1 addition & 1 deletion components/button/index.zh-CN.md
Original file line number Diff line number Diff line change
@@ -85,7 +85,7 @@ group:
| ---- | ------------ | ----- |
| icon | 设置图标元素 | 5.5.0 |

## Design Token
## 主题变量(Design Token

<ComponentTokenTable component="Button"></ComponentTokenTable>

2 changes: 1 addition & 1 deletion components/calendar/index.zh-CN.md
Original file line number Diff line number Diff line change
@@ -66,7 +66,7 @@ coverDark: https://mdn.alipayobjects.com/huamei_7uahnr/afts/img/A*-p-wQLik200AAA
| onPanelChange | 日期面板变化回调 | function(date: Dayjs, mode: string) | - | |
| onSelect | 选择日期回调,包含来源信息 | function(date: Dayjs, info: { source: 'year' \| 'month' \| 'date' \| 'customize' }) | - | `info`: 5.6.0 |

## Design Token
## 主题变量(Design Token

<ComponentTokenTable component="Calendar"></ComponentTokenTable>

2 changes: 1 addition & 1 deletion components/card/index.zh-CN.md
Original file line number Diff line number Diff line change
@@ -76,6 +76,6 @@ coverDark: https://mdn.alipayobjects.com/huamei_7uahnr/afts/img/A*a-8zR6rrupgAAA
| style | 定义容器类名的样式 | CSSProperties | - | |
| title | 标题内容 | ReactNode | - | |

## Design Token
## 主题变量(Design Token

<ComponentTokenTable component="Card"></ComponentTokenTable>
2 changes: 1 addition & 1 deletion components/carousel/index.zh-CN.md
Original file line number Diff line number Diff line change
@@ -51,7 +51,7 @@ demo:

更多 API 可参考:<https://react-slick.neostack.com/docs/api>

## Design Token
## 主题变量(Design Token

<ComponentTokenTable component="Carousel"></ComponentTokenTable>

2 changes: 1 addition & 1 deletion components/cascader/index.zh-CN.md
Original file line number Diff line number Diff line change
@@ -123,6 +123,6 @@ interface Option {

> 注意,如果需要获得中国省市区数据,可以参考 [china-division](https://gist.github.com/afc163/7582f35654fd03d5be7009444345ea17)。

## Design Token
## 主题变量(Design Token

<ComponentTokenTable component="Cascader"></ComponentTokenTable>
2 changes: 1 addition & 1 deletion components/checkbox/index.zh-CN.md
Original file line number Diff line number Diff line change
@@ -73,6 +73,6 @@ interface Option {
| blur() | 移除焦点 | |
| focus() | 获取焦点 | |

## Design Token
## 主题变量(Design Token

<ComponentTokenTable component="Checkbox"></ComponentTokenTable>
2 changes: 1 addition & 1 deletion components/collapse/index.zh-CN.md
Original file line number Diff line number Diff line change
@@ -105,6 +105,6 @@ const items: CollapseProps['items'] = [
| key | 对应 activeKey | string \| number | - | |
| showArrow | 是否展示当前面板上的箭头(为 false 时,collapsible 不能置为 icon) | boolean | true | |

## Design Token
## 主题变量(Design Token

<ComponentTokenTable component="Collapse"></ComponentTokenTable>
6 changes: 5 additions & 1 deletion components/date-picker/index.zh-CN.md
Original file line number Diff line number Diff line change
@@ -58,6 +58,7 @@ demo:

```jsx
import 'dayjs/locale/zh-cn';

import locale from 'antd/es/date-picker/locale/zh_CN';

<DatePicker locale={locale} />;
@@ -66,7 +67,9 @@ import locale from 'antd/es/date-picker/locale/zh_CN';
```jsx
// 默认语言为 en-US,如果你需要设置其他语言,推荐在入口文件全局设置 locale
import dayjs from 'dayjs';

import 'dayjs/locale/zh-cn';

import locale from 'antd/locale/zh_CN';

<ConfigProvider locale={locale}>
@@ -216,7 +219,7 @@ type GenericFn = (value: Dayjs) => string;
export type FormatType = Generic | GenericFn | Array<Generic | GenericFn>;
```

## Design Token
## 主题变量(Design Token

<ComponentTokenTable component="DatePicker"></ComponentTokenTable>

@@ -244,6 +247,7 @@ export type FormatType = Generic | GenericFn | Array<Generic | GenericFn>;

```js
import dayjs from 'dayjs';

import 'dayjs/locale/zh-cn';

import updateLocale from 'dayjs/plugin/updateLocale';
2 changes: 1 addition & 1 deletion components/descriptions/index.zh-CN.md
Original file line number Diff line number Diff line change
@@ -103,6 +103,6 @@ const items: DescriptionsProps['items'] = [

> span 是 Description.Item 的数量。 span={2} 会占用两个 DescriptionItem 的宽度。当同时配置 `style` 和 `labelStyle`(或 `contentStyle`)时,两者会同时作用。样式冲突时,后者会覆盖前者。

## Design Token
## 主题变量(Design Token

<ComponentTokenTable component="Descriptions"></ComponentTokenTable>
2 changes: 1 addition & 1 deletion components/divider/index.zh-CN.md
Original file line number Diff line number Diff line change
@@ -42,6 +42,6 @@ group:
| style | 分割线样式对象 | CSSProperties | - | |
| type | 水平还是垂直类型 | `horizontal` \| `vertical` | `horizontal` | |

## Design Token
## 主题变量(Design Token

<ComponentTokenTable component="Divider"></ComponentTokenTable>
2 changes: 1 addition & 1 deletion components/drawer/index.zh-CN.md
Original file line number Diff line number Diff line change
@@ -72,6 +72,6 @@ demo:
| zIndex | 设置 Drawer 的 `z-index` | number | 1000 | |
| onClose | 点击遮罩层或左上角叉或取消按钮的回调 | function(e) | - | |

## Design Token
## 主题变量(Design Token

<ComponentTokenTable component="Drawer"></ComponentTokenTable>
2 changes: 1 addition & 1 deletion components/dropdown/index.zh-CN.md
Original file line number Diff line number Diff line change
@@ -80,7 +80,7 @@ demo:

请确保 `Dropdown` 的子元素能接受 `onMouseEnter``onMouseLeave``onFocus``onClick` 事件。

## Design Token
## 主题变量(Design Token

<ComponentTokenTable component="Dropdown"></ComponentTokenTable>

2 changes: 1 addition & 1 deletion components/empty/index.zh-CN.md
Original file line number Diff line number Diff line change
@@ -66,6 +66,6 @@ coverDark: https://mdn.alipayobjects.com/huamei_7uahnr/afts/img/A*obM7S5lIxeMAAA
}
</style>

## Design Token
## 主题变量(Design Token

<ComponentTokenTable component="Empty"></ComponentTokenTable>
2 changes: 1 addition & 1 deletion components/float-button/index.zh-CN.md
Original file line number Diff line number Diff line change
@@ -71,6 +71,6 @@ tag: New
| visibilityHeight | 滚动高度达到此参数值才出现 BackTop | number | 400 | |
| onClick | 点击按钮的回调函数 | () => void | - | |

## Design Token
## 主题变量(Design Token

<ComponentTokenTable component="FloatButton"></ComponentTokenTable>
2 changes: 1 addition & 1 deletion components/form/index.zh-CN.md
Original file line number Diff line number Diff line change
@@ -524,7 +524,7 @@ type Rule = RuleConfig | ((form: FormInstance) => RuleConfig);
| form | 指定 Form 实例 | FormInstance | 当前 context 中的 Form | 5.4.0 |
| preserve | 是否监视没有对应的 `Form.Item` 的字段 | boolean | false | 5.4.0 |

## Design Token
## 主题变量(Design Token

<ComponentTokenTable component="Form"></ComponentTokenTable>

2 changes: 1 addition & 1 deletion components/grid/index.zh-CN.md
Original file line number Diff line number Diff line change
@@ -87,6 +87,6 @@ Ant Design 的布局组件若不能满足你的需求,你也可以直接使用

响应式栅格的断点扩展自 [BootStrap 4 的规则](https://getbootstrap.com/docs/4.0/layout/overview/#responsive-breakpoints)(不包含链接里 `occasionally` 的部分)。

## Design Token
## 主题变量(Design Token

<ComponentTokenTable component="Grid"></ComponentTokenTable>
7 changes: 4 additions & 3 deletions components/icon/index.zh-CN.md
Original file line number Diff line number Diff line change
@@ -103,8 +103,8 @@ getTwoToneColor(); // #eb2f96

```jsx
import React from 'react';
import ReactDOM from 'react-dom/client';
import { createFromIconfontCN } from '@ant-design/icons';
import ReactDOM from 'react-dom/client';

const MyIcon = createFromIconfontCN({
scriptUrl: '//at.alicdn.com/t/font_8d5l8fzk5b87iudi.js', // 在 iconfont.cn 上生成
@@ -152,9 +152,10 @@ module.exports = {

```jsx
import React from 'react';
import ReactDOM from 'react-dom/client';
import Icon from '@ant-design/icons';
import MessageSvg from 'path/to/message.svg'; // 你的 '*.svg' 文件路径
import ReactDOM from 'react-dom/client';

// in create-react-app:
// import { ReactComponent as MessageSvg } from 'path/to/message.svg';

@@ -171,6 +172,6 @@ ReactDOM.createRoot(mountNode).render(<Icon component={MessageSvg} />);
| style | 计算后的 `svg` 元素样式 | CSSProperties | - | |
| width | `svg` 元素宽度 | string \| number | `1em` | |

## Design Token
## 主题变量(Design Token

<ComponentTokenTable component="Icon"></ComponentTokenTable>
2 changes: 1 addition & 1 deletion components/image/index.zh-CN.md
Original file line number Diff line number Diff line change
@@ -162,6 +162,6 @@ type TransformAction =
}
```

## Design Token
## 主题变量(Design Token

<ComponentTokenTable component="Image"></ComponentTokenTable>
2 changes: 1 addition & 1 deletion components/input-number/index.zh-CN.md
Original file line number Diff line number Diff line change
@@ -71,7 +71,7 @@ demo:
| blur() | 移除焦点 |
| focus() | 获取焦点 |

## Design Token
## 主题变量(Design Token

<ComponentTokenTable component="InputNumber"></ComponentTokenTable>

2 changes: 1 addition & 1 deletion components/input/index.zh-CN.md
Original file line number Diff line number Diff line change
@@ -141,7 +141,7 @@ Input 的其他属性和 React 自带的 [input](https://reactjs.org/docs/dom-el
| textarea | `textarea` 元素 | 5.4.0 |
| count | 文字计数元素 | 5.4.0 |

## Design Token
## 主题变量(Design Token

<ComponentTokenTable component="Input"></ComponentTokenTable>

2 changes: 1 addition & 1 deletion components/layout/index.zh-CN.md
Original file line number Diff line number Diff line change
@@ -131,6 +131,6 @@ coverDark: https://mdn.alipayobjects.com/huamei_7uahnr/afts/img/A*HdS6Q5vUCDcAAA
}
```

## Design Token
## 主题变量(Design Token

<ComponentTokenTable component="Layout"></ComponentTokenTable>
Loading