mirror of
https://github.com/ant-design/ant-design.git
synced 2025-06-08 01:53:34 +08:00
commit
ce8454f369
@ -70,6 +70,7 @@ module.exports = {
|
||||
'no-script-url': 0,
|
||||
'prefer-rest-params': 0,
|
||||
'compat/compat': 0,
|
||||
'class-methods-use-this': 0,
|
||||
'react/no-access-state-in-setstate': 0,
|
||||
'react/destructuring-assignment': 0,
|
||||
'react/no-multi-comp': 0,
|
||||
|
3
.github/workflows/issue-open-check.yml
vendored
3
.github/workflows/issue-open-check.yml
vendored
@ -8,10 +8,11 @@ jobs:
|
||||
issue-open-check:
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
- uses: actions-cool/check-user-permission@v1.0.0
|
||||
- uses: actions-cool/check-user-permission@v1
|
||||
id: checkUser
|
||||
with:
|
||||
require: 'write'
|
||||
check-bot: true
|
||||
|
||||
- name: check invalid
|
||||
if: (contains(github.event.issue.body, 'ant-design-issue-helper') == false) && (steps.checkUser.outputs.result == 'false')
|
||||
|
4
.github/workflows/issue-remove-inactive.yml
vendored
4
.github/workflows/issue-remove-inactive.yml
vendored
@ -2,7 +2,7 @@ name: Issue Remove Inactive
|
||||
|
||||
on:
|
||||
issues:
|
||||
types: [edited, reopened]
|
||||
types: [edited]
|
||||
issue_comment:
|
||||
types: [created, edited]
|
||||
|
||||
@ -11,7 +11,7 @@ jobs:
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
- name: remove inactive
|
||||
if: github.event.issue.state == 'open'
|
||||
if: github.event.issue.state == 'open' && github.actor == github.event.issue.user.login
|
||||
uses: actions-cool/issues-helper@v2
|
||||
with:
|
||||
actions: 'remove-labels'
|
||||
|
2
.github/workflows/pr-check-ci.yml
vendored
2
.github/workflows/pr-check-ci.yml
vendored
@ -9,7 +9,7 @@ jobs:
|
||||
pr-check-ci:
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
- uses: actions-cool/check-pr-ci@v1.3.0
|
||||
- uses: actions-cool/check-pr-ci@v1
|
||||
with:
|
||||
filter-label: 'BranchAutoMerge'
|
||||
filter-creator-authority: 'write'
|
||||
|
4
.github/workflows/pr-open-check.yml
vendored
4
.github/workflows/pr-open-check.yml
vendored
@ -8,7 +8,7 @@ jobs:
|
||||
refuse:
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
- uses: actions-cool/pr-welcome@v1.1.3
|
||||
- uses: actions-cool/pr-welcome@v1
|
||||
with:
|
||||
refuse-issue-label: '🎱 Collaborate PR only'
|
||||
need-creator-authority: 'write'
|
||||
@ -22,7 +22,7 @@ jobs:
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
- name: check fill
|
||||
uses: actions-cool/pr-check-fill@v1.1.0
|
||||
uses: actions-cool/pr-check-fill@v1
|
||||
with:
|
||||
filter-start: '|'
|
||||
require-include: '🇺🇸 English, 🇨🇳 Chinese, 🇺🇸 英文, 🇨🇳 中文'
|
||||
|
6
.github/workflows/preview-deploy.yml
vendored
6
.github/workflows/preview-deploy.yml
vendored
@ -43,7 +43,7 @@ jobs:
|
||||
npx surge --project ./ --domain $DEPLOY_DOMAIN --token ${{ secrets.SURGE_TOKEN }}
|
||||
|
||||
- name: update status comment
|
||||
uses: actions-cool/maintain-one-comment@v1.1.0
|
||||
uses: actions-cool/maintain-one-comment@v2
|
||||
with:
|
||||
token: ${{ secrets.GITHUB_TOKEN }}
|
||||
body: |
|
||||
@ -54,7 +54,7 @@ jobs:
|
||||
|
||||
- name: The job has failed
|
||||
if: ${{ failure() }}
|
||||
uses: actions-cool/maintain-one-comment@v1.1.0
|
||||
uses: actions-cool/maintain-one-comment@v2
|
||||
with:
|
||||
token: ${{ secrets.GITHUB_TOKEN }}
|
||||
body: |
|
||||
@ -83,7 +83,7 @@ jobs:
|
||||
run: echo "::set-output name=id::$(<pr-id.txt)"
|
||||
|
||||
- name: The job has failed
|
||||
uses: actions-cool/maintain-one-comment@v1.1.0
|
||||
uses: actions-cool/maintain-one-comment@v2
|
||||
with:
|
||||
token: ${{ secrets.GITHUB_TOKEN }}
|
||||
body: |
|
||||
|
2
.github/workflows/preview-start.yml
vendored
2
.github/workflows/preview-start.yml
vendored
@ -16,7 +16,7 @@ jobs:
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
- name: update status comment
|
||||
uses: actions-cool/maintain-one-comment@v1.1.0
|
||||
uses: actions-cool/maintain-one-comment@v2
|
||||
with:
|
||||
token: ${{ secrets.GITHUB_TOKEN }}
|
||||
body: |
|
||||
|
2
.github/workflows/rebase.yml
vendored
2
.github/workflows/rebase.yml
vendored
@ -14,6 +14,6 @@ jobs:
|
||||
with:
|
||||
fetch-depth: 0
|
||||
- name: Automatic Rebase
|
||||
uses: cirrus-actions/rebase@1.3
|
||||
uses: cirrus-actions/rebase@1.5
|
||||
env:
|
||||
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
||||
|
2
.github/workflows/site-deploy.yml
vendored
2
.github/workflows/site-deploy.yml
vendored
@ -61,7 +61,7 @@ jobs:
|
||||
run: npm run predeploy
|
||||
|
||||
- name: deploy
|
||||
uses: peaceiris/actions-gh-pages@v2
|
||||
uses: peaceiris/actions-gh-pages@v3
|
||||
env:
|
||||
ACTIONS_DEPLOY_KEY: ${{ secrets.ACTIONS_DEPLOY_KEY }}
|
||||
PUBLISH_BRANCH: gh-pages
|
||||
|
4
.github/workflows/verify-files-modify.yml
vendored
4
.github/workflows/verify-files-modify.yml
vendored
@ -9,7 +9,7 @@ jobs:
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
- name: verify-version
|
||||
uses: actions-cool/verify-files-modify@v1.2.2
|
||||
uses: actions-cool/verify-files-modify@v1
|
||||
with:
|
||||
forbid-paths: '.github/, scripts/'
|
||||
forbid-files: 'CHANGELOG.zh-CN.md, CHANGELOG.en-US.md, LICENSE'
|
||||
@ -20,7 +20,7 @@ jobs:
|
||||
close: true
|
||||
|
||||
- name: verify-less
|
||||
uses: actions-cool/verify-files-modify@v1.2.2
|
||||
uses: actions-cool/verify-files-modify@v1
|
||||
with:
|
||||
forbid-files: 'components/style/themes/default.less'
|
||||
skip-verify-authority: 'admin'
|
||||
|
2
.github/workflows/verify-package-version.yml
vendored
2
.github/workflows/verify-package-version.yml
vendored
@ -11,7 +11,7 @@ jobs:
|
||||
steps:
|
||||
- uses: actions/checkout@v2
|
||||
- name: verify-version
|
||||
uses: actions-cool/verify-package-version@v1.1.1
|
||||
uses: actions-cool/verify-package-version@v1
|
||||
with:
|
||||
title-include-content: 'docs'
|
||||
title-include-version: true
|
||||
|
@ -15,12 +15,24 @@ timeline: true
|
||||
|
||||
---
|
||||
|
||||
## 4.17.0-alpha.7
|
||||
|
||||
`2021-10-18`
|
||||
|
||||
- 🐞 Fix Radio cannot click due to custom `type` property. [#32463](https://github.com/ant-design/ant-design/pull/32463)
|
||||
- 🐞 Input.TextArea `maxLength` is now passing to html textarea element. [#32448](https://github.com/ant-design/ant-design/pull/32448) [@MOHAMMADArsalan](https://github.com/MOHAMMADArsalan)
|
||||
- 🐞 Fix Typography `ellipsis` calculation bug when browser zoomed in. [#32447](https://github.com/ant-design/ant-design/pull/32447)
|
||||
- 💄 Adjust Collapse header style to make title overflow wrap not take arrow position. [#32492](https://github.com/ant-design/ant-design/pull/32492)
|
||||
- 💄 Optimize the text weight in Select. [#32486](https://github.com/ant-design/ant-design/pull/32486) [@liuxulian](https://github.com/liuxulian)
|
||||
- TypeScript
|
||||
- 🤖 Fix Message duration type definition. [#32524](https://github.com/ant-design/ant-design/pull/32524) [@chen-jingjie](https://github.com/chen-jingjie)
|
||||
|
||||
## 4.17.0-alpha.6
|
||||
|
||||
`2021-10-11`
|
||||
|
||||
- 🐞 Fix InputNumber handler arrow not align center. [#32409](https://github.com/ant-design/ant-design/pull/32409)
|
||||
- 🐞 Fix `closeIcon` overwriting bug when Notification is called multiple times. [#32359](https://github.com/ant-design/ant-design/pull/32359) [@KAROTT7](https://github.com/KAROTT7)
|
||||
- 🐞 Fix `closeIcon` not working bug when Notification is called multiple times. [#32359](https://github.com/ant-design/ant-design/pull/32359) [@KAROTT7](https://github.com/KAROTT7)
|
||||
- 🐞 Fix Button align issue with `icon` and `href`. [#32373](https://github.com/ant-design/ant-design/pull/32373)
|
||||
- 💄 Optimize Drawer open animation. [#32342](https://github.com/ant-design/ant-design/pull/32342)
|
||||
- 💄 Fix Mentions error style in Form. [#32385](https://github.com/ant-design/ant-design/pull/32385)
|
||||
|
@ -15,12 +15,24 @@ timeline: true
|
||||
|
||||
---
|
||||
|
||||
## 4.17.0-alpha.7
|
||||
|
||||
`2021-10-18`
|
||||
|
||||
- 🐞 修复 Radio `type` 属性被覆盖导致无法点击的问题。[#32463](https://github.com/ant-design/ant-design/pull/32463)
|
||||
- 🐞 Input.TextArea `maxLength` 属性现在会传给原生 textarea 标签。[#32448](https://github.com/ant-design/ant-design/pull/32448) [@MOHAMMADArsalan](https://github.com/MOHAMMADArsalan)
|
||||
- 🐞 修复 Typography `ellipsis` 在 Chrome 下屏幕缩小时溢出的问题。[#32447](https://github.com/ant-design/ant-design/pull/32447)
|
||||
- 💄 调整 Collapse 标题栏样式使标题折行时不侵占箭头空间。[#32492](https://github.com/ant-design/ant-design/pull/32492)
|
||||
- 💄 优化 Select 中选项文字粗细。[#32486](https://github.com/ant-design/ant-design/pull/32486) [@liuxulian](https://github.com/liuxulian)
|
||||
- TypeScript
|
||||
- 🤖 修复 Message duration 类型定义。[#32524](https://github.com/ant-design/ant-design/pull/32524) [@chen-jingjie](https://github.com/chen-jingjie)
|
||||
|
||||
## 4.17.0-alpha.6
|
||||
|
||||
`2021-10-11`
|
||||
|
||||
- 🐞 修复 InputNumber 操作杆箭头未居中对齐的问题。[#32409](https://github.com/ant-design/ant-design/pull/32409)
|
||||
- 🐞 修复多次调用 Notification 时 `closeIcon` 配置会被覆盖的问题。[#32359](https://github.com/ant-design/ant-design/pull/32359) [@KAROTT7](https://github.com/KAROTT7)
|
||||
- 🐞 修复多次调用 Notification 时 `closeIcon` 配置无法覆盖的问题。[#32359](https://github.com/ant-design/ant-design/pull/32359) [@KAROTT7](https://github.com/KAROTT7)
|
||||
- 🐞 修复 Button 有 `icon` 和 `href` 时的对齐问题。[#32373](https://github.com/ant-design/ant-design/pull/32373)
|
||||
- 💄 优化 Drawer 弹出动画。[#32342](https://github.com/ant-design/ant-design/pull/32342)
|
||||
- 💄 修复 Mentions 在 Form 下错误样式丢失的问题。[#32385](https://github.com/ant-design/ant-design/pull/32385)
|
||||
|
@ -1,4 +1,4 @@
|
||||
FROM buildkite/puppeteer:v3.0.4
|
||||
FROM buildkite/puppeteer:10.0.0
|
||||
RUN mkdir /app
|
||||
WORKDIR /app
|
||||
COPY package.json ./
|
||||
|
10
README.md
10
README.md
@ -12,7 +12,7 @@ An enterprise-class UI design language and React UI library.
|
||||
|
||||
[![CI status][github-action-image]][github-action-url] [![codecov][codecov-image]][codecov-url] [![NPM version][npm-image]][npm-url] [![NPM downloads][download-image]][download-url]
|
||||
|
||||
[![david deps][david-image]][david-url] [![david devDeps][david-dev-image]][david-dev-url] [![Total alerts][lgtm-image]][lgtm-url] [![][bundlesize-js-image]][unpkg-js-url] [![][bundlesize-css-image]][unpkg-css-url]
|
||||
[![Renovate status][renovate-image]][renovate-dashboard-url] [![Total alerts][lgtm-image]][lgtm-url] [![][bundlesize-js-image]][unpkg-js-url] [![][bundlesize-css-image]][unpkg-css-url]
|
||||
|
||||
[![Follow Twitter][twitter-image]][twitter-url] [![FOSSA Status][fossa-image]][fossa-url] [![Discussions][discussions-image]][discussions-url] [![][issues-helper-image]][issues-helper-url] [![Issues need help][help-wanted-image]][help-wanted-url]
|
||||
|
||||
@ -22,10 +22,6 @@ An enterprise-class UI design language and React UI library.
|
||||
[github-action-url]: https://github.com/ant-design/ant-design/actions?query=workflow%3A%22%E2%9C%85+test%22
|
||||
[codecov-image]: https://img.shields.io/codecov/c/github/ant-design/ant-design/master.svg?style=flat-square
|
||||
[codecov-url]: https://codecov.io/gh/ant-design/ant-design/branch/master
|
||||
[david-image]: https://img.shields.io/david/ant-design/ant-design?style=flat-square
|
||||
[david-dev-url]: https://david-dm.org/ant-design/ant-design?type=dev
|
||||
[david-dev-image]: https://img.shields.io/david/dev/ant-design/ant-design?style=flat-square
|
||||
[david-url]: https://david-dm.org/ant-design/ant-design
|
||||
[download-image]: https://img.shields.io/npm/dm/antd.svg?style=flat-square
|
||||
[download-url]: https://npmjs.org/package/antd
|
||||
[lgtm-image]: https://flat.badgen.net/lgtm/alerts/g/ant-design/ant-design
|
||||
@ -42,8 +38,10 @@ An enterprise-class UI design language and React UI library.
|
||||
[bundlesize-css-image]: https://img.badgesize.io/https:/unpkg.com/antd/dist/antd.min.css?label=antd.min.css&compression=gzip&style=flat-square
|
||||
[unpkg-js-url]: https://unpkg.com/browse/antd/dist/antd.min.js
|
||||
[unpkg-css-url]: https://unpkg.com/browse/antd/dist/antd.min.css
|
||||
[issues-helper-image]: https://img.shields.io/badge/Issues%20Manage%20By-issues--helper-orange?style=flat-square
|
||||
[issues-helper-image]: https://img.shields.io/badge/using-issues--helper-orange?style=flat-square
|
||||
[issues-helper-url]: https://github.com/actions-cool/issues-helper
|
||||
[renovate-image]: https://img.shields.io/badge/renovate-enabled-brightgreen.svg?style=flat-square
|
||||
[renovate-dashboard-url]: https://github.com/ant-design/ant-design/issues/32498
|
||||
|
||||
</div>
|
||||
|
||||
|
@ -1,3 +1,4 @@
|
||||
/* eslint-disable class-methods-use-this */
|
||||
import raf from 'rc-util/lib/raf';
|
||||
import React from 'react';
|
||||
import { mount } from 'enzyme';
|
||||
@ -43,7 +44,6 @@ describe('Test utils function', () => {
|
||||
const callbackFn = jest.fn();
|
||||
class Test {
|
||||
@throttleByAnimationFrameDecorator()
|
||||
// eslint-disable-next-line class-methods-use-this
|
||||
callback() {
|
||||
callbackFn();
|
||||
}
|
||||
|
@ -256,7 +256,7 @@ class Affix extends React.Component<AffixProps, AffixState> {
|
||||
}
|
||||
|
||||
// =================== Render ===================
|
||||
render = () => {
|
||||
render() {
|
||||
const { getPrefixCls } = this.context;
|
||||
const { affixStyle, placeholderStyle } = this.state;
|
||||
const { prefixCls, children } = this.props;
|
||||
@ -290,7 +290,7 @@ class Affix extends React.Component<AffixProps, AffixState> {
|
||||
</div>
|
||||
</ResizeObserver>
|
||||
);
|
||||
};
|
||||
}
|
||||
}
|
||||
|
||||
export default Affix;
|
||||
|
@ -1323,11 +1323,12 @@ Array [
|
||||
`;
|
||||
|
||||
exports[`renders ./components/alert/demo/loop-banner.md correctly 1`] = `
|
||||
<div
|
||||
Array [
|
||||
<div
|
||||
class="ant-alert ant-alert-warning ant-alert-banner"
|
||||
data-show="true"
|
||||
role="alert"
|
||||
>
|
||||
>
|
||||
<span
|
||||
aria-label="exclamation-circle"
|
||||
class="anticon anticon-exclamation-circle ant-alert-icon"
|
||||
@ -1371,7 +1372,40 @@ exports[`renders ./components/alert/demo/loop-banner.md correctly 1`] = `
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>,
|
||||
<div
|
||||
class="ant-alert ant-alert-warning ant-alert-banner"
|
||||
data-show="true"
|
||||
role="alert"
|
||||
>
|
||||
<span
|
||||
aria-label="exclamation-circle"
|
||||
class="anticon anticon-exclamation-circle ant-alert-icon"
|
||||
role="img"
|
||||
>
|
||||
<svg
|
||||
aria-hidden="true"
|
||||
data-icon="exclamation-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 64zm-32 232c0-4.4 3.6-8 8-8h48c4.4 0 8 3.6 8 8v272c0 4.4-3.6 8-8 8h-48c-4.4 0-8-3.6-8-8V296zm32 440a48.01 48.01 0 010-96 48.01 48.01 0 010 96z"
|
||||
/>
|
||||
</svg>
|
||||
</span>
|
||||
<div
|
||||
class="ant-alert-content"
|
||||
>
|
||||
<div
|
||||
class="ant-alert-message"
|
||||
/>
|
||||
</div>
|
||||
</div>,
|
||||
]
|
||||
`;
|
||||
|
||||
exports[`renders ./components/alert/demo/smooth-closed.md correctly 1`] = `
|
||||
|
@ -7,17 +7,19 @@ title:
|
||||
|
||||
## zh-CN
|
||||
|
||||
配合 [react-text-loop](https://npmjs.com/package/react-text-loop) 实现消息轮播通知栏。
|
||||
配合 [react-text-loop-next](https://npmjs.com/package/react-text-loop-next) 或 [react-fast-marquee](https://npmjs.com/package/react-fast-marquee) 实现消息轮播通知栏。
|
||||
|
||||
## en-US
|
||||
|
||||
Show a loop banner by using with [react-text-loop](https://npmjs.com/package/react-text-loop).
|
||||
Show a loop banner by using with [react-text-loop-next](https://npmjs.com/package/react-text-loop-next) or [react-fast-marquee](https://npmjs.com/package/react-fast-marquee).
|
||||
|
||||
```tsx
|
||||
import { Alert } from 'antd';
|
||||
import TextLoop from 'react-text-loop';
|
||||
import { TextLoop } from 'react-text-loop-next';
|
||||
import Marquee from 'react-fast-marquee';
|
||||
|
||||
ReactDOM.render(
|
||||
<>
|
||||
<Alert
|
||||
banner
|
||||
message={
|
||||
@ -28,7 +30,16 @@ ReactDOM.render(
|
||||
<div>Notice message four</div>
|
||||
</TextLoop>
|
||||
}
|
||||
/>,
|
||||
/>
|
||||
<Alert
|
||||
banner
|
||||
message={
|
||||
<Marquee pauseOnHover gradient={false}>
|
||||
I can be a React component, multiple React components, or just some text.
|
||||
</Marquee>
|
||||
}
|
||||
/>
|
||||
</>,
|
||||
mountNode,
|
||||
);
|
||||
```
|
||||
|
@ -256,7 +256,7 @@ export default class Anchor extends React.Component<AnchorProps, AnchorState, Co
|
||||
}
|
||||
};
|
||||
|
||||
render = () => {
|
||||
render() {
|
||||
const { getPrefixCls, direction } = this.context;
|
||||
|
||||
const {
|
||||
@ -328,5 +328,5 @@ export default class Anchor extends React.Component<AnchorProps, AnchorState, Co
|
||||
)}
|
||||
</AnchorContext.Provider>
|
||||
);
|
||||
};
|
||||
}
|
||||
}
|
||||
|
@ -57,7 +57,7 @@ describe('Avatar Render', () => {
|
||||
|
||||
it('should handle onError correctly', () => {
|
||||
const LOAD_FAILURE_SRC = 'http://error.url';
|
||||
const LOAD_SUCCESS_SRC = 'https://zos.alipayobjects.com/rmsportal/ODTLcjxAfvqbxHnVXCYX.png';
|
||||
const LOAD_SUCCESS_SRC = 'https://joeschmoe.io/api/v1/random';
|
||||
|
||||
const div = global.document.createElement('div');
|
||||
global.document.body.appendChild(div);
|
||||
@ -95,7 +95,7 @@ describe('Avatar Render', () => {
|
||||
|
||||
it('should show image on success after a failure state', () => {
|
||||
const LOAD_FAILURE_SRC = 'http://error.url';
|
||||
const LOAD_SUCCESS_SRC = 'https://zos.alipayobjects.com/rmsportal/ODTLcjxAfvqbxHnVXCYX.png';
|
||||
const LOAD_SUCCESS_SRC = 'https://joeschmoe.io/api/v1/random';
|
||||
|
||||
const div = global.document.createElement('div');
|
||||
global.document.body.appendChild(div);
|
||||
@ -195,7 +195,7 @@ describe('Avatar Render', () => {
|
||||
});
|
||||
|
||||
it('should exist crossorigin attribute', () => {
|
||||
const LOAD_SUCCESS_SRC = 'https://zos.alipayobjects.com/rmsportal/ODTLcjxAfvqbxHnVXCYX.png';
|
||||
const LOAD_SUCCESS_SRC = 'https://joeschmoe.io/api/v1/random';
|
||||
const wrapper = mount(
|
||||
<Avatar src={LOAD_SUCCESS_SRC} crossOrigin="anonymous">
|
||||
crossorigin
|
||||
@ -206,7 +206,7 @@ describe('Avatar Render', () => {
|
||||
});
|
||||
|
||||
it('should not exist crossorigin attribute', () => {
|
||||
const LOAD_SUCCESS_SRC = 'https://zos.alipayobjects.com/rmsportal/ODTLcjxAfvqbxHnVXCYX.png';
|
||||
const LOAD_SUCCESS_SRC = 'https://joeschmoe.io/api/v1/random';
|
||||
const wrapper = mount(<Avatar src={LOAD_SUCCESS_SRC}>crossorigin</Avatar>);
|
||||
expect(wrapper.html().includes('crossorigin')).toEqual(false);
|
||||
expect(wrapper.find('img').prop('crossOrigin')).toEqual(undefined);
|
||||
|
@ -156,7 +156,7 @@ exports[`Avatar Render should handle onError correctly 1`] = `
|
||||
onError={[Function]}
|
||||
shape="circle"
|
||||
size="default"
|
||||
src="https://zos.alipayobjects.com/rmsportal/ODTLcjxAfvqbxHnVXCYX.png"
|
||||
src="https://joeschmoe.io/api/v1/random"
|
||||
>
|
||||
<span
|
||||
className="ant-avatar ant-avatar-circle ant-avatar-image"
|
||||
@ -164,7 +164,7 @@ exports[`Avatar Render should handle onError correctly 1`] = `
|
||||
>
|
||||
<img
|
||||
onError={[Function]}
|
||||
src="https://zos.alipayobjects.com/rmsportal/ODTLcjxAfvqbxHnVXCYX.png"
|
||||
src="https://joeschmoe.io/api/v1/random"
|
||||
/>
|
||||
</span>
|
||||
</Avatar>
|
||||
@ -205,7 +205,7 @@ exports[`Avatar Render should show image on success after a failure state 2`] =
|
||||
<Avatar
|
||||
shape="circle"
|
||||
size="default"
|
||||
src="https://zos.alipayobjects.com/rmsportal/ODTLcjxAfvqbxHnVXCYX.png"
|
||||
src="https://joeschmoe.io/api/v1/random"
|
||||
>
|
||||
<span
|
||||
className="ant-avatar ant-avatar-circle ant-avatar-image"
|
||||
@ -213,7 +213,7 @@ exports[`Avatar Render should show image on success after a failure state 2`] =
|
||||
>
|
||||
<img
|
||||
onError={[Function]}
|
||||
src="https://zos.alipayobjects.com/rmsportal/ODTLcjxAfvqbxHnVXCYX.png"
|
||||
src="https://joeschmoe.io/api/v1/random"
|
||||
/>
|
||||
</span>
|
||||
</Avatar>
|
||||
|
@ -342,7 +342,7 @@ Array [
|
||||
class="ant-avatar ant-avatar-circle ant-avatar-image"
|
||||
>
|
||||
<img
|
||||
src="https://zos.alipayobjects.com/rmsportal/ODTLcjxAfvqbxHnVXCYX.png"
|
||||
src="https://joeschmoe.io/api/v1/random"
|
||||
/>
|
||||
</span>
|
||||
<span
|
||||
@ -416,7 +416,7 @@ Array [
|
||||
class="ant-avatar ant-avatar-circle ant-avatar-image"
|
||||
>
|
||||
<img
|
||||
src="https://zos.alipayobjects.com/rmsportal/ODTLcjxAfvqbxHnVXCYX.png"
|
||||
src="https://joeschmoe.io/api/v1/random"
|
||||
/>
|
||||
</span>
|
||||
<span
|
||||
@ -453,7 +453,7 @@ Array [
|
||||
class="ant-avatar ant-avatar-lg ant-avatar-circle ant-avatar-image"
|
||||
>
|
||||
<img
|
||||
src="https://zos.alipayobjects.com/rmsportal/ODTLcjxAfvqbxHnVXCYX.png"
|
||||
src="https://joeschmoe.io/api/v1/random"
|
||||
/>
|
||||
</span>
|
||||
<span
|
||||
@ -672,7 +672,7 @@ Array [
|
||||
class="ant-avatar ant-avatar-circle ant-avatar-image"
|
||||
>
|
||||
<img
|
||||
src="https://zos.alipayobjects.com/rmsportal/ODTLcjxAfvqbxHnVXCYX.png"
|
||||
src="https://joeschmoe.io/api/v1/random"
|
||||
/>
|
||||
</span>,
|
||||
<span
|
||||
@ -683,7 +683,8 @@ Array [
|
||||
>
|
||||
<img
|
||||
class="ant-image-img"
|
||||
src="https://zos.alipayobjects.com/rmsportal/ODTLcjxAfvqbxHnVXCYX.png"
|
||||
src="https://joeschmoe.io/api/v1/random"
|
||||
style="width:32px"
|
||||
/>
|
||||
<div
|
||||
class="ant-image-mask"
|
||||
|
@ -20,7 +20,7 @@ import { UserOutlined, AntDesignOutlined } from '@ant-design/icons';
|
||||
const Demo = () => (
|
||||
<>
|
||||
<Avatar.Group>
|
||||
<Avatar src="https://zos.alipayobjects.com/rmsportal/ODTLcjxAfvqbxHnVXCYX.png" />
|
||||
<Avatar src="https://joeschmoe.io/api/v1/random" />
|
||||
<Avatar style={{ backgroundColor: '#f56a00' }}>K</Avatar>
|
||||
<Tooltip title="Ant User" placement="top">
|
||||
<Avatar style={{ backgroundColor: '#87d068' }} icon={<UserOutlined />} />
|
||||
@ -29,7 +29,7 @@ const Demo = () => (
|
||||
</Avatar.Group>
|
||||
<Divider />
|
||||
<Avatar.Group maxCount={2} maxStyle={{ color: '#f56a00', backgroundColor: '#fde3cf' }}>
|
||||
<Avatar src="https://zos.alipayobjects.com/rmsportal/ODTLcjxAfvqbxHnVXCYX.png" />
|
||||
<Avatar src="https://joeschmoe.io/api/v1/random" />
|
||||
<Avatar style={{ backgroundColor: '#f56a00' }}>K</Avatar>
|
||||
<Tooltip title="Ant User" placement="top">
|
||||
<Avatar style={{ backgroundColor: '#87d068' }} icon={<UserOutlined />} />
|
||||
@ -42,7 +42,7 @@ const Demo = () => (
|
||||
size="large"
|
||||
maxStyle={{ color: '#f56a00', backgroundColor: '#fde3cf' }}
|
||||
>
|
||||
<Avatar src="https://zos.alipayobjects.com/rmsportal/ODTLcjxAfvqbxHnVXCYX.png" />
|
||||
<Avatar src="https://joeschmoe.io/api/v1/random" />
|
||||
<Avatar style={{ backgroundColor: '#f56a00' }}>K</Avatar>
|
||||
<Tooltip title="Ant User" placement="top">
|
||||
<Avatar style={{ backgroundColor: '#87d068' }} icon={<UserOutlined />} />
|
||||
|
@ -22,10 +22,8 @@ ReactDOM.render(
|
||||
<Avatar icon={<UserOutlined />} />
|
||||
<Avatar>U</Avatar>
|
||||
<Avatar size={40}>USER</Avatar>
|
||||
<Avatar src="https://zos.alipayobjects.com/rmsportal/ODTLcjxAfvqbxHnVXCYX.png" />
|
||||
<Avatar
|
||||
src={<Image src="https://zos.alipayobjects.com/rmsportal/ODTLcjxAfvqbxHnVXCYX.png" />}
|
||||
/>
|
||||
<Avatar src="https://joeschmoe.io/api/v1/random" />
|
||||
<Avatar src={<Image src="https://joeschmoe.io/api/v1/random" style={{ width: 32 }} />} />
|
||||
<Avatar style={{ color: '#f56a00', backgroundColor: '#fde3cf' }}>U</Avatar>
|
||||
<Avatar style={{ backgroundColor: '#87d068' }} icon={<UserOutlined />} />
|
||||
</>,
|
||||
|
@ -682,7 +682,7 @@ exports[`renders ./components/card/demo/meta.md correctly 1`] = `
|
||||
class="ant-avatar ant-avatar-circle ant-avatar-image"
|
||||
>
|
||||
<img
|
||||
src="https://zos.alipayobjects.com/rmsportal/ODTLcjxAfvqbxHnVXCYX.png"
|
||||
src="https://joeschmoe.io/api/v1/random"
|
||||
/>
|
||||
</span>
|
||||
</div>
|
||||
|
@ -37,9 +37,7 @@ class App extends React.Component {
|
||||
|
||||
<Card style={{ width: 300, marginTop: 16 }} loading={loading}>
|
||||
<Meta
|
||||
avatar={
|
||||
<Avatar src="https://zos.alipayobjects.com/rmsportal/ODTLcjxAfvqbxHnVXCYX.png" />
|
||||
}
|
||||
avatar={<Avatar src="https://joeschmoe.io/api/v1/random" />}
|
||||
title="Card title"
|
||||
description="This is the description"
|
||||
/>
|
||||
@ -55,9 +53,7 @@ class App extends React.Component {
|
||||
>
|
||||
<Skeleton loading={loading} avatar active>
|
||||
<Meta
|
||||
avatar={
|
||||
<Avatar src="https://zos.alipayobjects.com/rmsportal/ODTLcjxAfvqbxHnVXCYX.png" />
|
||||
}
|
||||
avatar={<Avatar src="https://joeschmoe.io/api/v1/random" />}
|
||||
title="Card title"
|
||||
description="This is the description"
|
||||
/>
|
||||
|
@ -35,7 +35,7 @@ ReactDOM.render(
|
||||
]}
|
||||
>
|
||||
<Meta
|
||||
avatar={<Avatar src="https://zos.alipayobjects.com/rmsportal/ODTLcjxAfvqbxHnVXCYX.png" />}
|
||||
avatar={<Avatar src="https://joeschmoe.io/api/v1/random" />}
|
||||
title="Card title"
|
||||
description="This is the description"
|
||||
/>
|
||||
|
@ -70,9 +70,14 @@ const Collapse: CollapseInterface = props => {
|
||||
)
|
||||
) as React.ReactNode;
|
||||
|
||||
return cloneElement(icon, () => ({
|
||||
return (
|
||||
// Create additional div here to make arrow align to center of first line
|
||||
<div>
|
||||
{cloneElement(icon, () => ({
|
||||
className: classNames((icon as any).props.className, `${prefixCls}-arrow`),
|
||||
}));
|
||||
}))}
|
||||
</div>
|
||||
);
|
||||
};
|
||||
|
||||
const iconPosition = getIconPosition();
|
||||
|
@ -14,6 +14,7 @@ exports[`renders ./components/collapse/demo/accordion.md correctly 1`] = `
|
||||
role="tab"
|
||||
tabindex="0"
|
||||
>
|
||||
<div>
|
||||
<span
|
||||
aria-label="right"
|
||||
class="anticon anticon-right ant-collapse-arrow"
|
||||
@ -33,6 +34,7 @@ exports[`renders ./components/collapse/demo/accordion.md correctly 1`] = `
|
||||
/>
|
||||
</svg>
|
||||
</span>
|
||||
</div>
|
||||
This is panel header 1
|
||||
</div>
|
||||
</div>
|
||||
@ -45,6 +47,7 @@ exports[`renders ./components/collapse/demo/accordion.md correctly 1`] = `
|
||||
role="tab"
|
||||
tabindex="0"
|
||||
>
|
||||
<div>
|
||||
<span
|
||||
aria-label="right"
|
||||
class="anticon anticon-right ant-collapse-arrow"
|
||||
@ -64,6 +67,7 @@ exports[`renders ./components/collapse/demo/accordion.md correctly 1`] = `
|
||||
/>
|
||||
</svg>
|
||||
</span>
|
||||
</div>
|
||||
This is panel header 2
|
||||
</div>
|
||||
</div>
|
||||
@ -76,6 +80,7 @@ exports[`renders ./components/collapse/demo/accordion.md correctly 1`] = `
|
||||
role="tab"
|
||||
tabindex="0"
|
||||
>
|
||||
<div>
|
||||
<span
|
||||
aria-label="right"
|
||||
class="anticon anticon-right ant-collapse-arrow"
|
||||
@ -95,6 +100,7 @@ exports[`renders ./components/collapse/demo/accordion.md correctly 1`] = `
|
||||
/>
|
||||
</svg>
|
||||
</span>
|
||||
</div>
|
||||
This is panel header 3
|
||||
</div>
|
||||
</div>
|
||||
@ -114,6 +120,7 @@ exports[`renders ./components/collapse/demo/basic.md correctly 1`] = `
|
||||
role="button"
|
||||
tabindex="0"
|
||||
>
|
||||
<div>
|
||||
<span
|
||||
aria-label="right"
|
||||
class="anticon anticon-right ant-collapse-arrow"
|
||||
@ -134,6 +141,7 @@ exports[`renders ./components/collapse/demo/basic.md correctly 1`] = `
|
||||
/>
|
||||
</svg>
|
||||
</span>
|
||||
</div>
|
||||
This is panel header 1
|
||||
</div>
|
||||
<div
|
||||
@ -161,6 +169,7 @@ exports[`renders ./components/collapse/demo/basic.md correctly 1`] = `
|
||||
role="button"
|
||||
tabindex="0"
|
||||
>
|
||||
<div>
|
||||
<span
|
||||
aria-label="right"
|
||||
class="anticon anticon-right ant-collapse-arrow"
|
||||
@ -180,6 +189,7 @@ exports[`renders ./components/collapse/demo/basic.md correctly 1`] = `
|
||||
/>
|
||||
</svg>
|
||||
</span>
|
||||
</div>
|
||||
This is panel header 2
|
||||
</div>
|
||||
</div>
|
||||
@ -192,6 +202,7 @@ exports[`renders ./components/collapse/demo/basic.md correctly 1`] = `
|
||||
role="button"
|
||||
tabindex="0"
|
||||
>
|
||||
<div>
|
||||
<span
|
||||
aria-label="right"
|
||||
class="anticon anticon-right ant-collapse-arrow"
|
||||
@ -211,6 +222,7 @@ exports[`renders ./components/collapse/demo/basic.md correctly 1`] = `
|
||||
/>
|
||||
</svg>
|
||||
</span>
|
||||
</div>
|
||||
This is panel header 3
|
||||
</div>
|
||||
</div>
|
||||
@ -230,6 +242,7 @@ exports[`renders ./components/collapse/demo/borderless.md correctly 1`] = `
|
||||
role="button"
|
||||
tabindex="0"
|
||||
>
|
||||
<div>
|
||||
<span
|
||||
aria-label="right"
|
||||
class="anticon anticon-right ant-collapse-arrow"
|
||||
@ -250,6 +263,7 @@ exports[`renders ./components/collapse/demo/borderless.md correctly 1`] = `
|
||||
/>
|
||||
</svg>
|
||||
</span>
|
||||
</div>
|
||||
This is panel header 1
|
||||
</div>
|
||||
<div
|
||||
@ -275,6 +289,7 @@ exports[`renders ./components/collapse/demo/borderless.md correctly 1`] = `
|
||||
role="button"
|
||||
tabindex="0"
|
||||
>
|
||||
<div>
|
||||
<span
|
||||
aria-label="right"
|
||||
class="anticon anticon-right ant-collapse-arrow"
|
||||
@ -294,6 +309,7 @@ exports[`renders ./components/collapse/demo/borderless.md correctly 1`] = `
|
||||
/>
|
||||
</svg>
|
||||
</span>
|
||||
</div>
|
||||
This is panel header 2
|
||||
</div>
|
||||
</div>
|
||||
@ -306,6 +322,7 @@ exports[`renders ./components/collapse/demo/borderless.md correctly 1`] = `
|
||||
role="button"
|
||||
tabindex="0"
|
||||
>
|
||||
<div>
|
||||
<span
|
||||
aria-label="right"
|
||||
class="anticon anticon-right ant-collapse-arrow"
|
||||
@ -325,6 +342,7 @@ exports[`renders ./components/collapse/demo/borderless.md correctly 1`] = `
|
||||
/>
|
||||
</svg>
|
||||
</span>
|
||||
</div>
|
||||
This is panel header 3
|
||||
</div>
|
||||
</div>
|
||||
@ -351,6 +369,7 @@ exports[`renders ./components/collapse/demo/collapsible.md correctly 1`] = `
|
||||
role="button"
|
||||
tabindex="0"
|
||||
>
|
||||
<div>
|
||||
<span
|
||||
aria-label="right"
|
||||
class="anticon anticon-right ant-collapse-arrow"
|
||||
@ -371,6 +390,7 @@ exports[`renders ./components/collapse/demo/collapsible.md correctly 1`] = `
|
||||
/>
|
||||
</svg>
|
||||
</span>
|
||||
</div>
|
||||
<span
|
||||
class="ant-collapse-header-text"
|
||||
>
|
||||
@ -410,6 +430,7 @@ exports[`renders ./components/collapse/demo/collapsible.md correctly 1`] = `
|
||||
role="button"
|
||||
tabindex="-1"
|
||||
>
|
||||
<div>
|
||||
<span
|
||||
aria-label="right"
|
||||
class="anticon anticon-right ant-collapse-arrow"
|
||||
@ -429,6 +450,7 @@ exports[`renders ./components/collapse/demo/collapsible.md correctly 1`] = `
|
||||
/>
|
||||
</svg>
|
||||
</span>
|
||||
</div>
|
||||
This panel can't be collapsed
|
||||
</div>
|
||||
</div>
|
||||
@ -450,6 +472,7 @@ exports[`renders ./components/collapse/demo/custom.md correctly 1`] = `
|
||||
role="button"
|
||||
tabindex="0"
|
||||
>
|
||||
<div>
|
||||
<span
|
||||
aria-label="caret-right"
|
||||
class="anticon anticon-caret-right ant-collapse-arrow"
|
||||
@ -470,6 +493,7 @@ exports[`renders ./components/collapse/demo/custom.md correctly 1`] = `
|
||||
/>
|
||||
</svg>
|
||||
</span>
|
||||
</div>
|
||||
This is panel header 1
|
||||
</div>
|
||||
<div
|
||||
@ -497,6 +521,7 @@ exports[`renders ./components/collapse/demo/custom.md correctly 1`] = `
|
||||
role="button"
|
||||
tabindex="0"
|
||||
>
|
||||
<div>
|
||||
<span
|
||||
aria-label="caret-right"
|
||||
class="anticon anticon-caret-right ant-collapse-arrow"
|
||||
@ -516,6 +541,7 @@ exports[`renders ./components/collapse/demo/custom.md correctly 1`] = `
|
||||
/>
|
||||
</svg>
|
||||
</span>
|
||||
</div>
|
||||
This is panel header 2
|
||||
</div>
|
||||
</div>
|
||||
@ -528,6 +554,7 @@ exports[`renders ./components/collapse/demo/custom.md correctly 1`] = `
|
||||
role="button"
|
||||
tabindex="0"
|
||||
>
|
||||
<div>
|
||||
<span
|
||||
aria-label="caret-right"
|
||||
class="anticon anticon-caret-right ant-collapse-arrow"
|
||||
@ -547,6 +574,7 @@ exports[`renders ./components/collapse/demo/custom.md correctly 1`] = `
|
||||
/>
|
||||
</svg>
|
||||
</span>
|
||||
</div>
|
||||
This is panel header 3
|
||||
</div>
|
||||
</div>
|
||||
@ -567,6 +595,7 @@ Array [
|
||||
role="button"
|
||||
tabindex="0"
|
||||
>
|
||||
<div>
|
||||
<span
|
||||
aria-label="right"
|
||||
class="anticon anticon-right ant-collapse-arrow"
|
||||
@ -587,6 +616,7 @@ Array [
|
||||
/>
|
||||
</svg>
|
||||
</span>
|
||||
</div>
|
||||
This is panel header 1
|
||||
<div
|
||||
class="ant-collapse-extra"
|
||||
@ -638,6 +668,7 @@ Array [
|
||||
role="button"
|
||||
tabindex="0"
|
||||
>
|
||||
<div>
|
||||
<span
|
||||
aria-label="right"
|
||||
class="anticon anticon-right ant-collapse-arrow"
|
||||
@ -657,6 +688,7 @@ Array [
|
||||
/>
|
||||
</svg>
|
||||
</span>
|
||||
</div>
|
||||
This is panel header 2
|
||||
<div
|
||||
class="ant-collapse-extra"
|
||||
@ -693,6 +725,7 @@ Array [
|
||||
role="button"
|
||||
tabindex="0"
|
||||
>
|
||||
<div>
|
||||
<span
|
||||
aria-label="right"
|
||||
class="anticon anticon-right ant-collapse-arrow"
|
||||
@ -712,6 +745,7 @@ Array [
|
||||
/>
|
||||
</svg>
|
||||
</span>
|
||||
</div>
|
||||
This is panel header 3
|
||||
<div
|
||||
class="ant-collapse-extra"
|
||||
@ -820,6 +854,7 @@ exports[`renders ./components/collapse/demo/ghost.md correctly 1`] = `
|
||||
role="button"
|
||||
tabindex="0"
|
||||
>
|
||||
<div>
|
||||
<span
|
||||
aria-label="right"
|
||||
class="anticon anticon-right ant-collapse-arrow"
|
||||
@ -840,6 +875,7 @@ exports[`renders ./components/collapse/demo/ghost.md correctly 1`] = `
|
||||
/>
|
||||
</svg>
|
||||
</span>
|
||||
</div>
|
||||
This is panel header 1
|
||||
</div>
|
||||
<div
|
||||
@ -867,6 +903,7 @@ exports[`renders ./components/collapse/demo/ghost.md correctly 1`] = `
|
||||
role="button"
|
||||
tabindex="0"
|
||||
>
|
||||
<div>
|
||||
<span
|
||||
aria-label="right"
|
||||
class="anticon anticon-right ant-collapse-arrow"
|
||||
@ -886,6 +923,7 @@ exports[`renders ./components/collapse/demo/ghost.md correctly 1`] = `
|
||||
/>
|
||||
</svg>
|
||||
</span>
|
||||
</div>
|
||||
This is panel header 2
|
||||
</div>
|
||||
</div>
|
||||
@ -898,6 +936,7 @@ exports[`renders ./components/collapse/demo/ghost.md correctly 1`] = `
|
||||
role="button"
|
||||
tabindex="0"
|
||||
>
|
||||
<div>
|
||||
<span
|
||||
aria-label="right"
|
||||
class="anticon anticon-right ant-collapse-arrow"
|
||||
@ -917,6 +956,7 @@ exports[`renders ./components/collapse/demo/ghost.md correctly 1`] = `
|
||||
/>
|
||||
</svg>
|
||||
</span>
|
||||
</div>
|
||||
This is panel header 3
|
||||
</div>
|
||||
</div>
|
||||
@ -936,6 +976,7 @@ exports[`renders ./components/collapse/demo/mix.md correctly 1`] = `
|
||||
role="button"
|
||||
tabindex="0"
|
||||
>
|
||||
<div>
|
||||
<span
|
||||
aria-label="right"
|
||||
class="anticon anticon-right ant-collapse-arrow"
|
||||
@ -955,6 +996,7 @@ exports[`renders ./components/collapse/demo/mix.md correctly 1`] = `
|
||||
/>
|
||||
</svg>
|
||||
</span>
|
||||
</div>
|
||||
This is panel header 1
|
||||
</div>
|
||||
</div>
|
||||
@ -967,6 +1009,7 @@ exports[`renders ./components/collapse/demo/mix.md correctly 1`] = `
|
||||
role="button"
|
||||
tabindex="0"
|
||||
>
|
||||
<div>
|
||||
<span
|
||||
aria-label="right"
|
||||
class="anticon anticon-right ant-collapse-arrow"
|
||||
@ -986,6 +1029,7 @@ exports[`renders ./components/collapse/demo/mix.md correctly 1`] = `
|
||||
/>
|
||||
</svg>
|
||||
</span>
|
||||
</div>
|
||||
This is panel header 2
|
||||
</div>
|
||||
</div>
|
||||
@ -998,6 +1042,7 @@ exports[`renders ./components/collapse/demo/mix.md correctly 1`] = `
|
||||
role="button"
|
||||
tabindex="0"
|
||||
>
|
||||
<div>
|
||||
<span
|
||||
aria-label="right"
|
||||
class="anticon anticon-right ant-collapse-arrow"
|
||||
@ -1017,6 +1062,7 @@ exports[`renders ./components/collapse/demo/mix.md correctly 1`] = `
|
||||
/>
|
||||
</svg>
|
||||
</span>
|
||||
</div>
|
||||
This is panel header 3
|
||||
</div>
|
||||
</div>
|
||||
@ -1036,6 +1082,7 @@ exports[`renders ./components/collapse/demo/noarrow.md correctly 1`] = `
|
||||
role="button"
|
||||
tabindex="0"
|
||||
>
|
||||
<div>
|
||||
<span
|
||||
aria-label="right"
|
||||
class="anticon anticon-right ant-collapse-arrow"
|
||||
@ -1056,6 +1103,7 @@ exports[`renders ./components/collapse/demo/noarrow.md correctly 1`] = `
|
||||
/>
|
||||
</svg>
|
||||
</span>
|
||||
</div>
|
||||
This is panel header with arrow icon
|
||||
</div>
|
||||
<div
|
||||
|
@ -13,6 +13,7 @@ exports[`Collapse could override default openMotion 1`] = `
|
||||
role="button"
|
||||
tabindex="0"
|
||||
>
|
||||
<div>
|
||||
<span
|
||||
aria-label="right"
|
||||
class="anticon anticon-right ant-collapse-arrow"
|
||||
@ -33,6 +34,7 @@ exports[`Collapse could override default openMotion 1`] = `
|
||||
/>
|
||||
</svg>
|
||||
</span>
|
||||
</div>
|
||||
This is panel header 1
|
||||
</div>
|
||||
<div
|
||||
@ -61,6 +63,7 @@ exports[`Collapse should render extra node of panel 1`] = `
|
||||
role="button"
|
||||
tabindex="0"
|
||||
>
|
||||
<div>
|
||||
<span
|
||||
aria-label="right"
|
||||
class="anticon anticon-right ant-collapse-arrow"
|
||||
@ -80,6 +83,7 @@ exports[`Collapse should render extra node of panel 1`] = `
|
||||
/>
|
||||
</svg>
|
||||
</span>
|
||||
</div>
|
||||
header
|
||||
<div
|
||||
class="ant-collapse-extra"
|
||||
@ -101,6 +105,7 @@ exports[`Collapse should render extra node of panel 1`] = `
|
||||
role="button"
|
||||
tabindex="0"
|
||||
>
|
||||
<div>
|
||||
<span
|
||||
aria-label="right"
|
||||
class="anticon anticon-right ant-collapse-arrow"
|
||||
@ -120,6 +125,7 @@ exports[`Collapse should render extra node of panel 1`] = `
|
||||
/>
|
||||
</svg>
|
||||
</span>
|
||||
</div>
|
||||
header
|
||||
<div
|
||||
class="ant-collapse-extra"
|
||||
@ -148,6 +154,7 @@ exports[`Collapse should support remove expandIcon 1`] = `
|
||||
role="button"
|
||||
tabindex="0"
|
||||
>
|
||||
<div />
|
||||
header
|
||||
</div>
|
||||
</div>
|
||||
|
@ -22,17 +22,18 @@
|
||||
}
|
||||
|
||||
> .@{collapse-prefix-cls}-header {
|
||||
position: relative;
|
||||
display: flex;
|
||||
flex-wrap: nowrap;
|
||||
align-items: flex-start;
|
||||
padding: @collapse-header-padding;
|
||||
color: @heading-color;
|
||||
line-height: @line-height-base;
|
||||
cursor: pointer;
|
||||
transition: all 0.3s, visibility 0s;
|
||||
.clearfix();
|
||||
|
||||
.@{collapse-prefix-cls}-arrow {
|
||||
display: inline-block;
|
||||
margin-right: 12px;
|
||||
margin-right: @margin-sm;
|
||||
font-size: @font-size-sm;
|
||||
vertical-align: -1px;
|
||||
|
||||
@ -42,7 +43,7 @@
|
||||
}
|
||||
|
||||
.@{collapse-prefix-cls}-extra {
|
||||
float: right;
|
||||
margin-left: auto;
|
||||
}
|
||||
|
||||
&:focus {
|
||||
@ -59,7 +60,7 @@
|
||||
|
||||
&.@{collapse-prefix-cls}-no-arrow {
|
||||
> .@{collapse-prefix-cls}-header {
|
||||
padding-left: 12px;
|
||||
padding-left: @padding-sm;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -18,7 +18,7 @@
|
||||
.@{collapse-prefix-cls}-arrow {
|
||||
.@{collapse-prefix-cls}-rtl& {
|
||||
margin-right: 0;
|
||||
margin-left: 12px;
|
||||
margin-left: @margin-sm;
|
||||
}
|
||||
|
||||
& svg {
|
||||
@ -30,7 +30,8 @@
|
||||
|
||||
.@{collapse-prefix-cls}-extra {
|
||||
.@{collapse-prefix-cls}-rtl& {
|
||||
float: left;
|
||||
margin-right: auto;
|
||||
margin-left: 0;
|
||||
}
|
||||
}
|
||||
}
|
||||
@ -38,7 +39,7 @@
|
||||
&.@{collapse-prefix-cls}-no-arrow {
|
||||
> .@{collapse-prefix-cls}-header {
|
||||
.@{collapse-prefix-cls}-rtl& {
|
||||
padding-right: 12px;
|
||||
padding-right: @padding-sm;
|
||||
padding-left: 0;
|
||||
}
|
||||
}
|
||||
|
@ -15,7 +15,7 @@ exports[`renders ./components/comment/demo/basic.md correctly 1`] = `
|
||||
>
|
||||
<img
|
||||
alt="Han Solo"
|
||||
src="https://zos.alipayobjects.com/rmsportal/ODTLcjxAfvqbxHnVXCYX.png"
|
||||
src="https://joeschmoe.io/api/v1/random"
|
||||
/>
|
||||
</span>
|
||||
</div>
|
||||
@ -132,7 +132,7 @@ exports[`renders ./components/comment/demo/editor.md correctly 1`] = `
|
||||
>
|
||||
<img
|
||||
alt="Han Solo"
|
||||
src="https://zos.alipayobjects.com/rmsportal/ODTLcjxAfvqbxHnVXCYX.png"
|
||||
src="https://joeschmoe.io/api/v1/random"
|
||||
/>
|
||||
</span>
|
||||
</div>
|
||||
@ -222,7 +222,7 @@ exports[`renders ./components/comment/demo/list.md correctly 1`] = `
|
||||
>
|
||||
<img
|
||||
alt="comment-avatar"
|
||||
src="https://zos.alipayobjects.com/rmsportal/ODTLcjxAfvqbxHnVXCYX.png"
|
||||
src="https://joeschmoe.io/api/v1/random"
|
||||
/>
|
||||
</div>
|
||||
<div
|
||||
@ -276,7 +276,7 @@ exports[`renders ./components/comment/demo/list.md correctly 1`] = `
|
||||
>
|
||||
<img
|
||||
alt="comment-avatar"
|
||||
src="https://zos.alipayobjects.com/rmsportal/ODTLcjxAfvqbxHnVXCYX.png"
|
||||
src="https://joeschmoe.io/api/v1/random"
|
||||
/>
|
||||
</div>
|
||||
<div
|
||||
@ -339,7 +339,7 @@ exports[`renders ./components/comment/demo/nested.md correctly 1`] = `
|
||||
>
|
||||
<img
|
||||
alt="Han Solo"
|
||||
src="https://zos.alipayobjects.com/rmsportal/ODTLcjxAfvqbxHnVXCYX.png"
|
||||
src="https://joeschmoe.io/api/v1/random"
|
||||
/>
|
||||
</span>
|
||||
</div>
|
||||
@ -392,7 +392,7 @@ exports[`renders ./components/comment/demo/nested.md correctly 1`] = `
|
||||
>
|
||||
<img
|
||||
alt="Han Solo"
|
||||
src="https://zos.alipayobjects.com/rmsportal/ODTLcjxAfvqbxHnVXCYX.png"
|
||||
src="https://joeschmoe.io/api/v1/random"
|
||||
/>
|
||||
</span>
|
||||
</div>
|
||||
@ -445,7 +445,7 @@ exports[`renders ./components/comment/demo/nested.md correctly 1`] = `
|
||||
>
|
||||
<img
|
||||
alt="Han Solo"
|
||||
src="https://zos.alipayobjects.com/rmsportal/ODTLcjxAfvqbxHnVXCYX.png"
|
||||
src="https://joeschmoe.io/api/v1/random"
|
||||
/>
|
||||
</span>
|
||||
</div>
|
||||
@ -496,7 +496,7 @@ exports[`renders ./components/comment/demo/nested.md correctly 1`] = `
|
||||
>
|
||||
<img
|
||||
alt="Han Solo"
|
||||
src="https://zos.alipayobjects.com/rmsportal/ODTLcjxAfvqbxHnVXCYX.png"
|
||||
src="https://joeschmoe.io/api/v1/random"
|
||||
/>
|
||||
</span>
|
||||
</div>
|
||||
|
@ -56,12 +56,7 @@ const Demo = () => {
|
||||
<Comment
|
||||
actions={actions}
|
||||
author={<a>Han Solo</a>}
|
||||
avatar={
|
||||
<Avatar
|
||||
src="https://zos.alipayobjects.com/rmsportal/ODTLcjxAfvqbxHnVXCYX.png"
|
||||
alt="Han Solo"
|
||||
/>
|
||||
}
|
||||
avatar={<Avatar src="https://joeschmoe.io/api/v1/random" alt="Han Solo" />}
|
||||
content={
|
||||
<p>
|
||||
We supply a series of design principles, practical patterns and high quality design
|
||||
|
@ -65,7 +65,7 @@ class App extends React.Component {
|
||||
...this.state.comments,
|
||||
{
|
||||
author: 'Han Solo',
|
||||
avatar: 'https://zos.alipayobjects.com/rmsportal/ODTLcjxAfvqbxHnVXCYX.png',
|
||||
avatar: 'https://joeschmoe.io/api/v1/random',
|
||||
content: <p>{this.state.value}</p>,
|
||||
datetime: moment().fromNow(),
|
||||
},
|
||||
@ -87,12 +87,7 @@ class App extends React.Component {
|
||||
<>
|
||||
{comments.length > 0 && <CommentList comments={comments} />}
|
||||
<Comment
|
||||
avatar={
|
||||
<Avatar
|
||||
src="https://zos.alipayobjects.com/rmsportal/ODTLcjxAfvqbxHnVXCYX.png"
|
||||
alt="Han Solo"
|
||||
/>
|
||||
}
|
||||
avatar={<Avatar src="https://joeschmoe.io/api/v1/random" alt="Han Solo" />}
|
||||
content={
|
||||
<Editor
|
||||
onChange={this.handleChange}
|
||||
|
@ -21,7 +21,7 @@ const data = [
|
||||
{
|
||||
actions: [<span key="comment-list-reply-to-0">Reply to</span>],
|
||||
author: 'Han Solo',
|
||||
avatar: 'https://zos.alipayobjects.com/rmsportal/ODTLcjxAfvqbxHnVXCYX.png',
|
||||
avatar: 'https://joeschmoe.io/api/v1/random',
|
||||
content: (
|
||||
<p>
|
||||
We supply a series of design principles, practical patterns and high quality design
|
||||
@ -38,7 +38,7 @@ const data = [
|
||||
{
|
||||
actions: [<span key="comment-list-reply-to-0">Reply to</span>],
|
||||
author: 'Han Solo',
|
||||
avatar: 'https://zos.alipayobjects.com/rmsportal/ODTLcjxAfvqbxHnVXCYX.png',
|
||||
avatar: 'https://joeschmoe.io/api/v1/random',
|
||||
content: (
|
||||
<p>
|
||||
We supply a series of design principles, practical patterns and high quality design
|
||||
|
@ -20,12 +20,7 @@ const ExampleComment = ({ children }) => (
|
||||
<Comment
|
||||
actions={[<span key="comment-nested-reply-to">Reply to</span>]}
|
||||
author={<a>Han Solo</a>}
|
||||
avatar={
|
||||
<Avatar
|
||||
src="https://zos.alipayobjects.com/rmsportal/ODTLcjxAfvqbxHnVXCYX.png"
|
||||
alt="Han Solo"
|
||||
/>
|
||||
}
|
||||
avatar={<Avatar src="https://joeschmoe.io/api/v1/random" alt="Han Solo" />}
|
||||
content={
|
||||
<p>
|
||||
We supply a series of design principles, practical patterns and high quality design
|
||||
|
@ -10465,6 +10465,7 @@ exports[`ConfigProvider components Collapse configProvider 1`] = `
|
||||
role="button"
|
||||
tabindex="0"
|
||||
>
|
||||
<div>
|
||||
<span
|
||||
aria-label="right"
|
||||
class="anticon anticon-right config-collapse-arrow"
|
||||
@ -10484,6 +10485,7 @@ exports[`ConfigProvider components Collapse configProvider 1`] = `
|
||||
/>
|
||||
</svg>
|
||||
</span>
|
||||
</div>
|
||||
Bamboo
|
||||
</div>
|
||||
</div>
|
||||
@ -10503,6 +10505,7 @@ exports[`ConfigProvider components Collapse configProvider componentSize large 1
|
||||
role="button"
|
||||
tabindex="0"
|
||||
>
|
||||
<div>
|
||||
<span
|
||||
aria-label="right"
|
||||
class="anticon anticon-right config-collapse-arrow"
|
||||
@ -10522,6 +10525,7 @@ exports[`ConfigProvider components Collapse configProvider componentSize large 1
|
||||
/>
|
||||
</svg>
|
||||
</span>
|
||||
</div>
|
||||
Bamboo
|
||||
</div>
|
||||
</div>
|
||||
@ -10541,6 +10545,7 @@ exports[`ConfigProvider components Collapse configProvider componentSize middle
|
||||
role="button"
|
||||
tabindex="0"
|
||||
>
|
||||
<div>
|
||||
<span
|
||||
aria-label="right"
|
||||
class="anticon anticon-right config-collapse-arrow"
|
||||
@ -10560,6 +10565,7 @@ exports[`ConfigProvider components Collapse configProvider componentSize middle
|
||||
/>
|
||||
</svg>
|
||||
</span>
|
||||
</div>
|
||||
Bamboo
|
||||
</div>
|
||||
</div>
|
||||
@ -10579,6 +10585,7 @@ exports[`ConfigProvider components Collapse configProvider virtual and dropdownM
|
||||
role="button"
|
||||
tabindex="0"
|
||||
>
|
||||
<div>
|
||||
<span
|
||||
aria-label="right"
|
||||
class="anticon anticon-right ant-collapse-arrow"
|
||||
@ -10598,6 +10605,7 @@ exports[`ConfigProvider components Collapse configProvider virtual and dropdownM
|
||||
/>
|
||||
</svg>
|
||||
</span>
|
||||
</div>
|
||||
Bamboo
|
||||
</div>
|
||||
</div>
|
||||
@ -10617,6 +10625,7 @@ exports[`ConfigProvider components Collapse normal 1`] = `
|
||||
role="button"
|
||||
tabindex="0"
|
||||
>
|
||||
<div>
|
||||
<span
|
||||
aria-label="right"
|
||||
class="anticon anticon-right ant-collapse-arrow"
|
||||
@ -10636,6 +10645,7 @@ exports[`ConfigProvider components Collapse normal 1`] = `
|
||||
/>
|
||||
</svg>
|
||||
</span>
|
||||
</div>
|
||||
Bamboo
|
||||
</div>
|
||||
</div>
|
||||
@ -10655,6 +10665,7 @@ exports[`ConfigProvider components Collapse prefixCls 1`] = `
|
||||
role="button"
|
||||
tabindex="0"
|
||||
>
|
||||
<div>
|
||||
<span
|
||||
aria-label="right"
|
||||
class="anticon anticon-right prefix-Collapse-arrow"
|
||||
@ -10674,6 +10685,7 @@ exports[`ConfigProvider components Collapse prefixCls 1`] = `
|
||||
/>
|
||||
</svg>
|
||||
</span>
|
||||
</div>
|
||||
Bamboo
|
||||
</div>
|
||||
</div>
|
||||
@ -14852,7 +14864,7 @@ exports[`ConfigProvider components List configProvider 1`] = `
|
||||
class="config-avatar config-avatar-circle config-avatar-image"
|
||||
>
|
||||
<img
|
||||
src="https://zos.alipayobjects.com/rmsportal/ODTLcjxAfvqbxHnVXCYX.png"
|
||||
src="https://joeschmoe.io/api/v1/random"
|
||||
/>
|
||||
</span>
|
||||
</div>
|
||||
@ -14904,7 +14916,7 @@ exports[`ConfigProvider components List configProvider componentSize large 1`] =
|
||||
class="config-avatar config-avatar-circle config-avatar-image"
|
||||
>
|
||||
<img
|
||||
src="https://zos.alipayobjects.com/rmsportal/ODTLcjxAfvqbxHnVXCYX.png"
|
||||
src="https://joeschmoe.io/api/v1/random"
|
||||
/>
|
||||
</span>
|
||||
</div>
|
||||
@ -14956,7 +14968,7 @@ exports[`ConfigProvider components List configProvider componentSize middle 1`]
|
||||
class="config-avatar config-avatar-circle config-avatar-image"
|
||||
>
|
||||
<img
|
||||
src="https://zos.alipayobjects.com/rmsportal/ODTLcjxAfvqbxHnVXCYX.png"
|
||||
src="https://joeschmoe.io/api/v1/random"
|
||||
/>
|
||||
</span>
|
||||
</div>
|
||||
@ -15008,7 +15020,7 @@ exports[`ConfigProvider components List configProvider virtual and dropdownMatch
|
||||
class="ant-avatar ant-avatar-circle ant-avatar-image"
|
||||
>
|
||||
<img
|
||||
src="https://zos.alipayobjects.com/rmsportal/ODTLcjxAfvqbxHnVXCYX.png"
|
||||
src="https://joeschmoe.io/api/v1/random"
|
||||
/>
|
||||
</span>
|
||||
</div>
|
||||
@ -15060,7 +15072,7 @@ exports[`ConfigProvider components List normal 1`] = `
|
||||
class="ant-avatar ant-avatar-circle ant-avatar-image"
|
||||
>
|
||||
<img
|
||||
src="https://zos.alipayobjects.com/rmsportal/ODTLcjxAfvqbxHnVXCYX.png"
|
||||
src="https://joeschmoe.io/api/v1/random"
|
||||
/>
|
||||
</span>
|
||||
</div>
|
||||
@ -15112,7 +15124,7 @@ exports[`ConfigProvider components List prefixCls 1`] = `
|
||||
class="ant-avatar ant-avatar-circle ant-avatar-image"
|
||||
>
|
||||
<img
|
||||
src="https://zos.alipayobjects.com/rmsportal/ODTLcjxAfvqbxHnVXCYX.png"
|
||||
src="https://joeschmoe.io/api/v1/random"
|
||||
/>
|
||||
</span>
|
||||
</div>
|
||||
|
@ -362,9 +362,7 @@ describe('ConfigProvider', () => {
|
||||
<List.Item {...props}>
|
||||
<List.Item.Meta
|
||||
{...props}
|
||||
avatar={
|
||||
<Avatar src="https://zos.alipayobjects.com/rmsportal/ODTLcjxAfvqbxHnVXCYX.png" />
|
||||
}
|
||||
avatar={<Avatar src="https://joeschmoe.io/api/v1/random" />}
|
||||
title="Ant Design"
|
||||
description="Ant Design, a design language for background applications, is refined by Ant UED Team"
|
||||
/>
|
||||
|
@ -37,6 +37,7 @@ describe('ConfigProvider.Locale', () => {
|
||||
});
|
||||
}
|
||||
|
||||
// eslint-disable-next-line class-methods-use-this
|
||||
openConfirm = () => {
|
||||
jest.useFakeTimers();
|
||||
Modal.confirm({
|
||||
|
@ -9,7 +9,7 @@ describe('List Item Layout', () => {
|
||||
key: 1,
|
||||
href: 'https://ant.design',
|
||||
title: `ant design`,
|
||||
avatar: 'https://zos.alipayobjects.com/rmsportal/ODTLcjxAfvqbxHnVXCYX.png',
|
||||
avatar: 'https://joeschmoe.io/api/v1/random',
|
||||
description:
|
||||
'Ant Design, a design language for background applications, is refined by Ant UED Team.',
|
||||
content:
|
||||
|
@ -26,7 +26,7 @@ exports[`renders ./components/list/demo/basic.md correctly 1`] = `
|
||||
class="ant-avatar ant-avatar-circle ant-avatar-image"
|
||||
>
|
||||
<img
|
||||
src="https://zos.alipayobjects.com/rmsportal/ODTLcjxAfvqbxHnVXCYX.png"
|
||||
src="https://joeschmoe.io/api/v1/random"
|
||||
/>
|
||||
</span>
|
||||
</div>
|
||||
@ -63,7 +63,7 @@ exports[`renders ./components/list/demo/basic.md correctly 1`] = `
|
||||
class="ant-avatar ant-avatar-circle ant-avatar-image"
|
||||
>
|
||||
<img
|
||||
src="https://zos.alipayobjects.com/rmsportal/ODTLcjxAfvqbxHnVXCYX.png"
|
||||
src="https://joeschmoe.io/api/v1/random"
|
||||
/>
|
||||
</span>
|
||||
</div>
|
||||
@ -100,7 +100,7 @@ exports[`renders ./components/list/demo/basic.md correctly 1`] = `
|
||||
class="ant-avatar ant-avatar-circle ant-avatar-image"
|
||||
>
|
||||
<img
|
||||
src="https://zos.alipayobjects.com/rmsportal/ODTLcjxAfvqbxHnVXCYX.png"
|
||||
src="https://joeschmoe.io/api/v1/random"
|
||||
/>
|
||||
</span>
|
||||
</div>
|
||||
@ -137,7 +137,7 @@ exports[`renders ./components/list/demo/basic.md correctly 1`] = `
|
||||
class="ant-avatar ant-avatar-circle ant-avatar-image"
|
||||
>
|
||||
<img
|
||||
src="https://zos.alipayobjects.com/rmsportal/ODTLcjxAfvqbxHnVXCYX.png"
|
||||
src="https://joeschmoe.io/api/v1/random"
|
||||
/>
|
||||
</span>
|
||||
</div>
|
||||
@ -1658,7 +1658,7 @@ exports[`renders ./components/list/demo/vertical.md correctly 1`] = `
|
||||
class="ant-avatar ant-avatar-circle ant-avatar-image"
|
||||
>
|
||||
<img
|
||||
src="https://zos.alipayobjects.com/rmsportal/ODTLcjxAfvqbxHnVXCYX.png"
|
||||
src="https://joeschmoe.io/api/v1/random"
|
||||
/>
|
||||
</span>
|
||||
</div>
|
||||
@ -1824,7 +1824,7 @@ exports[`renders ./components/list/demo/vertical.md correctly 1`] = `
|
||||
class="ant-avatar ant-avatar-circle ant-avatar-image"
|
||||
>
|
||||
<img
|
||||
src="https://zos.alipayobjects.com/rmsportal/ODTLcjxAfvqbxHnVXCYX.png"
|
||||
src="https://joeschmoe.io/api/v1/random"
|
||||
/>
|
||||
</span>
|
||||
</div>
|
||||
@ -1990,7 +1990,7 @@ exports[`renders ./components/list/demo/vertical.md correctly 1`] = `
|
||||
class="ant-avatar ant-avatar-circle ant-avatar-image"
|
||||
>
|
||||
<img
|
||||
src="https://zos.alipayobjects.com/rmsportal/ODTLcjxAfvqbxHnVXCYX.png"
|
||||
src="https://joeschmoe.io/api/v1/random"
|
||||
/>
|
||||
</span>
|
||||
</div>
|
||||
|
@ -38,7 +38,7 @@ ReactDOM.render(
|
||||
renderItem={item => (
|
||||
<List.Item>
|
||||
<List.Item.Meta
|
||||
avatar={<Avatar src="https://zos.alipayobjects.com/rmsportal/ODTLcjxAfvqbxHnVXCYX.png" />}
|
||||
avatar={<Avatar src="https://joeschmoe.io/api/v1/random" />}
|
||||
title={<a href="https://ant.design">{item.title}</a>}
|
||||
description="Ant Design, a design language for background applications, is refined by Ant UED Team"
|
||||
/>
|
||||
|
@ -27,7 +27,7 @@ const InfiniteListExample = () => {
|
||||
return;
|
||||
}
|
||||
setLoading(true);
|
||||
fetch('https://randomuser.me/api/?results=10&inc=name,gender,email,nat&noinfo')
|
||||
fetch('https://randomuser.me/api/?results=10&inc=name,gender,email,nat,picture&noinfo')
|
||||
.then(res => res.json())
|
||||
.then(body => {
|
||||
setData([...data, ...body.results]);
|
||||
@ -65,9 +65,7 @@ const InfiniteListExample = () => {
|
||||
renderItem={item => (
|
||||
<List.Item key={item.id}>
|
||||
<List.Item.Meta
|
||||
avatar={
|
||||
<Avatar src="https://zos.alipayobjects.com/rmsportal/ODTLcjxAfvqbxHnVXCYX.png" />
|
||||
}
|
||||
avatar={<Avatar src={item.picture.large} />}
|
||||
title={<a href="https://ant.design">{item.name.last}</a>}
|
||||
description={item.email}
|
||||
/>
|
||||
|
@ -25,7 +25,7 @@ import AutoSizer from 'react-virtualized/dist/commonjs/AutoSizer';
|
||||
import VList from 'react-virtualized/dist/commonjs/List';
|
||||
import InfiniteLoader from 'react-virtualized/dist/commonjs/InfiniteLoader';
|
||||
|
||||
const fakeDataUrl = 'https://randomuser.me/api/?results=5&inc=name,gender,email,nat&noinfo';
|
||||
const fakeDataUrl = 'https://randomuser.me/api/?results=5&inc=name,gender,email,nat,picture&noinfo';
|
||||
|
||||
class VirtualizedExample extends React.Component {
|
||||
state = {
|
||||
@ -88,7 +88,7 @@ class VirtualizedExample extends React.Component {
|
||||
return (
|
||||
<List.Item key={key} style={style}>
|
||||
<List.Item.Meta
|
||||
avatar={<Avatar src="https://zos.alipayobjects.com/rmsportal/ODTLcjxAfvqbxHnVXCYX.png" />}
|
||||
avatar={<Avatar src={item.picture.large} />}
|
||||
title={<a href="https://ant.design">{item.name.last}</a>}
|
||||
description={item.email}
|
||||
/>
|
||||
|
@ -18,7 +18,7 @@ import { List, Avatar, Button, Skeleton } from 'antd';
|
||||
import reqwest from 'reqwest';
|
||||
|
||||
const count = 3;
|
||||
const fakeDataUrl = `https://randomuser.me/api/?results=${count}&inc=name,gender,email,nat&noinfo`;
|
||||
const fakeDataUrl = `https://randomuser.me/api/?results=${count}&inc=name,gender,email,nat,picture&noinfo`;
|
||||
|
||||
class LoadMoreList extends React.Component {
|
||||
state = {
|
||||
@ -102,9 +102,7 @@ class LoadMoreList extends React.Component {
|
||||
>
|
||||
<Skeleton avatar title={false} loading={item.loading} active>
|
||||
<List.Item.Meta
|
||||
avatar={
|
||||
<Avatar src="https://zos.alipayobjects.com/rmsportal/ODTLcjxAfvqbxHnVXCYX.png" />
|
||||
}
|
||||
avatar={<Avatar src={item.picture.large} />}
|
||||
title={<a href="https://ant.design">{item.name.last}</a>}
|
||||
description="Ant Design, a design language for background applications, is refined by Ant UED Team"
|
||||
/>
|
||||
|
@ -22,7 +22,7 @@ for (let i = 0; i < 23; i++) {
|
||||
listData.push({
|
||||
href: 'https://ant.design',
|
||||
title: `ant design part ${i}`,
|
||||
avatar: 'https://zos.alipayobjects.com/rmsportal/ODTLcjxAfvqbxHnVXCYX.png',
|
||||
avatar: 'https://joeschmoe.io/api/v1/random',
|
||||
description:
|
||||
'Ant Design, a design language for background applications, is refined by Ant UED Team.',
|
||||
content:
|
||||
|
@ -12,6 +12,7 @@ import {
|
||||
attachTypeApi,
|
||||
ThenableArgument,
|
||||
getKeyThenIncreaseKey,
|
||||
NoticeType,
|
||||
} from '..';
|
||||
|
||||
export default function createUseMessage(
|
||||
@ -77,7 +78,7 @@ export default function createUseMessage(
|
||||
|
||||
hookApiRef.current.open = notify;
|
||||
|
||||
['success', 'info', 'warning', 'error', 'loading'].forEach(type =>
|
||||
(['success', 'info', 'warning', 'error', 'loading'] as NoticeType[]).forEach(type =>
|
||||
attachTypeApi(hookApiRef.current, type),
|
||||
);
|
||||
|
||||
|
@ -13,7 +13,7 @@ import InfoCircleFilled from '@ant-design/icons/InfoCircleFilled';
|
||||
import createUseMessage from './hooks/useMessage';
|
||||
import ConfigProvider, { globalConfig } from '../config-provider';
|
||||
|
||||
type NoticeType = 'info' | 'success' | 'error' | 'warning' | 'loading';
|
||||
export type NoticeType = 'info' | 'success' | 'error' | 'warning' | 'loading';
|
||||
|
||||
let messageInstance: RCNotificationInstance | null;
|
||||
let defaultDuration = 3;
|
||||
@ -129,7 +129,7 @@ const typeToIcon = {
|
||||
};
|
||||
export interface ArgsProps {
|
||||
content: React.ReactNode;
|
||||
duration: number | null;
|
||||
duration?: number;
|
||||
type: NoticeType;
|
||||
prefixCls?: string;
|
||||
rootPrefixCls?: string;
|
||||
@ -227,7 +227,7 @@ const api: any = {
|
||||
},
|
||||
};
|
||||
|
||||
export function attachTypeApi(originalApi: any, type: string) {
|
||||
export function attachTypeApi(originalApi: MessageApi, type: NoticeType) {
|
||||
originalApi[type] = (
|
||||
content: JointContent,
|
||||
duration?: ConfigDuration,
|
||||
@ -246,7 +246,9 @@ export function attachTypeApi(originalApi: any, type: string) {
|
||||
};
|
||||
}
|
||||
|
||||
['success', 'info', 'warning', 'error', 'loading'].forEach(type => attachTypeApi(api, type));
|
||||
(['success', 'info', 'warning', 'error', 'loading'] as NoticeType[]).forEach(type =>
|
||||
attachTypeApi(api, type),
|
||||
);
|
||||
|
||||
api.warn = api.warning;
|
||||
api.useMessage = createUseMessage(getRCNotificationInstance, getRCNoticeProps);
|
||||
|
@ -291,6 +291,11 @@
|
||||
border-color: @primary-color;
|
||||
}
|
||||
|
||||
&:focus {
|
||||
border-color: @primary-color-hover;
|
||||
box-shadow: @input-outline-offset @outline-blur-size @outline-width @primary-color-outline;
|
||||
}
|
||||
|
||||
&[disabled] {
|
||||
color: @disabled-color;
|
||||
background: @disabled-bg;
|
||||
|
@ -82,6 +82,7 @@
|
||||
&-selection-item {
|
||||
flex: 1;
|
||||
overflow: hidden;
|
||||
font-weight: normal;
|
||||
white-space: nowrap;
|
||||
text-overflow: ellipsis;
|
||||
|
||||
|
@ -22,7 +22,7 @@ for (let i = 0; i < 3; i++) {
|
||||
listData.push({
|
||||
href: 'https://ant.design',
|
||||
title: `ant design part ${i}`,
|
||||
avatar: 'https://zos.alipayobjects.com/rmsportal/ODTLcjxAfvqbxHnVXCYX.png',
|
||||
avatar: 'https://joeschmoe.io/api/v1/random',
|
||||
description:
|
||||
'Ant Design, a design language for background applications, is refined by Ant UED Team.',
|
||||
content:
|
||||
|
@ -80,6 +80,7 @@ class Countdown extends React.Component<CountdownProps, {}> {
|
||||
};
|
||||
|
||||
// Countdown do not need display the timestamp
|
||||
// eslint-disable-next-line class-methods-use-this
|
||||
valueRender = (node: React.ReactElement<HTMLDivElement>) =>
|
||||
cloneElement(node, {
|
||||
title: undefined,
|
||||
|
@ -1278,10 +1278,10 @@ describe('Table.filter', () => {
|
||||
});
|
||||
};
|
||||
|
||||
render = () => {
|
||||
render() {
|
||||
const { cols } = this.state;
|
||||
return <Table columns={cols} dataSource={[]} scroll={{ x: 1000 }} />;
|
||||
};
|
||||
}
|
||||
}
|
||||
|
||||
mount(<TestTable />);
|
||||
|
@ -145,11 +145,10 @@
|
||||
}
|
||||
}
|
||||
|
||||
&.@{table-prefix-cls}-row:hover {
|
||||
> td {
|
||||
&.@{table-prefix-cls}-row:hover > td,
|
||||
> td.@{table-prefix-cls}-cell-row-hover {
|
||||
background: @table-row-hover-bg;
|
||||
}
|
||||
}
|
||||
|
||||
&.@{table-prefix-cls}-row-selected {
|
||||
> td {
|
||||
|
@ -300,6 +300,7 @@ class Transfer<RecordType extends TransferItem = TransferItem> extends React.Com
|
||||
}
|
||||
}
|
||||
|
||||
// eslint-disable-next-line class-methods-use-this
|
||||
handleListStyle = (
|
||||
listStyle: TransferProps<RecordType>['listStyle'],
|
||||
direction: TransferDirection,
|
||||
|
@ -163,8 +163,6 @@ export default class TransferList<
|
||||
return text.indexOf(filterValue) >= 0;
|
||||
};
|
||||
|
||||
getCurrentPageItems = () => {};
|
||||
|
||||
// =============================== Render ===============================
|
||||
renderListBody = (
|
||||
renderList: RenderListFunction<RecordType> | undefined,
|
||||
|
@ -161,8 +161,8 @@ const DirectoryTree: React.ForwardRefRenderFunction<RcTree, DirectoryTreeProps>
|
||||
};
|
||||
|
||||
// Windows / Mac single pick
|
||||
const ctrlPick: boolean = nativeEvent.ctrlKey || nativeEvent.metaKey;
|
||||
const shiftPick: boolean = nativeEvent.shiftKey;
|
||||
const ctrlPick: boolean = nativeEvent?.ctrlKey || nativeEvent?.metaKey;
|
||||
const shiftPick: boolean = nativeEvent?.shiftKey;
|
||||
|
||||
// Generate new selected keys
|
||||
let newSelectedKeys: Key[];
|
||||
|
@ -35,7 +35,7 @@ title: Third-Party Libraries
|
||||
| Image Crop | [antd-img-crop](https://github.com/nanxiaobei/antd-img-crop) [react-image-crop](https://github.com/DominicTobias/react-image-crop) |
|
||||
| Trend Lines | [react-sparklines](https://github.com/borisyankov/react-sparklines) |
|
||||
| Keywords highlight | [react-highlight-words](https://github.com/bvaughn/react-highlight-words) |
|
||||
| Text Loop | [react-text-loop](https://github.com/braposo/react-text-loop) |
|
||||
| Text Loop | [react-text-loop-next](https://github.com/samarmohan/react-text-loop-next) [react-fast-marquee](https://github.com/justin-chu/react-fast-marquee) |
|
||||
| Animation | [react-move](https://github.com/react-tools/react-move) [Ant Motion](https://motion.ant.design/components/tween-one) [react-spring](https://www.react-spring.io) |
|
||||
| Page Footer | [rc-footer](https://github.com/react-component/footer) |
|
||||
| Water Mark | [WaterMark](https://procomponents.ant.design/components/water-mark) |
|
||||
|
@ -35,7 +35,7 @@ title: 社区精选组件
|
||||
| 图片裁切 | [antd-img-crop](https://github.com/nanxiaobei/antd-img-crop) [react-image-crop](https://github.com/DominicTobias/react-image-crop) |
|
||||
| 趋势线 | [react-sparklines](https://github.com/borisyankov/react-sparklines) |
|
||||
| 关键字高亮 | [react-highlight-words](https://github.com/bvaughn/react-highlight-words) |
|
||||
| 文字轮播 | [react-text-loop](https://github.com/braposo/react-text-loop) |
|
||||
| 文字轮播 | [react-text-loop-next](https://github.com/samarmohan/react-text-loop-next) [react-fast-marquee](https://github.com/justin-chu/react-fast-marquee) |
|
||||
| 动画 | [react-move](https://github.com/react-tools/react-move) [Ant Motion](https://motion.ant.design/components/tween-one) [react-spring](https://www.react-spring.io) |
|
||||
| 页脚 | [rc-footer](https://github.com/react-component/footer) |
|
||||
| 水印 | [WaterMark](https://procomponents.ant.design/components/water-mark) |
|
||||
|
15
package.json
15
package.json
@ -1,6 +1,6 @@
|
||||
{
|
||||
"name": "antd",
|
||||
"version": "4.17.0-alpha.6",
|
||||
"version": "4.17.0-alpha.7",
|
||||
"description": "An enterprise-class UI design language and React components implementation",
|
||||
"title": "Ant Design",
|
||||
"keywords": [
|
||||
@ -124,7 +124,7 @@
|
||||
"rc-dialog": "~8.6.0",
|
||||
"rc-drawer": "~4.4.2",
|
||||
"rc-dropdown": "~3.2.0",
|
||||
"rc-field-form": "~1.21.0-2",
|
||||
"rc-field-form": "~1.21.0",
|
||||
"rc-image": "~5.2.5",
|
||||
"rc-input-number": "~7.3.0",
|
||||
"rc-mentions": "~1.6.1",
|
||||
@ -140,7 +140,7 @@
|
||||
"rc-slider": "~9.7.4",
|
||||
"rc-steps": "~4.1.0",
|
||||
"rc-switch": "~3.2.0",
|
||||
"rc-table": "~7.18.0",
|
||||
"rc-table": "~7.19.0",
|
||||
"rc-tabs": "~11.10.0",
|
||||
"rc-textarea": "~0.3.0",
|
||||
"rc-tooltip": "~5.1.1",
|
||||
@ -173,8 +173,8 @@
|
||||
"@types/react-dom": "^17.0.0",
|
||||
"@types/react-window": "^1.8.2",
|
||||
"@types/warning": "^3.0.0",
|
||||
"@typescript-eslint/eslint-plugin": "^4.1.1",
|
||||
"@typescript-eslint/parser": "^4.1.1",
|
||||
"@typescript-eslint/eslint-plugin": "^5.0.0",
|
||||
"@typescript-eslint/parser": "^5.0.0",
|
||||
"@wojtekmaj/enzyme-adapter-react-17": "^0.6.0",
|
||||
"antd-img-crop": "^3.1.1",
|
||||
"antd-pro-merge-less": "^3.0.11",
|
||||
@ -198,7 +198,7 @@
|
||||
"enzyme": "^3.10.0",
|
||||
"enzyme-to-json": "^3.6.0",
|
||||
"esbuild-loader": "^2.13.1",
|
||||
"eslint": "^7.9.0",
|
||||
"eslint": "^8.0.0",
|
||||
"eslint-config-airbnb": "^18.0.0",
|
||||
"eslint-config-prettier": "^8.0.0",
|
||||
"eslint-plugin-babel": "^5.3.0",
|
||||
@ -247,6 +247,7 @@
|
||||
"react-dnd-html5-backend": "^14.0.0",
|
||||
"react-dom": "^17.0.1",
|
||||
"react-draggable": "^4.4.3",
|
||||
"react-fast-marquee": "^1.2.1",
|
||||
"react-github-button": "^0.1.11",
|
||||
"react-helmet-async": "~1.1.2",
|
||||
"react-highlight-words": "^0.17.0",
|
||||
@ -257,7 +258,7 @@
|
||||
"react-sortable-hoc": "^2.0.0",
|
||||
"react-sticky": "^6.0.3",
|
||||
"react-test-renderer": "^17.0.1",
|
||||
"react-text-loop": "^2.3.0",
|
||||
"react-text-loop-next": "0.0.3",
|
||||
"react-virtualized": "^9.22.0",
|
||||
"react-window": "^1.8.5",
|
||||
"remark": "^14.0.1",
|
||||
|
25
renovate.json
Normal file
25
renovate.json
Normal file
@ -0,0 +1,25 @@
|
||||
{
|
||||
"$schema": "https://docs.renovatebot.com/renovate-schema.json",
|
||||
"automerge": false,
|
||||
"dependencyDashboard": true,
|
||||
"rebaseWhen": "conflicted",
|
||||
"ignoreDeps": [],
|
||||
"labels": ["dependencies"],
|
||||
"postUpdateOptions": ["yarnDedupeHighest"],
|
||||
"prConcurrentLimit": 30,
|
||||
"prHourlyLimit": 0,
|
||||
"schedule": "on sunday before 6:00am",
|
||||
"timezone": "UTC",
|
||||
"packageRules": [
|
||||
{
|
||||
"groupName": "react-component",
|
||||
"matchPackagePatterns": "rc-*",
|
||||
"minor": {
|
||||
"enabled": false
|
||||
},
|
||||
"major": {
|
||||
"enabled": false
|
||||
}
|
||||
}
|
||||
]
|
||||
}
|
@ -45,8 +45,9 @@ class Article extends React.Component<ArticleProps> {
|
||||
return true;
|
||||
}
|
||||
|
||||
// eslint-disable-next-line class-methods-use-this
|
||||
onResourceClick: React.MouseEventHandler<HTMLAnchorElement> = event => {
|
||||
const { target } = (event as unknown) as { target: HTMLAnchorElement };
|
||||
const { target } = event as unknown as { target: HTMLAnchorElement };
|
||||
if (!window.gtag) {
|
||||
return;
|
||||
}
|
||||
@ -166,4 +167,4 @@ class Article extends React.Component<ArticleProps> {
|
||||
}
|
||||
}
|
||||
|
||||
export default (injectIntl(Article as any) as any) as React.ComponentClass<ArticleProps>;
|
||||
export default injectIntl(Article as any) as any as React.ComponentClass<ArticleProps>;
|
||||
|
@ -95,6 +95,7 @@ class PicSearcher extends Component<PicSearcherProps, PicSearcherState> {
|
||||
reader.readAsDataURL(file);
|
||||
};
|
||||
|
||||
// eslint-disable-next-line class-methods-use-this
|
||||
toImage = (url: any) =>
|
||||
new Promise(resolve => {
|
||||
const img = new Image();
|
||||
@ -133,6 +134,7 @@ class PicSearcher extends Component<PicSearcherProps, PicSearcherState> {
|
||||
}
|
||||
};
|
||||
|
||||
// eslint-disable-next-line class-methods-use-this
|
||||
onCopied = (text: string) => {
|
||||
message.success(
|
||||
<span>
|
||||
@ -145,15 +147,8 @@ class PicSearcher extends Component<PicSearcherProps, PicSearcherState> {
|
||||
const {
|
||||
intl: { messages },
|
||||
} = this.props;
|
||||
const {
|
||||
modalVisible,
|
||||
popoverVisible,
|
||||
icons,
|
||||
fileList,
|
||||
loading,
|
||||
modelLoaded,
|
||||
error,
|
||||
} = this.state;
|
||||
const { modalVisible, popoverVisible, icons, fileList, loading, modelLoaded, error } =
|
||||
this.state;
|
||||
return (
|
||||
<div className="icon-pic-searcher">
|
||||
<Popover
|
||||
|
@ -173,6 +173,7 @@ class Header extends React.Component<HeaderProps, HeaderState> {
|
||||
});
|
||||
};
|
||||
|
||||
// eslint-disable-next-line class-methods-use-this
|
||||
handleVersionChange = (url: string) => {
|
||||
const currentUrl = window.location.href;
|
||||
const currentPathname = window.location.pathname;
|
||||
|
Loading…
Reference in New Issue
Block a user