Merge branch 'master' into Funtag

This commit is contained in:
thinkasany 2025-03-04 21:49:43 +08:00 committed by GitHub
commit 57667373ae
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
50 changed files with 1268 additions and 92 deletions

View File

@ -25,6 +25,7 @@ Thank you!
- [ ] ✅ Test Case
- [ ] 🔀 Branch merge
- [ ] ⏩ Workflow
- [ ] ⌨️ Accessibility improvement
- [ ] ❓ Other (about what?)
### 🔗 Related Issues

View File

@ -25,6 +25,7 @@
- [ ] ✅ 测试用例
- [ ] 🔀 分支合并
- [ ] ⏩ 工作流程
- [ ] ⌨️ 无障碍改进
- [ ] ❓ 其他改动(是关于什么的改动?)
### 🔗 相关 Issue

View File

@ -61,7 +61,7 @@ jobs:
steps:
# We need get PR id first
- name: download pr artifact
uses: dawidd6/action-download-artifact@v8
uses: dawidd6/action-download-artifact@v9
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@v8
uses: dawidd6/action-download-artifact@v9
with:
workflow: ${{ github.event.workflow_run.workflow_id }}
run_id: ${{ github.event.workflow_run.id }}

View File

@ -68,7 +68,7 @@ jobs:
# We need get persist-index first
- name: download image snapshot artifact
uses: dawidd6/action-download-artifact@v8
uses: dawidd6/action-download-artifact@v9
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@v8
uses: dawidd6/action-download-artifact@v9
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@v8
uses: dawidd6/action-download-artifact@v9
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@v8
uses: dawidd6/action-download-artifact@v9
with:
workflow: ${{ github.event.workflow_run.workflow_id }}
run_id: ${{ github.event.workflow_run.id }}

View File

