Skip to content

Commit

Permalink
chore: sync ant-design v3.13.0 (NG-ZORRO#2845)
Browse files Browse the repository at this point in the history
  • Loading branch information
ng-zorro-bot authored and vthinkxie committed Jan 31, 2019
1 parent 8536b16 commit ed8e88f
Show file tree
Hide file tree
Showing 17 changed files with 103 additions and 73 deletions.
4 changes: 4 additions & 0 deletions components/button/style/index.less
Original file line number Diff line number Diff line change
Expand Up @@ -69,6 +69,10 @@
.btn-danger;
}

&-round {
.btn-round(@btn-prefix-cls);
}

&-circle,
&-circle-outline {
.btn-circle(@btn-prefix-cls);
Expand Down
14 changes: 14 additions & 0 deletions components/button/style/mixin.less
Original file line number Diff line number Diff line change
Expand Up @@ -220,6 +220,20 @@
.btn-danger() {
.button-variant-danger(@btn-danger-color, @btn-danger-bg, @btn-danger-border);
}
// round button
.btn-round(@btnClassName: btn) {
.button-size(@btn-circle-size; 0 @btn-circle-size / 2; @font-size-base + 2px; @btn-circle-size);
&.@{btnClassName}-lg {
.button-size(
@btn-circle-size-lg; 0 @btn-circle-size-lg / 2; @btn-font-size-lg + 2px; @btn-circle-size-lg
);
}
&.@{btnClassName}-sm {
.button-size(
@btn-circle-size-sm; 0 @btn-circle-size-sm / 2; @font-size-base; @btn-circle-size-sm
);
}
}
// circle button: the content only contains icon
.btn-circle(@btnClassName: btn) {
.square(@btn-circle-size);
Expand Down
18 changes: 3 additions & 15 deletions components/collapse/style/index.less
Original file line number Diff line number Diff line change
Expand Up @@ -3,13 +3,6 @@

@collapse-prefix-cls: ~'@{ant-prefix}-collapse';

.collapse-close() {
transform: rotate(0);
}
.collapse-open() {
transform: rotate(90deg);
}

.@{collapse-prefix-cls} {
.reset-component;
background-color: @collapse-header-bg;
Expand All @@ -35,18 +28,19 @@
position: relative;
transition: all 0.3s;

.arrow {
.@{collapse-prefix-cls}-arrow {
.iconfont-mixin();
font-size: @font-size-sm;
position: absolute;
display: inline-block;
line-height: 46px;
vertical-align: top;
top: 50%;
margin-top: 2px;
transform: translateY(-50%);
left: @padding-md;

& svg {
.collapse-close();
transition: transform 0.24s;
}
}
Expand Down Expand Up @@ -88,12 +82,6 @@
}
}

& > &-item > &-header[aria-expanded='true'] {
.anticon-right svg {
.collapse-open();
}
}

&-borderless {
background-color: @component-background;
border: 0;
Expand Down
13 changes: 12 additions & 1 deletion components/input-number/style/index.less
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,6 @@
width: 12px;
height: 12px;
transition: all 0.1s linear;
.iconfont-size-under-12px(7px);
right: 4px;
color: @text-color-secondary;
}
Expand Down Expand Up @@ -109,6 +108,18 @@
opacity: 0;
border-radius: 0 @border-radius-base @border-radius-base 0;
transition: opacity 0.24s linear 0.1s;

// Fix input number inside Menu makes icon too large
// We arise the selector priority by nest selector here
// https://github.com/ant-design/ant-design/issues/14367
.@{input-number-prefix-cls}-handler {
.@{input-number-prefix-cls}-handler-up-inner,
.@{input-number-prefix-cls}-handler-down-inner {
.iconfont-size-under-12px(7px);
min-width: auto;
margin-right: 0;
}
}
}

&-handler-wrap:hover &-handler {
Expand Down
23 changes: 7 additions & 16 deletions components/input/style/search-input.less
Original file line number Diff line number Diff line change
Expand Up @@ -15,23 +15,14 @@
}
}

