@taiga-ui/addon-mobile 2.55.0 → 3.0.0-rc.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (508) hide show
  1. package/bundles/taiga-ui-addon-mobile-components-mobile-calendar-dialog.umd.js +69 -283
  2. package/bundles/taiga-ui-addon-mobile-components-mobile-calendar-dialog.umd.js.map +1 -1
  3. package/bundles/taiga-ui-addon-mobile-components-mobile-calendar.umd.js +538 -406
  4. package/bundles/taiga-ui-addon-mobile-components-mobile-calendar.umd.js.map +1 -1
  5. package/bundles/taiga-ui-addon-mobile-components-mobile-dialog.umd.js +417 -294
  6. package/bundles/taiga-ui-addon-mobile-components-mobile-dialog.umd.js.map +1 -1
  7. package/bundles/taiga-ui-addon-mobile-components-pull-to-refresh.umd.js +437 -324
  8. package/bundles/taiga-ui-addon-mobile-components-pull-to-refresh.umd.js.map +1 -1
  9. package/bundles/taiga-ui-addon-mobile-components-sheet.umd.js +878 -688
  10. package/bundles/taiga-ui-addon-mobile-components-sheet.umd.js.map +1 -1
  11. package/bundles/taiga-ui-addon-mobile-components-theme-android.umd.js +374 -265
  12. package/bundles/taiga-ui-addon-mobile-components-theme-android.umd.js.map +1 -1
  13. package/bundles/taiga-ui-addon-mobile-components-theme-ios.umd.js +374 -265
  14. package/bundles/taiga-ui-addon-mobile-components-theme-ios.umd.js.map +1 -1
  15. package/bundles/taiga-ui-addon-mobile-components.umd.js +17 -31
  16. package/bundles/taiga-ui-addon-mobile-components.umd.js.map +1 -1
  17. package/bundles/taiga-ui-addon-mobile-const.umd.js +10 -255
  18. package/bundles/taiga-ui-addon-mobile-const.umd.js.map +1 -1
  19. package/bundles/taiga-ui-addon-mobile-directives-elastic-sticky.umd.js +418 -305
  20. package/bundles/taiga-ui-addon-mobile-directives-elastic-sticky.umd.js.map +1 -1
  21. package/bundles/taiga-ui-addon-mobile-directives-mobile-tabs.umd.js +119 -325
  22. package/bundles/taiga-ui-addon-mobile-directives-mobile-tabs.umd.js.map +1 -1
  23. package/bundles/taiga-ui-addon-mobile-directives-ripple.umd.js +103 -314
  24. package/bundles/taiga-ui-addon-mobile-directives-ripple.umd.js.map +1 -1
  25. package/bundles/taiga-ui-addon-mobile-directives-sidebar.umd.js +435 -315
  26. package/bundles/taiga-ui-addon-mobile-directives-sidebar.umd.js.map +1 -1
  27. package/bundles/taiga-ui-addon-mobile-directives-touchable.umd.js +414 -298
  28. package/bundles/taiga-ui-addon-mobile-directives-touchable.umd.js.map +1 -1
  29. package/bundles/taiga-ui-addon-mobile-directives.umd.js +13 -23
  30. package/bundles/taiga-ui-addon-mobile-directives.umd.js.map +1 -1
  31. package/bundles/taiga-ui-addon-mobile-interfaces.umd.js +2 -2
  32. package/bundles/taiga-ui-addon-mobile-interfaces.umd.js.map +1 -1
  33. package/bundles/taiga-ui-addon-mobile-internal-primitive-calendar-mobile.umd.js +405 -282
  34. package/bundles/taiga-ui-addon-mobile-internal-primitive-calendar-mobile.umd.js.map +1 -1
  35. package/bundles/taiga-ui-addon-mobile-internal.umd.js +5 -7
  36. package/bundles/taiga-ui-addon-mobile-internal.umd.js.map +1 -1
  37. package/bundles/taiga-ui-addon-mobile-tokens.umd.js +8 -4
  38. package/bundles/taiga-ui-addon-mobile-tokens.umd.js.map +1 -1
  39. package/bundles/taiga-ui-addon-mobile-types.umd.js +2 -2
  40. package/bundles/taiga-ui-addon-mobile-types.umd.js.map +1 -1
  41. package/bundles/taiga-ui-addon-mobile-utils.umd.js +8 -10
  42. package/bundles/taiga-ui-addon-mobile-utils.umd.js.map +1 -1
  43. package/bundles/taiga-ui-addon-mobile.umd.js +24 -30
  44. package/bundles/taiga-ui-addon-mobile.umd.js.map +1 -1
  45. package/components/mobile-calendar/mobile-calendar.component.d.ts +21 -2
  46. package/components/mobile-calendar/mobile-calendar.module.d.ts +12 -0
  47. package/components/mobile-calendar/package.json +2 -5
  48. package/components/mobile-calendar/taiga-ui-addon-mobile-components-mobile-calendar.d.ts +1 -0
  49. package/components/mobile-calendar-dialog/mobile-calendar-dialog.component.d.ts +3 -0
  50. package/components/mobile-calendar-dialog/mobile-calendar-dialog.module.d.ts +6 -2
  51. package/components/mobile-calendar-dialog/package.json +2 -5
  52. package/components/mobile-calendar-dialog/taiga-ui-addon-mobile-components-mobile-calendar-dialog.d.ts +1 -0
  53. package/components/mobile-dialog/mobile-dialog.component.d.ts +3 -0
  54. package/components/mobile-dialog/mobile-dialog.module.d.ts +9 -0
  55. package/components/mobile-dialog/mobile-dialog.service.d.ts +4 -1
  56. package/components/mobile-dialog/package.json +2 -5
  57. package/components/mobile-dialog/taiga-ui-addon-mobile-components-mobile-dialog.d.ts +1 -0
  58. package/components/package.json +2 -5
  59. package/components/pull-to-refresh/loader-android/loader-android.component.d.ts +3 -0
  60. package/components/pull-to-refresh/loader-ios/loader-ios.component.d.ts +3 -0
  61. package/components/pull-to-refresh/package.json +2 -5
  62. package/components/pull-to-refresh/pull-to-refresh.component.d.ts +3 -0
  63. package/components/pull-to-refresh/pull-to-refresh.module.d.ts +10 -0
  64. package/components/pull-to-refresh/taiga-ui-addon-mobile-components-pull-to-refresh.d.ts +1 -0
  65. package/components/sheet/components/sheet/sheet.component.d.ts +5 -2
  66. package/components/sheet/components/sheet/sheet.providers.d.ts +1 -5
  67. package/components/sheet/components/sheet-bar/sheet-bar.component.d.ts +5 -2
  68. package/components/sheet/components/sheet-heading/sheet-heading.component.d.ts +3 -0
  69. package/components/sheet/components/sheets-host/sheets-host.component.d.ts +3 -0
  70. package/components/sheet/directives/sheet-close/sheet-close.directive.d.ts +3 -0
  71. package/components/sheet/directives/sheet-stop/sheet-stop.directive.d.ts +3 -0
  72. package/components/sheet/directives/sheet-top/sheet-top.directive.d.ts +5 -2
  73. package/components/sheet/directives/sheet-wrapper/sheet-wrapper.directive.d.ts +3 -0
  74. package/components/sheet/package.json +2 -5
  75. package/components/sheet/sheet-options.d.ts +1 -1
  76. package/components/sheet/sheet-tokens.d.ts +5 -0
  77. package/components/sheet/sheet.d.ts +4 -0
  78. package/components/sheet/sheet.directive.d.ts +3 -0
  79. package/components/sheet/sheet.module.d.ts +17 -0
  80. package/components/sheet/sheet.service.d.ts +3 -0
  81. package/components/sheet/taiga-ui-addon-mobile-components-sheet.d.ts +1 -0
  82. package/components/taiga-ui-addon-mobile-components.d.ts +1 -0
  83. package/components/theme-android/package.json +2 -5
  84. package/components/theme-android/taiga-ui-addon-mobile-components-theme-android.d.ts +1 -0
  85. package/components/theme-android/theme-android.component.d.ts +3 -0
  86. package/components/theme-android/theme-android.module.d.ts +5 -0
  87. package/components/theme-ios/package.json +2 -5
  88. package/components/theme-ios/taiga-ui-addon-mobile-components-theme-ios.d.ts +1 -0
  89. package/components/theme-ios/theme-ios.component.d.ts +3 -0
  90. package/components/theme-ios/theme-ios.module.d.ts +5 -0
  91. package/const/package.json +2 -5
  92. package/const/taiga-ui-addon-mobile-const.d.ts +1 -0
  93. package/directives/elastic-sticky/elastic-sticky.directive.d.ts +3 -0
  94. package/directives/elastic-sticky/elastic-sticky.module.d.ts +5 -0
  95. package/directives/elastic-sticky/elastic-sticky.service.d.ts +3 -0
  96. package/directives/elastic-sticky/package.json +2 -5
  97. package/directives/elastic-sticky/taiga-ui-addon-mobile-directives-elastic-sticky.d.ts +1 -0
  98. package/directives/mobile-tabs/mobile-tabs.component.d.ts +3 -0
  99. package/directives/mobile-tabs/mobile-tabs.directive.d.ts +3 -0
  100. package/directives/mobile-tabs/mobile-tabs.module.d.ts +6 -0
  101. package/directives/mobile-tabs/package.json +2 -5
  102. package/directives/mobile-tabs/taiga-ui-addon-mobile-directives-mobile-tabs.d.ts +1 -0
  103. package/directives/package.json +2 -5
  104. package/directives/ripple/package.json +2 -5
  105. package/directives/ripple/ripple-styles.component.d.ts +3 -0
  106. package/directives/ripple/ripple.directive.d.ts +3 -0
  107. package/directives/ripple/ripple.module.d.ts +6 -0
  108. package/directives/ripple/taiga-ui-addon-mobile-directives-ripple.d.ts +1 -1
  109. package/directives/sidebar/package.json +2 -5
  110. package/directives/sidebar/sidebar.component.d.ts +3 -0
  111. package/directives/sidebar/sidebar.directive.d.ts +5 -2
  112. package/directives/sidebar/sidebar.module.d.ts +8 -0
  113. package/directives/sidebar/taiga-ui-addon-mobile-directives-sidebar.d.ts +1 -0
  114. package/directives/taiga-ui-addon-mobile-directives.d.ts +1 -0
  115. package/directives/touchable/package.json +2 -5
  116. package/directives/touchable/taiga-ui-addon-mobile-directives-touchable.d.ts +1 -0
  117. package/directives/touchable/touchable.directive.d.ts +6 -3
  118. package/directives/touchable/touchable.module.d.ts +5 -0
  119. package/esm2015/components/index.js +1 -1
  120. package/esm2015/components/mobile-calendar/index.js +1 -1
  121. package/esm2015/components/mobile-calendar/mobile-calendar.component.js +83 -63
  122. package/esm2015/components/mobile-calendar/mobile-calendar.const.js +1 -1
  123. package/esm2015/components/mobile-calendar/mobile-calendar.module.js +34 -13
  124. package/esm2015/components/mobile-calendar/mobile-calendar.providers.js +2 -2
  125. package/esm2015/components/mobile-calendar/mobile-calendar.strategy.js +2 -2
  126. package/esm2015/components/mobile-calendar/taiga-ui-addon-mobile-components-mobile-calendar.js +1 -1
  127. package/esm2015/components/mobile-calendar-dialog/index.js +1 -1
  128. package/esm2015/components/mobile-calendar-dialog/mobile-calendar-dialog.component.js +19 -17
  129. package/esm2015/components/mobile-calendar-dialog/mobile-calendar-dialog.module.js +27 -21
  130. package/esm2015/components/mobile-calendar-dialog/taiga-ui-addon-mobile-components-mobile-calendar-dialog.js +1 -1
  131. package/esm2015/components/mobile-dialog/index.js +2 -1
  132. package/esm2015/components/mobile-dialog/mobile-dialog-options.js +2 -1
  133. package/esm2015/components/mobile-dialog/mobile-dialog.component.js +28 -22
  134. package/esm2015/components/mobile-dialog/mobile-dialog.module.js +29 -20
  135. package/esm2015/components/mobile-dialog/mobile-dialog.service.js +13 -14
  136. package/esm2015/components/mobile-dialog/taiga-ui-addon-mobile-components-mobile-dialog.js +1 -1
  137. package/esm2015/components/pull-to-refresh/index.js +1 -1
  138. package/esm2015/components/pull-to-refresh/loader-android/loader-android.component.js +21 -19
  139. package/esm2015/components/pull-to-refresh/loader-ios/loader-ios.component.js +19 -16
  140. package/esm2015/components/pull-to-refresh/pull-to-refresh.component.js +31 -24
  141. package/esm2015/components/pull-to-refresh/pull-to-refresh.module.js +21 -16
  142. package/esm2015/components/pull-to-refresh/pull-to-refresh.providers.js +3 -3
  143. package/esm2015/components/pull-to-refresh/taiga-ui-addon-mobile-components-pull-to-refresh.js +1 -1
  144. package/esm2015/components/sheet/components/sheet/sheet.component.js +67 -55
  145. package/esm2015/components/sheet/components/sheet/sheet.providers.js +10 -10
  146. package/esm2015/components/sheet/components/sheet-bar/sheet-bar.component.js +29 -26
  147. package/esm2015/components/sheet/components/sheet-heading/sheet-heading.component.js +31 -25
  148. package/esm2015/components/sheet/components/sheets-host/sheets-host.component.js +33 -23
  149. package/esm2015/components/sheet/directives/sheet-close/sheet-close.directive.js +36 -29
  150. package/esm2015/components/sheet/directives/sheet-stop/sheet-stop.directive.js +33 -28
  151. package/esm2015/components/sheet/directives/sheet-top/sheet-top.directive.js +36 -31
  152. package/esm2015/components/sheet/directives/sheet-wrapper/sheet-wrapper.directive.js +38 -36
  153. package/esm2015/components/sheet/index.js +2 -1
  154. package/esm2015/components/sheet/ios.hacks.js +9 -9
  155. package/esm2015/components/sheet/sheet-options.js +5 -6
  156. package/esm2015/components/sheet/sheet-tokens.js +5 -0
  157. package/esm2015/components/sheet/sheet.directive.js +30 -23
  158. package/esm2015/components/sheet/sheet.js +2 -1
  159. package/esm2015/components/sheet/sheet.module.js +55 -29
  160. package/esm2015/components/sheet/sheet.service.js +14 -16
  161. package/esm2015/components/sheet/taiga-ui-addon-mobile-components-sheet.js +1 -1
  162. package/esm2015/components/taiga-ui-addon-mobile-components.js +1 -1
  163. package/esm2015/components/theme-android/index.js +1 -1
  164. package/esm2015/components/theme-android/taiga-ui-addon-mobile-components-theme-android.js +1 -1
  165. package/esm2015/components/theme-android/theme-android.component.js +16 -14
  166. package/esm2015/components/theme-android/theme-android.module.js +14 -11
  167. package/esm2015/components/theme-ios/index.js +1 -1
  168. package/esm2015/components/theme-ios/taiga-ui-addon-mobile-components-theme-ios.js +1 -1
  169. package/esm2015/components/theme-ios/theme-ios.component.js +16 -14
  170. package/esm2015/components/theme-ios/theme-ios.module.js +14 -11
  171. package/esm2015/const/index.js +1 -1
  172. package/esm2015/const/mobile-alert-options.js +2 -2
  173. package/esm2015/const/taiga-ui-addon-mobile-const.js +1 -1
  174. package/esm2015/directives/elastic-sticky/elastic-sticky.directive.js +20 -19
  175. package/esm2015/directives/elastic-sticky/elastic-sticky.module.js +14 -11
  176. package/esm2015/directives/elastic-sticky/elastic-sticky.service.js +29 -24
  177. package/esm2015/directives/elastic-sticky/index.js +1 -1
  178. package/esm2015/directives/elastic-sticky/taiga-ui-addon-mobile-directives-elastic-sticky.js +1 -1
  179. package/esm2015/directives/index.js +1 -1
  180. package/esm2015/directives/mobile-tabs/index.js +1 -1
  181. package/esm2015/directives/mobile-tabs/mobile-tabs.component.js +14 -12
  182. package/esm2015/directives/mobile-tabs/mobile-tabs.directive.js +38 -29
  183. package/esm2015/directives/mobile-tabs/mobile-tabs.module.js +15 -12
  184. package/esm2015/directives/mobile-tabs/taiga-ui-addon-mobile-directives-mobile-tabs.js +1 -1
  185. package/esm2015/directives/ripple/index.js +1 -1
  186. package/esm2015/directives/ripple/ripple-styles.component.js +14 -12
  187. package/esm2015/directives/ripple/ripple.directive.js +41 -34
  188. package/esm2015/directives/ripple/ripple.module.js +15 -12
  189. package/esm2015/directives/ripple/ripple.providers.js +10 -10
  190. package/esm2015/directives/ripple/taiga-ui-addon-mobile-directives-ripple.js +1 -2
  191. package/esm2015/directives/sidebar/index.js +1 -1
  192. package/esm2015/directives/sidebar/sidebar.component.js +34 -29
  193. package/esm2015/directives/sidebar/sidebar.directive.js +39 -34
  194. package/esm2015/directives/sidebar/sidebar.module.js +16 -13
  195. package/esm2015/directives/sidebar/taiga-ui-addon-mobile-directives-sidebar.js +1 -1
  196. package/esm2015/directives/taiga-ui-addon-mobile-directives.js +1 -1
  197. package/esm2015/directives/touchable/index.js +1 -1
  198. package/esm2015/directives/touchable/taiga-ui-addon-mobile-directives-touchable.js +1 -1
  199. package/esm2015/directives/touchable/touchable.directive.js +49 -39
  200. package/esm2015/directives/touchable/touchable.module.js +14 -11
  201. package/esm2015/index.js +3 -2
  202. package/esm2015/interfaces/index.js +2 -1
  203. package/esm2015/interfaces/mobile-alert-data.js +2 -1
  204. package/esm2015/interfaces/taiga-ui-addon-mobile-interfaces.js +2 -1
  205. package/esm2015/internal/index.js +1 -1
  206. package/esm2015/internal/primitive-calendar-mobile/index.js +1 -1
  207. package/esm2015/internal/primitive-calendar-mobile/primitive-calendar-mobile.component.js +28 -23
  208. package/esm2015/internal/primitive-calendar-mobile/primitive-calendar-mobile.module.js +24 -13
  209. package/esm2015/internal/primitive-calendar-mobile/taiga-ui-addon-mobile-internal-primitive-calendar-mobile.js +1 -1
  210. package/esm2015/internal/taiga-ui-addon-mobile-internal.js +1 -1
  211. package/esm2015/taiga-ui-addon-mobile.js +1 -1
  212. package/esm2015/tokens/index.js +1 -1
  213. package/esm2015/tokens/loaded.js +2 -2
  214. package/esm2015/tokens/taiga-ui-addon-mobile-tokens.js +1 -1
  215. package/esm2015/types/index.js +2 -1
  216. package/esm2015/types/taiga-ui-addon-mobile-types.js +2 -1
  217. package/esm2015/types/touch-mode.js +2 -1
  218. package/esm2015/utils/find-touch-index.js +2 -7
  219. package/esm2015/utils/index.js +1 -1
  220. package/esm2015/utils/taiga-ui-addon-mobile-utils.js +1 -1
  221. package/fesm2015/taiga-ui-addon-mobile-components-mobile-calendar-dialog.js +45 -35
  222. package/fesm2015/taiga-ui-addon-mobile-components-mobile-calendar-dialog.js.map +1 -1
  223. package/fesm2015/taiga-ui-addon-mobile-components-mobile-calendar.js +117 -74
  224. package/fesm2015/taiga-ui-addon-mobile-components-mobile-calendar.js.map +1 -1
  225. package/fesm2015/taiga-ui-addon-mobile-components-mobile-dialog.js +68 -50
  226. package/fesm2015/taiga-ui-addon-mobile-components-mobile-dialog.js.map +1 -1
  227. package/fesm2015/taiga-ui-addon-mobile-components-pull-to-refresh.js +84 -68
  228. package/fesm2015/taiga-ui-addon-mobile-components-pull-to-refresh.js.map +1 -1
  229. package/fesm2015/taiga-ui-addon-mobile-components-sheet.js +444 -366
  230. package/fesm2015/taiga-ui-addon-mobile-components-sheet.js.map +1 -1
  231. package/fesm2015/taiga-ui-addon-mobile-components-theme-android.js +27 -20
  232. package/fesm2015/taiga-ui-addon-mobile-components-theme-android.js.map +1 -1
  233. package/fesm2015/taiga-ui-addon-mobile-components-theme-ios.js +27 -20
  234. package/fesm2015/taiga-ui-addon-mobile-components-theme-ios.js.map +1 -1
  235. package/fesm2015/taiga-ui-addon-mobile-components.js.map +1 -1
  236. package/fesm2015/taiga-ui-addon-mobile-const.js +1 -1
  237. package/fesm2015/taiga-ui-addon-mobile-const.js.map +1 -1
  238. package/fesm2015/taiga-ui-addon-mobile-directives-elastic-sticky.js +58 -47
  239. package/fesm2015/taiga-ui-addon-mobile-directives-elastic-sticky.js.map +1 -1
  240. package/fesm2015/taiga-ui-addon-mobile-directives-mobile-tabs.js +63 -46
  241. package/fesm2015/taiga-ui-addon-mobile-directives-mobile-tabs.js.map +1 -1
  242. package/fesm2015/taiga-ui-addon-mobile-directives-ripple.js +76 -61
  243. package/fesm2015/taiga-ui-addon-mobile-directives-ripple.js.map +1 -1
  244. package/fesm2015/taiga-ui-addon-mobile-directives-sidebar.js +82 -68
  245. package/fesm2015/taiga-ui-addon-mobile-directives-sidebar.js.map +1 -1
  246. package/fesm2015/taiga-ui-addon-mobile-directives-touchable.js +61 -46
  247. package/fesm2015/taiga-ui-addon-mobile-directives-touchable.js.map +1 -1
  248. package/fesm2015/taiga-ui-addon-mobile-directives.js.map +1 -1
  249. package/fesm2015/taiga-ui-addon-mobile-interfaces.js.map +1 -1
  250. package/fesm2015/taiga-ui-addon-mobile-internal-primitive-calendar-mobile.js +50 -32
  251. package/fesm2015/taiga-ui-addon-mobile-internal-primitive-calendar-mobile.js.map +1 -1
  252. package/fesm2015/taiga-ui-addon-mobile-internal.js.map +1 -1
  253. package/fesm2015/taiga-ui-addon-mobile-tokens.js +1 -1
  254. package/fesm2015/taiga-ui-addon-mobile-tokens.js.map +1 -1
  255. package/fesm2015/taiga-ui-addon-mobile-types.js.map +1 -1
  256. package/fesm2015/taiga-ui-addon-mobile-utils.js +2 -7
  257. package/fesm2015/taiga-ui-addon-mobile-utils.js.map +1 -1
  258. package/fesm2015/taiga-ui-addon-mobile.js +2 -1
  259. package/fesm2015/taiga-ui-addon-mobile.js.map +1 -1
  260. package/index.d.ts +0 -1
  261. package/interfaces/package.json +2 -5
  262. package/interfaces/taiga-ui-addon-mobile-interfaces.d.ts +1 -0
  263. package/internal/package.json +2 -5
  264. package/internal/primitive-calendar-mobile/package.json +2 -5
  265. package/internal/primitive-calendar-mobile/primitive-calendar-mobile.component.d.ts +3 -0
  266. package/internal/primitive-calendar-mobile/primitive-calendar-mobile.module.d.ts +8 -0
  267. package/internal/primitive-calendar-mobile/taiga-ui-addon-mobile-internal-primitive-calendar-mobile.d.ts +1 -0
  268. package/internal/taiga-ui-addon-mobile-internal.d.ts +1 -0
  269. package/package.json +12 -15
  270. package/taiga-ui-addon-mobile.d.ts +1 -0
  271. package/tokens/package.json +2 -5
  272. package/tokens/taiga-ui-addon-mobile-tokens.d.ts +1 -0
  273. package/types/package.json +2 -5
  274. package/types/taiga-ui-addon-mobile-types.d.ts +1 -0
  275. package/types/touch-mode.d.ts +1 -1
  276. package/utils/find-touch-index.d.ts +1 -5
  277. package/utils/package.json +2 -5
  278. package/utils/taiga-ui-addon-mobile-utils.d.ts +1 -0
  279. package/bundles/taiga-ui-addon-mobile-components-mobile-calendar-dialog.umd.min.js +0 -2
  280. package/bundles/taiga-ui-addon-mobile-components-mobile-calendar-dialog.umd.min.js.map +0 -1
  281. package/bundles/taiga-ui-addon-mobile-components-mobile-calendar.umd.min.js +0 -2
  282. package/bundles/taiga-ui-addon-mobile-components-mobile-calendar.umd.min.js.map +0 -1
  283. package/bundles/taiga-ui-addon-mobile-components-mobile-dialog.umd.min.js +0 -2
  284. package/bundles/taiga-ui-addon-mobile-components-mobile-dialog.umd.min.js.map +0 -1
  285. package/bundles/taiga-ui-addon-mobile-components-pull-to-refresh.umd.min.js +0 -2
  286. package/bundles/taiga-ui-addon-mobile-components-pull-to-refresh.umd.min.js.map +0 -1
  287. package/bundles/taiga-ui-addon-mobile-components-sheet.umd.min.js +0 -2
  288. package/bundles/taiga-ui-addon-mobile-components-sheet.umd.min.js.map +0 -1
  289. package/bundles/taiga-ui-addon-mobile-components-theme-android.umd.min.js +0 -2
  290. package/bundles/taiga-ui-addon-mobile-components-theme-android.umd.min.js.map +0 -1
  291. package/bundles/taiga-ui-addon-mobile-components-theme-ios.umd.min.js +0 -2
  292. package/bundles/taiga-ui-addon-mobile-components-theme-ios.umd.min.js.map +0 -1
  293. package/bundles/taiga-ui-addon-mobile-components.umd.min.js +0 -2
  294. package/bundles/taiga-ui-addon-mobile-components.umd.min.js.map +0 -1
  295. package/bundles/taiga-ui-addon-mobile-const.umd.min.js +0 -2
  296. package/bundles/taiga-ui-addon-mobile-const.umd.min.js.map +0 -1
  297. package/bundles/taiga-ui-addon-mobile-directives-elastic-sticky.umd.min.js +0 -2
  298. package/bundles/taiga-ui-addon-mobile-directives-elastic-sticky.umd.min.js.map +0 -1
  299. package/bundles/taiga-ui-addon-mobile-directives-mobile-tabs.umd.min.js +0 -2
  300. package/bundles/taiga-ui-addon-mobile-directives-mobile-tabs.umd.min.js.map +0 -1
  301. package/bundles/taiga-ui-addon-mobile-directives-ripple.umd.min.js +0 -2
  302. package/bundles/taiga-ui-addon-mobile-directives-ripple.umd.min.js.map +0 -1
  303. package/bundles/taiga-ui-addon-mobile-directives-sidebar.umd.min.js +0 -2
  304. package/bundles/taiga-ui-addon-mobile-directives-sidebar.umd.min.js.map +0 -1
  305. package/bundles/taiga-ui-addon-mobile-directives-touchable.umd.min.js +0 -2
  306. package/bundles/taiga-ui-addon-mobile-directives-touchable.umd.min.js.map +0 -1
  307. package/bundles/taiga-ui-addon-mobile-directives.umd.min.js +0 -2
  308. package/bundles/taiga-ui-addon-mobile-directives.umd.min.js.map +0 -1
  309. package/bundles/taiga-ui-addon-mobile-enums.umd.js +0 -20
  310. package/bundles/taiga-ui-addon-mobile-enums.umd.js.map +0 -1
  311. package/bundles/taiga-ui-addon-mobile-enums.umd.min.js +0 -2
  312. package/bundles/taiga-ui-addon-mobile-enums.umd.min.js.map +0 -1
  313. package/bundles/taiga-ui-addon-mobile-interfaces.umd.min.js +0 -2
  314. package/bundles/taiga-ui-addon-mobile-interfaces.umd.min.js.map +0 -1
  315. package/bundles/taiga-ui-addon-mobile-internal-primitive-calendar-mobile.umd.min.js +0 -2
  316. package/bundles/taiga-ui-addon-mobile-internal-primitive-calendar-mobile.umd.min.js.map +0 -1
  317. package/bundles/taiga-ui-addon-mobile-internal.umd.min.js +0 -2
  318. package/bundles/taiga-ui-addon-mobile-internal.umd.min.js.map +0 -1
  319. package/bundles/taiga-ui-addon-mobile-tokens.umd.min.js +0 -2
  320. package/bundles/taiga-ui-addon-mobile-tokens.umd.min.js.map +0 -1
  321. package/bundles/taiga-ui-addon-mobile-types.umd.min.js +0 -2
  322. package/bundles/taiga-ui-addon-mobile-types.umd.min.js.map +0 -1
  323. package/bundles/taiga-ui-addon-mobile-utils.umd.min.js +0 -2
  324. package/bundles/taiga-ui-addon-mobile-utils.umd.min.js.map +0 -1
  325. package/bundles/taiga-ui-addon-mobile.umd.min.js +0 -2
  326. package/bundles/taiga-ui-addon-mobile.umd.min.js.map +0 -1
  327. package/components/mobile-calendar/taiga-ui-addon-mobile-components-mobile-calendar.metadata.json +0 -1
  328. package/components/mobile-calendar-dialog/taiga-ui-addon-mobile-components-mobile-calendar-dialog.metadata.json +0 -1
  329. package/components/mobile-dialog/taiga-ui-addon-mobile-components-mobile-dialog.metadata.json +0 -1
  330. package/components/pull-to-refresh/taiga-ui-addon-mobile-components-pull-to-refresh.metadata.json +0 -1
  331. package/components/sheet/taiga-ui-addon-mobile-components-sheet.metadata.json +0 -1
  332. package/components/taiga-ui-addon-mobile-components.metadata.json +0 -1
  333. package/components/theme-android/taiga-ui-addon-mobile-components-theme-android.metadata.json +0 -1
  334. package/components/theme-ios/taiga-ui-addon-mobile-components-theme-ios.metadata.json +0 -1
  335. package/const/taiga-ui-addon-mobile-const.metadata.json +0 -1
  336. package/directives/elastic-sticky/taiga-ui-addon-mobile-directives-elastic-sticky.metadata.json +0 -1
  337. package/directives/mobile-tabs/taiga-ui-addon-mobile-directives-mobile-tabs.metadata.json +0 -1
  338. package/directives/ripple/taiga-ui-addon-mobile-directives-ripple.metadata.json +0 -1
  339. package/directives/sidebar/taiga-ui-addon-mobile-directives-sidebar.metadata.json +0 -1
  340. package/directives/taiga-ui-addon-mobile-directives.metadata.json +0 -1
  341. package/directives/touchable/taiga-ui-addon-mobile-directives-touchable.metadata.json +0 -1
  342. package/enums/index.d.ts +0 -1
  343. package/enums/package.json +0 -13
  344. package/enums/taiga-ui-addon-mobile-enums.d.ts +0 -4
  345. package/enums/taiga-ui-addon-mobile-enums.metadata.json +0 -1
  346. package/enums/touch-mode.d.ts +0 -8
  347. package/esm2015/enums/index.js +0 -2
  348. package/esm2015/enums/taiga-ui-addon-mobile-enums.js +0 -5
  349. package/esm2015/enums/touch-mode.js +0 -10
  350. package/esm5/components/index.js +0 -8
  351. package/esm5/components/mobile-calendar/index.js +0 -6
  352. package/esm5/components/mobile-calendar/mobile-calendar.component.js +0 -295
  353. package/esm5/components/mobile-calendar/mobile-calendar.const.js +0 -25
  354. package/esm5/components/mobile-calendar/mobile-calendar.module.js +0 -34
  355. package/esm5/components/mobile-calendar/mobile-calendar.providers.js +0 -31
  356. package/esm5/components/mobile-calendar/mobile-calendar.strategy.js +0 -134
  357. package/esm5/components/mobile-calendar/taiga-ui-addon-mobile-components-mobile-calendar.js +0 -5
  358. package/esm5/components/mobile-calendar-dialog/index.js +0 -3
  359. package/esm5/components/mobile-calendar-dialog/mobile-calendar-dialog.component.js +0 -57
  360. package/esm5/components/mobile-calendar-dialog/mobile-calendar-dialog.module.js +0 -28
  361. package/esm5/components/mobile-calendar-dialog/taiga-ui-addon-mobile-components-mobile-calendar-dialog.js +0 -5
  362. package/esm5/components/mobile-dialog/index.js +0 -4
  363. package/esm5/components/mobile-dialog/mobile-dialog-options.js +0 -1
  364. package/esm5/components/mobile-dialog/mobile-dialog.component.js +0 -34
  365. package/esm5/components/mobile-dialog/mobile-dialog.module.js +0 -31
  366. package/esm5/components/mobile-dialog/mobile-dialog.service.js +0 -34
  367. package/esm5/components/mobile-dialog/taiga-ui-addon-mobile-components-mobile-dialog.js +0 -5
  368. package/esm5/components/pull-to-refresh/index.js +0 -6
  369. package/esm5/components/pull-to-refresh/loader-android/loader-android.component.js +0 -43
  370. package/esm5/components/pull-to-refresh/loader-ios/loader-ios.component.js +0 -41
  371. package/esm5/components/pull-to-refresh/pull-to-refresh.component.js +0 -56
  372. package/esm5/components/pull-to-refresh/pull-to-refresh.module.js +0 -26
  373. package/esm5/components/pull-to-refresh/pull-to-refresh.providers.js +0 -32
  374. package/esm5/components/pull-to-refresh/taiga-ui-addon-mobile-components-pull-to-refresh.js +0 -5
  375. package/esm5/components/sheet/components/sheet/sheet.component.js +0 -150
  376. package/esm5/components/sheet/components/sheet/sheet.providers.js +0 -42
  377. package/esm5/components/sheet/components/sheet-bar/sheet-bar.component.js +0 -43
  378. package/esm5/components/sheet/components/sheet-heading/sheet-heading.component.js +0 -40
  379. package/esm5/components/sheet/components/sheets-host/sheets-host.component.js +0 -40
  380. package/esm5/components/sheet/directives/sheet-close/sheet-close.directive.js +0 -56
  381. package/esm5/components/sheet/directives/sheet-stop/sheet-stop.directive.js +0 -46
  382. package/esm5/components/sheet/directives/sheet-top/sheet-top.directive.js +0 -56
  383. package/esm5/components/sheet/directives/sheet-wrapper/sheet-wrapper.directive.js +0 -93
  384. package/esm5/components/sheet/index.js +0 -15
  385. package/esm5/components/sheet/ios.hacks.js +0 -42
  386. package/esm5/components/sheet/sheet-options.js +0 -16
  387. package/esm5/components/sheet/sheet.directive.js +0 -58
  388. package/esm5/components/sheet/sheet.js +0 -1
  389. package/esm5/components/sheet/sheet.module.js +0 -52
  390. package/esm5/components/sheet/sheet.service.js +0 -42
  391. package/esm5/components/sheet/taiga-ui-addon-mobile-components-sheet.js +0 -5
  392. package/esm5/components/taiga-ui-addon-mobile-components.js +0 -5
  393. package/esm5/components/theme-android/index.js +0 -3
  394. package/esm5/components/theme-android/taiga-ui-addon-mobile-components-theme-android.js +0 -5
  395. package/esm5/components/theme-android/theme-android.component.js +0 -22
  396. package/esm5/components/theme-android/theme-android.module.js +0 -16
  397. package/esm5/components/theme-ios/index.js +0 -3
  398. package/esm5/components/theme-ios/taiga-ui-addon-mobile-components-theme-ios.js +0 -5
  399. package/esm5/components/theme-ios/theme-ios.component.js +0 -22
  400. package/esm5/components/theme-ios/theme-ios.module.js +0 -16
  401. package/esm5/const/index.js +0 -2
  402. package/esm5/const/mobile-alert-options.js +0 -8
  403. package/esm5/const/taiga-ui-addon-mobile-const.js +0 -5
  404. package/esm5/directives/elastic-sticky/elastic-sticky.directive.js +0 -26
  405. package/esm5/directives/elastic-sticky/elastic-sticky.module.js +0 -16
  406. package/esm5/directives/elastic-sticky/elastic-sticky.service.js +0 -58
  407. package/esm5/directives/elastic-sticky/index.js +0 -4
  408. package/esm5/directives/elastic-sticky/taiga-ui-addon-mobile-directives-elastic-sticky.js +0 -5
  409. package/esm5/directives/index.js +0 -6
  410. package/esm5/directives/mobile-tabs/index.js +0 -4
  411. package/esm5/directives/mobile-tabs/mobile-tabs.component.js +0 -16
  412. package/esm5/directives/mobile-tabs/mobile-tabs.directive.js +0 -51
  413. package/esm5/directives/mobile-tabs/mobile-tabs.module.js +0 -18
  414. package/esm5/directives/mobile-tabs/taiga-ui-addon-mobile-directives-mobile-tabs.js +0 -5
  415. package/esm5/directives/ripple/index.js +0 -4
  416. package/esm5/directives/ripple/ripple-styles.component.js +0 -16
  417. package/esm5/directives/ripple/ripple.directive.js +0 -63
  418. package/esm5/directives/ripple/ripple.module.js +0 -18
  419. package/esm5/directives/ripple/ripple.providers.js +0 -54
  420. package/esm5/directives/ripple/taiga-ui-addon-mobile-directives-ripple.js +0 -6
  421. package/esm5/directives/sidebar/index.js +0 -4
  422. package/esm5/directives/sidebar/sidebar.component.js +0 -68
  423. package/esm5/directives/sidebar/sidebar.directive.js +0 -78
  424. package/esm5/directives/sidebar/sidebar.module.js +0 -21
  425. package/esm5/directives/sidebar/taiga-ui-addon-mobile-directives-sidebar.js +0 -5
  426. package/esm5/directives/taiga-ui-addon-mobile-directives.js +0 -5
  427. package/esm5/directives/touchable/index.js +0 -3
  428. package/esm5/directives/touchable/taiga-ui-addon-mobile-directives-touchable.js +0 -5
  429. package/esm5/directives/touchable/touchable.directive.js +0 -90
  430. package/esm5/directives/touchable/touchable.module.js +0 -16
  431. package/esm5/enums/index.js +0 -2
  432. package/esm5/enums/taiga-ui-addon-mobile-enums.js +0 -5
  433. package/esm5/enums/touch-mode.js +0 -10
  434. package/esm5/index.js +0 -7
  435. package/esm5/interfaces/index.js +0 -1
  436. package/esm5/interfaces/mobile-alert-data.js +0 -1
  437. package/esm5/interfaces/taiga-ui-addon-mobile-interfaces.js +0 -4
  438. package/esm5/internal/index.js +0 -2
  439. package/esm5/internal/primitive-calendar-mobile/index.js +0 -3
  440. package/esm5/internal/primitive-calendar-mobile/primitive-calendar-mobile.component.js +0 -37
  441. package/esm5/internal/primitive-calendar-mobile/primitive-calendar-mobile.module.js +0 -28
  442. package/esm5/internal/primitive-calendar-mobile/taiga-ui-addon-mobile-internal-primitive-calendar-mobile.js +0 -5
  443. package/esm5/internal/taiga-ui-addon-mobile-internal.js +0 -5
  444. package/esm5/taiga-ui-addon-mobile.js +0 -5
  445. package/esm5/tokens/index.js +0 -2
  446. package/esm5/tokens/loaded.js +0 -6
  447. package/esm5/tokens/taiga-ui-addon-mobile-tokens.js +0 -5
  448. package/esm5/types/index.js +0 -1
  449. package/esm5/types/taiga-ui-addon-mobile-types.js +0 -4
  450. package/esm5/types/touch-mode.js +0 -1
  451. package/esm5/utils/find-touch-index.js +0 -15
  452. package/esm5/utils/index.js +0 -2
  453. package/esm5/utils/taiga-ui-addon-mobile-utils.js +0 -5
  454. package/fesm2015/taiga-ui-addon-mobile-enums.js +0 -16
  455. package/fesm2015/taiga-ui-addon-mobile-enums.js.map +0 -1
  456. package/fesm5/taiga-ui-addon-mobile-components-mobile-calendar-dialog.js +0 -87
  457. package/fesm5/taiga-ui-addon-mobile-components-mobile-calendar-dialog.js.map +0 -1
  458. package/fesm5/taiga-ui-addon-mobile-components-mobile-calendar.js +0 -502
  459. package/fesm5/taiga-ui-addon-mobile-components-mobile-calendar.js.map +0 -1
  460. package/fesm5/taiga-ui-addon-mobile-components-mobile-dialog.js +0 -91
  461. package/fesm5/taiga-ui-addon-mobile-components-mobile-dialog.js.map +0 -1
  462. package/fesm5/taiga-ui-addon-mobile-components-pull-to-refresh.js +0 -185
  463. package/fesm5/taiga-ui-addon-mobile-components-pull-to-refresh.js.map +0 -1
  464. package/fesm5/taiga-ui-addon-mobile-components-sheet.js +0 -680
  465. package/fesm5/taiga-ui-addon-mobile-components-sheet.js.map +0 -1
  466. package/fesm5/taiga-ui-addon-mobile-components-theme-android.js +0 -40
  467. package/fesm5/taiga-ui-addon-mobile-components-theme-android.js.map +0 -1
  468. package/fesm5/taiga-ui-addon-mobile-components-theme-ios.js +0 -40
  469. package/fesm5/taiga-ui-addon-mobile-components-theme-ios.js.map +0 -1
  470. package/fesm5/taiga-ui-addon-mobile-components.js +0 -12
  471. package/fesm5/taiga-ui-addon-mobile-components.js.map +0 -1
  472. package/fesm5/taiga-ui-addon-mobile-const.js +0 -15
  473. package/fesm5/taiga-ui-addon-mobile-const.js.map +0 -1
  474. package/fesm5/taiga-ui-addon-mobile-directives-elastic-sticky.js +0 -97
  475. package/fesm5/taiga-ui-addon-mobile-directives-elastic-sticky.js.map +0 -1
  476. package/fesm5/taiga-ui-addon-mobile-directives-mobile-tabs.js +0 -82
  477. package/fesm5/taiga-ui-addon-mobile-directives-mobile-tabs.js.map +0 -1
  478. package/fesm5/taiga-ui-addon-mobile-directives-ripple.js +0 -143
  479. package/fesm5/taiga-ui-addon-mobile-directives-ripple.js.map +0 -1
  480. package/fesm5/taiga-ui-addon-mobile-directives-sidebar.js +0 -161
  481. package/fesm5/taiga-ui-addon-mobile-directives-sidebar.js.map +0 -1
  482. package/fesm5/taiga-ui-addon-mobile-directives-touchable.js +0 -108
  483. package/fesm5/taiga-ui-addon-mobile-directives-touchable.js.map +0 -1
  484. package/fesm5/taiga-ui-addon-mobile-directives.js +0 -10
  485. package/fesm5/taiga-ui-addon-mobile-directives.js.map +0 -1
  486. package/fesm5/taiga-ui-addon-mobile-enums.js +0 -16
  487. package/fesm5/taiga-ui-addon-mobile-enums.js.map +0 -1
  488. package/fesm5/taiga-ui-addon-mobile-interfaces.js +0 -4
  489. package/fesm5/taiga-ui-addon-mobile-interfaces.js.map +0 -1
  490. package/fesm5/taiga-ui-addon-mobile-internal-primitive-calendar-mobile.js +0 -65
  491. package/fesm5/taiga-ui-addon-mobile-internal-primitive-calendar-mobile.js.map +0 -1
  492. package/fesm5/taiga-ui-addon-mobile-internal.js +0 -6
  493. package/fesm5/taiga-ui-addon-mobile-internal.js.map +0 -1
  494. package/fesm5/taiga-ui-addon-mobile-tokens.js +0 -13
  495. package/fesm5/taiga-ui-addon-mobile-tokens.js.map +0 -1
  496. package/fesm5/taiga-ui-addon-mobile-types.js +0 -4
  497. package/fesm5/taiga-ui-addon-mobile-types.js.map +0 -1
  498. package/fesm5/taiga-ui-addon-mobile-utils.js +0 -21
  499. package/fesm5/taiga-ui-addon-mobile-utils.js.map +0 -1
  500. package/fesm5/taiga-ui-addon-mobile.js +0 -11
  501. package/fesm5/taiga-ui-addon-mobile.js.map +0 -1
  502. package/interfaces/taiga-ui-addon-mobile-interfaces.metadata.json +0 -1
  503. package/internal/primitive-calendar-mobile/taiga-ui-addon-mobile-internal-primitive-calendar-mobile.metadata.json +0 -1
  504. package/internal/taiga-ui-addon-mobile-internal.metadata.json +0 -1
  505. package/taiga-ui-addon-mobile.metadata.json +0 -1
  506. package/tokens/taiga-ui-addon-mobile-tokens.metadata.json +0 -1
  507. package/types/taiga-ui-addon-mobile-types.metadata.json +0 -1
  508. package/utils/taiga-ui-addon-mobile-utils.metadata.json +0 -1