@ -15,6 +15,29 @@ tag: vVERSION
---
## 5.24.2
`2025-02-24`
- Input
- 🐞 Fix Input with component token `inputFontSize` breaks the height of `controlHeight`. [#52865](https://github.com/ant-design/ant-design/pull/52865) [@zombieJ](https://github.com/zombieJ)
- 🐞 Fix Input.Search has a border that is not aligned with the bottom of the search button when configure `variable` as `underlined`. [#52861](https://github.com/ant-design/ant-design/pull/52861) [@ustcfury](https://github.com/ustcfury)
- 🛠 Improve Input.OTP logic for create default state. [#52878](https://github.com/ant-design/ant-design/pull/52878) [@Dandelion-F](https://github.com/Dandelion-F)
- 🛠 Improve Input.OTP implementation for render separator. [#52841](https://github.com/ant-design/ant-design/pull/52841) [@li-jia-nan](https://github.com/li-jia-nan)
- Watermark
- 🐞 Fix Watermark may cause page unresponsive when re-rendering. [#52897](https://github.com/ant-design/ant-design/pull/52897) [@765477020](https://github.com/765477020)
- 🆕 Improve Watermark rendering logic to avoid disable it via developer tools and `hidden` attribute. [#52891](https://github.com/ant-design/ant-design/pull/52891) [@arronlai](https://github.com/arronlai)
- 🐞 Fix DatePicker.RangePicker arrow position not correctly when sometime reopened. [#52854](https://github.com/ant-design/ant-design/pull/52854) [@zombieJ](https://github.com/zombieJ)
- 🐞 Fix Layout.Sider content overflow issue when `collapsedWidth={0}`. [#52862](https://github.com/ant-design/ant-design/pull/52862) [@afc163](https://github.com/afc163)
- 🛠 Refactor Grid internal useBreakpoint logic to be same as other component, this will not affect usage. [#52870](https://github.com/ant-design/ant-design/pull/52870) [@zombieJ](https://github.com/zombieJ)
- 💄 Fix Button styles for hyperlink mode. [#52888](https://github.com/ant-design/ant-design/pull/52888) [@DDDDD12138](https://github.com/DDDDD12138)
- 💄 Fix Table sortable column headers could not wrap automatically. [#52899](https://github.com/ant-design/ant-design/pull/52899) [@765477020](https://github.com/765477020)
- ⚡️ Improve Menu re-rendering performance when pass function to `expandIcon` property. [#52863](https://github.com/ant-design/ant-design/pull/52863) [@wanpan11](https://github.com/wanpan11)
- ⚡️ Improve Carousel indicator animation performance. [#52881](https://github.com/ant-design/ant-design/pull/52881) [@li-jia-nan](https://github.com/li-jia-nan)
- RTL
- 💄 Fix DatePicker wrong icon direction for RTL mode. [#52896](https://github.com/ant-design/ant-design/pull/52896) [@li-jia-nan](https://github.com/li-jia-nan)
- 💄 Fix Dropdown wrong arrow direction of multi-level menu for RTL mode. [#52885](https://github.com/ant-design/ant-design/pull/52885) [@yellowryan](https://github.com/yellowryan)
## 5.24.1
`2025-02-17`

View File

@ -15,6 +15,29 @@ tag: vVERSION
---
## 5.24.2
`2025-02-24`
- Input
- 🐞 修复 Input 配置 `inputFontSize` component token 时,`controlHeight` 会不生效的问题。[#52865](https://github.com/ant-design/ant-design/pull/52865) [@zombieJ](https://github.com/zombieJ)
- 🐞 修复 Input.Search 在设置 `variant``underlined` 时下边框与搜索按钮底部没对齐的问题。[#52861](https://github.com/ant-design/ant-design/pull/52861) [@ustcfury](https://github.com/ustcfury)
- 🛠 优化 Input.OTP 的默认状态创建逻辑。[#52878](https://github.com/ant-design/ant-design/pull/52878) [@Dandelion-F](https://github.com/Dandelion-F)
- 🛠 优化 Input.OTP 的分隔符渲染实现。[#52841](https://github.com/ant-design/ant-design/pull/52841) [@li-jia-nan](https://github.com/li-jia-nan)
- Watermark
- 🐞 修复 Watermark 重新渲染时可能导致页面卡死的问题。[#52897](https://github.com/ant-design/ant-design/pull/52897) [@765477020](https://github.com/765477020)
- 🆕 调整 Watermark 渲染逻辑,防止通过开发者工具添加 `hidden` 属性来去掉水印。[#52891](https://github.com/ant-design/ant-design/pull/52891) [@arronlai](https://github.com/arronlai)
- 🐞 修复 DatePicker.RangePicker 在弹层重新打开的时候,有可能出现箭头位置不正确的问题。[#52854](https://github.com/ant-design/ant-design/pull/52854) [@zombieJ](https://github.com/zombieJ)
- 🐞 修复 Layout.Sider 当 `collapsedWidth={0}` 时的内容溢出的问题。[#52862](https://github.com/ant-design/ant-design/pull/52862) [@afc163](https://github.com/afc163)
- 🛠 重构 Grid 内部响应式逻辑以复用其他组件类似的逻辑,该更新不会于使用上有所变化。[#52870](https://github.com/ant-design/ant-design/pull/52870) [@zombieJ](https://github.com/zombieJ)
- 💄 修复 Button 超链接模式的样式。[#52888](https://github.com/ant-design/ant-design/pull/52888) [@DDDDD12138](https://github.com/DDDDD12138)
- 💄 修复 Table 可排序列头不自动换行的问题。[#52899](https://github.com/ant-design/ant-design/pull/52899) [@765477020](https://github.com/765477020)
- ⚡️ 优化 Menu 在 `expandIcon` 属性传入函数时重新渲染的性能。[#52863](https://github.com/ant-design/ant-design/pull/52863) [@wanpan11](https://github.com/wanpan11)
- ⚡️ 优化 Carousel 指示器的动画性能。[#52881](https://github.com/ant-design/ant-design/pull/52881) [@li-jia-nan](https://github.com/li-jia-nan)
- RTL
- 💄 修复 DatePicker 在 RTL 模式下图标方向错误的问题。[#52896](https://github.com/ant-design/ant-design/pull/52896) [@li-jia-nan](https://github.com/li-jia-nan)
- 💄 修复 Dropdown 在 RTL 模式下多级菜单箭头方向错误的问题。[#52885](https://github.com/ant-design/ant-design/pull/52885) [@yellowryan](https://github.com/yellowryan)
## 5.24.1
`2025-02-17`

View File

@ -579,7 +579,7 @@ Array [
width="1em"
>
<path
d="M880 112c17.7 0 32 14.3 32 32v736c0 17.7-14.3 32-32 32H144c-17.7 0-32-14.3-32-32V144c0-17.7 14.3-32 32-32zM639.98 338.82h-.04l-.08.06L512 466.75 384.14 338.88c-.04-.05-.06-.06-.08-.06a.12.12 0 00-.07 0c-.03 0-.05.01-.09.05l-45.02 45.02a.2.2 0 00-.05.09.12.12 0 000 .07v.02a.27.27 0 00.06.06L466.75 512 338.88 639.86c-.05.04-.06.06-.06.08a.12.12 0 000 .07c0 .03.01.05.05.09l45.02 45.02a.2.2 0 00.09.05.12.12 0 00.07 0c.02 0 .04-.01.08-.05L512 557.25l127.86 127.87c.04.04.06.05.08.05a.12.12 0 00.07 0c.03 0 .05-.01.09-.05l45.02-45.02a.2.2 0 00.05-.09.12.12 0 000-.07v-.02a.27.27 0 00-.05-.06L557.25 512l127.87-127.86c.04-.04.05-.06.05-.08a.12.12 0 000-.07c0-.03-.01-.05-.05-.09l-45.02-45.02a.2.2 0 00-.09-.05.12.12 0 00-.07 0z"
d="M880 112c17.7 0 32 14.3 32 32v736c0 17.7-14.3 32-32 32H144c-17.7 0-32-14.3-32-32V144c0-17.7 14.3-32 32-32zm-40 72H184v656h656V184zM640.01 338.83c.03 0 .05.01.09.06l45.02 45.01a.2.2 0 01.05.09.12.12 0 010 .07c0 .02-.01.04-.05.08L557.25 512l127.87 127.86a.27.27 0 01.05.06v.02a.12.12 0 010 .07c0 .03-.01.05-.05.09l-45.02 45.02a.2.2 0 01-.09.05.12.12 0 01-.07 0c-.02 0-.04-.01-.08-.05L512 557.25 384.14 685.12c-.04.04-.06.05-.08.05a.12.12 0 01-.07 0c-.03 0-.05-.01-.09-.05l-45.02-45.02a.2.2 0 01-.05-.09.12.12 0 010-.07c0-.02.01-.04.06-.08L466.75 512 338.88 384.14a.27.27 0 01-.05-.06l-.01-.02a.12.12 0 010-.07c0-.03.01-.05.05-.09l45.02-45.02a.2.2 0 01.09-.05.12.12 0 01.07 0c.02 0 .04.01.08.06L512 466.75l127.86-127.86c.04-.05.06-.06.08-.06a.12.12 0 01.07 0z"
/>
</svg>
</span>

View File

@ -573,7 +573,7 @@ Array [
width="1em"
>
<path
d="M880 112c17.7 0 32 14.3 32 32v736c0 17.7-14.3 32-32 32H144c-17.7 0-32-14.3-32-32V144c0-17.7 14.3-32 32-32zM639.98 338.82h-.04l-.08.06L512 466.75 384.14 338.88c-.04-.05-.06-.06-.08-.06a.12.12 0 00-.07 0c-.03 0-.05.01-.09.05l-45.02 45.02a.2.2 0 00-.05.09.12.12 0 000 .07v.02a.27.27 0 00.06.06L466.75 512 338.88 639.86c-.05.04-.06.06-.06.08a.12.12 0 000 .07c0 .03.01.05.05.09l45.02 45.02a.2.2 0 00.09.05.12.12 0 00.07 0c.02 0 .04-.01.08-.05L512 557.25l127.86 127.87c.04.04.06.05.08.05a.12.12 0 00.07 0c.03 0 .05-.01.09-.05l45.02-45.02a.2.2 0 00.05-.09.12.12 0 000-.07v-.02a.27.27 0 00-.05-.06L557.25 512l127.87-127.86c.04-.04.05-.06.05-.08a.12.12 0 000-.07c0-.03-.01-.05-.05-.09l-45.02-45.02a.2.2 0 00-.09-.05.12.12 0 00-.07 0z"
d="M880 112c17.7 0 32 14.3 32 32v736c0 17.7-14.3 32-32 32H144c-17.7 0-32-14.3-32-32V144c0-17.7 14.3-32 32-32zm-40 72H184v656h656V184zM640.01 338.83c.03 0 .05.01.09.06l45.02 45.01a.2.2 0 01.05.09.12.12 0 010 .07c0 .02-.01.04-.05.08L557.25 512l127.87 127.86a.27.27 0 01.05.06v.02a.12.12 0 010 .07c0 .03-.01.05-.05.09l-45.02 45.02a.2.2 0 01-.09.05.12.12 0 01-.07 0c-.02 0-.04-.01-.08-.05L512 557.25 384.14 685.12c-.04.04-.06.05-.08.05a.12.12 0 01-.07 0c-.03 0-.05-.01-.09-.05l-45.02-45.02a.2.2 0 01-.05-.09.12.12 0 010-.07c0-.02.01-.04.06-.08L466.75 512 338.88 384.14a.27.27 0 01-.05-.06l-.01-.02a.12.12 0 010-.07c0-.03.01-.05.05-.09l45.02-45.02a.2.2 0 01.09-.05.12.12 0 01.07 0c.02 0 .04.01.08.06L512 466.75l127.86-127.86c.04-.05.06-.06.08-.06a.12.12 0 01.07 0z"
/>
</svg>
</span>

View File

@ -1,5 +1,5 @@
import React from 'react';
import { CloseSquareFilled } from '@ant-design/icons';
import { CloseSquareOutlined } from '@ant-design/icons';
import { Alert } from 'antd';
const onClose = (e: React.MouseEvent<HTMLButtonElement, MouseEvent>) => {
@ -27,11 +27,11 @@ const App: React.FC = () => (
message="Error Text"
description="Error Description Error Description Error Description Error Description Error Description Error Description"
type="error"
onClose={onClose}
closable={{
'aria-label': 'close',
closeIcon: <CloseSquareFilled />,
closeIcon: <CloseSquareOutlined />,
}}
onClose={onClose}
/>
</>
);

View File

@ -1,5 +1,525 @@
// Jest Snapshot v1, https://goo.gl/fbAQLP
exports[`renders components/auto-complete/demo/AutoComplete-and-Select.tsx extend context correctly 1`] = `
<div
class="ant-flex ant-flex-align-stretch ant-flex-vertical"
style="gap: 16px;"
>
<div
class="ant-flex"
>
<div
class="ant-select ant-select-sm ant-select-outlined ant-select-single ant-select-show-arrow ant-select-show-search"
style="width: 200px;"
>
<div
class="ant-select-selector"
>
<span
class="ant-select-selection-wrap"
>
<span
class="ant-select-selection-search"
>
<input
aria-autocomplete="list"
aria-controls="rc_select_TEST_OR_SSR_list"
aria-expanded="false"
aria-haspopup="listbox"
aria-owns="rc_select_TEST_OR_SSR_list"
autocomplete="off"
class="ant-select-selection-search-input"
id="rc_select_TEST_OR_SSR"
role="combobox"
type="search"
value="centered"
/>
</span>
<span
class="ant-select-selection-item"
style="visibility: hidden;"
title="centered"
>
centered
</span>
</span>
</div>
<div
class="ant-select-dropdown ant-slide-up-appear ant-slide-up-appear-prepare ant-slide-up ant-select-dropdown-empty ant-select-dropdown-placement-bottomLeft"
style="--arrow-x: 0px; --arrow-y: 0px; left: -1000vw; top: -1000vh; box-sizing: border-box;"
>
<div>
<div
class="ant-select-item-empty"
id="rc_select_TEST_OR_SSR_list"
role="listbox"
>
<div
class="ant-empty ant-empty-normal ant-empty-small"
>
<div
class="ant-empty-image"
>
<svg
height="41"
viewBox="0 0 64 41"
width="64"
xmlns="http://www.w3.org/2000/svg"
>
<title>
No data
</title>
<g
fill="none"
fill-rule="evenodd"
transform="translate(0 1)"
>
<ellipse
cx="32"
cy="33"
fill="#f5f5f5"
rx="32"
ry="7"
/>
<g
fill-rule="nonzero"
stroke="#d9d9d9"
>
<path
d="M55 12.76L44.854 1.258C44.367.474 43.656 0 42.907 0H21.093c-.749 0-1.46.474-1.947 1.257L9 12.761V22h46v-9.24z"
/>
<path
d="M41.613 15.931c0-1.605.994-2.93 2.227-2.931H55v18.137C55 33.26 53.68 35 52.05 35h-40.1C10.32 35 9 33.259 9 31.137V13h11.16c1.233 0 2.227 1.323 2.227 2.928v.022c0 1.605 1.005 2.901 2.237 2.901h14.752c1.232 0 2.237-1.308 2.237-2.913v-.007z"
fill="#fafafa"
/>
</g>
</g>
</svg>
</div>
<div
class="ant-empty-description"
>
No data
</div>
</div>
</div>
</div>
</div>
<span
aria-hidden="true"
class="ant-select-arrow"
style="user-select: none;"
unselectable="on"
>
<span
aria-label="down"
class="anticon anticon-down ant-select-suffix"
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>
</span>
</div>
<div
class="ant-select ant-select-sm ant-select-outlined ant-select-auto-complete ant-select-single ant-select-show-search"
style="width: 200px;"
>
<div
class="ant-select-selector"
>
<span
class="ant-select-selection-wrap"
>
<span
class="ant-select-selection-search"
>
<input
aria-autocomplete="list"
aria-controls="rc_select_TEST_OR_SSR_list"
aria-expanded="false"
aria-haspopup="listbox"
aria-owns="rc_select_TEST_OR_SSR_list"
autocomplete="off"
class="ant-select-selection-search-input"
id="rc_select_TEST_OR_SSR"
role="combobox"
type="search"
value="centered"
/>
</span>
</span>
</div>
<div
class="ant-select-dropdown ant-slide-up-appear ant-slide-up-appear-prepare ant-slide-up ant-select-dropdown-empty ant-select-dropdown-placement-bottomLeft"
style="--arrow-x: 0px; --arrow-y: 0px; left: -1000vw; top: -1000vh; box-sizing: border-box;"
>
<div>
<div
class="ant-select-item-empty"
id="rc_select_TEST_OR_SSR_list"
role="listbox"
/>
</div>
</div>
</div>
</div>
<div
class="ant-flex"
>
<div
class="ant-select ant-select-outlined ant-select-single ant-select-show-arrow ant-select-show-search"
style="width: 200px;"
>
<div
class="ant-select-selector"
>
<span
class="ant-select-selection-wrap"
>
<span
class="ant-select-selection-search"
>
<input
aria-autocomplete="list"
aria-controls="rc_select_TEST_OR_SSR_list"
aria-expanded="false"
aria-haspopup="listbox"
aria-owns="rc_select_TEST_OR_SSR_list"
autocomplete="off"
class="ant-select-selection-search-input"
id="rc_select_TEST_OR_SSR"
role="combobox"
type="search"
value="centered"
/>
</span>
<span
class="ant-select-selection-item"
style="visibility: hidden;"
title="centered"
>
centered
</span>
</span>
</div>
<div
class="ant-select-dropdown ant-slide-up-appear ant-slide-up-appear-prepare ant-slide-up ant-select-dropdown-empty ant-select-dropdown-placement-bottomLeft"
style="--arrow-x: 0px; --arrow-y: 0px; left: -1000vw; top: -1000vh; box-sizing: border-box;"
>
<div>
<div
class="ant-select-item-empty"
id="rc_select_TEST_OR_SSR_list"
role="listbox"
>
<div
class="ant-empty ant-empty-normal ant-empty-small"
>
<div
class="ant-empty-image"
>
<svg
height="41"
viewBox="0 0 64 41"
width="64"
xmlns="http://www.w3.org/2000/svg"
>
<title>
No data
</title>
<g
fill="none"
fill-rule="evenodd"
transform="translate(0 1)"
>
<ellipse
cx="32"
cy="33"
fill="#f5f5f5"
rx="32"
ry="7"
/>
<g
fill-rule="nonzero"
stroke="#d9d9d9"
>
<path
d="M55 12.76L44.854 1.258C44.367.474 43.656 0 42.907 0H21.093c-.749 0-1.46.474-1.947 1.257L9 12.761V22h46v-9.24z"
/>
<path
d="M41.613 15.931c0-1.605.994-2.93 2.227-2.931H55v18.137C55 33.26 53.68 35 52.05 35h-40.1C10.32 35 9 33.259 9 31.137V13h11.16c1.233 0 2.227 1.323 2.227 2.928v.022c0 1.605 1.005 2.901 2.237 2.901h14.752c1.232 0 2.237-1.308 2.237-2.913v-.007z"
fill="#fafafa"
/>
</g>
</g>
</svg>
</div>
<div
class="ant-empty-description"
>
No data
</div>
</div>
</div>
</div>
</div>
<span
aria-hidden="true"
class="ant-select-arrow"
style="user-select: none;"
unselectable="on"
>
<span
aria-label="down"
class="anticon anticon-down ant-select-suffix"
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>
</span>
</div>
<div
class="ant-select ant-select-outlined ant-select-auto-complete ant-select-single ant-select-show-search"
style="width: 200px;"
>
<div
class="ant-select-selector"
>
<span
class="ant-select-selection-wrap"
>
<span
class="ant-select-selection-search"
>
<input
aria-autocomplete="list"
aria-controls="rc_select_TEST_OR_SSR_list"
aria-expanded="false"
aria-haspopup="listbox"
aria-owns="rc_select_TEST_OR_SSR_list"
autocomplete="off"
class="ant-select-selection-search-input"
id="rc_select_TEST_OR_SSR"
role="combobox"
type="search"
value="centered"
/>
</span>
</span>
</div>
<div
class="ant-select-dropdown ant-slide-up-appear ant-slide-up-appear-prepare ant-slide-up ant-select-dropdown-empty ant-select-dropdown-placement-bottomLeft"
style="--arrow-x: 0px; --arrow-y: 0px; left: -1000vw; top: -1000vh; box-sizing: border-box;"
>
<div>
<div
class="ant-select-item-empty"
id="rc_select_TEST_OR_SSR_list"
role="listbox"
/>
</div>
</div>
</div>
</div>
<div
class="ant-flex"
>
<div
class="ant-select ant-select-lg ant-select-outlined ant-select-single ant-select-show-arrow ant-select-show-search"
style="width: 200px;"
>
<div
class="ant-select-selector"
>
<span
class="ant-select-selection-wrap"
>
<span
class="ant-select-selection-search"
>
<input
aria-autocomplete="list"
aria-controls="rc_select_TEST_OR_SSR_list"
aria-expanded="false"
aria-haspopup="listbox"
aria-owns="rc_select_TEST_OR_SSR_list"
autocomplete="off"
class="ant-select-selection-search-input"
id="rc_select_TEST_OR_SSR"
role="combobox"
type="search"
value="centered"
/>
</span>
<span
class="ant-select-selection-item"
style="visibility: hidden;"
title="centered"
>
centered
</span>
</span>
</div>
<div
class="ant-select-dropdown ant-slide-up-appear ant-slide-up-appear-prepare ant-slide-up ant-select-dropdown-empty ant-select-dropdown-placement-bottomLeft"
style="--arrow-x: 0px; --arrow-y: 0px; left: -1000vw; top: -1000vh; box-sizing: border-box;"
>
<div>
<div
class="ant-select-item-empty"
id="rc_select_TEST_OR_SSR_list"
role="listbox"
>
<div
class="ant-empty ant-empty-normal ant-empty-small"
>
<div
class="ant-empty-image"
>
<svg
height="41"
viewBox="0 0 64 41"
width="64"
xmlns="http://www.w3.org/2000/svg"
>
<title>
No data
</title>
<g
fill="none"
fill-rule="evenodd"
transform="translate(0 1)"
>
<ellipse
cx="32"
cy="33"
fill="#f5f5f5"
rx="32"
ry="7"
/>
<g
fill-rule="nonzero"
stroke="#d9d9d9"
>
<path
d="M55 12.76L44.854 1.258C44.367.474 43.656 0 42.907 0H21.093c-.749 0-1.46.474-1.947 1.257L9 12.761V22h46v-9.24z"
/>
<path
d="M41.613 15.931c0-1.605.994-2.93 2.227-2.931H55v18.137C55 33.26 53.68 35 52.05 35h-40.1C10.32 35 9 33.259 9 31.137V13h11.16c1.233 0 2.227 1.323 2.227 2.928v.022c0 1.605 1.005 2.901 2.237 2.901h14.752c1.232 0 2.237-1.308 2.237-2.913v-.007z"
fill="#fafafa"
/>
</g>
</g>
</svg>
</div>
<div
class="ant-empty-description"
>
No data
</div>
</div>
</div>
</div>
</div>
<span
aria-hidden="true"
class="ant-select-arrow"
style="user-select: none;"
unselectable="on"
>
<span
aria-label="down"
class="anticon anticon-down ant-select-suffix"
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>
</span>
</div>
<div
class="ant-select ant-select-lg ant-select-outlined ant-select-auto-complete ant-select-single ant-select-show-search"
style="width: 200px;"
>
<div
class="ant-select-selector"
>
<span
class="ant-select-selection-wrap"
>
<span
class="ant-select-selection-search"
>
<input
aria-autocomplete="list"
aria-controls="rc_select_TEST_OR_SSR_list"
aria-expanded="false"
aria-haspopup="listbox"
aria-owns="rc_select_TEST_OR_SSR_list"
autocomplete="off"
class="ant-select-selection-search-input"
id="rc_select_TEST_OR_SSR"
role="combobox"
type="search"
value="centered"
/>
</span>
</span>
</div>
<div
class="ant-select-dropdown ant-slide-up-appear ant-slide-up-appear-prepare ant-slide-up ant-select-dropdown-empty ant-select-dropdown-placement-bottomLeft"
style="--arrow-x: 0px; --arrow-y: 0px; left: -1000vw; top: -1000vh; box-sizing: border-box;"
>
<div>
<div
class="ant-select-item-empty"
id="rc_select_TEST_OR_SSR_list"
role="listbox"
/>
</div>
</div>
</div>
</div>
</div>
`;
exports[`renders components/auto-complete/demo/AutoComplete-and-Select.tsx extend context correctly 2`] = `[]`;
exports[`renders components/auto-complete/demo/allowClear.tsx extend context correctly 1`] = `
Array [
<div

View File

@ -1,5 +1,298 @@
// Jest Snapshot v1, https://goo.gl/fbAQLP
exports[`renders components/auto-complete/demo/AutoComplete-and-Select.tsx correctly 1`] = `
<div
class="ant-flex ant-flex-align-stretch ant-flex-vertical"
style="gap:16px"
>
<div
class="ant-flex"
>
<div
class="ant-select ant-select-sm ant-select-outlined ant-select-single ant-select-show-arrow ant-select-show-search"
style="width:200px"
>
<div
class="ant-select-selector"
>
<span
class="ant-select-selection-wrap"
>
<span
class="ant-select-selection-search"
>
<input
aria-autocomplete="list"
aria-controls="undefined_list"
aria-expanded="false"
aria-haspopup="listbox"
aria-owns="undefined_list"
autocomplete="off"
class="ant-select-selection-search-input"
role="combobox"
type="search"
value="centered"
/>
</span>
<span
class="ant-select-selection-item"
style="visibility:hidden"
title="centered"
>
centered
</span>
</span>
</div>
<span
aria-hidden="true"
class="ant-select-arrow"
style="user-select:none;-webkit-user-select:none"
unselectable="on"
>
<span
aria-label="down"
class="anticon anticon-down ant-select-suffix"
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>
</span>
</div>
<div
class="ant-select ant-select-sm ant-select-outlined ant-select-auto-complete ant-select-single ant-select-show-search"
style="width:200px"
>
<div
class="ant-select-selector"
>
<span
class="ant-select-selection-wrap"
>
<span
class="ant-select-selection-search"
>
<input
aria-autocomplete="list"
aria-controls="undefined_list"
aria-expanded="false"
aria-haspopup="listbox"
aria-owns="undefined_list"
autocomplete="off"
class="ant-select-selection-search-input"
role="combobox"
type="search"
value="centered"
/>
</span>
</span>
</div>
</div>
</div>
<div
class="ant-flex"
>
<div
class="ant-select ant-select-outlined ant-select-single ant-select-show-arrow ant-select-show-search"
style="width:200px"
>
<div
class="ant-select-selector"
>
<span
class="ant-select-selection-wrap"
>
<span
class="ant-select-selection-search"
>
<input
aria-autocomplete="list"
aria-controls="undefined_list"
aria-expanded="false"
aria-haspopup="listbox"
aria-owns="undefined_list"
autocomplete="off"
class="ant-select-selection-search-input"
role="combobox"
type="search"
value="centered"
/>
</span>
<span
class="ant-select-selection-item"
style="visibility:hidden"
title="centered"
>
centered
</span>
</span>
</div>
<span
aria-hidden="true"
class="ant-select-arrow"
style="user-select:none;-webkit-user-select:none"
unselectable="on"
>
<span
aria-label="down"
class="anticon anticon-down ant-select-suffix"
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>
</span>
</div>
<div
class="ant-select ant-select-outlined ant-select-auto-complete ant-select-single ant-select-show-search"
style="width:200px"
>
<div
class="ant-select-selector"
>
<span
class="ant-select-selection-wrap"
>
<span
class="ant-select-selection-search"
>
<input
aria-autocomplete="list"
aria-controls="undefined_list"
aria-expanded="false"
aria-haspopup="listbox"
aria-owns="undefined_list"
autocomplete="off"
class="ant-select-selection-search-input"
role="combobox"
type="search"
value="centered"
/>
</span>
</span>
</div>
</div>
</div>
<div
class="ant-flex"
>
<div
class="ant-select ant-select-lg ant-select-outlined ant-select-single ant-select-show-arrow ant-select-show-search"
style="width:200px"
>
<div
class="ant-select-selector"
>
<span
class="ant-select-selection-wrap"
>
<span
class="ant-select-selection-search"
>
<input
aria-autocomplete="list"
aria-controls="undefined_list"
aria-expanded="false"
aria-haspopup="listbox"
aria-owns="undefined_list"
autocomplete="off"
class="ant-select-selection-search-input"
role="combobox"
type="search"
value="centered"
/>
</span>
<span
class="ant-select-selection-item"
style="visibility:hidden"
title="centered"
>
centered
</span>
</span>
</div>
<span
aria-hidden="true"
class="ant-select-arrow"
style="user-select:none;-webkit-user-select:none"
unselectable="on"
>
<span
aria-label="down"
class="anticon anticon-down ant-select-suffix"
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>
</span>
</div>
<div
class="ant-select ant-select-lg ant-select-outlined ant-select-auto-complete ant-select-single ant-select-show-search"
style="width:200px"
>
<div
class="ant-select-selector"
>
<span
class="ant-select-selection-wrap"
>
<span
class="ant-select-selection-search"
>
<input
aria-autocomplete="list"
aria-controls="undefined_list"
aria-expanded="false"
aria-haspopup="listbox"
aria-owns="undefined_list"
autocomplete="off"
class="ant-select-selection-search-input"
role="combobox"
type="search"
value="centered"
/>
</span>
</span>
</div>
</div>
</div>
</div>
`;
exports[`renders components/auto-complete/demo/allowClear.tsx correctly 1`] = `
Array [
<div

View File

@ -0,0 +1,7 @@
## zh-CN
debug demo
## en-US
debug demo

View File

@ -0,0 +1,23 @@
import React from 'react';
import { AutoComplete, Flex, Select } from 'antd';
const AutoCompleteAndSelect = () => {
return (
<Flex vertical gap={16}>
{(['small', 'middle', 'large'] as const).map((size) => (
<Flex key={size}>
<Select
value="centered"
size={size}
style={{ width: 200 }}
searchValue="centered"
showSearch
/>
<AutoComplete value="centered" size={size} style={{ width: 200 }} />
</Flex>
))}
</Flex>
);
};
export default AutoCompleteAndSelect;

View File

@ -34,6 +34,7 @@ The differences with Select are:
<code src="./demo/variant.tsx" version="5.13.0">Variants</code>
<code src="./demo/allowClear.tsx">Customize clear button</code>
<code src="./demo/form-debug.tsx" debug>Debug in Form</code>
<code src="./demo/AutoComplete-and-Select.tsx" debug>AutoComplete and Select</code>
<code src="./demo/render-panel.tsx" debug>_InternalPanelDoNotUseOrYouWillBeFired</code>
## API

View File

@ -35,6 +35,7 @@ demo:
<code src="./demo/variant.tsx" version="5.13.0">多种形态</code>
<code src="./demo/allowClear.tsx">自定义清除按钮</code>
<code src="./demo/form-debug.tsx" debug>在 Form 中 Debug</code>
<code src="./demo/AutoComplete-and-Select.tsx" debug>AutoComplete 和 Select</code>
<code src="./demo/render-panel.tsx" debug>\_InternalPanelDoNotUseOrYouWillBeFired</code>
## API

View File

@ -293,6 +293,7 @@ export const genPanelStyle = (token: SharedPickerToken): CSSObject => {
'> button': {
color: 'inherit',
fontWeight: 'inherit',
verticalAlign: 'top',
'&:not(:first-child)': {
marginInlineStart: paddingXS,

View File

@ -30051,6 +30051,7 @@ exports[`renders components/form/demo/validate-static.tsx extend context correct
>
<button
class="ant-input-clear-icon ant-input-clear-icon-hidden ant-input-clear-icon-has-suffix"
tabindex="-1"
type="button"
>
<span
@ -30233,6 +30234,7 @@ exports[`renders components/form/demo/validate-static.tsx extend context correct
>
<button
class="ant-input-clear-icon ant-input-clear-icon-hidden ant-input-clear-icon-has-suffix"
tabindex="-1"
type="button"
>
<span
@ -30627,6 +30629,7 @@ exports[`renders components/form/demo/validate-static.tsx extend context correct
>
<button
class="ant-input-clear-icon ant-input-clear-icon-hidden ant-input-clear-icon-has-suffix"
tabindex="-1"
type="button"
>
<span

View File

@ -12326,6 +12326,7 @@ exports[`renders components/form/demo/validate-static.tsx correctly 1`] = `
>
<button
class="ant-input-clear-icon ant-input-clear-icon-hidden ant-input-clear-icon-has-suffix"
tabindex="-1"
type="button"
>
<span
@ -12508,6 +12509,7 @@ exports[`renders components/form/demo/validate-static.tsx correctly 1`] = `
>
<button
class="ant-input-clear-icon ant-input-clear-icon-hidden ant-input-clear-icon-has-suffix"
tabindex="-1"
type="button"
>
<span
@ -12902,6 +12904,7 @@ exports[`renders components/form/demo/validate-static.tsx correctly 1`] = `
>
<button
class="ant-input-clear-icon ant-input-clear-icon-hidden ant-input-clear-icon-has-suffix"
tabindex="-1"
type="button"
>
<span

View File

@ -5421,6 +5421,7 @@ Array [
>
<button
class="ant-input-clear-icon ant-input-clear-icon-hidden"
tabindex="-1"
type="button"
>
<span
@ -5460,6 +5461,7 @@ Array [
>
<button
class="ant-input-clear-icon ant-input-clear-icon-hidden"
tabindex="-1"
type="button"
>
<span
@ -5561,6 +5563,7 @@ exports[`renders components/input/demo/borderless-debug.tsx extend context corre
>
<button
class="ant-input-clear-icon ant-input-clear-icon-hidden"
tabindex="-1"
type="button"
>
<span
@ -5600,6 +5603,7 @@ exports[`renders components/input/demo/borderless-debug.tsx extend context corre
>
<button
class="ant-input-clear-icon ant-input-clear-icon-hidden"
tabindex="-1"
type="button"
>
<span
@ -5676,6 +5680,7 @@ exports[`renders components/input/demo/borderless-debug.tsx extend context corre
>
<button
class="ant-input-clear-icon ant-input-clear-icon-hidden"
tabindex="-1"
type="button"
>
<span
@ -5812,6 +5817,7 @@ exports[`renders components/input/demo/compact-style.tsx extend context correctl
>
<button
class="ant-input-clear-icon ant-input-clear-icon-hidden"
tabindex="-1"
type="button"
>
<span
@ -6546,6 +6552,7 @@ exports[`renders components/input/demo/filled-debug.tsx extend context correctly
>
<button
class="ant-input-clear-icon ant-input-clear-icon-hidden"
tabindex="-1"
type="button"
>
<span
@ -7032,6 +7039,7 @@ exports[`renders components/input/demo/group.tsx extend context correctly 1`] =
>
<button
class="ant-input-clear-icon"
tabindex="-1"
type="button"
>
<span
@ -7111,6 +7119,7 @@ exports[`renders components/input/demo/group.tsx extend context correctly 1`] =
>
<button
class="ant-input-clear-icon"
tabindex="-1"
type="button"
>
<span
@ -11104,6 +11113,7 @@ exports[`renders components/input/demo/search-input.tsx extend context correctly
>
<button
class="ant-input-clear-icon ant-input-clear-icon-hidden"
tabindex="-1"
type="button"
>
<span
@ -11193,6 +11203,7 @@ exports[`renders components/input/demo/search-input.tsx extend context correctly
>
<button
class="ant-input-clear-icon ant-input-clear-icon-hidden"
tabindex="-1"
type="button"
>
<span
@ -11326,6 +11337,7 @@ exports[`renders components/input/demo/search-input.tsx extend context correctly
>
<button
class="ant-input-clear-icon ant-input-clear-icon-hidden"
tabindex="-1"
type="button"
>
<span
@ -11918,6 +11930,7 @@ Array [
>
<button
class="ant-input-clear-icon ant-input-clear-icon-hidden"
tabindex="-1"
type="button"
>
<span

View File

@ -1313,6 +1313,7 @@ Array [
>
<button
class="ant-input-clear-icon ant-input-clear-icon-hidden"
tabindex="-1"
type="button"
>
<span
@ -1352,6 +1353,7 @@ Array [
>
<button
class="ant-input-clear-icon ant-input-clear-icon-hidden"
tabindex="-1"
type="button"
>
<span
@ -1444,6 +1446,7 @@ exports[`renders components/input/demo/borderless-debug.tsx correctly 1`] = `
>
<button
class="ant-input-clear-icon ant-input-clear-icon-hidden"
tabindex="-1"
type="button"
>
<span
@ -1483,6 +1486,7 @@ exports[`renders components/input/demo/borderless-debug.tsx correctly 1`] = `
>
<button
class="ant-input-clear-icon ant-input-clear-icon-hidden"
tabindex="-1"
type="button"
>
<span
@ -1559,6 +1563,7 @@ exports[`renders components/input/demo/borderless-debug.tsx correctly 1`] = `
>
<button
class="ant-input-clear-icon ant-input-clear-icon-hidden"
tabindex="-1"
type="button"
>
<span
@ -1693,6 +1698,7 @@ exports[`renders components/input/demo/compact-style.tsx correctly 1`] = `
>
<button
class="ant-input-clear-icon ant-input-clear-icon-hidden"
tabindex="-1"
type="button"
>
<span
@ -2342,6 +2348,7 @@ exports[`renders components/input/demo/filled-debug.tsx correctly 1`] = `
>
<button
class="ant-input-clear-icon ant-input-clear-icon-hidden"
tabindex="-1"
type="button"
>
<span
@ -2723,6 +2730,7 @@ exports[`renders components/input/demo/group.tsx correctly 1`] = `
>
<button
class="ant-input-clear-icon"
tabindex="-1"
type="button"
>
<span
@ -2802,6 +2810,7 @@ exports[`renders components/input/demo/group.tsx correctly 1`] = `
>
<button
class="ant-input-clear-icon"
tabindex="-1"
type="button"
>
<span
@ -4424,6 +4433,7 @@ exports[`renders components/input/demo/search-input.tsx correctly 1`] = `
>
<button
class="ant-input-clear-icon ant-input-clear-icon-hidden"
tabindex="-1"
type="button"
>
<span
@ -4513,6 +4523,7 @@ exports[`renders components/input/demo/search-input.tsx correctly 1`] = `
>
<button
class="ant-input-clear-icon ant-input-clear-icon-hidden"
tabindex="-1"
type="button"
>
<span
@ -4646,6 +4657,7 @@ exports[`renders components/input/demo/search-input.tsx correctly 1`] = `
>
<button
class="ant-input-clear-icon ant-input-clear-icon-hidden"
tabindex="-1"
type="button"
>
<span
@ -5226,6 +5238,7 @@ Array [
>
<button
class="ant-input-clear-icon ant-input-clear-icon-hidden"
tabindex="-1"
type="button"
>
<span

View File

@ -14,6 +14,7 @@ exports[`Input allowClear should change type when click 1`] = `
>
<button
class="ant-input-clear-icon"
tabindex="-1"
type="button"
>
<span
@ -55,6 +56,7 @@ exports[`Input allowClear should change type when click 2`] = `
>
<button
class="ant-input-clear-icon ant-input-clear-icon-hidden"
tabindex="-1"
type="button"
>
<span
@ -96,6 +98,7 @@ exports[`Input allowClear should not show icon if defaultValue is undefined, nul
>
<button
class="ant-input-clear-icon ant-input-clear-icon-hidden"
tabindex="-1"
type="button"
>
<span
@ -137,6 +140,7 @@ exports[`Input allowClear should not show icon if defaultValue is undefined, nul
>
<button
class="ant-input-clear-icon ant-input-clear-icon-hidden"
tabindex="-1"
type="button"
>
<span
@ -178,6 +182,7 @@ exports[`Input allowClear should not show icon if defaultValue is undefined, nul
>
<button
class="ant-input-clear-icon ant-input-clear-icon-hidden"
tabindex="-1"
type="button"
>
<span
@ -219,6 +224,7 @@ exports[`Input allowClear should not show icon if value is undefined, null or em
>
<button
class="ant-input-clear-icon ant-input-clear-icon-hidden"
tabindex="-1"
type="button"
>
<span
@ -260,6 +266,7 @@ exports[`Input allowClear should not show icon if value is undefined, null or em
>
<button
class="ant-input-clear-icon ant-input-clear-icon-hidden"
tabindex="-1"
type="button"
>
<span
@ -301,6 +308,7 @@ exports[`Input allowClear should not show icon if value is undefined, null or em
>
<button
class="ant-input-clear-icon ant-input-clear-icon-hidden"
tabindex="-1"
type="button"
>
<span

View File

@ -43,6 +43,7 @@ exports[`TextArea allowClear should change type when click 1`] = `
>
<button
class="ant-input-clear-icon"
tabindex="-1"
type="button"
>
<span
@ -82,6 +83,7 @@ exports[`TextArea allowClear should change type when click 2`] = `
>
<button
class="ant-input-clear-icon ant-input-clear-icon-hidden"
tabindex="-1"
type="button"
>
<span
@ -121,6 +123,7 @@ exports[`TextArea allowClear should not show icon if defaultValue is undefined,
>
<button
class="ant-input-clear-icon ant-input-clear-icon-hidden"
tabindex="-1"
type="button"
>
<span
@ -160,6 +163,7 @@ exports[`TextArea allowClear should not show icon if defaultValue is undefined,
>
<button
class="ant-input-clear-icon ant-input-clear-icon-hidden"
tabindex="-1"
type="button"
>
<span
@ -199,6 +203,7 @@ exports[`TextArea allowClear should not show icon if defaultValue is undefined,
>
<button
class="ant-input-clear-icon ant-input-clear-icon-hidden"
tabindex="-1"
type="button"
>
<span
@ -238,6 +243,7 @@ exports[`TextArea allowClear should not show icon if value is undefined, null or
>
<button
class="ant-input-clear-icon ant-input-clear-icon-hidden"
tabindex="-1"
type="button"
>
<span
@ -277,6 +283,7 @@ exports[`TextArea allowClear should not show icon if value is undefined, null or
>
<button
class="ant-input-clear-icon ant-input-clear-icon-hidden"
tabindex="-1"
type="button"
>
<span
@ -316,6 +323,7 @@ exports[`TextArea allowClear should not show icon if value is undefined, null or
>
<button
class="ant-input-clear-icon ant-input-clear-icon-hidden"
tabindex="-1"
type="button"
>
<span

View File

@ -406,7 +406,7 @@ const genUnderlinedStatusStyle = (
},
},
[`&${token.componentCls}-status-${options.status}${token.componentCls}-disabled`]: {
borderColor: options.borderColor,
borderColor: `transparent transparent ${options.borderColor} transparent`,
},
});
@ -425,7 +425,7 @@ export const genUnderlinedStyle = (token: InputToken, extraStyles?: CSSObject):
boxShadow: 'none',
cursor: 'not-allowed',
'&:hover': {
borderColor: token.colorBorder,
borderColor: `transparent transparent ${token.colorBorder} transparent`,
},
},

View File

@ -5732,6 +5732,7 @@ exports[`Locale Provider should display the text as ar 1`] = `
>
<button
class="ant-input-clear-icon ant-input-clear-icon-hidden"
tabindex="-1"
type="button"
>
<span
@ -5968,6 +5969,7 @@ exports[`Locale Provider should display the text as ar 1`] = `
>
<button
class="ant-input-clear-icon ant-input-clear-icon-hidden"
tabindex="-1"
type="button"
>
<span
@ -11051,6 +11053,7 @@ exports[`Locale Provider should display the text as az 1`] = `
>
<button
class="ant-input-clear-icon ant-input-clear-icon-hidden"
tabindex="-1"
type="button"
>
<span
@ -11287,6 +11290,7 @@ exports[`Locale Provider should display the text as az 1`] = `
>
<button
class="ant-input-clear-icon ant-input-clear-icon-hidden"
tabindex="-1"
type="button"
>
<span
@ -16370,6 +16374,7 @@ exports[`Locale Provider should display the text as bg 1`] = `
>
<button
class="ant-input-clear-icon ant-input-clear-icon-hidden"
tabindex="-1"
type="button"
>
<span
@ -16606,6 +16611,7 @@ exports[`Locale Provider should display the text as bg 1`] = `
>
<button
class="ant-input-clear-icon ant-input-clear-icon-hidden"
tabindex="-1"
type="button"
>
<span
@ -21689,6 +21695,7 @@ exports[`Locale Provider should display the text as bn-bd 1`] = `
>
<button
class="ant-input-clear-icon ant-input-clear-icon-hidden"
tabindex="-1"
type="button"
>
<span
@ -21925,6 +21932,7 @@ exports[`Locale Provider should display the text as bn-bd 1`] = `
>
<button
class="ant-input-clear-icon ant-input-clear-icon-hidden"
tabindex="-1"
type="button"
>
<span
@ -27008,6 +27016,7 @@ exports[`Locale Provider should display the text as by 1`] = `
>
<button
class="ant-input-clear-icon ant-input-clear-icon-hidden"
tabindex="-1"
type="button"
>
<span
@ -27244,6 +27253,7 @@ exports[`Locale Provider should display the text as by 1`] = `
>
<button
class="ant-input-clear-icon ant-input-clear-icon-hidden"
tabindex="-1"
type="button"
>
<span
@ -32327,6 +32337,7 @@ exports[`Locale Provider should display the text as ca 1`] = `
>
<button
class="ant-input-clear-icon ant-input-clear-icon-hidden"
tabindex="-1"
type="button"
>
<span
@ -32563,6 +32574,7 @@ exports[`Locale Provider should display the text as ca 1`] = `
>
<button
class="ant-input-clear-icon ant-input-clear-icon-hidden"
tabindex="-1"
type="button"
>
<span
@ -37646,6 +37658,7 @@ exports[`Locale Provider should display the text as cs 1`] = `
>
<button
class="ant-input-clear-icon ant-input-clear-icon-hidden"
tabindex="-1"
type="button"
>
<span
@ -37882,6 +37895,7 @@ exports[`Locale Provider should display the text as cs 1`] = `
>
<button
class="ant-input-clear-icon ant-input-clear-icon-hidden"
tabindex="-1"
type="button"
>
<span
@ -42965,6 +42979,7 @@ exports[`Locale Provider should display the text as da 1`] = `
>
<button
class="ant-input-clear-icon ant-input-clear-icon-hidden"
tabindex="-1"
type="button"
>
<span
@ -43201,6 +43216,7 @@ exports[`Locale Provider should display the text as da 1`] = `
>
<button
class="ant-input-clear-icon ant-input-clear-icon-hidden"
tabindex="-1"
type="button"
>
<span
@ -48284,6 +48300,7 @@ exports[`Locale Provider should display the text as de 1`] = `
>
<button
class="ant-input-clear-icon ant-input-clear-icon-hidden"
tabindex="-1"
type="button"
>
<span
@ -48520,6 +48537,7 @@ exports[`Locale Provider should display the text as de 1`] = `
>
<button
class="ant-input-clear-icon ant-input-clear-icon-hidden"
tabindex="-1"
type="button"
>
<span
@ -53603,6 +53621,7 @@ exports[`Locale Provider should display the text as el 1`] = `
>
<button
class="ant-input-clear-icon ant-input-clear-icon-hidden"
tabindex="-1"
type="button"
>
<span
@ -53839,6 +53858,7 @@ exports[`Locale Provider should display the text as el 1`] = `
>
<button
class="ant-input-clear-icon ant-input-clear-icon-hidden"
tabindex="-1"
type="button"
>
<span
@ -58922,6 +58942,7 @@ exports[`Locale Provider should display the text as en 1`] = `
>
<button
class="ant-input-clear-icon ant-input-clear-icon-hidden"
tabindex="-1"
type="button"
>
<span
@ -59158,6 +59179,7 @@ exports[`Locale Provider should display the text as en 1`] = `
>
<button
class="ant-input-clear-icon ant-input-clear-icon-hidden"
tabindex="-1"
type="button"
>
<span
@ -64241,6 +64263,7 @@ exports[`Locale Provider should display the text as en-gb 1`] = `
>
<button
class="ant-input-clear-icon ant-input-clear-icon-hidden"
tabindex="-1"
type="button"
>
<span
@ -64477,6 +64500,7 @@ exports[`Locale Provider should display the text as en-gb 1`] = `
>
<button
class="ant-input-clear-icon ant-input-clear-icon-hidden"
tabindex="-1"
type="button"
>
<span
@ -69560,6 +69584,7 @@ exports[`Locale Provider should display the text as es 1`] = `
>
<button
class="ant-input-clear-icon ant-input-clear-icon-hidden"
tabindex="-1"
type="button"
>
<span
@ -69796,6 +69821,7 @@ exports[`Locale Provider should display the text as es 1`] = `
>
<button
class="ant-input-clear-icon ant-input-clear-icon-hidden"
tabindex="-1"
type="button"
>
<span
@ -74879,6 +74905,7 @@ exports[`Locale Provider should display the text as et 1`] = `
>
<button
class="ant-input-clear-icon ant-input-clear-icon-hidden"
tabindex="-1"
type="button"
>
<span
@ -75115,6 +75142,7 @@ exports[`Locale Provider should display the text as et 1`] = `
>
<button
class="ant-input-clear-icon ant-input-clear-icon-hidden"
tabindex="-1"
type="button"
>
<span
@ -80198,6 +80226,7 @@ exports[`Locale Provider should display the text as eu 1`] = `
>
<button
class="ant-input-clear-icon ant-input-clear-icon-hidden"
tabindex="-1"
type="button"
>
<span
@ -80434,6 +80463,7 @@ exports[`Locale Provider should display the text as eu 1`] = `
>
<button
class="ant-input-clear-icon ant-input-clear-icon-hidden"
tabindex="-1"
type="button"
>
<span
@ -85517,6 +85547,7 @@ exports[`Locale Provider should display the text as fa 1`] = `
>
<button
class="ant-input-clear-icon ant-input-clear-icon-hidden"
tabindex="-1"
type="button"
>
<span
@ -85753,6 +85784,7 @@ exports[`Locale Provider should display the text as fa 1`] = `
>
<button
class="ant-input-clear-icon ant-input-clear-icon-hidden"
tabindex="-1"
type="button"
>
<span
@ -90836,6 +90868,7 @@ exports[`Locale Provider should display the text as fi 1`] = `
>
<button
class="ant-input-clear-icon ant-input-clear-icon-hidden"
tabindex="-1"
type="button"
>
<span
@ -91072,6 +91105,7 @@ exports[`Locale Provider should display the text as fi 1`] = `
>
<button
class="ant-input-clear-icon ant-input-clear-icon-hidden"
tabindex="-1"
type="button"
>
<span
@ -96155,6 +96189,7 @@ exports[`Locale Provider should display the text as fr 1`] = `
>
<button
class="ant-input-clear-icon ant-input-clear-icon-hidden"
tabindex="-1"
type="button"
>
<span
@ -96391,6 +96426,7 @@ exports[`Locale Provider should display the text as fr 1`] = `
>
<button
class="ant-input-clear-icon ant-input-clear-icon-hidden"
tabindex="-1"
type="button"
>
<span
@ -101474,6 +101510,7 @@ exports[`Locale Provider should display the text as fr 2`] = `
>
<button
class="ant-input-clear-icon ant-input-clear-icon-hidden"
tabindex="-1"
type="button"
>
<span
@ -101710,6 +101747,7 @@ exports[`Locale Provider should display the text as fr 2`] = `
>
<button
class="ant-input-clear-icon ant-input-clear-icon-hidden"
tabindex="-1"
type="button"
>
<span
@ -106793,6 +106831,7 @@ exports[`Locale Provider should display the text as fr 3`] = `
>
<button
class="ant-input-clear-icon ant-input-clear-icon-hidden"
tabindex="-1"
type="button"
>
<span
@ -107029,6 +107068,7 @@ exports[`Locale Provider should display the text as fr 3`] = `
>
<button
class="ant-input-clear-icon ant-input-clear-icon-hidden"
tabindex="-1"
type="button"
>
<span
@ -112112,6 +112152,7 @@ exports[`Locale Provider should display the text as ga 1`] = `
>
<button
class="ant-input-clear-icon ant-input-clear-icon-hidden"
tabindex="-1"
type="button"
>
<span
@ -112348,6 +112389,7 @@ exports[`Locale Provider should display the text as ga 1`] = `
>
<button
class="ant-input-clear-icon ant-input-clear-icon-hidden"
tabindex="-1"
type="button"
>
<span
@ -117431,6 +117473,7 @@ exports[`Locale Provider should display the text as gl 1`] = `
>
<button
class="ant-input-clear-icon ant-input-clear-icon-hidden"
tabindex="-1"
type="button"
>
<span
@ -117667,6 +117710,7 @@ exports[`Locale Provider should display the text as gl 1`] = `
>
<button
class="ant-input-clear-icon ant-input-clear-icon-hidden"
tabindex="-1"
type="button"
>
<span
@ -122750,6 +122794,7 @@ exports[`Locale Provider should display the text as he 1`] = `
>
<button
class="ant-input-clear-icon ant-input-clear-icon-hidden"
tabindex="-1"
type="button"
>
<span
@ -122986,6 +123031,7 @@ exports[`Locale Provider should display the text as he 1`] = `
>
<button
class="ant-input-clear-icon ant-input-clear-icon-hidden"
tabindex="-1"
type="button"
>
<span
@ -128069,6 +128115,7 @@ exports[`Locale Provider should display the text as hi 1`] = `
>
<button
class="ant-input-clear-icon ant-input-clear-icon-hidden"
tabindex="-1"
type="button"
>
<span
@ -128305,6 +128352,7 @@ exports[`Locale Provider should display the text as hi 1`] = `
>
<button
class="ant-input-clear-icon ant-input-clear-icon-hidden"
tabindex="-1"
type="button"
>
<span
@ -133388,6 +133436,7 @@ exports[`Locale Provider should display the text as hr 1`] = `
>
<button
class="ant-input-clear-icon ant-input-clear-icon-hidden"
tabindex="-1"
type="button"
>
<span
@ -133624,6 +133673,7 @@ exports[`Locale Provider should display the text as hr 1`] = `
>
<button
class="ant-input-clear-icon ant-input-clear-icon-hidden"
tabindex="-1"
type="button"
>
<span
@ -138707,6 +138757,7 @@ exports[`Locale Provider should display the text as hu 1`] = `
>
<button
class="ant-input-clear-icon ant-input-clear-icon-hidden"
tabindex="-1"
type="button"
>
<span
@ -138943,6 +138994,7 @@ exports[`Locale Provider should display the text as hu 1`] = `
>
<button
class="ant-input-clear-icon ant-input-clear-icon-hidden"
tabindex="-1"
type="button"
>
<span
@ -144026,6 +144078,7 @@ exports[`Locale Provider should display the text as hy-am 1`] = `
>
<button
class="ant-input-clear-icon ant-input-clear-icon-hidden"
tabindex="-1"
type="button"
>
<span
@ -144262,6 +144315,7 @@ exports[`Locale Provider should display the text as hy-am 1`] = `
>
<button
class="ant-input-clear-icon ant-input-clear-icon-hidden"
tabindex="-1"
type="button"
>
<span
@ -149345,6 +149399,7 @@ exports[`Locale Provider should display the text as id 1`] = `
>
<button
class="ant-input-clear-icon ant-input-clear-icon-hidden"
tabindex="-1"
type="button"
>
<span
@ -149581,6 +149636,7 @@ exports[`Locale Provider should display the text as id 1`] = `
>
<button
class="ant-input-clear-icon ant-input-clear-icon-hidden"
tabindex="-1"
type="button"
>
<span
@ -154664,6 +154720,7 @@ exports[`Locale Provider should display the text as is 1`] = `
>
<button
class="ant-input-clear-icon ant-input-clear-icon-hidden"
tabindex="-1"
type="button"
>
<span
@ -154900,6 +154957,7 @@ exports[`Locale Provider should display the text as is 1`] = `
>
<button
class="ant-input-clear-icon ant-input-clear-icon-hidden"
tabindex="-1"
type="button"
>
<span
@ -159983,6 +160041,7 @@ exports[`Locale Provider should display the text as it 1`] = `
>
<button
class="ant-input-clear-icon ant-input-clear-icon-hidden"
tabindex="-1"
type="button"
>
<span
@ -160219,6 +160278,7 @@ exports[`Locale Provider should display the text as it 1`] = `
>
<button
class="ant-input-clear-icon ant-input-clear-icon-hidden"
tabindex="-1"
type="button"
>
<span
@ -165302,6 +165362,7 @@ exports[`Locale Provider should display the text as ja 1`] = `
>
<button
class="ant-input-clear-icon ant-input-clear-icon-hidden"
tabindex="-1"
type="button"
>
<span
@ -165538,6 +165599,7 @@ exports[`Locale Provider should display the text as ja 1`] = `
>
<button
class="ant-input-clear-icon ant-input-clear-icon-hidden"
tabindex="-1"
type="button"
>
<span
@ -170621,6 +170683,7 @@ exports[`Locale Provider should display the text as ka 1`] = `
>
<button
class="ant-input-clear-icon ant-input-clear-icon-hidden"
tabindex="-1"
type="button"
>
<span
@ -170857,6 +170920,7 @@ exports[`Locale Provider should display the text as ka 1`] = `
>
<button
class="ant-input-clear-icon ant-input-clear-icon-hidden"
tabindex="-1"
type="button"
>
<span
@ -175940,6 +176004,7 @@ exports[`Locale Provider should display the text as kk 1`] = `
>
<button
class="ant-input-clear-icon ant-input-clear-icon-hidden"
tabindex="-1"
type="button"
>
<span
@ -176176,6 +176241,7 @@ exports[`Locale Provider should display the text as kk 1`] = `
>
<button
class="ant-input-clear-icon ant-input-clear-icon-hidden"
tabindex="-1"
type="button"
>
<span
@ -181258,6 +181324,7 @@ exports[`Locale Provider should display the text as km 1`] = `
>
<button
class="ant-input-clear-icon ant-input-clear-icon-hidden"
tabindex="-1"
type="button"
>
<span
@ -181493,6 +181560,7 @@ exports[`Locale Provider should display the text as km 1`] = `
>
<button
class="ant-input-clear-icon ant-input-clear-icon-hidden"
tabindex="-1"
type="button"
>
<span
@ -186576,6 +186644,7 @@ exports[`Locale Provider should display the text as kn 1`] = `
>
<button
class="ant-input-clear-icon ant-input-clear-icon-hidden"
tabindex="-1"
type="button"
>
<span
@ -186812,6 +186881,7 @@ exports[`Locale Provider should display the text as kn 1`] = `
>
<button
class="ant-input-clear-icon ant-input-clear-icon-hidden"
tabindex="-1"
type="button"
>
<span
@ -191895,6 +191965,7 @@ exports[`Locale Provider should display the text as ko 1`] = `
>
<button
class="ant-input-clear-icon ant-input-clear-icon-hidden"
tabindex="-1"
type="button"
>
<span
@ -192131,6 +192202,7 @@ exports[`Locale Provider should display the text as ko 1`] = `
>
<button
class="ant-input-clear-icon ant-input-clear-icon-hidden"
tabindex="-1"
type="button"
>
<span
@ -197214,6 +197286,7 @@ exports[`Locale Provider should display the text as ku 1`] = `
>
<button
class="ant-input-clear-icon ant-input-clear-icon-hidden"
tabindex="-1"
type="button"
>
<span
@ -197450,6 +197523,7 @@ exports[`Locale Provider should display the text as ku 1`] = `
>
<button
class="ant-input-clear-icon ant-input-clear-icon-hidden"
tabindex="-1"
type="button"
>
<span
@ -202533,6 +202607,7 @@ exports[`Locale Provider should display the text as ku-iq 1`] = `
>
<button
class="ant-input-clear-icon ant-input-clear-icon-hidden"
tabindex="-1"
type="button"
>
<span
@ -202769,6 +202844,7 @@ exports[`Locale Provider should display the text as ku-iq 1`] = `
>
<button
class="ant-input-clear-icon ant-input-clear-icon-hidden"
tabindex="-1"
type="button"
>
<span
@ -207852,6 +207928,7 @@ exports[`Locale Provider should display the text as lt 1`] = `
>
<button
class="ant-input-clear-icon ant-input-clear-icon-hidden"
tabindex="-1"
type="button"
>
<span
@ -208088,6 +208165,7 @@ exports[`Locale Provider should display the text as lt 1`] = `
>
<button
class="ant-input-clear-icon ant-input-clear-icon-hidden"
tabindex="-1"
type="button"
>
<span
@ -213171,6 +213249,7 @@ exports[`Locale Provider should display the text as lv 1`] = `
>
<button
class="ant-input-clear-icon ant-input-clear-icon-hidden"
tabindex="-1"
type="button"
>
<span
@ -213407,6 +213486,7 @@ exports[`Locale Provider should display the text as lv 1`] = `
>
<button
class="ant-input-clear-icon ant-input-clear-icon-hidden"
tabindex="-1"
type="button"
>
<span
@ -218490,6 +218570,7 @@ exports[`Locale Provider should display the text as mk 1`] = `
>
<button
class="ant-input-clear-icon ant-input-clear-icon-hidden"
tabindex="-1"
type="button"
>
<span
@ -218726,6 +218807,7 @@ exports[`Locale Provider should display the text as mk 1`] = `
>
<button
class="ant-input-clear-icon ant-input-clear-icon-hidden"
tabindex="-1"
type="button"
>
<span
@ -223809,6 +223891,7 @@ exports[`Locale Provider should display the text as ml 1`] = `
>
<button
class="ant-input-clear-icon ant-input-clear-icon-hidden"
tabindex="-1"
type="button"
>
<span
@ -224045,6 +224128,7 @@ exports[`Locale Provider should display the text as ml 1`] = `
>
<button
class="ant-input-clear-icon ant-input-clear-icon-hidden"
tabindex="-1"
type="button"
>
<span
@ -229128,6 +229212,7 @@ exports[`Locale Provider should display the text as mn-mn 1`] = `
>
<button
class="ant-input-clear-icon ant-input-clear-icon-hidden"
tabindex="-1"
type="button"
>
<span
@ -229364,6 +229449,7 @@ exports[`Locale Provider should display the text as mn-mn 1`] = `
>
<button
class="ant-input-clear-icon ant-input-clear-icon-hidden"
tabindex="-1"
type="button"
>
<span
@ -234447,6 +234533,7 @@ exports[`Locale Provider should display the text as ms-my 1`] = `
>
<button
class="ant-input-clear-icon ant-input-clear-icon-hidden"
tabindex="-1"
type="button"
>
<span
@ -234683,6 +234770,7 @@ exports[`Locale Provider should display the text as ms-my 1`] = `
>
<button
class="ant-input-clear-icon ant-input-clear-icon-hidden"
tabindex="-1"
type="button"
>
<span
@ -239766,6 +239854,7 @@ exports[`Locale Provider should display the text as my 1`] = `
>
<button
class="ant-input-clear-icon ant-input-clear-icon-hidden"
tabindex="-1"
type="button"
>
<span
@ -240002,6 +240091,7 @@ exports[`Locale Provider should display the text as my 1`] = `
>
<button
class="ant-input-clear-icon ant-input-clear-icon-hidden"
tabindex="-1"
type="button"
>
<span
@ -245085,6 +245175,7 @@ exports[`Locale Provider should display the text as nb 1`] = `
>
<button
class="ant-input-clear-icon ant-input-clear-icon-hidden"
tabindex="-1"
type="button"
>
<span
@ -245321,6 +245412,7 @@ exports[`Locale Provider should display the text as nb 1`] = `
>
<button
class="ant-input-clear-icon ant-input-clear-icon-hidden"
tabindex="-1"
type="button"
>
<span
@ -250404,6 +250496,7 @@ exports[`Locale Provider should display the text as ne-np 1`] = `
>
<button
class="ant-input-clear-icon ant-input-clear-icon-hidden"
tabindex="-1"
type="button"
>
<span
@ -250640,6 +250733,7 @@ exports[`Locale Provider should display the text as ne-np 1`] = `
>
<button
class="ant-input-clear-icon ant-input-clear-icon-hidden"
tabindex="-1"
type="button"
>
<span
@ -255723,6 +255817,7 @@ exports[`Locale Provider should display the text as nl 1`] = `
>
<button
class="ant-input-clear-icon ant-input-clear-icon-hidden"
tabindex="-1"
type="button"
>
<span
@ -255959,6 +256054,7 @@ exports[`Locale Provider should display the text as nl 1`] = `
>
<button
class="ant-input-clear-icon ant-input-clear-icon-hidden"
tabindex="-1"
type="button"
>
<span
@ -261042,6 +261138,7 @@ exports[`Locale Provider should display the text as nl-be 1`] = `
>
<button
class="ant-input-clear-icon ant-input-clear-icon-hidden"
tabindex="-1"
type="button"
>
<span
@ -261278,6 +261375,7 @@ exports[`Locale Provider should display the text as nl-be 1`] = `
>
<button
class="ant-input-clear-icon ant-input-clear-icon-hidden"
tabindex="-1"
type="button"
>
<span
@ -266361,6 +266459,7 @@ exports[`Locale Provider should display the text as pl 1`] = `
>
<button
class="ant-input-clear-icon ant-input-clear-icon-hidden"
tabindex="-1"
type="button"
>
<span
@ -266597,6 +266696,7 @@ exports[`Locale Provider should display the text as pl 1`] = `
>
<button
class="ant-input-clear-icon ant-input-clear-icon-hidden"
tabindex="-1"
type="button"
>
<span
@ -271680,6 +271780,7 @@ exports[`Locale Provider should display the text as pt 1`] = `
>
<button
class="ant-input-clear-icon ant-input-clear-icon-hidden"
tabindex="-1"
type="button"
>
<span
@ -271916,6 +272017,7 @@ exports[`Locale Provider should display the text as pt 1`] = `
>
<button
class="ant-input-clear-icon ant-input-clear-icon-hidden"
tabindex="-1"
type="button"
>
<span
@ -276999,6 +277101,7 @@ exports[`Locale Provider should display the text as pt-br 1`] = `
>
<button
class="ant-input-clear-icon ant-input-clear-icon-hidden"
tabindex="-1"
type="button"
>
<span
@ -277235,6 +277338,7 @@ exports[`Locale Provider should display the text as pt-br 1`] = `
>
<button
class="ant-input-clear-icon ant-input-clear-icon-hidden"
tabindex="-1"
type="button"
>
<span
@ -282318,6 +282422,7 @@ exports[`Locale Provider should display the text as ro 1`] = `
>
<button
class="ant-input-clear-icon ant-input-clear-icon-hidden"
tabindex="-1"
type="button"
>
<span
@ -282554,6 +282659,7 @@ exports[`Locale Provider should display the text as ro 1`] = `
>
<button
class="ant-input-clear-icon ant-input-clear-icon-hidden"
tabindex="-1"
type="button"
>
<span
@ -287637,6 +287743,7 @@ exports[`Locale Provider should display the text as ru 1`] = `
>
<button
class="ant-input-clear-icon ant-input-clear-icon-hidden"
tabindex="-1"
type="button"
>
<span
@ -287873,6 +287980,7 @@ exports[`Locale Provider should display the text as ru 1`] = `
>
<button
class="ant-input-clear-icon ant-input-clear-icon-hidden"
tabindex="-1"
type="button"
>
<span
@ -292956,6 +293064,7 @@ exports[`Locale Provider should display the text as si 1`] = `
>
<button
class="ant-input-clear-icon ant-input-clear-icon-hidden"
tabindex="-1"
type="button"
>
<span
@ -293192,6 +293301,7 @@ exports[`Locale Provider should display the text as si 1`] = `
>
<button
class="ant-input-clear-icon ant-input-clear-icon-hidden"
tabindex="-1"
type="button"
>
<span
@ -298275,6 +298385,7 @@ exports[`Locale Provider should display the text as sk 1`] = `
>
<button
class="ant-input-clear-icon ant-input-clear-icon-hidden"
tabindex="-1"
type="button"
>
<span
@ -298511,6 +298622,7 @@ exports[`Locale Provider should display the text as sk 1`] = `
>
<button
class="ant-input-clear-icon ant-input-clear-icon-hidden"
tabindex="-1"
type="button"
>
<span
@ -303594,6 +303706,7 @@ exports[`Locale Provider should display the text as sl 1`] = `
>
<button
class="ant-input-clear-icon ant-input-clear-icon-hidden"
tabindex="-1"
type="button"
>
<span
@ -303830,6 +303943,7 @@ exports[`Locale Provider should display the text as sl 1`] = `
>
<button
class="ant-input-clear-icon ant-input-clear-icon-hidden"
tabindex="-1"
type="button"
>
<span
@ -308913,6 +309027,7 @@ exports[`Locale Provider should display the text as sr 1`] = `
>
<button
class="ant-input-clear-icon ant-input-clear-icon-hidden"
tabindex="-1"
type="button"
>
<span
@ -309149,6 +309264,7 @@ exports[`Locale Provider should display the text as sr 1`] = `
>
<button
class="ant-input-clear-icon ant-input-clear-icon-hidden"
tabindex="-1"
type="button"
>
<span
@ -314232,6 +314348,7 @@ exports[`Locale Provider should display the text as sv 1`] = `
>
<button
class="ant-input-clear-icon ant-input-clear-icon-hidden"
tabindex="-1"
type="button"
>
<span
@ -314468,6 +314585,7 @@ exports[`Locale Provider should display the text as sv 1`] = `
>
<button
class="ant-input-clear-icon ant-input-clear-icon-hidden"
tabindex="-1"
type="button"
>
<span
@ -319551,6 +319669,7 @@ exports[`Locale Provider should display the text as ta 1`] = `
>
<button
class="ant-input-clear-icon ant-input-clear-icon-hidden"
tabindex="-1"
type="button"
>
<span
@ -319787,6 +319906,7 @@ exports[`Locale Provider should display the text as ta 1`] = `
>
<button
class="ant-input-clear-icon ant-input-clear-icon-hidden"
tabindex="-1"
type="button"
>
<span
@ -324870,6 +324990,7 @@ exports[`Locale Provider should display the text as th 1`] = `
>
<button
class="ant-input-clear-icon ant-input-clear-icon-hidden"
tabindex="-1"
type="button"
>
<span
@ -325106,6 +325227,7 @@ exports[`Locale Provider should display the text as th 1`] = `
>
<button
class="ant-input-clear-icon ant-input-clear-icon-hidden"
tabindex="-1"
type="button"
>
<span
@ -330189,6 +330311,7 @@ exports[`Locale Provider should display the text as tk 1`] = `
>
<button
class="ant-input-clear-icon ant-input-clear-icon-hidden"
tabindex="-1"
type="button"
>
<span
@ -330425,6 +330548,7 @@ exports[`Locale Provider should display the text as tk 1`] = `
>
<button
class="ant-input-clear-icon ant-input-clear-icon-hidden"
tabindex="-1"
type="button"
>
<span
@ -335508,6 +335632,7 @@ exports[`Locale Provider should display the text as tr 1`] = `
>
<button
class="ant-input-clear-icon ant-input-clear-icon-hidden"
tabindex="-1"
type="button"
>
<span
@ -335744,6 +335869,7 @@ exports[`Locale Provider should display the text as tr 1`] = `
>
<button
class="ant-input-clear-icon ant-input-clear-icon-hidden"
tabindex="-1"
type="button"
>
<span
@ -340827,6 +340953,7 @@ exports[`Locale Provider should display the text as uk 1`] = `
>
<button
class="ant-input-clear-icon ant-input-clear-icon-hidden"
tabindex="-1"
type="button"
>
<span
@ -341063,6 +341190,7 @@ exports[`Locale Provider should display the text as uk 1`] = `
>
<button
class="ant-input-clear-icon ant-input-clear-icon-hidden"
tabindex="-1"
type="button"
>
<span
@ -346146,6 +346274,7 @@ exports[`Locale Provider should display the text as ur 1`] = `
>
<button
class="ant-input-clear-icon ant-input-clear-icon-hidden"
tabindex="-1"
type="button"
>
<span
@ -346382,6 +346511,7 @@ exports[`Locale Provider should display the text as ur 1`] = `
>
<button
class="ant-input-clear-icon ant-input-clear-icon-hidden"
tabindex="-1"
type="button"
>
<span
@ -351465,6 +351595,7 @@ exports[`Locale Provider should display the text as uz-latn 1`] = `
>
<button
class="ant-input-clear-icon ant-input-clear-icon-hidden"
tabindex="-1"
type="button"
>
<span
@ -351701,6 +351832,7 @@ exports[`Locale Provider should display the text as uz-latn 1`] = `
>
<button
class="ant-input-clear-icon ant-input-clear-icon-hidden"
tabindex="-1"
type="button"
>
<span
@ -356784,6 +356916,7 @@ exports[`Locale Provider should display the text as vi 1`] = `
>
<button
class="ant-input-clear-icon ant-input-clear-icon-hidden"
tabindex="-1"
type="button"
>
<span
@ -357020,6 +357153,7 @@ exports[`Locale Provider should display the text as vi 1`] = `
>
<button
class="ant-input-clear-icon ant-input-clear-icon-hidden"
tabindex="-1"
type="button"
>
<span
@ -362103,6 +362237,7 @@ exports[`Locale Provider should display the text as zh-cn 1`] = `
>
<button
class="ant-input-clear-icon ant-input-clear-icon-hidden"
tabindex="-1"
type="button"
>
<span
@ -362339,6 +362474,7 @@ exports[`Locale Provider should display the text as zh-cn 1`] = `
>
<button
class="ant-input-clear-icon ant-input-clear-icon-hidden"
tabindex="-1"
type="button"
>
<span
@ -367422,6 +367558,7 @@ exports[`Locale Provider should display the text as zh-hk 1`] = `
>
<button
class="ant-input-clear-icon ant-input-clear-icon-hidden"
tabindex="-1"
type="button"
>
<span
@ -367658,6 +367795,7 @@ exports[`Locale Provider should display the text as zh-hk 1`] = `
>
<button
class="ant-input-clear-icon ant-input-clear-icon-hidden"
tabindex="-1"
type="button"
>
<span
@ -372741,6 +372879,7 @@ exports[`Locale Provider should display the text as zh-tw 1`] = `
>
<button
class="ant-input-clear-icon ant-input-clear-icon-hidden"
tabindex="-1"
type="button"
>
<span
@ -372977,6 +373116,7 @@ exports[`Locale Provider should display the text as zh-tw 1`] = `
>
<button
class="ant-input-clear-icon ant-input-clear-icon-hidden"
tabindex="-1"
type="button"
>
<span

View File

@ -20,6 +20,7 @@ Array [
>
<button
class="ant-mentions-clear-icon"
tabindex="-1"
type="button"
>
<span
@ -65,6 +66,7 @@ Array [
>
<button
class="ant-mentions-clear-icon"
tabindex="-1"
type="button"
>
<span
@ -110,6 +112,7 @@ Array [
>
<button
class="ant-mentions-clear-icon"
tabindex="-1"
type="button"
>
<span

View File

@ -20,6 +20,7 @@ Array [
>
<button
class="ant-mentions-clear-icon"
tabindex="-1"
type="button"
>
<span
@ -65,6 +66,7 @@ Array [
>
<button
class="ant-mentions-clear-icon"
tabindex="-1"
type="button"
>
<span
@ -110,6 +112,7 @@ Array [
>
<button
class="ant-mentions-clear-icon"
tabindex="-1"
type="button"
>
<span

View File

@ -146,16 +146,16 @@ export interface ComponentToken {
/** @deprecated Use `dangerItemActiveBg` instead */
colorDangerItemBgActive: string;
/**
* @desc
* @descEN Color of active danger menu item text
* @desc
* @descEN Background color of danger menu item when active
*/
dangerItemActiveBg: string;
/** @deprecated Use `dangerItemSelectedBg` instead */
colorDangerItemBgSelected: string;
/**
* @desc
* @descEN Color of selected danger menu item text
* @desc
* @descEN Background color of selected danger menu item
*/
dangerItemSelectedBg: string;

View File

@ -21,9 +21,9 @@ return (
<Radio.Group
value={value}
options={[
{ value: 1, label: "A" },
{ value: 2, label: "B"},
{ value: 3, label: "C" },
{ value: 1, label: 'A' },
{ value: 2, label: 'B' },
{ value: 3, label: 'C' },
]}
/>
);
@ -92,7 +92,7 @@ return (
### CheckboxOptionType
| Property | Description | Type | Default | Version |
| 属性 | 说明 | 类型 | 默认值 | 版本 |
| --- | --- | --- | --- | --- |
| label | 用于作为 Radio 选项展示的文本 | `string` | - | 4.4.0 |
| value | 关联 Radio 选项的值 | `string` \| `number` \| `boolean` | - | 4.4.0 |

View File

@ -10167,6 +10167,7 @@ Array [
>
<button
class="ant-input-clear-icon ant-input-clear-icon-hidden"
tabindex="-1"
type="button"
>
<span

View File

@ -3760,6 +3760,7 @@ Array [
>
<button
class="ant-input-clear-icon ant-input-clear-icon-hidden"
tabindex="-1"
type="button"
>
<span

View File

@ -11,7 +11,7 @@ for (let i = 10; i < 36; i++) {
});
}
const handleChange = (value: string) => {
const handleChange = (value: string[]) => {
console.log(`selected ${value}`);
};

View File

@ -1,33 +1,35 @@
/* eslint-disable compat/compat */
import React, { useState } from 'react';
import { Select } from 'antd';
import type { SelectProps } from 'antd';
import jsonp from 'fetch-jsonp';
import qs from 'qs';
import type { AnyObject } from 'antd/es/_util/type';
let timeout: ReturnType<typeof setTimeout> | null;
let currentValue: string;
const fetch = (value: string, callback: (data: { value: string; text: string }[]) => void) => {
const toURLSearchParams = <T extends AnyObject>(record: T) => {
const params = new URLSearchParams();
for (const [key, value] of Object.entries(record)) {
params.append(key, value);
}
return params;
};
const fetchData = (value: string, callback: (data: { value: string; text: string }[]) => void) => {
if (timeout) {
clearTimeout(timeout);
timeout = null;
}
currentValue = value;
const params = toURLSearchParams({ code: 'utf-8', q: value });
const fake = () => {
const str = qs.stringify({
code: 'utf-8',
q: value,
});
jsonp(`https://suggest.taobao.com/sug?${str}`)
.then((response: any) => response.json())
.then((d: any) => {
fetch(`https://suggest.taobao.com/sug?${params.toString()}`)
.then((response) => response.json())
.then(({ result }) => {
if (currentValue === value) {
const { result } = d;
const data = result.map((item: any) => ({
value: item[0],
text: item[0],
}));
const data = result.map((item: any) => ({ value: item[0], text: item[0] }));
callback(data);
}
});
@ -44,7 +46,7 @@ const SearchInput: React.FC<{ placeholder: string; style: React.CSSProperties }>
const [value, setValue] = useState<string>();
const handleSearch = (newValue: string) => {
fetch(newValue, setData);
fetchData(newValue, setData);
};
const handleChange = (newValue: string) => {

View File

@ -79,10 +79,12 @@ const App: React.FC = () => {
value={value}
placeholder="Select users"
fetchOptions={fetchUserList}
onChange={(newValue) => {
setValue(newValue as UserValue[]);
}}
style={{ width: '100%' }}
onChange={(newValue) => {
if (Array.isArray(newValue)) {
setValue(newValue);
}
}}
/>
);
};

View File

@ -11,7 +11,7 @@ for (let i = 10; i < 36; i++) {
});
}
const handleChange = (value: string) => {
const handleChange = (value: string[]) => {
console.log(`selected ${value}`);
};

View File

@ -28,6 +28,10 @@ function genSizeStyle(token: SelectToken, suffix?: string): CSSObject {
borderRadius,
flex: '1 1 auto',
[`${componentCls}-selection-wrap:after`]: {
lineHeight: unit(selectHeightWithoutBorder),
},
[`${componentCls}-selection-search`]: {
position: 'absolute',
inset: 0,
@ -95,6 +99,7 @@ function genSizeStyle(token: SelectToken, suffix?: string): CSSObject {
[`${componentCls}-selection-search-input`]: {
height: selectHeightWithoutBorder,
fontSize: token.fontSize,
},
'&:after': {

View File

@ -962,6 +962,7 @@ exports[`renders components/space/demo/compact.tsx extend context correctly 1`]
>
<button
class="ant-input-clear-icon"
tabindex="-1"
type="button"
>
<span

View File

@ -679,6 +679,7 @@ exports[`renders components/space/demo/compact.tsx correctly 1`] = `
>
<button
class="ant-input-clear-icon"
tabindex="-1"
type="button"
>
<span

View File

@ -1,8 +1,9 @@
/* eslint-disable compat/compat */
import React, { useEffect, useState } from 'react';
import type { GetProp, TableProps } from 'antd';
import { Table } from 'antd';
import type { AnyObject } from 'antd/es/_util/type';
import type { SorterResult } from 'antd/es/table/interface';
import qs from 'qs';
type ColumnsType<T extends object = object> = TableProps<T>['columns'];
type TablePaginationConfig = Exclude<GetProp<TableProps, 'pagination'>, boolean>;
@ -49,6 +50,14 @@ const columns: ColumnsType<DataType> = [
},
];
const toURLSearchParams = <T extends AnyObject>(record: T) => {
const params = new URLSearchParams();
for (const [key, value] of Object.entries(record)) {
params.append(key, value);
}
return params;
};
const getRandomuserParams = (params: TableParams) => ({
results: params.pagination?.pageSize,
page: params.pagination?.current,
@ -65,9 +74,11 @@ const App: React.FC = () => {
},
});
const params = toURLSearchParams(getRandomuserParams(tableParams));
const fetchData = () => {
setLoading(true);
fetch(`https://randomuser.me/api?${qs.stringify(getRandomuserParams(tableParams))}`)
fetch(`https://randomuser.me/api?${params.toString()}`)
.then((res) => res.json())
.then(({ results }) => {
setData(results);

View File

@ -62,6 +62,8 @@ This is due to the implementation of `rc-trigger`. `rc-trigger` forces children
Please ensure that the child node of `Tooltip` accepts `onMouseEnter`, `onMouseLeave`, `onPointerEnter`, `onPointerLeave`, `onFocus`, `onClick` events.
See https://github.com/ant-design/ant-design/issues/15909
### What's the placement logic?
It will follow `placement` config when screen has enough space. And flip when space is not enough (Such as `top` to `bottom` or `topLeft` to `bottomLeft`). Single direction such as `top` `bottom` `left` `right` will auto shift on the view:

View File

@ -64,6 +64,8 @@ demo:
请确保 `Tooltip` 的子元素能接受 `onMouseEnter`、`onMouseLeave`、`onPointerEnter`、`onPointerLeave`、`onFocus`、`onClick` 事件。
请查看 https://github.com/ant-design/ant-design/issues/15909
### placement 的行为逻辑是什么?
当屏幕空间足够时,会按照 `placement` 的设置进行弹层。当空间不足时则会取反向位置进行弹层(例如 `top` 不够时,会改为 `bottom``topLeft` 不够时会改为 `bottomLeft`)。单一方向如 `top` `bottom` `left` `right` 当贴边时进行自动位移:

View File

@ -175,6 +175,7 @@ exports[`renders components/transfer/demo/advanced.tsx extend context correctly
>
<button
class="ant-input-clear-icon ant-input-clear-icon-hidden"
tabindex="-1"
type="button"
>
<span
@ -709,6 +710,7 @@ exports[`renders components/transfer/demo/advanced.tsx extend context correctly
>
<button
class="ant-input-clear-icon ant-input-clear-icon-hidden"
tabindex="-1"
type="button"
>
<span
@ -3315,6 +3317,7 @@ Array [
>
<button
class="ant-input-clear-icon ant-input-clear-icon-hidden"
tabindex="-1"
type="button"
>
<span
@ -3628,6 +3631,7 @@ Array [
>
<button
class="ant-input-clear-icon ant-input-clear-icon-hidden"
tabindex="-1"
type="button"
>
<span
@ -8766,6 +8770,7 @@ exports[`renders components/transfer/demo/search.tsx extend context correctly 1`
>
<button
class="ant-input-clear-icon ant-input-clear-icon-hidden"
tabindex="-1"
type="button"
>
<span
@ -9280,6 +9285,7 @@ exports[`renders components/transfer/demo/search.tsx extend context correctly 1`
>
<button
class="ant-input-clear-icon ant-input-clear-icon-hidden"
tabindex="-1"
type="button"
>
<span
@ -10181,6 +10187,7 @@ exports[`renders components/transfer/demo/status.tsx extend context correctly 1`
>
<button
class="ant-input-clear-icon ant-input-clear-icon-hidden"
tabindex="-1"
type="button"
>
<span
@ -10494,6 +10501,7 @@ exports[`renders components/transfer/demo/status.tsx extend context correctly 1`
>
<button
class="ant-input-clear-icon ant-input-clear-icon-hidden"
tabindex="-1"
type="button"
>
<span
@ -10646,6 +10654,7 @@ exports[`renders components/transfer/demo/table-transfer.tsx extend context corr
>
<button
class="ant-input-clear-icon ant-input-clear-icon-hidden"
tabindex="-1"
type="button"
>
<span
@ -11550,6 +11559,7 @@ exports[`renders components/transfer/demo/table-transfer.tsx extend context corr
>
<button
class="ant-input-clear-icon ant-input-clear-icon-hidden"
tabindex="-1"
type="button"
>
<span

View File

@ -101,6 +101,7 @@ exports[`renders components/transfer/demo/advanced.tsx correctly 1`] = `
>
<button
class="ant-input-clear-icon ant-input-clear-icon-hidden"
tabindex="-1"
type="button"
>
<span
@ -359,6 +360,7 @@ exports[`renders components/transfer/demo/advanced.tsx correctly 1`] = `
>
<button
class="ant-input-clear-icon ant-input-clear-icon-hidden"
tabindex="-1"
type="button"
>
<span
@ -2234,6 +2236,7 @@ Array [
>
<button
class="ant-input-clear-icon ant-input-clear-icon-hidden"
tabindex="-1"
type="button"
>
<span
@ -2472,6 +2475,7 @@ Array [
>
<button
class="ant-input-clear-icon ant-input-clear-icon-hidden"
tabindex="-1"
type="button"
>
<span
@ -5685,6 +5689,7 @@ exports[`renders components/transfer/demo/search.tsx correctly 1`] = `
>
<button
class="ant-input-clear-icon ant-input-clear-icon-hidden"
tabindex="-1"
type="button"
>
<span
@ -5923,6 +5928,7 @@ exports[`renders components/transfer/demo/search.tsx correctly 1`] = `
>
<button
class="ant-input-clear-icon ant-input-clear-icon-hidden"
tabindex="-1"
type="button"
>
<span
@ -6395,6 +6401,7 @@ exports[`renders components/transfer/demo/status.tsx correctly 1`] = `
>
<button
class="ant-input-clear-icon ant-input-clear-icon-hidden"
tabindex="-1"
type="button"
>
<span
@ -6633,6 +6640,7 @@ exports[`renders components/transfer/demo/status.tsx correctly 1`] = `
>
<button
class="ant-input-clear-icon ant-input-clear-icon-hidden"
tabindex="-1"
type="button"
>
<span
@ -6786,6 +6794,7 @@ exports[`renders components/transfer/demo/table-transfer.tsx correctly 1`] = `
>
<button
class="ant-input-clear-icon ant-input-clear-icon-hidden"
tabindex="-1"
type="button"
>
<span
@ -7584,6 +7593,7 @@ exports[`renders components/transfer/demo/table-transfer.tsx correctly 1`] = `
>
<button
class="ant-input-clear-icon ant-input-clear-icon-hidden"
tabindex="-1"
type="button"
>
<span

View File

@ -38,6 +38,7 @@ exports[`Transfer.Search should show cross icon when input value exists 1`] = `
>
<button
class="ant-input-clear-icon ant-input-clear-icon-hidden"
tabindex="-1"
type="button"
>
<span
@ -103,6 +104,7 @@ exports[`Transfer.Search should show cross icon when input value exists 2`] = `
>
<button
class="ant-input-clear-icon"
tabindex="-1"
type="button"
>
<span

View File

@ -341,14 +341,8 @@ describe('Upload', () => {
const file = { uid: '-3', name: 'item3.jpg' };
const fileList = produce(
[
{
uid: '-1',
name: 'item.jpg',
},
{
uid: '-2',
name: 'item2.jpg',
},
{ uid: '-1', name: 'item.jpg' },
{ uid: '-2', name: 'item2.jpg' },
],
(draftState) => {
draftState.push({

View File

@ -1,7 +1,7 @@
import React, { useEffect, useState } from 'react';
import { UploadOutlined } from '@ant-design/icons';
import type { UploadFile, UploadProps } from 'antd';
import { Button, Form, message, Upload } from 'antd';
import { App, Button, Form, Upload } from 'antd';
interface OSSDataType {
dir: string;
@ -17,26 +17,33 @@ interface AliyunOSSUploadProps {
onChange?: (fileList: UploadFile[]) => void;
}
const AliyunOSSUpload = ({ value, onChange }: AliyunOSSUploadProps) => {
const [OSSData, setOSSData] = useState<OSSDataType>();
// Mock get OSS api
// https://help.aliyun.com/document_detail/31988.html
const mockGetOSSData = () => ({
// Mock get OSS api
// https://help.aliyun.com/document_detail/31988.html
const mockOSSData = () => {
const mockData = {
dir: 'user-dir/',
expire: '1577811661',
host: 'https://660d2bd96ddfa2943b33731c.mockapi.io/api/upload',
accessId: 'c2hhb2RhaG9uZw==',
policy: 'eGl4aWhhaGFrdWt1ZGFkYQ==',
signature: 'ZGFob25nc2hhbw==',
});
};
return Promise.resolve(mockData);
};
const AliyunOSSUpload: React.FC<Readonly<AliyunOSSUploadProps>> = ({ value, onChange }) => {
const { message } = App.useApp();
const [OSSData, setOSSData] = useState<OSSDataType>();
const init = async () => {
try {
const result = await mockGetOSSData();
const result = await mockOSSData();
setOSSData(result);
} catch (error) {
message.error(error as string);
} catch (err) {
if (err instanceof Error) {
message.error(err.message);
}
}
};
@ -51,10 +58,7 @@ const AliyunOSSUpload = ({ value, onChange }: AliyunOSSUploadProps) => {
const onRemove = (file: UploadFile) => {
const files = (value || []).filter((v) => v.url !== file.url);
if (onChange) {
onChange(files);
}
onChange?.(files);
};
const getExtraData: UploadProps['data'] = (file) => ({
@ -65,7 +69,9 @@ const AliyunOSSUpload = ({ value, onChange }: AliyunOSSUploadProps) => {
});
const beforeUpload: UploadProps['beforeUpload'] = async (file) => {
if (!OSSData) return false;
if (!OSSData) {
return false;
}
const expire = Number(OSSData.expire) * 1000;
@ -98,7 +104,7 @@ const AliyunOSSUpload = ({ value, onChange }: AliyunOSSUploadProps) => {
);
};
const App: React.FC = () => (
const Demo: React.FC = () => (
<Form labelCol={{ span: 4 }}>
<Form.Item label="Photos" name="photos">
<AliyunOSSUpload />
@ -106,4 +112,4 @@ const App: React.FC = () => (
</Form>
);
export default App;
export default Demo;

View File

@ -1,4 +1,5 @@
import React from 'react';
import { spyElementPrototypes } from 'rc-util/lib/test/domHook';
import Watermark from '..';
import mountTest from '../../../tests/shared/mountTest';
@ -89,12 +90,25 @@ describe('Watermark', () => {
});
it('MutationObserver should work properly', async () => {
let counter = 0;
const spyCanvas = spyElementPrototypes(HTMLCanvasElement, {
toDataURL(originDescriptor: any) {
counter += 1;
return originDescriptor.value.call(this);
},
});
const { container } = render(<Watermark className="watermark" content="MutationObserver" />);
const target = container.querySelector<HTMLDivElement>('.watermark div');
await waitFakeTimer();
expect(counter).toBe(1);
target?.remove();
await waitFakeTimer();
expect(counter).toBe(1);
expect(container).toMatchSnapshot();
spyCanvas.mockRestore();
});
describe('Observe the modification of style', () => {

View File

@ -3,14 +3,15 @@ import { useMutateObserver } from '@rc-component/mutate-observer';
import classNames from 'classnames';
import useEvent from 'rc-util/lib/hooks/useEvent';
import toList from '../_util/toList';
import { useToken } from '../theme/internal';
import WatermarkContext from './context';
import type { WatermarkContextProps } from './context';
import useClips, { FontGap } from './useClips';
import useRafDebounce from './useRafDebounce';
import useSingletonCache from './useSingletonCache';
import useWatermark from './useWatermark';
import { getPixelRatio, reRendering } from './utils';
import toList from '../_util/toList';
export interface WatermarkProps {
zIndex?: number;
@ -162,6 +163,9 @@ const Watermark: React.FC<WatermarkProps> = (props) => {
const getClips = useClips();
type ClipParams = Parameters<typeof getClips>;
const getClipsCache = useSingletonCache<ClipParams, ReturnType<typeof getClips>>();
const [watermarkInfo, setWatermarkInfo] = React.useState<[base64: string, contentWidth: number]>(
null!,
);
@ -178,24 +182,19 @@ const Watermark: React.FC<WatermarkProps> = (props) => {
const drawCanvas = (
drawContent?: NonNullable<WatermarkProps['content']> | HTMLImageElement,
) => {
const [nextClips, clipWidth] = getClips(
const params: ClipParams = [
drawContent || '',
rotate,
ratio,
markWidth,
markHeight,
{
color,
fontSize,
fontStyle,
fontWeight,
fontFamily,
textAlign,
},
{ color, fontSize, fontStyle, fontWeight, fontFamily, textAlign },
gapX,
gapY,
);
] as const;
const result = getClipsCache(params, () => getClips(...params));
const [nextClips, clipWidth] = result;
setWatermarkInfo([nextClips, clipWidth]);
};

View File

@ -0,0 +1,25 @@
import * as React from 'react';
import isEqual from 'rc-util/lib/isEqual';
export type GetCache<T, R> = (cacheKeys: T, callback: () => R) => R;
/**
* Singleton cache will only take latest `cacheParams` as key
* and return the result for callback matching.
*/
export default function useSingletonCache<T extends any[], R>(): GetCache<T, R> {
const cacheRef = React.useRef<[any[] | null, R | null]>([null, null]);
const getCache: GetCache<T, R> = (cacheKeys, callback) => {
const filteredKeys = cacheKeys.map((item) =>
item instanceof HTMLElement || isNaN(item) ? '' : item,
);
if (!isEqual(cacheRef.current[0], filteredKeys)) {
cacheRef.current = [filteredKeys, callback()];
}
return cacheRef.current[1]!;
};
return getCache;
}

View File

@ -1,6 +1,6 @@
{
"name": "antd",
"version": "5.24.1",
"version": "5.24.2",
"description": "An enterprise-class UI design language and React components implementation",
"license": "MIT",
"funding": {
@ -123,7 +123,7 @@
"classnames": "^2.5.1",
"copy-to-clipboard": "^3.3.3",
"dayjs": "^1.11.11",
"rc-cascader": "~3.33.0",
"rc-cascader": "~3.33.1",
"rc-checkbox": "~3.5.0",
"rc-collapse": "~3.9.0",
"rc-dialog": "~9.6.0",
@ -131,14 +131,14 @@
"rc-dropdown": "~4.2.1",
"rc-field-form": "~2.7.0",
"rc-image": "~7.11.0",
"rc-input": "~1.7.2",
"rc-input": "~1.7.3",
"rc-input-number": "~9.4.0",
"rc-mentions": "~2.19.1",
"rc-menu": "~9.16.1",
"rc-motion": "^2.9.5",
"rc-notification": "~5.6.3",
"rc-pagination": "~5.1.0",
"rc-picker": "~4.11.2",
"rc-picker": "~4.11.3",
"rc-progress": "~4.0.0",
"rc-rate": "~2.13.1",
"rc-resize-observer": "^1.4.3",
@ -151,7 +151,7 @@
"rc-tabs": "~15.5.1",
"rc-textarea": "~1.9.0",
"rc-tooltip": "~6.4.0",
"rc-tree": "~5.13.0",
"rc-tree": "~5.13.1",
"rc-tree-select": "~5.27.0",
"rc-upload": "~4.8.1",
"rc-util": "^5.44.4",
@ -210,7 +210,6 @@
"@types/pngjs": "^6.0.5",
"@types/prismjs": "^1.26.4",
"@types/progress": "^2.0.7",
"@types/qs": "^6.9.16",
"@types/react": "^19.0.1",
"@types/react-copy-to-clipboard": "^5.0.7",
"@types/react-dom": "^19.0.2",
@ -246,7 +245,6 @@
"eslint-plugin-react-hooks": "^5.2.0-canary-6907aa2a-20241220",
"eslint-plugin-react-refresh": "^0.4.14",
"fast-glob": "^3.3.2",
"fetch-jsonp": "^1.3.0",
"fs-extra": "^11.2.0",
"gh-pages": "^6.2.0",
"glob": "^11.0.0",
@ -286,7 +284,6 @@
"pretty-format": "^29.7.0",
"prismjs": "^1.29.0",
"puppeteer": "^24.0.0",
"qs": "^6.13.0",
"rc-footer": "^0.6.8",
"rc-tween-one": "^3.0.6",
"rc-virtual-list": "^3.17.0",
@ -302,7 +299,7 @@
"react-intersection-observer": "^9.13.1",
"react-resizable": "^3.0.5",
"react-router-dom": "^7.0.1",
"react-scan": "^0.1.3",
"react-scan": "^0.2.0",
"react-sticky-box": "^2.0.5",
"regenerator-runtime": "^0.14.1",
"rehype-stringify": "^10.0.1",
@ -326,13 +323,16 @@
"terser": "^5.36.0",
"tsx": "^4.19.2",
"typedoc": "^0.27.0",
"typescript": "~5.7.2",
"vanilla-jsoneditor": "^2.3.1",
"typescript": "~5.8.2",
"vanilla-jsoneditor": "^3.0.0",
"vanilla-tilt": "^1.8.1",
"webpack": "^5.97.1",
"webpack-bundle-analyzer": "^4.10.2",
"xhr-mock": "^2.5.1"
},
"overrides": {
"nwsapi": "2.2.16"
},
"publishConfig": {
"registry": "https://registry.npmjs.org/"
},