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

Closed
wants to merge 3,875 commits into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
3875 commits
Select commit Hold shift + click to select a range
0126459
site: rm gitee-pages enter (#48792)
li-jia-nan May 6, 2024
b6b96d2
demo(ConfigProvider): replace 'popupPlacement' and 'TabPane' (#48797)
thinkasany May 7, 2024
0f06598
fix: upgrade rc-select (#48798)
afc163 May 7, 2024
d3d3358
docs: add docs Usage-with-Rsbuild (#48800)
li-jia-nan May 7, 2024
b96c10a
site: rm Menu children (#48799)
li-jia-nan May 7, 2024
e6c4123
chore: Update README.md (#48806)
afc163 May 7, 2024
73adedb
fix: Fix fails when using tabs minHeight inside the small card (#48787)
wanpan11 May 7, 2024
8c60848
chore: upgrade deps (#48815)
github-actions[bot] May 7, 2024
d1d2400
docs: sync README-zh_CN (#48817)
li-jia-nan May 8, 2024
f0189fd
docs(App): add edge usage warning (#48814)
Wxh16144 May 8, 2024
3701f0a
docs: fix typo (#48819)
ImLunaHey May 8, 2024
4384984
site: fix home page horizontal scrollbar (#48804)
afc163 May 8, 2024
e2d7e68
docs: image component adding destroyOnClose (#48827)
wanpan11 May 8, 2024
766ae3b
fix: Button icon order and margin in rtl mode (#48821)
afc163 May 8, 2024
00c7705
Merge pull request #48828 from ant-design/master
li-jia-nan May 8, 2024
300ec22
chore: bump rc-field-form (#48829)
zombieJ May 8, 2024
1da6d23
feat: progress support size object (#48805)
crazyair May 9, 2024
b87dbc9
refactor: rewrite inline-style to cssinjs (#48832)
li-jia-nan May 9, 2024
fec2132
demo: update Drawer demo (#48831)
li-jia-nan May 9, 2024
6957a5f
style: fix Button align issue (#47318)
afc163 May 9, 2024
a343fcd
refactor: button icon only style (#48840)
afc163 May 9, 2024
e2e3331
chore: add meta build info to the website (#48834)
Wxh16144 May 9, 2024
6a97f52
chore: merge master into feature
li-jia-nan May 9, 2024
5ee92d3
chore: upgrade deps (#48849)
github-actions[bot] May 9, 2024
cf6e9c8
docs: update RangePicker month demo (#48844)
zombieJ May 10, 2024
5098e6e
feat: progress add inside and bottom text position (#48157)
LonelySnowman May 10, 2024
c3cf0de
fix: fix Button findDOMNode error (#48830)
wanpan11 May 10, 2024
6da1ad1
docs(modal): correct closable default value (#48856)
Richard-Zhang1019 May 10, 2024
bc26758
Merge branch 'feature' into feature-merge-master
li-jia-nan May 10, 2024
20208bf
Merge branch 'master' into feature-merge-master
li-jia-nan May 10, 2024
bcbb7a4
Merge pull request #48845 from ant-design/feature-merge-master
li-jia-nan May 10, 2024
32b89e6
fix: add Drawer Spin className (#48857)
li-jia-nan May 10, 2024
1f39811
site: use message hooks usage (#48862)
thinkasany May 10, 2024
c9f7f5d
fix: fix float-button findDOMNode error (#48865)
wanpan11 May 10, 2024
eb218e8
fix: fix Alert findDOMNode error (#48868)
wanpan11 May 10, 2024
7af1cc6
demo(space): replace 'overlay' in Dropdown (#48867)
thinkasany May 10, 2024
c656603
chore(deps-dev): bump eslint-plugin-unicorn (#48872)
dependabot[bot] May 10, 2024
470e8a8
fix: fix Badge CSSMotion setref use error and add test case (#48878)
wanpan11 May 11, 2024
23d3435
Merge pull request #48885 from ant-design/master
li-jia-nan May 12, 2024
b15a2f2
fix: fix cascader type (#48879)
crazyair May 12, 2024
8b80210
fix: button component add colorErrorBgActive token (#48876)
LonelySnowman May 12, 2024
6506394
fix: solve tooltip's content isn't align center when pass into a sigl…
kiner-tang May 13, 2024
973305d
docs: add 5.17.1 changelog (#48892)
chenshuai2144 May 13, 2024
a2d8659
test: revert test (#48909)
zombieJ May 14, 2024
787cd94
docs: update docs (#48905)
li-jia-nan May 14, 2024
b49f70f
Merge pull request #48911 from ant-design/master
afc163 May 14, 2024
4eefc49
fix: fix /es path to /lib path (#48914)
li-jia-nan May 14, 2024
d447eeb
docs: update docs (#48915)
li-jia-nan May 14, 2024
0836497
refactor: refactor Drawer loading (#48886)
li-jia-nan May 14, 2024
92fa568
ci: fix build failure notice (#48916)
Wxh16144 May 14, 2024
793b8b7
fix: fix Drawer loading style (#48917)
li-jia-nan May 14, 2024
89e50e2
docs: 5.17.2 changelog (#48918)
zombieJ May 14, 2024
f912fa0
Form support clearOnDestroy (#48921)
crazyair May 14, 2024
45caacd
chore: merge master into feature
li-jia-nan May 14, 2024
05f587a
Merge pull request #48927 from ant-design/master-merge-feature
MadCcc May 14, 2024
7cdeecf
feat: Modal support loading (#48848)
li-jia-nan May 15, 2024
08e39ba
docs: add farm with antd (#48923)
liangchaofei May 15, 2024
84b072e
demo: update Drawer demo (#48935)
li-jia-nan May 15, 2024
1d138e9
feat: Form ref adding nativeElement (#48841)
wanpan11 May 15, 2024
7232733
chore: development mode not prompt for redirection (#48943)
wanpan11 May 15, 2024
356ead5
fix: fix Pagination size-changer element style (#48931)
wanpan11 May 15, 2024
9744ab6
demo: optimize calendar demo (#48939)
kiner-tang May 15, 2024
d47f9d2
demo: optimize calendar demo style (#48944)
kiner-tang May 16, 2024
7a2f5f6
feat(Image): support reset action in toolbarRender (#48936)
kiner-tang May 16, 2024
59de115
fix: fix button fontSize token ineffective (#48893)
wanpan11 May 16, 2024
2d6a8b4
chore: upgrade deps (#48954)
github-actions[bot] May 16, 2024
860fd57
feat(notification): add show progress option and update docs (#48353)
yociduo May 17, 2024
9f2089c
chore: upgrade deps (#48966)
github-actions[bot] May 18, 2024
b62b819
test: Fix React 18.3 findDOMNode warning (#48958)
zombieJ May 18, 2024
b9a1cab
Merge branch 'master' into feature-merge-master
yoyo837 May 18, 2024
bc776e5
chore: update snapshot
yoyo837 May 18, 2024
2b86be4
Merge pull request #48969 from ant-design/feature-merge-master
zombieJ May 18, 2024
51ec7e3
docs: make accordion mode easier to understand (#48972)
afc163 May 18, 2024
253b45e
docs: fix wrong brightness value in Palette Generation Tool (#48973)
afc163 May 18, 2024
e299806
docs: delete needConfirm false option in demo (#48967)
KumJungMin May 19, 2024
cb72cb2
docs(upload): Supplement the missing server-side mock example (#48977)
kiner-tang May 19, 2024
84ee56f
docs: add needConfirm option on time-picker docs (#48945)
KumJungMin May 19, 2024
733d58d
docs: changelog 5.17.3 (#48979)
MadCcc May 19, 2024
bf265c0
docs: fix some doc and lint issue (#48982)
zombieJ May 20, 2024
35015c7
chore: biome config indentSize to indentWidth (#48988)
liangchaofei May 20, 2024
baef247
refactor: improve the acquisition of dom logic (#48989)
Wxh16144 May 20, 2024
37e758c
feat: Visual diff support approve progress (#48994)
zombieJ May 20, 2024
ecfdc05
docs: Update resources.zh-CN.md (#48986)
afc163 May 20, 2024
61aa640
ci: adjust approve (#48998)
zombieJ May 21, 2024
4b44c73
chore: access permision (#49004)
zombieJ May 21, 2024
9b916f6
ci: Adjust to duplicate write status (#49005)
zombieJ May 21, 2024
95ba19f
chore: auto merge branches (#48984)
github-actions[bot] May 21, 2024
c1566be
chore: add clarity script (#48993)
afc163 May 21, 2024
fe0f692
docs: icon custom use vite (#48937)
hengkx May 22, 2024
4ef3992
style: widen component meta label to fix safari ui world wrap (#49023)
songhongkai99 May 22, 2024
425f4d0
refactor: refactor Input code (#49019)
afc163 May 22, 2024
3dca74a
fix: fix react dom recognize warning (#49031)
yoyo837 May 23, 2024
b3fa262
docs: update Select/TreeSelect types in documentation (#49020)
afc163 May 23, 2024
4592071
chore: upgrade deps (#49030)
github-actions[bot] May 23, 2024
072afcd
type: Enhance Spin component TypeScript definitions and documentation…
arvinxx May 23, 2024
86abdb9
docs: update Tree docs (#49051)
wanpan11 May 24, 2024
9db0fc7
type: fix Modal styles typing (#49055)
afc163 May 24, 2024
2e011a3
fix modal.confirm unable to close normally when onCancel and onOk ret…
wanpan11 May 24, 2024
fa0c473
chore: merge master into feature
li-jia-nan May 26, 2024
57cb8b1
chore: auto merge branches (#49070)
github-actions[bot] May 26, 2024
1a250ce
feat(notification): support `pauseOnHover` props (#49024)
yociduo May 27, 2024
7449267
fix: fix Checkbox.Group type (#49073)
crazyair May 27, 2024
cace256
docs: 5.17.4 changelog (#49076)
zombieJ May 27, 2024
4f832aa
site: update site scrollbar style (#49088)
li-jia-nan May 27, 2024
81f88c5
docs: update antd pro i18n link (#49098)
liangchaofei May 28, 2024
5428667
docs: add getValueProps demo (#49072)
crazyair May 28, 2024
04d0024
docs(FAQ): Remove expired links (#49082)
selicens May 29, 2024
02cfbf1
docs: Updated typo of selected (#49104)
JeevaRamanathan May 29, 2024
6e8c441
chore: upgrade deps (#49103)
github-actions[bot] May 30, 2024
3464faf
fix: Tour onClose wrong current argument (#49124)
afc163 May 30, 2024
d4c5cb6
chore: auto merge branches (#49137)
github-actions[bot] May 30, 2024
20fa082
test: Update test of demo (#49140)
zombieJ May 30, 2024
b4a9827
refactor: Watermark add overflow hidden style to avoid visible show (…
zombieJ May 30, 2024
a6bfb84
feat: Drawer support drawerRender (#49125)
crazyair May 30, 2024
72791d1
docs: Modify inappropriate words (#49143)
kelisiWu123 May 30, 2024
a59081e
fix: Anchor - The replace attribute causes no scrolling animation (#4…
mySkey May 30, 2024
a0bab62
chore(deps-dev): bump @types/react-highlight-words from 0.16.7 to 0.2…
dependabot[bot] May 30, 2024
e244a0b
feat: Rate support keyboard prop (#49132)
Wxh16144 May 31, 2024
e0786ba
type: remove unnecessary types (#49146)
coding-ice May 31, 2024
9d13485
docs: Update AutoComplete index.zh-CN.md (#49139)
LemonTency May 31, 2024
5932005
Form.Item support layout (#49119)
crazyair May 31, 2024
38050d6
Merge pull request #49145 from ant-design/master
afc163 May 31, 2024
2119e2d
feat: Form.Item support layout 3 (#49152)
crazyair May 31, 2024
664f3e6
refactor(button): change bool type (#49156)
coding-ice May 31, 2024
ab7ac62
docs: 5.18 (#49159)
crazyair May 31, 2024
ea1927c
fix(local): add miss ja_JP (#49155)
huyikai Jun 1, 2024
8875ca7
feat: Avatar.Group adding max props (#49131)
wanpan11 Jun 1, 2024
5d04043
refactor(divider): remove unnecessary judgments (#49169)
coding-ice Jun 1, 2024
c321647
refactor(floatButton): provider exist shape (#49162)
coding-ice Jun 1, 2024
d28f684
chore(deps): update dependency @types/gtag.js to ^0.0.20 (#49174)
renovate[bot] Jun 2, 2024
c7dc0ac
site: rewrite global style => cssinjs (#49179)
li-jia-nan Jun 2, 2024
e642d5e
chore: merge master into feature
li-jia-nan Jun 2, 2024
628c55d
chore: auto merge branches (#49181)
github-actions[bot] Jun 2, 2024
f3000ed
feat: list.item support styles & classNames (#49154)
wanpan11 Jun 3, 2024
0352b2f
feat: Spin support percent (#48657)
zombieJ Jun 3, 2024
403c9c0
docs(Modal): add closable description (#49188)
thinkasany Jun 3, 2024
9e36724
chore: auto merge branches (#49189)
github-actions[bot] Jun 3, 2024
1334831
docs: typo (#49190)
Wxh16144 Jun 3, 2024
c414799
docs: changelog for 5.18.0 (#49180)
PeachScript Jun 3, 2024
b683f18
chore: update contributors list (#49199)
li-jia-nan Jun 4, 2024
e02f742
fix: form layout doc (#49206)
crazyair Jun 4, 2024
5b34be1
docs(cascader): modify default value of placeholder (#49193)
thinkasany Jun 4, 2024
1fc2461
docs: Drawer version error (#49208)
kaoding Jun 4, 2024
053dfcc
fix: fix the ellipsis bug for pre element (#49168)
nova1751 Jun 4, 2024
41079e5
docs: move form layout prop to correct position (#49210)
crazyair Jun 4, 2024
538cbde
docs(select): add showArrowPaddingInlineEnd token description (#49212)
thinkasany Jun 4, 2024
d0fd993
fix: Fix Spin missing default font size when customizing icons (#49211)
wanpan11 Jun 4, 2024
f1c7bb2
fix: drawer dark theme color (#49217)
zombieJ Jun 4, 2024
ecac347
refactor(space): add default value & valid zero (#49192)
coding-ice Jun 4, 2024
325cc3f
docs(steps): fix internal lowercase (#49216)
thinkasany Jun 4, 2024
cc29902
type(Statistic): remove duplicate union types (#49218)
thinkasany Jun 4, 2024
145aa3f
fix: Safari ellipsis (#49221)
zombieJ Jun 4, 2024
526d8ba
chore(deps-dev): bump the dev-dependencies group with 1 updates (#49226)
dependabot[bot] Jun 4, 2024
e7d7a0b
chore(TS): add comments to TS type methods (#49224)
Wxh16144 Jun 4, 2024
87ed3a4
docs(qrcode): fix iconSize default value error (#49243)
thinkasany Jun 5, 2024
1db28bf
docs: delete duplicates and add missing en (#49244)
thinkasany Jun 5, 2024
1f9735d
docs: optimize mentions doc (#49239)
coderz-w Jun 5, 2024
9a34206
test: update rc-mentsion snapshot (#49251)
vagusX Jun 5, 2024
5c54566
fix: padding unit for Progress text-inner (#49250)
vagusX Jun 5, 2024
a25152b
chore(deps): bump dawidd6/action-download-artifact from 3 to 5 (#49228)
dependabot[bot] Jun 5, 2024
3673430
fix: css var should skip zIndex (#49238)
zombieJ Jun 5, 2024
16e0395
docs: @ant-design/pro-layout => @ant-design/pro-components (#49249)
afc163 Jun 5, 2024
9ddce32
fix: bump rc-image version to 7.8.1 (#49259)
nova1751 Jun 5, 2024
16cc388
docs: Update recommendation.en-US.md (#49261)
KarelVerschraegen Jun 5, 2024
0e99c7c
fix: Pagination select arrow icon missing (#49262)
afc163 Jun 6, 2024
b9d4436
chore: rm codesandbox ci (#49274)
zombieJ Jun 6, 2024
a290549
docs(form): Modify the interface title level (#49273)
thinkasany Jun 6, 2024
53da7b8
ci(check-changelog): add mention user (#49271)
thinkasany Jun 6, 2024
c36e7c5
demo(mentions): optimize type (#49276)
thinkasany Jun 6, 2024
ab1acc7
docs(modal): improve (#49277)
Wxh16144 Jun 6, 2024
36d6d3d
type(mentions): export interface MentionsProps (#49281)
thinkasany Jun 6, 2024
aa17f70
fix: missed translation in az (#49247)
sabitalizade Jun 6, 2024
308feb1
docs: fix notifcation/message import statement (#49283)
afc163 Jun 6, 2024
cbbea27
fix: Do not respond to the Enter event when data is loading (#49292)
wanpan11 Jun 7, 2024
d203401
chore: lock tsx version to fix build failed (#49299)
zombieJ Jun 7, 2024
c105f2e
chore: reduce test task with 16 & 17 (#49300)
zombieJ Jun 7, 2024
d66ed64
deps: bump rc-dialog to 9.5.1 (#49284)
Wxh16144 Jun 7, 2024
a755710
chore: upgrade deps (#49309)
github-actions[bot] Jun 8, 2024
539beba
fix: DatePicker/TimePicker placement not working (#49303)
afc163 Jun 8, 2024
b6b961e
chore: enable prefetch for dumi Link element (#49314)
afc163 Jun 8, 2024
16e5c62
chore: Update resources.zh-CN.md (#49315)
afc163 Jun 8, 2024
30babc6
chore(deps): update dependency jest-axe to v9 (#49318)
renovate[bot] Jun 9, 2024
6ea55a1
Remove unnecessary act() calls (#49326)
cidkumagai Jun 10, 2024
d68eb4a
chore: Update FUNDING.yml (#49320)
afc163 Jun 10, 2024
09bb60d
chore(deps): update dependency tsx to v4.15.1 (#49316)
renovate[bot] Jun 10, 2024
50a5bf6
docs: Carousel add common attribute optimization documents (#49341)
wanpan11 Jun 11, 2024
bcd6670
fix: notification from useApp should consume App config (#49339)
hemengke1997 Jun 11, 2024
a09056e
chore: split ci (#49345)
zombieJ Jun 11, 2024
f4db94c
chore: fix site Link type errors (#49346)
afc163 Jun 11, 2024
c65627f
docs: clean up useless demo style (#49349)
zombieJ Jun 11, 2024
734fe27
chore: remove unused i18n key (#49357)
yoyo837 Jun 11, 2024
e6fabc8
fix: Add missing translations for Malay language (ms_MY) (#49353)
cs-gavin-huang Jun 11, 2024
ca3d4c0
style: fix DatePicker header text align (#49332)
afc163 Jun 11, 2024
828360c
chore: fix a11y issues (#49329)
afc163 Jun 11, 2024
eec67ad
docs: Update use-with-vite.en-US.md (#49366)
elkeis Jun 12, 2024
a7f438f
docs: add changelog 5.18.1 (#49370)
xrkffgg Jun 12, 2024
92d813b
fix: input-number inputFontSize (#49369)
zombieJ Jun 12, 2024
37c8db5
docs: update Select optionRender demo description (#49376)
mansion-sun Jun 12, 2024
a986a89
fix: Add missing translations for Mongol language (mn_MN) (#49373)
JiyinShao Jun 12, 2024
6b572b7
chore(deps): bump dawidd6/action-download-artifact from 5 to 6 (#49381)
dependabot[bot] Jun 12, 2024
1c7b2d9
fix: tailwindcss dot processing (#49379)
zombieJ Jun 12, 2024
bb6cf59
chore: upgrade deps (#49367)
github-actions[bot] Jun 12, 2024
759f2ff
chore: upgrade deps (#49388)
github-actions[bot] Jun 12, 2024
d118e31
type: update useUniqueMemo params type (#49389)
li-jia-nan Jun 13, 2024
0601867
type: update event string type (#49387)
li-jia-nan Jun 13, 2024
c0839ca
docs: TreeSelect add treeTitleRender props (#49393)
wanpan11 Jun 13, 2024
329a346
fix: Collapse expandIcon aria-label adds semantic attribute value (#4…
wanpan11 Jun 13, 2024
21224d7
fix(Table): fix Table sorter argument of onChange unexpected value (#…
Zyf665 Jun 13, 2024
7389fe8
docs: slider doc (#49398)
zombieJ Jun 13, 2024
fdee444
ci: diff with shard (#49402)
zombieJ Jun 13, 2024
f56a4d6
feat: support mako build (#49109)
Jinbao1001 Jun 13, 2024
9f2fb20
chore: unique Empty text color (#49408)
zombieJ Jun 14, 2024
4f1ca4c
docs: Select optimization demo (#49410)
wanpan11 Jun 14, 2024
7f8b2b4
chore(deps-dev): bump dumi from 2.4.0-alpha.12 to 2.4.0-alpha.16 (#49…
dependabot[bot] Jun 14, 2024
3799630
chore: disable mako build of windows (#49420)
Jinbao1001 Jun 14, 2024
ecc78e1
chore: rm useless second param (#49426)
li-jia-nan Jun 15, 2024
31b2e53
chore: replace "ant-" with `${defaultPrefixCls}` (#49390)
li-jia-nan Jun 15, 2024
6db789f
chore: lock tsx version (#49427)
afc163 Jun 15, 2024
7769a40
refactor: refactor InputNumber code (#49428)
li-jia-nan Jun 15, 2024
3bb1ba3
fix: adjust the message content display attribute (#49429)
nova1751 Jun 15, 2024
d878343
chore(deps): update dependency eslint-plugin-unicorn to v54 (#49434)
renovate[bot] Jun 16, 2024
55a9a9d
chore(deps): update dependency eslint-plugin-compat to v5 (#49433)
renovate[bot] Jun 16, 2024
4f3e381
chore: Function parameter name to camel case (#49435)
rapsealk Jun 16, 2024
41fba82
refactor: code optimization (#49431)
li-jia-nan Jun 16, 2024
ee4aff6
feat: add filterOption demo (#49441)
crazyair Jun 17, 2024
b2d8289
docs: changelog for v5.18.2 (#49444)
vagusX Jun 17, 2024
314ca1a
chore: upgrade deps (#49453)
github-actions[bot] Jun 17, 2024
f910b56
refactor(theme): migrate the genCalc to @ant-design/cssinjs repo and …
YumoImer Jun 18, 2024
e9cc7c1
chore(carousel): code optimization (#49484)
winchesHe Jun 19, 2024
0638892
docs: Update docs/spec/visual.en-US.md (#49489)
Adan2333 Jun 19, 2024
627af0c
Revert "fix(Table): fix Table sorter argument of onChange unexpected …
afc163 Jun 19, 2024
57541ee
Update research-message-and-feedback.en-US.md (#49490)
cs-gavin-huang Jun 19, 2024
ae3e92b
fix: Add missing translations for Nepali language (ne_NP) (#49492)
FuliangZhang Jun 19, 2024
4380c6b
docs(✨): release 5.18.3 (#49491)
afc163 Jun 19, 2024
8e52d6f
docs: fix AutoComplete document errors (#49494)
kkk360 Jun 19, 2024
7d798e3
docs: fix Tooltip link (#49497)
rookit-ljt Jun 19, 2024
ebf7239
chore: prettier need format package.json (#49505)
crazyair Jun 19, 2024
5a00707
chore: remove overrides (#49471)
afc163 Jun 20, 2024
cd5a81f
docs: Update docs/spec/research-*.en-US.md (#49510)
cs-gavin-huang Jun 20, 2024
b0bc32c
docs: Image docs imginfo update (#49517)
wanpan11 Jun 20, 2024
3bdef4f
docs: Alert demo remove Space comp (#49515)
wanpan11 Jun 20, 2024
73f7b80
docs: update zh-CN demo ref link (#49500)
wanpan11 Jun 20, 2024
b720860
docs: update zh-CN demo ref link (#49501)
duqigit Jun 20, 2024
5e4019f
chore: fix table ajax demo (#49513)
crazyair Jun 20, 2024
c4a258c
docs: Update resources.en-US.md (#49522)
mateusz-wierzbicki Jun 20, 2024
4b08667
docs: fix progress text (#49530)
Roxannej Jun 20, 2024
666f38d
refactor: add ContextIsolator component (#49438)
li-jia-nan Jun 20, 2024
a873ed7
chore: upgrade deps (#49532)
github-actions[bot] Jun 20, 2024
bd40dec
fix: link crossorigin use anonymous instead of bool true (#49525)
Jinbao1001 Jun 21, 2024
1b3c25a
chore(style): backticks to single quotes (#49540)
thinkasany Jun 21, 2024
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
  •  
  •  
  •  
The diff you're trying to view is too large. We only load the first 3000 changed files.
36 changes: 0 additions & 36 deletions .circleci/config.yml

This file was deleted.

4 changes: 0 additions & 4 deletions .codesandbox/ci.json

This file was deleted.

178 changes: 178 additions & 0 deletions .dumi/components/SemanticPreview.tsx
Original file line number Diff line number Diff line change
@@ -0,0 +1,178 @@
import React from 'react';
import { Col, ConfigProvider, Flex, Row, Tag, theme, Typography } from 'antd';
import { createStyles, css } from 'antd-style';
import classnames from 'classnames';

const MARK_BORDER_SIZE = 2;

const useStyle = createStyles(({ token }, markPos: [number, number, number, number]) => ({
container: css`
position: relative;
`,
colWrap: css`
border-right: 1px solid ${token.colorBorderSecondary};
display: flex;
justify-content: center;
align-items: center;
padding: ${token.paddingMD}px;
overflow: hidden;
`,
listWrap: css`
display: flex;
flex-direction: column;
list-style: none;
margin: 0;
padding: 0;
overflow: hidden;
`,
listItem: css`
cursor: pointer;
padding: ${token.paddingSM}px;
transition: background-color ${token.motionDurationFast} ease;
&:hover {
background-color: ${token.controlItemBgHover};
}
&:not(:first-of-type) {
border-top: 1px solid ${token.colorBorderSecondary};
}
`,
marker: css`
position: absolute;
border: ${MARK_BORDER_SIZE}px solid ${token.colorWarning};
box-sizing: border-box;
z-index: 999999;
box-shadow: 0 0 0 1px #fff;
pointer-events: none;
left: ${markPos[0] - MARK_BORDER_SIZE}px;
top: ${markPos[1] - MARK_BORDER_SIZE}px;
width: ${markPos[2] + MARK_BORDER_SIZE * 2}px;
height: ${markPos[3] + MARK_BORDER_SIZE * 2}px;
`,
markerActive: css`
opacity: 1;
`,
markerNotActive: css`
opacity: 0;
`,
markerMotion: css`
transition:
opacity ${token.motionDurationSlow} ease,
all ${token.motionDurationSlow} ease;
`,
markerNotMotion: css`
transition: opacity ${token.motionDurationSlow} ease;
`,
}));

export interface SemanticPreviewProps {
semantics: { name: string; desc: string; version?: string }[];
children: React.ReactElement;
height?: number;
}

const SemanticPreview: React.FC<SemanticPreviewProps> = (props) => {
const { semantics = [], children, height } = props;
const { token } = theme.useToken();

// ======================= Semantic =======================
const getMarkClassName = React.useCallback(
(semanticKey: string) => `semantic-mark-${semanticKey}`,
[],
);

const semanticClassNames = React.useMemo<Record<string, string>>(() => {
const classNames: Record<string, string> = {};

semantics.forEach((semantic) => {
classNames[semantic.name] = getMarkClassName(semantic.name);
});

return classNames;
}, [semantics]);

const cloneNode = React.cloneElement(children, {
classNames: semanticClassNames,
});

// ======================== Hover =========================
const containerRef = React.useRef<HTMLDivElement>(null);

const timerRef = React.useRef<ReturnType<typeof setTimeout>>();

const [positionMotion, setPositionMotion] = React.useState<boolean>(false);
const [hoverSemantic, setHoverSemantic] = React.useState<string | null>(null);
const [markPos, setMarkPos] = React.useState<[number, number, number, number]>([0, 0, 0, 0]);

const { styles } = useStyle(markPos);

React.useEffect(() => {
if (hoverSemantic) {
const targetClassName = getMarkClassName(hoverSemantic);
const targetElement = containerRef.current?.querySelector<HTMLElement>(`.${targetClassName}`);
const containerRect = containerRef.current?.getBoundingClientRect();
const targetRect = targetElement?.getBoundingClientRect();
setMarkPos([
(targetRect?.left || 0) - (containerRect?.left || 0),
(targetRect?.top || 0) - (containerRect?.top || 0),
targetRect?.width || 0,
targetRect?.height || 0,
]);
timerRef.current = setTimeout(() => {
setPositionMotion(true);
}, 10);
} else {
timerRef.current = setTimeout(() => {
setPositionMotion(false);
}, 500);
}
return () => {
if (timerRef.current) {
clearTimeout(timerRef.current);
}
};
}, [hoverSemantic]);

// ======================== Render ========================
return (
<div className={classnames(styles.container)} ref={containerRef}>
<Row style={{ minHeight: height }}>
<Col span={16} className={classnames(styles.colWrap)}>
<ConfigProvider theme={{ token: { motion: false } }}>{cloneNode}</ConfigProvider>
</Col>
<Col span={8}>
<ul className={classnames(styles.listWrap)}>
{semantics.map<React.ReactNode>((semantic) => (
<li
key={semantic.name}
className={classnames(styles.listItem)}
onMouseEnter={() => setHoverSemantic(semantic.name)}
onMouseLeave={() => setHoverSemantic(null)}
>
<Flex vertical gap="small">
<Flex gap="small" align="center">
<Typography.Title level={5} style={{ margin: 0 }}>
{semantic.name}
</Typography.Title>
{semantic.version && <Tag color="blue">{semantic.version}</Tag>}
</Flex>
<Typography.Paragraph style={{ margin: 0, fontSize: token.fontSizeSM }}>
{semantic.desc}
</Typography.Paragraph>
</Flex>
</li>
))}
</ul>
</Col>
</Row>
<div
className={classnames(
styles.marker,
hoverSemantic ? styles.markerActive : styles.markerNotActive,
positionMotion ? styles.markerMotion : styles.markerNotMotion,
)}
/>
</div>
);
};

export default SemanticPreview;
20 changes: 20 additions & 0 deletions .dumi/global.css
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
.demo-logo {
width: 120px;
min-width: 120px;
height: 32px;
background: rgba(255, 255, 255, 0.2);
border-radius: 6px;
margin-inline-end: 24px;
}

.demo-logo-vertical {
height: 32px;
margin: 16px;
background: rgba(255, 255, 255, 0.2);
border-radius: 6px;
}

html {
scrollbar-width: thin;
scrollbar-color: unset;
}
30 changes: 30 additions & 0 deletions .dumi/hooks/use.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,30 @@
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 as T;
}
if (internal.status === 'rejected') {
throw internal.reason;
} else if (internal.status === 'pending') {
throw internal;
} else {
internal.status = 'pending';
internal.then(
(result) => {
internal.status = 'fulfilled';
internal.value = result;
},
(reason) => {
internal.status = 'rejected';
internal.reason = reason;
},
);
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);
}
21 changes: 21 additions & 0 deletions .dumi/hooks/useFetch/cache.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
export default class FetchCache {
private cache: Map<string, PromiseLike<any>> = new Map();

get(key: string) {
return this.cache.get(key);
}

set(key: string, value: PromiseLike<any>) {
this.cache.set(key, value);
}

promise<T>(key: string, promiseFn: () => PromiseLike<T>): PromiseLike<T> {
const cached = this.get(key);
if (cached) {
return cached;
}
const promise = promiseFn();
this.set(key, promise);
return promise;
}
}
20 changes: 20 additions & 0 deletions .dumi/hooks/useFetch/index.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
import fetch from 'cross-fetch';
import use from '../use';
import FetchCache from './cache';

const cache = new FetchCache();

const useFetch = <T>(options: string | { request: () => PromiseLike<T>; key: string }) => {
let request;
let key;
if (typeof options === 'string') {
request = () => fetch(options).then((res) => res.json());
key = options;
} else {
request = options.request;
key = options.key;
}
return use(cache.promise<T>(key, request));
};

export default useFetch;
17 changes: 17 additions & 0 deletions .dumi/hooks/useLayoutState.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
import { startTransition, useState } from 'react';

const useLayoutState: typeof useState = <S>(
...args: Parameters<typeof useState<S>>
): ReturnType<typeof useState<S>> => {
const [state, setState] = useState<S>(...args);

const setLayoutState: typeof setState = (...setStateArgs) => {
startTransition(() => {
setState(...setStateArgs);
});
};

return [state, setLayoutState];
};

export default useLayoutState;
26 changes: 17 additions & 9 deletions .dumi/hooks/useLocale.ts
Original file line number Diff line number Diff line change
@@ -1,14 +1,22 @@
import { useLocale as useDumiLocale } from 'dumi';

export interface LocaleMap<Key extends string> {
cn: Record<Key, string>;
en: Record<Key, string>;
export interface LocaleMap<
K extends PropertyKey = PropertyKey,
V extends string | ((...params: any[]) => string) = string,
> {
cn: Record<K, V>;
en: Record<K, V>;
}

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

export default useLocale;
Loading
Loading