Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

chore: Conflict 4.0-prepare into master #18814

Closed
wants to merge 54 commits into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
54 commits
Select commit Hold shift + click to select a range
f23f53b
Fixed error in modal documentation (#18723)
changdaniel Sep 6, 2019
4615c70
:clapper: fix Dragger style in Form demo
afc163 Sep 7, 2019
cf97324
:white_check_mark: fix demo snapshot
afc163 Sep 7, 2019
c2bcf44
:lipstick: should not insert space to link button
afc163 Sep 7, 2019
4338a5b
:white_check_mark: add more test cases for Button
afc163 Sep 7, 2019
1903ae0
:white_check_mark: fix test case of Button loading
afc163 Sep 7, 2019
5dd1323
feat: better seo
ycjcl868 Jul 31, 2019
3159242
fix: seo
ycjcl868 Jul 31, 2019
caa6eb0
fix: postProcessHtml
ycjcl868 Sep 7, 2019
4490ee8
refactor: seo use react-helmet
ycjcl868 Sep 7, 2019
30dd9a3
feat: helmet seo
ycjcl868 Sep 8, 2019
15f0841
fix: lint
ycjcl868 Sep 8, 2019
35c537e
fix: desc
ycjcl868 Sep 8, 2019
5060628
fix: find p tag content
ycjcl868 Sep 8, 2019
e1ab352
fix: content
ycjcl868 Sep 8, 2019
796d2aa
fix: better slice description
ycjcl868 Sep 8, 2019
60536d3
Update README-zh_CN.md
afc163 Sep 8, 2019
a93fe52
fix: default seo title and description
ycjcl868 Sep 8, 2019
e98afc5
:memo: description
ycjcl868 Sep 8, 2019
161801c
fix: desc [object] bug
ycjcl868 Sep 8, 2019
ff3225f
fix: rm comment
ycjcl868 Sep 8, 2019
c3ac730
:memo: update description
afc163 Sep 8, 2019
588efe4
:memo: fix typo
afc163 Sep 9, 2019
7743967
:bug: Fix ConfigProvider locale not working for confirm
afc163 Sep 9, 2019
800e3ec
Update index.en-US.md
Jiang-Xuan Sep 9, 2019
563fa3c
Update index.zh-CN.md
Jiang-Xuan Sep 9, 2019
49e4cc8
Merge pull request #18737 from Jiang-Xuan/patch-1
yoyo837 Sep 9, 2019
2408651
order
yoyo837 Sep 9, 2019
e95466b
:memo: update Transfer documentation
afc163 Sep 9, 2019
11a0ebe
docs: update `colon` for Form (#18755)
yoyo837 Sep 10, 2019
c98b820
chore: sort package.json by sort-package-json (#18747)
orzyyyy Sep 10, 2019
e13a870
chore(docs): add dropdownMenuStyle props for AutoComplete and Select
yoyo837 Sep 11, 2019
b2e206d
fix(module:avatar): Extrusion Deformation of Long Pictures
Eusen Sep 11, 2019
265a01e
fix doc
chenshuai2144 Sep 10, 2019
bf5140b
:wheelchair: Accessibility of Alert close button
MrHeer Sep 10, 2019
d2e76d9
:ok_hand: remove :focus
MrHeer Sep 10, 2019
b786e6b
docs: update param version info(3.10.0) for title (#18741)
Sep 12, 2019
98dfd2a
Fix number controls overlap borders when active
Sep 12, 2019
6f695b0
:bug: Input.Search should trigger onSearch when clear
afc163 Sep 12, 2019
09810a2
:white_check_mark: fix test cov for Search onChange
afc163 Sep 13, 2019
56abebf
docs: add onMouseEnter and onMouseLeave event TypeScript definition …
MrHeer Sep 13, 2019
a19d338
fix: redundant jobs of github actions
orzyyyy Sep 13, 2019
5f6f325
chore: remove useless line
orzyyyy Sep 13, 2019
f986c6b
chore: publish to github-package when released
orzyyyy Sep 11, 2019
ec84967
fix: tweak indent
orzyyyy Sep 11, 2019
4b8d76b
chore: update release action
orzyyyy Sep 13, 2019
df1817f
Revert "chore: update release action"
orzyyyy Sep 13, 2019
a9498bb
chore: update release action
orzyyyy Sep 13, 2019
ba0af6e
:up: fs-extra -> fs
afc163 Sep 14, 2019
4d74609
chore: add branch
orzyyyy Sep 14, 2019
1f01b40
fix: tweak indent
orzyyyy Sep 14, 2019
13dd1c4
Merge pull request #18800 from ant-design/fix-job
ycjcl868 Sep 14, 2019
b814f79
Merge master into conflict-prepare-master
ycjcl868 Sep 16, 2019
4fda90f
upd: snapshot
ycjcl868 Sep 16, 2019
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
4 changes: 2 additions & 2 deletions .github/workflows/deploy-site.yml
Original file line number Diff line number Diff line change
@@ -1,10 +1,10 @@
name: Deploy website
on:
release:
actions:
- published
types: [published]
branches:
- master

jobs:
build-and-deploy:
runs-on: ubuntu-latest
Expand Down
28 changes: 28 additions & 0 deletions .github/workflows/publish-to-github-package.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,28 @@
name: Publish to github-package
on:
release:
types: [published]

jobs:
publish:
runs-on: ubuntu-latest

steps:
- name: checkout
uses: actions/checkout@master

- uses: actions/setup-node@v1
with:
node-version: '12.x'
registry-url: 'https://npm.pkg.github.com'

- name: install
run: npm install

- name: compile
run: npm run compile

- name: publish
run: npm publish
env:
NODE_AUTH_TOKEN: ${{ secrets.GITHUB_TOKEN }}
2 changes: 1 addition & 1 deletion CHANGELOG.zh-CN.md
Original file line number Diff line number Diff line change
Expand Up @@ -66,7 +66,7 @@ timeline: true
- Descriptions
- 🐞 修复 Descriptions.Item 最后一个宽度计算不正确的问题。[#18568](https://github.com/ant-design/ant-design/pull/18568)
- 🐞 Description.Item 在渲染时会复用用户提供的 `key`。[#18578](https://github.com/ant-design/ant-design/pull/18578)
- 🐞 修复 Tab 内容宽度在 Safari 下不正确的问题。[#18574](https://github.com/ant-design/ant-design/pull/18574)
- 🐞 修复 Tabs 内容宽度在 Safari 下不正确的问题。[#18574](https://github.com/ant-design/ant-design/pull/18574)
- 🐞 修复 Mentions 的 `prefix` 为空字符串时,弹窗位置不正确的问题。[#18576](https://github.com/ant-design/ant-design/pull/18576)
- 🐞 修复 Upload.Dragger 在 `multiple` 为 false 时,仍然可以上传多份文件的问题。[#18580](https://github.com/ant-design/ant-design/pull/18580)
- 🐞 修复 `Button[href]` 在 Card `actions` 中样式变形的问题。[#18588](https://github.com/ant-design/ant-design/pull/18588)
Expand Down
2 changes: 1 addition & 1 deletion README-zh_CN.md
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@

<div align="center">

一套企业级的 UI 设计语言和 React 实现
一套企业级 UI 设计语言和 React 组件库

[![CircleCI branch](https://img.shields.io/circleci/project/github/ant-design/ant-design/master.svg?style=flat-square)](https://circleci.com/gh/ant-design/ant-design) [![Codecov](https://img.shields.io/codecov/c/github/ant-design/ant-design/master.svg?style=flat-square)](https://codecov.io/gh/ant-design/ant-design/branch/master) [![npm package](https://img.shields.io/npm/v/antd.svg?style=flat-square)](https://www.npmjs.org/package/antd) [![NPM downloads](http://img.shields.io/npm/dm/antd.svg?style=flat-square)](http://npmjs.com/antd)

Expand Down
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@

<div align="center">

An enterprise-class UI design language and React implementation.
An enterprise-class UI design language and React UI library.

[![CircleCI branch](https://img.shields.io/circleci/project/github/ant-design/ant-design/master.svg?style=flat-square)](https://circleci.com/gh/ant-design/ant-design) [![Codecov](https://img.shields.io/codecov/c/github/ant-design/ant-design/master.svg?style=flat-square)](https://codecov.io/gh/ant-design/ant-design/branch/master) [![](https://flat.badgen.net/npm/v/antd?icon=npm)](https://www.npmjs.com/package/antd) [![NPM downloads](http://img.shields.io/npm/dm/antd.svg?style=flat-square)](http://npmjs.com/antd)

Expand Down
30 changes: 15 additions & 15 deletions components/alert/__tests__/__snapshots__/demo.test.js.snap
Original file line number Diff line number Diff line change
Expand Up @@ -68,10 +68,10 @@ exports[`renders ./components/alert/demo/banner.md correctly 1`] = `
<span
class="ant-alert-description"
/>
<span
<button
class="ant-alert-close-icon"
role="button"
tabindex="0"
type="button"
>
<span
aria-label="close"
Expand All @@ -93,7 +93,7 @@ exports[`renders ./components/alert/demo/banner.md correctly 1`] = `
/>
</svg>
</span>
</span>
</button>
</div>
<br />
<div
Expand Down Expand Up @@ -176,10 +176,10 @@ exports[`renders ./components/alert/demo/closable.md correctly 1`] = `
<span
class="ant-alert-description"
/>
<span
<button
class="ant-alert-close-icon"
role="button"
tabindex="0"
type="button"
>
<span
aria-label="close"
Expand All @@ -201,7 +201,7 @@ exports[`renders ./components/alert/demo/closable.md correctly 1`] = `
/>
</svg>
</span>
</span>
</button>
</div>
<div
class="ant-alert ant-alert-error ant-alert-with-description ant-alert-no-icon ant-alert-closable"
Expand All @@ -217,10 +217,10 @@ exports[`renders ./components/alert/demo/closable.md correctly 1`] = `
>
Error Description Error Description Error Description Error Description Error Description Error Description
</span>
<span
<button
class="ant-alert-close-icon"
role="button"
tabindex="0"
type="button"
>
<span
aria-label="close"
Expand All @@ -242,7 +242,7 @@ exports[`renders ./components/alert/demo/closable.md correctly 1`] = `
/>
</svg>
</span>
</span>
</button>
</div>
</div>
`;
Expand All @@ -260,17 +260,17 @@ exports[`renders ./components/alert/demo/close-text.md correctly 1`] = `
<span
class="ant-alert-description"
/>
<span
<button
class="ant-alert-close-icon"
role="button"
tabindex="0"
type="button"
>
<span
class="ant-alert-close-text"
>
Close Now
</span>
</span>
</button>
</div>
`;

Expand Down Expand Up @@ -932,10 +932,10 @@ exports[`renders ./components/alert/demo/smooth-closed.md correctly 1`] = `
<span
class="ant-alert-description"
/>
<span
<button
class="ant-alert-close-icon"
role="button"
tabindex="0"
type="button"
>
<span
aria-label="close"
Expand All @@ -957,7 +957,7 @@ exports[`renders ./components/alert/demo/smooth-closed.md correctly 1`] = `
/>
</svg>
</span>
</span>
</button>
</div>
<p>
placeholder text here
Expand Down
10 changes: 5 additions & 5 deletions components/alert/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@ export interface AlertProps {
/** Additional content of Alert */
description?: React.ReactNode;
/** Callback when close Alert */
onClose?: React.MouseEventHandler<HTMLAnchorElement>;
onClose?: React.MouseEventHandler<HTMLButtonElement>;
/** Trigger when animation ending of Alert */
afterClose?: () => void;
/** Whether to show icon */
Expand Down Expand Up @@ -70,7 +70,7 @@ export default class Alert extends React.Component<AlertProps, AlertState> {
closed: false,
};

handleClose = (e: React.MouseEvent<HTMLAnchorElement>) => {
handleClose = (e: React.MouseEvent<HTMLButtonElement>) => {
e.preventDefault();
const dom = ReactDOM.findDOMNode(this) as HTMLElement;
dom.style.height = `${dom.offsetHeight}px`;
Expand Down Expand Up @@ -134,14 +134,14 @@ export default class Alert extends React.Component<AlertProps, AlertState> {
);

const closeIcon = closable ? (
<span
role="button"
<button
type="button"
onClick={this.handleClose}
className={`${prefixCls}-close-icon`}
tabIndex={0}
>
{closeText ? <span className={`${prefixCls}-close-text`}>{closeText}</span> : <Close />}
</span>
</button>
) : null;

const dataOrAriaProps = getDataOrAriaProps(this.props);
Expand Down
2 changes: 2 additions & 0 deletions components/alert/style/index.less
Original file line number Diff line number Diff line change
Expand Up @@ -74,6 +74,8 @@
overflow: hidden;
font-size: @font-size-sm;
line-height: 22px;
border: none;
background-color: transparent;
cursor: pointer;

.@{iconfont-css-prefix}-close {
Expand Down
1 change: 1 addition & 0 deletions components/auto-complete/index.en-US.md
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,7 @@ When there is a need for autocomplete functionality.
| backfill | backfill selected item the input when using keyboard | boolean | false | |
| children (for customize input element) | customize input element | HTMLInputElement <br /><br /> HTMLTextAreaElement <br /><br /> `React.ReactElement<InputProps>` | `<Input />` | |
| children (for dataSource) | Data source to auto complete | `React.ReactElement<OptionProps>` <br /><br /> `Array<React.ReactElement<OptionProps>>` | - | |
| dropdownMenuStyle | additional style applied to dropdown menu | object | | |
| defaultActiveFirstOption | Whether active first option by default | boolean | true | |
| defaultValue | Initial selected option. | string\|string\[] | - | |
| disabled | Whether disabled select | boolean | false | |
Expand Down
12 changes: 9 additions & 3 deletions components/auto-complete/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ import toArray from 'rc-util/lib/Children/toArray';
import { SelectProps as RcSelectProps } from 'rc-select';
import classNames from 'classnames';
import omit from 'omit.js';
import Select, { InternalSelectProps, OptionType } from '../select';
import Select, { InternalSelectProps, OptionType, SelectValue } from '../select';
import { ConfigConsumer, ConfigConsumerProps } from '../config-provider';
import warning from '../_util/warning';

Expand All @@ -22,11 +22,17 @@ export interface DataSourceItemObject {
value: string;
text: string;
}
export type DataSourceItemType = string | DataSourceItemObject;

export interface AutoCompleteProps
extends Omit<InternalSelectProps<string>, 'inputIcon' | 'loading' | 'mode' | 'optionLabelProp'> {
dataSource?: DataSourceItemType[];
dropdownMenuStyle?: React.CSSProperties;
autoFocus?: boolean;
backfill?: boolean;
optionLabelProp?: string;
onChange?: (value: SelectValue) => void;
onSelect?: (value: SelectValue, option: Object) => any;
onBlur?: (value: SelectValue) => void;
onFocus?: () => void;
}

function isSelectOptionOrSelectOptGroup(child: any): Boolean {
Expand Down
1 change: 1 addition & 0 deletions components/auto-complete/index.zh-CN.md
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,7 @@ title: AutoComplete
| backfill | 使用键盘选择选项的时候把选中项回填到输入框中 | boolean | false | |
| children (自定义输入框) | 自定义输入框 | HTMLInputElement <br /><br /> HTMLTextAreaElement <br /><br /> `React.ReactElement<InputProps>` | `<Input />` | |
| children (自动完成的数据源) | 自动完成的数据源 | `React.ReactElement<OptionProps>` <br /><br /> `Array<React.ReactElement<OptionProps>>` | - | |
| dropdownMenuStyle | dropdown 菜单自定义样式 | object | | |
| defaultActiveFirstOption | 是否默认高亮第一个选项。 | boolean | true | |
| defaultValue | 指定默认选中的条目 | string\|string\[]\| 无 | |
| disabled | 是否禁用 | boolean | false | |
Expand Down
1 change: 1 addition & 0 deletions components/avatar/style/index.less
Original file line number Diff line number Diff line change
Expand Up @@ -37,6 +37,7 @@
display: block;
width: 100%;
height: 100%;
object-fit: cover;
}
}

Expand Down
39 changes: 39 additions & 0 deletions components/button/__tests__/__snapshots__/index.test.js.snap
Original file line number Diff line number Diff line change
Expand Up @@ -155,6 +155,17 @@ exports[`Button renders Chinese characters correctly 6`] = `
</button>
`;

exports[`Button renders Chinese characters correctly 7`] = `
<button
class="ant-btn"
type="button"
>
<span>
按 钮
</span>
</button>
`;

exports[`Button renders correctly 1`] = `
<button
class="ant-btn"
Expand Down Expand Up @@ -189,6 +200,17 @@ exports[`Button should merge text if children using variable 1`] = `
</button>
`;

exports[`Button should not insert space to link button 1`] = `
<button
class="ant-btn ant-btn-link"
type="button"
>
<span>
按钮
</span>
</button>
`;

exports[`Button should not render as link button when href is undefined 1`] = `
<button
class="ant-btn ant-btn-primary"
Expand All @@ -200,6 +222,23 @@ exports[`Button should not render as link button when href is undefined 1`] = `
</button>
`;

exports[`Button should render empty button without errors 1`] = `
<Button
block={false}
ghost={false}
htmlType="button"
loading={false}
>
<Wave>
<button
className="ant-btn"
onClick={[Function]}
type="button"
/>
</Wave>
</Button>
`;

exports[`Button should support link button 1`] = `
<a
class="ant-btn"
Expand Down