@taiga-ui/addon-mobile 5.33.0-canary.ea8b5c8 → 5.34.0

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.
@@ -13,8 +13,9 @@ export interface TuiSheetDialogOptions<I = undefined> {
13
13
  /**
14
14
  * Address-bar (`<meta name="theme-color">`) color applied while the sheet is
15
15
  * open, matching the dimmed backdrop. Pass an empty string to leave the
16
- * address bar untouched (e.g. apps that manage `theme-color` themselves, or
16
+ * address bar untouched (e.g., apps that manage `theme-color` themselves or
17
17
  * need a value that tracks dark mode).
18
+ * @deprecated use provideTaiga({themeColors: [light, dark]}) instead, remove in v6
18
19
  */
19
20
  readonly themeColor: string;
20
21
  }
@@ -4,6 +4,7 @@ import { TuiSheetDialogComponent } from './sheet-dialog.component';
4
4
  import { type TuiSheetDialogOptions } from './sheet-dialog.options';
5
5
  import * as i0 from "@angular/core";
6
6
  export declare class TuiSheetDialogService extends TuiModalService<TuiSheetDialogOptions<any>> {
7
+ private readonly themeColors;
7
8
  private readonly meta;
8
9
  private initial;
9
10
  private count;
@@ -7,7 +7,7 @@ class TuiKeypad {
7
7
  this.columns = input(3);
8
8
  }
9
9
  static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.2.25", ngImport: i0, type: TuiKeypad, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
10
- static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.1.0", version: "19.2.25", type: TuiKeypad, isStandalone: true, selector: "tui-keypad", inputs: { columns: { classPropertyName: "columns", publicName: "columns", isSignal: true, isRequired: false, transformFunction: null } }, host: { attributes: { "data-tui-version": "5.33.0-canary.ea8b5c8" }, listeners: { "mousedown.zoneless.prevent": "(0)", "pointerdown.zoneless.prevent": "(0)" }, properties: { "style.--t-columns": "columns()" } }, ngImport: i0, template: '<ng-content />', isInline: true, styles: ["tui-keypad:where(*[data-tui-version=\"5.33.0-canary.ea8b5c8\"]){display:grid;grid-template-columns:repeat(var(--t-columns, 3),1fr);grid-auto-rows:4rem;place-items:center;inline-size:100%;max-inline-size:37.5rem;margin-inline:auto;font:600 1.75rem/1 var(--tui-typography-family-display);color:var(--tui-text-primary);-webkit-user-select:none;user-select:none}tui-keypad:where(*[data-tui-version=\"5.33.0-canary.ea8b5c8\"])>a,tui-keypad:where(*[data-tui-version=\"5.33.0-canary.ea8b5c8\"])>button{display:flex;box-sizing:border-box;align-items:center;justify-content:center;block-size:3.5rem;inline-size:3.5rem;max-inline-size:100%;border:none;border-radius:50%;background:transparent;font:inherit;color:inherit;text-decoration:none;cursor:pointer;transition:background var(--tui-duration) ease-out,scale var(--tui-duration) var(--tui-curve-expressive-entrance)}@media(hover:hover)and (pointer:fine){tui-keypad:where(*[data-tui-version=\"5.33.0-canary.ea8b5c8\"])>a:hover:not(:disabled),tui-keypad:where(*[data-tui-version=\"5.33.0-canary.ea8b5c8\"])>button:hover:not(:disabled){background:var(--tui-background-neutral-1-hover)}}tui-keypad:where(*[data-tui-version=\"5.33.0-canary.ea8b5c8\"])>a:active:not(:disabled),tui-keypad:where(*[data-tui-version=\"5.33.0-canary.ea8b5c8\"])>button:active:not(:disabled){background:var(--tui-background-neutral-1-pressed);scale:1.14}tui-keypad:where(*[data-tui-version=\"5.33.0-canary.ea8b5c8\"])>a:focus-visible,tui-keypad:where(*[data-tui-version=\"5.33.0-canary.ea8b5c8\"])>button:focus-visible{outline:.125rem solid var(--tui-border-focus);outline-offset:.125rem}tui-keypad:where(*[data-tui-version=\"5.33.0-canary.ea8b5c8\"])>a:disabled,tui-keypad:where(*[data-tui-version=\"5.33.0-canary.ea8b5c8\"])>button:disabled{opacity:var(--tui-disabled-opacity);cursor:default}\n"], changeDetection: i0.ChangeDetectionStrategy.OnPush, encapsulation: i0.ViewEncapsulation.None }); }
10
+ static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.1.0", version: "19.2.25", type: TuiKeypad, isStandalone: true, selector: "tui-keypad", inputs: { columns: { classPropertyName: "columns", publicName: "columns", isSignal: true, isRequired: false, transformFunction: null } }, host: { attributes: { "data-tui-version": "5.34.0" }, listeners: { "mousedown.zoneless.prevent": "(0)", "pointerdown.zoneless.prevent": "(0)" }, properties: { "style.--t-columns": "columns()" } }, ngImport: i0, template: '<ng-content />', isInline: true, styles: ["tui-keypad:where(*[data-tui-version=\"5.34.0\"]){display:grid;grid-template-columns:repeat(var(--t-columns, 3),1fr);grid-auto-rows:4rem;place-items:center;inline-size:100%;max-inline-size:37.5rem;margin-inline:auto;font:600 1.75rem/1 var(--tui-typography-family-display);color:var(--tui-text-primary);-webkit-user-select:none;user-select:none}tui-keypad:where(*[data-tui-version=\"5.34.0\"])>a,tui-keypad:where(*[data-tui-version=\"5.34.0\"])>button{display:flex;box-sizing:border-box;align-items:center;justify-content:center;block-size:3.5rem;inline-size:3.5rem;max-inline-size:100%;border:none;border-radius:50%;background:transparent;font:inherit;color:inherit;text-decoration:none;cursor:pointer;transition:background var(--tui-duration) ease-out,scale var(--tui-duration) var(--tui-curve-expressive-entrance)}@media(hover:hover)and (pointer:fine){tui-keypad:where(*[data-tui-version=\"5.34.0\"])>a:hover:not(:disabled),tui-keypad:where(*[data-tui-version=\"5.34.0\"])>button:hover:not(:disabled){background:var(--tui-background-neutral-1-hover)}}tui-keypad:where(*[data-tui-version=\"5.34.0\"])>a:active:not(:disabled),tui-keypad:where(*[data-tui-version=\"5.34.0\"])>button:active:not(:disabled){background:var(--tui-background-neutral-1-pressed);scale:1.14}tui-keypad:where(*[data-tui-version=\"5.34.0\"])>a:focus-visible,tui-keypad:where(*[data-tui-version=\"5.34.0\"])>button:focus-visible{outline:.125rem solid var(--tui-border-focus);outline-offset:.125rem}tui-keypad:where(*[data-tui-version=\"5.34.0\"])>a:disabled,tui-keypad:where(*[data-tui-version=\"5.34.0\"])>button:disabled{opacity:var(--tui-disabled-opacity);cursor:default}\n"], changeDetection: i0.ChangeDetectionStrategy.OnPush, encapsulation: i0.ViewEncapsulation.None }); }
11
11
  }
12
12
  i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.25", ngImport: i0, type: TuiKeypad, decorators: [{
13
13
  type: Component,
@@ -17,7 +17,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.25", ngImpo
17
17
  // Keep the driven field focused on tap: iOS needs mousedown, Android longtap needs pointerdown
18
18
  '(mousedown.zoneless.prevent)': '(0)',
19
19
  '(pointerdown.zoneless.prevent)': '(0)',
20
- }, styles: ["tui-keypad:where(*[data-tui-version=\"5.33.0-canary.ea8b5c8\"]){display:grid;grid-template-columns:repeat(var(--t-columns, 3),1fr);grid-auto-rows:4rem;place-items:center;inline-size:100%;max-inline-size:37.5rem;margin-inline:auto;font:600 1.75rem/1 var(--tui-typography-family-display);color:var(--tui-text-primary);-webkit-user-select:none;user-select:none}tui-keypad:where(*[data-tui-version=\"5.33.0-canary.ea8b5c8\"])>a,tui-keypad:where(*[data-tui-version=\"5.33.0-canary.ea8b5c8\"])>button{display:flex;box-sizing:border-box;align-items:center;justify-content:center;block-size:3.5rem;inline-size:3.5rem;max-inline-size:100%;border:none;border-radius:50%;background:transparent;font:inherit;color:inherit;text-decoration:none;cursor:pointer;transition:background var(--tui-duration) ease-out,scale var(--tui-duration) var(--tui-curve-expressive-entrance)}@media(hover:hover)and (pointer:fine){tui-keypad:where(*[data-tui-version=\"5.33.0-canary.ea8b5c8\"])>a:hover:not(:disabled),tui-keypad:where(*[data-tui-version=\"5.33.0-canary.ea8b5c8\"])>button:hover:not(:disabled){background:var(--tui-background-neutral-1-hover)}}tui-keypad:where(*[data-tui-version=\"5.33.0-canary.ea8b5c8\"])>a:active:not(:disabled),tui-keypad:where(*[data-tui-version=\"5.33.0-canary.ea8b5c8\"])>button:active:not(:disabled){background:var(--tui-background-neutral-1-pressed);scale:1.14}tui-keypad:where(*[data-tui-version=\"5.33.0-canary.ea8b5c8\"])>a:focus-visible,tui-keypad:where(*[data-tui-version=\"5.33.0-canary.ea8b5c8\"])>button:focus-visible{outline:.125rem solid var(--tui-border-focus);outline-offset:.125rem}tui-keypad:where(*[data-tui-version=\"5.33.0-canary.ea8b5c8\"])>a:disabled,tui-keypad:where(*[data-tui-version=\"5.33.0-canary.ea8b5c8\"])>button:disabled{opacity:var(--tui-disabled-opacity);cursor:default}\n"] }]
20
+ }, styles: ["tui-keypad:where(*[data-tui-version=\"5.34.0\"]){display:grid;grid-template-columns:repeat(var(--t-columns, 3),1fr);grid-auto-rows:4rem;place-items:center;inline-size:100%;max-inline-size:37.5rem;margin-inline:auto;font:600 1.75rem/1 var(--tui-typography-family-display);color:var(--tui-text-primary);-webkit-user-select:none;user-select:none}tui-keypad:where(*[data-tui-version=\"5.34.0\"])>a,tui-keypad:where(*[data-tui-version=\"5.34.0\"])>button{display:flex;box-sizing:border-box;align-items:center;justify-content:center;block-size:3.5rem;inline-size:3.5rem;max-inline-size:100%;border:none;border-radius:50%;background:transparent;font:inherit;color:inherit;text-decoration:none;cursor:pointer;transition:background var(--tui-duration) ease-out,scale var(--tui-duration) var(--tui-curve-expressive-entrance)}@media(hover:hover)and (pointer:fine){tui-keypad:where(*[data-tui-version=\"5.34.0\"])>a:hover:not(:disabled),tui-keypad:where(*[data-tui-version=\"5.34.0\"])>button:hover:not(:disabled){background:var(--tui-background-neutral-1-hover)}}tui-keypad:where(*[data-tui-version=\"5.34.0\"])>a:active:not(:disabled),tui-keypad:where(*[data-tui-version=\"5.34.0\"])>button:active:not(:disabled){background:var(--tui-background-neutral-1-pressed);scale:1.14}tui-keypad:where(*[data-tui-version=\"5.34.0\"])>a:focus-visible,tui-keypad:where(*[data-tui-version=\"5.34.0\"])>button:focus-visible{outline:.125rem solid var(--tui-border-focus);outline-offset:.125rem}tui-keypad:where(*[data-tui-version=\"5.34.0\"])>a:disabled,tui-keypad:where(*[data-tui-version=\"5.34.0\"])>button:disabled{opacity:var(--tui-disabled-opacity);cursor:default}\n"] }]
21
21
  }] });
22
22
 
