@taiga-ui/addon-mobile 4.51.0 → 4.52.0-canary.0ec45da

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 (138) hide show
  1. package/components/mobile-calendar/mobile-calendar.component.d.ts +4 -4
  2. package/components/mobile-calendar-dropdown/mobile-calendar-dropdown.component.d.ts +1 -1
  3. package/components/sheet-dialog/sheet-dialog.directive.d.ts +4 -3
  4. package/components/sheet-dialog/sheet-dialog.options.d.ts +1 -1
  5. package/components/sheet-dialog/sheet-dialog.service.d.ts +9 -4
  6. package/directives/dropdown-mobile/dropdown-mobile.component.d.ts +9 -13
  7. package/directives/dropdown-mobile/dropdown-mobile.directive.d.ts +1 -2
  8. package/directives/dropdown-sheet/dropdown-sheet.component.d.ts +14 -0
  9. package/directives/dropdown-sheet/dropdown-sheet.directive.d.ts +6 -0
  10. package/directives/dropdown-sheet/index.d.ts +2 -0
  11. package/directives/index.d.ts +1 -1
  12. package/directives/ripple/ripple.directive.d.ts +1 -1
  13. package/fesm2022/taiga-ui-addon-mobile-components-bottom-sheet.mjs +7 -8
  14. package/fesm2022/taiga-ui-addon-mobile-components-bottom-sheet.mjs.map +1 -1
  15. package/fesm2022/taiga-ui-addon-mobile-components-mobile-calendar-dropdown.mjs +23 -27
  16. package/fesm2022/taiga-ui-addon-mobile-components-mobile-calendar-dropdown.mjs.map +1 -1
  17. package/fesm2022/taiga-ui-addon-mobile-components-mobile-calendar-sheet.mjs +6 -8
  18. package/fesm2022/taiga-ui-addon-mobile-components-mobile-calendar-sheet.mjs.map +1 -1
  19. package/fesm2022/taiga-ui-addon-mobile-components-mobile-calendar.mjs +14 -16
  20. package/fesm2022/taiga-ui-addon-mobile-components-mobile-calendar.mjs.map +1 -1
  21. package/fesm2022/taiga-ui-addon-mobile-components-mobile-dialog.mjs +9 -10
  22. package/fesm2022/taiga-ui-addon-mobile-components-mobile-dialog.mjs.map +1 -1
  23. package/fesm2022/taiga-ui-addon-mobile-components-pull-to-refresh.mjs +21 -21
  24. package/fesm2022/taiga-ui-addon-mobile-components-pull-to-refresh.mjs.map +1 -1
  25. package/fesm2022/taiga-ui-addon-mobile-components-sheet-dialog.mjs +52 -41
  26. package/fesm2022/taiga-ui-addon-mobile-components-sheet-dialog.mjs.map +1 -1
  27. package/fesm2022/taiga-ui-addon-mobile-components-swipe-action.mjs +9 -9
  28. package/fesm2022/taiga-ui-addon-mobile-components-swipe-action.mjs.map +1 -1
  29. package/fesm2022/taiga-ui-addon-mobile-components-tab-bar.mjs +13 -14
  30. package/fesm2022/taiga-ui-addon-mobile-components-tab-bar.mjs.map +1 -1
  31. package/fesm2022/taiga-ui-addon-mobile-directives-dropdown-mobile.mjs +66 -89
  32. package/fesm2022/taiga-ui-addon-mobile-directives-dropdown-mobile.mjs.map +1 -1
  33. package/fesm2022/taiga-ui-addon-mobile-directives-dropdown-sheet.mjs +83 -0
  34. package/fesm2022/taiga-ui-addon-mobile-directives-dropdown-sheet.mjs.map +1 -0
  35. package/fesm2022/taiga-ui-addon-mobile-directives-elastic-sticky.mjs +8 -8
  36. package/fesm2022/taiga-ui-addon-mobile-directives-elastic-sticky.mjs.map +1 -1
  37. package/fesm2022/taiga-ui-addon-mobile-directives-responsive-dialog.mjs +6 -6
  38. package/fesm2022/taiga-ui-addon-mobile-directives-responsive-dialog.mjs.map +1 -1
  39. package/fesm2022/taiga-ui-addon-mobile-directives-ripple.mjs +18 -39
  40. package/fesm2022/taiga-ui-addon-mobile-directives-ripple.mjs.map +1 -1
  41. package/fesm2022/taiga-ui-addon-mobile-directives-touchable.mjs +5 -5
  42. package/fesm2022/taiga-ui-addon-mobile-directives-touchable.mjs.map +1 -1
  43. package/fesm2022/taiga-ui-addon-mobile-directives.mjs +1 -1
  44. package/fesm2022/taiga-ui-addon-mobile-services.mjs +5 -5
  45. package/fesm2022/taiga-ui-addon-mobile-services.mjs.map +1 -1
  46. package/package.json +16 -54
  47. package/styles/android/checkbox.less +2 -3
  48. package/styles/android/switch.less +0 -2
  49. package/styles/common/badge.less +2 -2
  50. package/styles/common/button.less +4 -0
  51. package/styles/common/chip.less +3 -8
  52. package/styles/common/notification-middle.less +9 -0
  53. package/styles/common/toast.less +21 -0
  54. package/styles/ios/checkbox.less +2 -4
  55. package/styles/ios/switch.less +1 -2
  56. package/styles/taiga-ui-mobile.less +9 -0
  57. package/directives/sidebar/index.d.ts +0 -3
  58. package/directives/sidebar/sidebar.component.d.ts +0 -21
  59. package/directives/sidebar/sidebar.d.ts +0 -6
  60. package/directives/sidebar/sidebar.directive.d.ts +0 -22
  61. package/esm2022/components/bottom-sheet/bottom-sheet.component.mjs +0 -49
  62. package/esm2022/components/bottom-sheet/index.mjs +0 -2
  63. package/esm2022/components/bottom-sheet/taiga-ui-addon-mobile-components-bottom-sheet.mjs +0 -5
  64. package/esm2022/components/index.mjs +0 -10
  65. package/esm2022/components/mobile-calendar/index.mjs +0 -5
  66. package/esm2022/components/mobile-calendar/mobile-calendar.component.mjs +0 -308
  67. package/esm2022/components/mobile-calendar/mobile-calendar.const.mjs +0 -35
  68. package/esm2022/components/mobile-calendar/mobile-calendar.providers.mjs +0 -27
  69. package/esm2022/components/mobile-calendar/mobile-calendar.strategy.mjs +0 -126
  70. package/esm2022/components/mobile-calendar/taiga-ui-addon-mobile-components-mobile-calendar.mjs +0 -5
  71. package/esm2022/components/mobile-calendar-dropdown/index.mjs +0 -3
  72. package/esm2022/components/mobile-calendar-dropdown/mobile-calendar-dropdown.component.mjs +0 -117
  73. package/esm2022/components/mobile-calendar-dropdown/mobile-calendar-dropdown.directive.mjs +0 -53
  74. package/esm2022/components/mobile-calendar-dropdown/taiga-ui-addon-mobile-components-mobile-calendar-dropdown.mjs +0 -5
  75. package/esm2022/components/mobile-calendar-sheet/index.mjs +0 -2
  76. package/esm2022/components/mobile-calendar-sheet/mobile-calendar-sheet.component.mjs +0 -25
  77. package/esm2022/components/mobile-calendar-sheet/taiga-ui-addon-mobile-components-mobile-calendar-sheet.mjs +0 -5
  78. package/esm2022/components/mobile-dialog/index.mjs +0 -4
  79. package/esm2022/components/mobile-dialog/mobile-dialog.component.mjs +0 -26
  80. package/esm2022/components/mobile-dialog/mobile-dialog.options.mjs +0 -17
  81. package/esm2022/components/mobile-dialog/mobile-dialog.service.mjs +0 -22
  82. package/esm2022/components/mobile-dialog/taiga-ui-addon-mobile-components-mobile-dialog.mjs +0 -5
  83. package/esm2022/components/pull-to-refresh/index.mjs +0 -6
  84. package/esm2022/components/pull-to-refresh/loader-android/loader-android.component.mjs +0 -46
  85. package/esm2022/components/pull-to-refresh/loader-ios/loader-ios.component.mjs +0 -39
  86. package/esm2022/components/pull-to-refresh/pull-to-refresh.component.mjs +0 -51
  87. package/esm2022/components/pull-to-refresh/pull-to-refresh.providers.mjs +0 -24
  88. package/esm2022/components/pull-to-refresh/pull-to-refresh.service.mjs +0 -37
  89. package/esm2022/components/pull-to-refresh/taiga-ui-addon-mobile-components-pull-to-refresh.mjs +0 -5
  90. package/esm2022/components/sheet-dialog/index.mjs +0 -5
  91. package/esm2022/components/sheet-dialog/sheet-dialog.component.mjs +0 -80
  92. package/esm2022/components/sheet-dialog/sheet-dialog.directive.mjs +0 -21
  93. package/esm2022/components/sheet-dialog/sheet-dialog.options.mjs +0 -24
  94. package/esm2022/components/sheet-dialog/sheet-dialog.service.mjs +0 -38
  95. package/esm2022/components/sheet-dialog/taiga-ui-addon-mobile-components-sheet-dialog.mjs +0 -5
  96. package/esm2022/components/swipe-action/index.mjs +0 -3
  97. package/esm2022/components/swipe-action/swipe-actions-auto-close.directive.mjs +0 -34
  98. package/esm2022/components/swipe-action/swipe-actions.component.mjs +0 -23
  99. package/esm2022/components/swipe-action/taiga-ui-addon-mobile-components-swipe-action.mjs +0 -5
  100. package/esm2022/components/tab-bar/index.mjs +0 -5
  101. package/esm2022/components/tab-bar/tab-bar-item.component.mjs +0 -26
  102. package/esm2022/components/tab-bar/tab-bar-item.directive.mjs +0 -27
  103. package/esm2022/components/tab-bar/tab-bar.component.mjs +0 -46
  104. package/esm2022/components/tab-bar/tab-bar.mjs +0 -9
  105. package/esm2022/components/tab-bar/taiga-ui-addon-mobile-components-tab-bar.mjs +0 -5
  106. package/esm2022/components/taiga-ui-addon-mobile-components.mjs +0 -5
  107. package/esm2022/directives/dropdown-mobile/dropdown-mobile.component.mjs +0 -98
  108. package/esm2022/directives/dropdown-mobile/dropdown-mobile.directive.mjs +0 -54
  109. package/esm2022/directives/dropdown-mobile/index.mjs +0 -3
  110. package/esm2022/directives/dropdown-mobile/taiga-ui-addon-mobile-directives-dropdown-mobile.mjs +0 -5
  111. package/esm2022/directives/elastic-sticky/elastic-sticky.directive.mjs +0 -23
  112. package/esm2022/directives/elastic-sticky/elastic-sticky.service.mjs +0 -53
  113. package/esm2022/directives/elastic-sticky/index.mjs +0 -3
  114. package/esm2022/directives/elastic-sticky/taiga-ui-addon-mobile-directives-elastic-sticky.mjs +0 -5
  115. package/esm2022/directives/index.mjs +0 -7
  116. package/esm2022/directives/responsive-dialog/index.mjs +0 -3
  117. package/esm2022/directives/responsive-dialog/responsive-dialog.directive.mjs +0 -21
  118. package/esm2022/directives/responsive-dialog/responsive-dialog.service.mjs +0 -34
  119. package/esm2022/directives/responsive-dialog/taiga-ui-addon-mobile-directives-responsive-dialog.mjs +0 -5
  120. package/esm2022/directives/ripple/index.mjs +0 -2
  121. package/esm2022/directives/ripple/ripple.directive.mjs +0 -98
  122. package/esm2022/directives/ripple/taiga-ui-addon-mobile-directives-ripple.mjs +0 -5
  123. package/esm2022/directives/sidebar/index.mjs +0 -4
  124. package/esm2022/directives/sidebar/sidebar.component.mjs +0 -45
  125. package/esm2022/directives/sidebar/sidebar.directive.mjs +0 -64
  126. package/esm2022/directives/sidebar/sidebar.mjs +0 -7
  127. package/esm2022/directives/sidebar/taiga-ui-addon-mobile-directives-sidebar.mjs +0 -5
  128. package/esm2022/directives/taiga-ui-addon-mobile-directives.mjs +0 -5
  129. package/esm2022/directives/touchable/index.mjs +0 -2
  130. package/esm2022/directives/touchable/taiga-ui-addon-mobile-directives-touchable.mjs +0 -5
  131. package/esm2022/directives/touchable/touchable.directive.mjs +0 -71
  132. package/esm2022/index.mjs +0 -4
  133. package/esm2022/services/index.mjs +0 -2
  134. package/esm2022/services/keyboard.service.mjs +0 -53
  135. package/esm2022/services/taiga-ui-addon-mobile-services.mjs +0 -5
  136. package/esm2022/taiga-ui-addon-mobile.mjs +0 -5
  137. package/fesm2022/taiga-ui-addon-mobile-directives-sidebar.mjs +0 -114
  138. package/fesm2022/taiga-ui-addon-mobile-directives-sidebar.mjs.map +0 -1
