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

Closed
wants to merge 464 commits into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
464 commits
Select commit Hold shift + click to select a range
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
52dc41d
Merge pull request #44682 from ant-design/master
MadCcc 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
428b49a
chore: auto merge branches (#44691)
github-actions[bot] 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
eff6743
feat: add tokens in Descriptions component(#44674) (#44729)
Child-qjj 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
4450178
chore: auto merge branches (#44739)
github-actions[bot] 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
a6250a9
refactor: rename Popover token `minWidth` to `titleMinWidth` (#44750)
MadCcc 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
09cd55a
chore: auto merge branches (#44762)
github-actions[bot] 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
1aa7183
feat: add input hover and active backgroundColor (#44752)
Pan-yongyong Sep 12, 2023
2903552
fix: virtual table text align (#44786)
zombieJ Sep 12, 2023
a24b30c
chore: auto merge branches (#44794)
github-actions[bot] 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
b3428c6
feat: ConfigProvider support config warning level (#44809)
zombieJ Sep 13, 2023
c5bed69
feat: notification support stack (#44618)
MadCcc 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
1e0c3b8
🔥feat: new component Flex (#44362)
li-jia-nan 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
4717b5c
Merge branch 'master' into feature-merge-master
kiner-tang Sep 16, 2023
6571615
chore: update site-limit
kiner-tang Sep 16, 2023
255cc85
Merge pull request #44908 from ant-design/feature-merge-master
li-jia-nan Sep 16, 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
f3a4b6c
chore: auto merge branches (#44915)
github-actions[bot] Sep 17, 2023
042a2a4
feat(watermark): support for setting text alignment direction through…
Yuiai01 Sep 18, 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
3cd47b9
Merge branch 'master' into feature-merge-master
kiner-tang Sep 20, 2023
768da7f
Merge branch 'feature' into feature-merge-master
kiner-tang Sep 20, 2023
05896ac
feat: remove unused code
kiner-tang Sep 20, 2023
7d86965
feat: conflict resolution
kiner-tang Sep 20, 2023
55defc2
Merge pull request #44967 from ant-design/feature-merge-master
kiner-tang 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
081b33d
chore: auto merge branches (#44995)
github-actions[bot] 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
431e00b
feat: apply new input component border style (#45009)
MadCcc Sep 22, 2023
05878dd
feat: Slider support multiple points (#45000)
zombieJ Sep 22, 2023
3928ce9
fix: Popover shift (#45015)
MadCcc Sep 22, 2023
3e325f4
feat: add `fresh` prop for tooltip (#45020)
zombieJ 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
db541f9
chore: auto merge branches (#45047)
github-actions[bot] 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
ceed985
feat(modal): support classNames (#44934)
kiner-tang 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
01a6279
chore: auto merge branches (#45067)
github-actions[bot] Sep 25, 2023
3e70e31
docs(Dropdown): Add Docs the pop-up menu position will follow the rig…
HaixingOoO Sep 25, 2023
69d0487
feat: Drawer support classNames (#44935)
kiner-tang 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
7e692ad
feat: Cascader.Panel support (#45089)
zombieJ 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
d4cdcef
chore: auto merge branches (#45117)
github-actions[bot] 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
b972466
fix: fix
li-jia-nan Oct 3, 2023
726c25c
fix: fix
li-jia-nan Oct 3, 2023
0567b73
chore: auto merge branches (#45163)
github-actions[bot] 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
ad5efc0
chore: merge master into feature
li-jia-nan Oct 4, 2023
23d5928
chore: auto merge branches (#45178)
github-actions[bot] Oct 4, 2023
9af09d5
docs(table): update pro-component link (#45118)
ajuner Oct 5, 2023
af38d9f
docs: API table style optimize (#45185)
kiner-tang Oct 6, 2023
a219228
docs: improve document type description (#45189)
Wxh16144 Oct 6, 2023
131a17d
chore: improve demo dependency logic (#45142)
Wxh16144 Oct 7, 2023
6f06787
chore: update Ant Design Mini link (#45194)
Yuiai01 Oct 7, 2023
749fa42
chore: optimize set-output in workflow (#45190)
kiner-tang Oct 7, 2023
abba072
docs: fix API Table styling (#45001)
afc163 Oct 7, 2023
fc2b4af
fix(SliderTooltipProps): extends from SliderTooltipProps (#44656)
adriansalgadoa Oct 7, 2023
24ed2cf
docs: fix site document title flash during page loading (#44631)
rickythink Oct 7, 2023
485e952
chore: update snapshot (#45196)
yoyo837 Oct 7, 2023
e1f3b79
Merge pull request #45198 from ant-design/master
li-jia-nan Oct 7, 2023
2f063a2
style: inputNumber border unmerged (#45004)
Yuiai01 Oct 7, 2023
f42d066
fix(Autocomplete): internal input cannot apply fontFamily (#45197)
Yuiai01 Oct 7, 2023
e76606f
docs: notificaiton blog (#45199)
MadCcc Oct 7, 2023
be92498
refactor: rewrite Affix CC => FC (#42674)
li-jia-nan Oct 7, 2023
97df6f6
docs: Update notification-stack.en-US.md (#45200)
kiner-tang Oct 7, 2023
9c905bd
chore(deps): update dependency @types/gtag.js to ^0.0.16 (#45205)
renovate[bot] Oct 8, 2023
b57dc7a
fix(typography): menu item title cannot be centered vertically (#41146)
Yuiai01 Oct 8, 2023
5b37a97
ci: add README check (#44366)
xrkffgg Oct 8, 2023
d5d9e72
chore: fix overview link (#45206)
MadCcc Oct 8, 2023
f03a4de
chore: improve switch theme perf in home page (#45210)
afc163 Oct 8, 2023
75611b7
chore: scroll to the top of the page when the search box value change…
crazyair Oct 8, 2023
cece6e2
style: fix Modal.confirm description long text layout (#45212)
afc163 Oct 8, 2023
e5daf77
docs: fix use-with-next.md (#45219)
CYBYOB Oct 8, 2023
4ed70ba
chore(deps): bump antd-style@3.5.0 (#45220)
Wxh16144 Oct 8, 2023
04c804e
fix: Input addonBg should work (#45222)
MadCcc Oct 9, 2023
604948e
e
crazyair Oct 9, 2023
854db00
Merge pull request #45225 from ant-design/master
MadCcc Oct 9, 2023
13fdc39
chore: bump rc (#45228)
yoyo837 Oct 9, 2023
0202598
test: update check-site.ts.snap (#45229)
Wxh16144 Oct 9, 2023
63ececf
Merge pull request #45226 from ant-design/feature
MadCcc Oct 9, 2023
d66737f
docs: add changelog 5.10.0 (#45244)
xrkffgg Oct 10, 2023
72fc3b6
chore(site): anchor jump don't work (#45243)
Wxh16144 Oct 10, 2023
cb256e5
docs: add nodejs recruit info (#45247)
killagu Oct 10, 2023
940a1a5
docs: Update compatible-style.zh-CN.md (#45248)
afc163 Oct 10, 2023
f5d1c11
ci: migrate site E2E workflow (#45235)
Wxh16144 Oct 11, 2023
083fd55
chore: remove --force-exit in jest options (#45002)
afc163 Oct 11, 2023
dd4ef28
docs: add description of the available components of Space.Compact (#…
Yuiai01 Oct 11, 2023
92c9c03
docs: remove repeat code (#45260)
liuyib Oct 11, 2023
7dda41d
docs: Historical Debt of API (#45263)
zombieJ Oct 11, 2023
000589b
docs: update Flex diff (#45270)
zombieJ Oct 11, 2023
e093b10
fix: Card head fit small size tabs (#45272)
MadCcc Oct 11, 2023
80da4e5
fix (DirectoryTree) : selectedNodes in onSelect method could not get …
Zian502 Oct 11, 2023
4cacadb
docs: added AntBlocks UI to the resources docs (#44439)
Jonarzz Oct 11, 2023
0379ee5
ci: merge preview workflows (#45276)
Wxh16144 Oct 11, 2023
8024bbd
fix: ListField reset should not fill it (#45284)
zombieJ Oct 11, 2023
70ce748
fix: options missing id (#45287)
zombieJ Oct 12, 2023
53034b0
fix: Input background should not be transparent when hovered or focus…
MadCcc Oct 12, 2023
7f13495
fix(watermark): can be hidden through the Hide Element feature in the…
Yuiai01 Oct 12, 2023
bf1b73e
feat: Input focus style (#45286)
MadCcc Oct 12, 2023
317dac6
refactor: more cache (#45302)
zombieJ Oct 13, 2023
92644fe
chore: bump rc-* (#45330)
yoyo837 Oct 13, 2023
c727bed
chore: solve the eslint error about null (#45328)
kiner-tang Oct 13, 2023
4650d74
style: fix Segmented text jump issue in Safari (#45310)
afc163 Oct 13, 2023
da23a00
fix: Button loading={delay: 0} did not show correctly (#45282)
YDFlame13 Oct 13, 2023
e587a5f
chore: update select snapshot (#45333)
afc163 Oct 13, 2023
bce4306
fix: CSP nonce attribute should be set to all the style tags (#45326)…
AlexeyTeterin Oct 13, 2023
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
The table of contents is too big for display.
Diff view
Diff view
  •  
  •  
  •  
4 changes: 3 additions & 1 deletion .circleci/config.yml
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,9 @@ version: 2.1
jobs:
test-argos-ci:
docker:
- image: cimg/node:16.20-browsers
- image: cimg/node:18.18-browsers
environment:
NODE_OPTIONS: --openssl-legacy-provider
steps:
- checkout
- run:
Expand Down
6 changes: 4 additions & 2 deletions .dumi/hooks/use.ts
Original file line number Diff line number Diff line change
@@ -1,11 +1,11 @@
export default function use<T>(promise: PromiseLike<T>): T {
function use<T>(promise: PromiseLike<T>): T {
const internal: PromiseLike<T> & {
status?: 'pending' | 'fulfilled' | 'rejected';
value?: T;
reason?: any;
} = promise;
if (internal.status === 'fulfilled') {
return internal.value;
return internal.value as T;
}
if (internal.status === 'rejected') {
throw internal.reason;
Expand All @@ -26,3 +26,5 @@ export default function use<T>(promise: PromiseLike<T>): T {
throw internal;
}
}

export default use;
7 changes: 7 additions & 0 deletions .dumi/hooks/useDark.tsx
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
import React from 'react';

export const DarkContext = React.createContext(false);

export default function useDark() {
return React.useContext(DarkContext);
}
8 changes: 5 additions & 3 deletions .dumi/hooks/useLocale.ts
Original file line number Diff line number Diff line change
Expand Up @@ -5,10 +5,12 @@ export interface LocaleMap<Key extends string> {
en: Record<Key, string>;
}

export default function useLocale<Key extends string>(
function useLocale<Key extends string>(
localeMap?: LocaleMap<Key>,
): [Record<Key, string>, 'cn' | 'en'] {
const { id } = useDumiLocale();
const localeType = id === 'zh-CN' ? 'cn' : 'en';
return [localeMap?.[localeType], localeType];
const localeType = id === 'zh-CN' ? ('cn' as const) : ('en' as const);
return [localeMap?.[localeType]!, localeType];
}

export default useLocale;
5 changes: 3 additions & 2 deletions .dumi/hooks/useMenu.tsx
Original file line number Diff line number Diff line change
@@ -1,7 +1,8 @@
import { useFullSidebarData, useSidebarData } from 'dumi';
import React, { useMemo } from 'react';
import type { MenuProps } from 'antd';
import { Tag, version } from 'antd';
import { useFullSidebarData, useSidebarData } from 'dumi';

import Link from '../theme/common/Link';
import useLocation from './useLocation';

Expand Down Expand Up @@ -136,7 +137,7 @@ const useMenu = (options: UseMenuOptions = {}): [MenuProps['items'], string] =>
const list = group.children || [];
// 如果有 date 字段,我们就对其进行排序
if (list.every((info) => info?.frontmatter?.date)) {
list.sort((a, b) => (a.frontmatter.date > b.frontmatter.date ? -1 : 1));
list.sort((a, b) => (a.frontmatter?.date > b.frontmatter?.date ? -1 : 1));
}

result.push(
Expand Down
127 changes: 127 additions & 0 deletions .dumi/hooks/useThemeAnimation.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,127 @@
import { useEffect, useRef } from 'react';
import { removeCSS, updateCSS } from 'rc-util/lib/Dom/dynamicCSS';

import theme from '../../components/theme';

const viewTransitionStyle = `
::view-transition-old(root),
::view-transition-new(root) {
animation: none;
mix-blend-mode: normal;
}

.dark::view-transition-old(root) {
z-index: 1;
}

.dark::view-transition-new(root) {
z-index: 999;
}

::view-transition-old(root) {
z-index: 999;
}

::view-transition-new(root) {
z-index: 1;
}
`;

const useThemeAnimation = () => {
const {
token: { colorBgElevated },
} = theme.useToken();

const animateRef = useRef<{ colorBgElevated: string }>({ colorBgElevated });

const startAnimationTheme = (clipPath: string[], isDark: boolean) => {
updateCSS(
`
* {
transition: none !important;
}
`,
'disable-transition',
);

document.documentElement
.animate(
{
clipPath: isDark ? [...clipPath].reverse() : clipPath,
},
{
duration: 500,
easing: 'ease-in',
pseudoElement: isDark ? '::view-transition-old(root)' : '::view-transition-new(root)',
},
)
.addEventListener('finish', () => {
removeCSS('disable-transition');
});
};

const toggleAnimationTheme = (
event: React.MouseEvent<HTMLElement, MouseEvent>,
isDark: boolean,
) => {
// @ts-ignore
if (!(event && typeof document.startViewTransition === 'function')) {
return;
}
const x = event.clientX;
const y = event.clientY;
const endRadius = Math.hypot(Math.max(x, innerWidth - x), Math.max(y, innerHeight - y));
updateCSS(
`
[data-prefers-color='dark'] {
color-scheme: light !important;
}

[data-prefers-color='light'] {
color-scheme: dark !important;
}
`,
'color-scheme',
);
document
// @ts-ignore
.startViewTransition(async () => {
// wait for theme change end
while (colorBgElevated === animateRef.current.colorBgElevated) {
// eslint-disable-next-line no-await-in-loop
await new Promise((resolve) => {
setTimeout(resolve, 1000 / 60);
});
}
const root = document.documentElement;
root.classList.remove(isDark ? 'dark' : 'light');
root.classList.add(isDark ? 'light' : 'dark');
})
.ready.then(() => {
const clipPath = [
`circle(0px at ${x}px ${y}px)`,
`circle(${endRadius}px at ${x}px ${y}px)`,
];
removeCSS('color-scheme');
startAnimationTheme(clipPath, isDark);
});
};

// inject transition style
useEffect(() => {
// @ts-ignore
if (typeof document.startViewTransition === 'function') {
updateCSS(viewTransitionStyle, 'view-transition-style');
}
}, []);

useEffect(() => {
if (colorBgElevated !== animateRef.current.colorBgElevated) {
animateRef.current.colorBgElevated = colorBgElevated;
}
}, [colorBgElevated]);

return toggleAnimationTheme;
};

export default useThemeAnimation;
173 changes: 173 additions & 0 deletions .dumi/mirror-modal.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,173 @@
(function createMirrorModal() {
if (
(navigator.languages.includes('zh') || navigator.languages.includes('zh-CN')) &&
/-cn\/?$/.test(window.location.pathname) &&
!['ant-design.gitee.io', 'ant-design.antgroup.com'].includes(window.location.hostname) &&
!window.location.host.includes('surge')
) {
const ANTD_DOT_NOT_SHOW_MIRROR_MODAL = 'ANT_DESIGN_DO_NOT_OPEN_MIRROR_MODAL';

const lastShowTime = window.localStorage.getItem(ANTD_DOT_NOT_SHOW_MIRROR_MODAL);
if (
lastShowTime &&
lastShowTime !== 'true' &&
Date.now() - new Date(lastShowTime).getTime() < 7 * 24 * 60 * 60 * 1000
) {
return;
}

const style = document.createElement('style');
style.innerHTML = `
@keyframes mirror-fade-in {
from {
opacity: 0;
}
to {
opacity: 1;
}
}

@keyframes mirror-zoom-in {
from {
transform: scale(0.8);
}
to {
transform: scale(1);
}
}

.mirror-modal-mask {
position: fixed;
inset: 0;
height: '100vh';
width: '100vw';
background: rgba(0, 0, 0, 0.3);
z-index: 9999;
animation: mirror-fade-in 0.3s forwards;
}

.mirror-modal-dialog {
position: fixed;
inset: 0;
top: 120px;
margin-left: auto;
margin-right: auto;
width: 400px;
height: 120px;
display: flex;
align-items: center;
flex-direction: column;
border-radius: 8px;
border: 1px solid #eee;
background: #fff;
padding: 20px 24px;
box-shadow: 0 6px 16px 0 rgba(0, 0, 0, 0.08), 0 3px 6px -4px rgba(0, 0, 0, 0.12), 0 9px 28px 8px rgba(0, 0, 0, 0.05);
animation: mirror-zoom-in 0.3s forwards;
}

.mirror-modal-title {
font-size: 16px;
font-weight: 500;
align-self: flex-start;
margin-bottom: 8px;
}

.mirror-modal-content {
font-size: 14px;
align-self: flex-start;
margin-bottom: 16px;
}

.mirror-modal-btns {
align-self: flex-end;
margin-top: auto;
display: flex;
align-items: center;
}

.mirror-modal-btn {
border-radius: 6px;
cursor: pointer;
height: 32px;
box-sizing: border-box;
font-size: 14px;
padding: 4px 16px;
display: inline-flex;
align-items: center;
text-decoration: none;
transition: all 0.2s;
}

.mirror-modal-confirm-btn {
background: #1677ff;
color: #fff;
}

.mirror-modal-confirm-btn:hover {
background: #4096ff;
}

.mirror-modal-confirm-btn:active {
background: #0958d9;
}

.mirror-modal-cancel-btn {
border: 1px solid #eee;
color: #000;
margin-right: 8px;
}

.mirror-modal-cancel-btn:hover {
border-color: #4096ff;
color: #4096ff
}

.mirror-modal-cancel-btn:active {
border-color: #0958d9;
color: #0958d9;
}
`;
document.head.append(style);

const modal = document.createElement('div');
modal.className = 'mirror-modal-mask';

const dialog = document.createElement('div');
dialog.className = 'mirror-modal-dialog';
modal.append(dialog);

const title = document.createElement('div');
title.className = 'mirror-modal-title';
title.innerText = '提示';
dialog.append(title);

const content = document.createElement('div');
content.className = 'mirror-modal-content';
content.innerText = '国内用户推荐访问国内镜像以获得极速体验~';
dialog.append(content);

const btnWrapper = document.createElement('div');
btnWrapper.className = 'mirror-modal-btns';
dialog.append(btnWrapper);

const cancelBtn = document.createElement('a');
cancelBtn.className = 'mirror-modal-cancel-btn mirror-modal-btn';
cancelBtn.innerText = '7 天内不再显示';
btnWrapper.append(cancelBtn);
cancelBtn.addEventListener('click', () => {
window.localStorage.setItem(ANTD_DOT_NOT_SHOW_MIRROR_MODAL, new Date().toISOString());
document.body.removeChild(modal);
document.head.removeChild(style);
document.body.style.overflow = '';
});

const confirmBtn = document.createElement('a');
confirmBtn.className = 'mirror-modal-confirm-btn mirror-modal-btn';
confirmBtn.href = window.location.href.replace(window.location.host, 'ant-design.antgroup.com');
confirmBtn.innerText = '🚀 立刻前往';
btnWrapper.append(confirmBtn);

document.body.append(modal);
document.body.style.overflow = 'hidden';
}
})();
Loading
Loading