chore: sync feature into next

This commit is contained in:
thinkasany
2025-09-18 20:57:37 +08:00
13 changed files with 667 additions and 45 deletions

View File

@@ -7,6 +7,7 @@ import { FormattedMessage, useSiteData } from 'dumi';
import LZString from 'lz-string';
import packageJson from '../../../../package.json';
import useLocale from '../../../hooks/useLocale';
import ClientOnly from '../../common/ClientOnly';
import CodePenIcon from '../../icons/CodePenIcon';
import CodeSandboxIcon from '../../icons/CodeSandboxIcon';
@@ -54,6 +55,8 @@ const Actions: React.FC<ActionsProps> = ({
entryCode,
styleCode,
}) => {
const [, lang] = useLocale();
const isZhCN = lang === 'cn';
const { pkg } = useSiteData();
const { codeType } = React.use(DemoContext);
const codeSandboxIconRef = useRef<HTMLFormElement>(null);
@@ -213,6 +216,7 @@ createRoot(document.getElementById('container')).render(<Demo />);
demoJsContent,
indexCssContent,
suffix,
isZhCN,
});
return (

View File

@@ -6,12 +6,14 @@ const getStackblitzConfig = ({
indexCssContent = '',
demoJsContent = '',
suffix = '',
isZhCN = false,
}: {
title?: string;
dependencies: Record<string, string>;
indexCssContent?: string;
demoJsContent?: string;
suffix?: string;
isZhCN?: boolean;
}) => {
const _suffix = suffix === 'tsx' ? suffix : 'jsx';
const packageJSON = {
@@ -196,6 +198,9 @@ export default tseslint.config([
if (indexCssContent) {
files = { ...files, 'src/index.css': indexCssContent };
}
if (isZhCN) {
files = { ...files, '.npmrc': `registry=https://registry.npmmirror.com/` };
}
const project: Project = { title, description: '', template: 'node', files };
return project;

View File

@@ -173,6 +173,19 @@ tag: vVERSION
- 🚫 Modal `closable` support `onClose` props that trigger by any type of close. [#54607](https://github.com/ant-design/ant-design/pull/54607) [@EmilyyyLiu](https://github.com/EmilyyyLiu)
- 🛠 Remove Dropdown.Button, please use Space.Compact instead. [#53793](https://github.com/ant-design/ant-design/pull/53793) [@Meet-student](https://github.com/Meet-student)
## 5.27.4
`2025-09-17`
- Table
- 🐞 Fix Table duplicated filter dropdowns and tooltips when using `sticky` headers or `scroll.y`. [#54910](https://github.com/ant-design/ant-design/pull/54910) [@afc163](https://github.com/afc163)
- 🐞 Fix Table header not rendering on initial load. [#54910](https://github.com/ant-design/ant-design/pull/54910) [@afc163](https://github.com/afc163)
- 🐞 Fix Table column alignment when `scroll.x` is enabled. [#54899](https://github.com/ant-design/ant-design/pull/54899) [@afc163](https://github.com/afc163)
- 🐞 Fix Button where the padding of icon-only was affected by the theme. [#54970](https://github.com/ant-design/ant-design/pull/54970) [@guoyunhe](https://github.com/guoyunhe)
- 🐞 Fix Splitter `minSize` and `maxSize` not taking effect on initial mount in uncontrolled mode. [#54939](https://github.com/ant-design/ant-design/pull/54939) [@zombieJ](https://github.com/zombieJ)
- 🐞 Fix Switch wave effect compatibility with Tailwind CSS `disabled` variant. [#54933](https://github.com/ant-design/ant-design/pull/54933) [@Jiyur](https://github.com/Jiyur)
- 🐞 Fix Input.Search hover color changes for the border and icon when the search button is `disabled`. [#54892](https://github.com/ant-design/ant-design/pull/54892) [@Jiyur](https://github.com/Jiyur)
## 5.27.3
`2025-09-04`

View File

@@ -173,6 +173,20 @@ tag: vVERSION
- 🚫 Modal `closable` 支持 `onClose` 属性以任意方式关闭时触发。[#54607](https://github.com/ant-design/ant-design/pull/54607) [@EmilyyyLiu](https://github.com/EmilyyyLiu)
- 🛠 移除 Dropdown.Button请使用 Space.Compact。[#53793](https://github.com/ant-design/ant-design/pull/53793) [@Meet-student](https://github.com/Meet-student)
## 5.27.4
`2025-09-17`
- Table
- 🐞 修复 Table 在使 `sticky` 表头或设置 `scroll.y` 时,筛选下拉与 Tooltip 重复显示的问题。[#54910](https://github.com/ant-design/ant-design/pull/54910) [@afc163](https://github.com/afc163)
- 🐞 修复 Table 表头在首次加载时未正确渲染的问题。[#54910](https://github.com/ant-design/ant-design/pull/54910) [@afc163](https://github.com/afc163)
- 🐞 修复 Table 在启用 `scroll.x` 时,固定列的对齐问题。[#54899](https://github.com/ant-design/ant-design/pull/54899) [@afc163](https://github.com/afc163)
- 🐞 修复 Button 仅图标icon-only按钮的内边距受主题影响的问题。 [#54970](https://github.com/ant-design/ant-design/pull/54970) [@guoyunhe](https://github.com/guoyunhe)
- 🐞 修复 Splitter 在非受控模式下初次挂载时,`minSize``maxSize` 未生效的问题。[#54939](https://github.com/ant-design/ant-design/pull/54939) [@zombieJ](https://github.com/zombieJ)
- 🐞 修复 Switch 波纹效果与 Tailwind CSS disabled 变体的兼容性问题。[#54933](https://github.com/ant-design/ant-design/pull/54933) [@Jiyur](https://github.com/Jiyur)
- 🐞 修复 Input.Search 在搜索按钮为 `disabled` 时,悬停仍会导致边框和图标变色的问题。[#54892](https://github.com/ant-design/ant-design/pull/54892) [@Jiyur](https://github.com/Jiyur)
## 5.27.3
`2025-09-04`

View File

@@ -1724,7 +1724,7 @@ Array [
</div>
<div
class="ant-flex css-var-test-id ant-flex-gap-small"
style="transform: scale(3); transform-origin: left top;"
style="transform: scale(3); transform-origin: left top; margin-bottom: 100px;"
>
<button
class="ant-btn css-var-test-id ant-btn-default ant-btn-color-default ant-btn-variant-outlined ant-btn-lg ant-btn-icon-only"
@@ -1795,6 +1795,294 @@ Array [
</button>
</div>
</div>,
<div
class="ant-divider css-var-test-id ant-divider-horizontal ant-divider-with-text ant-divider-with-text-center ant-divider-plain"
role="separator"
>
<div
class="ant-divider-rail ant-divider-rail-start"
/>
<span
class="ant-divider-inner-text"
>
paddingInline / paddingInlineLG / paddingInlineSM
</span>
<div
class="ant-divider-rail ant-divider-rail-end"
/>
</div>,
<p
style="margin-bottom: 12px;"
>
Icon-only button should not be affected by paddingInline / paddingInlineLG / paddingInlineSM
</p>,
<div
class="ant-flex css-var-test-id"
style="margin-bottom: 12px; gap: 8px;"
>
<button
class="ant-btn css-var-test-id ant-btn-default ant-btn-color-default ant-btn-variant-outlined ant-btn-sm ant-btn-icon-only"
type="button"
>
<span
class="ant-btn-icon"
>
<span
aria-label="arrow-down"
class="anticon anticon-arrow-down"
role="img"
>
<svg
aria-hidden="true"
data-icon="arrow-down"
fill="currentColor"
focusable="false"
height="1em"
viewBox="64 64 896 896"
width="1em"
>
<path
d="M862 465.3h-81c-4.6 0-9 2-12.1 5.5L550 723.1V160c0-4.4-3.6-8-8-8h-60c-4.4 0-8 3.6-8 8v563.1L255.1 470.8c-3-3.5-7.4-5.5-12.1-5.5h-81c-6.8 0-10.5 8.1-6 13.2L487.9 861a31.96 31.96 0 0048.3 0L868 478.5c4.5-5.2.8-13.2-6-13.2z"
/>
</svg>
</span>
</span>
</button>
<button
class="ant-btn css-var-test-id ant-btn-round ant-btn-default ant-btn-color-default ant-btn-variant-outlined ant-btn-sm ant-btn-icon-only"
type="button"
>
<span
class="ant-btn-icon"
>
<span
aria-label="arrow-down"
class="anticon anticon-arrow-down"
role="img"
>
<svg
aria-hidden="true"
data-icon="arrow-down"
fill="currentColor"
focusable="false"
height="1em"
viewBox="64 64 896 896"
width="1em"
>
<path
d="M862 465.3h-81c-4.6 0-9 2-12.1 5.5L550 723.1V160c0-4.4-3.6-8-8-8h-60c-4.4 0-8 3.6-8 8v563.1L255.1 470.8c-3-3.5-7.4-5.5-12.1-5.5h-81c-6.8 0-10.5 8.1-6 13.2L487.9 861a31.96 31.96 0 0048.3 0L868 478.5c4.5-5.2.8-13.2-6-13.2z"
/>
</svg>
</span>
</span>
</button>
<button
class="ant-btn css-var-test-id ant-btn-circle ant-btn-default ant-btn-color-default ant-btn-variant-outlined ant-btn-sm ant-btn-icon-only"
type="button"
>
<span
class="ant-btn-icon"
>
<span
aria-label="arrow-down"
class="anticon anticon-arrow-down"
role="img"
>
<svg
aria-hidden="true"
data-icon="arrow-down"
fill="currentColor"
focusable="false"
height="1em"
viewBox="64 64 896 896"
width="1em"
>
<path
d="M862 465.3h-81c-4.6 0-9 2-12.1 5.5L550 723.1V160c0-4.4-3.6-8-8-8h-60c-4.4 0-8 3.6-8 8v563.1L255.1 470.8c-3-3.5-7.4-5.5-12.1-5.5h-81c-6.8 0-10.5 8.1-6 13.2L487.9 861a31.96 31.96 0 0048.3 0L868 478.5c4.5-5.2.8-13.2-6-13.2z"
/>
</svg>
</span>
</span>
</button>
</div>,
<div
class="ant-flex css-var-test-id"
style="margin-bottom: 12px; gap: 8px;"
>
<button
class="ant-btn css-var-test-id ant-btn-default ant-btn-color-default ant-btn-variant-outlined ant-btn-icon-only"
type="button"
>
<span
class="ant-btn-icon"
>
<span
aria-label="arrow-down"
class="anticon anticon-arrow-down"
role="img"
>
<svg
aria-hidden="true"
data-icon="arrow-down"
fill="currentColor"
focusable="false"
height="1em"
viewBox="64 64 896 896"
width="1em"
>
<path
d="M862 465.3h-81c-4.6 0-9 2-12.1 5.5L550 723.1V160c0-4.4-3.6-8-8-8h-60c-4.4 0-8 3.6-8 8v563.1L255.1 470.8c-3-3.5-7.4-5.5-12.1-5.5h-81c-6.8 0-10.5 8.1-6 13.2L487.9 861a31.96 31.96 0 0048.3 0L868 478.5c4.5-5.2.8-13.2-6-13.2z"
/>
</svg>
</span>
</span>
</button>
<button
class="ant-btn css-var-test-id ant-btn-round ant-btn-default ant-btn-color-default ant-btn-variant-outlined ant-btn-icon-only"
type="button"
>
<span
class="ant-btn-icon"
>
<span
aria-label="arrow-down"
class="anticon anticon-arrow-down"
role="img"
>
<svg
aria-hidden="true"
data-icon="arrow-down"
fill="currentColor"
focusable="false"
height="1em"
viewBox="64 64 896 896"
width="1em"
>
<path
d="M862 465.3h-81c-4.6 0-9 2-12.1 5.5L550 723.1V160c0-4.4-3.6-8-8-8h-60c-4.4 0-8 3.6-8 8v563.1L255.1 470.8c-3-3.5-7.4-5.5-12.1-5.5h-81c-6.8 0-10.5 8.1-6 13.2L487.9 861a31.96 31.96 0 0048.3 0L868 478.5c4.5-5.2.8-13.2-6-13.2z"
/>
</svg>
</span>
</span>
</button>
<button
class="ant-btn css-var-test-id ant-btn-circle ant-btn-default ant-btn-color-default ant-btn-variant-outlined ant-btn-icon-only"
type="button"
>
<span
class="ant-btn-icon"
>
<span
aria-label="arrow-down"
class="anticon anticon-arrow-down"
role="img"
>
<svg
aria-hidden="true"
data-icon="arrow-down"
fill="currentColor"
focusable="false"
height="1em"
viewBox="64 64 896 896"
width="1em"
>
<path
d="M862 465.3h-81c-4.6 0-9 2-12.1 5.5L550 723.1V160c0-4.4-3.6-8-8-8h-60c-4.4 0-8 3.6-8 8v563.1L255.1 470.8c-3-3.5-7.4-5.5-12.1-5.5h-81c-6.8 0-10.5 8.1-6 13.2L487.9 861a31.96 31.96 0 0048.3 0L868 478.5c4.5-5.2.8-13.2-6-13.2z"
/>
</svg>
</span>
</span>
</button>
</div>,
<div
class="ant-flex css-var-test-id"
style="margin-bottom: 12px; gap: 8px;"
>
<button
class="ant-btn css-var-test-id ant-btn-default ant-btn-color-default ant-btn-variant-outlined ant-btn-lg ant-btn-icon-only"
type="button"
>
<span
class="ant-btn-icon"
>
<span
aria-label="arrow-down"
class="anticon anticon-arrow-down"
role="img"
>
<svg
aria-hidden="true"
data-icon="arrow-down"
fill="currentColor"
focusable="false"
height="1em"
viewBox="64 64 896 896"
width="1em"
>
<path
d="M862 465.3h-81c-4.6 0-9 2-12.1 5.5L550 723.1V160c0-4.4-3.6-8-8-8h-60c-4.4 0-8 3.6-8 8v563.1L255.1 470.8c-3-3.5-7.4-5.5-12.1-5.5h-81c-6.8 0-10.5 8.1-6 13.2L487.9 861a31.96 31.96 0 0048.3 0L868 478.5c4.5-5.2.8-13.2-6-13.2z"
/>
</svg>
</span>
</span>
</button>
<button
class="ant-btn css-var-test-id ant-btn-round ant-btn-default ant-btn-color-default ant-btn-variant-outlined ant-btn-lg ant-btn-icon-only"
type="button"
>
<span
class="ant-btn-icon"
>
<span
aria-label="arrow-down"
class="anticon anticon-arrow-down"
role="img"
>
<svg
aria-hidden="true"
data-icon="arrow-down"
fill="currentColor"
focusable="false"
height="1em"
viewBox="64 64 896 896"
width="1em"
>
<path
d="M862 465.3h-81c-4.6 0-9 2-12.1 5.5L550 723.1V160c0-4.4-3.6-8-8-8h-60c-4.4 0-8 3.6-8 8v563.1L255.1 470.8c-3-3.5-7.4-5.5-12.1-5.5h-81c-6.8 0-10.5 8.1-6 13.2L487.9 861a31.96 31.96 0 0048.3 0L868 478.5c4.5-5.2.8-13.2-6-13.2z"
/>
</svg>
</span>
</span>
</button>
<button
class="ant-btn css-var-test-id ant-btn-circle ant-btn-default ant-btn-color-default ant-btn-variant-outlined ant-btn-lg ant-btn-icon-only"
type="button"
>
<span
class="ant-btn-icon"
>
<span
aria-label="arrow-down"
class="anticon anticon-arrow-down"
role="img"
>
<svg
aria-hidden="true"
data-icon="arrow-down"
fill="currentColor"
focusable="false"
height="1em"
viewBox="64 64 896 896"
width="1em"
>
<path
d="M862 465.3h-81c-4.6 0-9 2-12.1 5.5L550 723.1V160c0-4.4-3.6-8-8-8h-60c-4.4 0-8 3.6-8 8v563.1L255.1 470.8c-3-3.5-7.4-5.5-12.1-5.5h-81c-6.8 0-10.5 8.1-6 13.2L487.9 861a31.96 31.96 0 0048.3 0L868 478.5c4.5-5.2.8-13.2-6-13.2z"
/>
</svg>
</span>
</span>
</button>
</div>,
]
`;

View File

@@ -1626,7 +1626,7 @@ Array [
</div>
<div
class="ant-flex css-var-test-id ant-flex-gap-small"
style="transform:scale(3);transform-origin:left top"
style="transform:scale(3);transform-origin:left top;margin-bottom:100px"
>
<button
class="ant-btn css-var-test-id ant-btn-default ant-btn-color-default ant-btn-variant-outlined ant-btn-lg ant-btn-icon-only"
@@ -1697,6 +1697,294 @@ Array [
</button>
</div>
</div>,
<div
class="ant-divider css-var-test-id ant-divider-horizontal ant-divider-with-text ant-divider-with-text-center ant-divider-plain"
role="separator"
>
<div
class="ant-divider-rail ant-divider-rail-start"
/>
<span
class="ant-divider-inner-text"
>
paddingInline / paddingInlineLG / paddingInlineSM
</span>
<div
class="ant-divider-rail ant-divider-rail-end"
/>
</div>,
<p
style="margin-bottom:12px"
>
Icon-only button should not be affected by paddingInline / paddingInlineLG / paddingInlineSM
</p>,
<div
class="ant-flex css-var-test-id"
style="margin-bottom:12px;gap:8px"
>
<button
class="ant-btn css-var-test-id ant-btn-default ant-btn-color-default ant-btn-variant-outlined ant-btn-sm ant-btn-icon-only"
type="button"
>
<span
class="ant-btn-icon"
>
<span
aria-label="arrow-down"
class="anticon anticon-arrow-down"
role="img"
>
<svg
aria-hidden="true"
data-icon="arrow-down"
fill="currentColor"
focusable="false"
height="1em"
viewBox="64 64 896 896"
width="1em"
>
<path
d="M862 465.3h-81c-4.6 0-9 2-12.1 5.5L550 723.1V160c0-4.4-3.6-8-8-8h-60c-4.4 0-8 3.6-8 8v563.1L255.1 470.8c-3-3.5-7.4-5.5-12.1-5.5h-81c-6.8 0-10.5 8.1-6 13.2L487.9 861a31.96 31.96 0 0048.3 0L868 478.5c4.5-5.2.8-13.2-6-13.2z"
/>
</svg>
</span>
</span>
</button>
<button
class="ant-btn css-var-test-id ant-btn-round ant-btn-default ant-btn-color-default ant-btn-variant-outlined ant-btn-sm ant-btn-icon-only"
type="button"
>
<span
class="ant-btn-icon"
>
<span
aria-label="arrow-down"
class="anticon anticon-arrow-down"
role="img"
>
<svg
aria-hidden="true"
data-icon="arrow-down"
fill="currentColor"
focusable="false"
height="1em"
viewBox="64 64 896 896"
width="1em"
>
<path
d="M862 465.3h-81c-4.6 0-9 2-12.1 5.5L550 723.1V160c0-4.4-3.6-8-8-8h-60c-4.4 0-8 3.6-8 8v563.1L255.1 470.8c-3-3.5-7.4-5.5-12.1-5.5h-81c-6.8 0-10.5 8.1-6 13.2L487.9 861a31.96 31.96 0 0048.3 0L868 478.5c4.5-5.2.8-13.2-6-13.2z"
/>
</svg>
</span>
</span>
</button>
<button
class="ant-btn css-var-test-id ant-btn-circle ant-btn-default ant-btn-color-default ant-btn-variant-outlined ant-btn-sm ant-btn-icon-only"
type="button"
>
<span
class="ant-btn-icon"
>
<span
aria-label="arrow-down"
class="anticon anticon-arrow-down"
role="img"
>
<svg
aria-hidden="true"
data-icon="arrow-down"
fill="currentColor"
focusable="false"
height="1em"
viewBox="64 64 896 896"
width="1em"
>
<path
d="M862 465.3h-81c-4.6 0-9 2-12.1 5.5L550 723.1V160c0-4.4-3.6-8-8-8h-60c-4.4 0-8 3.6-8 8v563.1L255.1 470.8c-3-3.5-7.4-5.5-12.1-5.5h-81c-6.8 0-10.5 8.1-6 13.2L487.9 861a31.96 31.96 0 0048.3 0L868 478.5c4.5-5.2.8-13.2-6-13.2z"
/>
</svg>
</span>
</span>
</button>
</div>,
<div
class="ant-flex css-var-test-id"
style="margin-bottom:12px;gap:8px"
>
<button
class="ant-btn css-var-test-id ant-btn-default ant-btn-color-default ant-btn-variant-outlined ant-btn-icon-only"
type="button"
>
<span
class="ant-btn-icon"
>
<span
aria-label="arrow-down"
class="anticon anticon-arrow-down"
role="img"
>
<svg
aria-hidden="true"
data-icon="arrow-down"
fill="currentColor"
focusable="false"
height="1em"
viewBox="64 64 896 896"
width="1em"
>
<path
d="M862 465.3h-81c-4.6 0-9 2-12.1 5.5L550 723.1V160c0-4.4-3.6-8-8-8h-60c-4.4 0-8 3.6-8 8v563.1L255.1 470.8c-3-3.5-7.4-5.5-12.1-5.5h-81c-6.8 0-10.5 8.1-6 13.2L487.9 861a31.96 31.96 0 0048.3 0L868 478.5c4.5-5.2.8-13.2-6-13.2z"
/>
</svg>
</span>
</span>
</button>
<button
class="ant-btn css-var-test-id ant-btn-round ant-btn-default ant-btn-color-default ant-btn-variant-outlined ant-btn-icon-only"
type="button"
>
<span
class="ant-btn-icon"
>
<span
aria-label="arrow-down"
class="anticon anticon-arrow-down"
role="img"
>
<svg
aria-hidden="true"
data-icon="arrow-down"
fill="currentColor"
focusable="false"
height="1em"
viewBox="64 64 896 896"
width="1em"
>
<path
d="M862 465.3h-81c-4.6 0-9 2-12.1 5.5L550 723.1V160c0-4.4-3.6-8-8-8h-60c-4.4 0-8 3.6-8 8v563.1L255.1 470.8c-3-3.5-7.4-5.5-12.1-5.5h-81c-6.8 0-10.5 8.1-6 13.2L487.9 861a31.96 31.96 0 0048.3 0L868 478.5c4.5-5.2.8-13.2-6-13.2z"
/>
</svg>
</span>
</span>
</button>
<button
class="ant-btn css-var-test-id ant-btn-circle ant-btn-default ant-btn-color-default ant-btn-variant-outlined ant-btn-icon-only"
type="button"
>
<span
class="ant-btn-icon"
>
<span
aria-label="arrow-down"
class="anticon anticon-arrow-down"
role="img"
>
<svg
aria-hidden="true"
data-icon="arrow-down"
fill="currentColor"
focusable="false"
height="1em"
viewBox="64 64 896 896"
width="1em"
>
<path
d="M862 465.3h-81c-4.6 0-9 2-12.1 5.5L550 723.1V160c0-4.4-3.6-8-8-8h-60c-4.4 0-8 3.6-8 8v563.1L255.1 470.8c-3-3.5-7.4-5.5-12.1-5.5h-81c-6.8 0-10.5 8.1-6 13.2L487.9 861a31.96 31.96 0 0048.3 0L868 478.5c4.5-5.2.8-13.2-6-13.2z"
/>
</svg>
</span>
</span>
</button>
</div>,
<div
class="ant-flex css-var-test-id"
style="margin-bottom:12px;gap:8px"
>
<button
class="ant-btn css-var-test-id ant-btn-default ant-btn-color-default ant-btn-variant-outlined ant-btn-lg ant-btn-icon-only"
type="button"
>
<span
class="ant-btn-icon"
>
<span
aria-label="arrow-down"
class="anticon anticon-arrow-down"
role="img"
>
<svg
aria-hidden="true"
data-icon="arrow-down"
fill="currentColor"
focusable="false"
height="1em"
viewBox="64 64 896 896"
width="1em"
>
<path
d="M862 465.3h-81c-4.6 0-9 2-12.1 5.5L550 723.1V160c0-4.4-3.6-8-8-8h-60c-4.4 0-8 3.6-8 8v563.1L255.1 470.8c-3-3.5-7.4-5.5-12.1-5.5h-81c-6.8 0-10.5 8.1-6 13.2L487.9 861a31.96 31.96 0 0048.3 0L868 478.5c4.5-5.2.8-13.2-6-13.2z"
/>
</svg>
</span>
</span>
</button>
<button
class="ant-btn css-var-test-id ant-btn-round ant-btn-default ant-btn-color-default ant-btn-variant-outlined ant-btn-lg ant-btn-icon-only"
type="button"
>
<span
class="ant-btn-icon"
>
<span
aria-label="arrow-down"
class="anticon anticon-arrow-down"
role="img"
>
<svg
aria-hidden="true"
data-icon="arrow-down"
fill="currentColor"
focusable="false"
height="1em"
viewBox="64 64 896 896"
width="1em"
>
<path
d="M862 465.3h-81c-4.6 0-9 2-12.1 5.5L550 723.1V160c0-4.4-3.6-8-8-8h-60c-4.4 0-8 3.6-8 8v563.1L255.1 470.8c-3-3.5-7.4-5.5-12.1-5.5h-81c-6.8 0-10.5 8.1-6 13.2L487.9 861a31.96 31.96 0 0048.3 0L868 478.5c4.5-5.2.8-13.2-6-13.2z"
/>
</svg>
</span>
</span>
</button>
<button
class="ant-btn css-var-test-id ant-btn-circle ant-btn-default ant-btn-color-default ant-btn-variant-outlined ant-btn-lg ant-btn-icon-only"
type="button"
>
<span
class="ant-btn-icon"
>
<span
aria-label="arrow-down"
class="anticon anticon-arrow-down"
role="img"
>
<svg
aria-hidden="true"
data-icon="arrow-down"
fill="currentColor"
focusable="false"
height="1em"
viewBox="64 64 896 896"
width="1em"
>
<path
d="M862 465.3h-81c-4.6 0-9 2-12.1 5.5L550 723.1V160c0-4.4-3.6-8-8-8h-60c-4.4 0-8 3.6-8 8v563.1L255.1 470.8c-3-3.5-7.4-5.5-12.1-5.5h-81c-6.8 0-10.5 8.1-6 13.2L487.9 861a31.96 31.96 0 0048.3 0L868 478.5c4.5-5.2.8-13.2-6-13.2z"
/>
</svg>
</span>
</span>
</button>
</div>,
]
`;

View File

@@ -1,6 +1,6 @@
import React from 'react';
import { MinusSquareOutlined, SearchOutlined } from '@ant-design/icons';
import { Button, ConfigProvider, Divider, Flex, Radio, Tooltip, Input } from 'antd';
import { ArrowDownOutlined, MinusSquareOutlined, SearchOutlined } from '@ant-design/icons';
import { Button, ConfigProvider, Divider, Flex, Input, Radio, Tooltip } from 'antd';
import type { ConfigProviderProps } from 'antd';
import { FiColumns } from 'react-icons/fi';
@@ -99,6 +99,7 @@ const App: React.FC = () => {
style={{
transform: 'scale(3)',
transformOrigin: 'left top',
marginBottom: 100,
}}
>
<Button icon={<MinusSquareOutlined />} />
@@ -108,6 +109,37 @@ const App: React.FC = () => {
</Flex>
</Flex>
</ConfigProvider>
<ConfigProvider
theme={{
components: { Button: { paddingInline: 100, paddingInlineLG: 150, paddingInlineSM: 50 } },
}}
>
<Divider plain> paddingInline / paddingInlineLG / paddingInlineSM </Divider>
<p style={{ marginBottom: 12 }}>
Icon-only button should not be affected by paddingInline / paddingInlineLG /
paddingInlineSM
</p>
<Flex gap={8} style={{ marginBottom: 12 }}>
<Button size="small" shape="default" icon={<ArrowDownOutlined />} />
<Button size="small" shape="round" icon={<ArrowDownOutlined />} />
<Button size="small" shape="circle" icon={<ArrowDownOutlined />} />
</Flex>
<Flex gap={8} style={{ marginBottom: 12 }}>
<Button shape="default" icon={<ArrowDownOutlined />} />
<Button shape="round" icon={<ArrowDownOutlined />} />
<Button shape="circle" icon={<ArrowDownOutlined />} />
</Flex>
<Flex gap={8} style={{ marginBottom: 12 }}>
<Button size="large" shape="default" icon={<ArrowDownOutlined />} />
<Button size="large" shape="round" icon={<ArrowDownOutlined />} />
<Button size="large" shape="circle" icon={<ArrowDownOutlined />} />
</Flex>
</ConfigProvider>
</>
);
};

View File

@@ -73,10 +73,6 @@ const genSharedButtonStyle: GenerateStyle<ButtonToken, CSSObject> = (token): CSS
[`&${componentCls}-compact-item`]: {
flex: 'none',
},
[`&${componentCls}-round`]: {
width: 'auto',
},
},
// Loading
@@ -138,11 +134,6 @@ const genCircleButtonStyle: GenerateStyle<ButtonToken, CSSObject> = (token) => (
borderRadius: '50%',
});
const genRoundButtonStyle: GenerateStyle<ButtonToken, CSSObject> = (token) => ({
borderRadius: token.controlHeight,
paddingInline: token.buttonPaddingHorizontal ?? token.calc(token.controlHeight).div(2).equal(),
});
// =============================== Size ===============================
const genButtonStyle = (token: ButtonToken, prefixCls = ''): CSSInterpolation => {
const {
@@ -178,7 +169,12 @@ const genButtonStyle = (token: ButtonToken, prefixCls = ''): CSSInterpolation =>
[`${componentCls}${componentCls}-circle${prefixCls}`]: genCircleButtonStyle(token),
},
{
[`${componentCls}${componentCls}-round${prefixCls}`]: genRoundButtonStyle(token),
[`${componentCls}${componentCls}-round${prefixCls}`]: {
borderRadius: token.controlHeight,
[`&:not(${componentCls}-icon-only)`]: {
paddingInline: token.buttonPaddingHorizontal,
},
},
},
];
};

View File

@@ -342,7 +342,6 @@ const genCardStyle: GenerateStyle<CardToken> = (token): CSSObject => {
[`${componentCls}-body`]: {
padding: bodyPadding,
borderRadius: `0 0 ${unit(token.borderRadiusLG)} ${unit(token.borderRadiusLG)}`,
...clearFix(),
},
[`${componentCls}-grid`]: genCardGridStyle(token),

View File

@@ -54,6 +54,7 @@ export { default as Dropdown } from './dropdown';
export type {
// typo, but we need to support it for backwards compatibility
// https://github.com/ant-design/ant-design/pull/35161
/** @deprecated Use `DropdownProps` instead. */
DropdownProps as DropDownProps,
DropdownProps,
} from './dropdown';

View File

@@ -134,7 +134,7 @@
"@rc-component/pagination": "~1.1.1",
"@rc-component/picker": "~1.3.0",
"@rc-component/progress": "~1.0.1",
"@rc-component/qrcode": "~1.0.0",
"@rc-component/qrcode": "~1.0.1",
"@rc-component/rate": "~1.0.0",
"@rc-component/resize-observer": "^1.0.0",
"@rc-component/segmented": "~1.2.1",
@@ -281,7 +281,7 @@
"node-fetch": "^3.3.2",
"node-notifier": "^10.0.1",
"open": "^10.1.0",
"ora": "^8.1.0",
"ora": "^9.0.0",
"p-all": "^5.0.0",
"package-manager-detector": "^1.0.0",
"pngjs": "^7.0.0",

View File

@@ -251,11 +251,16 @@ const runPrePublish = async () => {
await runScript({ event: 'test:package-diff', path: '.', stdio: 'inherit' });
showMessage(`文件检查通过,准备发布!`, 'succeed');
new Notifier().notify({
title: '✅ 准备发布到 npm',
message: '产物已经准备好了,快回来输入 npm 校验码了!',
sound: 'Crystal',
});
try {
await new Notifier().notify({
title: '✅ 准备发布到 npm',
message: '产物已经准备好了,快回来输入 npm 校验码了!',
sound: 'Crystal',
});
} catch (e) {
console.log('通知发送失败', e);
}
process.exit(0);
};

View File

@@ -1,23 +0,0 @@
{
"compilerOptions": {
"incremental": true,
"target": "ES2015",
"jsx": "react",
"module": "commonjs",
"resolveJsonModule": true,
"typeRoots": ["../node_modules/@types"],
"types": ["node", "jest"],
"allowJs": true,
"strict": true,
"declaration": false,
"importHelpers": false,
"noEmitOnError": false,
"sourceMap": false,
"allowSyntheticDefaultImports": true,
"esModuleInterop": true,
"skipDefaultLibCheck": true,
"skipLibCheck": true
},
"include": ["./"],
"exclude": ["**/node_modules", "**/*.js"]
}