@@ -1,5 +1,5 @@
1
1
  import * as i0 from '@angular/core';
2
- import { inject, ChangeDetectorRef, Component, ChangeDetectionStrategy, Directive, Input } from '@angular/core';
2
+ import { inject, ChangeDetectorRef, ChangeDetectionStrategy, Component, Input, Directive } from '@angular/core';
3
3
  import { WaResizeObserver } from '@ng-web-apis/resize-observer';
4
4
  import { tuiInjectElement, tuiGetActualTarget } from '@taiga-ui/cdk/utils/dom';
5
5
 
@@ -12,14 +12,14 @@ class TuiSwipeActions {
12
12
  this.actionsWidth = target.clientWidth;
13
13
  this.cdr.detectChanges();
14
14
  }
15
- static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "16.2.12", ngImport: i0, type: TuiSwipeActions, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
16
- static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "16.2.12", type: TuiSwipeActions, isStandalone: true, selector: "tui-swipe-actions", host: { properties: { "style.--t-actions-width": "actionsWidth" } }, ngImport: i0, template: "<div class=\"t-content\">\n <ng-content />\n</div>\n\n<div\n class=\"t-actions\"\n (waResizeObserver)=\"$event[0] && onResize($event[0])\"\n>\n <ng-content select=\"[tuiSwipeAction]\" />\n</div>\n", styles: [":host{scrollbar-width:none;-ms-overflow-style:none;--tui-action-gap: 24;--tui-actions-padding: .5rem;--tui-item-size: 44;--t-x: calc(50% + 50% * var(--tui-inline));display:flex;inline-size:-webkit-fill-available;inline-size:-moz-available;inline-size:stretch;align-items:center;overflow-x:scroll;overflow-y:hidden;scroll-snap-type:x mandatory;perspective:1px;perspective-origin:calc(var(--t-x) + var(--tui-inline) * (calc(1px * var(--tui-item-size) / 2) + var(--tui-actions-padding)))}:host::-webkit-scrollbar,:host::-webkit-scrollbar-thumb{display:none}.t-content{scroll-snap-align:start;flex-shrink:0;inline-size:100%}.t-actions{display:flex;gap:calc(1px * var(--tui-action-gap));padding:0 1rem 0 var(--tui-actions-padding);scroll-snap-align:start;align-items:center;transform-style:preserve-3d;pointer-events:none;transform:translateZ(-.00001px)}.t-actions:empty{display:none}::ng-deep .t-actions>*{pointer-events:auto}::ng-deep .t-actions>*:nth-child(2){--t-distance: calc(var(--tui-item-size) + var(--tui-action-gap)) * 1 ;--t-factor: calc((var(--t-actions-width) - var(--t-distance)) / var(--t-actions-width));--t-scale: calc(1 / var(--t-factor));--t-translate: calc(1px * (1 - 1 / var(--t-factor)));transform:translate3d(calc(calc((-100% * var(--tui-inline) - calc(1px * var(--tui-inline) * var(--tui-action-gap))) * (2 - 1)) / var(--t-scale)),0,var(--t-translate));scale:var(--t-scale)}::ng-deep .t-actions>*:nth-child(3){--t-distance: calc(var(--tui-item-size) + var(--tui-action-gap)) * 2 ;--t-factor: calc((var(--t-actions-width) - var(--t-distance)) / var(--t-actions-width));--t-scale: calc(1 / var(--t-factor));--t-translate: calc(1px * (1 - 1 / var(--t-factor)));transform:translate3d(calc(calc((-100% * var(--tui-inline) - calc(1px * var(--tui-inline) * var(--tui-action-gap))) * (3 - 1)) / var(--t-scale)),0,var(--t-translate));scale:var(--t-scale)}::ng-deep .t-actions>*:nth-child(4){--t-distance: calc(var(--tui-item-size) + var(--tui-action-gap)) * 3 ;--t-factor: calc((var(--t-actions-width) - var(--t-distance)) / var(--t-actions-width));--t-scale: calc(1 / var(--t-factor));--t-translate: calc(1px * (1 - 1 / var(--t-factor)));transform:translate3d(calc(calc((-100% * var(--tui-inline) - calc(1px * var(--tui-inline) * var(--tui-action-gap))) * (4 - 1)) / var(--t-scale)),0,var(--t-translate));scale:var(--t-scale)}::ng-deep .t-actions>*:nth-child(5){--t-distance: calc(var(--tui-item-size) + var(--tui-action-gap)) * 4 ;--t-factor: calc((var(--t-actions-width) - var(--t-distance)) / var(--t-actions-width));--t-scale: calc(1 / var(--t-factor));--t-translate: calc(1px * (1 - 1 / var(--t-factor)));transform:translate3d(calc(calc((-100% * var(--tui-inline) - calc(1px * var(--tui-inline) * var(--tui-action-gap))) * (5 - 1)) / var(--t-scale)),0,var(--t-translate));scale:var(--t-scale)}::ng-deep .t-actions>*:nth-child(6){--t-distance: calc(var(--tui-item-size) + var(--tui-action-gap)) * 5 ;--t-factor: calc((var(--t-actions-width) - var(--t-distance)) / var(--t-actions-width));--t-scale: calc(1 / var(--t-factor));--t-translate: calc(1px * (1 - 1 / var(--t-factor)));transform:translate3d(calc(calc((-100% * var(--tui-inline) - calc(1px * var(--tui-inline) * var(--tui-action-gap))) * (6 - 1)) / var(--t-scale)),0,var(--t-translate));scale:var(--t-scale)}@media (hover: hover) and (pointer: fine){.t-actions{display:none}}\n"], dependencies: [{ kind: "directive", type: WaResizeObserver, selector: "[waResizeObserver]", inputs: ["box"], outputs: ["waResizeObserver"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush }); }
15
+ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.2.15", ngImport: i0, type: TuiSwipeActions, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
16
+ static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "19.2.15", type: TuiSwipeActions, isStandalone: true, selector: "tui-swipe-actions", host: { properties: { "style.--t-actions-width": "actionsWidth" } }, ngImport: i0, template: "<div class=\"t-content\">\n <ng-content />\n</div>\n\n<div\n class=\"t-actions\"\n (waResizeObserver)=\"$event[0] && onResize($event[0])\"\n>\n <ng-content select=\"[tuiSwipeAction]\" />\n</div>\n", styles: [":host{scrollbar-width:none;-ms-overflow-style:none;--tui-action-gap: 24;--tui-actions-padding: .5rem;--tui-item-size: 44;--t-x: calc(50% + 50% * var(--tui-inline));display:flex;inline-size:stretch;align-items:center;overflow-x:scroll;overflow-y:hidden;scroll-snap-type:x mandatory;perspective:1px;perspective-origin:calc(var(--t-x) + var(--tui-inline) * (calc(1px * var(--tui-item-size) / 2) + var(--tui-actions-padding)))}:host::-webkit-scrollbar,:host::-webkit-scrollbar-thumb{display:none}.t-content{scroll-snap-align:start;flex-shrink:0;inline-size:100%}.t-actions{display:flex;gap:calc(1px * var(--tui-action-gap));padding:0 1rem 0 var(--tui-actions-padding);scroll-snap-align:start;align-items:center;transform-style:preserve-3d;pointer-events:none;transform:translateZ(-.00001px)}.t-actions:empty{display:none}::ng-deep .t-actions>*{pointer-events:auto}::ng-deep .t-actions>*:nth-child(2){--t-distance: calc(var(--tui-item-size) + var(--tui-action-gap)) * 1 ;--t-factor: calc((var(--t-actions-width) - var(--t-distance)) / var(--t-actions-width));--t-scale: calc(1 / var(--t-factor));--t-translate: calc(1px * (1 - 1 / var(--t-factor)));transform:translate3d(calc(calc((-100% * var(--tui-inline) - calc(1px * var(--tui-inline) * var(--tui-action-gap))) * (2 - 1)) / var(--t-scale)),0,var(--t-translate));scale:var(--t-scale)}::ng-deep .t-actions>*:nth-child(3){--t-distance: calc(var(--tui-item-size) + var(--tui-action-gap)) * 2 ;--t-factor: calc((var(--t-actions-width) - var(--t-distance)) / var(--t-actions-width));--t-scale: calc(1 / var(--t-factor));--t-translate: calc(1px * (1 - 1 / var(--t-factor)));transform:translate3d(calc(calc((-100% * var(--tui-inline) - calc(1px * var(--tui-inline) * var(--tui-action-gap))) * (3 - 1)) / var(--t-scale)),0,var(--t-translate));scale:var(--t-scale)}::ng-deep .t-actions>*:nth-child(4){--t-distance: calc(var(--tui-item-size) + var(--tui-action-gap)) * 3 ;--t-factor: calc((var(--t-actions-width) - var(--t-distance)) / var(--t-actions-width));--t-scale: calc(1 / var(--t-factor));--t-translate: calc(1px * (1 - 1 / var(--t-factor)));transform:translate3d(calc(calc((-100% * var(--tui-inline) - calc(1px * var(--tui-inline) * var(--tui-action-gap))) * (4 - 1)) / var(--t-scale)),0,var(--t-translate));scale:var(--t-scale)}::ng-deep .t-actions>*:nth-child(5){--t-distance: calc(var(--tui-item-size) + var(--tui-action-gap)) * 4 ;--t-factor: calc((var(--t-actions-width) - var(--t-distance)) / var(--t-actions-width));--t-scale: calc(1 / var(--t-factor));--t-translate: calc(1px * (1 - 1 / var(--t-factor)));transform:translate3d(calc(calc((-100% * var(--tui-inline) - calc(1px * var(--tui-inline) * var(--tui-action-gap))) * (5 - 1)) / var(--t-scale)),0,var(--t-translate));scale:var(--t-scale)}::ng-deep .t-actions>*:nth-child(6){--t-distance: calc(var(--tui-item-size) + var(--tui-action-gap)) * 5 ;--t-factor: calc((var(--t-actions-width) - var(--t-distance)) / var(--t-actions-width));--t-scale: calc(1 / var(--t-factor));--t-translate: calc(1px * (1 - 1 / var(--t-factor)));transform:translate3d(calc(calc((-100% * var(--tui-inline) - calc(1px * var(--tui-inline) * var(--tui-action-gap))) * (6 - 1)) / var(--t-scale)),0,var(--t-translate));scale:var(--t-scale)}@media (hover: hover) and (pointer: fine){.t-actions{display:none}}\n"], dependencies: [{ kind: "directive", type: WaResizeObserver, selector: "[waResizeObserver]", inputs: ["box"], outputs: ["waResizeObserver"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush }); }
17
17
  }
18
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.2.12", ngImport: i0, type: TuiSwipeActions, decorators: [{
18
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.15", ngImport: i0, type: TuiSwipeActions, decorators: [{
19
19
  type: Component,
