@taiga-ui/addon-mobile 4.52.0-canary.ca43bcb → 4.52.0-canary.e07790b

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.
Files changed (27) hide show
  1. package/components/mobile-calendar-dropdown/mobile-calendar-dropdown.component.d.ts +0 -2
  2. package/fesm2022/taiga-ui-addon-mobile-components-bottom-sheet.mjs +3 -3
  3. package/fesm2022/taiga-ui-addon-mobile-components-mobile-calendar-dropdown.mjs +7 -14
  4. package/fesm2022/taiga-ui-addon-mobile-components-mobile-calendar-dropdown.mjs.map +1 -1
  5. package/fesm2022/taiga-ui-addon-mobile-components-mobile-calendar-sheet.mjs +4 -4
  6. package/fesm2022/taiga-ui-addon-mobile-components-mobile-calendar-sheet.mjs.map +1 -1
  7. package/fesm2022/taiga-ui-addon-mobile-components-mobile-calendar.mjs +11 -6
  8. package/fesm2022/taiga-ui-addon-mobile-components-mobile-calendar.mjs.map +1 -1
  9. package/fesm2022/taiga-ui-addon-mobile-components-pull-to-refresh.mjs +13 -13
  10. package/fesm2022/taiga-ui-addon-mobile-components-pull-to-refresh.mjs.map +1 -1
  11. package/fesm2022/taiga-ui-addon-mobile-components-sheet-dialog.mjs +11 -11
  12. package/fesm2022/taiga-ui-addon-mobile-components-sheet-dialog.mjs.map +1 -1
  13. package/fesm2022/taiga-ui-addon-mobile-components-swipe-action.mjs +6 -6
  14. package/fesm2022/taiga-ui-addon-mobile-components-tab-bar.mjs +10 -10
  15. package/fesm2022/taiga-ui-addon-mobile-components-tab-bar.mjs.map +1 -1
  16. package/fesm2022/taiga-ui-addon-mobile-directives-dropdown-mobile.mjs +6 -6
  17. package/fesm2022/taiga-ui-addon-mobile-directives-dropdown-sheet.mjs +6 -6
  18. package/fesm2022/taiga-ui-addon-mobile-directives-elastic-sticky.mjs +7 -8
  19. package/fesm2022/taiga-ui-addon-mobile-directives-elastic-sticky.mjs.map +1 -1
  20. package/fesm2022/taiga-ui-addon-mobile-directives-responsive-dialog.mjs +6 -6
  21. package/fesm2022/taiga-ui-addon-mobile-directives-responsive-dialog.mjs.map +1 -1
  22. package/fesm2022/taiga-ui-addon-mobile-directives-ripple.mjs +6 -6
  23. package/fesm2022/taiga-ui-addon-mobile-directives-touchable.mjs +3 -3
  24. package/fesm2022/taiga-ui-addon-mobile-services.mjs +6 -6
  25. package/package.json +9 -9
  26. package/styles/android/switch.less +1 -0
  27. package/styles/ios/switch.less +50 -1
@@ -64,10 +64,10 @@ class TuiDropdownMobileComponent {
64
64
  get focused() {
65
65
  return this.dropdown.el.contains(tuiGetFocused(this.doc));
66
66
  }
67
- static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.2.15", ngImport: i0, type: TuiDropdownMobileComponent, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
68
- static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "19.2.15", type: TuiDropdownMobileComponent, isStandalone: true, selector: "tui-dropdown-mobile", host: { listeners: { "pointerdown.prevent": "0", "document:click.zoneless.capture": "onClick($event)", "window>scroll.zoneless.capture": "refresh()", "visualViewport>resize.zoneless": "refresh()", "visualViewport>scroll.zoneless": "refresh()" } }, hostDirectives: [{ directive: i1.TuiAnimated }, { directive: i2.TuiActiveZone }], ngImport: i0, template: "<div class=\"t-container\">\n <div class=\"t-content\">\n <ng-container *polymorpheusOutlet=\"dropdown.content() as text; context: context\">\n {{ text }}\n </ng-container>\n </div>\n</div>\n", styles: ["tui-dropdown-mobile{scrollbar-width:none;-ms-overflow-style:none;position:absolute;top:0;left: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::-webkit-scrollbar,tui-dropdown-mobile::-webkit-scrollbar-thumb{display:none}tui-dropdown-mobile.tui-enter,tui-dropdown-mobile.tui-leave{animation-name:tuiFade,tuiSlide}tui-dropdown-mobile:after{content:\"\";display:block;block-size:1px}tui-dropdown-mobile>.t-container{scrollbar-width:none;-ms-overflow-style:none;position:sticky;top:0;block-size:100%;overflow:auto;margin:0 .75rem;touch-action:pan-y!important}tui-dropdown-mobile>.t-container::-webkit-scrollbar,tui-dropdown-mobile>.t-container::-webkit-scrollbar-thumb{display:none}tui-dropdown-mobile [tuiDropdownButton][tuiDropdownButton]{position:fixed;right:1rem;bottom:max(1rem,env(safe-area-inset-bottom));display:inline-flex}.t-dropdown-mobile{touch-action:none;visibility:hidden}.t-dropdown-mobile *{touch-action:inherit;visibility:inherit}.t-dropdown-mobile tui-root{visibility:visible}.t-dropdown-mobile tui-root .t-root-content,.t-dropdown-mobile tui-root tui-dialogs{visibility:hidden}\n"], dependencies: [{ kind: "directive", type: PolymorpheusOutlet, selector: "[polymorpheusOutlet]", inputs: ["polymorpheusOutlet", "polymorpheusOutletContext"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush, encapsulation: i0.ViewEncapsulation.None }); }
67
+ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.2.17", ngImport: i0, type: TuiDropdownMobileComponent, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
68
+ static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "19.2.17", type: TuiDropdownMobileComponent, isStandalone: true, selector: "tui-dropdown-mobile", host: { listeners: { "pointerdown.prevent": "0", "document:click.zoneless.capture": "onClick($event)", "window>scroll.zoneless.capture": "refresh()", "visualViewport>resize.zoneless": "refresh()", "visualViewport>scroll.zoneless": "refresh()" } }, hostDirectives: [{ directive: i1.TuiAnimated }, { directive: i2.TuiActiveZone }], ngImport: i0, template: "<div class=\"t-container\">\n <div class=\"t-content\">\n <ng-container *polymorpheusOutlet=\"dropdown.content() as text; context: context\">\n {{ text }}\n </ng-container>\n </div>\n</div>\n", styles: ["tui-dropdown-mobile{scrollbar-width:none;-ms-overflow-style:none;position:absolute;top:0;left: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::-webkit-scrollbar,tui-dropdown-mobile::-webkit-scrollbar-thumb{display:none}tui-dropdown-mobile.tui-enter,tui-dropdown-mobile.tui-leave{animation-name:tuiFade,tuiSlide}tui-dropdown-mobile:after{content:\"\";display:block;block-size:1px}tui-dropdown-mobile>.t-container{scrollbar-width:none;-ms-overflow-style:none;position:sticky;top:0;block-size:100%;overflow:auto;margin:0 .75rem;touch-action:pan-y!important}tui-dropdown-mobile>.t-container::-webkit-scrollbar,tui-dropdown-mobile>.t-container::-webkit-scrollbar-thumb{display:none}tui-dropdown-mobile [tuiDropdownButton][tuiDropdownButton]{position:fixed;right:1rem;bottom:max(1rem,env(safe-area-inset-bottom));display:inline-flex}.t-dropdown-mobile{touch-action:none;visibility:hidden}.t-dropdown-mobile *{touch-action:inherit;visibility:inherit}.t-dropdown-mobile tui-root{visibility:visible}.t-dropdown-mobile tui-root .t-root-content,.t-dropdown-mobile tui-root tui-dialogs{visibility:hidden}\n"], dependencies: [{ kind: "directive", type: PolymorpheusOutlet, selector: "[polymorpheusOutlet]", inputs: ["polymorpheusOutlet", "polymorpheusOutletContext"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush, encapsulation: i0.ViewEncapsulation.None }); }
69
69
  }
