chore: auto merge branches (#41168)

chore: merge master into feature
This commit is contained in:
github-actions[bot] 2023-03-10 13:03:42 +00:00 committed by GitHub
commit c4ccb021c3
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
168 changed files with 2367 additions and 1687 deletions

View File

@ -26,16 +26,3 @@ jobs:
Hi @${{ github.event.pull_request.user.login }}. Thanks for your contribution. The path `.github/` or `scripts/` and `CHANGELOG` is only maintained by team members. This current PR will be closed and team members will help on this.
close: true
set-failed: false
- name: verify-less
uses: actions-cool/verify-files-modify@v1
with:
forbid-files: 'components/style/themes/default.less'
skip-verify-authority: 'admin'
comment-mark: 'less'
comment: |
🚨 Hi @${{ github.event.pull_request.user.login }}. Thanks for your contribution, as the `default.less` file is currently being upgraded, changes are not recommended.
🚨 你好,@${{ github.event.pull_request.user.login }}。感谢你的贡献,由于 `default.less` 文件近期处于升级状态,不建议进行更改。
close: false
set-failed: false

View File

@ -21,14 +21,14 @@ describe('node', () => {
});
// Find the component exist demo test file
const files = glob.sync(`./components/*/__tests__/demo.test.@(j|t)s?(x)`);
const files = glob.globSync(`./components/*/__tests__/demo.test.@(j|t)s?(x)`);
files.forEach((componentTestFile) => {
const componentName = componentTestFile.match(/components\/([^/]*)\//)![1];
// Test for ssr
describe(componentName, () => {
const demoList = glob.sync(`./components/${componentName}/demo/*.tsx`);
const demoList = glob.globSync(`./components/${componentName}/demo/*.tsx`);
// Use mock to get config
require(`../../${componentTestFile}`); // eslint-disable-line global-require, import/no-dynamic-require

View File

@ -62,6 +62,7 @@ const ActionButton: React.FC<ActionButtonProps> = (props) => {
setLoading(true);
returnValueOfOnOk!.then(
(...args: any[]) => {
setLoading(false, true);
onInternalClose(...args);
clickedRef.current = false;
},

View File

@ -1,6 +1,6 @@
// Jest Snapshot v1, https://goo.gl/fbAQLP
exports[`renders ./components/affix/demo/basic.tsx extend context correctly 1`] = `
exports[`renders components/affix/demo/basic.tsx extend context correctly 1`] = `
Array [
<div>
<div
@ -34,7 +34,7 @@ Array [
]
`;
exports[`renders ./components/affix/demo/debug.tsx extend context correctly 1`] = `
exports[`renders components/affix/demo/debug.tsx extend context correctly 1`] = `
<div
style="height:10000px"
>
@ -65,7 +65,7 @@ exports[`renders ./components/affix/demo/debug.tsx extend context correctly 1`]
</div>
`;
exports[`renders ./components/affix/demo/on-change.tsx extend context correctly 1`] = `
exports[`renders components/affix/demo/on-change.tsx extend context correctly 1`] = `
<div>
<div
class=""
@ -82,7 +82,7 @@ exports[`renders ./components/affix/demo/on-change.tsx extend context correctly
</div>
`;
exports[`renders ./components/affix/demo/target.tsx extend context correctly 1`] = `
exports[`renders components/affix/demo/target.tsx extend context correctly 1`] = `
<div
class="scrollable-container"
>

View File

@ -1,6 +1,6 @@
// Jest Snapshot v1, https://goo.gl/fbAQLP
exports[`renders ./components/affix/demo/basic.tsx correctly 1`] = `
exports[`renders components/affix/demo/basic.tsx correctly 1`] = `
Array [
<div>
<div
@ -34,7 +34,7 @@ Array [
]
`;
exports[`renders ./components/affix/demo/debug.tsx correctly 1`] = `
exports[`renders components/affix/demo/debug.tsx correctly 1`] = `
<div
style="height:10000px"
>
@ -65,7 +65,7 @@ exports[`renders ./components/affix/demo/debug.tsx correctly 1`] = `
</div>
`;
exports[`renders ./components/affix/demo/on-change.tsx correctly 1`] = `
exports[`renders components/affix/demo/on-change.tsx correctly 1`] = `
<div>
<div
class=""
@ -82,7 +82,7 @@ exports[`renders ./components/affix/demo/on-change.tsx correctly 1`] = `
</div>
`;
exports[`renders ./components/affix/demo/target.tsx correctly 1`] = `
exports[`renders components/affix/demo/target.tsx correctly 1`] = `
<div
class="scrollable-container"
>

View File

@ -1,6 +1,6 @@
// Jest Snapshot v1, https://goo.gl/fbAQLP
exports[`renders ./components/alert/demo/action.tsx extend context correctly 1`] = `
exports[`renders components/alert/demo/action.tsx extend context correctly 1`] = `
<div
class="ant-space ant-space-vertical"
style="width:100%"
@ -287,7 +287,7 @@ exports[`renders ./components/alert/demo/action.tsx extend context correctly 1`]
</div>
`;
exports[`renders ./components/alert/demo/banner.tsx extend context correctly 1`] = `
exports[`renders components/alert/demo/banner.tsx extend context correctly 1`] = `
<div
class="ant-space ant-space-vertical"
style="width:100%"
@ -456,7 +456,7 @@ exports[`renders ./components/alert/demo/banner.tsx extend context correctly 1`]
</div>
`;
exports[`renders ./components/alert/demo/basic.tsx extend context correctly 1`] = `
exports[`renders components/alert/demo/basic.tsx extend context correctly 1`] = `
<div
class="ant-alert ant-alert-success ant-alert-no-icon"
data-show="true"
@ -474,7 +474,7 @@ exports[`renders ./components/alert/demo/basic.tsx extend context correctly 1`]
</div>
`;
exports[`renders ./components/alert/demo/closable.tsx extend context correctly 1`] = `
exports[`renders components/alert/demo/closable.tsx extend context correctly 1`] = `
<div
class="ant-space ant-space-vertical"
style="width:100%"
@ -576,7 +576,7 @@ exports[`renders ./components/alert/demo/closable.tsx extend context correctly 1
</div>
`;
exports[`renders ./components/alert/demo/close-text.tsx extend context correctly 1`] = `
exports[`renders components/alert/demo/close-text.tsx extend context correctly 1`] = `
<div
class="ant-alert ant-alert-info ant-alert-no-icon"
data-show="true"
@ -605,7 +605,7 @@ exports[`renders ./components/alert/demo/close-text.tsx extend context correctly
</div>
`;
exports[`renders ./components/alert/demo/custom-icon.tsx extend context correctly 1`] = `
exports[`renders components/alert/demo/custom-icon.tsx extend context correctly 1`] = `
<div
class="ant-space ant-space-vertical"
style="width:100%"
@ -964,7 +964,7 @@ exports[`renders ./components/alert/demo/custom-icon.tsx extend context correctl
</div>
`;
exports[`renders ./components/alert/demo/description.tsx extend context correctly 1`] = `
exports[`renders components/alert/demo/description.tsx extend context correctly 1`] = `
<div
class="ant-space ant-space-vertical"
style="width:100%"
@ -1071,7 +1071,7 @@ exports[`renders ./components/alert/demo/description.tsx extend context correctl
</div>
`;
exports[`renders ./components/alert/demo/error-boundary.tsx extend context correctly 1`] = `
exports[`renders components/alert/demo/error-boundary.tsx extend context correctly 1`] = `
<button
class="ant-btn ant-btn-default ant-btn-dangerous"
type="button"
@ -1082,7 +1082,7 @@ exports[`renders ./components/alert/demo/error-boundary.tsx extend context corre
</button>
`;
exports[`renders ./components/alert/demo/icon.tsx extend context correctly 1`] = `
exports[`renders components/alert/demo/icon.tsx extend context correctly 1`] = `
<div
class="ant-space ant-space-vertical"
style="width:100%"
@ -1471,7 +1471,7 @@ exports[`renders ./components/alert/demo/icon.tsx extend context correctly 1`] =
</div>
`;
exports[`renders ./components/alert/demo/smooth-closed.tsx extend context correctly 1`] = `
exports[`renders components/alert/demo/smooth-closed.tsx extend context correctly 1`] = `
<div
class="ant-space ant-space-vertical"
style="width:100%"
@ -1557,7 +1557,7 @@ exports[`renders ./components/alert/demo/smooth-closed.tsx extend context correc
</div>
`;
exports[`renders ./components/alert/demo/style.tsx extend context correctly 1`] = `
exports[`renders components/alert/demo/style.tsx extend context correctly 1`] = `
<div
class="ant-space ant-space-vertical"
style="width:100%"

View File

@ -1,6 +1,6 @@
// Jest Snapshot v1, https://goo.gl/fbAQLP
exports[`renders ./components/alert/demo/action.tsx correctly 1`] = `
exports[`renders components/alert/demo/action.tsx correctly 1`] = `
<div
class="ant-space ant-space-vertical"
style="width:100%"
@ -287,7 +287,7 @@ exports[`renders ./components/alert/demo/action.tsx correctly 1`] = `
</div>
`;
exports[`renders ./components/alert/demo/banner.tsx correctly 1`] = `
exports[`renders components/alert/demo/banner.tsx correctly 1`] = `
<div
class="ant-space ant-space-vertical"
style="width:100%"
@ -456,7 +456,7 @@ exports[`renders ./components/alert/demo/banner.tsx correctly 1`] = `
</div>
`;
exports[`renders ./components/alert/demo/basic.tsx correctly 1`] = `
exports[`renders components/alert/demo/basic.tsx correctly 1`] = `
<div
class="ant-alert ant-alert-success ant-alert-no-icon"
data-show="true"
@ -474,7 +474,7 @@ exports[`renders ./components/alert/demo/basic.tsx correctly 1`] = `
</div>
`;
exports[`renders ./components/alert/demo/closable.tsx correctly 1`] = `
exports[`renders components/alert/demo/closable.tsx correctly 1`] = `
<div
class="ant-space ant-space-vertical"
style="width:100%"
@ -576,7 +576,7 @@ exports[`renders ./components/alert/demo/closable.tsx correctly 1`] = `
</div>
`;
exports[`renders ./components/alert/demo/close-text.tsx correctly 1`] = `
exports[`renders components/alert/demo/close-text.tsx correctly 1`] = `
<div
class="ant-alert ant-alert-info ant-alert-no-icon"
data-show="true"
@ -605,7 +605,7 @@ exports[`renders ./components/alert/demo/close-text.tsx correctly 1`] = `
</div>
`;
exports[`renders ./components/alert/demo/custom-icon.tsx correctly 1`] = `
exports[`renders components/alert/demo/custom-icon.tsx correctly 1`] = `
<div
class="ant-space ant-space-vertical"
style="width:100%"
@ -964,7 +964,7 @@ exports[`renders ./components/alert/demo/custom-icon.tsx correctly 1`] = `
</div>
`;
exports[`renders ./components/alert/demo/description.tsx correctly 1`] = `
exports[`renders components/alert/demo/description.tsx correctly 1`] = `
<div
class="ant-space ant-space-vertical"
style="width:100%"
@ -1071,7 +1071,7 @@ exports[`renders ./components/alert/demo/description.tsx correctly 1`] = `
</div>
`;
exports[`renders ./components/alert/demo/error-boundary.tsx correctly 1`] = `
exports[`renders components/alert/demo/error-boundary.tsx correctly 1`] = `
<button
class="ant-btn ant-btn-default ant-btn-dangerous"
type="button"
@ -1082,7 +1082,7 @@ exports[`renders ./components/alert/demo/error-boundary.tsx correctly 1`] = `
</button>
`;
exports[`renders ./components/alert/demo/icon.tsx correctly 1`] = `
exports[`renders components/alert/demo/icon.tsx correctly 1`] = `
<div
class="ant-space ant-space-vertical"
style="width:100%"
@ -1471,7 +1471,7 @@ exports[`renders ./components/alert/demo/icon.tsx correctly 1`] = `
</div>
`;
exports[`renders ./components/alert/demo/smooth-closed.tsx correctly 1`] = `
exports[`renders components/alert/demo/smooth-closed.tsx correctly 1`] = `
<div
class="ant-space ant-space-vertical"
style="width:100%"
@ -1557,7 +1557,7 @@ exports[`renders ./components/alert/demo/smooth-closed.tsx correctly 1`] = `
</div>
`;
exports[`renders ./components/alert/demo/style.tsx correctly 1`] = `
exports[`renders components/alert/demo/style.tsx correctly 1`] = `
<div
class="ant-space ant-space-vertical"
style="width:100%"

View File

@ -1,4 +1,5 @@
import classNames from 'classnames';
import useEvent from 'rc-util/lib/hooks/useEvent';
import * as React from 'react';
import scrollIntoView from 'scroll-into-view-if-needed';
@ -155,23 +156,17 @@ const AnchorContent: React.FC<InternalAnchorProps> = (props) => {
const dependencyListItem: React.DependencyList[number] = JSON.stringify(links);
const registerLink = React.useCallback<AntAnchor['registerLink']>(
(link) => {
if (!links.includes(link)) {
setLinks((prev) => [...prev, link]);
}
},
[dependencyListItem],
);
const registerLink = useEvent<AntAnchor['registerLink']>((link) => {
if (!links.includes(link)) {
setLinks((prev) => [...prev, link]);
}
});
const unregisterLink = React.useCallback<AntAnchor['unregisterLink']>(
(link) => {
if (links.includes(link)) {
setLinks((prev) => prev.filter((i) => i !== link));
}
},
[dependencyListItem],
);
const unregisterLink = useEvent<AntAnchor['unregisterLink']>((link) => {
if (links.includes(link)) {
setLinks((prev) => prev.filter((i) => i !== link));
}
});
const updateInk = () => {
const linkNode = wrapperRef.current?.querySelector<HTMLElement>(

View File

@ -30,7 +30,7 @@ const AnchorLink: React.FC<AnchorLinkProps> = (props) => {
return () => {
unregisterLink?.(href);
};
}, [href, registerLink, unregisterLink]);
}, [href]);
const handleClick = (e: React.MouseEvent<HTMLAnchorElement, MouseEvent>) => {
onClick?.(e, { title, href });

View File

@ -1,6 +1,6 @@
// Jest Snapshot v1, https://goo.gl/fbAQLP
exports[`renders ./components/anchor/demo/basic.tsx extend context correctly 1`] = `
exports[`renders components/anchor/demo/basic.tsx extend context correctly 1`] = `
<div
class="ant-row"
>
@ -78,7 +78,7 @@ exports[`renders ./components/anchor/demo/basic.tsx extend context correctly 1`]
</div>
`;
exports[`renders ./components/anchor/demo/customizeHighlight.tsx extend context correctly 1`] = `
exports[`renders components/anchor/demo/customizeHighlight.tsx extend context correctly 1`] = `
<div
class="ant-anchor-wrapper"
style="max-height:100vh"
@ -148,7 +148,7 @@ exports[`renders ./components/anchor/demo/customizeHighlight.tsx extend context
</div>
`;
exports[`renders ./components/anchor/demo/horizontal.tsx extend context correctly 1`] = `
exports[`renders components/anchor/demo/horizontal.tsx extend context correctly 1`] = `
Array [
<div
style="padding:20px"
@ -267,7 +267,7 @@ Array [
]
`;
exports[`renders ./components/anchor/demo/legacy-anchor.tsx extend context correctly 1`] = `
exports[`renders components/anchor/demo/legacy-anchor.tsx extend context correctly 1`] = `
<div
class="ant-anchor-wrapper"
style="max-height:100vh"
@ -337,7 +337,7 @@ exports[`renders ./components/anchor/demo/legacy-anchor.tsx extend context corre
</div>
`;
exports[`renders ./components/anchor/demo/onChange.tsx extend context correctly 1`] = `
exports[`renders components/anchor/demo/onChange.tsx extend context correctly 1`] = `
<div
class="ant-anchor-wrapper"
style="max-height:100vh"
@ -407,7 +407,7 @@ exports[`renders ./components/anchor/demo/onChange.tsx extend context correctly
</div>
`;
exports[`renders ./components/anchor/demo/onClick.tsx extend context correctly 1`] = `
exports[`renders components/anchor/demo/onClick.tsx extend context correctly 1`] = `
<div
class="ant-anchor-wrapper"
style="max-height:100vh"
@ -477,7 +477,7 @@ exports[`renders ./components/anchor/demo/onClick.tsx extend context correctly 1
</div>
`;
exports[`renders ./components/anchor/demo/static.tsx extend context correctly 1`] = `
exports[`renders components/anchor/demo/static.tsx extend context correctly 1`] = `
<div
class="ant-anchor-wrapper"
style="max-height:100vh"
@ -547,7 +547,7 @@ exports[`renders ./components/anchor/demo/static.tsx extend context correctly 1`
</div>
`;
exports[`renders ./components/anchor/demo/targetOffset.tsx extend context correctly 1`] = `
exports[`renders components/anchor/demo/targetOffset.tsx extend context correctly 1`] = `
<div>
<div
class="ant-row"

View File

@ -1,6 +1,6 @@
// Jest Snapshot v1, https://goo.gl/fbAQLP
exports[`renders ./components/anchor/demo/basic.tsx correctly 1`] = `
exports[`renders components/anchor/demo/basic.tsx correctly 1`] = `
<div
class="ant-row"
>
@ -78,7 +78,7 @@ exports[`renders ./components/anchor/demo/basic.tsx correctly 1`] = `
</div>
`;
exports[`renders ./components/anchor/demo/customizeHighlight.tsx correctly 1`] = `
exports[`renders components/anchor/demo/customizeHighlight.tsx correctly 1`] = `
<div
class="ant-anchor-wrapper"
style="max-height:100vh"
@ -148,7 +148,7 @@ exports[`renders ./components/anchor/demo/customizeHighlight.tsx correctly 1`] =
</div>
`;
exports[`renders ./components/anchor/demo/horizontal.tsx correctly 1`] = `
exports[`renders components/anchor/demo/horizontal.tsx correctly 1`] = `
Array [
<div
style="padding:20px"
@ -267,7 +267,7 @@ Array [
]
`;
exports[`renders ./components/anchor/demo/legacy-anchor.tsx correctly 1`] = `
exports[`renders components/anchor/demo/legacy-anchor.tsx correctly 1`] = `
<div
class="ant-anchor-wrapper"
style="max-height:100vh"
@ -337,7 +337,7 @@ exports[`renders ./components/anchor/demo/legacy-anchor.tsx correctly 1`] = `
</div>
`;
exports[`renders ./components/anchor/demo/onChange.tsx correctly 1`] = `
exports[`renders components/anchor/demo/onChange.tsx correctly 1`] = `
<div
class="ant-anchor-wrapper"
style="max-height:100vh"
@ -407,7 +407,7 @@ exports[`renders ./components/anchor/demo/onChange.tsx correctly 1`] = `
</div>
`;
exports[`renders ./components/anchor/demo/onClick.tsx correctly 1`] = `
exports[`renders components/anchor/demo/onClick.tsx correctly 1`] = `
<div
class="ant-anchor-wrapper"
style="max-height:100vh"
@ -477,7 +477,7 @@ exports[`renders ./components/anchor/demo/onClick.tsx correctly 1`] = `
</div>
`;
exports[`renders ./components/anchor/demo/static.tsx correctly 1`] = `
exports[`renders components/anchor/demo/static.tsx correctly 1`] = `
<div
class="ant-anchor-wrapper"
style="max-height:100vh"
@ -547,7 +547,7 @@ exports[`renders ./components/anchor/demo/static.tsx correctly 1`] = `
</div>
`;
exports[`renders ./components/anchor/demo/targetOffset.tsx correctly 1`] = `
exports[`renders components/anchor/demo/targetOffset.tsx correctly 1`] = `
<div>
<div
class="ant-row"

View File

@ -1,6 +1,6 @@
// Jest Snapshot v1, https://goo.gl/fbAQLP
exports[`renders ./components/app/demo/basic.tsx extend context correctly 1`] = `
exports[`renders components/app/demo/basic.tsx extend context correctly 1`] = `
<div
class="ant-app"
>

View File

@ -1,6 +1,6 @@
// Jest Snapshot v1, https://goo.gl/fbAQLP
exports[`renders ./components/app/demo/basic.tsx correctly 1`] = `
exports[`renders components/app/demo/basic.tsx correctly 1`] = `
<div
class="ant-app"
>

View File

@ -1,6 +1,6 @@
// Jest Snapshot v1, https://goo.gl/fbAQLP
exports[`renders ./components/auto-complete/demo/basic.tsx extend context correctly 1`] = `
exports[`renders components/auto-complete/demo/basic.tsx extend context correctly 1`] = `
Array [
<div
class="ant-select ant-select-auto-complete ant-select-single ant-select-show-search"
@ -91,7 +91,7 @@ Array [
]
`;
exports[`renders ./components/auto-complete/demo/certain-category.tsx extend context correctly 1`] = `
exports[`renders components/auto-complete/demo/certain-category.tsx extend context correctly 1`] = `
<div
class="ant-select ant-select-auto-complete ant-select-single ant-select-customize-input ant-select-show-search"
style="width:250px"
@ -468,7 +468,7 @@ exports[`renders ./components/auto-complete/demo/certain-category.tsx extend con
</div>
`;
exports[`renders ./components/auto-complete/demo/custom.tsx extend context correctly 1`] = `
exports[`renders components/auto-complete/demo/custom.tsx extend context correctly 1`] = `
<div
class="ant-select ant-select-auto-complete ant-select-single ant-select-customize-input ant-select-show-search"
style="width:200px"
@ -512,7 +512,7 @@ exports[`renders ./components/auto-complete/demo/custom.tsx extend context corre
</div>
`;
exports[`renders ./components/auto-complete/demo/form-debug.tsx extend context correctly 1`] = `
exports[`renders components/auto-complete/demo/form-debug.tsx extend context correctly 1`] = `
<form
class="ant-form ant-form-horizontal"
style="margin:0 auto"
@ -1697,7 +1697,7 @@ exports[`renders ./components/auto-complete/demo/form-debug.tsx extend context c
</form>
`;
exports[`renders ./components/auto-complete/demo/non-case-sensitive.tsx extend context correctly 1`] = `
exports[`renders components/auto-complete/demo/non-case-sensitive.tsx extend context correctly 1`] = `
<div
class="ant-select ant-select-auto-complete ant-select-single ant-select-show-search"
style="width:200px"
@ -1825,7 +1825,7 @@ exports[`renders ./components/auto-complete/demo/non-case-sensitive.tsx extend c
</div>
`;
exports[`renders ./components/auto-complete/demo/options.tsx extend context correctly 1`] = `
exports[`renders components/auto-complete/demo/options.tsx extend context correctly 1`] = `
<div
class="ant-select ant-select-auto-complete ant-select-single ant-select-show-search"
style="width:200px"
@ -1870,7 +1870,7 @@ exports[`renders ./components/auto-complete/demo/options.tsx extend context corr
</div>
`;
exports[`renders ./components/auto-complete/demo/render-panel.tsx extend context correctly 1`] = `
exports[`renders components/auto-complete/demo/render-panel.tsx extend context correctly 1`] = `
<div
class="ant-space ant-space-vertical"
style="display:flex"
@ -2051,7 +2051,7 @@ exports[`renders ./components/auto-complete/demo/render-panel.tsx extend context
</div>
`;
exports[`renders ./components/auto-complete/demo/status.tsx extend context correctly 1`] = `
exports[`renders components/auto-complete/demo/status.tsx extend context correctly 1`] = `
<div
class="ant-space ant-space-vertical"
style="width:100%"
@ -2148,7 +2148,7 @@ exports[`renders ./components/auto-complete/demo/status.tsx extend context corre
</div>
`;
exports[`renders ./components/auto-complete/demo/uncertain-category.tsx extend context correctly 1`] = `
exports[`renders components/auto-complete/demo/uncertain-category.tsx extend context correctly 1`] = `
<div
class="ant-select ant-select-auto-complete ant-select-single ant-select-customize-input ant-select-show-search"
style="width:300px"

View File

@ -1,6 +1,6 @@
// Jest Snapshot v1, https://goo.gl/fbAQLP
exports[`renders ./components/auto-complete/demo/basic.tsx correctly 1`] = `
exports[`renders components/auto-complete/demo/basic.tsx correctly 1`] = `
Array [
<div
class="ant-select ant-select-auto-complete ant-select-single ant-select-show-search"
@ -67,7 +67,7 @@ Array [
]
`;
exports[`renders ./components/auto-complete/demo/certain-category.tsx correctly 1`] = `
exports[`renders components/auto-complete/demo/certain-category.tsx correctly 1`] = `
<div
class="ant-select ant-select-auto-complete ant-select-single ant-select-customize-input ant-select-show-search"
style="width:250px"
@ -135,7 +135,7 @@ exports[`renders ./components/auto-complete/demo/certain-category.tsx correctly
</div>
`;
exports[`renders ./components/auto-complete/demo/custom.tsx correctly 1`] = `
exports[`renders components/auto-complete/demo/custom.tsx correctly 1`] = `
<div
class="ant-select ant-select-auto-complete ant-select-single ant-select-customize-input ant-select-show-search"
style="width:200px"
@ -167,7 +167,7 @@ exports[`renders ./components/auto-complete/demo/custom.tsx correctly 1`] = `
</div>
`;
exports[`renders ./components/auto-complete/demo/form-debug.tsx correctly 1`] = `
exports[`renders components/auto-complete/demo/form-debug.tsx correctly 1`] = `
<form
class="ant-form ant-form-horizontal"
style="margin:0 auto"
@ -995,7 +995,7 @@ exports[`renders ./components/auto-complete/demo/form-debug.tsx correctly 1`] =
</form>
`;
exports[`renders ./components/auto-complete/demo/non-case-sensitive.tsx correctly 1`] = `
exports[`renders components/auto-complete/demo/non-case-sensitive.tsx correctly 1`] = `
<div
class="ant-select ant-select-auto-complete ant-select-single ant-select-show-search"
style="width:200px"
@ -1028,7 +1028,7 @@ exports[`renders ./components/auto-complete/demo/non-case-sensitive.tsx correctl
</div>
`;
exports[`renders ./components/auto-complete/demo/options.tsx correctly 1`] = `
exports[`renders components/auto-complete/demo/options.tsx correctly 1`] = `
<div
class="ant-select ant-select-auto-complete ant-select-single ant-select-show-search"
style="width:200px"
@ -1061,7 +1061,7 @@ exports[`renders ./components/auto-complete/demo/options.tsx correctly 1`] = `
</div>
`;
exports[`renders ./components/auto-complete/demo/render-panel.tsx correctly 1`] = `
exports[`renders components/auto-complete/demo/render-panel.tsx correctly 1`] = `
<div
class="ant-space ant-space-vertical"
style="display:flex"
@ -1128,7 +1128,7 @@ exports[`renders ./components/auto-complete/demo/render-panel.tsx correctly 1`]
</div>
`;
exports[`renders ./components/auto-complete/demo/status.tsx correctly 1`] = `
exports[`renders components/auto-complete/demo/status.tsx correctly 1`] = `
<div
class="ant-space ant-space-vertical"
style="width:100%"
@ -1201,7 +1201,7 @@ exports[`renders ./components/auto-complete/demo/status.tsx correctly 1`] = `
</div>
`;
exports[`renders ./components/auto-complete/demo/uncertain-category.tsx correctly 1`] = `
exports[`renders components/auto-complete/demo/uncertain-category.tsx correctly 1`] = `
<div
class="ant-select ant-select-auto-complete ant-select-single ant-select-customize-input ant-select-show-search"
style="width:300px"

View File

@ -1,6 +1,6 @@
// Jest Snapshot v1, https://goo.gl/fbAQLP
exports[`renders ./components/avatar/demo/badge.tsx extend context correctly 1`] = `
exports[`renders components/avatar/demo/badge.tsx extend context correctly 1`] = `
<div
class="ant-space ant-space-horizontal ant-space-align-center"
>
@ -90,7 +90,7 @@ exports[`renders ./components/avatar/demo/badge.tsx extend context correctly 1`]
</div>
`;
exports[`renders ./components/avatar/demo/basic.tsx extend context correctly 1`] = `
exports[`renders components/avatar/demo/basic.tsx extend context correctly 1`] = `
<div
class="ant-space ant-space-vertical"
>
@ -342,7 +342,7 @@ exports[`renders ./components/avatar/demo/basic.tsx extend context correctly 1`]
</div>
`;
exports[`renders ./components/avatar/demo/dynamic.tsx extend context correctly 1`] = `
exports[`renders components/avatar/demo/dynamic.tsx extend context correctly 1`] = `
Array [
<span
class="ant-avatar ant-avatar-lg ant-avatar-circle"
@ -376,7 +376,7 @@ Array [
]
`;
exports[`renders ./components/avatar/demo/fallback.tsx extend context correctly 1`] = `
exports[`renders components/avatar/demo/fallback.tsx extend context correctly 1`] = `
<div
class="ant-space ant-space-horizontal ant-space-align-center"
>
@ -406,7 +406,7 @@ exports[`renders ./components/avatar/demo/fallback.tsx extend context correctly
</div>
`;
exports[`renders ./components/avatar/demo/group.tsx extend context correctly 1`] = `
exports[`renders components/avatar/demo/group.tsx extend context correctly 1`] = `
Array [
<div
class="ant-avatar-group"
@ -882,7 +882,7 @@ Array [
]
`;
exports[`renders ./components/avatar/demo/responsive.tsx extend context correctly 1`] = `
exports[`renders components/avatar/demo/responsive.tsx extend context correctly 1`] = `
<span
class="ant-avatar ant-avatar-circle ant-avatar-icon"
>
@ -908,7 +908,7 @@ exports[`renders ./components/avatar/demo/responsive.tsx extend context correctl
</span>
`;
exports[`renders ./components/avatar/demo/toggle-debug.tsx extend context correctly 1`] = `
exports[`renders components/avatar/demo/toggle-debug.tsx extend context correctly 1`] = `
Array [
<div
class="ant-space ant-space-horizontal ant-space-align-center"
@ -1003,7 +1003,7 @@ Array [
]
`;
exports[`renders ./components/avatar/demo/type.tsx extend context correctly 1`] = `
exports[`renders components/avatar/demo/type.tsx extend context correctly 1`] = `
<div
class="ant-space ant-space-horizontal ant-space-align-center"
style="flex-wrap:wrap;margin-bottom:-16px"

View File

@ -1,6 +1,6 @@
// Jest Snapshot v1, https://goo.gl/fbAQLP
exports[`renders ./components/avatar/demo/badge.tsx correctly 1`] = `
exports[`renders components/avatar/demo/badge.tsx correctly 1`] = `
<div
class="ant-space ant-space-horizontal ant-space-align-center"
>
@ -90,7 +90,7 @@ exports[`renders ./components/avatar/demo/badge.tsx correctly 1`] = `
</div>
`;
exports[`renders ./components/avatar/demo/basic.tsx correctly 1`] = `
exports[`renders components/avatar/demo/basic.tsx correctly 1`] = `
<div
class="ant-space ant-space-vertical"
>
@ -342,7 +342,7 @@ exports[`renders ./components/avatar/demo/basic.tsx correctly 1`] = `
</div>
`;
exports[`renders ./components/avatar/demo/dynamic.tsx correctly 1`] = `
exports[`renders components/avatar/demo/dynamic.tsx correctly 1`] = `
Array [
<span
class="ant-avatar ant-avatar-lg ant-avatar-circle"
@ -376,7 +376,7 @@ Array [
]
`;
exports[`renders ./components/avatar/demo/fallback.tsx correctly 1`] = `
exports[`renders components/avatar/demo/fallback.tsx correctly 1`] = `
<div
class="ant-space ant-space-horizontal ant-space-align-center"
>
@ -406,7 +406,7 @@ exports[`renders ./components/avatar/demo/fallback.tsx correctly 1`] = `
</div>
`;
exports[`renders ./components/avatar/demo/group.tsx correctly 1`] = `
exports[`renders components/avatar/demo/group.tsx correctly 1`] = `
Array [
<div
class="ant-avatar-group"
@ -596,7 +596,7 @@ Array [
]
`;
exports[`renders ./components/avatar/demo/responsive.tsx correctly 1`] = `
exports[`renders components/avatar/demo/responsive.tsx correctly 1`] = `
<span
class="ant-avatar ant-avatar-circle ant-avatar-icon"
>
@ -622,7 +622,7 @@ exports[`renders ./components/avatar/demo/responsive.tsx correctly 1`] = `
</span>
`;
exports[`renders ./components/avatar/demo/toggle-debug.tsx correctly 1`] = `
exports[`renders components/avatar/demo/toggle-debug.tsx correctly 1`] = `
Array [
<div
class="ant-space ant-space-horizontal ant-space-align-center"
@ -717,7 +717,7 @@ Array [
]
`;
exports[`renders ./components/avatar/demo/type.tsx correctly 1`] = `
exports[`renders components/avatar/demo/type.tsx correctly 1`] = `
<div
class="ant-space ant-space-horizontal ant-space-align-center"
style="flex-wrap:wrap;margin-bottom:-16px"

View File

@ -24,7 +24,7 @@ export interface AvatarProps {
src?: React.ReactNode;
/** Srcset of image avatar */
srcSet?: string;
draggable?: boolean;
draggable?: boolean | 'true' | 'false';
/** Icon to be used in avatar */
icon?: React.ReactNode;
style?: React.CSSProperties;

View File

@ -37,7 +37,7 @@ Avatars can be used to represent people or objects. It supports images, `Icon`s,
| size | The size of the avatar | number \| `large` \| `small` \| `default` \| { xs: number, sm: number, ...} | `default` | 4.7.0 |
| src | The address of the image for an image avatar or image element | string \| ReactNode | - | ReactNode: 4.8.0 |
| srcSet | A list of sources to use for different screen resolutions | string | - | |
| draggable | Whether the picture is allowed to be dragged | boolean \| `'true'` \| `'false'` | - | |
| draggable | Whether the picture is allowed to be dragged | boolean \| `'true'` \| `'false'` | true | |
| crossOrigin | CORS settings attributes | `'anonymous'` \| `'use-credentials'` \| `''` | - | 4.17.0 |
| onError | Handler when img load error, return false to prevent default fallback behavior | () => boolean | - | |

View File

@ -42,7 +42,7 @@ group:
| size | 设置头像的大小 | number \| `large` \| `small` \| `default` \| { xs: number, sm: number, ...} | `default` | 4.7.0 |
| src | 图片类头像的资源地址或者图片元素 | string \| ReactNode | - | ReactNode: 4.8.0 |
| srcSet | 设置图片类头像响应式资源地址 | string | - | |
| draggable | 图片是否允许拖动 | boolean \| `'true'` \| `'false'` | - | |
| draggable | 图片是否允许拖动 | boolean \| `'true'` \| `'false'` | true | |
| crossOrigin | CORS 属性设置 | `'anonymous'` \| `'use-credentials'` \| `''` | - | 4.17.0 |
| onError | 图片加载失败的事件,返回 false 会关闭组件默认的 fallback 行为 | () => boolean | - | |

View File

@ -1,6 +1,6 @@
// Jest Snapshot v1, https://goo.gl/fbAQLP
exports[`renders ./components/back-top/demo/basic.tsx extend context correctly 1`] = `
exports[`renders components/back-top/demo/basic.tsx extend context correctly 1`] = `
Array [
<div
class="ant-back-top"
@ -15,7 +15,7 @@ Array [
]
`;
exports[`renders ./components/back-top/demo/custom.tsx extend context correctly 1`] = `
exports[`renders components/back-top/demo/custom.tsx extend context correctly 1`] = `
<div
style="height:600vh;padding:8px"
>

View File

@ -1,6 +1,6 @@
// Jest Snapshot v1, https://goo.gl/fbAQLP
exports[`renders ./components/back-top/demo/basic.tsx correctly 1`] = `
exports[`renders components/back-top/demo/basic.tsx correctly 1`] = `
Array [
<div
class="ant-back-top"
@ -15,7 +15,7 @@ Array [
]
`;
exports[`renders ./components/back-top/demo/custom.tsx correctly 1`] = `
exports[`renders components/back-top/demo/custom.tsx correctly 1`] = `
<div
style="height:600vh;padding:8px"
>

View File

@ -1,6 +1,6 @@
// Jest Snapshot v1, https://goo.gl/fbAQLP
exports[`renders ./components/badge/demo/basic.tsx extend context correctly 1`] = `
exports[`renders components/badge/demo/basic.tsx extend context correctly 1`] = `
<div
class="ant-space ant-space-horizontal ant-space-align-center"
>
@ -103,7 +103,7 @@ exports[`renders ./components/badge/demo/basic.tsx extend context correctly 1`]
</div>
`;
exports[`renders ./components/badge/demo/change.tsx extend context correctly 1`] = `
exports[`renders components/badge/demo/change.tsx extend context correctly 1`] = `
<div
class="ant-space ant-space-vertical"
>
@ -291,7 +291,7 @@ exports[`renders ./components/badge/demo/change.tsx extend context correctly 1`]
</div>
`;
exports[`renders ./components/badge/demo/colorful.tsx extend context correctly 1`] = `
exports[`renders components/badge/demo/colorful.tsx extend context correctly 1`] = `
Array [
<div
class="ant-divider ant-divider-horizontal ant-divider-with-text ant-divider-with-text-left"
@ -615,7 +615,7 @@ Array [
]
`;
exports[`renders ./components/badge/demo/colorful-with-count-debug.tsx extend context correctly 1`] = `
exports[`renders components/badge/demo/colorful-with-count-debug.tsx extend context correctly 1`] = `
<div
class="ant-space ant-space-horizontal ant-space-align-center"
style="flex-wrap:wrap;margin-bottom:-16px"
@ -1143,7 +1143,7 @@ exports[`renders ./components/badge/demo/colorful-with-count-debug.tsx extend co
</div>
`;
exports[`renders ./components/badge/demo/dot.tsx extend context correctly 1`] = `
exports[`renders components/badge/demo/dot.tsx extend context correctly 1`] = `
<div
class="ant-space ant-space-horizontal ant-space-align-center"
>
@ -1200,7 +1200,7 @@ exports[`renders ./components/badge/demo/dot.tsx extend context correctly 1`] =
</div>
`;
exports[`renders ./components/badge/demo/link.tsx extend context correctly 1`] = `
exports[`renders components/badge/demo/link.tsx extend context correctly 1`] = `
<a
href="#"
>
@ -1235,7 +1235,7 @@ exports[`renders ./components/badge/demo/link.tsx extend context correctly 1`] =
</a>
`;
exports[`renders ./components/badge/demo/mix.tsx extend context correctly 1`] = `
exports[`renders components/badge/demo/mix.tsx extend context correctly 1`] = `
<div
class="ant-space ant-space-horizontal ant-space-align-center"
style="flex-wrap:wrap;margin-bottom:-16px"
@ -1578,7 +1578,7 @@ exports[`renders ./components/badge/demo/mix.tsx extend context correctly 1`] =
</div>
`;
exports[`renders ./components/badge/demo/no-wrapper.tsx extend context correctly 1`] = `
exports[`renders components/badge/demo/no-wrapper.tsx extend context correctly 1`] = `
<div
class="ant-space ant-space-horizontal ant-space-align-center"
>
@ -1729,7 +1729,7 @@ exports[`renders ./components/badge/demo/no-wrapper.tsx extend context correctly
</div>
`;
exports[`renders ./components/badge/demo/offset.tsx extend context correctly 1`] = `
exports[`renders components/badge/demo/offset.tsx extend context correctly 1`] = `
<span
class="ant-badge"
>
@ -1761,7 +1761,7 @@ exports[`renders ./components/badge/demo/offset.tsx extend context correctly 1`]
</span>
`;
exports[`renders ./components/badge/demo/overflow.tsx extend context correctly 1`] = `
exports[`renders components/badge/demo/overflow.tsx extend context correctly 1`] = `
<div
class="ant-space ant-space-horizontal ant-space-align-center"
>
@ -1882,7 +1882,7 @@ exports[`renders ./components/badge/demo/overflow.tsx extend context correctly 1
</div>
`;
exports[`renders ./components/badge/demo/ribbon.tsx extend context correctly 1`] = `
exports[`renders components/badge/demo/ribbon.tsx extend context correctly 1`] = `
<div
class="ant-space ant-space-vertical"
style="width:100%"
@ -2233,7 +2233,7 @@ exports[`renders ./components/badge/demo/ribbon.tsx extend context correctly 1`]
</div>
`;
exports[`renders ./components/badge/demo/ribbon-debug.tsx extend context correctly 1`] = `
exports[`renders components/badge/demo/ribbon-debug.tsx extend context correctly 1`] = `
<div
class="ant-space ant-space-vertical"
style="width:100%"
@ -2396,7 +2396,7 @@ exports[`renders ./components/badge/demo/ribbon-debug.tsx extend context correct
</div>
`;
exports[`renders ./components/badge/demo/size.tsx extend context correctly 1`] = `
exports[`renders components/badge/demo/size.tsx extend context correctly 1`] = `
<div
class="ant-space ant-space-horizontal ant-space-align-center"
>
@ -2468,7 +2468,7 @@ exports[`renders ./components/badge/demo/size.tsx extend context correctly 1`] =
</div>
`;
exports[`renders ./components/badge/demo/status.tsx extend context correctly 1`] = `
exports[`renders components/badge/demo/status.tsx extend context correctly 1`] = `
Array [
<div
class="ant-space ant-space-horizontal ant-space-align-center"
@ -2625,7 +2625,7 @@ Array [
]
`;
exports[`renders ./components/badge/demo/title.tsx extend context correctly 1`] = `
exports[`renders components/badge/demo/title.tsx extend context correctly 1`] = `
<div
class="ant-space ant-space-horizontal ant-space-align-center"
>

View File

@ -1,6 +1,6 @@
// Jest Snapshot v1, https://goo.gl/fbAQLP
exports[`renders ./components/badge/demo/basic.tsx correctly 1`] = `
exports[`renders components/badge/demo/basic.tsx correctly 1`] = `
<div
class="ant-space ant-space-horizontal ant-space-align-center"
>
@ -103,7 +103,7 @@ exports[`renders ./components/badge/demo/basic.tsx correctly 1`] = `
</div>
`;
exports[`renders ./components/badge/demo/change.tsx correctly 1`] = `
exports[`renders components/badge/demo/change.tsx correctly 1`] = `
<div
class="ant-space ant-space-vertical"
>
@ -291,7 +291,7 @@ exports[`renders ./components/badge/demo/change.tsx correctly 1`] = `
</div>
`;
exports[`renders ./components/badge/demo/colorful.tsx correctly 1`] = `
exports[`renders components/badge/demo/colorful.tsx correctly 1`] = `
Array [
<div
class="ant-divider ant-divider-horizontal ant-divider-with-text ant-divider-with-text-left"
@ -615,7 +615,7 @@ Array [
]
`;
exports[`renders ./components/badge/demo/colorful-with-count-debug.tsx correctly 1`] = `
exports[`renders components/badge/demo/colorful-with-count-debug.tsx correctly 1`] = `
<div
class="ant-space ant-space-horizontal ant-space-align-center"
style="flex-wrap:wrap;margin-bottom:-16px"
@ -1143,7 +1143,7 @@ exports[`renders ./components/badge/demo/colorful-with-count-debug.tsx correctly
</div>
`;
exports[`renders ./components/badge/demo/dot.tsx correctly 1`] = `
exports[`renders components/badge/demo/dot.tsx correctly 1`] = `
<div
class="ant-space ant-space-horizontal ant-space-align-center"
>
@ -1200,7 +1200,7 @@ exports[`renders ./components/badge/demo/dot.tsx correctly 1`] = `
</div>
`;
exports[`renders ./components/badge/demo/link.tsx correctly 1`] = `
exports[`renders components/badge/demo/link.tsx correctly 1`] = `
<a
href="#"
>
@ -1235,7 +1235,7 @@ exports[`renders ./components/badge/demo/link.tsx correctly 1`] = `
</a>
`;
exports[`renders ./components/badge/demo/mix.tsx correctly 1`] = `
exports[`renders components/badge/demo/mix.tsx correctly 1`] = `
<div
class="ant-space ant-space-horizontal ant-space-align-center"
style="flex-wrap:wrap;margin-bottom:-16px"
@ -1578,7 +1578,7 @@ exports[`renders ./components/badge/demo/mix.tsx correctly 1`] = `
</div>
`;
exports[`renders ./components/badge/demo/no-wrapper.tsx correctly 1`] = `
exports[`renders components/badge/demo/no-wrapper.tsx correctly 1`] = `
<div
class="ant-space ant-space-horizontal ant-space-align-center"
>
@ -1729,7 +1729,7 @@ exports[`renders ./components/badge/demo/no-wrapper.tsx correctly 1`] = `
</div>
`;
exports[`renders ./components/badge/demo/offset.tsx correctly 1`] = `
exports[`renders components/badge/demo/offset.tsx correctly 1`] = `
<span
class="ant-badge"
>
@ -1761,7 +1761,7 @@ exports[`renders ./components/badge/demo/offset.tsx correctly 1`] = `
</span>
`;
exports[`renders ./components/badge/demo/overflow.tsx correctly 1`] = `
exports[`renders components/badge/demo/overflow.tsx correctly 1`] = `
<div
class="ant-space ant-space-horizontal ant-space-align-center"
>
@ -1882,7 +1882,7 @@ exports[`renders ./components/badge/demo/overflow.tsx correctly 1`] = `
</div>
`;
exports[`renders ./components/badge/demo/ribbon.tsx correctly 1`] = `
exports[`renders components/badge/demo/ribbon.tsx correctly 1`] = `
<div
class="ant-space ant-space-vertical"
style="width:100%"
@ -2233,7 +2233,7 @@ exports[`renders ./components/badge/demo/ribbon.tsx correctly 1`] = `
</div>
`;
exports[`renders ./components/badge/demo/ribbon-debug.tsx correctly 1`] = `
exports[`renders components/badge/demo/ribbon-debug.tsx correctly 1`] = `
<div
class="ant-space ant-space-vertical"
style="width:100%"
@ -2396,7 +2396,7 @@ exports[`renders ./components/badge/demo/ribbon-debug.tsx correctly 1`] = `
</div>
`;
exports[`renders ./components/badge/demo/size.tsx correctly 1`] = `
exports[`renders components/badge/demo/size.tsx correctly 1`] = `
<div
class="ant-space ant-space-horizontal ant-space-align-center"
>
@ -2468,7 +2468,7 @@ exports[`renders ./components/badge/demo/size.tsx correctly 1`] = `
</div>
`;
exports[`renders ./components/badge/demo/status.tsx correctly 1`] = `
exports[`renders components/badge/demo/status.tsx correctly 1`] = `
Array [
<div
class="ant-space ant-space-horizontal ant-space-align-center"
@ -2625,7 +2625,7 @@ Array [
]
`;
exports[`renders ./components/badge/demo/title.tsx correctly 1`] = `
exports[`renders components/badge/demo/title.tsx correctly 1`] = `
<div
class="ant-space ant-space-horizontal ant-space-align-center"
>

View File

@ -1,6 +1,6 @@
// Jest Snapshot v1, https://goo.gl/fbAQLP
exports[`renders ./components/breadcrumb/demo/basic.tsx extend context correctly 1`] = `
exports[`renders components/breadcrumb/demo/basic.tsx extend context correctly 1`] = `
<nav
class="ant-breadcrumb"
>
@ -63,7 +63,7 @@ exports[`renders ./components/breadcrumb/demo/basic.tsx extend context correctly
</nav>
`;
exports[`renders ./components/breadcrumb/demo/debug-routes.tsx extend context correctly 1`] = `
exports[`renders components/breadcrumb/demo/debug-routes.tsx extend context correctly 1`] = `
<nav
class="ant-breadcrumb"
>
@ -234,7 +234,7 @@ exports[`renders ./components/breadcrumb/demo/debug-routes.tsx extend context co
</nav>
`;
exports[`renders ./components/breadcrumb/demo/overlay.tsx extend context correctly 1`] = `
exports[`renders components/breadcrumb/demo/overlay.tsx extend context correctly 1`] = `
<nav
class="ant-breadcrumb"
>
@ -492,7 +492,7 @@ exports[`renders ./components/breadcrumb/demo/overlay.tsx extend context correct
</nav>
`;
exports[`renders ./components/breadcrumb/demo/separator.tsx extend context correctly 1`] = `
exports[`renders components/breadcrumb/demo/separator.tsx extend context correctly 1`] = `
<nav
class="ant-breadcrumb"
>
@ -549,7 +549,7 @@ exports[`renders ./components/breadcrumb/demo/separator.tsx extend context corre
</nav>
`;
exports[`renders ./components/breadcrumb/demo/separator-component.tsx extend context correctly 1`] = `
exports[`renders components/breadcrumb/demo/separator-component.tsx extend context correctly 1`] = `
<nav
class="ant-breadcrumb"
>
@ -606,7 +606,7 @@ exports[`renders ./components/breadcrumb/demo/separator-component.tsx extend con
</nav>
`;
exports[`renders ./components/breadcrumb/demo/withIcon.tsx extend context correctly 1`] = `
exports[`renders components/breadcrumb/demo/withIcon.tsx extend context correctly 1`] = `
<nav
class="ant-breadcrumb"
>

View File

@ -1,6 +1,6 @@
// Jest Snapshot v1, https://goo.gl/fbAQLP
exports[`renders ./components/breadcrumb/demo/basic.tsx correctly 1`] = `
exports[`renders components/breadcrumb/demo/basic.tsx correctly 1`] = `
<nav
class="ant-breadcrumb"
>
@ -63,7 +63,7 @@ exports[`renders ./components/breadcrumb/demo/basic.tsx correctly 1`] = `
</nav>
`;
exports[`renders ./components/breadcrumb/demo/debug-routes.tsx correctly 1`] = `
exports[`renders components/breadcrumb/demo/debug-routes.tsx correctly 1`] = `
<nav
class="ant-breadcrumb"
>
@ -117,7 +117,7 @@ exports[`renders ./components/breadcrumb/demo/debug-routes.tsx correctly 1`] = `
</nav>
`;
exports[`renders ./components/breadcrumb/demo/overlay.tsx correctly 1`] = `
exports[`renders components/breadcrumb/demo/overlay.tsx correctly 1`] = `
<nav
class="ant-breadcrumb"
>
@ -203,7 +203,7 @@ exports[`renders ./components/breadcrumb/demo/overlay.tsx correctly 1`] = `
</nav>
`;
exports[`renders ./components/breadcrumb/demo/separator.tsx correctly 1`] = `
exports[`renders components/breadcrumb/demo/separator.tsx correctly 1`] = `
<nav
class="ant-breadcrumb"
>
@ -260,7 +260,7 @@ exports[`renders ./components/breadcrumb/demo/separator.tsx correctly 1`] = `
</nav>
`;
exports[`renders ./components/breadcrumb/demo/separator-component.tsx correctly 1`] = `
exports[`renders components/breadcrumb/demo/separator-component.tsx correctly 1`] = `
<nav
class="ant-breadcrumb"
>
@ -317,7 +317,7 @@ exports[`renders ./components/breadcrumb/demo/separator-component.tsx correctly
</nav>
`;
exports[`renders ./components/breadcrumb/demo/withIcon.tsx correctly 1`] = `
exports[`renders components/breadcrumb/demo/withIcon.tsx correctly 1`] = `
<nav
class="ant-breadcrumb"
>

View File

@ -1,6 +1,6 @@
// Jest Snapshot v1, https://goo.gl/fbAQLP
exports[`renders ./components/button/demo/basic.tsx extend context correctly 1`] = `
exports[`renders components/button/demo/basic.tsx extend context correctly 1`] = `
<div
class="ant-space ant-space-horizontal ant-space-align-center"
style="flex-wrap:wrap;margin-bottom:-8px"
@ -73,7 +73,7 @@ exports[`renders ./components/button/demo/basic.tsx extend context correctly 1`]
</div>
`;
exports[`renders ./components/button/demo/block.tsx extend context correctly 1`] = `
exports[`renders components/button/demo/block.tsx extend context correctly 1`] = `
<div
class="ant-space ant-space-vertical"
style="width:100%"
@ -159,7 +159,7 @@ exports[`renders ./components/button/demo/block.tsx extend context correctly 1`]
</div>
`;
exports[`renders ./components/button/demo/chinese-chars-loading.tsx extend context correctly 1`] = `
exports[`renders components/button/demo/chinese-chars-loading.tsx extend context correctly 1`] = `
<div
class="ant-space ant-space-horizontal ant-space-align-center"
style="flex-wrap:wrap;margin-bottom:-8px"
@ -377,7 +377,7 @@ exports[`renders ./components/button/demo/chinese-chars-loading.tsx extend conte
</div>
`;
exports[`renders ./components/button/demo/danger.tsx extend context correctly 1`] = `
exports[`renders components/button/demo/danger.tsx extend context correctly 1`] = `
<div
class="ant-space ant-space-horizontal ant-space-align-center"
style="flex-wrap:wrap;margin-bottom:-8px"
@ -450,7 +450,7 @@ exports[`renders ./components/button/demo/danger.tsx extend context correctly 1`
</div>
`;
exports[`renders ./components/button/demo/debug-block.tsx extend context correctly 1`] = `
exports[`renders components/button/demo/debug-block.tsx extend context correctly 1`] = `
<div
class="ant-form-item"
>
@ -506,7 +506,7 @@ exports[`renders ./components/button/demo/debug-block.tsx extend context correct
</div>
`;
exports[`renders ./components/button/demo/debug-icon.tsx extend context correctly 1`] = `
exports[`renders components/button/demo/debug-icon.tsx extend context correctly 1`] = `
Array [
<div
class="ant-radio-group ant-radio-group-outline"
@ -968,7 +968,7 @@ Array [
]
`;
exports[`renders ./components/button/demo/disabled.tsx extend context correctly 1`] = `
exports[`renders components/button/demo/disabled.tsx extend context correctly 1`] = `
<div
class="ant-space ant-space-vertical"
>
@ -1323,7 +1323,7 @@ exports[`renders ./components/button/demo/disabled.tsx extend context correctly
</div>
`;
exports[`renders ./components/button/demo/ghost.tsx extend context correctly 1`] = `
exports[`renders components/button/demo/ghost.tsx extend context correctly 1`] = `
<div
class="ant-space ant-space-horizontal ant-space-align-center site-button-ghost-wrapper"
style="flex-wrap:wrap;margin-bottom:-8px"
@ -1383,7 +1383,7 @@ exports[`renders ./components/button/demo/ghost.tsx extend context correctly 1`]
</div>
`;
exports[`renders ./components/button/demo/icon.tsx extend context correctly 1`] = `
exports[`renders components/button/demo/icon.tsx extend context correctly 1`] = `
<div
class="ant-space ant-space-vertical"
>
@ -1771,7 +1771,7 @@ exports[`renders ./components/button/demo/icon.tsx extend context correctly 1`]
</div>
`;
exports[`renders ./components/button/demo/legacy-group.tsx extend context correctly 1`] = `
exports[`renders components/button/demo/legacy-group.tsx extend context correctly 1`] = `
Array [
<div>
<div
@ -2123,7 +2123,7 @@ Array [
]
`;
exports[`renders ./components/button/demo/loading.tsx extend context correctly 1`] = `
exports[`renders components/button/demo/loading.tsx extend context correctly 1`] = `
<div
class="ant-space ant-space-vertical"
>
@ -2328,7 +2328,7 @@ exports[`renders ./components/button/demo/loading.tsx extend context correctly 1
</div>
`;
exports[`renders ./components/button/demo/multiple.tsx extend context correctly 1`] = `
exports[`renders components/button/demo/multiple.tsx extend context correctly 1`] = `
<div
class="ant-space ant-space-vertical"
>
@ -2555,7 +2555,7 @@ exports[`renders ./components/button/demo/multiple.tsx extend context correctly
</div>
`;
exports[`renders ./components/button/demo/size.tsx extend context correctly 1`] = `
exports[`renders components/button/demo/size.tsx extend context correctly 1`] = `
Array [
<div
class="ant-radio-group ant-radio-group-outline"

View File

@ -1,6 +1,6 @@
// Jest Snapshot v1, https://goo.gl/fbAQLP
exports[`renders ./components/button/demo/basic.tsx correctly 1`] = `
exports[`renders components/button/demo/basic.tsx correctly 1`] = `
<div
class="ant-space ant-space-horizontal ant-space-align-center"
style="flex-wrap:wrap;margin-bottom:-8px"
@ -73,7 +73,7 @@ exports[`renders ./components/button/demo/basic.tsx correctly 1`] = `
</div>
`;
exports[`renders ./components/button/demo/block.tsx correctly 1`] = `
exports[`renders components/button/demo/block.tsx correctly 1`] = `
<div
class="ant-space ant-space-vertical"
style="width:100%"
@ -159,7 +159,7 @@ exports[`renders ./components/button/demo/block.tsx correctly 1`] = `
</div>
`;
exports[`renders ./components/button/demo/chinese-chars-loading.tsx correctly 1`] = `
exports[`renders components/button/demo/chinese-chars-loading.tsx correctly 1`] = `
<div
class="ant-space ant-space-horizontal ant-space-align-center"
style="flex-wrap:wrap;margin-bottom:-8px"
@ -377,7 +377,7 @@ exports[`renders ./components/button/demo/chinese-chars-loading.tsx correctly 1`
</div>
`;
exports[`renders ./components/button/demo/danger.tsx correctly 1`] = `
exports[`renders components/button/demo/danger.tsx correctly 1`] = `
<div
class="ant-space ant-space-horizontal ant-space-align-center"
style="flex-wrap:wrap;margin-bottom:-8px"
@ -450,7 +450,7 @@ exports[`renders ./components/button/demo/danger.tsx correctly 1`] = `
</div>
`;
exports[`renders ./components/button/demo/debug-block.tsx correctly 1`] = `
exports[`renders components/button/demo/debug-block.tsx correctly 1`] = `
<div
class="ant-form-item"
>
@ -506,7 +506,7 @@ exports[`renders ./components/button/demo/debug-block.tsx correctly 1`] = `
</div>
`;
exports[`renders ./components/button/demo/debug-icon.tsx correctly 1`] = `
exports[`renders components/button/demo/debug-icon.tsx correctly 1`] = `
Array [
<div
class="ant-radio-group ant-radio-group-outline"
@ -892,7 +892,7 @@ Array [
]
`;
exports[`renders ./components/button/demo/disabled.tsx correctly 1`] = `
exports[`renders components/button/demo/disabled.tsx correctly 1`] = `
<div
class="ant-space ant-space-vertical"
>
@ -1247,7 +1247,7 @@ exports[`renders ./components/button/demo/disabled.tsx correctly 1`] = `
</div>
`;
exports[`renders ./components/button/demo/ghost.tsx correctly 1`] = `
exports[`renders components/button/demo/ghost.tsx correctly 1`] = `
<div
class="ant-space ant-space-horizontal ant-space-align-center site-button-ghost-wrapper"
style="flex-wrap:wrap;margin-bottom:-8px"
@ -1307,7 +1307,7 @@ exports[`renders ./components/button/demo/ghost.tsx correctly 1`] = `
</div>
`;
exports[`renders ./components/button/demo/icon.tsx correctly 1`] = `
exports[`renders components/button/demo/icon.tsx correctly 1`] = `
<div
class="ant-space ant-space-vertical"
>
@ -1619,7 +1619,7 @@ exports[`renders ./components/button/demo/icon.tsx correctly 1`] = `
</div>
`;
exports[`renders ./components/button/demo/legacy-group.tsx correctly 1`] = `
exports[`renders components/button/demo/legacy-group.tsx correctly 1`] = `
Array [
<div>
<div
@ -1857,7 +1857,7 @@ Array [
]
`;
exports[`renders ./components/button/demo/loading.tsx correctly 1`] = `
exports[`renders components/button/demo/loading.tsx correctly 1`] = `
<div
class="ant-space ant-space-vertical"
>
@ -2062,7 +2062,7 @@ exports[`renders ./components/button/demo/loading.tsx correctly 1`] = `
</div>
`;
exports[`renders ./components/button/demo/multiple.tsx correctly 1`] = `
exports[`renders components/button/demo/multiple.tsx correctly 1`] = `
<div
class="ant-space ant-space-vertical"
>
@ -2135,7 +2135,7 @@ exports[`renders ./components/button/demo/multiple.tsx correctly 1`] = `
</div>
`;
exports[`renders ./components/button/demo/size.tsx correctly 1`] = `
exports[`renders components/button/demo/size.tsx correctly 1`] = `
Array [
<div
class="ant-radio-group ant-radio-group-outline"

View File

@ -1,6 +1,6 @@
// Jest Snapshot v1, https://goo.gl/fbAQLP
exports[`renders ./components/calendar/demo/basic.tsx extend context correctly 1`] = `
exports[`renders components/calendar/demo/basic.tsx extend context correctly 1`] = `
<div
class="ant-picker-calendar ant-picker-calendar-full"
>
@ -1578,7 +1578,7 @@ exports[`renders ./components/calendar/demo/basic.tsx extend context correctly 1
</div>
`;
exports[`renders ./components/calendar/demo/card.tsx extend context correctly 1`] = `
exports[`renders components/calendar/demo/card.tsx extend context correctly 1`] = `
<div
style="width:300px;border:1px solid #f0f0f0;border-radius:8px"
>
@ -3160,7 +3160,7 @@ exports[`renders ./components/calendar/demo/card.tsx extend context correctly 1`
</div>
`;
exports[`renders ./components/calendar/demo/customize-header.tsx extend context correctly 1`] = `
exports[`renders components/calendar/demo/customize-header.tsx extend context correctly 1`] = `
<div
style="width:300px;border:1px solid #f0f0f0;border-radius:8px"
>
@ -4791,7 +4791,7 @@ exports[`renders ./components/calendar/demo/customize-header.tsx extend context
</div>
`;
exports[`renders ./components/calendar/demo/notice-calendar.tsx extend context correctly 1`] = `
exports[`renders components/calendar/demo/notice-calendar.tsx extend context correctly 1`] = `
<div
class="ant-picker-calendar ant-picker-calendar-full"
>
@ -6766,7 +6766,7 @@ exports[`renders ./components/calendar/demo/notice-calendar.tsx extend context c
</div>
`;
exports[`renders ./components/calendar/demo/select.tsx extend context correctly 1`] = `
exports[`renders components/calendar/demo/select.tsx extend context correctly 1`] = `
Array [
<div
class="ant-alert ant-alert-info ant-alert-no-icon"

View File

@ -1,6 +1,6 @@
// Jest Snapshot v1, https://goo.gl/fbAQLP
exports[`renders ./components/calendar/demo/basic.tsx correctly 1`] = `
exports[`renders components/calendar/demo/basic.tsx correctly 1`] = `
<div
class="ant-picker-calendar ant-picker-calendar-full"
>
@ -942,7 +942,7 @@ exports[`renders ./components/calendar/demo/basic.tsx correctly 1`] = `
</div>
`;
exports[`renders ./components/calendar/demo/card.tsx correctly 1`] = `
exports[`renders components/calendar/demo/card.tsx correctly 1`] = `
<div
style="width:300px;border:1px solid #f0f0f0;border-radius:8px"
>
@ -1888,7 +1888,7 @@ exports[`renders ./components/calendar/demo/card.tsx correctly 1`] = `
</div>
`;
exports[`renders ./components/calendar/demo/customize-header.tsx correctly 1`] = `
exports[`renders components/calendar/demo/customize-header.tsx correctly 1`] = `
<div
style="width:300px;border:1px solid #f0f0f0;border-radius:8px"
>
@ -2859,7 +2859,7 @@ exports[`renders ./components/calendar/demo/customize-header.tsx correctly 1`] =
</div>
`;
exports[`renders ./components/calendar/demo/notice-calendar.tsx correctly 1`] = `
exports[`renders components/calendar/demo/notice-calendar.tsx correctly 1`] = `
<div
class="ant-picker-calendar ant-picker-calendar-full"
>
@ -4198,7 +4198,7 @@ exports[`renders ./components/calendar/demo/notice-calendar.tsx correctly 1`] =
</div>
`;
exports[`renders ./components/calendar/demo/select.tsx correctly 1`] = `
exports[`renders components/calendar/demo/select.tsx correctly 1`] = `
Array [
<div
class="ant-alert ant-alert-info ant-alert-no-icon"

View File

@ -1,6 +1,6 @@
// Jest Snapshot v1, https://goo.gl/fbAQLP
exports[`renders ./components/card/demo/basic.tsx extend context correctly 1`] = `
exports[`renders components/card/demo/basic.tsx extend context correctly 1`] = `
<div
class="ant-space ant-space-vertical"
>
@ -96,7 +96,7 @@ exports[`renders ./components/card/demo/basic.tsx extend context correctly 1`] =
</div>
`;
exports[`renders ./components/card/demo/border-less.tsx extend context correctly 1`] = `
exports[`renders components/card/demo/border-less.tsx extend context correctly 1`] = `
<div
class="ant-card"
style="width:300px"
@ -130,7 +130,7 @@ exports[`renders ./components/card/demo/border-less.tsx extend context correctly
</div>
`;
exports[`renders ./components/card/demo/flexible-content.tsx extend context correctly 1`] = `
exports[`renders components/card/demo/flexible-content.tsx extend context correctly 1`] = `
<div
class="ant-card ant-card-bordered ant-card-hoverable"
style="width:240px"
@ -168,7 +168,7 @@ exports[`renders ./components/card/demo/flexible-content.tsx extend context corr
</div>
`;
exports[`renders ./components/card/demo/grid-card.tsx extend context correctly 1`] = `
exports[`renders components/card/demo/grid-card.tsx extend context correctly 1`] = `
<div
class="ant-card ant-card-bordered ant-card-contain-grid"
>
@ -234,7 +234,7 @@ exports[`renders ./components/card/demo/grid-card.tsx extend context correctly 1
</div>
`;
exports[`renders ./components/card/demo/in-column.tsx extend context correctly 1`] = `
exports[`renders components/card/demo/in-column.tsx extend context correctly 1`] = `
<div
class="ant-row"
style="margin-left:-8px;margin-right:-8px"
@ -323,7 +323,7 @@ exports[`renders ./components/card/demo/in-column.tsx extend context correctly 1
</div>
`;
exports[`renders ./components/card/demo/inner.tsx extend context correctly 1`] = `
exports[`renders components/card/demo/inner.tsx extend context correctly 1`] = `
<div
class="ant-card ant-card-bordered"
>
@ -410,7 +410,7 @@ exports[`renders ./components/card/demo/inner.tsx extend context correctly 1`] =
</div>
`;
exports[`renders ./components/card/demo/loading.tsx extend context correctly 1`] = `
exports[`renders components/card/demo/loading.tsx extend context correctly 1`] = `
Array [
<button
aria-checked="false"
@ -575,7 +575,7 @@ Array [
]
`;
exports[`renders ./components/card/demo/meta.tsx extend context correctly 1`] = `
exports[`renders components/card/demo/meta.tsx extend context correctly 1`] = `
<div
class="ant-card ant-card-bordered"
style="width:300px"
@ -703,7 +703,7 @@ exports[`renders ./components/card/demo/meta.tsx extend context correctly 1`] =
</div>
`;
exports[`renders ./components/card/demo/simple.tsx extend context correctly 1`] = `
exports[`renders components/card/demo/simple.tsx extend context correctly 1`] = `
<div
class="ant-card ant-card-bordered"
style="width:300px"
@ -724,7 +724,7 @@ exports[`renders ./components/card/demo/simple.tsx extend context correctly 1`]
</div>
`;
exports[`renders ./components/card/demo/tabs.tsx extend context correctly 1`] = `
exports[`renders components/card/demo/tabs.tsx extend context correctly 1`] = `
Array [
<div
class="ant-card ant-card-bordered ant-card-contain-tabs"

View File

@ -1,6 +1,6 @@
// Jest Snapshot v1, https://goo.gl/fbAQLP
exports[`renders ./components/card/demo/basic.tsx correctly 1`] = `
exports[`renders components/card/demo/basic.tsx correctly 1`] = `
<div
class="ant-space ant-space-vertical"
>
@ -96,7 +96,7 @@ exports[`renders ./components/card/demo/basic.tsx correctly 1`] = `
</div>
`;
exports[`renders ./components/card/demo/border-less.tsx correctly 1`] = `
exports[`renders components/card/demo/border-less.tsx correctly 1`] = `
<div
class="ant-card"
style="width:300px"
@ -130,7 +130,7 @@ exports[`renders ./components/card/demo/border-less.tsx correctly 1`] = `
</div>
`;
exports[`renders ./components/card/demo/flexible-content.tsx correctly 1`] = `
exports[`renders components/card/demo/flexible-content.tsx correctly 1`] = `
<div
class="ant-card ant-card-bordered ant-card-hoverable"
style="width:240px"
@ -168,7 +168,7 @@ exports[`renders ./components/card/demo/flexible-content.tsx correctly 1`] = `
</div>
`;
exports[`renders ./components/card/demo/grid-card.tsx correctly 1`] = `
exports[`renders components/card/demo/grid-card.tsx correctly 1`] = `
<div
class="ant-card ant-card-bordered ant-card-contain-grid"
>
@ -234,7 +234,7 @@ exports[`renders ./components/card/demo/grid-card.tsx correctly 1`] = `
</div>
`;
exports[`renders ./components/card/demo/in-column.tsx correctly 1`] = `
exports[`renders components/card/demo/in-column.tsx correctly 1`] = `
<div
class="ant-row"
style="margin-left:-8px;margin-right:-8px"
@ -323,7 +323,7 @@ exports[`renders ./components/card/demo/in-column.tsx correctly 1`] = `
</div>
`;
exports[`renders ./components/card/demo/inner.tsx correctly 1`] = `
exports[`renders components/card/demo/inner.tsx correctly 1`] = `
<div
class="ant-card ant-card-bordered"
>
@ -410,7 +410,7 @@ exports[`renders ./components/card/demo/inner.tsx correctly 1`] = `
</div>
`;
exports[`renders ./components/card/demo/loading.tsx correctly 1`] = `
exports[`renders components/card/demo/loading.tsx correctly 1`] = `
Array [
<button
aria-checked="false"
@ -575,7 +575,7 @@ Array [
]
`;
exports[`renders ./components/card/demo/meta.tsx correctly 1`] = `
exports[`renders components/card/demo/meta.tsx correctly 1`] = `
<div
class="ant-card ant-card-bordered"
style="width:300px"
@ -703,7 +703,7 @@ exports[`renders ./components/card/demo/meta.tsx correctly 1`] = `
</div>
`;
exports[`renders ./components/card/demo/simple.tsx correctly 1`] = `
exports[`renders components/card/demo/simple.tsx correctly 1`] = `
<div
class="ant-card ant-card-bordered"
style="width:300px"
@ -724,7 +724,7 @@ exports[`renders ./components/card/demo/simple.tsx correctly 1`] = `
</div>
`;
exports[`renders ./components/card/demo/tabs.tsx correctly 1`] = `
exports[`renders components/card/demo/tabs.tsx correctly 1`] = `
Array [
<div
class="ant-card ant-card-bordered ant-card-contain-tabs"

View File

@ -1,6 +1,6 @@
// Jest Snapshot v1, https://goo.gl/fbAQLP
exports[`renders ./components/carousel/demo/autoplay.tsx extend context correctly 1`] = `
exports[`renders components/carousel/demo/autoplay.tsx extend context correctly 1`] = `
<div
class="ant-carousel"
>
@ -234,7 +234,7 @@ exports[`renders ./components/carousel/demo/autoplay.tsx extend context correctl
</div>
`;
exports[`renders ./components/carousel/demo/basic.tsx extend context correctly 1`] = `
exports[`renders components/carousel/demo/basic.tsx extend context correctly 1`] = `
<div
class="ant-carousel"
>
@ -468,7 +468,7 @@ exports[`renders ./components/carousel/demo/basic.tsx extend context correctly 1
</div>
`;
exports[`renders ./components/carousel/demo/fade.tsx extend context correctly 1`] = `
exports[`renders components/carousel/demo/fade.tsx extend context correctly 1`] = `
<div
class="ant-carousel"
>
@ -602,7 +602,7 @@ exports[`renders ./components/carousel/demo/fade.tsx extend context correctly 1`
</div>
`;
exports[`renders ./components/carousel/demo/position.tsx extend context correctly 1`] = `
exports[`renders components/carousel/demo/position.tsx extend context correctly 1`] = `
Array [
<div
class="ant-radio-group ant-radio-group-outline"

View File

@ -1,6 +1,6 @@
// Jest Snapshot v1, https://goo.gl/fbAQLP
exports[`renders ./components/carousel/demo/autoplay.tsx correctly 1`] = `
exports[`renders components/carousel/demo/autoplay.tsx correctly 1`] = `
<div
class="ant-carousel"
>
@ -234,7 +234,7 @@ exports[`renders ./components/carousel/demo/autoplay.tsx correctly 1`] = `
</div>
`;
exports[`renders ./components/carousel/demo/basic.tsx correctly 1`] = `
exports[`renders components/carousel/demo/basic.tsx correctly 1`] = `
<div
class="ant-carousel"
>
@ -468,7 +468,7 @@ exports[`renders ./components/carousel/demo/basic.tsx correctly 1`] = `
</div>
`;
exports[`renders ./components/carousel/demo/fade.tsx correctly 1`] = `
exports[`renders components/carousel/demo/fade.tsx correctly 1`] = `
<div
class="ant-carousel"
>
@ -602,7 +602,7 @@ exports[`renders ./components/carousel/demo/fade.tsx correctly 1`] = `
</div>
`;
exports[`renders ./components/carousel/demo/position.tsx correctly 1`] = `
exports[`renders components/carousel/demo/position.tsx correctly 1`] = `
Array [
<div
class="ant-radio-group ant-radio-group-outline"

View File

@ -1,6 +1,6 @@
// Jest Snapshot v1, https://goo.gl/fbAQLP
exports[`renders ./components/cascader/demo/basic.tsx extend context correctly 1`] = `
exports[`renders components/cascader/demo/basic.tsx extend context correctly 1`] = `
<div
class="ant-select ant-cascader ant-select-single ant-select-allow-clear ant-select-show-arrow"
>
@ -148,7 +148,7 @@ exports[`renders ./components/cascader/demo/basic.tsx extend context correctly 1
</div>
`;
exports[`renders ./components/cascader/demo/change-on-select.tsx extend context correctly 1`] = `
exports[`renders components/cascader/demo/change-on-select.tsx extend context correctly 1`] = `
<div
class="ant-select ant-cascader ant-select-single ant-select-allow-clear ant-select-show-arrow"
>
@ -294,7 +294,7 @@ exports[`renders ./components/cascader/demo/change-on-select.tsx extend context
</div>
`;
exports[`renders ./components/cascader/demo/custom-dropdown.tsx extend context correctly 1`] = `
exports[`renders components/cascader/demo/custom-dropdown.tsx extend context correctly 1`] = `
<div
class="ant-select ant-cascader ant-select-single ant-select-allow-clear ant-select-show-arrow"
>
@ -454,7 +454,7 @@ exports[`renders ./components/cascader/demo/custom-dropdown.tsx extend context c
</div>
`;
exports[`renders ./components/cascader/demo/custom-render.tsx extend context correctly 1`] = `
exports[`renders components/cascader/demo/custom-render.tsx extend context correctly 1`] = `
<div
class="ant-select ant-cascader ant-select-single ant-select-allow-clear ant-select-show-arrow"
style="width:100%"
@ -647,7 +647,7 @@ exports[`renders ./components/cascader/demo/custom-render.tsx extend context cor
</div>
`;
exports[`renders ./components/cascader/demo/custom-trigger.tsx extend context correctly 1`] = `
exports[`renders components/cascader/demo/custom-trigger.tsx extend context correctly 1`] = `
<span>
Unselect
<!-- -->
@ -747,7 +747,7 @@ exports[`renders ./components/cascader/demo/custom-trigger.tsx extend context co
</span>
`;
exports[`renders ./components/cascader/demo/default-value.tsx extend context correctly 1`] = `
exports[`renders components/cascader/demo/default-value.tsx extend context correctly 1`] = `
<div
class="ant-select ant-cascader ant-select-single ant-select-allow-clear ant-select-show-arrow"
>
@ -922,7 +922,7 @@ exports[`renders ./components/cascader/demo/default-value.tsx extend context cor
</div>
`;
exports[`renders ./components/cascader/demo/disabled-option.tsx extend context correctly 1`] = `
exports[`renders components/cascader/demo/disabled-option.tsx extend context correctly 1`] = `
<div
class="ant-select ant-cascader ant-select-single ant-select-allow-clear ant-select-show-arrow"
>
@ -1068,7 +1068,7 @@ exports[`renders ./components/cascader/demo/disabled-option.tsx extend context c
</div>
`;
exports[`renders ./components/cascader/demo/fields-name.tsx extend context correctly 1`] = `
exports[`renders components/cascader/demo/fields-name.tsx extend context correctly 1`] = `
<div
class="ant-select ant-cascader ant-select-single ant-select-allow-clear ant-select-show-arrow"
>
@ -1216,7 +1216,7 @@ exports[`renders ./components/cascader/demo/fields-name.tsx extend context corre
</div>
`;
exports[`renders ./components/cascader/demo/hover.tsx extend context correctly 1`] = `
exports[`renders components/cascader/demo/hover.tsx extend context correctly 1`] = `
<div
class="ant-select ant-cascader ant-select-single ant-select-allow-clear ant-select-show-arrow"
>
@ -1362,7 +1362,7 @@ exports[`renders ./components/cascader/demo/hover.tsx extend context correctly 1
</div>
`;
exports[`renders ./components/cascader/demo/lazy.tsx extend context correctly 1`] = `
exports[`renders components/cascader/demo/lazy.tsx extend context correctly 1`] = `
<div
class="ant-select ant-cascader ant-select-single ant-select-allow-clear ant-select-show-arrow"
>
@ -1508,7 +1508,7 @@ exports[`renders ./components/cascader/demo/lazy.tsx extend context correctly 1`
</div>
`;
exports[`renders ./components/cascader/demo/multiple.tsx extend context correctly 1`] = `
exports[`renders components/cascader/demo/multiple.tsx extend context correctly 1`] = `
<div
class="ant-select ant-cascader ant-select-multiple ant-select-allow-clear ant-select-show-arrow"
style="width:100%"
@ -1684,7 +1684,7 @@ exports[`renders ./components/cascader/demo/multiple.tsx extend context correctl
</div>
`;
exports[`renders ./components/cascader/demo/placement.tsx extend context correctly 1`] = `
exports[`renders components/cascader/demo/placement.tsx extend context correctly 1`] = `
Array [
<div
class="ant-radio-group ant-radio-group-outline"
@ -1917,7 +1917,7 @@ Array [
]
`;
exports[`renders ./components/cascader/demo/render-panel.tsx extend context correctly 1`] = `
exports[`renders components/cascader/demo/render-panel.tsx extend context correctly 1`] = `
<div
style="padding-bottom:0;position:relative;width:fit-content;min-width:0"
>
@ -2071,7 +2071,7 @@ exports[`renders ./components/cascader/demo/render-panel.tsx extend context corr
</div>
`;
exports[`renders ./components/cascader/demo/search.tsx extend context correctly 1`] = `
exports[`renders components/cascader/demo/search.tsx extend context correctly 1`] = `
<div
class="ant-select ant-cascader ant-select-single ant-select-allow-clear ant-select-show-arrow ant-select-show-search"
>
@ -2216,7 +2216,7 @@ exports[`renders ./components/cascader/demo/search.tsx extend context correctly
</div>
`;
exports[`renders ./components/cascader/demo/showCheckedStrategy.tsx extend context correctly 1`] = `
exports[`renders components/cascader/demo/showCheckedStrategy.tsx extend context correctly 1`] = `
Array [
<div
class="ant-select ant-cascader ant-select-multiple ant-select-allow-clear ant-select-show-arrow"
@ -2647,7 +2647,7 @@ Array [
]
`;
exports[`renders ./components/cascader/demo/size.tsx extend context correctly 1`] = `
exports[`renders components/cascader/demo/size.tsx extend context correctly 1`] = `
Array [
<div
class="ant-select ant-cascader ant-select-lg ant-select-single ant-select-allow-clear ant-select-show-arrow"
@ -3087,7 +3087,7 @@ Array [
]
`;
exports[`renders ./components/cascader/demo/status.tsx extend context correctly 1`] = `
exports[`renders components/cascader/demo/status.tsx extend context correctly 1`] = `
<div
class="ant-space ant-space-vertical"
>
@ -3376,7 +3376,7 @@ exports[`renders ./components/cascader/demo/status.tsx extend context correctly
</div>
`;
exports[`renders ./components/cascader/demo/suffix.tsx extend context correctly 1`] = `
exports[`renders components/cascader/demo/suffix.tsx extend context correctly 1`] = `
Array [
<div
class="ant-select ant-cascader ant-select-single ant-select-allow-clear ant-select-show-arrow"

View File

@ -1,6 +1,6 @@
// Jest Snapshot v1, https://goo.gl/fbAQLP
exports[`renders ./components/cascader/demo/basic.tsx correctly 1`] = `
exports[`renders components/cascader/demo/basic.tsx correctly 1`] = `
<div
class="ant-select ant-cascader ant-select-single ant-select-allow-clear ant-select-show-arrow"
>
@ -60,7 +60,7 @@ exports[`renders ./components/cascader/demo/basic.tsx correctly 1`] = `
</div>
`;
exports[`renders ./components/cascader/demo/change-on-select.tsx correctly 1`] = `
exports[`renders components/cascader/demo/change-on-select.tsx correctly 1`] = `
<div
class="ant-select ant-cascader ant-select-single ant-select-allow-clear ant-select-show-arrow"
>
@ -118,7 +118,7 @@ exports[`renders ./components/cascader/demo/change-on-select.tsx correctly 1`] =
</div>
`;
exports[`renders ./components/cascader/demo/custom-dropdown.tsx correctly 1`] = `
exports[`renders components/cascader/demo/custom-dropdown.tsx correctly 1`] = `
<div
class="ant-select ant-cascader ant-select-single ant-select-allow-clear ant-select-show-arrow"
>
@ -178,7 +178,7 @@ exports[`renders ./components/cascader/demo/custom-dropdown.tsx correctly 1`] =
</div>
`;
exports[`renders ./components/cascader/demo/custom-render.tsx correctly 1`] = `
exports[`renders components/cascader/demo/custom-render.tsx correctly 1`] = `
<div
class="ant-select ant-cascader ant-select-single ant-select-allow-clear ant-select-show-arrow"
style="width:100%"
@ -283,7 +283,7 @@ exports[`renders ./components/cascader/demo/custom-render.tsx correctly 1`] = `
</div>
`;
exports[`renders ./components/cascader/demo/custom-trigger.tsx correctly 1`] = `
exports[`renders components/cascader/demo/custom-trigger.tsx correctly 1`] = `
<span>
Unselect
<!-- -->
@ -295,7 +295,7 @@ exports[`renders ./components/cascader/demo/custom-trigger.tsx correctly 1`] = `
</span>
`;
exports[`renders ./components/cascader/demo/default-value.tsx correctly 1`] = `
exports[`renders components/cascader/demo/default-value.tsx correctly 1`] = `
<div
class="ant-select ant-cascader ant-select-single ant-select-allow-clear ant-select-show-arrow"
>
@ -382,7 +382,7 @@ exports[`renders ./components/cascader/demo/default-value.tsx correctly 1`] = `
</div>
`;
exports[`renders ./components/cascader/demo/disabled-option.tsx correctly 1`] = `
exports[`renders components/cascader/demo/disabled-option.tsx correctly 1`] = `
<div
class="ant-select ant-cascader ant-select-single ant-select-allow-clear ant-select-show-arrow"
>
@ -440,7 +440,7 @@ exports[`renders ./components/cascader/demo/disabled-option.tsx correctly 1`] =
</div>
`;
exports[`renders ./components/cascader/demo/fields-name.tsx correctly 1`] = `
exports[`renders components/cascader/demo/fields-name.tsx correctly 1`] = `
<div
class="ant-select ant-cascader ant-select-single ant-select-allow-clear ant-select-show-arrow"
>
@ -500,7 +500,7 @@ exports[`renders ./components/cascader/demo/fields-name.tsx correctly 1`] = `
</div>
`;
exports[`renders ./components/cascader/demo/hover.tsx correctly 1`] = `
exports[`renders components/cascader/demo/hover.tsx correctly 1`] = `
<div
class="ant-select ant-cascader ant-select-single ant-select-allow-clear ant-select-show-arrow"
>
@ -558,7 +558,7 @@ exports[`renders ./components/cascader/demo/hover.tsx correctly 1`] = `
</div>
`;
exports[`renders ./components/cascader/demo/lazy.tsx correctly 1`] = `
exports[`renders components/cascader/demo/lazy.tsx correctly 1`] = `
<div
class="ant-select ant-cascader ant-select-single ant-select-allow-clear ant-select-show-arrow"
>
@ -616,7 +616,7 @@ exports[`renders ./components/cascader/demo/lazy.tsx correctly 1`] = `
</div>
`;
exports[`renders ./components/cascader/demo/multiple.tsx correctly 1`] = `
exports[`renders components/cascader/demo/multiple.tsx correctly 1`] = `
<div
class="ant-select ant-cascader ant-select-multiple ant-select-allow-clear ant-select-show-arrow"
style="width:100%"
@ -690,7 +690,7 @@ exports[`renders ./components/cascader/demo/multiple.tsx correctly 1`] = `
</div>
`;
exports[`renders ./components/cascader/demo/placement.tsx correctly 1`] = `
exports[`renders components/cascader/demo/placement.tsx correctly 1`] = `
Array [
<div
class="ant-radio-group ant-radio-group-outline"
@ -835,7 +835,7 @@ Array [
]
`;
exports[`renders ./components/cascader/demo/render-panel.tsx correctly 1`] = `
exports[`renders components/cascader/demo/render-panel.tsx correctly 1`] = `
<div
style="padding-bottom:0;position:relative;width:fit-content;min-width:0"
>
@ -901,7 +901,7 @@ exports[`renders ./components/cascader/demo/render-panel.tsx correctly 1`] = `
</div>
`;
exports[`renders ./components/cascader/demo/search.tsx correctly 1`] = `
exports[`renders components/cascader/demo/search.tsx correctly 1`] = `
<div
class="ant-select ant-cascader ant-select-single ant-select-allow-clear ant-select-show-arrow ant-select-show-search"
>
@ -958,7 +958,7 @@ exports[`renders ./components/cascader/demo/search.tsx correctly 1`] = `
</div>
`;
exports[`renders ./components/cascader/demo/showCheckedStrategy.tsx correctly 1`] = `
exports[`renders components/cascader/demo/showCheckedStrategy.tsx correctly 1`] = `
Array [
<div
class="ant-select ant-cascader ant-select-multiple ant-select-allow-clear ant-select-show-arrow"
@ -1185,7 +1185,7 @@ Array [
]
`;
exports[`renders ./components/cascader/demo/size.tsx correctly 1`] = `
exports[`renders components/cascader/demo/size.tsx correctly 1`] = `
Array [
<div
class="ant-select ant-cascader ant-select-lg ant-select-single ant-select-allow-clear ant-select-show-arrow"
@ -1361,7 +1361,7 @@ Array [
]
`;
exports[`renders ./components/cascader/demo/status.tsx correctly 1`] = `
exports[`renders components/cascader/demo/status.tsx correctly 1`] = `
<div
class="ant-space ant-space-vertical"
>
@ -1506,7 +1506,7 @@ exports[`renders ./components/cascader/demo/status.tsx correctly 1`] = `
</div>
`;
exports[`renders ./components/cascader/demo/suffix.tsx correctly 1`] = `
exports[`renders components/cascader/demo/suffix.tsx correctly 1`] = `
Array [
<div
class="ant-select ant-cascader ant-select-single ant-select-allow-clear ant-select-show-arrow"

View File

@ -1,6 +1,6 @@
// Jest Snapshot v1, https://goo.gl/fbAQLP
exports[`renders ./components/checkbox/demo/basic.tsx extend context correctly 1`] = `
exports[`renders components/checkbox/demo/basic.tsx extend context correctly 1`] = `
<label
class="ant-checkbox-wrapper"
>
@ -21,7 +21,7 @@ exports[`renders ./components/checkbox/demo/basic.tsx extend context correctly 1
</label>
`;
exports[`renders ./components/checkbox/demo/check-all.tsx extend context correctly 1`] = `
exports[`renders components/checkbox/demo/check-all.tsx extend context correctly 1`] = `
Array [
<label
class="ant-checkbox-wrapper"
@ -112,7 +112,7 @@ Array [
]
`;
exports[`renders ./components/checkbox/demo/controller.tsx extend context correctly 1`] = `
exports[`renders components/checkbox/demo/controller.tsx extend context correctly 1`] = `
Array [
<p
style="margin-bottom:20px"
@ -159,7 +159,7 @@ Array [
]
`;
exports[`renders ./components/checkbox/demo/debug-disable-popover.tsx extend context correctly 1`] = `
exports[`renders components/checkbox/demo/debug-disable-popover.tsx extend context correctly 1`] = `
<div
style="padding:56px"
>
@ -206,7 +206,7 @@ exports[`renders ./components/checkbox/demo/debug-disable-popover.tsx extend con
</div>
`;
exports[`renders ./components/checkbox/demo/debug-line.tsx extend context correctly 1`] = `
exports[`renders components/checkbox/demo/debug-line.tsx extend context correctly 1`] = `
<div>
<div
class="ant-space ant-space-horizontal ant-space-align-center"
@ -409,7 +409,7 @@ exports[`renders ./components/checkbox/demo/debug-line.tsx extend context correc
</div>
`;
exports[`renders ./components/checkbox/demo/disabled.tsx extend context correctly 1`] = `
exports[`renders components/checkbox/demo/disabled.tsx extend context correctly 1`] = `
Array [
<label
class="ant-checkbox-wrapper ant-checkbox-wrapper-disabled"
@ -466,7 +466,7 @@ Array [
]
`;
exports[`renders ./components/checkbox/demo/group.tsx extend context correctly 1`] = `
exports[`renders components/checkbox/demo/group.tsx extend context correctly 1`] = `
Array [
<div
class="ant-checkbox-group"
@ -664,7 +664,7 @@ Array [
]
`;
exports[`renders ./components/checkbox/demo/layout.tsx extend context correctly 1`] = `
exports[`renders components/checkbox/demo/layout.tsx extend context correctly 1`] = `
<div
class="ant-checkbox-group"
style="width:100%"

View File

@ -1,6 +1,6 @@
// Jest Snapshot v1, https://goo.gl/fbAQLP
exports[`renders ./components/checkbox/demo/basic.tsx correctly 1`] = `
exports[`renders components/checkbox/demo/basic.tsx correctly 1`] = `
<label
class="ant-checkbox-wrapper"
>
@ -21,7 +21,7 @@ exports[`renders ./components/checkbox/demo/basic.tsx correctly 1`] = `
</label>
`;
exports[`renders ./components/checkbox/demo/check-all.tsx correctly 1`] = `
exports[`renders components/checkbox/demo/check-all.tsx correctly 1`] = `
Array [
<label
class="ant-checkbox-wrapper"
@ -112,7 +112,7 @@ Array [
]
`;
exports[`renders ./components/checkbox/demo/controller.tsx correctly 1`] = `
exports[`renders components/checkbox/demo/controller.tsx correctly 1`] = `
Array [
<p
style="margin-bottom:20px"
@ -159,7 +159,7 @@ Array [
]
`;
exports[`renders ./components/checkbox/demo/debug-disable-popover.tsx correctly 1`] = `
exports[`renders components/checkbox/demo/debug-disable-popover.tsx correctly 1`] = `
<div
style="padding:56px"
>
@ -183,7 +183,7 @@ exports[`renders ./components/checkbox/demo/debug-disable-popover.tsx correctly
</div>
`;
exports[`renders ./components/checkbox/demo/debug-line.tsx correctly 1`] = `
exports[`renders components/checkbox/demo/debug-line.tsx correctly 1`] = `
<div>
<div
class="ant-space ant-space-horizontal ant-space-align-center"
@ -386,7 +386,7 @@ exports[`renders ./components/checkbox/demo/debug-line.tsx correctly 1`] = `
</div>
`;
exports[`renders ./components/checkbox/demo/disabled.tsx correctly 1`] = `
exports[`renders components/checkbox/demo/disabled.tsx correctly 1`] = `
Array [
<label
class="ant-checkbox-wrapper ant-checkbox-wrapper-disabled"
@ -443,7 +443,7 @@ Array [
]
`;
exports[`renders ./components/checkbox/demo/group.tsx correctly 1`] = `
exports[`renders components/checkbox/demo/group.tsx correctly 1`] = `
Array [
<div
class="ant-checkbox-group"
@ -641,7 +641,7 @@ Array [
]
`;
exports[`renders ./components/checkbox/demo/layout.tsx correctly 1`] = `
exports[`renders components/checkbox/demo/layout.tsx correctly 1`] = `
<div
class="ant-checkbox-group"
style="width:100%"

View File

@ -1,6 +1,6 @@
// Jest Snapshot v1, https://goo.gl/fbAQLP
exports[`renders ./components/collapse/demo/accordion.tsx extend context correctly 1`] = `
exports[`renders components/collapse/demo/accordion.tsx extend context correctly 1`] = `
<div
class="ant-collapse ant-collapse-icon-position-start"
role="tablist"
@ -128,7 +128,7 @@ exports[`renders ./components/collapse/demo/accordion.tsx extend context correct
</div>
`;
exports[`renders ./components/collapse/demo/basic.tsx extend context correctly 1`] = `
exports[`renders components/collapse/demo/basic.tsx extend context correctly 1`] = `
<div
class="ant-collapse ant-collapse-icon-position-start"
>
@ -269,7 +269,7 @@ exports[`renders ./components/collapse/demo/basic.tsx extend context correctly 1
</div>
`;
exports[`renders ./components/collapse/demo/borderless.tsx extend context correctly 1`] = `
exports[`renders components/collapse/demo/borderless.tsx extend context correctly 1`] = `
<div
class="ant-collapse ant-collapse-icon-position-start ant-collapse-borderless"
>
@ -410,7 +410,7 @@ exports[`renders ./components/collapse/demo/borderless.tsx extend context correc
</div>
`;
exports[`renders ./components/collapse/demo/collapsible.tsx extend context correctly 1`] = `
exports[`renders components/collapse/demo/collapsible.tsx extend context correctly 1`] = `
<div
class="ant-space ant-space-vertical"
>
@ -587,7 +587,7 @@ exports[`renders ./components/collapse/demo/collapsible.tsx extend context corre
</div>
`;
exports[`renders ./components/collapse/demo/custom.tsx extend context correctly 1`] = `
exports[`renders components/collapse/demo/custom.tsx extend context correctly 1`] = `
<div
class="ant-collapse ant-collapse-icon-position-start ant-collapse-borderless"
style="background:#ffffff"
@ -732,7 +732,7 @@ exports[`renders ./components/collapse/demo/custom.tsx extend context correctly
</div>
`;
exports[`renders ./components/collapse/demo/extra.tsx extend context correctly 1`] = `
exports[`renders components/collapse/demo/extra.tsx extend context correctly 1`] = `
Array [
<div
class="ant-collapse ant-collapse-icon-position-start"
@ -1091,7 +1091,7 @@ Array [
]
`;
exports[`renders ./components/collapse/demo/ghost.tsx extend context correctly 1`] = `
exports[`renders components/collapse/demo/ghost.tsx extend context correctly 1`] = `
<div
class="ant-collapse ant-collapse-icon-position-start ant-collapse-ghost"
>
@ -1232,7 +1232,7 @@ exports[`renders ./components/collapse/demo/ghost.tsx extend context correctly 1
</div>
`;
exports[`renders ./components/collapse/demo/mix.tsx extend context correctly 1`] = `
exports[`renders components/collapse/demo/mix.tsx extend context correctly 1`] = `
<div
class="ant-collapse ant-collapse-icon-position-start"
>
@ -1359,7 +1359,7 @@ exports[`renders ./components/collapse/demo/mix.tsx extend context correctly 1`]
</div>
`;
exports[`renders ./components/collapse/demo/noarrow.tsx extend context correctly 1`] = `
exports[`renders components/collapse/demo/noarrow.tsx extend context correctly 1`] = `
<div
class="ant-collapse ant-collapse-icon-position-start"
>
@ -1437,7 +1437,7 @@ exports[`renders ./components/collapse/demo/noarrow.tsx extend context correctly
</div>
`;
exports[`renders ./components/collapse/demo/size.tsx extend context correctly 1`] = `
exports[`renders components/collapse/demo/size.tsx extend context correctly 1`] = `
Array [
<div
class="ant-divider ant-divider-horizontal ant-divider-with-text ant-divider-with-text-left"

View File

@ -1,6 +1,6 @@
// Jest Snapshot v1, https://goo.gl/fbAQLP
exports[`renders ./components/collapse/demo/accordion.tsx correctly 1`] = `
exports[`renders components/collapse/demo/accordion.tsx correctly 1`] = `
<div
class="ant-collapse ant-collapse-icon-position-start"
role="tablist"
@ -128,7 +128,7 @@ exports[`renders ./components/collapse/demo/accordion.tsx correctly 1`] = `
</div>
`;
exports[`renders ./components/collapse/demo/basic.tsx correctly 1`] = `
exports[`renders components/collapse/demo/basic.tsx correctly 1`] = `
<div
class="ant-collapse ant-collapse-icon-position-start"
>
@ -269,7 +269,7 @@ exports[`renders ./components/collapse/demo/basic.tsx correctly 1`] = `
</div>
`;
exports[`renders ./components/collapse/demo/borderless.tsx correctly 1`] = `
exports[`renders components/collapse/demo/borderless.tsx correctly 1`] = `
<div
class="ant-collapse ant-collapse-icon-position-start ant-collapse-borderless"
>
@ -410,7 +410,7 @@ exports[`renders ./components/collapse/demo/borderless.tsx correctly 1`] = `
</div>
`;
exports[`renders ./components/collapse/demo/collapsible.tsx correctly 1`] = `
exports[`renders components/collapse/demo/collapsible.tsx correctly 1`] = `
<div
class="ant-space ant-space-vertical"
>
@ -587,7 +587,7 @@ exports[`renders ./components/collapse/demo/collapsible.tsx correctly 1`] = `
</div>
`;
exports[`renders ./components/collapse/demo/custom.tsx correctly 1`] = `
exports[`renders components/collapse/demo/custom.tsx correctly 1`] = `
<div
class="ant-collapse ant-collapse-icon-position-start ant-collapse-borderless"
style="background:#ffffff"
@ -732,7 +732,7 @@ exports[`renders ./components/collapse/demo/custom.tsx correctly 1`] = `
</div>
`;
exports[`renders ./components/collapse/demo/extra.tsx correctly 1`] = `
exports[`renders components/collapse/demo/extra.tsx correctly 1`] = `
Array [
<div
class="ant-collapse ant-collapse-icon-position-start"
@ -1011,7 +1011,7 @@ Array [
]
`;
exports[`renders ./components/collapse/demo/ghost.tsx correctly 1`] = `
exports[`renders components/collapse/demo/ghost.tsx correctly 1`] = `
<div
class="ant-collapse ant-collapse-icon-position-start ant-collapse-ghost"
>
@ -1152,7 +1152,7 @@ exports[`renders ./components/collapse/demo/ghost.tsx correctly 1`] = `
</div>
`;
exports[`renders ./components/collapse/demo/mix.tsx correctly 1`] = `
exports[`renders components/collapse/demo/mix.tsx correctly 1`] = `
<div
class="ant-collapse ant-collapse-icon-position-start"
>
@ -1279,7 +1279,7 @@ exports[`renders ./components/collapse/demo/mix.tsx correctly 1`] = `
</div>
`;
exports[`renders ./components/collapse/demo/noarrow.tsx correctly 1`] = `
exports[`renders components/collapse/demo/noarrow.tsx correctly 1`] = `
<div
class="ant-collapse ant-collapse-icon-position-start"
>
@ -1357,7 +1357,7 @@ exports[`renders ./components/collapse/demo/noarrow.tsx correctly 1`] = `
</div>
`;
exports[`renders ./components/collapse/demo/size.tsx correctly 1`] = `
exports[`renders components/collapse/demo/size.tsx correctly 1`] = `
Array [
<div
class="ant-divider ant-divider-horizontal ant-divider-with-text ant-divider-with-text-left"

View File

@ -27,6 +27,24 @@ import type { SizeType } from './SizeContext';
import SizeContext, { SizeContextProvider } from './SizeContext';
import useStyle from './style';
/**
* Since too many feedback using static method like `Modal.confirm` not getting theme,
* we record the theme register info here to help developer get warning info.
*/
let existThemeConfig = false;
export const warnContext: (componentName: string) => void =
process.env.NODE_ENV !== 'production'
? (componentName: string) => {
warning(
!existThemeConfig,
componentName,
`Static function can not consume context like dynamic theme. Please use 'App' component instead.`,
);
}
: /* istanbul ignore next */
null!;
export {
type RenderEmptyHandler,
ConfigContext,
@ -192,6 +210,10 @@ const ProviderChildren: React.FC<ProviderChildrenProps> = (props) => {
const mergedTheme = useTheme(theme, parentContext.theme);
if (process.env.NODE_ENV !== 'production') {
existThemeConfig = existThemeConfig || !!mergedTheme;
}
const baseConfig = {
csp,
autoInsertSpaceInButton,

View File

@ -1,6 +1,6 @@
// Jest Snapshot v1, https://goo.gl/fbAQLP
exports[`renders ./components/date-picker/demo/basic.tsx extend context correctly 1`] = `
exports[`renders components/date-picker/demo/basic.tsx extend context correctly 1`] = `
<div
class="ant-space ant-space-vertical"
>
@ -1892,7 +1892,7 @@ exports[`renders ./components/date-picker/demo/basic.tsx extend context correctl
</div>
`;
exports[`renders ./components/date-picker/demo/bordered.tsx extend context correctly 1`] = `
exports[`renders components/date-picker/demo/bordered.tsx extend context correctly 1`] = `
<div
class="ant-space ant-space-vertical"
>
@ -7104,7 +7104,7 @@ exports[`renders ./components/date-picker/demo/bordered.tsx extend context corre
</div>
`;
exports[`renders ./components/date-picker/demo/date-render.tsx extend context correctly 1`] = `
exports[`renders components/date-picker/demo/date-render.tsx extend context correctly 1`] = `
<div
class="ant-space ant-space-vertical"
>
@ -8903,7 +8903,7 @@ exports[`renders ./components/date-picker/demo/date-render.tsx extend context co
</div>
`;
exports[`renders ./components/date-picker/demo/disabled.tsx extend context correctly 1`] = `
exports[`renders components/date-picker/demo/disabled.tsx extend context correctly 1`] = `
<div
class="ant-space ant-space-vertical"
>
@ -12147,7 +12147,7 @@ exports[`renders ./components/date-picker/demo/disabled.tsx extend context corre
</div>
`;
exports[`renders ./components/date-picker/demo/disabled-date.tsx extend context correctly 1`] = `
exports[`renders components/date-picker/demo/disabled-date.tsx extend context correctly 1`] = `
<div
class="ant-space ant-space-vertical"
>
@ -17061,7 +17061,7 @@ exports[`renders ./components/date-picker/demo/disabled-date.tsx extend context
</div>
`;
exports[`renders ./components/date-picker/demo/extra-footer.tsx extend context correctly 1`] = `
exports[`renders components/date-picker/demo/extra-footer.tsx extend context correctly 1`] = `
<div
class="ant-space ant-space-vertical"
>
@ -23076,7 +23076,7 @@ exports[`renders ./components/date-picker/demo/extra-footer.tsx extend context c
</div>
`;
exports[`renders ./components/date-picker/demo/format.tsx extend context correctly 1`] = `
exports[`renders components/date-picker/demo/format.tsx extend context correctly 1`] = `
<div
class="ant-space ant-space-vertical"
>
@ -27108,7 +27108,7 @@ exports[`renders ./components/date-picker/demo/format.tsx extend context correct
</div>
`;
exports[`renders ./components/date-picker/demo/mode.tsx extend context correctly 1`] = `
exports[`renders components/date-picker/demo/mode.tsx extend context correctly 1`] = `
<div
class="ant-space ant-space-vertical"
>
@ -28827,7 +28827,7 @@ exports[`renders ./components/date-picker/demo/mode.tsx extend context correctly
</div>
`;
exports[`renders ./components/date-picker/demo/placement.tsx extend context correctly 1`] = `
exports[`renders components/date-picker/demo/placement.tsx extend context correctly 1`] = `
Array [
<div
class="ant-radio-group ant-radio-group-outline"
@ -30694,7 +30694,7 @@ Array [
]
`;
exports[`renders ./components/date-picker/demo/preset-ranges.tsx extend context correctly 1`] = `
exports[`renders components/date-picker/demo/preset-ranges.tsx extend context correctly 1`] = `
<div
class="ant-space ant-space-vertical"
>
@ -34539,7 +34539,7 @@ exports[`renders ./components/date-picker/demo/preset-ranges.tsx extend context
</div>
`;
exports[`renders ./components/date-picker/demo/range-picker.tsx extend context correctly 1`] = `
exports[`renders components/date-picker/demo/range-picker.tsx extend context correctly 1`] = `
<div
class="ant-space ant-space-vertical"
>
@ -40319,7 +40319,7 @@ exports[`renders ./components/date-picker/demo/range-picker.tsx extend context c
</div>
`;
exports[`renders ./components/date-picker/demo/render-panel.tsx extend context correctly 1`] = `
exports[`renders components/date-picker/demo/render-panel.tsx extend context correctly 1`] = `
<div
style="padding-bottom:0;position:relative;width:fit-content;min-width:0"
>
@ -40922,7 +40922,7 @@ exports[`renders ./components/date-picker/demo/render-panel.tsx extend context c
</div>
`;
exports[`renders ./components/date-picker/demo/select-in-range.tsx extend context correctly 1`] = `
exports[`renders components/date-picker/demo/select-in-range.tsx extend context correctly 1`] = `
Array [
<div
class="ant-picker ant-picker-range"
@ -42109,7 +42109,7 @@ Array [
]
`;
exports[`renders ./components/date-picker/demo/size.tsx extend context correctly 1`] = `
exports[`renders components/date-picker/demo/size.tsx extend context correctly 1`] = `
<div
class="ant-space ant-space-vertical"
>
@ -44865,7 +44865,7 @@ exports[`renders ./components/date-picker/demo/size.tsx extend context correctly
</div>
`;
exports[`renders ./components/date-picker/demo/start-end.tsx extend context correctly 1`] = `
exports[`renders components/date-picker/demo/start-end.tsx extend context correctly 1`] = `
<div
class="ant-space ant-space-horizontal ant-space-align-center"
>
@ -48775,7 +48775,7 @@ exports[`renders ./components/date-picker/demo/start-end.tsx extend context corr
</div>
`;
exports[`renders ./components/date-picker/demo/status.tsx extend context correctly 1`] = `
exports[`renders components/date-picker/demo/status.tsx extend context correctly 1`] = `
<div
class="ant-space ant-space-vertical"
style="width:100%"
@ -52360,7 +52360,7 @@ exports[`renders ./components/date-picker/demo/status.tsx extend context correct
</div>
`;
exports[`renders ./components/date-picker/demo/suffix.tsx extend context correctly 1`] = `
exports[`renders components/date-picker/demo/suffix.tsx extend context correctly 1`] = `
<div
class="ant-space ant-space-vertical"
>
@ -57660,7 +57660,7 @@ exports[`renders ./components/date-picker/demo/suffix.tsx extend context correct
</div>
`;
exports[`renders ./components/date-picker/demo/switchable.tsx extend context correctly 1`] = `
exports[`renders components/date-picker/demo/switchable.tsx extend context correctly 1`] = `
<div
class="ant-space ant-space-horizontal ant-space-align-center"
>
@ -59292,7 +59292,7 @@ exports[`renders ./components/date-picker/demo/switchable.tsx extend context cor
</div>
`;
exports[`renders ./components/date-picker/demo/time.tsx extend context correctly 1`] = `
exports[`renders components/date-picker/demo/time.tsx extend context correctly 1`] = `
<div
class="ant-space ant-space-vertical"
>

View File

@ -1,6 +1,6 @@
// Jest Snapshot v1, https://goo.gl/fbAQLP
exports[`renders ./components/date-picker/demo/basic.tsx correctly 1`] = `
exports[`renders components/date-picker/demo/basic.tsx correctly 1`] = `
<div
class="ant-space ant-space-vertical"
>
@ -226,7 +226,7 @@ exports[`renders ./components/date-picker/demo/basic.tsx correctly 1`] = `
</div>
`;
exports[`renders ./components/date-picker/demo/bordered.tsx correctly 1`] = `
exports[`renders components/date-picker/demo/bordered.tsx correctly 1`] = `
<div
class="ant-space ant-space-vertical"
>
@ -752,7 +752,7 @@ exports[`renders ./components/date-picker/demo/bordered.tsx correctly 1`] = `
</div>
`;
exports[`renders ./components/date-picker/demo/date-render.tsx correctly 1`] = `
exports[`renders components/date-picker/demo/date-render.tsx correctly 1`] = `
<div
class="ant-space ant-space-vertical"
>
@ -888,7 +888,7 @@ exports[`renders ./components/date-picker/demo/date-render.tsx correctly 1`] = `
</div>
`;
exports[`renders ./components/date-picker/demo/disabled.tsx correctly 1`] = `
exports[`renders components/date-picker/demo/disabled.tsx correctly 1`] = `
<div
class="ant-space ant-space-vertical"
>
@ -1182,7 +1182,7 @@ exports[`renders ./components/date-picker/demo/disabled.tsx correctly 1`] = `
</div>
`;
exports[`renders ./components/date-picker/demo/disabled-date.tsx correctly 1`] = `
exports[`renders components/date-picker/demo/disabled-date.tsx correctly 1`] = `
<div
class="ant-space ant-space-vertical"
>
@ -1448,7 +1448,7 @@ exports[`renders ./components/date-picker/demo/disabled-date.tsx correctly 1`] =
</div>
`;
exports[`renders ./components/date-picker/demo/extra-footer.tsx correctly 1`] = `
exports[`renders components/date-picker/demo/extra-footer.tsx correctly 1`] = `
<div
class="ant-space ant-space-vertical"
>
@ -1758,7 +1758,7 @@ exports[`renders ./components/date-picker/demo/extra-footer.tsx correctly 1`] =
</div>
`;
exports[`renders ./components/date-picker/demo/format.tsx correctly 1`] = `
exports[`renders components/date-picker/demo/format.tsx correctly 1`] = `
<div
class="ant-space ant-space-vertical"
>
@ -2213,7 +2213,7 @@ exports[`renders ./components/date-picker/demo/format.tsx correctly 1`] = `
</div>
`;
exports[`renders ./components/date-picker/demo/mode.tsx correctly 1`] = `
exports[`renders components/date-picker/demo/mode.tsx correctly 1`] = `
<div
class="ant-space ant-space-vertical"
>
@ -2349,7 +2349,7 @@ exports[`renders ./components/date-picker/demo/mode.tsx correctly 1`] = `
</div>
`;
exports[`renders ./components/date-picker/demo/placement.tsx correctly 1`] = `
exports[`renders components/date-picker/demo/placement.tsx correctly 1`] = `
Array [
<div
class="ant-radio-group ant-radio-group-outline"
@ -2559,7 +2559,7 @@ Array [
]
`;
exports[`renders ./components/date-picker/demo/preset-ranges.tsx correctly 1`] = `
exports[`renders components/date-picker/demo/preset-ranges.tsx correctly 1`] = `
<div
class="ant-space ant-space-vertical"
>
@ -2781,7 +2781,7 @@ exports[`renders ./components/date-picker/demo/preset-ranges.tsx correctly 1`] =
</div>
`;
exports[`renders ./components/date-picker/demo/range-picker.tsx correctly 1`] = `
exports[`renders components/date-picker/demo/range-picker.tsx correctly 1`] = `
<div
class="ant-space ant-space-vertical"
>
@ -3303,7 +3303,7 @@ exports[`renders ./components/date-picker/demo/range-picker.tsx correctly 1`] =
</div>
`;
exports[`renders ./components/date-picker/demo/render-panel.tsx correctly 1`] = `
exports[`renders components/date-picker/demo/render-panel.tsx correctly 1`] = `
<div
style="padding-bottom:0;position:relative;width:fit-content;min-width:0"
>
@ -3350,7 +3350,7 @@ exports[`renders ./components/date-picker/demo/render-panel.tsx correctly 1`] =
</div>
`;
exports[`renders ./components/date-picker/demo/select-in-range.tsx correctly 1`] = `
exports[`renders components/date-picker/demo/select-in-range.tsx correctly 1`] = `
<div
class="ant-picker ant-picker-range"
>
@ -3434,7 +3434,7 @@ exports[`renders ./components/date-picker/demo/select-in-range.tsx correctly 1`]
</div>
`;
exports[`renders ./components/date-picker/demo/size.tsx correctly 1`] = `
exports[`renders components/date-picker/demo/size.tsx correctly 1`] = `
<div
class="ant-space ant-space-vertical"
>
@ -3725,7 +3725,7 @@ exports[`renders ./components/date-picker/demo/size.tsx correctly 1`] = `
</div>
`;
exports[`renders ./components/date-picker/demo/start-end.tsx correctly 1`] = `
exports[`renders components/date-picker/demo/start-end.tsx correctly 1`] = `
<div
class="ant-space ant-space-horizontal ant-space-align-center"
>
@ -3819,7 +3819,7 @@ exports[`renders ./components/date-picker/demo/start-end.tsx correctly 1`] = `
</div>
`;
exports[`renders ./components/date-picker/demo/status.tsx correctly 1`] = `
exports[`renders components/date-picker/demo/status.tsx correctly 1`] = `
<div
class="ant-space ant-space-vertical"
style="width:100%"
@ -4090,7 +4090,7 @@ exports[`renders ./components/date-picker/demo/status.tsx correctly 1`] = `
</div>
`;
exports[`renders ./components/date-picker/demo/suffix.tsx correctly 1`] = `
exports[`renders components/date-picker/demo/suffix.tsx correctly 1`] = `
<div
class="ant-space ant-space-vertical"
>
@ -4460,7 +4460,7 @@ exports[`renders ./components/date-picker/demo/suffix.tsx correctly 1`] = `
</div>
`;
exports[`renders ./components/date-picker/demo/switchable.tsx correctly 1`] = `
exports[`renders components/date-picker/demo/switchable.tsx correctly 1`] = `
<div
class="ant-space ant-space-horizontal ant-space-align-center"
>
@ -4577,7 +4577,7 @@ exports[`renders ./components/date-picker/demo/switchable.tsx correctly 1`] = `
</div>
`;
exports[`renders ./components/date-picker/demo/time.tsx correctly 1`] = `
exports[`renders components/date-picker/demo/time.tsx correctly 1`] = `
<div
class="ant-space ant-space-vertical"
>

View File

@ -1,6 +1,6 @@
// Jest Snapshot v1, https://goo.gl/fbAQLP
exports[`renders ./components/descriptions/demo/basic.tsx extend context correctly 1`] = `
exports[`renders components/descriptions/demo/basic.tsx extend context correctly 1`] = `
<div
class="ant-descriptions"
>
@ -127,7 +127,7 @@ exports[`renders ./components/descriptions/demo/basic.tsx extend context correct
</div>
`;
exports[`renders ./components/descriptions/demo/border.tsx extend context correctly 1`] = `
exports[`renders components/descriptions/demo/border.tsx extend context correctly 1`] = `
<div
class="ant-descriptions ant-descriptions-bordered"
>
@ -353,7 +353,7 @@ exports[`renders ./components/descriptions/demo/border.tsx extend context correc
</div>
`;
exports[`renders ./components/descriptions/demo/responsive.tsx extend context correctly 1`] = `
exports[`renders components/descriptions/demo/responsive.tsx extend context correctly 1`] = `
<div>
<div
class="ant-descriptions ant-descriptions-bordered"
@ -513,7 +513,7 @@ exports[`renders ./components/descriptions/demo/responsive.tsx extend context co
</div>
`;
exports[`renders ./components/descriptions/demo/size.tsx extend context correctly 1`] = `
exports[`renders components/descriptions/demo/size.tsx extend context correctly 1`] = `
<div>
<div
class="ant-radio-group ant-radio-group-outline"
@ -907,7 +907,7 @@ exports[`renders ./components/descriptions/demo/size.tsx extend context correctl
</div>
`;
exports[`renders ./components/descriptions/demo/style.tsx extend context correctly 1`] = `
exports[`renders components/descriptions/demo/style.tsx extend context correctly 1`] = `
Array [
<button
aria-checked="true"
@ -1145,7 +1145,7 @@ Array [
]
`;
exports[`renders ./components/descriptions/demo/text.tsx extend context correctly 1`] = `
exports[`renders components/descriptions/demo/text.tsx extend context correctly 1`] = `
<div
class="ant-descriptions"
>
@ -1547,7 +1547,7 @@ exports[`renders ./components/descriptions/demo/text.tsx extend context correctl
</div>
`;
exports[`renders ./components/descriptions/demo/vertical.tsx extend context correctly 1`] = `
exports[`renders components/descriptions/demo/vertical.tsx extend context correctly 1`] = `
<div
class="ant-descriptions"
>
@ -1727,7 +1727,7 @@ exports[`renders ./components/descriptions/demo/vertical.tsx extend context corr
</div>
`;
exports[`renders ./components/descriptions/demo/vertical-border.tsx extend context correctly 1`] = `
exports[`renders components/descriptions/demo/vertical-border.tsx extend context correctly 1`] = `
<div
class="ant-descriptions ant-descriptions-bordered"
>

View File

@ -1,6 +1,6 @@
// Jest Snapshot v1, https://goo.gl/fbAQLP
exports[`renders ./components/descriptions/demo/basic.tsx correctly 1`] = `
exports[`renders components/descriptions/demo/basic.tsx correctly 1`] = `
<div
class="ant-descriptions"
>
@ -127,7 +127,7 @@ exports[`renders ./components/descriptions/demo/basic.tsx correctly 1`] = `
</div>
`;
exports[`renders ./components/descriptions/demo/border.tsx correctly 1`] = `
exports[`renders components/descriptions/demo/border.tsx correctly 1`] = `
<div
class="ant-descriptions ant-descriptions-bordered"
>
@ -353,7 +353,7 @@ exports[`renders ./components/descriptions/demo/border.tsx correctly 1`] = `
</div>
`;
exports[`renders ./components/descriptions/demo/responsive.tsx correctly 1`] = `
exports[`renders components/descriptions/demo/responsive.tsx correctly 1`] = `
<div>
<div
class="ant-descriptions ant-descriptions-bordered"
@ -513,7 +513,7 @@ exports[`renders ./components/descriptions/demo/responsive.tsx correctly 1`] = `
</div>
`;
exports[`renders ./components/descriptions/demo/size.tsx correctly 1`] = `
exports[`renders components/descriptions/demo/size.tsx correctly 1`] = `
<div>
<div
class="ant-radio-group ant-radio-group-outline"
@ -907,7 +907,7 @@ exports[`renders ./components/descriptions/demo/size.tsx correctly 1`] = `
</div>
`;
exports[`renders ./components/descriptions/demo/style.tsx correctly 1`] = `
exports[`renders components/descriptions/demo/style.tsx correctly 1`] = `
Array [
<button
aria-checked="true"
@ -1145,7 +1145,7 @@ Array [
]
`;
exports[`renders ./components/descriptions/demo/text.tsx correctly 1`] = `
exports[`renders components/descriptions/demo/text.tsx correctly 1`] = `
<div
class="ant-descriptions"
>
@ -1547,7 +1547,7 @@ exports[`renders ./components/descriptions/demo/text.tsx correctly 1`] = `
</div>
`;
exports[`renders ./components/descriptions/demo/vertical.tsx correctly 1`] = `
exports[`renders components/descriptions/demo/vertical.tsx correctly 1`] = `
<div
class="ant-descriptions"
>
@ -1727,7 +1727,7 @@ exports[`renders ./components/descriptions/demo/vertical.tsx correctly 1`] = `
</div>
`;
exports[`renders ./components/descriptions/demo/vertical-border.tsx correctly 1`] = `
exports[`renders components/descriptions/demo/vertical-border.tsx correctly 1`] = `
<div
class="ant-descriptions ant-descriptions-bordered"
>

View File

@ -1,6 +1,6 @@
// Jest Snapshot v1, https://goo.gl/fbAQLP
exports[`renders ./components/divider/demo/customize-style.tsx extend context correctly 1`] = `
exports[`renders components/divider/demo/customize-style.tsx extend context correctly 1`] = `
Array [
<div
class="ant-divider ant-divider-horizontal"
@ -51,7 +51,7 @@ Array [
]
`;
exports[`renders ./components/divider/demo/horizontal.tsx extend context correctly 1`] = `
exports[`renders components/divider/demo/horizontal.tsx extend context correctly 1`] = `
Array [
<p>
Lorem ipsum dolor sit amet, consectetur adipiscing elit. Sed nonne merninisti licere mihi ista probare, quae sunt a te dicta? Refert tamen, quo modo.
@ -73,7 +73,7 @@ Array [
]
`;
exports[`renders ./components/divider/demo/plain.tsx extend context correctly 1`] = `
exports[`renders components/divider/demo/plain.tsx extend context correctly 1`] = `
Array [
<p>
Lorem ipsum dolor sit amet, consectetur adipiscing elit. Sed nonne merninisti licere mihi ista probare, quae sunt a te dicta? Refert tamen, quo modo.
@ -120,7 +120,7 @@ Array [
]
`;
exports[`renders ./components/divider/demo/vertical.tsx extend context correctly 1`] = `
exports[`renders components/divider/demo/vertical.tsx extend context correctly 1`] = `
Array [
Text,
<div
@ -144,7 +144,7 @@ Array [
]
`;
exports[`renders ./components/divider/demo/with-text.tsx extend context correctly 1`] = `
exports[`renders components/divider/demo/with-text.tsx extend context correctly 1`] = `
Array [
<p>
Lorem ipsum dolor sit amet, consectetur adipiscing elit. Sed nonne merninisti licere mihi ista probare, quae sunt a te dicta? Refert tamen, quo modo.

View File

@ -1,6 +1,6 @@
// Jest Snapshot v1, https://goo.gl/fbAQLP
exports[`renders ./components/divider/demo/customize-style.tsx correctly 1`] = `
exports[`renders components/divider/demo/customize-style.tsx correctly 1`] = `
Array [
<div
class="ant-divider ant-divider-horizontal"
@ -51,7 +51,7 @@ Array [
]
`;
exports[`renders ./components/divider/demo/horizontal.tsx correctly 1`] = `
exports[`renders components/divider/demo/horizontal.tsx correctly 1`] = `
Array [
<p>
Lorem ipsum dolor sit amet, consectetur adipiscing elit. Sed nonne merninisti licere mihi ista probare, quae sunt a te dicta? Refert tamen, quo modo.
@ -73,7 +73,7 @@ Array [
]
`;
exports[`renders ./components/divider/demo/plain.tsx correctly 1`] = `
exports[`renders components/divider/demo/plain.tsx correctly 1`] = `
Array [
<p>
Lorem ipsum dolor sit amet, consectetur adipiscing elit. Sed nonne merninisti licere mihi ista probare, quae sunt a te dicta? Refert tamen, quo modo.
@ -120,7 +120,7 @@ Array [
]
`;
exports[`renders ./components/divider/demo/vertical.tsx correctly 1`] = `
exports[`renders components/divider/demo/vertical.tsx correctly 1`] = `
Array [
Text,
<div
@ -144,7 +144,7 @@ Array [
]
`;
exports[`renders ./components/divider/demo/with-text.tsx correctly 1`] = `
exports[`renders components/divider/demo/with-text.tsx correctly 1`] = `
Array [
<p>
Lorem ipsum dolor sit amet, consectetur adipiscing elit. Sed nonne merninisti licere mihi ista probare, quae sunt a te dicta? Refert tamen, quo modo.

View File

@ -1,6 +1,6 @@
// Jest Snapshot v1, https://goo.gl/fbAQLP
exports[`renders ./components/drawer/demo/basic-right.tsx extend context correctly 1`] = `
exports[`renders components/drawer/demo/basic-right.tsx extend context correctly 1`] = `
Array [
<button
class="ant-btn ant-btn-primary"
@ -99,7 +99,7 @@ Array [
]
`;
exports[`renders ./components/drawer/demo/config-provider.tsx extend context correctly 1`] = `
exports[`renders components/drawer/demo/config-provider.tsx extend context correctly 1`] = `
<div
class="site-drawer-render-in-current-wrapper"
>
@ -201,7 +201,7 @@ exports[`renders ./components/drawer/demo/config-provider.tsx extend context cor
</div>
`;
exports[`renders ./components/drawer/demo/extra.tsx extend context correctly 1`] = `
exports[`renders components/drawer/demo/extra.tsx extend context correctly 1`] = `
Array [
<div
class="ant-space ant-space-horizontal ant-space-align-center"
@ -427,7 +427,7 @@ Array [
]
`;
exports[`renders ./components/drawer/demo/form-in-drawer.tsx extend context correctly 1`] = `
exports[`renders components/drawer/demo/form-in-drawer.tsx extend context correctly 1`] = `
Array [
<button
class="ant-btn ant-btn-primary"
@ -1401,7 +1401,7 @@ Array [
]
`;
exports[`renders ./components/drawer/demo/multi-level-drawer.tsx extend context correctly 1`] = `
exports[`renders components/drawer/demo/multi-level-drawer.tsx extend context correctly 1`] = `
Array [
<button
class="ant-btn ant-btn-primary"
@ -1527,7 +1527,7 @@ Array [
]
`;
exports[`renders ./components/drawer/demo/no-mask.tsx extend context correctly 1`] = `
exports[`renders components/drawer/demo/no-mask.tsx extend context correctly 1`] = `
Array [
<button
class="ant-btn ant-btn-primary"
@ -1623,7 +1623,7 @@ Array [
]
`;
exports[`renders ./components/drawer/demo/placement.tsx extend context correctly 1`] = `
exports[`renders components/drawer/demo/placement.tsx extend context correctly 1`] = `
Array [
<div
class="ant-space ant-space-horizontal ant-space-align-center"
@ -1791,7 +1791,7 @@ Array [
]
`;
exports[`renders ./components/drawer/demo/render-in-current.tsx extend context correctly 1`] = `
exports[`renders components/drawer/demo/render-in-current.tsx extend context correctly 1`] = `
<div
style="position:relative;height:200px;padding:48px;overflow:hidden;text-align:center;background:rgba(0, 0, 0, 0.02);border:1px solid #f0f0f0;border-radius:8px"
>
@ -1866,7 +1866,7 @@ exports[`renders ./components/drawer/demo/render-in-current.tsx extend context c
</div>
`;
exports[`renders ./components/drawer/demo/render-panel.tsx extend context correctly 1`] = `
exports[`renders components/drawer/demo/render-panel.tsx extend context correctly 1`] = `
<div
style="padding:32px;background:#e6e6e6"
>
@ -1930,7 +1930,7 @@ exports[`renders ./components/drawer/demo/render-panel.tsx extend context correc
</div>
`;
exports[`renders ./components/drawer/demo/scroll-debug.tsx extend context correctly 1`] = `
exports[`renders components/drawer/demo/scroll-debug.tsx extend context correctly 1`] = `
<div
style="position:relative;z-index:999999"
>
@ -2290,7 +2290,7 @@ exports[`renders ./components/drawer/demo/scroll-debug.tsx extend context correc
</div>
`;
exports[`renders ./components/drawer/demo/size.tsx extend context correctly 1`] = `
exports[`renders components/drawer/demo/size.tsx extend context correctly 1`] = `
Array [
<div
class="ant-space ant-space-horizontal ant-space-align-center"
@ -2443,7 +2443,7 @@ Array [
]
`;
exports[`renders ./components/drawer/demo/user-profile.tsx extend context correctly 1`] = `
exports[`renders components/drawer/demo/user-profile.tsx extend context correctly 1`] = `
Array [
<div
class="ant-list ant-list-split ant-list-bordered"

View File

@ -1,6 +1,6 @@
// Jest Snapshot v1, https://goo.gl/fbAQLP
exports[`renders ./components/drawer/demo/basic-right.tsx correctly 1`] = `
exports[`renders components/drawer/demo/basic-right.tsx correctly 1`] = `
<button
class="ant-btn ant-btn-primary"
type="button"
@ -11,7 +11,7 @@ exports[`renders ./components/drawer/demo/basic-right.tsx correctly 1`] = `
</button>
`;
exports[`renders ./components/drawer/demo/config-provider.tsx correctly 1`] = `
exports[`renders components/drawer/demo/config-provider.tsx correctly 1`] = `
<div
class="site-drawer-render-in-current-wrapper"
>
@ -26,7 +26,7 @@ exports[`renders ./components/drawer/demo/config-provider.tsx correctly 1`] = `
</div>
`;
exports[`renders ./components/drawer/demo/extra.tsx correctly 1`] = `
exports[`renders components/drawer/demo/extra.tsx correctly 1`] = `
<div
class="ant-space ant-space-horizontal ant-space-align-center"
>
@ -131,7 +131,7 @@ exports[`renders ./components/drawer/demo/extra.tsx correctly 1`] = `
</div>
`;
exports[`renders ./components/drawer/demo/form-in-drawer.tsx correctly 1`] = `
exports[`renders components/drawer/demo/form-in-drawer.tsx correctly 1`] = `
<button
class="ant-btn ant-btn-primary"
type="button"
@ -167,7 +167,7 @@ exports[`renders ./components/drawer/demo/form-in-drawer.tsx correctly 1`] = `
</button>
`;
exports[`renders ./components/drawer/demo/multi-level-drawer.tsx correctly 1`] = `
exports[`renders components/drawer/demo/multi-level-drawer.tsx correctly 1`] = `
<button
class="ant-btn ant-btn-primary"
type="button"
@ -178,7 +178,7 @@ exports[`renders ./components/drawer/demo/multi-level-drawer.tsx correctly 1`] =
</button>
`;
exports[`renders ./components/drawer/demo/no-mask.tsx correctly 1`] = `
exports[`renders components/drawer/demo/no-mask.tsx correctly 1`] = `
<button
class="ant-btn ant-btn-primary"
type="button"
@ -189,7 +189,7 @@ exports[`renders ./components/drawer/demo/no-mask.tsx correctly 1`] = `
</button>
`;
exports[`renders ./components/drawer/demo/placement.tsx correctly 1`] = `
exports[`renders components/drawer/demo/placement.tsx correctly 1`] = `
<div
class="ant-space ant-space-horizontal ant-space-align-center"
>
@ -294,7 +294,7 @@ exports[`renders ./components/drawer/demo/placement.tsx correctly 1`] = `
</div>
`;
exports[`renders ./components/drawer/demo/render-in-current.tsx correctly 1`] = `
exports[`renders components/drawer/demo/render-in-current.tsx correctly 1`] = `
<div
style="position:relative;height:200px;padding:48px;overflow:hidden;text-align:center;background:rgba(0, 0, 0, 0.02);border:1px solid #f0f0f0;border-radius:8px"
>
@ -314,7 +314,7 @@ exports[`renders ./components/drawer/demo/render-in-current.tsx correctly 1`] =
</div>
`;
exports[`renders ./components/drawer/demo/render-panel.tsx correctly 1`] = `
exports[`renders components/drawer/demo/render-panel.tsx correctly 1`] = `
<div
style="padding:32px;background:#e6e6e6"
>
@ -378,7 +378,7 @@ exports[`renders ./components/drawer/demo/render-panel.tsx correctly 1`] = `
</div>
`;
exports[`renders ./components/drawer/demo/scroll-debug.tsx correctly 1`] = `
exports[`renders components/drawer/demo/scroll-debug.tsx correctly 1`] = `
<div
style="position:relative;z-index:999999"
>
@ -504,7 +504,7 @@ exports[`renders ./components/drawer/demo/scroll-debug.tsx correctly 1`] = `
</div>
`;
exports[`renders ./components/drawer/demo/size.tsx correctly 1`] = `
exports[`renders components/drawer/demo/size.tsx correctly 1`] = `
<div
class="ant-space ant-space-horizontal ant-space-align-center"
>
@ -536,7 +536,7 @@ exports[`renders ./components/drawer/demo/size.tsx correctly 1`] = `
</div>
`;
exports[`renders ./components/drawer/demo/user-profile.tsx correctly 1`] = `
exports[`renders components/drawer/demo/user-profile.tsx correctly 1`] = `
<div
class="ant-list ant-list-split ant-list-bordered"
>

View File

@ -1,6 +1,6 @@
// Jest Snapshot v1, https://goo.gl/fbAQLP
exports[`renders ./components/dropdown/demo/arrow.tsx extend context correctly 1`] = `
exports[`renders components/dropdown/demo/arrow.tsx extend context correctly 1`] = `
Array [
<button
class="ant-btn ant-btn-default ant-dropdown-trigger"
@ -1104,7 +1104,7 @@ Array [
]
`;
exports[`renders ./components/dropdown/demo/arrow-center.tsx extend context correctly 1`] = `
exports[`renders components/dropdown/demo/arrow-center.tsx extend context correctly 1`] = `
Array [
<button
class="ant-btn ant-btn-default ant-dropdown-trigger"
@ -2208,7 +2208,7 @@ Array [
]
`;
exports[`renders ./components/dropdown/demo/basic.tsx extend context correctly 1`] = `
exports[`renders components/dropdown/demo/basic.tsx extend context correctly 1`] = `
Array [
<a
class="ant-dropdown-trigger"
@ -2486,7 +2486,7 @@ Array [
]
`;
exports[`renders ./components/dropdown/demo/context-menu.tsx extend context correctly 1`] = `
exports[`renders components/dropdown/demo/context-menu.tsx extend context correctly 1`] = `
Array [
<div
class="ant-dropdown-trigger"
@ -2651,7 +2651,7 @@ Array [
]
`;
exports[`renders ./components/dropdown/demo/custom-dropdown.tsx extend context correctly 1`] = `
exports[`renders components/dropdown/demo/custom-dropdown.tsx extend context correctly 1`] = `
Array [
<a
class="ant-dropdown-trigger"
@ -2894,7 +2894,7 @@ Array [
]
`;
exports[`renders ./components/dropdown/demo/dropdown-button.tsx extend context correctly 1`] = `
exports[`renders components/dropdown/demo/dropdown-button.tsx extend context correctly 1`] = `
<div
class="ant-space ant-space-horizontal ant-space-align-center"
style="flex-wrap:wrap;margin-bottom:-8px"
@ -4825,7 +4825,7 @@ exports[`renders ./components/dropdown/demo/dropdown-button.tsx extend context c
</div>
`;
exports[`renders ./components/dropdown/demo/event.tsx extend context correctly 1`] = `
exports[`renders components/dropdown/demo/event.tsx extend context correctly 1`] = `
Array [
<a
class="ant-dropdown-trigger"
@ -5021,7 +5021,7 @@ Array [
]
`;
exports[`renders ./components/dropdown/demo/item.tsx extend context correctly 1`] = `
exports[`renders components/dropdown/demo/item.tsx extend context correctly 1`] = `
Array [
<a
class="ant-dropdown-trigger"
@ -5232,7 +5232,7 @@ Array [
]
`;
exports[`renders ./components/dropdown/demo/loading.tsx extend context correctly 1`] = `
exports[`renders components/dropdown/demo/loading.tsx extend context correctly 1`] = `
<div
class="ant-space ant-space-vertical"
>
@ -5704,7 +5704,7 @@ exports[`renders ./components/dropdown/demo/loading.tsx extend context correctly
</div>
`;
exports[`renders ./components/dropdown/demo/menu-full.tsx extend context correctly 1`] = `
exports[`renders components/dropdown/demo/menu-full.tsx extend context correctly 1`] = `
Array [
<a
class="ant-dropdown-trigger"
@ -6719,7 +6719,7 @@ Array [
]
`;
exports[`renders ./components/dropdown/demo/overlay-open.tsx extend context correctly 1`] = `
exports[`renders components/dropdown/demo/overlay-open.tsx extend context correctly 1`] = `
Array [
<a
class="ant-dropdown-trigger"
@ -6915,7 +6915,7 @@ Array [
]
`;
exports[`renders ./components/dropdown/demo/placement.tsx extend context correctly 1`] = `
exports[`renders components/dropdown/demo/placement.tsx extend context correctly 1`] = `
<div
class="ant-space ant-space-vertical"
>
@ -8051,7 +8051,7 @@ exports[`renders ./components/dropdown/demo/placement.tsx extend context correct
</div>
`;
exports[`renders ./components/dropdown/demo/render-panel.tsx extend context correctly 1`] = `
exports[`renders components/dropdown/demo/render-panel.tsx extend context correctly 1`] = `
<div
style="padding-bottom:0;position:relative;width:fit-content;min-width:0"
>
@ -8297,7 +8297,7 @@ exports[`renders ./components/dropdown/demo/render-panel.tsx extend context corr
</div>
`;
exports[`renders ./components/dropdown/demo/selectable.tsx extend context correctly 1`] = `
exports[`renders components/dropdown/demo/selectable.tsx extend context correctly 1`] = `
Array [
<a
class="ant-typography ant-dropdown-trigger"
@ -8493,7 +8493,7 @@ Array [
]
`;
exports[`renders ./components/dropdown/demo/sub-menu.tsx extend context correctly 1`] = `
exports[`renders components/dropdown/demo/sub-menu.tsx extend context correctly 1`] = `
Array [
<a
class="ant-dropdown-trigger"
@ -8949,7 +8949,7 @@ Array [
]
`;
exports[`renders ./components/dropdown/demo/trigger.tsx extend context correctly 1`] = `
exports[`renders components/dropdown/demo/trigger.tsx extend context correctly 1`] = `
Array [
<a
class="ant-dropdown-trigger"

View File

@ -1,6 +1,6 @@
// Jest Snapshot v1, https://goo.gl/fbAQLP
exports[`renders ./components/dropdown/demo/arrow.tsx correctly 1`] = `
exports[`renders components/dropdown/demo/arrow.tsx correctly 1`] = `
Array [
<button
class="ant-btn ant-btn-default ant-dropdown-trigger"
@ -54,7 +54,7 @@ Array [
]
`;
exports[`renders ./components/dropdown/demo/arrow-center.tsx correctly 1`] = `
exports[`renders components/dropdown/demo/arrow-center.tsx correctly 1`] = `
Array [
<button
class="ant-btn ant-btn-default ant-dropdown-trigger"
@ -108,7 +108,7 @@ Array [
]
`;
exports[`renders ./components/dropdown/demo/basic.tsx correctly 1`] = `
exports[`renders components/dropdown/demo/basic.tsx correctly 1`] = `
<a
class="ant-dropdown-trigger"
>
@ -148,7 +148,7 @@ exports[`renders ./components/dropdown/demo/basic.tsx correctly 1`] = `
</a>
`;
exports[`renders ./components/dropdown/demo/context-menu.tsx correctly 1`] = `
exports[`renders components/dropdown/demo/context-menu.tsx correctly 1`] = `
<div
class="ant-dropdown-trigger"
style="color:rgba(0, 0, 0, 0.45);background:#f5f5f5;height:200px;text-align:center;line-height:200px"
@ -157,7 +157,7 @@ exports[`renders ./components/dropdown/demo/context-menu.tsx correctly 1`] = `
</div>
`;
exports[`renders ./components/dropdown/demo/custom-dropdown.tsx correctly 1`] = `
exports[`renders components/dropdown/demo/custom-dropdown.tsx correctly 1`] = `
<a
class="ant-dropdown-trigger"
>
@ -197,7 +197,7 @@ exports[`renders ./components/dropdown/demo/custom-dropdown.tsx correctly 1`] =
</a>
`;
exports[`renders ./components/dropdown/demo/dropdown-button.tsx correctly 1`] = `
exports[`renders components/dropdown/demo/dropdown-button.tsx correctly 1`] = `
<div
class="ant-space ant-space-horizontal ant-space-align-center"
style="flex-wrap:wrap;margin-bottom:-8px"
@ -459,7 +459,7 @@ exports[`renders ./components/dropdown/demo/dropdown-button.tsx correctly 1`] =
</div>
`;
exports[`renders ./components/dropdown/demo/event.tsx correctly 1`] = `
exports[`renders components/dropdown/demo/event.tsx correctly 1`] = `
<a
class="ant-dropdown-trigger"
>
@ -499,7 +499,7 @@ exports[`renders ./components/dropdown/demo/event.tsx correctly 1`] = `
</a>
`;
exports[`renders ./components/dropdown/demo/item.tsx correctly 1`] = `
exports[`renders components/dropdown/demo/item.tsx correctly 1`] = `
<a
class="ant-dropdown-trigger"
>
@ -539,7 +539,7 @@ exports[`renders ./components/dropdown/demo/item.tsx correctly 1`] = `
</a>
`;
exports[`renders ./components/dropdown/demo/loading.tsx correctly 1`] = `
exports[`renders components/dropdown/demo/loading.tsx correctly 1`] = `
<div
class="ant-space ant-space-vertical"
>
@ -755,7 +755,7 @@ exports[`renders ./components/dropdown/demo/loading.tsx correctly 1`] = `
</div>
`;
exports[`renders ./components/dropdown/demo/menu-full.tsx correctly 1`] = `
exports[`renders components/dropdown/demo/menu-full.tsx correctly 1`] = `
<a
class="ant-dropdown-trigger"
>
@ -795,7 +795,7 @@ exports[`renders ./components/dropdown/demo/menu-full.tsx correctly 1`] = `
</a>
`;
exports[`renders ./components/dropdown/demo/overlay-open.tsx correctly 1`] = `
exports[`renders components/dropdown/demo/overlay-open.tsx correctly 1`] = `
<a
class="ant-dropdown-trigger"
>
@ -835,7 +835,7 @@ exports[`renders ./components/dropdown/demo/overlay-open.tsx correctly 1`] = `
</a>
`;
exports[`renders ./components/dropdown/demo/placement.tsx correctly 1`] = `
exports[`renders components/dropdown/demo/placement.tsx correctly 1`] = `
<div
class="ant-space ant-space-vertical"
>
@ -939,7 +939,7 @@ exports[`renders ./components/dropdown/demo/placement.tsx correctly 1`] = `
</div>
`;
exports[`renders ./components/dropdown/demo/render-panel.tsx correctly 1`] = `
exports[`renders components/dropdown/demo/render-panel.tsx correctly 1`] = `
<div
style="padding-bottom:0;position:relative;width:fit-content;min-width:0"
>
@ -949,7 +949,7 @@ exports[`renders ./components/dropdown/demo/render-panel.tsx correctly 1`] = `
</div>
`;
exports[`renders ./components/dropdown/demo/selectable.tsx correctly 1`] = `
exports[`renders components/dropdown/demo/selectable.tsx correctly 1`] = `
<a
class="ant-typography ant-dropdown-trigger"
>
@ -989,7 +989,7 @@ exports[`renders ./components/dropdown/demo/selectable.tsx correctly 1`] = `
</a>
`;
exports[`renders ./components/dropdown/demo/sub-menu.tsx correctly 1`] = `
exports[`renders components/dropdown/demo/sub-menu.tsx correctly 1`] = `
<a
class="ant-dropdown-trigger"
>
@ -1029,7 +1029,7 @@ exports[`renders ./components/dropdown/demo/sub-menu.tsx correctly 1`] = `
</a>
`;
exports[`renders ./components/dropdown/demo/trigger.tsx correctly 1`] = `
exports[`renders components/dropdown/demo/trigger.tsx correctly 1`] = `
<a
class="ant-dropdown-trigger"
>

View File

@ -1,6 +1,6 @@
// Jest Snapshot v1, https://goo.gl/fbAQLP
exports[`renders ./components/empty/demo/basic.tsx extend context correctly 1`] = `
exports[`renders components/empty/demo/basic.tsx extend context correctly 1`] = `
<div
class="ant-empty"
>
@ -75,7 +75,7 @@ exports[`renders ./components/empty/demo/basic.tsx extend context correctly 1`]
</div>
`;
exports[`renders ./components/empty/demo/config-provider.tsx extend context correctly 1`] = `
exports[`renders components/empty/demo/config-provider.tsx extend context correctly 1`] = `
Array [
<button
aria-checked="false"
@ -1200,7 +1200,7 @@ Array [
]
`;
exports[`renders ./components/empty/demo/customize.tsx extend context correctly 1`] = `
exports[`renders components/empty/demo/customize.tsx extend context correctly 1`] = `
<div
class="ant-empty"
>
@ -1240,7 +1240,7 @@ exports[`renders ./components/empty/demo/customize.tsx extend context correctly
</div>
`;
exports[`renders ./components/empty/demo/description.tsx extend context correctly 1`] = `
exports[`renders components/empty/demo/description.tsx extend context correctly 1`] = `
<div
class="ant-empty"
>
@ -1310,7 +1310,7 @@ exports[`renders ./components/empty/demo/description.tsx extend context correctl
</div>
`;
exports[`renders ./components/empty/demo/simple.tsx extend context correctly 1`] = `
exports[`renders components/empty/demo/simple.tsx extend context correctly 1`] = `
<div
class="ant-empty ant-empty-normal"
>

View File

@ -1,6 +1,6 @@
// Jest Snapshot v1, https://goo.gl/fbAQLP
exports[`renders ./components/empty/demo/basic.tsx correctly 1`] = `
exports[`renders components/empty/demo/basic.tsx correctly 1`] = `
<div
class="ant-empty"
>
@ -75,7 +75,7 @@ exports[`renders ./components/empty/demo/basic.tsx correctly 1`] = `
</div>
`;
exports[`renders ./components/empty/demo/config-provider.tsx correctly 1`] = `
exports[`renders components/empty/demo/config-provider.tsx correctly 1`] = `
Array [
<button
aria-checked="false"
@ -795,7 +795,7 @@ Array [
]
`;
exports[`renders ./components/empty/demo/customize.tsx correctly 1`] = `
exports[`renders components/empty/demo/customize.tsx correctly 1`] = `
<div
class="ant-empty"
>
@ -835,7 +835,7 @@ exports[`renders ./components/empty/demo/customize.tsx correctly 1`] = `
</div>
`;
exports[`renders ./components/empty/demo/description.tsx correctly 1`] = `
exports[`renders components/empty/demo/description.tsx correctly 1`] = `
<div
class="ant-empty"
>
@ -905,7 +905,7 @@ exports[`renders ./components/empty/demo/description.tsx correctly 1`] = `
</div>
`;
exports[`renders ./components/empty/demo/simple.tsx correctly 1`] = `
exports[`renders components/empty/demo/simple.tsx correctly 1`] = `
<div
class="ant-empty ant-empty-normal"
>

View File

@ -1,6 +1,6 @@
// Jest Snapshot v1, https://goo.gl/fbAQLP
exports[`renders ./components/float-button/demo/back-top.tsx extend context correctly 1`] = `
exports[`renders components/float-button/demo/back-top.tsx extend context correctly 1`] = `
<div
style="height:500vh;padding:10px"
>
@ -28,7 +28,7 @@ exports[`renders ./components/float-button/demo/back-top.tsx extend context corr
</div>
`;
exports[`renders ./components/float-button/demo/basic.tsx extend context correctly 1`] = `
exports[`renders components/float-button/demo/basic.tsx extend context correctly 1`] = `
<button
class="ant-float-btn ant-float-btn-default ant-float-btn-circle"
type="button"
@ -84,7 +84,7 @@ exports[`renders ./components/float-button/demo/basic.tsx extend context correct
</button>
`;
exports[`renders ./components/float-button/demo/description.tsx extend context correctly 1`] = `
exports[`renders components/float-button/demo/description.tsx extend context correctly 1`] = `
Array [
<button
class="ant-float-btn ant-float-btn-default ant-float-btn-square"
@ -243,7 +243,7 @@ Array [
]
`;
exports[`renders ./components/float-button/demo/group.tsx extend context correctly 1`] = `
exports[`renders components/float-button/demo/group.tsx extend context correctly 1`] = `
Array [
<div
class="ant-float-btn-group ant-float-btn-group-circle ant-float-btn-group-circle-shadow"
@ -635,7 +635,7 @@ Array [
]
`;
exports[`renders ./components/float-button/demo/group-menu.tsx extend context correctly 1`] = `
exports[`renders components/float-button/demo/group-menu.tsx extend context correctly 1`] = `
Array [
<div
class="ant-float-btn-group ant-float-btn-group-circle"
@ -756,7 +756,7 @@ Array [
]
`;
exports[`renders ./components/float-button/demo/render-panel.tsx extend context correctly 1`] = `
exports[`renders components/float-button/demo/render-panel.tsx extend context correctly 1`] = `
<div
style="display:flex;column-gap:16px;align-items:center"
>
@ -1319,7 +1319,7 @@ exports[`renders ./components/float-button/demo/render-panel.tsx extend context
</div>
`;
exports[`renders ./components/float-button/demo/shape.tsx extend context correctly 1`] = `
exports[`renders components/float-button/demo/shape.tsx extend context correctly 1`] = `
Array [
<button
class="ant-float-btn ant-float-btn-primary ant-float-btn-circle"
@ -1432,7 +1432,7 @@ Array [
]
`;
exports[`renders ./components/float-button/demo/tooltip.tsx extend context correctly 1`] = `
exports[`renders components/float-button/demo/tooltip.tsx extend context correctly 1`] = `
<button
class="ant-float-btn ant-float-btn-default ant-float-btn-circle"
type="button"
@ -1492,7 +1492,7 @@ exports[`renders ./components/float-button/demo/tooltip.tsx extend context corre
</button>
`;
exports[`renders ./components/float-button/demo/type.tsx extend context correctly 1`] = `
exports[`renders components/float-button/demo/type.tsx extend context correctly 1`] = `
Array [
<button
class="ant-float-btn ant-float-btn-primary ant-float-btn-circle"

View File

@ -1,6 +1,6 @@
// Jest Snapshot v1, https://goo.gl/fbAQLP
exports[`renders ./components/float-button/demo/back-top.tsx correctly 1`] = `
exports[`renders components/float-button/demo/back-top.tsx correctly 1`] = `
<div
style="height:500vh;padding:10px"
>
@ -28,7 +28,7 @@ exports[`renders ./components/float-button/demo/back-top.tsx correctly 1`] = `
</div>
`;
exports[`renders ./components/float-button/demo/basic.tsx correctly 1`] = `
exports[`renders components/float-button/demo/basic.tsx correctly 1`] = `
<button
class="ant-float-btn ant-float-btn-default ant-float-btn-circle"
type="button"
@ -67,7 +67,7 @@ exports[`renders ./components/float-button/demo/basic.tsx correctly 1`] = `
</button>
`;
exports[`renders ./components/float-button/demo/description.tsx correctly 1`] = `
exports[`renders components/float-button/demo/description.tsx correctly 1`] = `
Array [
<button
class="ant-float-btn ant-float-btn-default ant-float-btn-square"
@ -175,7 +175,7 @@ Array [
]
`;
exports[`renders ./components/float-button/demo/group.tsx correctly 1`] = `
exports[`renders components/float-button/demo/group.tsx correctly 1`] = `
Array [
<div
class="ant-float-btn-group ant-float-btn-group-circle ant-float-btn-group-circle-shadow"
@ -448,7 +448,7 @@ Array [
]
`;
exports[`renders ./components/float-button/demo/group-menu.tsx correctly 1`] = `
exports[`renders components/float-button/demo/group-menu.tsx correctly 1`] = `
Array [
<div
class="ant-float-btn-group ant-float-btn-group-circle"
@ -535,7 +535,7 @@ Array [
]
`;
exports[`renders ./components/float-button/demo/render-panel.tsx correctly 1`] = `
exports[`renders components/float-button/demo/render-panel.tsx correctly 1`] = `
<div
style="display:flex;column-gap:16px;align-items:center"
>
@ -928,7 +928,7 @@ exports[`renders ./components/float-button/demo/render-panel.tsx correctly 1`] =
</div>
`;
exports[`renders ./components/float-button/demo/shape.tsx correctly 1`] = `
exports[`renders components/float-button/demo/shape.tsx correctly 1`] = `
Array [
<button
class="ant-float-btn ant-float-btn-primary ant-float-btn-circle"
@ -1007,7 +1007,7 @@ Array [
]
`;
exports[`renders ./components/float-button/demo/tooltip.tsx correctly 1`] = `
exports[`renders components/float-button/demo/tooltip.tsx correctly 1`] = `
<button
class="ant-float-btn ant-float-btn-default ant-float-btn-circle"
type="button"
@ -1046,7 +1046,7 @@ exports[`renders ./components/float-button/demo/tooltip.tsx correctly 1`] = `
</button>
`;
exports[`renders ./components/float-button/demo/type.tsx correctly 1`] = `
exports[`renders components/float-button/demo/type.tsx correctly 1`] = `
Array [
<button
class="ant-float-btn ant-float-btn-primary ant-float-btn-circle"

View File

@ -90,7 +90,8 @@ export default function ItemHolder(props: ItemHolderProps) {
mergedValidateStatus = 'error';
} else if (debounceWarnings.length) {
mergedValidateStatus = 'warning';
} else if (meta.touched) {
} else if (meta.touched || (hasFeedback && meta.validated)) {
// success feedback should display when pass hasFeedback prop and current value is valid value
mergedValidateStatus = 'success';
}

View File

@ -86,6 +86,7 @@ function genEmptyMeta(): Meta {
touched: false,
validating: false,
name: [],
validated: false,
};
}

View File

@ -1,6 +1,6 @@
// Jest Snapshot v1, https://goo.gl/fbAQLP
exports[`renders ./components/form/demo/advanced-search.tsx extend context correctly 1`] = `
exports[`renders components/form/demo/advanced-search.tsx extend context correctly 1`] = `
<div>
<form
class="ant-form ant-form-horizontal"
@ -603,7 +603,7 @@ exports[`renders ./components/form/demo/advanced-search.tsx extend context corre
</div>
`;
exports[`renders ./components/form/demo/basic.tsx extend context correctly 1`] = `
exports[`renders components/form/demo/basic.tsx extend context correctly 1`] = `
<form
autocomplete="off"
class="ant-form ant-form-horizontal"
@ -788,7 +788,7 @@ exports[`renders ./components/form/demo/basic.tsx extend context correctly 1`] =
</form>
`;
exports[`renders ./components/form/demo/col-24-debug.tsx extend context correctly 1`] = `
exports[`renders components/form/demo/col-24-debug.tsx extend context correctly 1`] = `
Array [
<form
autocomplete="off"
@ -1625,7 +1625,7 @@ Array [
]
`;
exports[`renders ./components/form/demo/control-hooks.tsx extend context correctly 1`] = `
exports[`renders components/form/demo/control-hooks.tsx extend context correctly 1`] = `
<form
class="ant-form ant-form-horizontal"
id="control-hooks"
@ -1905,7 +1905,7 @@ exports[`renders ./components/form/demo/control-hooks.tsx extend context correct
</form>
`;
exports[`renders ./components/form/demo/control-ref.tsx extend context correctly 1`] = `
exports[`renders components/form/demo/control-ref.tsx extend context correctly 1`] = `
<form
class="ant-form ant-form-horizontal"
id="control-ref"
@ -2185,7 +2185,7 @@ exports[`renders ./components/form/demo/control-ref.tsx extend context correctly
</form>
`;
exports[`renders ./components/form/demo/customized-form-controls.tsx extend context correctly 1`] = `
exports[`renders components/form/demo/customized-form-controls.tsx extend context correctly 1`] = `
<form
class="ant-form ant-form-inline"
id="customized_form_controls"
@ -2400,7 +2400,7 @@ exports[`renders ./components/form/demo/customized-form-controls.tsx extend cont
</form>
`;
exports[`renders ./components/form/demo/disabled.tsx extend context correctly 1`] = `
exports[`renders components/form/demo/disabled.tsx extend context correctly 1`] = `
Array [
<label
class="ant-checkbox-wrapper ant-checkbox-wrapper-checked"
@ -5207,7 +5207,7 @@ Array [
]
`;
exports[`renders ./components/form/demo/disabled-input-debug.tsx extend context correctly 1`] = `
exports[`renders components/form/demo/disabled-input-debug.tsx extend context correctly 1`] = `
<form
class="ant-form ant-form-horizontal"
style="max-width:600px"
@ -5717,7 +5717,7 @@ exports[`renders ./components/form/demo/disabled-input-debug.tsx extend context
</form>
`;
exports[`renders ./components/form/demo/dynamic-form-item.tsx extend context correctly 1`] = `
exports[`renders components/form/demo/dynamic-form-item.tsx extend context correctly 1`] = `
<form
class="ant-form ant-form-horizontal"
id="dynamic_form_item"
@ -5842,7 +5842,7 @@ exports[`renders ./components/form/demo/dynamic-form-item.tsx extend context cor
</form>
`;
exports[`renders ./components/form/demo/dynamic-form-items.tsx extend context correctly 1`] = `
exports[`renders components/form/demo/dynamic-form-items.tsx extend context correctly 1`] = `
<form
autocomplete="off"
class="ant-form ant-form-horizontal"
@ -5933,7 +5933,7 @@ exports[`renders ./components/form/demo/dynamic-form-items.tsx extend context co
</form>
`;
exports[`renders ./components/form/demo/dynamic-form-items-complex.tsx extend context correctly 1`] = `
exports[`renders components/form/demo/dynamic-form-items-complex.tsx extend context correctly 1`] = `
<form
autocomplete="off"
class="ant-form ant-form-horizontal"
@ -6194,7 +6194,7 @@ exports[`renders ./components/form/demo/dynamic-form-items-complex.tsx extend co
</form>
`;
exports[`renders ./components/form/demo/dynamic-form-items-no-style.tsx extend context correctly 1`] = `
exports[`renders components/form/demo/dynamic-form-items-no-style.tsx extend context correctly 1`] = `
<form
autocomplete="off"
class="ant-form ant-form-horizontal"
@ -6315,7 +6315,7 @@ exports[`renders ./components/form/demo/dynamic-form-items-no-style.tsx extend c
</form>
`;
exports[`renders ./components/form/demo/dynamic-rule.tsx extend context correctly 1`] = `
exports[`renders components/form/demo/dynamic-rule.tsx extend context correctly 1`] = `
<form
class="ant-form ant-form-horizontal"
id="dynamic_rule"
@ -6467,7 +6467,7 @@ exports[`renders ./components/form/demo/dynamic-rule.tsx extend context correctl
</form>
`;
exports[`renders ./components/form/demo/form-context.tsx extend context correctly 1`] = `
exports[`renders components/form/demo/form-context.tsx extend context correctly 1`] = `
<form
class="ant-form ant-form-horizontal"
id="basicForm"
@ -6606,7 +6606,7 @@ exports[`renders ./components/form/demo/form-context.tsx extend context correctl
</form>
`;
exports[`renders ./components/form/demo/form-in-modal.tsx extend context correctly 1`] = `
exports[`renders components/form/demo/form-in-modal.tsx extend context correctly 1`] = `
<div>
<button
class="ant-btn ant-btn-primary"
@ -6619,7 +6619,7 @@ exports[`renders ./components/form/demo/form-in-modal.tsx extend context correct
</div>
`;
exports[`renders ./components/form/demo/form-item-path.tsx extend context correctly 1`] = `
exports[`renders components/form/demo/form-item-path.tsx extend context correctly 1`] = `
<form
class="ant-form ant-form-vertical"
id="form_item_path"
@ -6746,7 +6746,7 @@ exports[`renders ./components/form/demo/form-item-path.tsx extend context correc
</form>
`;
exports[`renders ./components/form/demo/global-state.tsx extend context correctly 1`] = `
exports[`renders components/form/demo/global-state.tsx extend context correctly 1`] = `
Array [
<form
class="ant-form ant-form-inline"
@ -6811,7 +6811,7 @@ Array [
]
`;
exports[`renders ./components/form/demo/inline-login.tsx extend context correctly 1`] = `
exports[`renders components/form/demo/inline-login.tsx extend context correctly 1`] = `
<form
class="ant-form ant-form-inline"
id="horizontal_login"
@ -6957,7 +6957,7 @@ exports[`renders ./components/form/demo/inline-login.tsx extend context correctl
</form>
`;
exports[`renders ./components/form/demo/label-debug.tsx extend context correctly 1`] = `
exports[`renders components/form/demo/label-debug.tsx extend context correctly 1`] = `
<form
class="ant-form ant-form-horizontal"
id="label-ellipsis"
@ -7113,7 +7113,7 @@ exports[`renders ./components/form/demo/label-debug.tsx extend context correctly
</form>
`;
exports[`renders ./components/form/demo/layout.tsx extend context correctly 1`] = `
exports[`renders components/form/demo/layout.tsx extend context correctly 1`] = `
<form
class="ant-form ant-form-horizontal"
style="max-width:600px"
@ -7315,7 +7315,7 @@ exports[`renders ./components/form/demo/layout.tsx extend context correctly 1`]
</form>
`;
exports[`renders ./components/form/demo/layout-can-wrap.tsx extend context correctly 1`] = `
exports[`renders components/form/demo/layout-can-wrap.tsx extend context correctly 1`] = `
<form
class="ant-form ant-form-horizontal"
id="wrap"
@ -7443,7 +7443,7 @@ exports[`renders ./components/form/demo/layout-can-wrap.tsx extend context corre
</form>
`;
exports[`renders ./components/form/demo/nest-messages.tsx extend context correctly 1`] = `
exports[`renders components/form/demo/nest-messages.tsx extend context correctly 1`] = `
<form
class="ant-form ant-form-horizontal"
id="nest-messages"
@ -7732,7 +7732,7 @@ exports[`renders ./components/form/demo/nest-messages.tsx extend context correct
</form>
`;
exports[`renders ./components/form/demo/normal-login.tsx extend context correctly 1`] = `
exports[`renders components/form/demo/normal-login.tsx extend context correctly 1`] = `
<form
class="ant-form ant-form-horizontal login-form"
id="normal_login"
@ -7930,7 +7930,7 @@ exports[`renders ./components/form/demo/normal-login.tsx extend context correctl
</form>
`;
exports[`renders ./components/form/demo/ref-item.tsx extend context correctly 1`] = `
exports[`renders components/form/demo/ref-item.tsx extend context correctly 1`] = `
<form
class="ant-form ant-form-horizontal"
style="max-width:600px"
@ -8017,7 +8017,7 @@ exports[`renders ./components/form/demo/ref-item.tsx extend context correctly 1`
</form>
`;
exports[`renders ./components/form/demo/register.tsx extend context correctly 1`] = `
exports[`renders components/form/demo/register.tsx extend context correctly 1`] = `
<form
class="ant-form ant-form-horizontal"
id="register"
@ -9384,7 +9384,7 @@ exports[`renders ./components/form/demo/register.tsx extend context correctly 1`
</form>
`;
exports[`renders ./components/form/demo/required-mark.tsx extend context correctly 1`] = `
exports[`renders components/form/demo/required-mark.tsx extend context correctly 1`] = `
<form
class="ant-form ant-form-vertical"
>
@ -9681,7 +9681,7 @@ exports[`renders ./components/form/demo/required-mark.tsx extend context correct
</form>
`;
exports[`renders ./components/form/demo/size.tsx extend context correctly 1`] = `
exports[`renders components/form/demo/size.tsx extend context correctly 1`] = `
<form
class="ant-form ant-form-horizontal ant-form-default"
style="max-width:600px"
@ -11092,7 +11092,7 @@ exports[`renders ./components/form/demo/size.tsx extend context correctly 1`] =
</form>
`;
exports[`renders ./components/form/demo/time-related-controls.tsx extend context correctly 1`] = `
exports[`renders components/form/demo/time-related-controls.tsx extend context correctly 1`] = `
<form
class="ant-form ant-form-horizontal"
id="time_related_controls"
@ -18687,7 +18687,7 @@ exports[`renders ./components/form/demo/time-related-controls.tsx extend context
</form>
`;
exports[`renders ./components/form/demo/useWatch.tsx extend context correctly 1`] = `
exports[`renders components/form/demo/useWatch.tsx extend context correctly 1`] = `
Array [
<form
autocomplete="off"
@ -18846,7 +18846,7 @@ Array [
]
`;
exports[`renders ./components/form/demo/validate-other.tsx extend context correctly 1`] = `
exports[`renders components/form/demo/validate-other.tsx extend context correctly 1`] = `
<form
class="ant-form ant-form-horizontal"
id="validate_other"
@ -20459,7 +20459,7 @@ exports[`renders ./components/form/demo/validate-other.tsx extend context correc
</form>
`;
exports[`renders ./components/form/demo/validate-static.tsx extend context correctly 1`] = `
exports[`renders components/form/demo/validate-static.tsx extend context correctly 1`] = `
<form
class="ant-form ant-form-horizontal"
style="max-width:600px"
@ -26592,7 +26592,7 @@ exports[`renders ./components/form/demo/validate-static.tsx extend context corre
</form>
`;
exports[`renders ./components/form/demo/warning-only.tsx extend context correctly 1`] = `
exports[`renders components/form/demo/warning-only.tsx extend context correctly 1`] = `
<form
autocomplete="off"
class="ant-form ant-form-vertical"
@ -26688,7 +26688,7 @@ exports[`renders ./components/form/demo/warning-only.tsx extend context correctl
</form>
`;
exports[`renders ./components/form/demo/without-form-create.tsx extend context correctly 1`] = `
exports[`renders components/form/demo/without-form-create.tsx extend context correctly 1`] = `
<form
class="ant-form ant-form-horizontal"
style="max-width:600px"

View File

@ -1,6 +1,6 @@
// Jest Snapshot v1, https://goo.gl/fbAQLP
exports[`renders ./components/form/demo/advanced-search.tsx correctly 1`] = `
exports[`renders components/form/demo/advanced-search.tsx correctly 1`] = `
<div>
<form
class="ant-form ant-form-horizontal"
@ -443,7 +443,7 @@ exports[`renders ./components/form/demo/advanced-search.tsx correctly 1`] = `
</div>
`;
exports[`renders ./components/form/demo/basic.tsx correctly 1`] = `
exports[`renders components/form/demo/basic.tsx correctly 1`] = `
<form
autocomplete="off"
class="ant-form ant-form-horizontal"
@ -628,7 +628,7 @@ exports[`renders ./components/form/demo/basic.tsx correctly 1`] = `
</form>
`;
exports[`renders ./components/form/demo/col-24-debug.tsx correctly 1`] = `
exports[`renders components/form/demo/col-24-debug.tsx correctly 1`] = `
Array [
<form
autocomplete="off"
@ -1255,7 +1255,7 @@ Array [
]
`;
exports[`renders ./components/form/demo/control-hooks.tsx correctly 1`] = `
exports[`renders components/form/demo/control-hooks.tsx correctly 1`] = `
<form
class="ant-form ant-form-horizontal"
id="control-hooks"
@ -1438,7 +1438,7 @@ exports[`renders ./components/form/demo/control-hooks.tsx correctly 1`] = `
</form>
`;
exports[`renders ./components/form/demo/control-ref.tsx correctly 1`] = `
exports[`renders components/form/demo/control-ref.tsx correctly 1`] = `
<form
class="ant-form ant-form-horizontal"
id="control-ref"
@ -1621,7 +1621,7 @@ exports[`renders ./components/form/demo/control-ref.tsx correctly 1`] = `
</form>
`;
exports[`renders ./components/form/demo/customized-form-controls.tsx correctly 1`] = `
exports[`renders components/form/demo/customized-form-controls.tsx correctly 1`] = `
<form
class="ant-form ant-form-inline"
id="customized_form_controls"
@ -1756,7 +1756,7 @@ exports[`renders ./components/form/demo/customized-form-controls.tsx correctly 1
</form>
`;
exports[`renders ./components/form/demo/disabled.tsx correctly 1`] = `
exports[`renders components/form/demo/disabled.tsx correctly 1`] = `
Array [
<label
class="ant-checkbox-wrapper ant-checkbox-wrapper-checked"
@ -2704,7 +2704,7 @@ Array [
]
`;
exports[`renders ./components/form/demo/disabled-input-debug.tsx correctly 1`] = `
exports[`renders components/form/demo/disabled-input-debug.tsx correctly 1`] = `
<form
class="ant-form ant-form-horizontal"
style="max-width:600px"
@ -3214,7 +3214,7 @@ exports[`renders ./components/form/demo/disabled-input-debug.tsx correctly 1`] =
</form>
`;
exports[`renders ./components/form/demo/dynamic-form-item.tsx correctly 1`] = `
exports[`renders components/form/demo/dynamic-form-item.tsx correctly 1`] = `
<form
class="ant-form ant-form-horizontal"
id="dynamic_form_item"
@ -3339,7 +3339,7 @@ exports[`renders ./components/form/demo/dynamic-form-item.tsx correctly 1`] = `
</form>
`;
exports[`renders ./components/form/demo/dynamic-form-items.tsx correctly 1`] = `
exports[`renders components/form/demo/dynamic-form-items.tsx correctly 1`] = `
<form
autocomplete="off"
class="ant-form ant-form-horizontal"
@ -3430,7 +3430,7 @@ exports[`renders ./components/form/demo/dynamic-form-items.tsx correctly 1`] = `
</form>
`;
exports[`renders ./components/form/demo/dynamic-form-items-complex.tsx correctly 1`] = `
exports[`renders components/form/demo/dynamic-form-items-complex.tsx correctly 1`] = `
<form
autocomplete="off"
class="ant-form ant-form-horizontal"
@ -3611,7 +3611,7 @@ exports[`renders ./components/form/demo/dynamic-form-items-complex.tsx correctly
</form>
`;
exports[`renders ./components/form/demo/dynamic-form-items-no-style.tsx correctly 1`] = `
exports[`renders components/form/demo/dynamic-form-items-no-style.tsx correctly 1`] = `
<form
autocomplete="off"
class="ant-form ant-form-horizontal"
@ -3732,7 +3732,7 @@ exports[`renders ./components/form/demo/dynamic-form-items-no-style.tsx correctl
</form>
`;
exports[`renders ./components/form/demo/dynamic-rule.tsx correctly 1`] = `
exports[`renders components/form/demo/dynamic-rule.tsx correctly 1`] = `
<form
class="ant-form ant-form-horizontal"
id="dynamic_rule"
@ -3884,7 +3884,7 @@ exports[`renders ./components/form/demo/dynamic-rule.tsx correctly 1`] = `
</form>
`;
exports[`renders ./components/form/demo/form-context.tsx correctly 1`] = `
exports[`renders components/form/demo/form-context.tsx correctly 1`] = `
<form
class="ant-form ant-form-horizontal"
id="basicForm"
@ -4023,7 +4023,7 @@ exports[`renders ./components/form/demo/form-context.tsx correctly 1`] = `
</form>
`;
exports[`renders ./components/form/demo/form-in-modal.tsx correctly 1`] = `
exports[`renders components/form/demo/form-in-modal.tsx correctly 1`] = `
<div>
<button
class="ant-btn ant-btn-primary"
@ -4036,7 +4036,7 @@ exports[`renders ./components/form/demo/form-in-modal.tsx correctly 1`] = `
</div>
`;
exports[`renders ./components/form/demo/form-item-path.tsx correctly 1`] = `
exports[`renders components/form/demo/form-item-path.tsx correctly 1`] = `
<form
class="ant-form ant-form-vertical"
id="form_item_path"
@ -4163,7 +4163,7 @@ exports[`renders ./components/form/demo/form-item-path.tsx correctly 1`] = `
</form>
`;
exports[`renders ./components/form/demo/global-state.tsx correctly 1`] = `
exports[`renders components/form/demo/global-state.tsx correctly 1`] = `
Array [
<form
class="ant-form ant-form-inline"
@ -4228,7 +4228,7 @@ Array [
]
`;
exports[`renders ./components/form/demo/inline-login.tsx correctly 1`] = `
exports[`renders components/form/demo/inline-login.tsx correctly 1`] = `
<form
class="ant-form ant-form-inline"
id="horizontal_login"
@ -4374,7 +4374,7 @@ exports[`renders ./components/form/demo/inline-login.tsx correctly 1`] = `
</form>
`;
exports[`renders ./components/form/demo/label-debug.tsx correctly 1`] = `
exports[`renders components/form/demo/label-debug.tsx correctly 1`] = `
<form
class="ant-form ant-form-horizontal"
id="label-ellipsis"
@ -4530,7 +4530,7 @@ exports[`renders ./components/form/demo/label-debug.tsx correctly 1`] = `
</form>
`;
exports[`renders ./components/form/demo/layout.tsx correctly 1`] = `
exports[`renders components/form/demo/layout.tsx correctly 1`] = `
<form
class="ant-form ant-form-horizontal"
style="max-width:600px"
@ -4732,7 +4732,7 @@ exports[`renders ./components/form/demo/layout.tsx correctly 1`] = `
</form>
`;
exports[`renders ./components/form/demo/layout-can-wrap.tsx correctly 1`] = `
exports[`renders components/form/demo/layout-can-wrap.tsx correctly 1`] = `
<form
class="ant-form ant-form-horizontal"
id="wrap"
@ -4860,7 +4860,7 @@ exports[`renders ./components/form/demo/layout-can-wrap.tsx correctly 1`] = `
</form>
`;
exports[`renders ./components/form/demo/nest-messages.tsx correctly 1`] = `
exports[`renders components/form/demo/nest-messages.tsx correctly 1`] = `
<form
class="ant-form ant-form-horizontal"
id="nest-messages"
@ -5149,7 +5149,7 @@ exports[`renders ./components/form/demo/nest-messages.tsx correctly 1`] = `
</form>
`;
exports[`renders ./components/form/demo/normal-login.tsx correctly 1`] = `
exports[`renders components/form/demo/normal-login.tsx correctly 1`] = `
<form
class="ant-form ant-form-horizontal login-form"
id="normal_login"
@ -5347,7 +5347,7 @@ exports[`renders ./components/form/demo/normal-login.tsx correctly 1`] = `
</form>
`;
exports[`renders ./components/form/demo/ref-item.tsx correctly 1`] = `
exports[`renders components/form/demo/ref-item.tsx correctly 1`] = `
<form
class="ant-form ant-form-horizontal"
style="max-width:600px"
@ -5434,7 +5434,7 @@ exports[`renders ./components/form/demo/ref-item.tsx correctly 1`] = `
</form>
`;
exports[`renders ./components/form/demo/register.tsx correctly 1`] = `
exports[`renders components/form/demo/register.tsx correctly 1`] = `
<form
class="ant-form ant-form-horizontal"
id="register"
@ -6425,7 +6425,7 @@ exports[`renders ./components/form/demo/register.tsx correctly 1`] = `
</form>
`;
exports[`renders ./components/form/demo/required-mark.tsx correctly 1`] = `
exports[`renders components/form/demo/required-mark.tsx correctly 1`] = `
<form
class="ant-form ant-form-vertical"
>
@ -6684,7 +6684,7 @@ exports[`renders ./components/form/demo/required-mark.tsx correctly 1`] = `
</form>
`;
exports[`renders ./components/form/demo/size.tsx correctly 1`] = `
exports[`renders components/form/demo/size.tsx correctly 1`] = `
<form
class="ant-form ant-form-horizontal ant-form-default"
style="max-width:600px"
@ -7337,7 +7337,7 @@ exports[`renders ./components/form/demo/size.tsx correctly 1`] = `
</form>
`;
exports[`renders ./components/form/demo/time-related-controls.tsx correctly 1`] = `
exports[`renders components/form/demo/time-related-controls.tsx correctly 1`] = `
<form
class="ant-form ant-form-horizontal"
id="time_related_controls"
@ -7893,7 +7893,7 @@ exports[`renders ./components/form/demo/time-related-controls.tsx correctly 1`]
</form>
`;
exports[`renders ./components/form/demo/useWatch.tsx correctly 1`] = `
exports[`renders components/form/demo/useWatch.tsx correctly 1`] = `
Array [
<form
autocomplete="off"
@ -8052,7 +8052,7 @@ Array [
]
`;
exports[`renders ./components/form/demo/validate-other.tsx correctly 1`] = `
exports[`renders components/form/demo/validate-other.tsx correctly 1`] = `
<form
class="ant-form ant-form-horizontal"
id="validate_other"
@ -9487,7 +9487,7 @@ exports[`renders ./components/form/demo/validate-other.tsx correctly 1`] = `
</form>
`;
exports[`renders ./components/form/demo/validate-static.tsx correctly 1`] = `
exports[`renders components/form/demo/validate-static.tsx correctly 1`] = `
<form
class="ant-form ant-form-horizontal"
style="max-width:600px"
@ -11283,7 +11283,7 @@ exports[`renders ./components/form/demo/validate-static.tsx correctly 1`] = `
</form>
`;
exports[`renders ./components/form/demo/warning-only.tsx correctly 1`] = `
exports[`renders components/form/demo/warning-only.tsx correctly 1`] = `
<form
autocomplete="off"
class="ant-form ant-form-vertical"
@ -11379,7 +11379,7 @@ exports[`renders ./components/form/demo/warning-only.tsx correctly 1`] = `
</form>
`;
exports[`renders ./components/form/demo/without-form-create.tsx correctly 1`] = `
exports[`renders components/form/demo/without-form-create.tsx correctly 1`] = `
<form
class="ant-form ant-form-horizontal"
style="max-width:600px"

View File

@ -1,8 +1,9 @@
import type { ChangeEventHandler } from 'react';
import React, { useState } from 'react';
import React, { useState, useEffect, useRef } from 'react';
import scrollIntoView from 'scroll-into-view-if-needed';
import classNames from 'classnames';
import type { ColProps } from 'antd/es/grid';
import type { FormInstance } from '..';
import Form from '..';
import * as Util from '../util';
import Button from '../../button';
@ -41,25 +42,6 @@ describe('Form', () => {
const errorSpy = jest.spyOn(console, 'error').mockImplementation(() => {});
const warnSpy = jest.spyOn(console, 'warn').mockImplementation(() => {});
// const change = async (
// container: ReturnType<typeof render>['container'],
// index: number,
// value: string,
// executeMockTimer: boolean,
// ) => {
// fireEvent.change(container.querySelectorAll('input')?.[index], { target: { value } });
// await sleep(200);
// if (executeMockTimer) {
// for (let i = 0; i < 10; i += 1) {
// act(() => {
// jest.runAllTimers();
// });
// }
// await sleep(1);
// }
// };
const changeValue = async (
input: HTMLElement | null | number,
value: string,
@ -1473,13 +1455,13 @@ describe('Form', () => {
const { container } = render(<Demo />);
expect(container.querySelector('.custom-input-required')?.classList).toContain(
expect(container.querySelector('.custom-input-required')?.className).toContain(
'custom-input-status-',
);
expect(container.querySelector('.custom-input-warning')?.classList).toContain(
'custom-input-status-warning',
);
expect(container.querySelector('.custom-input')?.classList).toContain('custom-input-status-');
expect(container.querySelector('.custom-input')?.className).toContain('custom-input-status-');
expect(container.querySelector('.custom-input-wrong')?.classList).toContain(
'custom-input-status-undefined',
);
@ -1583,4 +1565,65 @@ describe('Form', () => {
expect(wrapper5.container.querySelectorAll('[disabled]').length).toBe(0);
});
it('success feedback should display when pass hasFeedback prop and current value is valid value', async () => {
const App = ({ trigger = false }: { trigger?: boolean }) => {
const form = useRef<FormInstance<any>>(null);
useEffect(() => {
if (!trigger) return;
form.current?.validateFields();
}, [trigger]);
return (
<Form ref={form}>
<Form.Item
label="Success"
name="name1"
hasFeedback
initialValue="test@qq.com"
rules={[
{
type: 'email',
message: 'Please input your e-mail',
},
{
required: true,
message: 'Please input your value',
},
]}
>
<Input />
</Form.Item>
<Form.Item
label="Success"
name="name2"
initialValue="test@qq.com"
rules={[
{
type: 'email',
message: 'Please input your e-mail',
},
{
required: true,
message: 'Please input your value',
},
]}
>
<Input />
</Form.Item>
</Form>
);
};
const { container, rerender } = render(<App />);
expect(container.querySelectorAll('.ant-form-item-has-feedback').length).toBe(0);
expect(container.querySelectorAll('.ant-form-item-has-success').length).toBe(0);
rerender(<App trigger />);
await waitFakeTimer();
expect(container.querySelectorAll('.ant-form-item-has-feedback').length).toBe(1);
expect(container.querySelectorAll('.ant-form-item-has-success').length).toBe(1);
});
});

View File

@ -1,6 +1,6 @@
// Jest Snapshot v1, https://goo.gl/fbAQLP
exports[`renders ./components/grid/demo/basic.tsx extend context correctly 1`] = `
exports[`renders components/grid/demo/basic.tsx extend context correctly 1`] = `
Array [
<div
class="ant-row"
@ -71,7 +71,7 @@ Array [
]
`;
exports[`renders ./components/grid/demo/flex.tsx extend context correctly 1`] = `
exports[`renders components/grid/demo/flex.tsx extend context correctly 1`] = `
Array [
<div
class="ant-divider ant-divider-horizontal ant-divider-with-text ant-divider-with-text-left"
@ -280,7 +280,7 @@ Array [
]
`;
exports[`renders ./components/grid/demo/flex-align.tsx extend context correctly 1`] = `
exports[`renders components/grid/demo/flex-align.tsx extend context correctly 1`] = `
Array [
<div
class="ant-divider ant-divider-horizontal ant-divider-with-text ant-divider-with-text-left"
@ -435,7 +435,7 @@ Array [
]
`;
exports[`renders ./components/grid/demo/flex-order.tsx extend context correctly 1`] = `
exports[`renders components/grid/demo/flex-order.tsx extend context correctly 1`] = `
Array [
<div
class="ant-divider ant-divider-horizontal ant-divider-with-text ant-divider-with-text-left"
@ -508,7 +508,7 @@ Array [
]
`;
exports[`renders ./components/grid/demo/flex-stretch.tsx extend context correctly 1`] = `
exports[`renders components/grid/demo/flex-stretch.tsx extend context correctly 1`] = `
Array [
<div
class="ant-divider ant-divider-horizontal ant-divider-with-text ant-divider-with-text-left"
@ -611,7 +611,7 @@ Array [
]
`;
exports[`renders ./components/grid/demo/gutter.tsx extend context correctly 1`] = `
exports[`renders components/grid/demo/gutter.tsx extend context correctly 1`] = `
Array [
<div
class="ant-divider ant-divider-horizontal ant-divider-with-text ant-divider-with-text-left"
@ -821,7 +821,7 @@ Array [
]
`;
exports[`renders ./components/grid/demo/offset.tsx extend context correctly 1`] = `
exports[`renders components/grid/demo/offset.tsx extend context correctly 1`] = `
Array [
<div
class="ant-row"
@ -863,7 +863,7 @@ Array [
]
`;
exports[`renders ./components/grid/demo/playground.tsx extend context correctly 1`] = `
exports[`renders components/grid/demo/playground.tsx extend context correctly 1`] = `
Array [
<span>
Horizontal Gutter (px):
@ -1344,7 +1344,7 @@ Array [
]
`;
exports[`renders ./components/grid/demo/responsive.tsx extend context correctly 1`] = `
exports[`renders components/grid/demo/responsive.tsx extend context correctly 1`] = `
<div
class="ant-row"
>
@ -1366,7 +1366,7 @@ exports[`renders ./components/grid/demo/responsive.tsx extend context correctly
</div>
`;
exports[`renders ./components/grid/demo/responsive-more.tsx extend context correctly 1`] = `
exports[`renders components/grid/demo/responsive-more.tsx extend context correctly 1`] = `
<div
class="ant-row"
>
@ -1388,7 +1388,7 @@ exports[`renders ./components/grid/demo/responsive-more.tsx extend context corre
</div>
`;
exports[`renders ./components/grid/demo/sort.tsx extend context correctly 1`] = `
exports[`renders components/grid/demo/sort.tsx extend context correctly 1`] = `
<div
class="ant-row"
>
@ -1405,7 +1405,7 @@ exports[`renders ./components/grid/demo/sort.tsx extend context correctly 1`] =
</div>
`;
exports[`renders ./components/grid/demo/useBreakpoint.tsx extend context correctly 1`] = `
exports[`renders components/grid/demo/useBreakpoint.tsx extend context correctly 1`] = `
Array [
Current break point:,
<!-- -->,

View File

@ -1,6 +1,6 @@
// Jest Snapshot v1, https://goo.gl/fbAQLP
exports[`renders ./components/grid/demo/basic.tsx correctly 1`] = `
exports[`renders components/grid/demo/basic.tsx correctly 1`] = `
Array [
<div
class="ant-row"
@ -71,7 +71,7 @@ Array [
]
`;
exports[`renders ./components/grid/demo/flex.tsx correctly 1`] = `
exports[`renders components/grid/demo/flex.tsx correctly 1`] = `
Array [
<div
class="ant-divider ant-divider-horizontal ant-divider-with-text ant-divider-with-text-left"
@ -280,7 +280,7 @@ Array [
]
`;
exports[`renders ./components/grid/demo/flex-align.tsx correctly 1`] = `
exports[`renders components/grid/demo/flex-align.tsx correctly 1`] = `
Array [
<div
class="ant-divider ant-divider-horizontal ant-divider-with-text ant-divider-with-text-left"
@ -435,7 +435,7 @@ Array [
]
`;
exports[`renders ./components/grid/demo/flex-order.tsx correctly 1`] = `
exports[`renders components/grid/demo/flex-order.tsx correctly 1`] = `
Array [
<div
class="ant-divider ant-divider-horizontal ant-divider-with-text ant-divider-with-text-left"
@ -508,7 +508,7 @@ Array [
]
`;
exports[`renders ./components/grid/demo/flex-stretch.tsx correctly 1`] = `
exports[`renders components/grid/demo/flex-stretch.tsx correctly 1`] = `
Array [
<div
class="ant-divider ant-divider-horizontal ant-divider-with-text ant-divider-with-text-left"
@ -611,7 +611,7 @@ Array [
]
`;
exports[`renders ./components/grid/demo/gutter.tsx correctly 1`] = `
exports[`renders components/grid/demo/gutter.tsx correctly 1`] = `
Array [
<div
class="ant-divider ant-divider-horizontal ant-divider-with-text ant-divider-with-text-left"
@ -821,7 +821,7 @@ Array [
]
`;
exports[`renders ./components/grid/demo/offset.tsx correctly 1`] = `
exports[`renders components/grid/demo/offset.tsx correctly 1`] = `
Array [
<div
class="ant-row"
@ -863,7 +863,7 @@ Array [
]
`;
exports[`renders ./components/grid/demo/playground.tsx correctly 1`] = `
exports[`renders components/grid/demo/playground.tsx correctly 1`] = `
Array [
<span>
Horizontal Gutter (px):
@ -1287,7 +1287,7 @@ Array [
]
`;
exports[`renders ./components/grid/demo/responsive.tsx correctly 1`] = `
exports[`renders components/grid/demo/responsive.tsx correctly 1`] = `
<div
class="ant-row"
>
@ -1309,7 +1309,7 @@ exports[`renders ./components/grid/demo/responsive.tsx correctly 1`] = `
</div>
`;
exports[`renders ./components/grid/demo/responsive-more.tsx correctly 1`] = `
exports[`renders components/grid/demo/responsive-more.tsx correctly 1`] = `
<div
class="ant-row"
>
@ -1331,7 +1331,7 @@ exports[`renders ./components/grid/demo/responsive-more.tsx correctly 1`] = `
</div>
`;
exports[`renders ./components/grid/demo/sort.tsx correctly 1`] = `
exports[`renders components/grid/demo/sort.tsx correctly 1`] = `
<div
class="ant-row"
>
@ -1348,7 +1348,7 @@ exports[`renders ./components/grid/demo/sort.tsx correctly 1`] = `
</div>
`;
exports[`renders ./components/grid/demo/useBreakpoint.tsx correctly 1`] = `
exports[`renders components/grid/demo/useBreakpoint.tsx correctly 1`] = `
Array [
Current break point:,
<!-- -->,

View File

@ -1,6 +1,6 @@
// Jest Snapshot v1, https://goo.gl/fbAQLP
exports[`renders ./components/icon/demo/basic.tsx extend context correctly 1`] = `
exports[`renders components/icon/demo/basic.tsx extend context correctly 1`] = `
<div
class="ant-space ant-space-horizontal ant-space-align-center"
>
@ -151,7 +151,7 @@ exports[`renders ./components/icon/demo/basic.tsx extend context correctly 1`] =
</div>
`;
exports[`renders ./components/icon/demo/custom.tsx extend context correctly 1`] = `
exports[`renders components/icon/demo/custom.tsx extend context correctly 1`] = `
<div
class="ant-space ant-space-horizontal ant-space-align-center"
>
@ -286,7 +286,7 @@ exports[`renders ./components/icon/demo/custom.tsx extend context correctly 1`]
</div>
`;
exports[`renders ./components/icon/demo/iconfont.tsx extend context correctly 1`] = `
exports[`renders components/icon/demo/iconfont.tsx extend context correctly 1`] = `
<div
class="ant-space ant-space-horizontal ant-space-align-center"
>
@ -358,7 +358,7 @@ exports[`renders ./components/icon/demo/iconfont.tsx extend context correctly 1`
</div>
`;
exports[`renders ./components/icon/demo/scriptUrl.tsx extend context correctly 1`] = `
exports[`renders components/icon/demo/scriptUrl.tsx extend context correctly 1`] = `
<div
class="ant-space ant-space-horizontal ant-space-align-center"
>
@ -452,7 +452,7 @@ exports[`renders ./components/icon/demo/scriptUrl.tsx extend context correctly 1
</div>
`;
exports[`renders ./components/icon/demo/two-tone.tsx extend context correctly 1`] = `
exports[`renders components/icon/demo/two-tone.tsx extend context correctly 1`] = `
<div
class="ant-space ant-space-horizontal ant-space-align-center"
>

View File

@ -1,6 +1,6 @@
// Jest Snapshot v1, https://goo.gl/fbAQLP
exports[`renders ./components/icon/demo/basic.tsx correctly 1`] = `
exports[`renders components/icon/demo/basic.tsx correctly 1`] = `
<div
class="ant-space ant-space-horizontal ant-space-align-center"
>
@ -151,7 +151,7 @@ exports[`renders ./components/icon/demo/basic.tsx correctly 1`] = `
</div>
`;
exports[`renders ./components/icon/demo/custom.tsx correctly 1`] = `
exports[`renders components/icon/demo/custom.tsx correctly 1`] = `
<div
class="ant-space ant-space-horizontal ant-space-align-center"
>
@ -286,7 +286,7 @@ exports[`renders ./components/icon/demo/custom.tsx correctly 1`] = `
</div>
`;
exports[`renders ./components/icon/demo/iconfont.tsx correctly 1`] = `
exports[`renders components/icon/demo/iconfont.tsx correctly 1`] = `
<div
class="ant-space ant-space-horizontal ant-space-align-center"
>
@ -358,7 +358,7 @@ exports[`renders ./components/icon/demo/iconfont.tsx correctly 1`] = `
</div>
`;
exports[`renders ./components/icon/demo/scriptUrl.tsx correctly 1`] = `
exports[`renders components/icon/demo/scriptUrl.tsx correctly 1`] = `
<div
class="ant-space ant-space-horizontal ant-space-align-center"
>
@ -452,7 +452,7 @@ exports[`renders ./components/icon/demo/scriptUrl.tsx correctly 1`] = `
</div>
`;
exports[`renders ./components/icon/demo/two-tone.tsx correctly 1`] = `
exports[`renders components/icon/demo/two-tone.tsx correctly 1`] = `
<div
class="ant-space ant-space-horizontal ant-space-align-center"
>

View File

@ -1,6 +1,6 @@
// Jest Snapshot v1, https://goo.gl/fbAQLP
exports[`renders ./components/image/demo/basic.tsx extend context correctly 1`] = `
exports[`renders components/image/demo/basic.tsx extend context correctly 1`] = `
<div
class="ant-image"
style="width:200px"
@ -41,7 +41,7 @@ exports[`renders ./components/image/demo/basic.tsx extend context correctly 1`]
</div>
`;
exports[`renders ./components/image/demo/controlled-preview.tsx extend context correctly 1`] = `
exports[`renders components/image/demo/controlled-preview.tsx extend context correctly 1`] = `
Array [
<div>
scaleStep:
@ -175,7 +175,7 @@ Array [
]
`;
exports[`renders ./components/image/demo/fallback.tsx extend context correctly 1`] = `
exports[`renders components/image/demo/fallback.tsx extend context correctly 1`] = `
<div
class="ant-image"
style="width:200px;height:200px"
@ -218,7 +218,7 @@ exports[`renders ./components/image/demo/fallback.tsx extend context correctly 1
</div>
`;
exports[`renders ./components/image/demo/placeholder.tsx extend context correctly 1`] = `
exports[`renders components/image/demo/placeholder.tsx extend context correctly 1`] = `
<div
class="ant-space ant-space-horizontal ant-space-align-center"
>
@ -295,7 +295,7 @@ exports[`renders ./components/image/demo/placeholder.tsx extend context correctl
</div>
`;
exports[`renders ./components/image/demo/preview-group.tsx extend context correctly 1`] = `
exports[`renders components/image/demo/preview-group.tsx extend context correctly 1`] = `
Array [
<div
class="ant-image"
@ -376,7 +376,7 @@ Array [
]
`;
exports[`renders ./components/image/demo/preview-group-top-progress.tsx extend context correctly 1`] = `
exports[`renders components/image/demo/preview-group-top-progress.tsx extend context correctly 1`] = `
Array [
<div
class="ant-image"
@ -495,7 +495,7 @@ Array [
]
`;
exports[`renders ./components/image/demo/preview-group-visible.tsx extend context correctly 1`] = `
exports[`renders components/image/demo/preview-group-visible.tsx extend context correctly 1`] = `
Array [
<div
class="ant-image"
@ -650,7 +650,7 @@ Array [
]
`;
exports[`renders ./components/image/demo/preview-mask.tsx extend context correctly 1`] = `
exports[`renders components/image/demo/preview-mask.tsx extend context correctly 1`] = `
<div
class="ant-image"
style="width:96px"
@ -700,7 +700,7 @@ exports[`renders ./components/image/demo/preview-mask.tsx extend context correct
</div>
`;
exports[`renders ./components/image/demo/previewSrc.tsx extend context correctly 1`] = `
exports[`renders components/image/demo/previewSrc.tsx extend context correctly 1`] = `
<div
class="ant-image"
style="width:200px"

View File

@ -1,6 +1,6 @@
// Jest Snapshot v1, https://goo.gl/fbAQLP
exports[`renders ./components/image/demo/basic.tsx correctly 1`] = `
exports[`renders components/image/demo/basic.tsx correctly 1`] = `
<div
class="ant-image"
style="width:200px"
@ -41,7 +41,7 @@ exports[`renders ./components/image/demo/basic.tsx correctly 1`] = `
</div>
`;
exports[`renders ./components/image/demo/controlled-preview.tsx correctly 1`] = `
exports[`renders components/image/demo/controlled-preview.tsx correctly 1`] = `
Array [
<div>
scaleStep:
@ -175,7 +175,7 @@ Array [
]
`;
exports[`renders ./components/image/demo/fallback.tsx correctly 1`] = `
exports[`renders components/image/demo/fallback.tsx correctly 1`] = `
<div
class="ant-image"
style="width:200px;height:200px"
@ -218,7 +218,7 @@ exports[`renders ./components/image/demo/fallback.tsx correctly 1`] = `
</div>
`;
exports[`renders ./components/image/demo/placeholder.tsx correctly 1`] = `
exports[`renders components/image/demo/placeholder.tsx correctly 1`] = `
<div
class="ant-space ant-space-horizontal ant-space-align-center"
>
@ -295,7 +295,7 @@ exports[`renders ./components/image/demo/placeholder.tsx correctly 1`] = `
</div>
`;
exports[`renders ./components/image/demo/preview-group.tsx correctly 1`] = `
exports[`renders components/image/demo/preview-group.tsx correctly 1`] = `
Array [
<div
class="ant-image"
@ -376,7 +376,7 @@ Array [
]
`;
exports[`renders ./components/image/demo/preview-group-top-progress.tsx correctly 1`] = `
exports[`renders components/image/demo/preview-group-top-progress.tsx correctly 1`] = `
Array [
<div
class="ant-image"
@ -495,7 +495,7 @@ Array [
]
`;
exports[`renders ./components/image/demo/preview-group-visible.tsx correctly 1`] = `
exports[`renders components/image/demo/preview-group-visible.tsx correctly 1`] = `
Array [
<div
class="ant-image"
@ -650,7 +650,7 @@ Array [
]
`;
exports[`renders ./components/image/demo/preview-mask.tsx correctly 1`] = `
exports[`renders components/image/demo/preview-mask.tsx correctly 1`] = `
<div
class="ant-image"
style="width:96px"
@ -700,7 +700,7 @@ exports[`renders ./components/image/demo/preview-mask.tsx correctly 1`] = `
</div>
`;
exports[`renders ./components/image/demo/previewSrc.tsx correctly 1`] = `
exports[`renders components/image/demo/previewSrc.tsx correctly 1`] = `
<div
class="ant-image"
style="width:200px"

View File

@ -1,6 +1,6 @@
// Jest Snapshot v1, https://goo.gl/fbAQLP
exports[`renders ./components/input-number/demo/addon.tsx extend context correctly 1`] = `
exports[`renders components/input-number/demo/addon.tsx extend context correctly 1`] = `
<div
class="ant-space ant-space-vertical"
>
@ -843,7 +843,7 @@ exports[`renders ./components/input-number/demo/addon.tsx extend context correct
</div>
`;
exports[`renders ./components/input-number/demo/basic.tsx extend context correctly 1`] = `
exports[`renders components/input-number/demo/basic.tsx extend context correctly 1`] = `
<div
class="ant-input-number"
>
@ -922,7 +922,7 @@ exports[`renders ./components/input-number/demo/basic.tsx extend context correct
</div>
`;
exports[`renders ./components/input-number/demo/borderless.tsx extend context correctly 1`] = `
exports[`renders components/input-number/demo/borderless.tsx extend context correctly 1`] = `
<div
class="ant-input-number ant-input-number-borderless"
>
@ -1001,7 +1001,7 @@ exports[`renders ./components/input-number/demo/borderless.tsx extend context co
</div>
`;
exports[`renders ./components/input-number/demo/controls.tsx extend context correctly 1`] = `
exports[`renders components/input-number/demo/controls.tsx extend context correctly 1`] = `
<div
class="ant-input-number"
>
@ -1085,7 +1085,7 @@ exports[`renders ./components/input-number/demo/controls.tsx extend context corr
</div>
`;
exports[`renders ./components/input-number/demo/debug-token.tsx extend context correctly 1`] = `
exports[`renders components/input-number/demo/debug-token.tsx extend context correctly 1`] = `
<div
class="ant-space ant-space-horizontal ant-space-align-center"
>
@ -1247,7 +1247,7 @@ exports[`renders ./components/input-number/demo/debug-token.tsx extend context c
</div>
`;
exports[`renders ./components/input-number/demo/digit.tsx extend context correctly 1`] = `
exports[`renders components/input-number/demo/digit.tsx extend context correctly 1`] = `
<div
class="ant-input-number"
style="width:200px"
@ -1327,7 +1327,7 @@ exports[`renders ./components/input-number/demo/digit.tsx extend context correct
</div>
`;
exports[`renders ./components/input-number/demo/disabled.tsx extend context correctly 1`] = `
exports[`renders components/input-number/demo/disabled.tsx extend context correctly 1`] = `
Array [
<div
class="ant-input-number ant-input-number-disabled"
@ -1421,7 +1421,7 @@ Array [
]
`;
exports[`renders ./components/input-number/demo/formatter.tsx extend context correctly 1`] = `
exports[`renders components/input-number/demo/formatter.tsx extend context correctly 1`] = `
<div
class="ant-space ant-space-horizontal ant-space-align-center"
>
@ -1587,7 +1587,7 @@ exports[`renders ./components/input-number/demo/formatter.tsx extend context cor
</div>
`;
exports[`renders ./components/input-number/demo/keyboard.tsx extend context correctly 1`] = `
exports[`renders components/input-number/demo/keyboard.tsx extend context correctly 1`] = `
<div
class="ant-space ant-space-horizontal ant-space-align-center"
>
@ -1698,7 +1698,7 @@ exports[`renders ./components/input-number/demo/keyboard.tsx extend context corr
</div>
`;
exports[`renders ./components/input-number/demo/out-of-range.tsx extend context correctly 1`] = `
exports[`renders components/input-number/demo/out-of-range.tsx extend context correctly 1`] = `
<div
class="ant-space ant-space-horizontal ant-space-align-center"
>
@ -1798,7 +1798,7 @@ exports[`renders ./components/input-number/demo/out-of-range.tsx extend context
</div>
`;
exports[`renders ./components/input-number/demo/prefix.tsx extend context correctly 1`] = `
exports[`renders components/input-number/demo/prefix.tsx extend context correctly 1`] = `
Array [
<div
class="ant-input-number-affix-wrapper"
@ -2088,7 +2088,7 @@ Array [
]
`;
exports[`renders ./components/input-number/demo/render-panel.tsx extend context correctly 1`] = `
exports[`renders components/input-number/demo/render-panel.tsx extend context correctly 1`] = `
<div
style="display:flex;flex-direction:column;row-gap:16px"
>
@ -2169,7 +2169,7 @@ exports[`renders ./components/input-number/demo/render-panel.tsx extend context
</div>
`;
exports[`renders ./components/input-number/demo/size.tsx extend context correctly 1`] = `
exports[`renders components/input-number/demo/size.tsx extend context correctly 1`] = `
<div
class="ant-space ant-space-horizontal ant-space-align-center"
>
@ -2418,7 +2418,7 @@ exports[`renders ./components/input-number/demo/size.tsx extend context correctl
</div>
`;
exports[`renders ./components/input-number/demo/status.tsx extend context correctly 1`] = `
exports[`renders components/input-number/demo/status.tsx extend context correctly 1`] = `
<div
class="ant-space ant-space-vertical"
style="width:100%"

View File

@ -1,6 +1,6 @@
// Jest Snapshot v1, https://goo.gl/fbAQLP
exports[`renders ./components/input-number/demo/addon.tsx correctly 1`] = `
exports[`renders components/input-number/demo/addon.tsx correctly 1`] = `
<div
class="ant-space ant-space-vertical"
>
@ -577,7 +577,7 @@ exports[`renders ./components/input-number/demo/addon.tsx correctly 1`] = `
</div>
`;
exports[`renders ./components/input-number/demo/basic.tsx correctly 1`] = `
exports[`renders components/input-number/demo/basic.tsx correctly 1`] = `
<div
class="ant-input-number"
>
@ -656,7 +656,7 @@ exports[`renders ./components/input-number/demo/basic.tsx correctly 1`] = `
</div>
`;
exports[`renders ./components/input-number/demo/borderless.tsx correctly 1`] = `
exports[`renders components/input-number/demo/borderless.tsx correctly 1`] = `
<div
class="ant-input-number ant-input-number-borderless"
>
@ -735,7 +735,7 @@ exports[`renders ./components/input-number/demo/borderless.tsx correctly 1`] = `
</div>
`;
exports[`renders ./components/input-number/demo/controls.tsx correctly 1`] = `
exports[`renders components/input-number/demo/controls.tsx correctly 1`] = `
<div
class="ant-input-number"
>
@ -819,7 +819,7 @@ exports[`renders ./components/input-number/demo/controls.tsx correctly 1`] = `
</div>
`;
exports[`renders ./components/input-number/demo/debug-token.tsx correctly 1`] = `
exports[`renders components/input-number/demo/debug-token.tsx correctly 1`] = `
<div
class="ant-space ant-space-horizontal ant-space-align-center"
>
@ -981,7 +981,7 @@ exports[`renders ./components/input-number/demo/debug-token.tsx correctly 1`] =
</div>
`;
exports[`renders ./components/input-number/demo/digit.tsx correctly 1`] = `
exports[`renders components/input-number/demo/digit.tsx correctly 1`] = `
<div
class="ant-input-number"
style="width:200px"
@ -1061,7 +1061,7 @@ exports[`renders ./components/input-number/demo/digit.tsx correctly 1`] = `
</div>
`;
exports[`renders ./components/input-number/demo/disabled.tsx correctly 1`] = `
exports[`renders components/input-number/demo/disabled.tsx correctly 1`] = `
Array [
<div
class="ant-input-number ant-input-number-disabled"
@ -1155,7 +1155,7 @@ Array [
]
`;
exports[`renders ./components/input-number/demo/formatter.tsx correctly 1`] = `
exports[`renders components/input-number/demo/formatter.tsx correctly 1`] = `
<div
class="ant-space ant-space-horizontal ant-space-align-center"
>
@ -1321,7 +1321,7 @@ exports[`renders ./components/input-number/demo/formatter.tsx correctly 1`] = `
</div>
`;
exports[`renders ./components/input-number/demo/keyboard.tsx correctly 1`] = `
exports[`renders components/input-number/demo/keyboard.tsx correctly 1`] = `
<div
class="ant-space ant-space-horizontal ant-space-align-center"
>
@ -1432,7 +1432,7 @@ exports[`renders ./components/input-number/demo/keyboard.tsx correctly 1`] = `
</div>
`;
exports[`renders ./components/input-number/demo/out-of-range.tsx correctly 1`] = `
exports[`renders components/input-number/demo/out-of-range.tsx correctly 1`] = `
<div
class="ant-space ant-space-horizontal ant-space-align-center"
>
@ -1532,7 +1532,7 @@ exports[`renders ./components/input-number/demo/out-of-range.tsx correctly 1`] =
</div>
`;
exports[`renders ./components/input-number/demo/prefix.tsx correctly 1`] = `
exports[`renders components/input-number/demo/prefix.tsx correctly 1`] = `
Array [
<div
class="ant-input-number-affix-wrapper"
@ -1822,7 +1822,7 @@ Array [
]
`;
exports[`renders ./components/input-number/demo/render-panel.tsx correctly 1`] = `
exports[`renders components/input-number/demo/render-panel.tsx correctly 1`] = `
<div
style="display:flex;flex-direction:column;row-gap:16px"
>
@ -1903,7 +1903,7 @@ exports[`renders ./components/input-number/demo/render-panel.tsx correctly 1`] =
</div>
`;
exports[`renders ./components/input-number/demo/size.tsx correctly 1`] = `
exports[`renders components/input-number/demo/size.tsx correctly 1`] = `
<div
class="ant-space ant-space-horizontal ant-space-align-center"
>
@ -2152,7 +2152,7 @@ exports[`renders ./components/input-number/demo/size.tsx correctly 1`] = `
</div>
`;
exports[`renders ./components/input-number/demo/status.tsx correctly 1`] = `
exports[`renders components/input-number/demo/status.tsx correctly 1`] = `
<div
class="ant-space ant-space-vertical"
style="width:100%"

View File

@ -263,6 +263,10 @@ const genInputNumberStyles: GenerateStyle<InputNumberToken> = (token: InputNumbe
[`${componentCls}-handler-wrap`]: {
display: 'none',
},
[`${componentCls}-input`]: {
color: 'inherit',
},
},
[`

View File

@ -4,6 +4,7 @@ import { useContext, useMemo } from 'react';
import { ConfigContext } from '../config-provider';
import type { FormItemStatusContextProps } from '../form/context';
import { FormItemInputContext } from '../form/context';
import warning from '../_util/warning';
import useStyle from './style';
export interface GroupProps {
@ -47,6 +48,14 @@ const Group: React.FC<GroupProps> = (props) => {
[formItemContext],
);
if (process.env.NODE_ENV !== 'production') {
warning(
false,
'Input.Group',
`'Input.Group' is deprecated. Please use 'Space.Compact' instead.`,
);
}
return wrapSSR(
<span
className={cls}

View File

@ -1,6 +1,6 @@
// Jest Snapshot v1, https://goo.gl/fbAQLP
exports[`renders ./components/input/demo/addon.tsx extend context correctly 1`] = `
exports[`renders components/input/demo/addon.tsx extend context correctly 1`] = `
<div
class="ant-space ant-space-vertical"
>
@ -597,7 +597,7 @@ exports[`renders ./components/input/demo/addon.tsx extend context correctly 1`]
</div>
`;
exports[`renders ./components/input/demo/align.tsx extend context correctly 1`] = `
exports[`renders components/input/demo/align.tsx extend context correctly 1`] = `
Array [
<div
class="ant-mentions"
@ -4831,7 +4831,7 @@ Array [
]
`;
exports[`renders ./components/input/demo/allowClear.tsx extend context correctly 1`] = `
exports[`renders components/input/demo/allowClear.tsx extend context correctly 1`] = `
Array [
<span
class="ant-input-affix-wrapper"
@ -4914,7 +4914,7 @@ Array [
]
`;
exports[`renders ./components/input/demo/autosize-textarea.tsx extend context correctly 1`] = `
exports[`renders components/input/demo/autosize-textarea.tsx extend context correctly 1`] = `
Array [
<textarea
class="ant-input"
@ -4937,7 +4937,7 @@ Array [
]
`;
exports[`renders ./components/input/demo/basic.tsx extend context correctly 1`] = `
exports[`renders components/input/demo/basic.tsx extend context correctly 1`] = `
<input
class="ant-input"
placeholder="Basic usage"
@ -4946,7 +4946,7 @@ exports[`renders ./components/input/demo/basic.tsx extend context correctly 1`]
/>
`;
exports[`renders ./components/input/demo/borderless.tsx extend context correctly 1`] = `
exports[`renders components/input/demo/borderless.tsx extend context correctly 1`] = `
<input
class="ant-input ant-input-borderless"
placeholder="Borderless"
@ -4955,7 +4955,7 @@ exports[`renders ./components/input/demo/borderless.tsx extend context correctly
/>
`;
exports[`renders ./components/input/demo/borderless-debug.tsx extend context correctly 1`] = `
exports[`renders components/input/demo/borderless-debug.tsx extend context correctly 1`] = `
<div
style="background-color:rgba(0, 0, 128, .2)"
>
@ -5130,7 +5130,313 @@ exports[`renders ./components/input/demo/borderless-debug.tsx extend context cor
</div>
`;
exports[`renders ./components/input/demo/debug-addon.tsx extend context correctly 1`] = `
exports[`renders components/input/demo/compact-style.tsx extend context correctly 1`] = `
<div
class="ant-space ant-space-vertical"
>
<div
class="ant-space-item"
style="margin-bottom:16px"
>
<div
class="ant-space-compact"
>
<input
class="ant-input ant-input-compact-item ant-input-compact-first-item ant-input-compact-last-item"
type="text"
value="26888888"
/>
</div>
</div>
<div
class="ant-space-item"
style="margin-bottom:16px"
>
<div
class="ant-space-compact"
>
<input
class="ant-input ant-input-compact-item ant-input-compact-first-item"
style="width:20%"
type="text"
value="0571"
/>
<input
class="ant-input ant-input-compact-item ant-input-compact-last-item"
style="width:80%"
type="text"
value="26888888"
/>
</div>
</div>
<div
class="ant-space-item"
style="margin-bottom:16px"
>
<div
class="ant-space-compact"
>
<span
class="ant-input-group-wrapper ant-input-search ant-input-search-middle ant-input-compact-item ant-input-compact-first-item ant-input-compact-last-item"
>
<span
class="ant-input-wrapper ant-input-group"
>
<span
class="ant-input-group-addon"
>
https://
</span>
<span
class="ant-input-affix-wrapper"
>
<input
class="ant-input"
placeholder="input search text"
type="text"
value=""
/>
<span
class="ant-input-suffix"
>
<span
class="ant-input-clear-icon ant-input-clear-icon-hidden"
role="button"
tabindex="-1"
>
<span
aria-label="close-circle"
class="anticon anticon-close-circle"
role="img"
>
<svg
aria-hidden="true"
data-icon="close-circle"
fill="currentColor"
focusable="false"
height="1em"
viewBox="64 64 896 896"
width="1em"
>
<path
d="M512 64C264.6 64 64 264.6 64 512s200.6 448 448 448 448-200.6 448-448S759.4 64 512 64zm165.4 618.2l-66-.3L512 563.4l-99.3 118.4-66.1.3c-4.4 0-8-3.5-8-8 0-1.9.7-3.7 1.9-5.2l130.1-155L340.5 359a8.32 8.32 0 01-1.9-5.2c0-4.4 3.6-8 8-8l66.1.3L512 464.6l99.3-118.4 66-.3c4.4 0 8 3.5 8 8 0 1.9-.7 3.7-1.9 5.2L553.5 514l130 155c1.2 1.5 1.9 3.3 1.9 5.2 0 4.4-3.6 8-8 8z"
/>
</svg>
</span>
</span>
</span>
</span>
<span
class="ant-input-group-addon"
>
<button
class="ant-btn ant-btn-default ant-btn-icon-only ant-input-search-button"
type="button"
>
<span
aria-label="search"
class="anticon anticon-search"
role="img"
>
<svg
aria-hidden="true"
data-icon="search"
fill="currentColor"
focusable="false"
height="1em"
viewBox="64 64 896 896"
width="1em"
>
<path
d="M909.6 854.5L649.9 594.8C690.2 542.7 712 479 712 412c0-80.2-31.3-155.4-87.9-212.1-56.6-56.7-132-87.9-212.1-87.9s-155.5 31.3-212.1 87.9C143.2 256.5 112 331.8 112 412c0 80.1 31.3 155.5 87.9 212.1C256.5 680.8 331.8 712 412 712c67 0 130.6-21.8 182.7-62l259.7 259.6a8.2 8.2 0 0011.6 0l43.6-43.5a8.2 8.2 0 000-11.6zM570.4 570.4C528 612.7 471.8 636 412 636s-116-23.3-158.4-65.6C211.3 528 188 471.8 188 412s23.3-116.1 65.6-158.4C296 211.3 352.2 188 412 188s116.1 23.2 158.4 65.6S636 352.2 636 412s-23.3 116.1-65.6 158.4z"
/>
</svg>
</span>
</button>
</span>
</span>
</span>
</div>
</div>
<div
class="ant-space-item"
style="margin-bottom:16px"
>
<div
class="ant-space-compact"
style="width:100%"
>
<input
class="ant-input ant-input-compact-item ant-input-compact-first-item"
type="text"
value="Combine input and button"
/>
<button
class="ant-btn ant-btn-primary ant-btn-compact-item ant-btn-compact-last-item"
type="button"
>
<span>
Submit
</span>
</button>
</div>
</div>
<div
class="ant-space-item"
>
<div
class="ant-space-compact"
>
<div
class="ant-select ant-select-compact-item ant-select-compact-first-item ant-select-single ant-select-show-arrow"
>
<div
class="ant-select-selector"
>
<span
class="ant-select-selection-search"
>
<input
aria-activedescendant="undefined_list_0"
aria-autocomplete="list"
aria-controls="undefined_list"
aria-haspopup="listbox"
aria-owns="undefined_list"
autocomplete="off"
class="ant-select-selection-search-input"
readonly=""
role="combobox"
style="opacity:0"
type="search"
unselectable="on"
value=""
/>
</span>
<span
class="ant-select-selection-item"
title="Zhejiang"
>
Zhejiang
</span>
</div>
<div
class="ant-select-dropdown ant-select-dropdown-placement-bottomLeft"
style="left:-1000vw;top:-1000vh;box-sizing:border-box"
>
<div>
<div
id="undefined_list"
role="listbox"
style="height:0;width:0;overflow:hidden"
>
<div
aria-label="Zhejiang"
aria-selected="false"
id="undefined_list_0"
role="option"
>
zhejiang
</div>
<div
aria-label="Jiangsu"
aria-selected="false"
id="undefined_list_1"
role="option"
>
jiangsu
</div>
</div>
<div
class="rc-virtual-list"
style="position:relative"
>
<div
class="rc-virtual-list-holder"
style="max-height:256px;overflow-y:auto;overflow-anchor:none"
>
<div>
<div
class="rc-virtual-list-holder-inner"
style="display:flex;flex-direction:column"
>
<div
aria-selected="false"
class="ant-select-item ant-select-item-option ant-select-item-option-active"
title="Zhejiang"
>
<div
class="ant-select-item-option-content"
>
Zhejiang
</div>
<span
aria-hidden="true"
class="ant-select-item-option-state"
style="user-select:none;-webkit-user-select:none"
unselectable="on"
/>
</div>
<div
aria-selected="false"
class="ant-select-item ant-select-item-option"
title="Jiangsu"
>
<div
class="ant-select-item-option-content"
>
Jiangsu
</div>
<span
aria-hidden="true"
class="ant-select-item-option-state"
style="user-select:none;-webkit-user-select:none"
unselectable="on"
/>
</div>
</div>
</div>
</div>
</div>
</div>
</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>
<input
class="ant-input ant-input-compact-item ant-input-compact-last-item"
type="text"
value="Xihu District, Hangzhou"
/>
</div>
</div>
</div>
`;
exports[`renders components/input/demo/debug-addon.tsx extend context correctly 1`] = `
<div
class="ant-space ant-space-vertical"
>
@ -5266,7 +5572,7 @@ exports[`renders ./components/input/demo/debug-addon.tsx extend context correctl
</div>
`;
exports[`renders ./components/input/demo/focus.tsx extend context correctly 1`] = `
exports[`renders components/input/demo/focus.tsx extend context correctly 1`] = `
<div
class="ant-space ant-space-vertical"
style="width:100%"
@ -5381,7 +5687,7 @@ exports[`renders ./components/input/demo/focus.tsx extend context correctly 1`]
</div>
`;
exports[`renders ./components/input/demo/group.tsx extend context correctly 1`] = `
exports[`renders components/input/demo/group.tsx extend context correctly 1`] = `
<div
class="site-input-group-wrapper"
>
@ -8829,7 +9135,7 @@ exports[`renders ./components/input/demo/group.tsx extend context correctly 1`]
</div>
`;
exports[`renders ./components/input/demo/password-input.tsx extend context correctly 1`] = `
exports[`renders components/input/demo/password-input.tsx extend context correctly 1`] = `
<div
class="ant-space ant-space-vertical"
>
@ -8983,7 +9289,7 @@ exports[`renders ./components/input/demo/password-input.tsx extend context corre
</div>
`;
exports[`renders ./components/input/demo/presuffix.tsx extend context correctly 1`] = `
exports[`renders components/input/demo/presuffix.tsx extend context correctly 1`] = `
Array [
<span
class="ant-input-affix-wrapper"
@ -9110,7 +9416,7 @@ Array [
]
`;
exports[`renders ./components/input/demo/search-input.tsx extend context correctly 1`] = `
exports[`renders components/input/demo/search-input.tsx extend context correctly 1`] = `
<div
class="ant-space ant-space-vertical"
>
@ -9501,7 +9807,7 @@ exports[`renders ./components/input/demo/search-input.tsx extend context correct
</div>
`;
exports[`renders ./components/input/demo/search-input-loading.tsx extend context correctly 1`] = `
exports[`renders components/input/demo/search-input-loading.tsx extend context correctly 1`] = `
Array [
<span
class="ant-input-group-wrapper ant-input-search"
@ -9651,7 +9957,7 @@ Array [
]
`;
exports[`renders ./components/input/demo/show-count.tsx extend context correctly 1`] = `
exports[`renders components/input/demo/show-count.tsx extend context correctly 1`] = `
Array [
<span
class="ant-input-affix-wrapper"
@ -9690,7 +9996,7 @@ Array [
]
`;
exports[`renders ./components/input/demo/size.tsx extend context correctly 1`] = `
exports[`renders components/input/demo/size.tsx extend context correctly 1`] = `
Array [
<span
class="ant-input-affix-wrapper ant-input-affix-wrapper-lg"
@ -9798,7 +10104,7 @@ Array [
]
`;
exports[`renders ./components/input/demo/status.tsx extend context correctly 1`] = `
exports[`renders components/input/demo/status.tsx extend context correctly 1`] = `
<div
class="ant-space ant-space-vertical"
style="width:100%"
@ -9909,7 +10215,7 @@ exports[`renders ./components/input/demo/status.tsx extend context correctly 1`]
</div>
`;
exports[`renders ./components/input/demo/textarea.tsx extend context correctly 1`] = `
exports[`renders components/input/demo/textarea.tsx extend context correctly 1`] = `
Array [
<textarea
class="ant-input"
@ -9925,7 +10231,7 @@ Array [
]
`;
exports[`renders ./components/input/demo/textarea-resize.tsx extend context correctly 1`] = `
exports[`renders components/input/demo/textarea-resize.tsx extend context correctly 1`] = `
Array [
<button
class="ant-btn ant-btn-default"
@ -9982,7 +10288,7 @@ Array [
]
`;
exports[`renders ./components/input/demo/textarea-show-count.tsx extend context correctly 1`] = `
exports[`renders components/input/demo/textarea-show-count.tsx extend context correctly 1`] = `
Array [
<div
class="ant-input-show-count ant-input-textarea ant-input-textarea-show-count"
@ -10018,7 +10324,7 @@ Array [
]
`;
exports[`renders ./components/input/demo/tooltip.tsx extend context correctly 1`] = `
exports[`renders components/input/demo/tooltip.tsx extend context correctly 1`] = `
Array [
<input
class="ant-input"

View File

@ -1,6 +1,6 @@
// Jest Snapshot v1, https://goo.gl/fbAQLP
exports[`renders ./components/input/demo/addon.tsx correctly 1`] = `
exports[`renders components/input/demo/addon.tsx correctly 1`] = `
<div
class="ant-space ant-space-vertical"
>
@ -331,7 +331,7 @@ exports[`renders ./components/input/demo/addon.tsx correctly 1`] = `
</div>
`;
exports[`renders ./components/input/demo/align.tsx correctly 1`] = `
exports[`renders components/input/demo/align.tsx correctly 1`] = `
Array [
<div
class="ant-mentions"
@ -1059,7 +1059,7 @@ Array [
]
`;
exports[`renders ./components/input/demo/allowClear.tsx correctly 1`] = `
exports[`renders components/input/demo/allowClear.tsx correctly 1`] = `
Array [
<span
class="ant-input-affix-wrapper"
@ -1142,7 +1142,7 @@ Array [
]
`;
exports[`renders ./components/input/demo/autosize-textarea.tsx correctly 1`] = `
exports[`renders components/input/demo/autosize-textarea.tsx correctly 1`] = `
Array [
<textarea
class="ant-input"
@ -1165,7 +1165,7 @@ Array [
]
`;
exports[`renders ./components/input/demo/basic.tsx correctly 1`] = `
exports[`renders components/input/demo/basic.tsx correctly 1`] = `
<input
class="ant-input"
placeholder="Basic usage"
@ -1174,7 +1174,7 @@ exports[`renders ./components/input/demo/basic.tsx correctly 1`] = `
/>
`;
exports[`renders ./components/input/demo/borderless.tsx correctly 1`] = `
exports[`renders components/input/demo/borderless.tsx correctly 1`] = `
<input
class="ant-input ant-input-borderless"
placeholder="Borderless"
@ -1183,7 +1183,7 @@ exports[`renders ./components/input/demo/borderless.tsx correctly 1`] = `
/>
`;
exports[`renders ./components/input/demo/borderless-debug.tsx correctly 1`] = `
exports[`renders components/input/demo/borderless-debug.tsx correctly 1`] = `
<div
style="background-color:rgba(0, 0, 128, .2)"
>
@ -1358,7 +1358,233 @@ exports[`renders ./components/input/demo/borderless-debug.tsx correctly 1`] = `
</div>
`;
exports[`renders ./components/input/demo/debug-addon.tsx correctly 1`] = `
exports[`renders components/input/demo/compact-style.tsx correctly 1`] = `
<div
class="ant-space ant-space-vertical"
>
<div
class="ant-space-item"
style="margin-bottom:16px"
>
<div
class="ant-space-compact"
>
<input
class="ant-input ant-input-compact-item ant-input-compact-first-item ant-input-compact-last-item"
type="text"
value="26888888"
/>
</div>
</div>
<div
class="ant-space-item"
style="margin-bottom:16px"
>
<div
class="ant-space-compact"
>
<input
class="ant-input ant-input-compact-item ant-input-compact-first-item"
style="width:20%"
type="text"
value="0571"
/>
<input
class="ant-input ant-input-compact-item ant-input-compact-last-item"
style="width:80%"
type="text"
value="26888888"
/>
</div>
</div>
<div
class="ant-space-item"
style="margin-bottom:16px"
>
<div
class="ant-space-compact"
>
<span
class="ant-input-group-wrapper ant-input-search ant-input-search-middle ant-input-compact-item ant-input-compact-first-item ant-input-compact-last-item"
>
<span
class="ant-input-wrapper ant-input-group"
>
<span
class="ant-input-group-addon"
>
https://
</span>
<span
class="ant-input-affix-wrapper"
>
<input
class="ant-input"
placeholder="input search text"
type="text"
value=""
/>
<span
class="ant-input-suffix"
>
<span
class="ant-input-clear-icon ant-input-clear-icon-hidden"
role="button"
tabindex="-1"
>
<span
aria-label="close-circle"
class="anticon anticon-close-circle"
role="img"
>
<svg
aria-hidden="true"
data-icon="close-circle"
fill="currentColor"
focusable="false"
height="1em"
viewBox="64 64 896 896"
width="1em"
>
<path
d="M512 64C264.6 64 64 264.6 64 512s200.6 448 448 448 448-200.6 448-448S759.4 64 512 64zm165.4 618.2l-66-.3L512 563.4l-99.3 118.4-66.1.3c-4.4 0-8-3.5-8-8 0-1.9.7-3.7 1.9-5.2l130.1-155L340.5 359a8.32 8.32 0 01-1.9-5.2c0-4.4 3.6-8 8-8l66.1.3L512 464.6l99.3-118.4 66-.3c4.4 0 8 3.5 8 8 0 1.9-.7 3.7-1.9 5.2L553.5 514l130 155c1.2 1.5 1.9 3.3 1.9 5.2 0 4.4-3.6 8-8 8z"
/>
</svg>
</span>
</span>
</span>
</span>
<span
class="ant-input-group-addon"
>
<button
class="ant-btn ant-btn-default ant-btn-icon-only ant-input-search-button"
type="button"
>
<span
aria-label="search"
class="anticon anticon-search"
role="img"
>
<svg
aria-hidden="true"
data-icon="search"
fill="currentColor"
focusable="false"
height="1em"
viewBox="64 64 896 896"
width="1em"
>
<path
d="M909.6 854.5L649.9 594.8C690.2 542.7 712 479 712 412c0-80.2-31.3-155.4-87.9-212.1-56.6-56.7-132-87.9-212.1-87.9s-155.5 31.3-212.1 87.9C143.2 256.5 112 331.8 112 412c0 80.1 31.3 155.5 87.9 212.1C256.5 680.8 331.8 712 412 712c67 0 130.6-21.8 182.7-62l259.7 259.6a8.2 8.2 0 0011.6 0l43.6-43.5a8.2 8.2 0 000-11.6zM570.4 570.4C528 612.7 471.8 636 412 636s-116-23.3-158.4-65.6C211.3 528 188 471.8 188 412s23.3-116.1 65.6-158.4C296 211.3 352.2 188 412 188s116.1 23.2 158.4 65.6S636 352.2 636 412s-23.3 116.1-65.6 158.4z"
/>
</svg>
</span>
</button>
</span>
</span>
</span>
</div>
</div>
<div
class="ant-space-item"
style="margin-bottom:16px"
>
<div
class="ant-space-compact"
style="width:100%"
>
<input
class="ant-input ant-input-compact-item ant-input-compact-first-item"
type="text"
value="Combine input and button"
/>
<button
class="ant-btn ant-btn-primary ant-btn-compact-item ant-btn-compact-last-item"
type="button"
>
<span>
Submit
</span>
</button>
</div>
</div>
<div
class="ant-space-item"
>
<div
class="ant-space-compact"
>
<div
class="ant-select ant-select-compact-item ant-select-compact-first-item ant-select-single ant-select-show-arrow"
>
<div
class="ant-select-selector"
>
<span
class="ant-select-selection-search"
>
<input
aria-activedescendant="undefined_list_0"
aria-autocomplete="list"
aria-controls="undefined_list"
aria-haspopup="listbox"
aria-owns="undefined_list"
autocomplete="off"
class="ant-select-selection-search-input"
readonly=""
role="combobox"
style="opacity:0"
type="search"
unselectable="on"
value=""
/>
</span>
<span
class="ant-select-selection-item"
title="Zhejiang"
>
Zhejiang
</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>
<input
class="ant-input ant-input-compact-item ant-input-compact-last-item"
type="text"
value="Xihu District, Hangzhou"
/>
</div>
</div>
</div>
`;
exports[`renders components/input/demo/debug-addon.tsx correctly 1`] = `
<div
class="ant-space ant-space-vertical"
>
@ -1494,7 +1720,7 @@ exports[`renders ./components/input/demo/debug-addon.tsx correctly 1`] = `
</div>
`;
exports[`renders ./components/input/demo/focus.tsx correctly 1`] = `
exports[`renders components/input/demo/focus.tsx correctly 1`] = `
<div
class="ant-space ant-space-vertical"
style="width:100%"
@ -1609,7 +1835,7 @@ exports[`renders ./components/input/demo/focus.tsx correctly 1`] = `
</div>
`;
exports[`renders ./components/input/demo/group.tsx correctly 1`] = `
exports[`renders components/input/demo/group.tsx correctly 1`] = `
<div
class="site-input-group-wrapper"
>
@ -2655,7 +2881,7 @@ exports[`renders ./components/input/demo/group.tsx correctly 1`] = `
</div>
`;
exports[`renders ./components/input/demo/password-input.tsx correctly 1`] = `
exports[`renders components/input/demo/password-input.tsx correctly 1`] = `
<div
class="ant-space ant-space-vertical"
>
@ -2809,7 +3035,7 @@ exports[`renders ./components/input/demo/password-input.tsx correctly 1`] = `
</div>
`;
exports[`renders ./components/input/demo/presuffix.tsx correctly 1`] = `
exports[`renders components/input/demo/presuffix.tsx correctly 1`] = `
Array [
<span
class="ant-input-affix-wrapper"
@ -2917,7 +3143,7 @@ Array [
]
`;
exports[`renders ./components/input/demo/search-input.tsx correctly 1`] = `
exports[`renders components/input/demo/search-input.tsx correctly 1`] = `
<div
class="ant-space ant-space-vertical"
>
@ -3308,7 +3534,7 @@ exports[`renders ./components/input/demo/search-input.tsx correctly 1`] = `
</div>
`;
exports[`renders ./components/input/demo/search-input-loading.tsx correctly 1`] = `
exports[`renders components/input/demo/search-input-loading.tsx correctly 1`] = `
Array [
<span
class="ant-input-group-wrapper ant-input-search"
@ -3458,7 +3684,7 @@ Array [
]
`;
exports[`renders ./components/input/demo/show-count.tsx correctly 1`] = `
exports[`renders components/input/demo/show-count.tsx correctly 1`] = `
Array [
<span
class="ant-input-affix-wrapper"
@ -3497,7 +3723,7 @@ Array [
]
`;
exports[`renders ./components/input/demo/size.tsx correctly 1`] = `
exports[`renders components/input/demo/size.tsx correctly 1`] = `
Array [
<span
class="ant-input-affix-wrapper ant-input-affix-wrapper-lg"
@ -3605,7 +3831,7 @@ Array [
]
`;
exports[`renders ./components/input/demo/status.tsx correctly 1`] = `
exports[`renders components/input/demo/status.tsx correctly 1`] = `
<div
class="ant-space ant-space-vertical"
style="width:100%"
@ -3716,7 +3942,7 @@ exports[`renders ./components/input/demo/status.tsx correctly 1`] = `
</div>
`;
exports[`renders ./components/input/demo/textarea.tsx correctly 1`] = `
exports[`renders components/input/demo/textarea.tsx correctly 1`] = `
Array [
<textarea
class="ant-input"
@ -3732,7 +3958,7 @@ Array [
]
`;
exports[`renders ./components/input/demo/textarea-resize.tsx correctly 1`] = `
exports[`renders components/input/demo/textarea-resize.tsx correctly 1`] = `
Array [
<button
class="ant-btn ant-btn-default"
@ -3789,7 +4015,7 @@ Array [
]
`;
exports[`renders ./components/input/demo/textarea-show-count.tsx correctly 1`] = `
exports[`renders components/input/demo/textarea-show-count.tsx correctly 1`] = `
Array [
<div
class="ant-input-show-count ant-input-textarea ant-input-textarea-show-count"
@ -3825,7 +4051,7 @@ Array [
]
`;
exports[`renders ./components/input/demo/tooltip.tsx correctly 1`] = `
exports[`renders components/input/demo/tooltip.tsx correctly 1`] = `
<input
class="ant-input"
maxlength="16"

View File

@ -7,6 +7,7 @@ import Input from '..';
import mountTest from '../../../tests/shared/mountTest';
import rtlTest from '../../../tests/shared/rtlTest';
import Form from '../../form';
import { resetWarned } from '../../_util/warning';
import { triggerFocus } from '../Input';
describe('Input', () => {
@ -117,6 +118,15 @@ describe('Input', () => {
expect(container.querySelector('input')?.selectionStart).toEqual(5);
expect(container.querySelector('input')?.selectionEnd).toEqual(5);
});
it('warning for Input.Group', () => {
resetWarned();
render(<Input.Group />);
expect(errorSpy).toHaveBeenCalledWith(
"Warning: [antd: Input.Group] 'Input.Group' is deprecated. Please use 'Space.Compact' instead.",
);
});
});
describe('prefix and suffix', () => {

View File

@ -0,0 +1,7 @@
## zh-CN
使用 `Space.Compact` 创建紧凑模式,更多请查看 [Space.Compact](/components/space#spacecompact) 文档。
## en-US
Use `Space.Compact` create compact style, See the [Space.Compact](/components/space#spacecompact) documentation for more.

View File

@ -0,0 +1,40 @@
import { Button, Input, Select, Space } from 'antd';
import React from 'react';
const { Search } = Input;
const options = [
{
value: 'zhejiang',
label: 'Zhejiang',
},
{
value: 'jiangsu',
label: 'Jiangsu',
},
];
const App: React.FC = () => (
<Space direction="vertical" size="middle">
<Space.Compact>
<Input defaultValue="26888888" />
</Space.Compact>
<Space.Compact>
<Input style={{ width: '20%' }} defaultValue="0571" />
<Input style={{ width: '80%' }} defaultValue="26888888" />
</Space.Compact>
<Space.Compact>
<Search addonBefore="https://" placeholder="input search text" allowClear />
</Space.Compact>
<Space.Compact style={{ width: '100%' }}>
<Input defaultValue="Combine input and button" />
<Button type="primary">Submit</Button>
</Space.Compact>
<Space.Compact>
<Select defaultValue="Zhejiang" options={options} />
<Input defaultValue="Xihu District, Hangzhou" />
</Space.Compact>
</Space>
);
export default App;

View File

@ -1,14 +1,10 @@
## zh-CN
输入框的组合展现。
注意:使用 `compact` 模式时,不需要通过 `Col` 来控制宽度。
`Input.Group` 已废弃,可以使用 [Space.Compact](/components/space-cn#spacecompact) 替代 `Input.Group`
## en-US
Input.Group example.
Note: You don't need `Col` to control the width in the `compact` mode.
`Input.Group` is deprecated. Can use [Space.Compact](/components/space#spacecompact) substitute for `Input.Group`.
```css
.site-input-group-wrapper .site-input-split {

View File

@ -21,7 +21,8 @@ A basic widget for getting the user input is a text field. Keyboard and mouse ca
<code src="./demo/basic.tsx">Basic usage</code>
<code src="./demo/size.tsx">Three sizes of Input</code>
<code src="./demo/addon.tsx">Pre / Post tab</code>
<code src="./demo/group.tsx">Input Group</code>
<code src="./demo/compact-style.tsx">Compact Style</code>
<code src="./demo/group.tsx" debug>Input Group</code>
<code src="./demo/search-input.tsx">Search box</code>
<code src="./demo/search-input-loading.tsx">Search box with loading</code>
<code src="./demo/textarea.tsx">TextArea</code>
@ -94,20 +95,6 @@ The rest of the props of `Input.TextArea` are the same as the original [textarea
Supports all props of `Input`.
#### Input.Group
| Property | Description | Type | Default |
| --- | --- | --- | --- |
| compact | Whether use compact style | boolean | false |
| size | The size of `Input.Group` specifies the size of the included `Input` fields. Available: `large` `default` `small` | string | `default` |
```jsx
<Input.Group>
<input />
<input />
</Input.Group>
```
#### Input.Password
| Property | Description | Type | Default | Version |

View File

@ -22,7 +22,8 @@ demo:
<code src="./demo/basic.tsx">基本使用</code>
<code src="./demo/size.tsx">三种大小</code>
<code src="./demo/addon.tsx">前置/后置标签</code>
<code src="./demo/group.tsx">输入框组合</code>
<code src="./demo/compact-style.tsx">紧凑模式</code>
<code src="./demo/group.tsx" debug>输入框组合</code>
<code src="./demo/search-input.tsx">搜索框</code>
<code src="./demo/search-input-loading.tsx">搜索框 loading</code>
<code src="./demo/textarea.tsx">文本域</code>
@ -95,20 +96,6 @@ Input 的其他属性和 React 自带的 [input](https://reactjs.org/docs/dom-el
其余属性和 Input 一致。
#### Input.Group
| 参数 | 说明 | 类型 | 默认值 |
| --- | --- | --- | --- |
| compact | 是否用紧凑模式 | boolean | false |
| size | `Input.Group` 中所有的 `Input` 的大小,可选 `large` `default` `small` | string | `default` |
```jsx
<Input.Group>
<input />
<input />
</Input.Group>
```
#### Input.Password
| 参数 | 说明 | 类型 | 默认值 | 版本 |

View File

@ -1,6 +1,6 @@
// Jest Snapshot v1, https://goo.gl/fbAQLP
exports[`renders ./components/layout/demo/basic.tsx extend context correctly 1`] = `
exports[`renders components/layout/demo/basic.tsx extend context correctly 1`] = `
<div
class="ant-space ant-space-vertical"
style="width:100%"
@ -157,7 +157,7 @@ exports[`renders ./components/layout/demo/basic.tsx extend context correctly 1`]
</div>
`;
exports[`renders ./components/layout/demo/custom-trigger.tsx extend context correctly 1`] = `
exports[`renders components/layout/demo/custom-trigger.tsx extend context correctly 1`] = `
<section
class="ant-layout"
>
@ -418,7 +418,7 @@ exports[`renders ./components/layout/demo/custom-trigger.tsx extend context corr
</section>
`;
exports[`renders ./components/layout/demo/fixed.tsx extend context correctly 1`] = `
exports[`renders components/layout/demo/fixed.tsx extend context correctly 1`] = `
<section
class="ant-layout"
>
@ -688,7 +688,7 @@ exports[`renders ./components/layout/demo/fixed.tsx extend context correctly 1`]
</section>
`;
exports[`renders ./components/layout/demo/fixed-sider.tsx extend context correctly 1`] = `
exports[`renders components/layout/demo/fixed-sider.tsx extend context correctly 1`] = `
<section
class="ant-layout ant-layout-has-sider"
>
@ -1466,7 +1466,7 @@ exports[`renders ./components/layout/demo/fixed-sider.tsx extend context correct
</section>
`;
exports[`renders ./components/layout/demo/responsive.tsx extend context correctly 1`] = `
exports[`renders components/layout/demo/responsive.tsx extend context correctly 1`] = `
<section
class="ant-layout"
>
@ -1781,7 +1781,7 @@ exports[`renders ./components/layout/demo/responsive.tsx extend context correctl
</section>
`;
exports[`renders ./components/layout/demo/side.tsx extend context correctly 1`] = `
exports[`renders components/layout/demo/side.tsx extend context correctly 1`] = `
<section
class="ant-layout"
style="min-height:100vh"
@ -2421,7 +2421,7 @@ exports[`renders ./components/layout/demo/side.tsx extend context correctly 1`]
</section>
`;
exports[`renders ./components/layout/demo/top.tsx extend context correctly 1`] = `
exports[`renders components/layout/demo/top.tsx extend context correctly 1`] = `
<section
class="ant-layout layout"
>
@ -3243,7 +3243,7 @@ exports[`renders ./components/layout/demo/top.tsx extend context correctly 1`] =
</section>
`;
exports[`renders ./components/layout/demo/top-side.tsx extend context correctly 1`] = `
exports[`renders components/layout/demo/top-side.tsx extend context correctly 1`] = `
<section
class="ant-layout"
>
@ -4376,7 +4376,7 @@ exports[`renders ./components/layout/demo/top-side.tsx extend context correctly
</section>
`;
exports[`renders ./components/layout/demo/top-side-2.tsx extend context correctly 1`] = `
exports[`renders components/layout/demo/top-side-2.tsx extend context correctly 1`] = `
<section
class="ant-layout"
>

View File

@ -1,6 +1,6 @@
// Jest Snapshot v1, https://goo.gl/fbAQLP
exports[`renders ./components/layout/demo/basic.tsx correctly 1`] = `
exports[`renders components/layout/demo/basic.tsx correctly 1`] = `
<div
class="ant-space ant-space-vertical"
style="width:100%"
@ -157,7 +157,7 @@ exports[`renders ./components/layout/demo/basic.tsx correctly 1`] = `
</div>
`;
exports[`renders ./components/layout/demo/custom-trigger.tsx correctly 1`] = `
exports[`renders components/layout/demo/custom-trigger.tsx correctly 1`] = `
<section
class="ant-layout"
>
@ -315,7 +315,7 @@ exports[`renders ./components/layout/demo/custom-trigger.tsx correctly 1`] = `
</section>
`;
exports[`renders ./components/layout/demo/fixed.tsx correctly 1`] = `
exports[`renders components/layout/demo/fixed.tsx correctly 1`] = `
<section
class="ant-layout"
>
@ -470,7 +470,7 @@ exports[`renders ./components/layout/demo/fixed.tsx correctly 1`] = `
</section>
`;
exports[`renders ./components/layout/demo/fixed-sider.tsx correctly 1`] = `
exports[`renders components/layout/demo/fixed-sider.tsx correctly 1`] = `
<section
class="ant-layout ant-layout-has-sider"
>
@ -975,7 +975,7 @@ exports[`renders ./components/layout/demo/fixed-sider.tsx correctly 1`] = `
</section>
`;
exports[`renders ./components/layout/demo/responsive.tsx correctly 1`] = `
exports[`renders components/layout/demo/responsive.tsx correctly 1`] = `
<section
class="ant-layout"
>
@ -1153,7 +1153,7 @@ exports[`renders ./components/layout/demo/responsive.tsx correctly 1`] = `
</section>
`;
exports[`renders ./components/layout/demo/side.tsx correctly 1`] = `
exports[`renders components/layout/demo/side.tsx correctly 1`] = `
<section
class="ant-layout"
style="min-height:100vh"
@ -1434,7 +1434,7 @@ exports[`renders ./components/layout/demo/side.tsx correctly 1`] = `
</section>
`;
exports[`renders ./components/layout/demo/top.tsx correctly 1`] = `
exports[`renders components/layout/demo/top.tsx correctly 1`] = `
<section
class="ant-layout layout"
>
@ -1733,7 +1733,7 @@ exports[`renders ./components/layout/demo/top.tsx correctly 1`] = `
</section>
`;
exports[`renders ./components/layout/demo/top-side.tsx correctly 1`] = `
exports[`renders components/layout/demo/top-side.tsx correctly 1`] = `
<section
class="ant-layout"
>
@ -2091,7 +2091,7 @@ exports[`renders ./components/layout/demo/top-side.tsx correctly 1`] = `
</section>
`;
exports[`renders ./components/layout/demo/top-side-2.tsx correctly 1`] = `
exports[`renders components/layout/demo/top-side-2.tsx correctly 1`] = `
<section
class="ant-layout"
>

View File

@ -1,6 +1,6 @@
// Jest Snapshot v1, https://goo.gl/fbAQLP
exports[`renders ./components/list/demo/basic.tsx extend context correctly 1`] = `
exports[`renders components/list/demo/basic.tsx extend context correctly 1`] = `
<div
class="ant-list ant-list-split"
>
@ -167,7 +167,7 @@ exports[`renders ./components/list/demo/basic.tsx extend context correctly 1`] =
</div>
`;
exports[`renders ./components/list/demo/grid.tsx extend context correctly 1`] = `
exports[`renders components/list/demo/grid.tsx extend context correctly 1`] = `
<div
class="ant-list ant-list-split ant-list-grid"
>
@ -327,7 +327,7 @@ exports[`renders ./components/list/demo/grid.tsx extend context correctly 1`] =
</div>
`;
exports[`renders ./components/list/demo/grid-test.tsx extend context correctly 1`] = `
exports[`renders components/list/demo/grid-test.tsx extend context correctly 1`] = `
Array [
<div
class="ant-list ant-list-split ant-list-grid"
@ -1019,7 +1019,7 @@ Array [
]
`;
exports[`renders ./components/list/demo/infinite-load.tsx extend context correctly 1`] = `
exports[`renders components/list/demo/infinite-load.tsx extend context correctly 1`] = `
<div
id="scrollableDiv"
style="height:400px;overflow:auto;padding:0 16px;border:1px solid rgba(140, 140, 140, 0.35)"
@ -1121,7 +1121,7 @@ exports[`renders ./components/list/demo/infinite-load.tsx extend context correct
</div>
`;
exports[`renders ./components/list/demo/loadmore.tsx extend context correctly 1`] = `
exports[`renders components/list/demo/loadmore.tsx extend context correctly 1`] = `
<div
class="ant-list ant-list-split ant-list-loading demo-loadmore-list"
>
@ -1163,7 +1163,7 @@ exports[`renders ./components/list/demo/loadmore.tsx extend context correctly 1`
</div>
`;
exports[`renders ./components/list/demo/pagination.tsx extend context correctly 1`] = `
exports[`renders components/list/demo/pagination.tsx extend context correctly 1`] = `
Array [
<div
class="ant-space ant-space-vertical"
@ -1585,7 +1585,7 @@ Array [
]
`;
exports[`renders ./components/list/demo/responsive.tsx extend context correctly 1`] = `
exports[`renders components/list/demo/responsive.tsx extend context correctly 1`] = `
<div
class="ant-list ant-list-split ant-list-grid"
>
@ -1803,7 +1803,7 @@ exports[`renders ./components/list/demo/responsive.tsx extend context correctly
</div>
`;
exports[`renders ./components/list/demo/simple.tsx extend context correctly 1`] = `
exports[`renders components/list/demo/simple.tsx extend context correctly 1`] = `
Array [
<div
class="ant-divider ant-divider-horizontal ant-divider-with-text ant-divider-with-text-left"
@ -2043,7 +2043,7 @@ Array [
]
`;
exports[`renders ./components/list/demo/vertical.tsx extend context correctly 1`] = `
exports[`renders components/list/demo/vertical.tsx extend context correctly 1`] = `
<div
class="ant-list ant-list-vertical ant-list-lg ant-list-split ant-list-something-after-last-item"
>
@ -2746,7 +2746,7 @@ exports[`renders ./components/list/demo/vertical.tsx extend context correctly 1`
</div>
`;
exports[`renders ./components/list/demo/virtual-list.tsx extend context correctly 1`] = `
exports[`renders components/list/demo/virtual-list.tsx extend context correctly 1`] = `
<div
class="ant-list ant-list-split"
>

View File

@ -1,6 +1,6 @@
// Jest Snapshot v1, https://goo.gl/fbAQLP
exports[`renders ./components/list/demo/basic.tsx correctly 1`] = `
exports[`renders components/list/demo/basic.tsx correctly 1`] = `
<div
class="ant-list ant-list-split"
>
@ -167,7 +167,7 @@ exports[`renders ./components/list/demo/basic.tsx correctly 1`] = `
</div>
`;
exports[`renders ./components/list/demo/grid.tsx correctly 1`] = `
exports[`renders components/list/demo/grid.tsx correctly 1`] = `
<div
class="ant-list ant-list-split ant-list-grid"
>
@ -327,7 +327,7 @@ exports[`renders ./components/list/demo/grid.tsx correctly 1`] = `
</div>
`;
exports[`renders ./components/list/demo/grid-test.tsx correctly 1`] = `
exports[`renders components/list/demo/grid-test.tsx correctly 1`] = `
Array [
<div
class="ant-list ant-list-split ant-list-grid"
@ -1019,7 +1019,7 @@ Array [
]
`;
exports[`renders ./components/list/demo/infinite-load.tsx correctly 1`] = `
exports[`renders components/list/demo/infinite-load.tsx correctly 1`] = `
<div
id="scrollableDiv"
style="height:400px;overflow:auto;padding:0 16px;border:1px solid rgba(140, 140, 140, 0.35)"
@ -1121,7 +1121,7 @@ exports[`renders ./components/list/demo/infinite-load.tsx correctly 1`] = `
</div>
`;
exports[`renders ./components/list/demo/loadmore.tsx correctly 1`] = `
exports[`renders components/list/demo/loadmore.tsx correctly 1`] = `
<div
class="ant-list ant-list-split ant-list-loading demo-loadmore-list"
>
@ -1163,7 +1163,7 @@ exports[`renders ./components/list/demo/loadmore.tsx correctly 1`] = `
</div>
`;
exports[`renders ./components/list/demo/pagination.tsx correctly 1`] = `
exports[`renders components/list/demo/pagination.tsx correctly 1`] = `
Array [
<div
class="ant-space ant-space-vertical"
@ -1585,7 +1585,7 @@ Array [
]
`;
exports[`renders ./components/list/demo/responsive.tsx correctly 1`] = `
exports[`renders components/list/demo/responsive.tsx correctly 1`] = `
<div
class="ant-list ant-list-split ant-list-grid"
>
@ -1803,7 +1803,7 @@ exports[`renders ./components/list/demo/responsive.tsx correctly 1`] = `
</div>
`;
exports[`renders ./components/list/demo/simple.tsx correctly 1`] = `
exports[`renders components/list/demo/simple.tsx correctly 1`] = `
Array [
<div
class="ant-divider ant-divider-horizontal ant-divider-with-text ant-divider-with-text-left"
@ -2043,7 +2043,7 @@ Array [
]
`;
exports[`renders ./components/list/demo/vertical.tsx correctly 1`] = `
exports[`renders components/list/demo/vertical.tsx correctly 1`] = `
<div
class="ant-list ant-list-vertical ant-list-lg ant-list-split ant-list-something-after-last-item"
>
@ -2746,7 +2746,7 @@ exports[`renders ./components/list/demo/vertical.tsx correctly 1`] = `
</div>
`;
exports[`renders ./components/list/demo/virtual-list.tsx correctly 1`] = `
exports[`renders components/list/demo/virtual-list.tsx correctly 1`] = `
<div
class="ant-list ant-list-split"
>

View File

@ -1,6 +1,6 @@
// Jest Snapshot v1, https://goo.gl/fbAQLP
exports[`renders ./components/mentions/demo/async.tsx extend context correctly 1`] = `
exports[`renders components/mentions/demo/async.tsx extend context correctly 1`] = `
<div
class="ant-mentions"
style="width:100%"
@ -12,7 +12,7 @@ exports[`renders ./components/mentions/demo/async.tsx extend context correctly 1
</div>
`;
exports[`renders ./components/mentions/demo/autoSize.tsx extend context correctly 1`] = `
exports[`renders components/mentions/demo/autoSize.tsx extend context correctly 1`] = `
<div
class="ant-mentions"
style="width:100%"
@ -24,7 +24,7 @@ exports[`renders ./components/mentions/demo/autoSize.tsx extend context correctl
</div>
`;
exports[`renders ./components/mentions/demo/basic.tsx extend context correctly 1`] = `
exports[`renders components/mentions/demo/basic.tsx extend context correctly 1`] = `
<div
class="ant-mentions"
style="width:100%"
@ -38,7 +38,7 @@ exports[`renders ./components/mentions/demo/basic.tsx extend context correctly 1
</div>
`;
exports[`renders ./components/mentions/demo/form.tsx extend context correctly 1`] = `
exports[`renders components/mentions/demo/form.tsx extend context correctly 1`] = `
<form
class="ant-form ant-form-horizontal"
>
@ -178,7 +178,7 @@ exports[`renders ./components/mentions/demo/form.tsx extend context correctly 1`
</form>
`;
exports[`renders ./components/mentions/demo/placement.tsx extend context correctly 1`] = `
exports[`renders components/mentions/demo/placement.tsx extend context correctly 1`] = `
<div
class="ant-mentions"
style="width:100%"
@ -190,7 +190,7 @@ exports[`renders ./components/mentions/demo/placement.tsx extend context correct
</div>
`;
exports[`renders ./components/mentions/demo/prefix.tsx extend context correctly 1`] = `
exports[`renders components/mentions/demo/prefix.tsx extend context correctly 1`] = `
<div
class="ant-mentions"
style="width:100%"
@ -203,7 +203,7 @@ exports[`renders ./components/mentions/demo/prefix.tsx extend context correctly
</div>
`;
exports[`renders ./components/mentions/demo/readonly.tsx extend context correctly 1`] = `
exports[`renders components/mentions/demo/readonly.tsx extend context correctly 1`] = `
Array [
<div
style="margin-bottom:10px"
@ -234,7 +234,7 @@ Array [
]
`;
exports[`renders ./components/mentions/demo/render-panel.tsx extend context correctly 1`] = `
exports[`renders components/mentions/demo/render-panel.tsx extend context correctly 1`] = `
<div
style="padding-bottom:0;position:relative;width:fit-content;min-width:0"
>
@ -252,7 +252,7 @@ exports[`renders ./components/mentions/demo/render-panel.tsx extend context corr
</div>
`;
exports[`renders ./components/mentions/demo/status.tsx extend context correctly 1`] = `
exports[`renders components/mentions/demo/status.tsx extend context correctly 1`] = `
<div
class="ant-space ant-space-vertical"
>

View File

@ -1,6 +1,6 @@
// Jest Snapshot v1, https://goo.gl/fbAQLP
exports[`renders ./components/mentions/demo/async.tsx correctly 1`] = `
exports[`renders components/mentions/demo/async.tsx correctly 1`] = `
<div
class="ant-mentions"
style="width:100%"
@ -12,7 +12,7 @@ exports[`renders ./components/mentions/demo/async.tsx correctly 1`] = `
</div>
`;
exports[`renders ./components/mentions/demo/autoSize.tsx correctly 1`] = `
exports[`renders components/mentions/demo/autoSize.tsx correctly 1`] = `
<div
class="ant-mentions"
style="width:100%"
@ -24,7 +24,7 @@ exports[`renders ./components/mentions/demo/autoSize.tsx correctly 1`] = `
</div>
`;
exports[`renders ./components/mentions/demo/basic.tsx correctly 1`] = `
exports[`renders components/mentions/demo/basic.tsx correctly 1`] = `
<div
class="ant-mentions"
style="width:100%"
@ -38,7 +38,7 @@ exports[`renders ./components/mentions/demo/basic.tsx correctly 1`] = `
</div>
`;
exports[`renders ./components/mentions/demo/form.tsx correctly 1`] = `
exports[`renders components/mentions/demo/form.tsx correctly 1`] = `
<form
class="ant-form ant-form-horizontal"
>
@ -178,7 +178,7 @@ exports[`renders ./components/mentions/demo/form.tsx correctly 1`] = `
</form>
`;
exports[`renders ./components/mentions/demo/placement.tsx correctly 1`] = `
exports[`renders components/mentions/demo/placement.tsx correctly 1`] = `
<div
class="ant-mentions"
style="width:100%"
@ -190,7 +190,7 @@ exports[`renders ./components/mentions/demo/placement.tsx correctly 1`] = `
</div>
`;
exports[`renders ./components/mentions/demo/prefix.tsx correctly 1`] = `
exports[`renders components/mentions/demo/prefix.tsx correctly 1`] = `
<div
class="ant-mentions"
style="width:100%"
@ -203,7 +203,7 @@ exports[`renders ./components/mentions/demo/prefix.tsx correctly 1`] = `
</div>
`;
exports[`renders ./components/mentions/demo/readonly.tsx correctly 1`] = `
exports[`renders components/mentions/demo/readonly.tsx correctly 1`] = `
Array [
<div
style="margin-bottom:10px"
@ -234,7 +234,7 @@ Array [
]
`;
exports[`renders ./components/mentions/demo/render-panel.tsx correctly 1`] = `
exports[`renders components/mentions/demo/render-panel.tsx correctly 1`] = `
<div
style="padding-bottom:0;position:relative;width:fit-content;min-width:0"
>
@ -252,7 +252,7 @@ exports[`renders ./components/mentions/demo/render-panel.tsx correctly 1`] = `
</div>
`;
exports[`renders ./components/mentions/demo/status.tsx correctly 1`] = `
exports[`renders components/mentions/demo/status.tsx correctly 1`] = `
<div
class="ant-space ant-space-vertical"
>

View File

@ -1,6 +1,6 @@
// Jest Snapshot v1, https://goo.gl/fbAQLP
exports[`renders ./components/menu/demo/horizontal.tsx extend context correctly 1`] = `
exports[`renders components/menu/demo/horizontal.tsx extend context correctly 1`] = `
Array [
<ul
class="ant-menu-overflow ant-menu ant-menu-root ant-menu-horizontal ant-menu-light"
@ -357,7 +357,7 @@ Array [
]
`;
exports[`renders ./components/menu/demo/horizontal-dark.tsx extend context correctly 1`] = `
exports[`renders components/menu/demo/horizontal-dark.tsx extend context correctly 1`] = `
Array [
<ul
class="ant-menu-overflow ant-menu ant-menu-root ant-menu-horizontal ant-menu-dark"
@ -714,7 +714,7 @@ Array [
]
`;
exports[`renders ./components/menu/demo/inline.tsx extend context correctly 1`] = `
exports[`renders components/menu/demo/inline.tsx extend context correctly 1`] = `
Array [
<ul
class="ant-menu ant-menu-root ant-menu-inline ant-menu-light"
@ -1783,7 +1783,7 @@ Array [
]
`;
exports[`renders ./components/menu/demo/inline-collapsed.tsx extend context correctly 1`] = `
exports[`renders components/menu/demo/inline-collapsed.tsx extend context correctly 1`] = `
<div
style="width:256px"
>
@ -2655,7 +2655,7 @@ exports[`renders ./components/menu/demo/inline-collapsed.tsx extend context corr
</div>
`;
exports[`renders ./components/menu/demo/menu-v4.tsx extend context correctly 1`] = `
exports[`renders components/menu/demo/menu-v4.tsx extend context correctly 1`] = `
Array [
<button
aria-checked="false"
@ -3565,7 +3565,7 @@ Array [
]
`;
exports[`renders ./components/menu/demo/sider-current.tsx extend context correctly 1`] = `
exports[`renders components/menu/demo/sider-current.tsx extend context correctly 1`] = `
Array [
<ul
class="ant-menu ant-menu-root ant-menu-inline ant-menu-light"
@ -4454,7 +4454,7 @@ Array [
]
`;
exports[`renders ./components/menu/demo/style-debug.tsx extend context correctly 1`] = `
exports[`renders components/menu/demo/style-debug.tsx extend context correctly 1`] = `
Array [
<button
aria-checked="true"
@ -4759,7 +4759,7 @@ Array [
]
`;
exports[`renders ./components/menu/demo/submenu-theme.tsx extend context correctly 1`] = `
exports[`renders components/menu/demo/submenu-theme.tsx extend context correctly 1`] = `
Array [
<button
aria-checked="false"
@ -5082,7 +5082,7 @@ Array [
]
`;
exports[`renders ./components/menu/demo/switch-mode.tsx extend context correctly 1`] = `
exports[`renders components/menu/demo/switch-mode.tsx extend context correctly 1`] = `
Array [
<button
aria-checked="false"
@ -6017,7 +6017,7 @@ Array [
]
`;
exports[`renders ./components/menu/demo/theme.tsx extend context correctly 1`] = `
exports[`renders components/menu/demo/theme.tsx extend context correctly 1`] = `
Array [
<button
aria-checked="true"
@ -6932,7 +6932,7 @@ Array [
]
`;
exports[`renders ./components/menu/demo/vertical.tsx extend context correctly 1`] = `
exports[`renders components/menu/demo/vertical.tsx extend context correctly 1`] = `
Array [
<ul
class="ant-menu ant-menu-root ant-menu-vertical ant-menu-light"

View File

@ -1,6 +1,6 @@
// Jest Snapshot v1, https://goo.gl/fbAQLP
exports[`renders ./components/menu/demo/horizontal.tsx correctly 1`] = `
exports[`renders components/menu/demo/horizontal.tsx correctly 1`] = `
Array [
<ul
class="ant-menu-overflow ant-menu ant-menu-root ant-menu-horizontal ant-menu-light"
@ -174,7 +174,7 @@ Array [
]
`;
exports[`renders ./components/menu/demo/horizontal-dark.tsx correctly 1`] = `
exports[`renders components/menu/demo/horizontal-dark.tsx correctly 1`] = `
Array [
<ul
class="ant-menu-overflow ant-menu ant-menu-root ant-menu-horizontal ant-menu-dark"
@ -348,7 +348,7 @@ Array [
]
`;
exports[`renders ./components/menu/demo/inline.tsx correctly 1`] = `
exports[`renders components/menu/demo/inline.tsx correctly 1`] = `
Array [
<ul
class="ant-menu ant-menu-root ant-menu-inline ant-menu-light"
@ -620,7 +620,7 @@ Array [
]
`;
exports[`renders ./components/menu/demo/inline-collapsed.tsx correctly 1`] = `
exports[`renders components/menu/demo/inline-collapsed.tsx correctly 1`] = `
<div
style="width:256px"
>
@ -892,7 +892,7 @@ exports[`renders ./components/menu/demo/inline-collapsed.tsx correctly 1`] = `
</div>
`;
exports[`renders ./components/menu/demo/menu-v4.tsx correctly 1`] = `
exports[`renders components/menu/demo/menu-v4.tsx correctly 1`] = `
Array [
<button
aria-checked="false"
@ -1165,7 +1165,7 @@ Array [
]
`;
exports[`renders ./components/menu/demo/sider-current.tsx correctly 1`] = `
exports[`renders components/menu/demo/sider-current.tsx correctly 1`] = `
Array [
<ul
class="ant-menu ant-menu-root ant-menu-inline ant-menu-light"
@ -1359,7 +1359,7 @@ Array [
]
`;
exports[`renders ./components/menu/demo/style-debug.tsx correctly 1`] = `
exports[`renders components/menu/demo/style-debug.tsx correctly 1`] = `
Array [
<button
aria-checked="true"
@ -1507,7 +1507,7 @@ Array [
]
`;
exports[`renders ./components/menu/demo/submenu-theme.tsx correctly 1`] = `
exports[`renders components/menu/demo/submenu-theme.tsx correctly 1`] = `
Array [
<button
aria-checked="false"
@ -1613,7 +1613,7 @@ Array [
]
`;
exports[`renders ./components/menu/demo/switch-mode.tsx correctly 1`] = `
exports[`renders components/menu/demo/switch-mode.tsx correctly 1`] = `
Array [
<button
aria-checked="false"
@ -1911,7 +1911,7 @@ Array [
]
`;
exports[`renders ./components/menu/demo/theme.tsx correctly 1`] = `
exports[`renders components/menu/demo/theme.tsx correctly 1`] = `
Array [
<button
aria-checked="true"
@ -2131,7 +2131,7 @@ Array [
]
`;
exports[`renders ./components/menu/demo/vertical.tsx correctly 1`] = `
exports[`renders components/menu/demo/vertical.tsx correctly 1`] = `
Array [
<ul
class="ant-menu ant-menu-root ant-menu-vertical ant-menu-light"

View File

@ -1,6 +1,6 @@
// Jest Snapshot v1, https://goo.gl/fbAQLP
exports[`renders ./components/message/demo/custom-style.tsx extend context correctly 1`] = `
exports[`renders components/message/demo/custom-style.tsx extend context correctly 1`] = `
<button
class="ant-btn ant-btn-default"
type="button"
@ -11,7 +11,7 @@ exports[`renders ./components/message/demo/custom-style.tsx extend context corre
</button>
`;
exports[`renders ./components/message/demo/duration.tsx extend context correctly 1`] = `
exports[`renders components/message/demo/duration.tsx extend context correctly 1`] = `
<button
class="ant-btn ant-btn-default"
type="button"
@ -22,7 +22,7 @@ exports[`renders ./components/message/demo/duration.tsx extend context correctly
</button>
`;
exports[`renders ./components/message/demo/hooks.tsx extend context correctly 1`] = `
exports[`renders components/message/demo/hooks.tsx extend context correctly 1`] = `
<button
class="ant-btn ant-btn-primary"
type="button"
@ -33,7 +33,7 @@ exports[`renders ./components/message/demo/hooks.tsx extend context correctly 1`
</button>
`;
exports[`renders ./components/message/demo/info.tsx extend context correctly 1`] = `
exports[`renders components/message/demo/info.tsx extend context correctly 1`] = `
<button
class="ant-btn ant-btn-primary"
type="button"
@ -44,7 +44,7 @@ exports[`renders ./components/message/demo/info.tsx extend context correctly 1`]
</button>
`;
exports[`renders ./components/message/demo/loading.tsx extend context correctly 1`] = `
exports[`renders components/message/demo/loading.tsx extend context correctly 1`] = `
<button
class="ant-btn ant-btn-default"
type="button"
@ -55,7 +55,7 @@ exports[`renders ./components/message/demo/loading.tsx extend context correctly
</button>
`;
exports[`renders ./components/message/demo/other.tsx extend context correctly 1`] = `
exports[`renders components/message/demo/other.tsx extend context correctly 1`] = `
<div
class="ant-space ant-space-horizontal ant-space-align-center"
>
@ -100,7 +100,7 @@ exports[`renders ./components/message/demo/other.tsx extend context correctly 1`
</div>
`;
exports[`renders ./components/message/demo/render-panel.tsx extend context correctly 1`] = `
exports[`renders components/message/demo/render-panel.tsx extend context correctly 1`] = `
<div
class="ant-message-notice ant-message-notice-pure-panel"
>
@ -137,7 +137,7 @@ exports[`renders ./components/message/demo/render-panel.tsx extend context corre
</div>
`;
exports[`renders ./components/message/demo/thenable.tsx extend context correctly 1`] = `
exports[`renders components/message/demo/thenable.tsx extend context correctly 1`] = `
<button
class="ant-btn ant-btn-default"
type="button"
@ -148,7 +148,7 @@ exports[`renders ./components/message/demo/thenable.tsx extend context correctly
</button>
`;
exports[`renders ./components/message/demo/update.tsx extend context correctly 1`] = `
exports[`renders components/message/demo/update.tsx extend context correctly 1`] = `
<button
class="ant-btn ant-btn-primary"
type="button"

View File

@ -1,6 +1,6 @@
// Jest Snapshot v1, https://goo.gl/fbAQLP
exports[`renders ./components/message/demo/custom-style.tsx correctly 1`] = `
exports[`renders components/message/demo/custom-style.tsx correctly 1`] = `
<button
class="ant-btn ant-btn-default"
type="button"
@ -11,7 +11,7 @@ exports[`renders ./components/message/demo/custom-style.tsx correctly 1`] = `
</button>
`;
exports[`renders ./components/message/demo/duration.tsx correctly 1`] = `
exports[`renders components/message/demo/duration.tsx correctly 1`] = `
<button
class="ant-btn ant-btn-default"
type="button"
@ -22,7 +22,7 @@ exports[`renders ./components/message/demo/duration.tsx correctly 1`] = `
</button>
`;
exports[`renders ./components/message/demo/hooks.tsx correctly 1`] = `
exports[`renders components/message/demo/hooks.tsx correctly 1`] = `
<button
class="ant-btn ant-btn-primary"
type="button"
@ -33,7 +33,7 @@ exports[`renders ./components/message/demo/hooks.tsx correctly 1`] = `
</button>
`;
exports[`renders ./components/message/demo/info.tsx correctly 1`] = `
exports[`renders components/message/demo/info.tsx correctly 1`] = `
<button
class="ant-btn ant-btn-primary"
type="button"
@ -44,7 +44,7 @@ exports[`renders ./components/message/demo/info.tsx correctly 1`] = `
</button>
`;
exports[`renders ./components/message/demo/loading.tsx correctly 1`] = `
exports[`renders components/message/demo/loading.tsx correctly 1`] = `
<button
class="ant-btn ant-btn-default"
type="button"
@ -55,7 +55,7 @@ exports[`renders ./components/message/demo/loading.tsx correctly 1`] = `
</button>
`;
exports[`renders ./components/message/demo/other.tsx correctly 1`] = `
exports[`renders components/message/demo/other.tsx correctly 1`] = `
<div
class="ant-space ant-space-horizontal ant-space-align-center"
>
@ -100,7 +100,7 @@ exports[`renders ./components/message/demo/other.tsx correctly 1`] = `
</div>
`;
exports[`renders ./components/message/demo/render-panel.tsx correctly 1`] = `
exports[`renders components/message/demo/render-panel.tsx correctly 1`] = `
<div
class="ant-message-notice ant-message-notice-pure-panel"
>
@ -137,7 +137,7 @@ exports[`renders ./components/message/demo/render-panel.tsx correctly 1`] = `
</div>
`;
exports[`renders ./components/message/demo/thenable.tsx correctly 1`] = `
exports[`renders components/message/demo/thenable.tsx correctly 1`] = `
<button
class="ant-btn ant-btn-default"
type="button"
@ -148,7 +148,7 @@ exports[`renders ./components/message/demo/thenable.tsx correctly 1`] = `
</button>
`;
exports[`renders ./components/message/demo/update.tsx correctly 1`] = `
exports[`renders components/message/demo/update.tsx correctly 1`] = `
<button
class="ant-btn ant-btn-primary"
type="button"

View File

@ -0,0 +1,57 @@
import React from 'react';
import message, { actWrapper } from '..';
import { act, render, waitFakeTimer } from '../../../tests/utils';
import ConfigProvider from '../../config-provider';
import { awaitPromise, triggerMotionEnd } from './util';
describe('message static warning', () => {
beforeAll(() => {
actWrapper(act);
});
beforeEach(() => {
jest.useFakeTimers();
});
afterEach(async () => {
// Clean up
message.destroy();
await triggerMotionEnd();
jest.useRealTimers();
await awaitPromise();
});
// Follow test need keep order
it('no warning', async () => {
const errSpy = jest.spyOn(console, 'error').mockImplementation(() => {});
message.success({
content: <div className="bamboo" />,
duration: 0,
});
await waitFakeTimer();
expect(document.querySelector('.bamboo')).toBeTruthy();
expect(errSpy).not.toHaveBeenCalled();
});
it('warning if use theme', async () => {
const errSpy = jest.spyOn(console, 'error').mockImplementation(() => {});
render(<ConfigProvider theme={{}} />);
message.success({
content: <div className="light" />,
duration: 0,
});
await waitFakeTimer();
expect(document.querySelector('.light')).toBeTruthy();
expect(errSpy).toHaveBeenCalledWith(
"Warning: [antd: message] Static function can not consume context like dynamic theme. Please use 'App' component instead.",
);
});
});

View File

@ -1,6 +1,6 @@
import { render } from 'rc-util/lib/React/render';
import * as React from 'react';
import ConfigProvider, { globalConfig } from '../config-provider';
import ConfigProvider, { globalConfig, warnContext } from '../config-provider';
import type {
ArgsProps,
ConfigOptions,
@ -262,6 +262,11 @@ function open(config: ArgsProps): MessageType {
}
function typeOpen(type: NoticeType, args: Parameters<TypeOpen>): MessageType {
// Warning if exist theme
if (process.env.NODE_ENV !== 'production') {
warnContext('message');
}
const result = wrapPromiseFn((resolve) => {
let closeFn: VoidFunction;

View File

@ -1,6 +1,6 @@
// Jest Snapshot v1, https://goo.gl/fbAQLP
exports[`renders ./components/modal/demo/async.tsx extend context correctly 1`] = `
exports[`renders components/modal/demo/async.tsx extend context correctly 1`] = `
<button
class="ant-btn ant-btn-primary"
type="button"
@ -11,7 +11,7 @@ exports[`renders ./components/modal/demo/async.tsx extend context correctly 1`]
</button>
`;
exports[`renders ./components/modal/demo/basic.tsx extend context correctly 1`] = `
exports[`renders components/modal/demo/basic.tsx extend context correctly 1`] = `
<button
class="ant-btn ant-btn-primary"
type="button"
@ -22,7 +22,7 @@ exports[`renders ./components/modal/demo/basic.tsx extend context correctly 1`]
</button>
`;
exports[`renders ./components/modal/demo/button-props.tsx extend context correctly 1`] = `
exports[`renders components/modal/demo/button-props.tsx extend context correctly 1`] = `
<button
class="ant-btn ant-btn-primary"
type="button"
@ -33,7 +33,7 @@ exports[`renders ./components/modal/demo/button-props.tsx extend context correct
</button>
`;
exports[`renders ./components/modal/demo/confirm.tsx extend context correctly 1`] = `
exports[`renders components/modal/demo/confirm.tsx extend context correctly 1`] = `
<div
class="ant-space ant-space-horizontal ant-space-align-center"
style="flex-wrap:wrap;margin-bottom:-8px"
@ -93,7 +93,7 @@ exports[`renders ./components/modal/demo/confirm.tsx extend context correctly 1`
</div>
`;
exports[`renders ./components/modal/demo/confirm-router.tsx extend context correctly 1`] = `
exports[`renders components/modal/demo/confirm-router.tsx extend context correctly 1`] = `
<button
class="ant-btn ant-btn-default"
type="button"
@ -104,7 +104,7 @@ exports[`renders ./components/modal/demo/confirm-router.tsx extend context corre
</button>
`;
exports[`renders ./components/modal/demo/custom-mouse-position.tsx extend context correctly 1`] = `
exports[`renders components/modal/demo/custom-mouse-position.tsx extend context correctly 1`] = `
<button
class="ant-btn ant-btn-primary"
type="button"
@ -115,7 +115,7 @@ exports[`renders ./components/modal/demo/custom-mouse-position.tsx extend contex
</button>
`;
exports[`renders ./components/modal/demo/dark.tsx extend context correctly 1`] = `
exports[`renders components/modal/demo/dark.tsx extend context correctly 1`] = `
<button
class="ant-btn ant-btn-primary"
type="button"
@ -126,7 +126,7 @@ exports[`renders ./components/modal/demo/dark.tsx extend context correctly 1`] =
</button>
`;
exports[`renders ./components/modal/demo/footer.tsx extend context correctly 1`] = `
exports[`renders components/modal/demo/footer.tsx extend context correctly 1`] = `
<button
class="ant-btn ant-btn-primary"
type="button"
@ -137,7 +137,7 @@ exports[`renders ./components/modal/demo/footer.tsx extend context correctly 1`]
</button>
`;
exports[`renders ./components/modal/demo/hooks.tsx extend context correctly 1`] = `
exports[`renders components/modal/demo/hooks.tsx extend context correctly 1`] = `
<div
class="ant-space ant-space-horizontal ant-space-align-center"
>
@ -195,7 +195,7 @@ exports[`renders ./components/modal/demo/hooks.tsx extend context correctly 1`]
</div>
`;
exports[`renders ./components/modal/demo/locale.tsx extend context correctly 1`] = `
exports[`renders components/modal/demo/locale.tsx extend context correctly 1`] = `
<div
class="ant-space ant-space-horizontal ant-space-align-center"
>
@ -227,7 +227,7 @@ exports[`renders ./components/modal/demo/locale.tsx extend context correctly 1`]
</div>
`;
exports[`renders ./components/modal/demo/manual.tsx extend context correctly 1`] = `
exports[`renders components/modal/demo/manual.tsx extend context correctly 1`] = `
<button
class="ant-btn ant-btn-default"
type="button"
@ -238,7 +238,7 @@ exports[`renders ./components/modal/demo/manual.tsx extend context correctly 1`]
</button>
`;
exports[`renders ./components/modal/demo/modal-render.tsx extend context correctly 1`] = `
exports[`renders components/modal/demo/modal-render.tsx extend context correctly 1`] = `
<button
class="ant-btn ant-btn-default"
type="button"
@ -249,7 +249,7 @@ exports[`renders ./components/modal/demo/modal-render.tsx extend context correct
</button>
`;
exports[`renders ./components/modal/demo/position.tsx extend context correctly 1`] = `
exports[`renders components/modal/demo/position.tsx extend context correctly 1`] = `
Array [
<button
class="ant-btn ant-btn-primary"
@ -272,7 +272,7 @@ Array [
]
`;
exports[`renders ./components/modal/demo/render-panel.tsx extend context correctly 1`] = `
exports[`renders components/modal/demo/render-panel.tsx extend context correctly 1`] = `
<div
style="display:flex;flex-direction:column;row-gap:16px"
>
@ -514,7 +514,7 @@ exports[`renders ./components/modal/demo/render-panel.tsx extend context correct
</div>
`;
exports[`renders ./components/modal/demo/static-info.tsx extend context correctly 1`] = `
exports[`renders components/modal/demo/static-info.tsx extend context correctly 1`] = `
<div
class="ant-space ant-space-horizontal ant-space-align-center"
style="flex-wrap:wrap;margin-bottom:-8px"
@ -574,7 +574,7 @@ exports[`renders ./components/modal/demo/static-info.tsx extend context correctl
</div>
`;
exports[`renders ./components/modal/demo/width.tsx extend context correctly 1`] = `
exports[`renders components/modal/demo/width.tsx extend context correctly 1`] = `
<button
class="ant-btn ant-btn-primary"
type="button"
@ -585,7 +585,7 @@ exports[`renders ./components/modal/demo/width.tsx extend context correctly 1`]
</button>
`;
exports[`renders ./components/modal/demo/wireframe.tsx extend context correctly 1`] = `
exports[`renders components/modal/demo/wireframe.tsx extend context correctly 1`] = `
<div
style="display:flex;flex-direction:column;row-gap:16px"
>

View File

@ -1,6 +1,6 @@
// Jest Snapshot v1, https://goo.gl/fbAQLP
exports[`renders ./components/modal/demo/async.tsx correctly 1`] = `
exports[`renders components/modal/demo/async.tsx correctly 1`] = `
<button
class="ant-btn ant-btn-primary"
type="button"
@ -11,7 +11,7 @@ exports[`renders ./components/modal/demo/async.tsx correctly 1`] = `
</button>
`;
exports[`renders ./components/modal/demo/basic.tsx correctly 1`] = `
exports[`renders components/modal/demo/basic.tsx correctly 1`] = `
<button
class="ant-btn ant-btn-primary"
type="button"
@ -22,7 +22,7 @@ exports[`renders ./components/modal/demo/basic.tsx correctly 1`] = `
</button>
`;
exports[`renders ./components/modal/demo/button-props.tsx correctly 1`] = `
exports[`renders components/modal/demo/button-props.tsx correctly 1`] = `
<button
class="ant-btn ant-btn-primary"
type="button"
@ -33,7 +33,7 @@ exports[`renders ./components/modal/demo/button-props.tsx correctly 1`] = `
</button>
`;
exports[`renders ./components/modal/demo/confirm.tsx correctly 1`] = `
exports[`renders components/modal/demo/confirm.tsx correctly 1`] = `
<div
class="ant-space ant-space-horizontal ant-space-align-center"
style="flex-wrap:wrap;margin-bottom:-8px"
@ -93,7 +93,7 @@ exports[`renders ./components/modal/demo/confirm.tsx correctly 1`] = `
</div>
`;
exports[`renders ./components/modal/demo/confirm-router.tsx correctly 1`] = `
exports[`renders components/modal/demo/confirm-router.tsx correctly 1`] = `
<button
class="ant-btn ant-btn-default"
type="button"
@ -104,7 +104,7 @@ exports[`renders ./components/modal/demo/confirm-router.tsx correctly 1`] = `
</button>
`;
exports[`renders ./components/modal/demo/custom-mouse-position.tsx correctly 1`] = `
exports[`renders components/modal/demo/custom-mouse-position.tsx correctly 1`] = `
<button
class="ant-btn ant-btn-primary"
type="button"
@ -115,7 +115,7 @@ exports[`renders ./components/modal/demo/custom-mouse-position.tsx correctly 1`]
</button>
`;
exports[`renders ./components/modal/demo/dark.tsx correctly 1`] = `
exports[`renders components/modal/demo/dark.tsx correctly 1`] = `
<button
class="ant-btn ant-btn-primary"
type="button"
@ -126,7 +126,7 @@ exports[`renders ./components/modal/demo/dark.tsx correctly 1`] = `
</button>
`;
exports[`renders ./components/modal/demo/footer.tsx correctly 1`] = `
exports[`renders components/modal/demo/footer.tsx correctly 1`] = `
<button
class="ant-btn ant-btn-primary"
type="button"
@ -137,7 +137,7 @@ exports[`renders ./components/modal/demo/footer.tsx correctly 1`] = `
</button>
`;
exports[`renders ./components/modal/demo/hooks.tsx correctly 1`] = `
exports[`renders components/modal/demo/hooks.tsx correctly 1`] = `
<div
class="ant-space ant-space-horizontal ant-space-align-center"
>
@ -195,7 +195,7 @@ exports[`renders ./components/modal/demo/hooks.tsx correctly 1`] = `
</div>
`;
exports[`renders ./components/modal/demo/locale.tsx correctly 1`] = `
exports[`renders components/modal/demo/locale.tsx correctly 1`] = `
<div
class="ant-space ant-space-horizontal ant-space-align-center"
>
@ -227,7 +227,7 @@ exports[`renders ./components/modal/demo/locale.tsx correctly 1`] = `
</div>
`;
exports[`renders ./components/modal/demo/manual.tsx correctly 1`] = `
exports[`renders components/modal/demo/manual.tsx correctly 1`] = `
<button
class="ant-btn ant-btn-default"
type="button"
@ -238,7 +238,7 @@ exports[`renders ./components/modal/demo/manual.tsx correctly 1`] = `
</button>
`;
exports[`renders ./components/modal/demo/modal-render.tsx correctly 1`] = `
exports[`renders components/modal/demo/modal-render.tsx correctly 1`] = `
<button
class="ant-btn ant-btn-default"
type="button"
@ -249,7 +249,7 @@ exports[`renders ./components/modal/demo/modal-render.tsx correctly 1`] = `
</button>
`;
exports[`renders ./components/modal/demo/position.tsx correctly 1`] = `
exports[`renders components/modal/demo/position.tsx correctly 1`] = `
Array [
<button
class="ant-btn ant-btn-primary"
@ -272,7 +272,7 @@ Array [
]
`;
exports[`renders ./components/modal/demo/render-panel.tsx correctly 1`] = `
exports[`renders components/modal/demo/render-panel.tsx correctly 1`] = `
<div
style="display:flex;flex-direction:column;row-gap:16px"
>
@ -514,7 +514,7 @@ exports[`renders ./components/modal/demo/render-panel.tsx correctly 1`] = `
</div>
`;
exports[`renders ./components/modal/demo/static-info.tsx correctly 1`] = `
exports[`renders components/modal/demo/static-info.tsx correctly 1`] = `
<div
class="ant-space ant-space-horizontal ant-space-align-center"
style="flex-wrap:wrap;margin-bottom:-8px"
@ -574,7 +574,7 @@ exports[`renders ./components/modal/demo/static-info.tsx correctly 1`] = `
</div>
`;
exports[`renders ./components/modal/demo/width.tsx correctly 1`] = `
exports[`renders components/modal/demo/width.tsx correctly 1`] = `
<button
class="ant-btn ant-btn-primary"
type="button"
@ -585,7 +585,7 @@ exports[`renders ./components/modal/demo/width.tsx correctly 1`] = `
</button>
`;
exports[`renders ./components/modal/demo/wireframe.tsx correctly 1`] = `
exports[`renders components/modal/demo/wireframe.tsx correctly 1`] = `
<div
style="display:flex;flex-direction:column;row-gap:16px"
>

View File

@ -0,0 +1,49 @@
import * as React from 'react';
import Modal from '..';
import { render, waitFakeTimer } from '../../../tests/utils';
import ConfigProvider from '../../config-provider';
import { resetWarned } from '../../_util/warning';
describe('Modal.confirm warning', () => {
beforeEach(() => {
jest.useFakeTimers();
resetWarned();
});
afterEach(async () => {
Modal.destroyAll();
await waitFakeTimer();
document.body.innerHTML = '';
jest.clearAllTimers();
});
// Follow test need keep order
it('no warning', async () => {
const errSpy = jest.spyOn(console, 'error').mockImplementation(() => {});
Modal.confirm({
content: <div className="bamboo" />,
});
await waitFakeTimer();
expect(document.querySelector('.bamboo')).toBeTruthy();
expect(errSpy).not.toHaveBeenCalled();
});
it('warning if use theme', async () => {
const errSpy = jest.spyOn(console, 'error').mockImplementation(() => {});
render(<ConfigProvider theme={{}} />);
Modal.confirm({
content: <div className="light" />,
});
await waitFakeTimer();
expect(document.querySelector('.light')).toBeTruthy();
expect(errSpy).toHaveBeenCalledWith(
"Warning: [antd: Modal] Static function can not consume context like dynamic theme. Please use 'App' component instead.",
);
});
});

View File

@ -1,6 +1,6 @@
import { render as reactRender, unmount as reactUnmount } from 'rc-util/lib/React/render';
import * as React from 'react';
import { globalConfig } from '../config-provider';
import { globalConfig, warnContext } from '../config-provider';
import warning from '../_util/warning';
import ConfirmDialog from './ConfirmDialog';
import destroyFns from './destroyFns';
@ -23,6 +23,11 @@ export type ModalFunc = (props: ModalFuncProps) => {
export type ModalStaticFunctions = Record<NonNullable<ModalFuncProps['type']>, ModalFunc>;
export default function confirm(config: ModalFuncProps) {
// Warning if exist theme
if (process.env.NODE_ENV !== 'production') {
warnContext('Modal');
}
const container = document.createDocumentFragment();
// eslint-disable-next-line @typescript-eslint/no-use-before-define
let currentConfig = { ...config, close, open: true } as any;

View File

@ -1,9 +1,9 @@
import type React from 'react';
import { clearFix, genFocusStyle, resetComponent } from '../../style';
import { initFadeMotion, initZoomMotion } from '../../style/motion';
import type { AliasToken, FullToken, GenerateStyle } from '../../theme/internal';
import { genComponentStyleHook, mergeToken } from '../../theme/internal';
import type { TokenWithCommonCls } from '../../theme/util/genComponentStyleHook';
import { clearFix, genFocusStyle, resetComponent } from '../../style';
/** Component only token. Which will handle additional calculation of alias token */
export interface ComponentToken {
@ -47,12 +47,12 @@ function box(position: React.CSSProperties['position']): React.CSSProperties {
}
export const genModalMaskStyle: GenerateStyle<TokenWithCommonCls<AliasToken>> = (token) => {
const { componentCls } = token;
const { componentCls, antCls } = token;
return [
{
[`${componentCls}-root`]: {
[`${componentCls}${token.antCls}-zoom-enter, ${componentCls}${token.antCls}-zoom-appear`]: {
[`${componentCls}${antCls}-zoom-enter, ${componentCls}${antCls}-zoom-appear`]: {
// reset scale avoid mousePosition bug
transform: 'none',
opacity: 0,
@ -61,6 +61,12 @@ export const genModalMaskStyle: GenerateStyle<TokenWithCommonCls<AliasToken>> =
userSelect: 'none',
},
// https://github.com/ant-design/ant-design/issues/37329
// https://github.com/ant-design/ant-design/issues/40272
[`${componentCls}${antCls}-zoom-leave ${componentCls}-content`]: {
pointerEvents: 'none',
},
[`${componentCls}-mask`]: {
...box('fixed'),
zIndex: token.zIndexPopupBase,
@ -349,11 +355,6 @@ const genModalConfirmStyle: GenerateStyle<ModalToken> = (token) => {
[`${confirmComponentCls}-success ${confirmComponentCls}-body > ${token.iconCls}`]: {
color: token.colorSuccess,
},
// https://github.com/ant-design/ant-design/issues/37329
[`${componentCls}-zoom-leave ${componentCls}-btns`]: {
pointerEvents: 'none',
},
};
};

View File

@ -1,6 +1,6 @@
// Jest Snapshot v1, https://goo.gl/fbAQLP
exports[`renders ./components/notification/demo/basic.tsx extend context correctly 1`] = `
exports[`renders components/notification/demo/basic.tsx extend context correctly 1`] = `
<button
class="ant-btn ant-btn-primary"
type="button"
@ -11,7 +11,7 @@ exports[`renders ./components/notification/demo/basic.tsx extend context correct
</button>
`;
exports[`renders ./components/notification/demo/custom-icon.tsx extend context correctly 1`] = `
exports[`renders components/notification/demo/custom-icon.tsx extend context correctly 1`] = `
<button
class="ant-btn ant-btn-primary"
type="button"
@ -22,7 +22,7 @@ exports[`renders ./components/notification/demo/custom-icon.tsx extend context c
</button>
`;
exports[`renders ./components/notification/demo/custom-style.tsx extend context correctly 1`] = `
exports[`renders components/notification/demo/custom-style.tsx extend context correctly 1`] = `
<button
class="ant-btn ant-btn-primary"
type="button"
@ -33,7 +33,7 @@ exports[`renders ./components/notification/demo/custom-style.tsx extend context
</button>
`;
exports[`renders ./components/notification/demo/duration.tsx extend context correctly 1`] = `
exports[`renders components/notification/demo/duration.tsx extend context correctly 1`] = `
<button
class="ant-btn ant-btn-primary"
type="button"
@ -44,7 +44,7 @@ exports[`renders ./components/notification/demo/duration.tsx extend context corr
</button>
`;
exports[`renders ./components/notification/demo/hooks.tsx extend context correctly 1`] = `
exports[`renders components/notification/demo/hooks.tsx extend context correctly 1`] = `
Array [
<div
class="ant-space ant-space-horizontal ant-space-align-center"
@ -187,7 +187,7 @@ Array [
]
`;
exports[`renders ./components/notification/demo/placement.tsx extend context correctly 1`] = `
exports[`renders components/notification/demo/placement.tsx extend context correctly 1`] = `
Array [
<div
class="ant-space ant-space-horizontal ant-space-align-center"
@ -401,7 +401,7 @@ Array [
]
`;
exports[`renders ./components/notification/demo/render-panel.tsx extend context correctly 1`] = `
exports[`renders components/notification/demo/render-panel.tsx extend context correctly 1`] = `
<div
class="ant-notification-notice ant-notification-notice-pure-panel ant-notification-notice-closable"
>
@ -486,7 +486,7 @@ exports[`renders ./components/notification/demo/render-panel.tsx extend context
</div>
`;
exports[`renders ./components/notification/demo/update.tsx extend context correctly 1`] = `
exports[`renders components/notification/demo/update.tsx extend context correctly 1`] = `
<button
class="ant-btn ant-btn-primary"
type="button"
@ -497,7 +497,7 @@ exports[`renders ./components/notification/demo/update.tsx extend context correc
</button>
`;
exports[`renders ./components/notification/demo/with-btn.tsx extend context correctly 1`] = `
exports[`renders components/notification/demo/with-btn.tsx extend context correctly 1`] = `
<button
class="ant-btn ant-btn-primary"
type="button"
@ -508,7 +508,7 @@ exports[`renders ./components/notification/demo/with-btn.tsx extend context corr
</button>
`;
exports[`renders ./components/notification/demo/with-icon.tsx extend context correctly 1`] = `
exports[`renders components/notification/demo/with-icon.tsx extend context correctly 1`] = `
<div
class="ant-space ant-space-horizontal ant-space-align-center"
>

View File

@ -1,6 +1,6 @@
// Jest Snapshot v1, https://goo.gl/fbAQLP
exports[`renders ./components/notification/demo/basic.tsx correctly 1`] = `
exports[`renders components/notification/demo/basic.tsx correctly 1`] = `
<button
class="ant-btn ant-btn-primary"
type="button"
@ -11,7 +11,7 @@ exports[`renders ./components/notification/demo/basic.tsx correctly 1`] = `
</button>
`;
exports[`renders ./components/notification/demo/custom-icon.tsx correctly 1`] = `
exports[`renders components/notification/demo/custom-icon.tsx correctly 1`] = `
<button
class="ant-btn ant-btn-primary"
type="button"
@ -22,7 +22,7 @@ exports[`renders ./components/notification/demo/custom-icon.tsx correctly 1`] =
</button>
`;
exports[`renders ./components/notification/demo/custom-style.tsx correctly 1`] = `
exports[`renders components/notification/demo/custom-style.tsx correctly 1`] = `
<button
class="ant-btn ant-btn-primary"
type="button"
@ -33,7 +33,7 @@ exports[`renders ./components/notification/demo/custom-style.tsx correctly 1`] =
</button>
`;
exports[`renders ./components/notification/demo/duration.tsx correctly 1`] = `
exports[`renders components/notification/demo/duration.tsx correctly 1`] = `
<button
class="ant-btn ant-btn-primary"
type="button"
@ -44,7 +44,7 @@ exports[`renders ./components/notification/demo/duration.tsx correctly 1`] = `
</button>
`;
exports[`renders ./components/notification/demo/hooks.tsx correctly 1`] = `
exports[`renders components/notification/demo/hooks.tsx correctly 1`] = `
Array [
<div
class="ant-space ant-space-horizontal ant-space-align-center"
@ -187,7 +187,7 @@ Array [
]
`;
exports[`renders ./components/notification/demo/placement.tsx correctly 1`] = `
exports[`renders components/notification/demo/placement.tsx correctly 1`] = `
Array [
<div
class="ant-space ant-space-horizontal ant-space-align-center"
@ -401,7 +401,7 @@ Array [
]
`;
exports[`renders ./components/notification/demo/render-panel.tsx correctly 1`] = `
exports[`renders components/notification/demo/render-panel.tsx correctly 1`] = `
<div
class="ant-notification-notice ant-notification-notice-pure-panel ant-notification-notice-closable"
>
@ -486,7 +486,7 @@ exports[`renders ./components/notification/demo/render-panel.tsx correctly 1`] =
</div>
`;
exports[`renders ./components/notification/demo/update.tsx correctly 1`] = `
exports[`renders components/notification/demo/update.tsx correctly 1`] = `
<button
class="ant-btn ant-btn-primary"
type="button"
@ -497,7 +497,7 @@ exports[`renders ./components/notification/demo/update.tsx correctly 1`] = `
</button>
`;
exports[`renders ./components/notification/demo/with-btn.tsx correctly 1`] = `
exports[`renders components/notification/demo/with-btn.tsx correctly 1`] = `
<button
class="ant-btn ant-btn-primary"
type="button"
@ -508,7 +508,7 @@ exports[`renders ./components/notification/demo/with-btn.tsx correctly 1`] = `
</button>
`;
exports[`renders ./components/notification/demo/with-icon.tsx correctly 1`] = `
exports[`renders components/notification/demo/with-icon.tsx correctly 1`] = `
<div
class="ant-space ant-space-horizontal ant-space-align-center"
>

View File

@ -0,0 +1,57 @@
import React from 'react';
import notification, { actWrapper } from '..';
import { act, render, waitFakeTimer } from '../../../tests/utils';
import ConfigProvider from '../../config-provider';
import { awaitPromise, triggerMotionEnd } from './util';
describe('notification static warning', () => {
beforeAll(() => {
actWrapper(act);
});
beforeEach(() => {
jest.useFakeTimers();
});
afterEach(async () => {
// Clean up
notification.destroy();
await triggerMotionEnd();
jest.useRealTimers();
await awaitPromise();
});
// Follow test need keep order
it('no warning', async () => {
const errSpy = jest.spyOn(console, 'error').mockImplementation(() => {});
notification.open({
message: <div className="bamboo" />,
duration: 0,
});
await waitFakeTimer();
expect(document.querySelector('.bamboo')).toBeTruthy();
expect(errSpy).not.toHaveBeenCalled();
});
it('warning if use theme', async () => {
const errSpy = jest.spyOn(console, 'error').mockImplementation(() => {});
render(<ConfigProvider theme={{}} />);
notification.open({
message: <div className="light" />,
duration: 0,
});
await waitFakeTimer();
expect(document.querySelector('.light')).toBeTruthy();
expect(errSpy).toHaveBeenCalledWith(
"Warning: [antd: notification] Static function can not consume context like dynamic theme. Please use 'App' component instead.",
);
});
});

View File

@ -1,6 +1,6 @@
import { render } from 'rc-util/lib/React/render';
import * as React from 'react';
import ConfigProvider, { globalConfig } from '../config-provider';
import ConfigProvider, { globalConfig, warnContext } from '../config-provider';
import type { ArgsProps, GlobalConfigProps, NotificationInstance } from './interface';
import PurePanel from './PurePanel';
import useNotification, { useInternalNotification } from './useNotification';
@ -201,6 +201,11 @@ function setNotificationGlobalConfig(config: GlobalConfigProps) {
}
function open(config: ArgsProps) {
// Warning if exist theme
if (process.env.NODE_ENV !== 'production') {
warnContext('notification');
}
taskQueue.push({
type: 'open',
config,

View File

@ -1,6 +1,6 @@
// Jest Snapshot v1, https://goo.gl/fbAQLP
exports[`renders ./components/pagination/demo/all.tsx extend context correctly 1`] = `
exports[`renders components/pagination/demo/all.tsx extend context correctly 1`] = `
<ul
class="ant-pagination"
>
@ -257,7 +257,7 @@ exports[`renders ./components/pagination/demo/all.tsx extend context correctly 1
</ul>
`;
exports[`renders ./components/pagination/demo/basic.tsx extend context correctly 1`] = `
exports[`renders components/pagination/demo/basic.tsx extend context correctly 1`] = `
<ul
class="ant-pagination"
>
@ -383,7 +383,7 @@ exports[`renders ./components/pagination/demo/basic.tsx extend context correctly
</ul>
`;
exports[`renders ./components/pagination/demo/changer.tsx extend context correctly 1`] = `
exports[`renders components/pagination/demo/changer.tsx extend context correctly 1`] = `
Array [
<ul
class="ant-pagination"
@ -866,7 +866,7 @@ Array [
]
`;
exports[`renders ./components/pagination/demo/controlled.tsx extend context correctly 1`] = `
exports[`renders components/pagination/demo/controlled.tsx extend context correctly 1`] = `
<ul
class="ant-pagination"
>
@ -992,7 +992,7 @@ exports[`renders ./components/pagination/demo/controlled.tsx extend context corr
</ul>
`;
exports[`renders ./components/pagination/demo/itemRender.tsx extend context correctly 1`] = `
exports[`renders components/pagination/demo/itemRender.tsx extend context correctly 1`] = `
<ul
class="ant-pagination"
>
@ -1190,7 +1190,7 @@ exports[`renders ./components/pagination/demo/itemRender.tsx extend context corr
</ul>
`;
exports[`renders ./components/pagination/demo/jump.tsx extend context correctly 1`] = `
exports[`renders components/pagination/demo/jump.tsx extend context correctly 1`] = `
Array [
<ul
class="ant-pagination"
@ -1696,7 +1696,7 @@ Array [
]
`;
exports[`renders ./components/pagination/demo/mini.tsx extend context correctly 1`] = `
exports[`renders components/pagination/demo/mini.tsx extend context correctly 1`] = `
Array [
<ul
class="ant-pagination ant-pagination-mini"
@ -2359,7 +2359,7 @@ Array [
]
`;
exports[`renders ./components/pagination/demo/more.tsx extend context correctly 1`] = `
exports[`renders components/pagination/demo/more.tsx extend context correctly 1`] = `
<ul
class="ant-pagination"
>
@ -2649,7 +2649,7 @@ exports[`renders ./components/pagination/demo/more.tsx extend context correctly
</ul>
`;
exports[`renders ./components/pagination/demo/simple.tsx extend context correctly 1`] = `
exports[`renders components/pagination/demo/simple.tsx extend context correctly 1`] = `
Array [
<ul
class="ant-pagination ant-pagination-simple"
@ -2824,7 +2824,7 @@ Array [
]
`;
exports[`renders ./components/pagination/demo/total.tsx extend context correctly 1`] = `
exports[`renders components/pagination/demo/total.tsx extend context correctly 1`] = `
Array [
<ul
class="ant-pagination"
@ -3218,7 +3218,7 @@ Array [
]
`;
exports[`renders ./components/pagination/demo/wireframe.tsx extend context correctly 1`] = `
exports[`renders components/pagination/demo/wireframe.tsx extend context correctly 1`] = `
Array [
<ul
class="ant-pagination"

Some files were not shown because too many files have changed in this diff Show More