@taiga-ui/addon-mobile 2.59.1 → 3.0.0-rc.1

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 (509) 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 +534 -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 +402 -293
  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 +450 -337
  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 +875 -698
  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 -266
  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 -266
  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 +9 -254
  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 +419 -308
  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 +118 -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 +121 -338
  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 +434 -319
  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 +403 -287
  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 -283
  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 +7 -3
  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/mobile-calendar.providers.d.ts +1 -2
  48. package/components/mobile-calendar/package.json +2 -5
  49. package/components/mobile-calendar/taiga-ui-addon-mobile-components-mobile-calendar.d.ts +1 -0
  50. package/components/mobile-calendar-dialog/mobile-calendar-dialog.component.d.ts +3 -0
  51. package/components/mobile-calendar-dialog/mobile-calendar-dialog.module.d.ts +6 -2
  52. package/components/mobile-calendar-dialog/package.json +2 -5
  53. package/components/mobile-calendar-dialog/taiga-ui-addon-mobile-components-mobile-calendar-dialog.d.ts +1 -0
  54. package/components/mobile-dialog/mobile-dialog.component.d.ts +3 -0
  55. package/components/mobile-dialog/mobile-dialog.module.d.ts +9 -0
  56. package/components/mobile-dialog/mobile-dialog.service.d.ts +4 -1
  57. package/components/mobile-dialog/package.json +2 -5
  58. package/components/mobile-dialog/taiga-ui-addon-mobile-components-mobile-dialog.d.ts +1 -0
  59. package/components/package.json +2 -5
  60. package/components/pull-to-refresh/loader-android/loader-android.component.d.ts +3 -0
  61. package/components/pull-to-refresh/loader-ios/loader-ios.component.d.ts +3 -0
  62. package/components/pull-to-refresh/package.json +2 -5
  63. package/components/pull-to-refresh/pull-to-refresh.component.d.ts +3 -0
  64. package/components/pull-to-refresh/pull-to-refresh.module.d.ts +10 -0
  65. package/components/pull-to-refresh/pull-to-refresh.providers.d.ts +1 -2
  66. package/components/pull-to-refresh/taiga-ui-addon-mobile-components-pull-to-refresh.d.ts +1 -0
  67. package/components/sheet/components/sheet/sheet.component.d.ts +5 -2
  68. package/components/sheet/components/sheet/sheet.providers.d.ts +1 -8
  69. package/components/sheet/components/sheet-bar/sheet-bar.component.d.ts +5 -2
  70. package/components/sheet/components/sheet-heading/sheet-heading.component.d.ts +3 -0
  71. package/components/sheet/components/sheets-host/sheets-host.component.d.ts +3 -0
  72. package/components/sheet/directives/sheet-close/sheet-close.directive.d.ts +3 -0
  73. package/components/sheet/directives/sheet-stop/sheet-stop.directive.d.ts +3 -0
  74. package/components/sheet/directives/sheet-top/sheet-top.directive.d.ts +5 -2
  75. package/components/sheet/directives/sheet-wrapper/sheet-wrapper.directive.d.ts +3 -0
  76. package/components/sheet/package.json +2 -5
  77. package/components/sheet/sheet-options.d.ts +1 -1
  78. package/components/sheet/sheet-tokens.d.ts +5 -0
  79. package/components/sheet/sheet.d.ts +4 -0
  80. package/components/sheet/sheet.directive.d.ts +3 -0
  81. package/components/sheet/sheet.module.d.ts +17 -0
  82. package/components/sheet/sheet.service.d.ts +3 -0
  83. package/components/sheet/taiga-ui-addon-mobile-components-sheet.d.ts +1 -0
  84. package/components/taiga-ui-addon-mobile-components.d.ts +1 -0
  85. package/components/theme-android/package.json +2 -5
  86. package/components/theme-android/taiga-ui-addon-mobile-components-theme-android.d.ts +1 -0
  87. package/components/theme-android/theme-android.component.d.ts +3 -0
  88. package/components/theme-android/theme-android.module.d.ts +5 -0
  89. package/components/theme-ios/package.json +2 -5
  90. package/components/theme-ios/taiga-ui-addon-mobile-components-theme-ios.d.ts +1 -0
  91. package/components/theme-ios/theme-ios.component.d.ts +3 -0
  92. package/components/theme-ios/theme-ios.module.d.ts +5 -0
  93. package/const/package.json +2 -5
  94. package/const/taiga-ui-addon-mobile-const.d.ts +1 -0
  95. package/directives/elastic-sticky/elastic-sticky.directive.d.ts +3 -0
  96. package/directives/elastic-sticky/elastic-sticky.module.d.ts +5 -0
  97. package/directives/elastic-sticky/elastic-sticky.service.d.ts +3 -0
  98. package/directives/elastic-sticky/package.json +2 -5
  99. package/directives/elastic-sticky/taiga-ui-addon-mobile-directives-elastic-sticky.d.ts +1 -0
  100. package/directives/mobile-tabs/mobile-tabs.component.d.ts +3 -0
  101. package/directives/mobile-tabs/mobile-tabs.directive.d.ts +3 -0
  102. package/directives/mobile-tabs/mobile-tabs.module.d.ts +6 -0
  103. package/directives/mobile-tabs/package.json +2 -5
  104. package/directives/mobile-tabs/taiga-ui-addon-mobile-directives-mobile-tabs.d.ts +1 -0
  105. package/directives/package.json +2 -5
  106. package/directives/ripple/package.json +2 -5
  107. package/directives/ripple/ripple-styles.component.d.ts +3 -0
  108. package/directives/ripple/ripple.directive.d.ts +3 -0
  109. package/directives/ripple/ripple.module.d.ts +6 -0
  110. package/directives/ripple/ripple.providers.d.ts +1 -3
  111. package/directives/ripple/taiga-ui-addon-mobile-directives-ripple.d.ts +1 -1
  112. package/directives/sidebar/package.json +2 -5
  113. package/directives/sidebar/sidebar.component.d.ts +3 -0
  114. package/directives/sidebar/sidebar.directive.d.ts +7 -4
  115. package/directives/sidebar/sidebar.module.d.ts +8 -0
  116. package/directives/sidebar/taiga-ui-addon-mobile-directives-sidebar.d.ts +1 -0
  117. package/directives/taiga-ui-addon-mobile-directives.d.ts +1 -0
  118. package/directives/touchable/package.json +2 -5
  119. package/directives/touchable/taiga-ui-addon-mobile-directives-touchable.d.ts +1 -0
  120. package/directives/touchable/touchable.directive.d.ts +6 -3
  121. package/directives/touchable/touchable.module.d.ts +5 -0
  122. package/esm2015/components/index.js +1 -1
  123. package/esm2015/components/mobile-calendar/index.js +1 -1
  124. package/esm2015/components/mobile-calendar/mobile-calendar.component.js +78 -59
  125. package/esm2015/components/mobile-calendar/mobile-calendar.const.js +1 -1
  126. package/esm2015/components/mobile-calendar/mobile-calendar.module.js +34 -13
  127. package/esm2015/components/mobile-calendar/mobile-calendar.providers.js +7 -9
  128. package/esm2015/components/mobile-calendar/mobile-calendar.strategy.js +1 -1
  129. package/esm2015/components/mobile-calendar/taiga-ui-addon-mobile-components-mobile-calendar.js +1 -1
  130. package/esm2015/components/mobile-calendar-dialog/index.js +1 -1
  131. package/esm2015/components/mobile-calendar-dialog/mobile-calendar-dialog.component.js +19 -17
  132. package/esm2015/components/mobile-calendar-dialog/mobile-calendar-dialog.module.js +27 -21
  133. package/esm2015/components/mobile-calendar-dialog/taiga-ui-addon-mobile-components-mobile-calendar-dialog.js +1 -1
  134. package/esm2015/components/mobile-dialog/index.js +2 -1
  135. package/esm2015/components/mobile-dialog/mobile-dialog-options.js +2 -1
  136. package/esm2015/components/mobile-dialog/mobile-dialog.component.js +28 -23
  137. package/esm2015/components/mobile-dialog/mobile-dialog.module.js +17 -21
  138. package/esm2015/components/mobile-dialog/mobile-dialog.service.js +11 -12
  139. package/esm2015/components/mobile-dialog/taiga-ui-addon-mobile-components-mobile-dialog.js +1 -1
  140. package/esm2015/components/pull-to-refresh/index.js +1 -1
  141. package/esm2015/components/pull-to-refresh/loader-android/loader-android.component.js +21 -19
  142. package/esm2015/components/pull-to-refresh/loader-ios/loader-ios.component.js +19 -16
  143. package/esm2015/components/pull-to-refresh/pull-to-refresh.component.js +31 -24
  144. package/esm2015/components/pull-to-refresh/pull-to-refresh.module.js +21 -16
  145. package/esm2015/components/pull-to-refresh/pull-to-refresh.providers.js +15 -14
  146. package/esm2015/components/pull-to-refresh/taiga-ui-addon-mobile-components-pull-to-refresh.js +1 -1
  147. package/esm2015/components/sheet/components/sheet/sheet.component.js +66 -57
  148. package/esm2015/components/sheet/components/sheet/sheet.providers.js +17 -21
  149. package/esm2015/components/sheet/components/sheet-bar/sheet-bar.component.js +31 -28
  150. package/esm2015/components/sheet/components/sheet-heading/sheet-heading.component.js +29 -23
  151. package/esm2015/components/sheet/components/sheets-host/sheets-host.component.js +33 -24
  152. package/esm2015/components/sheet/directives/sheet-close/sheet-close.directive.js +38 -32
  153. package/esm2015/components/sheet/directives/sheet-stop/sheet-stop.directive.js +30 -25
  154. package/esm2015/components/sheet/directives/sheet-top/sheet-top.directive.js +38 -34
  155. package/esm2015/components/sheet/directives/sheet-wrapper/sheet-wrapper.directive.js +40 -39
  156. package/esm2015/components/sheet/index.js +2 -1
  157. package/esm2015/components/sheet/ios.hacks.js +7 -7
  158. package/esm2015/components/sheet/sheet-options.js +3 -4
  159. package/esm2015/components/sheet/sheet-tokens.js +5 -0
  160. package/esm2015/components/sheet/sheet.directive.js +30 -23
  161. package/esm2015/components/sheet/sheet.js +2 -1
  162. package/esm2015/components/sheet/sheet.module.js +55 -29
  163. package/esm2015/components/sheet/sheet.service.js +14 -16
  164. package/esm2015/components/sheet/taiga-ui-addon-mobile-components-sheet.js +1 -1
  165. package/esm2015/components/taiga-ui-addon-mobile-components.js +1 -1
  166. package/esm2015/components/theme-android/index.js +1 -1
  167. package/esm2015/components/theme-android/taiga-ui-addon-mobile-components-theme-android.js +1 -1
  168. package/esm2015/components/theme-android/theme-android.component.js +16 -15
  169. package/esm2015/components/theme-android/theme-android.module.js +14 -11
  170. package/esm2015/components/theme-ios/index.js +1 -1
  171. package/esm2015/components/theme-ios/taiga-ui-addon-mobile-components-theme-ios.js +1 -1
  172. package/esm2015/components/theme-ios/theme-ios.component.js +16 -15
  173. package/esm2015/components/theme-ios/theme-ios.module.js +14 -11
  174. package/esm2015/const/index.js +1 -1
  175. package/esm2015/const/mobile-alert-options.js +1 -1
  176. package/esm2015/const/taiga-ui-addon-mobile-const.js +1 -1
  177. package/esm2015/directives/elastic-sticky/elastic-sticky.directive.js +20 -19
  178. package/esm2015/directives/elastic-sticky/elastic-sticky.module.js +14 -11
  179. package/esm2015/directives/elastic-sticky/elastic-sticky.service.js +32 -29
  180. package/esm2015/directives/elastic-sticky/index.js +1 -1
  181. package/esm2015/directives/elastic-sticky/taiga-ui-addon-mobile-directives-elastic-sticky.js +1 -1
  182. package/esm2015/directives/index.js +1 -1
  183. package/esm2015/directives/mobile-tabs/index.js +1 -1
  184. package/esm2015/directives/mobile-tabs/mobile-tabs.component.js +14 -12
  185. package/esm2015/directives/mobile-tabs/mobile-tabs.directive.js +36 -28
  186. package/esm2015/directives/mobile-tabs/mobile-tabs.module.js +15 -12
  187. package/esm2015/directives/mobile-tabs/taiga-ui-addon-mobile-directives-mobile-tabs.js +1 -1
  188. package/esm2015/directives/ripple/index.js +1 -1
  189. package/esm2015/directives/ripple/ripple-styles.component.js +14 -12
  190. package/esm2015/directives/ripple/ripple.directive.js +40 -33
  191. package/esm2015/directives/ripple/ripple.module.js +15 -12
  192. package/esm2015/directives/ripple/ripple.providers.js +29 -33
  193. package/esm2015/directives/ripple/taiga-ui-addon-mobile-directives-ripple.js +1 -2
  194. package/esm2015/directives/sidebar/index.js +1 -1
  195. package/esm2015/directives/sidebar/sidebar.component.js +31 -27
  196. package/esm2015/directives/sidebar/sidebar.directive.js +39 -38
  197. package/esm2015/directives/sidebar/sidebar.module.js +16 -13
  198. package/esm2015/directives/sidebar/taiga-ui-addon-mobile-directives-sidebar.js +1 -1
  199. package/esm2015/directives/taiga-ui-addon-mobile-directives.js +1 -1
  200. package/esm2015/directives/touchable/index.js +1 -1
  201. package/esm2015/directives/touchable/taiga-ui-addon-mobile-directives-touchable.js +1 -1
  202. package/esm2015/directives/touchable/touchable.directive.js +39 -29
  203. package/esm2015/directives/touchable/touchable.module.js +14 -11
  204. package/esm2015/index.js +3 -2
  205. package/esm2015/interfaces/index.js +2 -1
  206. package/esm2015/interfaces/mobile-alert-data.js +2 -1
  207. package/esm2015/interfaces/taiga-ui-addon-mobile-interfaces.js +2 -1
  208. package/esm2015/internal/index.js +1 -1
  209. package/esm2015/internal/primitive-calendar-mobile/index.js +1 -1
  210. package/esm2015/internal/primitive-calendar-mobile/primitive-calendar-mobile.component.js +28 -24
  211. package/esm2015/internal/primitive-calendar-mobile/primitive-calendar-mobile.module.js +24 -13
  212. package/esm2015/internal/primitive-calendar-mobile/taiga-ui-addon-mobile-internal-primitive-calendar-mobile.js +1 -1
  213. package/esm2015/internal/taiga-ui-addon-mobile-internal.js +1 -1
  214. package/esm2015/taiga-ui-addon-mobile.js +1 -1
  215. package/esm2015/tokens/index.js +1 -1
  216. package/esm2015/tokens/loaded.js +1 -1
  217. package/esm2015/tokens/taiga-ui-addon-mobile-tokens.js +1 -1
  218. package/esm2015/types/index.js +2 -1
  219. package/esm2015/types/taiga-ui-addon-mobile-types.js +2 -1
  220. package/esm2015/types/touch-mode.js +2 -1
  221. package/esm2015/utils/find-touch-index.js +2 -7
  222. package/esm2015/utils/index.js +1 -1
  223. package/esm2015/utils/taiga-ui-addon-mobile-utils.js +1 -1
  224. package/fesm2015/taiga-ui-addon-mobile-components-mobile-calendar-dialog.js +45 -35
  225. package/fesm2015/taiga-ui-addon-mobile-components-mobile-calendar-dialog.js.map +1 -1
  226. package/fesm2015/taiga-ui-addon-mobile-components-mobile-calendar.js +117 -77
  227. package/fesm2015/taiga-ui-addon-mobile-components-mobile-calendar.js.map +1 -1
  228. package/fesm2015/taiga-ui-addon-mobile-components-mobile-dialog.js +54 -50
  229. package/fesm2015/taiga-ui-addon-mobile-components-mobile-dialog.js.map +1 -1
  230. package/fesm2015/taiga-ui-addon-mobile-components-pull-to-refresh.js +97 -80
  231. package/fesm2015/taiga-ui-addon-mobile-components-pull-to-refresh.js.map +1 -1
  232. package/fesm2015/taiga-ui-addon-mobile-components-sheet.js +437 -370
  233. package/fesm2015/taiga-ui-addon-mobile-components-sheet.js.map +1 -1
  234. package/fesm2015/taiga-ui-addon-mobile-components-theme-android.js +27 -21
  235. package/fesm2015/taiga-ui-addon-mobile-components-theme-android.js.map +1 -1
  236. package/fesm2015/taiga-ui-addon-mobile-components-theme-ios.js +27 -21
  237. package/fesm2015/taiga-ui-addon-mobile-components-theme-ios.js.map +1 -1
  238. package/fesm2015/taiga-ui-addon-mobile-components.js.map +1 -1
  239. package/fesm2015/taiga-ui-addon-mobile-const.js.map +1 -1
  240. package/fesm2015/taiga-ui-addon-mobile-directives-elastic-sticky.js +61 -52
  241. package/fesm2015/taiga-ui-addon-mobile-directives-elastic-sticky.js.map +1 -1
  242. package/fesm2015/taiga-ui-addon-mobile-directives-mobile-tabs.js +61 -45
  243. package/fesm2015/taiga-ui-addon-mobile-directives-mobile-tabs.js.map +1 -1
  244. package/fesm2015/taiga-ui-addon-mobile-directives-ripple.js +93 -82
  245. package/fesm2015/taiga-ui-addon-mobile-directives-ripple.js.map +1 -1
  246. package/fesm2015/taiga-ui-addon-mobile-directives-sidebar.js +79 -70
  247. package/fesm2015/taiga-ui-addon-mobile-directives-sidebar.js.map +1 -1
  248. package/fesm2015/taiga-ui-addon-mobile-directives-touchable.js +51 -36
  249. package/fesm2015/taiga-ui-addon-mobile-directives-touchable.js.map +1 -1
  250. package/fesm2015/taiga-ui-addon-mobile-directives.js.map +1 -1
  251. package/fesm2015/taiga-ui-addon-mobile-interfaces.js.map +1 -1
  252. package/fesm2015/taiga-ui-addon-mobile-internal-primitive-calendar-mobile.js +50 -33
  253. package/fesm2015/taiga-ui-addon-mobile-internal-primitive-calendar-mobile.js.map +1 -1
  254. package/fesm2015/taiga-ui-addon-mobile-internal.js.map +1 -1
  255. package/fesm2015/taiga-ui-addon-mobile-tokens.js.map +1 -1
  256. package/fesm2015/taiga-ui-addon-mobile-types.js.map +1 -1
  257. package/fesm2015/taiga-ui-addon-mobile-utils.js +2 -7
  258. package/fesm2015/taiga-ui-addon-mobile-utils.js.map +1 -1
  259. package/fesm2015/taiga-ui-addon-mobile.js +2 -1
  260. package/fesm2015/taiga-ui-addon-mobile.js.map +1 -1
  261. package/index.d.ts +0 -1
  262. package/interfaces/package.json +2 -5
  263. package/interfaces/taiga-ui-addon-mobile-interfaces.d.ts +1 -0
  264. package/internal/package.json +2 -5
  265. package/internal/primitive-calendar-mobile/package.json +2 -5
  266. package/internal/primitive-calendar-mobile/primitive-calendar-mobile.component.d.ts +3 -1
  267. package/internal/primitive-calendar-mobile/primitive-calendar-mobile.module.d.ts +8 -0
  268. package/internal/primitive-calendar-mobile/taiga-ui-addon-mobile-internal-primitive-calendar-mobile.d.ts +1 -0
  269. package/internal/taiga-ui-addon-mobile-internal.d.ts +1 -0
  270. package/package.json +12 -15
  271. package/taiga-ui-addon-mobile.d.ts +1 -0
  272. package/tokens/package.json +2 -5
  273. package/tokens/taiga-ui-addon-mobile-tokens.d.ts +1 -0
  274. package/types/package.json +2 -5
  275. package/types/taiga-ui-addon-mobile-types.d.ts +1 -0
  276. package/types/touch-mode.d.ts +1 -1
  277. package/utils/find-touch-index.d.ts +1 -5
  278. package/utils/package.json +2 -5
  279. package/utils/taiga-ui-addon-mobile-utils.d.ts +1 -0
  280. package/bundles/taiga-ui-addon-mobile-components-mobile-calendar-dialog.umd.min.js +0 -2
  281. package/bundles/taiga-ui-addon-mobile-components-mobile-calendar-dialog.umd.min.js.map +0 -1
  282. package/bundles/taiga-ui-addon-mobile-components-mobile-calendar.umd.min.js +0 -2
  283. package/bundles/taiga-ui-addon-mobile-components-mobile-calendar.umd.min.js.map +0 -1
  284. package/bundles/taiga-ui-addon-mobile-components-mobile-dialog.umd.min.js +0 -2
  285. package/bundles/taiga-ui-addon-mobile-components-mobile-dialog.umd.min.js.map +0 -1
  286. package/bundles/taiga-ui-addon-mobile-components-pull-to-refresh.umd.min.js +0 -2
  287. package/bundles/taiga-ui-addon-mobile-components-pull-to-refresh.umd.min.js.map +0 -1
  288. package/bundles/taiga-ui-addon-mobile-components-sheet.umd.min.js +0 -2
  289. package/bundles/taiga-ui-addon-mobile-components-sheet.umd.min.js.map +0 -1
  290. package/bundles/taiga-ui-addon-mobile-components-theme-android.umd.min.js +0 -2
  291. package/bundles/taiga-ui-addon-mobile-components-theme-android.umd.min.js.map +0 -1
  292. package/bundles/taiga-ui-addon-mobile-components-theme-ios.umd.min.js +0 -2
  293. package/bundles/taiga-ui-addon-mobile-components-theme-ios.umd.min.js.map +0 -1
  294. package/bundles/taiga-ui-addon-mobile-components.umd.min.js +0 -2
  295. package/bundles/taiga-ui-addon-mobile-components.umd.min.js.map +0 -1
  296. package/bundles/taiga-ui-addon-mobile-const.umd.min.js +0 -2
  297. package/bundles/taiga-ui-addon-mobile-const.umd.min.js.map +0 -1
  298. package/bundles/taiga-ui-addon-mobile-directives-elastic-sticky.umd.min.js +0 -2
  299. package/bundles/taiga-ui-addon-mobile-directives-elastic-sticky.umd.min.js.map +0 -1
  300. package/bundles/taiga-ui-addon-mobile-directives-mobile-tabs.umd.min.js +0 -2
  301. package/bundles/taiga-ui-addon-mobile-directives-mobile-tabs.umd.min.js.map +0 -1
  302. package/bundles/taiga-ui-addon-mobile-directives-ripple.umd.min.js +0 -2
  303. package/bundles/taiga-ui-addon-mobile-directives-ripple.umd.min.js.map +0 -1
  304. package/bundles/taiga-ui-addon-mobile-directives-sidebar.umd.min.js +0 -2
  305. package/bundles/taiga-ui-addon-mobile-directives-sidebar.umd.min.js.map +0 -1
  306. package/bundles/taiga-ui-addon-mobile-directives-touchable.umd.min.js +0 -2
  307. package/bundles/taiga-ui-addon-mobile-directives-touchable.umd.min.js.map +0 -1
  308. package/bundles/taiga-ui-addon-mobile-directives.umd.min.js +0 -2
  309. package/bundles/taiga-ui-addon-mobile-directives.umd.min.js.map +0 -1
  310. package/bundles/taiga-ui-addon-mobile-enums.umd.js +0 -20
  311. package/bundles/taiga-ui-addon-mobile-enums.umd.js.map +0 -1
  312. package/bundles/taiga-ui-addon-mobile-enums.umd.min.js +0 -2
  313. package/bundles/taiga-ui-addon-mobile-enums.umd.min.js.map +0 -1
  314. package/bundles/taiga-ui-addon-mobile-interfaces.umd.min.js +0 -2
  315. package/bundles/taiga-ui-addon-mobile-interfaces.umd.min.js.map +0 -1
  316. package/bundles/taiga-ui-addon-mobile-internal-primitive-calendar-mobile.umd.min.js +0 -2
  317. package/bundles/taiga-ui-addon-mobile-internal-primitive-calendar-mobile.umd.min.js.map +0 -1
  318. package/bundles/taiga-ui-addon-mobile-internal.umd.min.js +0 -2
  319. package/bundles/taiga-ui-addon-mobile-internal.umd.min.js.map +0 -1
  320. package/bundles/taiga-ui-addon-mobile-tokens.umd.min.js +0 -2
  321. package/bundles/taiga-ui-addon-mobile-tokens.umd.min.js.map +0 -1
  322. package/bundles/taiga-ui-addon-mobile-types.umd.min.js +0 -2
  323. package/bundles/taiga-ui-addon-mobile-types.umd.min.js.map +0 -1
  324. package/bundles/taiga-ui-addon-mobile-utils.umd.min.js +0 -2
  325. package/bundles/taiga-ui-addon-mobile-utils.umd.min.js.map +0 -1
  326. package/bundles/taiga-ui-addon-mobile.umd.min.js +0 -2
  327. package/bundles/taiga-ui-addon-mobile.umd.min.js.map +0 -1
  328. package/components/mobile-calendar/taiga-ui-addon-mobile-components-mobile-calendar.metadata.json +0 -1
  329. package/components/mobile-calendar-dialog/taiga-ui-addon-mobile-components-mobile-calendar-dialog.metadata.json +0 -1
  330. package/components/mobile-dialog/taiga-ui-addon-mobile-components-mobile-dialog.metadata.json +0 -1
  331. package/components/pull-to-refresh/taiga-ui-addon-mobile-components-pull-to-refresh.metadata.json +0 -1
  332. package/components/sheet/taiga-ui-addon-mobile-components-sheet.metadata.json +0 -1
  333. package/components/taiga-ui-addon-mobile-components.metadata.json +0 -1
  334. package/components/theme-android/taiga-ui-addon-mobile-components-theme-android.metadata.json +0 -1
  335. package/components/theme-ios/taiga-ui-addon-mobile-components-theme-ios.metadata.json +0 -1
  336. package/const/taiga-ui-addon-mobile-const.metadata.json +0 -1
  337. package/directives/elastic-sticky/taiga-ui-addon-mobile-directives-elastic-sticky.metadata.json +0 -1
  338. package/directives/mobile-tabs/taiga-ui-addon-mobile-directives-mobile-tabs.metadata.json +0 -1
  339. package/directives/ripple/taiga-ui-addon-mobile-directives-ripple.metadata.json +0 -1
  340. package/directives/sidebar/taiga-ui-addon-mobile-directives-sidebar.metadata.json +0 -1
  341. package/directives/taiga-ui-addon-mobile-directives.metadata.json +0 -1
  342. package/directives/touchable/taiga-ui-addon-mobile-directives-touchable.metadata.json +0 -1
  343. package/enums/index.d.ts +0 -1
  344. package/enums/package.json +0 -13
  345. package/enums/taiga-ui-addon-mobile-enums.d.ts +0 -4
  346. package/enums/taiga-ui-addon-mobile-enums.metadata.json +0 -1
  347. package/enums/touch-mode.d.ts +0 -8
  348. package/esm2015/enums/index.js +0 -2
  349. package/esm2015/enums/taiga-ui-addon-mobile-enums.js +0 -5
  350. package/esm2015/enums/touch-mode.js +0 -10
  351. package/esm5/components/index.js +0 -8
  352. package/esm5/components/mobile-calendar/index.js +0 -6
  353. package/esm5/components/mobile-calendar/mobile-calendar.component.js +0 -295
  354. package/esm5/components/mobile-calendar/mobile-calendar.const.js +0 -25
  355. package/esm5/components/mobile-calendar/mobile-calendar.module.js +0 -34
  356. package/esm5/components/mobile-calendar/mobile-calendar.providers.js +0 -31
  357. package/esm5/components/mobile-calendar/mobile-calendar.strategy.js +0 -134
  358. package/esm5/components/mobile-calendar/taiga-ui-addon-mobile-components-mobile-calendar.js +0 -5
  359. package/esm5/components/mobile-calendar-dialog/index.js +0 -3
  360. package/esm5/components/mobile-calendar-dialog/mobile-calendar-dialog.component.js +0 -57
  361. package/esm5/components/mobile-calendar-dialog/mobile-calendar-dialog.module.js +0 -28
  362. package/esm5/components/mobile-calendar-dialog/taiga-ui-addon-mobile-components-mobile-calendar-dialog.js +0 -5
  363. package/esm5/components/mobile-dialog/index.js +0 -4
  364. package/esm5/components/mobile-dialog/mobile-dialog-options.js +0 -1
  365. package/esm5/components/mobile-dialog/mobile-dialog.component.js +0 -34
  366. package/esm5/components/mobile-dialog/mobile-dialog.module.js +0 -31
  367. package/esm5/components/mobile-dialog/mobile-dialog.service.js +0 -34
  368. package/esm5/components/mobile-dialog/taiga-ui-addon-mobile-components-mobile-dialog.js +0 -5
  369. package/esm5/components/pull-to-refresh/index.js +0 -6
  370. package/esm5/components/pull-to-refresh/loader-android/loader-android.component.js +0 -43
  371. package/esm5/components/pull-to-refresh/loader-ios/loader-ios.component.js +0 -41
  372. package/esm5/components/pull-to-refresh/pull-to-refresh.component.js +0 -56
  373. package/esm5/components/pull-to-refresh/pull-to-refresh.module.js +0 -26
  374. package/esm5/components/pull-to-refresh/pull-to-refresh.providers.js +0 -32
  375. package/esm5/components/pull-to-refresh/taiga-ui-addon-mobile-components-pull-to-refresh.js +0 -5
  376. package/esm5/components/sheet/components/sheet/sheet.component.js +0 -150
  377. package/esm5/components/sheet/components/sheet/sheet.providers.js +0 -42
  378. package/esm5/components/sheet/components/sheet-bar/sheet-bar.component.js +0 -43
  379. package/esm5/components/sheet/components/sheet-heading/sheet-heading.component.js +0 -40
  380. package/esm5/components/sheet/components/sheets-host/sheets-host.component.js +0 -40
  381. package/esm5/components/sheet/directives/sheet-close/sheet-close.directive.js +0 -56
  382. package/esm5/components/sheet/directives/sheet-stop/sheet-stop.directive.js +0 -46
  383. package/esm5/components/sheet/directives/sheet-top/sheet-top.directive.js +0 -56
  384. package/esm5/components/sheet/directives/sheet-wrapper/sheet-wrapper.directive.js +0 -93
  385. package/esm5/components/sheet/index.js +0 -15
  386. package/esm5/components/sheet/ios.hacks.js +0 -42
  387. package/esm5/components/sheet/sheet-options.js +0 -16
  388. package/esm5/components/sheet/sheet.directive.js +0 -58
  389. package/esm5/components/sheet/sheet.js +0 -1
  390. package/esm5/components/sheet/sheet.module.js +0 -52
  391. package/esm5/components/sheet/sheet.service.js +0 -42
  392. package/esm5/components/sheet/taiga-ui-addon-mobile-components-sheet.js +0 -5
  393. package/esm5/components/taiga-ui-addon-mobile-components.js +0 -5
  394. package/esm5/components/theme-android/index.js +0 -3
  395. package/esm5/components/theme-android/taiga-ui-addon-mobile-components-theme-android.js +0 -5
  396. package/esm5/components/theme-android/theme-android.component.js +0 -22
  397. package/esm5/components/theme-android/theme-android.module.js +0 -16
  398. package/esm5/components/theme-ios/index.js +0 -3
  399. package/esm5/components/theme-ios/taiga-ui-addon-mobile-components-theme-ios.js +0 -5
  400. package/esm5/components/theme-ios/theme-ios.component.js +0 -22
  401. package/esm5/components/theme-ios/theme-ios.module.js +0 -16
  402. package/esm5/const/index.js +0 -2
  403. package/esm5/const/mobile-alert-options.js +0 -8
  404. package/esm5/const/taiga-ui-addon-mobile-const.js +0 -5
  405. package/esm5/directives/elastic-sticky/elastic-sticky.directive.js +0 -26
  406. package/esm5/directives/elastic-sticky/elastic-sticky.module.js +0 -16
  407. package/esm5/directives/elastic-sticky/elastic-sticky.service.js +0 -58
  408. package/esm5/directives/elastic-sticky/index.js +0 -4
  409. package/esm5/directives/elastic-sticky/taiga-ui-addon-mobile-directives-elastic-sticky.js +0 -5
  410. package/esm5/directives/index.js +0 -6
  411. package/esm5/directives/mobile-tabs/index.js +0 -4
  412. package/esm5/directives/mobile-tabs/mobile-tabs.component.js +0 -16
  413. package/esm5/directives/mobile-tabs/mobile-tabs.directive.js +0 -51
  414. package/esm5/directives/mobile-tabs/mobile-tabs.module.js +0 -18
  415. package/esm5/directives/mobile-tabs/taiga-ui-addon-mobile-directives-mobile-tabs.js +0 -5
  416. package/esm5/directives/ripple/index.js +0 -4
  417. package/esm5/directives/ripple/ripple-styles.component.js +0 -16
  418. package/esm5/directives/ripple/ripple.directive.js +0 -63
  419. package/esm5/directives/ripple/ripple.module.js +0 -18
  420. package/esm5/directives/ripple/ripple.providers.js +0 -54
  421. package/esm5/directives/ripple/taiga-ui-addon-mobile-directives-ripple.js +0 -6
  422. package/esm5/directives/sidebar/index.js +0 -4
  423. package/esm5/directives/sidebar/sidebar.component.js +0 -75
  424. package/esm5/directives/sidebar/sidebar.directive.js +0 -78
  425. package/esm5/directives/sidebar/sidebar.module.js +0 -21
  426. package/esm5/directives/sidebar/taiga-ui-addon-mobile-directives-sidebar.js +0 -5
  427. package/esm5/directives/taiga-ui-addon-mobile-directives.js +0 -5
  428. package/esm5/directives/touchable/index.js +0 -3
  429. package/esm5/directives/touchable/taiga-ui-addon-mobile-directives-touchable.js +0 -5
  430. package/esm5/directives/touchable/touchable.directive.js +0 -90
  431. package/esm5/directives/touchable/touchable.module.js +0 -16
  432. package/esm5/enums/index.js +0 -2
  433. package/esm5/enums/taiga-ui-addon-mobile-enums.js +0 -5
  434. package/esm5/enums/touch-mode.js +0 -10
  435. package/esm5/index.js +0 -7
  436. package/esm5/interfaces/index.js +0 -1
  437. package/esm5/interfaces/mobile-alert-data.js +0 -1
  438. package/esm5/interfaces/taiga-ui-addon-mobile-interfaces.js +0 -4
  439. package/esm5/internal/index.js +0 -2
  440. package/esm5/internal/primitive-calendar-mobile/index.js +0 -3
  441. package/esm5/internal/primitive-calendar-mobile/primitive-calendar-mobile.component.js +0 -37
  442. package/esm5/internal/primitive-calendar-mobile/primitive-calendar-mobile.module.js +0 -28
  443. package/esm5/internal/primitive-calendar-mobile/taiga-ui-addon-mobile-internal-primitive-calendar-mobile.js +0 -5
  444. package/esm5/internal/taiga-ui-addon-mobile-internal.js +0 -5
  445. package/esm5/taiga-ui-addon-mobile.js +0 -5
  446. package/esm5/tokens/index.js +0 -2
  447. package/esm5/tokens/loaded.js +0 -6
  448. package/esm5/tokens/taiga-ui-addon-mobile-tokens.js +0 -5
  449. package/esm5/types/index.js +0 -1
  450. package/esm5/types/taiga-ui-addon-mobile-types.js +0 -4
  451. package/esm5/types/touch-mode.js +0 -1
  452. package/esm5/utils/find-touch-index.js +0 -15
  453. package/esm5/utils/index.js +0 -2
  454. package/esm5/utils/taiga-ui-addon-mobile-utils.js +0 -5
  455. package/fesm2015/taiga-ui-addon-mobile-enums.js +0 -16
  456. package/fesm2015/taiga-ui-addon-mobile-enums.js.map +0 -1
  457. package/fesm5/taiga-ui-addon-mobile-components-mobile-calendar-dialog.js +0 -87
  458. package/fesm5/taiga-ui-addon-mobile-components-mobile-calendar-dialog.js.map +0 -1
  459. package/fesm5/taiga-ui-addon-mobile-components-mobile-calendar.js +0 -502
  460. package/fesm5/taiga-ui-addon-mobile-components-mobile-calendar.js.map +0 -1
  461. package/fesm5/taiga-ui-addon-mobile-components-mobile-dialog.js +0 -91
  462. package/fesm5/taiga-ui-addon-mobile-components-mobile-dialog.js.map +0 -1
  463. package/fesm5/taiga-ui-addon-mobile-components-pull-to-refresh.js +0 -185
  464. package/fesm5/taiga-ui-addon-mobile-components-pull-to-refresh.js.map +0 -1
  465. package/fesm5/taiga-ui-addon-mobile-components-sheet.js +0 -680
  466. package/fesm5/taiga-ui-addon-mobile-components-sheet.js.map +0 -1
  467. package/fesm5/taiga-ui-addon-mobile-components-theme-android.js +0 -40
  468. package/fesm5/taiga-ui-addon-mobile-components-theme-android.js.map +0 -1
  469. package/fesm5/taiga-ui-addon-mobile-components-theme-ios.js +0 -40
  470. package/fesm5/taiga-ui-addon-mobile-components-theme-ios.js.map +0 -1
  471. package/fesm5/taiga-ui-addon-mobile-components.js +0 -12
  472. package/fesm5/taiga-ui-addon-mobile-components.js.map +0 -1
  473. package/fesm5/taiga-ui-addon-mobile-const.js +0 -15
  474. package/fesm5/taiga-ui-addon-mobile-const.js.map +0 -1
  475. package/fesm5/taiga-ui-addon-mobile-directives-elastic-sticky.js +0 -97
  476. package/fesm5/taiga-ui-addon-mobile-directives-elastic-sticky.js.map +0 -1
  477. package/fesm5/taiga-ui-addon-mobile-directives-mobile-tabs.js +0 -82
  478. package/fesm5/taiga-ui-addon-mobile-directives-mobile-tabs.js.map +0 -1
  479. package/fesm5/taiga-ui-addon-mobile-directives-ripple.js +0 -143
  480. package/fesm5/taiga-ui-addon-mobile-directives-ripple.js.map +0 -1
  481. package/fesm5/taiga-ui-addon-mobile-directives-sidebar.js +0 -168
  482. package/fesm5/taiga-ui-addon-mobile-directives-sidebar.js.map +0 -1
  483. package/fesm5/taiga-ui-addon-mobile-directives-touchable.js +0 -108
  484. package/fesm5/taiga-ui-addon-mobile-directives-touchable.js.map +0 -1
  485. package/fesm5/taiga-ui-addon-mobile-directives.js +0 -10
  486. package/fesm5/taiga-ui-addon-mobile-directives.js.map +0 -1
  487. package/fesm5/taiga-ui-addon-mobile-enums.js +0 -16
  488. package/fesm5/taiga-ui-addon-mobile-enums.js.map +0 -1
  489. package/fesm5/taiga-ui-addon-mobile-interfaces.js +0 -4
  490. package/fesm5/taiga-ui-addon-mobile-interfaces.js.map +0 -1
  491. package/fesm5/taiga-ui-addon-mobile-internal-primitive-calendar-mobile.js +0 -65
  492. package/fesm5/taiga-ui-addon-mobile-internal-primitive-calendar-mobile.js.map +0 -1
  493. package/fesm5/taiga-ui-addon-mobile-internal.js +0 -6
  494. package/fesm5/taiga-ui-addon-mobile-internal.js.map +0 -1
  495. package/fesm5/taiga-ui-addon-mobile-tokens.js +0 -13
  496. package/fesm5/taiga-ui-addon-mobile-tokens.js.map +0 -1
  497. package/fesm5/taiga-ui-addon-mobile-types.js +0 -4
  498. package/fesm5/taiga-ui-addon-mobile-types.js.map +0 -1
  499. package/fesm5/taiga-ui-addon-mobile-utils.js +0 -21
  500. package/fesm5/taiga-ui-addon-mobile-utils.js.map +0 -1
  501. package/fesm5/taiga-ui-addon-mobile.js +0 -11
  502. package/fesm5/taiga-ui-addon-mobile.js.map +0 -1
  503. package/interfaces/taiga-ui-addon-mobile-interfaces.metadata.json +0 -1
  504. package/internal/primitive-calendar-mobile/taiga-ui-addon-mobile-internal-primitive-calendar-mobile.metadata.json +0 -1
  505. package/internal/taiga-ui-addon-mobile-internal.metadata.json +0 -1
  506. package/taiga-ui-addon-mobile.metadata.json +0 -1
  507. package/tokens/taiga-ui-addon-mobile-tokens.metadata.json +0 -1
  508. package/types/taiga-ui-addon-mobile-types.metadata.json +0 -1
  509. 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 { tuiTypedFromEvent, tuiZonefree, TuiIdService, TUI_IS_IOS, tuiClamp, 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$ = tuiTypedFromEvent(element, `load`, { capture: true });
21
+ const touchstart$ = tuiTypedFromEvent(element, `touchstart`, { passive: true });
22
+ const touchmove$ = tuiTypedFromEvent(documentRef, `touchmove`, { passive: true });
23
+ const touchend$ = tuiTypedFromEvent(documentRef, `touchend`);
24
+ const scroll$ = tuiTypedFromEvent(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;
@@ -42,9 +48,13 @@ function fakeSmoothScroll({ style }, offset) {
42
48
  });
43
49
  }