@@ -1,21 +1,27 @@
1
- import { __decorate, __param } from 'tslib';
2
- import { Inject, ElementRef, Component, ChangeDetectionStrategy, InjectionToken, NgZone, ViewChild, ViewChildren, Input, HostListener, inject, ɵɵdefineInjectable, ɵɵinject, Injectable, Output, Directive, forwardRef, ContentChild, ChangeDetectorRef, TemplateRef, NgModule, NO_ERRORS_SCHEMA } from '@angular/core';
3
- import { typedFromEvent, tuiZonefree, TuiIdService, TUI_IS_IOS, EMPTY_QUERY, tuiZonefull, tuiPure, clamp, TUI_WINDOW_HEIGHT, TuiDestroyService, tuiDefaultProp, tuiRequiredSetter, TuiLetModule, TuiOverscrollModule } from '@taiga-ui/cdk';
4
- import { TUI_CLOSE_WORD, TUI_SCROLL_REF, tuiSlideInTop, tuiZonefulMap, TUI_ANIMATION_OPTIONS, tuiFadeIn, TuiButtonModule, TuiScrollbarModule } from '@taiga-ui/core';
1
+ import { __decorate } from 'tslib';
2
+ import * as i0 from '@angular/core';
3
+ import { InjectionToken, ElementRef, Component, ChangeDetectionStrategy, Inject, NgZone, forwardRef, Directive, Input, ViewChild, ViewChildren, HostListener, Injectable, ContentChild, Output, ChangeDetectorRef, TemplateRef, NgModule, NO_ERRORS_SCHEMA } from '@angular/core';
4
+ import * as i3 from '@taiga-ui/cdk';
5
+ import { typedFromEvent, tuiZonefree, TuiIdService, TUI_IS_IOS, clamp, tuiDefaultProp, TuiDestroyService, EMPTY_QUERY, tuiZonefull, tuiPure, TUI_WINDOW_HEIGHT, tuiRequiredSetter, TuiLetModule, TuiOverscrollModule } from '@taiga-ui/cdk';
6
+ import * as i1 from '@taiga-ui/core';
7
+ import { TUI_CLOSE_WORD, TUI_SCROLL_REF, tuiZonefulMap, tuiSlideInTop, TUI_ANIMATION_OPTIONS, tuiFadeIn, TuiButtonModule, TuiScrollbarModule } from '@taiga-ui/core';
5
8
  import { TUI_MORE_WORD } from '@taiga-ui/kit';