23
23
  /**
@@ -1 +1 @@
1
- {"version":3,"file":"taiga-ui-addon-mobile-components-keypad.mjs","sources":["../../../projects/addon-mobile/components/keypad/keypad.component.ts","../../../projects/addon-mobile/components/keypad/taiga-ui-addon-mobile-components-keypad.ts"],"sourcesContent":["import {\n ChangeDetectionStrategy,\n Component,\n input,\n ViewEncapsulation,\n} from '@angular/core';\nimport {TUI_VERSION} from '@taiga-ui/cdk/constants';\n\n@Component({\n selector: 'tui-keypad',\n template: '<ng-content />',\n styles: `\n [data-tui-version='${TUI_VERSION}'] {\n @import './keypad.style.less';\n }\n `,\n encapsulation: ViewEncapsulation.None,\n changeDetection: ChangeDetectionStrategy.OnPush,\n host: {\n 'data-tui-version': TUI_VERSION,\n '[style.--t-columns]': 'columns()',\n // Keep the driven field focused on tap: iOS needs mousedown, Android longtap needs pointerdown\n '(mousedown.zoneless.prevent)': '(0)',\n '(pointerdown.zoneless.prevent)': '(0)',\n },\n})\nexport class TuiKeypad {\n public readonly columns = input(3);\n}\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './index';\n"],"names":[],"mappings":";;;;MA0Ba,SAAS,CAAA;AAlBtB,IAAA,WAAA,GAAA;AAmBoB,QAAA,IAAA,CAAA,OAAO,GAAG,KAAK,CAAC,CAAC,CAAC;AACrC,IAAA;+GAFY,SAAS,EAAA,IAAA,EAAA,EAAA,EAAA,MAAA,EAAA,EAAA,CAAA,eAAA,CAAA,SAAA,EAAA,CAAA,CAAA;AAAT,IAAA,SAAA,IAAA,CAAA,IAAA,GAAA,EAAA,CAAA,oBAAA,CAAA,EAAA,UAAA,EAAA,QAAA,EAAA,OAAA,EAAA,SAAA,EAAA,IAAA,EAAA,SAAS,oaAhBR,gBAAgB,EAAA,QAAA,EAAA,IAAA,EAAA,MAAA,EAAA,CAAA,sxDAAA,CAAA,EAAA,eAAA,EAAA,EAAA,CAAA,uBAAA,CAAA,MAAA,EAAA,aAAA,EAAA,EAAA,CAAA,iBAAA,CAAA,IAAA,EAAA,CAAA,CAAA;;4FAgBjB,SAAS,EAAA,UAAA,EAAA,CAAA;kBAlBrB,SAAS;+BACI,YAAY,EAAA,QAAA,EACZ,gBAAgB,EAAA,aAAA,EAMX,iBAAiB,CAAC,IAAI,EAAA,eAAA,EACpB,uBAAuB,CAAC,MAAM,EAAA,IAAA,EACzC;AACF,wBAAA,kBAAkB,EAAE,WAAW;AAC/B,wBAAA,qBAAqB,EAAE,WAAW;;AAElC,wBAAA,8BAA8B,EAAE,KAAK;AACrC,wBAAA,gCAAgC,EAAE,KAAK;AAC1C,qBAAA,EAAA,MAAA,EAAA,CAAA,sxDAAA,CAAA,EAAA;;;ACxBL;;AAEG;;;;"}
1
+ {"version":3,"file":"taiga-ui-addon-mobile-components-keypad.mjs","sources":["../../../projects/addon-mobile/components/keypad/keypad.component.ts","../../../projects/addon-mobile/components/keypad/taiga-ui-addon-mobile-components-keypad.ts"],"sourcesContent":["import {\n ChangeDetectionStrategy,\n Component,\n input,\n ViewEncapsulation,\n} from '@angular/core';\nimport {TUI_VERSION} from '@taiga-ui/cdk/constants';\n\n@Component({\n selector: 'tui-keypad',\n template: '<ng-content />',\n styles: `\n [data-tui-version='${TUI_VERSION}'] {\n @import './keypad.style.less';\n }\n `,\n encapsulation: ViewEncapsulation.None,\n changeDetection: ChangeDetectionStrategy.OnPush,\n host: {\n 'data-tui-version': TUI_VERSION,\n '[style.--t-columns]': 'columns()',\n // Keep the driven field focused on tap: iOS needs mousedown, Android longtap needs pointerdown\n '(mousedown.zoneless.prevent)': '(0)',\n '(pointerdown.zoneless.prevent)': '(0)',\n },\n})\nexport class TuiKeypad {\n public readonly columns = input(3);\n}\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './index';\n"],"names":[],"mappings":";;;;MA0Ba,SAAS,CAAA;AAlBtB,IAAA,WAAA,GAAA;AAmBoB,QAAA,IAAA,CAAA,OAAO,GAAG,KAAK,CAAC,CAAC,CAAC;AACrC,IAAA;+GAFY,SAAS,EAAA,IAAA,EAAA,EAAA,EAAA,MAAA,EAAA,EAAA,CAAA,eAAA,CAAA,SAAA,EAAA,CAAA,CAAA;AAAT,IAAA,SAAA,IAAA,CAAA,IAAA,GAAA,EAAA,CAAA,oBAAA,CAAA,EAAA,UAAA,EAAA,QAAA,EAAA,OAAA,EAAA,SAAA,EAAA,IAAA,EAAA,SAAS,qZAhBR,gBAAgB,EAAA,QAAA,EAAA,IAAA,EAAA,MAAA,EAAA,CAAA,inDAAA,CAAA,EAAA,eAAA,EAAA,EAAA,CAAA,uBAAA,CAAA,MAAA,EAAA,aAAA,EAAA,EAAA,CAAA,iBAAA,CAAA,IAAA,EAAA,CAAA,CAAA;;4FAgBjB,SAAS,EAAA,UAAA,EAAA,CAAA;kBAlBrB,SAAS;+BACI,YAAY,EAAA,QAAA,EACZ,gBAAgB,EAAA,aAAA,EAMX,iBAAiB,CAAC,IAAI,EAAA,eAAA,EACpB,uBAAuB,CAAC,MAAM,EAAA,IAAA,EACzC;AACF,wBAAA,kBAAkB,EAAE,WAAW;AAC/B,wBAAA,qBAAqB,EAAE,WAAW;;AAElC,wBAAA,8BAA8B,EAAE,KAAK;AACrC,wBAAA,gCAAgC,EAAE,KAAK;AAC1C,qBAAA,EAAA,MAAA,EAAA,CAAA,inDAAA,CAAA,EAAA;;;ACxBL;;AAEG;;;;"}
@@ -18,6 +18,7 @@ import * as i1$1 from '@taiga-ui/cdk/portals';
18
18
  import { tuiAsPortal, TuiPortalDirective } from '@taiga-ui/cdk/portals';
19
19
  import { Meta } from '@angular/platform-browser';
20
20
  import { TuiModalService } from '@taiga-ui/core/portals/modal';
21
+ import { TUI_OPTIONS } from '@taiga-ui/core/utils/miscellaneous';
21
22
  import { tuiCreateOptions } from '@taiga-ui/cdk/utils/di';
22
23
 
23
24
  class TuiSheetDialogClose {
@@ -97,7 +98,7 @@ class TuiSheetDialogComponent {
97
98
  return tops.concat(top)[Math.min(Math.max(index, 0), tops.length)] ?? 0;
98
99
  }
99
100
  static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.2.25", ngImport: i0, type: TuiSheetDialogComponent, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
100
- static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "19.2.25", type: TuiSheetDialogComponent, isStandalone: true, selector: "tui-sheet-dialog", host: { listeners: { "click.self": "close$.next()", "document:touchstart.passive.zoneless": "interacted = true", "tuiSheetDialogClose": "close$.next()", "wheel.passive.zoneless": "interacted = true" }, properties: { "attr.data-appearance": "context.appearance", "class._bar": "context.bar", "class._closeable": "context.closable", "style.--tui-offset.px": "context.offset" } }, viewQueries: [{ propertyName: "stops", predicate: ["stops"], descendants: true, read: ElementRef, isSignal: true }, { propertyName: "sheet", first: true, predicate: ["sheet"], descendants: true, read: ElementRef, isSignal: true }], hostDirectives: [{ directive: i1.TuiAnimated }, { directive: i2.TuiScrollRef }, { directive: TuiSheetDialogClose, outputs: ["tuiSheetDialogClose", "tuiSheetDialogClose"] }], 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-block-start]=\"stop\"\n ></div>\n }\n</div>\n<div\n #sheet\n class=\"t-sheet\"\n (waResizeObserver)=\"onResize()\"\n>\n <div class=\"t-bar\"></div>\n <div class=\"t-content\">\n @if (context.label) {\n <header\n [id]=\"context.id\"\n [innerHTML]=\"context.label\"\n ></header>\n }\n <ng-container *polymorpheusOutlet=\"context.content as text; context: context\">\n <div [innerHTML]=\"text\"></div>\n @if (context.closable) {\n <footer>\n <button\n tuiButton\n type=\"button\"\n (click)=\"context.$implicit.complete()\"\n >\n {{ context.data || 'OK' }}\n </button>\n </footer>\n }\n </ng-container>\n </div>\n</div>\n", styles: [":host{scrollbar-width:none;position:sticky;display:flex;inset-inline-start:0;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-typography-body-m);overflow-y:scroll;overscroll-behavior:none;scroll-snap-type:y mandatory;margin:max(var(--tui-offset),env(safe-area-inset-top)) auto 0;border-radius:.75rem .75rem 0 0;box-shadow:0 5rem var(--tui-background-elevation-1);--t-top: 0}:host::-webkit-scrollbar,:host::-webkit-scrollbar-thumb{display:none}@supports (-webkit-touch-callout: none){:host{overscroll-behavior:contain}}:host.tui-enter,:host.tui-leave{animation-name:tuiSlide;animation-timing-function:var(--tui-curve-expressive-exit)}:host.tui-enter{animation-duration:calc(var(--tui-duration) / 6 * 7);animation-timing-function:cubic-bezier(.1,.8,.5,1)}:host:before{position:fixed;inset-block-start:0;inset-inline-start:0;inline-size:100%;block-size:100%;content:\"\";z-index:-1}:host._bar{--t-top: 1.5rem}:host._bar .t-bar{display:block}:host._closeable{display:block}:host._closeable .t-stops{display:flex}:host[data-appearance~=fullscreen]{display:block}:host[data-appearance~=fullscreen] .t-sheet{min-block-size:100%}:host ::ng-deep tui-data-list[data-size]{padding:0}:host ::ng-deep tui-data-list[data-size] [tuiOption][data-size]{box-sizing:content-box;border-radius:0}.t-stops{display:none;block-size:100%;scroll-snap-stop:always;scroll-snap-align:start;pointer-events:none}.t-stop{position:relative;inset-block-start:env(safe-area-inset-bottom);scroll-snap-stop:normal;scroll-snap-align:start;block-size:1rem;inline-size:1rem}.t-sheet{display:flex;inline-size:100%;flex-direction:column;box-shadow:var(--tui-shadow-small);border-radius:inherit;padding:0 var(--tui-padding-inline);margin-block-start:auto;background:var(--tui-background-elevation-1);box-sizing:border-box;scroll-snap-stop:always;scroll-snap-align:start;--tui-padding-inline: 1rem}.t-bar{position:sticky;z-index:1;display:none;inset-block-start:0;block-size:1.5rem;margin:0 calc(-1 * var(--tui-padding-inline));border-radius:inherit;background:var(--tui-background-elevation-1)}.t-bar:after{position:absolute;left:50%;transform:translate(-50%);content:\"\";inset-block-start:.5rem;inline-size:2rem;block-size:.25rem;background:var(--tui-border-normal);border-radius:1rem}.t-content{position:relative;display:flex;flex-direction:column;flex-grow:1;border-radius:inherit;isolation:isolate;padding-block-end:max(1.5rem,env(safe-area-inset-bottom))}.t-content:after{content:\"\";position:relative;z-index:-1;display:block;inset-block-start:max(1.5rem,env(safe-area-inset-bottom));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}* ::ng-deep>header,* ::ng-deep>[tuiSlides]>*>header,* ::ng-deep>ng-component>header,* ::ng-deep>ng-component>[tuiSlides]>*>header{position:sticky;z-index:1;inset-block-start:var(--t-top);margin:0 calc(-1 * var(--tui-padding-inline));padding:.75rem var(--tui-padding-inline);border-radius:inherit;background:var(--tui-background-elevation-1);box-shadow:0 calc(-1 * var(--t-top)) var(--tui-background-elevation-1);font:var(--tui-typography-heading-h6)}* ::ng-deep>footer:not([tuiFloatingContainer]),* ::ng-deep>[tuiSlides]>*>footer:not([tuiFloatingContainer]),* ::ng-deep>ng-component>footer:not([tuiFloatingContainer]),* ::ng-deep>ng-component>[tuiSlides]>*>footer:not([tuiFloatingContainer]){display:flex;flex-direction:column-reverse;gap:.5rem;margin-block-start:1rem}:host-context(.tui-liquid-glass){border-radius:2.25rem 2.25rem 0 0}:host-context(.tui-liquid-glass)._bar{--t-top: 1rem}:host-context(.tui-liquid-glass) .t-bar{block-size:2.25rem;margin-block-end:-1.25rem;clip-path:inset(0 0 1.25rem)}\n"], dependencies: [{ kind: "directive", type: PolymorpheusOutlet, selector: "[polymorpheusOutlet]", inputs: ["polymorpheusOutlet", "polymorpheusOutletContext"] }, { kind: "directive", type: TuiButton, selector: "a[tuiButton],button[tuiButton],label[tuiButton],a[tuiIconButton],button[tuiIconButton],label[tuiIconButton]", inputs: ["size"] }, { kind: "directive", type: WaResizeObserver, selector: "[waResizeObserver]", inputs: ["waResizeBox"], outputs: ["waResizeObserver"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush }); }
101
+ static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "19.2.25", type: TuiSheetDialogComponent, isStandalone: true, selector: "tui-sheet-dialog", host: { attributes: { "data-zone-bottom": "var(--tui-background-elevation-1)" }, listeners: { "click.self": "close$.next()", "document:touchstart.passive.zoneless": "interacted = true", "tuiSheetDialogClose": "close$.next()", "wheel.passive.zoneless": "interacted = true" }, properties: { "attr.data-appearance": "context.appearance", "class._bar": "context.bar", "class._closeable": "context.closable", "style.--tui-offset.px": "context.offset" } }, viewQueries: [{ propertyName: "stops", predicate: ["stops"], descendants: true, read: ElementRef, isSignal: true }, { propertyName: "sheet", first: true, predicate: ["sheet"], descendants: true, read: ElementRef, isSignal: true }], hostDirectives: [{ directive: i1.TuiAnimated }, { directive: i2.TuiScrollRef }, { directive: TuiSheetDialogClose, outputs: ["tuiSheetDialogClose", "tuiSheetDialogClose"] }], 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-block-start]=\"stop\"\n ></div>\n }\n</div>\n<div\n #sheet\n class=\"t-sheet\"\n (waResizeObserver)=\"onResize()\"\n>\n <div class=\"t-bar\"></div>\n <div class=\"t-content\">\n @if (context.label) {\n <header\n [id]=\"context.id\"\n [innerHTML]=\"context.label\"\n ></header>\n }\n <ng-container *polymorpheusOutlet=\"context.content as text; context: context\">\n <div [innerHTML]=\"text\"></div>\n @if (context.closable) {\n <footer>\n <button\n tuiButton\n type=\"button\"\n (click)=\"context.$implicit.complete()\"\n >\n {{ context.data || 'OK' }}\n </button>\n </footer>\n }\n </ng-container>\n </div>\n</div>\n", styles: [":host{scrollbar-width:none;position:sticky;display:flex;inset-inline-start:0;inline-size:100%;max-inline-size:40.8125rem;block-size:calc(100% - max(var(--tui-offset),env(safe-area-inset-top)));flex-direction:column;font:var(--tui-typography-body-m);overflow-y:scroll;overscroll-behavior:none;scroll-snap-type:y mandatory;margin:max(var(--tui-offset),env(safe-area-inset-top)) auto 0;border-radius:.75rem .75rem 0 0;box-shadow:0 5rem var(--tui-background-elevation-1);--t-top: 0}:host::-webkit-scrollbar,:host::-webkit-scrollbar-thumb{display:none}@supports (-webkit-touch-callout: none){:host{overscroll-behavior:contain}}:host.tui-enter,:host.tui-leave{animation-name:tuiSlide;animation-timing-function:var(--tui-curve-expressive-exit)}:host.tui-enter{animation-duration:calc(var(--tui-duration) / 6 * 7);animation-timing-function:cubic-bezier(.1,.8,.5,1)}:host:before{position:fixed;inset-block-start:0;inset-inline-start:0;inline-size:100%;block-size:100%;content:\"\";z-index:-1}:host._bar{--t-top: 1.5rem}:host._bar .t-bar{display:block}:host._closeable{display:block}:host._closeable .t-stops{display:flex}:host[data-appearance~=fullscreen]{display:block}:host[data-appearance~=fullscreen] .t-sheet{min-block-size:100%}:host ::ng-deep tui-data-list[data-size]{padding:0}:host ::ng-deep tui-data-list[data-size] [tuiOption][data-size]{box-sizing:content-box;border-radius:0}.t-stops{display:none;block-size:100%;scroll-snap-stop:always;scroll-snap-align:start;pointer-events:none}.t-stop{position:relative;inset-block-start:env(safe-area-inset-bottom);scroll-snap-stop:normal;scroll-snap-align:start;block-size:1rem;inline-size:1rem}.t-sheet{display:flex;inline-size:100%;flex-direction:column;box-shadow:var(--tui-shadow-small);border-radius:inherit;padding:0 var(--tui-padding-inline);margin-block-start:auto;background:var(--tui-background-elevation-1);box-sizing:border-box;scroll-snap-stop:always;scroll-snap-align:start;--tui-padding-inline: 1rem}.t-bar{position:sticky;z-index:1;display:none;inset-block-start:0;block-size:1.5rem;margin:0 calc(-1 * var(--tui-padding-inline));border-radius:inherit;background:var(--tui-background-elevation-1)}.t-bar:after{position:absolute;left:50%;transform:translate(-50%);content:\"\";inset-block-start:.5rem;inline-size:2rem;block-size:.25rem;background:var(--tui-border-normal);border-radius:1rem}.t-content{position:relative;display:flex;flex-direction:column;flex-grow:1;border-radius:inherit;isolation:isolate;padding-block-end:max(1.5rem,env(safe-area-inset-bottom))}.t-content:after{content:\"\";position:relative;z-index:-1;display:block;inset-block-start:max(1.5rem,env(safe-area-inset-bottom));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}* ::ng-deep>header,* ::ng-deep>[tuiSlides]>*>header,* ::ng-deep>ng-component>header,* ::ng-deep>ng-component>[tuiSlides]>*>header{position:sticky;z-index:1;inset-block-start:var(--t-top);margin:0 calc(-1 * var(--tui-padding-inline));padding:.75rem var(--tui-padding-inline);border-radius:inherit;background:var(--tui-background-elevation-1);box-shadow:0 calc(-1 * var(--t-top)) var(--tui-background-elevation-1);font:var(--tui-typography-heading-h6)}* ::ng-deep>footer:not([tuiFloatingContainer]),* ::ng-deep>[tuiSlides]>*>footer:not([tuiFloatingContainer]),* ::ng-deep>ng-component>footer:not([tuiFloatingContainer]),* ::ng-deep>ng-component>[tuiSlides]>*>footer:not([tuiFloatingContainer]){display:flex;flex-direction:column-reverse;gap:.5rem;margin-block-start:1rem}:host-context(.tui-liquid-glass){border-radius:2.25rem 2.25rem 0 0}:host-context(.tui-liquid-glass)._bar{--t-top: 1rem}:host-context(.tui-liquid-glass) .t-bar{block-size:2.25rem;margin-block-end:-1.25rem;clip-path:inset(0 0 1.25rem)}\n"], dependencies: [{ kind: "directive", type: PolymorpheusOutlet, selector: "[polymorpheusOutlet]", inputs: ["polymorpheusOutlet", "polymorpheusOutletContext"] }, { kind: "directive", type: TuiButton, selector: "a[tuiButton],button[tuiButton],label[tuiButton],a[tuiIconButton],button[tuiIconButton],label[tuiIconButton]", inputs: ["size"] }, { kind: "directive", type: WaResizeObserver, selector: "[waResizeObserver]", inputs: ["waResizeBox"], outputs: ["waResizeObserver"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush }); }
101
102
  }
102
103
  i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.25", ngImport: i0, type: TuiSheetDialogComponent, decorators: [{
103
104
  type: Component,
@@ -106,6 +107,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.25", ngImpo
106
107
  TuiScrollRef,
107
108
  { directive: TuiSheetDialogClose, outputs: ['tuiSheetDialogClose'] },
108
109
  ], host: {
110
+ 'data-zone-bottom': 'var(--tui-background-elevation-1)',
109
111
  '[attr.data-appearance]': 'context.appearance',
110
112
  '[class._bar]': 'context.bar',
111
113
  '[class._closeable]': 'context.closable',
@@ -114,7 +116,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.25", ngImpo
114
116
  '(document:touchstart.passive.zoneless)': 'interacted = true',
115
117
  '(tuiSheetDialogClose)': 'close$.next()',
116
118
  '(wheel.passive.zoneless)': 'interacted = true',
117
- }, template: "<div class=\"t-stops\">\n @for (stop of context.stops; track stop) {\n <div\n #stops\n class=\"t-stop\"\n [style.margin-block-start]=\"stop\"\n ></div>\n }\n</div>\n<div\n #sheet\n class=\"t-sheet\"\n (waResizeObserver)=\"onResize()\"\n>\n <div class=\"t-bar\"></div>\n <div class=\"t-content\">\n @if (context.label) {\n <header\n [id]=\"context.id\"\n [innerHTML]=\"context.label\"\n ></header>\n }\n <ng-container *polymorpheusOutlet=\"context.content as text; context: context\">\n <div [innerHTML]=\"text\"></div>\n @if (context.closable) {\n <footer>\n <button\n tuiButton\n type=\"button\"\n (click)=\"context.$implicit.complete()\"\n >\n {{ context.data || 'OK' }}\n </button>\n </footer>\n }\n </ng-container>\n </div>\n</div>\n", styles: [":host{scrollbar-width:none;position:sticky;display:flex;inset-inline-start:0;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-typography-body-m);overflow-y:scroll;overscroll-behavior:none;scroll-snap-type:y mandatory;margin:max(var(--tui-offset),env(safe-area-inset-top)) auto 0;border-radius:.75rem .75rem 0 0;box-shadow:0 5rem var(--tui-background-elevation-1);--t-top: 0}:host::-webkit-scrollbar,:host::-webkit-scrollbar-thumb{display:none}@supports (-webkit-touch-callout: none){:host{overscroll-behavior:contain}}:host.tui-enter,:host.tui-leave{animation-name:tuiSlide;animation-timing-function:var(--tui-curve-expressive-exit)}:host.tui-enter{animation-duration:calc(var(--tui-duration) / 6 * 7);animation-timing-function:cubic-bezier(.1,.8,.5,1)}:host:before{position:fixed;inset-block-start:0;inset-inline-start:0;inline-size:100%;block-size:100%;content:\"\";z-index:-1}:host._bar{--t-top: 1.5rem}:host._bar .t-bar{display:block}:host._closeable{display:block}:host._closeable .t-stops{display:flex}:host[data-appearance~=fullscreen]{display:block}:host[data-appearance~=fullscreen] .t-sheet{min-block-size:100%}:host ::ng-deep tui-data-list[data-size]{padding:0}:host ::ng-deep tui-data-list[data-size] [tuiOption][data-size]{box-sizing:content-box;border-radius:0}.t-stops{display:none;block-size:100%;scroll-snap-stop:always;scroll-snap-align:start;pointer-events:none}.t-stop{position:relative;inset-block-start:env(safe-area-inset-bottom);scroll-snap-stop:normal;scroll-snap-align:start;block-size:1rem;inline-size:1rem}.t-sheet{display:flex;inline-size:100%;flex-direction:column;box-shadow:var(--tui-shadow-small);border-radius:inherit;padding:0 var(--tui-padding-inline);margin-block-start:auto;background:var(--tui-background-elevation-1);box-sizing:border-box;scroll-snap-stop:always;scroll-snap-align:start;--tui-padding-inline: 1rem}.t-bar{position:sticky;z-index:1;display:none;inset-block-start:0;block-size:1.5rem;margin:0 calc(-1 * var(--tui-padding-inline));border-radius:inherit;background:var(--tui-background-elevation-1)}.t-bar:after{position:absolute;left:50%;transform:translate(-50%);content:\"\";inset-block-start:.5rem;inline-size:2rem;block-size:.25rem;background:var(--tui-border-normal);border-radius:1rem}.t-content{position:relative;display:flex;flex-direction:column;flex-grow:1;border-radius:inherit;isolation:isolate;padding-block-end:max(1.5rem,env(safe-area-inset-bottom))}.t-content:after{content:\"\";position:relative;z-index:-1;display:block;inset-block-start:max(1.5rem,env(safe-area-inset-bottom));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}* ::ng-deep>header,* ::ng-deep>[tuiSlides]>*>header,* ::ng-deep>ng-component>header,* ::ng-deep>ng-component>[tuiSlides]>*>header{position:sticky;z-index:1;inset-block-start:var(--t-top);margin:0 calc(-1 * var(--tui-padding-inline));padding:.75rem var(--tui-padding-inline);border-radius:inherit;background:var(--tui-background-elevation-1);box-shadow:0 calc(-1 * var(--t-top)) var(--tui-background-elevation-1);font:var(--tui-typography-heading-h6)}* ::ng-deep>footer:not([tuiFloatingContainer]),* ::ng-deep>[tuiSlides]>*>footer:not([tuiFloatingContainer]),* ::ng-deep>ng-component>footer:not([tuiFloatingContainer]),* ::ng-deep>ng-component>[tuiSlides]>*>footer:not([tuiFloatingContainer]){display:flex;flex-direction:column-reverse;gap:.5rem;margin-block-start:1rem}:host-context(.tui-liquid-glass){border-radius:2.25rem 2.25rem 0 0}:host-context(.tui-liquid-glass)._bar{--t-top: 1rem}:host-context(.tui-liquid-glass) .t-bar{block-size:2.25rem;margin-block-end:-1.25rem;clip-path:inset(0 0 1.25rem)}\n"] }]
119
+ }, template: "<div class=\"t-stops\">\n @for (stop of context.stops; track stop) {\n <div\n #stops\n class=\"t-stop\"\n [style.margin-block-start]=\"stop\"\n ></div>\n }\n</div>\n<div\n #sheet\n class=\"t-sheet\"\n (waResizeObserver)=\"onResize()\"\n>\n <div class=\"t-bar\"></div>\n <div class=\"t-content\">\n @if (context.label) {\n <header\n [id]=\"context.id\"\n [innerHTML]=\"context.label\"\n ></header>\n }\n <ng-container *polymorpheusOutlet=\"context.content as text; context: context\">\n <div [innerHTML]=\"text\"></div>\n @if (context.closable) {\n <footer>\n <button\n tuiButton\n type=\"button\"\n (click)=\"context.$implicit.complete()\"\n >\n {{ context.data || 'OK' }}\n </button>\n </footer>\n }\n </ng-container>\n </div>\n</div>\n", styles: [":host{scrollbar-width:none;position:sticky;display:flex;inset-inline-start:0;inline-size:100%;max-inline-size:40.8125rem;block-size:calc(100% - max(var(--tui-offset),env(safe-area-inset-top)));flex-direction:column;font:var(--tui-typography-body-m);overflow-y:scroll;overscroll-behavior:none;scroll-snap-type:y mandatory;margin:max(var(--tui-offset),env(safe-area-inset-top)) auto 0;border-radius:.75rem .75rem 0 0;box-shadow:0 5rem var(--tui-background-elevation-1);--t-top: 0}:host::-webkit-scrollbar,:host::-webkit-scrollbar-thumb{display:none}@supports (-webkit-touch-callout: none){:host{overscroll-behavior:contain}}:host.tui-enter,:host.tui-leave{animation-name:tuiSlide;animation-timing-function:var(--tui-curve-expressive-exit)}:host.tui-enter{animation-duration:calc(var(--tui-duration) / 6 * 7);animation-timing-function:cubic-bezier(.1,.8,.5,1)}:host:before{position:fixed;inset-block-start:0;inset-inline-start:0;inline-size:100%;block-size:100%;content:\"\";z-index:-1}:host._bar{--t-top: 1.5rem}:host._bar .t-bar{display:block}:host._closeable{display:block}:host._closeable .t-stops{display:flex}:host[data-appearance~=fullscreen]{display:block}:host[data-appearance~=fullscreen] .t-sheet{min-block-size:100%}:host ::ng-deep tui-data-list[data-size]{padding:0}:host ::ng-deep tui-data-list[data-size] [tuiOption][data-size]{box-sizing:content-box;border-radius:0}.t-stops{display:none;block-size:100%;scroll-snap-stop:always;scroll-snap-align:start;pointer-events:none}.t-stop{position:relative;inset-block-start:env(safe-area-inset-bottom);scroll-snap-stop:normal;scroll-snap-align:start;block-size:1rem;inline-size:1rem}.t-sheet{display:flex;inline-size:100%;flex-direction:column;box-shadow:var(--tui-shadow-small);border-radius:inherit;padding:0 var(--tui-padding-inline);margin-block-start:auto;background:var(--tui-background-elevation-1);box-sizing:border-box;scroll-snap-stop:always;scroll-snap-align:start;--tui-padding-inline: 1rem}.t-bar{position:sticky;z-index:1;display:none;inset-block-start:0;block-size:1.5rem;margin:0 calc(-1 * var(--tui-padding-inline));border-radius:inherit;background:var(--tui-background-elevation-1)}.t-bar:after{position:absolute;left:50%;transform:translate(-50%);content:\"\";inset-block-start:.5rem;inline-size:2rem;block-size:.25rem;background:var(--tui-border-normal);border-radius:1rem}.t-content{position:relative;display:flex;flex-direction:column;flex-grow:1;border-radius:inherit;isolation:isolate;padding-block-end:max(1.5rem,env(safe-area-inset-bottom))}.t-content:after{content:\"\";position:relative;z-index:-1;display:block;inset-block-start:max(1.5rem,env(safe-area-inset-bottom));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}* ::ng-deep>header,* ::ng-deep>[tuiSlides]>*>header,* ::ng-deep>ng-component>header,* ::ng-deep>ng-component>[tuiSlides]>*>header{position:sticky;z-index:1;inset-block-start:var(--t-top);margin:0 calc(-1 * var(--tui-padding-inline));padding:.75rem var(--tui-padding-inline);border-radius:inherit;background:var(--tui-background-elevation-1);box-shadow:0 calc(-1 * var(--t-top)) var(--tui-background-elevation-1);font:var(--tui-typography-heading-h6)}* ::ng-deep>footer:not([tuiFloatingContainer]),* ::ng-deep>[tuiSlides]>*>footer:not([tuiFloatingContainer]),* ::ng-deep>ng-component>footer:not([tuiFloatingContainer]),* ::ng-deep>ng-component>[tuiSlides]>*>footer:not([tuiFloatingContainer]){display:flex;flex-direction:column-reverse;gap:.5rem;margin-block-start:1rem}:host-context(.tui-liquid-glass){border-radius:2.25rem 2.25rem 0 0}:host-context(.tui-liquid-glass)._bar{--t-top: 1rem}:host-context(.tui-liquid-glass) .t-bar{block-size:2.25rem;margin-block-end:-1.25rem;clip-path:inset(0 0 1.25rem)}\n"] }]
118
120
  }], ctorParameters: () => [] });
119
121
 
120
122
  const TUI_SHEET_DIALOG_DEFAULT_OPTIONS = {
@@ -138,6 +140,7 @@ const THEME_COLOR = 'name="theme-color"';
138
140
  class TuiSheetDialogService extends TuiModalService {
139
141
  constructor() {
140
142
  super(...arguments);
143
+ this.themeColors = inject(TUI_OPTIONS).themeColors;
141
144
  this.meta = inject(Meta);
142
145
  this.initial = '';
143
146
  this.count = 0;
@@ -147,7 +150,7 @@ class TuiSheetDialogService extends TuiModalService {
147
150
  add(component) {
148
151
  // Read the live tag at open time, not at construction: a color set later
149
152
  // (an app-level dark mode effect) would otherwise be lost on revert.
150
- if (!this.count++ && this.options.themeColor) {
153
+ if (!this.count++ && this.options.themeColor && !this.themeColors) {
151
154
  this.initial = this.meta.getTag(THEME_COLOR)?.content ?? '';
152
155
  this.meta.updateTag({
153
156
  name: 'theme-color',
@@ -157,7 +160,7 @@ class TuiSheetDialogService extends TuiModalService {
157
160
  const cleanup = super.add(component);
158
161
  return () => {
159
162
  cleanup();
160
- if (--this.count || !this.options.themeColor) {
163
+ if (--this.count || !this.options.themeColor || this.themeColors) {
161
164
  return;
162
165
  }
163
166
  if (this.initial) {
@@ -1 +1 @@
1
- {"version":3,"file":"taiga-ui-addon-mobile-components-sheet-dialog.mjs","sources":["../../../projects/addon-mobile/components/sheet-dialog/sheet-dialog-close.directive.ts","../../../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 {DOCUMENT} from '@angular/common';\nimport {Directive, inject} from '@angular/core';\nimport {outputFromObservable} from '@angular/core/rxjs-interop';\nimport {tuiIfMap} from '@taiga-ui/cdk/observables';\nimport {tuiInjectElement} from '@taiga-ui/cdk/utils/dom';\nimport {\n bufferCount,\n filter,\n fromEvent,\n map,\n merge,\n pairwise,\n startWith,\n take,\n takeWhile,\n} from 'rxjs';\n\nimport {TuiSheetDialogComponent} from './sheet-dialog.component';\n\n@Directive({selector: '[tuiSheetDialogClose]'})\nexport class TuiSheetDialogClose {\n private readonly el = tuiInjectElement();\n private readonly doc = inject(DOCUMENT);\n private readonly sheet = inject(TuiSheetDialogComponent);\n private readonly scroll$ = fromEvent(this.el, 'scroll');\n private readonly untouched$ = merge(\n fromEvent(this.doc, 'touchstart', {passive: true}).pipe(map(() => false)),\n fromEvent(this.doc, 'touchend', {passive: true}).pipe(map(() => true)),\n fromEvent(this.doc, 'touchcancel', {passive: true}).pipe(map(() => true)),\n );\n\n private readonly swipe$ = this.scroll$.pipe(\n map(() => this.el.scrollHeight - this.el.clientHeight - this.el.scrollTop),\n // Excluding scroll due to content height changes when scrolled to the end and overscroll\n filter((scroll) => scroll > 10),\n map(() => this.el.scrollTop),\n pairwise(),\n map(([prev, curr]) => prev - curr),\n takeWhile((value) => value > 0),\n bufferCount(5),\n filter(({length}) => length === 5),\n take(1),\n );\n\n private readonly release$ = this.scroll$.pipe(\n startWith(null),\n filter(() => !this.el.scrollTop),\n take(1),\n );\n\n public readonly tuiSheetDialogClose = outputFromObservable(\n merge(\n // Swipe down\n this.untouched$.pipe(\n tuiIfMap(\n () => this.swipe$,\n (untouched) => untouched && this.el.scrollTop < this.sheet.initial,\n ),\n ),\n // Wheel/let go at the end\n merge(\n this.untouched$,\n fromEvent(this.el, 'wheel').pipe(map(() => true)),\n ).pipe(tuiIfMap(() => this.release$)),\n ),\n );\n}\n","import {\n afterNextRender,\n ChangeDetectionStrategy,\n Component,\n ElementRef,\n inject,\n viewChild,\n viewChildren,\n} from '@angular/core';\nimport {takeUntilDestroyed} from '@angular/core/rxjs-interop';\nimport {WaResizeObserver} from '@ng-web-apis/resize-observer';\nimport {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 TuiPortalContext} from '@taiga-ui/cdk/portals';\nimport {tuiInjectElement} from '@taiga-ui/cdk/utils/dom';\nimport {TuiButton} from '@taiga-ui/core/components/button';\nimport {TuiScrollRef} from '@taiga-ui/core/components/scrollbar';\nimport {TUI_DIALOGS_CLOSE} from '@taiga-ui/core/portals/dialog';\nimport {injectContext, PolymorpheusOutlet} from '@taiga-ui/polymorpheus';\nimport {exhaustMap, filter, isObservable, map, merge, of, Subject, take} from 'rxjs';\n\nimport {\n type TuiSheetDialogContext,\n type TuiSheetDialogOptions,\n} from './sheet-dialog.options';\nimport {TuiSheetDialogClose} from './sheet-dialog-close.directive';\n\nconst REQUIRED_ERROR = new Error(ngDevMode ? 'Required dialog was dismissed' : '');\n\n@Component({\n selector: 'tui-sheet-dialog',\n imports: [PolymorpheusOutlet, TuiButton, WaResizeObserver],\n templateUrl: './sheet-dialog.template.html',\n styleUrl: './sheet-dialog.style.less',\n changeDetection: ChangeDetectionStrategy.OnPush,\n hostDirectives: [\n TuiAnimated,\n TuiScrollRef,\n {directive: TuiSheetDialogClose, outputs: ['tuiSheetDialogClose']},\n ],\n host: {\n '[attr.data-appearance]': 'context.appearance',\n '[class._bar]': 'context.bar',\n '[class._closeable]': 'context.closable',\n '[style.--tui-offset.px]': 'context.offset',\n '(click.self)': 'close$.next()',\n '(document:touchstart.passive.zoneless)': 'interacted = true',\n '(tuiSheetDialogClose)': 'close$.next()',\n '(wheel.passive.zoneless)': 'interacted = true',\n },\n})\nexport class TuiSheetDialogComponent {\n private readonly stops = viewChildren('stops', {read: ElementRef});\n private readonly sheet = viewChild('sheet', {read: ElementRef});\n private readonly el = tuiInjectElement();\n\n protected readonly context: TuiSheetDialogContext = {\n ...injectContext<TuiPortalContext<TuiSheetDialogOptions>>(),\n scrollTo: (index, behavior) => this.scrollTo(index, behavior),\n };\n\n protected readonly close$ = new Subject<void>();\n protected interacted = false;\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.closable)) {\n if (this.el.scrollTop <= 0) {\n this.el.scrollTo({top: this.initial, behavior: 'smooth'});\n }\n\n return this.context.closable.pipe(take(1));\n }\n\n return of(this.context.closable);\n }),\n filter(Boolean),\n takeUntilDestroyed(),\n )\n .subscribe(() => this.close());\n\n constructor() {\n afterNextRender(() => this.onResize());\n }\n\n public get initial(): number {\n return this.context.closable ? this.getTop(this.context.initial) : 0;\n }\n\n // Re-pin async content to the initial snap; mandatory scroll-snap jumps to the bottom otherwise.\n protected onResize(): void {\n if (!this.interacted) {\n this.el.scrollTop = this.initial;\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 private scrollTo(index: number, behavior: ScrollBehavior = 'smooth'): void {\n this.interacted = true;\n this.el.scrollTo({top: this.getTop(index), behavior});\n }\n\n private getTop(index: number): number {\n const tops = this.stops().map(({nativeElement}) => nativeElement.offsetTop);\n const top = this.sheet()?.nativeElement.offsetTop ?? 0;\n\n return tops.concat(top)[Math.min(Math.max(index, 0), tops.length)] ?? 0;\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-block-start]=\"stop\"\n ></div>\n }\n</div>\n<div\n #sheet\n class=\"t-sheet\"\n (waResizeObserver)=\"onResize()\"\n>\n <div class=\"t-bar\"></div>\n <div class=\"t-content\">\n @if (context.label) {\n <header\n [id]=\"context.id\"\n [innerHTML]=\"context.label\"\n ></header>\n }\n <ng-container *polymorpheusOutlet=\"context.content as text; context: context\">\n <div [innerHTML]=\"text\"></div>\n @if (context.closable) {\n <footer>\n <button\n tuiButton\n type=\"button\"\n (click)=\"context.$implicit.complete()\"\n >\n {{ context.data || 'OK' }}\n </button>\n </footer>\n }\n </ng-container>\n </div>\n</div>\n","import {type TuiPortalContext} from '@taiga-ui/cdk/portals';\nimport {tuiCreateOptions} from '@taiga-ui/cdk/utils/di';\nimport {type Observable} from 'rxjs';\n\nexport interface TuiSheetDialogOptions<I = undefined> {\n readonly appearance: string;\n readonly closable: Observable<boolean> | boolean;\n readonly data: I extends void ? undefined : I;\n readonly initial: number;\n readonly label: string;\n readonly offset: number;\n readonly stops: readonly string[];\n readonly bar: boolean;\n readonly required: boolean;\n /**\n * Address-bar (`<meta name=\"theme-color\">`) color applied while the sheet is\n * open, matching the dimmed backdrop. Pass an empty string to leave the\n * address bar untouched (e.g. apps that manage `theme-color` themselves, or\n * need a value that tracks dark mode).\n */\n readonly themeColor: string;\n}\n\nexport type TuiSheetDialogContext<I = undefined, O = void> = TuiPortalContext<\n TuiSheetDialogOptions<I>,\n O\n> & {\n scrollTo(index: number, behavior?: ScrollBehavior): void;\n};\n\nexport const TUI_SHEET_DIALOG_DEFAULT_OPTIONS: TuiSheetDialogOptions = {\n label: '',\n appearance: '',\n stops: [],\n initial: 0,\n offset: 16,\n closable: true,\n data: undefined,\n bar: true,\n required: false,\n themeColor: '#404040',\n};\n\n/**\n * Default parameters for mobile dialog component\n */\nexport const [TUI_SHEET_DIALOG_OPTIONS, tuiSheetDialogOptionsProvider] = tuiCreateOptions(\n TUI_SHEET_DIALOG_DEFAULT_OPTIONS,\n);\n","import {inject, Injectable} from '@angular/core';\nimport {Meta} from '@angular/platform-browser';\nimport {type TuiModalComponent, TuiModalService} from '@taiga-ui/core/portals/modal';\nimport {type PolymorpheusComponent} from '@taiga-ui/polymorpheus';\n\nimport {TuiSheetDialogComponent} from './sheet-dialog.component';\nimport {\n TUI_SHEET_DIALOG_OPTIONS,\n type TuiSheetDialogOptions,\n} from './sheet-dialog.options';\n\nconst THEME_COLOR = 'name=\"theme-color\"';\n\n@Injectable({providedIn: 'root'})\nexport class TuiSheetDialogService extends TuiModalService<TuiSheetDialogOptions<any>> {\n private readonly meta = inject(Meta);\n private initial = '';\n private count = 0;\n\n protected readonly options = inject(TUI_SHEET_DIALOG_OPTIONS);\n protected readonly content = TuiSheetDialogComponent;\n\n protected override add(\n component: PolymorpheusComponent<TuiModalComponent<TuiSheetDialogOptions>>,\n ): () => void {\n // Read the live tag at open time, not at construction: a color set later\n // (an app-level dark mode effect) would otherwise be lost on revert.\n if (!this.count++ && this.options.themeColor) {\n this.initial = this.meta.getTag(THEME_COLOR)?.content ?? '';\n this.meta.updateTag({\n name: 'theme-color',\n content: this.options.themeColor,\n });\n }\n\n const cleanup = super.add(component);\n\n return () => {\n cleanup();\n\n if (--this.count || !this.options.themeColor) {\n return;\n }\n\n if (this.initial) {\n this.meta.updateTag({name: 'theme-color', content: this.initial});\n } else {\n this.meta.removeTag(THEME_COLOR);\n }\n };\n }\n}\n","import {Directive, input} from '@angular/core';\nimport {tuiAsPortal, TuiPortalDirective} from '@taiga-ui/cdk/portals';\n\nimport {type TuiSheetDialogOptions} from './sheet-dialog.options';\nimport {TuiSheetDialogService} from './sheet-dialog.service';\n\n@Directive({\n selector: 'ng-template[tuiSheetDialog]',\n providers: [tuiAsPortal(TuiSheetDialogService)],\n hostDirectives: [\n {\n directive: TuiPortalDirective,\n inputs: ['options: tuiSheetDialogOptions', 'open: tuiSheetDialog'],\n outputs: ['openChange: tuiSheetDialogChange'],\n },\n ],\n})\nexport class TuiSheetDialog {\n public readonly tuiSheetDialogOptions = input<Partial<TuiSheetDialogOptions>>({});\n}\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './index';\n"],"names":["i3.TuiSheetDialogClose","i1"],"mappings":";;;;;;;;;;;;;;;;;;;;;;MAoBa,mBAAmB,CAAA;AADhC,IAAA,WAAA,GAAA;QAEqB,IAAA,CAAA,EAAE,GAAG,gBAAgB,EAAE;AACvB,QAAA,IAAA,CAAA,GAAG,GAAG,MAAM,CAAC,QAAQ,CAAC;AACtB,QAAA,IAAA,CAAA,KAAK,GAAG,MAAM,CAAC,uBAAuB,CAAC;QACvC,IAAA,CAAA,OAAO,GAAG,SAAS,CAAC,IAAI,CAAC,EAAE,EAAE,QAAQ,CAAC;AACtC,QAAA,IAAA,CAAA,UAAU,GAAG,KAAK,CAC/B,SAAS,CAAC,IAAI,CAAC,GAAG,EAAE,YAAY,EAAE,EAAC,OAAO,EAAE,IAAI,EAAC,CAAC,CAAC,IAAI,CAAC,GAAG,CAAC,MAAM,KAAK,CAAC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AAC;AAC/C,oBAAA,cAAc,EAAE;AACZ,wBAAA;AACI,4BAAA,SAAS,EAAE,kBAAkB;AAC7B,4BAAA,MAAM,EAAE,CAAC,gCAAgC,EAAE,sBAAsB,CAAC;4BAClE,OAAO,EAAE,CAAC,kCAAkC,CAAC;AAChD,yBAAA;AACJ,qBAAA;AACJ,iBAAA;;;AChBD;;AAEG;;;;"}
1
+ {"version":3,"file":"taiga-ui-addon-mobile-components-sheet-dialog.mjs","sources":["../../../projects/addon-mobile/components/sheet-dialog/sheet-dialog-close.directive.ts","../../../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 {DOCUMENT} from '@angular/common';\nimport {Directive, inject} from '@angular/core';\nimport {outputFromObservable} from '@angular/core/rxjs-interop';\nimport {tuiIfMap} from '@taiga-ui/cdk/observables';\nimport {tuiInjectElement} from '@taiga-ui/cdk/utils/dom';\nimport {\n bufferCount,\n filter,\n fromEvent,\n map,\n merge,\n pairwise,\n startWith,\n take,\n takeWhile,\n} from 'rxjs';\n\nimport {TuiSheetDialogComponent} from './sheet-dialog.component';\n\n@Directive({selector: '[tuiSheetDialogClose]'})\nexport class TuiSheetDialogClose {\n private readonly el = tuiInjectElement();\n private readonly doc = inject(DOCUMENT);\n private readonly sheet = inject(TuiSheetDialogComponent);\n private readonly scroll$ = fromEvent(this.el, 'scroll');\n private readonly untouched$ = merge(\n fromEvent(this.doc, 'touchstart', {passive: true}).pipe(map(() => false)),\n fromEvent(this.doc, 'touchend', {passive: true}).pipe(map(() => true)),\n fromEvent(this.doc, 'touchcancel', {passive: true}).pipe(map(() => true)),\n );\n\n private readonly swipe$ = this.scroll$.pipe(\n map(() => this.el.scrollHeight - this.el.clientHeight - this.el.scrollTop),\n // Excluding scroll due to content height changes when scrolled to the end and overscroll\n filter((scroll) => scroll > 10),\n map(() => this.el.scrollTop),\n pairwise(),\n map(([prev, curr]) => prev - curr),\n takeWhile((value) => value > 0),\n bufferCount(5),\n filter(({length}) => length === 5),\n take(1),\n );\n\n private readonly release$ = this.scroll$.pipe(\n startWith(null),\n filter(() => !this.el.scrollTop),\n take(1),\n );\n\n public readonly tuiSheetDialogClose = outputFromObservable(\n merge(\n // Swipe down\n this.untouched$.pipe(\n tuiIfMap(\n () => this.swipe$,\n (untouched) => untouched && this.el.scrollTop < this.sheet.initial,\n ),\n ),\n // Wheel/let go at the end\n merge(\n this.untouched$,\n fromEvent(this.el, 'wheel').pipe(map(() => true)),\n ).pipe(tuiIfMap(() => this.release$)),\n ),\n );\n}\n","import {\n afterNextRender,\n ChangeDetectionStrategy,\n Component,\n ElementRef,\n inject,\n viewChild,\n viewChildren,\n} from '@angular/core';\nimport {takeUntilDestroyed} from '@angular/core/rxjs-interop';\nimport {WaResizeObserver} from '@ng-web-apis/resize-observer';\nimport {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 TuiPortalContext} from '@taiga-ui/cdk/portals';\nimport {tuiInjectElement} from '@taiga-ui/cdk/utils/dom';\nimport {TuiButton} from '@taiga-ui/core/components/button';\nimport {TuiScrollRef} from '@taiga-ui/core/components/scrollbar';\nimport {TUI_DIALOGS_CLOSE} from '@taiga-ui/core/portals/dialog';\nimport {injectContext, PolymorpheusOutlet} from '@taiga-ui/polymorpheus';\nimport {exhaustMap, filter, isObservable, map, merge, of, Subject, take} from 'rxjs';\n\nimport {\n type TuiSheetDialogContext,\n type TuiSheetDialogOptions,\n} from './sheet-dialog.options';\nimport {TuiSheetDialogClose} from './sheet-dialog-close.directive';\n\nconst REQUIRED_ERROR = new Error(ngDevMode ? 'Required dialog was dismissed' : '');\n\n@Component({\n selector: 'tui-sheet-dialog',\n imports: [PolymorpheusOutlet, TuiButton, WaResizeObserver],\n templateUrl: './sheet-dialog.template.html',\n styleUrl: './sheet-dialog.style.less',\n changeDetection: ChangeDetectionStrategy.OnPush,\n hostDirectives: [\n TuiAnimated,\n TuiScrollRef,\n {directive: TuiSheetDialogClose, outputs: ['tuiSheetDialogClose']},\n ],\n host: {\n 'data-zone-bottom': 'var(--tui-background-elevation-1)',\n '[attr.data-appearance]': 'context.appearance',\n '[class._bar]': 'context.bar',\n '[class._closeable]': 'context.closable',\n '[style.--tui-offset.px]': 'context.offset',\n '(click.self)': 'close$.next()',\n '(document:touchstart.passive.zoneless)': 'interacted = true',\n '(tuiSheetDialogClose)': 'close$.next()',\n '(wheel.passive.zoneless)': 'interacted = true',\n },\n})\nexport class TuiSheetDialogComponent {\n private readonly stops = viewChildren('stops', {read: ElementRef});\n private readonly sheet = viewChild('sheet', {read: ElementRef});\n private readonly el = tuiInjectElement();\n\n protected readonly context: TuiSheetDialogContext = {\n ...injectContext<TuiPortalContext<TuiSheetDialogOptions>>(),\n scrollTo: (index, behavior) => this.scrollTo(index, behavior),\n };\n\n protected readonly close$ = new Subject<void>();\n protected interacted = false;\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.closable)) {\n if (this.el.scrollTop <= 0) {\n this.el.scrollTo({top: this.initial, behavior: 'smooth'});\n }\n\n return this.context.closable.pipe(take(1));\n }\n\n return of(this.context.closable);\n }),\n filter(Boolean),\n takeUntilDestroyed(),\n )\n .subscribe(() => this.close());\n\n constructor() {\n afterNextRender(() => this.onResize());\n }\n\n public get initial(): number {\n return this.context.closable ? this.getTop(this.context.initial) : 0;\n }\n\n // Re-pin async content to the initial snap; mandatory scroll-snap jumps to the bottom otherwise.\n protected onResize(): void {\n if (!this.interacted) {\n this.el.scrollTop = this.initial;\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 private scrollTo(index: number, behavior: ScrollBehavior = 'smooth'): void {\n this.interacted = true;\n this.el.scrollTo({top: this.getTop(index), behavior});\n }\n\n private getTop(index: number): number {\n const tops = this.stops().map(({nativeElement}) => nativeElement.offsetTop);\n const top = this.sheet()?.nativeElement.offsetTop ?? 0;\n\n return tops.concat(top)[Math.min(Math.max(index, 0), tops.length)] ?? 0;\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-block-start]=\"stop\"\n ></div>\n }\n</div>\n<div\n #sheet\n class=\"t-sheet\"\n (waResizeObserver)=\"onResize()\"\n>\n <div class=\"t-bar\"></div>\n <div class=\"t-content\">\n @if (context.label) {\n <header\n [id]=\"context.id\"\n [innerHTML]=\"context.label\"\n ></header>\n }\n <ng-container *polymorpheusOutlet=\"context.content as text; context: context\">\n <div [innerHTML]=\"text\"></div>\n @if (context.closable) {\n <footer>\n <button\n tuiButton\n type=\"button\"\n (click)=\"context.$implicit.complete()\"\n >\n {{ context.data || 'OK' }}\n </button>\n </footer>\n }\n </ng-container>\n </div>\n</div>\n","import {type TuiPortalContext} from '@taiga-ui/cdk/portals';\nimport {tuiCreateOptions} from '@taiga-ui/cdk/utils/di';\nimport {type Observable} from 'rxjs';\n\nexport interface TuiSheetDialogOptions<I = undefined> {\n readonly appearance: string;\n readonly closable: Observable<boolean> | boolean;\n readonly data: I extends void ? undefined : I;\n readonly initial: number;\n readonly label: string;\n readonly offset: number;\n readonly stops: readonly string[];\n readonly bar: boolean;\n readonly required: boolean;\n /**\n * Address-bar (`<meta name=\"theme-color\">`) color applied while the sheet is\n * open, matching the dimmed backdrop. Pass an empty string to leave the\n * address bar untouched (e.g., apps that manage `theme-color` themselves or\n * need a value that tracks dark mode).\n * @deprecated use provideTaiga({themeColors: [light, dark]}) instead, remove in v6\n */\n readonly themeColor: string;\n}\n\nexport type TuiSheetDialogContext<I = undefined, O = void> = TuiPortalContext<\n TuiSheetDialogOptions<I>,\n O\n> & {\n scrollTo(index: number, behavior?: ScrollBehavior): void;\n};\n\nexport const TUI_SHEET_DIALOG_DEFAULT_OPTIONS: TuiSheetDialogOptions = {\n label: '',\n appearance: '',\n stops: [],\n initial: 0,\n offset: 16,\n closable: true,\n data: undefined,\n bar: true,\n required: false,\n themeColor: '#404040',\n};\n\n/**\n * Default parameters for mobile dialog component\n */\nexport const [TUI_SHEET_DIALOG_OPTIONS, tuiSheetDialogOptionsProvider] = tuiCreateOptions(\n TUI_SHEET_DIALOG_DEFAULT_OPTIONS,\n);\n","import {inject, Injectable} from '@angular/core';\nimport {Meta} from '@angular/platform-browser';\nimport {type TuiModalComponent, TuiModalService} from '@taiga-ui/core/portals/modal';\nimport {TUI_OPTIONS} from '@taiga-ui/core/utils/miscellaneous';\nimport {type PolymorpheusComponent} from '@taiga-ui/polymorpheus';\n\nimport {TuiSheetDialogComponent} from './sheet-dialog.component';\nimport {\n TUI_SHEET_DIALOG_OPTIONS,\n type TuiSheetDialogOptions,\n} from './sheet-dialog.options';\n\nconst THEME_COLOR = 'name=\"theme-color\"';\n\n@Injectable({providedIn: 'root'})\nexport class TuiSheetDialogService extends TuiModalService<TuiSheetDialogOptions<any>> {\n private readonly themeColors = inject(TUI_OPTIONS).themeColors;\n private readonly meta = inject(Meta);\n private initial = '';\n private count = 0;\n\n protected readonly options = inject(TUI_SHEET_DIALOG_OPTIONS);\n protected readonly content = TuiSheetDialogComponent;\n\n protected override add(\n component: PolymorpheusComponent<TuiModalComponent<TuiSheetDialogOptions>>,\n ): () => void {\n // Read the live tag at open time, not at construction: a color set later\n // (an app-level dark mode effect) would otherwise be lost on revert.\n if (!this.count++ && this.options.themeColor && !this.themeColors) {\n this.initial = this.meta.getTag(THEME_COLOR)?.content ?? '';\n this.meta.updateTag({\n name: 'theme-color',\n content: this.options.themeColor,\n });\n }\n\n const cleanup = super.add(component);\n\n return () => {\n cleanup();\n\n if (--this.count || !this.options.themeColor || this.themeColors) {\n return;\n }\n\n if (this.initial) {\n this.meta.updateTag({name: 'theme-color', content: this.initial});\n } else {\n this.meta.removeTag(THEME_COLOR);\n }\n };\n }\n}\n","import {Directive, input} from '@angular/core';\nimport {tuiAsPortal, TuiPortalDirective} from '@taiga-ui/cdk/portals';\n\nimport {type TuiSheetDialogOptions} from './sheet-dialog.options';\nimport {TuiSheetDialogService} from './sheet-dialog.service';\n\n@Directive({\n selector: 'ng-template[tuiSheetDialog]',\n providers: [tuiAsPortal(TuiSheetDialogService)],\n hostDirectives: [\n {\n directive: TuiPortalDirective,\n inputs: ['options: tuiSheetDialogOptions', 'open: tuiSheetDialog'],\n outputs: ['openChange: tuiSheetDialogChange'],\n },\n ],\n})\nexport class TuiSheetDialog {\n public readonly tuiSheetDialogOptions = input<Partial<TuiSheetDialogOptions>>({});\n}\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './index';\n"],"names":["i3.TuiSheetDialogClose","i1"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;MAoBa,mBAAmB,CAAA;AADhC,IAAA,WAAA,GAAA;QAEqB,IAAA,CAAA,EAAE,GAAG,gBAAgB,EAAE;AACvB,QAAA,IAAA,CAAA,GAAG,GAAG,MAAM,CAAC,QAAQ,CAAC;AACtB,QAAA,IAAA,CAAA,KAAK,GAAG,MAAM,CAAC,uBAAuB,CAAC;QACvC,IAAA,CAAA,OAAO,GAAG,SAAS,CAAC,IAAI,CAAC,EAAE,EAAE,QAAQ,CAAC;AACtC,QAAA,IAAA,CAAA,UAAU,GAAG,KAAK,CAC/B,SAAS,CAAC,IAAI,CAAC,GAAG,EAAE,YAAY,EAAE,EAAC,OAAO,EAAE,IAAI,EAAC,CAA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AA,CAAA,YAAA,EAAA,sBAAA,CAAA,EAAA,CAAA,EAAA,QAAA,EAAA,EAAA,EAAA,CAAA,CAAA;;4FAStC,cAAc,EAAA,UAAA,EAAA,CAAA;kBAX1B,SAAS;AAAC,YAAA,IAAA,EAAA,CAAA;AACP,oBAAA,QAAQ,EAAE,6BAA6B;AACvC,oBAAA,SAAS,EAAE,CAAC,WAAW,CAAC,qBAAqB,CAAC,CAAC;AAC/C,oBAAA,cAAc,EAAE;AACZ,wBAAA;AACI,4BAAA,SAAS,EAAE,kBAAkB;AAC7B,4BAAA,MAAM,EAAE,CAAC,gCAAgC,EAAE,sBAAsB,CAAC;4BAClE,OAAO,EAAE,CAAC,kCAAkC,CAAC;AAChD,yBAAA;AACJ,qBAAA;AACJ,iBAAA;;;AChBD;;AAEG;;;;"}
@@ -47,11 +47,11 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.25", ngImpo
47
47
 
48
48
  class Styles {
49
49
  static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.2.25", ngImport: i0, type: Styles, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
50
- static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "19.2.25", type: Styles, isStandalone: true, selector: "ng-component", exportAs: ["tui-swipe-actions-5.33.0-canary.ea8b5c8"], ngImport: i0, template: '', isInline: true, styles: ["tui-swipe-actions._onboarding:where(*[data-tui-version=\"5.33.0-canary.ea8b5c8\"]){scroll-snap-type:none}tui-swipe-actions._onboarding:where(*[data-tui-version=\"5.33.0-canary.ea8b5c8\"])>*{animation:tuiOnboardingEnter calc(var(--tui-duration) / .6) var(--tui-curve-expressive-entrance),tuiOnboardingShow var(--tui-duration) linear calc(var(--tui-duration) / .6),tuiOnboardingExit calc(var(--tui-duration) / .6) var(--tui-curve-expressive-entrance) calc(calc(var(--tui-duration) / .6) + var(--tui-duration))}@keyframes tuiOnboardingEnter{0%{transform:translate(0)}to{transform:translate(calc(-1px * var(--t-actions-width)))}}@keyframes tuiOnboardingShow{0%{transform:translate(calc(-1px * var(--t-actions-width)))}to{transform:translate(calc(-1px * var(--t-actions-width)))}}@keyframes tuiOnboardingExit{0%{transform:translate(calc(-1px * var(--t-actions-width)))}to{transform:translate(0)}}\n"], changeDetection: i0.ChangeDetectionStrategy.OnPush, encapsulation: i0.ViewEncapsulation.None }); }
50
+ static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "19.2.25", type: Styles, isStandalone: true, selector: "ng-component", exportAs: ["tui-swipe-actions-5.34.0"], ngImport: i0, template: '', isInline: true, styles: ["tui-swipe-actions._onboarding:where(*[data-tui-version=\"5.34.0\"]){scroll-snap-type:none}tui-swipe-actions._onboarding:where(*[data-tui-version=\"5.34.0\"])>*{animation:tuiOnboardingEnter calc(var(--tui-duration) / .6) var(--tui-curve-expressive-entrance),tuiOnboardingShow var(--tui-duration) linear calc(var(--tui-duration) / .6),tuiOnboardingExit calc(var(--tui-duration) / .6) var(--tui-curve-expressive-entrance) calc(calc(var(--tui-duration) / .6) + var(--tui-duration))}@keyframes tuiOnboardingEnter{0%{transform:translate(0)}to{transform:translate(calc(-1px * var(--t-actions-width)))}}@keyframes tuiOnboardingShow{0%{transform:translate(calc(-1px * var(--t-actions-width)))}to{transform:translate(calc(-1px * var(--t-actions-width)))}}@keyframes tuiOnboardingExit{0%{transform:translate(calc(-1px * var(--t-actions-width)))}to{transform:translate(0)}}\n"], changeDetection: i0.ChangeDetectionStrategy.OnPush, encapsulation: i0.ViewEncapsulation.None }); }
51
51
  }
