Skip to content

Commit

Permalink
chore: sync ant-design v3.19.3
Browse files Browse the repository at this point in the history
  • Loading branch information
ng-zorro-bot committed Jun 11, 2019
1 parent 43aeaeb commit b8b4163
Show file tree
Hide file tree
Showing 86 changed files with 614 additions and 195 deletions.
2 changes: 1 addition & 1 deletion components/affix/style/index.less
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
@import '../../style/themes/default';
@import '../../style/themes/index';

.@{ant-prefix}-affix {
position: fixed;
Expand Down
3 changes: 2 additions & 1 deletion components/alert/style/index.less
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
@import '../../style/themes/default';
@import '../../style/themes/index';
@import '../../style/mixins/index';

@alert-prefix-cls: ~'@{ant-prefix}-alert';
Expand All @@ -10,6 +10,7 @@

.@{alert-prefix-cls} {
.reset-component;

position: relative;
padding: 8px 15px 8px 37px;
border-radius: @border-radius-base;
Expand Down
3 changes: 2 additions & 1 deletion components/anchor/style/index.less
Original file line number Diff line number Diff line change
@@ -1,10 +1,11 @@
@import '../../style/themes/default';
@import '../../style/themes/index';
@import '../../style/mixins/index';

@anchor-border-width: 2px;

.@{ant-prefix}-anchor {
.reset-component;

position: relative;
padding-left: @anchor-border-width;

Expand Down
11 changes: 10 additions & 1 deletion components/auto-complete/style/index.less
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
@import '../../style/themes/default';
@import '../../style/themes/index';
@import '../../style/mixins/index';
@import '../../input/style/mixin';

Expand Down Expand Up @@ -54,6 +54,7 @@
}
&[disabled] {
.disabled;

background-color: transparent;
}
}
Expand Down Expand Up @@ -81,3 +82,11 @@
}
}
}

// https://github.com/ant-design/ant-design/issues/14156
.@{input-prefix-cls}-group > .@{autocomplete-prefix-cls} {
.@{select-prefix-cls}-search__field.@{input-prefix-cls}-affix-wrapper {
display: inline;
float: none;
}
}
3 changes: 2 additions & 1 deletion components/avatar/style/index.less
Original file line number Diff line number Diff line change
@@ -1,10 +1,11 @@
@import '../../style/themes/default';
@import '../../style/themes/index';
@import '../../style/mixins/index';

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

.@{avatar-prefix-cls} {
.reset-component;

position: relative;
display: inline-block;
overflow: hidden;
Expand Down
3 changes: 2 additions & 1 deletion components/back-top/style/index.less
Original file line number Diff line number Diff line change
@@ -1,10 +1,11 @@
@import '../../style/themes/default';
@import '../../style/themes/index';
@import '../../style/mixins/index';

@backtop-prefix-cls: ~'@{ant-prefix}-back-top';

.@{backtop-prefix-cls} {
.reset-component;

position: fixed;
right: 100px;
bottom: 50px;
Expand Down
3 changes: 2 additions & 1 deletion components/badge/style/index.less
Original file line number Diff line number Diff line change
@@ -1,11 +1,12 @@
@import '../../style/themes/default';
@import '../../style/themes/index';
@import '../../style/mixins/index';

@badge-prefix-cls: ~'@{ant-prefix}-badge';
@number-prefix-cls: ~'@{ant-prefix}-scroll-number';

.@{badge-prefix-cls} {
.reset-component;

position: relative;
display: inline-block;
color: unset;
Expand Down
9 changes: 8 additions & 1 deletion components/breadcrumb/style/index.less
Original file line number Diff line number Diff line change
@@ -1,10 +1,11 @@
@import '../../style/themes/default';
@import '../../style/themes/index';
@import '../../style/mixins/index';

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

.@{breadcrumb-prefix-cls} {
.reset-component;

color: @breadcrumb-base-color;
font-size: @breadcrumb-font-size;

Expand Down Expand Up @@ -38,4 +39,10 @@
margin-left: 4px;
}
}

&-overlay-link {
> .@{iconfont-css-prefix} {
margin-left: 4px;
}
}
}
4 changes: 2 additions & 2 deletions components/button/style/index.less
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
@import '../../style/themes/default';
@import '../../style/themes/index';
@import '../../style/mixins/index';
@import './mixin';

Expand Down Expand Up @@ -202,4 +202,4 @@ a.@{btn-prefix-cls} {
&-sm {
line-height: @btn-height-sm - 2px;
}
}
}
2 changes: 1 addition & 1 deletion components/button/style/mixin.less
Original file line number Diff line number Diff line change
Expand Up @@ -345,4 +345,4 @@
border-top-left-radius: 0;
border-bottom-left-radius: 0;
}
}
}
5 changes: 3 additions & 2 deletions components/calendar/style/index.less
Original file line number Diff line number Diff line change
@@ -1,10 +1,11 @@
@import '../../style/themes/default';
@import '../../style/themes/index';
@import '../../style/mixins/index';