20
- args: [{ standalone: true, selector: 'tui-swipe-actions', imports: [WaResizeObserver], changeDetection: ChangeDetectionStrategy.OnPush, host: {
20
+ args: [{ selector: 'tui-swipe-actions', imports: [WaResizeObserver], changeDetection: ChangeDetectionStrategy.OnPush, host: {
21
21
  '[style.--t-actions-width]': 'actionsWidth',
22
- }, template: "<div class=\"t-content\">\n <ng-content />\n</div>\n\n<div\n class=\"t-actions\"\n (waResizeObserver)=\"$event[0] && onResize($event[0])\"\n>\n <ng-content select=\"[tuiSwipeAction]\" />\n</div>\n", styles: [":host{scrollbar-width:none;-ms-overflow-style:none;--tui-action-gap: 24;--tui-actions-padding: .5rem;--tui-item-size: 44;--t-x: calc(50% + 50% * var(--tui-inline));display:flex;inline-size:-webkit-fill-available;inline-size:-moz-available;inline-size:stretch;align-items:center;overflow-x:scroll;overflow-y:hidden;scroll-snap-type:x mandatory;perspective:1px;perspective-origin:calc(var(--t-x) + var(--tui-inline) * (calc(1px * var(--tui-item-size) / 2) + var(--tui-actions-padding)))}:host::-webkit-scrollbar,:host::-webkit-scrollbar-thumb{display:none}.t-content{scroll-snap-align:start;flex-shrink:0;inline-size:100%}.t-actions{display:flex;gap:calc(1px * var(--tui-action-gap));padding:0 1rem 0 var(--tui-actions-padding);scroll-snap-align:start;align-items:center;transform-style:preserve-3d;pointer-events:none;transform:translateZ(-.00001px)}.t-actions:empty{display:none}::ng-deep .t-actions>*{pointer-events:auto}::ng-deep .t-actions>*:nth-child(2){--t-distance: calc(var(--tui-item-size) + var(--tui-action-gap)) * 1 ;--t-factor: calc((var(--t-actions-width) - var(--t-distance)) / var(--t-actions-width));--t-scale: calc(1 / var(--t-factor));--t-translate: calc(1px * (1 - 1 / var(--t-factor)));transform:translate3d(calc(calc((-100% * var(--tui-inline) - calc(1px * var(--tui-inline) * var(--tui-action-gap))) * (2 - 1)) / var(--t-scale)),0,var(--t-translate));scale:var(--t-scale)}::ng-deep .t-actions>*:nth-child(3){--t-distance: calc(var(--tui-item-size) + var(--tui-action-gap)) * 2 ;--t-factor: calc((var(--t-actions-width) - var(--t-distance)) / var(--t-actions-width));--t-scale: calc(1 / var(--t-factor));--t-translate: calc(1px * (1 - 1 / var(--t-factor)));transform:translate3d(calc(calc((-100% * var(--tui-inline) - calc(1px * var(--tui-inline) * var(--tui-action-gap))) * (3 - 1)) / var(--t-scale)),0,var(--t-translate));scale:var(--t-scale)}::ng-deep .t-actions>*:nth-child(4){--t-distance: calc(var(--tui-item-size) + var(--tui-action-gap)) * 3 ;--t-factor: calc((var(--t-actions-width) - var(--t-distance)) / var(--t-actions-width));--t-scale: calc(1 / var(--t-factor));--t-translate: calc(1px * (1 - 1 / var(--t-factor)));transform:translate3d(calc(calc((-100% * var(--tui-inline) - calc(1px * var(--tui-inline) * var(--tui-action-gap))) * (4 - 1)) / var(--t-scale)),0,var(--t-translate));scale:var(--t-scale)}::ng-deep .t-actions>*:nth-child(5){--t-distance: calc(var(--tui-item-size) + var(--tui-action-gap)) * 4 ;--t-factor: calc((var(--t-actions-width) - var(--t-distance)) / var(--t-actions-width));--t-scale: calc(1 / var(--t-factor));--t-translate: calc(1px * (1 - 1 / var(--t-factor)));transform:translate3d(calc(calc((-100% * var(--tui-inline) - calc(1px * var(--tui-inline) * var(--tui-action-gap))) * (5 - 1)) / var(--t-scale)),0,var(--t-translate));scale:var(--t-scale)}::ng-deep .t-actions>*:nth-child(6){--t-distance: calc(var(--tui-item-size) + var(--tui-action-gap)) * 5 ;--t-factor: calc((var(--t-actions-width) - var(--t-distance)) / var(--t-actions-width));--t-scale: calc(1 / var(--t-factor));--t-translate: calc(1px * (1 - 1 / var(--t-factor)));transform:translate3d(calc(calc((-100% * var(--tui-inline) - calc(1px * var(--tui-inline) * var(--tui-action-gap))) * (6 - 1)) / var(--t-scale)),0,var(--t-translate));scale:var(--t-scale)}@media (hover: hover) and (pointer: fine){.t-actions{display:none}}\n"] }]
22
+ }, template: "<div class=\"t-content\">\n <ng-content />\n</div>\n\n<div\n class=\"t-actions\"\n (waResizeObserver)=\"$event[0] && onResize($event[0])\"\n>\n <ng-content select=\"[tuiSwipeAction]\" />\n</div>\n", styles: [":host{scrollbar-width:none;-ms-overflow-style:none;--tui-action-gap: 24;--tui-actions-padding: .5rem;--tui-item-size: 44;--t-x: calc(50% + 50% * var(--tui-inline));display:flex;inline-size:stretch;align-items:center;overflow-x:scroll;overflow-y:hidden;scroll-snap-type:x mandatory;perspective:1px;perspective-origin:calc(var(--t-x) + var(--tui-inline) * (calc(1px * var(--tui-item-size) / 2) + var(--tui-actions-padding)))}:host::-webkit-scrollbar,:host::-webkit-scrollbar-thumb{display:none}.t-content{scroll-snap-align:start;flex-shrink:0;inline-size:100%}.t-actions{display:flex;gap:calc(1px * var(--tui-action-gap));padding:0 1rem 0 var(--tui-actions-padding);scroll-snap-align:start;align-items:center;transform-style:preserve-3d;pointer-events:none;transform:translateZ(-.00001px)}.t-actions:empty{display:none}::ng-deep .t-actions>*{pointer-events:auto}::ng-deep .t-actions>*:nth-child(2){--t-distance: calc(var(--tui-item-size) + var(--tui-action-gap)) * 1 ;--t-factor: calc((var(--t-actions-width) - var(--t-distance)) / var(--t-actions-width));--t-scale: calc(1 / var(--t-factor));--t-translate: calc(1px * (1 - 1 / var(--t-factor)));transform:translate3d(calc(calc((-100% * var(--tui-inline) - calc(1px * var(--tui-inline) * var(--tui-action-gap))) * (2 - 1)) / var(--t-scale)),0,var(--t-translate));scale:var(--t-scale)}::ng-deep .t-actions>*:nth-child(3){--t-distance: calc(var(--tui-item-size) + var(--tui-action-gap)) * 2 ;--t-factor: calc((var(--t-actions-width) - var(--t-distance)) / var(--t-actions-width));--t-scale: calc(1 / var(--t-factor));--t-translate: calc(1px * (1 - 1 / var(--t-factor)));transform:translate3d(calc(calc((-100% * var(--tui-inline) - calc(1px * var(--tui-inline) * var(--tui-action-gap))) * (3 - 1)) / var(--t-scale)),0,var(--t-translate));scale:var(--t-scale)}::ng-deep .t-actions>*:nth-child(4){--t-distance: calc(var(--tui-item-size) + var(--tui-action-gap)) * 3 ;--t-factor: calc((var(--t-actions-width) - var(--t-distance)) / var(--t-actions-width));--t-scale: calc(1 / var(--t-factor));--t-translate: calc(1px * (1 - 1 / var(--t-factor)));transform:translate3d(calc(calc((-100% * var(--tui-inline) - calc(1px * var(--tui-inline) * var(--tui-action-gap))) * (4 - 1)) / var(--t-scale)),0,var(--t-translate));scale:var(--t-scale)}::ng-deep .t-actions>*:nth-child(5){--t-distance: calc(var(--tui-item-size) + var(--tui-action-gap)) * 4 ;--t-factor: calc((var(--t-actions-width) - var(--t-distance)) / var(--t-actions-width));--t-scale: calc(1 / var(--t-factor));--t-translate: calc(1px * (1 - 1 / var(--t-factor)));transform:translate3d(calc(calc((-100% * var(--tui-inline) - calc(1px * var(--tui-inline) * var(--tui-action-gap))) * (5 - 1)) / var(--t-scale)),0,var(--t-translate));scale:var(--t-scale)}::ng-deep .t-actions>*:nth-child(6){--t-distance: calc(var(--tui-item-size) + var(--tui-action-gap)) * 5 ;--t-factor: calc((var(--t-actions-width) - var(--t-distance)) / var(--t-actions-width));--t-scale: calc(1 / var(--t-factor));--t-translate: calc(1px * (1 - 1 / var(--t-factor)));transform:translate3d(calc(calc((-100% * var(--tui-inline) - calc(1px * var(--tui-inline) * var(--tui-action-gap))) * (6 - 1)) / var(--t-scale)),0,var(--t-translate));scale:var(--t-scale)}@media (hover: hover) and (pointer: fine){.t-actions{display:none}}\n"] }]
23
23
  }] });
24
24
 
25
25
  class TuiSwipeActionsAutoClose {
@@ -35,10 +35,10 @@ class TuiSwipeActionsAutoClose {
35
35
  });
36
36
  }
37
37
  }
38
- static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "16.2.12", ngImport: i0, type: TuiSwipeActionsAutoClose, deps: [], target: i0.ɵɵFactoryTarget.Directive }); }
39
- static { this.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "16.2.12", type: TuiSwipeActionsAutoClose, isStandalone: true, selector: "tui-swipe-actions[autoClose]", inputs: { autoClose: "autoClose" }, host: { listeners: { "document:pointerdown.zoneless": "handleEvent($event)", "document:focusin.zoneless": "handleEvent($event)" } }, ngImport: i0 }); }
38
+ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.2.15", ngImport: i0, type: TuiSwipeActionsAutoClose, deps: [], target: i0.ɵɵFactoryTarget.Directive }); }
39
+ static { this.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "19.2.15", type: TuiSwipeActionsAutoClose, isStandalone: true, selector: "tui-swipe-actions[autoClose]", inputs: { autoClose: "autoClose" }, host: { listeners: { "document:pointerdown.zoneless": "handleEvent($event)", "document:focusin.zoneless": "handleEvent($event)" } }, ngImport: i0 }); }
40
40
  }
41
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.2.12", ngImport: i0, type: TuiSwipeActionsAutoClose, decorators: [{
41
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.15", ngImport: i0, type: TuiSwipeActionsAutoClose, decorators: [{
42
42
  type: Directive,