52
52
  i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.25", ngImport: i0, type: Styles, decorators: [{
53
53
  type: Component,
54
- args: [{ template: '', encapsulation: ViewEncapsulation.None, changeDetection: ChangeDetectionStrategy.OnPush, exportAs: `tui-swipe-actions-${TUI_VERSION}`, styles: ["tui-swipe-actions._onboarding:where(*[data-tui-version=\"5.33.0-canary.ea8b5c8\"]){scroll-snap-type:none}tui-swipe-actions._onboarding:where(*[data-tui-version=\"5.33.0-canary.ea8b5c8\"])>*{animation:tuiOnboardingEnter calc(var(--tui-duration) / .6) var(--tui-curve-expressive-entrance),tuiOnboardingShow var(--tui-duration) linear calc(var(--tui-duration) / .6),tuiOnboardingExit calc(var(--tui-duration) / .6) var(--tui-curve-expressive-entrance) calc(calc(var(--tui-duration) / .6) + var(--tui-duration))}@keyframes tuiOnboardingEnter{0%{transform:translate(0)}to{transform:translate(calc(-1px * var(--t-actions-width)))}}@keyframes tuiOnboardingShow{0%{transform:translate(calc(-1px * var(--t-actions-width)))}to{transform:translate(calc(-1px * var(--t-actions-width)))}}@keyframes tuiOnboardingExit{0%{transform:translate(calc(-1px * var(--t-actions-width)))}to{transform:translate(0)}}\n"] }]
54
+ args: [{ template: '', encapsulation: ViewEncapsulation.None, changeDetection: ChangeDetectionStrategy.OnPush, exportAs: `tui-swipe-actions-${TUI_VERSION}`, styles: ["tui-swipe-actions._onboarding:where(*[data-tui-version=\"5.34.0\"]){scroll-snap-type:none}tui-swipe-actions._onboarding:where(*[data-tui-version=\"5.34.0\"])>*{animation:tuiOnboardingEnter calc(var(--tui-duration) / .6) var(--tui-curve-expressive-entrance),tuiOnboardingShow var(--tui-duration) linear calc(var(--tui-duration) / .6),tuiOnboardingExit calc(var(--tui-duration) / .6) var(--tui-curve-expressive-entrance) calc(calc(var(--tui-duration) / .6) + var(--tui-duration))}@keyframes tuiOnboardingEnter{0%{transform:translate(0)}to{transform:translate(calc(-1px * var(--t-actions-width)))}}@keyframes tuiOnboardingShow{0%{transform:translate(calc(-1px * var(--t-actions-width)))}to{transform:translate(calc(-1px * var(--t-actions-width)))}}@keyframes tuiOnboardingExit{0%{transform:translate(calc(-1px * var(--t-actions-width)))}to{transform:translate(0)}}\n"] }]
55
55
  }] });