@full-calendar-prefix-cls: ~'@{ant-prefix}-fullcalendar';

.@{full-calendar-prefix-cls} {
.reset-component;

border-top: @border-width-base @border-style-base @border-color-base;
outline: none;

Expand All @@ -21,7 +22,7 @@
margin-left: 8px;

&.@{ant-prefix}-select-sm {
min-width: 60px;
min-width: 70px;
}
}

Expand Down
3 changes: 2 additions & 1 deletion components/card/style/index.less
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
@import '../../style/themes/default';
@import '../../style/themes/index';
@import '../../style/mixins/index';

@card-prefix-cls: ~'@{ant-prefix}-card';
Expand All @@ -10,6 +10,7 @@

.@{card-prefix-cls} {
.reset-component;

position: relative;
background: @component-background;
border-radius: @card-radius;
Expand Down
16 changes: 13 additions & 3 deletions components/carousel/style/index.less
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
@import '../../style/themes/default';
@import '../../style/themes/index';
@import '../../style/mixins/index';

.@{ant-prefix}-carousel {
Expand Down Expand Up @@ -146,14 +146,19 @@
// Dots
.slick-dots {
position: absolute;
bottom: 12px;
display: block;
width: 100%;
height: @carousel-dot-height;
margin: 0;
padding: 0;
text-align: center;
list-style: none;
&-bottom {
bottom: 12px;
}
&-top {
top: 12px;
}
li {
position: relative;
display: inline-block;
Expand Down Expand Up @@ -196,11 +201,16 @@
.@{ant-prefix}-carousel-vertical {
.slick-dots {
top: 50%;
right: 12px;
bottom: auto;
width: @carousel-dot-height;
height: auto;
transform: translateY(-50%);
&-left {
left: 12px;
}
&-right {
right: 12px;
}
li {
margin: 0 2px;
vertical-align: baseline;
Expand Down
16 changes: 12 additions & 4 deletions components/cascader/style/index.less
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
@import '../../style/themes/default';
@import '../../style/themes/index';
@import '../../style/mixins/index';
@import '../../input/style/mixin';

Expand All @@ -8,7 +8,8 @@
.reset-component;

&-input.@{ant-prefix}-input {
position: relative;
// Keep it static for https://github.com/ant-design/ant-design/issues/16738
position: static;
width: 100%;
// Add important to fix https://github.com/ant-design/ant-design/issues/5078
// because input.less will compile after cascader.less
Expand All @@ -22,6 +23,7 @@

&-picker {
.reset-component;

position: relative;
display: inline-block;
background-color: @component-background;
Expand Down Expand Up @@ -108,6 +110,11 @@
}
}

// https://github.com/ant-design/ant-design/pull/12407#issuecomment-424657810
&-picker-label:hover + &-input {
.hover;
}

&-picker-small &-picker-clear,
&-picker-small &-picker-arrow {
right: @control-padding-horizontal-sm;
Expand Down Expand Up @@ -194,8 +201,8 @@
&-active:not(&-disabled) {
&,
&:hover {
font-weight: 600;
background: @background-color-base;
font-weight: @select-item-selected-font-weight;
background-color: @background-color-light;
}
}
&-expand {
Expand All @@ -206,6 +213,7 @@
&-expand &-expand-icon,
&-expand &-loading-icon {
.iconfont-size-under-12px(10px);

position: absolute;
right: @control-padding-horizontal;
color: @text-color-secondary;
Expand Down
2 changes: 1 addition & 1 deletion components/checkbox/style/index.less
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
@import '../../style/themes/default';
@import '../../style/themes/index';
@import './mixin';

.antCheckboxFn();
7 changes: 6 additions & 1 deletion components/checkbox/style/mixin.less
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@
// 一般状态
.@{checkbox-prefix-cls} {
.reset-component;

position: relative;
top: -0.09em;
display: inline-block;
Expand Down Expand Up @@ -57,6 +58,7 @@
&::after {
@check-width: (@checkbox-size / 14) * 5px;
@check-height: (@checkbox-size / 14) * 8px;

position: absolute;
top: 50%;
left: 21%;
Expand Down Expand Up @@ -139,6 +141,7 @@

.@{checkbox-prefix-cls}-wrapper {
.reset-component;

display: inline-block;
line-height: unset;
cursor: pointer;
Expand All @@ -155,6 +158,7 @@

.@{checkbox-prefix-cls}-group {
.reset-component;

display: inline-block;
&-item {
display: inline-block;
Expand All @@ -171,12 +175,13 @@
// 半选状态
.@{checkbox-prefix-cls}-indeterminate {
.@{checkbox-inner-prefix-cls} {
background-color: #fff;
background-color: @component-background;
border-color: @border-color-base;
}
.@{checkbox-inner-prefix-cls}::after {
@indeterminate-width: @checkbox-size - 8px;
@indeterminate-height: @checkbox-size - 8px;

top: 50%;
left: 50%;
width: @indeterminate-width;
Expand Down
20 changes: 19 additions & 1 deletion components/collapse/style/index.less
Original file line number Diff line number Diff line change
@@ -1,10 +1,11 @@
@import '../../style/themes/default';
@import '../../style/themes/index';
@import '../../style/mixins/index';

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

.@{collapse-prefix-cls} {
.reset-component;

background-color: @collapse-header-bg;
border: @border-width-base @border-style-base @border-color-base;
border-bottom: 0;
Expand All @@ -23,13 +24,15 @@
> .@{collapse-prefix-cls}-header {
position: relative;
padding: @collapse-header-padding;
padding-left: @collapse-header-padding-extra;
color: @heading-color;
line-height: 22px;
cursor: pointer;
transition: all 0.3s;

.@{collapse-prefix-cls}-arrow {
.iconfont-mixin();

position: absolute;
top: 50%;
left: @padding-md;
Expand Down Expand Up @@ -60,6 +63,21 @@
}
}

// Expand Icon right
&-icon-position-right {
& > .@{collapse-prefix-cls}-item {
> .@{collapse-prefix-cls}-header {
padding: @collapse-header-padding;
padding-right: @collapse-header-padding-extra;

.@{collapse-prefix-cls}-arrow {
right: @padding-md;
left: initial;
}
}
}
}

&-anim-active {
transition: height 0.2s @ease-out;
}
Expand Down
2 changes: 1 addition & 1 deletion components/comment/style/index.less
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
@import '../../style/themes/default';
@import '../../style/themes/index';
@import '../../style/mixins/index';

@comment-prefix-cls: ~'@{ant-prefix}-comment';
Expand Down
1 change: 1 addition & 0 deletions components/date-picker/style/Calendar.less
Original file line number Diff line number Diff line change
Expand Up @@ -342,6 +342,7 @@
.btn;
.btn-primary;
.button-size(@btn-height-sm; @btn-padding-sm; @font-size-base; @border-radius-base);

line-height: @btn-height-sm - 2px;

.button-disabled();
Expand Down
Loading

0 comments on commit b8b4163

Please sign in to comment.