&:not(&-small) > .@{ant-prefix}-input-suffix {
right: @control-padding-horizontal;
}
.@{ant-prefix}-input-group-addon {
border: 0;
padding: 0;

> .@{ant-prefix}-input-suffix > .@{search-prefix}-button {
border-top-left-radius: 0;
border-bottom-left-radius: 0;
> .@{iconfont-css-prefix}-search {
font-size: @font-size-lg;
.@{search-prefix}-button {
border-top-left-radius: 0;
border-bottom-left-radius: 0;
width: 100%;
}
}

&.@{search-prefix}-enter-button > .@{ant-prefix}-input {
padding-right: 46px;
}

&.@{search-prefix}-enter-button > .@{ant-prefix}-input-suffix {
right: 0;
}
}
8 changes: 8 additions & 0 deletions components/list/style/index.less
Original file line number Diff line number Diff line change
Expand Up @@ -108,6 +108,14 @@
}
}

&-header {
background: @list-header-background;
}

&-footer {
background: @list-footer-background;
}

&-header,
&-footer {
padding-top: 12px;
Expand Down
1 change: 1 addition & 0 deletions components/pagination/style/index.less
Original file line number Diff line number Diff line change
Expand Up @@ -109,6 +109,7 @@
position: absolute;
display: block;
letter-spacing: 2px;
text-indent: 0.13em;
color: @disabled-color;
text-align: center;
opacity: 1;
Expand Down
4 changes: 2 additions & 2 deletions components/select/style/index.less
Original file line number Diff line number Diff line change
Expand Up @@ -77,7 +77,7 @@

background-color: @component-background;
border-radius: @border-radius-base;
border: @border-width-base @border-style-base @border-color-base;
border: @border-width-base @border-style-base @select-border-color;
// strange align fix for chrome but works
// https://gw.alipayobjects.com/zos/rmsportal/VFTfKXJuogBAXcvfAUWJ.gif
border-top-width: @border-width-base + 0.02px;
Expand Down Expand Up @@ -125,7 +125,7 @@
&:hover,
&:focus,
&:active {
border-color: @border-color-base;
border-color: @select-border-color;
box-shadow: none;
}

Expand Down
1 change: 1 addition & 0 deletions components/spin/style/index.less
Original file line number Diff line number Diff line change
Expand Up @@ -90,6 +90,7 @@
height: 100%;
width: 100%;
z-index: 10;
display: ~'none \9\0';
}
}