56
56
  class TuiSwipeActionsOnboarding {
57
57
  constructor() {
@@ -59,7 +59,7 @@ class TuiSwipeActionsOnboarding {
59
59
  this.nothing = tuiWithStyles(Styles);
60
60
  }
61
61
  static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.2.25", ngImport: i0, type: TuiSwipeActionsOnboarding, deps: [], target: i0.ɵɵFactoryTarget.Directive }); }
62
- static { this.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "17.1.0", version: "19.2.25", type: TuiSwipeActionsOnboarding, isStandalone: true, selector: "tui-swipe-actions[onboarding]", inputs: { onboarding: { classPropertyName: "onboarding", publicName: "onboarding", isSignal: true, isRequired: false, transformFunction: null } }, outputs: { onboarding: "onboardingChange" }, host: { attributes: { "data-tui-version": "5.33.0-canary.ea8b5c8" }, listeners: { "animationend": "onboarding.set($event.animationName !== \"tuiOnboardingExit\")" }, properties: { "class._onboarding": "onboarding()" } }, ngImport: i0 }); }
62
+ static { this.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "17.1.0", version: "19.2.25", type: TuiSwipeActionsOnboarding, isStandalone: true, selector: "tui-swipe-actions[onboarding]", inputs: { onboarding: { classPropertyName: "onboarding", publicName: "onboarding", isSignal: true, isRequired: false, transformFunction: null } }, outputs: { onboarding: "onboardingChange" }, host: { attributes: { "data-tui-version": "5.34.0" }, listeners: { "animationend": "onboarding.set($event.animationName !== \"tuiOnboardingExit\")" }, properties: { "class._onboarding": "onboarding()" } }, ngImport: i0 }); }
63
63
  }