43
43
  args: [{
44
44
  standalone: true,
@@ -1 +1 @@
1
- {"version":3,"file":"taiga-ui-addon-mobile-components-swipe-action.mjs","sources":["../../../projects/addon-mobile/components/swipe-action/swipe-actions.component.ts","../../../projects/addon-mobile/components/swipe-action/swipe-actions.template.html","../../../projects/addon-mobile/components/swipe-action/swipe-actions-auto-close.directive.ts","../../../projects/addon-mobile/components/swipe-action/taiga-ui-addon-mobile-components-swipe-action.ts"],"sourcesContent":["import {\n ChangeDetectionStrategy,\n ChangeDetectorRef,\n Component,\n inject,\n} from '@angular/core';\nimport {WaResizeObserver} from '@ng-web-apis/resize-observer';\n\n@Component({\n standalone: true,\n selector: 'tui-swipe-actions',\n imports: [WaResizeObserver],\n templateUrl: './swipe-actions.template.html',\n styleUrls: ['./swipe-actions.style.less'],\n changeDetection: ChangeDetectionStrategy.OnPush,\n host: {\n '[style.--t-actions-width]': 'actionsWidth',\n },\n})\nexport class TuiSwipeActions {\n protected actionsWidth = 0;\n\n protected readonly cdr = inject(ChangeDetectorRef);\n\n protected onResize({target}: ResizeObserverEntry): void {\n this.actionsWidth = target.clientWidth;\n this.cdr.detectChanges();\n }\n}\n","<div class=\"t-content\">\n <ng-content />\n</div>\n\n<div\n class=\"t-actions\"\n (waResizeObserver)=\"$event[0] && onResize($event[0])\"\n>\n <ng-content select=\"[tuiSwipeAction]\" />\n</div>\n","import {Directive, Input} from '@angular/core';\nimport {tuiGetActualTarget, tuiInjectElement} from '@taiga-ui/cdk/utils/dom';\n\n@Directive({\n standalone: true,\n selector: 'tui-swipe-actions[autoClose]',\n host: {\n '(document:pointerdown.zoneless)': 'handleEvent($event)',\n '(document:focusin.zoneless)': 'handleEvent($event)',\n },\n})\nexport class TuiSwipeActionsAutoClose {\n private readonly el = tuiInjectElement();\n\n @Input()\n public autoClose: boolean | string = true;\n\n protected handleEvent(event: Event): void {\n if (this.autoClose !== false && !this.el.contains(tuiGetActualTarget(event))) {\n this.el.scrollTo({\n left: 0,\n behavior: 'smooth',\n });\n }\n }\n}\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './index';\n"],"names":[],"mappings":";;;;;AAQA,MAWa,eAAe,CAAA;AAX5B,IAAA,WAAA,GAAA;QAYc,IAAY,CAAA,YAAA,GAAG,CAAC,CAAC;AAER,QAAA,IAAA,CAAA,GAAG,GAAG,MAAM,CAAC,iBAAiB,CAAC,CAAC;AAMtD,KAAA;IAJa,QAAQ,CAAC,EAAC,MAAM,EAAsB,EAAA;AAC5C,QAAA,IAAI,CAAC,YAAY,GAAG,MAAM,CAAC,WAAW,CAAC;AACvC,QAAA,IAAI,CAAC,GAAG,CAAC,aAAa,EAAE,CAAC;KAC5B;+GARQ,eAAe,EAAA,IAAA,EAAA,EAAA,EAAA,MAAA,EAAA,EAAA,CAAA,eAAA,CAAA,SAAA,EAAA,CAAA,CAAA,EAAA;mGAAf,eAAe,EAAA,YAAA,EAAA,IAAA,EAAA,QAAA,EAAA,mBAAA,EAAA,IAAA,EAAA,EAAA,UAAA,EAAA,EAAA,yBAAA,EAAA,cAAA,EA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CAAA,SAAA,EAAA,CAAA,CAAA,EAAA;mGAAxB,wBAAwB,EAAA,YAAA,EAAA,IAAA,EAAA,QAAA,EAAA,8BAAA,EAAA,MAAA,EAAA,EAAA,SAAA,EAAA,WAAA,EAAA,EAAA,IAAA,EAAA,EAAA,SAAA,EAAA,EAAA,+BAAA,EAAA,qBAAA,EAAA,2BAAA,EAAA,qBAAA,EAAA,EAAA,EAAA,QAAA,EAAA,EAAA,EAAA,CAAA,CAAA,EAAA;;4FAAxB,wBAAwB,EAAA,UAAA,EAAA,CAAA;kBARpC,SAAS;AAAC,YAAA,IAAA,EAAA,CAAA;AACP,oBAAA,UAAU,EAAE,IAAI;AAChB,oBAAA,QAAQ,EAAE,8BAA8B;AACxC,oBAAA,IAAI,EAAE;AACF,wBAAA,iCAAiC,EAAE,qBAAqB;AACxD,wBAAA,6BAA6B,EAAE,qBAAqB;AACvD,qBAAA;AACJ,iBAAA,CAAA;8BAKU,SAAS,EAAA,CAAA;sBADf,KAAK;;;ACdV;;AAEG;;;;"}
1
+ {"version":3,"file":"taiga-ui-addon-mobile-components-swipe-action.mjs","sources":["../../../projects/addon-mobile/components/swipe-action/swipe-actions.component.ts","../../../projects/addon-mobile/components/swipe-action/swipe-actions.template.html","../../../projects/addon-mobile/components/swipe-action/swipe-actions-auto-close.directive.ts","../../../projects/addon-mobile/components/swipe-action/taiga-ui-addon-mobile-components-swipe-action.ts"],"sourcesContent":["import {\n ChangeDetectionStrategy,\n ChangeDetectorRef,\n Component,\n inject,\n} from '@angular/core';\nimport {WaResizeObserver} from '@ng-web-apis/resize-observer';\n\n@Component({\n selector: 'tui-swipe-actions',\n imports: [WaResizeObserver],\n templateUrl: './swipe-actions.template.html',\n styleUrl: './swipe-actions.style.less',\n changeDetection: ChangeDetectionStrategy.OnPush,\n host: {\n '[style.--t-actions-width]': 'actionsWidth',\n },\n})\nexport class TuiSwipeActions {\n protected actionsWidth = 0;\n\n protected readonly cdr = inject(ChangeDetectorRef);\n\n protected onResize({target}: ResizeObserverEntry): void {\n this.actionsWidth = target.clientWidth;\n this.cdr.detectChanges();\n }\n}\n","<div class=\"t-content\">\n <ng-content />\n</div>\n\n<div\n class=\"t-actions\"\n (waResizeObserver)=\"$event[0] && onResize($event[0])\"\n>\n <ng-content select=\"[tuiSwipeAction]\" />\n</div>\n","import {Directive, Input} from '@angular/core';\nimport {tuiGetActualTarget, tuiInjectElement} from '@taiga-ui/cdk/utils/dom';\n\n@Directive({\n standalone: true,\n selector: 'tui-swipe-actions[autoClose]',\n host: {\n '(document:pointerdown.zoneless)': 'handleEvent($event)',\n '(document:focusin.zoneless)': 'handleEvent($event)',\n },\n})\nexport class TuiSwipeActionsAutoClose {\n private readonly el = tuiInjectElement();\n\n @Input()\n public autoClose: boolean | string = true;\n\n protected handleEvent(event: Event): void {\n if (this.autoClose !== false && !this.el.contains(tuiGetActualTarget(event))) {\n this.el.scrollTo({\n left: 0,\n behavior: 'smooth',\n });\n }\n }\n}\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './index';\n"],"names":[],"mappings":";;;;;MAkBa,eAAe,CAAA;AAV5B,IAAA,WAAA,GAAA;QAWc,IAAY,CAAA,YAAA,GAAG,CAAC;AAEP,QAAA,IAAA,CAAA,GAAG,GAAG,MAAM,CAAC,iBAAiB,CAAC;AAMrD;IAJa,QAAQ,CAAC,EAAC,MAAM,EAAsB,EAAA;AAC5C,QAAA,IAAI,CAAC,YAAY,GAAG,MAAM,CAAC,WAAW;AACtC,QAAA,IAAI,CAAC,GAAG,CAAC,aAAa,EAAE;;+GAPnB,eAAe,EAAA,IAAA,EAAA,EAAA,EAAA,MAAA,EAAA,EAAA,CAAA,eAAA,CAAA,SAAA,EAAA,CAAA,CAAA;mGAAf,eAAe,EAAA,YAAA,EAAA,IAAA,EAAA,QAAA,EAAA,mBAAA,EAAA,IAAA,EAAA,EAAA,UAAA,EAAA,EAAA,yBAAA,EAAA,cAAA,EAAA,EAAA,EAAA,QAAA,EAAA,EAAA,EAAA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,WAAA,EAAA,EAAA,IAAA,EAAA,EAAA,SAAA,EAAA,EAAA,+BAAA,EAAA,qBAAA,EAAA,2BAAA,EAAA,qBAAA,EAAA,EAAA,EAAA,QAAA,EAAA,EAAA,EAAA,CAAA,CAAA;;4FAAxB,wBAAwB,EAAA,UAAA,EAAA,CAAA;kBARpC,SAAS;AAAC,YAAA,IAAA,EAAA,CAAA;AACP,oBAAA,UAAU,EAAE,IAAI;AAChB,oBAAA,QAAQ,EAAE,8BAA8B;AACxC,oBAAA,IAAI,EAAE;AACF,wBAAA,iCAAiC,EAAE,qBAAqB;AACxD,wBAAA,6BAA6B,EAAE,qBAAqB;AACvD,qBAAA;AACJ,iBAAA;8BAKU,SAAS,EAAA,CAAA;sBADf;;;ACdL;;AAEG;;;;"}
@@ -1,9 +1,8 @@
1
1
  import * as i0 from '@angular/core';
2
- import { Component, ChangeDetectionStrategy, Input, EventEmitter, ElementRef, ContentChildren, forwardRef, Output, inject, Directive } from '@angular/core';
2
+ import { Input, ChangeDetectionStrategy, Component, EventEmitter, ElementRef, Output, forwardRef, ContentChildren, inject, Directive } from '@angular/core';
3
3
  import { EMPTY_QUERY } from '@taiga-ui/cdk/constants';
4
4
  import { TuiRepeatTimes } from '@taiga-ui/cdk/directives/repeat-times';
5
5
  import { tuiIsElement, tuiInjectElement } from '@taiga-ui/cdk/utils/dom';
6
- import { NgIf } from '@angular/common';
7
6
  import { TuiAnimated } from '@taiga-ui/cdk/directives/animated';
8
7
  import { TuiIcon } from '@taiga-ui/core/components/icon';
9
8
  import { takeUntilDestroyed } from '@angular/core/rxjs-interop';
@@ -19,12 +18,12 @@ class TuiTabBarItem {
19
18
  format(value) {
20
19
  return value > 999 ? '999+' : String(value);
21
20
  }
22
- static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "16.2.12", ngImport: i0, type: TuiTabBarItem, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
23
- static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "16.2.12", type: TuiTabBarItem, isStandalone: true, selector: "button[tuiTabBarItem], a[tuiTabBarItem]", inputs: { icon: "icon", badge: "badge" }, ngImport: i0, template: "<tui-icon\n class=\"t-icon\"\n [icon]=\"icon\"\n/>\n<span class=\"t-wrapper\">\n <span\n *ngIf=\"badge as value\"\n tuiAnimated\n class=\"t-badge\"\n >\n {{ format(value) }}\n </span>\n</span>\n<span class=\"t-text\">\n <ng-content />\n</span>\n", styles: [":host{-webkit-appearance:none;appearance:none;padding:0;border:0;background:none;line-height:inherit;text-decoration:none;transition-property:color;transition-duration:var(--tui-duration, .3s);transition-timing-function:ease-in-out;position:relative;display:flex;flex:1 0;font:inherit;flex-direction:column;align-items:center;overflow:hidden}:host:nth-child(1){color:var(--tui-tab-1, inherit)}:host:nth-child(2){color:var(--tui-tab-2, inherit)}:host:nth-child(3){color:var(--tui-tab-3, inherit)}:host:nth-child(4){color:var(--tui-tab-4, inherit)}:host:nth-child(5){color:var(--tui-tab-5, inherit)}:host:nth-child(6){color:var(--tui-tab-6, inherit)}:host:nth-child(7){color:var(--tui-tab-7, inherit)}:host:nth-child(8){color:var(--tui-tab-8, inherit)}:host:nth-child(9){color:var(--tui-tab-9, inherit)}:host:nth-child(10){color:var(--tui-tab-10, inherit)}.t-icon{inline-size:1.75rem;block-size:1.75rem;margin:.375rem 0 .125rem;pointer-events:none;border:.125rem solid transparent}.t-wrapper{position:absolute;top:.125rem;left:1rem;display:flex;inline-size:100%;justify-content:center;pointer-events:none}.t-badge{display:flex;block-size:1.125rem;min-inline-size:1.125rem;align-items:center;justify-content:center;padding:0 .25rem;border-radius:1rem;font-size:.8125rem;box-sizing:border-box;color:var(--tui-background-base);background:var(--tui-status-negative)}.t-badge .tui-enter,.t-badge .tui-leave{animation-name:tuiScale}.t-text{white-space:nowrap;overflow:hidden;text-overflow:ellipsis;max-inline-size:100%;pointer-events:none}\n"], dependencies: [{ kind: "directive", type: NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "directive", type: TuiAnimated, selector: "[tuiAnimated]" }, { kind: "component", type: TuiIcon, selector: "tui-icon", inputs: ["icon", "background"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush }); }
21
+ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.2.15", ngImport: i0, type: TuiTabBarItem, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
22
+ static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "19.2.15", type: TuiTabBarItem, isStandalone: true, selector: "button[tuiTabBarItem], a[tuiTabBarItem]", inputs: { icon: "icon", badge: "badge" }, ngImport: i0, template: "<tui-icon\n class=\"t-icon\"\n [icon]=\"icon\"\n/>\n<span class=\"t-wrapper\">\n @if (badge; as value) {\n <span\n tuiAnimated\n class=\"t-badge\"\n >\n {{ format(value) }}\n </span>\n }\n</span>\n<span class=\"t-text\">\n <ng-content />\n</span>\n", styles: [":host{-webkit-appearance:none;appearance:none;padding:0;border:0;background:none;line-height:inherit;text-decoration:none;transition-property:color;transition-duration:var(--tui-duration, .3s);transition-timing-function:ease-in-out;position:relative;display:flex;flex:1 0;font:inherit;flex-direction:column;align-items:center;overflow:hidden}:host:nth-child(1){color:var(--tui-tab-1, inherit)}:host:nth-child(2){color:var(--tui-tab-2, inherit)}:host:nth-child(3){color:var(--tui-tab-3, inherit)}:host:nth-child(4){color:var(--tui-tab-4, inherit)}:host:nth-child(5){color:var(--tui-tab-5, inherit)}:host:nth-child(6){color:var(--tui-tab-6, inherit)}:host:nth-child(7){color:var(--tui-tab-7, inherit)}:host:nth-child(8){color:var(--tui-tab-8, inherit)}:host:nth-child(9){color:var(--tui-tab-9, inherit)}:host:nth-child(10){color:var(--tui-tab-10, inherit)}.t-icon{inline-size:1.75rem;block-size:1.75rem;margin:.375rem 0 .125rem;pointer-events:none;border:.125rem solid transparent}.t-wrapper{position:absolute;top:.125rem;left:1rem;display:flex;inline-size:100%;justify-content:center;pointer-events:none}.t-badge{display:flex;block-size:1.125rem;min-inline-size:1.125rem;align-items:center;justify-content:center;padding:0 .25rem;border-radius:1rem;font-size:.8125rem;box-sizing:border-box;color:var(--tui-background-base);background:var(--tui-status-negative)}.t-badge .tui-enter,.t-badge .tui-leave{animation-name:tuiScale}.t-text{white-space:nowrap;overflow:hidden;text-overflow:ellipsis;max-inline-size:100%;pointer-events:none}\n"], dependencies: [{ kind: "directive", type: TuiAnimated, selector: "[tuiAnimated]" }, { kind: "component", type: TuiIcon, selector: "tui-icon:not([tuiBadge])", inputs: ["background"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush }); }
24
23
  }
25
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.2.12", ngImport: i0, type: TuiTabBarItem, decorators: [{
24
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.15", ngImport: i0, type: TuiTabBarItem, decorators: [{
26
25
  type: Component,
27
- args: [{ standalone: true, selector: 'button[tuiTabBarItem], a[tuiTabBarItem]', imports: [NgIf, TuiAnimated, TuiIcon], changeDetection: ChangeDetectionStrategy.OnPush, template: "<tui-icon\n class=\"t-icon\"\n [icon]=\"icon\"\n/>\n<span class=\"t-wrapper\">\n <span\n *ngIf=\"badge as value\"\n tuiAnimated\n class=\"t-badge\"\n >\n {{ format(value) }}\n </span>\n</span>\n<span class=\"t-text\">\n <ng-content />\n</span>\n", styles: [":host{-webkit-appearance:none;appearance:none;padding:0;border:0;background:none;line-height:inherit;text-decoration:none;transition-property:color;transition-duration:var(--tui-duration, .3s);transition-timing-function:ease-in-out;position:relative;display:flex;flex:1 0;font:inherit;flex-direction:column;align-items:center;overflow:hidden}:host:nth-child(1){color:var(--tui-tab-1, inherit)}:host:nth-child(2){color:var(--tui-tab-2, inherit)}:host:nth-child(3){color:var(--tui-tab-3, inherit)}:host:nth-child(4){color:var(--tui-tab-4, inherit)}:host:nth-child(5){color:var(--tui-tab-5, inherit)}:host:nth-child(6){color:var(--tui-tab-6, inherit)}:host:nth-child(7){color:var(--tui-tab-7, inherit)}:host:nth-child(8){color:var(--tui-tab-8, inherit)}:host:nth-child(9){color:var(--tui-tab-9, inherit)}:host:nth-child(10){color:var(--tui-tab-10, inherit)}.t-icon{inline-size:1.75rem;block-size:1.75rem;margin:.375rem 0 .125rem;pointer-events:none;border:.125rem solid transparent}.t-wrapper{position:absolute;top:.125rem;left:1rem;display:flex;inline-size:100%;justify-content:center;pointer-events:none}.t-badge{display:flex;block-size:1.125rem;min-inline-size:1.125rem;align-items:center;justify-content:center;padding:0 .25rem;border-radius:1rem;font-size:.8125rem;box-sizing:border-box;color:var(--tui-background-base);background:var(--tui-status-negative)}.t-badge .tui-enter,.t-badge .tui-leave{animation-name:tuiScale}.t-text{white-space:nowrap;overflow:hidden;text-overflow:ellipsis;max-inline-size:100%;pointer-events:none}\n"] }]
26
+ args: [{ selector: 'button[tuiTabBarItem], a[tuiTabBarItem]', imports: [TuiAnimated, TuiIcon], changeDetection: ChangeDetectionStrategy.OnPush, template: "<tui-icon\n class=\"t-icon\"\n [icon]=\"icon\"\n/>\n<span class=\"t-wrapper\">\n @if (badge; as value) {\n <span\n tuiAnimated\n class=\"t-badge\"\n >\n {{ format(value) }}\n </span>\n }\n</span>\n<span class=\"t-text\">\n <ng-content />\n</span>\n", styles: [":host{-webkit-appearance:none;appearance:none;padding:0;border:0;background:none;line-height:inherit;text-decoration:none;transition-property:color;transition-duration:var(--tui-duration, .3s);transition-timing-function:ease-in-out;position:relative;display:flex;flex:1 0;font:inherit;flex-direction:column;align-items:center;overflow:hidden}:host:nth-child(1){color:var(--tui-tab-1, inherit)}:host:nth-child(2){color:var(--tui-tab-2, inherit)}:host:nth-child(3){color:var(--tui-tab-3, inherit)}:host:nth-child(4){color:var(--tui-tab-4, inherit)}:host:nth-child(5){color:var(--tui-tab-5, inherit)}:host:nth-child(6){color:var(--tui-tab-6, inherit)}:host:nth-child(7){color:var(--tui-tab-7, inherit)}:host:nth-child(8){color:var(--tui-tab-8, inherit)}:host:nth-child(9){color:var(--tui-tab-9, inherit)}:host:nth-child(10){color:var(--tui-tab-10, inherit)}.t-icon{inline-size:1.75rem;block-size:1.75rem;margin:.375rem 0 .125rem;pointer-events:none;border:.125rem solid transparent}.t-wrapper{position:absolute;top:.125rem;left:1rem;display:flex;inline-size:100%;justify-content:center;pointer-events:none}.t-badge{display:flex;block-size:1.125rem;min-inline-size:1.125rem;align-items:center;justify-content:center;padding:0 .25rem;border-radius:1rem;font-size:.8125rem;box-sizing:border-box;color:var(--tui-background-base);background:var(--tui-status-negative)}.t-badge .tui-enter,.t-badge .tui-leave{animation-name:tuiScale}.t-text{white-space:nowrap;overflow:hidden;text-overflow:ellipsis;max-inline-size:100%;pointer-events:none}\n"] }]
28
27
  }], propDecorators: { icon: [{
29
28
  type: Input
30
29
  }], badge: [{
@@ -50,12 +49,12 @@ class TuiTabBarComponent {
50
49
  this.activeItemIndex = index;
51
50
  this.activeItemIndexChange.emit(index);
52
51
  }
53
- static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "16.2.12", ngImport: i0, type: TuiTabBarComponent, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
54
- static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "16.2.12", type: TuiTabBarComponent, isStandalone: true, selector: "nav[tuiTabBar]", inputs: { quantity: "quantity", activeItemIndex: "activeItemIndex" }, outputs: { activeItemIndexChange: "activeItemIndexChange" }, host: { listeners: { "click": "setActive($event.target)" }, properties: { "style": "style" } }, queries: [{ propertyName: "tabs", predicate: i0.forwardRef(function () { return TuiTabBarItem; }), read: ElementRef }], ngImport: i0, template: "<ng-content />\n<div class=\"t-skeletons\">\n <div\n *tuiRepeatTimes=\"let index of quantity\"\n class=\"t-skeleton\"\n ></div>\n</div>\n", styles: [":host{--tui-active-color: var(--tui-text-action);position:relative;display:flex;font: .625rem/.75rem -apple-system,BlinkMacSystemFont,system-ui,Roboto,Segoe UI,sans-serif;block-size:var(--tui-height-l);color:var(--tui-text-secondary);-webkit-backdrop-filter:blur(.3125rem);backdrop-filter:blur(.3125rem)}:host:before{position:absolute;top:0;left:0;inline-size:100%;block-size:100%;content:\"\";background:var(--tui-background-base-alt);box-shadow:inset 0 1px var(--tui-border-normal);opacity:.8}[tuiTheme=dark] :host:before{opacity:.7}.t-skeletons{display:none;block-size:100%;inline-size:100%;justify-content:space-around}.t-skeletons:first-child{display:flex}.t-skeleton{display:flex;flex-direction:column;align-items:center;justify-content:center;animation:tuiSkeletonVibe ease-in-out 1s infinite alternate}.t-skeleton:before{content:\"\";inline-size:1.375rem;block-size:1.375rem;margin-block-end:.5rem;border-radius:100%;background:var(--tui-background-neutral-2)}.t-skeleton:after{content:\"\";inline-size:2.5rem;block-size:.375rem;border-radius:1rem;background:var(--tui-background-neutral-2)}\n"], dependencies: [{ kind: "directive", type: TuiRepeatTimes, selector: "[tuiRepeatTimes][tuiRepeatTimesOf]", inputs: ["tuiRepeatTimesOf"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush }); }
52
+ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.2.15", ngImport: i0, type: TuiTabBarComponent, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
53
+ static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "19.2.15", type: TuiTabBarComponent, isStandalone: true, selector: "nav[tuiTabBar]", inputs: { quantity: "quantity", activeItemIndex: "activeItemIndex" }, outputs: { activeItemIndexChange: "activeItemIndexChange" }, host: { listeners: { "click": "setActive($event.target)" }, properties: { "style": "style" } }, queries: [{ propertyName: "tabs", predicate: i0.forwardRef(() => TuiTabBarItem), read: ElementRef }], ngImport: i0, template: "<ng-content />\n<div class=\"t-skeletons\">\n <div\n *tuiRepeatTimes=\"let index of quantity\"\n class=\"t-skeleton\"\n ></div>\n</div>\n", styles: [":host{--tui-active-color: var(--tui-text-action);position:relative;display:flex;font: .625rem/.75rem -apple-system,BlinkMacSystemFont,system-ui,Roboto,Segoe UI,sans-serif;block-size:var(--tui-height-l);color:var(--tui-text-secondary);-webkit-backdrop-filter:blur(.3125rem);backdrop-filter:blur(.3125rem)}:host:before{position:absolute;top:0;left:0;inline-size:100%;block-size:100%;content:\"\";background:var(--tui-background-base-alt);box-shadow:inset 0 1px var(--tui-border-normal);opacity:.8}[tuiTheme=dark] :host:before{opacity:.7}.t-skeletons{display:none;block-size:100%;inline-size:100%;justify-content:space-around}.t-skeletons:first-child{display:flex}.t-skeleton{display:flex;flex-direction:column;align-items:center;justify-content:center;animation:tuiSkeletonVibe ease-in-out 1s infinite alternate}.t-skeleton:before{content:\"\";inline-size:1.375rem;block-size:1.375rem;margin-block-end:.5rem;border-radius:100%;background:var(--tui-background-neutral-2)}.t-skeleton:after{content:\"\";inline-size:2.5rem;block-size:.375rem;border-radius:1rem;background:var(--tui-background-neutral-2)}\n"], dependencies: [{ kind: "directive", type: TuiRepeatTimes, selector: "[tuiRepeatTimes][tuiRepeatTimesOf]", inputs: ["tuiRepeatTimesOf"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush }); }
55
54
  }
56
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.2.12", ngImport: i0, type: TuiTabBarComponent, decorators: [{
55
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.15", ngImport: i0, type: TuiTabBarComponent, decorators: [{
57
56
  type: Component,
58
- args: [{ standalone: true, selector: 'nav[tuiTabBar]', imports: [TuiRepeatTimes], changeDetection: ChangeDetectionStrategy.OnPush, host: {
57
+ args: [{ selector: 'nav[tuiTabBar]', imports: [TuiRepeatTimes], changeDetection: ChangeDetectionStrategy.OnPush, host: {
59
58
  '[style]': 'style',
60
59
  '(click)': 'setActive($event.target)',
61
60
  }, template: "<ng-content />\n<div class=\"t-skeletons\">\n <div\n *tuiRepeatTimes=\"let index of quantity\"\n class=\"t-skeleton\"\n ></div>\n</div>\n", styles: [":host{--tui-active-color: var(--tui-text-action);position:relative;display:flex;font: .625rem/.75rem -apple-system,BlinkMacSystemFont,system-ui,Roboto,Segoe UI,sans-serif;block-size:var(--tui-height-l);color:var(--tui-text-secondary);-webkit-backdrop-filter:blur(.3125rem);backdrop-filter:blur(.3125rem)}:host:before{position:absolute;top:0;left:0;inline-size:100%;block-size:100%;content:\"\";background:var(--tui-background-base-alt);box-shadow:inset 0 1px var(--tui-border-normal);opacity:.8}[tuiTheme=dark] :host:before{opacity:.7}.t-skeletons{display:none;block-size:100%;inline-size:100%;justify-content:space-around}.t-skeletons:first-child{display:flex}.t-skeleton{display:flex;flex-direction:column;align-items:center;justify-content:center;animation:tuiSkeletonVibe ease-in-out 1s infinite alternate}.t-skeleton:before{content:\"\";inline-size:1.375rem;block-size:1.375rem;margin-block-end:.5rem;border-radius:100%;background:var(--tui-background-neutral-2)}.t-skeleton:after{content:\"\";inline-size:2.5rem;block-size:.375rem;border-radius:1rem;background:var(--tui-background-neutral-2)}\n"] }]
@@ -77,16 +76,16 @@ class TuiTabBarItemDirective {
77
76
  const link = inject(RouterLinkActive, { optional: true })?.isActiveChange || EMPTY;
78
77
  link.pipe(filter(Boolean), tuiWatch(), takeUntilDestroyed()).subscribe(() => tabs.setActive(el));
79
78
  }
80
- static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "16.2.12", ngImport: i0, type: TuiTabBarItemDirective, deps: [], target: i0.ɵɵFactoryTarget.Directive }); }
81
- static { this.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "16.2.12", type: TuiTabBarItemDirective, isStandalone: true, selector: "[tuiTabBarItem][routerLinkActive]", ngImport: i0 }); }
79
+ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.2.15", ngImport: i0, type: TuiTabBarItemDirective, deps: [], target: i0.ɵɵFactoryTarget.Directive }); }
80
+ static { this.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "19.2.15", type: TuiTabBarItemDirective, isStandalone: true, selector: "[tuiTabBarItem][routerLinkActive]", ngImport: i0 }); }
82
81
  }