6
- import { merge, concat, zip, race, timer, Observable, BehaviorSubject, EMPTY, Subject } from 'rxjs';
7
9
  import { map, delay, switchMap, takeUntil, take, share, filter, debounceTime, mapTo, switchMapTo, startWith, distinctUntilChanged, withLatestFrom, throttleTime, ignoreElements, endWith } from 'rxjs/operators';
10
+ import * as i1$1 from 'rxjs';
11
+ import { merge, concat, zip, race, timer, BehaviorSubject, Observable, EMPTY, Subject } from 'rxjs';
12
+ import * as i2 from '@angular/common';
8
13
  import { DOCUMENT, CommonModule } from '@angular/common';
9
14
  import { WINDOW } from '@ng-web-apis/common';
15
+ import * as i5 from '@tinkoff/ng-polymorpheus';
10
16
  import { PolymorpheusTemplate, PolymorpheusModule } from '@tinkoff/ng-polymorpheus';
11
17
 
12
18
  // eslint-disable-next-line @typescript-eslint/naming-convention
13
19
  function iosScrollFactory(element, documentRef, ngZone) {
14
- const load$ = typedFromEvent(element, 'load', { capture: true });
15
- const touchstart$ = typedFromEvent(element, 'touchstart', { passive: true });
16
- const touchmove$ = typedFromEvent(documentRef, 'touchmove', { passive: true });
17
- const touchend$ = typedFromEvent(documentRef, 'touchend');
18
- const scroll$ = typedFromEvent(element, 'scroll').pipe(map(() => element.scrollTop));
20
+ const load$ = typedFromEvent(element, `load`, { capture: true });
21
+ const touchstart$ = typedFromEvent(element, `touchstart`, { passive: true });
22
+ const touchmove$ = typedFromEvent(documentRef, `touchmove`, { passive: true });
23
+ const touchend$ = typedFromEvent(documentRef, `touchend`);
24
+ const scroll$ = typedFromEvent(element, `scroll`).pipe(map(() => element.scrollTop));
19
25
  const result$ = merge(load$.pipe(delay(0), map(() => element.scrollTop)), touchstart$.pipe(switchMap(({ touches }) => {
20
26
  const { screenY } = touches[0];
21
27
  const { scrollTop } = element;
@@ -34,17 +40,21 @@ function processDragged(dragged$, scroll$) {
34
40
  }
35
41
  // eslint-disable-next-line @typescript-eslint/naming-convention
36
42
  function fakeSmoothScroll({ style }, offset) {
37
- style.transition = 'none';
43
+ style.transition = `none`;
38
44
  style.transform = `scaleX(-1) translate3d(0, ${offset}px, 0)`;
39
45
  setTimeout(() => {
40
- style.transition = '';
41
- style.transform = '';
46
+ style.transition = ``;
47
+ style.transform = ``;
42
48
  });
43
49
  }
44
50
 
45
- const TUI_SHEET_CLOSE = 'tui-sheet-close';
46
- const TUI_SHEET_ID = 'tui-sheet-id';
47
- let TuiSheetHeadingComponent = class TuiSheetHeadingComponent {
51
+ const TUI_SHEET = new InjectionToken(`[TUI_SHEET] Sheet main component`);
52
+ const TUI_SHEET_SCROLL = new InjectionToken(`Current scrollTop of a sheet`);
53
+ const TUI_SHEET_DRAGGED = new InjectionToken(`The sheet is being dragged`);
54
+
55
+ const TUI_SHEET_CLOSE = `tui-sheet-close`;
56
+ const TUI_SHEET_ID = `tui-sheet-id`;
57
+ class TuiSheetHeadingComponent {
48
58
  constructor(idService, elementRef, closeWord$) {
49
59
  this.idService = idService;
50
60
  this.elementRef = elementRef;
@@ -57,30 +67,28 @@ let TuiSheetHeadingComponent = class TuiSheetHeadingComponent {
57
67
  onClick() {
58
68
  this.elementRef.nativeElement.dispatchEvent(new CustomEvent(TUI_SHEET_CLOSE, { bubbles: true }));
59
69
  }
60
- };
61
- TuiSheetHeadingComponent.ctorParameters = () => [
62
- { type: TuiIdService, decorators: [{ type: Inject, args: [TuiIdService,] }] },
63
- { type: ElementRef, decorators: [{ type: Inject, args: [ElementRef,] }] },
64
- { type: Observable, decorators: [{ type: Inject, args: [TUI_CLOSE_WORD,] }] }
65
- ];
66
- TuiSheetHeadingComponent = __decorate([
67
- Component({
68
- selector: '[tuiSheetHeading]',
69
- template: "<button\n tuiIconButton\n size=\"xs\"\n appearance=\"icon\"\n icon=\"tuiIconCloseLarge\"\n class=\"t-close\"\n [title]=\"closeWord$ | async\"\n (click)=\"onClick()\"\n></button>\n<span [id]=\"id\">\n <ng-content></ng-content>\n</span>\n",
70
- changeDetection: ChangeDetectionStrategy.OnPush,
71
- styles: [":host{position:-webkit-sticky;position:sticky;top:0;z-index:1;min-height:2rem;box-sizing:border-box;margin:-1.25rem -1rem 0;padding:1.5rem 1rem 1rem;background:var(--tui-base-01);border-radius:.75rem .75rem 0 0;font:var(--tui-font-heading-6);box-shadow:inset 0 1px rgba(255,255,255,.25)}:host:after{content:'';position:absolute;top:100%;left:0;right:0;height:1px;background:var(--tui-base-03);opacity:0}:host :host-context(._stuck):after{opacity:1}.t-close{display:none;float:right;margin-right:-.25rem}:host-context(.t-wrapper_closeable) .t-close{display:block}"]
72
- }),
73
- __param(0, Inject(TuiIdService)),
74
- __param(1, Inject(ElementRef)),
75
- __param(2, Inject(TUI_CLOSE_WORD))
76
- ], TuiSheetHeadingComponent);
70
+ }
71
+ TuiSheetHeadingComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.16", ngImport: i0, type: TuiSheetHeadingComponent, deps: [{ token: TuiIdService }, { token: ElementRef }, { token: TUI_CLOSE_WORD }], target: i0.ɵɵFactoryTarget.Component });
72
+ TuiSheetHeadingComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "12.2.16", type: TuiSheetHeadingComponent, selector: "[tuiSheetHeading]", ngImport: i0, template: "<button\n tuiIconButton\n size=\"xs\"\n appearance=\"icon\"\n icon=\"tuiIconCloseLarge\"\n class=\"t-close\"\n [title]=\"closeWord$ | async\"\n (click)=\"onClick()\"\n></button>\n<span [id]=\"id\">\n <ng-content></ng-content>\n</span>\n", styles: [":host{position:-webkit-sticky;position:sticky;top:0;z-index:1;min-height:2rem;box-sizing:border-box;margin:-1.25rem -1rem 0;padding:1.5rem 1rem 1rem;background:var(--tui-base-01);border-radius:.75rem .75rem 0 0;font:var(--tui-font-heading-6);box-shadow:inset 0 1px rgba(255,255,255,.25)}:host:after{content:\"\";position:absolute;top:100%;left:0;right:0;height:1px;background:var(--tui-base-03);opacity:0}:host :host-context(._stuck):after{opacity:1}.t-close{display:none;float:right;margin-right:-.25rem}:host-context(.t-wrapper_closeable) .t-close{display:block}\n"], components: [{ type: i1.TuiButtonComponent, selector: "button[tuiButton], button[tuiIconButton], a[tuiButton], a[tuiIconButton]", inputs: ["appearance", "disabled", "icon", "iconRight", "shape", "showLoader", "size"] }], pipes: { "async": i2.AsyncPipe }, changeDetection: i0.ChangeDetectionStrategy.OnPush });
73
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.16", ngImport: i0, type: TuiSheetHeadingComponent, decorators: [{
74
+ type: Component,
75
+ args: [{
76
+ selector: `[tuiSheetHeading]`,
77
+ templateUrl: `sheet-heading.template.html`,
78
+ styleUrls: [`sheet-heading.style.less`],
79
+ changeDetection: ChangeDetectionStrategy.OnPush,
80
+ }]
81
+ }], ctorParameters: function () { return [{ type: i3.TuiIdService, decorators: [{
82
+ type: Inject,
83
+ args: [TuiIdService]
84
+ }] }, { type: i0.ElementRef, decorators: [{
85
+ type: Inject,
86
+ args: [ElementRef]
87
+ }] }, { type: i1$1.Observable, decorators: [{
88
+ type: Inject,
89
+ args: [TUI_CLOSE_WORD]
90
+ }] }]; } });
77
91
 
78
- const TUI_SHEET_SCROLL = new InjectionToken('Current scrollTop of a sheet');
79
- const TUI_SHEET_DRAGGED = new InjectionToken('The sheet is being dragged');
80
- /** @deprecated use option argument for each Sheet */
81
- const TUI_SHEET_OFFSET = new InjectionToken('Offset from the top at which the sheet stops', {
82
- factory: () => 16,
83
- });
84
92
  const TUI_SHEET_PROVIDERS = [
85
93
  {
86
94
  provide: TUI_SHEET_DRAGGED,
@@ -96,20 +104,146 @@ const TUI_SHEET_PROVIDERS = [
96
104
  provide: TUI_SCROLL_REF,
97
105
  useExisting: ElementRef,
98
106
  },
107
+ {
108
+ provide: TUI_SHEET,
109
+ useExisting: forwardRef(() => TuiSheetComponent),
110
+ },
99
111
  ];
100
112
  // eslint-disable-next-line @typescript-eslint/naming-convention
101
113
  function sheetDraggedFactory({ nativeElement, }) {
102
- return merge(typedFromEvent(nativeElement, 'touchstart', { passive: true }).pipe(mapTo(true)), typedFromEvent(nativeElement, 'touchend').pipe(mapTo(false)));
114
+ return merge(typedFromEvent(nativeElement, `touchstart`, { passive: true }).pipe(mapTo(true)), typedFromEvent(nativeElement, `touchend`).pipe(mapTo(false)));
103
115
  }
104
116
  // eslint-disable-next-line @typescript-eslint/naming-convention
105
117
  function sheetScrollFactory({ nativeElement }, ngZone, documentRef, isIos) {
106
118
  return isIos
107
119
  ? iosScrollFactory(nativeElement, documentRef, ngZone)
108
- : merge(typedFromEvent(nativeElement, 'scroll'), typedFromEvent(nativeElement, 'load', { capture: true })).pipe(map(() => nativeElement.scrollTop), tuiZonefree(ngZone), share());
120
+ : merge(typedFromEvent(nativeElement, `scroll`), typedFromEvent(nativeElement, `load`, { capture: true })).pipe(map(() => nativeElement.scrollTop), tuiZonefree(ngZone), share());
121
+ }
122
+
123
+ class TuiSheetBarComponent {
124
+ constructor(sheet, scroll$, ngZone) {
125
+ this.sheet = sheet;
126
+ this.scroll$ = scroll$;
127
+ this.ngZone = ngZone;
128
+ this.rotate$ = this.scroll$.pipe(tuiZonefulMap(y => clamp(10 - (y - this.stop) / 5, 0, 10), this.ngZone));
129
+ }
130
+ get stop() {
131
+ return this.sheet.stops[0] || 0;
132
+ }
133
+ }
134
+ TuiSheetBarComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.16", ngImport: i0, type: TuiSheetBarComponent, deps: [{ token: TUI_SHEET }, { token: TUI_SHEET_SCROLL }, { token: NgZone }], target: i0.ɵɵFactoryTarget.Component });
135
+ TuiSheetBarComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "12.2.16", type: TuiSheetBarComponent, selector: "tui-sheet-bar", ngImport: i0, template: "<ng-container *tuiLet=\"rotate$ | async as deg\">\n <div\n style=\"transform: rotate(-{{ deg }}deg)\"\n class=\"t-bar\"\n ></div>\n <ng-content *ngIf=\"deg\"></ng-content>\n <div\n style=\"transform: rotate({{ deg }}deg)\"\n class=\"t-bar\"\n ></div>\n</ng-container>\n", styles: [":host{transition-property:border-radius;transition-duration:.3s;transition-duration:var(--tui-duration, .3s);transition-timing-function:ease-in-out;position:-webkit-sticky;position:sticky;top:0;z-index:2;display:flex;height:1.25rem;align-items:center;justify-content:center;opacity:.3}.t-bar{content:\"\";height:.25rem;width:1rem;background:var(--tui-base-09);pointer-events:none}:host-context(._ios:not(._dragged)) .t-bar{transition-property:transform;transition-duration:.3s;transition-duration:var(--tui-duration, .3s);transition-timing-function:ease-in-out}.t-bar:first-child{border-radius:1rem 0 0 1rem;transform-origin:top right}.t-bar:last-child{border-radius:0 1rem 1rem 0;transform-origin:top left}\n"], directives: [{ type: i3.TuiLetDirective, selector: "[tuiLet]", inputs: ["tuiLet"] }, { type: i2.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }], pipes: { "async": i2.AsyncPipe }, changeDetection: i0.ChangeDetectionStrategy.OnPush });
136
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.16", ngImport: i0, type: TuiSheetBarComponent, decorators: [{
137
+ type: Component,
138
+ args: [{
139
+ selector: `tui-sheet-bar`,
140
+ templateUrl: `sheet-bar.template.html`,
141
+ styleUrls: [`sheet-bar.style.less`],
142
+ changeDetection: ChangeDetectionStrategy.OnPush,
143
+ }]
144
+ }], ctorParameters: function () { return [{ type: undefined, decorators: [{
145
+ type: Inject,
146
+ args: [TUI_SHEET]
147
+ }] }, { type: i1$1.Observable, decorators: [{
148
+ type: Inject,
149
+ args: [TUI_SHEET_SCROLL]
150
+ }] }, { type: i0.NgZone, decorators: [{
151
+ type: Inject,
152
+ args: [NgZone]
153
+ }] }]; } });
154
+
155
+ // So that borders get rounded when image is visible for at least 10px
156
+ const OFFSET$1 = 10;
157
+ // @dynamic
158
+ class TuiSheetTopDirective {
159
+ constructor(scroll$, component, windowRef) {
160
+ this.scroll$ = scroll$;
161
+ this.component = component;
162
+ this.windowRef = windowRef;
163
+ this.stop = 0;
164
+ this.transform$ = this.scroll$.pipe(map(y => `translateY(${this.getY(y)}%) scaleX(-1)`));
165
+ this.rounded$ = this.scroll$.pipe(map(y => y < this.stop + OFFSET$1));
166
+ this.clickthrough$ = this.scroll$.pipe(map(y => !!Math.round(this.getY(y))));
167
+ }
168
+ getY(scrollTop) {
169
+ const value = scrollTop - this.stop;
170
+ const total = this.windowRef.innerHeight - this.component.item.offset - this.stop;
171
+ return this.stop && clamp(100 - (value / total) * 100, 0, 100);
172
+ }
173
+ }
174
+ TuiSheetTopDirective.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.16", ngImport: i0, type: TuiSheetTopDirective, deps: [{ token: TUI_SHEET_SCROLL }, { token: TUI_SHEET }, { token: WINDOW }], target: i0.ɵɵFactoryTarget.Directive });
175
+ TuiSheetTopDirective.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "12.0.0", version: "12.2.16", type: TuiSheetTopDirective, selector: "[tuiSheetTop]", inputs: { stop: ["tuiSheetTop", "stop"] }, host: { listeners: { "$.style.transform": "transform$", "$.class._rounded": "rounded$", "$.class._clickthrough": "clickthrough$" }, properties: { "$.style.transform": "transform$", "$.class._rounded": "rounded$", "$.class._clickthrough": "clickthrough$" } }, ngImport: i0 });
176
+ __decorate([
177
+ tuiDefaultProp()
178
+ ], TuiSheetTopDirective.prototype, "stop", void 0);
179
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.16", ngImport: i0, type: TuiSheetTopDirective, decorators: [{
180
+ type: Directive,
181
+ args: [{
182
+ selector: `[tuiSheetTop]`,
183
+ host: {
184
+ '[$.style.transform]': `transform$`,
185
+ '($.style.transform)': `transform$`,
186
+ '[$.class._rounded]': `rounded$`,
187
+ '($.class._rounded)': `rounded$`,
188
+ '[$.class._clickthrough]': `clickthrough$`,
189
+ '($.class._clickthrough)': `clickthrough$`,
190
+ },
191
+ }]
192
+ }], ctorParameters: function () { return [{ type: i1$1.Observable, decorators: [{
193
+ type: Inject,
194
+ args: [TUI_SHEET_SCROLL]
195
+ }] }, { type: undefined, decorators: [{
196
+ type: Inject,
197
+ args: [TUI_SHEET]
198
+ }] }, { type: Window, decorators: [{
199
+ type: Inject,
200
+ args: [WINDOW]
201
+ }] }]; }, propDecorators: { stop: [{
202
+ type: Input,
203
+ args: [`tuiSheetTop`]
204
+ }] } });
205
+
206
+ class TuiSheetStopDirective {
207
+ constructor(elementRef, destroy$, dragged$, scroll$, { nativeElement }) {
208
+ scroll$
209
+ .pipe(map(y => Math.floor(y) > elementRef.nativeElement.offsetTop), distinctUntilChanged(), withLatestFrom(dragged$), map(([above, dragged]) => !above && !dragged), filter(Boolean), throttleTime(100), takeUntil(destroy$))
210
+ .subscribe(() => {
211
+ nativeElement.style.overflow = `hidden`;
212
+ nativeElement.classList.remove(`_stuck`); // iOS
213
+ nativeElement.scrollTop = elementRef.nativeElement.offsetTop;
214
+ setTimeout(() => {
215
+ nativeElement.style.overflow = ``;
216
+ }, 100);
217
+ });
218
+ }
109
219
  }