64
64
  i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.25", ngImport: i0, type: TuiSwipeActionsOnboarding, decorators: [{
65
65
  type: Directive,
@@ -1 +1 @@
1
- {"version":3,"file":"taiga-ui-addon-mobile-components-swipe-actions.mjs","sources":["../../../projects/addon-mobile/components/swipe-actions/swipe-actions.component.ts","../../../projects/addon-mobile/components/swipe-actions/swipe-actions.template.html","../../../projects/addon-mobile/components/swipe-actions/swipe-actions-auto-close.directive.ts","../../../projects/addon-mobile/components/swipe-actions/swipe-actions-onboarding.directive.ts","../../../projects/addon-mobile/components/swipe-actions/taiga-ui-addon-mobile-components-swipe-actions.ts"],"sourcesContent":["import {ChangeDetectionStrategy, Component, signal} from '@angular/core';\n\n@Component({\n selector: 'tui-swipe-actions',\n templateUrl: './swipe-actions.template.html',\n styleUrl: './swipe-actions.style.less',\n changeDetection: ChangeDetectionStrategy.OnPush,\n host: {\n '[style.--t-actions-width]': 'actionsWidth()',\n '[style.overscroll-behavior-x]': 'scrolled() ? \"contain\" : \"none\"',\n '(scroll.zoneless)': 'scrolled.set($event.target.scrollLeft > 0)',\n },\n})\nexport class TuiSwipeActions {\n protected readonly actionsWidth = signal(0);\n protected readonly scrolled = signal(false);\n}\n","<div class=\"t-content\">\n <ng-content />\n</div>\n\n<div\n #actions\n class=\"t-actions\"\n (resize)=\"actionsWidth.set(actions.clientWidth)\"\n>\n <ng-content select=\"[tuiSwipeAction]\" />\n</div>\n","import {Directive, input} from '@angular/core';\nimport {tuiGetActualTarget, tuiInjectElement} from '@taiga-ui/cdk/utils/dom';\n\n@Directive({\n selector: 'tui-swipe-actions[autoClose]',\n host: {\n '(document:focusin.zoneless)': 'handleEvent($event)',\n '(document:pointerdown.zoneless)': 'handleEvent($event)',\n },\n})\nexport class TuiSwipeActionsAutoClose {\n private readonly el = tuiInjectElement();\n\n public readonly autoClose = input<boolean | string>(true);\n\n protected handleEvent(event: Event): void {\n if (this.autoClose() !== false && !this.el.contains(tuiGetActualTarget(event))) {\n this.el.scrollTo({left: 0, behavior: 'smooth'});\n }\n }\n}\n","import {\n ChangeDetectionStrategy,\n Component,\n Directive,\n model,\n ViewEncapsulation,\n} from '@angular/core';\nimport {TUI_VERSION} from '@taiga-ui/cdk/constants';\nimport {tuiWithStyles} from '@taiga-ui/cdk/utils/miscellaneous';\n\n@Component({\n template: '',\n styles: `\n [data-tui-version='${TUI_VERSION}'] {\n @import './swipe-actions-onboarding.style.less';\n }\n `,\n encapsulation: ViewEncapsulation.None,\n changeDetection: ChangeDetectionStrategy.OnPush,\n exportAs: `tui-swipe-actions-${TUI_VERSION}`,\n})\nclass Styles {}\n\n@Directive({\n selector: 'tui-swipe-actions[onboarding]',\n host: {\n 'data-tui-version': TUI_VERSION,\n '[class._onboarding]': 'onboarding()',\n '(animationend)': 'onboarding.set($event.animationName !== \"tuiOnboardingExit\")',\n },\n})\nexport class TuiSwipeActionsOnboarding {\n public readonly onboarding = model(true);\n\n protected readonly nothing = tuiWithStyles(Styles);\n}\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './index';\n"],"names":[],"mappings":";;;;;;MAaa,eAAe,CAAA;AAX5B,IAAA,WAAA,GAAA;AAYuB,QAAA,IAAA,CAAA,YAAY,GAAG,MAAM,CAAC,CAAC,CAAC;AACxB,QAAA,IAAA,CAAA,QAAQ,GAAG,MAAM,CAAC,KAAK,CAAC;AAC9C,IAAA;+GAHY,eAAe,EAAA,IAAA,EAAA,EAAA,EAAA,MAAA,EAAA,EAAA,CAAA,eAAA,CAAA,SAAA,EAAA,CAAA,CAAA;AAAf,IAAA,SAAA,IAAA,CAAA,IAAA,GAAA,EAAA,CAAA,oBAAA,CAAA,EAAA,UAAA,EAAA,QAAA,EAAA,OAAA,EAAA,SAAA,EAAA,IAAA,EAAA,eAAe,2SCb5B,2NAWA,EAAA,MAAA,EAAA,CAAA,+sGAAA,CAAA,EAAA,eAAA,EAAA,EAAA,CAAA,uBAAA,CAAA,MAAA,EAAA,CAAA,CAAA;;4FDEa,eAAe,EAAA,UAAA,EAAA,CAAA;kBAX3B,SAAS;AACI,YAAA,IAAA,EAAA,CAAA,EAAA,QAAA,EAAA,mBAAmB,EAAA,eAAA,EAGZ,uBAAuB,CAAC,MAAM,EAAA,IAAA,EACzC;AACF,wBAAA,2BAA2B,EAAE,gBAAgB;AAC7C,wBAAA,+BAA+B,EAAE,kCAAkC;AACnE,wBAAA,mBAAmB,EAAE,4CAA4C;AACpE,qBAAA,EAAA,QAAA,EAAA,2NAAA,EAAA,MAAA,EAAA,CAAA,+sGAAA,CAAA,EAAA;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,EAAA,EAAA,IAAA,EAAA,EAAA,UAAA,EAAA,EAAA,kBAAA,EAAA,uBAAA,EAAA,EAAA,SAAA,EAAA,EAAA,cAAA,EAAA,gEAAA,EAAA,EAAA,UAAA,EAAA,EAAA,mBAAA,EAAA,cAAA,EAAA,EAAA,EAAA,QAAA,EAAA,EAAA,EAAA,CAAA,CAAA;;4FAAzB,yBAAyB,EAAA,UAAA,EAAA,CAAA;kBARrC,SAAS;AAAC,YAAA,IAAA,EAAA,CAAA;AACP,oBAAA,QAAQ,EAAE,+BAA+B;AACzC,oBAAA,IAAI,EAAE;AACF,wBAAA,kBAAkB,EAAE,WAAW;AAC/B,wBAAA,qBAAqB,EAAE,cAAc;AACrC,wBAAA,gBAAgB,EAAE,8DAA8D;AACnF,qBAAA;AACJ,iBAAA;;;AC9BD;;AAEG;;;;"}
1
+ {"version":3,"file":"taiga-ui-addon-mobile-components-swipe-actions.mjs","sources":["../../../projects/addon-mobile/components/swipe-actions/swipe-actions.component.ts","../../../projects/addon-mobile/components/swipe-actions/swipe-actions.template.html","../../../projects/addon-mobile/components/swipe-actions/swipe-actions-auto-close.directive.ts","../../../projects/addon-mobile/components/swipe-actions/swipe-actions-onboarding.directive.ts","../../../projects/addon-mobile/components/swipe-actions/taiga-ui-addon-mobile-components-swipe-actions.ts"],"sourcesContent":["import {ChangeDetectionStrategy, Component, signal} from '@angular/core';\n\n@Component({\n selector: 'tui-swipe-actions',\n templateUrl: './swipe-actions.template.html',\n styleUrl: './swipe-actions.style.less',\n changeDetection: ChangeDetectionStrategy.OnPush,\n host: {\n '[style.--t-actions-width]': 'actionsWidth()',\n '[style.overscroll-behavior-x]': 'scrolled() ? \"contain\" : \"none\"',\n '(scroll.zoneless)': 'scrolled.set($event.target.scrollLeft > 0)',\n },\n})\nexport class TuiSwipeActions {\n protected readonly actionsWidth = signal(0);\n protected readonly scrolled = signal(false);\n}\n","<div class=\"t-content\">\n <ng-content />\n</div>\n\n<div\n #actions\n class=\"t-actions\"\n (resize)=\"actionsWidth.set(actions.clientWidth)\"\n>\n <ng-content select=\"[tuiSwipeAction]\" />\n</div>\n","import {Directive, input} from '@angular/core';\nimport {tuiGetActualTarget, tuiInjectElement} from '@taiga-ui/cdk/utils/dom';\n\n@Directive({\n selector: 'tui-swipe-actions[autoClose]',\n host: {\n '(document:focusin.zoneless)': 'handleEvent($event)',\n '(document:pointerdown.zoneless)': 'handleEvent($event)',\n },\n})\nexport class TuiSwipeActionsAutoClose {\n private readonly el = tuiInjectElement();\n\n public readonly autoClose = input<boolean | string>(true);\n\n protected handleEvent(event: Event): void {\n if (this.autoClose() !== false && !this.el.contains(tuiGetActualTarget(event))) {\n this.el.scrollTo({left: 0, behavior: 'smooth'});\n }\n }\n}\n","import {\n ChangeDetectionStrategy,\n Component,\n Directive,\n model,\n ViewEncapsulation,\n} from '@angular/core';\nimport {TUI_VERSION} from '@taiga-ui/cdk/constants';\nimport {tuiWithStyles} from '@taiga-ui/cdk/utils/miscellaneous';\n\n@Component({\n template: '',\n styles: `\n [data-tui-version='${TUI_VERSION}'] {\n @import './swipe-actions-onboarding.style.less';\n }\n `,\n encapsulation: ViewEncapsulation.None,\n changeDetection: ChangeDetectionStrategy.OnPush,\n exportAs: `tui-swipe-actions-${TUI_VERSION}`,\n})\nclass Styles {}\n\n@Directive({\n selector: 'tui-swipe-actions[onboarding]',\n host: {\n 'data-tui-version': TUI_VERSION,\n '[class._onboarding]': 'onboarding()',\n '(animationend)': 'onboarding.set($event.animationName !== \"tuiOnboardingExit\")',\n },\n})\nexport class TuiSwipeActionsOnboarding {\n public readonly onboarding = model(true);\n\n protected readonly nothing = tuiWithStyles(Styles);\n}\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './index';\n"],"names":[],"mappings":";;;;;;MAaa,eAAe,CAAA;AAX5B,IAAA,WAAA,GAAA;AAYuB,QAAA,IAAA,CAAA,YAAY,GAAG,MAAM,CAAC,CAAC,CAAC;AACxB,QAAA,IAAA,CAAA,QAAQ,GAA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ACnF,qBAAA;AACJ,iBAAA;;;AC9BD;;AAEG;;;;"}
@@ -10,6 +10,7 @@ import { TuiAnimated } from '@taiga-ui/cdk/directives/animated';
10
10
  import { tuiInjectElement, tuiIsElement, tuiIsHTMLElement } from '@taiga-ui/cdk/utils/dom';