83
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.2.12", ngImport: i0, type: TuiTabBarItemDirective, decorators: [{
82
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.15", ngImport: i0, type: TuiTabBarItemDirective, decorators: [{
84
83
  type: Directive,
85
84
  args: [{
86
85
  standalone: true,
87
86
  selector: '[tuiTabBarItem][routerLinkActive]',
88
87
  }]
89
- }], ctorParameters: function () { return []; } });
88
+ }], ctorParameters: () => [] });
90
89
 
91
90
  const TuiTabBar = [
92
91
  TuiTabBarComponent,
@@ -1 +1 @@
1
- {"version":3,"file":"taiga-ui-addon-mobile-components-tab-bar.mjs","sources":["../../../projects/addon-mobile/components/tab-bar/tab-bar-item.component.ts","../../../projects/addon-mobile/components/tab-bar/tab-bar-item.template.html","../../../projects/addon-mobile/components/tab-bar/tab-bar.component.ts","../../../projects/addon-mobile/components/tab-bar/tab-bar.template.html","../../../projects/addon-mobile/components/tab-bar/tab-bar-item.directive.ts","../../../projects/addon-mobile/components/tab-bar/tab-bar.ts","../../../projects/addon-mobile/components/tab-bar/taiga-ui-addon-mobile-components-tab-bar.ts"],"sourcesContent":["import {NgIf} from '@angular/common';\nimport {ChangeDetectionStrategy, Component, Input} from '@angular/core';\nimport {TuiAnimated} from '@taiga-ui/cdk/directives/animated';\nimport {TuiIcon} from '@taiga-ui/core/components/icon';\n\n@Component({\n standalone: true,\n selector: 'button[tuiTabBarItem], a[tuiTabBarItem]',\n imports: [NgIf, TuiAnimated, TuiIcon],\n templateUrl: './tab-bar-item.template.html',\n styleUrls: ['./tab-bar-item.style.less'],\n changeDetection: ChangeDetectionStrategy.OnPush,\n})\nexport class TuiTabBarItem {\n @Input()\n public icon = '';\n\n @Input()\n public badge?: number | null = null;\n\n protected format(value: number): string {\n return value > 999 ? '999+' : String(value);\n }\n}\n","<tui-icon\n class=\"t-icon\"\n [icon]=\"icon\"\n/>\n<span class=\"t-wrapper\">\n <span\n *ngIf=\"badge as value\"\n tuiAnimated\n class=\"t-badge\"\n >\n {{ format(value) }}\n </span>\n</span>\n<span class=\"t-text\">\n <ng-content />\n</span>\n","import {\n ChangeDetectionStrategy,\n Component,\n ContentChildren,\n ElementRef,\n EventEmitter,\n forwardRef,\n Input,\n Output,\n type QueryList,\n} from '@angular/core';\nimport {EMPTY_QUERY} from '@taiga-ui/cdk/constants';\nimport {TuiRepeatTimes} from '@taiga-ui/cdk/directives/repeat-times';\nimport {tuiIsElement} from '@taiga-ui/cdk/utils/dom';\n\nimport {TuiTabBarItem} from './tab-bar-item.component';\n\n@Component({\n standalone: true,\n selector: 'nav[tuiTabBar]',\n imports: [TuiRepeatTimes],\n templateUrl: './tab-bar.template.html',\n styleUrls: ['./tab-bar.style.less'],\n changeDetection: ChangeDetectionStrategy.OnPush,\n host: {\n '[style]': 'style',\n '(click)': 'setActive($event.target)',\n },\n})\nexport class TuiTabBarComponent {\n @ContentChildren(forwardRef(() => TuiTabBarItem), {read: ElementRef})\n private readonly tabs: QueryList<ElementRef<HTMLElement>> = EMPTY_QUERY;\n\n @Input()\n public quantity = 4;\n\n @Input()\n public activeItemIndex = NaN;\n\n @Output()\n public readonly activeItemIndexChange = new EventEmitter<number>();\n\n public setActive(tab: EventTarget): void {\n if (tuiIsElement(tab)) {\n this.updateIndex(\n this.tabs.toArray().findIndex(({nativeElement}) => nativeElement === tab),\n );\n }\n }\n\n protected get style(): string {\n return `--tui-tab-${this.activeItemIndex + 1}: var(--tui-active-color)`;\n }\n\n private updateIndex(index: number): void {\n this.activeItemIndex = index;\n this.activeItemIndexChange.emit(index);\n }\n}\n","<ng-content />\n<div class=\"t-skeletons\">\n <div\n *tuiRepeatTimes=\"let index of quantity\"\n class=\"t-skeleton\"\n ></div>\n</div>\n","import {Directive, inject} from '@angular/core';\nimport {takeUntilDestroyed} from '@angular/core/rxjs-interop';\nimport {RouterLinkActive} from '@angular/router';\nimport {tuiWatch} from '@taiga-ui/cdk/observables';\nimport {tuiInjectElement} from '@taiga-ui/cdk/utils/dom';\nimport {EMPTY, filter, type Observable} from 'rxjs';\n\nimport {TuiTabBarComponent} from './tab-bar.component';\n\n@Directive({\n standalone: true,\n selector: '[tuiTabBarItem][routerLinkActive]',\n})\nexport class TuiTabBarItemDirective {\n constructor() {\n const tabs = inject(TuiTabBarComponent);\n const el = tuiInjectElement();\n const link: Observable<boolean> =\n inject(RouterLinkActive, {optional: true})?.isActiveChange || EMPTY;\n\n link.pipe(filter(Boolean), tuiWatch(), takeUntilDestroyed()).subscribe(() =>\n tabs.setActive(el),\n );\n }\n}\n","import {TuiTabBarComponent} from './tab-bar.component';\nimport {TuiTabBarItem} from './tab-bar-item.component';\nimport {TuiTabBarItemDirective} from './tab-bar-item.directive';\n\nexport const TuiTabBar = [\n TuiTabBarComponent,\n TuiTabBarItem,\n TuiTabBarItemDirective,\n] as const;\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './index';\n"],"names":[],"mappings":";;;;;;;;;;;;;AAKA,MAQa,aAAa,CAAA;AAR1B,IAAA,WAAA,GAAA;QAUW,IAAI,CAAA,IAAA,GAAG,EAAE,CAAC;QAGV,IAAK,CAAA,KAAA,GAAmB,IAAI,CAAC;AAKvC,KAAA;AAHa,IAAA,MAAM,CAAC,KAAa,EAAA;AAC1B,QAAA,OAAO,KAAK,GAAG,GAAG,GAAG,MAAM,GAAG,MAAM,CAAC,KAAK,CAAC,CAAC;KAC/C;+GATQ,aAAa,EAAA,IAAA,EAAA,EAAA,EAAA,MAAA,EAAA,EAAA,CAAA,eAAA,CAAA,SAAA,EAAA,CAAA,CAAA,EAAA;AAAb,IAAA,SAAA,IAAA,CAAA,IAAA,GAAA,EAAA,CAAA,oBAAA,CAAA,EAAA,UAAA,EAAA,QAAA,EAAA,OAAA,EAAA,SAAA,EAAA,IAAA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
+ {"version":3,"file":"taiga-ui-addon-mobile-components-tab-bar.mjs","sources":["../../../projects/addon-mobile/components/tab-bar/tab-bar-item.component.ts","../../../projects/addon-mobile/components/tab-bar/tab-bar-item.template.html","../../../projects/addon-mobile/components/tab-bar/tab-bar.component.ts","../../../projects/addon-mobile/components/tab-bar/tab-bar.template.html","../../../projects/addon-mobile/components/tab-bar/tab-bar-item.directive.ts","../../../projects/addon-mobile/components/tab-bar/tab-bar.ts","../../../projects/addon-mobile/components/tab-bar/taiga-ui-addon-mobile-components-tab-bar.ts"],"sourcesContent":["import {ChangeDetectionStrategy, Component, Input} from '@angular/core';\nimport {TuiAnimated} from '@taiga-ui/cdk/directives/animated';\nimport {TuiIcon} from '@taiga-ui/core/components/icon';\n\n@Component({\n selector: 'button[tuiTabBarItem], a[tuiTabBarItem]',\n imports: [TuiAnimated, TuiIcon],\n templateUrl: './tab-bar-item.template.html',\n styleUrl: './tab-bar-item.style.less',\n changeDetection: ChangeDetectionStrategy.OnPush,\n})\nexport class TuiTabBarItem {\n @Input()\n public icon = '';\n\n @Input()\n public badge?: number | null = null;\n\n protected format(value: number): string {\n return value > 999 ? '999+' : String(value);\n }\n}\n","<tui-icon\n class=\"t-icon\"\n [icon]=\"icon\"\n/>\n<span class=\"t-wrapper\">\n @if (badge; as value) {\n <span\n tuiAnimated\n class=\"t-badge\"\n >\n {{ format(value) }}\n </span>\n }\n</span>\n<span class=\"t-text\">\n <ng-content />\n</span>\n","import {\n ChangeDetectionStrategy,\n Component,\n ContentChildren,\n ElementRef,\n EventEmitter,\n forwardRef,\n Input,\n Output,\n type QueryList,\n} from '@angular/core';\nimport {EMPTY_QUERY} from '@taiga-ui/cdk/constants';\nimport {TuiRepeatTimes} from '@taiga-ui/cdk/directives/repeat-times';\nimport {tuiIsElement} from '@taiga-ui/cdk/utils/dom';\n\nimport {TuiTabBarItem} from './tab-bar-item.component';\n\n@Component({\n selector: 'nav[tuiTabBar]',\n imports: [TuiRepeatTimes],\n templateUrl: './tab-bar.template.html',\n styleUrl: './tab-bar.style.less',\n changeDetection: ChangeDetectionStrategy.OnPush,\n host: {\n '[style]': 'style',\n '(click)': 'setActive($event.target)',\n },\n})\nexport class TuiTabBarComponent {\n @ContentChildren(forwardRef(() => TuiTabBarItem), {read: ElementRef})\n private readonly tabs: QueryList<ElementRef<HTMLElement>> = EMPTY_QUERY;\n\n @Input()\n public quantity = 4;\n\n @Input()\n public activeItemIndex = NaN;\n\n @Output()\n public readonly activeItemIndexChange = new EventEmitter<number>();\n\n public setActive(tab: EventTarget): void {\n if (tuiIsElement(tab)) {\n this.updateIndex(\n this.tabs.toArray().findIndex(({nativeElement}) => nativeElement === tab),\n );\n }\n }\n\n protected get style(): string {\n return `--tui-tab-${this.activeItemIndex + 1}: var(--tui-active-color)`;\n }\n\n private updateIndex(index: number): void {\n this.activeItemIndex = index;\n this.activeItemIndexChange.emit(index);\n }\n}\n","<ng-content />\n<div class=\"t-skeletons\">\n <div\n *tuiRepeatTimes=\"let index of quantity\"\n class=\"t-skeleton\"\n ></div>\n</div>\n","import {Directive, inject} from '@angular/core';\nimport {takeUntilDestroyed} from '@angular/core/rxjs-interop';\nimport {RouterLinkActive} from '@angular/router';\nimport {tuiWatch} from '@taiga-ui/cdk/observables';\nimport {tuiInjectElement} from '@taiga-ui/cdk/utils/dom';\nimport {EMPTY, filter, type Observable} from 'rxjs';\n\nimport {TuiTabBarComponent} from './tab-bar.component';\n\n@Directive({\n standalone: true,\n selector: '[tuiTabBarItem][routerLinkActive]',\n})\nexport class TuiTabBarItemDirective {\n constructor() {\n const tabs = inject(TuiTabBarComponent);\n const el = tuiInjectElement();\n const link: Observable<boolean> =\n inject(RouterLinkActive, {optional: true})?.isActiveChange || EMPTY;\n\n link.pipe(filter(Boolean), tuiWatch(), takeUntilDestroyed()).subscribe(() =>\n tabs.setActive(el),\n );\n }\n}\n","import {TuiTabBarComponent} from './tab-bar.component';\nimport {TuiTabBarItem} from './tab-bar-item.component';\nimport {TuiTabBarItemDirective} from './tab-bar-item.directive';\n\nexport const TuiTabBar = [\n TuiTabBarComponent,\n TuiTabBarItem,\n TuiTabBarItemDirective,\n] as const;\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './index';\n"],"names":[],"mappings":";;;;;;;;;;;;MAWa,aAAa,CAAA;AAP1B,IAAA,WAAA,GAAA;QASW,IAAI,CAAA,IAAA,GAAG,EAAE;QAGT,IAAK,CAAA,KAAA,GAAmB,IAAI;AAKtC;AAHa,IAAA,MAAM,CAAC,KAAa,EAAA;AAC1B,QAAA,OAAO,KAAK,GAAG,GAAG,GAAG,MAAM,GAAG,MAAM,CAAC,KAAK,CAAC;;+GARtC,aAAa,EAAA,IAAA,EAAA,EAAA,EAAA,MAAA,EAAA,EAAA,CAAA,eAAA,CAAA,SAAA,EAAA,CAAA,CAAA;AAAb,IAAA,SAAA,IAAA,CAAA,IAAA,GAAA,EAAA,CAAA,oBAAA,CAAA,EAAA,UAAA,EAAA,QAAA,EAAA,OAAA,EAAA,SAAA,EAAA,IAAA,EAAA,aAAa,ECX1B,YAAA,EAAA,IAAA,EAAA,QAAA,EAAA,yCAAA,EAAA,MAAA,EAAA,EAAA,IAAA,EAAA,MAAA,EAAA,KAAA,EAAA,OAAA,EAAA,EAAA,QAAA,EAAA,EAAA,EAAA,QAAA,EAAA,+TAiBA,EDXc,MAAA,EAAA,CAAA,+/CAAA,CAAA,EAAA,YAAA,EAAA,CAAA,EAAA,IAAA,EAAA,WAAA,EAAA,IAAA,EAAA,WAAW,0DAAE,OAAO,EAAA,QAAA,EAAA,0BAAA,EAAA,MAAA,EAAA,CAAA,YAAA,CAAA,EAAA,CAAA,EAAA,eAAA,EAAA,EAAA,CAAA,uBAAA,CAAA,MAAA,EAAA,CAAA,CAAA;;4FAKrB,aAAa,EAAA,UAAA,EAAA,CAAA;kBAPzB,SAAS;+BACI,yCAAyC,EAAA,OAAA,EAC1C,CAAC,WAAW,EAAE,OAAO,CAAC,EAAA,eAAA,EAGd,uBAA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A,QAAA,EAAA,mCAAA,EAAA,QAAA,EAAA,EAAA,EAAA,CAAA,CAAA;;4FAAtB,sBAAsB,EAAA,UAAA,EAAA,CAAA;kBAJlC,SAAS;AAAC,YAAA,IAAA,EAAA,CAAA;AACP,oBAAA,UAAU,EAAE,IAAI;AAChB,oBAAA,QAAQ,EAAE,mCAAmC;AAChD,iBAAA;;;ACRY,MAAA,SAAS,GAAG;IACrB,kBAAkB;IAClB,aAAa;IACb,sBAAsB;;;ACP1B;;AAEG;;;;"}
@@ -1,68 +1,18 @@
1
- import { DOCUMENT, NgIf } from '@angular/common';
1
+ import { DOCUMENT } from '@angular/common';
2
2
  import * as i0 from '@angular/core';
3
- import { inject, Directive, Input, Component, ViewEncapsulation, ChangeDetectionStrategy } from '@angular/core';
4
- import * as i3 from '@ng-web-apis/intersection-observer';
5
- import { WaIntersectionObserver } from '@ng-web-apis/intersection-observer';
3
+ import { inject, ChangeDetectionStrategy, ViewEncapsulation, Component, Directive } from '@angular/core';
6
4
  import { TuiKeyboardService } from '@taiga-ui/addon-mobile/services';
7
- import * as i1 from '@taiga-ui/cdk/directives/active-zone';
5
+ import * as i2 from '@taiga-ui/cdk/directives/active-zone';
8
6
  import { TuiActiveZone } from '@taiga-ui/cdk/directives/active-zone';
9
- import * as i2 from '@taiga-ui/cdk/directives/animated';
7
+ import * as i1 from '@taiga-ui/cdk/directives/animated';
10
8
  import { TuiAnimated } from '@taiga-ui/cdk/directives/animated';
11
- import { TuiSwipe } from '@taiga-ui/cdk/directives/swipe';
12
- import { tuiIsHTMLElement, tuiInjectElement, tuiIsElement } from '@taiga-ui/cdk/utils/dom';
13
- import { tuiGetNativeFocused } from '@taiga-ui/cdk/utils/focus';
9
+ import { tuiInjectElement, tuiIsElement, tuiIsHTMLElement } from '@taiga-ui/cdk/utils/dom';
10
+ import { tuiGetFocused } from '@taiga-ui/cdk/utils/focus';
14
11
  import { tuiPx } from '@taiga-ui/cdk/utils/miscellaneous';
15
- import { TUI_DROPDOWN_COMPONENT, TuiDropdownDirective } from '@taiga-ui/core/directives/dropdown';
12
+ import { TuiDropdownDirective, TUI_DROPDOWN_COMPONENT } from '@taiga-ui/core/directives/dropdown';
16
13
  import { PolymorpheusOutlet } from '@taiga-ui/polymorpheus';
17
14
  import { TUI_IS_MOBILE } from '@taiga-ui/cdk/tokens';
18
15
 
19
- class TuiDropdownMobile {
20
- constructor() {
21
- this.isMobile = inject(TUI_IS_MOBILE);
22
- this.tuiDropdownMobile = '';
23
- }
24
- onMouseDown(event) {
25
- if (!this.isMobile ||
26
- !tuiIsHTMLElement(event.target) ||
27
- !event.target.matches('input,textarea') ||
28
- this.tuiDropdownMobile) {
29
- return;
30
- }
31
- event.preventDefault();
32
- event.target.focus({ preventScroll: true });
33
- }
34
- static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "16.2.12", ngImport: i0, type: TuiDropdownMobile, deps: [], target: i0.ɵɵFactoryTarget.Directive }); }
35
- static { this.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "16.2.12", type: TuiDropdownMobile, isStandalone: true, selector: "[tuiDropdownMobile]", inputs: { tuiDropdownMobile: "tuiDropdownMobile" }, host: { listeners: { "mousedown": "onMouseDown($event)" }, properties: { "style.visibility": "\"visible\"" } }, providers: [
36
- {
37
- provide: TUI_DROPDOWN_COMPONENT,
38
- useFactory: () => inject(TUI_IS_MOBILE)
39
- ? TuiDropdownMobileComponent
40
- : inject(TUI_DROPDOWN_COMPONENT, { skipSelf: true }),
41
- },
42
- ], ngImport: i0 }); }
43
- }
44
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.2.12", ngImport: i0, type: TuiDropdownMobile, decorators: [{
45
- type: Directive,
46
- args: [{
47
- standalone: true,
48
- selector: '[tuiDropdownMobile]',
49
- providers: [
50
- {
51
- provide: TUI_DROPDOWN_COMPONENT,
52
- useFactory: () => inject(TUI_IS_MOBILE)
53
- ? TuiDropdownMobileComponent
54
- : inject(TUI_DROPDOWN_COMPONENT, { skipSelf: true }),
55
- },
56
- ],
57
- host: {
58
- '[style.visibility]': '"visible"',
59
- '(mousedown)': 'onMouseDown($event)',
60
- },
61
- }]
62
- }], propDecorators: { tuiDropdownMobile: [{
63
- type: Input
64
- }] } });
65
-
66
16
  const GAP = 16;
