Skip to content

Commit

Permalink
chore: sync ant-design v4.22.8 (#8479)
Browse files Browse the repository at this point in the history
* chore: sync ant-design v4.22.8

---------

Co-authored-by: ng-zorro-bot <ng-zorro-bot@users.noreply.github.com>
Co-authored-by: hyperlife1119 <hyperlife1119@qq.com>
  • Loading branch information
3 people committed Apr 6, 2024
1 parent 0f6c11c commit d2917e6
Show file tree
Hide file tree
Showing 35 changed files with 403 additions and 269 deletions.
33 changes: 0 additions & 33 deletions components/anchor/style/index.less
Original file line number Diff line number Diff line change
Expand Up @@ -14,39 +14,6 @@
padding-left: 4px;
overflow: auto;
background-color: @anchor-bg;

&-horizontal {
margin-left: unset;
padding-left: unset;
margin-bottom: -4px;
padding-bottom: 4px;

.ant-anchor {
display: flex;

&-ink {
top: unset;
bottom: 0;
width: 100%;
height: unset;

&:before {
width: 100%;
height: 2px;
}

&-ball {
transform: translate(-50%, -50%);
}
}

&-link {
&:first-of-type {
padding-inline: 0;
}
}
}
}
}

&-ink {
Expand Down
40 changes: 40 additions & 0 deletions components/anchor/style/patch.less
Original file line number Diff line number Diff line change
@@ -1,3 +1,43 @@
@import '../../style/themes/index';

nz-link {
display: block;
}

.@{ant-prefix}-anchor {
&-wrapper {
// This is a feature of Antd 5, so we need add in the patch file.
&-horizontal {
margin-left: unset;
padding-left: unset;
margin-bottom: -4px;
padding-bottom: 4px;

.ant-anchor {
display: flex;

&-ink {
top: unset;
bottom: 0;
width: 100%;
height: unset;

&:before {
width: 100%;
height: 2px;
}

&-ball {
transform: translate(-50%, -50%);
}
}

&-link {
&:first-of-type {
padding-inline: 0;
}
}
}
}
}
}
2 changes: 1 addition & 1 deletion components/checkbox/style/mixin.less
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@
width: 100%;
height: 100%;
border: 1px solid @checkbox-color;
border-radius: @border-radius-base;
border-radius: @checkbox-border-radius;
visibility: hidden;
animation: antCheckboxEffect 0.36s ease-in-out;
animation-fill-mode: backwards;
Expand Down
4 changes: 3 additions & 1 deletion components/collapse/collapse-panel.component.ts
Original file line number Diff line number Diff line change
Expand Up @@ -56,7 +56,9 @@ const NZ_CONFIG_MODULE_NAME: NzConfigKey = 'collapsePanel';
</ng-container>
</div>
}
<ng-container *nzStringTemplateOutlet="nzHeader">{{ nzHeader }}</ng-container>
<span class="ant-collapse-header-text">
<ng-container *nzStringTemplateOutlet="nzHeader">{{ nzHeader }}</ng-container>
</span>
@if (nzExtra) {
<div class="ant-collapse-extra">
<ng-container *nzStringTemplateOutlet="nzExtra">{{ nzExtra }}</ng-container>
Expand Down
5 changes: 5 additions & 0 deletions components/collapse/style/index.less
Original file line number Diff line number Diff line change
Expand Up @@ -43,6 +43,10 @@
}
}

.@{collapse-prefix-cls}-header-text {
flex: auto;
}

.@{collapse-prefix-cls}-extra {
margin-left: auto;
}
Expand All @@ -55,6 +59,7 @@
.@{collapse-prefix-cls}-header-collapsible-only {
cursor: default;
.@{collapse-prefix-cls}-header-text {
flex: none;
cursor: pointer;
}
}
Expand Down
13 changes: 13 additions & 0 deletions components/core/animation/drawer.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
/**
* Use of this source code is governed by an MIT-style license that can be
* found in the LICENSE file at https://github.com/NG-ZORRO/ng-zorro-antd/blob/master/LICENSE
*/

import { AnimationTriggerMetadata, animate, style, transition, trigger } from '@angular/animations';

import { AnimationDuration } from './animation-consts';

export const drawerMaskMotion: AnimationTriggerMetadata = trigger('drawerMaskMotion', [
transition(':enter', [style({ opacity: 0 }), animate(`${AnimationDuration.SLOW}`, style({ opacity: 1 }))]),
transition(':leave', [style({ opacity: 1 }), animate(`${AnimationDuration.SLOW}`, style({ opacity: 0 }))])
]);
File renamed without changes.
5 changes: 3 additions & 2 deletions components/core/animation/public-api.ts
Original file line number Diff line number Diff line change
Expand Up @@ -5,10 +5,11 @@

export * from './animation-consts';
export * from './collapse';
export * from './drawer';
export * from './fade';
export * from './help';
export * from './form';
export * from './move';
export * from './notification';
export * from './slide';
export * from './zoom';
export * from './thumb';
export * from './zoom';
2 changes: 1 addition & 1 deletion components/date-picker/style/status.less
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@
&:focus {
.active(@text-color, @hoverBorderColor, @outlineColor);
}

.@{picker-prefix-cls}-active-bar {
background: @hoverBorderColor;
}
Expand Down
6 changes: 4 additions & 2 deletions components/drawer/drawer.component.ts
Original file line number Diff line number Diff line change
Expand Up @@ -35,6 +35,7 @@ import {
import { Observable, Subject } from 'rxjs';
import { takeUntil } from 'rxjs/operators';

import { drawerMaskMotion } from 'ng-zorro-antd/core/animation';
import { NzConfigKey, NzConfigService, WithConfig } from 'ng-zorro-antd/core/config';
import { NzNoAnimationDirective } from 'ng-zorro-antd/core/no-animation';
import { NzOutletModule } from 'ng-zorro-antd/core/outlet';
Expand Down Expand Up @@ -77,8 +78,8 @@ const NZ_CONFIG_MODULE_NAME: NzConfigKey = 'drawer';
[style.transition]="placementChanging ? 'none' : null"
[style.zIndex]="nzZIndex"
>
@if (nzMask) {
<div class="ant-drawer-mask" (click)="maskClick()" [ngStyle]="nzMaskStyle"></div>
@if (nzMask && isOpen) {
<div @drawerMaskMotion class="ant-drawer-mask" (click)="maskClick()" [ngStyle]="nzMaskStyle"></div>
}
<div
class="ant-drawer-content-wrapper {{ nzWrapClassName }}"
Expand Down Expand Up @@ -144,6 +145,7 @@ const NZ_CONFIG_MODULE_NAME: NzConfigKey = 'drawer';
`,
preserveWhitespaces: false,
changeDetection: ChangeDetectionStrategy.OnPush,
animations: [drawerMaskMotion],
imports: [NzNoAnimationDirective, NgStyle, NzOutletModule, NzIconModule, PortalModule, NgTemplateOutlet],
standalone: true
})
Expand Down
Loading

0 comments on commit d2917e6

Please sign in to comment.