220
+ TuiSheetStopDirective.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.16", ngImport: i0, type: TuiSheetStopDirective, deps: [{ token: ElementRef }, { token: TuiDestroyService }, { token: TUI_SHEET_DRAGGED }, { token: TUI_SHEET_SCROLL }, { token: TUI_SCROLL_REF }], target: i0.ɵɵFactoryTarget.Directive });
221
+ TuiSheetStopDirective.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "12.0.0", version: "12.2.16", type: TuiSheetStopDirective, selector: "[tuiSheetStop]", providers: [TuiDestroyService], ngImport: i0 });
222
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.16", ngImport: i0, type: TuiSheetStopDirective, decorators: [{
223
+ type: Directive,
224
+ args: [{
225
+ selector: `[tuiSheetStop]`,
226
+ providers: [TuiDestroyService],
227
+ }]
228
+ }], ctorParameters: function () { return [{ type: i0.ElementRef, decorators: [{
229
+ type: Inject,
230
+ args: [ElementRef]
231
+ }] }, { type: i1$1.Observable, decorators: [{
232
+ type: Inject,
233
+ args: [TuiDestroyService]
234
+ }] }, { type: i1$1.Observable, decorators: [{
235
+ type: Inject,
236
+ args: [TUI_SHEET_DRAGGED]
237
+ }] }, { type: i1$1.Observable, decorators: [{
238
+ type: Inject,
239
+ args: [TUI_SHEET_SCROLL]
240
+ }] }, { type: i0.ElementRef, decorators: [{
241
+ type: Inject,
242
+ args: [TUI_SCROLL_REF]
243
+ }] }]; } });
110
244
 