67
17
  class TuiDropdownMobileComponent {
68
18
  constructor() {
@@ -70,17 +20,12 @@ class TuiDropdownMobileComponent {
70
20
  this.keyboard = inject(TuiKeyboardService);
71
21
  this.doc = inject(DOCUMENT);
72
22
  this.scrollTop = this.doc.documentElement.scrollTop;
73
- this.observer = new ResizeObserver(() => this.doc.defaultView?.visualViewport &&
74
- this.refresh(this.doc.defaultView.visualViewport));
75
- this.directive = inject(TuiDropdownMobile);
23
+ this.observer = new ResizeObserver(() => this.refresh());
76
24
  this.dropdown = inject(TuiDropdownDirective);
77
- this.close = () => this.dropdown.toggle(false);
25
+ this.context = { $implicit: () => this.dropdown.toggle(false) };
78
26
  this.observer.observe(this.dropdown.el);
79
27
  this.doc.documentElement.style.setProperty('scroll-behavior', 'initial');
80
28
  }
81
- ngAfterViewInit() {
82
- this.el.scrollTop = this.directive.tuiDropdownMobile ? this.el.clientHeight : 0;
83
- }
84
29
  ngOnDestroy() {
85
30
  this.observer.disconnect();
86
31
  this.doc.body.classList.remove('t-dropdown-mobile');
@@ -99,21 +44,10 @@ class TuiDropdownMobileComponent {
99
44
  event.stopPropagation();
100
45
  }
101
46
  }
102
- onSwipe({ direction }, el) {
103
- if (direction === 'bottom' &&
104
- el.getBoundingClientRect().bottom > Number(this.doc.defaultView?.innerHeight)) {
105
- this.close();
106
- }
107
- }
108
- onIntersection({ isIntersecting }) {
109
- if (isIntersecting) {
110
- this.close();
111
- }
112
- }
113
- refresh({ offsetTop, height }) {
47
+ refresh() {
48
+ const { offsetTop = 0, height = 0 } = this.doc.defaultView?.visualViewport || {};
114
49
  this.doc.body.style.removeProperty('--t-root-top');
115
50
  if (!this.focused ||
116
- this.directive.tuiDropdownMobile ||
117
51
  !this.doc.documentElement.style.getPropertyValue('scroll-behavior')) {
118
52
  return;
119
53
  }
@@ -121,27 +55,70 @@ class TuiDropdownMobileComponent {
121
55
  const rect = this.dropdown.el.getBoundingClientRect();
122
56
  const topMargin = `max(var(--tui-dropdown-mobile-offset, ${tuiPx(GAP)}), env(safe-area-inset-top))`;
123
57
  const offset = `(${topMargin} + ${tuiPx(rect.height + GAP)})`;
58
+ const top = `calc(${tuiPx(offsetTop - rect.top)} + ${topMargin})`;
124
59
  this.el.style.setProperty('top', `calc(${tuiPx(offsetTop)} + ${offset})`);
125
60
  this.el.style.setProperty('height', `calc(${tuiPx(height)} - ${offset})`);
126
61
  this.doc.body.classList.add('t-dropdown-mobile');
127
- this.doc.body.style.setProperty('--t-root-top', `calc(${tuiPx(offsetTop - rect.top)} + ${topMargin})`);
62
+ this.doc.body.style.setProperty('--t-root-top', top);
128
63
  }
129
64
  get focused() {
130
- return this.dropdown.el.contains(tuiGetNativeFocused(this.doc));
65
+ return this.dropdown.el.contains(tuiGetFocused(this.doc));
131
66
  }
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);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 }); }
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 }); }
134
69
  }
