@taiga-ui/addon-mobile 4.48.0 → 4.49.0-canary.c8a6f7d

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 (63) hide show
  1. package/components/mobile-calendar/mobile-calendar.component.d.ts +2 -3
  2. package/components/mobile-calendar/mobile-calendar.providers.d.ts +3 -4
  3. package/components/mobile-calendar/mobile-calendar.strategy.d.ts +3 -3
  4. package/components/mobile-calendar-dropdown/mobile-calendar-dropdown.component.d.ts +2 -2
  5. package/components/mobile-calendar-dropdown/mobile-calendar-dropdown.directive.d.ts +2 -3
  6. package/components/mobile-dialog/mobile-dialog.component.d.ts +2 -2
  7. package/components/mobile-dialog/mobile-dialog.options.d.ts +1 -2
  8. package/components/mobile-dialog/mobile-dialog.service.d.ts +4 -5
  9. package/components/pull-to-refresh/pull-to-refresh.component.d.ts +3 -3
  10. package/components/pull-to-refresh/pull-to-refresh.providers.d.ts +3 -3
  11. package/components/sheet-dialog/sheet-dialog.component.d.ts +3 -3
  12. package/components/sheet-dialog/sheet-dialog.directive.d.ts +1 -1
  13. package/components/sheet-dialog/sheet-dialog.options.d.ts +4 -5
  14. package/components/sheet-dialog/sheet-dialog.service.d.ts +1 -1
  15. package/directives/dropdown-mobile/dropdown-mobile.component.d.ts +2 -2
  16. package/directives/responsive-dialog/responsive-dialog.directive.d.ts +1 -1
  17. package/directives/responsive-dialog/responsive-dialog.service.d.ts +4 -4
  18. package/directives/ripple/ripple.directive.d.ts +1 -1
  19. package/directives/sidebar/sidebar.component.d.ts +4 -4
  20. package/directives/sidebar/sidebar.directive.d.ts +2 -3
  21. package/esm2022/components/bottom-sheet/bottom-sheet.component.mjs +1 -1
  22. package/esm2022/components/mobile-calendar/mobile-calendar.component.mjs +1 -1
  23. package/esm2022/components/mobile-calendar/mobile-calendar.providers.mjs +1 -1
  24. package/esm2022/components/mobile-calendar/mobile-calendar.strategy.mjs +1 -1
  25. package/esm2022/components/mobile-calendar-dropdown/mobile-calendar-dropdown.component.mjs +3 -3
  26. package/esm2022/components/mobile-calendar-dropdown/mobile-calendar-dropdown.directive.mjs +2 -2
  27. package/esm2022/components/mobile-dialog/mobile-dialog.component.mjs +1 -1
  28. package/esm2022/components/mobile-dialog/mobile-dialog.options.mjs +1 -1
  29. package/esm2022/components/mobile-dialog/mobile-dialog.service.mjs +2 -2
  30. package/esm2022/components/pull-to-refresh/loader-android/loader-android.component.mjs +1 -1
  31. package/esm2022/components/pull-to-refresh/loader-ios/loader-ios.component.mjs +1 -1
  32. package/esm2022/components/pull-to-refresh/pull-to-refresh.component.mjs +1 -1
  33. package/esm2022/components/pull-to-refresh/pull-to-refresh.providers.mjs +1 -1
  34. package/esm2022/components/pull-to-refresh/pull-to-refresh.service.mjs +1 -1
  35. package/esm2022/components/sheet-dialog/sheet-dialog.component.mjs +1 -1
  36. package/esm2022/components/sheet-dialog/sheet-dialog.directive.mjs +1 -1
  37. package/esm2022/components/sheet-dialog/sheet-dialog.options.mjs +1 -1
  38. package/esm2022/components/sheet-dialog/sheet-dialog.service.mjs +2 -2
  39. package/esm2022/components/tab-bar/tab-bar-item.directive.mjs +1 -1
  40. package/esm2022/components/tab-bar/tab-bar.component.mjs +1 -1
  41. package/esm2022/directives/dropdown-mobile/dropdown-mobile.component.mjs +4 -4
  42. package/esm2022/directives/responsive-dialog/responsive-dialog.directive.mjs +2 -2
  43. package/esm2022/directives/responsive-dialog/responsive-dialog.service.mjs +3 -3
  44. package/esm2022/directives/ripple/ripple.directive.mjs +3 -3
  45. package/esm2022/directives/sidebar/sidebar.component.mjs +1 -1
  46. package/esm2022/directives/sidebar/sidebar.directive.mjs +2 -2
  47. package/esm2022/services/keyboard.service.mjs +1 -1
  48. package/fesm2022/taiga-ui-addon-mobile-components-bottom-sheet.mjs.map +1 -1
  49. package/fesm2022/taiga-ui-addon-mobile-components-mobile-calendar-dropdown.mjs.map +1 -1
  50. package/fesm2022/taiga-ui-addon-mobile-components-mobile-calendar.mjs.map +1 -1
  51. package/fesm2022/taiga-ui-addon-mobile-components-mobile-dialog.mjs.map +1 -1
  52. package/fesm2022/taiga-ui-addon-mobile-components-pull-to-refresh.mjs.map +1 -1
  53. package/fesm2022/taiga-ui-addon-mobile-components-sheet-dialog.mjs.map +1 -1
  54. package/fesm2022/taiga-ui-addon-mobile-components-tab-bar.mjs.map +1 -1
  55. package/fesm2022/taiga-ui-addon-mobile-directives-dropdown-mobile.mjs +3 -3
  56. package/fesm2022/taiga-ui-addon-mobile-directives-dropdown-mobile.mjs.map +1 -1
  57. package/fesm2022/taiga-ui-addon-mobile-directives-responsive-dialog.mjs.map +1 -1
  58. package/fesm2022/taiga-ui-addon-mobile-directives-ripple.mjs +2 -2
  59. package/fesm2022/taiga-ui-addon-mobile-directives-ripple.mjs.map +1 -1
  60. package/fesm2022/taiga-ui-addon-mobile-directives-sidebar.mjs.map +1 -1
  61. package/fesm2022/taiga-ui-addon-mobile-services.mjs.map +1 -1
  62. package/package.json +5 -5
  63. package/services/keyboard.service.d.ts +1 -1
@@ -119,7 +119,7 @@ class TuiDropdownMobileComponent {
119
119
  }
120
120
  this.doc.documentElement.scrollTop = 0;
121
121
  const rect = this.dropdown.el.getBoundingClientRect();
122
- const topMargin = `var(--tui-dropdown-mobile-offset, ${tuiPx(GAP)})`;
122
+ const topMargin = `max(var(--tui-dropdown-mobile-offset, ${tuiPx(GAP)}), env(safe-area-inset-top))`;
123
123
  const offset = `(${topMargin} + ${tuiPx(rect.height + GAP)})`;
124
124
  this.el.style.setProperty('top', `calc(${tuiPx(offsetTop)} + ${offset})`);
125
125
  this.el.style.setProperty('height', `calc(${tuiPx(height)} - ${offset})`);
@@ -130,7 +130,7 @@ class TuiDropdownMobileComponent {
130
130
  return this.dropdown.el.contains(tuiGetNativeFocused(this.doc));
131
131
  }
132
132
  static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "16.2.12", ngImport: i0, type: TuiDropdownMobileComponent, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