111
245
  // @dynamic
112
- let TuiSheetComponent = class TuiSheetComponent {
246
+ class TuiSheetComponent {
113
247
  constructor(scroll$, elementRef, ngZone, isIos, moreWord$) {
114
248
  this.scroll$ = scroll$;
115
249
  this.elementRef = elementRef;
@@ -117,7 +251,7 @@ let TuiSheetComponent = class TuiSheetComponent {
117
251
  this.isIos = isIos;
118
252
  this.moreWord$ = moreWord$;
119
253
  this.stopsRefs = EMPTY_QUERY;
120
- this.id = '';
254
+ this.id = ``;
121
255
  this.stuck$ = this.scroll$.pipe(map(y => Math.floor(y) > this.contentTop));
122
256
  }
123
257
  get stops() {
@@ -144,7 +278,7 @@ let TuiSheetComponent = class TuiSheetComponent {
144
278
  if (this.isIos) {
145
279
  fakeSmoothScroll(nativeElement, top - nativeElement.scrollTop - 16);
146
280
  }
147
- nativeElement.scrollTo({ top, behavior: 'smooth' });
281
+ nativeElement.scrollTo({ top, behavior: `smooth` });
148
282
  }
149
283
  close() {
150
284
  if (this.context.closeable) {
@@ -164,90 +298,66 @@ let TuiSheetComponent = class TuiSheetComponent {
164
298
  .toArray()
165
299
  .map(({ nativeElement }) => nativeElement.offsetTop + nativeElement.clientHeight);
166
300
  }
167
- };
168
- TuiSheetComponent.ctorParameters = () => [
169
- { type: Observable, decorators: [{ type: Inject, args: [TUI_SHEET_SCROLL,] }] },
170
- { type: ElementRef, decorators: [{ type: Inject, args: [ElementRef,] }] },
171
- { type: NgZone, decorators: [{ type: Inject, args: [NgZone,] }] },
172
- { type: Boolean, decorators: [{ type: Inject, args: [TUI_IS_IOS,] }] },
173
- { type: Observable, decorators: [{ type: Inject, args: [TUI_MORE_WORD,] }] }
174
- ];
175
- __decorate([
176
- ViewChild('sheet')
177
- ], TuiSheetComponent.prototype, "sheet", void 0);
178
- __decorate([
179
- ViewChild('content')
180
- ], TuiSheetComponent.prototype, "content", void 0);
181
- __decorate([
182
- ViewChildren('stops')
183
- ], TuiSheetComponent.prototype, "stopsRefs", void 0);
184
- __decorate([
185
- Input()
186
- ], TuiSheetComponent.prototype, "item", void 0);
301
+ }
302
+ TuiSheetComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.16", ngImport: i0, type: TuiSheetComponent, deps: [{ token: TUI_SHEET_SCROLL }, { token: ElementRef }, { token: NgZone }, { token: TUI_IS_IOS }, { token: TUI_MORE_WORD }], target: i0.ɵɵFactoryTarget.Component });
303
+ TuiSheetComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "12.2.16", type: TuiSheetComponent, selector: "tui-sheet", inputs: { item: "item" }, host: { attributes: { "role": "dialog" }, listeners: { "$.class._stuck": "stuck$", "tui-sheet-id": "onId($event.detail)" }, properties: { "attr.aria-labelledby": "id", "class._ios": "isIos", "$.class._stuck": "stuck$" } }, providers: TUI_SHEET_PROVIDERS, viewQueries: [{ propertyName: "sheet", first: true, predicate: ["sheet"], descendants: true }, { propertyName: "content", first: true, predicate: ["content"], descendants: true }, { propertyName: "stopsRefs", predicate: ["stops"], descendants: true }], ngImport: i0, template: "<div\n class=\"t-bumpers\"\n (click)=\"close()\"\n>\n <div\n *ngFor=\"let stop of item.stops\"\n #stops\n class=\"t-bumper\"\n [style.marginTop]=\"stop\"\n ></div>\n</div>\n<div\n #sheet\n class=\"t-wrapper\"\n [class.t-wrapper_shadow]=\"!item.image\"\n>\n <header\n *ngIf=\"item.image\"\n class=\"t-top\"\n [tuiSheetTop]=\"imageStop\"\n >\n <img\n *polymorpheusOutlet=\"item.image as src; context: context\"\n alt=\"\"\n class=\"t-image\"\n [src]=\"src\"\n />\n </header>\n <section\n #content\n tuiSheetStop\n class=\"t-sheet\"\n >\n <div class=\"t-bar\"></div>\n <tui-sheet-bar>\n <button\n class=\"t-button\"\n [title]=\"moreWord$ | async\"\n (click)=\"scrollTo(stops[1])\"\n ></button>\n </tui-sheet-bar>\n <div class=\"t-content\">\n <h2\n *polymorpheusOutlet=\"item.content as text; context: context\"\n tuiSheetHeading\n class=\"t-heading\"\n >\n {{ text }}\n </h2>\n </div>\n </section>\n</div>\n", styles: [":host{scrollbar-width:none;-ms-overflow-style:none;position:absolute;top:0;left:0;bottom:0;right:0;transition-property:transform;transition-duration:.3s;transition-duration:var(--tui-duration, .3s);transition-timing-function:ease-in-out;top:auto;border-radius:.75rem .75rem 0 0;overflow-y:auto;overflow-x:hidden;-webkit-scroll-snap-type:y mandatory;-ms-scroll-snap-type:y mandatory;scroll-snap-type:y mandatory;box-shadow:0 4rem var(--tui-base-01);padding-right:1rem;margin-left:-1rem;transform:scaleX(-1);-webkit-clip-path:inset(0 1rem 0 0 round .75rem .75rem 0 0);clip-path:inset(0 1rem 0 0 round .75rem .75rem 0 0)}:host::-webkit-scrollbar,:host::-webkit-scrollbar-thumb{background:transparent;width:0;height:0}:host._stuck{-webkit-scroll-snap-type:none;-ms-scroll-snap-type:none;scroll-snap-type:none}.t-bumpers{display:flex;height:100%}:host-context(.t-wrapper_closeable) .t-bumpers{scroll-snap-stop:always;scroll-snap-align:start;scroll-margin:-1px}.t-bumper{scroll-snap-stop:always;scroll-snap-align:start;height:1rem;width:1rem}.t-wrapper{border-radius:inherit;pointer-events:auto;scroll-snap-stop:always;scroll-snap-align:start}.t-wrapper_shadow{box-shadow:0 .25rem 1.5rem rgba(0,0,0,.12)}.t-top{box-shadow:0 .25rem 1.5rem rgba(0,0,0,.12);position:-webkit-sticky;position:sticky;top:0;pointer-events:auto;border-radius:.8rem .8rem 0 0;transform:scaleX(-1);overflow:hidden}.t-top._clickthrough{pointer-events:none}:host-context(._overlay:not(._visible)) .t-top{transition-property:transform;transition-duration:.3s;transition-duration:var(--tui-duration, .3s);transition-timing-function:ease-in-out;transform:scaleX(-1)!important}.t-image{display:block;width:100%}.t-sheet{position:relative;border-radius:inherit;scroll-snap-stop:always;scroll-snap-align:start;transform:scaleX(-1);box-shadow:0 4rem var(--tui-base-01)}.t-top:not(._rounded)~.t-sheet .t-bar{border-radius:0}.t-bar{transition-property:border-radius;transition-duration:.3s;transition-duration:var(--tui-duration, .3s);transition-timing-function:ease-in-out;position:-webkit-sticky;position:sticky;top:0;z-index:1;height:1.5rem;margin-bottom:-1.5rem;border-radius:inherit;background:var(--tui-elevation-01);box-shadow:inset 0 1px rgba(255,255,255,.25)}.t-button{position:absolute;top:0;height:1.5rem;width:3rem;padding:0;border:0;opacity:0}.t-content{padding:1rem;margin-top:-1rem;border-radius:inherit;background:var(--tui-elevation-01)}.t-heading{padding-bottom:.5rem;background:var(--tui-elevation-01)}\n"], components: [{ type: TuiSheetBarComponent, selector: "tui-sheet-bar" }, { type: TuiSheetHeadingComponent, selector: "[tuiSheetHeading]" }], directives: [{ type: i2.NgForOf, selector: "[ngFor][ngForOf]", inputs: ["ngForOf", "ngForTrackBy", "ngForTemplate"] }, { type: i2.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { type: TuiSheetTopDirective, selector: "[tuiSheetTop]", inputs: ["tuiSheetTop"] }, { type: i5.PolymorpheusOutletDirective, selector: "[polymorpheusOutlet]", inputs: ["polymorpheusOutlet", "polymorpheusOutletContext"] }, { type: TuiSheetStopDirective, selector: "[tuiSheetStop]" }], pipes: { "async": i2.AsyncPipe }, animations: [tuiSlideInTop], changeDetection: i0.ChangeDetectionStrategy.OnPush });
187
304
  __decorate([
188
305
  tuiPure
189
306
  ], TuiSheetComponent.prototype, "context", null);
190
- __decorate([
191
- HostListener(TUI_SHEET_ID, ['$event.detail'])
192
- ], TuiSheetComponent.prototype, "onId", null);
193
307
  __decorate([
194
308
  tuiPure
195
309
  ], TuiSheetComponent.prototype, "getStops", null);
196
- TuiSheetComponent = __decorate([
197
- Component({
198
- selector: 'tui-sheet',
199
- template: "<div\n class=\"t-bumpers\"\n (click)=\"close()\"\n>\n <div\n *ngFor=\"let stop of item.stops\"\n #stops\n class=\"t-bumper\"\n [style.marginTop]=\"stop\"\n ></div>\n</div>\n<div\n #sheet\n class=\"t-wrapper\"\n [class.t-wrapper_shadow]=\"!item.image\"\n>\n <header\n *ngIf=\"item.image\"\n polymorpheus-outlet\n class=\"t-top\"\n [tuiSheetTop]=\"imageStop\"\n [content]=\"item.image\"\n [context]=\"context\"\n >\n <ng-template let-content>\n <img\n alt=\"\"\n class=\"t-image\"\n [src]=\"content\"\n />\n </ng-template>\n </header>\n <section\n #content\n tuiSheetStop\n class=\"t-sheet\"\n >\n <div class=\"t-bar\"></div>\n <tui-sheet-bar>\n <button\n class=\"t-button\"\n [title]=\"moreWord$ | async\"\n (click)=\"scrollTo(stops[1])\"\n ></button>\n </tui-sheet-bar>\n <div\n polymorpheus-outlet\n class=\"t-content\"\n [content]=\"item.content\"\n [context]=\"context\"\n >\n <ng-template let-content>\n <h2\n tuiSheetHeading\n class=\"t-heading\"\n >\n {{ content }}\n </h2>\n </ng-template>\n </div>\n </section>\n</div>\n",
200
- providers: TUI_SHEET_PROVIDERS,
201
- animations: [tuiSlideInTop],
202
- changeDetection: ChangeDetectionStrategy.OnPush,
203
- host: {
204
- role: 'dialog',
205
- '[attr.aria-labelledby]': 'id',
206
- '[class._ios]': 'isIos',
207
- // '[class._stuck]': 'true', // Initially disable snapping for Firefox
208
- '[$.class._stuck]': 'stuck$',
209
- '($.class._stuck)': 'stuck$',
210
- },
211
- styles: [":host{scrollbar-width:none;-ms-overflow-style:none;position:absolute;left:0;bottom:0;right:0;transition-property:transform;transition-duration:var(--tui-duration,300ms);transition-timing-function:ease-in-out;top:auto;border-radius:.75rem .75rem 0 0;overflow-y:auto;overflow-x:hidden;-webkit-scroll-snap-type:y mandatory;-ms-scroll-snap-type:y mandatory;scroll-snap-type:y mandatory;box-shadow:0 4rem var(--tui-base-01);padding-right:1rem;margin-left:-1rem;transform:scaleX(-1);-webkit-clip-path:inset(0 1rem 0 0 round .75rem .75rem 0 0);clip-path:inset(0 1rem 0 0 round .75rem .75rem 0 0)}:host::-webkit-scrollbar,:host::-webkit-scrollbar-thumb{background:0 0;width:0;height:0}:host._stuck{-webkit-scroll-snap-type:none;-ms-scroll-snap-type:none;scroll-snap-type:none}.t-bumpers{display:flex;height:100%}:host-context(.t-wrapper_closeable) .t-bumpers{scroll-snap-stop:always;scroll-snap-align:start;scroll-margin:-1px}.t-bumper{scroll-snap-stop:always;scroll-snap-align:start;height:1rem;width:1rem}.t-wrapper{border-radius:inherit;pointer-events:auto;scroll-snap-stop:always;scroll-snap-align:start}.t-wrapper_shadow{box-shadow:0 .25rem 1.5rem rgba(0,0,0,.12)}.t-top{box-shadow:0 .25rem 1.5rem rgba(0,0,0,.12);position:-webkit-sticky;position:sticky;top:0;pointer-events:auto;border-radius:.8rem .8rem 0 0;transform:scaleX(-1);overflow:hidden}.t-top._clickthrough{pointer-events:none}:host-context(._overlay:not(._visible)) .t-top{transition-property:transform;transition-duration:var(--tui-duration,300ms);transition-timing-function:ease-in-out;transform:scaleX(-1)!important}.t-image{display:block;width:100%}.t-sheet{position:relative;border-radius:inherit;scroll-snap-stop:always;scroll-snap-align:start;transform:scaleX(-1);box-shadow:0 4rem var(--tui-base-01)}.t-top:not(._rounded)~.t-sheet .t-bar{border-radius:0}.t-bar{transition-property:border-radius;transition-duration:var(--tui-duration,300ms);transition-timing-function:ease-in-out;position:-webkit-sticky;position:sticky;top:0;z-index:1;height:1.5rem;margin-bottom:-1.5rem;border-radius:inherit;background:var(--tui-elevation-01);box-shadow:inset 0 1px rgba(255,255,255,.25)}.t-button{position:absolute;top:0;height:1.5rem;width:3rem;padding:0;border:0;opacity:0}.t-content{padding:1rem;margin-top:-1rem;border-radius:inherit;background:var(--tui-elevation-01)}.t-heading{padding-bottom:.5rem;background:var(--tui-elevation-01)}"]
212
- }),
213
- __param(0, Inject(TUI_SHEET_SCROLL)),
214
- __param(1, Inject(ElementRef)),
215
- __param(2, Inject(NgZone)),
216
- __param(3, Inject(TUI_IS_IOS)),
217
- __param(4, Inject(TUI_MORE_WORD))
218
- ], TuiSheetComponent);
219
-
220
- let TuiSheetBarComponent = class TuiSheetBarComponent {
221
- constructor(sheet, scroll$, ngZone) {
222
- this.sheet = sheet;
223
- this.scroll$ = scroll$;
224
- this.ngZone = ngZone;
225
- this.rotate$ = this.scroll$.pipe(tuiZonefulMap(y => clamp(10 - (y - this.stop) / 5, 0, 10), this.ngZone));
226
- }
227
- get stop() {
228
- var _a;
229
- return (_a = this.sheet.stops[0]) !== null && _a !== void 0 ? _a : 0;
230
- }
231
- };
232
- TuiSheetBarComponent.ctorParameters = () => [
233
- { type: TuiSheetComponent, decorators: [{ type: Inject, args: [TuiSheetComponent,] }] },
234
- { type: Observable, decorators: [{ type: Inject, args: [TUI_SHEET_SCROLL,] }] },
235
- { type: NgZone, decorators: [{ type: Inject, args: [NgZone,] }] }
236
- ];
237
- TuiSheetBarComponent = __decorate([
238
- Component({
239
- selector: 'tui-sheet-bar',
240
- template: "<ng-container *tuiLet=\"rotate$ | async as deg\">\n <div\n style=\"transform: rotate(-{{ deg }}deg)\"\n class=\"t-bar\"\n ></div>\n <ng-content *ngIf=\"deg\"></ng-content>\n <div\n style=\"transform: rotate({{ deg }}deg)\"\n class=\"t-bar\"\n ></div>\n</ng-container>\n",
241
- changeDetection: ChangeDetectionStrategy.OnPush,
242
- styles: [":host{transition-property:border-radius;transition-duration:var(--tui-duration,300ms);transition-timing-function:ease-in-out;position:-webkit-sticky;position:sticky;top:0;z-index:2;display:flex;height:1.25rem;align-items:center;justify-content:center;opacity:.3}.t-bar{content:'';height:.25rem;width:1rem;background:var(--tui-base-09);pointer-events:none}:host-context(._ios:not(._dragged)) .t-bar{transition-property:transform;transition-duration:var(--tui-duration,300ms);transition-timing-function:ease-in-out}.t-bar:first-child{border-radius:1rem 0 0 1rem;transform-origin:top right}.t-bar:last-child{border-radius:0 1rem 1rem 0;transform-origin:top left}"]
243
- }),
244
- __param(0, Inject(TuiSheetComponent)),
245
- __param(1, Inject(TUI_SHEET_SCROLL)),
246
- __param(2, Inject(NgZone))
247
- ], TuiSheetBarComponent);
310
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.16", ngImport: i0, type: TuiSheetComponent, decorators: [{
311
+ type: Component,
312
+ args: [{
313
+ selector: `tui-sheet`,
314
+ templateUrl: `sheet.template.html`,
315
+ styleUrls: [`sheet.style.less`],
316
+ providers: TUI_SHEET_PROVIDERS,
317
+ animations: [tuiSlideInTop],
318
+ changeDetection: ChangeDetectionStrategy.OnPush,
319
+ host: {
320
+ role: `dialog`,
321
+ '[attr.aria-labelledby]': `id`,
322
+ '[class._ios]': `isIos`,
323
+ // '[class._stuck]': 'true', // Initially disable snapping for Firefox
324
+ '[$.class._stuck]': `stuck$`,
325
+ '($.class._stuck)': `stuck$`,
326
+ },
327
+ }]
328
+ }], ctorParameters: function () { return [{ type: i1$1.Observable, decorators: [{
329
+ type: Inject,
330
+ args: [TUI_SHEET_SCROLL]
331
+ }] }, { type: i0.ElementRef, decorators: [{
332
+ type: Inject,
333
+ args: [ElementRef]
334
+ }] }, { type: i0.NgZone, decorators: [{
335
+ type: Inject,
336
+ args: [NgZone]
337
+ }] }, { type: undefined, decorators: [{
338
+ type: Inject,
339
+ args: [TUI_IS_IOS]
340
+ }] }, { type: i1$1.Observable, decorators: [{
341
+ type: Inject,
342
+ args: [TUI_MORE_WORD]
343
+ }] }]; }, propDecorators: { sheet: [{
344
+ type: ViewChild,
345
+ args: [`sheet`]
346
+ }], content: [{
347
+ type: ViewChild,
348
+ args: [`content`]
349
+ }], stopsRefs: [{
350
+ type: ViewChildren,
351
+ args: [`stops`]
352
+ }], item: [{
353
+ type: Input
354
+ }], context: [], onId: [{
355
+ type: HostListener,
356
+ args: [TUI_SHEET_ID, [`$event.detail`]]
357
+ }], getStops: [] } });
248
358
 