135
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.2.12", ngImport: i0, type: TuiDropdownMobileComponent, decorators: [{
70
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.15", ngImport: i0, type: TuiDropdownMobileComponent, decorators: [{
136
71
  type: Component,
137
- args: [{ standalone: true, selector: 'tui-dropdown-mobile', imports: [NgIf, PolymorpheusOutlet, TuiSwipe, WaIntersectionObserver], encapsulation: ViewEncapsulation.None, changeDetection: ChangeDetectionStrategy.OnPush, hostDirectives: [TuiActiveZone, TuiAnimated], host: {
138
- '[class._sheet]': 'directive.tuiDropdownMobile',
72
+ args: [{ selector: 'tui-dropdown-mobile', imports: [PolymorpheusOutlet], encapsulation: ViewEncapsulation.None, changeDetection: ChangeDetectionStrategy.OnPush, hostDirectives: [TuiAnimated, TuiActiveZone], host: {
73
+ '(pointerdown.prevent)': '0',
139
74
  '(document:click.zoneless.capture)': 'onClick($event)',
140
- '(window>scroll.zoneless.capture)': 'refresh($event.currentTarget.visualViewport)',
141
- '(visualViewport>resize.zoneless)': 'refresh($event.target)',
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);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
- }], ctorParameters: function () { return []; } });
75
+ '(window>scroll.zoneless.capture)': 'refresh()',
76
+ '(visualViewport>resize.zoneless)': 'refresh()',
77
+ '(visualViewport>scroll.zoneless)': 'refresh()',
78
+ }, 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"] }]
79
+ }], ctorParameters: () => [] });
80
+
81
+ class TuiDropdownMobile {
82
+ constructor() {
83
+ this.isMobile = inject(TUI_IS_MOBILE);
84
+ }
85
+ onMouseDown(event) {
86
+ if (!this.isMobile ||
87
+ !tuiIsHTMLElement(event.target) ||
88
+ !event.target.matches('input,textarea')) {
89
+ return;
90
+ }
91
+ event.preventDefault();
92
+ event.target.focus({ preventScroll: true });
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: [
96
+ {
97
+ provide: TUI_DROPDOWN_COMPONENT,
98
+ useFactory: () => inject(TUI_IS_MOBILE)
99
+ ? TuiDropdownMobileComponent
100
+ : inject(TUI_DROPDOWN_COMPONENT, { skipSelf: true }),
101
+ },
102
+ ], ngImport: i0 }); }
103
+ }
104
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.15", ngImport: i0, type: TuiDropdownMobile, decorators: [{
105
+ type: Directive,
106
+ args: [{
107
+ selector: '[tuiDropdownMobile]',
108
+ providers: [
109
+ {
110
+ provide: TUI_DROPDOWN_COMPONENT,
111
+ useFactory: () => inject(TUI_IS_MOBILE)
112
+ ? TuiDropdownMobileComponent
113
+ : inject(TUI_DROPDOWN_COMPONENT, { skipSelf: true }),
114
+ },
115
+ ],
116
+ host: {
117
+ '[style.visibility]': '"visible"',
118
+ '(mousedown)': 'onMouseDown($event)',
119
+ },
120
+ }]
121
+ }] });
145
122
 