44
50
 
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
+
45
55
  const TUI_SHEET_CLOSE = `tui-sheet-close`;
46
56
  const TUI_SHEET_ID = `tui-sheet-id`;
47
- let TuiSheetHeadingComponent = class TuiSheetHeadingComponent {
57
+ class TuiSheetHeadingComponent {
48
58
  constructor(idService, elementRef, closeWord$) {
49
59
  this.idService = idService;
50
60
  this.elementRef = elementRef;
@@ -57,59 +67,177 @@ 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,
87
95
  deps: [ElementRef],
88
- useFactory: sheetDraggedFactory,
96
+ useFactory: ({ nativeElement }) => {
97
+ return merge(tuiTypedFromEvent(nativeElement, `touchstart`, { passive: true }).pipe(mapTo(true)), tuiTypedFromEvent(nativeElement, `touchend`).pipe(mapTo(false)));
98
+ },
89
99
  },
90
100
  {
91
101
  provide: TUI_SHEET_SCROLL,
92
102
  deps: [ElementRef, NgZone, DOCUMENT, TUI_IS_IOS],
93
- useFactory: sheetScrollFactory,
103
+ useFactory: ({ nativeElement }, ngZone, documentRef, isIos) => {
104
+ return isIos
105
+ ? iosScrollFactory(nativeElement, documentRef, ngZone)
106
+ : merge(tuiTypedFromEvent(nativeElement, `scroll`), tuiTypedFromEvent(nativeElement, `load`, { capture: true })).pipe(map(() => nativeElement.scrollTop), tuiZonefree(ngZone), share());
107
+ },
94
108
  },
95
109
  {
96
110
  provide: TUI_SCROLL_REF,
97
111
  useExisting: ElementRef,
98
112
  },
113
+ {
114
+ provide: TUI_SHEET,
115
+ useExisting: forwardRef(() => TuiSheetComponent),
116
+ },
99
117
  ];
100
- // eslint-disable-next-line @typescript-eslint/naming-convention
101
- function sheetDraggedFactory({ nativeElement, }) {
102
- return merge(typedFromEvent(nativeElement, `touchstart`, { passive: true }).pipe(mapTo(true)), typedFromEvent(nativeElement, `touchend`).pipe(mapTo(false)));
118
+
119
+ class TuiSheetBarComponent {
120
+ constructor(sheet, scroll$, ngZone) {
121
+ this.sheet = sheet;
122
+ this.scroll$ = scroll$;
123
+ this.ngZone = ngZone;
124
+ this.rotate$ = this.scroll$.pipe(tuiZonefulMap(y => tuiClamp(10 - (y - this.stop) / 5, 0, 10), this.ngZone));
125
+ }
126
+ get stop() {
127
+ return this.sheet.stops[0] || 0;
128
+ }
103
129
  }
104
- // eslint-disable-next-line @typescript-eslint/naming-convention
105
- function sheetScrollFactory({ nativeElement }, ngZone, documentRef, isIos) {
106
- return isIos
107
- ? iosScrollFactory(nativeElement, documentRef, ngZone)
108
- : merge(typedFromEvent(nativeElement, `scroll`), typedFromEvent(nativeElement, `load`, { capture: true })).pipe(map(() => nativeElement.scrollTop), tuiZonefree(ngZone), share());
130
+ 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 });
131
+ 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 });
132
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.16", ngImport: i0, type: TuiSheetBarComponent, decorators: [{
133
+ type: Component,
134
+ args: [{
135
+ selector: `tui-sheet-bar`,
136
+ templateUrl: `sheet-bar.template.html`,
137
+ styleUrls: [`sheet-bar.style.less`],
138
+ changeDetection: ChangeDetectionStrategy.OnPush,
139
+ }]
140
+ }], ctorParameters: function () { return [{ type: undefined, decorators: [{
141
+ type: Inject,
142
+ args: [TUI_SHEET]
143
+ }] }, { type: i1$1.Observable, decorators: [{
144
+ type: Inject,
145
+ args: [TUI_SHEET_SCROLL]
146
+ }] }, { type: i0.NgZone, decorators: [{
147
+ type: Inject,
148
+ args: [NgZone]
149
+ }] }]; } });
150
+
151
+ // So that borders get rounded when image is visible for at least 10px
152
+ const OFFSET$1 = 10;
153
+ class TuiSheetTopDirective {
154
+ constructor(scroll$, component, windowRef) {
155
+ this.scroll$ = scroll$;
156
+ this.component = component;
157
+ this.windowRef = windowRef;
158
+ this.stop = 0;
159
+ this.transform$ = this.scroll$.pipe(map(y => `translateY(${this.getY(y)}%) scaleX(-1)`));
160
+ this.rounded$ = this.scroll$.pipe(map(y => y < this.stop + OFFSET$1));
161
+ this.clickthrough$ = this.scroll$.pipe(map(y => !!Math.round(this.getY(y))));
162
+ }
163
+ getY(scrollTop) {
164
+ const value = scrollTop - this.stop;
165
+ const total = this.windowRef.innerHeight - this.component.item.offset - this.stop;
166
+ return this.stop && tuiClamp(100 - (value / total) * 100, 0, 100);
167
+ }
168
+ }
169
+ 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 });
170
+ 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 });
171
+ __decorate([
172
+ tuiDefaultProp()
173
+ ], TuiSheetTopDirective.prototype, "stop", void 0);
174
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.16", ngImport: i0, type: TuiSheetTopDirective, decorators: [{
175
+ type: Directive,
176
+ args: [{
177
+ selector: `[tuiSheetTop]`,
178
+ host: {
179
+ '[$.style.transform]': `transform$`,
180
+ '($.style.transform)': `transform$`,
181
+ '[$.class._rounded]': `rounded$`,
182
+ '($.class._rounded)': `rounded$`,
183
+ '[$.class._clickthrough]': `clickthrough$`,
184
+ '($.class._clickthrough)': `clickthrough$`,
185
+ },
186
+ }]
187
+ }], ctorParameters: function () { return [{ type: i1$1.Observable, decorators: [{
188
+ type: Inject,
189
+ args: [TUI_SHEET_SCROLL]
190
+ }] }, { type: undefined, decorators: [{
191
+ type: Inject,
192
+ args: [TUI_SHEET]
193
+ }] }, { type: Window, decorators: [{
194
+ type: Inject,
195
+ args: [WINDOW]
196
+ }] }]; }, propDecorators: { stop: [{
197
+ type: Input,
198
+ args: [`tuiSheetTop`]
199
+ }] } });
200
+
201
+ class TuiSheetStopDirective {
202
+ constructor(elementRef, destroy$, dragged$, scroll$, { nativeElement }) {
203
+ scroll$
204
+ .pipe(map(y => Math.floor(y) > elementRef.nativeElement.offsetTop), distinctUntilChanged(), withLatestFrom(dragged$), map(([above, dragged]) => !above && !dragged), filter(Boolean), throttleTime(100), takeUntil(destroy$))
205
+ .subscribe(() => {
206
+ nativeElement.style.overflow = `hidden`;
207
+ nativeElement.classList.remove(`_stuck`); // iOS
208
+ nativeElement.scrollTop = elementRef.nativeElement.offsetTop;
209
+ setTimeout(() => {
210
+ nativeElement.style.overflow = ``;
211
+ }, 100);
212
+ });
213
+ }
109
214
  }
