chore: auto merge branches (#54094)

chore: sync master into feature
This commit is contained in:
github-actions[bot]
2025-06-15 13:57:53 +00:00
committed by GitHub
15 changed files with 2315 additions and 764 deletions

View File

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

View File

@@ -117,7 +117,7 @@ jobs:
cd ..
- name: Upload to Release
uses: softprops/action-gh-release@da05d552573ad5aba039eaac05058a918a7bf631 # v2.2.2
uses: softprops/action-gh-release@72f2c25fcb47643c292f7107632f7a47c1df5cd8 # v2.3.2
with:
fail_on_unmatched_files: true
files: website.tar.gz

View File

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

View File

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

View File

@@ -706,7 +706,7 @@ exports[`renders components/cascader/demo/custom-render.tsx extend context corre
<div
class="ant-cascader-menu-item-content"
>
Zhejiang
Zhejiang (zhejiang)
</div>
<div
class="ant-cascader-menu-item-expand-icon"
@@ -742,7 +742,7 @@ exports[`renders components/cascader/demo/custom-render.tsx extend context corre
<div
class="ant-cascader-menu-item-content"
>
Jiangsu
Jiangsu (jiangsu)
</div>
<div
class="ant-cascader-menu-item-expand-icon"

View File

@@ -76,6 +76,12 @@ const App: React.FC = () => (
defaultValue={['zhejiang', 'hangzhou', 'xihu']}
displayRender={displayRender}
style={{ width: '100%' }}
// `optionRender` is supported since 5.16.0
optionRender={(option) => (
<>
{option.label} ({option.value})
</>
)}
/>
);

View File

@@ -1487,37 +1487,89 @@ exports[`renders components/date-picker/demo/disabled-date.tsx correctly 1`] = `
exports[`renders components/date-picker/demo/external-panel.tsx correctly 1`] = `
<div
class="ant-space ant-space-horizontal ant-space-align-center ant-space-gap-row-small ant-space-gap-col-small ant-dropdown-trigger"
style="display:flex;gap:20%"
>
<div
class="ant-space-item"
>
<span>
2016-11-22
</span>
</div>
<div
class="ant-space-item"
>
<span
aria-label="down"
class="anticon anticon-down"
role="img"
<div>
<div
style="margin-bottom:12px"
>
<svg
aria-hidden="true"
data-icon="down"
fill="currentColor"
focusable="false"
height="1em"
viewBox="64 64 896 896"
width="1em"
DatePicker
</div>
<div
class="ant-space ant-space-horizontal ant-space-align-center ant-space-gap-row-small ant-space-gap-col-small ant-dropdown-trigger"
>
<div
class="ant-space-item"
>
<path
d="M884 256h-75c-5.1 0-9.9 2.5-12.9 6.6L512 654.2 227.9 262.6c-3-4.1-7.8-6.6-12.9-6.6h-75c-6.5 0-10.3 7.4-6.5 12.7l352.6 486.1c12.8 17.6 39 17.6 51.7 0l352.6-486.1c3.9-5.3.1-12.7-6.4-12.7z"
/>
</svg>
</span>
<span>
2016-11-22
</span>
</div>
<div
class="ant-space-item"
>
<span
aria-label="down"
class="anticon anticon-down"
role="img"
>
<svg
aria-hidden="true"
data-icon="down"
fill="currentColor"
focusable="false"
height="1em"
viewBox="64 64 896 896"
width="1em"
>
<path
d="M884 256h-75c-5.1 0-9.9 2.5-12.9 6.6L512 654.2 227.9 262.6c-3-4.1-7.8-6.6-12.9-6.6h-75c-6.5 0-10.3 7.4-6.5 12.7l352.6 486.1c12.8 17.6 39 17.6 51.7 0l352.6-486.1c3.9-5.3.1-12.7-6.4-12.7z"
/>
</svg>
</span>
</div>
</div>
</div>
<div>
<div
style="margin-bottom:12px"
>
RangePicker
</div>
<div
class="ant-space ant-space-horizontal ant-space-align-center ant-space-gap-row-small ant-space-gap-col-small ant-dropdown-trigger"
>
<div
class="ant-space-item"
>
<span>
2016-11-22 ~ 2016-11-23
</span>
</div>
<div
class="ant-space-item"
>
<span
aria-label="down"
class="anticon anticon-down"
role="img"
>
<svg
aria-hidden="true"
data-icon="down"
fill="currentColor"
focusable="false"
height="1em"
viewBox="64 64 896 896"
width="1em"
>
<path
d="M884 256h-75c-5.1 0-9.9 2.5-12.9 6.6L512 654.2 227.9 262.6c-3-4.1-7.8-6.6-12.9-6.6h-75c-6.5 0-10.3 7.4-6.5 12.7l352.6 486.1c12.8 17.6 39 17.6 51.7 0l352.6-486.1c3.9-5.3.1-12.7-6.4-12.7z"
/>
</svg>
</span>
</div>
</div>
</div>
</div>
`;

View File

@@ -1,13 +1,13 @@
import React from 'react';
import { DownOutlined } from '@ant-design/icons';
import { DatePicker, Dropdown, Space } from 'antd';
import dayjs from 'dayjs';
import dayjs, { Dayjs } from 'dayjs';
const App: React.FC = () => {
const DatePickerDemo: React.FC = () => {
const [visible, setVisible] = React.useState(false);
const [panelVisible, setPanelVisible] = React.useState(false);
const [date, setDate] = React.useState(dayjs());
const [date, setDate] = React.useState<Dayjs | null>(dayjs());
return (
<Dropdown
@@ -43,7 +43,7 @@ const App: React.FC = () => {
key: 'custom-date',
label: (
<div
style={{ position: 'relative' }}
style={{ position: 'relative', overflow: 'hidden' }}
onClick={(e) => {
e.stopPropagation();
setPanelVisible(true);
@@ -54,17 +54,18 @@ const App: React.FC = () => {
onClick={(e) => {
e.stopPropagation();
}}
style={{
height: 0,
width: 0,
overflow: 'hidden',
position: 'absolute',
top: 0,
insetInlineStart: 0,
}}
>
<DatePicker
open={panelVisible}
styles={{
root: {
pointerEvents: 'none',
opacity: 0,
position: 'absolute',
bottom: -12,
insetInlineStart: 0,
},
}}
onChange={(date) => {
setDate(date);
setVisible(false);
@@ -79,11 +80,119 @@ const App: React.FC = () => {
}}
>
<Space>
<span>{date.format('YYYY-MM-DD')}</span>
<span>{date?.format('YYYY-MM-DD')}</span>
<DownOutlined />
</Space>
</Dropdown>
);
};
export default App;
const RangePickerDemo: React.FC = () => {
const [visible, setVisible] = React.useState(false);
const [panelVisible, setPanelVisible] = React.useState(false);
const [dates, setDates] = React.useState<[Dayjs, Dayjs] | null>([dayjs(), dayjs().add(1, 'day')]);
return (
<Dropdown
arrow
open={visible}
trigger={['click']}
destroyOnHidden
onOpenChange={(open) => {
setVisible(open);
if (!open) {
setPanelVisible(false);
}
}}
menu={{
items: [
{
key: '7',
label: '7 days',
onClick() {
setDates([dayjs(), dayjs().add(7, 'day')]);
setVisible(false);
},
},
{
key: '30',
label: '30 days',
onClick() {
setDates([dayjs(), dayjs().add(30, 'day')]);
setVisible(false);
},
},
{
key: 'custom-date',
label: (
<div
style={{ position: 'relative', overflow: 'hidden' }}
onClick={(e) => {
e.stopPropagation();
setPanelVisible(true);
}}
>
<div>Customize</div>
<div
onClick={(e) => {
e.stopPropagation();
}}
>
<DatePicker.RangePicker
open={panelVisible}
styles={{
root: {
pointerEvents: 'none',
opacity: 0,
position: 'absolute',
bottom: 0, // RangePicker use this style
insetInlineStart: 0,
},
}}
onChange={(ranges) => {
if (ranges?.[0] && ranges?.[1]) {
setDates([ranges[0], ranges[1]]);
} else {
setDates(null);
}
setVisible(false);
setPanelVisible(false);
}}
/>
</div>
</div>
),
},
],
}}
>
<Space>
<span>
{dates
? `${dates[0].format('YYYY-MM-DD')} ~ ${dates[1].format('YYYY-MM-DD')}`
: 'Select range'}
</span>
<DownOutlined />
</Space>
</Dropdown>
);
};
const Demo = () => {
return (
<div style={{ display: 'flex', gap: '20%' }}>
<div>
<div style={{ marginBottom: 12 }}>DatePicker</div>
<DatePickerDemo />
</div>
<div>
<div style={{ marginBottom: 12 }}>RangePicker</div>
<RangePickerDemo />
</div>
</div>
);
};
export default Demo;

View File

@@ -68,6 +68,15 @@ export type PickerStyles = Partial<Record<SemanticName, React.CSSProperties>> &
popup?: Partial<Record<PopupSemantic, React.CSSProperties>>;
};
export type RequiredSemanticPicker = readonly [
classNames: Required<Record<SemanticName, string>> & {
popup: Required<Record<PopupSemantic, string>>;
},
styles: Required<Record<SemanticName, React.CSSProperties>> & {
popup: Required<Record<PopupSemantic, React.CSSProperties>>;
},
];
type InjectDefaultProps<Props> = Omit<
Props,
'locale' | 'generateConfig' | 'hideHeader' | 'classNames' | 'styles'

View File

@@ -4,7 +4,11 @@ import cls from 'classnames';
import useMergeSemantic from '../../_util/hooks/useMergeSemantic';
import { useComponentConfig } from '../../config-provider/context';
import type { PickerClassNames, PickerStyles } from '../generatePicker/interface';
import type {
PickerClassNames,
PickerStyles,
RequiredSemanticPicker,
} from '../generatePicker/interface';
const useMergedPickerSemantic = (
pickerType: 'timePicker' | 'datePicker',
@@ -48,7 +52,7 @@ const useMergedPickerSemantic = (
};
// Return
return [filledClassNames, filledStyles] as const;
return [filledClassNames, filledStyles] as RequiredSemanticPicker;
}, [mergedClassNames, mergedStyles, popupClassName, popupStyle]);
};

View File

@@ -51,6 +51,7 @@
"Alexey Yakovlev",
"Alfred Qiu",
"Ali Zhdanov",
"AliReza Kamkar",
"AliRezaBeigy",
"Aliaksandr",
"Alina Andrieieva",
@@ -67,6 +68,7 @@
"Andre Zyczkowski",
"Andrea Blanco",
"Andrew Blakey",
"Andrew Hong",
"Andrew Horn",
"Andrew Murray",
"Andrew Shearer",
@@ -146,7 +148,6 @@
"Carlos Coves Prieto",
"Carter Feldman",
"Caspian Chen",
"Cat-XHS",
"Catalin Miron",
"Cedong.Lee",
"Cee Cirno",
@@ -462,6 +463,7 @@
"Jiahao",
"Jiajun Chen",
"Jialei",
"Jianan Li",
"Jiawei Huang",
"Jichao Zhong",
"Jiehui",
@@ -494,7 +496,6 @@
"Jonathan Gabaut",
"Jonathan Lee",
"Jonny Buchanan",
"Jony J",
"Joo Wu",
"Jordan Hornblow",
"Jorge Luis Moreno Moller",
@@ -796,6 +797,7 @@
"QingLance",
"Qingrong Ke",
"QoVoQ",
"QuentinHsu",
"Radomir Skrzepij",
"Rafael Carvalho",
"Rafael Cosman",
@@ -804,6 +806,7 @@
"Rain120",
"Rainey",
"Rainy",
"Rajan Konar",
"Rajasekhar Gandavarapu",
"Rajil Bajracharya",
"Rallets",
@@ -886,6 +889,7 @@
"Shengnan",
"Sheralijon",
"ShiTengFei",
"Shinji-Li",
"ShuYu Wang",
"Shubham Kanodia",
"Shun",
@@ -1124,6 +1128,7 @@
"alexchen",
"amedora",
"anilpixel",
"aojunhao123",
"aoxiang78",
"appleshell",
"arange",
@@ -1153,6 +1158,7 @@
"byuanama",
"byzyk",
"bzone",
"caijf",
"caoyi",
"capdiem",
"carrie-tanminyi",
@@ -1206,6 +1212,7 @@
"digz6666",
"dingkang",
"djorkaeff",
"doandevhere",
"dolfje",
"dongfang",
"douxc",
@@ -1230,6 +1237,7 @@
"flashback313",
"flyerH",
"flyflydogdog",
"fnoopv",
"frezc",
"fubd",
"gaokaifeis",
@@ -1327,7 +1335,7 @@
"kermolaev",
"killa",
"kily zhou",
"kiner-tang",
"kiner-tang(星河)",
"klouskingsley",
"ko",
"konakona",

View File

@@ -141,7 +141,7 @@ export default App;
| --- | --- | --- |
| `@btn-font-weight` | `fontWeight` | - |
| `@btn-border-radius-base` | `borderRadius` | Global Token |
| `@btn-border-radius-sm` | `borderRadisuSM` | Global Token |
| `@btn-border-radius-sm` | `borderRadiusSM` | Global Token |
| `@btn-border-width` | `lineWidth` | Global Token |
| `@btn-border-style` | `lineStyle` | Global Token |
| `@btn-shadow` | `defaultShadow` | - |
@@ -606,8 +606,8 @@ export default App;
| `@radio-button-hover-color` | `colorPrimaryHover` | Global Token |
| `@radio-button-active-color` | `colorPrimaryActive` | Global Token |
| `@radio-button-padding-horizontal` | `buttonPaddingInline` | - |
| `@radio-disabled-button-checked-bg` | `buttonCheckdBgDisabled` | - |
| `@radio-disabled-button-checked-color` | `buttonCheckdColorDisabled` | - |
| `@radio-disabled-button-checked-bg` | `buttonCheckedBgDisabled` | - |
| `@radio-disabled-button-checked-color` | `buttonCheckedColorDisabled` | - |
| `@radio-wrapper-margin-right` | `wrapperMarginInlineEnd` | - |
### Rate

View File

@@ -141,7 +141,7 @@ export default App;
| --- | --- | --- |
| `@btn-font-weight` | `fontWeight` | - |
| `@btn-border-radius-base` | `borderRadius` | 全局 Token |
| `@btn-border-radius-sm` | `borderRadisuSM` | 全局 Token |
| `@btn-border-radius-sm` | `borderRadiusSM` | 全局 Token |
| `@btn-border-width` | `lineWidth` | 全局 Token |
| `@btn-border-style` | `lineStyle` | 全局 Token |
| `@btn-shadow` | `defaultShadow` | - |
@@ -605,8 +605,8 @@ Mentions 提及
| `@radio-button-hover-color` | `colorPrimaryHover` | 全局 Token |
| `@radio-button-active-color` | `colorPrimaryActive` | 全局 Token |
| `@radio-button-padding-horizontal` | `buttonPaddingInline` | - |
| `@radio-disabled-button-checked-bg` | `buttonCheckdBgDisabled` | - |
| `@radio-disabled-button-checked-color` | `buttonCheckdColorDisabled` | - |
| `@radio-disabled-button-checked-bg` | `buttonCheckedBgDisabled` | - |
| `@radio-disabled-button-checked-color` | `buttonCheckedColorDisabled` | - |
| `@radio-wrapper-margin-right` | `wrapperMarginInlineEnd` | - |
### Rate 评分

View File

@@ -262,11 +262,11 @@
"immer": "^10.1.1",
"is-ci": "^4.0.0",
"isomorphic-fetch": "^3.0.0",
"jest": "^29.7.0",
"jest": "^30.0.0",
"jest-axe": "^10.0.0",
"jest-canvas-mock": "^2.5.2",
"jest-environment-jsdom": "^29.7.0",
"jest-environment-node": "^29.7.0",
"jest-environment-node": "^30.0.0",
"jest-image-snapshot": "^6.4.0",
"jest-puppeteer": "^11.0.0",
"jquery": "^3.7.1",
@@ -328,7 +328,7 @@
"tar": "^7.4.3",
"tar-fs": "^3.0.6",
"terser": "^5.36.0",
"tsx": "~4.19.2",
"tsx": "~4.20.3",
"typedoc": "^0.28.0",
"typescript": "~5.8.2",
"vanilla-jsoneditor": "^3.0.0",
@@ -358,16 +358,13 @@
},
"pnpm": {
"overrides": {
"brace-expansion": "2.0.1",
"nwsapi": "2.2.20"
}
},
"overrides": {
"brace-expansion": "2.0.1",
"nwsapi": "2.2.20"
},
"resolutions": {
"brace-expansion": "2.0.1",
"nwsapi": "2.2.20"
}
}