249
359
  const TUI_SHEET_DEFAULT_OPTIONS = {
250
- image: '',
360
+ image: ``,
251
361
  imageSlide: true,
252
362
  stops: [],
253
363
  initial: 0,
@@ -255,11 +365,11 @@ const TUI_SHEET_DEFAULT_OPTIONS = {
255
365
  closeable: true,
256
366
  overlay: false,
257
367
  };
258
- const TUI_SHEET_OPTIONS = new InjectionToken('Default parameters for sheet component', {
259
- factory: () => (Object.assign(Object.assign({}, TUI_SHEET_DEFAULT_OPTIONS), { offset: inject(TUI_SHEET_OFFSET) })),
368
+ const TUI_SHEET_OPTIONS = new InjectionToken(`Default parameters for sheet component`, {
369
+ factory: () => (Object.assign({}, TUI_SHEET_DEFAULT_OPTIONS)),
260
370
  });
261
371
 
262
- let TuiSheetService = class TuiSheetService {
372
+ class TuiSheetService {
263
373
  constructor(options) {
264
374
  this.options = options;
265
375
  this.sheets$ = new BehaviorSubject([]);
@@ -279,173 +389,23 @@ let TuiSheetService = class TuiSheetService {
279
389
  };
280
390
  });
281
391
  }
282
- };
283
- TuiSheetService.ctorParameters = () => [
284
- { type: undefined, decorators: [{ type: Inject, args: [TUI_SHEET_OPTIONS,] }] }
285
- ];
286
- TuiSheetService.ɵprov = ɵɵdefineInjectable({ factory: function TuiSheetService_Factory() { return new TuiSheetService(ɵɵinject(TUI_SHEET_OPTIONS)); }, token: TuiSheetService, providedIn: "root" });
287
- TuiSheetService = __decorate([
288
- Injectable({
289
- providedIn: 'root',
290
- }),
291
- __param(0, Inject(TUI_SHEET_OPTIONS))
292
- ], TuiSheetService);
293
-
294
- // @dynamic
295
- let TuiSheetsHostComponent = class TuiSheetsHostComponent {
296
- constructor(options, service, height$) {
297
- this.options = options;
298
- this.service = service;
299
- this.height$ = height$;
300
- }
301
- close({ closeable, $implicit }) {
302
- if (closeable) {
303
- $implicit.complete();
304
- }
305
- }
306
- };
307
- TuiSheetsHostComponent.ctorParameters = () => [
308
- { type: undefined, decorators: [{ type: Inject, args: [TUI_ANIMATION_OPTIONS,] }] },
309
- { type: TuiSheetService, decorators: [{ type: Inject, args: [TuiSheetService,] }] },
310
- { type: Observable, decorators: [{ type: Inject, args: [TUI_WINDOW_HEIGHT,] }] }
311
- ];
312
- TuiSheetsHostComponent = __decorate([
313
- Component({
314
- selector: 'tui-sheets-host',
315
- template: "<ng-container *ngIf=\"service.sheets$ | async as items\">\n <div\n *ngFor=\"let item of items\"\n class=\"t-wrapper\"\n [@tuiSlideInTop]=\"options\"\n [@tuiFadeIn]=\"options\"\n [tuiSheetWrapper]=\"item.offset\"\n [class.t-wrapper_overlay]=\"item.overlay\"\n [class.t-wrapper_closeable]=\"item.closeable\"\n (click.self)=\"close(item)\"\n >\n <tui-sheet\n tuiScrollRef\n tuiOverscroll=\"all\"\n [style.height.px]=\"((height$ | async) || 0) - item.offset\"\n [item]=\"item\"\n (close)=\"close(item)\"\n ></tui-sheet>\n </div>\n <div\n class=\"t-overlay\"\n (click)=\"close(items[0])\"\n ></div>\n</ng-container>\n",
316
- changeDetection: ChangeDetectionStrategy.OnPush,
317
- animations: [tuiSlideInTop, tuiFadeIn],
318
- styles: [":host{position:-webkit-sticky;position:sticky;bottom:0;display:block;height:0}.t-overlay{transition-property:opacity;transition-duration:var(--tui-duration,300ms);transition-timing-function:ease-in-out;position:fixed;top:0;left:0;width:100%;z-index:-1;height:100%;background:#000;opacity:.001;pointer-events:none}._overlay~.t-overlay,.t-wrapper_overlay~.t-overlay{opacity:.8;pointer-events:auto;touch-action:none}.t-wrapper{position:absolute;bottom:0;z-index:0;width:100%;height:100vh;overflow:hidden}.t-wrapper._overlay,.t-wrapper._visible,.t-wrapper_overlay{overflow:visible}"]
319
- }),
320
- __param(0, Inject(TUI_ANIMATION_OPTIONS)),
321
- __param(1, Inject(TuiSheetService)),
322
- __param(2, Inject(TUI_WINDOW_HEIGHT))
323
- ], TuiSheetsHostComponent);
324
-
325
- // @dynamic
326
- let TuiSheetCloseDirective = class TuiSheetCloseDirective {
327
- constructor(ngZone, dragged$, scroll$, windowRef, elementRef, sheet) {
328
- this.ngZone = ngZone;
329
- this.dragged$ = dragged$;
330
- this.scroll$ = scroll$;
331
- this.windowRef = windowRef;
332
- this.elementRef = elementRef;
333
- this.sheet = sheet;
334
- this.close = merge(typedFromEvent(this.elementRef.nativeElement, TUI_SHEET_CLOSE), this.dragged$.pipe(startWith(false), switchMap(dragged => dragged
335
- ? EMPTY
336
- : this.scroll$.pipe(startWith(this.elementRef.nativeElement.scrollTop))), filter(y => { var _a; return ((_a = this.sheet.item) === null || _a === void 0 ? void 0 : _a.closeable) && this.shouldClose(y); }), distinctUntilChanged(), tuiZonefull(this.ngZone)));
337
- }
338
- shouldClose(scrollTop) {
339
- const height = Math.min(this.windowRef.innerHeight, this.elementRef.nativeElement.scrollHeight - this.windowRef.innerHeight);
340
- const min = Math.min(height, this.sheet.stops[0] || Infinity);
341
- return scrollTop < min / 2;
342
- }
343
- };
344
- TuiSheetCloseDirective.ctorParameters = () => [
345
- { type: NgZone, decorators: [{ type: Inject, args: [NgZone,] }] },
346
- { type: Observable, decorators: [{ type: Inject, args: [TUI_SHEET_DRAGGED,] }] },
347
- { type: Observable, decorators: [{ type: Inject, args: [TUI_SHEET_SCROLL,] }] },
348
- { type: Window, decorators: [{ type: Inject, args: [WINDOW,] }] },
349
- { type: ElementRef, decorators: [{ type: Inject, args: [ElementRef,] }] },
350
- { type: TuiSheetComponent, decorators: [{ type: Inject, args: [TuiSheetComponent,] }] }
351
- ];
352
- __decorate([
353
- Output()
354
- ], TuiSheetCloseDirective.prototype, "close", void 0);
355
- TuiSheetCloseDirective = __decorate([
356
- Directive({
357
- selector: 'tui-sheet[close]',
358
- }),
359
- __param(0, Inject(NgZone)),
360
- __param(1, Inject(TUI_SHEET_DRAGGED)),
361
- __param(2, Inject(TUI_SHEET_SCROLL)),
362
- __param(3, Inject(WINDOW)),
363
- __param(4, Inject(ElementRef)),
364
- __param(5, Inject(TuiSheetComponent))
365
- ], TuiSheetCloseDirective);
366
-
367
- let TuiSheetStopDirective = class TuiSheetStopDirective {
368
- constructor(elementRef, destroy$, dragged$, scroll$, { nativeElement }) {
369
- scroll$
370
- .pipe(map(y => Math.floor(y) > elementRef.nativeElement.offsetTop), distinctUntilChanged(), withLatestFrom(dragged$), map(([above, dragged]) => !above && !dragged), filter(Boolean), throttleTime(100), takeUntil(destroy$))
371
- .subscribe(() => {
372
- nativeElement.style.overflow = 'hidden';
373
- nativeElement.classList.remove('_stuck'); // iOS
374
- nativeElement.scrollTop = elementRef.nativeElement.offsetTop;
375
- setTimeout(() => {
376
- nativeElement.style.overflow = '';
377
- }, 100);
378
- });
379
- }
380
- };
381
- TuiSheetStopDirective.ctorParameters = () => [
382
- { type: ElementRef, decorators: [{ type: Inject, args: [ElementRef,] }] },
383
- { type: Observable, decorators: [{ type: Inject, args: [TuiDestroyService,] }] },
384
- { type: Observable, decorators: [{ type: Inject, args: [TUI_SHEET_DRAGGED,] }] },
385
- { type: Observable, decorators: [{ type: Inject, args: [TUI_SHEET_SCROLL,] }] },
386
- { type: ElementRef, decorators: [{ type: Inject, args: [TUI_SCROLL_REF,] }] }
387
- ];
388
- TuiSheetStopDirective = __decorate([
389
- Directive({
390
- selector: '[tuiSheetStop]',
391
- providers: [TuiDestroyService],
392
- }),
393
- __param(0, Inject(ElementRef)),
394
- __param(1, Inject(TuiDestroyService)),
395
- __param(2, Inject(TUI_SHEET_DRAGGED)),
396
- __param(3, Inject(TUI_SHEET_SCROLL)),
397
- __param(4, Inject(TUI_SCROLL_REF))
398
- ], TuiSheetStopDirective);
399
-
400
- // So that borders get rounded when image is visible for at least 10px
401
- const OFFSET = 10;
402
- // @dynamic
403
- let TuiSheetTopDirective = class TuiSheetTopDirective {
404
- constructor(scroll$, component, windowRef) {
405
- this.scroll$ = scroll$;
406
- this.component = component;
407
- this.windowRef = windowRef;
408
- this.stop = 0;
409
- this.transform$ = this.scroll$.pipe(map(y => `translateY(${this.getY(y)}%) scaleX(-1)`));
410
- this.rounded$ = this.scroll$.pipe(map(y => y < this.stop + OFFSET));
411
- this.clickthrough$ = this.scroll$.pipe(map(y => !!Math.round(this.getY(y))));
412
- }
413
- getY(scrollTop) {
414
- const value = scrollTop - this.stop;
415
- const total = this.windowRef.innerHeight - this.component.item.offset - this.stop;
416
- return this.stop && clamp(100 - (value / total) * 100, 0, 100);
417
- }
418
- };
419
- TuiSheetTopDirective.ctorParameters = () => [
420
- { type: Observable, decorators: [{ type: Inject, args: [TUI_SHEET_SCROLL,] }] },
421
- { type: TuiSheetComponent, decorators: [{ type: Inject, args: [forwardRef(() => TuiSheetComponent),] }] },
422
- { type: Window, decorators: [{ type: Inject, args: [WINDOW,] }] }
423
- ];
424
- __decorate([
425
- Input('tuiSheetTop'),
426
- tuiDefaultProp()
427
- ], TuiSheetTopDirective.prototype, "stop", void 0);
428
- TuiSheetTopDirective = __decorate([
429
- Directive({
430
- selector: '[tuiSheetTop]',
431
- host: {
432
- '[$.style.transform]': 'transform$',
433
- '($.style.transform)': 'transform$',
434
- '[$.class._rounded]': 'rounded$',
435
- '($.class._rounded)': 'rounded$',
436
- '[$.class._clickthrough]': 'clickthrough$',
437
- '($.class._clickthrough)': 'clickthrough$',
438
- },
439
- }),
440
- __param(0, Inject(TUI_SHEET_SCROLL)),
441
- __param(1, Inject(forwardRef(() => TuiSheetComponent))),
442
- __param(2, Inject(WINDOW))
443
- ], TuiSheetTopDirective);
392
+ }
393
+ TuiSheetService.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.16", ngImport: i0, type: TuiSheetService, deps: [{ token: TUI_SHEET_OPTIONS }], target: i0.ɵɵFactoryTarget.Injectable });
394
+ TuiSheetService.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "12.2.16", ngImport: i0, type: TuiSheetService, providedIn: `root` });
395
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.16", ngImport: i0, type: TuiSheetService, decorators: [{
396
+ type: Injectable,
397
+ args: [{
398
+ providedIn: `root`,
399
+ }]
400
+ }], ctorParameters: function () { return [{ type: undefined, decorators: [{
401
+ type: Inject,
402
+ args: [TUI_SHEET_OPTIONS]
403
+ }] }]; } });
444
404
 