133
- static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "16.2.12", type: TuiDropdownMobileComponent, isStandalone: true, selector: "tui-dropdown-mobile", host: { listeners: { "document:click.zoneless.capture": "onClick($event)", "window>scroll.zoneless.capture": "refresh($event.currentTarget.visualViewport)", "visualViewport>resize.zoneless": "refresh($event.target)", "visualViewport>scroll.zoneless": "refresh($event.target)" }, properties: { "class._sheet": "directive.tuiDropdownMobile" } }, hostDirectives: [{ directive: i1.TuiActiveZone }, { directive: i2.TuiAnimated }], ngImport: i0, template: "<div\n *ngIf=\"directive.tuiDropdownMobile\"\n waIntersectionObserver\n waIntersectionThreshold=\"1\"\n class=\"t-filler\"\n (touchstart.prevent)=\"close()\"\n (waIntersectionObservee)=\"$event[0] && onIntersection($event[0])\"\n></div>\n<div\n #container\n class=\"t-container\"\n (tuiSwipe)=\"onSwipe($event, container)\"\n>\n <h2\n *ngIf=\"directive.tuiDropdownMobile\"\n class=\"t-heading\"\n >\n {{ directive.tuiDropdownMobile }}\n </h2>\n <div class=\"t-content\">\n <ng-container *polymorpheusOutlet=\"dropdown._content() as text; context: {$implicit: close}\">\n {{ text }}\n </ng-container>\n </div>\n</div>\n", styles: ["tui-dropdown-mobile:not(._sheet){scrollbar-width:none;-ms-overflow-style:none;position:fixed;top:0;left:0;inline-size:100%;block-size:100%;transition-property:transform;transition-duration:var(--tui-duration, .3s);transition-timing-function:ease-in-out;visibility:visible!important;transform:translateZ(0);background:var(--tui-background-base);overscroll-behavior:contain;overflow:auto;box-shadow:0 -.5rem .5rem var(--tui-background-base),0 10rem var(--tui-background-base),0 20rem var(--tui-background-base),0 30rem var(--tui-background-base)}tui-dropdown-mobile:not(._sheet)::-webkit-scrollbar,tui-dropdown-mobile:not(._sheet)::-webkit-scrollbar-thumb{display:none}tui-dropdown-mobile:not(._sheet).tui-enter,tui-dropdown-mobile:not(._sheet).tui-leave{animation-name:tuiFade,tuiSlide}tui-dropdown-mobile:not(._sheet):after{content:\"\";display:block;block-size:1px}tui-dropdown-mobile:not(._sheet)>.t-container{scrollbar-width:none;-ms-overflow-style:none;position:sticky;top:0;block-size:100%;overflow:auto;margin:0 .75rem;touch-action:pan-y!important}tui-dropdown-mobile:not(._sheet)>.t-container::-webkit-scrollbar,tui-dropdown-mobile:not(._sheet)>.t-container::-webkit-scrollbar-thumb{display:none}tui-dropdown-mobile:not(._sheet) [tuiDropdownButton][tuiDropdownButton]{position:fixed;right:1rem;bottom:1rem;display:inline-flex}tui-dropdown-mobile._sheet{position:fixed;top:0;left:0;bottom:0;right:0;scrollbar-width:none;-ms-overflow-style:none;overflow:auto;background:var(--tui-service-backdrop);box-shadow:0 -80vh 0 5rem var(--tui-service-backdrop);overflow-y:scroll;scroll-snap-type:y mandatory;overscroll-behavior:none}tui-dropdown-mobile._sheet::-webkit-scrollbar,tui-dropdown-mobile._sheet::-webkit-scrollbar-thumb{display:none}tui-dropdown-mobile._sheet.tui-enter,tui-dropdown-mobile._sheet.tui-leave{animation-name:tuiFade,tuiSlide}tui-root:has(tui-dialogs>:nth-child(2)) tui-dropdown-mobile._sheet{background:transparent;box-shadow:none}tui-dropdown-mobile._sheet>.t-filler{block-size:100%;scroll-snap-stop:always;scroll-snap-align:start}tui-dropdown-mobile._sheet>.t-container{display:flex;max-block-size:calc(100% - 1rem);flex-direction:column;border-top-left-radius:1rem;border-top-right-radius:1rem;padding:0 .5rem;scroll-snap-stop:always;scroll-snap-align:start;background:var(--tui-background-elevation-1)}tui-dropdown-mobile._sheet>.t-container>.t-heading{position:relative;margin:0;padding:2rem .5rem .75rem;font:var(--tui-font-heading-6)}tui-dropdown-mobile._sheet>.t-container>.t-heading:before{content:\"\";position:absolute;left:50%;top:.75rem;inline-size:2rem;block-size:.25rem;border-radius:1rem;background:var(--tui-background-neutral-2);transform:translate(-50%,-50%)}tui-dropdown-mobile._sheet>.t-container>.t-content{scrollbar-width:none;-ms-overflow-style:none;overflow-y:auto;overflow-x:hidden}tui-dropdown-mobile._sheet>.t-container>.t-content::-webkit-scrollbar,tui-dropdown-mobile._sheet>.t-container>.t-content::-webkit-scrollbar-thumb{display:none}tui-dropdown-mobile._sheet tui-data-list [tuiOption]{margin-inline-start:calc(-1 * var(--t-option-padding-inline));margin-inline-end:calc(-1 * var(--t-option-padding-inline))}.t-dropdown-mobile{touch-action:none;visibility:hidden}.t-dropdown-mobile *{touch-action:inherit;visibility:inherit}.t-dropdown-mobile tui-root{visibility:visible}.t-dropdown-mobile tui-root .t-root-content,.t-dropdown-mobile tui-root tui-dialogs{visibility:hidden}\n"], dependencies: [{ kind: "directive", type: NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "directive", type: PolymorpheusOutlet, selector: "[polymorpheusOutlet]", inputs: ["polymorpheusOutlet", "polymorpheusOutletContext"] }, { kind: "directive", type: TuiSwipe, selector: "[tuiSwipe]", outputs: ["tuiSwipe"] }, { kind: "directive", type: i3.WaIntersectionObserverDirective, selector: "[waIntersectionObserver]", inputs: ["waIntersectionRootMargin", "waIntersectionThreshold"], exportAs: ["IntersectionObserver"] }, { kind: "directive", type: i3.WaIntersectionObservee, selector: "[waIntersectionObservee]", outputs: ["waIntersectionObservee"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush, encapsulation: i0.ViewEncapsulation.None }); }
133
+ static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "16.2.12", type: TuiDropdownMobileComponent, isStandalone: true, selector: "tui-dropdown-mobile", host: { listeners: { "document:click.zoneless.capture": "onClick($event)", "window>scroll.zoneless.capture": "refresh($event.currentTarget.visualViewport)", "visualViewport>resize.zoneless": "refresh($event.target)", "visualViewport>scroll.zoneless": "refresh($event.target)" }, properties: { "class._sheet": "directive.tuiDropdownMobile" } }, hostDirectives: [{ directive: i1.TuiActiveZone }, { directive: i2.TuiAnimated }], ngImport: i0, template: "<div\n *ngIf=\"directive.tuiDropdownMobile\"\n waIntersectionObserver\n waIntersectionThreshold=\"1\"\n class=\"t-filler\"\n (touchstart.prevent)=\"close()\"\n (waIntersectionObservee)=\"$event[0] && onIntersection($event[0])\"\n></div>\n<div\n #container\n class=\"t-container\"\n (tuiSwipe)=\"onSwipe($event, container)\"\n>\n <h2\n *ngIf=\"directive.tuiDropdownMobile\"\n class=\"t-heading\"\n >\n {{ directive.tuiDropdownMobile }}\n </h2>\n <div class=\"t-content\">\n <ng-container *polymorpheusOutlet=\"dropdown._content() as text; context: {$implicit: close}\">\n {{ text }}\n </ng-container>\n </div>\n</div>\n", styles: ["tui-dropdown-mobile:not(._sheet){scrollbar-width:none;-ms-overflow-style:none;position:fixed;top:0;left:0;inline-size:100%;block-size:100%;transition-property:transform;transition-duration:var(--tui-duration, .3s);transition-timing-function:ease-in-out;visibility:visible!important;transform:translateZ(0);background:var(--tui-background-base);overscroll-behavior:contain;overflow:auto;box-shadow:0 -.5rem .5rem var(--tui-background-base),0 10rem var(--tui-background-base),0 20rem var(--tui-background-base),0 30rem var(--tui-background-base);box-sizing:border-box;padding-block-end:env(safe-area-inset-bottom)}tui-dropdown-mobile:not(._sheet)::-webkit-scrollbar,tui-dropdown-mobile:not(._sheet)::-webkit-scrollbar-thumb{display:none}tui-dropdown-mobile:not(._sheet).tui-enter,tui-dropdown-mobile:not(._sheet).tui-leave{animation-name:tuiFade,tuiSlide}tui-dropdown-mobile:not(._sheet):after{content:\"\";display:block;block-size:1px}tui-dropdown-mobile:not(._sheet)>.t-container{scrollbar-width:none;-ms-overflow-style:none;position:sticky;top:0;block-size:100%;overflow:auto;margin:0 .75rem;touch-action:pan-y!important}tui-dropdown-mobile:not(._sheet)>.t-container::-webkit-scrollbar,tui-dropdown-mobile:not(._sheet)>.t-container::-webkit-scrollbar-thumb{display:none}tui-dropdown-mobile:not(._sheet) [tuiDropdownButton][tuiDropdownButton]{position:fixed;right:1rem;bottom:max(1rem,env(safe-area-inset-bottom));display:inline-flex}tui-dropdown-mobile._sheet{position:fixed;top:0;left:0;bottom:0;right:0;scrollbar-width:none;-ms-overflow-style:none;overflow:auto;background:var(--tui-service-backdrop);box-shadow:0 -80vh 0 5rem var(--tui-service-backdrop);overflow-y:scroll;scroll-snap-type:y mandatory;overscroll-behavior:none}tui-dropdown-mobile._sheet::-webkit-scrollbar,tui-dropdown-mobile._sheet::-webkit-scrollbar-thumb{display:none}tui-dropdown-mobile._sheet.tui-enter,tui-dropdown-mobile._sheet.tui-leave{animation-name:tuiFade,tuiSlide}tui-root:has(tui-dialogs>:nth-child(2)) tui-dropdown-mobile._sheet{background:transparent;box-shadow:none}tui-dropdown-mobile._sheet>.t-filler{block-size:100%;scroll-snap-stop:always;scroll-snap-align:start}tui-dropdown-mobile._sheet>.t-container{display:flex;max-block-size:calc(100% - max(env(safe-area-inset-top),1rem));flex-direction:column;border-top-left-radius:1rem;border-top-right-radius:1rem;padding:0 .5rem env(safe-area-inset-bottom);box-sizing:border-box;scroll-snap-stop:always;scroll-snap-align:start;background:var(--tui-background-elevation-1)}tui-dropdown-mobile._sheet>.t-container>.t-heading{position:relative;margin:0;padding:2rem .5rem .75rem;font:var(--tui-font-heading-6)}tui-dropdown-mobile._sheet>.t-container>.t-heading:before{content:\"\";position:absolute;left:50%;top:.75rem;inline-size:2rem;block-size:.25rem;border-radius:1rem;background:var(--tui-background-neutral-2);transform:translate(-50%,-50%)}tui-dropdown-mobile._sheet>.t-container>.t-content{scrollbar-width:none;-ms-overflow-style:none;overflow-y:auto;overflow-x:hidden}tui-dropdown-mobile._sheet>.t-container>.t-content::-webkit-scrollbar,tui-dropdown-mobile._sheet>.t-container>.t-content::-webkit-scrollbar-thumb{display:none}tui-dropdown-mobile._sheet tui-data-list [tuiOption]{margin-inline-start:calc(-1 * var(--t-option-padding-inline));margin-inline-end:calc(-1 * var(--t-option-padding-inline))}.t-dropdown-mobile{touch-action:none;visibility:hidden}.t-dropdown-mobile *{touch-action:inherit;visibility:inherit}.t-dropdown-mobile tui-root{visibility:visible}.t-dropdown-mobile tui-root .t-root-content,.t-dropdown-mobile tui-root tui-dialogs{visibility:hidden}\n"], dependencies: [{ kind: "directive", type: NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "directive", type: PolymorpheusOutlet, selector: "[polymorpheusOutlet]", inputs: ["polymorpheusOutlet", "polymorpheusOutletContext"] }, { kind: "directive", type: TuiSwipe, selector: "[tuiSwipe]", outputs: ["tuiSwipe"] }, { kind: "directive", type: i3.WaIntersectionObserverDirective, selector: "[waIntersectionObserver]", inputs: ["waIntersectionRootMargin", "waIntersectionThreshold"], exportAs: ["IntersectionObserver"] }, { kind: "directive", type: i3.WaIntersectionObservee, selector: "[waIntersectionObservee]", outputs: ["waIntersectionObservee"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush, encapsulation: i0.ViewEncapsulation.None }); }
134
134
  }
135
135
  i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.2.12", ngImport: i0, type: TuiDropdownMobileComponent, decorators: [{
136
136
  type: Component,
@@ -140,7 +140,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.2.12", ngImpo
140
140
  '(window>scroll.zoneless.capture)': 'refresh($event.currentTarget.visualViewport)',
141
141
  '(visualViewport>resize.zoneless)': 'refresh($event.target)',
142
142
  '(visualViewport>scroll.zoneless)': 'refresh($event.target)',