146
123
  /**
147
124
  * Generated bundle index. Do not edit.
@@ -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 {\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,KAAK,CAAC,MAAM,CAAC,KAAK,CAAC,EAAC,a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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
+ {"version":3,"file":"taiga-ui-addon-mobile-directives-dropdown-mobile.mjs","sources":["../../../projects/addon-mobile/directives/dropdown-mobile/dropdown-mobile.component.ts","../../../projects/addon-mobile/directives/dropdown-mobile/dropdown-mobile.template.html","../../../projects/addon-mobile/directives/dropdown-mobile/dropdown-mobile.directive.ts","../../../projects/addon-mobile/directives/dropdown-mobile/taiga-ui-addon-mobile-directives-dropdown-mobile.ts"],"sourcesContent":["import {DOCUMENT} from '@angular/common';\nimport {\n ChangeDetectionStrategy,\n Component,\n inject,\n type OnDestroy,\n ViewEncapsulation,\n} from '@angular/core';\nimport {TuiKeyboardService} from '@taiga-ui/addon-mobile/services';\nimport {TuiActiveZone} from '@taiga-ui/cdk/directives/active-zone';\nimport {TuiAnimated} from '@taiga-ui/cdk/directives/animated';\nimport {tuiInjectElement, tuiIsElement} from '@taiga-ui/cdk/utils/dom';\nimport {tuiGetFocused} from '@taiga-ui/cdk/utils/focus';\nimport {tuiPx} from '@taiga-ui/cdk/utils/miscellaneous';\nimport {TuiDropdownDirective} from '@taiga-ui/core/directives/dropdown';\nimport {PolymorpheusOutlet} from '@taiga-ui/polymorpheus';\n\nconst GAP = 16;\n\n@Component({\n selector: 'tui-dropdown-mobile',\n imports: [PolymorpheusOutlet],\n templateUrl: './dropdown-mobile.template.html',\n styleUrl: './dropdown-mobile.style.less',\n encapsulation: ViewEncapsulation.None,\n changeDetection: ChangeDetectionStrategy.OnPush,\n hostDirectives: [TuiAnimated, TuiActiveZone],\n host: {\n '(pointerdown.prevent)': '0',\n '(document:click.zoneless.capture)': 'onClick($event)',\n '(window>scroll.zoneless.capture)': 'refresh()',\n '(visualViewport>resize.zoneless)': 'refresh()',\n '(visualViewport>scroll.zoneless)': 'refresh()',\n },\n})\nexport class TuiDropdownMobileComponent implements OnDestroy {\n private readonly el = tuiInjectElement();\n private readonly keyboard = inject(TuiKeyboardService);\n private readonly doc = inject(DOCUMENT);\n private readonly scrollTop = this.doc.documentElement.scrollTop;\n private readonly observer = new ResizeObserver(() => this.refresh());\n\n protected readonly dropdown = inject(TuiDropdownDirective);\n protected readonly context = {$implicit: (): void => this.dropdown.toggle(false)};\n\n constructor() {\n this.observer.observe(this.dropdown.el);\n this.doc.documentElement.style.setProperty('scroll-behavior', 'initial');\n }\n\n public ngOnDestroy(): void {\n this.observer.disconnect();\n this.doc.body.classList.remove('t-dropdown-mobile');\n this.doc.body.style.removeProperty('--t-root-top');\n this.doc.documentElement.scrollTop = this.scrollTop;\n this.doc.documentElement.style.removeProperty('scroll-behavior');\n\n if (this.focused) {\n this.keyboard.hide();\n }\n }\n\n protected onClick(event: MouseEvent): void {\n if (\n tuiIsElement(event.target) &&\n !this.el.contains(event.target) &&\n (!this.dropdown.el.contains(event.target) ||\n event.target.matches('input,textarea'))\n ) {\n event.stopPropagation();\n }\n }\n\n protected refresh(): void {\n const {offsetTop = 0, height = 0} = this.doc.defaultView?.visualViewport || {};\n\n this.doc.body.style.removeProperty('--t-root-top');\n\n if (\n !this.focused ||\n !this.doc.documentElement.style.getPropertyValue('scroll-behavior')\n ) {\n return;\n }\n\n this.doc.documentElement.scrollTop = 0;\n\n const rect = this.dropdown.el.getBoundingClientRect();\n const topMargin = `max(var(--tui-dropdown-mobile-offset, ${tuiPx(GAP)}), env(safe-area-inset-top))`;\n const offset = `(${topMargin} + ${tuiPx(rect.height + GAP)})`;\n const top = `calc(${tuiPx(offsetTop - rect.top)} + ${topMargin})`;\n\n this.el.style.setProperty('top', `calc(${tuiPx(offsetTop)} + ${offset})`);\n this.el.style.setProperty('height', `calc(${tuiPx(height)} - ${offset})`);\n this.doc.body.classList.add('t-dropdown-mobile');\n this.doc.body.style.setProperty('--t-root-top', top);\n }\n\n private get focused(): boolean {\n return this.dropdown.el.contains(tuiGetFocused(this.doc));\n }\n}\n","<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","import {Directive, inject} 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 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 protected onMouseDown(event: MouseEvent): void {\n if (\n !this.isMobile ||\n !tuiIsHTMLElement(event.target) ||\n !event.target.matches('input,textarea')\n ) {\n return;\n }\n\n event.preventDefault();\n event.target.focus({preventScroll: true});\n }\n}\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './index';\n"],"names":[],"mappings":";;;;;;;;;;;;;;;AAiBA,MAAM,GAAG,GAAG,EAAE;MAkBD,0BAA0B,CAAA;AAUnC,IAAA,WAAA,GAAA;QATiB,IAAE,CAAA,EAAA,GAAG,gBAAgB,EAAE;AACvB,QAAA,IAAA,CAAA,QAAQ,GAAG,MAAM,CAAC,kBAAkB,CAAC;AACrC,QAAA,IAAA,CAAA,GAAG,GAAG,MAAM,CAAC,QAAQ,CAAC;QACtB,IAAS,CAAA,SAAA,GAAG,IAAI,CAAC,GAAG,CAAC,eAAe,CAAC,SAAS;AAC9C,QAAA,IAAA,CAAA,QAAQ,GAAG,IAAI,cAAc,CAAC,MAAM,IAAI,CAAC,OAAO,EAAE,CAAC;AAEjD,QAAA,IAAA,CAAA,QAAQ,GAAG,MAAM,CAAC,oBAAoB,CAAC;AACvC,QAAA,IAAA,CAAA,OAAO,GAAG,EAAC,SAAS,EAAE,MAAY,IAAI,CAAC,QAAQ,CAAC,MAAM,CAAC,KAAK,CAAC,EAAC;QAG7E,IAAI,CAAC,QAAQ,CAAC,OAAO,CAAC,IAAI,CAAC,QAAQ,CAAC,EAAE,CAAC;AACvC,QAAA,IAAI,CAAC,GAAG,CAAC,eAAe,CAAC,KAAK,CAAC,WAAW,CAAC,iBAAiB,EAAE,SAAS,CAAC;;IAGrE,WAAW,GAAA;AACd,QAAA,IAAI,CAAC,QAAQ,CAAC,UAAU,EAAE;QAC1B,IAAI,CAAC,GAAG,CAAC,IAAI,CAAC,SAAS,CAAC,MAAM,CAAC,mBAAmB,CAAC;QACnD,IAAI,CAAC,GAAG,CAAC,IAAI,CA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