445
405
  // Safety offset for shadow
446
- const OFFSET$1 = 16;
406
+ const OFFSET = 16;
447
407
  // @dynamic
448
- let TuiSheetWrapperDirective = class TuiSheetWrapperDirective {
408
+ class TuiSheetWrapperDirective {
449
409
  constructor(windowRef) {
450
410
  this.windowRef = windowRef;
451
411
  this.tuiSheetWrapper = 16;
@@ -463,8 +423,9 @@ let TuiSheetWrapperDirective = class TuiSheetWrapperDirective {
463
423
  }
464
424
  getHeight(value) {
465
425
  var _a;
466
- return ((_a = this.sheet) === null || _a === void 0 ? void 0 : _a.context.overlay) ? null
467
- : clamp(this.withImage(value) + OFFSET$1, OFFSET$1, this.windowRef.innerHeight);
426
+ return ((_a = this.sheet) === null || _a === void 0 ? void 0 : _a.context.overlay)
427
+ ? null
428
+ : clamp(this.withImage(value) + OFFSET, OFFSET, this.windowRef.innerHeight);
468
429
  }
469
430
  withImage(value) {
470
431
  var _a;
@@ -472,22 +433,9 @@ let TuiSheetWrapperDirective = class TuiSheetWrapperDirective {
472
433
  ? value
473
434
  : value - this.sheet.imageHeight;
474
435
  }
475
- };
476
- TuiSheetWrapperDirective.ctorParameters = () => [
477
- { type: Window, decorators: [{ type: Inject, args: [WINDOW,] }] }
478
- ];
479
- __decorate([
480
- ContentChild(TuiSheetComponent)
481
- ], TuiSheetWrapperDirective.prototype, "sheet", void 0);
482
- __decorate([
483
- ContentChild(TuiSheetComponent, { read: TUI_SHEET_DRAGGED })
484
- ], TuiSheetWrapperDirective.prototype, "dragged$", void 0);
485
- __decorate([
486
- ContentChild(TuiSheetComponent, { read: TUI_SHEET_SCROLL })
487
- ], TuiSheetWrapperDirective.prototype, "scroll$", void 0);
488
- __decorate([
489
- Input()
490
- ], TuiSheetWrapperDirective.prototype, "tuiSheetWrapper", void 0);
436
+ }
437
+ TuiSheetWrapperDirective.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.16", ngImport: i0, type: TuiSheetWrapperDirective, deps: [{ token: WINDOW }], target: i0.ɵɵFactoryTarget.Directive });
438
+ TuiSheetWrapperDirective.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "12.0.0", version: "12.2.16", type: TuiSheetWrapperDirective, selector: "[tuiSheetWrapper]", inputs: { tuiSheetWrapper: "tuiSheetWrapper" }, host: { listeners: { "$.class._overlay": "overlay$", "$.class._visible": "visible$", "$.style.height.px": "height$" }, properties: { "$.class._overlay": "overlay$", "$.class._visible": "visible$", "$.style.height.px": "height$" } }, queries: [{ propertyName: "sheet", first: true, predicate: TuiSheetComponent, descendants: true }, { propertyName: "dragged$", first: true, predicate: TuiSheetComponent, descendants: true, read: TUI_SHEET_DRAGGED }, { propertyName: "scroll$", first: true, predicate: TuiSheetComponent, descendants: true, read: TUI_SHEET_SCROLL }], ngImport: i0 });
491
439
  __decorate([
492
440
  tuiPure
493
441
  ], TuiSheetWrapperDirective.prototype, "overlay$", null);
@@ -497,22 +445,119 @@ __decorate([
497
445
  __decorate([
498
446
  tuiPure
499
447
  ], TuiSheetWrapperDirective.prototype, "height$", null);
500
- TuiSheetWrapperDirective = __decorate([
501
- Directive({
502
- selector: '[tuiSheetWrapper]',
503
- host: {
504
- '[$.class._overlay]': 'overlay$',
505
- '($.class._overlay)': 'overlay$',
506
- '[$.class._visible]': 'visible$',
507
- '($.class._visible)': 'visible$',
508
- '[$.style.height.px]': 'height$',
509
- '($.style.height.px)': 'height$',
510
- },
511
- }),
512
- __param(0, Inject(WINDOW))
513
- ], TuiSheetWrapperDirective);
448
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.16", ngImport: i0, type: TuiSheetWrapperDirective, decorators: [{
449
+ type: Directive,
450
+ args: [{
451
+ selector: `[tuiSheetWrapper]`,
452
+ host: {
453
+ '[$.class._overlay]': `overlay$`,
454
+ '($.class._overlay)': `overlay$`,
455
+ '[$.class._visible]': `visible$`,
456
+ '($.class._visible)': `visible$`,
457
+ '[$.style.height.px]': `height$`,
458
+ '($.style.height.px)': `height$`,
459
+ },
460
+ }]
461
+ }], ctorParameters: function () { return [{ type: Window, decorators: [{
462
+ type: Inject,
463
+ args: [WINDOW]
464
+ }] }]; }, propDecorators: { sheet: [{
465
+ type: ContentChild,
466
+ args: [TuiSheetComponent]
467
+ }], dragged$: [{
468
+ type: ContentChild,
469
+ args: [TuiSheetComponent, { read: TUI_SHEET_DRAGGED }]
470
+ }], scroll$: [{
471
+ type: ContentChild,
472
+ args: [TuiSheetComponent, { read: TUI_SHEET_SCROLL }]
473
+ }], tuiSheetWrapper: [{
474
+ type: Input
475
+ }], overlay$: [], visible$: [], height$: [] } });
476
+
477
+ // @dynamic
478
+ class TuiSheetCloseDirective {
479
+ constructor(ngZone, dragged$, scroll$, windowRef, elementRef, sheet) {
480
+ this.ngZone = ngZone;
481
+ this.dragged$ = dragged$;
482
+ this.scroll$ = scroll$;
483
+ this.windowRef = windowRef;
484
+ this.elementRef = elementRef;
485
+ this.sheet = sheet;
486
+ this.close = merge(typedFromEvent(this.elementRef.nativeElement, TUI_SHEET_CLOSE), this.dragged$.pipe(startWith(false), switchMap(dragged => dragged
487
+ ? EMPTY
488
+ : this.scroll$.pipe(startWith(this.elementRef.nativeElement.scrollTop))), filter(y => { var _a; return ((_a = this.sheet.item) === null || _a === void 0 ? void 0 : _a.closeable) && this.shouldClose(y); }), distinctUntilChanged(), tuiZonefull(this.ngZone)));
489
+ }
490
+ shouldClose(scrollTop) {
491
+ const height = Math.min(this.windowRef.innerHeight, this.elementRef.nativeElement.scrollHeight - this.windowRef.innerHeight);
492
+ const min = Math.min(height, this.sheet.stops[0] || Infinity);
493
+ return scrollTop < min / 2;
494
+ }
495
+ }
496
+ TuiSheetCloseDirective.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.16", ngImport: i0, type: TuiSheetCloseDirective, deps: [{ token: NgZone }, { token: TUI_SHEET_DRAGGED }, { token: TUI_SHEET_SCROLL }, { token: WINDOW }, { token: ElementRef }, { token: TuiSheetComponent }], target: i0.ɵɵFactoryTarget.Directive });
497
+ TuiSheetCloseDirective.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "12.0.0", version: "12.2.16", type: TuiSheetCloseDirective, selector: "tui-sheet[close]", outputs: { close: "close" }, ngImport: i0 });
498
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.16", ngImport: i0, type: TuiSheetCloseDirective, decorators: [{
499
+ type: Directive,
500
+ args: [{
501
+ selector: `tui-sheet[close]`,
502
+ }]
503
+ }], ctorParameters: function () { return [{ type: i0.NgZone, decorators: [{
504
+ type: Inject,
505
+ args: [NgZone]
506
+ }] }, { type: i1$1.Observable, decorators: [{
507
+ type: Inject,
508
+ args: [TUI_SHEET_DRAGGED]
509
+ }] }, { type: i1$1.Observable, decorators: [{
510
+ type: Inject,
511
+ args: [TUI_SHEET_SCROLL]
512
+ }] }, { type: Window, decorators: [{
513
+ type: Inject,
514
+ args: [WINDOW]
515
+ }] }, { type: i0.ElementRef, decorators: [{
516
+ type: Inject,
517
+ args: [ElementRef]
518
+ }] }, { type: TuiSheetComponent, decorators: [{
519
+ type: Inject,
520
+ args: [TuiSheetComponent]
521
+ }] }]; }, propDecorators: { close: [{
522
+ type: Output
523
+ }] } });
514
524
 
