-
Notifications
You must be signed in to change notification settings - Fork 472
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
fix(core):
Dialogs
fix page scrolling under dialogs (#7384)
Signed-off-by: waterplea <[email protected]> Co-authored-by: taiga-family-bot <[email protected]>
- Loading branch information
1 parent
5332d62
commit 4635ba9
Showing
50 changed files
with
96 additions
and
491 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
33 changes: 24 additions & 9 deletions
33
projects/addon-preview/components/preview-dialog/preview-dialog.component.ts
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,27 +1,42 @@ | ||
import { | ||
ChangeDetectionStrategy, | ||
Component, | ||
HostListener, | ||
inject, | ||
ViewEncapsulation, | ||
} from '@angular/core'; | ||
import type {TuiPopover} from '@taiga-ui/cdk'; | ||
import {tuiSlideInTop} from '@taiga-ui/core'; | ||
import { | ||
TUI_ANIMATIONS_SPEED, | ||
tuiFadeIn, | ||
tuiGetDuration, | ||
tuiSlideInTop, | ||
} from '@taiga-ui/core'; | ||
import {POLYMORPHEUS_CONTEXT} from '@tinkoff/ng-polymorpheus'; | ||
|
||
@Component({ | ||
selector: 'tui-preview-dialog', | ||
templateUrl: './preview-dialog.template.html', | ||
template: ` | ||
<ng-container *polymorpheusOutlet="context.content as text; context: context"> | ||
{{ text }} | ||
</ng-container> | ||
`, | ||
styleUrls: ['./preview-dialog.style.less'], | ||
encapsulation: ViewEncapsulation.None, | ||
changeDetection: ChangeDetectionStrategy.OnPush, | ||
animations: [tuiSlideInTop], | ||
animations: [tuiSlideInTop, tuiFadeIn], | ||
host: { | ||
'(document:keydown.esc)': 'context.$implicit.complete()', | ||
'[@tuiSlideInTop]': 'animation', | ||
'[@tuiFadeIn]': 'animation', | ||
}, | ||
}) | ||
export class TuiPreviewDialogComponent { | ||
protected readonly context = inject<TuiPopover<void, void>>(POLYMORPHEUS_CONTEXT); | ||
|
||
@HostListener('document:keydown.esc') | ||
protected onKeyDownEsc(): void { | ||
this.context.$implicit.complete(); | ||
} | ||
protected readonly animation = { | ||
value: '', | ||
params: { | ||
start: '100vh', | ||
duration: tuiGetDuration(inject(TUI_ANIMATIONS_SPEED)), | ||
}, | ||
}; | ||
} |
3 changes: 1 addition & 2 deletions
3
projects/addon-preview/components/preview-dialog/preview-dialog.style.less
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
9 changes: 0 additions & 9 deletions
9
projects/addon-preview/components/preview-dialog/preview-dialog.template.html
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,2 +1 @@ | ||
export * from './focus-trap.directive'; | ||
export * from './focus-trap.module'; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
129 changes: 0 additions & 129 deletions
129
projects/cdk/directives/overscroll/overscroll.directive.ts
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file was deleted.
Oops, something went wrong.
Oops, something went wrong.