215
+ 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 });
216
+ TuiSheetStopDirective.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "12.0.0", version: "12.2.16", type: TuiSheetStopDirective, selector: "[tuiSheetStop]", providers: [TuiDestroyService], ngImport: i0 });
217
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.16", ngImport: i0, type: TuiSheetStopDirective, decorators: [{
218
+ type: Directive,
219
+ args: [{
220
+ selector: `[tuiSheetStop]`,
221
+ providers: [TuiDestroyService],
222
+ }]
223
+ }], ctorParameters: function () { return [{ type: i0.ElementRef, decorators: [{
224
+ type: Inject,
225
+ args: [ElementRef]
226
+ }] }, { type: i1$1.Observable, decorators: [{
227
+ type: Inject,
228
+ args: [TuiDestroyService]
229
+ }] }, { type: i1$1.Observable, decorators: [{
230
+ type: Inject,
231
+ args: [TUI_SHEET_DRAGGED]
232
+ }] }, { type: i1$1.Observable, decorators: [{
233
+ type: Inject,
234
+ args: [TUI_SHEET_SCROLL]
235
+ }] }, { type: i0.ElementRef, decorators: [{
236
+ type: Inject,
237
+ args: [TUI_SCROLL_REF]
238
+ }] }]; } });
110
239
 