Expand Down
2 changes: 1 addition & 1 deletion components/style/core/base.less
Original file line number Diff line number Diff line change
Expand Up @@ -238,7 +238,7 @@ a {

&:focus {
text-decoration: underline;
text-decoration-skip: ink;
text-decoration-skip-ink: auto;
}

&:hover {
Expand Down
4 changes: 4 additions & 0 deletions components/style/core/iconfont.less
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,10 @@

.@{iconfont-css-prefix} {
.iconfont-mixin();

&[tabindex] {
cursor: pointer;
}
}

.@{iconfont-css-prefix}-spin:before {
Expand Down
6 changes: 3 additions & 3 deletions components/style/core/motion/other.less
Original file line number Diff line number Diff line change
Expand Up @@ -4,12 +4,12 @@
}
}

[ant-click-animating],
[ant-click-animating-without-extra-node] {
[ant-click-animating='true'],
[ant-click-animating-without-extra-node='true'] {
position: relative;
}

[ant-click-animating-without-extra-node]:after,
[ant-click-animating-without-extra-node='true']:after,
.ant-click-animating-node {
content: '';
position: absolute;
Expand Down
17 changes: 15 additions & 2 deletions components/style/themes/default.less
Original file line number Diff line number Diff line change
Expand Up @@ -132,7 +132,7 @@
@btn-font-weight : 400;
@btn-border-radius-base : @border-radius-base;
@btn-border-radius-sm : @border-radius-base;
@btn-shadow: 0 2px 0 rgba(0, 0, 0, .015);
@btn-shadow: 0 2px 0 rgba(0, 0, 0, 0.015);
@btn-primary-shadow: 0 2px 0 rgba(0, 0, 0, 0.045);
@btn-text-shadow: 0 -1px 0 rgba(0, 0, 0, 0.12);

Expand Down Expand Up @@ -292,6 +292,10 @@
@input-disabled-bg : @disabled-bg;
@input-outline-offset : 0 0;

// Select
// ---
@select-border-color: @border-color-base;

// Tooltip
// ---
//* Tooltip max width
Expand Down Expand Up @@ -505,7 +509,7 @@
@slider-handle-color: @primary-3;
@slider-handle-color-hover: @primary-4;
@slider-handle-color-focus: tint(@primary-color, 20%);
@slider-handle-color-focus-shadow: tint(@primary-color, 50%);
@slider-handle-color-focus-shadow: fade(@primary-color, 20%);
@slider-handle-color-tooltip-open: @primary-color;
@slider-dot-border-color: @border-color-split;
@slider-dot-border-color-active: tint(@primary-color, 50%);
Expand Down Expand Up @@ -559,9 +563,18 @@

// List
// ---
@list-header-background: transparent;
@list-footer-background: transparent;
@list-empty-text-padding: @padding-md;
@list-item-padding: @padding-sm 0;
@list-item-content-margin: 0 0 @padding-md 0;
@list-item-meta-margin-bottom: @padding-md;
@list-item-meta-avatar-margin-right: @padding-md;
@list-item-meta-title-margin-bottom: @padding-sm;

// Statistic
// ---
@statistic-title-font-size: @font-size-base;
@statistic-content-font-size: 24px;
@statistic-unit-font-size: 16px;
@statistic-font-family: Tahoma, 'Helvetica Neue', @font-family;
6 changes: 6 additions & 0 deletions components/table/style/index.less
Original file line number Diff line number Diff line change
Expand Up @@ -388,6 +388,7 @@
position: relative;
padding: @table-padding-vertical @table-padding-horizontal;
background: @component-background;
border-radius: @border-radius-base;
border-bottom: @border-width-base @border-style-base @border-color-split;
text-align: center;
font-size: @font-size-base;
Expand Down Expand Up @@ -562,6 +563,11 @@
table {
width: auto;
min-width: 100%;

// https://github.com/ant-design/ant-design/issues/14545
.@{table-prefix-cls}-fixed-columns-in-body {
visibility: hidden;
}
}
}

Expand Down
2 changes: 1 addition & 1 deletion components/table/style/size.less
Original file line number Diff line number Diff line change
Expand Up @@ -74,7 +74,7 @@
padding: @table-padding-vertical-sm @table-padding-horizontal-sm;
}
> .@{table-prefix-cls}-thead > tr > th {
background-color: @component-background;
background-color: transparent;
border-bottom: @border-width-base @border-style-base @border-color-split;
}
> .@{table-prefix-cls}-thead > tr > th.@{table-prefix-cls}-column-sort {
Expand Down
47 changes: 16 additions & 31 deletions components/time-picker/style/index.less
Original file line number Diff line number Diff line change
Expand Up @@ -48,36 +48,6 @@
}
}

&-clear-btn {
position: absolute;
right: 8px;
cursor: pointer;
overflow: hidden;
width: 20px;
height: 20px;
text-align: center;
line-height: 20px;
top: 7px;
margin: 0;

&-icon svg {
position: absolute;
top: 0;
right: 0;
bottom: 0;
left: 0;
margin: auto;
font-size: @font-size-base;
color: @disabled-color;
display: inline-block;
transition: color 0.3s ease;

&:hover {
color: @text-color-secondary;
}
}
}

&-narrow &-input-wrap {
max-width: @time-picker-panel-column-width * 2;
}
Expand Down Expand Up @@ -205,7 +175,8 @@
opacity: 0;
}

&-icon {
&-icon,
&-clear {
position: absolute;
z-index: 1;
user-select: none;
Expand All @@ -224,6 +195,20 @@
}
}

&-clear {
opacity: 0;
z-index: 2;
background: @input-bg;
pointer-events: none;
&:hover {
color: @text-color-secondary;
}
}
&:hover &-clear {
opacity: 1;
pointer-events: auto;
}

&-large &-input {
.input-lg;
}
Expand Down
6 changes: 5 additions & 1 deletion components/transfer/style/index.less
Original file line number Diff line number Diff line change
Expand Up @@ -128,8 +128,12 @@
position: absolute;
top: 50%;
width: 100%;
margin-top: -10px;
transform: translateY(-50%);

// with filter should offset the search box height
.@{transfer-prefix-cls}-list-body-with-search & {
margin-top: @input-height-base / 2;
}
}

&-footer {
Expand Down

0 comments on commit ed8e88f

Please sign in to comment.