chore: auto merge branches (#42584)

chore: feature merge master
This commit is contained in:
github-actions[bot] 2023-05-24 14:28:51 +00:00 committed by GitHub
commit a0f5f4b344
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
10 changed files with 30 additions and 32 deletions

View File

@ -7,6 +7,7 @@ import DayJS from 'dayjs';
import { FormattedMessage, useIntl, useRouteMeta, useTabMeta } from 'dumi';
import type { ReactNode } from 'react';
import React, { useContext, useLayoutEffect, useMemo, useState } from 'react';
import useLayoutState from '../../../hooks/useLayoutState';
import useLocation from '../../../hooks/useLocation';
import useSiteToken from '../../../hooks/useSiteToken';
import EditButton from '../../common/EditButton';
@ -15,7 +16,6 @@ import type { DemoContextProps } from '../DemoContext';
import DemoContext from '../DemoContext';
import Footer from '../Footer';
import SiteContext from '../SiteContext';
import useLayoutState from '../../../hooks/useLayoutState';
const useStyle = () => {
const { token } = useSiteToken();
@ -27,6 +27,7 @@ const useStyle = () => {
display: flex;
flex-wrap: wrap;
margin-top: 120px !important;
clear: both;
a,
${antCls}-avatar + ${antCls}-avatar {
transition: all ${token.motionDurationSlow};

View File

@ -1,8 +1,8 @@
import type { CSSObject } from '@ant-design/cssinjs';
import { Keyframes } from '@ant-design/cssinjs';
import type { FullToken, GenerateStyle } from '../../theme/internal';
import { genComponentStyleHook, mergeToken, genPresetColor } from '../../theme/internal';
import { resetComponent } from '../../style';
import type { FullToken, GenerateStyle } from '../../theme/internal';
import { genComponentStyleHook, genPresetColor, mergeToken } from '../../theme/internal';
interface BadgeToken extends FullToken<'Badge'> {
badgeFontHeight: number;
@ -150,9 +150,9 @@ const genSharedBadgeStyle: GenerateStyle<BadgeToken> = (token: BadgeToken): CSSO
insetInlineEnd: 0,
transform: 'translate(50%, -50%)',
transformOrigin: '100% 0%',
[`${iconCls}-spin`]: {
[`&${iconCls}-spin`]: {
animationName: antBadgeLoadingCircle,
animationDuration: token.motionDurationMid,
animationDuration: '1s',
animationIterationCount: 'infinite',
animationTimingFunction: 'linear',
},

View File

@ -109,17 +109,19 @@ const genPaginationDisabledStyle: GenerateStyle<PaginationToken, CSSObject> = (t
},
},
[`${componentCls}-item-link-icon`]: {
opacity: 0,
},
[`${componentCls}-item-ellipsis`]: {
opacity: 1,
},
[`${componentCls}-simple-pager`]: {
color: token.colorTextDisabled,
},
[`${componentCls}-jump-prev, ${componentCls}-jump-next`]: {
[`${componentCls}-item-link-icon`]: {
opacity: 0,
},
[`${componentCls}-item-ellipsis`]: {
opacity: 1,
},
},
},
[`&${componentCls}-simple`]: {
[`${componentCls}-prev, ${componentCls}-next`]: {

View File

@ -209,7 +209,7 @@ const genTableStyle: GenerateStyle<TableToken, CSSObject> = (token) => {
[`
&${componentCls}-row:hover > th,
&${componentCls}-row:hover > td,
> th${componentCls}-cell-row-hover
> th${componentCls}-cell-row-hover,
> td${componentCls}-cell-row-hover
`]: {
background: tableRowHoverBg,

View File

@ -1,12 +1,12 @@
import React from 'react';
import debounce from 'lodash/debounce';
import type { Key } from 'react';
import type RcTree from 'rc-tree';
import type { Key } from 'react';
import React from 'react';
import mountTest from '../../../tests/shared/mountTest';
import rtlTest from '../../../tests/shared/rtlTest';
import { act, fireEvent, render } from '../../../tests/utils';
import Tree from '../index';
import { act, fireEvent, render, waitFakeTimer } from '../../../tests/utils';
import type { TreeProps } from '../index';
import Tree from '../index';
const { DirectoryTree, TreeNode } = Tree;
@ -100,18 +100,18 @@ describe('Directory Tree', () => {
);
};
it('click', () => {
it('click', async () => {
const { container, asFragment } = render(<StateDirTree expandAction="click" />);
fireEvent.click(container.querySelector('.ant-tree-node-content-wrapper')!);
jest.runAllTimers();
await waitFakeTimer();
expect(asFragment().firstChild).toMatchSnapshot();
});
it('doubleClick', () => {
it('doubleClick', async () => {
const { container, asFragment } = render(<StateDirTree expandAction="doubleClick" />);
fireEvent.doubleClick(container.querySelector('.ant-tree-node-content-wrapper')!);
jest.runAllTimers();
await waitFakeTimer();
expect(asFragment().firstChild).toMatchSnapshot();
});
});
@ -151,10 +151,10 @@ describe('Directory Tree', () => {
expect(asFragment().firstChild).toMatchSnapshot();
});
it('expandedKeys update', () => {
it('expandedKeys update', async () => {
const { rerender, asFragment } = render(createTree());
rerender(createTree({ expandedKeys: ['0-1'] }));
jest.runAllTimers();
await waitFakeTimer();
expect(asFragment().firstChild).toMatchSnapshot();
});

View File

@ -1,5 +0,0 @@
import { imageDemoTest } from '../../../tests/shared/imageTest';
describe('Watermark image', () => {
imageDemoTest('watermark');
});

View File

@ -36,7 +36,7 @@ If the priority is given to 「readability」 and the 「editability」 of opera
Multi-Field Inline Edit
> NoteIn「Multi-Field Inline Edit」, there are huge different between the content and required field, So it is more needed to use the [「Explain What Just Happened」](../docs/spec/transition#解释刚刚发生了什么) in 「Use Transition」to eliminate this visual effects.
> NoteIn「Multi-Field Inline Edit」, there are huge different between the content and required field, So it is more needed to use the [「Explain What Just Happened」](/docs/spec/transition#解释刚刚发生了什么) in 「Use Transition」to eliminate this visual effects.
<br>

View File

@ -35,7 +35,7 @@ title: 直截了当
多字段行内编辑
> 注:在「多字段行内编辑」的情况下,显示的内容和编辑时所需的字段会存在比较大的差异,所以更需要「巧用过渡」原则中的[「解释刚刚发生了什么」](../docs/spec/transition#解释刚刚发生了什么)来消除这种视觉影响。
> 注:在「多字段行内编辑」的情况下,显示的内容和编辑时所需的字段会存在比较大的差异,所以更需要「巧用过渡」原则中的[「解释刚刚发生了什么」](/docs/spec/transition#解释刚刚发生了什么)来消除这种视觉影响。
<br>

View File

@ -149,7 +149,7 @@
"rc-tabs": "~12.6.0",
"rc-textarea": "~1.2.2",
"rc-tooltip": "~6.0.0",
"rc-tree": "~5.7.0",
"rc-tree": "~5.7.4",
"rc-tree-select": "~5.9.0",
"rc-upload": "~4.3.0",
"rc-util": "^5.27.0",