111
- // @dynamic
112
- let TuiSheetComponent = class TuiSheetComponent {
240
+ class TuiSheetComponent {
113
241
  constructor(scroll$, elementRef, ngZone, isIos, moreWord$) {
114
242
  this.scroll$ = scroll$;
115
243
  this.elementRef = elementRef;
@@ -160,91 +288,65 @@ let TuiSheetComponent = class TuiSheetComponent {
160
288
  return (_b = (_a = this.sheet) === null || _a === void 0 ? void 0 : _a.nativeElement.offsetTop) !== null && _b !== void 0 ? _b : Infinity;
161
289
  }
162
290
  getStops(stops) {
163
- return stops
164
- .toArray()
165
- .map(({ nativeElement }) => nativeElement.offsetTop + nativeElement.clientHeight);
291
+ return stops.map(({ nativeElement }) => nativeElement.offsetTop + nativeElement.clientHeight);
166
292
  }
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);
293
+ }
294
+ 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 });
295
+ 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
296
  __decorate([
188
297
  tuiPure
189
298
  ], TuiSheetComponent.prototype, "context", null);
190
- __decorate([
191
- HostListener(TUI_SHEET_ID, [`$event.detail`])
192
- ], TuiSheetComponent.prototype, "onId", null);
193
299
  __decorate([
194
300
  tuiPure
195
301
  ], 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);
