@taiga-ui/addon-mobile 4.52.0-canary.38dfc57 → 4.52.0-canary.4d93c87
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/directives/ripple/ripple.directive.d.ts +1 -1
- package/fesm2022/taiga-ui-addon-mobile-components-sheet-dialog.mjs +7 -7
- package/fesm2022/taiga-ui-addon-mobile-components-sheet-dialog.mjs.map +1 -1
- package/fesm2022/taiga-ui-addon-mobile-directives-dropdown-mobile.mjs +2 -2
- package/fesm2022/taiga-ui-addon-mobile-directives-dropdown-mobile.mjs.map +1 -1
- package/fesm2022/taiga-ui-addon-mobile-directives-ripple.mjs +14 -35
- package/fesm2022/taiga-ui-addon-mobile-directives-ripple.mjs.map +1 -1
- package/fesm2022/taiga-ui-addon-mobile-services.mjs +2 -2
- package/fesm2022/taiga-ui-addon-mobile-services.mjs.map +1 -1
- package/package.json +1 -1
|
@@ -2,7 +2,7 @@ import * as i0 from "@angular/core";
|
|
|
2
2
|
export declare class TuiRipple {
|
|
3
3
|
private readonly doc;
|
|
4
4
|
private readonly destroyRef;
|
|
5
|
-
private readonly
|
|
5
|
+
private readonly duration;
|
|
6
6
|
protected readonly nothing: undefined;
|
|
7
7
|
tuiRipple: string;
|
|
8
8
|
protected start(x: number, y: number, target: HTMLElement, el: HTMLElement): void;
|
|
@@ -1,18 +1,18 @@
|
|
|
1
1
|
import * as i0 from '@angular/core';
|
|
2
|
-
import { ElementRef, ViewChildren, ChangeDetectionStrategy, Component, InjectionToken,
|
|
2
|
+
import { inject, ElementRef, ViewChildren, ChangeDetectionStrategy, Component, InjectionToken, Injectable, Directive } from '@angular/core';
|
|
3
3
|
import { takeUntilDestroyed } from '@angular/core/rxjs-interop';
|
|
4
|
-
import { EMPTY_QUERY } from '@taiga-ui/cdk/constants';
|
|
4
|
+
import { EMPTY_QUERY, TUI_TRUE_HANDLER } from '@taiga-ui/cdk/constants';
|
|
5
5
|
import * as i1 from '@taiga-ui/cdk/directives/animated';
|
|
6
6
|
import { TuiAnimated } from '@taiga-ui/cdk/directives/animated';
|
|
7
7
|
import { tuiCloseWatcher, tuiZonefull } from '@taiga-ui/cdk/observables';
|
|
8
8
|
import { tuiInjectElement } from '@taiga-ui/cdk/utils/dom';
|
|
9
9
|
import { tuiProvide, tuiProvideOptions } from '@taiga-ui/cdk/utils/miscellaneous';
|
|
10
|
+
import { TUI_DIALOGS_CLOSE, TUI_DIALOGS } from '@taiga-ui/core/components/dialog';
|
|
10
11
|
import { TUI_SCROLL_REF } from '@taiga-ui/core/tokens';
|
|
11
12
|
import { injectContext, PolymorpheusOutlet } from '@taiga-ui/polymorpheus';
|
|
12
|
-
import { Subject, merge, exhaustMap, isObservable, take, of, filter, startWith, pairwise } from 'rxjs';
|
|
13
|
+
import { Subject, merge, map, exhaustMap, isObservable, take, of, filter, startWith, pairwise } from 'rxjs';
|
|
13
14
|
import { TuiPopoverDirective } from '@taiga-ui/cdk/directives/popover';
|
|
14
15
|
import { TuiPopoverService, TuiThemeColorService, tuiAsPopover } from '@taiga-ui/cdk/services';
|
|
15
|
-
import { TUI_DIALOGS } from '@taiga-ui/core/components/dialog';
|
|
16
16
|
|
|
17
17
|
const REQUIRED_ERROR = new Error(ngDevMode ? 'Required dialog was dismissed' : '');
|
|
18
18
|
class TuiSheetDialogComponent {
|
|
@@ -22,7 +22,7 @@ class TuiSheetDialogComponent {
|
|
|
22
22
|
this.pointers = 0;
|
|
23
23
|
this.context = injectContext();
|
|
24
24
|
this.close$ = new Subject();
|
|
25
|
-
this.$ = merge(this.close$, tuiCloseWatcher())
|
|
25
|
+
this.$ = merge(this.close$, tuiCloseWatcher(), inject(TUI_DIALOGS_CLOSE).pipe(map(TUI_TRUE_HANDLER)))
|
|
26
26
|
.pipe(tuiZonefull(), exhaustMap(() => {
|
|
27
27
|
if (isObservable(this.context.closeable)) {
|
|
28
28
|
if (this.el.scrollTop <= 0) {
|
|
@@ -60,7 +60,7 @@ class TuiSheetDialogComponent {
|
|
|
60
60
|
}
|
|
61
61
|
}
|
|
62
62
|
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.2.15", ngImport: i0, type: TuiSheetDialogComponent, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
|
|
63
|
-
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "19.2.15", type: TuiSheetDialogComponent, isStandalone: true, selector: "tui-sheet-dialog", host: { listeners: { "document:touchstart.passive.zoneless": "onPointerChange(1)", "document:touchend.zoneless": "onPointerChange(-1)", "document:touchcancel.zoneless": "onPointerChange(-1)", "scroll.zoneless": "onPointerChange(0)", "click.self": "close$.next()" }, properties: { "attr.data-appearance": "context.appearance", "style.--tui-offset.px": "context.offset", "class._closeable": "context.closeable", "class._fullscreen": "context.fullscreen === true" } }, providers: [tuiProvide(TUI_SCROLL_REF, ElementRef)], viewQueries: [{ propertyName: "stops", predicate: ["stops"], descendants: true }], hostDirectives: [{ directive: i1.TuiAnimated }], ngImport: i0, template: "<div class=\"t-stops\">\n @for (stop of context.stops; track stop) {\n <div\n #stops\n class=\"t-stop\"\n [style.margin-top]=\"stop\"\n ></div>\n }\n</div>\n<div class=\"t-sheet\">\n @if (context.bar && !context.appearance.includes('fullscreen')) {\n <div class=\"t-top\"></div>\n }\n @if (context.label) {\n <h2\n class=\"t-heading\"\n [id]=\"context.id\"\n >\n <ng-container *polymorpheusOutlet=\"context.label as label; context: context\">\n {{ label }}\n </ng-container>\n </h2>\n }\n <div class=\"t-content\">\n <div\n *polymorpheusOutlet=\"context.content as text; context: context\"\n [innerHTML]=\"text\"\n ></div>\n </div>\n</div>\n", styles: [":host{scrollbar-width:none;-ms-overflow-style:none;display:flex;inline-size:100%;max-inline-size:40rem;block-size:calc(100% - max(var(--tui-offset),env(safe-area-inset-top)));flex-direction:column;font:var(--tui-font-text-m);overflow-y:scroll;scroll-snap-type:y mandatory;margin:max(var(--tui-offset),env(safe-area-inset-top)) auto 0;border-radius:.75rem .75rem 0 0}:host::-webkit-scrollbar,:host::-webkit-scrollbar-thumb{display:none}:host.tui-enter,:host.tui-leave{animation-name:tuiFade,tuiSlide}:host:before{position:
|
|
63
|
+
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "19.2.15", type: TuiSheetDialogComponent, isStandalone: true, selector: "tui-sheet-dialog", host: { listeners: { "document:touchstart.passive.zoneless": "onPointerChange(1)", "document:touchend.zoneless": "onPointerChange(-1)", "document:touchcancel.zoneless": "onPointerChange(-1)", "scroll.zoneless": "onPointerChange(0)", "click.self": "close$.next()" }, properties: { "attr.data-appearance": "context.appearance", "style.--tui-offset.px": "context.offset", "class._closeable": "context.closeable", "class._fullscreen": "context.fullscreen === true" } }, providers: [tuiProvide(TUI_SCROLL_REF, ElementRef)], viewQueries: [{ propertyName: "stops", predicate: ["stops"], descendants: true }], hostDirectives: [{ directive: i1.TuiAnimated }], ngImport: i0, template: "<div class=\"t-stops\">\n @for (stop of context.stops; track stop) {\n <div\n #stops\n class=\"t-stop\"\n [style.margin-top]=\"stop\"\n ></div>\n }\n</div>\n<div class=\"t-sheet\">\n @if (context.bar && !context.appearance.includes('fullscreen')) {\n <div class=\"t-top\"></div>\n }\n @if (context.label) {\n <h2\n class=\"t-heading\"\n [id]=\"context.id\"\n >\n <ng-container *polymorpheusOutlet=\"context.label as label; context: context\">\n {{ label }}\n </ng-container>\n </h2>\n }\n <div class=\"t-content\">\n <div\n *polymorpheusOutlet=\"context.content as text; context: context\"\n [innerHTML]=\"text\"\n ></div>\n </div>\n</div>\n", styles: [":host{scrollbar-width:none;-ms-overflow-style:none;display:flex;inline-size:100%;max-inline-size:40rem;block-size:calc(100% - max(var(--tui-offset),env(safe-area-inset-top)));flex-direction:column;font:var(--tui-font-text-m);overflow-y:scroll;scroll-snap-type:y mandatory;margin:max(var(--tui-offset),env(safe-area-inset-top)) auto 0;border-radius:.75rem .75rem 0 0}:host::-webkit-scrollbar,:host::-webkit-scrollbar-thumb{display:none}:host.tui-enter,:host.tui-leave{animation-name:tuiFade,tuiSlide}:host:before{position:fixed;top:0;left:0;inline-size:100%;block-size:100%;content:\"\";z-index:-1}:host._closeable{display:block}:host._closeable .t-stops{display:flex}:host._fullscreen,:host[data-appearance~=fullscreen]{display:block}:host._fullscreen .t-sheet,:host[data-appearance~=fullscreen] .t-sheet{display:flex;flex-direction:column;min-block-size:100%}:host._fullscreen .t-content,:host[data-appearance~=fullscreen] .t-content{display:flex;flex-direction:column;flex-grow:1}:host._fullscreen .t-content ::ng-deep>header,:host[data-appearance~=fullscreen] .t-content ::ng-deep>header,:host._fullscreen .t-content ::ng-deep>[tuiSlides]>*>header,:host[data-appearance~=fullscreen] .t-content ::ng-deep>[tuiSlides]>*>header,:host._fullscreen .t-content ::ng-deep>ng-component>header,:host[data-appearance~=fullscreen] .t-content ::ng-deep>ng-component>header,:host._fullscreen .t-content ::ng-deep>ng-component>[tuiSlides]>*>header,:host[data-appearance~=fullscreen] .t-content ::ng-deep>ng-component>[tuiSlides]>*>header{margin-block-end:1.5rem;font:var(--tui-font-heading-3)}:host._fullscreen .t-content ::ng-deep>header+p,:host[data-appearance~=fullscreen] .t-content ::ng-deep>header+p,:host._fullscreen .t-content ::ng-deep>[tuiSlides]>*>header+p,:host[data-appearance~=fullscreen] .t-content ::ng-deep>[tuiSlides]>*>header+p,:host._fullscreen .t-content ::ng-deep>ng-component>header+p,:host[data-appearance~=fullscreen] .t-content ::ng-deep>ng-component>header+p,:host._fullscreen .t-content ::ng-deep>ng-component>[tuiSlides]>*>header+p,:host[data-appearance~=fullscreen] .t-content ::ng-deep>ng-component>[tuiSlides]>*>header+p{margin:-.5rem 0 1.5rem}:host._fullscreen .t-content ::ng-deep>header:empty,:host[data-appearance~=fullscreen] .t-content ::ng-deep>header:empty,:host._fullscreen .t-content ::ng-deep>[tuiSlides]>*>header:empty,:host[data-appearance~=fullscreen] .t-content ::ng-deep>[tuiSlides]>*>header:empty,:host._fullscreen .t-content ::ng-deep>ng-component>header:empty,:host[data-appearance~=fullscreen] .t-content ::ng-deep>ng-component>header:empty,:host._fullscreen .t-content ::ng-deep>ng-component>[tuiSlides]>*>header:empty,:host[data-appearance~=fullscreen] .t-content ::ng-deep>ng-component>[tuiSlides]>*>header:empty{display:none}.t-stops{display:none;block-size:100%;scroll-snap-stop:always;scroll-snap-align:start;pointer-events:none}.t-stop{position:relative;top:env(safe-area-inset-bottom);scroll-snap-stop:normal;scroll-snap-align:start;block-size:1rem;inline-size:1rem}.t-sheet{scrollbar-width:none;-ms-overflow-style:none;inline-size:100%;box-shadow:var(--tui-shadow-small);border-radius:inherit;padding:0 1rem;margin-block-start:auto;background:var(--tui-background-elevation-1);box-sizing:border-box;scroll-snap-stop:always;scroll-snap-align:start}.t-sheet::-webkit-scrollbar,.t-sheet::-webkit-scrollbar-thumb{display:none}.t-top{position:sticky;top:0;z-index:1;block-size:1.5rem;margin:0 -1rem;border-radius:inherit;background:var(--tui-background-elevation-1)}.t-top:after{content:\"\";position:absolute;top:.5rem;left:50%;inline-size:2rem;block-size:.25rem;transform:translate(-50%);background:var(--tui-border-normal);border-radius:1rem}.t-heading{position:sticky;top:1.5rem;z-index:1;margin:0 -1rem;padding:.75rem 1rem;font:var(--tui-font-heading-6);background:var(--tui-background-elevation-1)}.t-heading:first-child{top:0;border-radius:inherit}.t-heading:last-child{padding-block-end:1.5rem}.t-content{position:relative;isolation:isolate;padding-block-end:max(1.5rem,env(safe-area-inset-bottom));border-radius:inherit}.t-content:after{content:\"\";position:relative;top:max(1.5rem,env(safe-area-inset-bottom));z-index:-1;display:block;scroll-snap-stop:always;scroll-snap-align:end;border-image:conic-gradient(var(--tui-background-elevation-1) 0 0) fill 0/0/0 100vh 100vh}\n"], dependencies: [{ kind: "directive", type: PolymorpheusOutlet, selector: "[polymorpheusOutlet]", inputs: ["polymorpheusOutlet", "polymorpheusOutletContext"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush }); }
|
|
64
64
|
}
|
|
65
65
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.15", ngImport: i0, type: TuiSheetDialogComponent, decorators: [{
|
|
66
66
|
type: Component,
|
|
@@ -74,7 +74,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.15", ngImpo
|
|
|
74
74
|
'(document:touchcancel.zoneless)': 'onPointerChange(-1)',
|
|
75
75
|
'(scroll.zoneless)': 'onPointerChange(0)',
|
|
76
76
|
'(click.self)': 'close$.next()',
|
|
77
|
-
}, template: "<div class=\"t-stops\">\n @for (stop of context.stops; track stop) {\n <div\n #stops\n class=\"t-stop\"\n [style.margin-top]=\"stop\"\n ></div>\n }\n</div>\n<div class=\"t-sheet\">\n @if (context.bar && !context.appearance.includes('fullscreen')) {\n <div class=\"t-top\"></div>\n }\n @if (context.label) {\n <h2\n class=\"t-heading\"\n [id]=\"context.id\"\n >\n <ng-container *polymorpheusOutlet=\"context.label as label; context: context\">\n {{ label }}\n </ng-container>\n </h2>\n }\n <div class=\"t-content\">\n <div\n *polymorpheusOutlet=\"context.content as text; context: context\"\n [innerHTML]=\"text\"\n ></div>\n </div>\n</div>\n", styles: [":host{scrollbar-width:none;-ms-overflow-style:none;display:flex;inline-size:100%;max-inline-size:40rem;block-size:calc(100% - max(var(--tui-offset),env(safe-area-inset-top)));flex-direction:column;font:var(--tui-font-text-m);overflow-y:scroll;scroll-snap-type:y mandatory;margin:max(var(--tui-offset),env(safe-area-inset-top)) auto 0;border-radius:.75rem .75rem 0 0}:host::-webkit-scrollbar,:host::-webkit-scrollbar-thumb{display:none}:host.tui-enter,:host.tui-leave{animation-name:tuiFade,tuiSlide}:host:before{position:
|
|
77
|
+
}, template: "<div class=\"t-stops\">\n @for (stop of context.stops; track stop) {\n <div\n #stops\n class=\"t-stop\"\n [style.margin-top]=\"stop\"\n ></div>\n }\n</div>\n<div class=\"t-sheet\">\n @if (context.bar && !context.appearance.includes('fullscreen')) {\n <div class=\"t-top\"></div>\n }\n @if (context.label) {\n <h2\n class=\"t-heading\"\n [id]=\"context.id\"\n >\n <ng-container *polymorpheusOutlet=\"context.label as label; context: context\">\n {{ label }}\n </ng-container>\n </h2>\n }\n <div class=\"t-content\">\n <div\n *polymorpheusOutlet=\"context.content as text; context: context\"\n [innerHTML]=\"text\"\n ></div>\n </div>\n</div>\n", styles: [":host{scrollbar-width:none;-ms-overflow-style:none;display:flex;inline-size:100%;max-inline-size:40rem;block-size:calc(100% - max(var(--tui-offset),env(safe-area-inset-top)));flex-direction:column;font:var(--tui-font-text-m);overflow-y:scroll;scroll-snap-type:y mandatory;margin:max(var(--tui-offset),env(safe-area-inset-top)) auto 0;border-radius:.75rem .75rem 0 0}:host::-webkit-scrollbar,:host::-webkit-scrollbar-thumb{display:none}:host.tui-enter,:host.tui-leave{animation-name:tuiFade,tuiSlide}:host:before{position:fixed;top:0;left:0;inline-size:100%;block-size:100%;content:\"\";z-index:-1}:host._closeable{display:block}:host._closeable .t-stops{display:flex}:host._fullscreen,:host[data-appearance~=fullscreen]{display:block}:host._fullscreen .t-sheet,:host[data-appearance~=fullscreen] .t-sheet{display:flex;flex-direction:column;min-block-size:100%}:host._fullscreen .t-content,:host[data-appearance~=fullscreen] .t-content{display:flex;flex-direction:column;flex-grow:1}:host._fullscreen .t-content ::ng-deep>header,:host[data-appearance~=fullscreen] .t-content ::ng-deep>header,:host._fullscreen .t-content ::ng-deep>[tuiSlides]>*>header,:host[data-appearance~=fullscreen] .t-content ::ng-deep>[tuiSlides]>*>header,:host._fullscreen .t-content ::ng-deep>ng-component>header,:host[data-appearance~=fullscreen] .t-content ::ng-deep>ng-component>header,:host._fullscreen .t-content ::ng-deep>ng-component>[tuiSlides]>*>header,:host[data-appearance~=fullscreen] .t-content ::ng-deep>ng-component>[tuiSlides]>*>header{margin-block-end:1.5rem;font:var(--tui-font-heading-3)}:host._fullscreen .t-content ::ng-deep>header+p,:host[data-appearance~=fullscreen] .t-content ::ng-deep>header+p,:host._fullscreen .t-content ::ng-deep>[tuiSlides]>*>header+p,:host[data-appearance~=fullscreen] .t-content ::ng-deep>[tuiSlides]>*>header+p,:host._fullscreen .t-content ::ng-deep>ng-component>header+p,:host[data-appearance~=fullscreen] .t-content ::ng-deep>ng-component>header+p,:host._fullscreen .t-content ::ng-deep>ng-component>[tuiSlides]>*>header+p,:host[data-appearance~=fullscreen] .t-content ::ng-deep>ng-component>[tuiSlides]>*>header+p{margin:-.5rem 0 1.5rem}:host._fullscreen .t-content ::ng-deep>header:empty,:host[data-appearance~=fullscreen] .t-content ::ng-deep>header:empty,:host._fullscreen .t-content ::ng-deep>[tuiSlides]>*>header:empty,:host[data-appearance~=fullscreen] .t-content ::ng-deep>[tuiSlides]>*>header:empty,:host._fullscreen .t-content ::ng-deep>ng-component>header:empty,:host[data-appearance~=fullscreen] .t-content ::ng-deep>ng-component>header:empty,:host._fullscreen .t-content ::ng-deep>ng-component>[tuiSlides]>*>header:empty,:host[data-appearance~=fullscreen] .t-content ::ng-deep>ng-component>[tuiSlides]>*>header:empty{display:none}.t-stops{display:none;block-size:100%;scroll-snap-stop:always;scroll-snap-align:start;pointer-events:none}.t-stop{position:relative;top:env(safe-area-inset-bottom);scroll-snap-stop:normal;scroll-snap-align:start;block-size:1rem;inline-size:1rem}.t-sheet{scrollbar-width:none;-ms-overflow-style:none;inline-size:100%;box-shadow:var(--tui-shadow-small);border-radius:inherit;padding:0 1rem;margin-block-start:auto;background:var(--tui-background-elevation-1);box-sizing:border-box;scroll-snap-stop:always;scroll-snap-align:start}.t-sheet::-webkit-scrollbar,.t-sheet::-webkit-scrollbar-thumb{display:none}.t-top{position:sticky;top:0;z-index:1;block-size:1.5rem;margin:0 -1rem;border-radius:inherit;background:var(--tui-background-elevation-1)}.t-top:after{content:\"\";position:absolute;top:.5rem;left:50%;inline-size:2rem;block-size:.25rem;transform:translate(-50%);background:var(--tui-border-normal);border-radius:1rem}.t-heading{position:sticky;top:1.5rem;z-index:1;margin:0 -1rem;padding:.75rem 1rem;font:var(--tui-font-heading-6);background:var(--tui-background-elevation-1)}.t-heading:first-child{top:0;border-radius:inherit}.t-heading:last-child{padding-block-end:1.5rem}.t-content{position:relative;isolation:isolate;padding-block-end:max(1.5rem,env(safe-area-inset-bottom));border-radius:inherit}.t-content:after{content:\"\";position:relative;top:max(1.5rem,env(safe-area-inset-bottom));z-index:-1;display:block;scroll-snap-stop:always;scroll-snap-align:end;border-image:conic-gradient(var(--tui-background-elevation-1) 0 0) fill 0/0/0 100vh 100vh}\n"] }]
|
|
78
78
|
}], propDecorators: { stops: [{
|
|
79
79
|
type: ViewChildren,
|
|
80
80
|
args: ['stops']
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"taiga-ui-addon-mobile-components-sheet-dialog.mjs","sources":["../../../projects/addon-mobile/components/sheet-dialog/sheet-dialog.component.ts","../../../projects/addon-mobile/components/sheet-dialog/sheet-dialog.template.html","../../../projects/addon-mobile/components/sheet-dialog/sheet-dialog.options.ts","../../../projects/addon-mobile/components/sheet-dialog/sheet-dialog.service.ts","../../../projects/addon-mobile/components/sheet-dialog/sheet-dialog.directive.ts","../../../projects/addon-mobile/components/sheet-dialog/taiga-ui-addon-mobile-components-sheet-dialog.ts"],"sourcesContent":["import {\n type AfterViewInit,\n ChangeDetectionStrategy,\n Component,\n ElementRef,\n type QueryList,\n ViewChildren,\n} from '@angular/core';\nimport {takeUntilDestroyed} from '@angular/core/rxjs-interop';\nimport {EMPTY_QUERY} from '@taiga-ui/cdk/constants';\nimport {TuiAnimated} from '@taiga-ui/cdk/directives/animated';\nimport {tuiCloseWatcher, tuiZonefull} from '@taiga-ui/cdk/observables';\nimport {type TuiPopover} from '@taiga-ui/cdk/services';\nimport {tuiInjectElement} from '@taiga-ui/cdk/utils/dom';\nimport {tuiProvide} from '@taiga-ui/cdk/utils/miscellaneous';\nimport {TUI_SCROLL_REF} from '@taiga-ui/core/tokens';\nimport {injectContext, PolymorpheusOutlet} from '@taiga-ui/polymorpheus';\nimport {exhaustMap, filter, isObservable, merge, of, Subject, take} from 'rxjs';\n\nimport {type TuiSheetDialogOptions} from './sheet-dialog.options';\n\nconst REQUIRED_ERROR = new Error(ngDevMode ? 'Required dialog was dismissed' : '');\n\n@Component({\n selector: 'tui-sheet-dialog',\n imports: [PolymorpheusOutlet],\n templateUrl: './sheet-dialog.template.html',\n styleUrls: ['./sheet-dialog.style.less'],\n changeDetection: ChangeDetectionStrategy.OnPush,\n providers: [tuiProvide(TUI_SCROLL_REF, ElementRef)],\n hostDirectives: [TuiAnimated],\n host: {\n '[attr.data-appearance]': 'context.appearance',\n '[style.--tui-offset.px]': 'context.offset',\n '[class._closeable]': 'context.closeable',\n '[class._fullscreen]': 'context.fullscreen === true',\n '(document:touchstart.passive.zoneless)': 'onPointerChange(1)',\n '(document:touchend.zoneless)': 'onPointerChange(-1)',\n '(document:touchcancel.zoneless)': 'onPointerChange(-1)',\n '(scroll.zoneless)': 'onPointerChange(0)',\n '(click.self)': 'close$.next()',\n },\n})\nexport class TuiSheetDialogComponent<I> implements AfterViewInit {\n @ViewChildren('stops')\n private readonly stops: QueryList<ElementRef<HTMLElement>> = EMPTY_QUERY;\n\n private readonly el = tuiInjectElement();\n private pointers = 0;\n\n protected readonly context =\n injectContext<TuiPopover<TuiSheetDialogOptions<I>, any>>();\n\n protected readonly close$ = new Subject<void>();\n protected readonly $ = merge(this.close$, tuiCloseWatcher())\n .pipe(\n tuiZonefull(),\n exhaustMap(() => {\n if (isObservable(this.context.closeable)) {\n if (this.el.scrollTop <= 0) {\n this.el.scrollTo({top: this.initial, behavior: 'smooth'});\n }\n\n return this.context.closeable.pipe(take(1));\n }\n\n return of(this.context.closeable);\n }),\n filter(Boolean),\n takeUntilDestroyed(),\n )\n .subscribe(() => this.close());\n\n public ngAfterViewInit(): void {\n this.el.scrollTop = this.initial;\n }\n\n protected onPointerChange(delta: number): void {\n this.pointers = Math.max(this.pointers + delta, 0);\n\n if (!this.pointers && this.el.scrollTop <= 0) {\n this.close$.next();\n }\n }\n\n private get initial(): number {\n if (!this.context.closeable) {\n return 0;\n }\n\n return (\n this.stops\n .map((e) => e.nativeElement.offsetTop - this.context.offset)\n .concat(this.el.clientHeight ?? Infinity)[this.context.initial] ?? 0\n );\n }\n\n private close(): void {\n if (this.context.required) {\n this.context.$implicit.error(REQUIRED_ERROR);\n } else {\n this.context.$implicit.complete();\n }\n }\n}\n","<div class=\"t-stops\">\n @for (stop of context.stops; track stop) {\n <div\n #stops\n class=\"t-stop\"\n [style.margin-top]=\"stop\"\n ></div>\n }\n</div>\n<div class=\"t-sheet\">\n @if (context.bar && !context.appearance.includes('fullscreen')) {\n <div class=\"t-top\"></div>\n }\n @if (context.label) {\n <h2\n class=\"t-heading\"\n [id]=\"context.id\"\n >\n <ng-container *polymorpheusOutlet=\"context.label as label; context: context\">\n {{ label }}\n </ng-container>\n </h2>\n }\n <div class=\"t-content\">\n <div\n *polymorpheusOutlet=\"context.content as text; context: context\"\n [innerHTML]=\"text\"\n ></div>\n </div>\n</div>\n","import {InjectionToken, type Provider} from '@angular/core';\nimport {type TuiPopover} from '@taiga-ui/cdk/services';\nimport {tuiProvideOptions} from '@taiga-ui/cdk/utils/miscellaneous';\nimport {type PolymorpheusContent} from '@taiga-ui/polymorpheus';\nimport {type Observable} from 'rxjs';\n\nexport interface TuiSheetDialogOptions<I = undefined> {\n readonly appearance: string;\n readonly closeable: Observable<boolean> | boolean;\n readonly data: I;\n readonly initial: number;\n readonly label: PolymorpheusContent<TuiPopover<TuiSheetDialogOptions<I>, any>>;\n readonly offset: number;\n readonly stops: readonly string[];\n readonly bar: boolean;\n /** @deprecated add 'fullscreen' in appearance string */\n readonly fullscreen: boolean;\n readonly required: boolean;\n}\n\nexport const TUI_SHEET_DIALOG_DEFAULT_OPTIONS: TuiSheetDialogOptions = {\n label: '',\n appearance: '',\n stops: [],\n initial: 0,\n offset: 16,\n closeable: true,\n data: undefined,\n bar: true,\n fullscreen: false,\n required: false,\n};\n\n/**\n * Default parameters for mobile dialog component\n */\nexport const TUI_SHEET_DIALOG_OPTIONS = new InjectionToken(\n ngDevMode ? 'TUI_SHEET_DIALOG_OPTIONS' : '',\n {\n factory: () => TUI_SHEET_DIALOG_DEFAULT_OPTIONS,\n },\n);\n\nexport function tuiSheetDialogOptionsProvider(\n options: Partial<TuiSheetDialogOptions>,\n): Provider {\n return tuiProvideOptions(\n TUI_SHEET_DIALOG_OPTIONS,\n options,\n TUI_SHEET_DIALOG_DEFAULT_OPTIONS,\n );\n}\n","import {inject, Injectable} from '@angular/core';\nimport {takeUntilDestroyed} from '@angular/core/rxjs-interop';\nimport {TuiPopoverService, TuiThemeColorService} from '@taiga-ui/cdk/services';\nimport {TUI_DIALOGS} from '@taiga-ui/core/components/dialog';\nimport {pairwise, startWith} from 'rxjs';\n\nimport {TuiSheetDialogComponent} from './sheet-dialog.component';\nimport {\n TUI_SHEET_DIALOG_OPTIONS,\n type TuiSheetDialogOptions,\n} from './sheet-dialog.options';\n\nconst THEME = '#404040';\n\n@Injectable({\n providedIn: 'root',\n useFactory: () =>\n new TuiSheetDialogService(\n TUI_DIALOGS,\n TuiSheetDialogComponent,\n inject(TUI_SHEET_DIALOG_OPTIONS),\n ),\n})\nexport class TuiSheetDialogService extends TuiPopoverService<TuiSheetDialogOptions<any>> {\n private readonly theme = inject(TuiThemeColorService);\n private initial = this.theme.color;\n\n protected readonly $ = this.items$\n .pipe(startWith([]), pairwise(), takeUntilDestroyed())\n .subscribe(([prev, next]) => {\n if (!prev.length && next.length) {\n this.initial = this.theme.color;\n this.theme.color = THEME;\n }\n\n if (!next.length && prev.length) {\n this.theme.color = this.initial;\n }\n });\n}\n","import {Directive} from '@angular/core';\nimport {TuiPopoverDirective} from '@taiga-ui/cdk/directives/popover';\nimport {tuiAsPopover} from '@taiga-ui/cdk/services';\n\nimport {type TuiSheetDialogOptions} from './sheet-dialog.options';\nimport {TuiSheetDialogService} from './sheet-dialog.service';\n\n@Directive({\n standalone: true,\n selector: 'ng-template[tuiSheetDialog]',\n inputs: ['options: tuiSheetDialogOptions', 'open: tuiSheetDialog'],\n outputs: ['openChange: tuiSheetDialogChange'],\n providers: [tuiAsPopover(TuiSheetDialogService)],\n})\nexport class TuiSheetDialog extends TuiPopoverDirective<TuiSheetDialogOptions> {}\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './index';\n"],"names":[],"mappings":";;;;;;;;;;;;;;;;AAqBA,MAAM,cAAc,GAAG,IAAI,KAAK,CAAC,SAAS,GAAG,+BAA+B,GAAG,EAAE,CAAC;MAsBrE,uBAAuB,CAAA;AApBpC,IAAA,WAAA,GAAA;QAsBqB,IAAK,CAAA,KAAA,GAAuC,WAAW;QAEvD,IAAE,CAAA,EAAA,GAAG,gBAAgB,EAAE;QAChC,IAAQ,CAAA,QAAA,GAAG,CAAC;QAED,IAAO,CAAA,OAAA,GACtB,aAAa,EAA6C;AAE3C,QAAA,IAAA,CAAA,MAAM,GAAG,IAAI,OAAO,EAAQ;QAC5B,IAAC,CAAA,CAAA,GAAG,KAAK,CAAC,IAAI,CAAC,MAAM,EAAE,eAAe,EAAE;AACtD,aAAA,IAAI,CACD,WAAW,EAAE,EACb,UAAU,CAAC,MAAK;YACZ,IAAI,YAAY,CAAC,IAAI,CAAC,OAAO,CAAC,SAAS,CAAC,EAAE;gBACtC,IAAI,IAAI,CAAC,EAAE,CAAC,SAAS,IAAI,CAAC,EAAE;AACxB,oBAAA,IAAI,CAAC,EAAE,CAAC,QAAQ,CAAC,EAAC,GAAG,EAAE,IAAI,CAAC,OAAO,EAAE,QAAQ,EAAE,QAAQ,EAAC,CAAC;;AAG7D,gBAAA,OAAO,IAAI,CAAC,OAAO,CAAC,SAAS,CAAC,IAAI,CAAC,IAAI,CAAC,CAAC,CAAC,CAAC;;YAG/C,OAAO,EAAE,CAAC,IAAI,CAAC,OAAO,CAAC,SAAS,CAAC;SACpC,CAAC,EACF,MAAM,CAAC,OAAO,CAAC,EACf,kBAAkB,EAAE;aAEvB,SAAS,CAAC,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0C,CAAA;+GAAjE,cAAc,EAAA,IAAA,EAAA,IAAA,EAAA,MAAA,EAAA,EAAA,CAAA,eAAA,CAAA,SAAA,EAAA,CAAA,CAAA;AAAd,IAAA,SAAA,IAAA,CAAA,IAAA,GAAA,EAAA,CAAA,oBAAA,CAAA,EAAA,UAAA,EAAA,QAAA,EAAA,OAAA,EAAA,SAAA,EAAA,IAAA,EAAA,cAAc,wNAFZ,CAAC,YAAY,CAAC,qBAAqB,CAAC,CAAC,EAAA,eAAA,EAAA,IAAA,EAAA,QAAA,EAAA,EAAA,EAAA,CAAA,CAAA;;4FAEvC,cAAc,EAAA,UAAA,EAAA,CAAA;kBAP1B,SAAS;AAAC,YAAA,IAAA,EAAA,CAAA;AACP,oBAAA,UAAU,EAAE,IAAI;AAChB,oBAAA,QAAQ,EAAE,6BAA6B;AACvC,oBAAA,MAAM,EAAE,CAAC,gCAAgC,EAAE,sBAAsB,CAAC;oBAClE,OAAO,EAAE,CAAC,kCAAkC,CAAC;AAC7C,oBAAA,SAAS,EAAE,CAAC,YAAY,CAAC,qBAAqB,CAAC,CAAC;AACnD,iBAAA;;;ACbD;;AAEG;;;;"}
|
|
1
|
+
{"version":3,"file":"taiga-ui-addon-mobile-components-sheet-dialog.mjs","sources":["../../../projects/addon-mobile/components/sheet-dialog/sheet-dialog.component.ts","../../../projects/addon-mobile/components/sheet-dialog/sheet-dialog.template.html","../../../projects/addon-mobile/components/sheet-dialog/sheet-dialog.options.ts","../../../projects/addon-mobile/components/sheet-dialog/sheet-dialog.service.ts","../../../projects/addon-mobile/components/sheet-dialog/sheet-dialog.directive.ts","../../../projects/addon-mobile/components/sheet-dialog/taiga-ui-addon-mobile-components-sheet-dialog.ts"],"sourcesContent":["import {\n type AfterViewInit,\n ChangeDetectionStrategy,\n Component,\n ElementRef,\n inject,\n type QueryList,\n ViewChildren,\n} from '@angular/core';\nimport {takeUntilDestroyed} from '@angular/core/rxjs-interop';\nimport {EMPTY_QUERY, TUI_TRUE_HANDLER} from '@taiga-ui/cdk/constants';\nimport {TuiAnimated} from '@taiga-ui/cdk/directives/animated';\nimport {tuiCloseWatcher, tuiZonefull} from '@taiga-ui/cdk/observables';\nimport {type TuiPopover} from '@taiga-ui/cdk/services';\nimport {tuiInjectElement} from '@taiga-ui/cdk/utils/dom';\nimport {tuiProvide} from '@taiga-ui/cdk/utils/miscellaneous';\nimport {TUI_DIALOGS_CLOSE} from '@taiga-ui/core/components/dialog';\nimport {TUI_SCROLL_REF} from '@taiga-ui/core/tokens';\nimport {injectContext, PolymorpheusOutlet} from '@taiga-ui/polymorpheus';\nimport {exhaustMap, filter, isObservable, map, merge, of, Subject, take} from 'rxjs';\n\nimport {type TuiSheetDialogOptions} from './sheet-dialog.options';\n\nconst REQUIRED_ERROR = new Error(ngDevMode ? 'Required dialog was dismissed' : '');\n\n@Component({\n selector: 'tui-sheet-dialog',\n imports: [PolymorpheusOutlet],\n templateUrl: './sheet-dialog.template.html',\n styleUrls: ['./sheet-dialog.style.less'],\n changeDetection: ChangeDetectionStrategy.OnPush,\n providers: [tuiProvide(TUI_SCROLL_REF, ElementRef)],\n hostDirectives: [TuiAnimated],\n host: {\n '[attr.data-appearance]': 'context.appearance',\n '[style.--tui-offset.px]': 'context.offset',\n '[class._closeable]': 'context.closeable',\n '[class._fullscreen]': 'context.fullscreen === true',\n '(document:touchstart.passive.zoneless)': 'onPointerChange(1)',\n '(document:touchend.zoneless)': 'onPointerChange(-1)',\n '(document:touchcancel.zoneless)': 'onPointerChange(-1)',\n '(scroll.zoneless)': 'onPointerChange(0)',\n '(click.self)': 'close$.next()',\n },\n})\nexport class TuiSheetDialogComponent<I> implements AfterViewInit {\n @ViewChildren('stops')\n private readonly stops: QueryList<ElementRef<HTMLElement>> = EMPTY_QUERY;\n\n private readonly el = tuiInjectElement();\n private pointers = 0;\n\n protected readonly context =\n injectContext<TuiPopover<TuiSheetDialogOptions<I>, any>>();\n\n protected readonly close$ = new Subject<void>();\n protected readonly $ = merge(\n this.close$,\n tuiCloseWatcher(),\n inject(TUI_DIALOGS_CLOSE).pipe(map(TUI_TRUE_HANDLER)),\n )\n .pipe(\n tuiZonefull(),\n exhaustMap(() => {\n if (isObservable(this.context.closeable)) {\n if (this.el.scrollTop <= 0) {\n this.el.scrollTo({top: this.initial, behavior: 'smooth'});\n }\n\n return this.context.closeable.pipe(take(1));\n }\n\n return of(this.context.closeable);\n }),\n filter(Boolean),\n takeUntilDestroyed(),\n )\n .subscribe(() => this.close());\n\n public ngAfterViewInit(): void {\n this.el.scrollTop = this.initial;\n }\n\n protected onPointerChange(delta: number): void {\n this.pointers = Math.max(this.pointers + delta, 0);\n\n if (!this.pointers && this.el.scrollTop <= 0) {\n this.close$.next();\n }\n }\n\n private get initial(): number {\n if (!this.context.closeable) {\n return 0;\n }\n\n return (\n this.stops\n .map((e) => e.nativeElement.offsetTop - this.context.offset)\n .concat(this.el.clientHeight ?? Infinity)[this.context.initial] ?? 0\n );\n }\n\n private close(): void {\n if (this.context.required) {\n this.context.$implicit.error(REQUIRED_ERROR);\n } else {\n this.context.$implicit.complete();\n }\n }\n}\n","<div class=\"t-stops\">\n @for (stop of context.stops; track stop) {\n <div\n #stops\n class=\"t-stop\"\n [style.margin-top]=\"stop\"\n ></div>\n }\n</div>\n<div class=\"t-sheet\">\n @if (context.bar && !context.appearance.includes('fullscreen')) {\n <div class=\"t-top\"></div>\n }\n @if (context.label) {\n <h2\n class=\"t-heading\"\n [id]=\"context.id\"\n >\n <ng-container *polymorpheusOutlet=\"context.label as label; context: context\">\n {{ label }}\n </ng-container>\n </h2>\n }\n <div class=\"t-content\">\n <div\n *polymorpheusOutlet=\"context.content as text; context: context\"\n [innerHTML]=\"text\"\n ></div>\n </div>\n</div>\n","import {InjectionToken, type Provider} from '@angular/core';\nimport {type TuiPopover} from '@taiga-ui/cdk/services';\nimport {tuiProvideOptions} from '@taiga-ui/cdk/utils/miscellaneous';\nimport {type PolymorpheusContent} from '@taiga-ui/polymorpheus';\nimport {type Observable} from 'rxjs';\n\nexport interface TuiSheetDialogOptions<I = undefined> {\n readonly appearance: string;\n readonly closeable: Observable<boolean> | boolean;\n readonly data: I;\n readonly initial: number;\n readonly label: PolymorpheusContent<TuiPopover<TuiSheetDialogOptions<I>, any>>;\n readonly offset: number;\n readonly stops: readonly string[];\n readonly bar: boolean;\n /** @deprecated add 'fullscreen' in appearance string */\n readonly fullscreen: boolean;\n readonly required: boolean;\n}\n\nexport const TUI_SHEET_DIALOG_DEFAULT_OPTIONS: TuiSheetDialogOptions = {\n label: '',\n appearance: '',\n stops: [],\n initial: 0,\n offset: 16,\n closeable: true,\n data: undefined,\n bar: true,\n fullscreen: false,\n required: false,\n};\n\n/**\n * Default parameters for mobile dialog component\n */\nexport const TUI_SHEET_DIALOG_OPTIONS = new InjectionToken(\n ngDevMode ? 'TUI_SHEET_DIALOG_OPTIONS' : '',\n {\n factory: () => TUI_SHEET_DIALOG_DEFAULT_OPTIONS,\n },\n);\n\nexport function tuiSheetDialogOptionsProvider(\n options: Partial<TuiSheetDialogOptions>,\n): Provider {\n return tuiProvideOptions(\n TUI_SHEET_DIALOG_OPTIONS,\n options,\n TUI_SHEET_DIALOG_DEFAULT_OPTIONS,\n );\n}\n","import {inject, Injectable} from '@angular/core';\nimport {takeUntilDestroyed} from '@angular/core/rxjs-interop';\nimport {TuiPopoverService, TuiThemeColorService} from '@taiga-ui/cdk/services';\nimport {TUI_DIALOGS} from '@taiga-ui/core/components/dialog';\nimport {pairwise, startWith} from 'rxjs';\n\nimport {TuiSheetDialogComponent} from './sheet-dialog.component';\nimport {\n TUI_SHEET_DIALOG_OPTIONS,\n type TuiSheetDialogOptions,\n} from './sheet-dialog.options';\n\nconst THEME = '#404040';\n\n@Injectable({\n providedIn: 'root',\n useFactory: () =>\n new TuiSheetDialogService(\n TUI_DIALOGS,\n TuiSheetDialogComponent,\n inject(TUI_SHEET_DIALOG_OPTIONS),\n ),\n})\nexport class TuiSheetDialogService extends TuiPopoverService<TuiSheetDialogOptions<any>> {\n private readonly theme = inject(TuiThemeColorService);\n private initial = this.theme.color;\n\n protected readonly $ = this.items$\n .pipe(startWith([]), pairwise(), takeUntilDestroyed())\n .subscribe(([prev, next]) => {\n if (!prev.length && next.length) {\n this.initial = this.theme.color;\n this.theme.color = THEME;\n }\n\n if (!next.length && prev.length) {\n this.theme.color = this.initial;\n }\n });\n}\n","import {Directive} from '@angular/core';\nimport {TuiPopoverDirective} from '@taiga-ui/cdk/directives/popover';\nimport {tuiAsPopover} from '@taiga-ui/cdk/services';\n\nimport {type TuiSheetDialogOptions} from './sheet-dialog.options';\nimport {TuiSheetDialogService} from './sheet-dialog.service';\n\n@Directive({\n standalone: true,\n selector: 'ng-template[tuiSheetDialog]',\n inputs: ['options: tuiSheetDialogOptions', 'open: tuiSheetDialog'],\n outputs: ['openChange: tuiSheetDialogChange'],\n providers: [tuiAsPopover(TuiSheetDialogService)],\n})\nexport class TuiSheetDialog extends TuiPopoverDirective<TuiSheetDialogOptions> {}\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './index';\n"],"names":[],"mappings":";;;;;;;;;;;;;;;;AAuBA,MAAM,cAAc,GAAG,IAAI,KAAK,CAAC,SAAS,GAAG,+BAA+B,GAAG,EAAE,CAAC;MAsBrE,uBAAuB,CAAA;AApBpC,IAAA,WAAA,GAAA;QAsBqB,IAAK,CAAA,KAAA,GAAuC,WAAW;QAEvD,IAAE,CAAA,EAAA,GAAG,gBAAgB,EAAE;QAChC,IAAQ,CAAA,QAAA,GAAG,CAAC;QAED,IAAO,CAAA,OAAA,GACtB,aAAa,EAA6C;AAE3C,QAAA,IAAA,CAAA,MAAM,GAAG,IAAI,OAAO,EAAQ;QAC5B,IAAC,CAAA,CAAA,GAAG,KAAK,CACxB,IAAI,CAAC,MAAM,EACX,eAAe,EAAE,EACjB,MAAM,CAAC,iBAAiB,CAAC,CAAC,IAAI,CAAC,GAAG,CAAC,gBAAgB,CAAC,CAAC;AAEpD,aAAA,IAAI,CACD,WAAW,EAA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;;"}
|
|
@@ -10,7 +10,7 @@ import * as i2 from '@taiga-ui/cdk/directives/animated';
|
|
|
10
10
|
import { TuiAnimated } from '@taiga-ui/cdk/directives/animated';
|
|
11
11
|
import { TuiSwipe } from '@taiga-ui/cdk/directives/swipe';
|
|
12
12
|
import { tuiIsHTMLElement, tuiInjectElement, tuiIsElement } from '@taiga-ui/cdk/utils/dom';
|
|
13
|
-
import {
|
|
13
|
+
import { tuiGetFocused } from '@taiga-ui/cdk/utils/focus';
|
|
14
14
|
import { tuiPx } from '@taiga-ui/cdk/utils/miscellaneous';
|
|
15
15
|
import { TUI_DROPDOWN_COMPONENT, TuiDropdownDirective } from '@taiga-ui/core/directives/dropdown';
|
|
16
16
|
import { PolymorpheusOutlet } from '@taiga-ui/polymorpheus';
|
|
@@ -127,7 +127,7 @@ class TuiDropdownMobileComponent {
|
|
|
127
127
|
this.doc.body.style.setProperty('--t-root-top', `calc(${tuiPx(offsetTop - rect.top)} + ${topMargin})`);
|
|
128
128
|
}
|
|
129
129
|
get focused() {
|
|
130
|
-
return this.dropdown.el.contains(
|
|
130
|
+
return this.dropdown.el.contains(tuiGetFocused(this.doc));
|
|
131
131
|
}
|
|
132
132
|
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.2.15", ngImport: i0, type: TuiDropdownMobileComponent, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
|
|
133
133
|
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "19.2.15", type: TuiDropdownMobileComponent, isStandalone: true, selector: "tui-dropdown-mobile", host: { listeners: { "document:click.zoneless.capture": "onClick($event)", "window>scroll.zoneless.capture": "refresh($event.currentTarget.visualViewport)", "visualViewport>resize.zoneless": "refresh($event.target)", "visualViewport>scroll.zoneless": "refresh($event.target)" }, properties: { "class._sheet": "directive.tuiDropdownMobile" } }, hostDirectives: [{ directive: i1.TuiActiveZone }, { directive: i2.TuiAnimated }], ngImport: i0, template: "@if (directive.tuiDropdownMobile) {\n <div\n waIntersectionObserver\n waIntersectionThreshold=\"1\"\n class=\"t-filler\"\n (touchstart.prevent)=\"close()\"\n (waIntersectionObservee)=\"$event[0] && onIntersection($event[0])\"\n ></div>\n}\n<div\n #container\n class=\"t-container\"\n (tuiSwipe)=\"onSwipe($event, container)\"\n>\n @if (directive.tuiDropdownMobile) {\n <h2 class=\"t-heading\">\n {{ directive.tuiDropdownMobile }}\n </h2>\n }\n <div class=\"t-content\">\n <ng-container *polymorpheusOutlet=\"dropdown._content() as text; context: {$implicit: close}\">\n {{ text }}\n </ng-container>\n </div>\n</div>\n", styles: ["tui-dropdown-mobile:not(._sheet){scrollbar-width:none;-ms-overflow-style:none;position:fixed;top:0;left:0;inline-size:100%;block-size:100%;transition-property:transform;transition-duration:var(--tui-duration, .3s);transition-timing-function:ease-in-out;visibility:visible!important;transform:translateZ(0);background:var(--tui-background-base);overscroll-behavior:contain;overflow:auto;box-shadow:0 -.5rem .5rem var(--tui-background-base),0 10rem var(--tui-background-base),0 20rem var(--tui-background-base),0 30rem var(--tui-background-base);box-sizing:border-box;padding-block-end:env(safe-area-inset-bottom)}tui-dropdown-mobile:not(._sheet)::-webkit-scrollbar,tui-dropdown-mobile:not(._sheet)::-webkit-scrollbar-thumb{display:none}tui-dropdown-mobile:not(._sheet).tui-enter,tui-dropdown-mobile:not(._sheet).tui-leave{animation-name:tuiFade,tuiSlide}tui-dropdown-mobile:not(._sheet):after{content:\"\";display:block;block-size:1px}tui-dropdown-mobile:not(._sheet)>.t-container{scrollbar-width:none;-ms-overflow-style:none;position:sticky;top:0;block-size:100%;overflow:auto;margin:0 .75rem;touch-action:pan-y!important}tui-dropdown-mobile:not(._sheet)>.t-container::-webkit-scrollbar,tui-dropdown-mobile:not(._sheet)>.t-container::-webkit-scrollbar-thumb{display:none}tui-dropdown-mobile:not(._sheet) [tuiDropdownButton][tuiDropdownButton]{position:fixed;right:1rem;bottom:max(1rem,env(safe-area-inset-bottom));display:inline-flex}tui-dropdown-mobile._sheet{position:fixed;top:0;left:0;bottom:0;right:0;scrollbar-width:none;-ms-overflow-style:none;overflow:auto;background:var(--tui-service-backdrop);box-shadow:0 -80vh 0 5rem var(--tui-service-backdrop);overflow-y:scroll;scroll-snap-type:y mandatory;overscroll-behavior:none}tui-dropdown-mobile._sheet::-webkit-scrollbar,tui-dropdown-mobile._sheet::-webkit-scrollbar-thumb{display:none}tui-dropdown-mobile._sheet.tui-enter,tui-dropdown-mobile._sheet.tui-leave{animation-name:tuiFade,tuiSlide}tui-root:has(tui-dialogs>:nth-child(2)) tui-dropdown-mobile._sheet{background:transparent;box-shadow:none}tui-dropdown-mobile._sheet>.t-filler{block-size:100%;scroll-snap-stop:always;scroll-snap-align:start}tui-dropdown-mobile._sheet>.t-container{display:flex;max-block-size:calc(100% - max(env(safe-area-inset-top),1rem));flex-direction:column;border-top-left-radius:1rem;border-top-right-radius:1rem;padding:0 .5rem env(safe-area-inset-bottom);box-sizing:border-box;scroll-snap-stop:always;scroll-snap-align:start;background:var(--tui-background-elevation-1)}tui-dropdown-mobile._sheet>.t-container>.t-heading{position:relative;margin:0;padding:2rem .5rem .75rem;font:var(--tui-font-heading-6)}tui-dropdown-mobile._sheet>.t-container>.t-heading:before{content:\"\";position:absolute;left:50%;top:.75rem;inline-size:2rem;block-size:.25rem;border-radius:1rem;background:var(--tui-background-neutral-2);transform:translate(-50%,-50%)}tui-dropdown-mobile._sheet>.t-container>.t-content{scrollbar-width:none;-ms-overflow-style:none;overflow-y:auto;overflow-x:hidden}tui-dropdown-mobile._sheet>.t-container>.t-content::-webkit-scrollbar,tui-dropdown-mobile._sheet>.t-container>.t-content::-webkit-scrollbar-thumb{display:none}tui-dropdown-mobile._sheet tui-data-list [tuiOption]{margin-inline-start:calc(-1 * var(--t-option-padding-inline));margin-inline-end:calc(-1 * var(--t-option-padding-inline))}.t-dropdown-mobile{touch-action:none;visibility:hidden}.t-dropdown-mobile *{touch-action:inherit;visibility:inherit}.t-dropdown-mobile tui-root{visibility:visible}.t-dropdown-mobile tui-root .t-root-content,.t-dropdown-mobile tui-root tui-dialogs{visibility:hidden}\n"], dependencies: [{ kind: "directive", type: PolymorpheusOutlet, selector: "[polymorpheusOutlet]", inputs: ["polymorpheusOutlet", "polymorpheusOutletContext"] }, { kind: "directive", type: TuiSwipe, selector: "[tuiSwipe]", outputs: ["tuiSwipe"] }, { kind: "directive", type: i3.WaIntersectionObserverDirective, selector: "[waIntersectionObserver]", inputs: ["waIntersectionRootMargin", "waIntersectionThreshold"], exportAs: ["IntersectionObserver"] }, { kind: "directive", type: i3.WaIntersectionObservee, selector: "[waIntersectionObservee]", outputs: ["waIntersectionObservee"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush, encapsulation: i0.ViewEncapsulation.None }); }
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"taiga-ui-addon-mobile-directives-dropdown-mobile.mjs","sources":["../../../projects/addon-mobile/directives/dropdown-mobile/dropdown-mobile.directive.ts","../../../projects/addon-mobile/directives/dropdown-mobile/dropdown-mobile.component.ts","../../../projects/addon-mobile/directives/dropdown-mobile/dropdown-mobile.template.html","../../../projects/addon-mobile/directives/dropdown-mobile/taiga-ui-addon-mobile-directives-dropdown-mobile.ts"],"sourcesContent":["import {Directive, inject, Input} from '@angular/core';\nimport {TUI_IS_MOBILE} from '@taiga-ui/cdk/tokens';\nimport {tuiIsHTMLElement} from '@taiga-ui/cdk/utils/dom';\nimport {TUI_DROPDOWN_COMPONENT} from '@taiga-ui/core/directives/dropdown';\n\nimport {TuiDropdownMobileComponent} from './dropdown-mobile.component';\n\n@Directive({\n standalone: true,\n selector: '[tuiDropdownMobile]',\n providers: [\n {\n provide: TUI_DROPDOWN_COMPONENT,\n useFactory: () =>\n inject(TUI_IS_MOBILE)\n ? TuiDropdownMobileComponent\n : inject(TUI_DROPDOWN_COMPONENT, {skipSelf: true}),\n },\n ],\n host: {\n '[style.visibility]': '\"visible\"',\n '(mousedown)': 'onMouseDown($event)',\n },\n})\nexport class TuiDropdownMobile {\n private readonly isMobile = inject(TUI_IS_MOBILE);\n\n @Input()\n public tuiDropdownMobile = '';\n\n protected onMouseDown(event: MouseEvent): void {\n if (\n !this.isMobile ||\n !tuiIsHTMLElement(event.target) ||\n !event.target.matches('input,textarea') ||\n this.tuiDropdownMobile\n ) {\n return;\n }\n\n event.preventDefault();\n event.target.focus({preventScroll: true});\n }\n}\n","import {DOCUMENT} from '@angular/common';\nimport {\n type AfterViewInit,\n ChangeDetectionStrategy,\n Component,\n inject,\n type OnDestroy,\n ViewEncapsulation,\n} from '@angular/core';\nimport {WaIntersectionObserver} from '@ng-web-apis/intersection-observer';\nimport {TuiKeyboardService} from '@taiga-ui/addon-mobile/services';\nimport {TuiActiveZone} from '@taiga-ui/cdk/directives/active-zone';\nimport {TuiAnimated} from '@taiga-ui/cdk/directives/animated';\nimport {TuiSwipe, type TuiSwipeEvent} from '@taiga-ui/cdk/directives/swipe';\nimport {tuiInjectElement, tuiIsElement} from '@taiga-ui/cdk/utils/dom';\nimport {tuiGetNativeFocused} from '@taiga-ui/cdk/utils/focus';\nimport {tuiPx} from '@taiga-ui/cdk/utils/miscellaneous';\nimport {TuiDropdownDirective} from '@taiga-ui/core/directives/dropdown';\nimport {PolymorpheusOutlet} from '@taiga-ui/polymorpheus';\n\nimport {TuiDropdownMobile} from './dropdown-mobile.directive';\n\nconst GAP = 16;\n\n@Component({\n selector: 'tui-dropdown-mobile',\n imports: [PolymorpheusOutlet, TuiSwipe, WaIntersectionObserver],\n templateUrl: './dropdown-mobile.template.html',\n styleUrls: ['./dropdown-mobile.style.less'],\n encapsulation: ViewEncapsulation.None,\n changeDetection: ChangeDetectionStrategy.OnPush,\n hostDirectives: [TuiActiveZone, TuiAnimated],\n host: {\n '[class._sheet]': 'directive.tuiDropdownMobile',\n '(document:click.zoneless.capture)': 'onClick($event)',\n '(window>scroll.zoneless.capture)':\n 'refresh($event.currentTarget.visualViewport)',\n '(visualViewport>resize.zoneless)': 'refresh($event.target)',\n '(visualViewport>scroll.zoneless)': 'refresh($event.target)',\n },\n})\nexport class TuiDropdownMobileComponent implements OnDestroy, AfterViewInit {\n private readonly el = tuiInjectElement();\n private readonly keyboard = inject(TuiKeyboardService);\n private readonly doc = inject(DOCUMENT);\n private readonly scrollTop = this.doc.documentElement.scrollTop;\n private readonly observer = new ResizeObserver(\n () =>\n this.doc.defaultView?.visualViewport &&\n this.refresh(this.doc.defaultView.visualViewport),\n );\n\n protected readonly directive = inject(TuiDropdownMobile);\n protected readonly dropdown = inject(TuiDropdownDirective);\n\n constructor() {\n this.observer.observe(this.dropdown.el);\n this.doc.documentElement.style.setProperty('scroll-behavior', 'initial');\n }\n\n public ngAfterViewInit(): void {\n this.el.scrollTop = this.directive.tuiDropdownMobile ? this.el.clientHeight : 0;\n }\n\n public ngOnDestroy(): void {\n this.observer.disconnect();\n this.doc.body.classList.remove('t-dropdown-mobile');\n this.doc.body.style.removeProperty('--t-root-top');\n this.doc.documentElement.scrollTop = this.scrollTop;\n this.doc.documentElement.style.removeProperty('scroll-behavior');\n\n if (this.focused) {\n this.keyboard.hide();\n }\n }\n\n protected readonly close = (): void => this.dropdown.toggle(false);\n\n protected onClick(event: MouseEvent): void {\n if (\n tuiIsElement(event.target) &&\n !this.el.contains(event.target) &&\n (!this.dropdown.el.contains(event.target) ||\n event.target.matches('input,textarea'))\n ) {\n event.stopPropagation();\n }\n }\n\n protected onSwipe({direction}: TuiSwipeEvent, el: HTMLElement): void {\n if (\n direction === 'bottom' &&\n el.getBoundingClientRect().bottom > Number(this.doc.defaultView?.innerHeight)\n ) {\n this.close();\n }\n }\n\n protected onIntersection({isIntersecting}: IntersectionObserverEntry): void {\n if (isIntersecting) {\n this.close();\n }\n }\n\n protected refresh({offsetTop, height}: VisualViewport): void {\n this.doc.body.style.removeProperty('--t-root-top');\n\n if (\n !this.focused ||\n this.directive.tuiDropdownMobile ||\n !this.doc.documentElement.style.getPropertyValue('scroll-behavior')\n ) {\n return;\n }\n\n this.doc.documentElement.scrollTop = 0;\n\n const rect = this.dropdown.el.getBoundingClientRect();\n const topMargin = `max(var(--tui-dropdown-mobile-offset, ${tuiPx(GAP)}), env(safe-area-inset-top))`;\n const offset = `(${topMargin} + ${tuiPx(rect.height + GAP)})`;\n\n this.el.style.setProperty('top', `calc(${tuiPx(offsetTop)} + ${offset})`);\n this.el.style.setProperty('height', `calc(${tuiPx(height)} - ${offset})`);\n\n this.doc.body.classList.add('t-dropdown-mobile');\n this.doc.body.style.setProperty(\n '--t-root-top',\n `calc(${tuiPx(offsetTop - rect.top)} + ${topMargin})`,\n );\n }\n\n private get focused(): boolean {\n return this.dropdown.el.contains(tuiGetNativeFocused(this.doc));\n }\n}\n","@if (directive.tuiDropdownMobile) {\n <div\n waIntersectionObserver\n waIntersectionThreshold=\"1\"\n class=\"t-filler\"\n (touchstart.prevent)=\"close()\"\n (waIntersectionObservee)=\"$event[0] && onIntersection($event[0])\"\n ></div>\n}\n<div\n #container\n class=\"t-container\"\n (tuiSwipe)=\"onSwipe($event, container)\"\n>\n @if (directive.tuiDropdownMobile) {\n <h2 class=\"t-heading\">\n {{ directive.tuiDropdownMobile }}\n </h2>\n }\n <div class=\"t-content\">\n <ng-container *polymorpheusOutlet=\"dropdown._content() as text; context: {$implicit: close}\">\n {{ text }}\n </ng-container>\n </div>\n</div>\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './index';\n"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;MAwBa,iBAAiB,CAAA;AAjB9B,IAAA,WAAA,GAAA;AAkBqB,QAAA,IAAA,CAAA,QAAQ,GAAG,MAAM,CAAC,aAAa,CAAC;QAG1C,IAAiB,CAAA,iBAAA,GAAG,EAAE;AAehC;AAba,IAAA,WAAW,CAAC,KAAiB,EAAA;QACnC,IACI,CAAC,IAAI,CAAC,QAAQ;AACd,YAAA,CAAC,gBAAgB,CAAC,KAAK,CAAC,MAAM,CAAC;AAC/B,YAAA,CAAC,KAAK,CAAC,M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A,WAAA,EAAA,IAAA,EAAA,EAAA,CAAA,sBAAA,EAAA,QAAA,EAAA,0BAAA,EAAA,OAAA,EAAA,CAAA,wBAAA,CAAA,EAAA,CAAA,EAAA,eAAA,EAAA,EAAA,CAAA,uBAAA,CAAA,MAAA,EAAA,aAAA,EAAA,EAAA,CAAA,iBAAA,CAAA,IAAA,EAAA,CAAA,CAAA;;4FAe7B,0BAA0B,EAAA,UAAA,EAAA,CAAA;kBAjBtC,SAAS;+BACI,qBAAqB,EAAA,OAAA,EACtB,CAAC,kBAAkB,EAAE,QAAQ,EAAE,sBAAsB,CAAC,EAAA,aAAA,EAGhD,iBAAiB,CAAC,IAAI,EACpB,eAAA,EAAA,uBAAuB,CAAC,MAAM,EAAA,cAAA,EAC/B,CAAC,aAAa,EAAE,WAAW,CAAC,EACtC,IAAA,EAAA;AACF,wBAAA,gBAAgB,EAAE,6BAA6B;AAC/C,wBAAA,mCAAmC,EAAE,iBAAiB;AACtD,wBAAA,kCAAkC,EAC9B,8CAA8C;AAClD,wBAAA,kCAAkC,EAAE,wBAAwB;AAC5D,wBAAA,kCAAkC,EAAE,wBAAwB;AAC/D,qBAAA,EAAA,QAAA,EAAA,2tBAAA,EAAA,MAAA,EAAA,CAAA,6hHAAA,CAAA,EAAA;;;AEvCL;;AAEG;;;;"}
|
|
1
|
+
{"version":3,"file":"taiga-ui-addon-mobile-directives-dropdown-mobile.mjs","sources":["../../../projects/addon-mobile/directives/dropdown-mobile/dropdown-mobile.directive.ts","../../../projects/addon-mobile/directives/dropdown-mobile/dropdown-mobile.component.ts","../../../projects/addon-mobile/directives/dropdown-mobile/dropdown-mobile.template.html","../../../projects/addon-mobile/directives/dropdown-mobile/taiga-ui-addon-mobile-directives-dropdown-mobile.ts"],"sourcesContent":["import {Directive, inject, Input} from '@angular/core';\nimport {TUI_IS_MOBILE} from '@taiga-ui/cdk/tokens';\nimport {tuiIsHTMLElement} from '@taiga-ui/cdk/utils/dom';\nimport {TUI_DROPDOWN_COMPONENT} from '@taiga-ui/core/directives/dropdown';\n\nimport {TuiDropdownMobileComponent} from './dropdown-mobile.component';\n\n@Directive({\n standalone: true,\n selector: '[tuiDropdownMobile]',\n providers: [\n {\n provide: TUI_DROPDOWN_COMPONENT,\n useFactory: () =>\n inject(TUI_IS_MOBILE)\n ? TuiDropdownMobileComponent\n : inject(TUI_DROPDOWN_COMPONENT, {skipSelf: true}),\n },\n ],\n host: {\n '[style.visibility]': '\"visible\"',\n '(mousedown)': 'onMouseDown($event)',\n },\n})\nexport class TuiDropdownMobile {\n private readonly isMobile = inject(TUI_IS_MOBILE);\n\n @Input()\n public tuiDropdownMobile = '';\n\n protected onMouseDown(event: MouseEvent): void {\n if (\n !this.isMobile ||\n !tuiIsHTMLElement(event.target) ||\n !event.target.matches('input,textarea') ||\n this.tuiDropdownMobile\n ) {\n return;\n }\n\n event.preventDefault();\n event.target.focus({preventScroll: true});\n }\n}\n","import {DOCUMENT} from '@angular/common';\nimport {\n type AfterViewInit,\n ChangeDetectionStrategy,\n Component,\n inject,\n type OnDestroy,\n ViewEncapsulation,\n} from '@angular/core';\nimport {WaIntersectionObserver} from '@ng-web-apis/intersection-observer';\nimport {TuiKeyboardService} from '@taiga-ui/addon-mobile/services';\nimport {TuiActiveZone} from '@taiga-ui/cdk/directives/active-zone';\nimport {TuiAnimated} from '@taiga-ui/cdk/directives/animated';\nimport {TuiSwipe, type TuiSwipeEvent} from '@taiga-ui/cdk/directives/swipe';\nimport {tuiInjectElement, tuiIsElement} from '@taiga-ui/cdk/utils/dom';\nimport {tuiGetFocused} from '@taiga-ui/cdk/utils/focus';\nimport {tuiPx} from '@taiga-ui/cdk/utils/miscellaneous';\nimport {TuiDropdownDirective} from '@taiga-ui/core/directives/dropdown';\nimport {PolymorpheusOutlet} from '@taiga-ui/polymorpheus';\n\nimport {TuiDropdownMobile} from './dropdown-mobile.directive';\n\nconst GAP = 16;\n\n@Component({\n selector: 'tui-dropdown-mobile',\n imports: [PolymorpheusOutlet, TuiSwipe, WaIntersectionObserver],\n templateUrl: './dropdown-mobile.template.html',\n styleUrls: ['./dropdown-mobile.style.less'],\n encapsulation: ViewEncapsulation.None,\n changeDetection: ChangeDetectionStrategy.OnPush,\n hostDirectives: [TuiActiveZone, TuiAnimated],\n host: {\n '[class._sheet]': 'directive.tuiDropdownMobile',\n '(document:click.zoneless.capture)': 'onClick($event)',\n '(window>scroll.zoneless.capture)':\n 'refresh($event.currentTarget.visualViewport)',\n '(visualViewport>resize.zoneless)': 'refresh($event.target)',\n '(visualViewport>scroll.zoneless)': 'refresh($event.target)',\n },\n})\nexport class TuiDropdownMobileComponent implements OnDestroy, AfterViewInit {\n private readonly el = tuiInjectElement();\n private readonly keyboard = inject(TuiKeyboardService);\n private readonly doc = inject(DOCUMENT);\n private readonly scrollTop = this.doc.documentElement.scrollTop;\n private readonly observer = new ResizeObserver(\n () =>\n this.doc.defaultView?.visualViewport &&\n this.refresh(this.doc.defaultView.visualViewport),\n );\n\n protected readonly directive = inject(TuiDropdownMobile);\n protected readonly dropdown = inject(TuiDropdownDirective);\n\n constructor() {\n this.observer.observe(this.dropdown.el);\n this.doc.documentElement.style.setProperty('scroll-behavior', 'initial');\n }\n\n public ngAfterViewInit(): void {\n this.el.scrollTop = this.directive.tuiDropdownMobile ? this.el.clientHeight : 0;\n }\n\n public ngOnDestroy(): void {\n this.observer.disconnect();\n this.doc.body.classList.remove('t-dropdown-mobile');\n this.doc.body.style.removeProperty('--t-root-top');\n this.doc.documentElement.scrollTop = this.scrollTop;\n this.doc.documentElement.style.removeProperty('scroll-behavior');\n\n if (this.focused) {\n this.keyboard.hide();\n }\n }\n\n protected readonly close = (): void => this.dropdown.toggle(false);\n\n protected onClick(event: MouseEvent): void {\n if (\n tuiIsElement(event.target) &&\n !this.el.contains(event.target) &&\n (!this.dropdown.el.contains(event.target) ||\n event.target.matches('input,textarea'))\n ) {\n event.stopPropagation();\n }\n }\n\n protected onSwipe({direction}: TuiSwipeEvent, el: HTMLElement): void {\n if (\n direction === 'bottom' &&\n el.getBoundingClientRect().bottom > Number(this.doc.defaultView?.innerHeight)\n ) {\n this.close();\n }\n }\n\n protected onIntersection({isIntersecting}: IntersectionObserverEntry): void {\n if (isIntersecting) {\n this.close();\n }\n }\n\n protected refresh({offsetTop, height}: VisualViewport): void {\n this.doc.body.style.removeProperty('--t-root-top');\n\n if (\n !this.focused ||\n this.directive.tuiDropdownMobile ||\n !this.doc.documentElement.style.getPropertyValue('scroll-behavior')\n ) {\n return;\n }\n\n this.doc.documentElement.scrollTop = 0;\n\n const rect = this.dropdown.el.getBoundingClientRect();\n const topMargin = `max(var(--tui-dropdown-mobile-offset, ${tuiPx(GAP)}), env(safe-area-inset-top))`;\n const offset = `(${topMargin} + ${tuiPx(rect.height + GAP)})`;\n\n this.el.style.setProperty('top', `calc(${tuiPx(offsetTop)} + ${offset})`);\n this.el.style.setProperty('height', `calc(${tuiPx(height)} - ${offset})`);\n\n this.doc.body.classList.add('t-dropdown-mobile');\n this.doc.body.style.setProperty(\n '--t-root-top',\n `calc(${tuiPx(offsetTop - rect.top)} + ${topMargin})`,\n );\n }\n\n private get focused(): boolean {\n return this.dropdown.el.contains(tuiGetFocused(this.doc));\n }\n}\n","@if (directive.tuiDropdownMobile) {\n <div\n waIntersectionObserver\n waIntersectionThreshold=\"1\"\n class=\"t-filler\"\n (touchstart.prevent)=\"close()\"\n (waIntersectionObservee)=\"$event[0] && onIntersection($event[0])\"\n ></div>\n}\n<div\n #container\n class=\"t-container\"\n (tuiSwipe)=\"onSwipe($event, container)\"\n>\n @if (directive.tuiDropdownMobile) {\n <h2 class=\"t-heading\">\n {{ directive.tuiDropdownMobile }}\n </h2>\n }\n <div class=\"t-content\">\n <ng-container *polymorpheusOutlet=\"dropdown._content() as text; context: {$implicit: close}\">\n {{ text }}\n </ng-container>\n </div>\n</div>\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './index';\n"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;MAwBa,iBAAiB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ulation, Component, inject, DestroyRef, Input, Directive } from '@angular/core';
|
|
4
4
|
import { takeUntilDestroyed } from '@angular/core/rxjs-interop';
|
|
5
|
-
import { tuiTypedFromEvent } from '@taiga-ui/cdk/observables';
|
|
6
5
|
import { tuiIsHTMLElement } from '@taiga-ui/cdk/utils/dom';
|
|
7
6
|
import { tuiWithStyles, tuiPx } from '@taiga-ui/cdk/utils/miscellaneous';
|
|
8
7
|
import { TUI_ANIMATIONS_SPEED } from '@taiga-ui/core/tokens';
|
|
9
8
|
import { tuiGetDuration } from '@taiga-ui/core/utils/miscellaneous';
|
|
10
|
-
import { merge, race, switchMap, first, tap } from 'rxjs';
|
|
9
|
+
import { merge, fromEvent, race, switchMap, first, tap } from 'rxjs';
|
|
11
10
|
|
|
12
|
-
const
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
},
|
|
17
|
-
{
|
|
18
|
-
opacity: '0.12',
|
|
19
|
-
},
|
|
20
|
-
];
|
|
21
|
-
const FROM_KEYFRAMES = [
|
|
22
|
-
{
|
|
23
|
-
opacity: '0.12',
|
|
24
|
-
},
|
|
25
|
-
{
|
|
26
|
-
opacity: '0',
|
|
27
|
-
},
|
|
28
|
-
];
|
|
29
|
-
class TuiRippleStyles {
|
|
30
|
-
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.2.15", ngImport: i0, type: TuiRippleStyles, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
|
|
31
|
-
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "19.2.15", type: TuiRippleStyles, isStandalone: true, selector: "ng-component", host: { classAttribute: "tui-ripple-styles" }, ngImport: i0, template: '', isInline: true, styles: [".tui-ripple{position:absolute;z-index:100;opacity:.12;border-radius:100%;background:var(--tui-ripple-background, currentColor);animation-fill-mode:forwards;pointer-events:none}\n"], changeDetection: i0.ChangeDetectionStrategy.OnPush, encapsulation: i0.ViewEncapsulation.None }); }
|
|
11
|
+
const TO = [{ transform: 'scale(0)', opacity: '0.12' }, { opacity: '0.12' }];
|
|
12
|
+
const FROM = [{ opacity: '0.12' }, { opacity: '0' }];
|
|
13
|
+
class Styles {
|
|
14
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.2.15", ngImport: i0, type: Styles, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
|
|
15
|
+
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "19.2.15", type: Styles, isStandalone: true, selector: "ng-component", host: { classAttribute: "tui-ripple" }, ngImport: i0, template: '', isInline: true, styles: [".tui-ripple{position:absolute;z-index:100;opacity:.12;border-radius:100%;background:var(--tui-ripple-background, currentColor);animation-fill-mode:forwards;pointer-events:none}\n"], changeDetection: i0.ChangeDetectionStrategy.OnPush, encapsulation: i0.ViewEncapsulation.None }); }
|
|
32
16
|
}
|
|
33
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.15", ngImport: i0, type:
|
|
17
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.15", ngImport: i0, type: Styles, decorators: [{
|
|
34
18
|
type: Component,
|
|
35
|
-
args: [{
|
|
36
|
-
class: 'tui-ripple-styles',
|
|
37
|
-
}, styles: [".tui-ripple{position:absolute;z-index:100;opacity:.12;border-radius:100%;background:var(--tui-ripple-background, currentColor);animation-fill-mode:forwards;pointer-events:none}\n"] }]
|
|
19
|
+
args: [{ template: '', encapsulation: ViewEncapsulation.None, changeDetection: ChangeDetectionStrategy.OnPush, host: { class: 'tui-ripple' }, styles: [".tui-ripple{position:absolute;z-index:100;opacity:.12;border-radius:100%;background:var(--tui-ripple-background, currentColor);animation-fill-mode:forwards;pointer-events:none}\n"] }]
|
|
38
20
|
}] });
|
|
39
21
|
class TuiRipple {
|
|
40
22
|
constructor() {
|
|
41
23
|
this.doc = inject(DOCUMENT);
|
|
42
24
|
this.destroyRef = inject(DestroyRef);
|
|
43
|
-
this.
|
|
44
|
-
|
|
45
|
-
};
|
|
46
|
-
this.nothing = tuiWithStyles(TuiRippleStyles);
|
|
25
|
+
this.duration = tuiGetDuration(inject(TUI_ANIMATIONS_SPEED));
|
|
26
|
+
this.nothing = tuiWithStyles(Styles);
|
|
47
27
|
this.tuiRipple = '';
|
|
48
28
|
}
|
|
49
29
|
start(x, y, target, el) {
|
|
@@ -52,11 +32,11 @@ class TuiRipple {
|
|
|
52
32
|
return;
|
|
53
33
|
}
|
|
54
34
|
const ripple = this.createRipple(x, y, element.getBoundingClientRect());
|
|
55
|
-
const touchEnd$ = merge(
|
|
35
|
+
const touchEnd$ = merge(fromEvent(element, 'pointerup'), fromEvent(element, 'pointercancel'), fromEvent(element, 'pointermove'));
|
|
56
36
|
element.appendChild(ripple);
|
|
57
|
-
const
|
|
58
|
-
race(touchEnd$.pipe(switchMap(() =>
|
|
59
|
-
.pipe(first(), switchMap(() =>
|
|
37
|
+
const animationEnd$ = fromEvent(ripple.animate(TO, this.duration), 'finish');
|
|
38
|
+
race(touchEnd$.pipe(switchMap(() => animationEnd$)), animationEnd$.pipe(switchMap(() => touchEnd$)))
|
|
39
|
+
.pipe(first(), switchMap(() => fromEvent(ripple.animate(FROM, this.duration), 'finish')), first(), tap(() => element.removeChild(ripple)), takeUntilDestroyed(this.destroyRef))
|
|
60
40
|
.subscribe();
|
|
61
41
|
}
|
|
62
42
|
createRipple(clientX, clientY, { width, height, top, left }) {
|
|
@@ -86,7 +66,6 @@ class TuiRipple {
|
|
|
86
66
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.15", ngImport: i0, type: TuiRipple, decorators: [{
|
|
87
67
|
type: Directive,
|
|
88
68
|
args: [{
|
|
89
|
-
standalone: true,
|
|
90
69
|
selector: '[tuiRipple]',
|
|
91
70
|
host: {
|
|
92
71
|
'(pointerdown.zoneless)': 'start($event.clientX, $event.clientY, $event.target, $event.currentTarget)',
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"taiga-ui-addon-mobile-directives-ripple.mjs","sources":["../../../projects/addon-mobile/directives/ripple/ripple.directive.ts","../../../projects/addon-mobile/directives/ripple/taiga-ui-addon-mobile-directives-ripple.ts"],"sourcesContent":["import {DOCUMENT} from '@angular/common';\nimport {\n ChangeDetectionStrategy,\n Component,\n DestroyRef,\n Directive,\n inject,\n Input,\n ViewEncapsulation,\n} from '@angular/core';\nimport {takeUntilDestroyed} from '@angular/core/rxjs-interop';\nimport {
|
|
1
|
+
{"version":3,"file":"taiga-ui-addon-mobile-directives-ripple.mjs","sources":["../../../projects/addon-mobile/directives/ripple/ripple.directive.ts","../../../projects/addon-mobile/directives/ripple/taiga-ui-addon-mobile-directives-ripple.ts"],"sourcesContent":["import {DOCUMENT} from '@angular/common';\nimport {\n ChangeDetectionStrategy,\n Component,\n DestroyRef,\n Directive,\n inject,\n Input,\n ViewEncapsulation,\n} from '@angular/core';\nimport {takeUntilDestroyed} from '@angular/core/rxjs-interop';\nimport {tuiIsHTMLElement} from '@taiga-ui/cdk/utils/dom';\nimport {tuiPx, tuiWithStyles} from '@taiga-ui/cdk/utils/miscellaneous';\nimport {TUI_ANIMATIONS_SPEED} from '@taiga-ui/core/tokens';\nimport {tuiGetDuration} from '@taiga-ui/core/utils/miscellaneous';\nimport {first, fromEvent, merge, race, switchMap, tap} from 'rxjs';\n\nconst TO = [{transform: 'scale(0)', opacity: '0.12'}, {opacity: '0.12'}];\nconst FROM = [{opacity: '0.12'}, {opacity: '0'}];\n\n@Component({\n template: '',\n styleUrls: ['./ripple.style.less'],\n encapsulation: ViewEncapsulation.None,\n changeDetection: ChangeDetectionStrategy.OnPush,\n host: {class: 'tui-ripple'},\n})\nclass Styles {}\n\n@Directive({\n selector: '[tuiRipple]',\n host: {\n '(pointerdown.zoneless)':\n 'start($event.clientX, $event.clientY, $event.target, $event.currentTarget)',\n },\n})\nexport class TuiRipple {\n private readonly doc = inject(DOCUMENT);\n private readonly destroyRef = inject(DestroyRef);\n private readonly duration = tuiGetDuration(inject(TUI_ANIMATIONS_SPEED));\n\n protected readonly nothing = tuiWithStyles(Styles);\n\n @Input()\n public tuiRipple = '';\n\n protected start(x: number, y: number, target: HTMLElement, el: HTMLElement): void {\n const element = this.tuiRipple ? target.closest(this.tuiRipple) : el;\n\n if (!tuiIsHTMLElement(element)) {\n return;\n }\n\n const ripple = this.createRipple(x, y, element.getBoundingClientRect());\n const touchEnd$ = merge(\n fromEvent(element, 'pointerup'),\n fromEvent(element, 'pointercancel'),\n fromEvent(element, 'pointermove'),\n );\n\n element.appendChild(ripple);\n\n const animationEnd$ = fromEvent(ripple.animate(TO, this.duration), 'finish');\n\n race(\n touchEnd$.pipe(switchMap(() => animationEnd$)),\n animationEnd$.pipe(switchMap(() => touchEnd$)),\n )\n .pipe(\n first(),\n switchMap(() => fromEvent(ripple.animate(FROM, this.duration), 'finish')),\n first(),\n tap(() => element.removeChild(ripple)),\n takeUntilDestroyed(this.destroyRef),\n )\n .subscribe();\n }\n\n private createRipple(\n clientX: number,\n clientY: number,\n {width, height, top, left}: DOMRect,\n ): HTMLElement {\n const ripple: HTMLElement = this.doc.createElement('div');\n const radius = Math.sqrt(width * width + height * height);\n const dimension = radius * 2;\n const x = clientX - left - radius;\n const y = clientY - top - radius;\n\n Object.assign(ripple.style, {\n position: 'absolute',\n top: tuiPx(y),\n left: tuiPx(x),\n width: tuiPx(dimension),\n height: tuiPx(dimension),\n zIndex: 100,\n opacity: 0.12,\n borderRadius: '100%',\n background: 'var(--tui-ripple-background, currentColor)',\n animationFillMode: 'forwards',\n pointerEvents: 'none',\n });\n\n return ripple;\n }\n}\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './index';\n"],"names":[],"mappings":";;;;;;;;;;AAiBA,MAAM,EAAE,GAAG,CAAC,EAAC,SAAS,EAAE,UAAU,EAAE,OAAO,EAAE,MAAM,EAAC,EAAE,EAAC,OAAO,EAAE,MAAM,EAAC,CAAC;AACxE,MAAM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;AACP,oBAAA,QAAQ,EAAE,aAAa;AACvB,oBAAA,IAAI,EAAE;AACF,wBAAA,wBAAwB,EACpB,4EAA4E;AACnF,qBAAA;AACJ,iBAAA;8BASU,SAAS,EAAA,CAAA;sBADf;;;AC3CL;;AAEG;;;;"}
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { DOCUMENT } from '@angular/common';
|
|
2
2
|
import * as i0 from '@angular/core';
|
|
3
3
|
import { inject, Injectable } from '@angular/core';
|
|
4
|
-
import {
|
|
4
|
+
import { tuiGetFocused } from '@taiga-ui/cdk/utils/focus';
|
|
5
5
|
import { merge, fromEvent, filter } from 'rxjs';
|
|
6
6
|
|
|
7
7
|
class TuiKeyboardService {
|
|
@@ -25,7 +25,7 @@ class TuiKeyboardService {
|
|
|
25
25
|
}
|
|
26
26
|
}
|
|
27
27
|
hide() {
|
|
28
|
-
const focused =
|
|
28
|
+
const focused = tuiGetFocused(this.doc);
|
|
29
29
|
if (focused?.inputMode === undefined || this.element) {
|
|
30
30
|
return;
|
|
31
31
|
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"taiga-ui-addon-mobile-services.mjs","sources":["../../../projects/addon-mobile/services/keyboard.service.ts","../../../projects/addon-mobile/services/taiga-ui-addon-mobile-services.ts"],"sourcesContent":["import {DOCUMENT} from '@angular/common';\nimport {inject, Injectable, type OnDestroy} from '@angular/core';\nimport {
|
|
1
|
+
{"version":3,"file":"taiga-ui-addon-mobile-services.mjs","sources":["../../../projects/addon-mobile/services/keyboard.service.ts","../../../projects/addon-mobile/services/taiga-ui-addon-mobile-services.ts"],"sourcesContent":["import {DOCUMENT} from '@angular/common';\nimport {inject, Injectable, type OnDestroy} from '@angular/core';\nimport {tuiGetFocused} from '@taiga-ui/cdk/utils/focus';\nimport {filter, fromEvent, merge} from 'rxjs';\n\n@Injectable({\n providedIn: 'root',\n})\nexport class TuiKeyboardService implements OnDestroy {\n private readonly doc = inject(DOCUMENT);\n private readonly sub = merge(\n fromEvent(this.doc, 'focusout'),\n fromEvent(this.doc, 'mousedown').pipe(\n filter((e) => Object.is(e.target, this.element)),\n ),\n ).subscribe(() => {\n this.show();\n });\n\n private element?: ElementContentEditable;\n private inputMode = '';\n\n public ngOnDestroy(): void {\n this.sub.unsubscribe();\n this.show();\n }\n\n public toggle(): void {\n if (this.element) {\n this.show();\n } else {\n this.hide();\n }\n }\n\n public hide(): void {\n const focused = tuiGetFocused(this.doc) as HTMLInputElement;\n\n if (focused?.inputMode === undefined || this.element) {\n return;\n }\n\n this.element = focused;\n this.inputMode = focused.inputMode;\n focused.inputMode = 'none';\n }\n\n public show(): void {\n if (!this.element) {\n return;\n }\n\n this.element.inputMode = 'none';\n this.element.inputMode = this.inputMode;\n this.element = undefined;\n }\n}\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './index';\n"],"names":[],"mappings":";;;;;;MAQa,kBAAkB,CAAA;AAH/B,IAAA,WAAA,GAAA;AAIqB,QAAA,IAAA,CAAA,GAAG,GAAG,MAAM,CAAC,QAAQ,CAAC;QACtB,IAAG,CAAA,GAAA,GAAG,KAAK,CACxB,SAAS,CAAC,IAAI,CAAC,GAAG,EAAE,UAAU,CAAC,EAC/B,SAAS,CAAC,IAAI,CAAC,GAAG,EAAE,WAAW,CAAC,CAAC,IAAI,CACjC,MAAM,CAAC,CAAC,CAAC,KAAK,MAAM,CAAC,EAAE,CAAC,CAAC,CAAC,MAAM,EAAE,IAAI,CAAC,OAAO,CAAC,CAAC,CACnD,CACJ,CAAC,SAAS,CAAC,MAAK;YACb,IAAI,CAAC,IAAI,EAAE;AACf,SAAC,CAAC;QAGM,IAAS,CAAA,SAAA,GAAG,EAAE;AAoCzB;IAlCU,WAAW,GAAA;AACd,QAAA,IAAI,CAAC,GAAG,CAAC,WAAW,EAAE;QACtB,IAAI,CAAC,IAAI,EAAE;;IAGR,MAAM,GAAA;AACT,QAAA,IAAI,IAAI,CAAC,OAAO,EAAE;YACd,IAAI,CAAC,IAAI,EAAE;;aACR;YACH,IAAI,CAAC,IAAI,EAAE;;;IAIZ,IAAI,GAAA;QACP,MAAM,OAAO,GAAG,aAAa,CAAC,IAAI,CAAC,GAAG,CAAqB;QAE3D,IAAI,OAAO,EAAE,SAAS,KAAK,SAAS,IAAI,IAAI,CAAC,OAAO,EAAE;YAClD;;AAGJ,QAAA,IAAI,CAAC,OAAO,GAAG,OAAO;AACtB,QAAA,IAAI,CAAC,SAAS,GAAG,OAAO,CAAC,SAAS;AAClC,QAAA,OAAO,CAAC,SAAS,GAAG,MAAM;;IAGvB,IAAI,GAAA;AACP,QAAA,IAAI,CAAC,IAAI,CAAC,OAAO,EAAE;YACf;;AAGJ,QAAA,IAAI,CAAC,OAAO,CAAC,SAAS,GAAG,MAAM;QAC/B,IAAI,CAAC,OAAO,CAAC,SAAS,GAAG,IAAI,CAAC,SAAS;AACvC,QAAA,IAAI,CAAC,OAAO,GAAG,SAAS;;+GA9CnB,kBAAkB,EAAA,IAAA,EAAA,EAAA,EAAA,MAAA,EAAA,EAAA,CAAA,eAAA,CAAA,UAAA,EAAA,CAAA,CAAA;AAAlB,IAAA,SAAA,IAAA,CAAA,KAAA,GAAA,EAAA,CAAA,qBAAA,CAAA,EAAA,UAAA,EAAA,QAAA,EAAA,OAAA,EAAA,SAAA,EAAA,QAAA,EAAA,EAAA,EAAA,IAAA,EAAA,kBAAkB,cAFf,MAAM,EAAA,CAAA,CAAA;;4FAET,kBAAkB,EAAA,UAAA,EAAA,CAAA;kBAH9B,UAAU;AAAC,YAAA,IAAA,EAAA,CAAA;AACR,oBAAA,UAAU,EAAE,MAAM;AACrB,iBAAA;;;ACPD;;AAEG;;;;"}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@taiga-ui/addon-mobile",
|
|
3
|
-
"version": "4.52.0-canary.
|
|
3
|
+
"version": "4.52.0-canary.4d93c87",
|
|
4
4
|
"description": "Extension package for Taiga UI that adds support for mobile specific behaviors such as custom data pickers, dropdowns, etc.",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"angular",
|