11
11
  import { tuiGetFocused } from '@taiga-ui/cdk/utils/focus';
12
12
  import { tuiPx } from '@taiga-ui/cdk/utils/miscellaneous';
13
+ import { tuiButtonOptionsProvider } from '@taiga-ui/core/components/button';
13
14
  import { TuiDropdownDirective, TUI_DROPDOWN_COMPONENT } from '@taiga-ui/core/portals/dropdown';
14
15
  import { PolymorpheusOutlet } from '@taiga-ui/polymorpheus';
15
16
  import { WA_IS_MOBILE } from '@ng-web-apis/platform';
@@ -69,13 +70,13 @@ class TuiDropdownMobileComponent {
69
70
  return this.dropdown.el.contains(tuiGetFocused(this.doc));
70
71
  }
71
72
  static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.2.25", ngImport: i0, type: TuiDropdownMobileComponent, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
72
- static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "19.2.25", type: TuiDropdownMobileComponent, isStandalone: true, selector: "tui-dropdown-mobile", host: { attributes: { "data-tui-version": "5.33.0-canary.ea8b5c8" }, listeners: { "document:click.zoneless.capture": "onClick($event)", "pointerdown.prevent": "0", "visualViewport>resize.zoneless": "refresh()", "visualViewport>scroll.zoneless": "refresh()", "window>scroll.zoneless.capture": "refresh()" } }, hostDirectives: [{ directive: i1.TuiAnimated }, { directive: i2.TuiActiveZone }], ngImport: i0, template: `
73
+ static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "19.2.25", type: TuiDropdownMobileComponent, isStandalone: true, selector: "tui-dropdown-mobile", host: { attributes: { "data-tui-version": "5.34.0" }, listeners: { "document:click.zoneless.capture": "onClick($event)", "pointerdown.prevent": "0", "visualViewport>resize.zoneless": "refresh()", "visualViewport>scroll.zoneless": "refresh()", "window>scroll.zoneless.capture": "refresh()" } }, providers: [tuiButtonOptionsProvider({ size: 'm', appearance: 'accent' })], hostDirectives: [{ directive: i1.TuiAnimated }, { directive: i2.TuiActiveZone }], ngImport: i0, template: `
73
74
  <div class="t-container">
74
75
  <ng-container *polymorpheusOutlet="dropdown.content() as text; context: ctx">
75
76
  {{ text }}
76
77
  </ng-container>
77
78
  </div>
78
- `, isInline: true, styles: ["tui-dropdown-mobile:where(*[data-tui-version=\"5.33.0-canary.ea8b5c8\"]){scrollbar-width:none;position:absolute;inset-block-start:0;inset-inline-start:0;inline-size:100%;block-size:100%;visibility:visible!important;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);pointer-events:auto}tui-dropdown-mobile:where(*[data-tui-version=\"5.33.0-canary.ea8b5c8\"])::-webkit-scrollbar,tui-dropdown-mobile:where(*[data-tui-version=\"5.33.0-canary.ea8b5c8\"])::-webkit-scrollbar-thumb{display:none}tui-dropdown-mobile:where(*[data-tui-version=\"5.33.0-canary.ea8b5c8\"]).tui-enter,tui-dropdown-mobile:where(*[data-tui-version=\"5.33.0-canary.ea8b5c8\"]).tui-leave{animation-name:tuiFade,tuiSlide}tui-dropdown-mobile:where(*[data-tui-version=\"5.33.0-canary.ea8b5c8\"]):after{content:\"\";display:block;block-size:1px}tui-dropdown-mobile:where(*[data-tui-version=\"5.33.0-canary.ea8b5c8\"])>.t-container{scrollbar-width:none;position:sticky;inset-block-start:0;block-size:100%;overflow:auto;padding:0 var(--tui-padding-inline);touch-action:pan-y!important;--tui-padding-inline: 1rem}tui-dropdown-mobile:where(*[data-tui-version=\"5.33.0-canary.ea8b5c8\"])>.t-container::-webkit-scrollbar,tui-dropdown-mobile:where(*[data-tui-version=\"5.33.0-canary.ea8b5c8\"])>.t-container::-webkit-scrollbar-thumb{display:none}tui-dropdown-mobile:where(*[data-tui-version=\"5.33.0-canary.ea8b5c8\"])>.t-container tui-data-list{padding:0}tui-dropdown-mobile:where(*[data-tui-version=\"5.33.0-canary.ea8b5c8\"])>.t-container tui-data-list [tuiOption]{box-sizing:content-box;border-radius:0}tui-dropdown-mobile:where(*[data-tui-version=\"5.33.0-canary.ea8b5c8\"]) [tuiDropdownButton][tuiDropdownButton]{position:fixed;display:inline-flex;inset-inline-end:1rem;inset-block-end:max(1rem,env(safe-area-inset-bottom))}.t-dropdown-mobile:where(*[data-tui-version=\"5.33.0-canary.ea8b5c8\"]){touch-action:none;visibility:hidden}.t-dropdown-mobile:where(*[data-tui-version=\"5.33.0-canary.ea8b5c8\"]) *{touch-action:inherit;visibility:inherit}.t-dropdown-mobile:where(*[data-tui-version=\"5.33.0-canary.ea8b5c8\"]) tui-root{visibility:visible}.t-dropdown-mobile:where(*[data-tui-version=\"5.33.0-canary.ea8b5c8\"]) tui-root .t-root-content,.t-dropdown-mobile:where(*[data-tui-version=\"5.33.0-canary.ea8b5c8\"]) tui-root tui-dialogs{visibility:hidden}\n"], dependencies: [{ kind: "directive", type: PolymorpheusOutlet, selector: "[polymorpheusOutlet]", inputs: ["polymorpheusOutlet", "polymorpheusOutletContext"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush, encapsulation: i0.ViewEncapsulation.None }); }
79
+ `, isInline: true, styles: ["tui-dropdown-mobile:where(*[data-tui-version=\"5.34.0\"]){scrollbar-width:none;position:absolute;inset-block-start:0;inset-inline-start:0;inline-size:100%;block-size:100%;visibility:visible!important;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);pointer-events:auto}tui-dropdown-mobile:where(*[data-tui-version=\"5.34.0\"])::-webkit-scrollbar,tui-dropdown-mobile:where(*[data-tui-version=\"5.34.0\"])::-webkit-scrollbar-thumb{display:none}tui-dropdown-mobile:where(*[data-tui-version=\"5.34.0\"]).tui-enter,tui-dropdown-mobile:where(*[data-tui-version=\"5.34.0\"]).tui-leave{animation-name:tuiFade,tuiSlide}tui-dropdown-mobile:where(*[data-tui-version=\"5.34.0\"]):after{content:\"\";display:block;block-size:1px}tui-dropdown-mobile:where(*[data-tui-version=\"5.34.0\"])>.t-container{scrollbar-width:none;position:sticky;display:flex;flex-direction:column;inset-block-start:0;block-size:100%;overflow:auto;padding:0 var(--tui-padding-inline);touch-action:pan-y!important;--tui-padding-inline: 1rem}tui-dropdown-mobile:where(*[data-tui-version=\"5.34.0\"])>.t-container::-webkit-scrollbar,tui-dropdown-mobile:where(*[data-tui-version=\"5.34.0\"])>.t-container::-webkit-scrollbar-thumb{display:none}tui-dropdown-mobile:where(*[data-tui-version=\"5.34.0\"])>.t-container tui-data-list,tui-dropdown-mobile:where(*[data-tui-version=\"5.34.0\"])>.t-container tui-data-list-wrapper{flex:1;padding:0}tui-dropdown-mobile:where(*[data-tui-version=\"5.34.0\"])>.t-container tui-data-list [tuiOption],tui-dropdown-mobile:where(*[data-tui-version=\"5.34.0\"])>.t-container tui-data-list-wrapper [tuiOption]{box-sizing:content-box;border-radius:0}tui-dropdown-mobile:where(*[data-tui-version=\"5.34.0\"])>.t-container [tuiFloatingContainer]{inset-block-end:0;padding-block-end:max(0px,calc(1rem - env(safe-area-inset-bottom)));--t-background: transparent}tui-dropdown-mobile:where(*[data-tui-version=\"5.34.0\"])>.t-container [tuiFloatingContainer] [tuiButton]{justify-self:end}tui-dropdown-mobile:where(*[data-tui-version=\"5.34.0\"]) [tuiDropdownButton][tuiDropdownButton]{position:fixed;display:inline-flex;inset-inline-end:1rem;inset-block-end:max(1rem,env(safe-area-inset-bottom))}.t-dropdown-mobile:where(*[data-tui-version=\"5.34.0\"]){touch-action:none;visibility:hidden}.t-dropdown-mobile:where(*[data-tui-version=\"5.34.0\"]) *{touch-action:inherit;visibility:inherit}.t-dropdown-mobile:where(*[data-tui-version=\"5.34.0\"]) tui-root{visibility:visible}.t-dropdown-mobile:where(*[data-tui-version=\"5.34.0\"]) tui-root .t-root-content,.t-dropdown-mobile:where(*[data-tui-version=\"5.34.0\"]) tui-root tui-dialogs{visibility:hidden}\n"], dependencies: [{ kind: "directive", type: PolymorpheusOutlet, selector: "[polymorpheusOutlet]", inputs: ["polymorpheusOutlet", "polymorpheusOutletContext"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush, encapsulation: i0.ViewEncapsulation.None }); }
79
80
  }
80
81
  i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.25", ngImport: i0, type: TuiDropdownMobileComponent, decorators: [{
81
82
  type: Component,
@@ -85,14 +86,14 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.25", ngImpo
85
86
  {{ text }}
86
87
  </ng-container>
87
88
  </div>
88
- `, encapsulation: ViewEncapsulation.None, changeDetection: ChangeDetectionStrategy.OnPush, hostDirectives: [TuiAnimated, TuiActiveZone], host: {
89
+ `, encapsulation: ViewEncapsulation.None, changeDetection: ChangeDetectionStrategy.OnPush, providers: [tuiButtonOptionsProvider({ size: 'm', appearance: 'accent' })], hostDirectives: [TuiAnimated, TuiActiveZone], host: {
89
90
  'data-tui-version': TUI_VERSION,
90
91
  '(document:click.zoneless.capture)': 'onClick($event)',
91
92
  '(pointerdown.prevent)': '0',
92
93
  '(visualViewport>resize.zoneless)': 'refresh()',
93
94
  '(visualViewport>scroll.zoneless)': 'refresh()',
94
95
  '(window>scroll.zoneless.capture)': 'refresh()',
95
- }, styles: ["tui-dropdown-mobile:where(*[data-tui-version=\"5.33.0-canary.ea8b5c8\"]){scrollbar-width:none;position:absolute;inset-block-start:0;inset-inline-start:0;inline-size:100%;block-size:100%;visibility:visible!important;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);pointer-events:auto}tui-dropdown-mobile:where(*[data-tui-version=\"5.33.0-canary.ea8b5c8\"])::-webkit-scrollbar,tui-dropdown-mobile:where(*[data-tui-version=\"5.33.0-canary.ea8b5c8\"])::-webkit-scrollbar-thumb{display:none}tui-dropdown-mobile:where(*[data-tui-version=\"5.33.0-canary.ea8b5c8\"]).tui-enter,tui-dropdown-mobile:where(*[data-tui-version=\"5.33.0-canary.ea8b5c8\"]).tui-leave{animation-name:tuiFade,tuiSlide}tui-dropdown-mobile:where(*[data-tui-version=\"5.33.0-canary.ea8b5c8\"]):after{content:\"\";display:block;block-size:1px}tui-dropdown-mobile:where(*[data-tui-version=\"5.33.0-canary.ea8b5c8\"])>.t-container{scrollbar-width:none;position:sticky;inset-block-start:0;block-size:100%;overflow:auto;padding:0 var(--tui-padding-inline);touch-action:pan-y!important;--tui-padding-inline: 1rem}tui-dropdown-mobile:where(*[data-tui-version=\"5.33.0-canary.ea8b5c8\"])>.t-container::-webkit-scrollbar,tui-dropdown-mobile:where(*[data-tui-version=\"5.33.0-canary.ea8b5c8\"])>.t-container::-webkit-scrollbar-thumb{display:none}tui-dropdown-mobile:where(*[data-tui-version=\"5.33.0-canary.ea8b5c8\"])>.t-container tui-data-list{padding:0}tui-dropdown-mobile:where(*[data-tui-version=\"5.33.0-canary.ea8b5c8\"])>.t-container tui-data-list [tuiOption]{box-sizing:content-box;border-radius:0}tui-dropdown-mobile:where(*[data-tui-version=\"5.33.0-canary.ea8b5c8\"]) [tuiDropdownButton][tuiDropdownButton]{position:fixed;display:inline-flex;inset-inline-end:1rem;inset-block-end:max(1rem,env(safe-area-inset-bottom))}.t-dropdown-mobile:where(*[data-tui-version=\"5.33.0-canary.ea8b5c8\"]){touch-action:none;visibility:hidden}.t-dropdown-mobile:where(*[data-tui-version=\"5.33.0-canary.ea8b5c8\"]) *{touch-action:inherit;visibility:inherit}.t-dropdown-mobile:where(*[data-tui-version=\"5.33.0-canary.ea8b5c8\"]) tui-root{visibility:visible}.t-dropdown-mobile:where(*[data-tui-version=\"5.33.0-canary.ea8b5c8\"]) tui-root .t-root-content,.t-dropdown-mobile:where(*[data-tui-version=\"5.33.0-canary.ea8b5c8\"]) tui-root tui-dialogs{visibility:hidden}\n"] }]
96
+ }, styles: ["tui-dropdown-mobile:where(*[data-tui-version=\"5.34.0\"]){scrollbar-width:none;position:absolute;inset-block-start:0;inset-inline-start:0;inline-size:100%;block-size:100%;visibility:visible!important;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);pointer-events:auto}tui-dropdown-mobile:where(*[data-tui-version=\"5.34.0\"])::-webkit-scrollbar,tui-dropdown-mobile:where(*[data-tui-version=\"5.34.0\"])::-webkit-scrollbar-thumb{display:none}tui-dropdown-mobile:where(*[data-tui-version=\"5.34.0\"]).tui-enter,tui-dropdown-mobile:where(*[data-tui-version=\"5.34.0\"]).tui-leave{animation-name:tuiFade,tuiSlide}tui-dropdown-mobile:where(*[data-tui-version=\"5.34.0\"]):after{content:\"\";display:block;block-size:1px}tui-dropdown-mobile:where(*[data-tui-version=\"5.34.0\"])>.t-container{scrollbar-width:none;position:sticky;display:flex;flex-direction:column;inset-block-start:0;block-size:100%;overflow:auto;padding:0 var(--tui-padding-inline);touch-action:pan-y!important;--tui-padding-inline: 1rem}tui-dropdown-mobile:where(*[data-tui-version=\"5.34.0\"])>.t-container::-webkit-scrollbar,tui-dropdown-mobile:where(*[data-tui-version=\"5.34.0\"])>.t-container::-webkit-scrollbar-thumb{display:none}tui-dropdown-mobile:where(*[data-tui-version=\"5.34.0\"])>.t-container tui-data-list,tui-dropdown-mobile:where(*[data-tui-version=\"5.34.0\"])>.t-container tui-data-list-wrapper{flex:1;padding:0}tui-dropdown-mobile:where(*[data-tui-version=\"5.34.0\"])>.t-container tui-data-list [tuiOption],tui-dropdown-mobile:where(*[data-tui-version=\"5.34.0\"])>.t-container tui-data-list-wrapper [tuiOption]{box-sizing:content-box;border-radius:0}tui-dropdown-mobile:where(*[data-tui-version=\"5.34.0\"])>.t-container [tuiFloatingContainer]{inset-block-end:0;padding-block-end:max(0px,calc(1rem - env(safe-area-inset-bottom)));--t-background: transparent}tui-dropdown-mobile:where(*[data-tui-version=\"5.34.0\"])>.t-container [tuiFloatingContainer] [tuiButton]{justify-self:end}tui-dropdown-mobile:where(*[data-tui-version=\"5.34.0\"]) [tuiDropdownButton][tuiDropdownButton]{position:fixed;display:inline-flex;inset-inline-end:1rem;inset-block-end:max(1rem,env(safe-area-inset-bottom))}.t-dropdown-mobile:where(*[data-tui-version=\"5.34.0\"]){touch-action:none;visibility:hidden}.t-dropdown-mobile:where(*[data-tui-version=\"5.34.0\"]) *{touch-action:inherit;visibility:inherit}.t-dropdown-mobile:where(*[data-tui-version=\"5.34.0\"]) tui-root{visibility:visible}.t-dropdown-mobile:where(*[data-tui-version=\"5.34.0\"]) tui-root .t-root-content,.t-dropdown-mobile:where(*[data-tui-version=\"5.34.0\"]) tui-root tui-dialogs{visibility:hidden}\n"] }]
96
97
  }], ctorParameters: () => [] });
97
98
 