302
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.16", ngImport: i0, type: TuiSheetComponent, decorators: [{
303
+ type: Component,
304
+ args: [{
305
+ selector: `tui-sheet`,
306
+ templateUrl: `sheet.template.html`,
307
+ styleUrls: [`sheet.style.less`],
308
+ providers: TUI_SHEET_PROVIDERS,
309
+ animations: [tuiSlideInTop],
310
+ changeDetection: ChangeDetectionStrategy.OnPush,
311
+ host: {
312
+ role: `dialog`,
313
+ '[attr.aria-labelledby]': `id`,
314
+ '[class._ios]': `isIos`,
315
+ // '[class._stuck]': 'true', // Initially disable snapping for Firefox
316
+ '[$.class._stuck]': `stuck$`,
317
+ '($.class._stuck)': `stuck$`,
318
+ },
319
+ }]
320
+ }], ctorParameters: function () { return [{ type: i1$1.Observable, decorators: [{
321
+ type: Inject,
322
+ args: [TUI_SHEET_SCROLL]
323
+ }] }, { type: i0.ElementRef, decorators: [{
324
+ type: Inject,
325
+ args: [ElementRef]
326
+ }] }, { type: i0.NgZone, decorators: [{
327
+ type: Inject,
328
+ args: [NgZone]
329
+ }] }, { type: undefined, decorators: [{
330
+ type: Inject,
331
+ args: [TUI_IS_IOS]
332
+ }] }, { type: i1$1.Observable, decorators: [{
333
+ type: Inject,
334
+ args: [TUI_MORE_WORD]
335
+ }] }]; }, propDecorators: { sheet: [{
336
+ type: ViewChild,
337
+ args: [`sheet`]
338
+ }], content: [{
339
+ type: ViewChild,
340
+ args: [`content`]
341
+ }], stopsRefs: [{
342
+ type: ViewChildren,
343
+ args: [`stops`]
344
+ }], item: [{
345
+ type: Input
346
+ }], context: [], onId: [{
347
+ type: HostListener,
348
+ args: [TUI_SHEET_ID, [`$event.detail`]]
349
+ }], getStops: [] } });
248
350
 