143
- }, template: "<div\n *ngIf=\"directive.tuiDropdownMobile\"\n waIntersectionObserver\n waIntersectionThreshold=\"1\"\n class=\"t-filler\"\n (touchstart.prevent)=\"close()\"\n (waIntersectionObservee)=\"$event[0] && onIntersection($event[0])\"\n></div>\n<div\n #container\n class=\"t-container\"\n (tuiSwipe)=\"onSwipe($event, container)\"\n>\n <h2\n *ngIf=\"directive.tuiDropdownMobile\"\n class=\"t-heading\"\n >\n {{ directive.tuiDropdownMobile }}\n </h2>\n <div class=\"t-content\">\n <ng-container *polymorpheusOutlet=\"dropdown._content() as text; context: {$implicit: close}\">\n {{ text }}\n </ng-container>\n </div>\n</div>\n", styles: ["tui-dropdown-mobile:not(._sheet){scrollbar-width:none;-ms-overflow-style:none;position:fixed;top:0;left:0;inline-size:100%;block-size:100%;transition-property:transform;transition-duration:var(--tui-duration, .3s);transition-timing-function:ease-in-out;visibility:visible!important;transform:translateZ(0);background:var(--tui-background-base);overscroll-behavior:contain;overflow:auto;box-shadow:0 -.5rem .5rem var(--tui-background-base),0 10rem var(--tui-background-base),0 20rem var(--tui-background-base),0 30rem var(--tui-background-base)}tui-dropdown-mobile:not(._sheet)::-webkit-scrollbar,tui-dropdown-mobile:not(._sheet)::-webkit-scrollbar-thumb{display:none}tui-dropdown-mobile:not(._sheet).tui-enter,tui-dropdown-mobile:not(._sheet).tui-leave{animation-name:tuiFade,tuiSlide}tui-dropdown-mobile:not(._sheet):after{content:\"\";display:block;block-size:1px}tui-dropdown-mobile:not(._sheet)>.t-container{scrollbar-width:none;-ms-overflow-style:none;position:sticky;top:0;block-size:100%;overflow:auto;margin:0 .75rem;touch-action:pan-y!important}tui-dropdown-mobile:not(._sheet)>.t-container::-webkit-scrollbar,tui-dropdown-mobile:not(._sheet)>.t-container::-webkit-scrollbar-thumb{display:none}tui-dropdown-mobile:not(._sheet) [tuiDropdownButton][tuiDropdownButton]{position:fixed;right:1rem;bottom:1rem;display:inline-flex}tui-dropdown-mobile._sheet{position:fixed;top:0;left:0;bottom:0;right:0;scrollbar-width:none;-ms-overflow-style:none;overflow:auto;background:var(--tui-service-backdrop);box-shadow:0 -80vh 0 5rem var(--tui-service-backdrop);overflow-y:scroll;scroll-snap-type:y mandatory;overscroll-behavior:none}tui-dropdown-mobile._sheet::-webkit-scrollbar,tui-dropdown-mobile._sheet::-webkit-scrollbar-thumb{display:none}tui-dropdown-mobile._sheet.tui-enter,tui-dropdown-mobile._sheet.tui-leave{animation-name:tuiFade,tuiSlide}tui-root:has(tui-dialogs>:nth-child(2)) tui-dropdown-mobile._sheet{background:transparent;box-shadow:none}tui-dropdown-mobile._sheet>.t-filler{block-size:100%;scroll-snap-stop:always;scroll-snap-align:start}tui-dropdown-mobile._sheet>.t-container{display:flex;max-block-size:calc(100% - 1rem);flex-direction:column;border-top-left-radius:1rem;border-top-right-radius:1rem;padding:0 .5rem;scroll-snap-stop:always;scroll-snap-align:start;background:var(--tui-background-elevation-1)}tui-dropdown-mobile._sheet>.t-container>.t-heading{position:relative;margin:0;padding:2rem .5rem .75rem;font:var(--tui-font-heading-6)}tui-dropdown-mobile._sheet>.t-container>.t-heading:before{content:\"\";position:absolute;left:50%;top:.75rem;inline-size:2rem;block-size:.25rem;border-radius:1rem;background:var(--tui-background-neutral-2);transform:translate(-50%,-50%)}tui-dropdown-mobile._sheet>.t-container>.t-content{scrollbar-width:none;-ms-overflow-style:none;overflow-y:auto;overflow-x:hidden}tui-dropdown-mobile._sheet>.t-container>.t-content::-webkit-scrollbar,tui-dropdown-mobile._sheet>.t-container>.t-content::-webkit-scrollbar-thumb{display:none}tui-dropdown-mobile._sheet tui-data-list [tuiOption]{margin-inline-start:calc(-1 * var(--t-option-padding-inline));margin-inline-end:calc(-1 * var(--t-option-padding-inline))}.t-dropdown-mobile{touch-action:none;visibility:hidden}.t-dropdown-mobile *{touch-action:inherit;visibility:inherit}.t-dropdown-mobile tui-root{visibility:visible}.t-dropdown-mobile tui-root .t-root-content,.t-dropdown-mobile tui-root tui-dialogs{visibility:hidden}\n"] }]
143
+ }, template: "<div\n *ngIf=\"directive.tuiDropdownMobile\"\n waIntersectionObserver\n waIntersectionThreshold=\"1\"\n class=\"t-filler\"\n (touchstart.prevent)=\"close()\"\n (waIntersectionObservee)=\"$event[0] && onIntersection($event[0])\"\n></div>\n<div\n #container\n class=\"t-container\"\n (tuiSwipe)=\"onSwipe($event, container)\"\n>\n <h2\n *ngIf=\"directive.tuiDropdownMobile\"\n class=\"t-heading\"\n >\n {{ directive.tuiDropdownMobile }}\n </h2>\n <div class=\"t-content\">\n <ng-container *polymorpheusOutlet=\"dropdown._content() as text; context: {$implicit: close}\">\n {{ text }}\n </ng-container>\n </div>\n</div>\n", styles: ["tui-dropdown-mobile:not(._sheet){scrollbar-width:none;-ms-overflow-style:none;position:fixed;top:0;left:0;inline-size:100%;block-size:100%;transition-property:transform;transition-duration:var(--tui-duration, .3s);transition-timing-function:ease-in-out;visibility:visible!important;transform:translateZ(0);background:var(--tui-background-base);overscroll-behavior:contain;overflow:auto;box-shadow:0 -.5rem .5rem var(--tui-background-base),0 10rem var(--tui-background-base),0 20rem var(--tui-background-base),0 30rem var(--tui-background-base);box-sizing:border-box;padding-block-end:env(safe-area-inset-bottom)}tui-dropdown-mobile:not(._sheet)::-webkit-scrollbar,tui-dropdown-mobile:not(._sheet)::-webkit-scrollbar-thumb{display:none}tui-dropdown-mobile:not(._sheet).tui-enter,tui-dropdown-mobile:not(._sheet).tui-leave{animation-name:tuiFade,tuiSlide}tui-dropdown-mobile:not(._sheet):after{content:\"\";display:block;block-size:1px}tui-dropdown-mobile:not(._sheet)>.t-container{scrollbar-width:none;-ms-overflow-style:none;position:sticky;top:0;block-size:100%;overflow:auto;margin:0 .75rem;touch-action:pan-y!important}tui-dropdown-mobile:not(._sheet)>.t-container::-webkit-scrollbar,tui-dropdown-mobile:not(._sheet)>.t-container::-webkit-scrollbar-thumb{display:none}tui-dropdown-mobile:not(._sheet) [tuiDropdownButton][tuiDropdownButton]{position:fixed;right:1rem;bottom:max(1rem,env(safe-area-inset-bottom));display:inline-flex}tui-dropdown-mobile._sheet{position:fixed;top:0;left:0;bottom:0;right:0;scrollbar-width:none;-ms-overflow-style:none;overflow:auto;background:var(--tui-service-backdrop);box-shadow:0 -80vh 0 5rem var(--tui-service-backdrop);overflow-y:scroll;scroll-snap-type:y mandatory;overscroll-behavior:none}tui-dropdown-mobile._sheet::-webkit-scrollbar,tui-dropdown-mobile._sheet::-webkit-scrollbar-thumb{display:none}tui-dropdown-mobile._sheet.tui-enter,tui-dropdown-mobile._sheet.tui-leave{animation-name:tuiFade,tuiSlide}tui-root:has(tui-dialogs>:nth-child(2)) tui-dropdown-mobile._sheet{background:transparent;box-shadow:none}tui-dropdown-mobile._sheet>.t-filler{block-size:100%;scroll-snap-stop:always;scroll-snap-align:start}tui-dropdown-mobile._sheet>.t-container{display:flex;max-block-size:calc(100% - max(env(safe-area-inset-top),1rem));flex-direction:column;border-top-left-radius:1rem;border-top-right-radius:1rem;padding:0 .5rem env(safe-area-inset-bottom);box-sizing:border-box;scroll-snap-stop:always;scroll-snap-align:start;background:var(--tui-background-elevation-1)}tui-dropdown-mobile._sheet>.t-container>.t-heading{position:relative;margin:0;padding:2rem .5rem .75rem;font:var(--tui-font-heading-6)}tui-dropdown-mobile._sheet>.t-container>.t-heading:before{content:\"\";position:absolute;left:50%;top:.75rem;inline-size:2rem;block-size:.25rem;border-radius:1rem;background:var(--tui-background-neutral-2);transform:translate(-50%,-50%)}tui-dropdown-mobile._sheet>.t-container>.t-content{scrollbar-width:none;-ms-overflow-style:none;overflow-y:auto;overflow-x:hidden}tui-dropdown-mobile._sheet>.t-container>.t-content::-webkit-scrollbar,tui-dropdown-mobile._sheet>.t-container>.t-content::-webkit-scrollbar-thumb{display:none}tui-dropdown-mobile._sheet tui-data-list [tuiOption]{margin-inline-start:calc(-1 * var(--t-option-padding-inline));margin-inline-end:calc(-1 * var(--t-option-padding-inline))}.t-dropdown-mobile{touch-action:none;visibility:hidden}.t-dropdown-mobile *{touch-action:inherit;visibility:inherit}.t-dropdown-mobile tui-root{visibility:visible}.t-dropdown-mobile tui-root .t-root-content,.t-dropdown-mobile tui-root tui-dialogs{visibility:hidden}\n"] }]
144
144
  }], ctorParameters: function () { return []; } });
145
145
 