515
- let TuiSheetDirective = class TuiSheetDirective extends PolymorpheusTemplate {
525
+ // @dynamic
526
+ class TuiSheetsHostComponent {
527
+ constructor(options, service, height$) {
528
+ this.options = options;
529
+ this.service = service;
530
+ this.height$ = height$;
531
+ }
532
+ close({ closeable, $implicit }) {
533
+ if (closeable) {
534
+ $implicit.complete();
535
+ }
536
+ }
537
+ }
538
+ TuiSheetsHostComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.16", ngImport: i0, type: TuiSheetsHostComponent, deps: [{ token: TUI_ANIMATION_OPTIONS }, { token: TuiSheetService }, { token: TUI_WINDOW_HEIGHT }], target: i0.ɵɵFactoryTarget.Component });
539
+ TuiSheetsHostComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "12.2.16", type: TuiSheetsHostComponent, selector: "tui-sheets-host", ngImport: i0, template: "<ng-container *ngIf=\"service.sheets$ | async as items\">\n <div\n *ngFor=\"let item of items\"\n class=\"t-wrapper\"\n [@tuiSlideInTop]=\"options\"\n [@tuiFadeIn]=\"options\"\n [tuiSheetWrapper]=\"item.offset\"\n [class.t-wrapper_overlay]=\"item.overlay\"\n [class.t-wrapper_closeable]=\"item.closeable\"\n (click.self)=\"close(item)\"\n >\n <tui-sheet\n tuiScrollRef\n tuiOverscroll=\"all\"\n [style.height.px]=\"((height$ | async) || 0) - item.offset\"\n [item]=\"item\"\n (close)=\"close(item)\"\n ></tui-sheet>\n </div>\n <div\n class=\"t-overlay\"\n (click)=\"close(items[0])\"\n ></div>\n</ng-container>\n", styles: [":host{position:-webkit-sticky;position:sticky;bottom:0;display:block;height:0}.t-overlay{transition-property:opacity;transition-duration:.3s;transition-duration:var(--tui-duration, .3s);transition-timing-function:ease-in-out;position:fixed;top:0;left:0;width:100%;z-index:-1;height:100%;background:#000;opacity:.001;pointer-events:none}._overlay~.t-overlay,.t-wrapper_overlay~.t-overlay{opacity:.8;pointer-events:auto;touch-action:none}.t-wrapper{position:absolute;bottom:0;z-index:0;width:100%;height:100vh;overflow:hidden}.t-wrapper_overlay,.t-wrapper._visible,.t-wrapper._overlay{overflow:visible}\n"], components: [{ type: TuiSheetComponent, selector: "tui-sheet", inputs: ["item"] }], directives: [{ type: i2.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { type: i2.NgForOf, selector: "[ngFor][ngForOf]", inputs: ["ngForOf", "ngForTrackBy", "ngForTemplate"] }, { type: TuiSheetWrapperDirective, selector: "[tuiSheetWrapper]", inputs: ["tuiSheetWrapper"] }, { type: TuiSheetCloseDirective, selector: "tui-sheet[close]", outputs: ["close"] }, { type: i1.TuiScrollRefDirective, selector: "[tuiScrollRef]" }, { type: i3.TuiOverscrollDirective, selector: "[tuiOverscroll]", inputs: ["tuiOverscroll"] }], pipes: { "async": i2.AsyncPipe }, animations: [tuiSlideInTop, tuiFadeIn], changeDetection: i0.ChangeDetectionStrategy.OnPush });
540
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.16", ngImport: i0, type: TuiSheetsHostComponent, decorators: [{
541
+ type: Component,
542
+ args: [{
543
+ selector: `tui-sheets-host`,
544
+ templateUrl: `sheets-host.template.html`,
545
+ styleUrls: [`sheets-host.style.less`],
546
+ changeDetection: ChangeDetectionStrategy.OnPush,
547
+ animations: [tuiSlideInTop, tuiFadeIn],
548
+ }]
549
+ }], ctorParameters: function () { return [{ type: undefined, decorators: [{
550
+ type: Inject,
551
+ args: [TUI_ANIMATION_OPTIONS]
552
+ }] }, { type: TuiSheetService, decorators: [{
553
+ type: Inject,
554
+ args: [TuiSheetService]
555
+ }] }, { type: i1$1.Observable, decorators: [{
556
+ type: Inject,
557
+ args: [TUI_WINDOW_HEIGHT]
558
+ }] }]; } });
559
+
560
+ class TuiSheetDirective extends PolymorpheusTemplate {
516
561
  constructor(changeDetectorRef, templateRef, service) {
517
562
  super(templateRef, changeDetectorRef);
518
563
  this.service = service;
@@ -527,68 +572,101 @@ let TuiSheetDirective = class TuiSheetDirective extends PolymorpheusTemplate {
527
572
  set tuiSheet(open) {
528
573
  this.open$.next(open);
529
574
  }
530
- };
531
- TuiSheetDirective.ctorParameters = () => [
532
- { type: ChangeDetectorRef, decorators: [{ type: Inject, args: [ChangeDetectorRef,] }] },
533
- { type: TemplateRef, decorators: [{ type: Inject, args: [TemplateRef,] }] },
534
- { type: TuiSheetService, decorators: [{ type: Inject, args: [TuiSheetService,] }] }
535
- ];
575
+ }
576
+ TuiSheetDirective.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.16", ngImport: i0, type: TuiSheetDirective, deps: [{ token: ChangeDetectorRef }, { token: TemplateRef }, { token: TuiSheetService }], target: i0.ɵɵFactoryTarget.Directive });
577
+ TuiSheetDirective.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "12.0.0", version: "12.2.16", type: TuiSheetDirective, selector: "ng-template[tuiSheet]", inputs: { options: ["tuiSheetOptions", "options"], tuiSheet: "tuiSheet" }, outputs: { tuiSheetChange: "tuiSheetChange" }, usesInheritance: true, ngImport: i0 });
536
578
  __decorate([
537
- Input('tuiSheetOptions'),
538
579
  tuiDefaultProp()
539
580
  ], TuiSheetDirective.prototype, "options", void 0);
540
581
  __decorate([
541
- Input(),
542
582
  tuiRequiredSetter()
543
583
  ], TuiSheetDirective.prototype, "tuiSheet", null);
544
- __decorate([
545
- Output()
546
- ], TuiSheetDirective.prototype, "tuiSheetChange", void 0);
547
- TuiSheetDirective = __decorate([
548
- Directive({
549
- selector: 'ng-template[tuiSheet]',
550
- }),
551
- __param(0, Inject(ChangeDetectorRef)),
552
- __param(1, Inject(TemplateRef)),
553
- __param(2, Inject(TuiSheetService))
554
- ], TuiSheetDirective);
584
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.16", ngImport: i0, type: TuiSheetDirective, decorators: [{
585
+ type: Directive,
586
+ args: [{
587
+ selector: `ng-template[tuiSheet]`,
588
+ }]
589
+ }], ctorParameters: function () { return [{ type: i0.ChangeDetectorRef, decorators: [{
590
+ type: Inject,
591
+ args: [ChangeDetectorRef]
592
+ }] }, { type: i0.TemplateRef, decorators: [{
593
+ type: Inject,
594
+ args: [TemplateRef]
595
+ }] }, { type: TuiSheetService, decorators: [{
596
+ type: Inject,
597
+ args: [TuiSheetService]
598
+ }] }]; }, propDecorators: { options: [{
599
+ type: Input,
600
+ args: [`tuiSheetOptions`]
601
+ }], tuiSheet: [{
602
+ type: Input
603
+ }], tuiSheetChange: [{
604
+ type: Output
605
+ }] } });
555
606
 
556
- let TuiSheetModule = class TuiSheetModule {
557
- };
558
- TuiSheetModule = __decorate([
559
- NgModule({
560
- imports: [
607
+ class TuiSheetModule {
608
+ }
609
+ TuiSheetModule.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.16", ngImport: i0, type: TuiSheetModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule });
610
+ TuiSheetModule.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "12.0.0", version: "12.2.16", ngImport: i0, type: TuiSheetModule, declarations: [TuiSheetsHostComponent,
611
+ TuiSheetComponent,
612
+ TuiSheetBarComponent,
613
+ TuiSheetHeadingComponent,
614
+ TuiSheetTopDirective,
615
+ TuiSheetDirective,
616
+ TuiSheetWrapperDirective,
617
+ TuiSheetCloseDirective,
618
+ TuiSheetStopDirective], imports: [CommonModule,
619
+ PolymorpheusModule,
620
+ TuiLetModule,
621
+ TuiButtonModule,
622
+ TuiOverscrollModule,
623
+ TuiScrollbarModule], exports: [TuiSheetsHostComponent,
624
+ TuiSheetComponent,
625
+ TuiSheetHeadingComponent,
626
+ TuiSheetDirective] });
627
+ TuiSheetModule.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "12.2.16", ngImport: i0, type: TuiSheetModule, imports: [[
561
628
  CommonModule,
562
629
  PolymorpheusModule,
563
630
  TuiLetModule,
564
631
  TuiButtonModule,
565
632
  TuiOverscrollModule,
566
633
  TuiScrollbarModule,
567
- ],
568
- declarations: [
569
- TuiSheetsHostComponent,
570
- TuiSheetComponent,
571
- TuiSheetBarComponent,
572
- TuiSheetHeadingComponent,
573
- TuiSheetTopDirective,
574
- TuiSheetDirective,
575
- TuiSheetWrapperDirective,
576
- TuiSheetCloseDirective,
577
- TuiSheetStopDirective,
578
- ],
579
- exports: [
580
- TuiSheetsHostComponent,
581
- TuiSheetComponent,
582
- TuiSheetHeadingComponent,
583
- TuiSheetDirective,
584
- ],
585
- schemas: [NO_ERRORS_SCHEMA],
586
- })
587
- ], TuiSheetModule);
634
+ ]] });
635
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.16", ngImport: i0, type: TuiSheetModule, decorators: [{
636
+ type: NgModule,
637
+ args: [{
638
+ imports: [
639
+ CommonModule,
640
+ PolymorpheusModule,
641
+ TuiLetModule,
642
+ TuiButtonModule,
643
+ TuiOverscrollModule,
644
+ TuiScrollbarModule,
645
+ ],
646
+ declarations: [
647
+ TuiSheetsHostComponent,
648
+ TuiSheetComponent,
649
+ TuiSheetBarComponent,
650
+ TuiSheetHeadingComponent,
651
+ TuiSheetTopDirective,
652
+ TuiSheetDirective,
653
+ TuiSheetWrapperDirective,
654
+ TuiSheetCloseDirective,
655
+ TuiSheetStopDirective,
656
+ ],
657
+ exports: [
658
+ TuiSheetsHostComponent,
659
+ TuiSheetComponent,
660
+ TuiSheetHeadingComponent,
661
+ TuiSheetDirective,
662
+ ],
663
+ schemas: [NO_ERRORS_SCHEMA],
664
+ }]
665
+ }] });
588
666
 
589
667
  /**
590
668
  * Generated bundle index. Do not edit.
591
669
  */
592
670
 
593
- export { TUI_SHEET_CLOSE, TUI_SHEET_DEFAULT_OPTIONS, TUI_SHEET_DRAGGED, TUI_SHEET_ID, TUI_SHEET_OFFSET, TUI_SHEET_OPTIONS, TUI_SHEET_PROVIDERS, TUI_SHEET_SCROLL, TuiSheetBarComponent, TuiSheetCloseDirective, TuiSheetComponent, TuiSheetDirective, TuiSheetHeadingComponent, TuiSheetModule, TuiSheetService, TuiSheetStopDirective, TuiSheetTopDirective, TuiSheetWrapperDirective, TuiSheetsHostComponent, fakeSmoothScroll, iosScrollFactory, processDragged, sheetDraggedFactory, sheetScrollFactory };
671
+ export { TUI_SHEET_CLOSE, TUI_SHEET_DEFAULT_OPTIONS, TUI_SHEET_ID, TUI_SHEET_OPTIONS, TUI_SHEET_PROVIDERS, TuiSheetBarComponent, TuiSheetCloseDirective, TuiSheetComponent, TuiSheetDirective, TuiSheetHeadingComponent, TuiSheetModule, TuiSheetService, TuiSheetStopDirective, TuiSheetTopDirective, TuiSheetWrapperDirective, TuiSheetsHostComponent, fakeSmoothScroll, iosScrollFactory, processDragged, sheetDraggedFactory, sheetScrollFactory };
594
672
  //# sourceMappingURL=taiga-ui-addon-mobile-components-sheet.js.map