249
351
  const TUI_SHEET_DEFAULT_OPTIONS = {
250
352
  image: ``,
@@ -256,10 +358,10 @@ const TUI_SHEET_DEFAULT_OPTIONS = {
256
358
  overlay: false,
257
359
  };
258
360
  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) })),
361
+ factory: () => (Object.assign({}, TUI_SHEET_DEFAULT_OPTIONS)),
260
362
  });
261
363
 
262
- let TuiSheetService = class TuiSheetService {
364
+ class TuiSheetService {
263
365
  constructor(options) {
264
366
  this.options = options;
265
367
  this.sheets$ = new BehaviorSubject([]);
@@ -279,173 +381,22 @@ let TuiSheetService = class TuiSheetService {
279
381
  };
280
382
  });
281
383
  }
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);
384
+ }
385
+ 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 });
386
+ TuiSheetService.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "12.2.16", ngImport: i0, type: TuiSheetService, providedIn: `root` });
387
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.16", ngImport: i0, type: TuiSheetService, decorators: [{
388
+ type: Injectable,
389
+ args: [{
390
+ providedIn: `root`,
391
+ }]
392
+ }], ctorParameters: function () { return [{ type: undefined, decorators: [{
393
+ type: Inject,
394
+ args: [TUI_SHEET_OPTIONS]
395
+ }] }]; } });
444
396
 
