diff --git a/components/badge/style/index.less b/components/badge/style/index.less
index 0458f5316d5..78616faa5f1 100644
--- a/components/badge/style/index.less
+++ b/components/badge/style/index.less
@@ -25,6 +25,7 @@
font-weight: @badge-font-weight;
white-space: nowrap;
box-shadow: 0 0 0 1px #fff;
+ z-index: 10;
a,
a:hover {
color: #fff;
@@ -80,7 +81,7 @@
height: 100%;
border-radius: 50%;
border: 1px solid @processing-color;
- content: '';
+ content: "";
animation: antStatusProcessing 1.2s infinite ease-in-out;
}
}
diff --git a/components/button/style/index.less b/components/button/style/index.less
index bd929d5a0c6..fee28d969b7 100644
--- a/components/button/style/index.less
+++ b/components/button/style/index.less
@@ -82,7 +82,7 @@
right: -1px;
background: #fff;
opacity: 0.35;
- content: '';
+ content: "";
border-radius: inherit;
z-index: 1;
transition: opacity .2s;
@@ -163,7 +163,7 @@
}
.christmas&-primary:before {
- content: '';
+ content: "";
display: block;
position: absolute;
top: -6px;
diff --git a/components/button/style/mixin.less b/components/button/style/mixin.less
index 2848772fdac..138ca490366 100644
--- a/components/button/style/mixin.less
+++ b/components/button/style/mixin.less
@@ -101,7 +101,7 @@
> a:only-child {
color: currentColor;
&:after {
- content: '';
+ content: "";
position: absolute;
top: 0;
left: 0;
diff --git a/components/checkbox/style/mixin.less b/components/checkbox/style/mixin.less
index 023ea25e199..c95686aa88b 100644
--- a/components/checkbox/style/mixin.less
+++ b/components/checkbox/style/mixin.less
@@ -28,7 +28,7 @@
height: 100%;
border-radius: @border-radius-sm;
border: 1px solid @checkbox-color;
- content: '';
+ content: "";
animation: antCheckboxEffect 0.36s ease-in-out;
animation-fill-mode: both;
visibility: hidden;
diff --git a/components/collapse/nz-collapse.module.ts b/components/collapse/nz-collapse.module.ts
index f79cff99874..e96dc685171 100644
--- a/components/collapse/nz-collapse.module.ts
+++ b/components/collapse/nz-collapse.module.ts
@@ -1,15 +1,15 @@
import { CommonModule } from '@angular/common';
import { NgModule } from '@angular/core';
-import { NzStringTemplateOutletDirective } from '../core/addon/string_template_outlet';
+import { NzAddOnModule } from '../core/addon/addon.module';
import { NzIconModule } from '../icon/nz-icon.module';
import { NzCollapsePanelComponent } from './nz-collapse-panel.component';
import { NzCollapseComponent } from './nz-collapse.component';
@NgModule({
- declarations: [ NzCollapsePanelComponent, NzCollapseComponent, NzStringTemplateOutletDirective ],
+ declarations: [ NzCollapsePanelComponent, NzCollapseComponent ],
exports : [ NzCollapsePanelComponent, NzCollapseComponent ],
- imports : [ CommonModule, NzIconModule ]
+ imports : [ CommonModule, NzIconModule, NzAddOnModule ]
})
export class NzCollapseModule {
diff --git a/components/core/addon/addon.module.ts b/components/core/addon/addon.module.ts
new file mode 100644
index 00000000000..3fc81b5d01b
--- /dev/null
+++ b/components/core/addon/addon.module.ts
@@ -0,0 +1,11 @@
+import { CommonModule } from '@angular/common';
+import { NgModule } from '@angular/core';
+import { NzStringTemplateOutletDirective } from './string_template_outlet';
+
+@NgModule({
+ imports : [ CommonModule ],
+ exports : [ NzStringTemplateOutletDirective ],
+ declarations: [ NzStringTemplateOutletDirective ]
+})
+export class NzAddOnModule {
+}
diff --git a/components/date-picker/style/Picker.less b/components/date-picker/style/Picker.less
index 9af9f2dff81..b9b085a88a5 100644
--- a/components/date-picker/style/Picker.less
+++ b/components/date-picker/style/Picker.less
@@ -42,6 +42,11 @@
outline: none;
}
+ &-input.@{ant-prefix}-input-sm {
+ padding-top: 0;
+ padding-bottom: 0;
+ }
+
&:hover &-input:not(.@{ant-prefix}-input-disabled) {
border-color: @primary-color;
}
diff --git a/components/date-picker/style/RangePicker.less b/components/date-picker/style/RangePicker.less
index e8dee5a83cc..62cfe035db5 100644
--- a/components/date-picker/style/RangePicker.less
+++ b/components/date-picker/style/RangePicker.less
@@ -134,7 +134,7 @@
z-index: 1;
}
&:before {
- content: '';
+ content: "";
display: block;
background: @item-active-bg;
border-radius: 0;
diff --git a/components/date-picker/style/TimePicker.less b/components/date-picker/style/TimePicker.less
index 25e080cdcde..6bda075469e 100644
--- a/components/date-picker/style/TimePicker.less
+++ b/components/date-picker/style/TimePicker.less
@@ -90,7 +90,7 @@
}
li:last-child:after {
- content: '';
+ content: "";
height: 202px;
display: block;
}
diff --git a/components/divider/demo/horizontal.ts b/components/divider/demo/horizontal.ts
index a9ccc3d783f..3531deb9fa7 100644
--- a/components/divider/demo/horizontal.ts
+++ b/components/divider/demo/horizontal.ts
@@ -13,10 +13,6 @@ import { Component } from '@angular/core';
Add
Lorem ipsum dolor sit amet, consectetur adipiscing elit. Sed nonne merninisti licere mihi ista probare, quae sunt a te dicta? Refert tamen, quo modo.
-
- Lorem ipsum dolor sit amet, consectetur adipiscing elit. Sed nonne merninisti licere mihi ista probare, quae sunt a te dicta? Refert tamen, quo modo.
-
- Lorem ipsum dolor sit amet, consectetur adipiscing elit. Sed nonne merninisti licere mihi ista probare, quae sunt a te dicta? Refert tamen, quo modo.
`
})
diff --git a/components/divider/demo/orientation.md b/components/divider/demo/orientation.md
new file mode 100644
index 00000000000..245254cad5b
--- /dev/null
+++ b/components/divider/demo/orientation.md
@@ -0,0 +1,14 @@
+---
+order: 2
+title:
+ zh-CN: 标题位置
+ en-US: Orientation of title
+---
+
+## zh-CN
+
+修改分割线标题的位置。
+
+## en-US
+
+Set orientation of divider to left or right.
\ No newline at end of file
diff --git a/components/divider/demo/orientation.ts b/components/divider/demo/orientation.ts
new file mode 100644
index 00000000000..7e4d40501fb
--- /dev/null
+++ b/components/divider/demo/orientation.ts
@@ -0,0 +1,17 @@
+import { Component } from '@angular/core';
+
+@Component({
+ selector: 'nz-demo-divider-orientation',
+ template: `
+
+
+
Lorem ipsum dolor sit amet, consectetur adipiscing elit. Sed nonne merninisti licere mihi ista probare, quae sunt a te dicta? Refert tamen, quo modo.
+
+
Lorem ipsum dolor sit amet, consectetur adipiscing elit. Sed nonne merninisti licere mihi ista probare, quae sunt a te dicta? Refert tamen, quo modo.
+
+ `
+})
+
+export class NzDemoDividerOrientationComponent {
+
+}
diff --git a/components/divider/divider.spec.ts b/components/divider/divider.spec.ts
index c2346eb6b8e..e5f1886acc7 100644
--- a/components/divider/divider.spec.ts
+++ b/components/divider/divider.spec.ts
@@ -1,5 +1,5 @@
import { Component, DebugElement, ViewChild } from '@angular/core';
-import { fakeAsync, tick, ComponentFixture, TestBed } from '@angular/core/testing';
+import { ComponentFixture, TestBed } from '@angular/core/testing';
import { By } from '@angular/platform-browser';
import { NzIconModule } from '../icon/nz-icon.module';
diff --git a/components/divider/nz-divider.component.html b/components/divider/nz-divider.component.html
index 0fbf151cd19..31bd190ebdb 100644
--- a/components/divider/nz-divider.component.html
+++ b/components/divider/nz-divider.component.html
@@ -1,3 +1,3 @@
-
- {{ textStr }}
+
+ {{ nzText }}
\ No newline at end of file
diff --git a/components/divider/nz-divider.component.ts b/components/divider/nz-divider.component.ts
index b7e0a9017dd..c2ec4f4c623 100644
--- a/components/divider/nz-divider.component.ts
+++ b/components/divider/nz-divider.component.ts
@@ -1,72 +1,44 @@
import {
ChangeDetectionStrategy,
- ChangeDetectorRef,
Component,
ElementRef,
Input,
OnChanges,
OnInit,
SimpleChanges,
- TemplateRef
+ TemplateRef,
+ ViewEncapsulation
} from '@angular/core';
import { NzUpdateHostClassService } from '../core/services/update-host-class.service';
-import { toBoolean } from '../core/util/convert';
+import { InputBoolean } from '../core/util';
@Component({
selector : 'nz-divider',
templateUrl : './nz-divider.component.html',
- providers : [ NzUpdateHostClassService ],
preserveWhitespaces: false,
+ providers : [ NzUpdateHostClassService ],
+ encapsulation : ViewEncapsulation.None,
changeDetection : ChangeDetectionStrategy.OnPush
})
export class NzDividerComponent implements OnChanges, OnInit {
- // region fields
-
- isText = false;
- textStr = '';
- textTpl: TemplateRef;
-
- @Input()
- set nzText(value: string | TemplateRef) {
- if (value instanceof TemplateRef) {
- this.textStr = null;
- this.textTpl = value;
- } else {
- this.textStr = value;
- }
- this.isText = !!value;
- }
-
+ @Input() nzText: string | TemplateRef;
@Input() nzType: 'horizontal' | 'vertical' = 'horizontal';
-
@Input() nzOrientation: 'left' | 'right' | '' = '';
+ @Input() @InputBoolean() nzDashed = false;
- private _dashed = false;
-
- @Input()
- set nzDashed(value: boolean) {
- this._dashed = toBoolean(value);
- }
-
- get nzDashed(): boolean {
- return this._dashed;
- }
-
- // endregion
private setClass(): void {
const orientationPrefix = (this.nzOrientation.length > 0) ? '-' + this.nzOrientation : this.nzOrientation;
const classMap = {
[ 'ant-divider' ] : true,
[ `ant-divider-${this.nzType}` ] : true,
- [ `ant-divider-with-text${orientationPrefix}` ]: this.isText,
+ [ `ant-divider-with-text${orientationPrefix}` ]: this.nzText,
[ `ant-divider-dashed` ] : this.nzDashed
};
- this.updateHostClassService.updateHostClass(this.el.nativeElement, classMap);
- this.cd.detectChanges();
+ this.nzUpdateHostClassService.updateHostClass(this.elementRef.nativeElement, classMap);
}
- constructor(private el: ElementRef, private cd: ChangeDetectorRef, private updateHostClassService: NzUpdateHostClassService) {
+ constructor(private elementRef: ElementRef, private nzUpdateHostClassService: NzUpdateHostClassService) {
}
ngOnChanges(changes: SimpleChanges): void {
diff --git a/components/divider/nz-divider.module.ts b/components/divider/nz-divider.module.ts
index 77b37ff452b..d08936d7976 100644
--- a/components/divider/nz-divider.module.ts
+++ b/components/divider/nz-divider.module.ts
@@ -1,10 +1,10 @@
import { CommonModule } from '@angular/common';
import { NgModule } from '@angular/core';
-
+import { NzAddOnModule } from '../core/addon/addon.module';
import { NzDividerComponent } from './nz-divider.component';
@NgModule({
- imports : [ CommonModule ],
+ imports : [ CommonModule, NzAddOnModule ],
declarations: [ NzDividerComponent ],
exports : [ NzDividerComponent ]
})
diff --git a/components/divider/style/index.less b/components/divider/style/index.less
index 6839add3b17..c7e6411899e 100644
--- a/components/divider/style/index.less
+++ b/components/divider/style/index.less
@@ -39,7 +39,7 @@
margin: 16px 0;
&:before,
&:after {
- content: '';
+ content: "";
display: table-cell;
position: relative;
top: 50%;
diff --git a/components/dropdown/style/index.less b/components/dropdown/style/index.less
index 447d2fdff0b..ec0e955b096 100644
--- a/components/dropdown/style/index.less
+++ b/components/dropdown/style/index.less
@@ -187,7 +187,7 @@
.@{dropdown-prefix-cls}-trigger,
.@{dropdown-prefix-cls}-link {
- .@{iconfont-css-prefix}:not(.@{iconfont-css-prefix}-ellipsis) {
+ > .@{iconfont-css-prefix}:not(.@{iconfont-css-prefix}-ellipsis) {
.iconfont-size-under-12px(10px);
}
}
diff --git a/components/form/style/mixin.less b/components/form/style/mixin.less
index 644886be584..1004c5dcfb5 100644
--- a/components/form/style/mixin.less
+++ b/components/form/style/mixin.less
@@ -91,7 +91,7 @@
input[type="radio"]:focus,
input[type="checkbox"]:focus {
outline: thin dotted;
- outline: 5px auto -webkit-focus-ring-color; // lesshint duplicateProperty: false
+ outline: 5px auto -webkit-focus-ring-color;
outline-offset: -2px;
}
diff --git a/components/grid/style/mixin.less b/components/grid/style/mixin.less
index fd95df193b6..bac74f319c9 100644
--- a/components/grid/style/mixin.less
+++ b/components/grid/style/mixin.less
@@ -49,7 +49,6 @@
.col(1); // kickstart it
}
-// lesshint false
.loop-grid-columns(@index, @class) when (@index > 0) {
.@{ant-prefix}-col@{class}-@{index} {
display: block;
diff --git a/components/input/style/mixin.less b/components/input/style/mixin.less
index 4eaccdeec8c..5f8ffaa33e7 100644
--- a/components/input/style/mixin.less
+++ b/components/input/style/mixin.less
@@ -160,7 +160,7 @@
// Reset Select's style in addon
.@{ant-prefix}-select {
- margin: -(@input-padding-vertical-base + 1px) (-@input-padding-horizontal-base); // lesshint spaceAroundOperator: false
+ margin: -(@input-padding-vertical-base + 1px) (-@input-padding-horizontal-base);
.@{ant-prefix}-select-selection {
background-color: inherit;
@@ -181,7 +181,7 @@
// https://github.com/ant-design/ant-design/issues/3714
> i:only-child:after {
position: absolute;
- content: '';
+ content: "";
top: 0;
left: 0;
right: 0;
diff --git a/components/menu/style/index.less b/components/menu/style/index.less
index 14f3a0f051a..0a3740dd449 100644
--- a/components/menu/style/index.less
+++ b/components/menu/style/index.less
@@ -67,7 +67,7 @@
left: 0;
bottom: 0;
right: 0;
- content: '';
+ content: "";
}
}
@@ -180,6 +180,7 @@
position: absolute;
border-radius: @border-radius-base;
z-index: @zindex-dropdown;
+ background: @menu-popup-bg;
.submenu-title-wrapper {
padding-right: 20px;
@@ -216,7 +217,7 @@
width: 10px;
&:before,
&:after {
- content: '';
+ content: "";
position: absolute;
vertical-align: baseline;
background: #fff;
diff --git a/components/modal/style/modal.less b/components/modal/style/modal.less
index 761a2727fd3..7c40f97048d 100644
--- a/components/modal/style/modal.less
+++ b/components/modal/style/modal.less
@@ -114,7 +114,7 @@
right: 0;
left: 0;
bottom: 0;
- background-color: @modal-mask-bg; // lesshint duplicateProperty: false
+ background-color: @modal-mask-bg;
height: 100%;
z-index: @zindex-modal-mask;
filter: ~"alpha(opacity=50)";
@@ -132,7 +132,7 @@
.@{dialog-prefix-cls}-centered {
text-align: center;
&:before {
- content: '';
+ content: "";
display: inline-block;
height: 100%;
vertical-align: middle;
diff --git a/components/notification/style/index.less b/components/notification/style/index.less
index 9f5e42c3df0..aee8bacbc46 100644
--- a/components/notification/style/index.less
+++ b/components/notification/style/index.less
@@ -58,7 +58,7 @@
display: block;
max-width: 4px;
&:before {
- content: '';
+ content: "";
display: block;
}
}
diff --git a/components/radio/style/index.less b/components/radio/style/index.less
index 7f5e6dcd87c..b85768576a4 100644
--- a/components/radio/style/index.less
+++ b/components/radio/style/index.less
@@ -46,7 +46,7 @@
height: 100%;
border-radius: 50%;
border: 1px solid @radio-dot-color;
- content: '';
+ content: "";
animation: antRadioEffect 0.36s ease-in-out;
animation-fill-mode: both;
visibility: hidden;
diff --git a/components/spin/style/index.less b/components/spin/style/index.less
index c36f872ff09..5a91d5277c4 100644
--- a/components/spin/style/index.less
+++ b/components/spin/style/index.less
@@ -90,7 +90,7 @@
filter: ~"progid\:DXImageTransform\.Microsoft\.Blur(PixelRadius\=1, MakeShadow\=false)";
&:after {
- content: '';
+ content: "";
position: absolute;
left: 0;
right: 0;
diff --git a/components/steps/style/index.less b/components/steps/style/index.less
index bcc5215ff7d..bae8e7ce099 100644
--- a/components/steps/style/index.less
+++ b/components/steps/style/index.less
@@ -82,7 +82,7 @@
top: 12px;
padding: 0 10px;
&:after {
- content: '';
+ content: "";
display: inline-block;
background: @border-color-split;
height: 1px;
@@ -99,7 +99,7 @@
position: relative;
line-height: @steps-icon-size;
&:after {
- content: '';
+ content: "";
height: 1px;
width: 9999px;
background: @wait-tail-color;
diff --git a/components/style/core/motion/other.less b/components/style/core/motion/other.less
index e823753d8d9..6ad5a623d22 100644
--- a/components/style/core/motion/other.less
+++ b/components/style/core/motion/other.less
@@ -11,7 +11,7 @@
[ant-click-animating-without-extra-node]:after,
.ant-click-animating-node {
- content: '';
+ content: "";
position: absolute;
top: -1px;
left: -1px;
diff --git a/components/style/mixins/iconfont.less b/components/style/mixins/iconfont.less
index 112bebccdb5..a18f0c27135 100644
--- a/components/style/mixins/iconfont.less
+++ b/components/style/mixins/iconfont.less
@@ -33,7 +33,7 @@
@font-scale: unit(@size / 12px);
font-size: 12px;
// IE9
- font-size: ~"@{size} \9"; // lesshint duplicateProperty: false
+ font-size: ~"@{size} \9";
transform: scale(@font-scale) rotate(@rotate);
:root & {
font-size: @font-size-sm; // reset IE9 and above
diff --git a/components/style/themes/default.less b/components/style/themes/default.less
index af1cc8e5e7b..4e287706580 100644
--- a/components/style/themes/default.less
+++ b/components/style/themes/default.less
@@ -321,7 +321,8 @@
@menu-inline-toplevel-item-height: 40px;
@menu-item-height: 40px;
@menu-collapsed-width: 80px;
-@menu-bg: transparent;
+@menu-bg: @component-background;
+@menu-popup-bg: @component-background;
@menu-item-color: @text-color;
@menu-highlight-color: @primary-color;
@menu-item-active-bg: @item-active-bg;
diff --git a/components/table/style/index.less b/components/table/style/index.less
index 77751b9e585..b45e82a9db8 100644
--- a/components/table/style/index.less
+++ b/components/table/style/index.less
@@ -154,7 +154,7 @@
.@{table-prefix-cls}-column-sorters {
&:before {
position: absolute;
- content: '';
+ content: "";
top: 0;
left: 0;
right: 0;
@@ -219,7 +219,7 @@
position: relative;
border-top: @border-width-base @border-style-base @border-color-split;
&:before {
- content: '';
+ content: "";
height: 1px;
background: @table-header-bg;
position: absolute;
diff --git a/components/tabs/style/index.less b/components/tabs/style/index.less
index 5bc9b852788..8b650f49d14 100644
--- a/components/tabs/style/index.less
+++ b/components/tabs/style/index.less
@@ -305,6 +305,7 @@
.@{tab-prefix-cls}-ink-bar {
width: 2px;
+ top: 0;
left: auto;
height: auto;
bottom: auto;
@@ -385,12 +386,12 @@
.@{tab-prefix-cls}-top .@{tab-prefix-cls}-ink-bar-animated,
.@{tab-prefix-cls}-bottom .@{tab-prefix-cls}-ink-bar-animated {
- transition: transform .3s @ease-in-out, width .3s @ease-in-out;
+ transition: transform .3s @ease-in-out, width .3s @ease-in-out, left .3s @ease-in-out;
}
.@{tab-prefix-cls}-left .@{tab-prefix-cls}-ink-bar-animated,
.@{tab-prefix-cls}-right .@{tab-prefix-cls}-ink-bar-animated {
- transition: transform .3s @ease-in-out, height .3s @ease-in-out;
+ transition: transform .3s @ease-in-out, height .3s @ease-in-out, top .3s @ease-in-out;
}
.no-flex,
diff --git a/components/tree/style/directory.less b/components/tree/style/directory.less
index 18e8ab6608c..c33e683b270 100644
--- a/components/tree/style/directory.less
+++ b/components/tree/style/directory.less
@@ -42,7 +42,7 @@
}
&:before {
- content: '';
+ content: "";
position: absolute;
left: 0;
right: 0;