98
99
  class TuiDropdownMobile {
@@ -1 +1 @@
1
- {"version":3,"file":"taiga-ui-addon-mobile-directives-dropdown-mobile.mjs","sources":["../../../projects/addon-mobile/directives/dropdown-mobile/dropdown-mobile.component.ts","../../../projects/addon-mobile/directives/dropdown-mobile/dropdown-mobile.directive.ts","../../../projects/addon-mobile/directives/dropdown-mobile/taiga-ui-addon-mobile-directives-dropdown-mobile.ts"],"sourcesContent":["import {DOCUMENT} from '@angular/common';\nimport {\n ChangeDetectionStrategy,\n Component,\n inject,\n type OnDestroy,\n ViewEncapsulation,\n} from '@angular/core';\nimport {TuiKeyboardService} from '@taiga-ui/addon-mobile/services';\nimport {TUI_VERSION} from '@taiga-ui/cdk/constants';\nimport {TuiActiveZone} from '@taiga-ui/cdk/directives/active-zone';\nimport {TuiAnimated} from '@taiga-ui/cdk/directives/animated';\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/portals/dropdown';\nimport {PolymorpheusOutlet} from '@taiga-ui/polymorpheus';\n\nconst GAP = 16;\n\n@Component({\n selector: 'tui-dropdown-mobile',\n imports: [PolymorpheusOutlet],\n template: `\n <div class=\"t-container\">\n <ng-container *polymorpheusOutlet=\"dropdown.content() as text; context: ctx\">\n {{ text }}\n </ng-container>\n </div>\n `,\n styles: `\n [data-tui-version='${TUI_VERSION}'] {\n @import './dropdown-mobile.style.less';\n }\n `,\n encapsulation: ViewEncapsulation.None,\n changeDetection: ChangeDetectionStrategy.OnPush,\n hostDirectives: [TuiAnimated, TuiActiveZone],\n host: {\n 'data-tui-version': TUI_VERSION,\n '(document:click.zoneless.capture)': 'onClick($event)',\n '(pointerdown.prevent)': '0',\n '(visualViewport>resize.zoneless)': 'refresh()',\n '(visualViewport>scroll.zoneless)': 'refresh()',\n '(window>scroll.zoneless.capture)': 'refresh()',\n },\n})\nexport class TuiDropdownMobileComponent implements OnDestroy {\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(() => this.refresh());\n\n protected readonly dropdown = inject(TuiDropdownDirective);\n protected readonly ctx = {$implicit: (): void => this.dropdown.toggle(false)};\n\n constructor() {\n this.observer.observe(this.dropdown.el);\n this.doc.documentElement.style.setProperty('scroll-behavior', 'initial');\n }\n\n public ngOnDestroy(): void {\n this.observer.disconnect();\n this.doc.body.classList.remove('t-dropdown-mobile');\n this.doc.body.removeAttribute('data-tui-version');\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 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 refresh(): void {\n const {offsetTop = 0, height = 0} = this.doc.defaultView?.visualViewport || {};\n\n this.doc.body.style.removeProperty('--t-root-top');\n\n if (\n !this.focused ||\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 const top = `calc(${tuiPx(offsetTop - rect.top)} + ${topMargin})`;\n\n this.el.style.setProperty('top', `calc(${tuiPx(offsetTop)} + ${offset})`);\n this.el.style.setProperty('height', `calc(${tuiPx(height)} - ${offset})`);\n this.doc.body.classList.add('t-dropdown-mobile');\n this.doc.body.setAttribute('data-tui-version', TUI_VERSION);\n this.doc.body.style.setProperty('--t-root-top', top);\n }\n\n private get focused(): boolean {\n return this.dropdown.el.contains(tuiGetFocused(this.doc));\n }\n}\n","import {Directive, inject} from '@angular/core';\nimport {WA_IS_MOBILE} from '@ng-web-apis/platform';\nimport {tuiIsHTMLElement} from '@taiga-ui/cdk/utils/dom';\nimport {TUI_DATA_LIST_SIZE} from '@taiga-ui/core/components/data-list';\nimport {\n TUI_DROPDOWN_COMPONENT,\n TuiDropdownDirective,\n} from '@taiga-ui/core/portals/dropdown';\n\nimport {TuiDropdownMobileComponent} from './dropdown-mobile.component';\n\n@Directive({\n selector: '[tuiDropdownMobile]',\n providers: [\n {\n provide: TUI_DROPDOWN_COMPONENT,\n useFactory: () =>\n inject(WA_IS_MOBILE)\n ? TuiDropdownMobileComponent\n : inject(TUI_DROPDOWN_COMPONENT, {skipSelf: true}),\n },\n {\n provide: TUI_DATA_LIST_SIZE,\n useFactory: () => (inject(WA_IS_MOBILE) ? 'l' : ''),\n },\n ],\n host: {\n '[style.visibility]': 'dropdown.ref() ? \"visible\" : \"\"',\n '(mousedown)': 'onMouseDown($event)',\n },\n})\nexport class TuiDropdownMobile {\n private readonly isMobile = inject(WA_IS_MOBILE);\n\n protected readonly dropdown = inject(TuiDropdownDirective);\n\n protected onMouseDown(event: MouseEvent): void {\n if (\n !this.isMobile ||\n !tuiIsHTMLElement(event.target) ||\n !event.target.matches('input,textarea')\n ) {\n return;\n }\n\n event.preventDefault();\n event.target.focus({preventScroll: true});\n }\n}\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './index';\n"],"names":[],"mappings":";;;;;;;;;;;;;;;;;AAkBA,MAAM,GAAG,GAAG,EAAE;MA6BD,0BAA0B,CAAA;AAUnC,IAAA,WAAA,GAAA;QATiB,IAAA,CAAA,EAAE,GAAG,gBAAgB,EAAE;AACvB,QAAA,IAAA,CAAA,QAAQ,GAAG,MAAM,CAAC,kBAAkB,CAAC;AACrC,QAAA,IAAA,CAAA,GAAG,GAAG,MAAM,CAAC,QAAQ,CAAC;QACtB,IAAA,CAAA,SAAS,GAAG,IAAI,CAAC,GAAG,CAAC,eAAe,CAAC,SAAS;AAC9C,QAAA,IAAA,CAAA,QAAQ,GAAG,IAAI,cAAc,CAAC,MAAM,IAAI,CAAC,OAAO,EAAE,CAAC;AAEjD,QAAA,IAAA,CAAA,QAAQ,GAAG,MAAM,CAAC,oBAAoB,CAAC;AACvC,QAAA,IAAA,CAAA,GAAG,GAAG,EAAC,SAAS,EAAE,MAAY,IAAI,CAAC,QAAQ,CAAC,MAAM,CAAC,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A;AACJ,qBAAA;AACD,oBAAA,IAAI,EAAE;AACF,wBAAA,oBAAoB,EAAE,iCAAiC;AACvD,wBAAA,aAAa,EAAE,qBAAqB;AACvC,qBAAA;AACJ,iBAAA;;;AC9BD;;AAEG;;;;"}
1
+ {"version":3,"file":"taiga-ui-addon-mobile-directives-dropdown-mobile.mjs","sources":["../../../projects/addon-mobile/directives/dropdown-mobile/dropdown-mobile.component.ts","../../../projects/addon-mobile/directives/dropdown-mobile/dropdown-mobile.directive.ts","../../../projects/addon-mobile/directives/dropdown-mobile/taiga-ui-addon-mobile-directives-dropdown-mobile.ts"],"sourcesContent":["import {DOCUMENT} from '@angular/common';\nimport {\n ChangeDetectionStrategy,\n Component,\n inject,\n type OnDestroy,\n ViewEncapsulation,\n} from '@angular/core';\nimport {TuiKeyboardService} from '@taiga-ui/addon-mobile/services';\nimport {TUI_VERSION} from '@taiga-ui/cdk/constants';\nimport {TuiActiveZone} from '@taiga-ui/cdk/directives/active-zone';\nimport {TuiAnimated} from '@taiga-ui/cdk/directives/animated';\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 {tuiButtonOptionsProvider} from '@taiga-ui/core/components/button';\nimport {TuiDropdownDirective} from '@taiga-ui/core/portals/dropdown';\nimport {PolymorpheusOutlet} from '@taiga-ui/polymorpheus';\n\nconst GAP = 16;\n\n@Component({\n selector: 'tui-dropdown-mobile',\n imports: [PolymorpheusOutlet],\n template: `\n <div class=\"t-container\">\n <ng-container *polymorpheusOutlet=\"dropdown.content() as text; context: ctx\">\n {{ text }}\n </ng-container>\n </div>\n `,\n styles: `\n [data-tui-version='${TUI_VERSION}'] {\n @import './dropdown-mobile.style.less';\n }\n `,\n encapsulation: ViewEncapsulation.None,\n changeDetection: ChangeDetectionStrategy.OnPush,\n providers: [tuiButtonOptionsProvider({size: 'm', appearance: 'accent'})],\n hostDirectives: [TuiAnimated, TuiActiveZone],\n host: {\n 'data-tui-version': TUI_VERSION,\n '(document:click.zoneless.capture)': 'onClick($event)',\n '(pointerdown.prevent)': '0',\n '(visualViewport>resize.zoneless)': 'refresh()',\n '(visualViewport>scroll.zoneless)': 'refresh()',\n '(window>scroll.zoneless.capture)': 'refresh()',\n },\n})\nexport class TuiDropdownMobileComponent implements OnDestroy {\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(() => this.refresh());\n\n protected readonly dropdown = inject(TuiDropdownDirective);\n protected readonly ctx = {$implicit: (): void => this.dropdown.toggle(false)};\n\n constructor() {\n this.observer.observe(this.dropdown.el);\n this.doc.documentElement.style.setProperty('scroll-behavior', 'initial');\n }\n\n public ngOnDestroy(): void {\n this.observer.disconnect();\n this.doc.body.classList.remove('t-dropdown-mobile');\n this.doc.body.removeAttribute('data-tui-version');\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 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 refresh(): void {\n const {offsetTop = 0, height = 0} = this.doc.defaultView?.visualViewport || {};\n\n this.doc.body.style.removeProperty('--t-root-top');\n\n if (\n !this.focused ||\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 const top = `calc(${tuiPx(offsetTop - rect.top)} + ${topMargin})`;\n\n this.el.style.setProperty('top', `calc(${tuiPx(offsetTop)} + ${offset})`);\n this.el.style.setProperty('height', `calc(${tuiPx(height)} - ${offset})`);\n this.doc.body.classList.add('t-dropdown-mobile');\n this.doc.body.setAttribute('data-tui-version', TUI_VERSION);\n this.doc.body.style.setProperty('--t-root-top', top);\n }\n\n private get focused(): boolean {\n return this.dropdown.el.contains(tuiGetFocused(this.doc));\n }\n}\n","import {Directive, inject} from '@angular/core';\nimport {WA_IS_MOBILE} from '@ng-web-apis/platform';\nimport {tuiIsHTMLElement} from '@taiga-ui/cdk/utils/dom';\nimport {TUI_DATA_LIST_SIZE} from '@taiga-ui/core/components/data-list';\nimport {\n TUI_DROPDOWN_COMPONENT,\n TuiDropdownDirective,\n} from '@taiga-ui/core/portals/dropdown';\n\nimport {TuiDropdownMobileComponent} from './dropdown-mobile.component';\n\n@Directive({\n selector: '[tuiDropdownMobile]',\n providers: [\n {\n provide: TUI_DROPDOWN_COMPONENT,\n useFactory: () =>\n inject(WA_IS_MOBILE)\n ? TuiDropdownMobileComponent\n : inject(TUI_DROPDOWN_COMPONENT, {skipSelf: true}),\n },\n {\n provide: TUI_DATA_LIST_SIZE,\n useFactory: () => (inject(WA_IS_MOBILE) ? 'l' : ''),\n },\n ],\n host: {\n '[style.visibility]': 'dropdown.ref() ? \"visible\" : \"\"',\n '(mousedown)': 'onMouseDown($event)',\n },\n})\nexport class TuiDropdownMobile {\n private readonly isMobile = inject(WA_IS_MOBILE);\n\n protected readonly dropdown = inject(TuiDropdownDirective);\n\n protected onMouseDown(event: MouseEvent): void {\n if (\n !this.isMobile ||\n !tuiIsHTMLElement(event.target) ||\n !event.target.matches('input,textarea')\n ) {\n return;\n }\n\n event.preventDefault();\n event.target.focus({preventScroll: true});\n }\n}\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './index';\n"],"names":[],"mappings":";;;;;;;;;;;;;;;;;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,CAAC,YAAY;AACf,sBAAE;sBACA,MAAM,CAAC,sBAAsB,EAAE,EAAC,QAAQ,EAAE,IAAI,EAAC,CAAC;AAC7D,aAAA;AACD,YAAA;AACI,gBAAA,OAAO,EAAE,kBAAkB;AAC3B,gBAAA,UAAU,EAAE,OAAO,MAAM,CAAC,YAAY,CAAC,GAAG,GAAG,GAAG,EAAE,CAAC;AACtD,aAAA;AACJ,SAAA,EAAA,QAAA,EAAA,EAAA,EAAA,CAAA,CAAA;;4FAMQ,iBAAiB,EAAA,UAAA,EAAA,CAAA;kBApB7B,SAAS;AAAC,YAAA,IAAA,EAAA,CAAA;AACP,oBAAA,QAAQ,EAAE,qBAAqB;AAC/B,oBAAA,SAAS,EAAE;AACP,wBAAA;AACI,4BAAA,OAAO,EAAE,sBAAsB;AAC/B,4BAAA,UAAU,EAAE,MACR,MAAM,CAAC,YAAY;AACf,kCAAE;kCACA,MAAM,CAAC,sBAAsB,EAAE,EAAC,QAAQ,EAAE,IAAI,EAAC,CAAC;AAC7D,yBAAA;AACD,wBAAA;AACI,4BAAA,OAAO,EAAE,kBAAkB;AAC3B,4BAAA,UAAU,EAAE,OAAO,MAAM,CAAC,YAAY,CAAC,GAAG,GAAG,GAAG,EAAE,CAAC;AACtD,yBAAA;AACJ,qBAAA;AACD,oBAAA,IAAI,EAAE;AACF,wBAAA,oBAAoB,EAAE,iCAAiC;AACvD,wBAAA,aAAa,EAAE,qBAAqB;AACvC,qBAAA;AACJ,iBAAA;;;AC9BD;;AAEG;;;;"}
@@ -13,11 +13,11 @@ const TO = [{ scale: '0', opacity: '0.12' }, { opacity: '0.12' }];
13
13
  const FROM = [{ opacity: '0.12' }, { opacity: '0' }];
14
14
  class Styles {
15
15
  static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.2.25", ngImport: i0, type: Styles, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
16
- static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "19.2.25", type: Styles, isStandalone: true, selector: "ng-component", exportAs: ["tui-ripple-5.33.0-canary.ea8b5c8"], ngImport: i0, template: '', isInline: true, styles: [".tui-ripple:where(*[data-tui-version=\"5.33.0-canary.ea8b5c8\"]){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 }); }
16
+ static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "19.2.25", type: Styles, isStandalone: true, selector: "ng-component", exportAs: ["tui-ripple-5.34.0"], ngImport: i0, template: '', isInline: true, styles: [".tui-ripple:where(*[data-tui-version=\"5.34.0\"]){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 }); }
17
17
  }
18
18
  i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.25", ngImport: i0, type: Styles, decorators: [{
19
19
  type: Component,
20
- args: [{ template: '', encapsulation: ViewEncapsulation.None, changeDetection: ChangeDetectionStrategy.OnPush, exportAs: `tui-ripple-${TUI_VERSION}`, styles: [".tui-ripple:where(*[data-tui-version=\"5.33.0-canary.ea8b5c8\"]){position:absolute;z-index:100;opacity:.12;border-radius:100%;background:var(--tui-ripple-background, currentColor);animation-fill-mode:forwards;pointer-events:none}\n"] }]
20
+ args: [{ template: '', encapsulation: ViewEncapsulation.None, changeDetection: ChangeDetectionStrategy.OnPush, exportAs: `tui-ripple-${TUI_VERSION}`, styles: [".tui-ripple:where(*[data-tui-version=\"5.34.0\"]){position:absolute;z-index:100;opacity:.12;border-radius:100%;background:var(--tui-ripple-background, currentColor);animation-fill-mode:forwards;pointer-events:none}\n"] }]
21
21
  }] });
