mirror of
https://github.com/ant-design/ant-design.git
synced 2025-06-07 17:44:35 +08:00
Merge pull request #16213 from ant-design/master
Merge master into feature
This commit is contained in:
commit
252e1dd7e9
@ -1,7 +1,4 @@
|
||||
**/*.md
|
||||
**/*.svg
|
||||
**/*.ejs
|
||||
**/*.html
|
||||
package.json
|
||||
.umi
|
||||
.umi-production
|
@ -2,6 +2,7 @@
|
||||
"singleQuote": true,
|
||||
"trailingComma": "all",
|
||||
"printWidth": 100,
|
||||
"proseWrap": "never",
|
||||
"overrides": [
|
||||
{
|
||||
"files": ".prettierrc",
|
||||
@ -10,4 +11,4 @@
|
||||
}
|
||||
}
|
||||
]
|
||||
}
|
||||
}
|
@ -15,11 +15,28 @@ timeline: true
|
||||
|
||||
---
|
||||
|
||||
## 3.16.4
|
||||
|
||||
`2019-04-21`
|
||||
|
||||
- 🐞 Fix circle button responding mouse event when loading. [#16063](https://github.com/ant-design/ant-design/pull/16063) [@gxvv](https://github.com/gxvv)
|
||||
- 🐞 Fix issue that Form.Item's `labelAlign` does not work. [#16067](https://github.com/ant-design/ant-design/issues/16067)
|
||||
- 🐞 Fix issue that tailing debounce call rasing error when Spin unmount. [#16081](https://github.com/ant-design/ant-design/pull/16081) [@raybooysen](https://github.com/raybooysen)
|
||||
- 🐞 Fix issue that List's `defaultPageSize` does not work. [#16100](https://github.com/ant-design/ant-design/issues/16100)
|
||||
- 🐞 Fix error moment call in DatePicker. [#16109](https://github.com/ant-design/ant-design/issues/16109)
|
||||
- 🐞 Fix Radio does not in center on Firefox. [#16039](https://github.com/ant-design/ant-design/issues/16039)
|
||||
- 🐞 Fix issue that Affix's `target` does not work after it's value changing. [#16146](https://github.com/ant-design/ant-design/pull/16146)
|
||||
- 🐞 Fix the Modal's animation issue Modal on first rendering. [#15795](https://github.com/ant-design/ant-design/issues/15795)
|
||||
- 🐞 Fix issue that Table's `rowSelection.columnWidth` does not work. [#16163](https://github.com/ant-design/ant-design/issues/16163)
|
||||
- 🐞 Fix type definition of Form.create. [#16095](https://github.com/ant-design/ant-design/issues/16095)
|
||||
- 🐞 Fix type definition of Icon's `aria-hidden`. [#16202](https://github.com/ant-design/ant-design/pull/16202)
|
||||
- 🐞 Fix type definition of PageHeader's `tags`. [#16092](https://github.com/ant-design/ant-design/issues/16092)
|
||||
- 🌟 Add new less variable `@text-selection-bg;`. [#16155](https://github.com/ant-design/ant-design/pull/16155)
|
||||
|
||||
## 3.16.3
|
||||
|
||||
`2019-04-12`
|
||||
|
||||
|
||||
- 🐞 **Fix Button TypeScript definition.** [#15938](https://github.com/ant-design/ant-design/pull/15938)
|
||||
- ⚠️ Add DatePicker warning when time invalidate. [#15920](https://github.com/ant-design/ant-design/pull/15920)
|
||||
- 🐞 Fix Menu arrow not display in old version of IE. [#15932](https://github.com/ant-design/ant-design/pull/15932)
|
||||
|
@ -15,12 +15,30 @@ timeline: true
|
||||
|
||||
---
|
||||
|
||||
## 3.16.4
|
||||
|
||||
`2019-04-21`
|
||||
|
||||
- 🐞 修复圆形 Button 在 `loading` 时还会响应鼠标事件的问题。[#16063](https://github.com/ant-design/ant-design/pull/16063) [@gxvv](https://github.com/gxvv)
|
||||
- 🐞 修复 Form.Item 的 `labelAlign` 不生效的问题。[#16067](https://github.com/ant-design/ant-design/issues/16067)
|
||||
- 🐞 修复 Spin 在 unmount 时遗留的 debounce 调用导致的报错问题。[#16081](https://github.com/ant-design/ant-design/pull/16081) [@raybooysen](https://github.com/raybooysen)
|
||||
- 🐞 修复 List 的 `defaultPageSize` 不生效的问题。[#16100](https://github.com/ant-design/ant-design/issues/16100)
|
||||
- 🐞 修复 PageHeader 的 `tags` 类型错误。[#16092](https://github.com/ant-design/ant-design/issues/16092)
|
||||
- 🐞 修复 DatePicker 中 moment 报错的问题。[#16109](https://github.com/ant-design/ant-design/issues/16109)
|
||||
- 🐞 修复 Radio 在 Firefox 上没有垂直居中的问题。[#16039](https://github.com/ant-design/ant-design/issues/16039)
|
||||
- 🐞 修复 Affix 的 `target` 变化后不能工作的问题。[#16146](https://github.com/ant-design/ant-design/pull/16146)
|
||||
- 🐞 修复 Modal 在首次渲染时的动画问题。[#15795](https://github.com/ant-design/ant-design/issues/15795)
|
||||
- 🐞 修复 Table 的 `rowSelection.columnWidth` 不工作的问题。[#16163](https://github.com/ant-design/ant-design/issues/16163)
|
||||
- 🐞 修复 Form.create 的类型定义。[#16095](https://github.com/ant-design/ant-design/issues/16095)
|
||||
- 🐞 修复 Icon `aria-hidden` 的类型定义。[#16202](https://github.com/ant-design/ant-design/pull/16202)
|
||||
- 🌟 新增 less 变量 `@text-selection-bg;`。[#16155](https://github.com/ant-design/ant-design/pull/16155)
|
||||
|
||||
## 3.16.3
|
||||
|
||||
`2019-04-12`
|
||||
|
||||
- 🐞 **修复 Button TS 类型定义。**[#15938](https://github.com/ant-design/ant-design/pull/15938)
|
||||
- ⚠️ DatePicker 新增当日期不合法的提示。[#15920](https://github.com/ant-design/ant-design/pull/15920)
|
||||
- ⚠️ DatePicker 新增当日期不合法的提示。[#15920](https://github.com/ant-design/ant-design/pull/15920)
|
||||
- 🐞 修复 Menu 箭头在老 IE 版本上不显示的问题。[#15932](https://github.com/ant-design/ant-design/pull/15932)
|
||||
- 🐞 修复 Progress 当 `status` 为 `undefined` 时的展示。[#15951](https://github.com/ant-design/ant-design/pull/15951)
|
||||
- 🐞 修复 Menu 折叠时 Tooltip 的问题。[#15948](https://github.com/ant-design/ant-design/pull/15948)
|
||||
|
20
components/date-picker/InputIcon.tsx
Normal file
20
components/date-picker/InputIcon.tsx
Normal file
@ -0,0 +1,20 @@
|
||||
import * as React from 'react';
|
||||
import Icon from '../icon';
|
||||
import classNames from 'classnames';
|
||||
|
||||
export default function InputIcon(props: { suffixIcon: any; prefixCls: string }) {
|
||||
const { suffixIcon, prefixCls } = props;
|
||||
return (
|
||||
(suffixIcon &&
|
||||
(React.isValidElement<{ className?: string }>(suffixIcon) ? (
|
||||
React.cloneElement(suffixIcon, {
|
||||
className: classNames({
|
||||
[suffixIcon.props.className!]: suffixIcon.props.className,
|
||||
[`${prefixCls}-picker-icon`]: true,
|
||||
}),
|
||||
})
|
||||
) : (
|
||||
<span className={`${prefixCls}-picker-icon`}>{suffixIcon}</span>
|
||||
))) || <Icon type="calendar" className={`${prefixCls}-picker-icon`} />
|
||||
);
|
||||
}
|
@ -13,6 +13,7 @@ import warning from '../_util/warning';
|
||||
import interopDefault from '../_util/interopDefault';
|
||||
import { RangePickerValue, RangePickerPresetRange } from './interface';
|
||||
import { formatDate } from './utils';
|
||||
import InputIcon from './InputIcon';
|
||||
|
||||
export interface RangePickerState {
|
||||
value?: RangePickerValue;
|
||||
@ -368,17 +369,7 @@ class RangePicker extends React.Component<any, RangePickerState> {
|
||||
/>
|
||||
) : null;
|
||||
|
||||
const inputIcon = (suffixIcon &&
|
||||
(React.isValidElement<{ className?: string }>(suffixIcon) ? (
|
||||
React.cloneElement(suffixIcon, {
|
||||
className: classNames({
|
||||
[suffixIcon.props.className!]: suffixIcon.props.className,
|
||||
[`${prefixCls}-picker-icon`]: true,
|
||||
}),
|
||||
})
|
||||
) : (
|
||||
<span className={`${prefixCls}-picker-icon`}>{suffixIcon}</span>
|
||||
))) || <Icon type="calendar" className={`${prefixCls}-picker-icon`} />;
|
||||
const inputIcon = <InputIcon suffixIcon={suffixIcon} prefixCls={prefixCls} />;
|
||||
|
||||
const input = ({ value: inputValue }: { value: any }) => {
|
||||
const [start, end] = inputValue;
|
||||
|
@ -7,6 +7,7 @@ import classNames from 'classnames';
|
||||
import Icon from '../icon';
|
||||
import { ConfigConsumer, ConfigConsumerProps } from '../config-provider';
|
||||
import interopDefault from '../_util/interopDefault';
|
||||
import InputIcon from './InputIcon';
|
||||
|
||||
function formatValue(value: moment.Moment | null, format: string): string {
|
||||
return (value && value.format(format)) || '';
|
||||
@ -180,17 +181,7 @@ class WeekPicker extends React.Component<any, WeekPickerState> {
|
||||
/>
|
||||
) : null;
|
||||
|
||||
const inputIcon = (suffixIcon &&
|
||||
(React.isValidElement<{ className?: string }>(suffixIcon) ? (
|
||||
React.cloneElement(suffixIcon, {
|
||||
className: classNames({
|
||||
[suffixIcon.props.className!]: suffixIcon.props.className,
|
||||
[`${prefixCls}-picker-icon`]: true,
|
||||
}),
|
||||
})
|
||||
) : (
|
||||
<span className={`${prefixCls}-picker-icon`}>{suffixIcon}</span>
|
||||
))) || <Icon type="calendar" className={`${prefixCls}-picker-icon`} />;
|
||||
const inputIcon = <InputIcon suffixIcon={suffixIcon} prefixCls={prefixCls} />;
|
||||
|
||||
const input = ({ value }: { value: moment.Moment | undefined }) => (
|
||||
<span style={{ display: 'inline-block', width: '100%' }}>
|
||||
|
@ -32,170 +32,175 @@
|
||||
border-collapse: collapse;
|
||||
}
|
||||
|
||||
&-thead > tr > th {
|
||||
color: @table-header-color;
|
||||
font-weight: 500;
|
||||
text-align: left;
|
||||
&-thead > tr {
|
||||
// For Chrome extra space:
|
||||
// - https://github.com/ant-design/ant-design/issues/14926
|
||||
// - https://github.com/ant-design/ant-design/issues/16131
|
||||
background: @table-header-bg;
|
||||
border-bottom: @border-width-base @border-style-base @border-color-split;
|
||||
transition: background 0.3s ease;
|
||||
|
||||
&[colspan] {
|
||||
text-align: center;
|
||||
}
|
||||
> th {
|
||||
color: @table-header-color;
|
||||
font-weight: 500;
|
||||
text-align: left;
|
||||
background: transparent;
|
||||
border-bottom: @border-width-base @border-style-base @border-color-split;
|
||||
transition: background 0.3s ease;
|
||||
|
||||
.@{iconfont-css-prefix}-filter,
|
||||
.@{table-prefix-cls}-filter-icon {
|
||||
position: absolute;
|
||||
top: 0;
|
||||
right: 0;
|
||||
width: 28px;
|
||||
height: 100%;
|
||||
color: @table-header-icon-color;
|
||||
font-size: @font-size-sm;
|
||||
text-align: center;
|
||||
cursor: pointer;
|
||||
transition: all 0.3s;
|
||||
|
||||
> svg {
|
||||
position: absolute;
|
||||
top: 50%;
|
||||
left: 50%;
|
||||
margin-top: -@font-size-sm / 2 + 1px;
|
||||
margin-left: -@font-size-sm / 2;
|
||||
}
|
||||
}
|
||||
|
||||
.@{table-prefix-cls}-filter-selected.@{iconfont-css-prefix}-filter {
|
||||
color: @primary-color;
|
||||
}
|
||||
|
||||
.@{table-prefix-cls}-column-sorter {
|
||||
display: table-cell;
|
||||
vertical-align: middle;
|
||||
|
||||
.@{table-prefix-cls}-column-sorter-inner {
|
||||
height: 1em;
|
||||
margin-top: 0.35em;
|
||||
margin-left: 0.57142857em;
|
||||
color: @table-header-icon-color;
|
||||
line-height: 1em;
|
||||
&[colspan] {
|
||||
text-align: center;
|
||||
}
|
||||
|
||||
.@{iconfont-css-prefix}-filter,
|
||||
.@{table-prefix-cls}-filter-icon {
|
||||
position: absolute;
|
||||
top: 0;
|
||||
right: 0;
|
||||
width: 28px;
|
||||
height: 100%;
|
||||
color: @table-header-icon-color;
|
||||
font-size: @font-size-sm;
|
||||
text-align: center;
|
||||
cursor: pointer;
|
||||
transition: all 0.3s;
|
||||
|
||||
.@{table-prefix-cls}-column-sorter-up,
|
||||
.@{table-prefix-cls}-column-sorter-down {
|
||||
.iconfont-size-under-12px(11px);
|
||||
|
||||
display: block;
|
||||
height: 1em;
|
||||
line-height: 1em;
|
||||
transition: all 0.3s;
|
||||
&.on {
|
||||
color: @primary-color;
|
||||
}
|
||||
> svg {
|
||||
position: absolute;
|
||||
top: 50%;
|
||||
left: 50%;
|
||||
margin-top: -@font-size-sm / 2 + 1px;
|
||||
margin-left: -@font-size-sm / 2;
|
||||
}
|
||||
}
|
||||
|
||||
&-full {
|
||||
margin-top: -0.15em;
|
||||
.@{table-prefix-cls}-filter-selected.@{iconfont-css-prefix}-filter {
|
||||
color: @primary-color;
|
||||
}
|
||||
|
||||
.@{table-prefix-cls}-column-sorter {
|
||||
display: table-cell;
|
||||
vertical-align: middle;
|
||||
|
||||
.@{table-prefix-cls}-column-sorter-inner {
|
||||
height: 1em;
|
||||
margin-top: 0.35em;
|
||||
margin-left: 0.57142857em;
|
||||
color: @table-header-icon-color;
|
||||
line-height: 1em;
|
||||
text-align: center;
|
||||
transition: all 0.3s;
|
||||
|
||||
.@{table-prefix-cls}-column-sorter-up,
|
||||
.@{table-prefix-cls}-column-sorter-down {
|
||||
height: 0.5em;
|
||||
line-height: 0.5em;
|
||||
.iconfont-size-under-12px(11px);
|
||||
|
||||
display: block;
|
||||
height: 1em;
|
||||
line-height: 1em;
|
||||
transition: all 0.3s;
|
||||
&.on {
|
||||
color: @primary-color;
|
||||
}
|
||||
}
|
||||
|
||||
.@{table-prefix-cls}-column-sorter-down {
|
||||
margin-top: 0.125em;
|
||||
&-full {
|
||||
margin-top: -0.15em;
|
||||
|
||||
.@{table-prefix-cls}-column-sorter-up,
|
||||
.@{table-prefix-cls}-column-sorter-down {
|
||||
height: 0.5em;
|
||||
line-height: 0.5em;
|
||||
}
|
||||
|
||||
.@{table-prefix-cls}-column-sorter-down {
|
||||
margin-top: 0.125em;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
&.@{table-prefix-cls}-column-has-actions {
|
||||
position: relative;
|
||||
background-clip: padding-box; // For Firefox background bug, https://github.com/ant-design/ant-design/issues/12628
|
||||
/* stylelint-disable-next-line */
|
||||
-webkit-background-clip: border-box; // For Chrome extra space: https://github.com/ant-design/ant-design/issues/14926
|
||||
&.@{table-prefix-cls}-column-has-actions {
|
||||
position: relative;
|
||||
background-clip: padding-box; // For Firefox background bug, https://github.com/ant-design/ant-design/issues/12628
|
||||
|
||||
&.@{table-prefix-cls}-column-has-filters {
|
||||
// https://github.com/ant-design/ant-design/issues/12650
|
||||
padding-right: 30px !important;
|
||||
&.@{table-prefix-cls}-column-has-filters {
|
||||
// https://github.com/ant-design/ant-design/issues/12650
|
||||
padding-right: 30px !important;
|
||||
|
||||
.@{iconfont-css-prefix}-filter,
|
||||
.@{table-prefix-cls}-filter-icon {
|
||||
&.@{table-prefix-cls}-filter-open {
|
||||
color: @text-color-secondary;
|
||||
background: @table-header-filter-active-bg;
|
||||
}
|
||||
}
|
||||
// Very complicated styles logic but necessary
|
||||
&:hover {
|
||||
.@{iconfont-css-prefix}-filter,
|
||||
.@{table-prefix-cls}-filter-icon {
|
||||
&:hover {
|
||||
&.@{table-prefix-cls}-filter-open {
|
||||
color: @text-color-secondary;
|
||||
background: @table-header-filter-active-bg;
|
||||
}
|
||||
&:active {
|
||||
color: @text-color;
|
||||
}
|
||||
// Very complicated styles logic but necessary
|
||||
&:hover {
|
||||
.@{iconfont-css-prefix}-filter,
|
||||
.@{table-prefix-cls}-filter-icon {
|
||||
&:hover {
|
||||
color: @text-color-secondary;
|
||||
background: @table-header-filter-active-bg;
|
||||
}
|
||||
&:active {
|
||||
color: @text-color;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
&.@{table-prefix-cls}-column-has-sorters {
|
||||
cursor: pointer;
|
||||
&:hover {
|
||||
background: @table-header-sort-active-bg;
|
||||
.@{iconfont-css-prefix}-filter,
|
||||
.@{table-prefix-cls}-filter-icon {
|
||||
background: @table-header-sort-active-bg;
|
||||
}
|
||||
}
|
||||
&:active {
|
||||
.@{table-prefix-cls}-column-sorter-up:not(.on),
|
||||
.@{table-prefix-cls}-column-sorter-down:not(.on) {
|
||||
color: @text-color-secondary;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
.@{table-prefix-cls}-header-column {
|
||||
display: inline-block;
|
||||
vertical-align: top;
|
||||
|
||||
.@{table-prefix-cls}-column-sorters {
|
||||
display: table;
|
||||
|
||||
> .@{table-prefix-cls}-column-title {
|
||||
display: table-cell;
|
||||
vertical-align: middle;
|
||||
}
|
||||
|
||||
> *:not(.@{table-prefix-cls}-column-sorter) {
|
||||
position: relative;
|
||||
}
|
||||
&::before {
|
||||
position: absolute;
|
||||
top: 0;
|
||||
right: 0;
|
||||
bottom: 0;
|
||||
left: 0;
|
||||
background: transparent;
|
||||
transition: all 0.3s;
|
||||
content: '';
|
||||
}
|
||||
&:hover::before {
|
||||
background: rgba(0, 0, 0, 0.04);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
&.@{table-prefix-cls}-column-has-sorters {
|
||||
cursor: pointer;
|
||||
&:hover {
|
||||
background: @table-header-sort-active-bg;
|
||||
.@{iconfont-css-prefix}-filter,
|
||||
.@{table-prefix-cls}-filter-icon {
|
||||
background: @table-header-sort-active-bg;
|
||||
}
|
||||
}
|
||||
&:active {
|
||||
.@{table-prefix-cls}-column-sorter-up:not(.on),
|
||||
.@{table-prefix-cls}-column-sorter-down:not(.on) {
|
||||
color: @text-color-secondary;
|
||||
}
|
||||
}
|
||||
user-select: none;
|
||||
}
|
||||
}
|
||||
|
||||
.@{table-prefix-cls}-header-column {
|
||||
display: inline-block;
|
||||
vertical-align: top;
|
||||
|
||||
.@{table-prefix-cls}-column-sorters {
|
||||
display: table;
|
||||
|
||||
> .@{table-prefix-cls}-column-title {
|
||||
display: table-cell;
|
||||
vertical-align: middle;
|
||||
}
|
||||
|
||||
> *:not(.@{table-prefix-cls}-column-sorter) {
|
||||
position: relative;
|
||||
}
|
||||
&::before {
|
||||
position: absolute;
|
||||
top: 0;
|
||||
right: 0;
|
||||
bottom: 0;
|
||||
left: 0;
|
||||
background: transparent;
|
||||
transition: all 0.3s;
|
||||
content: '';
|
||||
}
|
||||
&:hover::before {
|
||||
background: rgba(0, 0, 0, 0.04);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
&.@{table-prefix-cls}-column-has-sorters {
|
||||
user-select: none;
|
||||
}
|
||||
}
|
||||
|
||||
&-thead > tr:first-child > th {
|
||||
@ -230,10 +235,6 @@
|
||||
}
|
||||
}
|
||||
|
||||
&-thead > tr:hover {
|
||||
background: none;
|
||||
}
|
||||
|
||||
&-footer {
|
||||
position: relative;
|
||||
padding: @table-padding-vertical @table-padding-horizontal;
|
||||
|
@ -1,6 +1,6 @@
|
||||
{
|
||||
"name": "antd",
|
||||
"version": "3.16.3",
|
||||
"version": "3.16.4",
|
||||
"title": "Ant Design",
|
||||
"description": "An enterprise-class UI design language and React-based implementation",
|
||||
"homepage": "http://ant.design/",
|
||||
@ -153,7 +153,7 @@
|
||||
"pre-commit": "^1.2.2",
|
||||
"preact": "^8.3.1",
|
||||
"preact-compat": "^3.18.4",
|
||||
"prettier": "^1.15.3",
|
||||
"prettier": "^1.17.0",
|
||||
"querystring": "^0.2.0",
|
||||
"rc-queue-anim": "^1.6.6",
|
||||
"rc-scroll-anim": "^2.5.7",
|
||||
|
@ -42,7 +42,7 @@ async function checkCommit({ files }) {
|
||||
|
||||
async function checkRemote() {
|
||||
const { remote } = await git.fetch('origin', 'master');
|
||||
if (remote.indexOf('ant-design/ant-design') === -1 || true) {
|
||||
if (remote.indexOf('ant-design/ant-design') === -1) {
|
||||
console.log(chalk.yellow('😓 Your remote origin is not ant-design. Do you fork it?'));
|
||||
exitProcess();
|
||||
}
|
||||
|
@ -36,7 +36,7 @@ if (program.pre) {
|
||||
];
|
||||
|
||||
// get all ts, js, less files
|
||||
['**/*.ts*', '**/*.js*', '**/*.less'].forEach(pattern => {
|
||||
['**/*.ts*', '**/*.js*', '**/*.less', '**/*.md', '**/*.html'].forEach(pattern => {
|
||||
const matchFiles = glob.sync(pattern, {
|
||||
ignore: ignoreFiles,
|
||||
});
|
||||
|
Loading…
Reference in New Issue
Block a user