445
397
  // Safety offset for shadow
446
- const OFFSET$1 = 16;
447
- // @dynamic
448
- let TuiSheetWrapperDirective = class TuiSheetWrapperDirective {
398
+ const OFFSET = 16;
399
+ class TuiSheetWrapperDirective {
449
400
  constructor(windowRef) {
450
401
  this.windowRef = windowRef;
451
402
  this.tuiSheetWrapper = 16;
@@ -463,8 +414,9 @@ let TuiSheetWrapperDirective = class TuiSheetWrapperDirective {
463
414
  }
464
415
  getHeight(value) {
465
416
  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);
417
+ return ((_a = this.sheet) === null || _a === void 0 ? void 0 : _a.context.overlay)
418
+ ? null
419
+ : tuiClamp(this.withImage(value) + OFFSET, OFFSET, this.windowRef.innerHeight);
468
420
  }
469
421
  withImage(value) {
470
422
  var _a;
@@ -472,22 +424,9 @@ let TuiSheetWrapperDirective = class TuiSheetWrapperDirective {
472
424
  ? value
473
425
  : value - this.sheet.imageHeight;
474
426
  }
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);
427
+ }
428
+ TuiSheetWrapperDirective.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.16", ngImport: i0, type: TuiSheetWrapperDirective, deps: [{ token: WINDOW }], target: i0.ɵɵFactoryTarget.Directive });
429
+ 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
430
  __decorate([
492
431
  tuiPure
493
432
  ], TuiSheetWrapperDirective.prototype, "overlay$", null);
@@ -497,22 +436,117 @@ __decorate([
497
436
  __decorate([
498
437
  tuiPure
499
438
  ], 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);
439
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.16", ngImport: i0, type: TuiSheetWrapperDirective, decorators: [{
440
+ type: Directive,
441
+ args: [{
442
+ selector: `[tuiSheetWrapper]`,
443
+ host: {
444
+ '[$.class._overlay]': `overlay$`,
445
+ '($.class._overlay)': `overlay$`,
446
+ '[$.class._visible]': `visible$`,
447
+ '($.class._visible)': `visible$`,
448
+ '[$.style.height.px]': `height$`,
449
+ '($.style.height.px)': `height$`,
450
+ },
451
+ }]
452
+ }], ctorParameters: function () { return [{ type: Window, decorators: [{
453
+ type: Inject,
454
+ args: [WINDOW]
455
+ }] }]; }, propDecorators: { sheet: [{
456
+ type: ContentChild,
457
+ args: [TuiSheetComponent]
458
+ }], dragged$: [{
459
+ type: ContentChild,
460
+ args: [TuiSheetComponent, { read: TUI_SHEET_DRAGGED }]
461
+ }], scroll$: [{
462
+ type: ContentChild,
463
+ args: [TuiSheetComponent, { read: TUI_SHEET_SCROLL }]
464
+ }], tuiSheetWrapper: [{
465
+ type: Input
466
+ }], overlay$: [], visible$: [], height$: [] } });
467
+
468
+ class TuiSheetCloseDirective {
469
+ constructor(ngZone, dragged$, scroll$, windowRef, elementRef, sheet) {
470
+ this.ngZone = ngZone;
471
+ this.dragged$ = dragged$;
472
+ this.scroll$ = scroll$;
473
+ this.windowRef = windowRef;
474
+ this.elementRef = elementRef;
475
+ this.sheet = sheet;
476
+ this.close = merge(tuiTypedFromEvent(this.elementRef.nativeElement, TUI_SHEET_CLOSE), this.dragged$.pipe(startWith(false), switchMap(dragged => dragged
477
+ ? EMPTY
478
+ : 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)));
479
+ }
480
+ shouldClose(scrollTop) {
481
+ const height = Math.min(this.windowRef.innerHeight, this.elementRef.nativeElement.scrollHeight - this.windowRef.innerHeight);
482
+ const min = Math.min(height, this.sheet.stops[0] || Infinity);
483
+ return scrollTop < min / 2;
484
+ }
485
+ }
486
+ 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 });
487
+ TuiSheetCloseDirective.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "12.0.0", version: "12.2.16", type: TuiSheetCloseDirective, selector: "tui-sheet[close]", outputs: { close: "close" }, ngImport: i0 });
488
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.16", ngImport: i0, type: TuiSheetCloseDirective, decorators: [{
489
+ type: Directive,
490
+ args: [{
491
+ selector: `tui-sheet[close]`,
492
+ }]
493
+ }], ctorParameters: function () { return [{ type: i0.NgZone, decorators: [{
494
+ type: Inject,
495
+ args: [NgZone]
496
+ }] }, { type: i1$1.Observable, decorators: [{
497
+ type: Inject,
498
+ args: [TUI_SHEET_DRAGGED]
499
+ }] }, { type: i1$1.Observable, decorators: [{
500
+ type: Inject,
501
+ args: [TUI_SHEET_SCROLL]
502
+ }] }, { type: Window, decorators: [{
503
+ type: Inject,
504
+ args: [WINDOW]
505
+ }] }, { type: i0.ElementRef, decorators: [{
506
+ type: Inject,
507
+ args: [ElementRef]
508
+ }] }, { type: TuiSheetComponent, decorators: [{
509
+ type: Inject,
510
+ args: [TuiSheetComponent]
511
+ }] }]; }, propDecorators: { close: [{
512
+ type: Output
513
+ }] } });
514
514
 