70
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.15", ngImport: i0, type: TuiDropdownMobileComponent, decorators: [{
70
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.17", ngImport: i0, type: TuiDropdownMobileComponent, decorators: [{
71
71
  type: Component,
72
72
  args: [{ selector: 'tui-dropdown-mobile', imports: [PolymorpheusOutlet], encapsulation: ViewEncapsulation.None, changeDetection: ChangeDetectionStrategy.OnPush, hostDirectives: [TuiAnimated, TuiActiveZone], host: {
73
73
  '(pointerdown.prevent)': '0',
@@ -91,8 +91,8 @@ class TuiDropdownMobile {
91
91
  event.preventDefault();
92
92
  event.target.focus({ preventScroll: true });
93
93
  }
94
- static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.2.15", ngImport: i0, type: TuiDropdownMobile, deps: [], target: i0.ɵɵFactoryTarget.Directive }); }
95
- static { this.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "19.2.15", type: TuiDropdownMobile, isStandalone: true, selector: "[tuiDropdownMobile]", host: { listeners: { "mousedown": "onMouseDown($event)" }, properties: { "style.visibility": "\"visible\"" } }, providers: [
94
+ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.2.17", ngImport: i0, type: TuiDropdownMobile, deps: [], target: i0.ɵɵFactoryTarget.Directive }); }
95
+ static { this.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "19.2.17", type: TuiDropdownMobile, isStandalone: true, selector: "[tuiDropdownMobile]", host: { listeners: { "mousedown": "onMouseDown($event)" }, properties: { "style.visibility": "\"visible\"" } }, providers: [
96
96
  {
97
97
  provide: TUI_DROPDOWN_COMPONENT,
98
98
  useFactory: () => inject(TUI_IS_MOBILE)
@@ -101,7 +101,7 @@ class TuiDropdownMobile {
101
101
  },
102
102
  ], ngImport: i0 }); }
103
103
  }
104
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.15", ngImport: i0, type: TuiDropdownMobile, decorators: [{
104
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.17", ngImport: i0, type: TuiDropdownMobile, decorators: [{
105
105
  type: Directive,
106
106
  args: [{
107
107
  selector: '[tuiDropdownMobile]',
@@ -11,8 +11,8 @@ class TuiDropdownSheet {
11
11
  constructor() {
12
12
  this.tuiDropdownSheet = input('');
13
13
  }
14
- static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.2.15", ngImport: i0, type: TuiDropdownSheet, deps: [], target: i0.ɵɵFactoryTarget.Directive }); }
15
- static { this.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "17.1.0", version: "19.2.15", type: TuiDropdownSheet, isStandalone: true, selector: "[tuiDropdownSheet]", inputs: { tuiDropdownSheet: { classPropertyName: "tuiDropdownSheet", publicName: "tuiDropdownSheet", isSignal: true, isRequired: false, transformFunction: null } }, providers: [
14
+ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.2.17", ngImport: i0, type: TuiDropdownSheet, deps: [], target: i0.ɵɵFactoryTarget.Directive }); }
15
+ static { this.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "17.1.0", version: "19.2.17", type: TuiDropdownSheet, isStandalone: true, selector: "[tuiDropdownSheet]", inputs: { tuiDropdownSheet: { classPropertyName: "tuiDropdownSheet", publicName: "tuiDropdownSheet", isSignal: true, isRequired: false, transformFunction: null } }, providers: [
16
16
  {
17
17
  provide: TUI_DROPDOWN_COMPONENT,
18
18
  useFactory: () => inject(TUI_IS_MOBILE)
@@ -21,7 +21,7 @@ class TuiDropdownSheet {
21
21
  },
22
22
  ], ngImport: i0 }); }
23
23
  }
24
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.15", ngImport: i0, type: TuiDropdownSheet, decorators: [{
24
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.17", ngImport: i0, type: TuiDropdownSheet, decorators: [{
25
25
  type: Directive,
26
26
  args: [{
27
27
  selector: '[tuiDropdownSheet]',
@@ -47,8 +47,8 @@ class TuiDropdownSheetComponent {
47
47
  .pipe(tuiIfMap((content) => this.dialogs.open(content, { label: this.directive.tuiDropdownSheet() })), takeUntilDestroyed())
48
48
  .subscribe({ complete: () => this.dropdown.toggle(false) });
49
49
  }
50
- static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.2.15", ngImport: i0, type: TuiDropdownSheetComponent, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
51
- static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.2.0", version: "19.2.15", type: TuiDropdownSheetComponent, isStandalone: true, selector: "ng-component", viewQueries: [{ propertyName: "content", first: true, predicate: TemplateRef, descendants: true, isSignal: true }], ngImport: i0, template: `
50
+ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.2.17", ngImport: i0, type: TuiDropdownSheetComponent, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
51
+ static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.2.0", version: "19.2.17", type: TuiDropdownSheetComponent, isStandalone: true, selector: "ng-component", viewQueries: [{ propertyName: "content", first: true, predicate: TemplateRef, descendants: true, isSignal: true }], ngImport: i0, template: `
52
52
  <ng-template>
53
53
  <ng-container
54
54
  *polymorpheusOutlet="dropdown.content() as text; context: context"
@@ -58,7 +58,7 @@ class TuiDropdownSheetComponent {
58
58
  </ng-template>
59
59
  `, isInline: true, dependencies: [{ kind: "directive", type: PolymorpheusOutlet, selector: "[polymorpheusOutlet]", inputs: ["polymorpheusOutlet", "polymorpheusOutletContext"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush }); }
60
60
  }
61
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.15", ngImport: i0, type: TuiDropdownSheetComponent, decorators: [{
61
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.17", ngImport: i0, type: TuiDropdownSheetComponent, decorators: [{
62
62
  type: Component,
63
63
  args: [{
64
64
  imports: [PolymorpheusOutlet],
@@ -3,8 +3,7 @@ import { afterNextRender, inject, INJECTOR, DestroyRef, NgZone, Injectable, Outp
3
3
  import { takeUntilDestroyed } from '@angular/core/rxjs-interop';
4
4
  import { tuiScrollFrom, tuiZoneOptimized } from '@taiga-ui/cdk/observables';
5
5
  import { tuiInjectElement, tuiGetElementOffset } from '@taiga-ui/cdk/utils/dom';
6
- import { SCROLL_REF_SELECTOR } from '@taiga-ui/core/components/scrollbar';
7
- import { TUI_SCROLL_REF } from '@taiga-ui/core/tokens';
6
+ import { TUI_SCROLL_REF, SCROLL_REF_SELECTOR } from '@taiga-ui/core/components/scrollbar';
8
7
  import { Observable, Subscription, scan, map, distinctUntilChanged } from 'rxjs';
9
8
 
10
9
  class TuiElasticStickyService extends Observable {
@@ -44,10 +43,10 @@ class TuiElasticStickyService extends Observable {
44
43
  this.host.getBoundingClientRect().top ===
45
44
  0);
46
45
  }
47
- static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.2.15", ngImport: i0, type: TuiElasticStickyService, deps: [], target: i0.ɵɵFactoryTarget.Injectable }); }
48
- static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "19.2.15", ngImport: i0, type: TuiElasticStickyService }); }
46
+ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.2.17", ngImport: i0, type: TuiElasticStickyService, deps: [], target: i0.ɵɵFactoryTarget.Injectable }); }
47
+ static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "19.2.17", ngImport: i0, type: TuiElasticStickyService }); }
49
48
  }
50
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.15", ngImport: i0, type: TuiElasticStickyService, decorators: [{
49
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.17", ngImport: i0, type: TuiElasticStickyService, decorators: [{
51
50
  type: Injectable
52
51
  }], ctorParameters: () => [] });
53
52
 
@@ -55,10 +54,10 @@ class TuiElasticSticky {
55
54
  constructor() {
56
55
  this.tuiElasticSticky = inject(TuiElasticStickyService);
57
56
  }
58
- static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.2.15", ngImport: i0, type: TuiElasticSticky, deps: [], target: i0.ɵɵFactoryTarget.Directive }); }
59
- static { this.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "19.2.15", type: TuiElasticSticky, isStandalone: true, selector: "[tuiElasticSticky]", outputs: { tuiElasticSticky: "tuiElasticSticky" }, providers: [TuiElasticStickyService], exportAs: ["tuiElasticSticky"], ngImport: i0 }); }
57
+ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.2.17", ngImport: i0, type: TuiElasticSticky, deps: [], target: i0.ɵɵFactoryTarget.Directive }); }
58
+ static { this.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "19.2.17", type: TuiElasticSticky, isStandalone: true, selector: "[tuiElasticSticky]", outputs: { tuiElasticSticky: "tuiElasticSticky" }, providers: [TuiElasticStickyService], exportAs: ["tuiElasticSticky"], ngImport: i0 }); }
60
59
  }
61
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.15", ngImport: i0, type: TuiElasticSticky, decorators: [{
60
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.17", ngImport: i0, type: TuiElasticSticky, decorators: [{
62
61
  type: Directive,
63
62
  args: [{
64
63
  selector: '[tuiElasticSticky]',
@@ -1 +1 @@
1
- {"version":3,"file":"taiga-ui-addon-mobile-directives-elastic-sticky.mjs","sources":["../../../projects/addon-mobile/directives/elastic-sticky/elastic-sticky.service.ts","../../../projects/addon-mobile/directives/elastic-sticky/elastic-sticky.directive.ts","../../../projects/addon-mobile/directives/elastic-sticky/taiga-ui-addon-mobile-directives-elastic-sticky.ts"],"sourcesContent":["import {\n afterNextRender,\n DestroyRef,\n inject,\n Injectable,\n INJECTOR,\n NgZone,\n} from '@angular/core';\nimport {takeUntilDestroyed} from '@angular/core/rxjs-interop';\nimport {tuiScrollFrom, tuiZoneOptimized} from '@taiga-ui/cdk/observables';\nimport {tuiGetElementOffset, tuiInjectElement} from '@taiga-ui/cdk/utils/dom';\nimport {SCROLL_REF_SELECTOR} from '@taiga-ui/core/components/scrollbar';\nimport {TUI_SCROLL_REF} from '@taiga-ui/core/tokens';\nimport {distinctUntilChanged, map, Observable, scan, Subscription} from 'rxjs';\n\n@Injectable()\nexport class TuiElasticStickyService extends Observable<number> {\n private readonly injector = inject(INJECTOR);\n private readonly el = tuiInjectElement();\n private readonly scrollRef = inject(TUI_SCROLL_REF).nativeElement;\n private readonly destroyRef = inject(DestroyRef);\n private readonly zone = inject(NgZone);\n\n constructor() {\n super((subscriber) => {\n const subscription = new Subscription();\n\n afterNextRender(\n () => {\n const teardown = tuiScrollFrom(this.host)\n .pipe(\n scan(\n (top) => (this.pinned ? top : this.offsetTop),\n this.offsetTop,\n ),\n map((top) =>\n Math.max(\n 1 -\n Math.max(\n Math.round(this.host.scrollTop) - top,\n 0,\n ) /\n this.el.offsetHeight,\n 0,\n ),\n ),\n distinctUntilChanged(),\n tuiZoneOptimized(this.zone),\n takeUntilDestroyed(this.destroyRef),\n )\n .subscribe(subscriber);\n\n if (!subscription.closed) {\n subscription.add(teardown);\n } else {\n teardown.unsubscribe();\n }\n },\n {injector: this.injector},\n );\n\n return subscription;\n });\n }\n\n private get host(): Element {\n // TODO: Test if we still need it now, that templates pass injector\n return this.el.closest(SCROLL_REF_SELECTOR) || this.scrollRef;\n }\n\n private get offsetTop(): number {\n return tuiGetElementOffset(this.host, this.el).offsetTop;\n }\n\n private get pinned(): boolean {\n return (\n this.el.getBoundingClientRect().top -\n this.host.getBoundingClientRect().top ===\n 0\n );\n }\n}\n","import {Directive, inject, Output} from '@angular/core';\n\nimport {TuiElasticStickyService} from './elastic-sticky.service';\n\n@Directive({\n selector: '[tuiElasticSticky]',\n providers: [TuiElasticStickyService],\n exportAs: 'tuiElasticSticky',\n})\nexport class TuiElasticSticky {\n @Output()\n public readonly tuiElasticSticky = inject(TuiElasticStickyService);\n}\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './index';\n"],"names":[],"mappings":";;;;;;;;;AAgBM,MAAO,uBAAwB,SAAQ,UAAkB,CAAA;AAO3D,IAAA,WAAA,GAAA;AACI,QAAA,KAAK,CAAC,CAAC,UAAU,KAAI;AACjB,YAAA,MAAM,YAAY,GAAG,IAAI,YAAY,EAAE;YAEvC,eAAe,CACX,MAAK;AACD,gBAAA,MAAM,QAAQ,GAAG,aAAa,CAAC,IAAI,CAAC,IAAI;AACnC,qBAAA,IAAI,CACD,IAAI,CACA,CAAC,GAAG,MAAM,IAAI,CAAC,MAAM,GAAG,GAAG,GAAG,IAAI,CAAC,SAAS,CAAC,EAC7C,IAAI,CAAC,SAAS,CACjB,EACD,GAAG,CAAC,CAAC,GAAG,KACJ,IAAI,CAAC,GAAG,CACJ,CAAC;AACG,oBAAA,IAAI,CAAC,GAAG,CACJ,IAAI,CAAC,KAAK,CAAC,IAAI,CAAC,IAAI,CAAC,SAAS,CAAC,GAAG,GAAG,EACrC,CAAC,CACJ;wBACG,IAAI,CAAC,EAAE,CAAC,YAAY,EAC5B,CAAC,CACJ,CACJ,EACD,oBAAoB,EAAE,EACtB,gBAAgB,CAAC,IAAI,CAAC,IAAI,CAAC,EAC3B,kBAAkB,CAAC,IAAI,CAAC,UAAU,CAAC;qBAEtC,SAAS,CAAC,UAAU,CAAC;AAE1B,gBAAA,IAAI,CAAC,YAAY,CAAC,MAAM,EAAE;AACtB,oBAAA,YAAY,CAAC,GAAG,CAAC,QAAQ,CAAC;;qBACvB;oBACH,QAAQ,CAAC,WAAW,EAAE;;aAE7B,EACD,EAAC,QAAQ,EAAE,IAAI,CAAC,QAAQ,EAAC,CAC5B;AAED,YAAA,OAAO,YAAY;AACvB,SAAC,CAAC;AA7CW,QAAA,IAAA,CAAA,QAAQ,GAAG,MAAM,CAAC,QAAQ,CAA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AAuB,CAAC,EAAA,QAAA,EAAA,CAAA,kBAAA,CAAA,EAAA,QAAA,EAAA,EAAA,EAAA,CAAA,CAAA;;4FAG3B,gBAAgB,EAAA,UAAA,EAAA,CAAA;kBAL5B,SAAS;AAAC,YAAA,IAAA,EAAA,CAAA;AACP,oBAAA,QAAQ,EAAE,oBAAoB;oBAC9B,SAAS,EAAE,CAAC,uBAAuB,CAAC;AACpC,oBAAA,QAAQ,EAAE,kBAAkB;AAC/B,iBAAA;8BAGmB,gBAAgB,EAAA,CAAA;sBAD/B;;;ACVL;;AAEG;;;;"}
1
+ {"version":3,"file":"taiga-ui-addon-mobile-directives-elastic-sticky.mjs","sources":["../../../projects/addon-mobile/directives/elastic-sticky/elastic-sticky.service.ts","../../../projects/addon-mobile/directives/elastic-sticky/elastic-sticky.directive.ts","../../../projects/addon-mobile/directives/elastic-sticky/taiga-ui-addon-mobile-directives-elastic-sticky.ts"],"sourcesContent":["import {\n afterNextRender,\n DestroyRef,\n inject,\n Injectable,\n INJECTOR,\n NgZone,\n} from '@angular/core';\nimport {takeUntilDestroyed} from '@angular/core/rxjs-interop';\nimport {tuiScrollFrom, tuiZoneOptimized} from '@taiga-ui/cdk/observables';\nimport {tuiGetElementOffset, tuiInjectElement} from '@taiga-ui/cdk/utils/dom';\nimport {SCROLL_REF_SELECTOR, TUI_SCROLL_REF} from '@taiga-ui/core/components/scrollbar';\nimport {distinctUntilChanged, map, Observable, scan, Subscription} from 'rxjs';\n\n@Injectable()\nexport class TuiElasticStickyService extends Observable<number> {\n private readonly injector = inject(INJECTOR);\n private readonly el = tuiInjectElement();\n private readonly scrollRef = inject(TUI_SCROLL_REF).nativeElement;\n private readonly destroyRef = inject(DestroyRef);\n private readonly zone = inject(NgZone);\n\n constructor() {\n super((subscriber) => {\n const subscription = new Subscription();\n\n afterNextRender(\n () => {\n const teardown = tuiScrollFrom(this.host)\n .pipe(\n scan(\n (top) => (this.pinned ? top : this.offsetTop),\n this.offsetTop,\n ),\n map((top) =>\n Math.max(\n 1 -\n Math.max(\n Math.round(this.host.scrollTop) - top,\n 0,\n ) /\n this.el.offsetHeight,\n 0,\n ),\n ),\n distinctUntilChanged(),\n tuiZoneOptimized(this.zone),\n takeUntilDestroyed(this.destroyRef),\n )\n .subscribe(subscriber);\n\n if (!subscription.closed) {\n subscription.add(teardown);\n } else {\n teardown.unsubscribe();\n }\n },\n {injector: this.injector},\n );\n\n return subscription;\n });\n }\n\n private get host(): Element {\n // TODO: Test if we still need it now, that templates pass injector\n return this.el.closest(SCROLL_REF_SELECTOR) || this.scrollRef;\n }\n\n private get offsetTop(): number {\n return tuiGetElementOffset(this.host, this.el).offsetTop;\n }\n\n private get pinned(): boolean {\n return (\n this.el.getBoundingClientRect().top -\n this.host.getBoundingClientRect().top ===\n 0\n );\n }\n}\n","import {Directive, inject, Output} from '@angular/core';\n\nimport {TuiElasticStickyService} from './elastic-sticky.service';\n\n@Directive({\n selector: '[tuiElasticSticky]',\n providers: [TuiElasticStickyService],\n exportAs: 'tuiElasticSticky',\n})\nexport class TuiElasticSticky {\n @Output()\n public readonly tuiElasticSticky = inject(TuiElasticStickyService);\n}\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './index';\n"],"names":[],"mappings":";;;;;;;;AAeM,MAAO,uBAAwB,SAAQ,UAAkB,CAAA;AAO3D,IAAA,WAAA,GAAA;AACI,QAAA,KAAK,CAAC,CAAC,UAAU,KAAI;AACjB,YAAA,MAAM,YAAY,GAAG,IAAI,YAAY,EAAE;YAEvC,eAAe,CACX,MAAK;AACD,gBAAA,MAAM,QAAQ,GAAG,aAAa,CAAC,IAAI,CAAC,IAAI;AACnC,qBAAA,IAAI,CACD,IAAI,CACA,CAAC,GAAG,MAAM,IAAI,CAAC,MAAM,GAAG,GAAG,GAAG,IAAI,CAAC,SAAS,CAAC,EAC7C,IAAI,CAAC,SAAS,CACjB,EACD,GAAG,CAAC,CAAC,GAAG,KACJ,IAAI,CAAC,GAAG,CACJ,CAAC;AACG,o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,IAAI,CAAC,IAAI,CAAC,qBAAqB,EAAE,CAAC,GAAG;AACzC,YAAA,CAAC;;+GA9DA,uBAAuB,EAAA,IAAA,EAAA,EAAA,EAAA,MAAA,EAAA,EAAA,CAAA,eAAA,CAAA,UAAA,EAAA,CAAA,CAAA;mHAAvB,uBAAuB,EAAA,CAAA,CAAA;;4FAAvB,uBAAuB,EAAA,UAAA,EAAA,CAAA;kBADnC;;;MCLY,gBAAgB,CAAA;AAL7B,IAAA,WAAA,GAAA;AAOoB,QAAA,IAAA,CAAA,gBAAgB,GAAG,MAAM,CAAC,uBAAuB,CAAC;AACrE;+GAHY,gBAAgB,EAAA,IAAA,EAAA,EAAA,EAAA,MAAA,EAAA,EAAA,CAAA,eAAA,CAAA,SAAA,EAAA,CAAA,CAAA;mGAAhB,gBAAgB,EAAA,YAAA,EAAA,IAAA,EAAA,QAAA,EAAA,oBAAA,EAAA,OAAA,EAAA,EAAA,gBAAA,EAAA,kBAAA,EAAA,EAAA,SAAA,EAHd,CAAC,uBAAuB,CAAC,EAAA,QAAA,EAAA,CAAA,kBAAA,CAAA,EAAA,QAAA,EAAA,EAAA,EAAA,CAAA,CAAA;;4FAG3B,gBAAgB,EAAA,UAAA,EAAA,CAAA;kBAL5B,SAAS;AAAC,YAAA,IAAA,EAAA,CAAA;AACP,oBAAA,QAAQ,EAAE,oBAAoB;oBAC9B,SAAS,EAAE,CAAC,uBAAuB,CAAC;AACpC,oBAAA,QAAQ,EAAE,kBAAkB;AAC/B,iBAAA;8BAGmB,gBAAgB,EAAA,CAAA;sBAD/B;;;ACVL;;AAEG;;;;"}
@@ -10,8 +10,8 @@ class TuiResponsiveDialog {
10
10
  constructor() {
11
11
  this.tuiResponsiveDialogOptions = input({});
12
12
  }
13
- static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.2.15", ngImport: i0, type: TuiResponsiveDialog, deps: [], target: i0.ɵɵFactoryTarget.Directive }); }
14
- static { this.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "17.1.0", version: "19.2.15", type: TuiResponsiveDialog, isStandalone: true, selector: "ng-template[tuiResponsiveDialog]", inputs: { tuiResponsiveDialogOptions: { classPropertyName: "tuiResponsiveDialogOptions", publicName: "tuiResponsiveDialogOptions", isSignal: true, isRequired: false, transformFunction: null } }, providers: [
13
+ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.2.17", ngImport: i0, type: TuiResponsiveDialog, deps: [], target: i0.ɵɵFactoryTarget.Directive }); }
14
+ static { this.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "17.1.0", version: "19.2.17", type: TuiResponsiveDialog, isStandalone: true, selector: "ng-template[tuiResponsiveDialog]", inputs: { tuiResponsiveDialogOptions: { classPropertyName: "tuiResponsiveDialogOptions", publicName: "tuiResponsiveDialogOptions", isSignal: true, isRequired: false, transformFunction: null } }, providers: [
15
15
  {
16
16
  provide: TuiPortal,
17
17
  useFactory: () => inject(TUI_IS_MOBILE)
@@ -20,7 +20,7 @@ class TuiResponsiveDialog {
20
20
  },
21
21
  ], hostDirectives: [{ directive: i1.TuiPortalDirective, inputs: ["options", "tuiResponsiveDialogOptions", "open", "tuiResponsiveDialog"], outputs: ["openChange", "tuiResponsiveDialogChange"] }], ngImport: i0 }); }
22
22
  }
23
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.15", ngImport: i0, type: TuiResponsiveDialog, decorators: [{
23
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.17", ngImport: i0, type: TuiResponsiveDialog, decorators: [{
24
24
  type: Directive,
25
25
  args: [{
26
26
  selector: 'ng-template[tuiResponsiveDialog]',
@@ -56,10 +56,10 @@ class TuiResponsiveDialogService {
56
56
  ? this.sheets.open(content, options)
57
57
  : this.dialogs.open(content, options);
58
58
  }
59
- static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.2.15", ngImport: i0, type: TuiResponsiveDialogService, deps: [], target: i0.ɵɵFactoryTarget.Injectable }); }
60
- static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "19.2.15", ngImport: i0, type: TuiResponsiveDialogService, providedIn: 'root' }); }
59
+ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.2.17", ngImport: i0, type: TuiResponsiveDialogService, deps: [], target: i0.ɵɵFactoryTarget.Injectable }); }
60
+ static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "19.2.17", ngImport: i0, type: TuiResponsiveDialogService, providedIn: 'root' }); }
61
61
  }
62
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.15", ngImport: i0, type: TuiResponsiveDialogService, decorators: [{
62
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.17", ngImport: i0, type: TuiResponsiveDialogService, decorators: [{
63
63
  type: Injectable,
64
64
  args: [{
65
65
  providedIn: 'root',
@@ -1 +1 @@
1
- {"version":3,"file":"taiga-ui-addon-mobile-directives-responsive-dialog.mjs","sources":["../../../projects/addon-mobile/directives/responsive-dialog/responsive-dialog.directive.ts","../../../projects/addon-mobile/directives/responsive-dialog/responsive-dialog.service.ts","../../../projects/addon-mobile/directives/responsive-dialog/taiga-ui-addon-mobile-directives-responsive-dialog.ts"],"sourcesContent":["import {Directive, inject, input} from '@angular/core';\nimport {TuiSheetDialogService} from '@taiga-ui/addon-mobile/components/sheet-dialog';\nimport {TuiPortal, TuiPortalDirective} from '@taiga-ui/cdk/portals';\nimport {TUI_IS_MOBILE} from '@taiga-ui/cdk/tokens';\nimport {TuiDialogService} from '@taiga-ui/core/portals/dialog';\n\nimport {type TuiResponsiveDialogOptions} from './responsive-dialog.service';\n\n@Directive({\n selector: 'ng-template[tuiResponsiveDialog]',\n providers: [\n {\n provide: TuiPortal,\n useFactory: () =>\n inject(TUI_IS_MOBILE)\n ? inject(TuiSheetDialogService)\n : inject(TuiDialogService),\n },\n ],\n hostDirectives: [\n {\n directive: TuiPortalDirective,\n inputs: ['options: tuiResponsiveDialogOptions', 'open: tuiResponsiveDialog'],\n outputs: ['openChange: tuiResponsiveDialogChange'],\n },\n ],\n})\nexport class TuiResponsiveDialog<T> {\n public readonly tuiResponsiveDialogOptions = input<\n Partial<TuiResponsiveDialogOptions<T>>\n >({});\n}\n","import {inject, Injectable} from '@angular/core';\nimport {\n type TuiSheetDialogOptions,\n TuiSheetDialogService,\n} from '@taiga-ui/addon-mobile/components/sheet-dialog';\nimport {type TuiPortalContext} from '@taiga-ui/cdk/portals';\nimport {TUI_IS_MOBILE} from '@taiga-ui/cdk/tokens';\nimport {type TuiDialogOptions, TuiDialogService} from '@taiga-ui/core/portals/dialog';\nimport {type PolymorpheusContent} from '@taiga-ui/polymorpheus';\nimport {type Observable} from 'rxjs';\n\nexport interface TuiResponsiveDialogOptions<I = undefined>\n extends TuiDialogOptions<I>,\n TuiSheetDialogOptions<I> {}\n\n/**\n * Same as `TuiDialogService` but automatically switches to `TuiSheetDialogService` on mobile\n */\n@Injectable({\n providedIn: 'root',\n})\nexport class TuiResponsiveDialogService {\n private readonly isMobile = inject(TUI_IS_MOBILE);\n private readonly dialogs = inject(TuiDialogService);\n private readonly sheets = inject(TuiSheetDialogService);\n\n public open<G = void>(\n content: PolymorpheusContent<TuiPortalContext<TuiResponsiveDialogOptions, G>>,\n options: Partial<TuiResponsiveDialogOptions<any>> = {},\n ): Observable<G> {\n return this.isMobile\n ? this.sheets.open(content, options)\n : this.dialogs.open(content, options);\n }\n}\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './index';\n"],"names":[],"mappings":";;;;;;;;MA2Ba,mBAAmB,CAAA;AAnBhC,IAAA,WAAA,GAAA;AAoBoB,QAAA,IAAA,CAAA,0BAA0B,GAAG,KAAK,CAEhD,EAAE,CAAC;AACR;+GAJY,mBAAmB,EAAA,IAAA,EAAA,EAAA,EAAA,MAAA,EAAA,EAAA,CAAA,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BAAA,SAAS,EAAE,kBAAkB;AAC7B,4BAAA,MAAM,EAAE,CAAC,qCAAqC,EAAE,2BAA2B,CAAC;4BAC5E,OAAO,EAAE,CAAC,uCAAuC,CAAC;AACrD,yBAAA;AACJ,qBAAA;AACJ,iBAAA;;;ACXD;;AAEG;MAIU,0BAA0B,CAAA;AAHvC,IAAA,WAAA,GAAA;AAIqB,QAAA,IAAA,CAAA,QAAQ,GAAG,MAAM,CAAC,aAAa,CAAC;AAChC,QAAA,IAAA,CAAA,OAAO,GAAG,MAAM,CAAC,gBAAgB,CAAC;AAClC,QAAA,IAAA,CAAA,MAAM,GAAG,MAAM,CAAC,qBAAqB,CAAC;AAU1D;AARU,IAAA,IAAI,CACP,OAA6E,EAC7E,OAAA,GAAoD,EAAE,EAAA;QAEtD,OAAO,IAAI,CAAC;cACN,IAAI,CAAC,MAAM,CAAC,IAAI,CAAC,OAAO,EAAE,OAAO;cACjC,IAAI,CAAC,OAAO,CAAC,IAAI,CAAC,OAAO,EAAE,OAAO,CAAC;;+GAXpC,0BAA0B,EAAA,IAAA,EAAA,EAAA,EAAA,MAAA,EAAA,EAAA,CAAA,eAAA,CAAA,UAAA,EAAA,CAAA,CAAA;AAA1B,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,0BAA0B,cAFvB,MAAM,EAAA,CAAA,CAAA;;4FAET,0BAA0B,EAAA,UAAA,EAAA,CAAA;kBAHtC,UAAU;AAAC,YAAA,IAAA,EAAA,CAAA;AACR,oBAAA,UAAU,EAAE,MAAM;AACrB,iBAAA;;;ACpBD;;AAEG;;;;"}
1
+ {"version":3,"file":"taiga-ui-addon-mobile-directives-responsive-dialog.mjs","sources":["../../../projects/addon-mobile/directives/responsive-dialog/responsive-dialog.directive.ts","../../../projects/addon-mobile/directives/responsive-dialog/responsive-dialog.service.ts","../../../projects/addon-mobile/directives/responsive-dialog/taiga-ui-addon-mobile-directives-responsive-dialog.ts"],"sourcesContent":["import {Directive, inject, input} from '@angular/core';\nimport {TuiSheetDialogService} from '@taiga-ui/addon-mobile/components/sheet-dialog';\nimport {TuiPortal, TuiPortalDirective} from '@taiga-ui/cdk/portals';\nimport {TUI_IS_MOBILE} from '@taiga-ui/cdk/tokens';\nimport {TuiDialogService} from '@taiga-ui/core/portals/dialog';\n\nimport {type TuiResponsiveDialogOptions} from './responsive-dialog.service';\n\n@Directive({\n selector: 'ng-template[tuiResponsiveDialog]',\n providers: [\n {\n provide: TuiPortal,\n useFactory: () =>\n inject(TUI_IS_MOBILE)\n ? inject(TuiSheetDialogService)\n : inject(TuiDialogService),\n },\n ],\n hostDirectives: [\n {\n directive: TuiPortalDirective,\n inputs: ['options: tuiResponsiveDialogOptions', 'open: tuiResponsiveDialog'],\n outputs: ['openChange: tuiResponsiveDialogChange'],\n },\n ],\n})\nexport class TuiResponsiveDialog<T> {\n public readonly tuiResponsiveDialogOptions = input<\n Partial<TuiResponsiveDialogOptions<T>>\n >({});\n}\n","import {inject, Injectable} from '@angular/core';\nimport {\n type TuiSheetDialogOptions,\n TuiSheetDialogService,\n} from '@taiga-ui/addon-mobile/components/sheet-dialog';\nimport {type TuiPortalContext} from '@taiga-ui/cdk/portals';\nimport {TUI_IS_MOBILE} from '@taiga-ui/cdk/tokens';\nimport {type TuiDialogOptions, TuiDialogService} from '@taiga-ui/core/portals/dialog';\nimport {type PolymorpheusContent} from '@taiga-ui/polymorpheus';\nimport {type Observable} from 'rxjs';\n\nexport interface TuiResponsiveDialogOptions<I = undefined>\n extends TuiDialogOptions<I>, TuiSheetDialogOptions<I> {}\n\n/**\n * Same as `TuiDialogService` but automatically switches to `TuiSheetDialogService` on mobile\n */\n@Injectable({\n providedIn: 'root',\n})\nexport class TuiResponsiveDialogService {\n private readonly isMobile = inject(TUI_IS_MOBILE);\n private readonly dialogs = inject(TuiDialogService);\n private readonly sheets = inject(TuiSheetDialogService);\n\n public open<G = void>(\n content: PolymorpheusContent<TuiPortalContext<TuiResponsiveDialogOptions, G>>,\n options: Partial<TuiResponsiveDialogOptions<any>> = {},\n ): Observable<G> {\n return this.isMobile\n ? this.sheets.open(content, options)\n : this.dialogs.open(content, options);\n }\n}\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './index';\n"],"names":[],"mappings":";;;;;;;;MA2Ba,mBAAmB,CAAA;AAnBhC,IAAA,WAAA,GAAA;AAoBoB,QAAA,IAAA,CAAA,0BAA0B,GAAG,KAAK,CAEhD,EAAE,CAAC;AACR;+GAJY,mBAAmB,EAAA,IAAA,EAAA,EAAA,EAAA,MAAA,EAAA,EAAA,CAAA,eAAA,CAAA,SAAA,EAAA,CAAA,CAAA;AAAnB,IAAA,SAAA,IAAA,CAAA,IAAA,GAAA,EAAA,CAAA,oBAAA,CAAA,EAAA,UAAA,EAAA,QAAA,EAAA,OAAA,EAAA,SAAA,EAAA,IAAA,EAAA,mBAAmB,EAjBjB,YAAA,EAAA,IAAA,EAAA,QAAA,EAAA,kCAAA,EAAA,MAAA,EAAA,EAAA,0BAAA,EAAA,EAAA,iBAAA,EAAA,4BAAA,EAAA,UAAA,EAAA,4BAAA,EAAA,QAAA,EAAA,IAAA,EAAA,UAAA,EAAA,KAAA,EAAA,iBAAA,EAAA,IAAA,EAAA,EAAA,EAAA,SAAA,EAAA;AACP,YAAA;AACI,gBAAA,OAAO,EAAE,SAAS;AAClB,gBAAA,UAAU,EAAE,MACR,MAAM,CAAC,aAAa;AAChB,sBAAE,MAAM,CAAC,qBAAqB;AAC9B,sBAAE,MAAM,CAAC,gBAAgB,CAAC;AACrC,aAAA;AACJ,SAAA,EAAA,cAAA,EAAA,CAAA,EAAA,SAAA,EAAA,EAAA,CAAA,kBAAA,EAAA,MAAA,EAAA,CAAA,SAAA,EAAA,4BAAA,EAAA,MAAA,EAAA,qBAAA,CAAA,EAAA,OAAA,EAAA,CAAA,YA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A,KAAA,GAAA,EAAA,CAAA,qBAAA,CAAA,EAAA,UAAA,EAAA,QAAA,EAAA,OAAA,EAAA,SAAA,EAAA,QAAA,EAAA,EAAA,EAAA,IAAA,EAAA,0BAA0B,cAFvB,MAAM,EAAA,CAAA,CAAA;;4FAET,0BAA0B,EAAA,UAAA,EAAA,CAAA;kBAHtC,UAAU;AAAC,YAAA,IAAA,EAAA,CAAA;AACR,oBAAA,UAAU,EAAE,MAAM;AACrB,iBAAA;;;ACnBD;;AAEG;;;;"}
@@ -11,10 +11,10 @@ import { merge, fromEvent, race, switchMap, first, tap } from 'rxjs';
11
11
  const TO = [{ transform: 'scale(0)', opacity: '0.12' }, { opacity: '0.12' }];
12
12
  const FROM = [{ opacity: '0.12' }, { opacity: '0' }];
13
13
  class Styles {
14
- static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.2.15", ngImport: i0, type: Styles, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
15
- static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "19.2.15", type: Styles, isStandalone: true, selector: "ng-component", host: { classAttribute: "tui-ripple" }, ngImport: i0, template: '', isInline: true, styles: [".tui-ripple{position:absolute;z-index:100;opacity:.12;border-radius:100%;background:var(--tui-ripple-background, currentColor);animation-fill-mode:forwards;pointer-events:none}\n"], changeDetection: i0.ChangeDetectionStrategy.OnPush, encapsulation: i0.ViewEncapsulation.None }); }
14
+ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.2.17", ngImport: i0, type: Styles, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
15
+ static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "19.2.17", type: Styles, isStandalone: true, selector: "ng-component", host: { classAttribute: "tui-ripple" }, ngImport: i0, template: '', isInline: true, styles: [".tui-ripple{position:absolute;z-index:100;opacity:.12;border-radius:100%;background:var(--tui-ripple-background, currentColor);animation-fill-mode:forwards;pointer-events:none}\n"], changeDetection: i0.ChangeDetectionStrategy.OnPush, encapsulation: i0.ViewEncapsulation.None }); }
16
16
  }
17
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.15", ngImport: i0, type: Styles, decorators: [{
17
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.17", ngImport: i0, type: Styles, decorators: [{
18
18
  type: Component,
19
19
  args: [{ template: '', encapsulation: ViewEncapsulation.None, changeDetection: ChangeDetectionStrategy.OnPush, host: { class: 'tui-ripple' }, styles: [".tui-ripple{position:absolute;z-index:100;opacity:.12;border-radius:100%;background:var(--tui-ripple-background, currentColor);animation-fill-mode:forwards;pointer-events:none}\n"] }]
20
20
  }] });
@@ -60,10 +60,10 @@ class TuiRipple {
60
60
  });
61
61
  return ripple;
62
62
  }
63
- static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.2.15", ngImport: i0, type: TuiRipple, deps: [], target: i0.ɵɵFactoryTarget.Directive }); }
64
- static { this.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "19.2.15", type: TuiRipple, isStandalone: true, selector: "[tuiRipple]", inputs: { tuiRipple: "tuiRipple" }, host: { listeners: { "pointerdown.zoneless": "start($event.clientX, $event.clientY, $event.target, $event.currentTarget)" } }, ngImport: i0 }); }
63
+ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.2.17", ngImport: i0, type: TuiRipple, deps: [], target: i0.ɵɵFactoryTarget.Directive }); }
64
+ static { this.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "19.2.17", type: TuiRipple, isStandalone: true, selector: "[tuiRipple]", inputs: { tuiRipple: "tuiRipple" }, host: { listeners: { "pointerdown.zoneless": "start($event.clientX, $event.clientY, $event.target, $event.currentTarget)" } }, ngImport: i0 }); }
65
65
  }
66
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.15", ngImport: i0, type: TuiRipple, decorators: [{
66
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.17", ngImport: i0, type: TuiRipple, decorators: [{
67
67
  type: Directive,
68
68
  args: [{
69
69
  selector: '[tuiRipple]',
@@ -56,10 +56,10 @@ class TuiTouchable {
56
56
  }
57
57
  this.el.style.setProperty(this.style, STYLE[this.style]);
58
58
  }
59
- static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.2.15", ngImport: i0, type: TuiTouchable, deps: [], target: i0.ɵɵFactoryTarget.Directive }); }
60
- static { this.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "19.2.15", type: TuiTouchable, isStandalone: true, selector: "[tuiTouchable]", inputs: { tuiTouchable: "tuiTouchable" }, ngImport: i0 }); }
59
+ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.2.17", ngImport: i0, type: TuiTouchable, deps: [], target: i0.ɵɵFactoryTarget.Directive }); }
60
+ static { this.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "19.2.17", type: TuiTouchable, isStandalone: true, selector: "[tuiTouchable]", inputs: { tuiTouchable: "tuiTouchable" }, ngImport: i0 }); }
61
61
  }
62
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.15", ngImport: i0, type: TuiTouchable, decorators: [{
62
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.17", ngImport: i0, type: TuiTouchable, decorators: [{
63
63
  type: Directive,
64
64
  args: [{
65
65
  selector: '[tuiTouchable]',
@@ -42,10 +42,10 @@ class TuiKeyboardService {
42
42
  this.element.inputMode = this.inputMode;
43
43
  this.element = undefined;
44
44
  }
45
- static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.2.15", ngImport: i0, type: TuiKeyboardService, deps: [], target: i0.ɵɵFactoryTarget.Injectable }); }
46
- static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "19.2.15", ngImport: i0, type: TuiKeyboardService, providedIn: 'root' }); }
45
+ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.2.17", ngImport: i0, type: TuiKeyboardService, deps: [], target: i0.ɵɵFactoryTarget.Injectable }); }
46
+ static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "19.2.17", ngImport: i0, type: TuiKeyboardService, providedIn: 'root' }); }
47
47
  }
48
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.15", ngImport: i0, type: TuiKeyboardService, decorators: [{
48
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.17", ngImport: i0, type: TuiKeyboardService, decorators: [{
49
49
  type: Injectable,
50
50
  args: [{
51
51
  providedIn: 'root',
@@ -70,10 +70,10 @@ class TuiThemeColorService {
70
70
  this.meta.updateTag({ name: 'theme-color', content });
71
71
  this.doc.documentElement.style.setProperty('--tui-theme-color', content);
72
72
  }
73
- static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.2.15", ngImport: i0, type: TuiThemeColorService, deps: [], target: i0.ɵɵFactoryTarget.Injectable }); }
74
- static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "19.2.15", ngImport: i0, type: TuiThemeColorService, providedIn: 'root' }); }
73
+ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.2.17", ngImport: i0, type: TuiThemeColorService, deps: [], target: i0.ɵɵFactoryTarget.Injectable }); }
74
+ static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "19.2.17", ngImport: i0, type: TuiThemeColorService, providedIn: 'root' }); }
75
75
  }
76
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.15", ngImport: i0, type: TuiThemeColorService, decorators: [{
76
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.17", ngImport: i0, type: TuiThemeColorService, decorators: [{
77
77
  type: Injectable,
78
78
  args: [{
79
79
  providedIn: 'root',
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@taiga-ui/addon-mobile",
3
- "version": "4.52.0-canary.ca43bcb",
3
+ "version": "4.52.0-canary.e07790b",
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",
@@ -26,10 +26,6 @@
26
26
  "types": "./components/index.d.ts",
27
27
  "default": "./fesm2022/taiga-ui-addon-mobile-components.mjs"
28
28
  },
29
- "./services": {
30
- "types": "./services/index.d.ts",
31
- "default": "./fesm2022/taiga-ui-addon-mobile-services.mjs"
32
- },
33
29
  "./directives": {
34
30
  "types": "./directives/index.d.ts",
35
31
  "default": "./fesm2022/taiga-ui-addon-mobile-directives.mjs"
@@ -54,14 +50,18 @@
54
50
  "types": "./components/pull-to-refresh/index.d.ts",
55
51
  "default": "./fesm2022/taiga-ui-addon-mobile-components-pull-to-refresh.mjs"
56
52
  },
57
- "./components/swipe-action": {
58
- "types": "./components/swipe-action/index.d.ts",
59
- "default": "./fesm2022/taiga-ui-addon-mobile-components-swipe-action.mjs"
60
- },
61
53
  "./components/sheet-dialog": {
62
54
  "types": "./components/sheet-dialog/index.d.ts",
63
55
  "default": "./fesm2022/taiga-ui-addon-mobile-components-sheet-dialog.mjs"
64
56
  },
57
+ "./services": {
58
+ "types": "./services/index.d.ts",
59
+ "default": "./fesm2022/taiga-ui-addon-mobile-services.mjs"
60
+ },
61
+ "./components/swipe-action": {
62
+ "types": "./components/swipe-action/index.d.ts",
63
+ "default": "./fesm2022/taiga-ui-addon-mobile-components-swipe-action.mjs"
64
+ },
65
65
  "./components/tab-bar": {
66
66
  "types": "./components/tab-bar/index.d.ts",
67
67
  "default": "./fesm2022/taiga-ui-addon-mobile-components-tab-bar.mjs"
@@ -11,6 +11,7 @@ input[tuiSwitch] {
11
11
 
12
12
  &::before {
13
13
  content: '';
14
+ left: 0;
14
15
  display: block;
15
16
  block-size: 100%;
16
17
  inline-size: 100%;
@@ -1,6 +1,55 @@
1
1
  @import '@taiga-ui/core/styles/taiga-ui-local.less';
2
2
 
3
- input[tuiSwitch] {
3
+ input[tuiSwitch]._native {
4
+ block-size: 1.9375rem;
5
+ inline-size: 3.1875rem;
6
+ appearance: auto;
7
+ accent-color: var(--tui-background-accent-2);
8
+
9
+ &:invalid {
10
+ accent-color: var(--tui-status-negative);
11
+ }
12
+
13
+ &::before,
14
+ &::after {
15
+ display: none;
16
+ }
17
+
18
+ @supports (anchor-name: --ios26) {
19
+ inline-size: 4rem;
20
+ block-size: 1.75rem;
21
+
22
+ &::before {
23
+ .transition(background);
24
+
25
+ position: absolute;
26
+ display: block;
27
+ inset: 0;
28
+ border-radius: 10rem;
29
+ inline-size: 100%;
30
+ background-color: transparent;
31
+ mix-blend-mode: color;
32
+ transform: none;
33
+ }
34
+
35
+ &:invalid:not(:checked)::before {
36
+ background-color: var(--tui-status-negative);
37
+ }
38
+
39
+ [data-theme='dark'] & {
40
+ &:invalid:not(:checked)::before {
41
+ background-color: var(--tui-status-negative-pale);
42
+ }
43
+
44
+ &:disabled:not(:checked)::before {
45
+ background-color: rgba(255, 255, 255, 0.2);
46
+ mix-blend-mode: lighten;
47
+ }
48
+ }
49
+ }
50
+ }
51
+
52
+ input[tuiSwitch]:not(._native) {
4
53
  block-size: 1.9375rem;
5
54
  inline-size: 3.1875rem;
6
55
  border-radius: 2rem;