146
146
  /**
@@ -1 +1 @@
1
- {"version":3,"file":"taiga-ui-addon-mobile-directives-dropdown-mobile.mjs","sources":["../../../projects/addon-mobile/directives/dropdown-mobile/dropdown-mobile.directive.ts","../../../projects/addon-mobile/directives/dropdown-mobile/dropdown-mobile.component.ts","../../../projects/addon-mobile/directives/dropdown-mobile/dropdown-mobile.template.html","../../../projects/addon-mobile/directives/dropdown-mobile/taiga-ui-addon-mobile-directives-dropdown-mobile.ts"],"sourcesContent":["import {Directive, inject, Input} from '@angular/core';\nimport {TUI_IS_MOBILE} from '@taiga-ui/cdk/tokens';\nimport {tuiIsHTMLElement} from '@taiga-ui/cdk/utils/dom';\nimport {TUI_DROPDOWN_COMPONENT} from '@taiga-ui/core/directives/dropdown';\n\nimport {TuiDropdownMobileComponent} from './dropdown-mobile.component';\n\n@Directive({\n standalone: true,\n selector: '[tuiDropdownMobile]',\n providers: [\n {\n provide: TUI_DROPDOWN_COMPONENT,\n useFactory: () =>\n inject(TUI_IS_MOBILE)\n ? TuiDropdownMobileComponent\n : inject(TUI_DROPDOWN_COMPONENT, {skipSelf: true}),\n },\n ],\n host: {\n '[style.visibility]': '\"visible\"',\n '(mousedown)': 'onMouseDown($event)',\n },\n})\nexport class TuiDropdownMobile {\n private readonly isMobile = inject(TUI_IS_MOBILE);\n\n @Input()\n public tuiDropdownMobile = '';\n\n protected onMouseDown(event: MouseEvent): void {\n if (\n !this.isMobile ||\n !tuiIsHTMLElement(event.target) ||\n !event.target.matches('input,textarea') ||\n this.tuiDropdownMobile\n ) {\n return;\n }\n\n event.preventDefault();\n event.target.focus({preventScroll: true});\n }\n}\n","import {DOCUMENT, NgIf} from '@angular/common';\nimport type {AfterViewInit, OnDestroy} from '@angular/core';\nimport {\n ChangeDetectionStrategy,\n Component,\n inject,\n ViewEncapsulation,\n} from '@angular/core';\nimport {WaIntersectionObserver} from '@ng-web-apis/intersection-observer';\nimport {TuiKeyboardService} from '@taiga-ui/addon-mobile/services';\nimport {TuiActiveZone} from '@taiga-ui/cdk/directives/active-zone';\nimport {TuiAnimated} from '@taiga-ui/cdk/directives/animated';\nimport type {TuiSwipeEvent} from '@taiga-ui/cdk/directives/swipe';\nimport {TuiSwipe} from '@taiga-ui/cdk/directives/swipe';\nimport {tuiInjectElement, tuiIsElement} from '@taiga-ui/cdk/utils/dom';\nimport {tuiGetNativeFocused} from '@taiga-ui/cdk/utils/focus';\nimport {tuiPx} from '@taiga-ui/cdk/utils/miscellaneous';\nimport {TuiDropdownDirective} from '@taiga-ui/core/directives/dropdown';\nimport {PolymorpheusOutlet} from '@taiga-ui/polymorpheus';\n\nimport {TuiDropdownMobile} from './dropdown-mobile.directive';\n\nconst GAP = 16;\n\n@Component({\n standalone: true,\n selector: 'tui-dropdown-mobile',\n imports: [NgIf, PolymorpheusOutlet, TuiSwipe, WaIntersectionObserver],\n templateUrl: './dropdown-mobile.template.html',\n styleUrls: ['./dropdown-mobile.style.less'],\n encapsulation: ViewEncapsulation.None,\n changeDetection: ChangeDetectionStrategy.OnPush,\n hostDirectives: [TuiActiveZone, TuiAnimated],\n host: {\n '[class._sheet]': 'directive.tuiDropdownMobile',\n '(document:click.zoneless.capture)': 'onClick($event)',\n '(window>scroll.zoneless.capture)':\n 'refresh($event.currentTarget.visualViewport)',\n '(visualViewport>resize.zoneless)': 'refresh($event.target)',\n '(visualViewport>scroll.zoneless)': 'refresh($event.target)',\n },\n})\nexport class TuiDropdownMobileComponent implements OnDestroy, AfterViewInit {\n private readonly el = tuiInjectElement();\n private readonly keyboard = inject(TuiKeyboardService);\n private readonly doc = inject(DOCUMENT);\n private readonly scrollTop = this.doc.documentElement.scrollTop;\n private readonly observer = new ResizeObserver(\n () =>\n this.doc.defaultView?.visualViewport &&\n this.refresh(this.doc.defaultView.visualViewport),\n );\n\n protected readonly directive = inject(TuiDropdownMobile);\n protected readonly dropdown = inject(TuiDropdownDirective);\n\n constructor() {\n this.observer.observe(this.dropdown.el);\n this.doc.documentElement.style.setProperty('scroll-behavior', 'initial');\n }\n\n public ngAfterViewInit(): void {\n this.el.scrollTop = this.directive.tuiDropdownMobile ? this.el.clientHeight : 0;\n }\n\n public ngOnDestroy(): void {\n this.observer.disconnect();\n this.doc.body.classList.remove('t-dropdown-mobile');\n this.doc.body.style.removeProperty('--t-root-top');\n this.doc.documentElement.scrollTop = this.scrollTop;\n this.doc.documentElement.style.removeProperty('scroll-behavior');\n\n if (this.focused) {\n this.keyboard.hide();\n }\n }\n\n protected readonly close = (): void => this.dropdown.toggle(false);\n\n protected onClick(event: MouseEvent): void {\n if (\n tuiIsElement(event.target) &&\n !this.el.contains(event.target) &&\n (!this.dropdown.el.contains(event.target) ||\n event.target.matches('input,textarea'))\n ) {\n event.stopPropagation();\n }\n }\n\n protected onSwipe({direction}: TuiSwipeEvent, el: HTMLElement): void {\n if (\n direction === 'bottom' &&\n el.getBoundingClientRect().bottom > Number(this.doc.defaultView?.innerHeight)\n ) {\n this.close();\n }\n }\n\n protected onIntersection({isIntersecting}: IntersectionObserverEntry): void {\n if (isIntersecting) {\n this.close();\n }\n }\n\n protected refresh({offsetTop, height}: VisualViewport): void {\n this.doc.body.style.removeProperty('--t-root-top');\n\n if (\n !this.focused ||\n this.directive.tuiDropdownMobile ||\n !this.doc.documentElement.style.getPropertyValue('scroll-behavior')\n ) {\n return;\n }\n\n this.doc.documentElement.scrollTop = 0;\n\n const rect = this.dropdown.el.getBoundingClientRect();\n const topMargin = `var(--tui-dropdown-mobile-offset, ${tuiPx(GAP)})`;\n const offset = `(${topMargin} + ${tuiPx(rect.height + GAP)})`;\n\n this.el.style.setProperty('top', `calc(${tuiPx(offsetTop)} + ${offset})`);\n this.el.style.setProperty('height', `calc(${tuiPx(height)} - ${offset})`);\n this.doc.body.classList.add('t-dropdown-mobile');\n this.doc.body.style.setProperty(\n '--t-root-top',\n `calc(${tuiPx(offsetTop - rect.top)} + ${topMargin})`,\n );\n }\n\n private get focused(): boolean {\n return this.dropdown.el.contains(tuiGetNativeFocused(this.doc));\n }\n}\n","<div\n *ngIf=\"directive.tuiDropdownMobile\"\n waIntersectionObserver\n waIntersectionThreshold=\"1\"\n class=\"t-filler\"\n (touchstart.prevent)=\"close()\"\n (waIntersectionObservee)=\"$event[0] && onIntersection($event[0])\"\n></div>\n<div\n #container\n class=\"t-container\"\n (tuiSwipe)=\"onSwipe($event, container)\"\n>\n <h2\n *ngIf=\"directive.tuiDropdownMobile\"\n class=\"t-heading\"\n >\n {{ directive.tuiDropdownMobile }}\n </h2>\n <div class=\"t-content\">\n <ng-container *polymorpheusOutlet=\"dropdown._content() as text; context: {$implicit: close}\">\n {{ text }}\n </ng-container>\n </div>\n</div>\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './index';\n"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;AAOA,MAiBa,iBAAiB,CAAA;AAjB9B,IAAA,WAAA,GAAA;AAkBqB,QAAA,IAAA,CAAA,QAAQ,GAAG,MAAM,CAAC,aAAa,CAAC,CAAC;QAG3C,IAAiB,CAAA,iBAAA,GAAG,EAAE,CAAC;AAejC,KAAA;AAba,IAAA,WAAW,CAAC,KAAiB,EAAA;QACnC,IACI,CAAC,IAAI,CAAC,QAAQ;AACd,YAAA,CAAC,gBAAgB,CAAC,KAAK,CAAC,MAAM,CAAC;AAC/B,YAAA,CAAC,KAAK,CAAC,MAAM,CAAC,OAAO,CAAC,gBAAgB,CAAC;YACvC,IAAI,CAAC,iBAAiB,EACxB;YACE,OAAO;AACV,SAAA;QAED,KAAK,CAAC,cAAc,EAAE,CAAC;QACvB,KAAK,CAAC,MAAM,CAAC,KAAK,CAAC,EAAC,aAAa,EAAE,IAAI,EAAC,CAAC,CAAC;KAC7C;+GAlBQ,iBAAiB,EAAA,IAAA,EAAA,EAAA,EAAA,MAAA,EAAA,EAAA,CAAA,eAAA,CAAA,SAAA,EAAA,CAAA,CAAA,EAAA;AAAjB,IAAA,SAAA,IAAA,CAAA,IAAA,GAAA,EAAA,CAAA,oBAAA,CAAA,EAAA,UAAA,EAAA,QAAA,EAAA,OAAA,EAAA,SAAA,EAAA,IAAA,EAAA,iBAAiB,EAdf,YAAA,EAAA,IAAA,EAAA,QAAA,EAAA,qBAAA,EAAA,MAAA,EAAA,EAAA,iBAAA,EAAA,mBAAA,EAAA,EAAA,IAAA,EAAA,EAAA,SAAA,EAAA,EAAA,WAAA,EAAA,qBAAA,EAAA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AAW,CAAC,EACtC,IAAA,EAAA;AACF,wBAAA,gBAAgB,EAAE,6BAA6B;AAC/C,wBAAA,mCAAmC,EAAE,iBAAiB;AACtD,wBAAA,kCAAkC,EAC9B,8CAA8C;AAClD,wBAAA,kCAAkC,EAAE,wBAAwB;AAC5D,wBAAA,kCAAkC,EAAE,wBAAwB;AAC/D,qBAAA,EAAA,QAAA,EAAA,osBAAA,EAAA,MAAA,EAAA,CAAA,w2GAAA,CAAA,EAAA,CAAA;;;AExCL;;AAEG;;;;"}
1
+ {"version":3,"file":"taiga-ui-addon-mobile-directives-dropdown-mobile.mjs","sources":["../../../projects/addon-mobile/directives/dropdown-mobile/dropdown-mobile.directive.ts","../../../projects/addon-mobile/directives/dropdown-mobile/dropdown-mobile.component.ts","../../../projects/addon-mobile/directives/dropdown-mobile/dropdown-mobile.template.html","../../../projects/addon-mobile/directives/dropdown-mobile/taiga-ui-addon-mobile-directives-dropdown-mobile.ts"],"sourcesContent":["import {Directive, inject, Input} from '@angular/core';\nimport {TUI_IS_MOBILE} from '@taiga-ui/cdk/tokens';\nimport {tuiIsHTMLElement} from '@taiga-ui/cdk/utils/dom';\nimport {TUI_DROPDOWN_COMPONENT} from '@taiga-ui/core/directives/dropdown';\n\nimport {TuiDropdownMobileComponent} from './dropdown-mobile.component';\n\n@Directive({\n standalone: true,\n selector: '[tuiDropdownMobile]',\n providers: [\n {\n provide: TUI_DROPDOWN_COMPONENT,\n useFactory: () =>\n inject(TUI_IS_MOBILE)\n ? TuiDropdownMobileComponent\n : inject(TUI_DROPDOWN_COMPONENT, {skipSelf: true}),\n },\n ],\n host: {\n '[style.visibility]': '\"visible\"',\n '(mousedown)': 'onMouseDown($event)',\n },\n})\nexport class TuiDropdownMobile {\n private readonly isMobile = inject(TUI_IS_MOBILE);\n\n @Input()\n public tuiDropdownMobile = '';\n\n protected onMouseDown(event: MouseEvent): void {\n if (\n !this.isMobile ||\n !tuiIsHTMLElement(event.target) ||\n !event.target.matches('input,textarea') ||\n this.tuiDropdownMobile\n ) {\n return;\n }\n\n event.preventDefault();\n event.target.focus({preventScroll: true});\n }\n}\n","import {DOCUMENT, NgIf} from '@angular/common';\nimport {\n type AfterViewInit,\n ChangeDetectionStrategy,\n Component,\n inject,\n type OnDestroy,\n ViewEncapsulation,\n} from '@angular/core';\nimport {WaIntersectionObserver} from '@ng-web-apis/intersection-observer';\nimport {TuiKeyboardService} from '@taiga-ui/addon-mobile/services';\nimport {TuiActiveZone} from '@taiga-ui/cdk/directives/active-zone';\nimport {TuiAnimated} from '@taiga-ui/cdk/directives/animated';\nimport {TuiSwipe, type TuiSwipeEvent} from '@taiga-ui/cdk/directives/swipe';\nimport {tuiInjectElement, tuiIsElement} from '@taiga-ui/cdk/utils/dom';\nimport {tuiGetNativeFocused} from '@taiga-ui/cdk/utils/focus';\nimport {tuiPx} from '@taiga-ui/cdk/utils/miscellaneous';\nimport {TuiDropdownDirective} from '@taiga-ui/core/directives/dropdown';\nimport {PolymorpheusOutlet} from '@taiga-ui/polymorpheus';\n\nimport {TuiDropdownMobile} from './dropdown-mobile.directive';\n\nconst GAP = 16;\n\n@Component({\n standalone: true,\n selector: 'tui-dropdown-mobile',\n imports: [NgIf, PolymorpheusOutlet, TuiSwipe, WaIntersectionObserver],\n templateUrl: './dropdown-mobile.template.html',\n styleUrls: ['./dropdown-mobile.style.less'],\n encapsulation: ViewEncapsulation.None,\n changeDetection: ChangeDetectionStrategy.OnPush,\n hostDirectives: [TuiActiveZone, TuiAnimated],\n host: {\n '[class._sheet]': 'directive.tuiDropdownMobile',\n '(document:click.zoneless.capture)': 'onClick($event)',\n '(window>scroll.zoneless.capture)':\n 'refresh($event.currentTarget.visualViewport)',\n '(visualViewport>resize.zoneless)': 'refresh($event.target)',\n '(visualViewport>scroll.zoneless)': 'refresh($event.target)',\n },\n})\nexport class TuiDropdownMobileComponent implements OnDestroy, AfterViewInit {\n private readonly el = tuiInjectElement();\n private readonly keyboard = inject(TuiKeyboardService);\n private readonly doc = inject(DOCUMENT);\n private readonly scrollTop = this.doc.documentElement.scrollTop;\n private readonly observer = new ResizeObserver(\n () =>\n this.doc.defaultView?.visualViewport &&\n this.refresh(this.doc.defaultView.visualViewport),\n );\n\n protected readonly directive = inject(TuiDropdownMobile);\n protected readonly dropdown = inject(TuiDropdownDirective);\n\n constructor() {\n this.observer.observe(this.dropdown.el);\n this.doc.documentElement.style.setProperty('scroll-behavior', 'initial');\n }\n\n public ngAfterViewInit(): void {\n this.el.scrollTop = this.directive.tuiDropdownMobile ? this.el.clientHeight : 0;\n }\n\n public ngOnDestroy(): void {\n this.observer.disconnect();\n this.doc.body.classList.remove('t-dropdown-mobile');\n this.doc.body.style.removeProperty('--t-root-top');\n this.doc.documentElement.scrollTop = this.scrollTop;\n this.doc.documentElement.style.removeProperty('scroll-behavior');\n\n if (this.focused) {\n this.keyboard.hide();\n }\n }\n\n protected readonly close = (): void => this.dropdown.toggle(false);\n\n protected onClick(event: MouseEvent): void {\n if (\n tuiIsElement(event.target) &&\n !this.el.contains(event.target) &&\n (!this.dropdown.el.contains(event.target) ||\n event.target.matches('input,textarea'))\n ) {\n event.stopPropagation();\n }\n }\n\n protected onSwipe({direction}: TuiSwipeEvent, el: HTMLElement): void {\n if (\n direction === 'bottom' &&\n el.getBoundingClientRect().bottom > Number(this.doc.defaultView?.innerHeight)\n ) {\n this.close();\n }\n }\n\n protected onIntersection({isIntersecting}: IntersectionObserverEntry): void {\n if (isIntersecting) {\n this.close();\n }\n }\n\n protected refresh({offsetTop, height}: VisualViewport): void {\n this.doc.body.style.removeProperty('--t-root-top');\n\n if (\n !this.focused ||\n this.directive.tuiDropdownMobile ||\n !this.doc.documentElement.style.getPropertyValue('scroll-behavior')\n ) {\n return;\n }\n\n this.doc.documentElement.scrollTop = 0;\n\n const rect = this.dropdown.el.getBoundingClientRect();\n const topMargin = `max(var(--tui-dropdown-mobile-offset, ${tuiPx(GAP)}), env(safe-area-inset-top))`;\n const offset = `(${topMargin} + ${tuiPx(rect.height + GAP)})`;\n\n this.el.style.setProperty('top', `calc(${tuiPx(offsetTop)} + ${offset})`);\n this.el.style.setProperty('height', `calc(${tuiPx(height)} - ${offset})`);\n\n this.doc.body.classList.add('t-dropdown-mobile');\n this.doc.body.style.setProperty(\n '--t-root-top',\n `calc(${tuiPx(offsetTop - rect.top)} + ${topMargin})`,\n );\n }\n\n private get focused(): boolean {\n return this.dropdown.el.contains(tuiGetNativeFocused(this.doc));\n }\n}\n","<div\n *ngIf=\"directive.tuiDropdownMobile\"\n waIntersectionObserver\n waIntersectionThreshold=\"1\"\n class=\"t-filler\"\n (touchstart.prevent)=\"close()\"\n (waIntersectionObservee)=\"$event[0] && onIntersection($event[0])\"\n></div>\n<div\n #container\n class=\"t-container\"\n (tuiSwipe)=\"onSwipe($event, container)\"\n>\n <h2\n *ngIf=\"directive.tuiDropdownMobile\"\n class=\"t-heading\"\n >\n {{ directive.tuiDropdownMobile }}\n </h2>\n <div class=\"t-content\">\n <ng-container *polymorpheusOutlet=\"dropdown._content() as text; context: {$implicit: close}\">\n {{ text }}\n </ng-container>\n </div>\n</div>\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './index';\n"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;AAOA,MAiBa,iBAAiB,CAAA;AAjB9B,IAAA,WAAA,GAAA;AAkBqB,QAAA,IAAA,CAAA,QAAQ,GAAG,MAAM,CAAC,aAAa,CAAC,CAAC;QAG3C,IAAiB,CAAA,iBAAA,GAAG,EAAE,CAAC;AAejC,KAAA;AAba,IAAA,WAAW,CAAC,KAAiB,EAAA;QACnC,IACI,CAAC,IAAI,CAAC,QAAQ;AACd,YAAA,CAAC,gBAAgB,CAAC,KAAK,CAAC,MAAM,CAAC;AAC/B,YAAA,CAAC,KAAK,CAAC,MAAM,CAAC,OAAO,CAAC,gBAAgB,CAAC;YACvC,IAAI,CAAC,iBAAiB,EACxB;YACE,OAAO;AACV,SAAA;QAED,KAAK,CAAC,cAAc,EAAE,CAAC;QACvB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,EAAA,EAAA,CAAA,sBAAA,EAAA,QAAA,EAAA,0BAAA,EAAA,OAAA,EAAA,CAAA,wBAAA,CAAA,EAAA,CAAA,EAAA,eAAA,EAAA,EAAA,CAAA,uBAAA,CAAA,MAAA,EAAA,aAAA,EAAA,EAAA,CAAA,iBAAA,CAAA,IAAA,EAAA,CAAA,CAAA,EAAA;;4FAenC,0BAA0B,EAAA,UAAA,EAAA,CAAA;kBAlBtC,SAAS;iCACM,IAAI,EAAA,QAAA,EACN,qBAAqB,EAAA,OAAA,EACtB,CAAC,IAAI,EAAE,kBAAkB,EAAE,QAAQ,EAAE,sBAAsB,CAAC,EAAA,aAAA,EAGtD,iBAAiB,CAAC,IAAI,EACpB,eAAA,EAAA,uBAAuB,CAAC,MAAM,EAC/B,cAAA,EAAA,CAAC,aAAa,EAAE,WAAW,CAAC,EACtC,IAAA,EAAA;AACF,wBAAA,gBAAgB,EAAE,6BAA6B;AAC/C,wBAAA,mCAAmC,EAAE,iBAAiB;AACtD,wBAAA,kCAAkC,EAC9B,8CAA8C;AAClD,wBAAA,kCAAkC,EAAE,wBAAwB;AAC5D,wBAAA,kCAAkC,EAAE,wBAAwB;AAC/D,qBAAA,EAAA,QAAA,EAAA,osBAAA,EAAA,MAAA,EAAA,CAAA,6hHAAA,CAAA,EAAA,CAAA;;;AExCL;;AAEG;;;;"}
@@ -1 +1 @@
1
- {"version":3,"file":"taiga-ui-addon-mobile-directives-responsive-dialog.mjs","sources":["../../../projects/addon-mobile/directives/responsive-dialog/responsive-dialog.service.ts","../../../projects/addon-mobile/directives/responsive-dialog/responsive-dialog.directive.ts","../../../projects/addon-mobile/directives/responsive-dialog/taiga-ui-addon-mobile-directives-responsive-dialog.ts"],"sourcesContent":["import {inject, Injectable} from '@angular/core';\nimport type {TuiSheetDialogOptions} from '@taiga-ui/addon-mobile/components/sheet-dialog';\nimport {TuiSheetDialogService} from '@taiga-ui/addon-mobile/components/sheet-dialog';\nimport {TUI_IS_MOBILE} from '@taiga-ui/cdk/tokens';\nimport {tuiIsString} from '@taiga-ui/cdk/utils/miscellaneous';\nimport type {TuiDialogContext, TuiDialogOptions} from '@taiga-ui/core/components/dialog';\nimport {TuiDialogService} from '@taiga-ui/core/components/dialog';\nimport type {PolymorpheusContent} from '@taiga-ui/polymorpheus';\nimport type {Observable} from 'rxjs';\n\nexport interface TuiResponsiveDialogOptions<I = undefined>\n extends Omit<TuiDialogOptions<I>, 'label'>,\n TuiSheetDialogOptions<unknown> {\n readonly data: I extends void ? undefined : I & {button?: string};\n readonly label: PolymorpheusContent;\n}\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<\n TuiDialogContext<G> & TuiResponsiveDialogOptions<any>\n >,\n options: Partial<TuiResponsiveDialogOptions<any>> = {},\n ): Observable<G> {\n return this.isMobile\n ? this.sheets.open(content, options)\n : this.dialogs.open(content, {\n ...options,\n label: tuiIsString(options.label) ? options.label : '',\n });\n }\n}\n","import {Directive} from '@angular/core';\nimport {TuiPopoverDirective} from '@taiga-ui/cdk/directives/popover';\nimport {tuiAsPopover} from '@taiga-ui/cdk/services';\n\nimport type {TuiResponsiveDialogOptions} from './responsive-dialog.service';\nimport {TuiResponsiveDialogService} from './responsive-dialog.service';\n\n@Directive({\n standalone: true,\n selector: 'ng-template[tuiResponsiveDialog]',\n inputs: ['options: tuiResponsiveDialogOptions', 'open: tuiResponsiveDialog'],\n outputs: ['openChange: tuiResponsiveDialogChange'],\n providers: [tuiAsPopover(TuiResponsiveDialogService as any)],\n})\nexport class TuiResponsiveDialog extends TuiPopoverDirective<TuiResponsiveDialogOptions> {}\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './index';\n"],"names":[],"mappings":";;;;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SAAA,EAAA,CAAA,CAAA,EAAA;AAAnB,IAAA,SAAA,IAAA,CAAA,IAAA,GAAA,EAAA,CAAA,oBAAA,CAAA,EAAA,UAAA,EAAA,QAAA,EAAA,OAAA,EAAA,SAAA,EAAA,IAAA,EAAA,mBAAmB,4OAFjB,CAAC,YAAY,CAAC,0BAAiC,CAAC,CAAC,EAAA,eAAA,EAAA,IAAA,EAAA,QAAA,EAAA,EAAA,EAAA,CAAA,CAAA,EAAA;;4FAEnD,mBAAmB,EAAA,UAAA,EAAA,CAAA;kBAP/B,SAAS;AAAC,YAAA,IAAA,EAAA,CAAA;AACP,oBAAA,UAAU,EAAE,IAAI;AAChB,oBAAA,QAAQ,EAAE,kCAAkC;AAC5C,oBAAA,MAAM,EAAE,CAAC,qCAAqC,EAAE,2BAA2B,CAAC;oBAC5E,OAAO,EAAE,CAAC,uCAAuC,CAAC;AAClD,oBAAA,SAAS,EAAE,CAAC,YAAY,CAAC,0BAAiC,CAAC,CAAC;AAC/D,iBAAA,CAAA;;;ACbD;;AAEG;;;;"}
1
+ {"version":3,"file":"taiga-ui-addon-mobile-directives-responsive-dialog.mjs","sources":["../../../projects/addon-mobile/directives/responsive-dialog/responsive-dialog.service.ts","../../../projects/addon-mobile/directives/responsive-dialog/responsive-dialog.directive.ts","../../../projects/addon-mobile/directives/responsive-dialog/taiga-ui-addon-mobile-directives-responsive-dialog.ts"],"sourcesContent":["import {inject, Injectable} from '@angular/core';\nimport {\n type TuiSheetDialogOptions,\n TuiSheetDialogService,\n} from '@taiga-ui/addon-mobile/components/sheet-dialog';\nimport {TUI_IS_MOBILE} from '@taiga-ui/cdk/tokens';\nimport {tuiIsString} from '@taiga-ui/cdk/utils/miscellaneous';\nimport {\n type TuiDialogContext,\n type TuiDialogOptions,\n TuiDialogService,\n} from '@taiga-ui/core/components/dialog';\nimport {type PolymorpheusContent} from '@taiga-ui/polymorpheus';\nimport {type Observable} from 'rxjs';\n\nexport interface TuiResponsiveDialogOptions<I = undefined>\n extends Omit<TuiDialogOptions<I>, 'label'>,\n TuiSheetDialogOptions<unknown> {\n readonly data: I extends void ? undefined : I & {button?: string};\n readonly label: PolymorpheusContent;\n}\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<\n TuiDialogContext<G> & TuiResponsiveDialogOptions<any>\n >,\n options: Partial<TuiResponsiveDialogOptions<any>> = {},\n ): Observable<G> {\n return this.isMobile\n ? this.sheets.open(content, options)\n : this.dialogs.open(content, {\n ...options,\n label: tuiIsString(options.label) ? options.label : '',\n });\n }\n}\n","import {Directive} from '@angular/core';\nimport {TuiPopoverDirective} from '@taiga-ui/cdk/directives/popover';\nimport {tuiAsPopover} from '@taiga-ui/cdk/services';\n\nimport {\n type TuiResponsiveDialogOptions,\n TuiResponsiveDialogService,\n} from './responsive-dialog.service';\n\n@Directive({\n standalone: true,\n selector: 'ng-template[tuiResponsiveDialog]',\n inputs: ['options: tuiResponsiveDialogOptions', 'open: tuiResponsiveDialog'],\n outputs: ['openChange: tuiResponsiveDialogChange'],\n providers: [tuiAsPopover(TuiResponsiveDialogService as any)],\n})\nexport class TuiResponsiveDialog extends TuiPopoverDirective<TuiResponsiveDialogOptions> {}\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './index';\n"],"names":[],"mappings":";;;;;;;;;AAsBA;;AAEG;AACH,MAGa,0BAA0B,CAAA;AAHvC,IAAA,WAAA,GAAA;AAIqB,QAAA,IAAA,CAAA,QAAQ,GAAG,MAAM,CAAC,aAAa,CAAC,CAAC;AACjC,QAAA,IAAA,CAAA,OAAO,GAAG,MAAM,CAAC,gBAAgB,CAAC,CAAC;AACnC,QAAA,IAAA,CAAA,MAAM,GAAG,MAAM,CAAC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,EAAA,EAAA,EAAA,CAAA,CAAA,EAAA;;4FAEnD,mBAAmB,EAAA,UAAA,EAAA,CAAA;kBAP/B,SAAS;AAAC,YAAA,IAAA,EAAA,CAAA;AACP,oBAAA,UAAU,EAAE,IAAI;AAChB,oBAAA,QAAQ,EAAE,kCAAkC;AAC5C,oBAAA,MAAM,EAAE,CAAC,qCAAqC,EAAE,2BAA2B,CAAC;oBAC5E,OAAO,EAAE,CAAC,uCAAuC,CAAC;AAClD,oBAAA,SAAS,EAAE,CAAC,YAAY,CAAC,0BAAiC,CAAC,CAAC;AAC/D,iBAAA,CAAA;;;ACfD;;AAEG;;;;"}
@@ -38,7 +38,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.2.12", ngImpo
38
38
  }] });
39
39
  class TuiRipple {
40
40
  constructor() {
41
- this.document = inject(DOCUMENT);
41
+ this.doc = inject(DOCUMENT);
42
42
  this.destroyRef = inject(DestroyRef);
43
43
  this.animationOptions = {
44
44
  duration: tuiGetDuration(inject(TUI_ANIMATIONS_SPEED)),
@@ -60,7 +60,7 @@ class TuiRipple {
60
60
  .subscribe();
61
61
  }
62
62
  createRipple(clientX, clientY, { width, height, top, left }) {
63
- const ripple = this.document.createElement('div');
63
+ const ripple = this.doc.createElement('div');
64
64
  const radius = Math.sqrt(width * width + height * height);
65
65
  const dimension = radius * 2;
66
66
  const x = clientX - left - radius;
@@ -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 {tuiTypedFromEvent} from '@taiga-ui/cdk/observables';\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, merge, race, switchMap, tap} from 'rxjs';\n\nconst TO_KEYFRAMES = [\n {\n transform: 'scale(0)',\n opacity: '0.12',\n },\n {\n opacity: '0.12',\n },\n];\nconst FROM_KEYFRAMES = [\n {\n opacity: '0.12',\n },\n {\n opacity: '0',\n },\n];\n\n@Component({\n standalone: true,\n template: '',\n styleUrls: ['./ripple.style.less'],\n encapsulation: ViewEncapsulation.None,\n changeDetection: ChangeDetectionStrategy.OnPush,\n host: {\n class: 'tui-ripple-styles',\n },\n})\nclass TuiRippleStyles {}\n\n@Directive({\n standalone: true,\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 document = inject(DOCUMENT);\n private readonly destroyRef = inject(DestroyRef);\n private readonly animationOptions = {\n duration: tuiGetDuration(inject(TUI_ANIMATIONS_SPEED)),\n };\n\n protected readonly nothing = tuiWithStyles(TuiRippleStyles);\n\n @Input()\n public tuiRipple = '';\n\n protected start(x: number, y: number, target: HTMLElement, el: HTMLElement): void {\n const element = this.tuiRipple ? target.closest(this.tuiRipple) : el;\n\n if (!tuiIsHTMLElement(element)) {\n return;\n }\n\n const ripple = this.createRipple(x, y, element.getBoundingClientRect());\n const touchEnd$ = merge(\n tuiTypedFromEvent(element, 'pointerup'),\n tuiTypedFromEvent(element, 'pointercancel'),\n tuiTypedFromEvent(element, 'pointermove'),\n );\n\n element.appendChild(ripple);\n\n const animationEndOn$ = tuiTypedFromEvent(\n ripple.animate(TO_KEYFRAMES, this.animationOptions),\n 'finish',\n );\n\n race(\n touchEnd$.pipe(switchMap(() => animationEndOn$)),\n animationEndOn$.pipe(switchMap(() => touchEnd$)),\n )\n .pipe(\n first(),\n switchMap(() =>\n tuiTypedFromEvent(\n ripple.animate(FROM_KEYFRAMES, this.animationOptions),\n 'finish',\n ),\n ),\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.document.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,YAAY,GAAG;AACjB,IAAA;AACI,QAAA,SAAS,EAAE,UAAU;AACrB,QAAA,OAAO,EAAE,MAAM;AAClB,KAAA;AACD,IAAA;AACI,QAAA,OAAO,EAAE,MAAM;AAClB,KAAA;CACJ,CAAC;AACF,MAAM,cAAc,GAAG;AACnB,IAAA;AACI,QAAA,OAAO,EAAE,MAAM;AAClB,KAAA;AACD,IAAA;AACI,QAAA,OAAO,EAAE,GAAG;AACf,KAAA;CACJ,CAAC;AAEF,MAUM,eAAe,CAAA;+GAAf,eAAe,EAAA,IAAA,EAAA,EAAA,EAAA,MAAA,EAAA,EAAA,CAAA,eAAA,CAAA,SAAA,EAAA,CAAA,CAAA,EAAA;AAAf,IAAA,SAAA,IAAA,CAAA,IAAA,GAAA,EAAA,CAAA,oBAAA,CAAA,EAAA,UAAA,EAAA,QAAA,EAAA,OAAA,EAAA,SAAA,EAAA,IAAA,E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nF,qBAAA;AACJ,iBAAA,CAAA;8BAWU,SAAS,EAAA,CAAA;sBADf,KAAK;;;ACjEV;;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 {tuiTypedFromEvent} from '@taiga-ui/cdk/observables';\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, merge, race, switchMap, tap} from 'rxjs';\n\nconst TO_KEYFRAMES = [\n {\n transform: 'scale(0)',\n opacity: '0.12',\n },\n {\n opacity: '0.12',\n },\n];\nconst FROM_KEYFRAMES = [\n {\n opacity: '0.12',\n },\n {\n opacity: '0',\n },\n];\n\n@Component({\n standalone: true,\n template: '',\n styleUrls: ['./ripple.style.less'],\n encapsulation: ViewEncapsulation.None,\n changeDetection: ChangeDetectionStrategy.OnPush,\n host: {\n class: 'tui-ripple-styles',\n },\n})\nclass TuiRippleStyles {}\n\n@Directive({\n standalone: true,\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 animationOptions = {\n duration: tuiGetDuration(inject(TUI_ANIMATIONS_SPEED)),\n };\n\n protected readonly nothing = tuiWithStyles(TuiRippleStyles);\n\n @Input()\n public tuiRipple = '';\n\n protected start(x: number, y: number, target: HTMLElement, el: HTMLElement): void {\n const element = this.tuiRipple ? target.closest(this.tuiRipple) : el;\n\n if (!tuiIsHTMLElement(element)) {\n return;\n }\n\n const ripple = this.createRipple(x, y, element.getBoundingClientRect());\n const touchEnd$ = merge(\n tuiTypedFromEvent(element, 'pointerup'),\n tuiTypedFromEvent(element, 'pointercancel'),\n tuiTypedFromEvent(element, 'pointermove'),\n );\n\n element.appendChild(ripple);\n\n const animationEndOn$ = tuiTypedFromEvent(\n ripple.animate(TO_KEYFRAMES, this.animationOptions),\n 'finish',\n );\n\n race(\n touchEnd$.pipe(switchMap(() => animationEndOn$)),\n animationEndOn$.pipe(switchMap(() => touchEnd$)),\n )\n .pipe(\n first(),\n switchMap(() =>\n tuiTypedFromEvent(\n ripple.animate(FROM_KEYFRAMES, this.animationOptions),\n 'finish',\n ),\n ),\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,YAAY,GAAG;AACjB,IAAA;AACI,QAAA,SAAS,EAAE,UAAU;AACrB,QAAA,OAAO,EAAE,MAAM;AAClB,KAAA;AACD,IAAA;AACI,QAAA,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mGAAT,SAAS,EAAA,YAAA,EAAA,IAAA,EAAA,QAAA,EAAA,aAAA,EAAA,MAAA,EAAA,EAAA,SAAA,EAAA,WAAA,EAAA,EAAA,IAAA,EAAA,EAAA,SAAA,EAAA,EAAA,sBAAA,EAAA,4EAAA,EAAA,EAAA,EAAA,QAAA,EAAA,EAAA,EAAA,CAAA,CAAA,EAAA;;4FAAT,SAAS,EAAA,UAAA,EAAA,CAAA;kBARrB,SAAS;AAAC,YAAA,IAAA,EAAA,CAAA;AACP,oBAAA,UAAU,EAAE,IAAI;AAChB,oBAAA,QAAQ,EAAE,aAAa;AACvB,oBAAA,IAAI,EAAE;AACF,wBAAA,wBAAwB,EACpB,4EAA4E;AACnF,qBAAA;AACJ,iBAAA,CAAA;8BAWU,SAAS,EAAA,CAAA;sBADf,KAAK;;;ACjEV;;AAEG;;;;"}
@@ -1 +1 @@
1
- {"version":3,"file":"taiga-ui-addon-mobile-directives-sidebar.mjs","sources":["../../../projects/addon-mobile/directives/sidebar/sidebar.directive.ts","../../../projects/addon-mobile/directives/sidebar/sidebar.component.ts","../../../projects/addon-mobile/directives/sidebar/sidebar.template.html","../../../projects/addon-mobile/directives/sidebar/sidebar.ts","../../../projects/addon-mobile/directives/sidebar/taiga-ui-addon-mobile-directives-sidebar.ts"],"sourcesContent":["import type {ComponentRef, OnDestroy} from '@angular/core';\nimport {Directive, inject, INJECTOR, Input, TemplateRef} from '@angular/core';\nimport {TuiPopupService} from '@taiga-ui/core/directives/popup';\nimport type {TuiHorizontalDirection} from '@taiga-ui/core/types';\nimport {PolymorpheusComponent, PolymorpheusTemplate} from '@taiga-ui/polymorpheus';\n\nimport {TuiSidebarComponent} from './sidebar.component';\n\n/**\n * @deprecated use {@link TuiDrawer} instead\n */\n@Directive({\n standalone: true,\n selector: '[tuiSidebar]',\n})\nexport class TuiSidebarDirective<T = Record<string, unknown>>\n extends PolymorpheusTemplate<T>\n implements OnDestroy\n{\n private readonly injector = inject(INJECTOR);\n private readonly service = inject(TuiPopupService);\n\n private readonly component = new PolymorpheusComponent(\n TuiSidebarComponent,\n this.injector,\n );\n\n private sidebarRef: ComponentRef<TuiSidebarComponent> | null = null;\n\n @Input('tuiSidebarDirection')\n public direction: TuiHorizontalDirection = 'left';\n\n @Input('tuiSidebarAutoWidth')\n public autoWidth = false;\n\n public readonly content = inject(TemplateRef<T>);\n\n @Input()\n public set tuiSidebar(open: boolean) {\n if (open) {\n this.show();\n } else {\n this.hide();\n }\n }\n\n public ngOnDestroy(): void {\n this.hide();\n }\n\n private show(): void {\n if (this.sidebarRef !== null) {\n return;\n }\n\n this.sidebarRef = this.service.add(this.component);\n this.sidebarRef.changeDetectorRef.detectChanges();\n }\n\n private hide(): void {\n if (this.sidebarRef === null) {\n return;\n }\n\n this.service.remove(this.sidebarRef);\n this.sidebarRef = null;\n }\n}\n","import type {AnimationOptions} from '@angular/animations';\nimport type {DoCheck} from '@angular/core';\nimport {ChangeDetectionStrategy, Component, inject} from '@angular/core';\nimport {TuiActiveZone} from '@taiga-ui/cdk/directives/active-zone';\nimport {tuiSlideIn} from '@taiga-ui/core/animations';\nimport {TUI_ANIMATIONS_SPEED} from '@taiga-ui/core/tokens';\nimport type {TuiHorizontalDirection} from '@taiga-ui/core/types';\nimport {tuiToAnimationOptions} from '@taiga-ui/core/utils/miscellaneous';\nimport type {PolymorpheusContent} from '@taiga-ui/polymorpheus';\nimport {PolymorpheusOutlet} from '@taiga-ui/polymorpheus';\n\nimport {TuiSidebarDirective} from './sidebar.directive';\n\n/**\n * @deprecated use {@link TuiDrawer} instead\n */\n@Component({\n standalone: true,\n selector: 'aside[tuiSidebar]',\n imports: [PolymorpheusOutlet, TuiActiveZone],\n templateUrl: './sidebar.template.html',\n styleUrls: ['./sidebar.style.less'],\n changeDetection: ChangeDetectionStrategy.OnPush,\n animations: [tuiSlideIn],\n host: {\n '[class]': '\"t-\" + direction',\n '[@tuiSlideIn]': 'animation',\n },\n})\nexport class TuiSidebarComponent implements DoCheck {\n private readonly directive = inject(TuiSidebarDirective);\n private readonly options = tuiToAnimationOptions(inject(TUI_ANIMATIONS_SPEED));\n private readonly left = {...this.options, value: 'left'};\n private readonly right = {...this.options, value: 'right'};\n\n public ngDoCheck(): void {\n this.directive.check();\n }\n\n protected get animation(): AnimationOptions {\n return this.direction === 'left' ? this.left : this.right;\n }\n\n protected get direction(): TuiHorizontalDirection {\n return this.directive.direction;\n }\n\n protected get content(): PolymorpheusContent {\n return this.directive.content;\n }\n\n protected get autoWidth(): boolean {\n return this.directive.autoWidth;\n }\n}\n","<div\n tuiActiveZone\n class=\"t-wrapper\"\n [class.t-wrapper_auto-width]=\"autoWidth\"\n>\n <ng-container *polymorpheusOutlet=\"content as text\">\n {{ text }}\n </ng-container>\n</div>\n","import {TuiSidebarComponent} from './sidebar.component';\nimport {TuiSidebarDirective} from './sidebar.directive';\n\n/**\n * @deprecated use {@link TuiDrawer} instead\n */\nexport const TuiSidebar = [TuiSidebarComponent, TuiSidebarDirective] as const;\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './index';\n"],"names":[],"mappings":";;;;;;;;;AAQA;;AAEG;AACH,MAIa,mBACT,SAAQ,oBAAuB,CAAA;AALnC,IAAA,WAAA,GAAA;;AAQqB,QAAA,IAAA,CAAA,QAAQ,GAAG,MAAM,CAAC,QAAQ,CAAC,CAAC;AAC5B,QAAA,IAAA,CAAA,OAAO,GAAG,MAAM,CAAC,eAAe,CAAC,CAAC;QAElC,IAAS,CAAA,SAAA,GAAG,IAAI,qBAAqB,CAClD,mBAAmB,EACnB,IAAI,CAAC,QAAQ,CAChB,CAAC;QAEM,IAAU,CAAA,UAAA,GAA6C,IAAI,CAAC;QAG7D,IAAS,CAAA,SAAA,GAA2B,MAAM,CAAC;QAG3C,IAAS,CAAA,SAAA,GAAG,KAAK,CAAC;AAET,QAAA,IAAA,CAAA,OAAO,GAAG,MAAM,EAAC,WAAc,EAAC,CAAC;AAgCpD,KAAA;IA9BG,IACW,UAAU,CAAC,IAAa,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BAAmB,EAAA,YAAA,EAAA,IAAA,EAAA,QAAA,EAAA,mBAAA,EAAA,IAAA,EAAA,EAAA,UAAA,EAAA,EAAA,OAAA,EAAA,oBAAA,EAAA,aAAA,EAAA,WAAA,EAAA,EAAA,EAAA,QAAA,EAAA,EAAA,EAAA,QAAA,EC7BhC,oNASA,EDUc,MAAA,EAAA,CAAA,yrBAAA,CAAA,EAAA,YAAA,EAAA,CAAA,EAAA,IAAA,EAAA,WAAA,EAAA,IAAA,EAAA,kBAAkB,8HAAE,aAAa,EAAA,QAAA,EAAA,qHAAA,EAAA,MAAA,EAAA,CAAA,qBAAA,CAAA,EAAA,OAAA,EAAA,CAAA,qBAAA,CAAA,EAAA,QAAA,EAAA,CAAA,eAAA,CAAA,EAAA,CAAA,EAAA,UAAA,EAI/B,CAAC,UAAU,CAAC,EAAA,eAAA,EAAA,EAAA,CAAA,uBAAA,CAAA,MAAA,EAAA,CAAA,CAAA,EAAA;;4FAMf,mBAAmB,EAAA,UAAA,EAAA,CAAA;kBAb/B,SAAS;AACM,YAAA,IAAA,EAAA,CAAA,EAAA,UAAA,EAAA,IAAI,YACN,mBAAmB,EAAA,OAAA,EACpB,CAAC,kBAAkB,EAAE,aAAa,CAAC,EAG3B,eAAA,EAAA,uBAAuB,CAAC,MAAM,EAAA,UAAA,EACnC,CAAC,UAAU,CAAC,EAClB,IAAA,EAAA;AACF,wBAAA,SAAS,EAAE,kBAAkB;AAC7B,wBAAA,eAAe,EAAE,WAAW;AAC/B,qBAAA,EAAA,QAAA,EAAA,oNAAA,EAAA,MAAA,EAAA,CAAA,yrBAAA,CAAA,EAAA,CAAA;;;AExBL;;AAEG;MACU,UAAU,GAAG,CAAC,mBAAmB,EAAE,mBAAmB;;ACNnE;;AAEG;;;;"}
1
+ {"version":3,"file":"taiga-ui-addon-mobile-directives-sidebar.mjs","sources":["../../../projects/addon-mobile/directives/sidebar/sidebar.directive.ts","../../../projects/addon-mobile/directives/sidebar/sidebar.component.ts","../../../projects/addon-mobile/directives/sidebar/sidebar.template.html","../../../projects/addon-mobile/directives/sidebar/sidebar.ts","../../../projects/addon-mobile/directives/sidebar/taiga-ui-addon-mobile-directives-sidebar.ts"],"sourcesContent":["import {\n type ComponentRef,\n Directive,\n inject,\n INJECTOR,\n Input,\n type OnDestroy,\n TemplateRef,\n} from '@angular/core';\nimport {TuiPopupService} from '@taiga-ui/core/directives/popup';\nimport {type TuiHorizontalDirection} from '@taiga-ui/core/types';\nimport {PolymorpheusComponent, PolymorpheusTemplate} from '@taiga-ui/polymorpheus';\n\nimport {TuiSidebarComponent} from './sidebar.component';\n\n/**\n * @deprecated use {@link TuiDrawer} instead\n */\n@Directive({\n standalone: true,\n selector: '[tuiSidebar]',\n})\nexport class TuiSidebarDirective<T = Record<string, unknown>>\n extends PolymorpheusTemplate<T>\n implements OnDestroy\n{\n private readonly injector = inject(INJECTOR);\n private readonly service = inject(TuiPopupService);\n\n private readonly component = new PolymorpheusComponent(\n TuiSidebarComponent,\n this.injector,\n );\n\n private sidebarRef: ComponentRef<TuiSidebarComponent> | null = null;\n\n @Input('tuiSidebarDirection')\n public direction: TuiHorizontalDirection = 'left';\n\n @Input('tuiSidebarAutoWidth')\n public autoWidth = false;\n\n public readonly content = inject(TemplateRef<T>);\n\n @Input()\n public set tuiSidebar(open: boolean) {\n if (open) {\n this.show();\n } else {\n this.hide();\n }\n }\n\n public ngOnDestroy(): void {\n this.hide();\n }\n\n private show(): void {\n if (this.sidebarRef !== null) {\n return;\n }\n\n this.sidebarRef = this.service.add(this.component);\n this.sidebarRef.changeDetectorRef.detectChanges();\n }\n\n private hide(): void {\n if (this.sidebarRef === null) {\n return;\n }\n\n this.service.remove(this.sidebarRef);\n this.sidebarRef = null;\n }\n}\n","import {type AnimationOptions} from '@angular/animations';\nimport {ChangeDetectionStrategy, Component, type DoCheck, inject} from '@angular/core';\nimport {TuiActiveZone} from '@taiga-ui/cdk/directives/active-zone';\nimport {tuiSlideIn} from '@taiga-ui/core/animations';\nimport {TUI_ANIMATIONS_SPEED} from '@taiga-ui/core/tokens';\nimport {type TuiHorizontalDirection} from '@taiga-ui/core/types';\nimport {tuiToAnimationOptions} from '@taiga-ui/core/utils/miscellaneous';\nimport {type PolymorpheusContent, PolymorpheusOutlet} from '@taiga-ui/polymorpheus';\n\nimport {TuiSidebarDirective} from './sidebar.directive';\n\n/**\n * @deprecated use {@link TuiDrawer} instead\n */\n@Component({\n standalone: true,\n selector: 'aside[tuiSidebar]',\n imports: [PolymorpheusOutlet, TuiActiveZone],\n templateUrl: './sidebar.template.html',\n styleUrls: ['./sidebar.style.less'],\n changeDetection: ChangeDetectionStrategy.OnPush,\n animations: [tuiSlideIn],\n host: {\n '[class]': '\"t-\" + direction',\n '[@tuiSlideIn]': 'animation',\n },\n})\nexport class TuiSidebarComponent implements DoCheck {\n private readonly directive = inject(TuiSidebarDirective);\n private readonly options = tuiToAnimationOptions(inject(TUI_ANIMATIONS_SPEED));\n private readonly left = {...this.options, value: 'left'};\n private readonly right = {...this.options, value: 'right'};\n\n public ngDoCheck(): void {\n this.directive.check();\n }\n\n protected get animation(): AnimationOptions {\n return this.direction === 'left' ? this.left : this.right;\n }\n\n protected get direction(): TuiHorizontalDirection {\n return this.directive.direction;\n }\n\n protected get content(): PolymorpheusContent {\n return this.directive.content;\n }\n\n protected get autoWidth(): boolean {\n return this.directive.autoWidth;\n }\n}\n","<div\n tuiActiveZone\n class=\"t-wrapper\"\n [class.t-wrapper_auto-width]=\"autoWidth\"\n>\n <ng-container *polymorpheusOutlet=\"content as text\">\n {{ text }}\n </ng-container>\n</div>\n","import {TuiSidebarComponent} from './sidebar.component';\nimport {TuiSidebarDirective} from './sidebar.directive';\n\n/**\n * @deprecated use {@link TuiDrawer} instead\n */\nexport const TuiSidebar = [TuiSidebarComponent, TuiSidebarDirective] as const;\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './index';\n"],"names":[],"mappings":";;;;;;;;;AAeA;;AAEG;AACH,MAIa,mBACT,SAAQ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OAAA,EACpB,CAAC,kBAAkB,EAAE,aAAa,CAAC,EAG3B,eAAA,EAAA,uBAAuB,CAAC,MAAM,EAAA,UAAA,EACnC,CAAC,UAAU,CAAC,EAClB,IAAA,EAAA;AACF,wBAAA,SAAS,EAAE,kBAAkB;AAC7B,wBAAA,eAAe,EAAE,WAAW;AAC/B,qBAAA,EAAA,QAAA,EAAA,oNAAA,EAAA,MAAA,EAAA,CAAA,yrBAAA,CAAA,EAAA,CAAA;;;AEtBL;;AAEG;MACU,UAAU,GAAG,CAAC,mBAAmB,EAAE,mBAAmB;;ACNnE;;AAEG;;;;"}
@@ -1 +1 @@
1
- {"version":3,"file":"taiga-ui-addon-mobile-services.mjs","sources":["../../../projects/addon-mobile/services/keyboard.service.ts","../../../projects/addon-mobile/services/taiga-ui-addon-mobile-services.ts"],"sourcesContent":["import {DOCUMENT} from '@angular/common';\nimport type {OnDestroy} from '@angular/core';\nimport {inject, Injectable} from '@angular/core';\nimport {tuiGetNativeFocused} from '@taiga-ui/cdk/utils/focus';\nimport {filter, fromEvent, merge} from 'rxjs';\n\n@Injectable({\n providedIn: 'root',\n})\nexport class TuiKeyboardService implements OnDestroy {\n private readonly doc = inject(DOCUMENT);\n private readonly sub = merge(\n fromEvent(this.doc, 'focusout'),\n fromEvent(this.doc, 'mousedown').pipe(\n filter((e) => Object.is(e.target, this.element)),\n ),\n ).subscribe(() => {\n this.show();\n });\n\n private element?: ElementContentEditable;\n private inputMode = '';\n\n public ngOnDestroy(): void {\n this.sub.unsubscribe();\n this.show();\n }\n\n public toggle(): void {\n if (this.element) {\n this.show();\n } else {\n this.hide();\n }\n }\n\n public hide(): void {\n const focused = tuiGetNativeFocused(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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AAC;KAC9B;IAEM,IAAI,GAAA;AACP,QAAA,IAAI,CAAC,IAAI,CAAC,OAAO,EAAE;YACf,OAAO;AACV,SAAA;AAED,QAAA,IAAI,CAAC,OAAO,CAAC,SAAS,GAAG,MAAM,CAAC;QAChC,IAAI,CAAC,OAAO,CAAC,SAAS,GAAG,IAAI,CAAC,SAAS,CAAC;AACxC,QAAA,IAAI,CAAC,OAAO,GAAG,SAAS,CAAC;KAC5B;+GA/CQ,kBAAkB,EAAA,IAAA,EAAA,EAAA,EAAA,MAAA,EAAA,EAAA,CAAA,eAAA,CAAA,UAAA,EAAA,CAAA,CAAA,EAAA;AAAlB,IAAA,SAAA,IAAA,CAAA,KAAA,GAAA,EAAA,CAAA,qBAAA,CAAA,EAAA,UAAA,EAAA,QAAA,EAAA,OAAA,EAAA,SAAA,EAAA,QAAA,EAAA,EAAA,EAAA,IAAA,EAAA,kBAAkB,cAFf,MAAM,EAAA,CAAA,CAAA,EAAA;;4FAET,kBAAkB,EAAA,UAAA,EAAA,CAAA;kBAH9B,UAAU;AAAC,YAAA,IAAA,EAAA,CAAA;AACR,oBAAA,UAAU,EAAE,MAAM;AACrB,iBAAA,CAAA;;;ACRD;;AAEG;;;;"}
1
+ {"version":3,"file":"taiga-ui-addon-mobile-services.mjs","sources":["../../../projects/addon-mobile/services/keyboard.service.ts","../../../projects/addon-mobile/services/taiga-ui-addon-mobile-services.ts"],"sourcesContent":["import {DOCUMENT} from '@angular/common';\nimport {inject, Injectable, type OnDestroy} from '@angular/core';\nimport {tuiGetNativeFocused} from '@taiga-ui/cdk/utils/focus';\nimport {filter, fromEvent, merge} from 'rxjs';\n\n@Injectable({\n providedIn: 'root',\n})\nexport class TuiKeyboardService implements OnDestroy {\n private readonly doc = inject(DOCUMENT);\n private readonly sub = merge(\n fromEvent(this.doc, 'focusout'),\n fromEvent(this.doc, 'mousedown').pipe(\n filter((e) => Object.is(e.target, this.element)),\n ),\n ).subscribe(() => {\n this.show();\n });\n\n private element?: ElementContentEditable;\n private inputMode = '';\n\n public ngOnDestroy(): void {\n this.sub.unsubscribe();\n this.show();\n }\n\n public toggle(): void {\n if (this.element) {\n this.show();\n } else {\n this.hide();\n }\n }\n\n public hide(): void {\n const focused = tuiGetNativeFocused(this.doc) as HTMLInputElement;\n\n if (focused?.inputMode === undefined || this.element) {\n return;\n }\n\n this.element = focused;\n this.inputMode = focused.inputMode;\n focused.inputMode = 'none';\n }\n\n public show(): void {\n if (!this.element) {\n return;\n }\n\n this.element.inputMode = 'none';\n this.element.inputMode = this.inputMode;\n this.element = undefined;\n }\n}\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './index';\n"],"names":[],"mappings":";;;;;;AAKA,MAGa,kBAAkB,CAAA;AAH/B,IAAA,WAAA,GAAA;AAIqB,QAAA,IAAA,CAAA,GAAG,GAAG,MAAM,CAAC,QAAQ,CAAC,CAAC;QACvB,IAAG,CAAA,GAAA,GAAG,KAAK,CACxB,SAAS,CAAC,IAAI,CAAC,GAAG,EAAE,UAAU,CAAC,EAC/B,SAAS,CAAC,IAAI,CAAC,GAAG,EAAE,WAAW,CAAC,CAAC,IAAI,CACjC,MAAM,CAAC,CAAC,CAAC,KAAK,MAAM,CAAC,EAAE,CAAC,CAAC,CAAC,MAAM,EAAE,IAAI,CAAC,OAAO,CAAC,CAAC,CACnD,CACJ,CAAC,SAAS,CAAC,MAAK;YACb,IAAI,CAAC,IAAI,EAAE,CAAC;AAChB,SAAC,CAAC,CAAC;QAGK,IAAS,CAAA,SAAA,GAAG,EAAE,CAAC;AAoC1B,KAAA;IAlCU,WAAW,GAAA;AACd,QAAA,IAAI,CAAC,GAAG,CAAC,WAAW,EAAE,CAAC;QACvB,IAAI,CAAC,IAAI,EAAE,CAAC;KACf;IAEM,MAAM,GAAA;QACT,IAAI,IAAI,CAAC,OAAO,EAAE;YACd,IAAI,CAAC,IAAI,EAAE,CAAC;AACf,SAAA;AAAM,aAAA;YACH,IAAI,CAAC,IAAI,EAAE,CAAC;AACf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package for Taiga UI that adds support for mobile specific behaviors such as custom data pickers, dropdowns, etc.",
5
5
  "keywords": [
6
6
  "angular",
@@ -135,10 +135,10 @@
135
135
  "@angular/common": ">=16.0.0",
136
136
  "@angular/core": ">=16.0.0",
137
137
  "@ng-web-apis/common": "^4.12.0",
138
- "@taiga-ui/cdk": "^4.48.0",
139
- "@taiga-ui/core": "^4.48.0",
140
- "@taiga-ui/kit": "^4.48.0",
141
- "@taiga-ui/layout": "^4.48.0",
138
+ "@taiga-ui/cdk": "^4.49.0",
139
+ "@taiga-ui/core": "^4.49.0",
140
+ "@taiga-ui/kit": "^4.49.0",
141
+ "@taiga-ui/layout": "^4.49.0",
142
142
  "@taiga-ui/polymorpheus": "^4.9.0",
143
143
  "rxjs": ">=7.0.0"
144
144
  },
@@ -1,4 +1,4 @@
1
- import type { OnDestroy } from '@angular/core';
1
+ import { type OnDestroy } from '@angular/core';
2
2
  import * as i0 from "@angular/core";
3
3
  export declare class TuiKeyboardService implements OnDestroy {
4
4
  private readonly doc;