515
- let TuiSheetDirective = class TuiSheetDirective extends PolymorpheusTemplate {
515
+ class TuiSheetsHostComponent {
516
+ constructor(options, service, height$) {
517
+ this.options = options;
518
+ this.service = service;
519
+ this.height$ = height$;
520
+ }
521
+ close({ closeable, $implicit }) {
522
+ if (closeable) {
523
+ $implicit.complete();
524
+ }
525
+ }
526
+ }
527
+ 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 });
528
+ 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 });
529
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.16", ngImport: i0, type: TuiSheetsHostComponent, decorators: [{
530
+ type: Component,
531
+ args: [{
532
+ selector: `tui-sheets-host`,
533
+ templateUrl: `sheets-host.template.html`,
534
+ styleUrls: [`sheets-host.style.less`],
535
+ changeDetection: ChangeDetectionStrategy.OnPush,
536
+ animations: [tuiSlideInTop, tuiFadeIn],
537
+ }]
538
+ }], ctorParameters: function () { return [{ type: undefined, decorators: [{
539
+ type: Inject,
540
+ args: [TUI_ANIMATION_OPTIONS]
541
+ }] }, { type: TuiSheetService, decorators: [{
542
+ type: Inject,
543
+ args: [TuiSheetService]
544
+ }] }, { type: i1$1.Observable, decorators: [{
545
+ type: Inject,
546
+ args: [TUI_WINDOW_HEIGHT]
547
+ }] }]; } });
548
+
549
+ class TuiSheetDirective extends PolymorpheusTemplate {
516
550
  constructor(changeDetectorRef, templateRef, service) {
517
551
  super(templateRef, changeDetectorRef);
518
552
  this.service = service;
@@ -527,68 +561,101 @@ let TuiSheetDirective = class TuiSheetDirective extends PolymorpheusTemplate {
527
561
  set tuiSheet(open) {
528
562
  this.open$.next(open);
529
563
  }
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
- ];
564
+ }
565
+ 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 });
566
+ 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
567
  __decorate([
537
- Input(`tuiSheetOptions`),
538
568
  tuiDefaultProp()
539
569
  ], TuiSheetDirective.prototype, "options", void 0);
540
570
  __decorate([
541
- Input(),
542
571
  tuiRequiredSetter()
543
572
  ], 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);
573
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.16", ngImport: i0, type: TuiSheetDirective, decorators: [{
574
+ type: Directive,
575
+ args: [{
576
+ selector: `ng-template[tuiSheet]`,
577
+ }]
578
+ }], ctorParameters: function () { return [{ type: i0.ChangeDetectorRef, decorators: [{
579
+ type: Inject,
580
+ args: [ChangeDetectorRef]
581
+ }] }, { type: i0.TemplateRef, decorators: [{
582
+ type: Inject,
583
+ args: [TemplateRef]
584
+ }] }, { type: TuiSheetService, decorators: [{
585
+ type: Inject,
586
+ args: [TuiSheetService]
587
+ }] }]; }, propDecorators: { options: [{
588
+ type: Input,
589
+ args: [`tuiSheetOptions`]
590
+ }], tuiSheet: [{
591
+ type: Input
592
+ }], tuiSheetChange: [{
593
+ type: Output
594
+ }] } });
555
595
 
556
- let TuiSheetModule = class TuiSheetModule {
557
- };
558
- TuiSheetModule = __decorate([
559
- NgModule({
560
- imports: [
596
+ class TuiSheetModule {
597
+ }
598
+ TuiSheetModule.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.16", ngImport: i0, type: TuiSheetModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule });
599
+ TuiSheetModule.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "12.0.0", version: "12.2.16", ngImport: i0, type: TuiSheetModule, declarations: [TuiSheetsHostComponent,
600
+ TuiSheetComponent,
601
+ TuiSheetBarComponent,
602
+ TuiSheetHeadingComponent,
603
+ TuiSheetTopDirective,
604
+ TuiSheetDirective,
605
+ TuiSheetWrapperDirective,
606
+ TuiSheetCloseDirective,
607
+ TuiSheetStopDirective], imports: [CommonModule,
608
+ PolymorpheusModule,
609
+ TuiLetModule,
610
+ TuiButtonModule,
611
+ TuiOverscrollModule,
612
+ TuiScrollbarModule], exports: [TuiSheetsHostComponent,
613
+ TuiSheetComponent,
614
+ TuiSheetHeadingComponent,
615
+ TuiSheetDirective] });
616
+ TuiSheetModule.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "12.2.16", ngImport: i0, type: TuiSheetModule, imports: [[
561
617
  CommonModule,
562
618
  PolymorpheusModule,
563
619
  TuiLetModule,
564
620
  TuiButtonModule,
565
621
  TuiOverscrollModule,
566
622
  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);
623
+ ]] });
624
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.16", ngImport: i0, type: TuiSheetModule, decorators: [{
625
+ type: NgModule,
626
+ args: [{
627
+ imports: [
628
+ CommonModule,
629
+ PolymorpheusModule,
630
+ TuiLetModule,
631
+ TuiButtonModule,
632
+ TuiOverscrollModule,
633
+ TuiScrollbarModule,
634
+ ],
635
+ declarations: [
636
+ TuiSheetsHostComponent,
637
+ TuiSheetComponent,
638
+ TuiSheetBarComponent,
639
+ TuiSheetHeadingComponent,
640
+ TuiSheetTopDirective,
641
+ TuiSheetDirective,
642
+ TuiSheetWrapperDirective,
643
+ TuiSheetCloseDirective,
644
+ TuiSheetStopDirective,
645
+ ],
646
+ exports: [
647
+ TuiSheetsHostComponent,
648
+ TuiSheetComponent,
649
+ TuiSheetHeadingComponent,
650
+ TuiSheetDirective,
651
+ ],
652
+ schemas: [NO_ERRORS_SCHEMA],
653
+ }]
654
+ }] });
588
655
 
589
656
  /**
590
657
  * Generated bundle index. Do not edit.
591
658
  */
592
659
 
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 };
660
+ 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 };
594
661
  //# sourceMappingURL=taiga-ui-addon-mobile-components-sheet.js.map