Skip to content

Commit

Permalink
chore: sync ant-design v3.19.1
Browse files Browse the repository at this point in the history
  • Loading branch information
ng-zorro-bot committed May 30, 2019
1 parent 5a0f0ef commit e6ee742
Show file tree
Hide file tree
Showing 86 changed files with 734 additions and 313 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;
}
}
}
21 changes: 17 additions & 4 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 @@ -69,6 +69,10 @@
.btn-danger;
}

&-link {
.btn-link;
}

&-round {
.btn-round(@btn-prefix-cls);
}
Expand All @@ -90,8 +94,8 @@
border-radius: inherit;
opacity: 0.35;
transition: opacity 0.2s;
pointer-events: none;
content: '';
pointer-events: none;
}

.@{iconfont-css-prefix} {
Expand All @@ -107,14 +111,17 @@
}
}

&&-loading {
position: relative;
pointer-events: none;
}

&&-loading::before {
display: block;
}

&&-loading:not(&-circle):not(&-circle-outline):not(&-icon-only) {
position: relative;
padding-left: 29px;
pointer-events: none;
.@{iconfont-css-prefix}:not(:last-child) {
margin-left: -14px;
}
Expand Down Expand Up @@ -162,6 +169,12 @@
.button-variant-ghost(@btn-danger-color);
}

&-background-ghost&-link {
.button-variant-ghost(@link-color; transparent);

color: @component-background;
}

&-two-chinese-chars::first-letter {
letter-spacing: 0.34em;
}
Expand Down
37 changes: 30 additions & 7 deletions components/button/style/mixin.less
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
border-radius: @border-radius;
}

.button-disabled() {
.button-disabled(@color: @btn-disable-color; @background: @btn-disable-bg; @border: @btn-disable-border) {
&-disabled,
&.disabled,
&[disabled] {
Expand All @@ -16,7 +16,8 @@
&:focus,
&:active,
&.active {
.button-color(@btn-disable-color; @btn-disable-bg; @btn-disable-border);
.button-color(@color; @background; @border);

text-shadow: none;
box-shadow: none;
}
Expand All @@ -25,6 +26,7 @@

.button-variant-primary(@color; @background) {
.button-color(@color; @background; @background);

text-shadow: @btn-text-shadow;
box-shadow: @btn-primary-shadow;

Expand Down Expand Up @@ -84,16 +86,26 @@
}
.button-disabled();
}
.button-variant-ghost(@color) {
.button-color(@color; transparent; @color);
.button-variant-ghost(@color; @border: @color) {
.button-color(@color; transparent; @border);
text-shadow: none;
&:hover,
&:focus {
.button-color(~`colorPalette('@{color}', 5) `; transparent; ~`colorPalette('@{color}', 5) `);
& when (@border = transparent) {
.button-color(~`colorPalette('@{color}', 5) `; transparent; transparent);
}
& when not(@border = transparent) {
.button-color(~`colorPalette('@{color}', 5) `; transparent; ~`colorPalette('@{color}', 5) `);
}
}
&:active,
&.active {
.button-color(~`colorPalette('@{color}', 7) `; transparent; ~`colorPalette('@{color}', 7) `);
& when (@border = transparent) {
.button-color(~`colorPalette('@{color}', 7) `; transparent; transparent);
}
& when not(@border = transparent) {
.button-color(~`colorPalette('@{color}', 7) `; transparent; ~`colorPalette('@{color}', 7) `);
}
}
.button-disabled();
}
Expand Down Expand Up @@ -220,6 +232,17 @@
.btn-danger() {
.button-variant-danger(@btn-danger-color, @btn-danger-bg, @btn-danger-border);
}
// link button style
.btn-link() {
.button-variant-other(@link-color, transparent, transparent);
box-shadow: none;
&:hover,
&:focus,
&:active {
border-color: transparent;
}
.button-disabled(@disabled-color; transparent; transparent);
}
// round button
.btn-round(@btnClassName: btn) {
.button-size(@btn-circle-size; 0 @btn-circle-size / 2; @font-size-base + 2px; @btn-circle-size);
Expand Down Expand Up @@ -247,7 +270,7 @@
.button-size(@btn-circle-size-sm; 0; @font-size-base; 50%);
}
}
// Horizontal button groups styl
// Horizontal button groups style
// --------------------------------------------------
.btn-group(@btnClassName: btn) {
.button-group-base(@btnClassName);
Expand Down
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
Loading

0 comments on commit e6ee742

Please sign in to comment.