22
22
  class TuiRipple {
23
23
  constructor() {
@@ -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 {TUI_VERSION} from '@taiga-ui/cdk/constants';\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 = [{scale: '0', opacity: '0.12'}, {opacity: '0.12'}];\nconst FROM = [{opacity: '0.12'}, {opacity: '0'}];\n\n@Component({\n template: '',\n styles: `\n [data-tui-version='${TUI_VERSION}'] {\n @import './ripple.style.less';\n }\n `,\n encapsulation: ViewEncapsulation.None,\n changeDetection: ChangeDetectionStrategy.OnPush,\n exportAs: `tui-ripple-${TUI_VERSION}`,\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 public readonly tuiRipple = input('');\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\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":";;;;;;;;;;;AAkBA,MAAM,EAAE,GAAG,CAAC,EAAC,KAAK,EAAE,GAAG,EAAE,OAAO,EAAE,MAAM,EAAC,EAAE,EAAC,OAAO,EAAE,MAAM,EAAC,CAAC;AAC7D,MAAM,IAAI,GAAG,CAAC,EAAC,OAAO,EAAE,MAAM,EAAC,EAAE,EAAC,OAAO,EAAE,GAAG,EAAC,CAAC;AAEhD,MAWM,MAAM,CAAA;+GAAN,MAAM,EAAA,IAAA,EAAA,EAAA,EAAA,MAAA,EAAA,EAAA,CAAA,eAAA,CAAA,SAAA,EAAA,CAAA,CAAA;AAAN,I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EAA4E;AACnF,qBAAA;AACJ,iBAAA;;;ACxCD;;AAEG;;;;"}
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 {TUI_VERSION} from '@taiga-ui/cdk/constants';\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 = [{scale: '0', opacity: '0.12'}, {opacity: '0.12'}];\nconst FROM = [{opacity: '0.12'}, {opacity: '0'}];\n\n@Component({\n template: '',\n styles: `\n [data-tui-version='${TUI_VERSION}'] {\n @import './ripple.style.less';\n }\n `,\n encapsulation: ViewEncapsulation.None,\n changeDetection: ChangeDetectionStrategy.OnPush,\n exportAs: `tui-ripple-${TUI_VERSION}`,\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 public readonly tuiRipple = input('');\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\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":";;;;;;;;;;;AAkBA,MAAM,EAAE,GAAG,CAAC,EAAC,KAAK,EAAE,GAAG,EAAE,OAAO,EAAE,MAAM,EAAC,EAAE,EAAC,OAAO,EAAE,MAAM,EAAC,CAAC;AAC7D,MAAM,IAAI,GAAG,CAAC,EAAC,OAAO,EAAE,MAAM,EAAC,EAAE,EAAC,OAAO,EAAE,GAAG,EAAC,CAAC;AAEhD,MAWM,MAAM,CAAA;+GAAN,MAAM,EAAA,IAAA,EAAA,EAAA,EAAA,MAAA,EAAA,EAAA,CAAA,e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A,IAAI,EAAE;AACF,wBAAA,wBAAwB,EACpB,4EAA4E;AACnF,qBAAA;AACJ,iBAAA;;;ACxCD;;AAEG;;;;"}
@@ -50,7 +50,9 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.25", ngImpo
50
50
  args: [{ providedIn: 'root' }]
51
51
  }] });
52
52
 
53
+ /** @deprecated: TODO drop in v6 */
53
54
  const TUI_THEME_COLOR = new InjectionToken(ngDevMode ? 'TUI_THEME_COLOR' : '', { factory: () => inject(Meta).getTag('name="theme-color"')?.content ?? '' });
55
+ /** @deprecated: TODO drop in v6 */
54
56
  class TuiThemeColorService {
55
57
  constructor() {
56
58
  this.current = inject(TUI_THEME_COLOR);
@@ -1 +1 @@
1
- {"version":3,"file":"taiga-ui-addon-mobile-services.mjs","sources":["../../../projects/addon-mobile/services/keyboard.service.ts","../../../projects/addon-mobile/services/theme-color.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({providedIn: 'root'})\nexport class TuiKeyboardService implements OnDestroy {\n private readonly doc = inject(DOCUMENT);\n\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","import {DOCUMENT} from '@angular/common';\nimport {inject, Injectable, InjectionToken} from '@angular/core';\nimport {Meta} from '@angular/platform-browser';\n\nexport const TUI_THEME_COLOR = new InjectionToken<string>(\n ngDevMode ? 'TUI_THEME_COLOR' : '',\n {factory: () => inject(Meta).getTag('name=\"theme-color\"')?.content ?? ''},\n);\n\ninterface TuiThemeColor {\n get color(): string;\n set color(value: string);\n}\n\n@Injectable({providedIn: 'root'})\nexport class TuiThemeColorService implements TuiThemeColor {\n private current = inject(TUI_THEME_COLOR);\n private readonly doc = inject(DOCUMENT);\n private readonly meta = inject(Meta);\n\n constructor() {\n this.color = this.current;\n }\n\n public get color(): string {\n return this.current;\n }\n\n public set color(content: string) {\n this.current = content;\n this.meta.updateTag({name: 'theme-color', content});\n this.doc.documentElement.style.setProperty('--tui-theme-color', content);\n }\n}\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './index';\n"],"names":[],"mappings":";;;;;;;MAMa,kBAAkB,CAAA;AAD/B,IAAA,WAAA,GAAA;AAEqB,QAAA,IAAA,CAAA,GAAG,GAAG,MAAM,CAAC,QAAQ,CAAC;QAEtB,IAAA,CAAA,GAAG,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,QAAA,CAAC,CAAC;QAGM,IAAA,CAAA,SAAS,GAAG,EAAE;AAoCzB,IAAA;IAlCU,WAAW,GAAA;AACd,QAAA,IAAI,C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keyboard.service.ts","../../../projects/addon-mobile/services/theme-color.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({providedIn: 'root'})\nexport class TuiKeyboardService implements OnDestroy {\n private readonly doc = inject(DOCUMENT);\n\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","import {DOCUMENT} from '@angular/common';\nimport {inject, Injectable, InjectionToken} from '@angular/core';\nimport {Meta} from '@angular/platform-browser';\n\n/** @deprecated: TODO drop in v6 */\nexport const TUI_THEME_COLOR = new InjectionToken<string>(\n ngDevMode ? 'TUI_THEME_COLOR' : '',\n {factory: () => inject(Meta).getTag('name=\"theme-color\"')?.content ?? ''},\n);\n\ninterface TuiThemeColor {\n get color(): string;\n set color(value: string);\n}\n\n/** @deprecated: TODO drop in v6 */\n@Injectable({providedIn: 'root'})\nexport class TuiThemeColorService implements TuiThemeColor {\n private current = inject(TUI_THEME_COLOR);\n private readonly doc = inject(DOCUMENT);\n private readonly meta = inject(Meta);\n\n constructor() {\n this.color = this.current;\n }\n\n public get color(): string {\n return this.current;\n }\n\n public set color(content: string) {\n this.current = content;\n this.meta.updateTag({name: 'theme-color', content});\n this.doc.documentElement.style.setProperty('--tui-theme-color', content);\n }\n}\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './index';\n"],"names":[],"mappings":";;;;;;;MAMa,kBAAkB,CAAA;AAD/B,IAAA,WAAA,GAAA;AAEqB,QAAA,IAAA,CAAA,GAAG,GAAG,MAAM,CAAC,QAAQ,CAAC;QAEtB,IAAA,CAAA,GAAG,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,QAAA,CAAC,CAAC;QAGM,IAAA,CAAA,SAAS,GAAG,EAAE;AAoCzB,IAAA;IAlCU,WAAW,GAAA;AACd,QAAA,IAAI,CAAC,GAAG,CAAC,WAAW,EAAE;QACtB,IAAI,CAAC,IAAI,EAAE;IACf;IAEO,MAAM,GAAA;AACT,QAAA,IAAI,IAAI,CAAC,OAAO,EAAE;YACd,IAAI,CAAC,IAAI,EAAE;QACf;aAAO;YACH,IAAI,CAAC,IAAI,EAAE;QACf;IACJ;IAEO,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;QACJ;AAEA,QAAA,IAAI,CAAC,OAAO,GAAG,OAAO;AACtB,QAAA,IAAI,CAAC,SAAS,GAAG,OAAO,CAAC,SAAS;AAClC,QAAA,OA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IACvB;IAEA,IAAW,KAAK,CAAC,OAAe,EAAA;AAC5B,QAAA,IAAI,CAAC,OAAO,GAAG,OAAO;AACtB,QAAA,IAAI,CAAC,IAAI,CAAC,SAAS,CAAC,EAAC,IAAI,EAAE,aAAa,EAAE,OAAO,EAAC,CAAC;AACnD,QAAA,IAAI,CAAC,GAAG,CAAC,eAAe,CAAC,KAAK,CAAC,WAAW,CAAC,mBAAmB,EAAE,OAAO,CAAC;IAC5E;+GAjBS,oBAAoB,EAAA,IAAA,EAAA,EAAA,EAAA,MAAA,EAAA,EAAA,CAAA,eAAA,CAAA,UAAA,EAAA,CAAA,CAAA;AAApB,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,oBAAoB,cADR,MAAM,EAAA,CAAA,CAAA;;4FAClB,oBAAoB,EAAA,UAAA,EAAA,CAAA;kBADhC,UAAU;mBAAC,EAAC,UAAU,EAAE,MAAM,EAAC;;;AChBhC;;AAEG;;;;"}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@taiga-ui/addon-mobile",
3
- "version": "5.33.0-canary.ea8b5c8",
3
+ "version": "5.34.0",
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",
@@ -120,10 +120,10 @@
120
120
  "@ng-web-apis/common": "^5.4.1",
121
121
  "@ng-web-apis/platform": "^5.4.1",
122
122
  "@ng-web-apis/resize-observer": "^5.4.1",
123
- "@taiga-ui/cdk": "5.33.0",
124
- "@taiga-ui/core": "5.33.0",
125
- "@taiga-ui/kit": "5.33.0",
126
- "@taiga-ui/layout": "5.33.0",
123
+ "@taiga-ui/cdk": "5.34.0",
124
+ "@taiga-ui/core": "5.34.0",
125
+ "@taiga-ui/kit": "5.34.0",
126
+ "@taiga-ui/layout": "5.34.0",
127
127
  "@taiga-ui/polymorpheus": "^5.0.1",
128
128
  "rxjs": ">=7.0.0"
129
129
  },
@@ -1,10 +1,12 @@
1
1
  import { InjectionToken } from '@angular/core';
2
2
  import * as i0 from "@angular/core";
3
+ /** @deprecated: TODO drop in v6 */
3
4
  export declare const TUI_THEME_COLOR: InjectionToken<string>;
4
5
  interface TuiThemeColor {
5
6
  get color(): string;
6
7
  set color(value: string);
7
8
  }
9
+ /** @deprecated: TODO drop in v6 */
8
10
  export declare class TuiThemeColorService implements TuiThemeColor {
9
11
  private current;
10
12
  private readonly doc;
@@ -31,7 +31,8 @@ tui-block-status {
31
31
  }
32
32
  }
33
33
 
34
- img {
34
+ :where(.t-block-image) > img,
35
+ :where(.t-block-image) > picture > img {
35
36
  inline-size: 8rem;
36
37
  block-size: 8rem;
37
38
  }
@@ -1,9 +1,7 @@
1
1
  tui-hint {
2
2
  font: var(--tui-typography-body-m);
3
3
 
4
- --t-arrow-inline: 1.5rem;
5
- --t-arrow-block: 1.125rem;
6
- --t-image: url('data:image/svg+xml,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 18"><path d="M7.22854 3.81615L4.89971 6.6711C3.69732 8.14514 1.8988 9 0 9C1.8988 9 3.69732 9.85486 4.89971 11.3289L7.22854 14.1839L7.22854 14.1839C9.12123 16.5041 10.0676 17.6643 11.2665 17.922C11.75 18.026 12.25 18.026 12.7335 17.922C13.9324 17.6643 14.8788 16.5041 16.7715 14.1839L19.1003 11.3289C20.3027 9.85486 22.1012 9 24 9C22.1012 9 20.3027 8.14514 19.1003 6.6711L16.7715 3.81614C14.8788 1.49586 13.9324 0.335716 12.7335 0.0779663C12.25 -0.0259888 11.75 -0.0259888 11.2665 0.0779663C10.0676 0.335716 9.12123 1.49586 7.22854 3.81614L7.22854 3.81615Z" /></svg>');
4
+ --t-image: url('data:image/svg+xml,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 18" width="24" height="18"><path d="M7.22854 3.81615L4.89971 6.6711C3.69732 8.14514 1.8988 9 0 9C1.8988 9 3.69732 9.85486 4.89971 11.3289L7.22854 14.1839L7.22854 14.1839C9.12123 16.5041 10.0676 17.6643 11.2665 17.922C11.75 18.026 12.25 18.026 12.7335 17.922C13.9324 17.6643 14.8788 16.5041 16.7715 14.1839L19.1003 11.3289C20.3027 9.85486 22.1012 9 24 9C22.1012 9 20.3027 8.14514 19.1003 6.6711L16.7715 3.81614C14.8788 1.49586 13.9324 0.335716 12.7335 0.0779663C12.25 -0.0259888 11.75 -0.0259888 11.2665 0.0779663C10.0676 0.335716 9.12123 1.49586 7.22854 3.81614L7.22854 3.81615Z" /></svg>');
7
5
 
8
6
  &.tui-enter {
9
7
  animation-timing-function: var(--tui-curve-expressive-entrance);
@@ -2,12 +2,18 @@
2
2
  @tui-mobile-small: ~'(max-width: 427.4px)';
3
3
 
4
4
  &.tui-liquid-glass {
5
+ // Used by layouts that align to the glass app bar
6
+ --t-appbar-padding: 1.25rem;
7
+ --t-appbar-height: calc(3.375rem + var(--t-appbar-padding));
8
+
9
+ @media @tui-mobile-small {
10
+ --t-appbar-padding: 1rem;
11
+ }
12
+
5
13
  tui-app-bar {
6
- --t-padding: 1.25rem;
14
+ --t-padding: var(--t-appbar-padding);
7
15
 
8
16
  @media @tui-mobile-small {
9
- --t-padding: 1rem;
10
-
11
17
  [tuiAppBarButton] > [tuiButton] {
12
18
  --t-padding: 0.375rem 0.75rem;
13
19
  }
@@ -15,7 +21,7 @@
15
21
 
16
22
  background: transparent;
17
23
  backdrop-filter: none;
18
- block-size: calc(3.375rem + var(--t-padding));
24
+ block-size: var(--t-appbar-height);
19
25
  padding-block-start: var(--t-padding);
20
26
  padding-block-end: 0.625rem;
21
27
 
@@ -221,18 +221,24 @@ input[type='search'][tuiSearch]::-webkit-search-cancel-button:active {
221
221
  [data-platform='android'] tui-badge-notification[data-size='l'] {
222
222
  --t-size: 1.375rem;
223
223
  }
224
+ [data-platform='ios'].tui-liquid-glass {
225
+ --t-appbar-padding: 1.25rem;
226
+ --t-appbar-height: calc(3.375rem + var(--t-appbar-padding));
227
+ }
228
+ @media (max-width: 427.4px) {
229
+ [data-platform='ios'].tui-liquid-glass {
230
+ --t-appbar-padding: 1rem;
231
+ }
232
+ }
224
233
  [data-platform='ios'].tui-liquid-glass tui-app-bar {
225
- --t-padding: 1.25rem;
234
+ --t-padding: var(--t-appbar-padding);
226
235
  background: transparent;
227
236
  backdrop-filter: none;
228
- block-size: calc(3.375rem + var(--t-padding));
237
+ block-size: var(--t-appbar-height);
229
238
  padding-block-start: var(--t-padding);
230
239
  padding-block-end: 0.625rem;
231
240
  }
232
241
  @media (max-width: 427.4px) {
233
- [data-platform='ios'].tui-liquid-glass tui-app-bar {
234
- --t-padding: 1rem;
235
- }
236
242
  [data-platform='ios'].tui-liquid-glass tui-app-bar [tuiAppBarButton] > [tuiButton] {
237
243
  --t-padding: 0.375rem 0.75rem;
238
244
  }
@@ -622,8 +628,10 @@ input[type='search'][tuiSearch]::-webkit-search-cancel-button:active {
622
628
  [data-platform='ios'] tui-block-status h6 ~ .t-block-text:not(:empty) {
623
629
  margin-block-start: 0.5rem;
624
630
  }
625
- [data-platform='android'] tui-block-status img,
626
- [data-platform='ios'] tui-block-status img {
631
+ [data-platform='android'] tui-block-status :where(.t-block-image) > img,
632
+ [data-platform='ios'] tui-block-status :where(.t-block-image) > img,
633
+ [data-platform='android'] tui-block-status :where(.t-block-image) > picture > img,
634
+ [data-platform='ios'] tui-block-status :where(.t-block-image) > picture > img {
627
635
  inline-size: 8rem;
628
636
  block-size: 8rem;
629
637
  }
@@ -1016,9 +1024,7 @@ input[type='search'][tuiSearch]::-webkit-search-cancel-button:active {
1016
1024
  [data-platform='android'] tui-hint,
1017
1025
  [data-platform='ios'] tui-hint {
1018
1026
  font: var(--tui-typography-body-m);
1019
- --t-arrow-inline: 1.5rem;
1020
- --t-arrow-block: 1.125rem;
1021
- --t-image: url('data:image/svg+xml,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 18"><path d="M7.22854 3.81615L4.89971 6.6711C3.69732 8.14514 1.8988 9 0 9C1.8988 9 3.69732 9.85486 4.89971 11.3289L7.22854 14.1839L7.22854 14.1839C9.12123 16.5041 10.0676 17.6643 11.2665 17.922C11.75 18.026 12.25 18.026 12.7335 17.922C13.9324 17.6643 14.8788 16.5041 16.7715 14.1839L19.1003 11.3289C20.3027 9.85486 22.1012 9 24 9C22.1012 9 20.3027 8.14514 19.1003 6.6711L16.7715 3.81614C14.8788 1.49586 13.9324 0.335716 12.7335 0.0779663C12.25 -0.0259888 11.75 -0.0259888 11.2665 0.0779663C10.0676 0.335716 9.12123 1.49586 7.22854 3.81614L7.22854 3.81615Z" /></svg>');
1027
+ --t-image: url('data:image/svg+xml,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 18" width="24" height="18"><path d="M7.22854 3.81615L4.89971 6.6711C3.69732 8.14514 1.8988 9 0 9C1.8988 9 3.69732 9.85486 4.89971 11.3289L7.22854 14.1839L7.22854 14.1839C9.12123 16.5041 10.0676 17.6643 11.2665 17.922C11.75 18.026 12.25 18.026 12.7335 17.922C13.9324 17.6643 14.8788 16.5041 16.7715 14.1839L19.1003 11.3289C20.3027 9.85486 22.1012 9 24 9C22.1012 9 20.3027 8.14514 19.1003 6.6711L16.7715 3.81614C14.8788 1.49586 13.9324 0.335716 12.7335 0.0779663C12.25 -0.0259888 11.75 -0.0259888 11.2665 0.0779663C10.0676 0.335716 9.12123 1.49586 7.22854 3.81614L7.22854 3.81615Z" /></svg>');
1022
1028
  }
1023
1029
  [data-platform='android'] tui-hint.tui-enter,
1024
1030
  [data-platform='ios'] tui-hint.tui-enter {